tamga-vdesktop 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +25 -11
- package/dist/client/assets/index-w9d1s8Jy.js +418 -0
- package/dist/client/index.html +2 -1
- package/dist/server.js +25 -11
- package/package.json +1 -1
- package/dist/client/assets/index-zQEP78M7.js +0 -418
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
var Eb=Object.defineProperty;var Nb=(t,s,a)=>s in t?Eb(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var fn=(t,s,a)=>Nb(t,typeof s!="symbol"?s+"":s,a);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))l(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function a(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(u){if(u.ep)return;u.ep=!0;const d=a(u);fetch(u.href,d)}})();function T0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wd={exports:{}},pl={};/**
|
|
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 ug;function Mb(){if(ug)return pl;ug=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function a(l,u,d){var f=null;if(d!==void 0&&(f=""+d),u.key!==void 0&&(f=""+u.key),"key"in u){d={};for(var p in u)p!=="key"&&(d[p]=u[p])}else d=u;return u=d.ref,{$$typeof:t,type:l,key:f,ref:u!==void 0?u:null,props:d}}return pl.Fragment=s,pl.jsx=a,pl.jsxs=a,pl}var dg;function Db(){return dg||(dg=1,wd.exports=Mb()),wd.exports}var c=Db(),Cd={exports:{}},Pe={};/**
|
|
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 fg;function Tb(){if(fg)return Pe;fg=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.for("react.view_transition"),T=Symbol.iterator;function R(b){return b===null||typeof b!="object"?null:(b=T&&b[T]||b["@@iterator"],typeof b=="function"?b:null)}var I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,ue={};function pe(b,B,Y){this.props=b,this.context=B,this.refs=ue,this.updater=Y||I}pe.prototype.isReactComponent={},pe.prototype.setState=function(b,B){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,B,"setState")},pe.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function be(){}be.prototype=pe.prototype;function ee(b,B,Y){this.props=b,this.context=B,this.refs=ue,this.updater=Y||I}var me=ee.prototype=new be;me.constructor=ee,Z(me,pe.prototype),me.isPureReactComponent=!0;var ve=Array.isArray;function ae(){}var ge={H:null,A:null,T:null,S:null},_e=Object.prototype.hasOwnProperty;function we(b,B,Y){var G=Y.ref;return{$$typeof:t,type:b,key:B,ref:G!==void 0?G:null,props:Y}}function ye(b,B){return we(b.type,B,b.props)}function X(b){return typeof b=="object"&&b!==null&&b.$$typeof===t}function Q(b){var B={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(Y){return B[Y]})}var $=/\/+/g;function j(b,B){return typeof b=="object"&&b!==null&&b.key!=null?Q(""+b.key):B.toString(36)}function z(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(ae,ae):(b.status="pending",b.then(function(B){b.status==="pending"&&(b.status="fulfilled",b.value=B)},function(B){b.status==="pending"&&(b.status="rejected",b.reason=B)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function W(b,B,Y,G,fe){var ne=typeof b;(ne==="undefined"||ne==="boolean")&&(b=null);var A=!1;if(b===null)A=!0;else switch(ne){case"bigint":case"string":case"number":A=!0;break;case"object":switch(b.$$typeof){case t:case s:A=!0;break;case w:return A=b._init,W(A(b._payload),B,Y,G,fe)}}if(A)return fe=fe(b),A=G===""?"."+j(b,0):G,ve(fe)?(Y="",A!=null&&(Y=A.replace($,"$&/")+"/"),W(fe,B,Y,"",function(te){return te})):fe!=null&&(X(fe)&&(fe=ye(fe,Y+(fe.key==null||b&&b.key===fe.key?"":(""+fe.key).replace($,"$&/")+"/")+A)),B.push(fe)),1;A=0;var J=G===""?".":G+":";if(ve(b))for(var N=0;N<b.length;N++)G=b[N],ne=J+j(G,N),A+=W(G,B,Y,ne,fe);else if(N=R(b),typeof N=="function")for(b=N.call(b),N=0;!(G=b.next()).done;)G=G.value,ne=J+j(G,N++),A+=W(G,B,Y,ne,fe);else if(ne==="object"){if(typeof b.then=="function")return W(z(b),B,Y,G,fe);throw B=String(b),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return A}function D(b,B,Y){if(b==null)return b;var G=[],fe=0;return W(b,G,"","",function(ne){return B.call(Y,ne,fe++)}),G}function ce(b){if(b._status===-1){var B=b._result,Y=B();Y.then(function(G){(b._status===0||b._status===-1)&&(b._status=1,b._result=G,Y.status===void 0&&(Y.status="fulfilled",Y.value=G))},function(G){(b._status===0||b._status===-1)&&(b._status=2,b._result=G,Y.status===void 0&&(Y.status="rejected",Y.reason=G))}),b._status===-1&&(b._status=0,b._result=Y)}if(b._status===1)return b._result.default;throw b._result}var C=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)};function q(b){var B=ge.T,Y={};Y.types=B!==null?B.types:null,ge.T=Y;try{var G=b(),fe=ge.S;fe!==null&&fe(Y,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(ae,C)}catch(ne){C(ne)}finally{B!==null&&Y.types!==null&&(B.types=Y.types),ge.T=B}}function he(b){var B=ge.T;if(B!==null){var Y=B.types;Y===null?B.types=[b]:Y.indexOf(b)===-1&&Y.push(b)}else q(he.bind(null,b))}var de={map:D,forEach:function(b,B,Y){D(b,function(){B.apply(this,arguments)},Y)},count:function(b){var B=0;return D(b,function(){B++}),B},toArray:function(b){return D(b,function(B){return B})||[]},only:function(b){if(!X(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return Pe.Activity=g,Pe.Children=de,Pe.Component=pe,Pe.Fragment=a,Pe.Profiler=u,Pe.PureComponent=ee,Pe.StrictMode=l,Pe.Suspense=v,Pe.ViewTransition=y,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ge,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(b){return ge.H.useMemoCache(b)}},Pe.addTransitionType=he,Pe.cache=function(b){return function(){return b.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(b,B,Y){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var G=Z({},b.props),fe=b.key;if(B!=null)for(ne in B.key!==void 0&&(fe=""+B.key),B)!_e.call(B,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&B.ref===void 0||(G[ne]=B[ne]);var ne=arguments.length-2;if(ne===1)G.children=Y;else if(1<ne){for(var A=Array(ne),J=0;J<ne;J++)A[J]=arguments[J+2];G.children=A}return we(b.type,fe,G)},Pe.createContext=function(b){return b={$$typeof:f,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:d,_context:b},b},Pe.createElement=function(b,B,Y){var G,fe={},ne=null;if(B!=null)for(G in B.key!==void 0&&(ne=""+B.key),B)_e.call(B,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(fe[G]=B[G]);var A=arguments.length-2;if(A===1)fe.children=Y;else if(1<A){for(var J=Array(A),N=0;N<A;N++)J[N]=arguments[N+2];fe.children=J}if(b&&b.defaultProps)for(G in A=b.defaultProps,A)fe[G]===void 0&&(fe[G]=A[G]);return we(b,ne,fe)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(b){return{$$typeof:p,render:b}},Pe.isValidElement=X,Pe.lazy=function(b){return{$$typeof:w,_payload:{_status:-1,_result:b},_init:ce}},Pe.memo=function(b,B){return{$$typeof:_,type:b,compare:B===void 0?null:B}},Pe.startTransition=q,Pe.unstable_useCacheRefresh=function(){return ge.H.useCacheRefresh()},Pe.use=function(b){return ge.H.use(b)},Pe.useActionState=function(b,B,Y){return ge.H.useActionState(b,B,Y)},Pe.useCallback=function(b,B){return ge.H.useCallback(b,B)},Pe.useContext=function(b){return ge.H.useContext(b)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(b,B){return ge.H.useDeferredValue(b,B)},Pe.useEffect=function(b,B){return ge.H.useEffect(b,B)},Pe.useEffectEvent=function(b){return ge.H.useEffectEvent(b)},Pe.useId=function(){return ge.H.useId()},Pe.useImperativeHandle=function(b,B,Y){return ge.H.useImperativeHandle(b,B,Y)},Pe.useInsertionEffect=function(b,B){return ge.H.useInsertionEffect(b,B)},Pe.useLayoutEffect=function(b,B){return ge.H.useLayoutEffect(b,B)},Pe.useMemo=function(b,B){return ge.H.useMemo(b,B)},Pe.useOptimistic=function(b,B){return ge.H.useOptimistic(b,B)},Pe.useReducer=function(b,B,Y){return ge.H.useReducer(b,B,Y)},Pe.useRef=function(b){return ge.H.useRef(b)},Pe.useState=function(b){return ge.H.useState(b)},Pe.useSyncExternalStore=function(b,B,Y){return ge.H.useSyncExternalStore(b,B,Y)},Pe.useTransition=function(){return ge.H.useTransition()},Pe.version="19.3.1",Pe}var mg;function Hf(){return mg||(mg=1,Cd.exports=Tb()),Cd.exports}var E=Hf();const ba=T0(E);var kd={exports:{}},vl={},Ed={exports:{}},Nd={};/**
|
|
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 _g;function jb(){return _g||(_g=1,(function(t){function s(z,W){var D=z.length;z.push(W);e:for(;0<D;){var ce=D-1>>>1,C=z[ce];if(0<u(C,W))z[ce]=W,z[D]=C,D=ce;else break e}}function a(z){return z.length===0?null:z[0]}function l(z){if(z.length===0)return null;var W=z[0],D=z.pop();if(D!==W){z[0]=D;e:for(var ce=0,C=z.length,q=C>>>1;ce<q;){var he=2*(ce+1)-1,de=z[he],b=he+1,B=z[b];if(0>u(de,D))b<C&&0>u(B,de)?(z[ce]=B,z[b]=D,ce=b):(z[ce]=de,z[he]=D,ce=he);else if(b<C&&0>u(B,D))z[ce]=B,z[b]=D,ce=b;else break e}}return W}function u(z,W){var D=z.sortIndex-W.sortIndex;return D!==0?D:z.id-W.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var f=Date,p=f.now();t.unstable_now=function(){return f.now()-p}}var v=[],_=[],w=1,g=null,y=3,T=!1,R=!1,I=!1,Z=!1,ue=typeof setTimeout=="function"?setTimeout:null,pe=typeof clearTimeout=="function"?clearTimeout:null,be=typeof setImmediate<"u"?setImmediate:null;function ee(z){for(var W=a(_);W!==null;){if(W.callback===null)l(_);else if(W.startTime<=z)l(_),W.sortIndex=W.expirationTime,s(v,W);else break;W=a(_)}}function me(z){if(I=!1,ee(z),!R)if(a(v)!==null)R=!0,ve||(ve=!0,X());else{var W=a(_);W!==null&&j(me,W.startTime-z)}}var ve=!1,ae=-1,ge=5,_e=-1;function we(){return Z?!0:!(t.unstable_now()-_e<ge)}function ye(){if(Z=!1,ve){var z=t.unstable_now();_e=z;var W=!0;try{e:{R=!1,I&&(I=!1,pe(ae),ae=-1),T=!0;var D=y;try{t:{for(ee(z),g=a(v);g!==null&&!(g.expirationTime>z&&we());){var ce=g.callback;if(typeof ce=="function"){g.callback=null,y=g.priorityLevel;var C=ce(g.expirationTime<=z);if(z=t.unstable_now(),typeof C=="function"){g.callback=C,ee(z),W=!0;break t}g===a(v)&&l(v),ee(z)}else l(v);g=a(v)}if(g!==null)W=!0;else{var q=a(_);q!==null&&j(me,q.startTime-z),W=!1}}break e}finally{g=null,y=D,T=!1}W=void 0}}finally{W?X():ve=!1}}}var X;if(typeof be=="function")X=function(){be(ye)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,$=Q.port2;Q.port1.onmessage=ye,X=function(){$.postMessage(null)}}else X=function(){ue(ye,0)};function j(z,W){ae=ue(function(){z(t.unstable_now())},W)}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(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(z){switch(y){case 1:case 2:case 3:var W=3;break;default:W=y}var D=y;y=W;try{return z()}finally{y=D}},t.unstable_requestPaint=function(){Z=!0},t.unstable_runWithPriority=function(z,W){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var D=y;y=z;try{return W()}finally{y=D}},t.unstable_scheduleCallback=function(z,W,D){var ce=t.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?ce+D:ce):D=ce,z){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=D+C,z={id:w++,callback:W,priorityLevel:z,startTime:D,expirationTime:C,sortIndex:-1},D>ce?(z.sortIndex=D,s(_,z),a(v)===null&&z===a(_)&&(I?(pe(ae),ae=-1):I=!0,j(me,D-ce))):(z.sortIndex=C,s(v,z),R||T||(R=!0,ve||(ve=!0,X()))),z},t.unstable_shouldYield=we,t.unstable_wrapCallback=function(z){var W=y;return function(){var D=y;y=W;try{return z.apply(this,arguments)}finally{y=D}}}})(Nd)),Nd}var pg;function Ab(){return pg||(pg=1,Ed.exports=jb()),Ed.exports}var Md={exports:{}},ci={};/**
|
|
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 vg;function Bb(){if(vg)return ci;vg=1;var t=Hf();function s(w){var g="https://react.dev/errors/"+w;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+w+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(s(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},u=Symbol.for("react.portal"),d=Symbol.for("react.recoverable"),f=Symbol.for("react.optimistic_key");function p(w,g,y){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:T==null?null:T===f?f:""+T,children:w,containerInfo:g,implementation:y}}var v=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function _(w,g){if(w==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ci.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,ci.browser=function(w){return{$$typeof:d,_reason:w}},ci.createPortal=function(w,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return p(w,g,null,y)},ci.flushSync=function(w){var g=v.T,y=l.p;try{if(v.T=null,l.p=2,w)return w()}finally{v.T=g,l.p=y,l.d.f()}},ci.preconnect=function(w,g){typeof w=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,l.d.C(w,g))},ci.prefetchDNS=function(w){typeof w=="string"&&l.d.D(w)},ci.preinit=function(w,g){if(typeof w=="string"&&g&&typeof g.as=="string"){var y=g.as,T=_(y,g.crossOrigin),R=typeof g.integrity=="string"?g.integrity:void 0,I=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?l.d.S(w,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:T,integrity:R,fetchPriority:I}):y==="script"&&l.d.X(w,{crossOrigin:T,integrity:R,fetchPriority:I,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ci.preinitModule=function(w,g){if(typeof w=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=_(g.as,g.crossOrigin);l.d.M(w,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&l.d.M(w)},ci.preload=function(w,g){if(typeof w=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,T=_(y,g.crossOrigin);l.d.L(w,y,{crossOrigin:T,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ci.preloadModule=function(w,g){if(typeof w=="string")if(g){var y=_(g.as,g.crossOrigin);l.d.m(w,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else l.d.m(w)},ci.requestFormReset=function(w){l.d.r(w)},ci.unstable_batchedUpdates=function(w,g){return w(g)},ci.useFormState=function(w,g,y){return v.H.useFormState(w,g,y)},ci.useFormStatus=function(){return v.H.useHostTransitionStatus()},ci.version="19.3.1",ci}var gg;function j0(){if(gg)return Md.exports;gg=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(s){console.error(s)}}return t(),Md.exports=Bb(),Md.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 xg;function Rb(){if(xg)return vl;xg=1;var t=Ab(),s=Hf(),a=j0();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)i+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){for(var i=e,r=i;r&&!r.alternate;)i=r,(i.flags&4098)!==0&&(e=i.return),r=i.return;for(;i.return;)i=i.return;return i.tag===3?e:null}function f(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function p(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function v(e){if(d(e)!==e)throw Error(l(188))}function _(e){var i=e.alternate;if(!i){if(i=d(e),i===null)throw Error(l(188));return i!==e?null:e}for(var r=e,n=i;;){var o=r.return;if(o===null)break;var h=o.alternate;if(h===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===h.child){for(h=o.child;h;){if(h===r)return v(o),e;if(h===n)return v(o),i;h=h.sibling}throw Error(l(188))}if(r.return!==n.return)r=o,n=h;else{for(var m=!1,x=o.child;x;){if(x===r){m=!0,r=o,n=h;break}if(x===n){m=!0,n=o,r=h;break}x=x.sibling}if(!m){for(x=h.child;x;){if(x===r){m=!0,r=h,n=o;break}if(x===n){m=!0,n=h,r=o;break}x=x.sibling}if(!m)throw Error(l(189))}}if(r.alternate!==n)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:i}function w(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=w(e),i!==null)return i;e=e.sibling}return null}function g(e,i,r,n,o,h){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&r(e,n,o,h)||(e.tag!==22||e.memoizedState===null)&&(i||e.tag!==5&&e.tag!==27)&&g(e.child,i,r,n,o,h))return!0;e=e.sibling}return!1}function y(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function T(e){var i=!1;for(e=e.return;e!==null&&(e.tag===4&&(i=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return i}function R(e){var i=[null,null],r=y(e);return r===null||I(i,e,r.child,{foundSelf:!1}),i}function I(e,i,r,n){for(;r!==null;){if(r===i)n.foundSelf=!0;else if(r.tag===5||r.tag===27||r.tag===6){if(n.foundSelf)return e[1]=r,!0;e[0]=r}else if((r.tag!==22||r.memoizedState===null)&&I(e,i,r.child,n))return!0;r=r.sibling}return!1}function Z(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(l(559))}}var ue=null,pe=null;function be(e,i,r){return e===r?!0:e===i?(ue=e,!0):!1}function ee(e,i,r){return e===r?(pe=e,!1):e===i?(pe!==null&&(ue=e),!0):!1}function me(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ve(e,i,r){for(var n=0,o=e;o;o=r(o))n++;o=0;for(var h=i;h;h=r(h))o++;for(;0<n-o;)e=r(e),n--;for(;0<o-n;)i=r(i),o--;for(;n--;){if(e===i||i!==null&&e===i.alternate)return e;e=r(e),i=r(i)}return null}var ae=Object.assign,ge=Symbol.for("react.element"),_e=Symbol.for("react.transitional.element"),we=Symbol.for("react.portal"),ye=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),j=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),he=Symbol.for("react.legacy_hidden"),de=Symbol.for("react.memo_cache_sentinel"),b=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),Y=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ye:return"Fragment";case Q:return"Profiler";case X:return"StrictMode";case W:return"Suspense";case D:return"SuspenseList";case q:return"Activity";case b:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case we:return"Portal";case j:return e.displayName||"Context";case $:return(e._context.displayName||"Context")+".Consumer";case z:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ce:return i=e.displayName||null,i!==null?i:ne(e.type)||"Memo";case C:i=e._payload,e=e._init;try{return ne(e(i))}catch{}}return null}var A=Array.isArray,J=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ke=[],oe=-1;function Ye(e){return{current:e}}function ze(e){0>oe||(e.current=ke[oe],ke[oe]=null,oe--)}function De(e,i){oe++,ke[oe]=e.current,e.current=i}var Te=Ye(null),mt=Ye(null),_t=Ye(null),gt=Ye(null);function bt(e,i){switch(De(_t,i),De(mt,e),De(Te,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?yv(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=yv(i),e=bv(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ze(Te),De(Te,e)}function lt(){ze(Te),ze(mt),ze(_t)}function Nt(e){var i=e.memoizedState;i!==null&&(ma._currentValue=i.memoizedState,De(gt,e)),i=Te.current;var r=bv(i,e.type);i!==r&&(De(mt,e),De(Te,r))}function Ui(e){mt.current===e&&(ze(Te),ze(mt)),gt.current===e&&(ze(gt),ma._currentValue=te)}var ts,Pi;function Vt(e){if(ts===void 0)try{throw Error()}catch(r){var i=r.stack.trim().match(/\n( *(at )?)/);ts=i&&i[1]||"",Pi=-1<r.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ts+e+Pi}var is=!1;function tr(e,i){if(!e||is)return"";is=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(i){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(Ce){var L=Ce}Reflect.construct(e,[],re)}else{try{re.call()}catch(Ce){L=Ce}re=!1;try{var F=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),re=!0,new e}finally{re&&(F!==void 0?Object.defineProperty(e.prototype,"props",F):delete e.prototype.props)}}}else{try{throw Error()}catch(Ce){L=Ce}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(Ce){if(Ce&&L&&typeof Ce.stack=="string")return[Ce.stack,L.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=n.DetermineComponentFrameRoot(),m=h[0],x=h[1];if(m&&x){var k=m.split(`
|
|
44
|
-
`),U=x.split(`
|
|
45
|
-
`);for(o=n=0;n<k.length&&!k[n].includes("DetermineComponentFrameRoot");)n++;for(;o<U.length&&!U[o].includes("DetermineComponentFrameRoot");)o++;if(n===k.length||o===U.length)for(n=k.length-1,o=U.length-1;1<=n&&0<=o&&k[n]!==U[o];)o--;for(;1<=n&&0<=o;n--,o--)if(k[n]!==U[o]){if(n!==1||o!==1)do if(n--,o--,0>o||k[n]!==U[o]){var V=`
|
|
46
|
-
`+k[n].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=n&&0<=o);break}}}finally{is=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?Vt(r):""}function ie(e,i){switch(e.tag){case 26:case 27:case 5:return Vt(e.type);case 16:return Vt("Lazy");case 13:return e.child!==i&&i!==null?Vt("Suspense Fallback"):Vt("Suspense");case 19:return Vt("SuspenseList");case 0:case 15:return tr(e.type,!1);case 11:return tr(e.type.render,!1);case 1:return tr(e.type,!0);case 31:return Vt("Activity");case 30:return Vt("ViewTransition");default:return""}}function $e(e){try{var i="",r=null;do i+=ie(e,r),r=e,e=e.return;while(e);return i}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var Mn=Object.prototype.hasOwnProperty,ir=t.unstable_scheduleCallback,Hr=t.unstable_cancelCallback,Ze=t.unstable_shouldYield,mi=t.unstable_requestPaint,At=t.unstable_now,Wc=t.unstable_getCurrentPriorityLevel,Ur=t.unstable_ImmediatePriority,Dn=t.unstable_UserBlockingPriority,Mi=t.unstable_NormalPriority,Pr=t.unstable_LowPriority,Tn=t.unstable_IdlePriority,ql=t.log,ka=t.unstable_setDisableYieldValue,Bs=null,ii=null;function fs(e){if(typeof ql=="function"&&ka(e),ii&&typeof ii.setStrictMode=="function")try{ii.setStrictMode(Bs,e)}catch{}}var si=Math.clz32?Math.clz32:Zc,Gc=Math.log,$c=Math.LN2;function Zc(e){return e>>>=0,e===0?32:31-(Gc(e)/$c|0)|0}var ms=256,Yr=262144,ss=4194304;function _s(e){var i=e&42;if(i!==0)return i;switch(e&-e){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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kr(e,i,r){var n=e.pendingLanes;if(n===0)return 0;var o=0,h=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var x=n&134217727;return x!==0?(n=x&~h,n!==0?o=_s(n):(m&=x,m!==0?o=_s(m):r||(r=x&~e,r!==0&&(o=_s(r))))):(x=n&~h,x!==0?o=_s(x):m!==0?o=_s(m):r||(r=n&~e,r!==0&&(o=_s(r)))),o===0?0:i!==0&&i!==o&&(i&h)===0&&(h=o&-o,r=i&-i,h>=r||h===32&&(r&4194048)!==0)?i:o}function sr(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function Ea(e,i){(i&8)!==0&&(i|=i&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=i;0<r;){var n=31-si(r),o=1<<n;i|=e[n],r&=~o}return i}function Fl(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Il(){var e=ss;return ss<<=1,(ss&62914560)===0&&(ss=4194304),e}function rr(e){for(var i=[],r=0;31>r;r++)i.push(e);return i}function nr(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qc(e,i,r,n,o,h){var m=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var x=e.entanglements,k=e.expirationTimes,U=e.hiddenUpdates;for(r=m&~r;0<r;){var V=31-si(r),re=1<<V;x[V]=0,k[V]=-1;var L=U[V];if(L!==null)for(U[V]=null,V=0;V<L.length;V++){var F=L[V];F!==null&&(F.lane&=-536870913)}r&=~re}n!==0&&Na(e,n,0),h!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=h&~(m&~i))}function Na(e,i,r){e.pendingLanes|=i,e.suspendedLanes&=~i;var n=31-si(i);e.entangledLanes|=i,e.entanglements[n]=e.entanglements[n]|1073741824|r&261930}function Vl(e,i){var r=e.entangledLanes|=i;for(e=e.entanglements;r;){var n=31-si(r),o=1<<n;o&i|e[n]&i&&(e[n]|=i),r&=~o}}function Xl(e,i){var r=i&-i;return r=(r&42)!==0?1:qr(r),(r&(e.suspendedLanes|i))!==0?0:r}function qr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Fr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wl(){var e=N.p;return e!==0?e:(e=window.event,e===void 0?32:rg(e.type))}function Gl(e,i){var r=N.p;try{return N.p=e,i()}finally{N.p=r}}var rs=Math.random().toString(36).slice(2),S="__reactFiber$"+rs,O="__reactProps$"+rs,K="__reactContainer$"+rs,xe="__reactEvents$"+rs,Be="__reactListeners$"+rs,Oe="__reactHandles$"+rs,Fe="__reactResources$"+rs,je="__reactMarker$"+rs,Ue="__reactLoad$"+rs;function nt(e){delete e[S],delete e[O],delete e[Be],delete e[Oe]}function Bt(e){var i;if(i=e[S])return i;for(var r=e.parentNode;r;){if(i=r[K]||r[S]){if(r=i.alternate,i.child!==null||r!==null&&r.child!==null)for(e=Hv(e);e!==null;){if(r=e[S])return r;e=Hv(e)}return i}e=r,r=e.parentNode}return null}function Rs(e){if(e=e[S]||e[K]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function ns(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function Os(e){var i=e[Fe];return i||(i=e[Fe]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Xt(e){e[je]=!0}function tm(e){e[Ue]=void 0}var im=new Set,sm={};function Ir(e,i){jn(e,i),jn(e+"Capture",i)}function jn(e,i){for(sm[e]=i,e=0;e<i.length;e++)im.add(i[e])}var F1=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]*$"),rm={},nm={};function I1(e){return Mn.call(nm,e)?!0:Mn.call(rm,e)?!1:F1.test(e)?nm[e]=!0:(rm[e]=!0,!1)}var it=!1;function am(){var e=it;return it=!1,e}function $l(e,i,r){if(I1(i))if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var n=i.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,r)}}function Zl(e,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,r)}}function zs(e,i,r,n){if(n===null)e.removeAttribute(r);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(i,r,n)}}function Di(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lm(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function V1(e,i,r){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,h=n.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return o.call(this)},set:function(m){r=""+m,h.call(this,m)}}),Object.defineProperty(e,i,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(m){r=""+m},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function Jc(e){if(!e._valueTracker){var i=lm(e)?"checked":"value";e._valueTracker=V1(e,i,""+e[i])}}function om(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var r=i.getValue(),n="";return e&&(n=lm(e)?e.checked?"true":"false":e.value),e=n,e!==r?(i.setValue(e),!0):!1}var X1=/[\n"\\]/g;function Yi(e){return e.replace(X1,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function eh(e,i,r,n,o,h,m,x){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),i!=null?m==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+Di(i)):e.value!==""+Di(i)&&(e.value=""+Di(i)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),i!=null?m==="number"&&e.value==i?th(e,Di(e.value)):th(e,Di(i)):r!=null?th(e,Di(r)):n!=null&&e.removeAttribute("value"),o==null&&h!=null&&(e.defaultChecked=!!h),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Di(x):e.removeAttribute("name")}function cm(e,i,r,n,o,h,m,x){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),i!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||i!=null)){Jc(e);return}r=r!=null?""+Di(r):"",i=i!=null?""+Di(i):r,x||i===e.value||(e.value=i),e.defaultValue=i}n=n??o,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=x?e.checked:!!n,e.defaultChecked=!!n,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Jc(e)}function th(e,i){e.defaultValue!==""+i&&(e.defaultValue=""+i)}function An(e,i,r,n){if(e=e.options,i){i={};for(var o=0;o<r.length;o++)i["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=i.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Di(r),i=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}i!==null||e[o].disabled||(i=e[o])}i!==null&&(i.selected=!0)}}function hm(e,i,r){if(i!=null&&(i=""+Di(i),i!==e.value&&(e.value=i),r==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=r!=null?""+Di(r):""}function um(e,i,r,n){if(i==null){if(n!=null){if(r!=null)throw Error(l(92));if(A(n)){if(1<n.length)throw Error(l(93));n=n[0]}r=n}r==null&&(r=""),i=r}r=Di(i),e.defaultValue=r,n=e.textContent,n===r&&n!==""&&n!==null&&(e.value=n),Jc(e)}function Bn(e,i){if(i){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=i;return}}e.textContent=i}var W1=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 dm(e,i,r){var n=i.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?n?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":n?e.setProperty(i,r):typeof r!="number"||r===0||W1.has(i)?i==="float"?e.cssFloat=r:e[i]=(""+r).trim():e[i]=r+"px"}function fm(e,i,r){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,r!=null){for(var n in r)!r.hasOwnProperty(n)||i!=null&&i.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="",it=!0);for(var o in i)n=i[o],i.hasOwnProperty(o)&&r[o]!==n&&(dm(e,o,n),it=!0)}else for(var h in i)i.hasOwnProperty(h)&&dm(e,h,i[h])}function ih(e){if(e.indexOf("-")===-1)return!1;switch(e){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 G1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),$1=/^[\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 Ql(e){return $1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ps(){}var sh=null;function rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rn=null,On=null;function mm(e){var i=Rs(e);if(i&&(e=i.stateNode)){var r=e[O]||null;e:switch(e=i.stateNode,i.type){case"input":if(eh(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),i=r.name,r.type==="radio"&&i!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Yi(""+i)+'"][type="radio"]'),i=0;i<r.length;i++){var n=r[i];if(n!==e&&n.form===e.form){var o=n[O]||null;if(!o)throw Error(l(90));eh(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(i=0;i<r.length;i++)n=r[i],n.form===e.form&&om(n)}break e;case"textarea":hm(e,r.value,r.defaultValue);break e;case"select":i=r.value,i!=null&&An(e,!!r.multiple,i,!1)}}}var nh=!1;function _m(e,i,r){if(nh)return e(i,r);nh=!0;try{var n=e(i);return n}finally{if(nh=!1,(Rn!==null||On!==null)&&(Jo(),Rn&&(i=Rn,e=On,On=Rn=null,mm(i),e)))for(i=0;i<e.length;i++)mm(e[i])}}function Ma(e,i){var r=e.stateNode;if(r===null)return null;var n=r[O]||null;if(n===null)return null;r=n[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(l(231,i,typeof r));return r}var Ls=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ah=!1;if(Ls)try{var Da={};Object.defineProperty(Da,"passive",{get:function(){ah=!0}}),window.addEventListener("test",Da,Da),window.removeEventListener("test",Da,Da)}catch{ah=!1}var ar=null,lh=null,Jl=null;function pm(){if(Jl)return Jl;var e,i=lh,r=i.length,n,o="value"in ar?ar.value:ar.textContent,h=o.length;for(e=0;e<r&&i[e]===o[e];e++);var m=r-e;for(n=1;n<=m&&i[r-n]===o[h-n];n++);return Jl=o.slice(e,1<n?1-n:void 0)}function eo(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function to(){return!0}function vm(){return!1}function _i(e){function i(r,n,o,h,m){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=h,this.target=m,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(r=e[x],this[x]=r?r(h):h[x]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?to:vm,this.isPropagationStopped=vm,this}return ae(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=to)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=to)},persist:function(){},isPersistent:to}),i}var lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},io=_i(lr),Ta=ae({},lr,{view:0,detail:0}),Z1=_i(Ta),oh,ch,ja,so=ae({},Ta,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ja&&(ja&&e.type==="mousemove"?(oh=e.screenX-ja.screenX,ch=e.screenY-ja.screenY):ch=oh=0,ja=e),oh)},movementY:function(e){return"movementY"in e?e.movementY:ch}}),gm=_i(so),Q1=ae({},so,{dataTransfer:0}),J1=_i(Q1),ex=ae({},Ta,{relatedTarget:0}),hh=_i(ex),tx=ae({},lr,{animationName:0,elapsedTime:0,pseudoElement:0}),ix=_i(tx),sx=ae({},lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rx=_i(sx),nx=ae({},lr,{data:0}),xm=_i(nx),ax={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lx={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"},ox={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cx(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=ox[e])?!!i[e]:!1}function uh(){return cx}var hx=ae({},Ta,{key:function(e){if(e.key){var i=ax[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=eo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uh,charCode:function(e){return e.type==="keypress"?eo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?eo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ux=_i(hx),dx=ae({},so,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ym=_i(dx),fx=ae({},lr,{submitter:0}),mx=_i(fx),_x=ae({},Ta,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uh}),px=_i(_x),vx=ae({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),gx=_i(vx),xx=ae({},so,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),yx=_i(xx),bx=ae({},lr,{newState:0,oldState:0,source:0}),Sx=_i(bx),wx=[9,13,27,32],dh=Ls&&"CompositionEvent"in window,Aa=null;Ls&&"documentMode"in document&&(Aa=document.documentMode);var Cx=Ls&&"TextEvent"in window&&!Aa,bm=Ls&&(!dh||Aa&&8<Aa&&11>=Aa),Sm=" ",wm=!1;function Cm(e,i){switch(e){case"keyup":return wx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function km(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zn=!1;function kx(e,i){switch(e){case"compositionend":return km(i);case"keypress":return i.which!==32?null:(wm=!0,Sm);case"textInput":return e=i.data,e===Sm&&wm?null:e;default:return null}}function Ex(e,i){if(zn)return e==="compositionend"||!dh&&Cm(e,i)?(e=pm(),Jl=lh=ar=null,zn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return bm&&i.locale!=="ko"?null:i.data;default:return null}}var Nx={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 Em(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!Nx[e.type]:i==="textarea"}function Nm(e,i,r,n){Rn?On?On.push(n):On=[n]:Rn=n,i=nc(i,"onChange"),0<i.length&&(r=new io("onChange","change",null,r,n),e.push({event:r,listeners:i}))}var Ba=null,Ra=null;function Mx(e){mv(e,0)}function ro(e){var i=ns(e);if(om(i))return e}function Mm(e,i){if(e==="change")return i}var Dm=!1;if(Ls){var fh;if(Ls){var mh="oninput"in document;if(!mh){var Tm=document.createElement("div");Tm.setAttribute("oninput","return;"),mh=typeof Tm.oninput=="function"}fh=mh}else fh=!1;Dm=fh&&(!document.documentMode||9<document.documentMode)}function jm(){Ba&&(Ba.detachEvent("onpropertychange",Am),Ra=Ba=null)}function Am(e){if(e.propertyName==="value"&&ro(Ra)){var i=[];Nm(i,Ra,e,rh(e)),_m(Mx,i)}}function Dx(e,i,r){e==="focusin"?(jm(),Ba=i,Ra=r,Ba.attachEvent("onpropertychange",Am)):e==="focusout"&&jm()}function Tx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ro(Ra)}function jx(e,i){if(e==="click")return ro(i)}function Ax(e,i){if(e==="input"||e==="change")return ro(i)}function Bx(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Ti=typeof Object.is=="function"?Object.is:Bx;function Oa(e,i){if(Ti(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var r=Object.keys(e),n=Object.keys(i);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Mn.call(i,o)||!Ti(e[o],i[o]))return!1}return!0}function _h(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Bm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rm(e,i){var r=Bm(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=i&&n>=i)return{node:r,offset:i-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Bm(r)}}function Om(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Om(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function zm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=_h(e.document);i instanceof e.HTMLIFrameElement;){try{var r=typeof i.contentWindow.location.href=="string"}catch{r=!1}if(r)e=i.contentWindow;else break;i=_h(e.document)}return i}function ph(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var Rx=Ls&&"documentMode"in document&&11>=document.documentMode,Ln=null,vh=null,za=null,gh=!1;function Lm(e,i,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gh||Ln==null||Ln!==_h(n)||(n=Ln,"selectionStart"in n&&ph(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),za&&Oa(za,n)||(za=n,n=nc(vh,"onSelect"),0<n.length&&(i=new io("onSelect","select",null,i,r),e.push({event:i,listeners:n}),i.target=Ln)))}function Vr(e,i){var r={};return r[e.toLowerCase()]=i.toLowerCase(),r["Webkit"+e]="webkit"+i,r["Moz"+e]="moz"+i,r}var Hn={animationend:Vr("Animation","AnimationEnd"),animationiteration:Vr("Animation","AnimationIteration"),animationstart:Vr("Animation","AnimationStart"),transitionrun:Vr("Transition","TransitionRun"),transitionstart:Vr("Transition","TransitionStart"),transitioncancel:Vr("Transition","TransitionCancel"),transitionend:Vr("Transition","TransitionEnd")},xh={},Hm={};Ls&&(Hm=document.createElement("div").style,"AnimationEvent"in window||(delete Hn.animationend.animation,delete Hn.animationiteration.animation,delete Hn.animationstart.animation),"TransitionEvent"in window||delete Hn.transitionend.transition);function Xr(e){if(xh[e])return xh[e];if(!Hn[e])return e;var i=Hn[e],r;for(r in i)if(i.hasOwnProperty(r)&&r in Hm)return xh[e]=i[r];return e}var Um=Xr("animationend"),Pm=Xr("animationiteration"),Ym=Xr("animationstart"),Ox=Xr("transitionrun"),zx=Xr("transitionstart"),Lx=Xr("transitioncancel"),Km=Xr("transitionend"),qm=new Map,yh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");yh.push("scrollEnd");function as(e,i){qm.set(e,i),Ir(i,[e])}var Hx=0;function Hs(e,i){if(e.name!=null&&e.name!=="auto")return e.name;if(i.autoName!==null)return i.autoName;e=hs.identifierPrefix;var r=Hx++;return e="_"+e+"t_"+r.toString(32)+"_",i.autoName=e}function Fm(e){if(e==null||typeof e=="string")return e;var i=null,r=ra;if(r!==null)for(var n=0;n<r.length;n++){var o=e[r[n]];if(o!=null){if(o==="none")return"none";i=i==null?o:i+(" "+o)}}return i??e.default}function Us(e,i){return e=Fm(e),i=Fm(i),i==null?e==="auto"?null:e:i==="auto"?null:i}var no=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ki=[],Un=0,bh=0;function ao(){for(var e=Un,i=bh=Un=0;i<e;){var r=Ki[i];Ki[i++]=null;var n=Ki[i];Ki[i++]=null;var o=Ki[i];Ki[i++]=null;var h=Ki[i];if(Ki[i++]=null,n!==null&&o!==null){var m=n.pending;m===null?o.next=o:(o.next=m.next,m.next=o),n.pending=o}h!==0&&Im(r,o,h)}}function lo(e,i,r,n){Ki[Un++]=e,Ki[Un++]=i,Ki[Un++]=r,Ki[Un++]=n,bh|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Sh(e,i,r,n){return lo(e,i,r,n),oo(e)}function Wr(e,i){return lo(e,null,null,i),oo(e)}function Im(e,i,r){e.lanes|=r;var n=e.alternate;n!==null&&(n.lanes|=r);for(var o=!1,h=e.return;h!==null;)h.childLanes|=r,n=h.alternate,n!==null&&(n.childLanes|=r),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(o=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,o&&i!==null&&(o=31-si(r),e=h.hiddenUpdates,n=e[o],n===null?e[o]=[i]:n.push(i),i.lane=r|536870912),h):null}function oo(e){if(50<rl)throw rl=0,Qo=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Pn={};function Ux(e,i,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Si(e,i,r,n){return new Ux(e,i,r,n)}function wh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ps(e,i){var r=e.alternate;return r===null?(r=Si(e.tag,i,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=i,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&1206910976,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,i=e.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Vm(e,i){e.flags&=1206910978;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,i=r.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function co(e,i,r,n,o,h){var m=0;if(n=e,typeof n=="function")wh(n)&&(m=1);else if(typeof n=="string")m=fb(e,r,Te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(n){case q:return e=Si(31,r,i,o),e.elementType=q,e.lanes=h,e;case ye:return Gr(r.children,o,h,i);case X:m=8,o|=24;break;case Q:return e=Si(12,r,i,o|2),e.elementType=Q,e.lanes=h,e;case W:return e=Si(13,r,i,o),e.elementType=W,e.lanes=h,e;case D:return e=Si(19,r,i,o),e.elementType=D,e.lanes=h,e;case he:case b:return e=o|32,e=Si(30,r,i,e),e.elementType=b,e.lanes=h,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:m=10;break e;case $:m=9;break e;case z:m=11;break e;case ce:m=14;break e;case C:m=16,n=null;break e}m=29,r=Error(l(130,e===null?"null":typeof e,"")),n=null}return i=Si(m,r,i,o),i.elementType=e,i.type=n,i.lanes=h,i}function Gr(e,i,r,n){return e=Si(7,e,n,i),e.lanes=r,e}function Ch(e,i,r){return e=Si(6,e,null,i),e.lanes=r,e}function Xm(e){var i=Si(18,null,null,0);return i.stateNode=e,i}function kh(e,i,r){return i=Si(4,e.children!==null?e.children:[],e.key,i),i.lanes=r,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Wm=new WeakMap;function qi(e,i){if(typeof e=="object"&&e!==null){var r=Wm.get(e);return r!==void 0?r:(i={value:e,source:i,stack:$e(i)},Wm.set(e,i),i)}return{value:e,source:i,stack:$e(i)}}var Yn=[],Kn=0,ho=null,La=0,Fi=[],Ii=0,or=null,vs=1,gs="";function Ys(e,i){Yn[Kn++]=La,Yn[Kn++]=ho,ho=e,La=i}function Gm(e,i,r){Fi[Ii++]=vs,Fi[Ii++]=gs,Fi[Ii++]=or,or=e;var n=vs;e=gs;var o=32-si(n)-1;n&=~(1<<o),r+=1;var h=32-si(i)+o;if(30<h){var m=o-o%5;h=(n&(1<<m)-1).toString(32),n>>=m,o-=m,vs=1<<32-si(i)+o|r<<o|n,gs=h+e}else vs=1<<h|r<<o|n,gs=e}function uo(e){e.return!==null&&(Ys(e,1),Gm(e,1,0))}function Eh(e){for(;e===ho;)ho=Yn[--Kn],Yn[Kn]=null,La=Yn[--Kn],Yn[Kn]=null;for(;e===or;)or=Fi[--Ii],Fi[Ii]=null,gs=Fi[--Ii],Fi[Ii]=null,vs=Fi[--Ii],Fi[Ii]=null}function $m(e,i){Fi[Ii++]=vs,Fi[Ii++]=gs,Fi[Ii++]=or,vs=i.id,gs=i.overflow,or=e}var Wt=null,pt=null,Ie=!1,cr=null,Vi=!1,Nh=Error(l(519));function hr(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ha(qi(i,e)),Nh}function Zm(e){var i=e.stateNode,r=e.type,n=e.memoizedProps;switch(i[S]=e,i[O]=n,r){case"dialog":Ge("cancel",i),Ge("close",i);break;case"iframe":case"object":case"embed":Ge("load",i);break;case"video":case"audio":for(r=0;r<al.length;r++)Ge(al[r],i);break;case"source":Ge("error",i);break;case"img":case"image":case"link":Ge("error",i),Ge("load",i);break;case"details":Ge("toggle",i);break;case"input":Ge("invalid",i),cm(i,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ge("invalid",i);break;case"textarea":Ge("invalid",i),um(i,n.value,n.defaultValue,n.children)}r=n.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||i.textContent===""+r||n.suppressHydrationWarning===!0||gv(i.textContent,r)?(n.popover!=null&&(Ge("beforetoggle",i),Ge("toggle",i)),n.onScroll!=null&&Ge("scroll",i),n.onScrollEnd!=null&&Ge("scrollend",i),n.onClick!=null&&(i.onclick=ps),i=!0):i=!1,i||hr(e,!0)}function fo(e){for(Wt=e.return;Wt;)switch(Wt.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:Wt=Wt.return}}function qn(e){if(e!==Wt)return!1;if(!Ie)return fo(e),Ie=!0,!1;var i=e.tag,r;if((r=i!==3&&i!==27)&&((r=i===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||sd(e.type,e.memoizedProps)),r=!r),r&&pt&&hr(e),fo(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));pt=Lv(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));pt=Lv(e)}else i===27?(i=pt,Er(e.type)?(e=dd,dd=null,pt=e):pt=i):pt=Wt?Wi(e.stateNode.nextSibling):null;return!0}function $r(){pt=Wt=null,Ie=!1}function Mh(){var e=cr;return e!==null&&(ki===null?ki=e:ki.push.apply(ki,e),cr=null),e}function Ha(e){cr===null?cr=[e]:cr.push(e)}var Dh=Ye(null),Zr=null,Ks=null;function ur(e,i,r){De(Dh,i._currentValue),i._currentValue=r}function qs(e){e._currentValue=Dh.current,ze(Dh)}function mo(e,i,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,n!==null&&(n.childLanes|=i)):n!==null&&(n.childLanes&i)!==i&&(n.childLanes|=i),e===r)break;e=e.return}}function Th(e,i,r,n){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var h=o.dependencies;if(h!==null){var m=o.child;h=h.firstContext;e:for(;h!==null;){var x=h;h=o;for(var k=0;k<i.length;k++)if(x.context===i[k]){h.lanes|=r,x=h.alternate,x!==null&&(x.lanes|=r),mo(h.return,r,e),n||(m=null);break e}h=x.next}}else if(o.tag===18){if(m=o.return,m===null)throw Error(l(341));m.lanes|=r,h=m.alternate,h!==null&&(h.lanes|=r),mo(m,r,e),m=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=r,m=o.alternate,m!==null&&(m.lanes|=r),mo(o.return,r,e),m=o.child,m=m!==null?m.sibling:null):m=o.child;if(m!==null)m.return=o;else for(m=o;m!==null;){if(m===e){m=null;break}if(o=m.sibling,o!==null){o.return=m.return,m=o;break}m=m.return}o=m}}function Qr(e,i,r,n){e=null;for(var o=i,h=!1;o!==null;){if(!h){if((o.flags&524288)!==0)h=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var m=o.alternate;if(m===null)throw Error(l(387));if(m=m.memoizedProps,m!==null){var x=o.type;Ti(o.pendingProps.value,m.value)||(e!==null?e.push(x):e=[x])}}else if(o===gt.current){if(m=o.alternate,m===null)throw Error(l(387));m.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ma):e=[ma])}o=o.return}return e!==null&&Th(i,e,r,n),i.flags|=262144,e!==null}function _o(e){for(e=e.firstContext;e!==null;){if(!Ti(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Jr(e){Zr=e,Ks=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ri(e){return Qm(Zr,e)}function po(e,i){return Zr===null&&Jr(e),Qm(e,i)}function Qm(e,i){var r=i._currentValue;if(i={context:i,memoizedValue:r,next:null},Ks===null){if(e===null)throw Error(l(308));Ks=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Ks=Ks.next=i;return r}var Px=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(r,n){e.push(n)}};this.abort=function(){i.aborted=!0,e.forEach(function(r){return r()})}},Yx=t.unstable_scheduleCallback,Kx=t.unstable_NormalPriority,zt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jh(){return{controller:new Px,data:new Map,refCount:0}}function Ua(e){e.refCount--,e.refCount===0&&Yx(Kx,function(){e.controller.abort()})}function Jm(e,i){if((e.pendingLanes&4194048)!==0){var r=e.transitionTypes;for(r===null&&(r=e.transitionTypes=[]),e=0;e<i.length;e++){var n=i[e];r.indexOf(n)===-1&&r.push(n)}}}var Pa=null;function qx(e){var i=e.transitionTypes;return e.transitionTypes=null,i}var Ya=null,Ah=0,en=0,Fn=null;function Fx(e,i){if(Ya===null){var r=Ya=[];Ah=0,en=Wu(),Fn={status:"pending",value:void 0,then:function(n){r.push(n)}}}return Ah++,i.then(e_,e_),i}function e_(){if(--Ah===0&&(Pa=null,Ya!==null)){Fn!==null&&(Fn.status="fulfilled");var e=Ya;Ya=null,en=0,Fn=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function Ix(e,i){var r=[],n={status:"pending",value:null,reason:null,then:function(o){r.push(o)}};return e.then(function(){n.status="fulfilled",n.value=i;for(var o=0;o<r.length;o++)(0,r[o])(i)},function(o){for(n.status="rejected",n.reason=o,o=0;o<r.length;o++)(0,r[o])(void 0)}),n}var t_=J.S;J.S=function(e,i){if(Xp=At(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Fx(e,i),Pa!==null)for(var r=oa;r!==null;)Jm(r,Pa),r=r.next;if(r=e.types,r!==null){for(var n=oa;n!==null;)Jm(n,r),n=n.next;if(en!==0){n=Pa,n===null&&(n=Pa=[]);for(var o=0;o<r.length;o++){var h=r[o];n.indexOf(h)===-1&&n.push(h)}}}t_!==null&&t_(e,i)};var tn=Ye(null);function Bh(){var e=tn.current;return e!==null?e:ft.pooledCache}function vo(e,i){i===null?De(tn,tn.current):De(tn,i.pool)}function i_(){var e=Bh();return e===null?null:{parent:zt._currentValue,pool:e}}var In=Error(l(460)),Rh=Error(l(474)),go=Error(l(542)),xo={then:function(){}};function s_(e){return e=e.status,e==="fulfilled"||e==="rejected"}function r_(e,i,r){switch(r=e[r],r===void 0?e.push(i):r!==i&&(i.then(ps,ps),i=r),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,a_(e),e===void 0&&!("reason"in i)?Error(l(600)):e;default:if(typeof i.status=="string")i.then(ps,ps);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(n){if(i.status==="pending"){var o=i;o.status="fulfilled",o.value=n}},function(n){if(i.status==="pending"){var o=i;o.status="rejected",o.reason=n}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,a_(e),e}throw rn=i,In}}function sn(e){try{var i=e._init;return i(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(rn=r,In):r}}var rn=null;function n_(){if(rn===null)throw Error(l(459));var e=rn;return rn=null,e}function a_(e){if(e===In||e===go)throw Error(l(483))}var Vn=null,Ka=0;function yo(e){var i=Ka;return Ka+=1,Vn===null&&(Vn=[]),r_(Vn,e,i)}function dr(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function bo(e,i){throw i.$$typeof===ge?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function l_(e){function i(H,M){if(e){var P=H.deletions;P===null?(H.deletions=[M],H.flags|=16):P.push(M)}}function r(H,M){if(!e)return null;for(;M!==null;)i(H,M),M=M.sibling;return null}function n(H){for(var M=new Map;H!==null;)H.key===null?M.set(H.index,H):M.set(H.key,H),H=H.sibling;return M}function o(H,M){return H=Ps(H,M),H.index=0,H.sibling=null,H}function h(H,M,P){return H.index=P,e?(P=H.alternate,P!==null?(P=P.index,P<M?(H.flags|=2,M):P):(H.flags|=134217730,M)):(H.flags|=1048576,M)}function m(H){return e&&H.alternate===null&&(H.flags|=134217730),H}function x(H,M,P,se){return M===null||M.tag!==6?(M=Ch(P,H.mode,se),M.return=H,M):(M=o(M,P),M.return=H,M)}function k(H,M,P,se){var Ne=P.type;return Ne===ye?(H=V(H,M,P.props.children,se,P.key),dr(H,P),H):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===C&&sn(Ne)===M.type)?(M=o(M,P.props),dr(M,P),M.return=H,M):(M=co(P.type,P.key,P.props,null,H.mode,se),dr(M,P),M.return=H,M)}function U(H,M,P,se){return M===null||M.tag!==4||M.stateNode.containerInfo!==P.containerInfo||M.stateNode.implementation!==P.implementation?(M=kh(P,H.mode,se),M.return=H,M):(M=o(M,P.children||[]),M.return=H,M)}function V(H,M,P,se,Ne){return M===null||M.tag!==7?(M=Gr(P,H.mode,se,Ne),M.return=H,M):(M=o(M,P),M.return=H,M)}function re(H,M,P){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ch(""+M,H.mode,P),M.return=H,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case _e:return P=co(M.type,M.key,M.props,null,H.mode,P),dr(P,M),P.return=H,P;case we:return M=kh(M,H.mode,P),M.return=H,M;case C:return M=sn(M),re(H,M,P)}if(A(M)||G(M))return M=Gr(M,H.mode,P,null),M.return=H,M;if(typeof M.then=="function")return re(H,yo(M),P);if(M.$$typeof===j)return re(H,po(H,M),P);bo(H,M)}return null}function L(H,M,P,se){var Ne=M!==null?M.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return Ne!==null?null:x(H,M,""+P,se);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _e:return P.key===Ne?k(H,M,P,se):null;case we:return P.key===Ne?U(H,M,P,se):null;case C:return P=sn(P),L(H,M,P,se)}if(A(P)||G(P))return Ne!==null?null:V(H,M,P,se,null);if(typeof P.then=="function")return L(H,M,yo(P),se);if(P.$$typeof===j)return L(H,M,po(H,P),se);bo(H,P)}return null}function F(H,M,P,se,Ne){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return H=H.get(P)||null,x(M,H,""+se,Ne);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case _e:return H=H.get(se.key===null?P:se.key)||null,k(M,H,se,Ne);case we:return H=H.get(se.key===null?P:se.key)||null,U(M,H,se,Ne);case C:return se=sn(se),F(H,M,P,se,Ne)}if(A(se)||G(se))return H=H.get(P)||null,V(M,H,se,Ne,null);if(typeof se.then=="function")return F(H,M,P,yo(se),Ne);if(se.$$typeof===j)return F(H,M,P,po(M,se),Ne);bo(M,se)}return null}function Ce(H,M,P,se){for(var Ne=null,Je=null,Re=M,Le=M=0,Ut=null;Re!==null&&Le<P.length;Le++){Re.index>Le?(Ut=Re,Re=null):Ut=Re.sibling;var tt=L(H,Re,P[Le],se);if(tt===null){Re===null&&(Re=Ut);break}e&&Re&&tt.alternate===null&&i(H,Re),M=h(tt,M,Le),Je===null?Ne=tt:Je.sibling=tt,Je=tt,Re=Ut}if(Le===P.length)return r(H,Re),Ie&&Ys(H,Le),Ne;if(Re===null){for(;Le<P.length;Le++)Re=re(H,P[Le],se),Re!==null&&(M=h(Re,M,Le),Je===null?Ne=Re:Je.sibling=Re,Je=Re);return Ie&&Ys(H,Le),Ne}for(Re=n(Re);Le<P.length;Le++)Ut=F(Re,H,Le,P[Le],se),Ut!==null&&(e&&(tt=Ut.alternate,tt!==null&&Re.delete(tt.key===null?Le:tt.key)),M=h(Ut,M,Le),Je===null?Ne=Ut:Je.sibling=Ut,Je=Ut);return e&&Re.forEach(function(jr){return i(H,jr)}),Ie&&Ys(H,Le),Ne}function Me(H,M,P,se){if(P==null)throw Error(l(151));for(var Ne=null,Je=null,Re=M,Le=M=0,Ut=null,tt=P.next();Re!==null&&!tt.done;Le++,tt=P.next()){Re.index>Le?(Ut=Re,Re=null):Ut=Re.sibling;var jr=L(H,Re,tt.value,se);if(jr===null){Re===null&&(Re=Ut);break}e&&Re&&jr.alternate===null&&i(H,Re),M=h(jr,M,Le),Je===null?Ne=jr:Je.sibling=jr,Je=jr,Re=Ut}if(tt.done)return r(H,Re),Ie&&Ys(H,Le),Ne;if(Re===null){for(;!tt.done;Le++,tt=P.next())tt=re(H,tt.value,se),tt!==null&&(M=h(tt,M,Le),Je===null?Ne=tt:Je.sibling=tt,Je=tt);return Ie&&Ys(H,Le),Ne}for(Re=n(Re);!tt.done;Le++,tt=P.next())tt=F(Re,H,Le,tt.value,se),tt!==null&&(e&&(Ut=tt.alternate,Ut!==null&&Re.delete(Ut.key===null?Le:Ut.key)),M=h(tt,M,Le),Je===null?Ne=tt:Je.sibling=tt,Je=tt);return e&&Re.forEach(function(kb){return i(H,kb)}),Ie&&Ys(H,Le),Ne}function qe(H,M,P,se){if(typeof P=="object"&&P!==null&&P.type===ye&&P.key===null&&P.props.ref===void 0&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case _e:e:{for(var Ne=P.key;M!==null;){if(M.key===Ne){if(Ne=P.type,Ne===ye){if(M.tag===7){r(H,M.sibling),se=o(M,P.props.children),dr(se,P),se.return=H,H=se;break e}}else if(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===C&&sn(Ne)===M.type){r(H,M.sibling),se=o(M,P.props),dr(se,P),se.return=H,H=se;break e}r(H,M);break}else i(H,M);M=M.sibling}P.type===ye?(se=Gr(P.props.children,H.mode,se,P.key),dr(se,P),se.return=H,H=se):(se=co(P.type,P.key,P.props,null,H.mode,se),dr(se,P),se.return=H,H=se)}return m(H);case we:e:{for(Ne=P.key;M!==null;){if(M.key===Ne)if(M.tag===4&&M.stateNode.containerInfo===P.containerInfo&&M.stateNode.implementation===P.implementation){r(H,M.sibling),se=o(M,P.children||[]),se.return=H,H=se;break e}else{r(H,M);break}else i(H,M);M=M.sibling}se=kh(P,H.mode,se),se.return=H,H=se}return m(H);case C:return P=sn(P),qe(H,M,P,se)}if(A(P))return Ce(H,M,P,se);if(G(P)){if(Ne=G(P),typeof Ne!="function")throw Error(l(150));return P=Ne.call(P),Me(H,M,P,se)}if(typeof P.then=="function")return qe(H,M,yo(P),se);if(P.$$typeof===j)return qe(H,M,po(H,P),se);bo(H,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,M!==null&&M.tag===6?(r(H,M.sibling),se=o(M,P),se.return=H,H=se):(r(H,M),se=Ch(P,H.mode,se),se.return=H,H=se),m(H)):r(H,M)}return function(H,M,P,se){try{Ka=0;var Ne=qe(H,M,P,se);return Vn=null,Ne}catch(Re){if(Re===In||Re===go)throw Re;var Je=Si(29,Re,null,H.mode);return Je.lanes=se,Je.return=H,Je}finally{}}}var nn=l_(!0),o_=l_(!1),fr=!1;function Oh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zh(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function mr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _r(e,i,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(st&2)!==0){var o=n.pending;return o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i,i=oo(e),Im(e,null,r),i}return lo(e,n,i,r),oo(e)}function qa(e,i,r){if(i=i.updateQueue,i!==null&&(i=i.shared,(r&4194048)!==0)){var n=i.lanes;n&=e.pendingLanes,r|=n,i.lanes=r,Vl(e,r)}}function Lh(e,i){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var m={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};h===null?o=h=m:h=h.next=m,r=r.next}while(r!==null);h===null?o=h=i:h=h.next=i}else o=h=i;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:h,shared:n.shared,callbacks:n.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=i:e.next=i,r.lastBaseUpdate=i}var Hh=!1;function Fa(){if(Hh){var e=Fn;if(e!==null)throw e}}function Ia(e,i,r,n){Hh=!1;var o=e.updateQueue;fr=!1;var h=o.firstBaseUpdate,m=o.lastBaseUpdate,x=o.shared.pending;if(x!==null){o.shared.pending=null;var k=x,U=k.next;k.next=null,m===null?h=U:m.next=U,m=k;var V=e.alternate;V!==null&&(V=V.updateQueue,x=V.lastBaseUpdate,x!==m&&(x===null?V.firstBaseUpdate=U:x.next=U,V.lastBaseUpdate=k))}if(h!==null){var re=o.baseState;m=0,V=U=k=null,x=h;do{var L=x.lane&-536870913,F=L!==x.lane;if(F?(Qe&L)===L:(n&L)===L){L!==0&&L===en&&(Hh=!0),V!==null&&(V=V.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var Ce=e,Me=x;L=i;var qe=r;switch(Me.tag){case 1:if(Ce=Me.payload,typeof Ce=="function"){re=Ce.call(qe,re,L);break e}re=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Me.payload,L=typeof Ce=="function"?Ce.call(qe,re,L):Ce,L==null)break e;re=ae({},re,L);break e;case 2:fr=!0}}L=x.callback,L!==null&&(e.flags|=64,F&&(e.flags|=8192),F=o.callbacks,F===null?o.callbacks=[L]:F.push(L))}else F={lane:L,tag:x.tag,payload:x.payload,callback:x.callback,next:null},V===null?(U=V=F,k=re):V=V.next=F,m|=L;if(x=x.next,x===null){if(x=o.shared.pending,x===null)break;F=x,x=F.next,F.next=null,o.lastBaseUpdate=F,o.shared.pending=null}}while(!0);V===null&&(k=re),o.baseState=k,o.firstBaseUpdate=U,o.lastBaseUpdate=V,h===null&&(o.shared.lanes=0),Sr|=m,e.lanes=m,e.memoizedState=re}}function c_(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function h_(e,i){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)c_(r[e],i)}var pr=Ye(null),So=Ye(0);function u_(e,i){e=Ws,De(So,e),De(pr,i),Ws=e|i.baseLanes}function Uh(){De(So,Ws),De(pr,pr.current)}function Ph(){Ws=So.current,ze(pr),ze(So)}var ni=Ye(null),di=null;function vr(e){var i=e.alternate;De(ai,ai.current&1),De(ni,e),di===null&&(i===null||pr.current!==null||i.memoizedState!==null)&&(di=e)}function Yh(e){De(ai,ai.current),De(ni,e),di===null&&(di=e)}function d_(e){e.tag===22?(De(ai,ai.current),De(ni,e),di===null&&(di=e)):gr()}function gr(){De(ai,ai.current),De(ni,ni.current)}function ji(e){ze(ni),di===e&&(di=null),ze(ai)}var ai=Ye(0);function Va(e,i){De(ni,ni.current),De(ai,i)}function Kh(e){ze(ai),ze(ni),di===e&&(di=null)}function wo(e){for(var i=e;i!==null;){if(i.tag===13){var r=i.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||hd(r)||ud(r)))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!=="independent"){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Fs=0,Ke=null,ut=null,Lt=null,Co=!1,Xn=!1,an=!1,ko=0,Xa=0,Wn=null,Vx=0;function Mt(){throw Error(l(321))}function qh(e,i){if(i===null)return!1;for(var r=0;r<i.length&&r<e.length;r++)if(!Ti(e[r],i[r]))return!1;return!0}function Fh(e,i,r,n,o,h){return Fs=h,Ke=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,J.H=e===null||e.memoizedState===null?G_:$_,an=!1,h=r(n,o),an=!1,Xn&&(h=m_(i,r,n,o)),f_(e),h}function f_(e){J.H=Ao;var i=ut!==null&&ut.next!==null;if(Fs=0,Lt=ut=Ke=null,Co=!1,Xa=0,Wn=null,i)throw Error(l(300));e===null||Ht||(e=e.dependencies,e!==null&&_o(e)&&(Ht=!0))}function m_(e,i,r,n){Ke=e;var o=0;do{if(Xn&&(Wn=null),Xa=0,Xn=!1,25<=o)throw Error(l(301));if(o+=1,Lt=ut=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}J.H=ey,h=i(r,n)}while(Xn);return h}function Xx(){var e=J.H,i=e.useState()[0];return i=typeof i.then=="function"?Wa(i):i,e=e.useState()[0],(ut!==null?ut.memoizedState:null)!==e&&(Ke.flags|=1024),i}function Ih(){var e=ko!==0;return ko=0,e}function Vh(e,i,r){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~r}function Xh(e){if(Co){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}Co=!1}Fs=0,Lt=ut=Ke=null,Xn=!1,Xa=ko=0,Wn=null}function pi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Ke.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function Rt(){if(ut===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ut.next;var i=Lt===null?Ke.memoizedState:Lt.next;if(i!==null)Lt=i,ut=e;else{if(e===null)throw Ke.alternate===null?Error(l(467)):Error(l(310));ut=e,e={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Lt===null?Ke.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wa(e){var i=Xa;return Xa+=1,Wn===null&&(Wn=[]),e=r_(Wn,e,i),i=Ke,(Lt===null?i.memoizedState:Lt.next)===null&&(i=i.alternate,J.H=i===null||i.memoizedState===null?G_:$_),e}function No(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wa(e);if(e.$$typeof===B)return;if(e.$$typeof===j)return ri(e)}throw Error(l(438,String(e)))}function Wh(e){var i=null,r=Ke.updateQueue;if(r!==null&&(i=r.memoCache),i==null){var n=Ke.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(i={data:n.data.map(function(o){return o.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),r===null&&(r=Eo(),Ke.updateQueue=r),r.memoCache=i,r=i.data[i.index],r===void 0)for(r=i.data[i.index]=Array(e),n=0;n<e;n++)r[n]=de;return i.index++,r}function Is(e,i){return typeof i=="function"?i(e):i}function Mo(e){var i=Rt();return Gh(i,ut,e)}function Gh(e,i,r){var n=e.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=r;var o=e.baseQueue,h=n.pending;if(h!==null){if(o!==null){var m=o.next;o.next=h.next,h.next=m}i.baseQueue=o=h,n.pending=null}if(h=e.baseState,o===null)e.memoizedState=h;else{i=o.next;var x=m=null,k=null,U=i,V=!1;do{var re=U.lane&-536870913;if(re!==U.lane?(Qe&re)===re:(Fs&re)===re){var L=U.revertLane;if(L===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),re===en&&(V=!0);else if((Fs&L)===L){U=U.next,L===en&&(V=!0);continue}else re={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},k===null?(x=k=re,m=h):k=k.next=re,Ke.lanes|=L,Sr|=L;re=U.action,an&&r(h,re),h=U.hasEagerState?U.eagerState:r(h,re)}else L={lane:re,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},k===null?(x=k=L,m=h):k=k.next=L,Ke.lanes|=re,Sr|=re;U=U.next}while(U!==null&&U!==i);if(k===null?m=h:k.next=x,!Ti(h,e.memoizedState)&&(Ht=!0,V&&(r=Fn,r!==null)))throw r;e.memoizedState=h,e.baseState=m,e.baseQueue=k,n.lastRenderedState=h}return o===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function $h(e){var i=Rt(),r=i.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,h=i.memoizedState;if(o!==null){r.pending=null;var m=o=o.next;do h=e(h,m.action),m=m.next;while(m!==o);Ti(h,i.memoizedState)||(Ht=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),r.lastRenderedState=h}return[h,n]}function __(e,i,r){var n=Ke,o=Rt(),h=Ie;if(h){if(r===void 0)throw Error(l(407));r=r()}else r=i();var m=!Ti((ut||o).memoizedState,r);if(m&&(o.memoizedState=r,Ht=!0),o=o.queue,Jh(g_.bind(null,n,o,e),[e]),e=o.getSnapshot!==i||m||Lt!==null&&(Lt.memoizedState.tag&1)!==0,Gn(e?9:8,{destroy:void 0},v_.bind(null,n,o,r,i),null),e){if(n.flags|=2048,ft===null)throw Error(l(349));h||(Fs&127)!==0||p_(n,i,r)}return r}function p_(e,i,r){e.flags|=16384,e={getSnapshot:i,value:r},i=Ke.updateQueue,i===null?(i=Eo(),Ke.updateQueue=i,i.stores=[e]):(r=i.stores,r===null?i.stores=[e]:r.push(e))}function v_(e,i,r,n){i.value=r,i.getSnapshot=n,x_(i)&&y_(e)}function g_(e,i,r){return r(function(){x_(i)&&y_(e)})}function x_(e){var i=e.getSnapshot;e=e.value;try{var r=i();return!Ti(e,r)}catch{return!0}}function y_(e){var i=Wr(e,2);i!==null&&Ei(i,e,2)}function Zh(e){var i=pi();if(typeof e=="function"){var r=e;if(e=r(),an){fs(!0);try{r()}finally{fs(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:e},i}function b_(e,i,r,n){return e.baseState=r,Gh(e,ut,typeof n=="function"?n:Is)}function Wx(e,i,r,n,o){if(jo(e))throw Error(l(485));if(e=i.action,e!==null){var h={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){h.listeners.push(m)}};J.T!==null?r(!0):h.isTransition=!1,n(h),r=i.pending,r===null?(h.next=i.pending=h,S_(i,h)):(h.next=r.next,i.pending=r.next=h)}}function S_(e,i){var r=i.action,n=i.payload,o=e.state;if(i.isTransition){var h=J.T,m={};m.types=h!==null?h.types:null,J.T=m;try{var x=r(o,n),k=J.S;k!==null&&k(m,x),w_(e,i,x)}catch(U){Qh(e,i,U)}finally{h!==null&&m.types!==null&&(h.types=m.types),J.T=h}}else try{h=r(o,n),w_(e,i,h)}catch(U){Qh(e,i,U)}}function w_(e,i,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(n){C_(e,i,n)},function(n){return Qh(e,i,n)}):C_(e,i,r)}function C_(e,i,r){i.status="fulfilled",i.value=r,k_(i),e.state=r,i=e.pending,i!==null&&(r=i.next,r===i?e.pending=null:(r=r.next,i.next=r,S_(e,r)))}function Qh(e,i,r){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do i.status="rejected",i.reason=r,k_(i),i=i.next;while(i!==n)}e.action=null}function k_(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function E_(e,i){return i}function N_(e,i){if(Ie){var r=ft.formState;if(r!==null){e:{var n=Ke;if(Ie){if(pt){t:{for(var o=pt,h=Vi;o.nodeType!==8;){if(!h){o=null;break t}if(o=Wi(o.nextSibling),o===null){o=null;break t}}h=o.data,o=h==="F!"||h==="F"?o:null}if(o){pt=Wi(o.nextSibling),n=o.data==="F!";break e}}hr(n)}n=!1}n&&(i=r[0])}}return r=pi(),r.memoizedState=r.baseState=i,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:E_,lastRenderedState:i},r.queue=n,r=V_.bind(null,Ke,n),n.dispatch=r,n=Zh(!1),h=ru.bind(null,Ke,!1,n.queue),n=pi(),o={state:i,dispatch:null,action:e,pending:null},n.queue=o,r=Wx.bind(null,Ke,o,h,r),o.dispatch=r,n.memoizedState=e,[i,r,!1]}function M_(e){var i=Rt();return D_(i,ut,e)}function D_(e,i,r){if(i=Gh(e,i,E_)[0],e=Mo(Is)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var n=Wa(i)}catch(m){throw m===In?go:m}else n=i;i=Rt();var o=i.queue,h=o.dispatch;return r!==i.memoizedState&&(Ke.flags|=2048,Gn(9,{destroy:void 0},Gx.bind(null,o,r),null)),[n,h,e]}function Gx(e,i){e.action=i}function T_(e){var i=Rt(),r=ut;if(r!==null)return D_(i,r,e);Rt(),i=i.memoizedState,r=Rt();var n=r.queue.dispatch;return r.memoizedState=e,[i,n,!1]}function Gn(e,i,r,n){return e={tag:e,create:r,deps:n,inst:i,next:null},i=Ke.updateQueue,i===null&&(i=Eo(),Ke.updateQueue=i),r=i.lastEffect,r===null?i.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,i.lastEffect=e),e}function j_(){return Rt().memoizedState}function Do(e,i,r,n){var o=pi();Ke.flags|=e,o.memoizedState=Gn(1|i,{destroy:void 0},r,n===void 0?null:n)}function To(e,i,r,n){var o=Rt();n=n===void 0?null:n;var h=o.memoizedState.inst;ut!==null&&n!==null&&qh(n,ut.memoizedState.deps)?o.memoizedState=Gn(i,h,r,n):(Ke.flags|=e,o.memoizedState=Gn(1|i,h,r,n))}function A_(e,i){Do(8390656,8,e,i)}function Jh(e,i){To(2048,8,e,i)}function $x(e){Ke.flags|=4;var i=Ke.updateQueue;if(i===null)i=Eo(),Ke.updateQueue=i,i.events=[e];else{var r=i.events;r===null?i.events=[e]:r.push(e)}}function B_(e){var i=Rt().memoizedState;return $x({ref:i,nextImpl:e}),function(){if((st&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function R_(e,i){return To(4,2,e,i)}function O_(e,i){return To(4,4,e,i)}function z_(e,i){if(typeof i=="function"){e=e();var r=i(e);return function(){typeof r=="function"?r():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function L_(e,i,r){r=r!=null?r.concat([e]):null,To(4,4,z_.bind(null,i,e),r)}function eu(){}function H_(e,i){var r=Rt();i=i===void 0?null:i;var n=r.memoizedState;return i!==null&&qh(i,n[1])?n[0]:(r.memoizedState=[e,i],e)}function U_(e,i){var r=Rt();i=i===void 0?null:i;var n=r.memoizedState;if(i!==null&&qh(i,n[1]))return n[0];if(n=e(),an){fs(!0);try{e()}finally{fs(!1)}}return r.memoizedState=[n,i],n}function tu(e,i,r){return r===void 0||(Fs&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=i:(e.memoizedState=r,e=Gp(),Ke.lanes|=e,Sr|=e,r)}function P_(e,i,r,n){return Ti(r,i)?r:pr.current!==null?(e=tu(e,r,n),Ti(e,i)||(Ht=!0),e):(Fs&106)===0||(Fs&1073741824)!==0&&(Qe&261930)===0?(Ht=!0,e.memoizedState=r):(e=Gp(),Ke.lanes|=e,Sr|=e,i)}function Y_(e,i,r,n,o){var h=N.p;N.p=h!==0&&8>h?h:8;var m=J.T,x={};x.types=m!==null?m.types:null,J.T=x,ru(e,!1,i,r);try{var k=o(),U=J.S;if(U!==null&&U(x,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var V=Ix(k,n);Ga(e,i,V,Oi(e))}else Ga(e,i,n,Oi(e))}catch(re){Ga(e,i,{then:function(){},status:"rejected",reason:re},Oi())}finally{N.p=h,m!==null&&x.types!==null&&(m.types=x.types),J.T=m}}function Zx(){}function iu(e,i,r,n){if(e.tag!==5)throw Error(l(476));var o=K_(e).queue;Y_(e,o,i,te,r===null?Zx:function(){return q_(e),r(n)})}function K_(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:te},next:null};var r={};return i.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:r},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function q_(e){var i=K_(e);i.next===null&&(i=e.alternate.memoizedState),Ga(e,i.next.queue,{},Oi())}function su(){return ri(ma)}function F_(){return Rt().memoizedState}function I_(){return Rt().memoizedState}function Qx(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var r=Oi();e=mr(r);var n=_r(i,e,r);n!==null&&(Ei(n,i,r),qa(n,i,r)),i={cache:jh()},e.payload=i;return}i=i.return}}function Jx(e,i,r){var n=Oi();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},jo(e)?X_(i,r):(r=Sh(e,i,r,n),r!==null&&(Ei(r,e,n),W_(r,i,n)))}function V_(e,i,r){var n=Oi();Ga(e,i,r,n)}function Ga(e,i,r,n){var o={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(jo(e))X_(i,o);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var m=i.lastRenderedState,x=h(m,r);if(o.hasEagerState=!0,o.eagerState=x,Ti(x,m))return lo(e,i,o,0),ft===null&&ao(),!1}catch{}finally{}if(r=Sh(e,i,o,n),r!==null)return Ei(r,e,n),W_(r,i,n),!0}return!1}function ru(e,i,r,n){if(n={lane:2,revertLane:Wu(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},jo(e)){if(i)throw Error(l(479))}else i=Sh(e,r,n,2),i!==null&&Ei(i,e,2)}function jo(e){var i=e.alternate;return e===Ke||i!==null&&i===Ke}function X_(e,i){Xn=Co=!0;var r=e.pending;r===null?i.next=i:(i.next=r.next,r.next=i),e.pending=i}function W_(e,i,r){if((r&4194048)!==0){var n=i.lanes;n&=e.pendingLanes,r|=n,i.lanes=r,Vl(e,r)}}var Ao={readContext:ri,use:No,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useLayoutEffect:Mt,useInsertionEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useSyncExternalStore:Mt,useId:Mt,useHostTransitionStatus:Mt,useFormState:Mt,useActionState:Mt,useOptimistic:Mt,useMemoCache:Mt,useCacheRefresh:Mt,useEffectEvent:Mt},G_={readContext:ri,use:No,useCallback:function(e,i){return pi().memoizedState=[e,i===void 0?null:i],e},useContext:ri,useEffect:A_,useImperativeHandle:function(e,i,r){r=r!=null?r.concat([e]):null,Do(4194308,4,z_.bind(null,i,e),r)},useLayoutEffect:function(e,i){return Do(4194308,4,e,i)},useInsertionEffect:function(e,i){Do(4,2,e,i)},useMemo:function(e,i){var r=pi();i=i===void 0?null:i;var n=e();if(an){fs(!0);try{e()}finally{fs(!1)}}return r.memoizedState=[n,i],n},useReducer:function(e,i,r){var n=pi();if(r!==void 0){var o=r(i);if(an){fs(!0);try{r(i)}finally{fs(!1)}}}else o=i;return n.memoizedState=n.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},n.queue=e,e=e.dispatch=Jx.bind(null,Ke,e),[n.memoizedState,e]},useRef:function(e){var i=pi();return e={current:e},i.memoizedState=e},useState:function(e){e=Zh(e);var i=e.queue,r=V_.bind(null,Ke,i);return i.dispatch=r,[e.memoizedState,r]},useDebugValue:eu,useDeferredValue:function(e,i){var r=pi();return tu(r,e,i)},useTransition:function(){var e=Zh(!1);return e=Y_.bind(null,Ke,e.queue,!0,!1),pi().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,r){var n=Ke,o=pi();if(Ie){if(r===void 0)throw Error(l(407));r=r()}else{if(r=i(),ft===null)throw Error(l(349));(Qe&127)!==0||p_(n,i,r)}o.memoizedState=r;var h={value:r,getSnapshot:i};return o.queue=h,A_(g_.bind(null,n,h,e),[e]),n.flags|=2048,Gn(9,{destroy:void 0},v_.bind(null,n,h,r,i),null),r},useId:function(){var e=pi(),i=ft.identifierPrefix;if(Ie){var r=gs,n=vs;r=(n&~(1<<32-si(n)-1)).toString(32)+r,i="_"+i+"R_"+r,r=ko++,0<r&&(i+="H"+r.toString(32)),i+="_"}else r=Vx++,i="_"+i+"r_"+r.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:su,useFormState:N_,useActionState:N_,useOptimistic:function(e){var i=pi();i.memoizedState=i.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=r,i=ru.bind(null,Ke,!0,r),r.dispatch=i,[e,i]},useMemoCache:Wh,useCacheRefresh:function(){return pi().memoizedState=Qx.bind(null,Ke)},useEffectEvent:function(e){var i=pi(),r={impl:e};return i.memoizedState=r,function(){if((st&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},$_={readContext:ri,use:No,useCallback:H_,useContext:ri,useEffect:Jh,useImperativeHandle:L_,useInsertionEffect:R_,useLayoutEffect:O_,useMemo:U_,useReducer:Mo,useRef:j_,useState:function(){return Mo(Is)},useDebugValue:eu,useDeferredValue:function(e,i){var r=Rt();return P_(r,ut.memoizedState,e,i)},useTransition:function(){var e=Mo(Is)[0],i=Rt().memoizedState;return[typeof e=="boolean"?e:Wa(e),i]},useSyncExternalStore:__,useId:F_,useHostTransitionStatus:su,useFormState:M_,useActionState:M_,useOptimistic:function(e,i){var r=Rt();return b_(r,ut,e,i)},useMemoCache:Wh,useCacheRefresh:I_,useEffectEvent:B_},ey={readContext:ri,use:No,useCallback:H_,useContext:ri,useEffect:Jh,useImperativeHandle:L_,useInsertionEffect:R_,useLayoutEffect:O_,useMemo:U_,useReducer:$h,useRef:j_,useState:function(){return $h(Is)},useDebugValue:eu,useDeferredValue:function(e,i){var r=Rt();return ut===null?tu(r,e,i):P_(r,ut.memoizedState,e,i)},useTransition:function(){var e=$h(Is)[0],i=Rt().memoizedState;return[typeof e=="boolean"?e:Wa(e),i]},useSyncExternalStore:__,useId:F_,useHostTransitionStatus:su,useFormState:T_,useActionState:T_,useOptimistic:function(e,i){var r=Rt();return ut!==null?b_(r,ut,e,i):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Wh,useCacheRefresh:I_,useEffectEvent:B_};function nu(e,i,r,n){i=e.memoizedState,r=r(n,i),r=r==null?i:ae({},i,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var au={enqueueSetState:function(e,i,r){e=e._reactInternals;var n=Oi(),o=mr(n);o.payload=i,r!=null&&(o.callback=r),i=_r(e,o,n),i!==null&&(Ei(i,e,n),qa(i,e,n))},enqueueReplaceState:function(e,i,r){e=e._reactInternals;var n=Oi(),o=mr(n);o.tag=1,o.payload=i,r!=null&&(o.callback=r),i=_r(e,o,n),i!==null&&(Ei(i,e,n),qa(i,e,n))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var r=Oi(),n=mr(r);n.tag=2,i!=null&&(n.callback=i),i=_r(e,n,r),i!==null&&(Ei(i,e,r),qa(i,e,r))}};function Z_(e,i,r,n,o,h,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,h,m):i.prototype&&i.prototype.isPureReactComponent?!Oa(r,n)||!Oa(o,h):!0}function Q_(e,i,r,n){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(r,n),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(r,n),i.state!==e&&au.enqueueReplaceState(i,i.state,null)}function ln(e,i){var r=i;if("ref"in i){r={};for(var n in i)n!=="ref"&&(r[n]=i[n])}if(e=e.defaultProps){r===i&&(r=ae({},r));for(var o in e)r[o]===void 0&&(r[o]=e[o])}return r}function J_(e){no(e)}function ep(e){console.error(e)}function tp(e){no(e)}function Bo(e,i){try{var r=e.onUncaughtError;r(i.value,{componentStack:i.stack})}catch(n){setTimeout(function(){throw n})}}function ip(e,i,r){try{var n=e.onCaughtError;n(r.value,{componentStack:r.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function lu(e,i,r){return r=mr(r),r.tag=3,r.payload={element:null},r.callback=function(){Bo(e,i)},r}function sp(e){return e=mr(e),e.tag=3,e}function rp(e,i,r,n){var o=r.type.getDerivedStateFromError;if(typeof o=="function"){var h=n.value;e.payload=function(){return o(h)},e.callback=function(){ip(i,r,n)}}var m=r.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){ip(i,r,n),typeof o!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})})}function ty(e,i,r,n,o){if(r.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(i=r.alternate,i!==null&&Qr(i,r,o,!0),r=ni.current,r!==null){switch(r.tag){case 31:case 13:case 19:return di===null?ec():r.alternate===null&&Dt===0&&(Dt=3),r.flags&=-257,r.flags|=65536,r.lanes=o,n===xo?r.flags|=16384:(i=r.updateQueue,i===null?r.updateQueue=new Set([n]):i.add(n),Iu(e,n,o)),!1;case 22:return r.flags|=65536,n===xo?r.flags|=16384:(i=r.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([n])},r.updateQueue=i):(r=i.retryQueue,r===null?i.retryQueue=new Set([n]):r.add(n)),Iu(e,n,o)),!1}throw Error(l(435,r.tag))}return Iu(e,n,o),ec(),!1}if(Ie)return i=ni.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=o,n!==Nh&&(e=Error(l(422),{cause:n}),Ha(qi(e,r)))):(n!==Nh&&(i=Error(l(423),{cause:n}),Ha(qi(i,r))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,n=qi(n,r),o=lu(e.stateNode,n,o),Lh(e,o),Dt!==4&&(Dt=2)),!1;var h=Error(l(520),{cause:n});if(h=qi(h,r),sl===null?sl=[h]:sl.push(h),Dt!==4&&(Dt=2),i===null)return!0;n=qi(n,r),r=i;do{switch(r.tag){case 3:return r.flags|=65536,e=o&-o,r.lanes|=e,e=lu(r.stateNode,n,e),Lh(r,e),!1;case 1:if(i=r.type,h=r.stateNode,(r.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(wr===null||!wr.has(h))))return r.flags|=65536,o&=-o,r.lanes|=o,o=sp(o),rp(o,e,r,n),Lh(r,o),!1;break;case 22:if(r.memoizedState!==null)return r.flags|=65536,!1}r=r.return}while(r!==null);return!1}var ou=Error(l(461)),Ht=!1;function Kt(e,i,r,n){i.child=e===null?o_(i,null,r,n):nn(i,e.child,r,n)}function np(e,i,r,n,o){r=r.render;var h=i.ref;if("ref"in n){var m={};for(var x in n)x!=="ref"&&(m[x]=n[x])}else m=n;return Jr(i),n=Fh(e,i,r,m,h,o),x=Ih(),e!==null&&!Ht?(Vh(e,i,o),Vs(e,i,o)):(Ie&&x&&uo(i),i.flags|=1,Kt(e,i,n,o),i.child)}function ap(e,i,r,n,o){if(e===null){var h=r.type;return typeof h=="function"&&!wh(h)&&h.defaultProps===void 0&&r.compare===null?(i.tag=15,i.type=h,lp(e,i,h,n,o)):(e=co(r.type,null,n,i,i.mode,o),e.ref=i.ref,e.return=i,i.child=e)}if(h=e.child,!pu(e,o)){var m=h.memoizedProps;if(r=r.compare,r=r!==null?r:Oa,r(m,n)&&e.ref===i.ref)return Vs(e,i,o)}return i.flags|=1,e=Ps(h,n),e.ref=i.ref,e.return=i,i.child=e}function lp(e,i,r,n,o){if(e!==null){var h=e.memoizedProps;if(Oa(h,n)&&e.ref===i.ref)if(Ht=!1,i.pendingProps=n=h,pu(e,o))(e.flags&131072)!==0&&(Ht=!0);else return i.lanes=e.lanes,Vs(e,i,o)}return cu(e,i,r,n,o)}function op(e,i,r,n){var o=n.children,h=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|r:r,e!==null){for(n=i.child=e.child,o=0;n!==null;)o=o|n.lanes|n.childLanes,n=n.sibling;n=o&~h}else n=0,i.child=null;return cp(e,i,h,r,n)}if((r&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(i,h!==null?h.cachePool:null),h!==null?u_(i,h):Uh(),d_(i);else return n=i.lanes=536870912,cp(e,i,h!==null?h.baseLanes|r:r,r,n)}else h!==null?(vo(i,h.cachePool),u_(i,h),gr(),i.memoizedState=null):(e!==null&&vo(i,null),Uh(),gr());return Kt(e,i,o,r),i.child}function $a(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function cp(e,i,r,n,o){var h=Bh();return h=h===null?null:{parent:zt._currentValue,pool:h},i.memoizedState={baseLanes:r,cachePool:h},e!==null&&vo(i,null),Uh(),d_(i),e!==null&&Qr(e,i,n,!0),i.childLanes=o,null}function Ro(e,i){return i=Oo({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function hp(e,i,r){return nn(i,e.child,null,r),e=Ro(i,i.pendingProps),e.flags|=2,ji(i),i.memoizedState=null,e}function iy(e,i,r){var n=i.pendingProps,o=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(Ie){if(n.mode==="hidden")return e=Ro(i,n),i.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},$a(null,e);if(Yh(i),(e=pt)?(e=zv(e,Vi),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:or!==null?{id:vs,overflow:gs}:null,retryLane:536870912,hydrationErrors:null},r=Xm(e),r.return=i,i.child=r,Wt=i,pt=null)):e=null,e===null)throw hr(i);return i.lanes=536870912,null}return Ro(i,n)}var h=e.memoizedState;if(h!==null){var m=h.dehydrated;if(Yh(i),o)if(i.flags&256)i.flags&=-257,i=hp(e,i,r);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(Ht||Qr(e,i,r,!1),o=(r&e.childLanes)!==0,Ht||o){if(pr.current===null){if(n=ft,n!==null&&(m=Xl(n,r),m!==0&&m!==h.retryLane))throw h.retryLane=m,Wr(e,m),Ei(n,e,m),ou;ec()}i=hp(e,i,r)}else e=h.treeContext,pt=Wi(m.nextSibling),Wt=i,Ie=!0,cr=null,Vi=!1,e!==null&&$m(i,e),i=Ro(i,n),i.flags|=134221824;return i}return e=Ps(e.child,{mode:n.mode,children:n.children}),e.ref=i.ref,i.child=e,e.return=i,e}function $n(e,i){var r=i.ref;if(r===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(e===null||e.ref!==r)&&(i.flags|=4194816)}}function cu(e,i,r,n,o){return Jr(i),r=Fh(e,i,r,n,void 0,o),n=Ih(),e!==null&&!Ht?(Vh(e,i,o),Vs(e,i,o)):(Ie&&n&&uo(i),i.flags|=1,Kt(e,i,r,o),i.child)}function up(e,i,r,n,o,h){return Jr(i),i.updateQueue=null,r=m_(i,n,r,o),f_(e),n=Ih(),e!==null&&!Ht?(Vh(e,i,h),Vs(e,i,h)):(Ie&&n&&uo(i),i.flags|=1,Kt(e,i,r,h),i.child)}function dp(e,i,r,n,o){if(Jr(i),i.stateNode===null){var h=Pn,m=r.contextType;typeof m=="object"&&m!==null&&(h=ri(m)),h=new r(n,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=au,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=n,h.state=i.memoizedState,h.refs={},Oh(i),m=r.contextType,h.context=typeof m=="object"&&m!==null?ri(m):Pn,h.state=i.memoizedState,m=r.getDerivedStateFromProps,typeof m=="function"&&(nu(i,r,m,n),h.state=i.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(m=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),m!==h.state&&au.enqueueReplaceState(h,h.state,null),Ia(i,n,h,o),Fa(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),n=!0}else if(e===null){h=i.stateNode;var x=i.memoizedProps,k=ln(r,x);h.props=k;var U=h.context,V=r.contextType;m=Pn,typeof V=="object"&&V!==null&&(m=ri(V));var re=r.getDerivedStateFromProps;V=typeof re=="function"||typeof h.getSnapshotBeforeUpdate=="function",x=i.pendingProps!==x,V||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x||U!==m)&&Q_(i,h,n,m),fr=!1;var L=i.memoizedState;h.state=L,Ia(i,n,h,o),Fa(),U=i.memoizedState,x||L!==U||fr?(typeof re=="function"&&(nu(i,r,re,n),U=i.memoizedState),(k=fr||Z_(i,r,k,n,L,U,m))?(V||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(i.flags|=4194308)):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=n,i.memoizedState=U),h.props=n,h.state=U,h.context=m,n=k):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),n=!1)}else{h=i.stateNode,zh(e,i),m=i.memoizedProps,V=ln(r,m),h.props=V,re=i.pendingProps,L=h.context,U=r.contextType,k=Pn,typeof U=="object"&&U!==null&&(k=ri(U)),x=r.getDerivedStateFromProps,(U=typeof x=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(m!==re||L!==k)&&Q_(i,h,n,k),fr=!1,L=i.memoizedState,h.state=L,Ia(i,n,h,o),Fa();var F=i.memoizedState;m!==re||L!==F||fr||e!==null&&e.dependencies!==null&&_o(e.dependencies)?(typeof x=="function"&&(nu(i,r,x,n),F=i.memoizedState),(V=fr||Z_(i,r,V,n,L,F,k)||e!==null&&e.dependencies!==null&&_o(e.dependencies))?(U||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(n,F,k),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(n,F,k)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||m===e.memoizedProps&&L===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&L===e.memoizedState||(i.flags|=1024),i.memoizedProps=n,i.memoizedState=F),h.props=n,h.state=F,h.context=k,n=V):(typeof h.componentDidUpdate!="function"||m===e.memoizedProps&&L===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&L===e.memoizedState||(i.flags|=1024),n=!1)}return h=n,$n(e,i),n=(i.flags&128)!==0,h||n?(h=i.stateNode,r=n&&typeof r.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,e!==null&&n?(i.child=nn(i,e.child,null,o),i.child=nn(i,null,r,o)):Kt(e,i,r,o),i.memoizedState=h.state,e=i.child):e=Vs(e,i,o),e}function fp(e,i,r,n){return $r(),i.flags|=256,Kt(e,i,r,n),i.child}var hu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uu(e){return{baseLanes:e,cachePool:i_()}}function du(e,i,r){return e=e!==null?e.childLanes&~r:0,i&&(e|=Ri),e}function mp(e,i,r){var n=i.pendingProps,o=!1,h=(i.flags&128)!==0,m;if((m=h)||(m=e!==null&&e.memoizedState===null?!1:(ai.current&2)!==0),m&&(o=!0,i.flags&=-129),m=(i.flags&32)!==0,i.flags&=-33,e===null){if(Ie){if(o?vr(i):gr(),(e=pt)?(e=zv(e,Vi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:or!==null?{id:vs,overflow:gs}:null,retryLane:536870912,hydrationErrors:null},r=Xm(e),r.return=i,i.child=r,Wt=i,pt=null)):e=null,e===null)throw hr(i);return ud(e)?i.lanes=32:i.lanes=536870912,null}return h=n.children,n=n.fallback,o?(gr(),o=i.mode,h=Oo({mode:"hidden",children:h},o),n=Gr(n,o,r,null),h.return=i,n.return=i,h.sibling=n,i.child=h,n=i.child,n.memoizedState=uu(r),n.childLanes=du(e,m,r),i.memoizedState=hu,$a(null,n)):(vr(i),fu(i,h))}var x=e.memoizedState;if(x!==null){var k=x.dehydrated;if(k!==null)return sy(e,i,h,m,n,k,x,r)}return o?(gr(),o=n.fallback,h=i.mode,x=e.child,k=x.sibling,n=Ps(x,{mode:"hidden",children:n.children}),n.subtreeFlags=x.subtreeFlags&1206910976,k!==null?o=Ps(k,o):(o=Gr(o,h,r,null),o.flags|=2),o.return=i,n.return=i,n.sibling=o,i.child=n,$a(null,n),n=i.child,o=e.child.memoizedState,o===null?o=uu(r):(h=o.cachePool,h!==null?(x=zt._currentValue,h=h.parent!==x?{parent:x,pool:x}:h):h=i_(),o={baseLanes:o.baseLanes|r,cachePool:h}),n.memoizedState=o,n.childLanes=du(e,m,r),i.memoizedState=hu,$a(e.child,n)):(vr(i),r=e.child,e=r.sibling,r=Ps(r,{mode:"visible",children:n.children}),r.return=i,r.sibling=null,e!==null&&(m=i.deletions,m===null?(i.deletions=[e],i.flags|=16):m.push(e)),i.child=r,i.memoizedState=null,r)}function fu(e,i){return i=Oo({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Oo(e,i){return e=Si(22,e,null,i),e.lanes=0,e}function zo(e,i,r){return nn(i,e.child,null,r),e=fu(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function sy(e,i,r,n,o,h,m,x){if(r)return i.flags&256?(vr(i),i.flags&=-257,zo(e,i,x)):i.memoizedState!==null?(gr(),i.child=e.child,i.flags|=128,null):(gr(),h=o.fallback,m=i.mode,o=Oo({mode:"visible",children:o.children},m),h=Gr(h,m,x,null),h.flags|=2,o.return=i,h.return=i,o.sibling=h,i.child=o,nn(i,e.child,null,x),o=i.child,o.memoizedState=uu(x),o.childLanes=du(e,n,x),i.memoizedState=hu,$a(null,o));if(vr(i),ud(h)){if(n=h.nextSibling&&h.nextSibling.dataset,n)var k=n.dgst;return n=k,n!==""&&(o=Error(l(419)),o.stack="",o.digest=n,Ha({value:o,source:null,stack:null})),zo(e,i,x)}if(Ht||Qr(e,i,x,!1),n=(x&e.childLanes)!==0,Ht||n){if(pr.current!==null)return zo(e,i,x);if(n=ft,n!==null&&(o=Xl(n,x),o!==0&&o!==m.retryLane))throw m.retryLane=o,Wr(e,o),Ei(n,e,o),ou;return hd(h)||ec(),zo(e,i,x)}return hd(h)?(i.flags|=192,i.child=e.child,null):(e=m.treeContext,pt=Wi(h.nextSibling),Wt=i,Ie=!0,cr=null,Vi=!1,e!==null&&$m(i,e),i=fu(i,o.children),i.flags|=134221824,i)}function _p(e,i,r){e.lanes|=i;var n=e.alternate;n!==null&&(n.lanes|=i),mo(e.return,i,r)}function pp(e){for(var i=null;e!==null;){var r=e.alternate;r!==null&&wo(r)===null&&(i=e),e=e.sibling}return i}function Lo(e,i,r,n,o,h){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o,treeForkCount:h}:(m.isBackwards=i,m.rendering=null,m.renderingStartTime=0,m.last=n,m.tail=r,m.tailMode=o,m.treeForkCount=h)}function mu(e){var i=e.child;for(e.child=null;i!==null;){var r=i.sibling;i.sibling=e.child,e.child=i,i=r}}function _u(e,i,r){var n=i.pendingProps,o=n.revealOrder,h=n.tail;n=n.children;var m=ai.current;if(i.flags&128)return Va(i,m),null;var x=(m&2)!==0;if(x?(m=m&1|2,i.flags|=128):m&=1,Va(i,m),o==="backwards"&&e!==null?(mu(e),Kt(e,i,n,r),mu(e)):Kt(e,i,n,r),n=Ie?La:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_p(e,r,i);else if(e.tag===19)_p(e,r,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"backwards":r=pp(i.child),r===null?(o=i.child,i.child=null):(o=r.sibling,r.sibling=null,mu(i)),Lo(i,!0,o,null,h,n);break;case"unstable_legacy-backwards":for(r=null,o=i.child,i.child=null;o!==null;){if(e=o.alternate,e!==null&&wo(e)===null){i.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Lo(i,!0,r,null,h,n);break;case"together":Lo(i,!1,null,null,void 0,n);break;case"independent":i.memoizedState=null;break;default:r=pp(i.child),r===null?(o=i.child,i.child=null):(o=r.sibling,r.sibling=null),Lo(i,!1,o,r,h,n)}return i.child}function vp(e,i,r){var n=i.pendingProps;return ur(i,i.type,n.value),Kt(e,i,n.children,r),i.child}function Vs(e,i,r){if(e!==null&&(i.dependencies=e.dependencies),Sr|=i.lanes,(r&i.childLanes)===0)if(e!==null){if(Qr(e,i,r,!1),(r&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,r=Ps(e,e.pendingProps),i.child=r,r.return=i;e.sibling!==null;)e=e.sibling,r=r.sibling=Ps(e,e.pendingProps),r.return=i;r.sibling=null}return i.child}function pu(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&_o(e)))}function ry(e,i,r){switch(i.tag){case 3:bt(i,i.stateNode.containerInfo),ur(i,zt,e.memoizedState.cache),$r();break;case 27:case 5:Nt(i);break;case 4:bt(i,i.stateNode.containerInfo);break;case 10:ur(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Yh(i),null;break;case 13:var n=i.memoizedState;if(n!==null){if(n.dehydrated!==null)return vr(i),i.flags|=128,null;n=Qr(e,i,r,!1);var o=i.child.childLanes;return n||(r&o)!==0?mp(e,i,r):(vr(i),e=Vs(e,i,r),e!==null?e.sibling:null)}vr(i);break;case 19:if(i.flags&128)return _u(e,i,r);if(o=(e.flags&128)!==0,n=(r&i.childLanes)!==0,n||(Qr(e,i,r,!1),n=(r&i.childLanes)!==0),o){if(n)return _u(e,i,r);i.flags|=128}if(o=i.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Va(i,ai.current),n)break;return null;case 22:return i.lanes=0,op(e,i,r,i.pendingProps);case 24:ur(i,zt,e.memoizedState.cache)}return Vs(e,i,r)}function gp(e,i,r){if(e!==null)if(e.memoizedProps!==i.pendingProps)Ht=!0;else{if(!pu(e,r)&&(i.flags&128)===0)return Ht=!1,ry(e,i,r);Ht=(e.flags&131072)!==0}else Ht=!1,Ie&&(i.flags&1048576)!==0&&Gm(i,La,i.index);switch(i.lanes=0,i.tag){case 16:e:{var n=i.pendingProps;if(e=sn(i.elementType),i.type=e,typeof e=="function")wh(e)?(n=ln(e,n),i.tag=1,i=dp(null,i,e,n,r)):(i.tag=0,i=cu(null,i,e,n,r));else{if(e!=null){var o=e.$$typeof;if(o===z){i.tag=11,i=np(null,i,e,n,r);break e}else if(o===ce){i.tag=14,i=ap(null,i,e,n,r);break e}else if(o===j){i.tag=10,i.type=e,i=vp(null,i,r);break e}}throw i=ne(e)||e,Error(l(306,i,""))}}return i;case 0:return cu(e,i,i.type,i.pendingProps,r);case 1:return n=i.type,o=ln(n,i.pendingProps),dp(e,i,n,o,r);case 3:e:{if(bt(i,i.stateNode.containerInfo),e===null)throw Error(l(387));n=i.pendingProps;var h=i.memoizedState;o=h.element,zh(e,i),Ia(i,n,null,r);var m=i.memoizedState;if(n=m.cache,ur(i,zt,n),n!==h.cache&&Th(i,[zt],r,!0),Fa(),n=m.element,h.isDehydrated)if(h={element:n,isDehydrated:!1,cache:m.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=fp(e,i,n,r);break e}else if(n!==o){o=qi(Error(l(424)),i),Ha(o),i=fp(e,i,n,r);break e}else{switch(e=i.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(pt=Wi(e.firstChild),Wt=i,Ie=!0,cr=null,Vi=!0,r=o_(i,null,n,r),i.child=r;r;)r.flags=r.flags&-3|134221824,r=r.sibling}else{if($r(),n===o){i=Vs(e,i,r);break e}Kt(e,i,n,r)}i=i.child}return i;case 26:return $n(e,i),e===null?(r=qv(i.type,null,i.pendingProps,null))?i.memoizedState=r:Ie||(i.stateNode=Sv(i.type,i.pendingProps,_t.current,i)):i.memoizedState=qv(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return Nt(i),e===null&&Ie&&(n=i.stateNode=Uv(i.type,i.pendingProps,_t.current),Wt=i,Vi=!0,o=pt,Er(i.type)?(dd=o,pt=Wi(n.firstChild)):pt=o),Kt(e,i,i.pendingProps.children,r),$n(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&Ie&&((o=n=pt)&&(n=Qy(n,i.type,i.pendingProps,Vi),n!==null?(i.stateNode=n,Wt=i,pt=Wi(n.firstChild),Vi=!1,o=!0):o=!1),o||hr(i)),Nt(i),o=i.type,h=i.pendingProps,m=e!==null?e.memoizedProps:null,n=h.children,sd(o,h)?n=null:m!==null&&sd(o,m)&&(i.flags|=32),i.memoizedState!==null&&(o=Fh(e,i,Xx,null,null,r),ma._currentValue=o),$n(e,i),Kt(e,i,n,r),i.child;case 6:return e===null&&Ie&&((e=r=pt)&&(r=Jy(r,i.pendingProps,Vi),r!==null?(i.stateNode=r,Wt=i,pt=null,e=!0):e=!1),e||hr(i)),null;case 13:return mp(e,i,r);case 4:return bt(i,i.stateNode.containerInfo),n=i.pendingProps,e===null?i.child=nn(i,null,n,r):Kt(e,i,n,r),i.child;case 11:return np(e,i,i.type,i.pendingProps,r);case 7:return n=i.pendingProps,$n(e,i),Kt(e,i,n,r),i.child;case 8:return Kt(e,i,i.pendingProps.children,r),i.child;case 12:return Kt(e,i,i.pendingProps.children,r),i.child;case 10:return vp(e,i,r);case 9:return o=i.type._context,n=i.pendingProps.children,Jr(i),o=ri(o),n=n(o),i.flags|=1,Kt(e,i,n,r),i.child;case 14:return ap(e,i,i.type,i.pendingProps,r);case 15:return lp(e,i,i.type,i.pendingProps,r);case 19:return _u(e,i,r);case 31:return iy(e,i,r);case 22:return op(e,i,r,i.pendingProps);case 24:return Jr(i),n=ri(zt),e===null?(o=Bh(),o===null&&(o=ft,h=jh(),o.pooledCache=h,h.refCount++,h!==null&&(o.pooledCacheLanes|=r),o=h),i.memoizedState={parent:n,cache:o},Oh(i),ur(i,zt,o)):((e.lanes&r)!==0&&(zh(e,i),Ia(i,null,null,r),Fa()),o=e.memoizedState,h=i.memoizedState,o.parent!==n?(o={parent:n,cache:n},i.memoizedState=o,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=o),ur(i,zt,n)):(n=h.cache,ur(i,zt,n),n!==o.cache&&Th(i,[zt],r,!0))),Kt(e,i,i.pendingProps.children,r),i.child;case 30:return i.stateNode===null&&(i.stateNode={autoName:null,paired:null,clones:null,ref:null}),n=i.pendingProps,n.name!=null&&n.name!=="auto"?i.flags|=e===null?18882560:18874368:Ie&&uo(i),e!==null&&e.memoizedProps.name!==n.name?i.flags|=4194816:$n(e,i),Kt(e,i,n.children,r),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function Xs(e){e.flags|=4}function vu(e,i,r,n,o){var h;if((h=(e.mode&32)!==0)&&(h=r===null?Xv(i,n):Xv(i,n)&&(n.src!==r.src||n.srcSet!==r.srcSet)),h){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Jp())e.flags|=8192;else throw rn=xo,Rh}else e.flags&=-16777217}function xp(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Wv(i))if(Jp())e.flags|=8192;else throw rn=xo,Rh}function Ho(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Il():536870912,e.lanes|=i,ta|=i)}function Za(e,i){if(!Ie)switch(e.tailMode){case"visible":break;case"collapsed":for(var r=e.tail,n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null;break;default:for(i=e.tail,r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?e.tail=null:r.sibling=null}}function vt(e){var i=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(i)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&1206910976,n|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,i}function ny(e,i,r){var n=i.pendingProps;switch(Eh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(i),null;case 1:return vt(i),null;case 3:return r=i.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),i.memoizedState.cache!==n&&(i.flags|=2048),qs(zt),lt(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(qn(i)?Xs(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Mh())),vt(i),null;case 26:var o=i.type,h=i.memoizedState;return e===null?(Xs(i),h!==null?(vt(i),xp(i,h)):(vt(i),vu(i,o,null,n,r))):h?h!==e.memoizedState?(Xs(i),vt(i),xp(i,h)):(vt(i),i.flags&=-16777217):(e=e.memoizedProps,e!==n&&Xs(i),vt(i),vu(i,o,e,n,r)),null;case 27:if(Ui(i),r=_t.current,o=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==n&&Xs(i);else{if(!n){if(i.stateNode===null)throw Error(l(166));return vt(i),i.subtreeFlags&=-33554433,null}e=Te.current,qn(i)?Zm(i):(e=Uv(o,n,r),i.stateNode=e,Xs(i))}return vt(i),i.subtreeFlags&=-33554433,null;case 5:if(Ui(i),o=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==n&&Xs(i);else{if(!n){if(i.stateNode===null)throw Error(l(166));return vt(i),i.subtreeFlags&=-33554433,null}if(h=Te.current,qn(i))Zm(i);else{var m=ol(_t.current);switch(h){case 1:h=m.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:h=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":h=m.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":h=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":h=m.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof n.is=="string"?m.createElement("select",{is:n.is}):m.createElement("select"),n.multiple?h.multiple=!0:n.size&&(h.size=n.size);break;default:h=typeof n.is=="string"?m.createElement(o,{is:n.is}):m.createElement(o)}}h[S]=i,h[O]=n;e:for(m=i.child;m!==null;){if(m.tag===5||m.tag===6)h.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===i)break e;for(;m.sibling===null;){if(m.return===null||m.return===i)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}i.stateNode=h;e:switch(oi(h,o,n),o){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Xs(i)}}return vt(i),i.subtreeFlags&=-33554433,vu(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,r),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==n&&Xs(i);else{if(typeof n!="string"&&i.stateNode===null)throw Error(l(166));if(e=_t.current,qn(i)){if(e=i.stateNode,r=i.memoizedProps,n=null,o=Wt,o!==null)switch(o.tag){case 27:case 5:n=o.memoizedProps}e[S]=i,e=!!(e.nodeValue===r||n!==null&&n.suppressHydrationWarning===!0||gv(e.nodeValue,r)),e||hr(i,!0)}else e=ol(e).createTextNode(n),e[S]=i,i.stateNode=e}return vt(i),null;case 31:if(r=i.memoizedState,e===null||e.memoizedState!==null){if(n=qn(i),r!==null){if(e===null){if(!n)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[S]=i}else $r(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;vt(i),e=!1}else r=Mh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return i.flags&256?(ji(i),i):(ji(i),null);if((i.flags&128)!==0)throw Error(l(558))}return vt(i),null;case 13:if(n=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=qn(i),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(l(318));if(o=i.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(l(317));o[S]=i}else $r(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;vt(i),o=!1}else o=Mh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return i.flags&256?(ji(i),i):(ji(i),null)}return ji(i),(i.flags&128)!==0?(i.lanes=r,i):(r=n!==null,e=e!==null&&e.memoizedState!==null,r&&(n=i.child,o=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(o=n.alternate.memoizedState.cachePool.pool),h=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(h=n.memoizedState.cachePool.pool),h!==o&&(n.flags|=2048)),r!==e&&r&&(i.child.flags|=8192),Ho(i,i.updateQueue),vt(i),null);case 4:return lt(),e===null&&Qu(i.stateNode.containerInfo),i.flags|=67108864,vt(i),null;case 10:return qs(i.type),vt(i),null;case 19:if(Kh(i),n=i.memoizedState,n===null)return vt(i),null;if(o=(i.flags&128)!==0,h=n.rendering,h===null)if(o)Za(n,!1);else{if(Dt!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(h=wo(e),h!==null){for(i.flags|=128,Za(n,!1),e=h.updateQueue,i.updateQueue=e,Ho(i,e),i.subtreeFlags=0,e=r,r=i.child;r!==null;)Vm(r,e),r=r.sibling;return Va(i,ai.current&1|2),Ie&&Ys(i,n.treeForkCount),i.child}e=e.sibling}n.tail!==null&&At()>$o&&(i.flags|=128,o=!0,Za(n,!1),i.lanes=4194304)}else{if(!o)if(e=wo(h),e!==null){if(i.flags|=128,o=!0,e=e.updateQueue,i.updateQueue=e,Ho(i,e),Za(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!h.alternate&&!Ie)return vt(i),null}else 2*At()-n.renderingStartTime>$o&&r!==536870912&&(i.flags|=128,o=!0,Za(n,!1),i.lanes=4194304);n.isBackwards?(h.sibling=i.child,i.child=h):(e=n.last,e!==null?e.sibling=h:i.child=h,n.last=h)}if(n.tail!==null){e=n.tail;e:{for(r=e;r!==null;){if(r.alternate!==null){r=!1;break e}r=r.sibling}r=!0}return n.rendering=e,n.tail=e.sibling,n.renderingStartTime=At(),e.sibling=null,h=ai.current,h=o?h&1|2:h&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!r||Ie?Va(i,h):(r=h,De(ni,i),De(ai,r),di===null&&(di=i)),Ie&&Ys(i,n.treeForkCount),e}return vt(i),null;case 22:case 23:return ji(i),Ph(),n=i.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(i.flags|=8192):n&&(i.flags|=8192),n?(r&536870912)!==0&&(i.flags&128)===0&&(vt(i),i.subtreeFlags&6&&(i.flags|=8192)):vt(i),r=i.updateQueue,r!==null&&Ho(i,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==r&&(i.flags|=2048),e!==null&&ze(tn),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),qs(zt),vt(i),null;case 25:return null;case 30:return i.flags|=33554432,vt(i),null}throw Error(l(156,i.tag))}function ay(e,i){switch(Eh(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return qs(zt),lt(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Ui(i),null;case 31:if(i.memoizedState!==null){if(ji(i),i.alternate===null)throw Error(l(340));$r()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(ji(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));$r()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return Kh(i),e=i.flags,e&65536?(i.flags=e&-65537|128,e=i.memoizedState,e!==null&&(e.rendering=null,e.tail=null),i.flags|=4,i):null;case 4:return lt(),null;case 10:return qs(i.type),null;case 22:case 23:return ji(i),Ph(),e!==null&&ze(tn),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return qs(zt),null;case 25:return null;default:return null}}function yp(e,i){switch(Eh(i),i.tag){case 3:qs(zt),lt();break;case 26:case 27:case 5:Ui(i);break;case 4:lt();break;case 31:i.memoizedState!==null&&ji(i);break;case 13:ji(i);break;case 19:Kh(i);break;case 10:qs(i.type);break;case 22:case 23:ji(i),Ph(),e!==null&&ze(tn);break;case 24:qs(zt)}}function Qa(e,i){try{var r=i.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var o=n.next;r=o;do{if((r.tag&e)===e){n=void 0;var h=r.create,m=r.inst;n=h(),m.destroy=n}r=r.next}while(r!==o)}}catch(x){ct(i,i.return,x)}}function xr(e,i,r){try{var n=i.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var h=o.next;n=h;do{if((n.tag&e)===e){var m=n.inst,x=m.destroy;if(x!==void 0){m.destroy=void 0,o=i;var k=r,U=x;try{U()}catch(V){ct(o,k,V)}}}n=n.next}while(n!==h)}}catch(V){ct(i,i.return,V)}}function bp(e){var i=e.updateQueue;if(i!==null){var r=e.stateNode;try{h_(i,r)}catch(n){ct(e,e.return,n)}}}function Sp(e,i,r){r.props=ln(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(n){ct(e,i,n)}}function xs(e,i){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:var o=e.stateNode,h=Hs(e.memoizedProps,o);(o.ref===null||o.ref.name!==h)&&(o.ref=Dv(h)),n=o.ref;break;case 7:if(e.stateNode===null){var m=new zi(e);g(e.child,!1,$y,m,void 0,void 0),e.stateNode=m}n=e.stateNode;break;default:n=e.stateNode}typeof r=="function"?e.refCleanup=r(n):r.current=n}}catch(x){ct(e,i,x)}}function li(e,i){var r=e.ref,n=e.refCleanup;if(r!==null)if(typeof n=="function")try{n()}catch(o){ct(e,i,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(o){ct(e,i,o)}else r.current=null}function Uo(e,i){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&i!==null)for(var r=0;r<i.length;r++)Ov(e.stateNode,i[r])}function wp(e){for(var i=e.return;i!==null&&(xu(i)&&Ov(e.stateNode,i.stateNode),!gu(i));)i=i.return}function Ja(e){for(var i=e.return;i!==null&&(xu(i)&&Zy(e.stateNode,i.stateNode),!gu(i));)i=i.return}function gu(e){return e.tag===5||e.tag===3||e.tag===27}function xu(e){return e&&e.tag===7&&e.stateNode!==null}function yu(e){var i=e.type,r=e.memoizedProps,n=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":r.autoFocus&&n.focus();break e;case"img":r.src?n.src=r.src:r.srcSet&&(n.srcset=r.srcSet)}}catch(o){ct(e,e.return,o)}}function bu(e,i,r){try{var n=e.stateNode;Ay(n,e.type,r,i),n[O]=i}catch(o){ct(e,e.return,o)}}function Cp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Er(e.type)||e.tag===4}function Su(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Er(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wu(e,i,r,n){var o=e.tag;if(o===5||o===6)o=e.stateNode,i?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(o,i):(i=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.appendChild(o),r=r._reactRootContainer,r!=null||i.onclick!==null||(i.onclick=ps)),Uo(e,n),it=!0;else if(o!==4&&(o===27&&(Uo(e,n),n=null,Er(e.type)&&(r=e.stateNode,i=null)),e=e.child,e!==null))for(wu(e,i,r,n),e=e.sibling;e!==null;)wu(e,i,r,n),e=e.sibling}function Po(e,i,r,n){var o=e.tag;if(o===5||o===6)o=e.stateNode,i?r.insertBefore(o,i):r.appendChild(o),Uo(e,n),it=!0;else if(o!==4&&(o===27&&(Uo(e,n),n=null,Er(e.type)&&(r=e.stateNode)),e=e.child,e!==null))for(Po(e,i,r,n),e=e.sibling;e!==null;)Po(e,i,r,n),e=e.sibling}function kp(e){var i=e.stateNode,r=e.memoizedProps;try{for(var n=e.type,o=i.attributes;o.length;)i.removeAttributeNode(o[0]);oi(i,n,r),i[S]=e,i[O]=r}catch(h){ct(e,e.return,h)}}var Yo=!1,Ai=null;function Ep(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Yo=!0)}var ys=null;function Np(){var e=ys;return ys=null,e}var wi=0;function Zn(e,i,r,n,o){return wi=0,Mp(e.child,i,r,n,o)}function Mp(e,i,r,n,o){for(var h=!1;e!==null;){if(e.tag===5){var m=e.stateNode;if(n!==null){var x=ad(m);n.push(x),x.view&&(h=!0)}else h||ad(m).view&&(h=!0);Yo=!0,Nv(m,wi===0?i:i+"_"+wi,r),wi++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Mp(e.child,i,r,n,o)&&(h=!0));e=e.sibling}return h}function bs(e,i){for(;e!==null;)e.tag===5?Mv(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||bs(e.child,i)),e=e.sibling}function Ko(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ko(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var i=e.memoizedProps;if(i.name==null||i.name==="auto")throw Error(l(544));var r=i.name;i=Us(i.default,i.share),i!=="none"&&(Zn(e,r,i,null,!1)||bs(e.child,!1))}e=e.sibling}}function Cu(e,i){if(e.tag===30){var r=e.stateNode,n=e.memoizedProps,o=Hs(n,r),h=Us(n.default,r.paired?n.share:n.enter);h!=="none"?Zn(e,o,h,null,!1)?(Ko(e),r.paired||i||na(e,n.onEnter)):bs(e.child,!1):Ko(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Cu(e,i),e=e.sibling;else Ko(e)}function ku(e){if(Ai!==null&&Ai.size!==0){var i=Ai;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var r=e.memoizedProps,n=r.name;if(n!=null&&n!=="auto"){var o=i.get(n);if(o!==void 0){var h=Us(r.default,r.share);if(h!=="none"&&(Zn(e,n,h,null,!1)?(h=e.stateNode,o.paired=h,h.paired=o,na(e,r.onShare)):bs(e.child,!1)),i.delete(n),i.size===0)break}}}ku(e)}e=e.sibling}}}function Eu(e){if(e.tag===30){var i=e.memoizedProps,r=Hs(i,e.stateNode),n=Ai!==null?Ai.get(r):void 0,o=Us(i.default,n!==void 0?i.share:i.exit);o!=="none"&&(Zn(e,r,o,null,!1)?n!==void 0?(o=e.stateNode,n.paired=o,o.paired=n,Ai.delete(r),na(e,i.onShare)):na(e,i.onExit):bs(e.child,!1)),Ai!==null&&ku(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Eu(e),e=e.sibling;else Ai!==null&&ku(e)}function Dp(e){for(e=e.child;e!==null;){if(e.tag===30){var i=e.memoizedProps,r=Hs(i,e.stateNode);i=Us(i.default,i.update),e.flags&=-5,i!=="none"&&Zn(e,r,i,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Dp(e);e=e.sibling}}function Nu(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var i=e.stateNode;i.paired!==null&&(i.paired=null,bs(e.child,!1))}Nu(e)}e=e.sibling}}function qo(e){if(e.tag===30)e.stateNode.paired=null,bs(e.child,!1),Nu(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)qo(e),e=e.sibling;else Nu(e)}function Tp(e){for(e=e.child;e!==null;)e.tag===30?bs(e.child,!1):(e.subtreeFlags&33554432)!==0&&Tp(e),e=e.sibling}function Mu(e,i,r,n,o,h,m){for(var x=!1;i!==null;){if(i.tag===5){var k=i.stateNode;if(h!==null&&wi<h.length){var U=h[wi],V=ad(k);(U.view||V.view)&&(x=!0);var re;if(re=(e.flags&4)===0)if(V.clip)re=!0;else{re=U.rect;var L=V.rect;re=re.y!==L.y||re.x!==L.x||re.height!==L.height||re.width!==L.width}re&&(e.flags|=4),V.abs?V=!U.abs:(U=U.rect,V=V.rect,V=U.height!==V.height||U.width!==V.width),V&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Nv(k,wi===0?r:r+"_"+wi,o),x&&(e.flags&4)!==0||(ys===null&&(ys=[]),ys.push(k,wi===0?n:n+"_"+wi,i.memoizedProps)),wi++}else(i.tag!==22||i.memoizedState===null)&&(i.tag===30&&m?e.flags|=i.flags&32:Mu(e,i.child,r,n,o,h,m)&&(x=!0));i=i.sibling}return x}function jp(e,i){for(e=e.child;e!==null;){if(e.tag===30){var r=e.memoizedProps,n=e.stateNode,o=Hs(r,n),h=Us(r.default,r.update),m;m=e.memoizedState,e.memoizedState=null,n=e;var x=e.child;wi=0,o=Mu(n,x,o,o,h,m,!1),(e.flags&4)!==0&&o&&na(e,r.onUpdate)}else(e.subtreeFlags&33554432)!==0&&jp(e);e=e.sibling}}var Gt=!1,at=!1,Ss=!1,Du=!1,Ap=typeof WeakSet=="function"?WeakSet:Set,$t=null,ws=!1,el=!1,Fo=!1,Tu=!1;function ly(e,i,r){if(e=e.containerInfo,td=_a,e=zm(e),ph(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var h=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{n.nodeType,m.nodeType}catch{n=null;break e}var x=0,k=-1,U=-1,V=0,re=0,L=e,F=null;t:for(;;){for(var Ce;L!==n||h!==0&&L.nodeType!==3||(k=x+h),L!==m||o!==0&&L.nodeType!==3||(U=x+o),L.nodeType===3&&(x+=L.nodeValue.length),(Ce=L.firstChild)!==null;)F=L,L=Ce;for(;;){if(L===e)break t;if(F===n&&++V===h&&(k=x),F===m&&++re===o&&(U=x),(Ce=L.nextSibling)!==null)break;L=F,F=L.parentNode}L=Ce}n=k===-1||U===-1?null:{start:k,end:U}}else n=null}n=n||{start:0,end:0}}else n=null;for(id={focusedElem:e,selectionRange:n},_a=!1,r=(r&335544064)===r,$t=i,i=r?9270:1024;$t!==null;){if(e=$t,r&&(n=e.deletions,n!==null))for(h=0;h<n.length;h++)r&&Eu(n[h]);if(e.alternate===null&&(e.flags&2)!==0)r&&Ep(e),Io(r);else{if(e.tag===22){if(n=e.alternate,e.memoizedState!==null){n!==null&&n.memoizedState===null&&r&&Eu(n),Io(r);continue}else if(n!==null&&n.memoizedState!==null){r&&Ep(e),Io(r);continue}}n=e.child,(e.subtreeFlags&i)!==0&&n!==null?(n.return=e,$t=n):(r&&Dp(e),Io(r))}}Ai=null}function Io(e){for(;$t!==null;){var i=$t,r=e,n=i.alternate,o=i.flags;switch(i.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&n!==null){r=void 0,o=n.memoizedProps,n=n.memoizedState;var h=i.stateNode;try{var m=ln(i.type,o);r=h.getSnapshotBeforeUpdate(m,n),h.__reactInternalSnapshotBeforeUpdate=r}catch(x){ct(i,i.return,x)}}break;case 3:if((o&1024)!==0){if(n=i.stateNode.containerInfo,r=n.nodeType,r===9)cd(n);else if(r===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":cd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:r&&n!==null&&(r=Hs(n.memoizedProps,n.stateNode),o=i.memoizedProps,o=Us(o.default,o.update),o!=="none"&&Zn(n,r,o,n.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(l(163))}if(n=i.sibling,n!==null){n.return=i.return,$t=n;break}$t=i.return}}function Bp(e,i,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:Cs(e,r),n&4&&Qa(5,r);break;case 1:if(Cs(e,r),n&4)if(e=r.stateNode,i===null)try{e.componentDidMount()}catch(m){ct(r,r.return,m)}else{var o=ln(r.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(o,i,e.__reactInternalSnapshotBeforeUpdate)}catch(m){ct(r,r.return,m)}}n&64&&bp(r),n&512&&xs(r,r.return);break;case 3:if(Cs(e,r),n&64&&(e=r.updateQueue,e!==null)){if(i=null,r.child!==null)switch(r.child.tag){case 27:case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}try{h_(e,i)}catch(m){ct(r,r.return,m)}}break;case 27:i===null&&n&4&&kp(r);case 26:case 5:Cs(e,r),i===null&&n&4&&yu(r),n&512&&xs(r,r.return);break;case 12:Cs(e,r);break;case 31:Cs(e,r),n&4&&Lp(e,r);break;case 13:Cs(e,r),n&4&&Hp(e,r),n&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=xy.bind(null,r),eb(e,r))));break;case 22:if(n=r.memoizedState!==null||Gt,!n){var h=i!==null&&i.memoizedState!==null||at;i=Gt,o=at,Gt=n,(at=h)&&!o?(n=2,(r.subtreeFlags&8772)!==0&&(n|=1),cs(e,r,n)):Cs(e,r),Gt=i,at=o}break;case 30:Cs(e,r),n&512&&xs(r,r.return);break;case 7:n&512&&xs(r,r.return);default:Cs(e,r)}}function ju(e,i){for(e=e.child;e!==null;)Rp(e,i),e=e.sibling}function Rp(e,i){switch(e.tag){case 5:case 26:try{var r=e.stateNode;if(i){var n=r.style;typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"}else{var o=e.stateNode,h=e.memoizedProps.style,m=h!=null&&h.hasOwnProperty("display")?h.display:null;o.style.display=m==null||typeof m=="boolean"?"":(""+m).trim()}}catch(k){ct(e,e.return,k)}Au(e,i);break;case 6:try{e.stateNode.nodeValue=i?"":e.memoizedProps,it=!0}catch(k){ct(e,e.return,k)}break;case 18:try{var x=e.stateNode;i?Ev(x,!0):Ev(e.stateNode,!1)}catch(k){ct(e,e.return,k)}break;case 22:case 23:e.memoizedState===null&&ju(e,i);break;default:ju(e,i)}}function Au(e,i){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var r=e,n=i;switch(r.tag){case 4:Rp(r,n);break e;case 22:r.memoizedState===null&&Au(r,n);break e;default:Au(r,n)}}e=e.sibling}}function Op(e){var i=e.alternate;i!==null&&(e.alternate=null,Op(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&nt(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var St=null,Ci=!1;function ls(e,i,r){for(r=r.child;r!==null;)zp(e,i,r),r=r.sibling}function zp(e,i,r){if(ii&&typeof ii.onCommitFiberUnmount=="function")try{ii.onCommitFiberUnmount(Bs,r)}catch{}switch(r.tag){case 26:at||li(r,i),ls(e,i,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&!at&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:at||li(r,i),Ja(r);var n=St,o=Ci;Er(r.type)&&(St=r.stateNode,Ci=!1),ls(e,i,r),Pv(r.stateNode,r.type,r.memoizedProps),St=n,Ci=o;break;case 5:at||li(r,i),Ja(r);case 6:if(r.tag===6&&Ja(r),n=St,o=Ci,St=null,ls(e,i,r),St=n,Ci=o,St!==null)if(Ci)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(r.stateNode),it=!0}catch(h){ct(r,i,h)}else try{St.removeChild(r.stateNode),it=!0}catch(h){ct(r,i,h)}break;case 18:St!==null&&(Ci?(e=St,kv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),pa(e)):kv(St,r.stateNode));break;case 4:n=St,o=Ci,St=r.stateNode.containerInfo,Ci=!0,ls(e,i,r),St=n,Ci=o;break;case 0:case 11:case 14:case 15:xr(2,r,i),at||xr(4,r,i),ls(e,i,r);break;case 1:at||(li(r,i),n=r.stateNode,typeof n.componentWillUnmount=="function"&&Sp(r,i,n)),ls(e,i,r);break;case 21:ls(e,i,r);break;case 22:at=(n=at)||r.memoizedState!==null,ls(e,i,r),at=n;break;case 30:li(r,i),ls(e,i,r);break;case 7:at||li(r,i),ls(e,i,r);break;default:ls(e,i,r)}}function Lp(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{pa(e)}catch(r){ct(i,i.return,r)}}}function Hp(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{pa(e)}catch(r){ct(i,i.return,r)}}function oy(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new Ap),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new Ap),i;default:throw Error(l(435,e.tag))}}function Vo(e,i){var r=oy(e);i.forEach(function(n){if(!r.has(n)){r.add(n);var o=yy.bind(null,e,n);n.then(o,o)}})}function vi(e,i,r){var n=i.deletions;if(n!==null)for(var o=0;o<n.length;o++){var h=n[o],m=e,x=i,k=x;e:for(;k!==null;){switch(k.tag){case 27:if(Er(k.type)){St=k.stateNode,Ci=!1;break e}break;case 5:St=k.stateNode,Ci=!1;break e;case 3:case 4:St=k.stateNode.containerInfo,Ci=!0;break e}k=k.return}if(St===null)throw Error(l(160));zp(m,x,h),St=null,Ci=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Up(i,e,r),i=i.sibling}var os=null;function Up(e,i,r){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(n=e.updateQueue,n=n!==null?n.events:null,n!==null))for(var h=0;h<n.length;h++){var m=n[h];m.ref.impl=m.nextImpl}vi(i,e,r),gi(e),o&4&&(xr(3,e,e.return),Qa(3,e),xr(5,e,e.return));break;case 1:vi(i,e,r),gi(e),o&512&&(at||n===null||li(n,n.return)),o&64&&Gt&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?i:r.concat(i))));break;case 26:if(h=os,vi(i,e,r),gi(e),o&512&&(at||n===null||li(n,n.return)),o&4)if(o=n!==null?n.memoizedState:null,r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null)if(Gt)e.stateNode=Sv(e.type,e.memoizedProps,i.containerInfo,e);else{e:{i=e.type,r=e.memoizedProps,o=h.ownerDocument||h;t:switch(i){case"title":n=o.getElementsByTagName("title")[0],(!n||n[je]||n[S]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=o.createElement(i),o.head.insertBefore(n,o.querySelector("head > title"))),oi(n,i,r),n[S]=e,Xt(n),i=n;break e;case"link":if(h=Vv("link","href",o).get(i+(r.href||""))){for(m=0;m<h.length;m++)if(n=h[m],n.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&n.getAttribute("rel")===(r.rel==null?null:r.rel)&&n.getAttribute("title")===(r.title==null?null:r.title)&&n.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){h.splice(m,1);break t}}n=o.createElement(i),oi(n,i,r),o.head.appendChild(n);break;case"meta":if(h=Vv("meta","content",o).get(i+(r.content||""))){for(m=0;m<h.length;m++)if(n=h[m],n.getAttribute("content")===(r.content==null?null:""+r.content)&&n.getAttribute("name")===(r.name==null?null:r.name)&&n.getAttribute("property")===(r.property==null?null:r.property)&&n.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&n.getAttribute("charset")===(r.charSet==null?null:r.charSet)){h.splice(m,1);break t}}n=o.createElement(i),oi(n,i,r),o.head.appendChild(n);break;default:throw Error(l(468,i))}n[S]=e,Xt(n),i=n}e.stateNode=i}else Gt||pd(h,e.type,e.stateNode);else e.stateNode=Iv(h,r,e.memoizedProps);else o!==r?(o===null?(i=n.stateNode,i===null||at||i.parentNode.removeChild(i)):o.count--,r===null?Gt||pd(h,e.type,e.stateNode):Iv(h,r,e.memoizedProps)):r===null&&e.stateNode!==null&&bu(e,e.memoizedProps,n.memoizedProps);break;case 27:vi(i,e,r),gi(e),o&512&&(at||n===null||li(n,n.return)),n!==null&&o&4&&bu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(h=Ss,Ss=!1,vi(i,e,r),Ss=h,gi(e),o&512&&(at||n===null||li(n,n.return)),e.flags&32){i=e.stateNode;try{Bn(i,""),it=!0}catch(V){ct(e,e.return,V)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,bu(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Du=!0);break;case 6:if(vi(i,e,r),gi(e),o&4){if(e.stateNode===null)throw Error(l(162));i=e.memoizedProps,r=e.stateNode;try{r.nodeValue=i,it=!0}catch(V){ct(e,e.return,V)}}break;case 3:if(it=!1,lc=null,h=os,os=cl(i.containerInfo),vi(i,e,r),os=h,gi(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{pa(i.containerInfo)}catch(V){ct(e,e.return,V)}Du&&(Du=!1,Pp(e)),it=!1;break;case 4:o=Ss,Ss=Gt,n=am(),h=os,os=cl(e.stateNode.containerInfo),vi(i,e,r),gi(e),os=h,it&&el&&(Fo=!0),it=n,Ss=o;break;case 12:vi(i,e,r),gi(e);break;case 31:vi(i,e,r),gi(e),o&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Vo(e,i)));break;case 13:vi(i,e,r),gi(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Go=At()),o&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Vo(e,i)));break;case 22:h=e.memoizedState!==null,m=n!==null&&n.memoizedState!==null;var x=Gt,k=at,U=Ss;Gt=x||h,Ss=U||h,at=k||m,vi(i,e,r),at=k,Ss=U,Gt=x,gi(e),o&8192&&(i=e.stateNode,i._visibility=h?i._visibility&-2:i._visibility|1,!h||n===null||m||Gt||at||(i=m||at,r=Gt,n=at,Gt=h||Gt,at=i,yr(e,2),Gt=r,at=n),!h&&Ss||ju(e,h)),o&4&&(i=e.updateQueue,i!==null&&(r=i.retryQueue,r!==null&&(i.retryQueue=null,Vo(e,r))));break;case 19:vi(i,e,r),gi(e),o&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Vo(e,i)));break;case 30:o&512&&(at||n===null||li(n,n.return)),o=am(),h=el,m=(r&335544064)===r,x=e.memoizedProps,el=m&&Us(x.default,x.update)!=="none",vi(i,e,r),gi(e),m&&n!==null&&it&&(e.flags|=4),el=h,it=o;break;case 21:break;case 7:o&512&&(at||n===null||li(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=e);default:vi(i,e,r),gi(e)}}function gi(e){var i=e.flags;if(i&2){try{for(var r,n=e.return;n!==null;){if(Cp(n)){r=n;break}n=n.return}n=null;for(var o=e.return;o!==null;){if(xu(o)){var h=o.stateNode;n===null?n=[h]:n.push(h)}if(gu(o))break;o=o.return}var m=n;if(r==null)throw Error(l(160));switch(r.tag){case 27:var x=r.stateNode,k=Su(e);Po(e,k,x,m);break;case 5:var U=r.stateNode;r.flags&32&&(Bn(U,""),r.flags&=-33);var V=Su(e);Po(e,V,U,m);break;case 3:case 4:var re=r.stateNode.containerInfo,L=Su(e);wu(e,L,re,m);break;default:throw Error(l(161))}}catch(F){ct(e,e.return,F)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Pp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Pp(i),i.tag===5&&i.flags&1024&&(i=i.stateNode,_a=!0,i.reset(),_a=!1),e=e.sibling}}function Qn(e,i){if(i.subtreeFlags&9270)for(i=i.child;i!==null;)Yp(i,e),i=i.sibling;else jp(i)}function Yp(e,i){var r=e.alternate;if(r===null)Cu(e,!1);else switch(e.tag){case 3:if(Tu=ws=!1,Np(),Qn(i,e),!ws&&!Fo){if(e=ys,e!==null)for(var n=0;n<e.length;n+=3){r=e[n];var o=e[n+1];Mv(r,e[n+2]),r=r.ownerDocument.documentElement,r!==null&&r.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}e=i.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Tu=!0}ys=null;break;case 5:Qn(i,e);break;case 4:n=ws,ws=!1,Qn(i,e),ws&&(Fo=!0),ws=n;break;case 22:e.memoizedState===null&&(r.memoizedState!==null?Cu(e,!1):Qn(i,e));break;case 30:n=ws,o=Np(),ws=!1,Qn(i,e),ws&&(e.flags|=4);var h=e.memoizedProps,m=e.stateNode;i=Hs(h,m),m=Hs(r.memoizedProps,m);var x=Us(h.default,h.update);x==="none"?i=!1:(h=r.memoizedState,r.memoizedState=null,r=e.child,wi=0,i=Mu(e,r,i,m,x,h,!0),wi!==(h===null?0:h.length)&&(e.flags|=32)),(e.flags&4)!==0&&i?(na(e,e.memoizedProps.onUpdate),ys=o):o!==null&&(o.push.apply(o,ys),ys=o),ws=(e.flags&32)!==0?!0:n;break;default:Qn(i,e)}}function Cs(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Bp(e,i.alternate,i),i=i.sibling}function yr(e,i){for(e=e.child;e!==null;){var r=e,n=i;switch(r.tag){case 0:case 11:case 14:case 15:xr(4,r,r.return),yr(r,n);break;case 1:li(r,r.return);var o=r.stateNode;typeof o.componentWillUnmount=="function"&&Sp(r,r.return,o),yr(r,n);break;case 27:(n&2)!==0&&Pv(r.stateNode,r.type,r.memoizedProps);case 5:li(r,r.return),r.tag!==5&&r.tag!==27||Ja(r),yr(r,n);break;case 6:Ja(r);break;case 26:li(r,r.return),o=r.stateNode,r.memoizedState!==null||o===null||at||o.parentNode.removeChild(o),yr(r,n);break;case 22:r.memoizedState===null&&yr(r,n);break;case 30:li(r,r.return),yr(r,n);break;case 7:li(r,r.return);default:yr(r,n)}e=e.sibling}}function cs(e,i,r){for(r=(i.subtreeFlags&8772)!==0?r:r&-2,i=i.child;i!==null;){var n=i.alternate,o=e,h=i,m=h.flags,x=(r&1)!==0;switch(h.tag){case 0:case 11:case 15:cs(o,h,r),Qa(4,h);break;case 1:if(cs(o,h,r),n=h,o=n.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(V){ct(n,n.return,V)}if(n=h,o=n.updateQueue,o!==null){var k=n.stateNode;try{var U=o.shared.hiddenCallbacks;if(U!==null)for(o.shared.hiddenCallbacks=null,o=0;o<U.length;o++)c_(U[o],k)}catch(V){ct(n,n.return,V)}}x&&m&64&&bp(h),xs(h,h.return);break;case 27:(r&2)!==0&&kp(h);case 5:h.tag!==5&&h.tag!==27||wp(h),cs(o,h,r),x&&n===null&&m&4&&yu(h),xs(h,h.return);break;case 6:wp(h);break;case 26:k=h.stateNode,h.memoizedState!==null||k===null||Gt||pd(cl(k.ownerDocument),h.type,k),cs(o,h,r),x&&n===null&&m&4&&yu(h),xs(h,h.return);break;case 12:cs(o,h,r);break;case 31:cs(o,h,r),x&&m&4&&Lp(o,h);break;case 13:cs(o,h,r),x&&m&4&&Hp(o,h);break;case 22:h.memoizedState===null&&cs(o,h,r),xs(h,h.return);break;case 30:cs(o,h,r),xs(h,h.return);break;case 7:xs(h,h.return);default:cs(o,h,r)}i=i.sibling}}function Bu(e,i){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Ua(r))}function Ru(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Ua(e))}function Xi(e,i,r,n){var o=(r&335544064)===r;if(i.subtreeFlags&(o?10262:10256))for(i=i.child;i!==null;)Kp(e,i,r,n),i=i.sibling;else o&&Tp(i)}function Kp(e,i,r,n){var o=(r&335544064)===r;o&&i.alternate===null&&i.return!==null&&i.return.alternate!==null&&qo(i);var h=i.flags;switch(i.tag){case 0:case 11:case 15:Xi(e,i,r,n),h&2048&&Qa(9,i);break;case 1:Xi(e,i,r,n);break;case 3:Xi(e,i,r,n),o&&Tu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),h&2048&&(h=null,i.alternate!==null&&(h=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==h&&(i.refCount++,h!=null&&Ua(h)));break;case 12:if(h&2048){Xi(e,i,r,n),h=i.stateNode;try{var m=i.memoizedProps,x=m.id,k=m.onPostCommit;typeof k=="function"&&k(x,i.alternate===null?"mount":"update",h.passiveEffectDuration,-0)}catch(U){ct(i,i.return,U)}}else Xi(e,i,r,n);break;case 31:Xi(e,i,r,n);break;case 13:Xi(e,i,r,n);break;case 23:break;case 22:m=i.stateNode,x=i.alternate,i.memoizedState!==null?(o&&x!==null&&x.memoizedState===null&&qo(x),m._visibility&2?Xi(e,i,r,n):tl(e,i)):(o&&x!==null&&x.memoizedState!==null&&qo(i),m._visibility&2?Xi(e,i,r,n):(m._visibility|=2,Jn(e,i,r,n,(i.subtreeFlags&10256)!==0||!1))),h&2048&&Bu(x,i);break;case 24:Xi(e,i,r,n),h&2048&&Ru(i.alternate,i);break;case 30:o&&(h=i.alternate,h!==null&&(bs(h.child,!0),bs(i.child,!0))),Xi(e,i,r,n);break;default:Xi(e,i,r,n)}}function Jn(e,i,r,n,o){for(o=o&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=e,m=i,x=r,k=n,U=m.flags;switch(m.tag){case 0:case 11:case 15:Jn(h,m,x,k,o),Qa(8,m);break;case 23:break;case 22:var V=m.stateNode;m.memoizedState!==null?V._visibility&2?Jn(h,m,x,k,o):tl(h,m):(V._visibility|=2,Jn(h,m,x,k,o)),o&&U&2048&&Bu(m.alternate,m);break;case 24:Jn(h,m,x,k,o),o&&U&2048&&Ru(m.alternate,m);break;default:Jn(h,m,x,k,o)}i=i.sibling}}function tl(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var r=e,n=i,o=n.flags;switch(n.tag){case 22:tl(r,n),o&2048&&Bu(n.alternate,n);break;case 24:tl(r,n),o&2048&&Ru(n.alternate,n);break;default:tl(r,n)}i=i.sibling}}var on=8192;function cn(e,i,r){if(e.subtreeFlags&on)for(e=e.child;e!==null;)qp(e,i,r),e=e.sibling}function qp(e,i,r){switch(e.tag){case 26:cn(e,i,r),e.flags&on&&(e.memoizedState!==null?mb(r,os,e.memoizedState,e.memoizedProps):(e=e.stateNode,(i&335544128)===i&&$v(r,e)));break;case 5:cn(e,i,r),e.flags&on&&(e=e.stateNode,(i&335544128)===i&&$v(r,e));break;case 3:case 4:var n=os;os=cl(e.stateNode.containerInfo),cn(e,i,r),os=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=on,on=16777216,cn(e,i,r),on=n):cn(e,i,r));break;case 30:if((e.flags&on)!==0&&(n=e.memoizedProps.name,n!=null&&n!=="auto")){var o=e.stateNode;o.paired=null,Ai===null&&(Ai=new Map),Ai.set(n,o)}cn(e,i,r);break;default:cn(e,i,r)}}function Fp(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function il(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var n=i[r];$t=n,Vp(n,e)}Fp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ip(e),e=e.sibling}function Ip(e){switch(e.tag){case 0:case 11:case 15:il(e),e.flags&2048&&xr(9,e,e.return);break;case 3:il(e);break;case 12:il(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,Xo(e)):il(e);break;default:il(e)}}function Xo(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var n=i[r];$t=n,Vp(n,e)}Fp(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:xr(8,i,i.return),Xo(i);break;case 22:r=i.stateNode,r._visibility&2&&(r._visibility&=-3,Xo(i));break;default:Xo(i)}e=e.sibling}}function Vp(e,i){for(;$t!==null;){var r=$t;switch(r.tag){case 0:case 11:case 15:xr(8,r,i);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var n=r.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Ua(r.memoizedState.cache)}if(n=r.child,n!==null)n.return=r,$t=n;else e:for(r=e;$t!==null;){n=$t;var o=n.sibling,h=n.return;if(Op(n),n===r){$t=null;break e}if(o!==null){o.return=h,$t=o;break e}$t=h}}}var cy={getCacheForType:function(e){var i=ri(zt),r=i.data.get(e);return r===void 0&&(r=e(),i.data.set(e,r)),r},cacheSignal:function(){return ri(zt).controller.signal}},hy=typeof WeakMap=="function"?WeakMap:Map,st=0,ft=null,We=null,Qe=0,ot=0,Bi=null,br=!1,ea=!1,Ou=!1,Ws=0,Dt=0,Sr=0,hn=0,Wo=0,Ri=0,ta=0,sl=null,ki=null,zu=!1,Go=0,Xp=0,$o=1/0,Zo=null,wr=null,Ct=0,hs=null,un=null,ks=0,Lu=0,Hu=null,Wp=null,ia=null,sa=null,ra=null,rl=0,Qo=null;function Oi(){return(st&2)!==0&&Qe!==0?Qe&-Qe:J.T!==null?Wu():Wl()}function Gp(){if(Ri===0)if((Qe&536870912)===0||Ie){var e=Yr;Yr<<=1,(Yr&3932160)===0&&(Yr=262144),Ri=e}else Ri=536870912;return e=ni.current,e!==null&&(e.flags|=32),Ri}function na(e,i){if(i!=null){var r=e.stateNode,n=r.ref;n===null&&(n=r.ref=Dv(Hs(e.memoizedProps,r))),sa===null&&(sa=[]),sa.push(i.bind(null,n))}}function Ei(e,i,r){(e===ft&&(ot===2||ot===9)||e.cancelPendingCommit!==null)&&(aa(e,0),Cr(e,Qe,Ri,!1)),nr(e,r),((st&2)===0||e!==ft)&&(e===ft&&((st&2)===0&&(hn|=r),Dt===4&&Cr(e,Qe,Ri,!1)),Es(e))}function $p(e,i,r){if((st&6)!==0)throw Error(l(327));var n=!r&&(i&127)===0&&(i&e.expiredLanes)===0||sr(e,i),o=n?fy(e,i):Pu(e,i,!0),h=n;do{if(o===0){ea&&!n&&Cr(e,i,0,!1);break}else{if(r=e.current.alternate,h&&!uy(r)){o=Pu(e,i,!1),h=!1;continue}if(o===2){if(h=i,e.errorRecoveryDisabledLanes&h)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){i=m;e:{var x=e;o=sl;var k=x.current.memoizedState.isDehydrated;if(k&&(aa(x,m).flags|=256),m=Pu(x,m,!1),m!==2&&m!==6){if(Ou&&!k){x.errorRecoveryDisabledLanes|=h,hn|=h,o=4;break e}h=ki,ki=o,h!==null&&(ki===null?ki=h:ki.push.apply(ki,h))}o=m}if(h=!1,o!==2)continue}}if(o===1){aa(e,0),Cr(e,i,0,!0);break}e:{switch(n=e,h=o,h){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i&&(i&62914560)!==i)break;case 6:Cr(n,i,Ri,!br);break e;case 2:ki=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(o=Go+300-At(),10<o)){if(Cr(n,i,Ri,!br),Kr(n,0,!0)!==0)break e;ks=i,n.timeoutHandle=nd(Zp.bind(null,n,r,ki,Zo,zu,i,Ri,hn,ta,br,h,"Throttled",-0,0),o);break e}Zp(n,r,ki,Zo,zu,i,Ri,hn,ta,br,h,null,-0,0)}}break}while(!0);Es(e)}function Zp(e,i,r,n,o,h,m,x,k,U,V,re,L,F){e.timeoutHandle=-1;var Ce=i.subtreeFlags,Me=(h&335544064)===h;if(re=null,(Me||Ce&8192||(Ce&16785408)===16785408)&&(re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ps},Ai=null,qp(i,h,re),Me&&(Ce=re,Me=e.containerInfo,Me=(Me.nodeType===9?Me:Me.ownerDocument).__reactViewTransition,Me!=null&&(Ce.count++,Ce.waitingForViewTransition=!0,Ce=dl.bind(Ce),Me.finished.then(Ce,Ce))),Ce=(h&62914560)===h?Go-At():(h&4194048)===h?Xp-At():0,Ce=_b(re,Ce),Ce!==null)){ks=h,e.cancelPendingCommit=Ce(nv.bind(null,e,i,h,r,n,o,m,x,k,U,V,re,null,L,F)),Cr(e,h,m,!U);return}nv(e,i,h,r,n,o,m,x,k,U,V,re)}function uy(e){for(var i=e;;){var r=i.tag;if((r===0||r===11||r===15)&&i.flags&16384&&(r=i.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var n=0;n<r.length;n++){var o=r[n],h=o.getSnapshot;o=o.value;try{if(!Ti(h(),o))return!1}catch{return!1}}if(r=i.child,i.subtreeFlags&16384&&r!==null)r.return=i,i=r;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Cr(e,i,r,n){i=Ea(e,i),i&=~Wo,i&=~hn,e.suspendedLanes|=i,e.pingedLanes&=~i,n&&(e.warmLanes|=i),n=e.expirationTimes;for(var o=i;0<o;){var h=31-si(o),m=1<<h;n[h]=-1,o&=~m}r!==0&&Na(e,r,i)}function Jo(){return(st&6)===0?(nl(0),!1):!0}function Uu(){if(We!==null){if(ot===0)var e=We.return;else e=We,Ks=Zr=null,Xh(e),Vn=null,Ka=0,e=We;for(;e!==null;)yp(e.alternate,e),e=e.return;We=null}}function aa(e,i){var r=e.timeoutHandle;return r!==-1&&(e.timeoutHandle=-1,Oy(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),ks=0,Uu(),ft=e,We=r=Ps(e.current,null),Qe=i,ot=0,Bi=null,br=!1,ea=sr(e,i),Ou=!1,ta=Ri=Wo=hn=Sr=Dt=0,ki=sl=null,zu=!1,Ws=Ea(e,i),ao(),r}function Qp(e,i){Ke=null,J.H=Ao,i===In||i===go?(i=n_(),ot=3):i===Rh?(i=n_(),ot=4):ot=i===ou?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Bi=i,We===null&&(Dt=1,Bo(e,qi(i,e.current)))}function Jp(){var e=ni.current;return e===null?!0:(Qe&4194048)===Qe?di===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===di:!1}function ev(){var e=J.H;return J.H=Ao,e===null?Ao:e}function tv(){var e=J.A;return J.A=cy,e}function ec(){Dt=4,br||(Qe&4194048)!==Qe&&ni.current!==null||(ea=!0),(Sr&134217727)===0&&(hn&134217727)===0||ft===null||Cr(ft,Qe,Ri,!1)}function Pu(e,i,r){var n=st;st|=2;var o=ev(),h=tv();(ft!==e||Qe!==i)&&(Zo=null,aa(e,i)),i=!1;var m=Dt;e:do try{if(ot!==0&&We!==null){var x=We,k=Bi;switch(ot){case 8:Uu(),m=6;break e;case 3:case 2:case 9:case 6:ni.current===null&&(i=!0);var U=ot;if(ot=0,Bi=null,la(e,x,k,U),r&&ea){m=0;break e}break;default:U=ot,ot=0,Bi=null,la(e,x,k,U)}}dy(),m=Dt;break}catch(V){Qp(e,V)}while(!0);return i&&e.shellSuspendCounter++,Ks=Zr=null,st=n,J.H=o,J.A=h,We===null&&(ft=null,Qe=0,ao()),m}function dy(){for(;We!==null;)iv(We)}function fy(e,i){var r=st;st|=2;var n=ev(),o=tv();ft!==e||Qe!==i?(Zo=null,$o=At()+500,aa(e,i)):ea=sr(e,i);e:do try{if(ot!==0&&We!==null){i=We;var h=Bi;t:switch(ot){case 1:ot=0,Bi=null,la(e,i,h,1);break;case 2:case 9:if(s_(h)){ot=0,Bi=null,sv(i);break}i=function(){ot!==2&&ot!==9||ft!==e||(ot=7),Es(e)},h.then(i,i);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:s_(h)?(ot=0,Bi=null,sv(i)):(ot=0,Bi=null,la(e,i,h,7));break;case 5:var m=null;switch(We.tag){case 26:m=We.memoizedState;case 5:case 27:var x=We;if(m?Wv(m):x.stateNode.complete){ot=0,Bi=null;var k=x.sibling;if(k!==null)We=k;else{var U=x.return;U!==null?(We=U,tc(U)):We=null}break t}}ot=0,Bi=null,la(e,i,h,5);break;case 6:ot=0,Bi=null,la(e,i,h,6);break;case 8:Uu(),Dt=6;break e;default:throw Error(l(462))}}my();break}catch(V){Qp(e,V)}while(!0);return Ks=Zr=null,J.H=n,J.A=o,st=r,We!==null?0:(ft=null,Qe=0,ao(),Dt)}function my(){for(;We!==null&&!Ze();)iv(We)}function iv(e){var i=gp(e.alternate,e,Ws);e.memoizedProps=e.pendingProps,i===null?tc(e):We=i}function sv(e){var i=e,r=i.alternate;switch(i.tag){case 15:case 0:i=up(r,i,i.pendingProps,i.type,void 0,Qe);break;case 11:i=up(r,i,i.pendingProps,i.type.render,i.ref,Qe);break;case 5:Xh(i);var n=i;n===Wt&&(Ie?(fo(n),n.tag===5&&n.stateNode!=null&&(pt=n.stateNode)):(fo(n),Ie=!0));default:yp(r,i),i=We=Vm(i,Ws),i=gp(r,i,Ws)}e.memoizedProps=e.pendingProps,i===null?tc(e):We=i}function la(e,i,r,n){Ks=Zr=null,Xh(i),Vn=null,Ka=0;var o=i.return;try{if(ty(e,o,i,r,Qe)){Dt=1,Bo(e,qi(r,e.current)),We=null;return}}catch(h){if(o!==null)throw We=o,h;Dt=1,Bo(e,qi(r,e.current)),We=null;return}i.flags&32768?(Ie||n===1?e=!0:ea||(Qe&536870912)!==0?e=!1:(br=e=!0,(n===2||n===9||n===3||n===6)&&(n=ni.current,n!==null&&n.tag===13&&(n.flags|=16384))),rv(i,e)):tc(i)}function tc(e){var i=e;do{if((i.flags&32768)!==0){rv(i,br);return}e=i.return;var r=ny(i.alternate,i,Ws);if(r!==null){We=r;return}if(i=i.sibling,i!==null){We=i;return}We=i=e}while(i!==null);Dt===0&&(Dt=5)}function rv(e,i){do{var r=ay(e.alternate,e);if(r!==null){r.flags&=32767,We=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!i&&(e=e.sibling,e!==null)){We=e;return}We=e=r}while(e!==null);Dt=6,We=null}function nv(e,i,r,n,o,h,m,x,k,U,V,re){e.cancelPendingCommit=null;do ic();while(Ct!==0);if((st&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));e===ft&&(We=ft=null,Qe=0),un=i,hs=e,ks=r,Hu=o,Wp=n,_y(e,i,r,m,x,k,re)}}function _y(e,i,r,n,o,h,m){var x=i.lanes|i.childLanes;if(Lu=x,x|=bh,Qc(e,r,x,n,o,h),sa=null,(r&335544064)===r?(ra=qx(e),n=10262):(ra=null,n=10256),(i.subtreeFlags&n)!==0||(i.flags&n)!==0?(e.callbackNode=null,e.callbackPriority=0,by(Mi,function(){return Fu(),null})):(e.callbackNode=null,e.callbackPriority=0),Yo=!1,n=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||n){n=J.T,J.T=null,o=N.p,N.p=2,h=st,st|=4;try{ly(e,i,r)}finally{st=h,N.p=o,J.T=n}}Ct=1,Yo?ia=Yy(m,e.containerInfo,ra,Yu,Ku,vy,qu,Fu,py):(Yu(),Ku(),qu())}function py(e){if(Ct!==0){var i=hs.onRecoverableError;i(e,{componentStack:null})}}function vy(){Ct===3&&(Ct=0,Yp(un,hs),Ct=4)}function Yu(){if(Ct===1){Ct=0;var e=hs,i=un,r=ks,n=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||n){n=J.T,J.T=null;var o=N.p;N.p=2;var h=st;st|=4;try{el=Fo=!1,Up(i,e,r),r=id;var m=zm(e.containerInfo),x=r.focusedElem,k=r.selectionRange;if(m!==x&&x&&x.ownerDocument&&Om(x.ownerDocument.documentElement,x)){if(k!==null&&ph(x)){var U=k.start,V=k.end;if(V===void 0&&(V=U),"selectionStart"in x)x.selectionStart=U,x.selectionEnd=Math.min(V,x.value.length);else{var re=x.ownerDocument||document,L=re&&re.defaultView||window;if(L.getSelection){var F=L.getSelection(),Ce=x.textContent.length,Me=Math.min(k.start,Ce),qe=k.end===void 0?Me:Math.min(k.end,Ce);!F.extend&&Me>qe&&(m=qe,qe=Me,Me=m);var H=Rm(x,Me),M=Rm(x,qe);if(H&&M&&(F.rangeCount!==1||F.anchorNode!==H.node||F.anchorOffset!==H.offset||F.focusNode!==M.node||F.focusOffset!==M.offset)){var P=re.createRange();P.setStart(H.node,H.offset),F.removeAllRanges(),Me>qe?(F.addRange(P),F.extend(M.node,M.offset)):(P.setEnd(M.node,M.offset),F.addRange(P))}}}}for(re=[],F=x;F=F.parentNode;)F.nodeType===1&&re.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<re.length;x++){var se=re[x];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}_a=!!td,id=td=null}finally{st=h,N.p=o,J.T=n}}e.current=i,Ct=2}}function Ku(){if(Ct===2){Ct=0;var e=hs,i=un,r=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||r){r=J.T,J.T=null;var n=N.p;N.p=2;var o=st;st|=4;try{Bp(e,i.alternate,i)}finally{st=o,N.p=n,J.T=r}}Ct=3}}function qu(){if(Ct===4||Ct===3){Ct=0;var e=ia;ia=null,mi();var i=hs,r=un,n=ks,o=Wp,h=(n&335544064)===n?10262:10256;if((r.subtreeFlags&h)!==0||(r.flags&h)!==0?Ct=5:(Ct=0,un=hs=null,av(i,i.pendingLanes)),h=i.pendingLanes,h===0&&(wr=null),Fr(n),r=r.stateNode,ii&&typeof ii.onCommitFiberRoot=="function")try{ii.onCommitFiberRoot(Bs,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=J.T,h=N.p,N.p=2,J.T=null;try{for(var m=i.onRecoverableError,x=0;x<o.length;x++){var k=o[x];m(k.value,{componentStack:k.stack})}}finally{J.T=r,N.p=h}}if(o=sa,m=ra,ra=null,o!==null&&(sa=null,m===null&&(m=[]),e!==null))for(k=0;k<o.length;k++)r=(0,o[k])(m),r!==void 0&&e.finished.finally(r);(ks&3)!==0&&ic(),Es(i),h=i.pendingLanes,(n&261930)!==0&&(h&42)!==0?i===Qo?rl++:(rl=0,Qo=i):(rl=0,Qo=null),nl(0)}}function av(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,Ua(i)))}function ic(){return ia!==null&&(ia.skipTransition(),ia=null),Yu(),Ku(),qu(),Fu()}function Fu(){if(Ct!==5)return!1;var e=hs,i=Lu;Lu=0;var r=Fr(ks),n=J.T,o=N.p;try{N.p=32>r?32:r,J.T=null,r=Hu,Hu=null;var h=hs,m=ks;if(Ct=0,un=hs=null,ks=0,(st&6)!==0)throw Error(l(331));var x=st;if(st|=4,Ip(h.current),Kp(h,h.current,m,r),st=x,nl(0,!1),ii&&typeof ii.onPostCommitFiberRoot=="function")try{ii.onPostCommitFiberRoot(Bs,h)}catch{}return!0}finally{N.p=o,J.T=n,av(e,i)}}function lv(e,i,r){i=qi(r,i),i=lu(e.stateNode,i,2),e=_r(e,i,2),e!==null&&(nr(e,2),Es(e))}function ct(e,i,r){if(e.tag===3)lv(e,e,r);else for(;i!==null;){if(i.tag===3){lv(i,e,r);break}else if(i.tag===1){var n=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wr===null||!wr.has(n))){e=qi(r,e),r=sp(2),n=_r(i,r,2),n!==null&&(rp(r,n,i,e),nr(n,2),Es(n));break}}i=i.return}}function Iu(e,i,r){var n=e.pingCache;if(n===null){n=e.pingCache=new hy;var o=new Set;n.set(i,o)}else o=n.get(i),o===void 0&&(o=new Set,n.set(i,o));o.has(r)||(Ou=!0,o.add(r),e=gy.bind(null,e,i,r),i.then(e,e))}function gy(e,i,r){var n=e.pingCache;n!==null&&n.delete(i),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ft===e&&(Qe&r)===r&&((Dt===4||Dt===3&&(Qe&62914560)===Qe&&300>At()-Go)&&(st&2)===0?aa(e,0):Wo|=r,ta===Qe&&(ta=0)),Es(e)}function ov(e,i){i===0&&(i=Il()),e=Wr(e,i),e!==null&&(nr(e,i),Es(e))}function xy(e){var i=e.memoizedState,r=0;i!==null&&(r=i.retryLane),ov(e,r)}function yy(e,i){var r=0;switch(e.tag){case 31:case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(l(314))}n!==null&&n.delete(i),ov(e,r)}function by(e,i){return ir(e,i)}var oa=null,ca=null,Vu=!1,sc=!1,Xu=!1,kr=0;function Es(e){e!==ca&&e.next===null&&(ca===null?oa=ca=e:ca=ca.next=e),sc=!0,Vu||(Vu=!0,wy())}function nl(e,i){if(!Xu&&sc){Xu=!0;do for(var r=!1,n=oa;n!==null;){if(e!==0){var o=n.pendingLanes;if(o===0)var h=0;else{var m=n.suspendedLanes,x=n.pingedLanes;h=(1<<31-si(42|e)+1)-1,h&=o&~(m&~x),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(r=!0,dv(n,h))}else h=Qe,h=Kr(n,n===ft?h:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(h&3)===0||sr(n,h)||(r=!0,dv(n,h));n=n.next}while(r);Xu=!1}}function Sy(){cv()}function cv(){sc=Vu=!1;var e=0;kr!==0&&Ry()&&(e=kr);for(var i=At(),r=null,n=oa;n!==null;){var o=n.next,h=hv(n,i);h===0?(n.next=null,r===null?oa=o:r.next=o,o===null&&(ca=r)):(r=n,(e!==0||(h&3)!==0)&&(sc=!0)),n=o}Ct!==0&&Ct!==5||nl(e),kr!==0&&(kr=0)}function hv(e,i){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var m=31-si(h),x=1<<m,k=o[m];k===-1?((x&r)===0||(x&n)!==0)&&(o[m]=Fl(x,i)):k<=i&&(e.expiredLanes|=x),h&=~x}if(i=ft,r=Qe,r=Kr(e,e===i?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,r===0||e===i&&(ot===2||ot===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Hr(n),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||sr(e,r)){if(i=r&-r,i===e.callbackPriority)return i;switch(n!==null&&Hr(n),Fr(r)){case 2:case 8:r=Dn;break;case 32:r=Mi;break;case 268435456:r=Tn;break;default:r=Mi}return n=uv.bind(null,e),r=ir(r,n),e.callbackPriority=i,e.callbackNode=r,i}return n!==null&&n!==null&&Hr(n),e.callbackPriority=2,e.callbackNode=null,2}function uv(e,i){if(Ct!==0&&Ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(ic()&&e.callbackNode!==r)return null;var n=Qe;return n=Kr(e,e===ft?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:($p(e,n,i),hv(e,At()),e.callbackNode!=null&&e.callbackNode===r?uv.bind(null,e):null)}function dv(e,i){if(ic())return null;$p(e,i,!0)}function wy(){zy(function(){(st&6)!==0?ir(Ur,Sy):cv()})}function Wu(){if(kr===0){var e=en;e===0&&(e=ms,ms<<=1,(ms&261888)===0&&(ms=256)),kr=e}return kr}function fv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ql(e)}function Cy(e,i,r,n,o){if(i==="submit"&&r&&r.stateNode===o){var h=fv((o[O]||null).action),m=n.submitter;m&&(i=(i=m[O]||null)?fv(i.formAction):m.getAttribute("formAction"),i!==null&&(h=i,m=null));var x=new io("action","action",null,n,o);e.push({event:x,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(kr!==0){var k=new FormData(o,m);iu(r,{pending:!0,data:k,method:o.method,action:h},null,k)}}else typeof h=="function"&&(x.preventDefault(),k=new FormData(o,m),iu(r,{pending:!0,data:k,method:o.method,action:h},h,k))},currentTarget:o}]})}}for(var Gu=0;Gu<yh.length;Gu++){var $u=yh[Gu],ky=$u.toLowerCase(),Ey=$u[0].toUpperCase()+$u.slice(1);as(ky,"on"+Ey)}as(Um,"onAnimationEnd"),as(Pm,"onAnimationIteration"),as(Ym,"onAnimationStart"),as("dblclick","onDoubleClick"),as("focusin","onFocus"),as("focusout","onBlur"),as(Ox,"onTransitionRun"),as(zx,"onTransitionStart"),as(Lx,"onTransitionCancel"),as(Km,"onTransitionEnd"),jn("onMouseEnter",["mouseout","mouseover"]),jn("onMouseLeave",["mouseout","mouseover"]),jn("onPointerEnter",["pointerout","pointerover"]),jn("onPointerLeave",["pointerout","pointerover"]),Ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ir("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var al="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(" "),Ny=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(al));function mv(e,i){i=(i&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var h=void 0;if(i)for(var m=n.length-1;0<=m;m--){var x=n[m],k=x.instance,U=x.currentTarget;if(x=x.listener,k!==h&&o.isPropagationStopped())break e;h=x,o.currentTarget=U;try{h(o)}catch(V){no(V)}o.currentTarget=null,h=k}else for(m=0;m<n.length;m++){if(x=n[m],k=x.instance,U=x.currentTarget,x=x.listener,k!==h&&o.isPropagationStopped())break e;h=x,o.currentTarget=U;try{h(o)}catch(V){no(V)}o.currentTarget=null,h=k}}}}function Ge(e,i){var r=i[xe];r===void 0&&(r=i[xe]=new Set);var n=e+"__bubble";r.has(n)||(_v(i,e,2,!1),r.add(n))}function Zu(e,i,r){var n=0;i&&(n|=4),_v(r,e,n,i)}var rc="_reactListening"+Math.random().toString(36).slice(2);function Qu(e){if(!e[rc]){e[rc]=!0,im.forEach(function(r){r!=="selectionchange"&&(Ny.has(r)||Zu(r,!1,e),Zu(r,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[rc]||(i[rc]=!0,Zu("selectionchange",!1,i))}}function _v(e,i,r,n){switch(rg(i)){case 2:var o=xb;break;case 8:o=yb;break;default:o=gd}r=o.bind(null,i,r,e),o=void 0,!ah||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(i,r,{capture:!0,passive:o}):e.addEventListener(i,r,!0):o!==void 0?e.addEventListener(i,r,{passive:o}):e.addEventListener(i,r,!1)}function Ju(e,i,r,n,o){var h=n;if((i&1)===0&&(i&2)===0&&n!==null)e:for(;;){if(n===null)return;var m=n.tag;if(m===3||m===4){var x=n.stateNode.containerInfo;if(x===o)break;if(m===4)for(m=n.return;m!==null;){var k=m.tag;if((k===3||k===4)&&m.stateNode.containerInfo===o)return;m=m.return}for(;x!==null;){if(m=Bt(x),m===null)return;if(k=m.tag,k===5||k===6||k===26||k===27){n=h=m;continue e}x=x.parentNode}}n=n.return}_m(function(){var U=h,V=rh(r),re=[];e:{var L=qm.get(e);if(L!==void 0){var F=io,Ce=e;switch(e){case"keypress":if(eo(r)===0)break e;case"keydown":case"keyup":F=ux;break;case"focusin":Ce="focus",F=hh;break;case"focusout":Ce="blur",F=hh;break;case"beforeblur":case"afterblur":F=hh;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=gm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=J1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=px;break;case Um:case Pm:case Ym:F=ix;break;case Km:F=gx;break;case"scroll":case"scrollend":F=Z1;break;case"wheel":F=yx;break;case"copy":case"cut":case"paste":F=rx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=ym;break;case"submit":F=mx;break;case"toggle":case"beforetoggle":F=Sx}var Me=(i&4)!==0,qe=!Me&&(e==="scroll"||e==="scrollend"),H=Me?L!==null?L+"Capture":null:L;Me=[];for(var M=U,P;M!==null;){var se=M;if(P=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||P===null||H===null||(se=Ma(M,H),se!=null&&Me.push(ll(M,se,P))),qe)break;M=M.return}0<Me.length&&(L=new F(L,Ce,null,r,V),re.push({event:L,listeners:Me}))}}if((i&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",F&&r!==sh&&(Ce=r.relatedTarget||r.fromElement)&&(Bt(Ce)||Ce[K]))break e;(L||F)&&(Ce=V.window===V?V:(F=V.ownerDocument)?F.defaultView||F.parentWindow:window,L?(F=r.relatedTarget||r.toElement,L=U,F=F?Bt(F):null,F!==null&&(qe=d(F),Me=F.tag,F!==qe||Me!==5&&Me!==27&&Me!==6)&&(F=null)):(L=null,F=U),L!==F&&(Me=gm,se="onMouseLeave",H="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(Me=ym,se="onPointerLeave",H="onPointerEnter",M="pointer"),qe=L==null?Ce:ns(L),P=F==null?Ce:ns(F),Ce=new Me(se,M+"leave",L,r,V),Ce.target=qe,Ce.relatedTarget=P,se=null,Bt(V)===U&&(Me=new Me(H,M+"enter",F,r,V),Me.target=P,Me.relatedTarget=qe,se=Me),qe=se,Me=L&&F?ve(L,F,My):null,L!==null&&pv(re,Ce,L,Me,!1),F!==null&&qe!==null&&pv(re,qe,F,Me,!0)))}e:{if(L=U?ns(U):window,F=L.nodeName&&L.nodeName.toLowerCase(),F==="select"||F==="input"&&L.type==="file")var Ne=Mm;else if(Em(L))if(Dm)Ne=Ax;else{Ne=Tx;var Je=Dx}else F=L.nodeName,!F||F.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?U&&ih(U.elementType)&&(Ne=Mm):Ne=jx;if(Ne&&(Ne=Ne(e,U))){Nm(re,Ne,r,V);break e}Je&&Je(e,L,U)}switch(Je=U?ns(U):window,e){case"focusin":(Em(Je)||Je.contentEditable==="true")&&(Ln=Je,vh=U,za=null);break;case"focusout":za=vh=Ln=null;break;case"mousedown":gh=!0;break;case"contextmenu":case"mouseup":case"dragend":gh=!1,Lm(re,r,V);break;case"selectionchange":if(Rx)break;case"keydown":case"keyup":Lm(re,r,V)}var Re;if(dh)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else zn?Cm(e,r)&&(Le="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Le="onCompositionStart");Le&&(bm&&r.locale!=="ko"&&(zn||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&zn&&(Re=pm()):(ar=V,lh="value"in ar?ar.value:ar.textContent,zn=!0)),Je=nc(U,Le),0<Je.length&&(Le=new xm(Le,e,null,r,V),re.push({event:Le,listeners:Je}),Re?Le.data=Re:(Re=km(r),Re!==null&&(Le.data=Re)))),(Re=Cx?kx(e,r):Ex(e,r))&&(Le=nc(U,"onBeforeInput"),0<Le.length&&(Je=new xm("onBeforeInput","beforeinput",null,r,V),re.push({event:Je,listeners:Le}),Je.data=Re)),Cy(re,e,U,r,V)}mv(re,i)})}function ll(e,i,r){return{instance:e,listener:i,currentTarget:r}}function nc(e,i){for(var r=i+"Capture",n=[];e!==null;){var o=e,h=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||h===null||(o=Ma(e,r),o!=null&&n.unshift(ll(e,o,h)),o=Ma(e,i),o!=null&&n.push(ll(e,o,h))),e.tag===3)return n;e=e.return}return[]}function My(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function pv(e,i,r,n,o){for(var h=i._reactName,m=[];r!==null&&r!==n;){var x=r,k=x.alternate,U=x.stateNode;if(x=x.tag,k!==null&&k===n)break;x!==5&&x!==26&&x!==27||U===null||(k=U,o?(U=Ma(r,h),U!=null&&m.unshift(ll(r,U,k))):o||(U=Ma(r,h),U!=null&&m.push(ll(r,U,k)))),r=r.return}m.length!==0&&e.push({event:i,listeners:m})}var Dy=/\r\n?/g,Ty=/\u0000|\uFFFD/g;function vv(e){return(typeof e=="string"?e:""+e).replace(Dy,`
|
|
49
|
-
`).replace(Ty,"")}function gv(e,i){return i=vv(i),vv(e)===i}function ht(e,i,r,n,o,h){switch(r){case"children":if(typeof n=="string")i==="body"||i==="textarea"&&n===""||Bn(e,n);else if(typeof n=="number"||typeof n=="bigint")i!=="body"&&Bn(e,""+n);else return;break;case"className":Zl(e,"class",n);break;case"tabIndex":Zl(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Zl(e,r,n);break;case"style":fm(e,n,h);return;case"data":if(i!=="object"){Zl(e,"data",n);break}case"src":case"href":if(n===""&&(i!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=Ql(n),e.setAttribute(r,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(r==="formAction"?(i!=="input"&&ht(e,i,"name",o.name,o,null),ht(e,i,"formEncType",o.formEncType,o,null),ht(e,i,"formMethod",o.formMethod,o,null),ht(e,i,"formTarget",o.formTarget,o,null)):(ht(e,i,"encType",o.encType,o,null),ht(e,i,"method",o.method,o,null),ht(e,i,"target",o.target,o,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=Ql(n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=ps);return;case"onScroll":n!=null&&Ge("scroll",e);return;case"onScrollEnd":n!=null&&Ge("scrollend",e);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(l(61));if(r=n.__html,r!=null){if(o.children!=null)throw Error(l(60));(h!=null?h.__html:void 0)!==r&&(e.innerHTML=r)}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=Ql(n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":n===!0?e.setAttribute(r,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":Ge("beforetoggle",e),Ge("toggle",e),$l(e,"popover",n);break;case"xlinkActuate":zs(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":zs(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":zs(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":zs(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":zs(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":zs(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":zs(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":zs(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":zs(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":$l(e,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")r=G1.get(r)||r,$l(e,r,n);else return}it=!0}function ed(e,i,r,n,o,h){switch(r){case"style":fm(e,n,h);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(l(61));if(r=n.__html,r!=null){if(o.children!=null)throw Error(l(60));(h!=null?h.__html:void 0)!==r&&(e.innerHTML=r)}}break;case"children":if(typeof n=="string")Bn(e,n);else if(typeof n=="number"||typeof n=="bigint")Bn(e,""+n);else return;break;case"onScroll":n!=null&&Ge("scroll",e);return;case"onScrollEnd":n!=null&&Ge("scrollend",e);return;case"onClick":n!=null&&(e.onclick=ps);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!sm.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(o=r.endsWith("Capture"),h=r.slice(2,o?r.length-7:void 0),i=e[O]||null,i=i!=null?i[r]:null,typeof i=="function"&&e.removeEventListener(h,i,o),typeof n=="function")){typeof i!="function"&&i!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(h,n,o);break e}it=!0,r in e?e[r]=n:n===!0?e.setAttribute(r,""):$l(e,r,n)}return}it=!0}function oi(e,i,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var n=!1,o=!1,h;for(h in r)if(r.hasOwnProperty(h)){var m=r[h];if(m!=null)switch(h){case"src":n=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:ht(e,i,h,m,r,null)}}o&&ht(e,i,"srcSet",r.srcSet,r,null),n&&ht(e,i,"src",r.src,r,null);return;case"input":Ge("invalid",e);var x=h=m=o=null,k=null,U=null;for(n in r)if(r.hasOwnProperty(n)){var V=r[n];if(V!=null)switch(n){case"name":o=V;break;case"type":m=V;break;case"checked":k=V;break;case"defaultChecked":U=V;break;case"value":h=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(l(137,i));break;default:ht(e,i,n,V,r,null)}}cm(e,h,x,k,U,m,o,!1);return;case"select":Ge("invalid",e),n=m=h=null;for(o in r)if(r.hasOwnProperty(o)&&(x=r[o],x!=null))switch(o){case"value":h=x;break;case"defaultValue":m=x;break;case"multiple":n=x;default:ht(e,i,o,x,r,null)}i=h,r=m,e.multiple=!!n,i!=null?An(e,!!n,i,!1):r!=null&&An(e,!!n,r,!0);return;case"textarea":Ge("invalid",e),h=o=n=null;for(m in r)if(r.hasOwnProperty(m)&&(x=r[m],x!=null))switch(m){case"value":n=x;break;case"defaultValue":o=x;break;case"children":h=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(l(91));break;default:ht(e,i,m,x,r,null)}um(e,n,o,h);return;case"option":for(k in r)if(r.hasOwnProperty(k)&&(n=r[k],n!=null))switch(k){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ht(e,i,k,n,r,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(n=0;n<al.length;n++)Ge(al[n],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in r)if(r.hasOwnProperty(U)&&(n=r[U],n!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:ht(e,i,U,n,r,null)}return;default:if(ih(i)){for(V in r)r.hasOwnProperty(V)&&(n=r[V],n!==void 0&&ed(e,i,V,n,r,void 0));return}}for(x in r)r.hasOwnProperty(x)&&(n=r[x],n!=null&&ht(e,i,x,n,r,null))}var jy={};function Ay(e,i,r,n){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,h=null,m=null,x=null,k=null,U=null,V=null;for(F in r){var re=r[F];if(r.hasOwnProperty(F)&&re!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":k=re;default:n.hasOwnProperty(F)||ht(e,i,F,null,n,re)}}for(var L in n){var F=n[L];if(re=r[L],n.hasOwnProperty(L)&&(F!=null||re!=null))switch(L){case"type":F!==re&&(it=!0),h=F;break;case"name":F!==re&&(it=!0),o=F;break;case"checked":F!==re&&(it=!0),U=F;break;case"defaultChecked":F!==re&&(it=!0),V=F;break;case"value":F!==re&&(it=!0),m=F;break;case"defaultValue":F!==re&&(it=!0),x=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(l(137,i));break;default:F!==re&&ht(e,i,L,F,n,re)}}eh(e,m,x,k,U,V,h,o);return;case"select":F=m=x=L=null;for(h in r)if(k=r[h],r.hasOwnProperty(h)&&k!=null)switch(h){case"value":break;case"multiple":F=k;default:n.hasOwnProperty(h)||ht(e,i,h,null,n,k)}for(o in n)if(h=n[o],k=r[o],n.hasOwnProperty(o)&&(h!=null||k!=null))switch(o){case"value":h!==k&&(it=!0),L=h;break;case"defaultValue":h!==k&&(it=!0),x=h;break;case"multiple":h!==k&&(it=!0),m=h;default:h!==k&&ht(e,i,o,h,n,k)}i=x,r=m,n=F,L!=null?An(e,!!r,L,!1):!!n!=!!r&&(i!=null?An(e,!!r,i,!0):An(e,!!r,r?[]:"",!1));return;case"textarea":F=L=null;for(x in r)if(o=r[x],r.hasOwnProperty(x)&&o!=null&&!n.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:ht(e,i,x,null,n,o)}for(m in n)if(o=n[m],h=r[m],n.hasOwnProperty(m)&&(o!=null||h!=null))switch(m){case"value":o!==h&&(it=!0),L=o;break;case"defaultValue":o!==h&&(it=!0),F=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==h&&ht(e,i,m,o,n,h)}hm(e,L,F);return;case"option":for(var Ce in r)if(L=r[Ce],r.hasOwnProperty(Ce)&&L!=null&&!n.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:ht(e,i,Ce,null,n,L)}for(k in n)if(L=n[k],F=r[k],n.hasOwnProperty(k)&&L!==F&&(L!=null||F!=null))switch(k){case"selected":L!==F&&(it=!0),e.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:ht(e,i,k,L,n,F)}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 Me in r)L=r[Me],r.hasOwnProperty(Me)&&L!=null&&!n.hasOwnProperty(Me)&&ht(e,i,Me,null,n,L);for(U in n)if(L=n[U],F=r[U],n.hasOwnProperty(U)&&L!==F&&(L!=null||F!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(l(137,i));break;default:ht(e,i,U,L,n,F)}return;default:if(ih(i)){for(var qe in r)L=r[qe],r.hasOwnProperty(qe)&&L!==void 0&&!n.hasOwnProperty(qe)&&ed(e,i,qe,void 0,n,L);for(V in n)L=n[V],F=r[V],!n.hasOwnProperty(V)||L===F||L===void 0&&F===void 0||ed(e,i,V,L,n,F);return}}for(var H in r)L=r[H],r.hasOwnProperty(H)&&L!=null&&!n.hasOwnProperty(H)&&ht(e,i,H,null,n,L);for(re in n)L=n[re],F=r[re],!n.hasOwnProperty(re)||L===F||L==null&&F==null||ht(e,i,re,L,n,F)}function xv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function By(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,r=performance.getEntriesByType("resource"),n=0;n<r.length;n++){var o=r[n],h=o.transferSize,m=o.initiatorType,x=o.duration;if(h&&x&&xv(m)){for(m=0,x=o.responseEnd,n+=1;n<r.length;n++){var k=r[n],U=k.startTime;if(U>x)break;var V=k.transferSize,re=k.initiatorType;V&&xv(re)&&(k=k.responseEnd,m+=V*(k<x?1:(x-U)/(k-U)))}if(--n,i+=8*(h+m)/(o.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var td=null,id=null;function ol(e){return e.nodeType===9?e:e.ownerDocument}function yv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bv(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function Sv(e,i,r,n){return r=ol(r).createElement(e),r[S]=n,r[O]=i,oi(r,e,i),Xt(r),r}function sd(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var rd=null;function Ry(){var e=window.event;return e&&e.type==="popstate"?e===rd?!1:(rd=e,!0):(rd=null,!1)}var nd=typeof setTimeout=="function"?setTimeout:void 0,Oy=typeof clearTimeout=="function"?clearTimeout:void 0,wv=typeof Promise=="function"?Promise:void 0,Cv=typeof requestAnimationFrame=="function"?requestAnimationFrame:nd,zy=typeof queueMicrotask=="function"?queueMicrotask:typeof wv<"u"?function(e){return wv.resolve(null).then(e).catch(Ly)}:nd;function Ly(e){setTimeout(function(){throw e})}function Er(e){return e==="head"}function kv(e,i){var r=i,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"||r==="/&"){if(n===0){e.removeChild(o),pa(i);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")fd(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,fd(r);for(var h=r.firstChild;h;){var m=h.nextSibling,x=h.nodeName;h[je]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&h.rel.toLowerCase()==="stylesheet"||r.removeChild(h),h=m}}else r==="body"&&fd(e.ownerDocument.body);r=o}while(r);pa(i)}function Ev(e,i){var r=e;e=0;do{var n=r.nextSibling;if(r.nodeType===1?i?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(i?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=n}while(r)}function Nv(e,i,r){if(i=CSS.escape(i)!==i?"r-"+btoa(i).replace(/=/g,""):i,e.style.viewTransitionName=i,r!=null&&(e.style.viewTransitionClass=r),r=getComputedStyle(e),r.display==="inline"){if(i=e.getClientRects(),i.length===1)var n=1;else for(var o=n=0;o<i.length;o++){var h=i[o];0<h.width&&0<h.height&&n++}n===1&&(e=e.style,e.display=i.length===1?"inline-block":"block",e.marginTop="-"+r.paddingTop,e.marginBottom="-"+r.paddingBottom)}}function Mv(e,i){e=e.style,i=i.style;var r=i!=null?i.hasOwnProperty("viewTransitionName")?i.viewTransitionName:i.hasOwnProperty("view-transition-name")?i["view-transition-name"]:null:null;e.viewTransitionName=r==null||typeof r=="boolean"?"":(""+r).trim(),r=i!=null?i.hasOwnProperty("viewTransitionClass")?i.viewTransitionClass:i.hasOwnProperty("view-transition-class")?i["view-transition-class"]:null:null,e.viewTransitionClass=r==null||typeof r=="boolean"?"":(""+r).trim(),e.display==="inline-block"&&(i==null?e.display=e.margin="":(r=i.display,e.display=r==null||typeof r=="boolean"?"":r,r=i.margin,r!=null?e.margin=r:(r=i.hasOwnProperty("marginTop")?i.marginTop:i["margin-top"],e.marginTop=r==null||typeof r=="boolean"?"":r,i=i.hasOwnProperty("marginBottom")?i.marginBottom:i["margin-bottom"],e.marginBottom=i==null||typeof i=="boolean"?"":i)))}function Hy(e,i,r){return r=r.ownerDocument.defaultView,{rect:e,abs:i.position==="absolute"||i.position==="fixed",clip:i.clipPath!=="none"||i.overflow!=="visible"||i.filter!=="none"||i.mask!=="none"||i.mask!=="none"||i.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=r.innerHeight&&e.left<=r.innerWidth}}function ad(e){var i=e.getBoundingClientRect(),r=getComputedStyle(e);return Hy(i,r,e)}function Uy(e){return e.documentElement.clientHeight}function Py(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Yy(e,i,r,n,o,h,m,x,k){var U=i.nodeType===9?i:i.ownerDocument;try{var V=U.startViewTransition({update:function(){var L=U.defaultView,F=L.navigation&&L.navigation.transition,Ce=U.fonts.status;n();var Me=[];if(Ce==="loaded"&&(Uy(U),U.fonts.status==="loading"&&Me.push(U.fonts.ready)),Ce=Me.length,e!==null)for(var qe=e.suspenseyImages,H=0,M=0;M<qe.length;M++){var P=qe[M];if(!P.complete){var se=P.getBoundingClientRect();if(0<se.bottom&&0<se.right&&se.top<L.innerHeight&&se.left<L.innerWidth){if(H+=Gv(P),H>oc){Me.length=Ce;break}P=new Promise(Py.bind(P)),Me.push(P)}}}if(0<Me.length)return L=Promise.race([Promise.all(Me),new Promise(function(Ne){return setTimeout(Ne,500)})]).then(o,o),(F?Promise.allSettled([F.finished,L]):L).then(h,h);if(o(),F)return F.finished.then(h,h);h()},types:r});U.__reactViewTransition=V;var re=[];return V.ready.then(function(){for(var L=U.documentElement.getAnimations({subtree:!0}),F=0;F<L.length;F++){var Ce=L[F],Me=Ce.effect,qe=Me.pseudoElement;if(qe!=null&&qe.startsWith("::view-transition")){re.push(Ce),Ce=Me.getKeyframes();for(var H=qe=void 0,M=!0,P=0;P<Ce.length;P++){var se=Ce[P],Ne=se.width;if(qe===void 0)qe=Ne;else if(qe!==Ne){M=!1;break}if(Ne=se.height,H===void 0)H=Ne;else if(H!==Ne){M=!1;break}delete se.width,delete se.height,se.transform==="none"&&delete se.transform}M&&qe!==void 0&&H!==void 0&&(Me.setKeyframes(Ce),M=getComputedStyle(Me.target,Me.pseudoElement),M.width!==qe||M.height!==H)&&(M=Ce[0],M.width=qe,M.height=H,M=Ce[Ce.length-1],M.width=qe,M.height=H,Me.setKeyframes(Ce))}}m()},function(L){U.__reactViewTransition===V&&(U.__reactViewTransition=null);try{if(typeof L=="object"&&L!==null)switch(L.name){case"InvalidStateError":(L.message==="View transition was skipped because document visibility state is hidden."||L.message==="Skipping view transition because document visibility state has become hidden."||L.message==="Skipping view transition because viewport size changed."||L.message==="Transition was aborted because of invalid state")&&(L=null)}L!==null&&k(L)}finally{n(),o(),m()}}),V.finished.finally(function(){for(var L=0;L<re.length;L++)re[L].cancel();U.__reactViewTransition===V&&(U.__reactViewTransition=null),x()}),V}catch{return n(),o(),m(),null}}function dn(e,i){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+i+")"}dn.prototype.animate=function(e,i){return i=typeof i=="number"?{duration:i}:ae({},i),i.pseudoElement=this._selector,this._scope.animate(e,i)},dn.prototype.getAnimations=function(){for(var e=this._scope,i=this._selector,r=e.getAnimations({subtree:!0}),n=[],o=0;o<r.length;o++){var h=r[o].effect;h!==null&&h.target===e&&h.pseudoElement===i&&n.push(r[o])}return n},dn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Dv(e){return{name:e,group:new dn("group",e),imagePair:new dn("image-pair",e),old:new dn("old",e),new:new dn("new",e)}}function zi(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zi.prototype.addEventListener=function(e,i,r){var n=null,o=null;if(!(r!=null&&typeof r!="boolean"&&(n=r.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var h=this._eventListeners;if(jv(h,e,i,r)===-1){var m=this,x=i;r!=null&&typeof r!="boolean"&&r.once===!0&&(x=function(k){m.removeEventListener(e,i,r),typeof i=="function"?i.call(this,k):i.handleEvent(k)}),n!==null&&(o=m.removeEventListener.bind(m,e,i,r),n.addEventListener("abort",o,{once:!0}),o=n.removeEventListener.bind(n,"abort",o)),n=ha(r),h.push({type:e,listener:i,optionsOrUseCapture:r,attachedListener:x,cleanup:o}),g(this._fragmentFiber.child,!1,Ky,e,x,n)}this._eventListeners=h}};function Ky(e,i,r,n){return Z(e).addEventListener(i,r,n),!1}zi.prototype.removeEventListener=function(e,i,r){var n=this._eventListeners;if(n!==null&&(i=jv(n,e,i,r),i!==-1)){var o=n[i];r=o.attachedListener;var h=o.cleanup;o=ha(o.optionsOrUseCapture),g(this._fragmentFiber.child,!1,qy,e,r,o),n.splice(i,1),h!==null&&h()}};function qy(e,i,r,n){return Z(e).removeEventListener(i,r,n),!1}function ha(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Tv(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function jv(e,i,r,n){if(e.length===0)return-1;n=Tv(n);for(var o=0;o<e.length;o++){var h=e[o];if(h.type===i&&h.listener===r&&Tv(h.optionsOrUseCapture)===n)return o}return-1}zi.prototype.dispatchEvent=function(e){var i=y(this._fragmentFiber);if(i===null)return!0;i=Z(i);var r=this._eventListeners;if(r!==null&&0<r.length||!e.bubbles){var n=i.nodeType===9?i.createComment(""):document.createTextNode("");if(r)for(var o=0;o<r.length;o++){var h=r[o];n.addEventListener(h.type,h.attachedListener,ha(h.optionsOrUseCapture))}if(i.appendChild(n),e=n.dispatchEvent(e),r)for(o=0;o<r.length;o++)h=r[o],n.removeEventListener(h.type,h.attachedListener,ha(h.optionsOrUseCapture));return i.removeChild(n),e}return i.dispatchEvent(e)},zi.prototype.focus=function(e){g(this._fragmentFiber.child,!0,Av,e,void 0,void 0)};function Av(e,i){return e.tag===6?!1:(e=Z(e),tb(e,i))}zi.prototype.focusLast=function(e){var i=[];g(this._fragmentFiber.child,!0,ld,i,void 0,void 0);for(var r=i.length-1;0<=r&&!Av(i[r],e);r--);};function ld(e,i){return i.push(e),!1}zi.prototype.blur=function(){var e=y(this._fragmentFiber);e!==null&&(e=Z(e),e=ol(e).activeElement,e!==null&&g(this._fragmentFiber.child,!1,Fy,e,void 0,void 0))};function Fy(e,i){return e.tag===6?!1:(e=Z(e),e===i||e.contains(i)?(i.blur(),!0):!1)}zi.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),g(this._fragmentFiber.child,!1,Iy,e,void 0,void 0)};function Iy(e,i){return e.tag===6||(e=Z(e),i.observe(e)),!1}zi.prototype.unobserveUsing=function(e){var i=this._observers;if(i!==null&&i.has(e)){i.delete(e),g(this._fragmentFiber.child,!1,Vy,e,void 0,void 0);for(var r=i=0;r<us.length;r++){var n=us[r];n.fragmentInstance===this&&n.observer===e?e.unobserve(n.instance):us[i++]=n}us.length=i}};function Vy(e,i){return e.tag===6||(e=Z(e),i.unobserve(e)),!1}var us=[],od=!1;function Xy(e,i,r){us.push({fragmentInstance:e,observer:i,instance:r}),od||(od=!0,ib(function(){od=!1;var n=us;us=[];for(var o=0;o<n.length;o++){var h=n[o];h.observer.unobserve(h.instance)}}))}zi.prototype.getClientRects=function(){var e=[];return g(this._fragmentFiber.child,!1,Wy,e,void 0,void 0),e};function Wy(e,i){if(e.tag===6){e=e.stateNode;var r=e.ownerDocument.createRange();r.selectNodeContents(e),i.push.apply(i,r.getClientRects())}else e=Z(e),i.push.apply(i,e.getClientRects());return!1}zi.prototype.getRootNode=function(e){var i=y(this._fragmentFiber);return i===null?this:Z(i).getRootNode(e)},zi.prototype.compareDocumentPosition=function(e){var i=y(this._fragmentFiber);if(i===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var r=[];g(this._fragmentFiber.child,!1,ld,r,void 0,void 0);var n=Z(i);if(r.length===0){if(r=n,T(this._fragmentFiber)){e:{for(i=this._fragmentFiber.return;i!==null;){if(i.tag===4){i=i.stateNode.containerInfo;break e}if(i.tag===3||i.tag===5||i.tag===27)break;i=i.return}i=null}i!=null&&(r=i)}i=this._fragmentFiber;var o=n=r.compareDocumentPosition(e);return r===e?o=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(r=R(i)[1],r===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=Z(r).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}i=Z(r[0]),o=Z(r[r.length-1]);var h=T(this._fragmentFiber)?i.parentElement:n;if(h==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=h.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY,h=h.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var m=i.compareDocumentPosition(e),x=o.compareDocumentPosition(e),k=m&Node.DOCUMENT_POSITION_CONTAINED_BY||x&Node.DOCUMENT_POSITION_CONTAINED_BY;return x=n&&h&&m&Node.DOCUMENT_POSITION_FOLLOWING&&x&Node.DOCUMENT_POSITION_PRECEDING,i=n&&i===e||h&&o===e||k||x?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&i===e||!h&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:m,i&Node.DOCUMENT_POSITION_DISCONNECTED||i&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Gy(i,this._fragmentFiber,r[0],r[r.length-1],e)?i:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Gy(e,i,r,n,o){var h=Bt(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(r=!!h)e:{for(;h!==null;){if(h.tag===7&&(h===i||h.alternate===i)){r=!0;break e}h=h.return}r=!1}return r}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(h===null)return h=o.ownerDocument,o===h||o===h.documentElement||o===h.body;e:{for(h=i,i=y(i);h!==null;){if(!(h.tag!==5&&h.tag!==3&&h.tag!==27||h!==i&&h.alternate!==i)){h=!0;break e}h=h.return}h=!1}return h}return e&Node.DOCUMENT_POSITION_PRECEDING?((i=!!h)&&!(i=h===r)&&(i=ve(r,h,me),i===null?i=!1:(g(i,!0,be,h,r),h=ue,ue=null,i=h!==null)),i):e&Node.DOCUMENT_POSITION_FOLLOWING?((i=!!h)&&!(i=h===n)&&(i=ve(n,h,me),i===null?i=!1:(g(i,!0,ee,h,n),h=ue,pe=ue=null,i=h!==null)),i):!1}function Bv(e,i){var r=e.ownerDocument.createRange();r.selectNodeContents(e),e=r.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,i?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}zi.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(l(566));var i=[];g(this._fragmentFiber.child,!1,ld,i,void 0,void 0);var r=e!==!1;if(i.length===0){var n=R(this._fragmentFiber);if(n=r?n[1]||n[0]||y(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){e=Z(n),Bv(e,r);return}if(n=Z(n),n.nodeType!==9){if(n.nodeType===11){r="host"in n?n.host:null,r!==null&&r.scrollIntoView(e);return}n.scrollIntoView(e)}}for(n=r?i.length-1:0;n!==(r?-1:i.length);){var o=i[n];o.tag===6?(o=Z(o),Bv(o,r)):Z(o).scrollIntoView(e),n+=r?-1:1}};function $y(e,i){return e=Z(e),Rv(e,i),!1}function Rv(e,i){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(i)}function Ov(e,i){var r=i._eventListeners;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];e.addEventListener(o.type,o.attachedListener,ha(o.optionsOrUseCapture))}e.nodeType!==3&&(r=i._observers,r!==null&&r.forEach(function(h){for(var m=0,x=0;x<us.length;x++){var k=us[x];(k.fragmentInstance!==i||k.observer!==h||k.instance!==e)&&(us[m++]=k)}us.length=m,h.observe(e)}),Rv(e,i))}function Zy(e,i){var r=i._eventListeners;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];e.removeEventListener(o.type,o.attachedListener,ha(o.optionsOrUseCapture))}e.nodeType!==3&&(r=i._observers,r!==null&&r.forEach(function(h){typeof h.rootMargin=="string"?Xy(i,h,e):h.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(i))}function cd(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var r=i;switch(i=i.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":cd(r),nt(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Qy(e,i,r,n){for(;e.nodeType===1;){var o=r;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[je])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var h=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Wi(e.nextSibling),e===null)break}return null}function Jy(e,i,r){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Wi(e.nextSibling),e===null))return null;return e}function zv(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Wi(e.nextSibling),e===null))return null;return e}function hd(e){return e.data==="$?"||e.data==="$~"}function ud(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function eb(e,i){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||r.readyState!=="loading")i();else{var n=function(){i(),r.removeEventListener("DOMContentLoaded",n)};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Wi(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var dd=null;function Lv(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(i===0)return Wi(e.nextSibling);i--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||i++}e=e.nextSibling}return null}function Hv(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(i===0)return e;i--}else r!=="/$"&&r!=="/&"||i++}e=e.previousSibling}return null}function tb(e,i){function r(){n=!0}if(e.ownerDocument.activeElement===e)return!0;var n=!1;try{e.ownerDocument.addEventListener("focus",r,!0),(e.focus||HTMLElement.prototype.focus).call(e,i)}finally{e.ownerDocument.removeEventListener("focus",r,!0)}return n}function ib(e){Cv(function(){Cv(function(i){return e(i)})})}function Uv(e,i,r){switch(i=ol(r),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Pv(e,i,r){for(var n in r){var o=r[n];r.hasOwnProperty(n)&&o!=null&&ht(e,i,n,null,jy,o)}r.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===ps&&(e.onclick=null),nt(e)}function fd(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);nt(e)}var Gi=new Map,Yv=new Set;function cl(e){if(typeof e.getRootNode=="function"){var i=e.getRootNode();if(i.nodeType===9||i.nodeType===11)return i}return e.nodeType===9?e:e.ownerDocument}var Gs=N.d;N.d={f:sb,r:rb,D:nb,C:ab,L:lb,m:ob,X:hb,S:cb,M:ub};function sb(){var e=Gs.f(),i=Jo();return e||i}function rb(e){var i=Rs(e);i!==null&&i.tag===5&&i.type==="form"?q_(i):Gs.r(e)}var ua=typeof document>"u"?null:document;function Kv(e,i,r){var n=ua;if(n&&typeof i=="string"&&i){var o=Yi(i);o='link[rel="'+e+'"][href="'+o+'"]',typeof r=="string"&&(o+='[crossorigin="'+r+'"]'),Yv.has(o)||(Yv.add(o),e={rel:e,crossOrigin:r,href:i},n.querySelector(o)===null&&(i=n.createElement("link"),oi(i,"link",e),Xt(i),n.head.appendChild(i)))}}function nb(e){Gs.D(e),Kv("dns-prefetch",e,null)}function ab(e,i){Gs.C(e,i),Kv("preconnect",e,i)}function lb(e,i,r){Gs.L(e,i,r);var n=ua;if(n&&e&&i){var o='link[rel="preload"][as="'+Yi(i)+'"]';i==="image"&&r&&r.imageSrcSet?(o+='[imagesrcset="'+Yi(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(o+='[imagesizes="'+Yi(r.imageSizes)+'"]')):o+='[href="'+Yi(e)+'"]';var h=o;switch(i){case"style":h=da(e);break;case"script":h=fa(e)}if(!(Gi.has(h)||(e=ae({rel:"preload",href:i==="image"&&r&&r.imageSrcSet?void 0:e,as:i},r),Gi.set(h,e),n.querySelector(o)!==null||i==="style"&&n.querySelector(hl(h))||i==="script"&&n.querySelector(ul(h))))){var m=n.createElement("link");oi(m,"link",e),i==="style"&&(m[Ue]=!0,m.onload=m.onerror=function(){tm(m)}),Xt(m),n.head.appendChild(m)}}}function ob(e,i){Gs.m(e,i);var r=ua;if(r&&e){var n=i&&typeof i.as=="string"?i.as:"script",o='link[rel="modulepreload"][as="'+Yi(n)+'"][href="'+Yi(e)+'"]',h=o;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=fa(e)}if(!Gi.has(h)&&(e=ae({rel:"modulepreload",href:e},i),Gi.set(h,e),r.querySelector(o)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(ul(h)))return}n=r.createElement("link"),oi(n,"link",e),Xt(n),r.head.appendChild(n)}}}function cb(e,i,r){Gs.S(e,i,r);var n=ua;if(n&&e){var o=Os(n).hoistableStyles,h=da(e);i=i||"default";var m=o.get(h);if(!m){var x={loading:0,preload:null};if(m=n.querySelector(hl(h)))x.loading=5;else{e=ae({rel:"stylesheet",href:e,"data-precedence":i},r),(r=Gi.get(h))&&md(e,r);var k=m=n.createElement("link");Xt(k),oi(k,"link",e),k._p=new Promise(function(U,V){k.onload=U,k.onerror=V}),k.addEventListener("load",function(){x.loading|=1}),k.addEventListener("error",function(){x.loading|=2}),x.loading|=4,ac(m,i,n)}m={type:"stylesheet",instance:m,count:1,state:x},o.set(h,m)}}}function hb(e,i){Gs.X(e,i);var r=ua;if(r&&e){var n=Os(r).hoistableScripts,o=fa(e),h=n.get(o);h||(h=r.querySelector(ul(o)),h||(e=ae({src:e,async:!0},i),(i=Gi.get(o))&&_d(e,i),h=r.createElement("script"),Xt(h),oi(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},n.set(o,h))}}function ub(e,i){Gs.M(e,i);var r=ua;if(r&&e){var n=Os(r).hoistableScripts,o=fa(e),h=n.get(o);h||(h=r.querySelector(ul(o)),h||(e=ae({src:e,async:!0,type:"module"},i),(i=Gi.get(o))&&_d(e,i),h=r.createElement("script"),Xt(h),oi(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},n.set(o,h))}}function qv(e,i,r,n){var o=(o=_t.current)?cl(o):null;if(!o)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(r=da(r.href),i=Os(o).hoistableStyles,n=i.get(r),n||(n={type:"style",instance:null,count:0,state:null},i.set(r,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=da(r.href);var h=Os(o).hoistableStyles,m=h.get(e);if(m||(o=o.ownerDocument||o,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,m),(h=o.querySelector(hl(e)))?h._p||(m.instance=h,m.state.loading=5):(h=Gi.get(e),h||(h={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Gi.set(e,h)),db(o,e,h,m.state))),i&&n===null)throw Error(l(528,""));return m}if(i&&n!==null)throw Error(l(529,""));return null;case"script":return i=r.async,r=r.src,typeof r=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(r=fa(r),i=Os(o).hoistableScripts,n=i.get(r),n||(n={type:"script",instance:null,count:0,state:null},i.set(r,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function da(e){return'href="'+Yi(e)+'"'}function hl(e){return'link[rel="stylesheet"]['+e+"]"}function Fv(e){return ae({},e,{"data-precedence":e.precedence,precedence:null})}function db(e,i,r,n){if(i=e.querySelector('link[rel="preload"][as="style"]['+i+"]")){if(i[Ue]!==!0){n.loading=1;return}}else i=e.createElement("link"),i[Ue]=!0,i.onload=i.onerror=tm.bind(null,i),oi(i,"link",r),Xt(i),e.head.appendChild(i);n.preload=i,i.addEventListener("load",function(){return n.loading|=1}),i.addEventListener("error",function(){return n.loading|=2})}function fa(e){return'[src="'+Yi(e)+'"]'}function ul(e){return"script[async]"+e}function Iv(e,i,r){if(i.count++,i.instance===null)switch(i.type){case"style":var n=e.querySelector('style[data-href~="'+Yi(r.href)+'"]');if(n)return i.instance=n,Xt(n),n;var o=ae({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Xt(n),oi(n,"style",o),ac(n,r.precedence,e),i.instance=n;case"stylesheet":o=da(r.href);var h=e.querySelector(hl(o));if(h)return i.state.loading|=4,i.instance=h,Xt(h),h;n=Fv(r),(o=Gi.get(o))&&md(n,o),h=(e.ownerDocument||e).createElement("link"),Xt(h);var m=h;return m._p=new Promise(function(x,k){m.onload=x,m.onerror=k}),oi(h,"link",n),i.state.loading|=4,ac(h,r.precedence,e),i.instance=h;case"script":return h=fa(r.src),(o=e.querySelector(ul(h)))?(i.instance=o,Xt(o),o):(n=r,(o=Gi.get(h))&&(n=ae({},r),_d(n,o)),e=e.ownerDocument||e,o=e.createElement("script"),Xt(o),oi(o,"link",n),e.head.appendChild(o),i.instance=o);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(n=i.instance,i.state.loading|=4,ac(n,r.precedence,e));return i.instance}function ac(e,i,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=n.length?n[n.length-1]:null,h=o,m=0;m<n.length;m++){var x=n[m];if(x.dataset.precedence===i)h=x;else if(h!==o)break}h?h.parentNode.insertBefore(e,h.nextSibling):(i=r.nodeType===9?r.head:r,i.insertBefore(e,i.firstChild))}function md(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function _d(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var lc=null;function Vv(e,i,r){if(lc===null){var n=new Map,o=lc=new Map;o.set(r,n)}else o=lc,n=o.get(r),n||(n=new Map,o.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),o=0;o<r.length;o++){var h=r[o];if(!(h[je]||h[S]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var m=h.getAttribute(i)||"";m=e+m;var x=n.get(m);x?x.push(h):n.set(m,[h])}}return n}function pd(e,i,r){e=e.ownerDocument||e,e.head.insertBefore(r,i==="title"?e.querySelector("head > title"):null)}function fb(e,i,r){if(r===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return e=i.disabled,typeof i.precedence=="string"&&e==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Xv(e,i){return e==="img"&&i.src!=null&&i.src!==""&&i.onLoad==null&&i.loading!=="lazy"}function Wv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Gv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function $v(e,i){typeof i.decode=="function"&&(e.imgCount++,i.complete||(e.imgBytes+=Gv(i),e.suspenseyImages.push(i)),e=pb.bind(e),i.decode().then(e,e))}function mb(e,i,r,n){if(r.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var o=da(n.href),h=i.querySelector(hl(o));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=dl.bind(e),i.then(e,e)),r.state.loading|=4,r.instance=h,Xt(h);return}h=i.ownerDocument||i,n=Fv(n),(o=Gi.get(o))&&md(n,o),h=h.createElement("link"),Xt(h);var m=h;m._p=new Promise(function(x,k){m.onload=x,m.onerror=k}),oi(h,"link",n),r.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,i),(i=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=dl.bind(e),i.addEventListener("load",r),i.addEventListener("error",r))}}var oc=0;function _b(e,i){return e.stylesheets&&e.count===0&&hc(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&hc(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+i);0<e.imgBytes&&oc===0&&(oc=62500*By());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hc(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>oc?50:800)+i);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(o)}}:null}function Zv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)hc(e,e.stylesheets);else if(e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}}}function dl(){this.count--,Zv(this)}function pb(){this.imgCount--,Zv(this)}var cc=null;function hc(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cc=new Map,i.forEach(vb,e),cc=null,dl.call(e))}function vb(e,i){if(!(i.state.loading&4)){var r=cc.get(e);if(r)var n=r.get(null);else{r=new Map,cc.set(e,r);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<o.length;h++){var m=o[h];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(r.set(m.dataset.precedence,m),n=m)}n&&r.set(null,n)}o=i.instance,m=o.getAttribute("data-precedence"),h=r.get(m)||n,h===n&&r.set(null,o),r.set(m,o),this.count++,n=dl.bind(this),o.addEventListener("load",n),o.addEventListener("error",n),h?h.parentNode.insertBefore(o,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),i.state.loading|=4}}var ma={$$typeof:j,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function gb(e,i,r,n,o,h,m,x,k){this.tag=1,this.containerInfo=e,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=rr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rr(0),this.hiddenUpdates=rr(null),this.identifierPrefix=n,this.onUncaughtError=o,this.onCaughtError=h,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.transitionTypes=null,this.incompleteTransitions=new Map}function Qv(e,i,r,n,o,h,m,x,k,U,V,re){return e=new gb(e,i,r,m,k,U,V,re,x),i=1,h===!0&&(i|=24),h=Si(3,null,null,i),e.current=h,h.stateNode=e,i=jh(),i.refCount++,e.pooledCache=i,i.refCount++,h.memoizedState={element:n,isDehydrated:r,cache:i},Oh(h),e}function Jv(e){return e?(e=Pn,e):Pn}function eg(e,i,r,n,o,h){o=Jv(o),n.context===null?n.context=o:n.pendingContext=o,n=mr(i),n.payload={element:r},h=h===void 0?null:h,h!==null&&(n.callback=h),r=_r(e,n,i),r!==null&&(Ei(r,e,i),qa(r,e,i))}function tg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<i?r:i}}function vd(e,i){tg(e,i),(e=e.alternate)&&tg(e,i)}function ig(e){if(e.tag===13||e.tag===31){var i=Wr(e,67108864);i!==null&&Ei(i,e,67108864),vd(e,67108864)}}function sg(e){if(e.tag===13||e.tag===31){var i=Oi();i=qr(i);var r=Wr(e,i);r!==null&&Ei(r,e,i),vd(e,i)}}var _a=!0;function xb(e,i,r,n){var o=J.T;J.T=null;var h=N.p;try{N.p=2,gd(e,i,r,n)}finally{N.p=h,J.T=o}}function yb(e,i,r,n){var o=J.T;J.T=null;var h=N.p;try{N.p=8,gd(e,i,r,n)}finally{N.p=h,J.T=o}}function gd(e,i,r,n){if(_a){var o=xd(n);if(o===null)Ju(e,i,n,uc,r),ng(e,n);else if(Sb(o,e,i,r,n))n.stopPropagation();else if(ng(e,n),i&4&&-1<bb.indexOf(e)){for(;o!==null;){var h=Rs(o);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var m=_s(h.pendingLanes);if(m!==0){var x=h;for(x.pendingLanes|=2,x.entangledLanes|=2;m;){var k=1<<31-si(m);x.entanglements[1]|=k,m&=~k}Es(h),(st&6)===0&&($o=At()+500,nl(0))}}break;case 31:case 13:x=Wr(h,2),x!==null&&Ei(x,h,2),Jo(),vd(h,2)}if(h=xd(n),h===null&&Ju(e,i,n,uc,r),h===o)break;o=h}o!==null&&n.stopPropagation()}else Ju(e,i,n,null,r)}}function xd(e){return e=rh(e),yd(e)}var uc=null;function yd(e){if(uc=null,e=Bt(e),e!==null){var i=d(e);if(i===null)e=null;else{var r=i.tag;if(r===13){if(e=f(i),e!==null)return e;e=null}else if(r===31){if(e=p(i),e!==null)return e;e=null}else if(r===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return uc=e,null}function rg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Wc()){case Ur:return 2;case Dn:return 8;case Mi:case Pr:return 32;case Tn:return 268435456;default:return 32}default:return 32}}var bd=!1,Nr=null,Mr=null,Dr=null,fl=new Map,ml=new Map,Tr=[],bb="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 ng(e,i){switch(e){case"focusin":case"focusout":Nr=null;break;case"dragenter":case"dragleave":Mr=null;break;case"mouseover":case"mouseout":Dr=null;break;case"pointerover":case"pointerout":fl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ml.delete(i.pointerId)}}function _l(e,i,r,n,o,h){return e===null||e.nativeEvent!==h?(e={blockedOn:i,domEventName:r,eventSystemFlags:n,nativeEvent:h,targetContainers:[o]},i!==null&&(i=Rs(i),i!==null&&ig(i)),e):(e.eventSystemFlags|=n,i=e.targetContainers,o!==null&&i.indexOf(o)===-1&&i.push(o),e)}function Sb(e,i,r,n,o){switch(i){case"focusin":return Nr=_l(Nr,e,i,r,n,o),!0;case"dragenter":return Mr=_l(Mr,e,i,r,n,o),!0;case"mouseover":return Dr=_l(Dr,e,i,r,n,o),!0;case"pointerover":var h=o.pointerId;return fl.set(h,_l(fl.get(h)||null,e,i,r,n,o)),!0;case"gotpointercapture":return h=o.pointerId,ml.set(h,_l(ml.get(h)||null,e,i,r,n,o)),!0}return!1}function ag(e){var i=Bt(e.target);if(i!==null){var r=d(i);if(r!==null){if(i=r.tag,i===13){if(i=f(r),i!==null){e.blockedOn=i,Gl(e.priority,function(){sg(r)});return}}else if(i===31){if(i=p(r),i!==null){e.blockedOn=i,Gl(e.priority,function(){sg(r)});return}}else if(i===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dc(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var r=xd(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);sh=n,r.target.dispatchEvent(n),sh=null}else return i=Rs(r),i!==null&&ig(i),e.blockedOn=r,!1;i.shift()}return!0}function lg(e,i,r){dc(e)&&r.delete(i)}function wb(){bd=!1,Nr!==null&&dc(Nr)&&(Nr=null),Mr!==null&&dc(Mr)&&(Mr=null),Dr!==null&&dc(Dr)&&(Dr=null),fl.forEach(lg),ml.forEach(lg)}function fc(e,i){e.blockedOn===i&&(e.blockedOn=null,bd||(bd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,wb)))}var mc=null;function og(e){mc!==e&&(mc=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){mc===e&&(mc=null);for(var i=0;i<e.length;i+=3){var r=e[i],n=e[i+1],o=e[i+2];if(typeof n!="function"){if(yd(n||r)===null)continue;break}var h=Rs(r);h!==null&&(e.splice(i,3),i-=3,iu(h,{pending:!0,data:o,method:r.method,action:n},n,o))}}))}function pa(e){function i(k){return fc(k,e)}Nr!==null&&fc(Nr,e),Mr!==null&&fc(Mr,e),Dr!==null&&fc(Dr,e),fl.forEach(i),ml.forEach(i);for(var r=0;r<Tr.length;r++){var n=Tr[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Tr.length&&(r=Tr[0],r.blockedOn===null);)ag(r),r.blockedOn===null&&Tr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var o=r[n],h=r[n+1],m=o[O]||null;if(typeof h=="function")m||og(r);else if(m){var x=null;if(h&&h.hasAttribute("formAction")){if(o=h,m=h[O]||null)x=m.formAction;else if(yd(o)!==null)continue}else x=m.action;typeof x=="function"?r[n+1]=x:(r.splice(n,3),n-=3),og(r)}}}function cg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(m){return o=m})},focusReset:"manual",scroll:"manual"})}function i(){o!==null&&(o(),o=null),n||setTimeout(r,20)}function r(){if(!n&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(r,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),o!==null&&(o(),o=null)}}}function Sd(e){this._internalRoot=e}_c.prototype.render=Sd.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var r=i.current,n=Oi();eg(r,n,e,i,null,null)},_c.prototype.unmount=Sd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;eg(e.current,2,null,e,null,null),Jo(),i[K]=null}};function _c(e){this._internalRoot=e}_c.prototype.unstable_scheduleHydration=function(e){if(e){var i=Wl();e={blockedOn:null,target:e,priority:i};for(var r=0;r<Tr.length&&i!==0&&i<Tr[r].priority;r++);Tr.splice(r,0,e),r===0&&ag(e)}};var hg=s.version;if(hg!=="19.3.1")throw Error(l(527,hg,"19.3.1"));N.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=_(i),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var Cb={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:J,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pc.isDisabled&&pc.supportsFiber)try{Bs=pc.inject(Cb),ii=pc}catch{}}return vl.createRoot=function(e,i){if(!u(e))throw Error(l(299));var r=!1,n="",o=J_,h=ep,m=tp;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(n=i.identifierPrefix),i.onUncaughtError!==void 0&&(o=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(m=i.onRecoverableError)),i=Qv(e,1,!1,null,null,r,n,null,o,h,m,cg),e[K]=i.current,Qu(e),new Sd(i)},vl.hydrateRoot=function(e,i,r){if(!u(e))throw Error(l(299));var n=!1,o="",h=J_,m=ep,x=tp,k=null;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(x=r.onRecoverableError),r.formState!==void 0&&(k=r.formState)),i=Qv(e,1,!0,i,r??null,n,o,k,h,m,x,cg),i.context=Jv(null),r=i.current,n=Oi(),n=qr(n),o=mr(n),o.callback=null,_r(r,o,n),r=n,i.current.lanes=r,nr(i,r),Es(i),e[K]=i.current,Qu(e),new _c(i)},vl.version="19.3.1",vl}var yg;function Ob(){if(yg)return kd.exports;yg=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(s){console.error(s)}}return t(),kd.exports=Rb(),kd.exports}var zb=Ob();const Lb=T0(zb);var A0=j0();/**
|
|
50
|
-
* @license lucide-react v0.503.0 - ISC
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the ISC license.
|
|
53
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const Hb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ub=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,a,l)=>l?l.toUpperCase():a.toLowerCase()),bg=t=>{const s=Ub(t);return s.charAt(0).toUpperCase()+s.slice(1)},B0=(...t)=>t.filter((s,a,l)=>!!s&&s.trim()!==""&&l.indexOf(s)===a).join(" ").trim(),Pb=t=>{for(const s in t)if(s.startsWith("aria-")||s==="role"||s==="title")return!0};/**
|
|
55
|
-
* @license lucide-react v0.503.0 - ISC
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the ISC license.
|
|
58
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/var Yb={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"};/**
|
|
60
|
-
* @license lucide-react v0.503.0 - ISC
|
|
61
|
-
*
|
|
62
|
-
* This source code is licensed under the ISC license.
|
|
63
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const Kb=E.forwardRef(({color:t="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:u="",children:d,iconNode:f,...p},v)=>E.createElement("svg",{ref:v,...Yb,width:s,height:s,stroke:t,strokeWidth:l?Number(a)*24/Number(s):a,className:B0("lucide",u),...!d&&!Pb(p)&&{"aria-hidden":"true"},...p},[...f.map(([_,w])=>E.createElement(_,w)),...Array.isArray(d)?d:[d]]));/**
|
|
65
|
-
* @license lucide-react v0.503.0 - ISC
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the ISC license.
|
|
68
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const Ae=(t,s)=>{const a=E.forwardRef(({className:l,...u},d)=>E.createElement(Kb,{ref:d,iconNode:s,className:B0(`lucide-${Hb(bg(t))}`,`lucide-${t}`,l),...u}));return a.displayName=bg(t),a};/**
|
|
70
|
-
* @license lucide-react v0.503.0 - ISC
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the ISC license.
|
|
73
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const qb=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],Fb=Ae("app-window",qb);/**
|
|
75
|
-
* @license lucide-react v0.503.0 - ISC
|
|
76
|
-
*
|
|
77
|
-
* This source code is licensed under the ISC license.
|
|
78
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const Ib=[["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"}]],Vb=Ae("archive",Ib);/**
|
|
80
|
-
* @license lucide-react v0.503.0 - ISC
|
|
81
|
-
*
|
|
82
|
-
* This source code is licensed under the ISC license.
|
|
83
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const Xb=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],R0=Ae("arrow-left",Xb);/**
|
|
85
|
-
* @license lucide-react v0.503.0 - ISC
|
|
86
|
-
*
|
|
87
|
-
* This source code is licensed under the ISC license.
|
|
88
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const Wb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Uf=Ae("arrow-right",Wb);/**
|
|
90
|
-
* @license lucide-react v0.503.0 - ISC
|
|
91
|
-
*
|
|
92
|
-
* This source code is licensed under the ISC license.
|
|
93
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const Gb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$b=Ae("arrow-up",Gb);/**
|
|
95
|
-
* @license lucide-react v0.503.0 - ISC
|
|
96
|
-
*
|
|
97
|
-
* This source code is licensed under the ISC license.
|
|
98
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const Zb=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Qb=Ae("bell",Zb);/**
|
|
100
|
-
* @license lucide-react v0.503.0 - ISC
|
|
101
|
-
*
|
|
102
|
-
* This source code is licensed under the ISC license.
|
|
103
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const Jb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pf=Ae("check",Jb);/**
|
|
105
|
-
* @license lucide-react v0.503.0 - ISC
|
|
106
|
-
*
|
|
107
|
-
* This source code is licensed under the ISC license.
|
|
108
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const eS=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],tS=Ae("chevron-left",eS);/**
|
|
110
|
-
* @license lucide-react v0.503.0 - ISC
|
|
111
|
-
*
|
|
112
|
-
* This source code is licensed under the ISC license.
|
|
113
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/const iS=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bc=Ae("chevron-right",iS);/**
|
|
115
|
-
* @license lucide-react v0.503.0 - ISC
|
|
116
|
-
*
|
|
117
|
-
* This source code is licensed under the ISC license.
|
|
118
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/const sS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],O0=Ae("circle-check",sS);/**
|
|
120
|
-
* @license lucide-react v0.503.0 - ISC
|
|
121
|
-
*
|
|
122
|
-
* This source code is licensed under the ISC license.
|
|
123
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/const rS=[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]],nS=Ae("clipboard-paste",rS);/**
|
|
125
|
-
* @license lucide-react v0.503.0 - ISC
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the ISC license.
|
|
128
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const aS=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],z0=Ae("code-xml",aS);/**
|
|
130
|
-
* @license lucide-react v0.503.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/const lS=[["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"}]],Sg=Ae("copy",lS);/**
|
|
135
|
-
* @license lucide-react v0.503.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const oS=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Al=Ae("download",oS);/**
|
|
140
|
-
* @license lucide-react v0.503.0 - ISC
|
|
141
|
-
*
|
|
142
|
-
* This source code is licensed under the ISC license.
|
|
143
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const cS=[["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"}]],L0=Ae("external-link",cS);/**
|
|
145
|
-
* @license lucide-react v0.503.0 - ISC
|
|
146
|
-
*
|
|
147
|
-
* This source code is licensed under the ISC license.
|
|
148
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const hS=[["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"}]],uS=Ae("eye",hS);/**
|
|
150
|
-
* @license lucide-react v0.503.0 - ISC
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the ISC license.
|
|
153
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const dS=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Dd=Ae("file-code",dS);/**
|
|
155
|
-
* @license lucide-react v0.503.0 - ISC
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the ISC license.
|
|
158
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const fS=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 15h6",key:"4e2qda"}],["path",{d:"M6 12v6",key:"1u72j0"}]],H0=Ae("file-plus-2",fS);/**
|
|
160
|
-
* @license lucide-react v0.503.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const mS=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],_S=Ae("file-spreadsheet",mS);/**
|
|
165
|
-
* @license lucide-react v0.503.0 - ISC
|
|
166
|
-
*
|
|
167
|
-
* This source code is licensed under the ISC license.
|
|
168
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const pS=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Rc=Ae("file-text",pS);/**
|
|
170
|
-
* @license lucide-react v0.503.0 - ISC
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the ISC license.
|
|
173
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const vS=[["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"}]],Oc=Ae("folder-open",vS);/**
|
|
175
|
-
* @license lucide-react v0.503.0 - ISC
|
|
176
|
-
*
|
|
177
|
-
* This source code is licensed under the ISC license.
|
|
178
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const gS=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]],U0=Ae("folder-plus",gS);/**
|
|
180
|
-
* @license lucide-react v0.503.0 - ISC
|
|
181
|
-
*
|
|
182
|
-
* This source code is licensed under the ISC license.
|
|
183
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/const xS=[["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"}]],gl=Ae("folder",xS);/**
|
|
185
|
-
* @license lucide-react v0.503.0 - ISC
|
|
186
|
-
*
|
|
187
|
-
* This source code is licensed under the ISC license.
|
|
188
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/const yS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],P0=Ae("globe",yS);/**
|
|
190
|
-
* @license lucide-react v0.503.0 - ISC
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the ISC license.
|
|
193
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/const bS=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Y0=Ae("hard-drive",bS);/**
|
|
195
|
-
* @license lucide-react v0.503.0 - ISC
|
|
196
|
-
*
|
|
197
|
-
* This source code is licensed under the ISC license.
|
|
198
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
-
*/const SS=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],wS=Ae("house",SS);/**
|
|
200
|
-
* @license lucide-react v0.503.0 - ISC
|
|
201
|
-
*
|
|
202
|
-
* This source code is licensed under the ISC license.
|
|
203
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
-
*/const CS=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],Cc=Ae("image-plus",CS);/**
|
|
205
|
-
* @license lucide-react v0.503.0 - ISC
|
|
206
|
-
*
|
|
207
|
-
* This source code is licensed under the ISC license.
|
|
208
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/const kS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],wg=Ae("image",kS);/**
|
|
210
|
-
* @license lucide-react v0.503.0 - ISC
|
|
211
|
-
*
|
|
212
|
-
* This source code is licensed under the ISC license.
|
|
213
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
-
*/const ES=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],K0=Ae("info",ES);/**
|
|
215
|
-
* @license lucide-react v0.503.0 - ISC
|
|
216
|
-
*
|
|
217
|
-
* This source code is licensed under the ISC license.
|
|
218
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/const NS=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],MS=Ae("layers",NS);/**
|
|
220
|
-
* @license lucide-react v0.503.0 - ISC
|
|
221
|
-
*
|
|
222
|
-
* This source code is licensed under the ISC license.
|
|
223
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
-
*/const DS=[["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"}]],Yf=Ae("layout-grid",DS);/**
|
|
225
|
-
* @license lucide-react v0.503.0 - ISC
|
|
226
|
-
*
|
|
227
|
-
* This source code is licensed under the ISC license.
|
|
228
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
-
*/const TS=[["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"}]],jS=Ae("link-2",TS);/**
|
|
230
|
-
* @license lucide-react v0.503.0 - ISC
|
|
231
|
-
*
|
|
232
|
-
* This source code is licensed under the ISC license.
|
|
233
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
-
*/const AS=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],BS=Ae("list",AS);/**
|
|
235
|
-
* @license lucide-react v0.503.0 - ISC
|
|
236
|
-
*
|
|
237
|
-
* This source code is licensed under the ISC license.
|
|
238
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
-
*/const RS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bl=Ae("loader-circle",RS);/**
|
|
240
|
-
* @license lucide-react v0.503.0 - ISC
|
|
241
|
-
*
|
|
242
|
-
* This source code is licensed under the ISC license.
|
|
243
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
-
*/const OS=[["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"}]],qc=Ae("lock",OS);/**
|
|
245
|
-
* @license lucide-react v0.503.0 - ISC
|
|
246
|
-
*
|
|
247
|
-
* This source code is licensed under the ISC license.
|
|
248
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/const zS=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],LS=Ae("log-out",zS);/**
|
|
250
|
-
* @license lucide-react v0.503.0 - ISC
|
|
251
|
-
*
|
|
252
|
-
* This source code is licensed under the ISC license.
|
|
253
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
-
*/const HS=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],Wd=Ae("maximize-2",HS);/**
|
|
255
|
-
* @license lucide-react v0.503.0 - ISC
|
|
256
|
-
*
|
|
257
|
-
* This source code is licensed under the ISC license.
|
|
258
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
-
*/const US=[["path",{d:"M5 12h14",key:"1ays0h"}]],PS=Ae("minus",US);/**
|
|
260
|
-
* @license lucide-react v0.503.0 - ISC
|
|
261
|
-
*
|
|
262
|
-
* This source code is licensed under the ISC license.
|
|
263
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
-
*/const YS=[["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"}]],q0=Ae("monitor",YS);/**
|
|
265
|
-
* @license lucide-react v0.503.0 - ISC
|
|
266
|
-
*
|
|
267
|
-
* This source code is licensed under the ISC license.
|
|
268
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
-
*/const KS=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],Cg=Ae("moon",KS);/**
|
|
270
|
-
* @license lucide-react v0.503.0 - ISC
|
|
271
|
-
*
|
|
272
|
-
* This source code is licensed under the ISC license.
|
|
273
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
-
*/const qS=[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]],FS=Ae("package-open",qS);/**
|
|
275
|
-
* @license lucide-react v0.503.0 - ISC
|
|
276
|
-
*
|
|
277
|
-
* This source code is licensed under the ISC license.
|
|
278
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/const IS=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],zc=Ae("package",IS);/**
|
|
280
|
-
* @license lucide-react v0.503.0 - ISC
|
|
281
|
-
*
|
|
282
|
-
* This source code is licensed under the ISC license.
|
|
283
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
-
*/const VS=[["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"}]],XS=Ae("pencil",VS);/**
|
|
285
|
-
* @license lucide-react v0.503.0 - ISC
|
|
286
|
-
*
|
|
287
|
-
* This source code is licensed under the ISC license.
|
|
288
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
-
*/const WS=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],kg=Ae("play",WS);/**
|
|
290
|
-
* @license lucide-react v0.503.0 - ISC
|
|
291
|
-
*
|
|
292
|
-
* This source code is licensed under the ISC license.
|
|
293
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
-
*/const GS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kf=Ae("plus",GS);/**
|
|
295
|
-
* @license lucide-react v0.503.0 - ISC
|
|
296
|
-
*
|
|
297
|
-
* This source code is licensed under the ISC license.
|
|
298
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
-
*/const $S=[["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"}]],qf=Ae("refresh-cw",$S);/**
|
|
300
|
-
* @license lucide-react v0.503.0 - ISC
|
|
301
|
-
*
|
|
302
|
-
* This source code is licensed under the ISC license.
|
|
303
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
-
*/const ZS=[["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"}]],F0=Ae("rotate-ccw",ZS);/**
|
|
305
|
-
* @license lucide-react v0.503.0 - ISC
|
|
306
|
-
*
|
|
307
|
-
* This source code is licensed under the ISC license.
|
|
308
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
-
*/const QS=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],JS=Ae("rotate-cw",QS);/**
|
|
310
|
-
* @license lucide-react v0.503.0 - ISC
|
|
311
|
-
*
|
|
312
|
-
* This source code is licensed under the ISC license.
|
|
313
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
-
*/const e2=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],t2=Ae("save",e2);/**
|
|
315
|
-
* @license lucide-react v0.503.0 - ISC
|
|
316
|
-
*
|
|
317
|
-
* This source code is licensed under the ISC license.
|
|
318
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
-
*/const i2=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],s2=Ae("scissors",i2);/**
|
|
320
|
-
* @license lucide-react v0.503.0 - ISC
|
|
321
|
-
*
|
|
322
|
-
* This source code is licensed under the ISC license.
|
|
323
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
-
*/const r2=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ff=Ae("search",r2);/**
|
|
325
|
-
* @license lucide-react v0.503.0 - ISC
|
|
326
|
-
*
|
|
327
|
-
* This source code is licensed under the ISC license.
|
|
328
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
-
*/const n2=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],a2=Ae("sliders-horizontal",n2);/**
|
|
330
|
-
* @license lucide-react v0.503.0 - ISC
|
|
331
|
-
*
|
|
332
|
-
* This source code is licensed under the ISC license.
|
|
333
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
-
*/const l2=[["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"}]],Td=Ae("sun",l2);/**
|
|
335
|
-
* @license lucide-react v0.503.0 - ISC
|
|
336
|
-
*
|
|
337
|
-
* This source code is licensed under the ISC license.
|
|
338
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
-
*/const o2=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],I0=Ae("terminal",o2);/**
|
|
340
|
-
* @license lucide-react v0.503.0 - ISC
|
|
341
|
-
*
|
|
342
|
-
* This source code is licensed under the ISC license.
|
|
343
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
-
*/const c2=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],gn=Ae("trash-2",c2);/**
|
|
345
|
-
* @license lucide-react v0.503.0 - ISC
|
|
346
|
-
*
|
|
347
|
-
* This source code is licensed under the ISC license.
|
|
348
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
-
*/const h2=[["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"}]],u2=Ae("triangle-alert",h2);/**
|
|
350
|
-
* @license lucide-react v0.503.0 - ISC
|
|
351
|
-
*
|
|
352
|
-
* This source code is licensed under the ISC license.
|
|
353
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
-
*/const d2=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],V0=Ae("upload",d2);/**
|
|
355
|
-
* @license lucide-react v0.503.0 - ISC
|
|
356
|
-
*
|
|
357
|
-
* This source code is licensed under the ISC license.
|
|
358
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
-
*/const f2=[["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"}]],Gd=Ae("volume-2",f2);/**
|
|
360
|
-
* @license lucide-react v0.503.0 - ISC
|
|
361
|
-
*
|
|
362
|
-
* This source code is licensed under the ISC license.
|
|
363
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
-
*/const m2=[["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"}]],Eg=Ae("volume-x",m2);/**
|
|
365
|
-
* @license lucide-react v0.503.0 - ISC
|
|
366
|
-
*
|
|
367
|
-
* This source code is licensed under the ISC license.
|
|
368
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
-
*/const _2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hl=Ae("x",_2),kc=[{id:"mono-peaks",name:"Geometrik Dağ"},{id:"graphite-flat",name:"Koyu Grafit"},{id:"obsidian-flat",name:"Mat Siyah"}];let wn="main";function jd(t){wn=t||"main"}function p2(){return wn}function vn(t,s=""){return`/api/vfs/raw?desktop=${encodeURIComponent(wn)}&path=${encodeURIComponent(t)}${s}`}function X0(t){return`/api/vfs/wallpaper/${encodeURIComponent(t)}?desktop=${encodeURIComponent(wn)}`}function W0(t){return`/api/apps/icon?name=${encodeURIComponent(t)}`}async function rt(t,s){const a=await fetch(t,{credentials:"include",...s,headers:{"Content-Type":"application/json","X-Desktop-Id":wn,...(s==null?void 0:s.headers)||{}}}),l=await a.json();if(!a.ok)throw new Error(l.error||"İşlem sırasında bir hata oluştu.");return l}const $d={status:()=>rt("/api/auth/status"),login:(t,s)=>rt("/api/auth/login",{method:"POST",body:JSON.stringify({username:t,password:s})}),logout:()=>rt("/api/auth/logout",{method:"POST",body:JSON.stringify({})})},bn={list:()=>rt("/api/apps"),launch:t=>rt("/api/apps/launch",{method:"POST",body:JSON.stringify(t)}),close:(t,s)=>rt("/api/apps/close",{method:"POST",body:JSON.stringify({sessionId:t,viewId:s})}),install:t=>rt("/api/apps/install",{method:"POST",body:JSON.stringify(t)}),getInstallJob:t=>rt(`/api/apps/install/${encodeURIComponent(t)}`),startVSCodeWeb:(t,s)=>rt("/api/apps/vscode-start",{method:"POST",body:JSON.stringify({folderPath:t,theme:s})}),vscodeStatus:()=>rt("/api/apps/vscode-status")},xt={listDesktops:()=>rt("/api/desktops"),createDesktop:t=>rt("/api/desktops",{method:"POST",body:JSON.stringify({name:t})}),renameDesktop:(t,s)=>rt(`/api/desktops/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({name:s})}),deleteDesktop:t=>rt(`/api/desktops/${encodeURIComponent(t)}`,{method:"DELETE"}),getSnapshot:()=>rt("/api/vfs/snapshot"),createFolder:(t,s,a)=>rt("/api/vfs/folder",{method:"POST",body:JSON.stringify({parentPath:t,name:s,pos:a})}),createFile:(t,s,a,l)=>rt("/api/vfs/file",{method:"POST",body:JSON.stringify({parentPath:t,name:s,content:a,pos:l})}),rename:(t,s)=>rt("/api/vfs/rename",{method:"POST",body:JSON.stringify({path:t,newName:s})}),move:(t,s)=>rt("/api/vfs/move",{method:"POST",body:JSON.stringify({paths:t,targetDir:s})}),copy:(t,s)=>rt("/api/vfs/copy",{method:"POST",body:JSON.stringify({paths:t,targetDir:s})}),trash:t=>rt("/api/vfs/trash",{method:"POST",body:JSON.stringify({paths:t})}),restore:t=>rt("/api/vfs/restore",{method:"POST",body:JSON.stringify({paths:t})}),deletePermanently:t=>rt("/api/vfs/delete",{method:"POST",body:JSON.stringify({paths:t})}),emptyTrash:()=>rt("/api/vfs/empty-trash",{method:"POST",body:JSON.stringify({})}),compressToZip:(t,s,a)=>rt("/api/vfs/zip",{method:"POST",body:JSON.stringify({paths:t,targetDir:s,zipName:a})}),extractZip:(t,s)=>rt("/api/vfs/unzip",{method:"POST",body:JSON.stringify({path:t,targetDir:s})}),readText:t=>rt(`/api/vfs/content?path=${encodeURIComponent(t)}`),writeText:(t,s)=>rt("/api/vfs/content",{method:"PUT",body:JSON.stringify({path:t,content:s})}),uploadFiles:async(t,s)=>{const a=new FormData;a.append("parentPath",t),Array.from(s).forEach(d=>a.append("files",d));const l=await fetch("/api/vfs/upload",{method:"POST",credentials:"include",headers:{"X-Desktop-Id":wn},body:a}),u=await l.json();if(!l.ok)throw new Error(u.error||"Dosya yükleme başarısız oldu.");return u},uploadWallpaper:async t=>{const s=new FormData;s.append("file",t);const a=await fetch("/api/vfs/wallpaper",{method:"POST",credentials:"include",headers:{"X-Desktop-Id":wn},body:s}),l=await a.json();if(!a.ok)throw new Error(l.error||"Arka plan yüklenemedi.");return l},setWallpaperFromVfs:t=>rt("/api/vfs/wallpaper-from-vfs",{method:"POST",body:JSON.stringify({path:t})}),updateMeta:t=>rt("/api/vfs/meta",{method:"PATCH",body:JSON.stringify(t)}),resetPositions:()=>rt("/api/vfs/reset-positions",{method:"POST",body:JSON.stringify({})})},Ng=24e3;class v2{constructor(){fn(this,"ctx",null);fn(this,"gainNode",null);fn(this,"nextStartTime",0);fn(this,"volume",.8);fn(this,"muted",!1);fn(this,"unlocked",!1);if(typeof window<"u"){const s=()=>this.ensureContext();window.addEventListener("pointerdown",s,{passive:!0}),window.addEventListener("keydown",s,{passive:!0}),window.addEventListener("touchstart",s,{passive:!0})}}ensureContext(){if(typeof window>"u")return null;if(!this.ctx){const s=window.AudioContext||window.webkitAudioContext;if(!s)return null;this.ctx=new s({sampleRate:Ng}),this.gainNode=this.ctx.createGain(),this.gainNode.gain.value=this.muted?0:this.volume,this.gainNode.connect(this.ctx.destination)}return this.ctx.state==="suspended"&&this.ctx.resume().catch(()=>{}),!this.unlocked&&this.ctx.state==="running"&&(this.unlocked=!0),this.ctx}setVolume(s,a){if(this.volume=Math.max(0,Math.min(1,s/100)),this.muted=a,this.gainNode&&this.ctx){const l=this.muted?0:this.volume;this.gainNode.gain.setTargetAtTime(l,this.ctx.currentTime,.015)}}pushPcm16(s){if(this.muted||this.volume<=0)return;const a=this.ensureContext();if(!a||!this.gainNode||a.state!=="running")return;const l=Math.floor(s.byteLength/2);if(l<=0)return;const u=new Int16Array(s,0,l),d=a.createBuffer(1,l,Ng),f=d.getChannelData(0);for(let _=0;_<l;_++)f[_]=u[_]/32768;const p=a.currentTime;(this.nextStartTime<p||this.nextStartTime>p+.26)&&(this.nextStartTime=p+.035);const v=a.createBufferSource();v.buffer=d,v.connect(this.gainNode),v.start(this.nextStartTime),this.nextStartTime+=d.duration}}const Zs=new v2,g2=()=>c.jsx("div",{className:"w-full h-full bg-[#c8c9ce]",children:c.jsxs("svg",{viewBox:"0 0 1920 1080",preserveAspectRatio:"xMidYMid slice",className:"w-full h-full block",fill:"none",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"mono-sky",x1:"960",y1:"0",x2:"960",y2:"720",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#D6D7DC"}),c.jsx("stop",{offset:"50%",stopColor:"#C7C8CE"}),c.jsx("stop",{offset:"100%",stopColor:"#B1B3BA"})]}),c.jsxs("radialGradient",{id:"soft-sun",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(1375 250) scale(170)",children:[c.jsx("stop",{offset:"0%",stopColor:"#ECECF0",stopOpacity:"0.68"}),c.jsx("stop",{offset:"45%",stopColor:"#E2E3E8",stopOpacity:"0.28"}),c.jsx("stop",{offset:"100%",stopColor:"#D4D5DA",stopOpacity:"0"})]}),c.jsxs("linearGradient",{id:"horizon-mist",x1:"960",y1:"450",x2:"960",y2:"780",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#C8C9CF",stopOpacity:"0"}),c.jsx("stop",{offset:"55%",stopColor:"#C2C3C9",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#9A9CA4",stopOpacity:"0.25"})]}),c.jsxs("linearGradient",{id:"valley-haze",x1:"960",y1:"680",x2:"960",y2:"1020",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#6E7078",stopOpacity:"0"}),c.jsx("stop",{offset:"60%",stopColor:"#3B3C42",stopOpacity:"0.22"}),c.jsx("stop",{offset:"100%",stopColor:"#1E1F23",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"lit-main-a",x1:"650",y1:"270",x2:"800",y2:"920",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#D1D2D7"}),c.jsx("stop",{offset:"100%",stopColor:"#B4B6BD"})]}),c.jsxs("linearGradient",{id:"lit-main-b",x1:"620",y1:"620",x2:"850",y2:"980",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#C1C2C9"}),c.jsx("stop",{offset:"100%",stopColor:"#9FA1AA"})]}),c.jsxs("linearGradient",{id:"lit-side",x1:"180",y1:"420",x2:"360",y2:"920",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#C8C9D0"}),c.jsx("stop",{offset:"100%",stopColor:"#A6A8B0"})]}),c.jsxs("linearGradient",{id:"lit-right",x1:"1380",y1:"435",x2:"1520",y2:"960",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#C3C5CC"}),c.jsx("stop",{offset:"100%",stopColor:"#A1A3AC"})]}),c.jsxs("linearGradient",{id:"shd-main-a",x1:"940",y1:"265",x2:"1360",y2:"940",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#45464D"}),c.jsx("stop",{offset:"100%",stopColor:"#2F3036"})]}),c.jsxs("linearGradient",{id:"shd-main-b",x1:"990",y1:"575",x2:"1220",y2:"980",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#56575F"}),c.jsx("stop",{offset:"100%",stopColor:"#3B3C42"})]}),c.jsxs("linearGradient",{id:"shd-main-c",x1:"1080",y1:"640",x2:"1460",y2:"980",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#38393F"}),c.jsx("stop",{offset:"100%",stopColor:"#28292E"})]}),c.jsxs("linearGradient",{id:"shd-left",x1:"340",y1:"420",x2:"640",y2:"910",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#4D4E55"}),c.jsx("stop",{offset:"100%",stopColor:"#36373D"})]}),c.jsxs("linearGradient",{id:"shd-right",x1:"1565",y1:"435",x2:"1920",y2:"980",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#42434A"}),c.jsx("stop",{offset:"100%",stopColor:"#2B2C31"})]}),c.jsxs("linearGradient",{id:"fg-slope-a",x1:"300",y1:"760",x2:"300",y2:"1080",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#3B3C42"}),c.jsx("stop",{offset:"100%",stopColor:"#232428"})]}),c.jsxs("linearGradient",{id:"fg-slope-b",x1:"900",y1:"835",x2:"900",y2:"1080",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#46474E"}),c.jsx("stop",{offset:"100%",stopColor:"#26272B"})]}),c.jsxs("linearGradient",{id:"fg-slope-c",x1:"1600",y1:"845",x2:"1600",y2:"1080",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#35363C"}),c.jsx("stop",{offset:"100%",stopColor:"#1F2024"})]})]}),c.jsx("rect",{width:"1920",height:"1080",fill:"url(#mono-sky)"}),c.jsx("circle",{cx:"1375",cy:"250",r:"170",fill:"url(#soft-sun)"}),c.jsx("polygon",{points:"0,690 260,520 510,655 790,478 1080,632 1430,498 1720,625 1920,550 1920,860 0,860",fill:"#9FA1A9"}),c.jsx("polygon",{points:"260,520 510,655 390,695",fill:"#82848D"}),c.jsx("polygon",{points:"790,478 1080,632 895,682",fill:"#7C7E87"}),c.jsx("polygon",{points:"1430,498 1720,625 1545,682",fill:"#83858E"}),c.jsx("rect",{y:"450",width:"1920",height:"330",fill:"url(#horizon-mist)"}),c.jsx("polygon",{points:"-80,920 340,425 395,920",fill:"url(#lit-side)"}),c.jsx("polygon",{points:"150,645 340,425 285,720",fill:"#D0D1D7"}),c.jsx("polygon",{points:"340,425 720,890 395,920",fill:"url(#shd-left)"}),c.jsx("polygon",{points:"340,425 475,675 395,730",fill:"#5C5D66"}),c.jsx("polygon",{points:"410,980 940,272 865,640",fill:"url(#lit-main-a)"}),c.jsx("polygon",{points:"410,980 865,640 735,980",fill:"url(#lit-main-b)"}),c.jsx("polygon",{points:"735,980 865,640 975,980",fill:"#AEB0B8"}),c.jsx("polygon",{points:"865,640 940,272 995,575",fill:"#C9CAD1"}),c.jsx("polygon",{points:"940,272 1490,980 995,575",fill:"url(#shd-main-a)"}),c.jsx("polygon",{points:"995,575 1235,770 975,980",fill:"url(#shd-main-b)"}),c.jsx("polygon",{points:"995,575 1490,980 1235,770",fill:"url(#shd-main-c)"}),c.jsx("polygon",{points:"1235,770 1490,980 975,980",fill:"#323339"}),c.jsx("polygon",{points:"1160,990 1565,442 1515,760",fill:"url(#lit-right)"}),c.jsx("polygon",{points:"1160,990 1515,760 1440,990",fill:"#A9ABB3"}),c.jsx("polygon",{points:"1565,442 2020,990 1515,760",fill:"url(#shd-right)"}),c.jsx("polygon",{points:"1515,760 2020,990 1440,990",fill:"#2E2F35"}),c.jsx("rect",{y:"680",width:"1920",height:"340",fill:"url(#valley-haze)"}),c.jsx("polygon",{points:"0,1080 0,808 460,936 240,1080",fill:"url(#fg-slope-a)"}),c.jsx("polygon",{points:"0,808 210,752 460,936",fill:"#52535B"}),c.jsx("polygon",{points:"210,752 595,976 460,936",fill:"#323338"}),c.jsx("polygon",{points:"240,1080 760,838 1090,1080",fill:"url(#fg-slope-b)"}),c.jsx("polygon",{points:"760,838 920,966 620,1080",fill:"#4C4D55"}),c.jsx("polygon",{points:"760,838 1290,1080 920,966",fill:"#2B2C31"}),c.jsx("polygon",{points:"1090,1080 1650,848 1920,962 1920,1080",fill:"url(#fg-slope-c)"}),c.jsx("polygon",{points:"1650,848 1920,962 1740,1080",fill:"#25262B"}),c.jsx("rect",{y:"1022",width:"1920",height:"58",fill:"#1F2024"})]})});function Mg(t){return t.wallpaperId==="custom"&&t.customUrl?c.jsx("img",{src:t.customUrl,alt:"Masaüstü Arka Planı",className:"w-full h-full object-cover select-none",draggable:!1}):t.wallpaperId==="graphite-flat"?c.jsx("div",{className:"w-full h-full bg-[#26262a]"}):t.wallpaperId==="obsidian-flat"?c.jsx("div",{className:"w-full h-full bg-[#131316]"}):c.jsx(g2,{})}const G0=ba.memo(({wallpaperId:t,customWallpaper:s})=>{const a=t==="custom"&&s?X0(s):void 0,l=`${t}:${a||""}`,[u,d]=E.useState({key:l,wallpaperId:t,customUrl:a}),[f,p]=E.useState(null),[v,_]=E.useState(!1),w=E.useRef(null);return E.useEffect(()=>{if(l===u.key)return;let g=!1;const y=()=>{g||(w.current&&clearTimeout(w.current),p(u),d({key:l,wallpaperId:t,customUrl:a}),_(!0),w.current=setTimeout(()=>{p(null),_(!1)},720))};if(t==="custom"&&a){const T=new Image;T.onload=y,T.onerror=y,T.src=a}else y();return()=>{g=!0}},[l,t,a,u]),E.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),c.jsxs("div",{className:"fixed inset-0 pointer-events-none overflow-hidden bg-[var(--os-bg)]",children:[f&&c.jsx("div",{className:"absolute inset-0",children:Mg(f)},`prev-${f.key}`),c.jsx("div",{className:`absolute inset-0 ${v?"wallpaper-enter":""}`,children:Mg(u)},`curr-${u.key}`)]})});function Rl({size:t=48}){return c.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-sm",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cr-top",x1:"12",y1:"6",x2:"54",y2:"28",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#2563EB"}),c.jsx("stop",{offset:"1",stopColor:"#1D4ED8"})]}),c.jsxs("linearGradient",{id:"cr-right",x1:"34",y1:"24",x2:"56",y2:"58",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#60A5FA"}),c.jsx("stop",{offset:"1",stopColor:"#3B82F6"})]}),c.jsxs("linearGradient",{id:"cr-left",x1:"6",y1:"18",x2:"32",y2:"58",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#93C5FD"}),c.jsx("stop",{offset:"1",stopColor:"#38BDF8"})]}),c.jsxs("radialGradient",{id:"cr-core",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(32 32) scale(13)",children:[c.jsx("stop",{stopColor:"#38BDF8"}),c.jsx("stop",{offset:"1",stopColor:"#1D4ED8"})]})]}),c.jsx("circle",{cx:"32",cy:"32",r:"28",fill:"url(#cr-left)"}),c.jsx("path",{d:"M32 4C44.2 4 54.6 11.8 58.4 22.7H32C25.5 22.7 20 26.8 18 32.6L9.5 17.9C14.5 9.5 22.7 4 32 4Z",fill:"url(#cr-top)"}),c.jsx("path",{d:"M58.4 22.7C59.4 25.6 60 28.7 60 32C60 47.5 47.5 60 32 60L29.5 59.8L41.8 38.5C43.2 36.6 44 34.4 44 32C44 27.6 41.6 23.8 38 21.8L58.4 22.7Z",fill:"url(#cr-right)"}),c.jsx("circle",{cx:"32",cy:"32",r:"13.5",fill:"#F8FAFC"}),c.jsx("circle",{cx:"32",cy:"32",r:"10.2",fill:"url(#cr-core)"}),c.jsx("circle",{cx:"29",cy:"29",r:"3",fill:"white",fillOpacity:"0.45"})]})}function x2({size:t=48}){return c.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-sm",children:[c.jsx("rect",{x:"7",y:"10",width:"50",height:"35",rx:"7",fill:"#1C1C1E",stroke:"#D4D4D8",strokeWidth:"2"}),c.jsx("rect",{x:"11",y:"14",width:"42",height:"27",rx:"4",fill:"#2C2C2E"}),c.jsx("rect",{x:"16",y:"20",width:"14",height:"10",rx:"2",fill:"#E4E4E7",fillOpacity:"0.9"}),c.jsx("rect",{x:"34",y:"20",width:"14",height:"4",rx:"1.5",fill:"#71717A"}),c.jsx("rect",{x:"34",y:"26",width:"10",height:"4",rx:"1.5",fill:"#52525B"}),c.jsx("path",{d:"M26 45L23 53H41L38 45",fill:"#A1A1AA"}),c.jsx("rect",{x:"19",y:"52.5",width:"26",height:"3.5",rx:"1.75",fill:"#D4D4D8"})]})}function $0({size:t=48,hasItems:s=!1}){return c.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-sm",children:[s&&c.jsxs("g",{children:[c.jsx("rect",{x:"19",y:"9",width:"13",height:"14",rx:"2",transform:"rotate(-14 19 9)",fill:"#F4F4F5",stroke:"#A1A1AA"}),c.jsx("rect",{x:"31",y:"7",width:"13",height:"14",rx:"2",transform:"rotate(12 31 7)",fill:"#D4D4D8"}),c.jsx("rect",{x:"24",y:"10",width:"14",height:"12",rx:"2",transform:"rotate(3 24 10)",fill:"#E4E4E7"})]}),c.jsx("path",{d:"M15 17H49L45.8 54.5C45.6 56.6 43.8 58.2 41.7 58.2H22.3C20.2 58.2 18.4 56.6 18.2 54.5L15 17Z",fill:"#27272A",stroke:"#A1A1AA",strokeWidth:"1.8"}),c.jsx("rect",{x:"12",y:"13",width:"40",height:"4.5",rx:"2.25",fill:"#52525B",stroke:"#D4D4D8",strokeWidth:"1"}),c.jsx("path",{d:"M25 26V48M32 26V48M39 26V48",stroke:"#A1A1AA",strokeOpacity:"0.45",strokeWidth:"2",strokeLinecap:"round"})]})}function y2(t){let s=0;for(let a=0;a<t.length;a++)s=t.charCodeAt(a)+((s<<5)-s);return Math.abs(s)%360}const Ji=({node:t,size:s=48})=>{const[a,l]=E.useState(!1),u=ba.useId().replace(/[^a-zA-Z0-9_-]/g,"");if(t.path==="/.trash")return c.jsx($0,{size:s,hasItems:t.childCount>0});if(t.isDir){const g=(t.childCount||0)>0,y=t.path==="/Downloads",T=t.path==="/Documents",R=t.path==="/Projects"||t.name.toLowerCase().includes("proje");return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:`fld-back-${u}`,x1:"6",y1:"10",x2:"58",y2:"52",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#0284C7"}),c.jsx("stop",{offset:"1",stopColor:"#1D4ED8"})]}),c.jsxs("linearGradient",{id:`fld-front-${u}`,x1:"6",y1:"22",x2:"58",y2:"56",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#38BDF8"}),c.jsx("stop",{offset:"1",stopColor:"#2563EB"})]})]}),c.jsx("path",{d:"M6 16C6 13.2 8.2 11 11 11H24.5C26.1 11 27.6 11.8 28.5 13.1L31.2 17H53C55.8 17 58 19.2 58 22V50C58 52.8 55.8 55 53 55H11C8.2 55 6 52.8 6 50V16Z",fill:`url(#fld-back-${u})`}),g&&c.jsxs("g",{children:[c.jsx("rect",{x:"13",y:"16",width:"34",height:"16",rx:"2.5",fill:"#E2E8F0",transform:"rotate(-2 13 16)"}),c.jsx("rect",{x:"17",y:"18",width:"34",height:"16",rx:"2.5",fill:"#FFFFFF"}),c.jsx("line",{x1:"22",y1:"22",x2:"43",y2:"22",stroke:"#94A3B8",strokeWidth:"1.8",strokeLinecap:"round"})]}),c.jsx("rect",{x:"6",y:"23",width:"52",height:"32",rx:"6",fill:`url(#fld-front-${u})`,stroke:"#7DD3FC",strokeOpacity:"0.45",strokeWidth:"1.2"}),y&&c.jsx("path",{d:"M32 31V44M32 44L27 39M32 44L37 39M25 47H39",stroke:"white",strokeOpacity:"0.88",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"}),T&&c.jsx("path",{d:"M24 33H40M24 39H40M24 45H33",stroke:"white",strokeOpacity:"0.85",strokeWidth:"2.4",strokeLinecap:"round"}),R&&!y&&!T&&c.jsx("path",{d:"M27 34L22 39L27 44M37 34L42 39L37 44M34 32L30 46",stroke:"white",strokeOpacity:"0.88",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}const d=(t.extension||"").toLowerCase();if(["png","jpg","jpeg","gif","webp","svg","ico","bmp"].includes(d)){const g=t.size>0&&!!t.path&&!a,y=d==="svg"?"#F59E0B":d==="png"?"#06B6D4":d==="gif"?"#EC4899":"#10B981";return c.jsxs("div",{style:{width:s,height:s},className:"relative flex items-center justify-center drop-shadow-md",children:[c.jsx("div",{className:"w-[88%] h-[84%] rounded-lg bg-slate-900 border-2 border-slate-200/90 overflow-hidden shadow-inner flex items-center justify-center relative",children:g?c.jsx("img",{src:vn(t.path,`&t=${encodeURIComponent(t.modifiedAt||"")}`),alt:t.name,onError:()=>l(!0),className:"w-full h-full object-cover",draggable:!1}):c.jsxs("svg",{viewBox:"0 0 64 56",className:"w-full h-full",fill:"none",children:[c.jsx("rect",{width:"64",height:"56",fill:"#0F172A"}),c.jsx("circle",{cx:"46",cy:"16",r:"6",fill:"#FBBF24"}),c.jsx("path",{d:"M4 48L22 26L35 40L45 30L60 48H4Z",fill:"#0284C7"}),c.jsx("path",{d:"M4 48L22 26L32 37L18 48H4Z",fill:"#38BDF8"})]})}),c.jsx("span",{style:{backgroundColor:y},className:"absolute -bottom-0.5 right-0.5 px-1.5 py-[1px] rounded text-[9px] font-bold tracking-wider text-white shadow",children:d.toUpperCase()})]})}if(["zip","rar","7z","tar","gz","tar.gz","bz2"].includes(d)){const g=d==="rar"?"#9333EA":d==="7z"?"#0D9488":"#D97706",y=d==="rar"?"#6B21A8":d==="7z"?"#115E59":"#92400E",T=d==="tar.gz"?"TGZ":d.toUpperCase();return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("rect",{x:"10",y:"8",width:"44",height:"48",rx:"7",fill:g}),c.jsx("path",{d:"M10 26H54V49C54 52.9 50.9 56 47 56H17C13.1 56 10 52.9 10 49V26Z",fill:y}),c.jsx("rect",{x:"10",y:"24",width:"44",height:"4",fill:"#FDE68A",fillOpacity:"0.35"}),c.jsx("rect",{x:"28",y:"8",width:"8",height:"32",fill:"#1E293B",fillOpacity:"0.45"}),c.jsx("path",{d:"M29 11H32M32 14H35M29 17H32M32 20H35M29 23H32M32 26H35M29 29H32",stroke:"#F8FAFC",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("rect",{x:"28.5",y:"31",width:"7",height:"10",rx:"2",fill:"#F8FAFC"}),c.jsx("circle",{cx:"32",cy:"37.5",r:"1.5",fill:"#334155"}),c.jsx("rect",{x:"16",y:"44",width:"32",height:"9",rx:"2.5",fill:"#0F172A",fillOpacity:"0.65"}),c.jsx("text",{x:"32",y:"50.8",fill:"#FEF3C7",fontSize:"7.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:T})]})}if(["iso","img"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("circle",{cx:"32",cy:"32",r:"25",fill:"#1E293B",stroke:"#94A3B8",strokeWidth:"2"}),c.jsx("path",{d:"M32 7A25 25 0 0 1 57 32H32V7Z",fill:"#38BDF8",fillOpacity:"0.35"}),c.jsx("path",{d:"M32 57A25 25 0 0 1 7 32H32V57Z",fill:"#A855F7",fillOpacity:"0.35"}),c.jsx("circle",{cx:"32",cy:"32",r:"9",fill:"#0F172A",stroke:"#CBD5E1",strokeWidth:"2"}),c.jsx("circle",{cx:"32",cy:"32",r:"3.5",fill:"#94A3B8"}),c.jsx("rect",{x:"20",y:"46",width:"24",height:"10",rx:"3",fill:"#0EA5E9"}),c.jsx("text",{x:"32",y:"53.3",fill:"white",fontSize:"7.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(["exe","app","dmg","msi","deb","apk","bin"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("rect",{x:"8",y:"10",width:"48",height:"44",rx:"8",fill:"#0F172A",stroke:"#475569",strokeWidth:"2"}),c.jsx("rect",{x:"8",y:"10",width:"48",height:"11",rx:"6",fill:"#1E293B"}),c.jsx("circle",{cx:"15",cy:"15.5",r:"2",fill:"#F43F5E"}),c.jsx("circle",{cx:"21",cy:"15.5",r:"2",fill:"#FBBF24"}),c.jsx("circle",{cx:"27",cy:"15.5",r:"2",fill:"#10B981"}),c.jsx("rect",{x:"23",y:"26",width:"18",height:"16",rx:"4",fill:"#0284C7",fillOpacity:"0.25",stroke:"#38BDF8",strokeWidth:"1.8"}),c.jsx("path",{d:"M29 31L35 34L29 37V31Z",fill:"#38BDF8"}),c.jsx("rect",{x:"18",y:"45",width:"28",height:"9",rx:"2.5",fill:"#3B82F6"}),c.jsx("text",{x:"32",y:"51.8",fill:"white",fontSize:"7.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(["mp3","wav","ogg","flac","m4a","aac"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("defs",{children:c.jsxs("linearGradient",{id:"aud-grad",x1:"10",y1:"8",x2:"54",y2:"56",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#EC4899"}),c.jsx("stop",{offset:"1",stopColor:"#7C3AED"})]})}),c.jsx("rect",{x:"10",y:"8",width:"44",height:"48",rx:"9",fill:"url(#aud-grad)"}),c.jsx("rect",{x:"19",y:"26",width:"3.5",height:"12",rx:"1.75",fill:"white"}),c.jsx("rect",{x:"25",y:"18",width:"3.5",height:"22",rx:"1.75",fill:"white"}),c.jsx("rect",{x:"31",y:"22",width:"3.5",height:"16",rx:"1.75",fill:"white"}),c.jsx("rect",{x:"37",y:"15",width:"3.5",height:"25",rx:"1.75",fill:"white"}),c.jsx("rect",{x:"43",y:"24",width:"3.5",height:"13",rx:"1.75",fill:"white"}),c.jsx("rect",{x:"17",y:"44",width:"30",height:"8.5",rx:"2.5",fill:"#0F172A",fillOpacity:"0.55"}),c.jsx("text",{x:"32",y:"50.3",fill:"white",fontSize:"7.2",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(["mp4","webm","mov","mkv","avi"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("rect",{x:"9",y:"8",width:"46",height:"48",rx:"7",fill:"#0F172A",stroke:"#6366F1",strokeWidth:"1.8"}),[14,22,30,38,46].map(g=>c.jsxs(ba.Fragment,{children:[c.jsx("rect",{x:"12",y:g,width:"3.5",height:"4.5",rx:"1",fill:"#818CF8",fillOpacity:"0.65"}),c.jsx("rect",{x:"48.5",y:g,width:"3.5",height:"4.5",rx:"1",fill:"#818CF8",fillOpacity:"0.65"})]},g)),c.jsx("circle",{cx:"32",cy:"27",r:"10",fill:"#4F46E5"}),c.jsx("path",{d:"M29.5 22.5L37.5 27L29.5 31.5V22.5Z",fill:"white"}),c.jsx("rect",{x:"19",y:"42",width:"26",height:"9",rx:"2.5",fill:"#6366F1"}),c.jsx("text",{x:"32",y:"48.6",fill:"white",fontSize:"7.2",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(["csv","xlsx","xls","tsv"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("path",{d:"M12 10C12 7.8 13.8 6 16 6H40L52 18V54C52 56.2 50.2 58 48 58H16C13.8 58 12 56.2 12 54V10Z",fill:"#ECFDF5"}),c.jsx("path",{d:"M40 6V15C40 16.7 41.3 18 43 18H52L40 6Z",fill:"#6EE7B7"}),c.jsx("rect",{x:"18",y:"21",width:"28",height:"20",rx:"2",fill:"white",stroke:"#10B981",strokeWidth:"1.6"}),c.jsx("rect",{x:"18",y:"21",width:"28",height:"5.5",fill:"#10B981"}),c.jsx("line",{x1:"27",y1:"21",x2:"27",y2:"41",stroke:"#10B981",strokeWidth:"1.2"}),c.jsx("line",{x1:"37",y1:"21",x2:"37",y2:"41",stroke:"#10B981",strokeWidth:"1.2"}),c.jsx("line",{x1:"18",y1:"31",x2:"46",y2:"31",stroke:"#10B981",strokeWidth:"1.2"}),c.jsx("line",{x1:"18",y1:"36",x2:"46",y2:"36",stroke:"#10B981",strokeWidth:"1.2"}),c.jsx("rect",{x:"16",y:"45",width:"32",height:"9",rx:"2.5",fill:"#059669"}),c.jsx("text",{x:"32",y:"51.7",fill:"white",fontSize:"7.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(["sql","db","sqlite","sqlite3"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("rect",{x:"11",y:"6",width:"42",height:"52",rx:"7",fill:"#0F172A",stroke:"#6366F1",strokeWidth:"1.8"}),c.jsx("ellipse",{cx:"32",cy:"17",rx:"13",ry:"4.5",fill:"#818CF8"}),c.jsx("path",{d:"M19 17V25C19 27.5 24.8 29.5 32 29.5C39.2 29.5 45 27.5 45 25V17",stroke:"#818CF8",strokeWidth:"2"}),c.jsx("path",{d:"M19 25V33C19 35.5 24.8 37.5 32 37.5C39.2 37.5 45 35.5 45 33V25",stroke:"#38BDF8",strokeWidth:"2"}),c.jsx("rect",{x:"17",y:"44",width:"30",height:"9",rx:"2.5",fill:"#4F46E5"}),c.jsx("text",{x:"32",y:"50.7",fill:"white",fontSize:"7.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(d==="pdf")return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("path",{d:"M12 10C12 7.8 13.8 6 16 6H40L52 18V54C52 56.2 50.2 58 48 58H16C13.8 58 12 56.2 12 54V10Z",fill:"#FFF1F2"}),c.jsx("path",{d:"M40 6V15C40 16.7 41.3 18 43 18H52L40 6Z",fill:"#FDA4AF"}),c.jsx("path",{d:"M22 36C27 25 32 19 34 23C36 27 25 37 39 34C44 33 41 28 33 30C25 32 20 39 22 36Z",stroke:"#E11D48",strokeWidth:"2.2",strokeLinecap:"round"}),c.jsx("rect",{x:"15",y:"44",width:"34",height:"9.5",rx:"2.5",fill:"#E11D48"}),c.jsx("text",{x:"32",y:"51",fill:"white",fontSize:"8",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:"PDF"})]});if(["doc","docx","rtf"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("path",{d:"M12 10C12 7.8 13.8 6 16 6H40L52 18V54C52 56.2 50.2 58 48 58H16C13.8 58 12 56.2 12 54V10Z",fill:"#EFF6FF"}),c.jsx("path",{d:"M40 6V15C40 16.7 41.3 18 43 18H52L40 6Z",fill:"#93C5FD"}),c.jsx("path",{d:"M19 23H45M19 29H45M19 35H38",stroke:"#2563EB",strokeWidth:"2.4",strokeLinecap:"round"}),c.jsx("rect",{x:"15",y:"44",width:"34",height:"9.5",rx:"2.5",fill:"#1D4ED8"}),c.jsx("text",{x:"32",y:"51",fill:"white",fontSize:"7.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(["ppt","pptx"].includes(d))return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("path",{d:"M12 10C12 7.8 13.8 6 16 6H40L52 18V54C52 56.2 50.2 58 48 58H16C13.8 58 12 56.2 12 54V10Z",fill:"#FFF7ED"}),c.jsx("path",{d:"M40 6V15C40 16.7 41.3 18 43 18H52L40 6Z",fill:"#FDBA74"}),c.jsx("circle",{cx:"27",cy:"30",r:"7",fill:"#FB923C"}),c.jsx("path",{d:"M27 23A7 7 0 0 1 34 30H27V23Z",fill:"#EA580C"}),c.jsx("rect",{x:"38",y:"25",width:"7",height:"12",rx:"1",fill:"#EA580C"}),c.jsx("rect",{x:"15",y:"44",width:"34",height:"9.5",rx:"2.5",fill:"#EA580C"}),c.jsx("text",{x:"32",y:"51",fill:"white",fontSize:"7.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:d.toUpperCase()})]});if(d==="txt"||d==="")return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("path",{d:"M12 10C12 7.8 13.8 6 16 6H40L52 18V54C52 56.2 50.2 58 48 58H16C13.8 58 12 56.2 12 54V10Z",fill:"#F8FAFC"}),c.jsx("path",{d:"M40 6V15C40 16.7 41.3 18 43 18H52L40 6Z",fill:"#CBD5E1"}),c.jsx("line",{x1:"19",y1:"12",x2:"19",y2:"54",stroke:"#F87171",strokeOpacity:"0.55",strokeWidth:"1.2"}),c.jsx("path",{d:"M23 22H45M23 28H45M23 34H42M23 40H36",stroke:"#64748B",strokeWidth:"2",strokeLinecap:"round"}),d==="txt"&&c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"20",y:"45",width:"24",height:"8.5",rx:"2",fill:"#475569"}),c.jsx("text",{x:"32",y:"51.2",fill:"white",fontSize:"7.2",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:"TXT"})]})]});const f={html:{accent:"#F97316",fold:"#EA580C",symbol:"</>",badge:"HTML"},htm:{accent:"#F97316",fold:"#EA580C",symbol:"</>",badge:"HTM"},css:{accent:"#0EA5E9",fold:"#0284C7",symbol:"{#}",badge:"CSS"},scss:{accent:"#EC4899",fold:"#DB2777",symbol:"$:",badge:"SCSS"},js:{accent:"#EAB308",fold:"#CA8A04",symbol:"JS",badge:"JS"},mjs:{accent:"#EAB308",fold:"#CA8A04",symbol:"ES",badge:"MJS"},ts:{accent:"#3B82F6",fold:"#2563EB",symbol:"TS",badge:"TS"},tsx:{accent:"#06B6D4",fold:"#0891B2",symbol:"⚛",badge:"TSX"},jsx:{accent:"#22D3EE",fold:"#06B6D4",symbol:"⚛",badge:"JSX"},py:{accent:"#FACC15",fold:"#2563EB",symbol:"def",badge:"PY"},json:{accent:"#10B981",fold:"#059669",symbol:"{:}",badge:"JSON"},md:{accent:"#94A3B8",fold:"#475569",symbol:"M↓",badge:"MD"},sh:{accent:"#22C55E",fold:"#15803D",symbol:"$_",badge:"SH",bg:"#050811"},zsh:{accent:"#22C55E",fold:"#15803D",symbol:"%_",badge:"ZSH",bg:"#050811"},yaml:{accent:"#A855F7",fold:"#7E22CE",symbol:"≡",badge:"YAML"},yml:{accent:"#A855F7",fold:"#7E22CE",symbol:"≡",badge:"YML"},toml:{accent:"#FB7185",fold:"#E11D48",symbol:"[]",badge:"TOML"},env:{accent:"#F59E0B",fold:"#B45309",symbol:"🔑",badge:"ENV"},xml:{accent:"#F59E0B",fold:"#D97706",symbol:"<>",badge:"XML"},log:{accent:"#34D399",fold:"#047857",symbol:"•••",badge:"LOG"},rs:{accent:"#FB923C",fold:"#C2410C",symbol:"fn",badge:"RS"},go:{accent:"#22D3EE",fold:"#0284C7",symbol:"go",badge:"GO"},cpp:{accent:"#60A5FA",fold:"#1D4ED8",symbol:"C++",badge:"CPP"},c:{accent:"#93C5FD",fold:"#2563EB",symbol:"C",badge:"C"},java:{accent:"#F87171",fold:"#DC2626",symbol:"JV",badge:"JAVA"},php:{accent:"#818CF8",fold:"#4F46E5",symbol:"<?",badge:"PHP"},rb:{accent:"#FB7185",fold:"#BE123C",symbol:"rb",badge:"RB"}};if(f[d]){const g=f[d];return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("path",{d:"M12 10C12 7.8 13.8 6 16 6H40L52 18V54C52 56.2 50.2 58 48 58H16C13.8 58 12 56.2 12 54V10Z",fill:g.bg||"#0F172A",stroke:g.accent,strokeOpacity:"0.6",strokeWidth:"1.5"}),c.jsx("path",{d:"M40 6V15C40 16.7 41.3 18 43 18H52L40 6Z",fill:g.fold}),c.jsx("text",{x:"32",y:"33",fill:g.accent,fontSize:"13.5",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:g.symbol}),c.jsx("line",{x1:"19",y1:"39",x2:"45",y2:"39",stroke:"#334155",strokeWidth:"2",strokeLinecap:"round"}),c.jsx("rect",{x:"16",y:"44",width:"32",height:"9.5",rx:"2.5",fill:g.accent}),c.jsx("text",{x:"32",y:"51",fill:"#020617",fontSize:"7.6",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:g.badge})]})}const p=y2(d),v=`hsl(${p}, 82%, 56%)`,_=`hsl(${p}, 65%, 24%)`,w=d.slice(0,6).toUpperCase();return c.jsxs("svg",{width:s,height:s,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("path",{d:"M12 10C12 7.8 13.8 6 16 6H40L52 18V54C52 56.2 50.2 58 48 58H16C13.8 58 12 56.2 12 54V10Z",fill:"#1E293B",stroke:v,strokeWidth:"1.6"}),c.jsx("path",{d:"M40 6V15C40 16.7 41.3 18 43 18H52L40 6Z",fill:v}),c.jsx("circle",{cx:"32",cy:"29",r:"8",fill:_,stroke:v,strokeWidth:"2"}),c.jsx("circle",{cx:"32",cy:"29",r:"2.8",fill:v}),c.jsx("rect",{x:"15",y:"44",width:"34",height:"9.5",rx:"2.5",fill:v}),c.jsxs("text",{x:"32",y:"50.8",fill:"#020617",fontSize:"7.2",fontWeight:"800",fontFamily:"JetBrains Mono, monospace",textAnchor:"middle",children:[".",w]})]})},Zd=({size:t=48})=>{const s=ba.useId().replace(/:/g,"");return c.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:`${s}-ff-bg`,x1:"12",y1:"8",x2:"54",y2:"56",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{offset:"0%",stopColor:"#FF980E"}),c.jsx("stop",{offset:"48%",stopColor:"#FF4F5E"}),c.jsx("stop",{offset:"100%",stopColor:"#9059FF"})]}),c.jsxs("radialGradient",{id:`${s}-ff-core`,cx:"50%",cy:"50%",r:"50%",children:[c.jsx("stop",{offset:"0%",stopColor:"#4F46E5"}),c.jsx("stop",{offset:"100%",stopColor:"#1E1B4B"})]})]}),c.jsx("circle",{cx:"32",cy:"32",r:"26",fill:`url(#${s}-ff-bg)`}),c.jsx("circle",{cx:"32",cy:"33",r:"14",fill:`url(#${s}-ff-core)`}),c.jsx("path",{d:"M46 18C52 24 53 34 49 42C44 51 32 55 22 50C14 46 10 36 13 26C15 19 21 15 27 14C22 19 22 26 26 30C29 33 35 33 39 29C43 26 44 22 46 18Z",fill:"#FFE27A",fillOpacity:"0.28"}),c.jsx("path",{d:"M19 20C23 13 33 10 42 13C49 16 54 24 53 33C51 25 45 21 38 22C33 23 29 26 27 30C24 26 22 23 19 20Z",fill:"#FFB84D",fillOpacity:"0.85"})]})},Ec=({size:t=48})=>c.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("rect",{x:"6",y:"8",width:"52",height:"48",rx:"13",fill:"#1C1C1F",stroke:"#52525B",strokeWidth:"1.5"}),c.jsx("path",{d:"M18 24L28 32L18 40",stroke:"#F4F4F5",strokeWidth:"3.6",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("line",{x1:"33",y1:"40",x2:"46",y2:"40",stroke:"#A1A1AA",strokeWidth:"3.6",strokeLinecap:"round"})]}),Qd=({size:t=48})=>c.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 64",fill:"none",className:"drop-shadow-md",children:[c.jsx("rect",{x:"6",y:"8",width:"52",height:"48",rx:"13",fill:"#27272A",stroke:"#52525B",strokeWidth:"1.5"}),c.jsx("rect",{x:"17",y:"18",width:"12",height:"12",rx:"3.5",fill:"#F4F4F5"}),c.jsx("rect",{x:"35",y:"18",width:"12",height:"12",rx:"3.5",fill:"#A1A1AA"}),c.jsx("rect",{x:"17",y:"34",width:"12",height:"12",rx:"3.5",fill:"#A1A1AA"}),c.jsx("rect",{x:"35",y:"34",width:"12",height:"12",rx:"3.5",fill:"#F4F4F5"})]}),Dg=26,Ad=26,b2=({desktopNodes:t,trashCount:s,meta:a,clipboard:l,selectedPaths:u,onSelectPaths:d,renamingPath:f,onSetRenamingPath:p,onRenameCommit:v,onOpenNode:_,primaryBrowserLabel:w="Chromium",useFirefoxIcon:g=!1,onOpenChromium:y,onOpenTerminal:T,onOpenAppStore:R,onOpenFolderWindow:I,onMoveNodesToFolder:Z,onTrashNodes:ue,onSaveIconPosition:pe,onUploadHostFiles:be,onContextMenu:ee,onExternalDropHover:me})=>{const ve=E.useRef(null),ae=E.useRef(null),ge=E.useRef(null),_e=E.useRef({id:"",time:0}),we=E.useRef(null),[ye,X]=E.useState(""),[Q,$]=E.useState(null),[j,z]=E.useState(null),[W,D]=E.useState(!1),[ce,C]=E.useState(null),[q,he]=E.useState(null),de=E.useRef(null),b=E.useMemo(()=>{switch(a.preferences.iconSize){case"sm":return{cellW:92,cellH:96,iconPx:40,textClass:"text-[11px]"};case"lg":return{cellW:120,cellH:122,iconPx:58,textClass:"text-xs"};default:return{cellW:104,cellH:108,iconPx:48,textClass:"text-xs"}}},[a.preferences.iconSize]),B=E.useMemo(()=>{const N=[...t],te=a.preferences.sortBy;return N.sort((ke,oe)=>te==="extension"?ke.isDir!==oe.isDir?ke.isDir?-1:1:(ke.extension||"").localeCompare(oe.extension||"","tr")||ke.name.localeCompare(oe.name,"tr"):te==="size"?oe.size-ke.size:te==="modifiedAt"?new Date(oe.modifiedAt).getTime()-new Date(ke.modifiedAt).getTime():ke.isDir!==oe.isDir?ke.isDir?-1:1:ke.name.localeCompare(oe.name,"tr")),N},[t,a.preferences.sortBy]),Y=E.useMemo(()=>{const N={},te=Math.max(340,(typeof window<"u"?window.innerHeight:860)-165),ke=Math.max(3,Math.floor(te/b.cellH));return B.forEach((oe,Ye)=>{const ze=a.preferences.autoArrange?void 0:a.positions[oe.path];if(ze)N[oe.path]=ze;else{const De=Ye+5,Te=Math.floor(De/ke),mt=De%ke;N[oe.path]={x:Dg+Te*b.cellW,y:Ad+mt*b.cellH}}}),N},[B,a.positions,a.preferences.autoArrange,b]);E.useEffect(()=>{if(!f)return;const N=t.find(te=>te.path===f);N&&(X(N.name),requestAnimationFrame(()=>{const te=ae.current;if(!te)return;te.focus();const ke=N.isDir?-1:N.name.lastIndexOf(".");ke>0?te.setSelectionRange(0,ke):te.select()}))},[f,t]);const G=N=>{const te=ye.trim();p(null),te&&v(N,te)},fe=()=>{we.current&&(clearTimeout(we.current),we.current=null)};E.useEffect(()=>{const N=ke=>{if(ce&&ke.pointerId===ce.pointerId){const gt={...ce,currX:ke.clientX,currY:ke.clientY};C(gt);const bt=Math.min(gt.startX,gt.currX),lt=Math.max(gt.startX,gt.currX),Nt=Math.min(gt.startY,gt.currY),Ui=Math.max(gt.startY,gt.currY),ts=[];for(const Pi of B){const Vt=Y[Pi.path];Vt&&Vt.x<lt&&Vt.x+b.cellW-8>bt&&Vt.y<Ui&&Vt.y+b.cellH-8>Nt&&ts.push(Pi.path)}d(ts);return}const oe=de.current;if(!oe||ke.pointerId!==oe.pointerId)return;const Ye=ke.clientX-oe.startMouseX,ze=ke.clientY-oe.startMouseY;if(!oe.moved&&Math.hypot(Ye,ze)>6&&(fe(),oe.moved=!0,he({node:oe.node,count:oe.dragPaths.length,initialX:oe.origX+Ye,initialY:oe.origY+ze})),!oe.moved)return;const De=Math.max(10,Math.min(window.innerWidth-b.cellW,oe.origX+Ye)),Te=Math.max(10,Math.min(window.innerHeight-84-b.cellH,oe.origY+ze));oe.currX=De,oe.currY=Te,ge.current&&(ge.current.style.transform=`translate3d(${De}px, ${Te}px, 0) scale(1.04)`);const mt=document.elementFromPoint(ke.clientX,ke.clientY);let _t=null;if(mt){const gt=mt.closest("[data-drop-folder]"),bt=mt.closest("[data-drop-browser]");if(gt){const lt=gt.getAttribute("data-drop-folder");lt&<!=="/"&&!oe.dragPaths.includes(lt)&&(_t=`folder:${lt}`)}else bt&&!oe.node.isDir&&(_t="browser")}oe.hoverTarget!==_t&&(oe.hoverTarget=_t,z(_t),me==null||me(_t))},te=ke=>{var Ye,ze;fe(),ce&&ke.pointerId===ce.pointerId&&C(null);const oe=de.current;if(oe&&ke.pointerId===oe.pointerId&&(de.current=null,he(null),z(null),me==null||me(null),oe.moved))if(oe.hoverTarget==="folder:/.trash")ue(oe.dragPaths);else if((Ye=oe.hoverTarget)!=null&&Ye.startsWith("folder:")){const De=oe.hoverTarget.slice(7);Z(oe.dragPaths,De)}else if(oe.hoverTarget==="browser"&&!oe.node.isDir)y(`file://${oe.node.path}`);else{const De=document.elementFromPoint(ke.clientX,ke.clientY);De&&((ze=ve.current)==null?void 0:ze.contains(De))&&pe(oe.node.path,{x:Math.round(oe.currX),y:Math.round(oe.currY)})}};return window.addEventListener("pointermove",N),window.addEventListener("pointerup",te),window.addEventListener("pointercancel",te),()=>{window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",te),window.removeEventListener("pointercancel",te)}},[ce,B,Y,b,d,ue,Z,y,pe,me]);const ne=E.useMemo(()=>new Set((l==null?void 0:l.mode)==="cut"?l.paths:[]),[l]),A=(N,te,ke)=>{if(te==="mouse")return;const oe=Date.now();_e.current.id===N&&oe-_e.current.time<360?(_e.current={id:"",time:0},ke()):_e.current={id:N,time:oe}},J=[{id:"sys-browser",label:w,row:0,dropFolder:void 0,renderIcon:()=>g?c.jsx(Zd,{size:b.iconPx}):c.jsx(Rl,{size:b.iconPx}),onOpen:()=>y(),onContext:(N,te)=>ee(N,te,{kind:"system-icon",dirPath:"/Desktop",systemAction:"open-chromium"})},{id:"sys-terminal",label:"Terminal",row:1,dropFolder:void 0,renderIcon:()=>c.jsx(Ec,{size:b.iconPx}),onOpen:()=>T(),onContext:(N,te)=>ee(N,te,{kind:"desktop",dirPath:"/Desktop"})},{id:"sys-apps",label:"Uygulamalar",row:2,dropFolder:void 0,renderIcon:()=>c.jsx(Qd,{size:b.iconPx}),onOpen:()=>R(),onContext:(N,te)=>ee(N,te,{kind:"desktop",dirPath:"/Desktop"})},{id:"sys-compute",label:"Dosyalar",row:3,dropFolder:void 0,renderIcon:()=>c.jsx(x2,{size:b.iconPx}),onOpen:()=>I("/"),onContext:(N,te)=>ee(N,te,{kind:"system-icon",dirPath:"/Desktop",systemAction:"open-compute"})},{id:"sys-trash",label:"Çöp Kutusu",row:4,dropFolder:"/.trash",renderIcon:()=>c.jsx($0,{size:b.iconPx,hasItems:s>0}),onOpen:()=>I("/.trash"),onContext:(N,te)=>ee(N,te,{kind:"recycle-bin-icon",dirPath:"/.trash"})}];return c.jsxs("div",{ref:ve,onPointerDown:N=>{if(N.target===ve.current&&!(N.pointerType==="mouse"&&N.button!==0)){if($(null),d([]),f&&p(null),N.pointerType==="touch"){fe();const te=N.clientX,ke=N.clientY;we.current=setTimeout(()=>{ee(te,ke,{kind:"desktop",dirPath:"/Desktop",spawnPos:{x:te-40,y:ke-40}})},520);return}C({pointerId:N.pointerId,startX:N.clientX,startY:N.clientY,currX:N.clientX,currY:N.clientY})}},onContextMenu:N=>{N.target===ve.current&&(N.preventDefault(),ee(N.clientX,N.clientY,{kind:"desktop",dirPath:"/Desktop",spawnPos:{x:N.clientX-40,y:N.clientY-40}}))},onDragOver:N=>{N.preventDefault(),N.dataTransfer.types.includes("Files")&&D(!0)},onDragLeave:N=>{N.target===ve.current&&D(!1)},onDrop:N=>{var ke;if(N.preventDefault(),D(!1),(ke=N.dataTransfer.files)!=null&&ke.length){be(N.dataTransfer.files);return}const te=N.dataTransfer.getData("application/x-runcompute-paths");if(te)try{const oe=JSON.parse(te);Z(oe,"/Desktop")}catch{}},className:"fixed inset-0 bottom-[72px] overflow-hidden select-none touch-none",children:[W&&c.jsx("div",{className:"absolute inset-6 rounded-3xl border-2 border-dashed border-white/40 bg-black/35 flex items-center justify-center z-40 pointer-events-none",children:c.jsx("div",{className:"px-6 py-3.5 rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] text-sm font-medium text-[var(--os-text)] shadow-2xl",children:"Dosyaları masaüstüne yüklemek için bırakın"})}),J.map(N=>{const te=Q===N.id,ke=N.id==="sys-trash"&&j==="folder:/.trash";return c.jsxs("div",{"data-drop-folder":N.dropFolder,style:{left:Dg,top:Ad+N.row*b.cellH,width:b.cellW-6},onPointerDown:oe=>{oe.stopPropagation(),!(oe.pointerType==="mouse"&&oe.button!==0)&&($(N.id),d([]),A(N.id,oe.pointerType,N.onOpen))},onDoubleClick:N.onOpen,onContextMenu:oe=>{oe.preventDefault(),oe.stopPropagation(),$(N.id),N.onContext(oe.clientX,oe.clientY)},className:`absolute flex flex-col items-center p-2 rounded-2xl cursor-pointer transition-colors ${ke?"bg-white/20 ring-2 ring-white/75 scale-105":te?"bg-black/18 ring-1 ring-white/25":"hover:bg-black/10"}`,children:[c.jsx("div",{className:"mb-1.5",children:N.renderIcon()}),c.jsx("span",{className:`${b.textClass} font-medium text-center px-1.5 py-0.5 rounded-md line-clamp-2 leading-tight ${te?"bg-white/90 text-neutral-950 font-semibold":"bg-transparent text-white desktop-label-shadow"}`,children:N.label})]},N.id)}),B.map(N=>{const te=Y[N.path]||{x:140,y:Ad},ke=(q==null?void 0:q.node.path)===N.path,oe=u.includes(N.path),Ye=f===N.path,ze=ne.has(N.path),De=j===`folder:${N.path}`;return c.jsxs("div",{"data-drop-folder":N.isDir?N.path:void 0,style:{left:te.x,top:te.y,width:b.cellW-6,zIndex:oe||Ye?10:1},onPointerDown:Te=>{if(Te.stopPropagation(),Te.pointerType==="mouse"&&Te.button!==0||Ye)return;$(null);let mt=u;if(Te.metaKey||Te.ctrlKey?(mt=oe?u.filter(_t=>_t!==N.path):[...u,N.path],d(mt)):oe||(mt=[N.path],d(mt)),A(N.path,Te.pointerType,()=>_(N)),Te.pointerType==="touch"){fe();const _t=Te.clientX,gt=Te.clientY;we.current=setTimeout(()=>{de.current=null;const bt=B.filter(lt=>mt.includes(lt.path));ee(_t,gt,{kind:"nodes",dirPath:"/Desktop",nodes:bt})},520)}de.current={pointerId:Te.pointerId,node:N,dragPaths:mt.includes(N.path)?mt:[N.path],startMouseX:Te.clientX,startMouseY:Te.clientY,origX:te.x,origY:te.y,currX:te.x,currY:te.y,moved:!1,hoverTarget:null}},onDoubleClick:Te=>{Te.stopPropagation(),Ye||_(N)},onContextMenu:Te=>{Te.preventDefault(),Te.stopPropagation(),$(null);const mt=oe?u:[N.path];d(mt);const _t=B.filter(gt=>mt.includes(gt.path));ee(Te.clientX,Te.clientY,{kind:"nodes",dirPath:"/Desktop",nodes:_t})},className:`absolute flex flex-col items-center p-2 rounded-2xl cursor-pointer transition-opacity ${De?"bg-white/20 ring-2 ring-white/75 scale-105":oe?"bg-black/18 ring-1 ring-white/25":"hover:bg-black/10"} ${ze||ke?"opacity-35":""}`,children:[c.jsx("div",{className:"mb-1.5",children:c.jsx(Ji,{node:N,size:b.iconPx})}),Ye?c.jsx("input",{ref:ae,value:ye,onPointerDown:Te=>Te.stopPropagation(),onClick:Te=>Te.stopPropagation(),onChange:Te=>X(Te.target.value),onBlur:()=>G(N.path),onKeyDown:Te=>{Te.stopPropagation(),Te.key==="Enter"&&G(N.path),Te.key==="Escape"&&p(null)},className:"w-full px-1.5 py-0.5 rounded-md bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] text-[11px] text-center text-[var(--os-text)] focus:outline-none shadow-lg"}):c.jsx("span",{className:`${b.textClass} font-medium text-center px-1.5 py-0.5 rounded-md line-clamp-2 break-all leading-tight ${oe?"bg-white/90 text-neutral-950 font-semibold":"bg-transparent text-white desktop-label-shadow"}`,children:N.name})]},N.path)}),ce&&c.jsx("div",{style:{left:Math.min(ce.startX,ce.currX),top:Math.min(ce.startY,ce.currY),width:Math.abs(ce.currX-ce.startX),height:Math.abs(ce.currY-ce.startY)},className:"fixed z-30 bg-white/15 border border-white/50 rounded-md pointer-events-none"}),q&&typeof document<"u"&&A0.createPortal(c.jsxs("div",{ref:ge,style:{left:0,top:0,width:b.cellW-6,transform:`translate3d(${q.initialX}px, ${q.initialY}px, 0) scale(1.04)`},className:"fixed z-[9999] pointer-events-none flex flex-col items-center p-2 rounded-2xl",children:[c.jsxs("div",{className:"relative mb-1.5",children:[c.jsx(Ji,{node:q.node,size:b.iconPx}),q.count>1&&c.jsx("span",{className:"absolute -top-1 -right-2 px-1.5 py-0.5 rounded-full bg-white text-neutral-950 text-[10px] font-bold shadow",children:q.count})]}),c.jsx("span",{className:"text-xs font-medium text-center text-white desktop-label-shadow line-clamp-1 break-all px-1",children:q.node.name})]}),document.body)]})},Z0=E.createContext(null);function Q0(){return E.useContext(Z0)}const et=14,va=76,S2=({win:t,isFocused:s,isDropHighlighted:a=!1,dropDatasetProps:l,onFocus:u,onClose:d,onMinimize:f,onToggleMaximize:p,onUpdateBounds:v,headerContent:_,overlayTitlebar:w=!1,minWidth:g=380,minHeight:y=280,children:T})=>{const R=E.useRef(null),[I,Z]=E.useState(null),[ue,pe]=E.useState(!1),[be,ee]=E.useState({top:0,height:35}),me=E.useRef(null),ve=E.useRef(t);ve.current=t;const ae=E.useRef(null),ge=E.useCallback(()=>{const C=ae.current;if(!C)return;ae.current=null,pe(!1);const q=window.innerWidth,he=window.innerHeight-va,de=me.current;if(me.current=null,Z(null),C.mode==="drag")if(de==="max")v(t.id,{maximized:!0,snap:null});else if(de==="left")v(t.id,{maximized:!1,snap:"left",x:et,y:et,width:Math.round((q-et*3)/2),height:he-et});else if(de==="right"){const b=Math.round((q-et*3)/2);v(t.id,{maximized:!1,snap:"right",x:q-b-et,y:et,width:b,height:he-et})}else C.wasMaximized||v(t.id,{maximized:!1,snap:null,x:Math.round(C.currX),y:Math.round(C.currY),width:Math.round(C.currW)});else C.mode==="resize"&&v(t.id,{maximized:!1,snap:null,x:Math.round(C.currX),y:Math.round(C.currY),width:Math.round(C.currW),height:Math.round(C.currH)})},[t.id,v]);E.useEffect(()=>{const C=(B,Y,G,fe)=>{const ne=ae.current,A=R.current;if(!ne||!A)return;const J=window.innerWidth,N=window.innerHeight-va,te=B-ne.startX,ke=Y-ne.startY;if(ne.mode==="drag"){if(ne.wasMaximized&&Math.hypot(te,ke)>8){ne.wasMaximized=!1;const De=Math.min(ne.origW,J-et*2);ne.origX=Math.max(et,Math.min(J-De-et,G-De/2)),ne.origY=Math.max(et,fe-18),ne.currW=De,ne.startX=B,ne.startY=Y,A.style.width=`${De}px`,A.style.height=`${ne.origH}px`}if(ne.wasMaximized)return;const oe=ne.origX+(B-ne.startX),Ye=Math.max(et-6,Math.min(N-36,ne.origY+(Y-ne.startY)));ne.currX=oe,ne.currY=Ye,A.style.left=`${oe}px`,A.style.top=`${Ye}px`;let ze=null;fe<=10?ze="max":G<=12?ze="left":G>=J-12&&(ze="right"),me.current!==ze&&(me.current=ze,Z(ze))}else if(ne.mode==="resize"){let oe=ne.origX,Ye=ne.origY,ze=ne.origW,De=ne.origH;if(ne.dir.includes("e")&&(ze=Math.max(g,ne.origW+te)),ne.dir.includes("s")&&(De=Math.max(y,ne.origH+ke)),ne.dir.includes("w")){const Te=Math.max(g,ne.origW-te);oe=ne.origX+(ne.origW-Te),ze=Te}if(ne.dir.includes("n")){const Te=Math.max(y,ne.origH-ke);Ye=Math.max(et-6,ne.origY+(ne.origH-Te)),De=Te}ne.currX=oe,ne.currY=Ye,ne.currW=ze,ne.currH=De,A.style.left=`${oe}px`,A.style.top=`${Ye}px`,A.style.width=`${ze}px`,A.style.height=`${De}px`}},q=B=>{const Y=ae.current;Y&&(Y.pointerId!==null&&B.pointerId!==Y.pointerId||(Y.mode==="drag"&&Y.useScreenCoords?C(B.screenX,B.screenY,B.clientX,B.clientY):C(B.clientX,B.clientY,B.clientX,B.clientY)))},he=B=>{const Y=ae.current;Y&&(Y.pointerId!==null&&B.pointerId!==Y.pointerId||ge())},de=B=>{const Y=ae.current;if(!(!Y||Y.mode!=="drag"||!Y.useScreenCoords)){if(B.buttons===0){ge();return}C(B.screenX,B.screenY,B.clientX,B.clientY)}},b=()=>{const B=ae.current;!B||B.mode!=="drag"||!B.useScreenCoords||ge()};return window.addEventListener("pointermove",q),window.addEventListener("pointerup",he),window.addEventListener("pointercancel",he),window.addEventListener("mousemove",de),window.addEventListener("mouseup",b),()=>{window.removeEventListener("pointermove",q),window.removeEventListener("pointerup",he),window.removeEventListener("pointercancel",he),window.removeEventListener("mousemove",de),window.removeEventListener("mouseup",b)}},[g,y,ge]);const _e=E.useCallback(C=>{const q=ve.current;u(q.id),pe(!0),ae.current={mode:"drag",pointerId:null,useScreenCoords:!0,sourceWindow:C.sourceWindow||null,startX:C.screenX,startY:C.screenY,origX:q.x,origY:q.y,origW:q.width,origH:q.height,currX:q.x,currY:q.y,currW:q.width,currH:q.height,wasMaximized:q.maximized};const he=C.sourceWindow;if(he&&he!==window){const de=Y=>{const G=ae.current,fe=R.current;if(!G||G.mode!=="drag"||!fe)return;if(Y.buttons===0){B(),ge();return}const ne=fe.getBoundingClientRect(),A=ne.left+Y.clientX,J=ne.top+Y.clientY,N=window.innerWidth,te=window.innerHeight-va,ke=Y.screenX-G.startX,oe=Y.screenY-G.startY;if(G.wasMaximized&&Math.hypot(ke,oe)>8){G.wasMaximized=!1;const Te=Math.min(G.origW,N-et*2);G.origX=Math.max(et,Math.min(N-Te-et,A-Te/2)),G.origY=Math.max(et,J-18),G.currW=Te,G.startX=Y.screenX,G.startY=Y.screenY,fe.style.width=`${Te}px`,fe.style.height=`${G.origH}px`}if(G.wasMaximized)return;const Ye=G.origX+(Y.screenX-G.startX),ze=Math.max(et-6,Math.min(te-36,G.origY+(Y.screenY-G.startY)));G.currX=Ye,G.currY=ze,fe.style.left=`${Ye}px`,fe.style.top=`${ze}px`;let De=null;J<=10?De="max":A<=12?De="left":A>=N-12&&(De="right"),me.current!==De&&(me.current=De,Z(De))},b=()=>{B(),ge()},B=()=>{try{he.removeEventListener("mousemove",de,!0),he.removeEventListener("mouseup",b,!0)}catch{}};he.addEventListener("mousemove",de,!0),he.addEventListener("mouseup",b,!0)}},[u,ge]),we=E.useCallback((C,q)=>{ee(he=>he.top===C&&he.height===q?he:{top:C,height:q})},[]),ye=E.useCallback((C,q,he)=>{const de=ve.current,b=window.innerWidth,B=window.innerHeight-va,Y=Math.max(g,b-et*2),G=Math.max(y,B-et),fe=w?0:42,ne=Math.max(g,Math.min(Y,Math.round(C))),A=Math.max(y,Math.min(G,Math.round(q+fe))),J=he!=null&&he.center?Math.max(et,Math.round((b-ne)/2)):Math.max(et,Math.min(b-ne-et,de.x)),N=he!=null&&he.center?Math.max(et,Math.round((B-A)/2)):Math.max(et,Math.min(B-A,de.y));v(de.id,{maximized:!1,snap:null,x:J,y:N,width:ne,height:A})},[g,y,w,v]),X=E.useCallback(C=>{v(ve.current.id,{maximized:C,snap:null})},[v]),Q=E.useMemo(()=>({startExternalDrag:_e,toggleMaximize:()=>p(t.id),setMaximized:X,resizeFrame:ye,focusWindow:()=>u(t.id),setTitlebarMetrics:we}),[_e,p,X,ye,u,we,t.id]);if(t.minimized)return null;const $=typeof window<"u"?window.innerWidth:1440,j=(typeof window<"u"?window.innerHeight:900)-va,z=t.maximized?{left:et,top:et,width:Math.max(320,$-et*2),height:Math.max(240,j-et),zIndex:t.zIndex}:{left:t.x,top:t.y,width:t.width,height:t.height,zIndex:t.zIndex},W=C=>{C.button!==0&&C.pointerType==="mouse"||C.target.closest('[data-no-drag="true"]')||(u(t.id),pe(!0),ae.current={mode:"drag",pointerId:C.pointerId,useScreenCoords:!1,startX:C.clientX,startY:C.clientY,origX:t.x,origY:t.y,origW:t.width,origH:t.height,currX:t.x,currY:t.y,currW:t.width,currH:t.height,wasMaximized:t.maximized})},D=C=>q=>{q.stopPropagation(),q.preventDefault(),u(t.id),pe(!0),ae.current={mode:"resize",dir:C,pointerId:q.pointerId,startX:q.clientX,startY:q.clientY,origX:t.x,origY:t.y,origW:t.width,origH:t.height,currX:t.x,currY:t.y,currW:t.width,currH:t.height}},ce=(C=!1)=>c.jsxs("div",{"data-no-drag":"true","data-testid":w?"vscode-traffic-lights":void 0,className:"group flex items-center gap-2 shrink-0",children:[c.jsx("button",{onClick:()=>d(t.id),title:"Kapat","data-testid":w?"vscode-close-btn":void 0,className:`${C?"w-3 h-3 ring-1 ring-black/15":"w-3.5 h-3.5"} rounded-full bg-[#ff5f57] flex items-center justify-center text-black/70 hover:brightness-110`,children:c.jsx(Hl,{className:"w-2.5 h-2.5 opacity-0 group-hover:opacity-100 stroke-[2.8]"})}),c.jsx("button",{onClick:()=>f(t.id),title:"Küçült","data-testid":w?"vscode-minimize-btn":void 0,className:`${C?"w-3 h-3 ring-1 ring-black/15":"w-3.5 h-3.5"} rounded-full bg-[#febc2e] flex items-center justify-center text-black/70 hover:brightness-110`,children:c.jsx(PS,{className:"w-2.5 h-2.5 opacity-0 group-hover:opacity-100 stroke-[2.8]"})}),c.jsx("button",{onClick:()=>p(t.id),title:t.maximized?"Önceki Boyut":"Büyüt","data-testid":w?"vscode-maximize-btn":void 0,className:`${C?"w-3 h-3 ring-1 ring-black/15":"w-3.5 h-3.5"} rounded-full bg-[#28c840] flex items-center justify-center text-black/70 hover:brightness-110`,children:c.jsx(Wd,{className:"w-2 h-2 opacity-0 group-hover:opacity-100 stroke-[2.8]"})})]});return c.jsxs(Z0.Provider,{value:Q,children:[I&&c.jsx("div",{style:{zIndex:t.zIndex-1,left:I==="right"?"50%":et,top:et,width:I==="max"?`calc(100vw - ${et*2}px)`:`calc(50vw - ${et*1.5}px)`,height:`calc(100vh - ${va+et}px)`},className:"fixed rounded-2xl bg-[var(--os-active)] border border-[var(--os-border-strong)] pointer-events-none"}),c.jsxs("div",{ref:R,style:{...z,boxShadow:s?"var(--os-shadow)":"var(--os-dock-shadow)"},onPointerDown:()=>u(t.id),...l||{},className:`fixed flex flex-col overflow-hidden rounded-2xl bg-[var(--os-surface)] text-[var(--os-text)] transition-shadow ${a?"ring-2 ring-[var(--os-accent-bg)]":s?"border border-[var(--os-border-strong)]":"border border-[var(--os-border)] opacity-[0.97]"}`,children:[!t.maximized&&c.jsxs(c.Fragment,{children:[c.jsx("div",{onPointerDown:D("n"),className:"absolute top-0 left-3 right-3 h-1.5 cursor-ns-resize z-30 touch-none"}),c.jsx("div",{onPointerDown:D("s"),className:"absolute bottom-0 left-3 right-3 h-2 cursor-ns-resize z-30 touch-none"}),c.jsx("div",{onPointerDown:D("w"),className:"absolute left-0 top-3 bottom-3 w-2 cursor-ew-resize z-30 touch-none"}),c.jsx("div",{onPointerDown:D("e"),className:"absolute right-0 top-3 bottom-3 w-2 cursor-ew-resize z-30 touch-none"}),c.jsx("div",{onPointerDown:D("nw"),className:"absolute top-0 left-0 w-3.5 h-3.5 cursor-nwse-resize z-40 touch-none"}),c.jsx("div",{onPointerDown:D("ne"),className:"absolute top-0 right-0 w-3.5 h-3.5 cursor-nesw-resize z-40 touch-none"}),c.jsx("div",{onPointerDown:D("sw"),className:"absolute bottom-0 left-0 w-4 h-4 cursor-nesw-resize z-40 touch-none"}),c.jsx("div",{onPointerDown:D("se"),className:"absolute bottom-0 right-0 w-4 h-4 cursor-nwse-resize z-40 touch-none"})]}),w?c.jsx("div",{style:{top:be.top,height:be.height},className:"absolute left-3.5 z-30 flex items-center select-none pointer-events-auto",children:ce(!0)}):c.jsxs("div",{onPointerDown:W,onDoubleClick:()=>p(t.id),className:"flex items-center gap-3 min-h-[42px] px-3.5 select-none touch-none bg-[var(--os-surface-2)] border-b border-[var(--os-border)]",children:[ce(!1),_?c.jsx("div",{className:"flex-1 min-w-0 flex items-center",children:_}):c.jsx("div",{className:"flex-1 text-center pr-12 min-w-0",children:c.jsx("span",{className:"text-xs font-medium text-[var(--os-text)] truncate",children:t.title})})]}),c.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col overflow-hidden",children:[ue&&c.jsx("div",{className:"absolute inset-0 z-50 cursor-grabbing"}),T]})]})]})};function Tl(t){if(!t||t<=0)return"0 B";const s=["B","KB","MB","GB","TB"],a=Math.min(s.length-1,Math.floor(Math.log(t)/Math.log(1024))),l=t/Math.pow(1024,a);return`${l<10&&a>0?l.toFixed(1):Math.round(l)} ${s[a]}`}function w2(t){const s=Math.floor(t/3600),a=Math.floor(t%3600/60),l=t%60;return s>0?`${s} sa ${a} dk`:a>0?`${a} dk ${l} sn`:`${l} sn`}function Jd(t){try{return new Date(t).toLocaleString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}const C2={html:"Chromium HTML Web Belgesi",htm:"Chromium HTML Web Belgesi",css:"Basamaklı Stil Şablonu (CSS)",scss:"SASS Stil Şablonu",js:"JavaScript Betik Dosyası",mjs:"ES Modül JavaScript Dosyası",ts:"TypeScript Kaynak Kodu",tsx:"TypeScript React Bileşeni",jsx:"JavaScript React Bileşeni",py:"Python Betiği",sh:"Kabuk (Shell) Komut Betiği",zsh:"Zsh Kabuk Betiği",json:"JSON Veri Yapılandırma Dosyası",yaml:"YAML Yapılandırma Dosyası",yml:"YAML Yapılandırma Dosyası",toml:"TOML Yapılandırma Dosyası",env:"Ortam Değişkenleri Dosyası (.env)",xml:"XML İşaretleme Belgesi",csv:"Virgülle Ayrılmış Veri Tablosu (CSV)",xlsx:"Elektronik Tablo Çalışma Kitabı",xls:"Elektronik Tablo Dosyası",sql:"SQL Veritabanı Sorgu Betiği",db:"Veritabanı Dosyası",sqlite:"SQLite Veritabanı Dosyası",txt:"Düz Metin Belgesi",md:"Markdown Zengin Metin Belgesi",log:"Sistem Günlük Kaydı (Log)",pdf:"Taşınabilir Belge Biçimi (PDF)",doc:"Kelime İşlemci Belgesi",docx:"Kelime İşlemci Belgesi (DOCX)",ppt:"Sunum Dosyası",pptx:"Sunum Dosyası (PPTX)",png:"PNG Görsel Dosyası",jpg:"JPEG Fotoğraf Dosyası",jpeg:"JPEG Fotoğraf Dosyası",gif:"Hareketli GIF Görseli",webp:"WebP Görsel Dosyası",svg:"Ölçeklenebilir Vektör Grafiği (SVG)",ico:"Simge Dosyası (ICO)",mp3:"MP3 Ses Dosyası",wav:"WAV Kayıpsız Ses Dosyası",ogg:"OGG Ses Dosyası",flac:"FLAC Yüksek Çözünürlüklü Ses",mp4:"MP4 Video Dosyası",webm:"WebM Video Akışı",mov:"QuickTime Video Dosyası",mkv:"Matroska Video Kapsayıcısı",zip:"Sıkıştırılmış ZIP Arşivi",rar:"RAR Sıkıştırılmış Arşiv","7z":"7-Zip Sıkıştırılmış Arşiv",tar:"TAR Arşiv Paketi",gz:"GZip Sıkıştırılmış Paket","tar.gz":"Sıkıştırılmış TAR.GZ Arşivi",exe:"Çalıştırılabilir Uygulama Paketi (EXE)",dmg:"macOS Disk Kalıbı Paketi",app:"Uygulama Paketi",deb:"Debian Sistem Paketi",iso:"Optik Disk Kalıbı (ISO)",rs:"Rust Kaynak Kodu",go:"Go Kaynak Kodu",cpp:"C++ Kaynak Kodu",c:"C Kaynak Kodu",java:"Java Kaynak Kodu",php:"PHP Betik Dosyası",rb:"Ruby Betik Dosyası"};function Cn(t){return t.isDir?t.path==="/.trash"?"Sistem Geri Dönüşüm Kutusu":"Dosya Klasörü":t.extension?C2[t.extension]||`${t.extension.toUpperCase()} Dosyası (.${t.extension})`:"Uzantısız Veri Dosyası"}function vc(t){return new Set(["","txt","md","html","htm","css","scss","js","mjs","ts","tsx","jsx","py","json","yaml","yml","toml","ini","env","gitignore","xml","svg","csv","sql","sh","zsh","bash","log","rs","go","cpp","c","h","java","php","rb"]).has(t.toLowerCase())}function J0(t){return["png","jpg","jpeg","gif","webp","svg","ico","bmp"].includes(t.toLowerCase())}function k2(t){return["mp4","webm","ogg","mov"].includes(t.toLowerCase())}function E2(t){return["mp3","wav","ogg","flac","m4a"].includes(t.toLowerCase())}function xn(t,s){switch(t){case"/":return"Bu Compute";case"/Desktop":return"Masaüstü";case"/Documents":return"Belgeler";case"/Downloads":return"İndirilenler";case"/Projects":return"Projeler";case"/.trash":return"Geri Dönüşüm Kutusu";default:return s}}const N2=[{path:"/",label:"Disk",icon:Y0},{path:"/Desktop",label:"Masaüstü",icon:q0},{path:"/Documents",label:"Belgeler",icon:Rc},{path:"/Downloads",label:"İndirilenler",icon:Al},{path:"/Projects",label:"Projeler",icon:z0},{path:"/.trash",label:"Çöp Kutusu",icon:gn}],M2=({initialPath:t,allNodes:s,clipboard:a,externalDropTarget:l,renamingPath:u,onSetRenamingPath:d,onRenameCommit:f,onOpenNode:p,onPathChangeTitle:v,onCreateFolder:_,onOpenCustomFileDialog:w,onUploadFiles:g,onMoveNodes:y,onTrashNodes:T,onRestoreNodes:R,onEmptyTrash:I,onContextMenu:Z})=>{const[ue,pe]=E.useState([t||"/Desktop"]),[be,ee]=E.useState(0),[me,ve]=E.useState(""),[ae,ge]=E.useState("grid"),[_e,we]=E.useState([]),[ye,X]=E.useState(null),[Q,$]=E.useState(""),j=E.useRef(null),z=E.useRef(null),W=E.useRef({path:"",time:0}),D=ue[be]||"/Desktop";E.useEffect(()=>{const A=xn(D,D.split("/").filter(Boolean).pop()||"Dosyalar");v(A,D),we([])},[D]);const ce=A=>{const J=A||"/";if(J===D)return;const N=[...ue.slice(0,be+1),J];pe(N),ee(N.length-1),ve("")},C=E.useMemo(()=>{const A=me.trim().toLowerCase();let J;return A?J=s.filter(N=>D!=="/"&&!N.path.startsWith(D+"/")||D!=="/.trash"&&N.path.startsWith("/.trash")?!1:N.name.toLowerCase().includes(A)||N.extension.toLowerCase().includes(A)||Cn(N).toLowerCase().includes(A)):D==="/"?J=s.filter(N=>N.parentPath==="/"):J=s.filter(N=>N.parentPath===D),[...J].sort((N,te)=>N.isDir!==te.isDir?N.isDir?-1:1:N.name.localeCompare(te.name,"tr"))},[s,D,me]);E.useEffect(()=>{if(!u)return;const A=s.find(J=>J.path===u);A&&($(A.name),requestAnimationFrame(()=>{const J=z.current;if(!J)return;J.focus();const N=A.isDir?-1:A.name.lastIndexOf(".");N>0?J.setSelectionRange(0,N):J.select()}))},[u,s]);const q=A=>{const J=Q.trim();d(null),J&&f(A,J)},he=E.useMemo(()=>{if(D==="/")return[{label:"Disk",path:"/"}];const A=D.split("/").filter(Boolean),J=[{label:"Disk",path:"/"}];let N="";for(const te of A)N+=`/${te}`,J.push({label:xn(N,te),path:N});return J},[D]),de=s.find(A=>A.path==="/.trash"),b=A=>{u!==A.path&&(A.isDir?ce(A.path):p(A))},B=(A,J)=>{if(A.stopPropagation(),!(A.pointerType==="mouse"&&A.button!==0)&&(A.metaKey||A.ctrlKey?we(N=>N.includes(J.path)?N.filter(te=>te!==J.path):[...N,J.path]):we([J.path]),A.pointerType!=="mouse")){const N=Date.now();W.current.path===J.path&&N-W.current.time<360?(W.current={path:"",time:0},b(J)):W.current={path:J.path,time:N}}},Y=(A,J)=>{A.preventDefault(),A.stopPropagation();const N=_e.includes(J.path)?_e:[J.path];we(N);const te=s.filter(ke=>N.includes(ke.path));Z(A.clientX,A.clientY,{kind:"nodes",dirPath:D,nodes:te})},G=(A,J)=>{if(A.preventDefault(),A.stopPropagation(),X(null),A.dataTransfer.files&&A.dataTransfer.files.length>0){g(J==="/"?"/Desktop":J,A.dataTransfer.files);return}const N=A.dataTransfer.getData("application/x-runcompute-paths");if(N)try{const te=JSON.parse(N);if(J==="/.trash"){const ke=s.filter(oe=>te.includes(oe.path));T(ke)}else J!=="/"&&y(te,J)}catch{}},fe=E.useMemo(()=>new Set((a==null?void 0:a.mode)==="cut"?a.paths:[]),[a]),ne=l===`folder:${D}`;return c.jsxs("div",{className:"flex-1 min-h-0 flex flex-col bg-[var(--os-surface)] text-[var(--os-text)] select-none",children:[c.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 py-2.5 bg-[var(--os-surface-2)] border-b border-[var(--os-border)]",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{disabled:be<=0,onClick:()=>ee(A=>Math.max(0,A-1)),className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] disabled:opacity-30 text-[var(--os-text-secondary)]",title:"Geri",children:c.jsx(R0,{className:"w-4 h-4"})}),c.jsx("button",{disabled:be>=ue.length-1,onClick:()=>ee(A=>Math.min(ue.length-1,A+1)),className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] disabled:opacity-30 text-[var(--os-text-secondary)]",title:"İleri",children:c.jsx(Uf,{className:"w-4 h-4"})}),c.jsx("button",{disabled:D==="/",onClick:()=>{const A=D.split("/").slice(0,-1).join("/")||"/";ce(A)},className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] disabled:opacity-30 text-[var(--os-text-secondary)]",title:"Üst Klasör",children:c.jsx($b,{className:"w-4 h-4"})})]}),c.jsx("div",{className:"flex-1 min-w-0 flex items-center gap-1 px-3 py-1.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] overflow-x-auto text-xs",children:he.map((A,J)=>c.jsxs(ba.Fragment,{children:[J>0&&c.jsx(Bc,{className:"w-3.5 h-3.5 text-[var(--os-text-subtle)] shrink-0"}),c.jsx("button",{onClick:()=>ce(A.path),className:`px-1.5 py-0.5 rounded-md hover:bg-[var(--os-hover)] truncate ${J===he.length-1?"text-[var(--os-text)] font-semibold":"text-[var(--os-text-muted)]"}`,children:A.label})]},A.path))}),c.jsxs("div",{className:"relative w-44 sm:w-52 shrink-0",children:[c.jsx(Ff,{className:"w-3.5 h-3.5 text-[var(--os-text-subtle)] absolute left-3 top-1/2 -translate-y-1/2"}),c.jsx("input",{type:"text",value:me,onChange:A=>ve(A.target.value),placeholder:"Ara...",className:"w-full pl-8 pr-3 py-1.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] focus:border-[var(--os-border-strong)] focus:outline-none text-xs text-[var(--os-text)]"})]})]}),c.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2 bg-[var(--os-surface-2)] border-b border-[var(--os-border)] text-xs",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[D!=="/"&&D!=="/.trash"&&c.jsxs(c.Fragment,{children:[c.jsxs("button",{onClick:()=>_(D),className:"px-3 py-1.5 rounded-lg bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text)] flex items-center gap-1.5 font-medium transition-colors",children:[c.jsx(U0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yeni Klasör"})]}),c.jsxs("button",{onClick:()=>w(D),className:"px-3 py-1.5 rounded-lg bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text)] flex items-center gap-1.5 font-medium transition-colors",children:[c.jsx(H0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yeni Dosya"})]}),c.jsxs("button",{onClick:()=>{var A;return(A=j.current)==null?void 0:A.click()},className:"px-3 py-1.5 rounded-lg bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text-secondary)] flex items-center gap-1.5 transition-colors",children:[c.jsx(V0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yükle"})]}),c.jsx("input",{ref:j,type:"file",multiple:!0,className:"hidden",onChange:A=>{var J;(J=A.target.files)!=null&&J.length&&(g(D,A.target.files),A.target.value="")}})]}),D==="/.trash"&&c.jsxs(c.Fragment,{children:[c.jsxs("button",{disabled:!C.length,onClick:()=>R(C),className:"px-3 py-1.5 rounded-lg bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text)] flex items-center gap-1.5 disabled:opacity-40",children:[c.jsx(F0,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Tümünü Geri Yükle"})]}),c.jsxs("button",{disabled:!C.length,onClick:I,className:"px-3 py-1.5 rounded-lg bg-red-500/15 hover:bg-red-500/25 text-red-500 flex items-center gap-1.5 disabled:opacity-40",children:[c.jsx(gn,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Boşalt"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-0.5 bg-[var(--os-bg)] p-0.5 rounded-lg border border-[var(--os-border)]",children:[c.jsx("button",{onClick:()=>ge("grid"),className:`p-1.5 rounded-md ${ae==="grid"?"bg-[var(--os-surface-3)] text-[var(--os-text)]":"text-[var(--os-text-subtle)] hover:text-[var(--os-text)]"}`,title:"Simgeler",children:c.jsx(Yf,{className:"w-3.5 h-3.5"})}),c.jsx("button",{onClick:()=>ge("details"),className:`p-1.5 rounded-md ${ae==="details"?"bg-[var(--os-surface-3)] text-[var(--os-text)]":"text-[var(--os-text-subtle)] hover:text-[var(--os-text)]"}`,title:"Liste",children:c.jsx(BS,{className:"w-3.5 h-3.5"})})]})]}),c.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[c.jsx("div",{className:"w-40 sm:w-44 shrink-0 bg-[var(--os-sidebar)] border-r border-[var(--os-border)] p-2.5 flex flex-col justify-between",children:c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("div",{className:"px-2.5 py-1 text-[10px] font-medium uppercase tracking-wider text-[var(--os-text-subtle)]",children:"Konumlar"}),N2.map(A=>{const J=D===A.path,N=ye===A.path||l===`folder:${A.path}`,te=A.icon;return c.jsxs("button",{"data-drop-folder":A.path!=="/"?A.path:void 0,onClick:()=>ce(A.path),onDragOver:ke=>{A.path!=="/"&&(ke.preventDefault(),X(A.path))},onDragLeave:()=>X(null),onDrop:ke=>G(ke,A.path),className:`w-full px-2.5 py-2 rounded-xl flex items-center justify-between text-xs transition-colors ${N?"bg-[var(--os-active)] ring-1 ring-[var(--os-border-strong)] text-[var(--os-text)]":J?"bg-[var(--os-surface-3)] text-[var(--os-text)] font-medium":"text-[var(--os-text-muted)] hover:bg-[var(--os-hover)] hover:text-[var(--os-text)]"}`,children:[c.jsxs("span",{className:"flex items-center gap-2 truncate",children:[c.jsx(te,{className:"w-3.5 h-3.5 shrink-0"}),c.jsx("span",{className:"truncate",children:A.label})]}),A.path==="/.trash"&&((de==null?void 0:de.childCount)||0)>0&&c.jsx("span",{className:"px-1.5 py-0.2 rounded-full bg-[var(--os-active)] text-[var(--os-text-secondary)] text-[10px] font-mono",children:de==null?void 0:de.childCount})]},A.path)})]})}),c.jsx("div",{"data-drop-folder":D!=="/"?D:void 0,onClick:()=>{we([]),u&&d(null)},onContextMenu:A=>{D!=="/"&&(A.preventDefault(),Z(A.clientX,A.clientY,{kind:"folder-bg",dirPath:D}))},onDragOver:A=>{D!=="/"&&A.preventDefault()},onDrop:A=>{D!=="/"&&G(A,D)},className:`flex-1 min-w-0 overflow-y-auto p-4 transition-colors ${ne?"bg-[var(--os-hover)] ring-2 ring-inset ring-[var(--os-border-strong)]":""}`,children:C.length===0?c.jsx("div",{className:"h-full flex items-center justify-center text-[var(--os-text-subtle)] text-xs",children:me?"Eşleşen öğe bulunamadı.":D==="/.trash"?"Çöp Kutusu boş.":"Bu klasör boş."}):ae==="grid"?c.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(108px,1fr))] gap-3",children:C.map(A=>{const J=_e.includes(A.path),N=u===A.path,te=fe.has(A.path),ke=ye===A.path||l===`folder:${A.path}`;return c.jsxs("div",{"data-drop-folder":A.isDir?A.path:void 0,draggable:!N&&D!=="/",onDragStart:oe=>{const Ye=J?_e:[A.path];oe.dataTransfer.setData("application/x-runcompute-paths",JSON.stringify(Ye))},onDragOver:oe=>{A.isDir&&(oe.preventDefault(),oe.stopPropagation(),X(A.path))},onDragLeave:()=>X(null),onDrop:oe=>{A.isDir&&G(oe,A.path)},onPointerDown:oe=>B(oe,A),onDoubleClick:()=>b(A),onContextMenu:oe=>Y(oe,A),className:`flex flex-col items-center p-2.5 rounded-2xl transition-colors cursor-pointer ${ke?"bg-[var(--os-active)] ring-1 ring-[var(--os-border-strong)]":J?"bg-[var(--os-surface-3)] ring-1 ring-[var(--os-border-strong)]":"hover:bg-[var(--os-hover)]"} ${te?"opacity-40":""}`,children:[c.jsx("div",{className:"mb-1.5",children:c.jsx(Ji,{node:A,size:48})}),N?c.jsx("input",{ref:z,value:Q,onClick:oe=>oe.stopPropagation(),onChange:oe=>$(oe.target.value),onBlur:()=>q(A.path),onKeyDown:oe=>{oe.stopPropagation(),oe.key==="Enter"&&q(A.path),oe.key==="Escape"&&d(null)},className:"w-full px-1.5 py-0.5 rounded bg-[var(--os-bg)] border border-[var(--os-border-strong)] text-[11px] text-center text-[var(--os-text)] focus:outline-none"}):c.jsx("span",{className:"text-xs text-center text-[var(--os-text)] line-clamp-2 break-all leading-tight",children:xn(A.path,A.name)})]},A.path)})}):c.jsxs("table",{className:"w-full text-left border-collapse text-xs",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-[var(--os-border)] text-[var(--os-text-subtle)] text-[11px]",children:[c.jsx("th",{className:"py-2 px-2 font-medium",children:"Ad"}),c.jsx("th",{className:"py-2 px-2 font-medium",children:"Tür"}),c.jsx("th",{className:"py-2 px-2 font-medium",children:"Boyut"}),c.jsx("th",{className:"py-2 px-2 font-medium",children:"Değiştirilme"})]})}),c.jsx("tbody",{children:C.map(A=>{const J=_e.includes(A.path),N=u===A.path;return c.jsxs("tr",{"data-drop-folder":A.isDir?A.path:void 0,onPointerDown:te=>B(te,A),onDoubleClick:()=>b(A),onContextMenu:te=>Y(te,A),className:`border-b border-[var(--os-border)] cursor-pointer ${J?"bg-[var(--os-surface-3)] text-[var(--os-text)]":"hover:bg-[var(--os-hover)] text-[var(--os-text)]"}`,children:[c.jsxs("td",{className:"py-2 px-2 flex items-center gap-2.5",children:[c.jsx(Ji,{node:A,size:24}),N?c.jsx("input",{ref:z,value:Q,onClick:te=>te.stopPropagation(),onChange:te=>$(te.target.value),onBlur:()=>q(A.path),onKeyDown:te=>{te.stopPropagation(),te.key==="Enter"&&q(A.path),te.key==="Escape"&&d(null)},className:"px-2 py-0.5 rounded bg-[var(--os-bg)] border border-[var(--os-border-strong)] text-xs text-[var(--os-text)] focus:outline-none"}):c.jsx("span",{className:"truncate font-medium",children:xn(A.path,A.name)})]}),c.jsx("td",{className:"py-2 px-2 text-[var(--os-text-muted)]",children:Cn(A)}),c.jsx("td",{className:"py-2 px-2 font-mono text-[var(--os-text-muted)]",children:A.isDir?`${A.childCount} öğe`:Tl(A.size)}),c.jsx("td",{className:"py-2 px-2 text-[var(--os-text-muted)]",children:Jd(A.modifiedAt)})]},A.path)})})]})})]}),c.jsxs("div",{className:"px-4 py-1.5 bg-[var(--os-sidebar)] border-t border-[var(--os-border)] flex items-center justify-between text-[11px] text-[var(--os-text-subtle)]",children:[c.jsxs("span",{children:[C.length," öğe",_e.length>0&&` • ${_e.length} seçili`]}),c.jsx("span",{className:"font-mono",children:D})]})]})},D2=({tabs:t,activeTabId:s,sendWs:a})=>c.jsxs("div",{className:"flex items-center gap-1 flex-1 min-w-0 overflow-x-auto no-scrollbar py-0.5",children:[t.map(l=>{const u=l.id===s;return c.jsxs("div",{"data-no-drag":"true",onClick:()=>{Zs.ensureContext(),a({type:"browser_activate_tab",tabId:l.id})},onAuxClick:d=>{d.button===1&&a({type:"browser_close_tab",tabId:l.id})},className:`group flex items-center gap-2 px-3 py-1 rounded-lg max-w-[200px] min-w-[110px] text-xs cursor-pointer transition-colors ${u?"bg-[var(--os-surface-3)] text-[var(--os-text)]":"bg-transparent text-[var(--os-text-muted)] hover:bg-[var(--os-hover)] hover:text-[var(--os-text)]"}`,children:[l.isLoading?c.jsx(Bl,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)] animate-spin shrink-0"}):l.favicon?c.jsx("img",{src:l.favicon,alt:"",className:"w-3.5 h-3.5 rounded-xs shrink-0"}):l.mode==="file"?c.jsx(Rc,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)] shrink-0"}):c.jsx(P0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)] shrink-0"}),c.jsx("span",{className:"truncate flex-1 text-[11px] font-medium",children:l.title||"Yeni Sekme"}),l.isPlayingAudio&&c.jsx(Gd,{className:"w-3 h-3 text-[var(--os-text)] shrink-0 animate-pulse"}),c.jsx("button",{onClick:d=>{d.stopPropagation(),a({type:"browser_close_tab",tabId:l.id})},className:"p-0.5 rounded hover:bg-[var(--os-active)] text-[var(--os-text-muted)] hover:text-[var(--os-text)] opacity-70 group-hover:opacity-100",children:c.jsx(Hl,{className:"w-3 h-3"})})]},l.id)}),c.jsx("button",{"data-no-drag":"true",onClick:()=>a({type:"browser_new_tab",url:"compute://newtab"}),title:"Yeni Sekme",className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)] shrink-0",children:c.jsx(Kf,{className:"w-3.5 h-3.5"})})]}),T2=[{name:"Google",url:"https://www.google.com",host:"google.com"},{name:"YouTube",url:"https://www.youtube.com",host:"youtube.com"},{name:"GitHub",url:"https://github.com",host:"github.com"},{name:"Vikipedi",url:"https://tr.wikipedia.org",host:"wikipedia.org"},{name:"Hacker News",url:"https://news.ycombinator.com",host:"news.ycombinator.com"},{name:"MDN",url:"https://developer.mozilla.org",host:"developer.mozilla.org"}],j2=({tabs:t,activeTabId:s,subscribeVideoFrame:a,desktopNodes:l,allNodes:u,volume:d,muted:f,sendWs:p,onOpenFolder:v,onVfsSaved:_,onNotify:w,browserCursor:g="default"})=>{const y=t.find(C=>C.id===s)||t[0],[T,R]=E.useState(""),[I,Z]=E.useState(""),ue=E.useRef(null),pe=E.useRef(null),be=E.useRef(null),ee=E.useRef(0),me=E.useRef(null),[ve,ae]=E.useState(""),[ge,_e]=E.useState(!1),[we,ye]=E.useState("preview"),[X,Q]=E.useState(!1);E.useEffect(()=>{y&&R(y.url==="compute://newtab"?"":y.url)},[y==null?void 0:y.id,y==null?void 0:y.url]),E.useEffect(()=>{be.current&&(be.current.volume=f?0:Math.max(0,Math.min(1,d/100)),be.current.muted=f)},[d,f,y==null?void 0:y.id]),E.useEffect(()=>{let C=!1,q=null;return a(async de=>{if(C){q=de;return}C=!0;try{let b=de;for(;b;){const B=b;q=null;const Y=pe.current;if(Y){const G=B.length>=4&&B[0]===137&&B[1]===80&&B[2]===78&&B[3]===71,fe=new Blob([B],{type:G?"image/png":"image/jpeg"}),ne=await createImageBitmap(fe);(Y.width!==ne.width||Y.height!==ne.height)&&(Y.width=ne.width,Y.height=ne.height);const A=Y.getContext("2d",{alpha:!1});A==null||A.drawImage(ne,0,0),ne.close()}b=q}}catch{}finally{C=!1}})},[a,y==null?void 0:y.id,y==null?void 0:y.mode]),E.useEffect(()=>{const C=ue.current;if(!C)return;let q=null;const he=new ResizeObserver(de=>{var B;const b=(B=de[0])==null?void 0:B.contentRect;!b||b.width<120||b.height<120||(q&&clearTimeout(q),q=setTimeout(()=>{const Y=Math.min(2,Math.max(1,window.devicePixelRatio||1));p({type:"browser_viewport",width:Math.round(b.width),height:Math.round(b.height),devicePixelRatio:Y})},150))});return he.observe(C),()=>{he.disconnect(),q&&clearTimeout(q)}},[p]);const $=(y==null?void 0:y.mode)==="file"?u.find(C=>C.path===y.filePath):void 0;E.useEffect(()=>{if((y==null?void 0:y.mode)!=="file"||!y.filePath)return;const C=(($==null?void 0:$.extension)||"").toLowerCase();_e(!1),["html","htm","svg","csv"].includes(C)?ye("preview"):vc(C)?ye("edit"):ye("preview"),vc(C)&&xt.readText(y.filePath).then(q=>ae(q.content)).catch(()=>ae(""))},[y==null?void 0:y.id,y==null?void 0:y.mode,y==null?void 0:y.filePath,$==null?void 0:$.extension]);const j=async()=>{if(y!=null&&y.filePath){Q(!0);try{await xt.writeText(y.filePath,ve),_e(!1),_(),w("Kaydedildi",`${y.filePath} güncellendi.`,"success")}catch(C){w("Hata",C.message,"error")}finally{Q(!1)}}},z=C=>{y&&(Zs.ensureContext(),p({type:"browser_navigate",tabId:y.id,url:C}))},W=(C,q)=>{const he=pe.current;if(!he)return{x:0,y:0};const de=he.getBoundingClientRect();if(!de.width||!de.height)return{x:0,y:0};const b=Math.round(de.width),B=Math.round(de.height);if(he.width>0&&he.height>0){const Y=Math.min(de.width/he.width,de.height/he.height),G=he.width*Y,fe=he.height*Y,ne=(de.width-G)/2,A=(de.height-fe)/2;return{x:Math.max(0,Math.min(b,Math.round((C-de.left-ne)/G*b))),y:Math.max(0,Math.min(B,Math.round((q-de.top-A)/fe*B)))}}return{x:Math.max(0,Math.min(b,Math.round(C-de.left))),y:Math.max(0,Math.min(B,Math.round(q-de.top)))}},D=C=>{let q=0;return C.altKey&&(q|=1),C.ctrlKey&&(q|=2),C.metaKey&&(q|=4),C.shiftKey&&(q|=8),q},ce=C=>C===1?"middle":C===2?"right":"left";return y?c.jsxs("div",{"data-drop-browser":"true",className:"flex-1 min-h-0 flex flex-col bg-[var(--os-surface)] text-[var(--os-text)] select-none",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-[var(--os-surface-2)] border-b border-[var(--os-border)]",children:[c.jsxs("div",{className:"flex items-center gap-0.5",children:[c.jsx("button",{disabled:!y.canGoBack,onClick:()=>p({type:"browser_back",tabId:y.id}),className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] disabled:opacity-30 text-[var(--os-text-secondary)]",title:"Geri",children:c.jsx(R0,{className:"w-4 h-4"})}),c.jsx("button",{disabled:!y.canGoForward,onClick:()=>p({type:"browser_forward",tabId:y.id}),className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] disabled:opacity-30 text-[var(--os-text-secondary)]",title:"İleri",children:c.jsx(Uf,{className:"w-4 h-4"})}),c.jsx("button",{onClick:()=>p({type:"browser_reload",tabId:y.id}),className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)]",title:"Yenile",children:c.jsx(qf,{className:`w-4 h-4 ${y.isLoading?"animate-spin":""}`})}),c.jsx("button",{onClick:()=>z("compute://newtab"),className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)]",title:"Başlangıç",children:c.jsx(wS,{className:"w-4 h-4"})})]}),c.jsxs("form",{onSubmit:C=>{var q;C.preventDefault(),z(T||"compute://newtab"),(q=pe.current)==null||q.focus()},className:"flex-1 flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] focus-within:border-[var(--os-border-strong)] transition-colors",children:[y.mode==="file"?c.jsx("span",{className:"px-2 py-0.5 rounded-md bg-[var(--os-surface-3)] text-[var(--os-text)] text-[10px] font-medium shrink-0",children:"Dosya"}):y.isSecure?c.jsx(qc,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)] shrink-0"}):c.jsx(P0,{className:"w-3.5 h-3.5 text-[var(--os-text-subtle)] shrink-0"}),c.jsx("input",{type:"text",value:T,onFocus:C=>C.currentTarget.select(),onChange:C=>R(C.target.value),"data-testid":"chromium-address-input",placeholder:"Web adresi veya arama terimi yazın...",className:"flex-1 bg-transparent text-xs text-[var(--os-text)] focus:outline-none"})]}),c.jsxs("button",{onClick:()=>v("/Downloads"),title:"İndirilenler",className:"px-3 py-1.5 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-xs text-[var(--os-text)] flex items-center gap-1.5 shrink-0",children:[c.jsx(Al,{className:"w-3.5 h-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"İndirilenler"})]})]}),y.isLoading&&c.jsx("div",{className:"h-[2px] w-full bg-[var(--os-surface-2)] overflow-hidden",children:c.jsx("div",{className:"h-full w-1/2 bg-[var(--os-text-muted)] animate-pulse"})}),c.jsxs("div",{ref:ue,className:"flex-1 min-h-0 relative overflow-hidden flex flex-col",children:[y.mode==="newtab"&&c.jsx("div",{className:"flex-1 overflow-y-auto bg-[var(--os-surface)] p-6 sm:p-10 flex flex-col items-center justify-center",children:c.jsxs("div",{className:"w-full max-w-xl space-y-8",children:[c.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[c.jsx(Rl,{size:54}),c.jsx("h1",{className:"text-xl font-semibold text-[var(--os-text)] tracking-tight",children:"Chromium"})]}),c.jsxs("form",{onSubmit:C=>{C.preventDefault(),I.trim()&&(z(I),Z(""))},className:"relative",children:[c.jsx(Ff,{className:"w-4 h-4 text-[var(--os-text-subtle)] absolute left-4 top-1/2 -translate-y-1/2"}),c.jsx("input",{type:"text",autoFocus:!0,value:I,onChange:C=>Z(C.target.value),"data-testid":"chromium-newtab-input",placeholder:"Google'da arayın veya adres girin...",className:"w-full pl-11 pr-20 py-3.5 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border-strong)] focus:border-[var(--os-text-muted)] focus:outline-none text-sm text-[var(--os-text)]"}),c.jsx("button",{type:"submit",className:"absolute right-2 top-1/2 -translate-y-1/2 px-4 py-2 rounded-xl bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90 text-xs font-semibold",children:"Git"})]}),c.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2.5",children:T2.map(C=>c.jsxs("button",{onClick:()=>z(C.url),className:"p-3 rounded-2xl bg-[var(--os-surface-2)] hover:bg-[var(--os-surface-3)] border border-[var(--os-border)] flex flex-col items-center gap-2 transition-colors",children:[c.jsx("img",{src:`https://www.google.com/s2/favicons?domain=${C.host}&sz=64`,alt:C.name,className:"w-6 h-6 rounded"}),c.jsx("span",{className:"text-[11px] text-[var(--os-text-secondary)] font-medium truncate w-full text-center",children:C.name})]},C.url))}),l.filter(C=>!C.isDir).length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("div",{className:"text-[11px] text-[var(--os-text-subtle)] font-medium px-1",children:"Masaüstündeki Dosyalar"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2",children:l.filter(C=>!C.isDir).slice(0,6).map(C=>c.jsxs("button",{onClick:()=>z(`file://${C.path}`),className:"p-2.5 rounded-xl bg-[var(--os-surface-2)] hover:bg-[var(--os-surface-3)] border border-[var(--os-border)] flex items-center gap-2.5 text-left",children:[c.jsx(Ji,{node:C,size:28}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs font-medium text-[var(--os-text)] truncate",children:C.name}),c.jsx("div",{className:"text-[10px] text-[var(--os-text-subtle)] truncate",children:Tl(C.size)})]})]},C.path))})]})]})}),y.mode==="file"&&c.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-[var(--os-surface)]",children:$?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-[var(--os-surface-2)] border-b border-[var(--os-border)] text-xs",children:[c.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[c.jsx(Ji,{node:$,size:26}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"font-medium text-[var(--os-text)] truncate",children:$.name}),c.jsxs("div",{className:"text-[11px] text-[var(--os-text-subtle)]",children:[Cn($)," • ",Tl($.size)]})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[["html","htm","svg","csv"].includes($.extension)&&c.jsxs("div",{className:"flex items-center bg-[var(--os-bg)] p-0.5 rounded-lg border border-[var(--os-border)]",children:[c.jsxs("button",{onClick:()=>ye("preview"),className:`px-2.5 py-1 rounded-md flex items-center gap-1 ${we==="preview"?"bg-[var(--os-surface-3)] text-[var(--os-text)] font-medium":"text-[var(--os-text-muted)]"}`,children:[c.jsx(uS,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Önizleme"})]}),c.jsxs("button",{onClick:()=>ye("edit"),className:`px-2.5 py-1 rounded-md flex items-center gap-1 ${we==="edit"?"bg-[var(--os-surface-3)] text-[var(--os-text)] font-medium":"text-[var(--os-text-muted)]"}`,children:[c.jsx(z0,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Kaynak"})]})]}),vc($.extension)&&we==="edit"&&c.jsxs("button",{onClick:j,disabled:X,className:`px-3 py-1.5 rounded-lg font-semibold flex items-center gap-1.5 ${ge?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90":"bg-[var(--os-surface-3)] text-[var(--os-text-muted)]"}`,children:[ge?c.jsx(t2,{className:"w-3.5 h-3.5"}):c.jsx(Pf,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:X?"Kaydediliyor...":ge?"Kaydet":"Kaydedildi"})]}),c.jsxs("a",{href:vn($.path,"&download=1"),className:"px-2.5 py-1.5 rounded-lg bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text)] flex items-center gap-1.5",children:[c.jsx(Al,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"İndir"})]})]})]}),c.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:we==="edit"&&vc($.extension)?c.jsx("textarea",{value:ve,onChange:C=>{ae(C.target.value),_e(!0)},onKeyDown:C=>{(C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"&&(C.preventDefault(),j())},spellCheck:!1,className:"flex-1 w-full p-4 bg-[var(--os-bg)] text-[var(--os-text)] font-mono text-xs leading-relaxed focus:outline-none resize-none select-text",placeholder:"Dosya içeriğini düzenleyin (⌘S / Ctrl+S ile kaydet)..."}):["html","htm"].includes($.extension)?c.jsx("iframe",{title:$.name,srcDoc:ve,className:"flex-1 w-full bg-white border-0"}):$.extension==="csv"?c.jsx("div",{className:"flex-1 overflow-auto p-4 select-text",children:c.jsx("table",{className:"w-full border-collapse text-xs",children:c.jsx("tbody",{children:ve.trim().split(`
|
|
370
|
-
`).map((C,q)=>c.jsx("tr",{className:q===0?"bg-[var(--os-surface-3)] text-[var(--os-text)] font-semibold":"border-b border-[var(--os-border)] text-[var(--os-text-secondary)]",children:C.split(",").map((he,de)=>c.jsx("td",{className:"px-3 py-2 border border-[var(--os-border)]",children:he},de))},q))})})}):J0($.extension)?c.jsx("div",{className:"flex-1 flex items-center justify-center p-6 bg-[var(--os-bg)] overflow-auto",children:c.jsx("img",{src:vn($.path,`&t=${encodeURIComponent($.modifiedAt)}`),alt:$.name,className:"max-w-full max-h-full object-contain rounded-lg"})}):k2($.extension)?c.jsx("div",{className:"flex-1 flex items-center justify-center p-6 bg-black",children:c.jsx("video",{ref:C=>{be.current=C},controls:!0,autoPlay:!0,src:vn($.path),className:"max-w-full max-h-full rounded-lg"})}):E2($.extension)?c.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-5 p-8 bg-[var(--os-bg)]",children:[c.jsx(Ji,{node:$,size:80}),c.jsx("div",{className:"text-sm font-medium text-[var(--os-text)]",children:$.name}),c.jsx("audio",{ref:C=>{be.current=C},controls:!0,autoPlay:!0,src:vn($.path),className:"w-full max-w-md"})]}):$.extension==="pdf"?c.jsx("iframe",{title:$.name,src:vn($.path),className:"flex-1 w-full border-0 bg-white"}):c.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx(Ji,{node:$,size:76}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm font-medium text-[var(--os-text)]",children:$.name}),c.jsxs("div",{className:"text-xs text-[var(--os-text-muted)] mt-1",children:[Cn($)," • ",Tl($.size)]})]}),c.jsxs("button",{onClick:()=>v($.parentPath),className:"px-4 py-2 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-xs text-[var(--os-text)] flex items-center gap-2",children:[c.jsx(Oc,{className:"w-4 h-4"}),c.jsx("span",{children:"Bulunduğu Klasörü Aç"})]})]})})]}):c.jsxs("div",{className:"flex-1 flex items-center justify-center text-[var(--os-text-subtle)] text-xs",children:["Dosya bulunamadı: ",y.filePath]})}),y.mode==="web"&&c.jsx("div",{className:"flex-1 min-h-0 relative bg-white flex items-center justify-center overflow-hidden",children:c.jsx("canvas",{ref:pe,tabIndex:0,onContextMenu:C=>C.preventDefault(),onPointerDown:C=>{if(Zs.ensureContext(),C.currentTarget.focus(),C.pointerType==="touch"){me.current={pointerId:C.pointerId,startX:C.clientX,startY:C.clientY,lastX:C.clientX,lastY:C.clientY,scrolled:!1};return}const{x:q,y:he}=W(C.clientX,C.clientY);p({type:"browser_input",tabId:y.id,kind:"mouse",eventType:"mousePressed",x:q,y:he,button:ce(C.button),clickCount:C.detail||1,modifiers:D(C)})},onPointerMove:C=>{if(C.pointerType==="touch"){const b=me.current;if(!b||b.pointerId!==C.pointerId)return;const B=b.lastX-C.clientX,Y=b.lastY-C.clientY;if(!b.scrolled&&Math.hypot(C.clientX-b.startX,C.clientY-b.startY)>7&&(b.scrolled=!0),b.scrolled){b.lastX=C.clientX,b.lastY=C.clientY;const{x:G,y:fe}=W(C.clientX,C.clientY);p({type:"browser_input",tabId:y.id,kind:"mouse",eventType:"mouseWheel",x:G,y:fe,deltaX:B*1.4,deltaY:Y*1.4})}return}const q=performance.now();if(q-ee.current<20)return;ee.current=q;const{x:he,y:de}=W(C.clientX,C.clientY);p({type:"browser_input",tabId:y.id,kind:"mouse",eventType:"mouseMoved",x:he,y:de,button:C.buttons===1?"left":"none",modifiers:D(C)})},onPointerUp:C=>{if(C.pointerType==="touch"){const de=me.current;if(me.current=null,de&&!de.scrolled){const{x:b,y:B}=W(C.clientX,C.clientY);p({type:"browser_input",tabId:y.id,kind:"mouse",eventType:"mousePressed",x:b,y:B,button:"left",clickCount:1}),p({type:"browser_input",tabId:y.id,kind:"mouse",eventType:"mouseReleased",x:b,y:B,button:"left",clickCount:1})}return}const{x:q,y:he}=W(C.clientX,C.clientY);p({type:"browser_input",tabId:y.id,kind:"mouse",eventType:"mouseReleased",x:q,y:he,button:ce(C.button),clickCount:C.detail||1,modifiers:D(C)})},onWheel:C=>{const{x:q,y:he}=W(C.clientX,C.clientY);p({type:"browser_input",tabId:y.id,kind:"mouse",eventType:"mouseWheel",x:q,y:he,deltaX:C.deltaX,deltaY:C.deltaY,modifiers:D(C)})},onKeyDown:C=>{(C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="v"||(C.preventDefault(),C.stopPropagation(),p({type:"browser_input",tabId:y.id,kind:"key",key:C.key,ctrlKey:C.ctrlKey,metaKey:C.metaKey,shiftKey:C.shiftKey,altKey:C.altKey}))},onPaste:C=>{const q=C.clipboardData.getData("text");q&&(C.preventDefault(),p({type:"browser_input",tabId:y.id,kind:"paste",text:q}))},"data-testid":"chromium-canvas",className:"w-full h-full object-contain focus:outline-none touch-none",style:{cursor:g||"default"}})})]})]}):null},A2=({x:t,y:s,target:a,clipboard:l,preferences:u,hasTrashItems:d,onClose:f,onCreateFolder:p,onCreateQuickFile:v,onOpenCustomFileDialog:_,onTriggerUpload:w,onTriggerWallpaperUpload:g,onSetWallpaperFromNode:y,onOpenNode:T,onStartRename:R,onCopy:I,onCut:Z,onDuplicate:ue,onPaste:pe,onTrash:be,onRestore:ee,onDeletePermanent:me,onEmptyTrash:ve,onCompressZip:ae,onExtractZip:ge,onDownloadHost:_e,onShowProperties:we,onOpenChromium:ye,onOpenFolderWindow:X,onUpdatePreferences:Q,onCycleWallpaper:$,onRefresh:j})=>{const z=E.useRef(null),[W,D]=E.useState({left:t,top:s}),[ce,C]=E.useState(null);E.useLayoutEffect(()=>{const fe=z.current;if(!fe)return;const ne=fe.getBoundingClientRect(),A=window.innerWidth,J=window.innerHeight-72;D({left:Math.max(12,Math.min(t,A-ne.width-12)),top:Math.max(12,Math.min(s,J-ne.height-12))})},[t,s]),E.useEffect(()=>{const fe=A=>{z.current&&!z.current.contains(A.target)&&f()},ne=A=>{A.key==="Escape"&&f()};return window.addEventListener("pointerdown",fe),window.addEventListener("keydown",ne),()=>{window.removeEventListener("pointerdown",fe),window.removeEventListener("keydown",ne)}},[f]);const q=fe=>{fe(),f()},he=a.nodes||[],de=he[0],b=a.dirPath==="/.trash"||!!(de!=null&&de.path.startsWith("/.trash/")),B=W.left+440>window.innerWidth,Y=he.length===1&&!!de&&!de.isDir&&!b&&(J0(de.extension)||de.extension==="avif"),G="w-full px-3 py-2 rounded-lg flex items-center justify-between hover:bg-[var(--os-hover)] text-[var(--os-text)] transition-colors";return c.jsxs("div",{ref:z,style:{left:W.left,top:W.top,boxShadow:"var(--os-shadow)"},onContextMenu:fe=>fe.preventDefault(),className:"fixed z-[9995] w-60 rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-1.5 text-xs text-[var(--os-text)] select-none",children:[a.kind==="system-icon"&&c.jsx("button",{onClick:()=>q(()=>a.systemAction==="open-chromium"?ye():X("/")),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(L0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Aç"})]})}),a.kind==="recycle-bin-icon"&&c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:()=>q(()=>X("/.trash")),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(Oc,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Aç"})]})}),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsx("button",{disabled:!d,onClick:()=>q(ve),className:`${G} text-red-500 disabled:opacity-35 disabled:pointer-events-none`,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(gn,{className:"w-3.5 h-3.5 text-red-500"}),c.jsx("span",{children:"Çöp Kutusunu Boşalt"})]})})]}),a.kind==="nodes"&&de&&c.jsxs(c.Fragment,{children:[!b&&c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:()=>q(()=>T(de)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5 font-medium",children:[c.jsx(Oc,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Aç"})]})}),Y&&c.jsx("button",{onClick:()=>q(()=>y(de)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5 font-medium",children:[c.jsx(wg,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Masaüstü Arka Planı Yap"})]})}),he.length===1&&c.jsxs("button",{onClick:()=>q(()=>R(de)),className:G,children:[c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(XS,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yeniden Adlandır"})]}),c.jsx("span",{className:"text-[10px] text-[var(--os-text-subtle)] font-mono",children:"F2"})]}),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsxs("button",{onClick:()=>q(()=>Z(he)),className:G,children:[c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(s2,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Kes"})]}),c.jsx("span",{className:"text-[10px] text-[var(--os-text-subtle)] font-mono",children:"⌘X"})]}),c.jsxs("button",{onClick:()=>q(()=>I(he)),className:G,children:[c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(Sg,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Kopyala"})]}),c.jsx("span",{className:"text-[10px] text-[var(--os-text-subtle)] font-mono",children:"⌘C"})]}),c.jsx("button",{onClick:()=>q(()=>ue(he)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(Sg,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Çoğalt"})]})}),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsx("button",{onClick:()=>q(()=>ae(he,de.parentPath)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(Vb,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Sıkıştır (.zip)"})]})}),he.length===1&&de.extension==="zip"&&c.jsx("button",{onClick:()=>q(()=>ge(de)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(FS,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Buraya Ayıkla"})]})}),he.length===1&&!de.isDir&&c.jsx("button",{onClick:()=>q(()=>_e(de)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(Al,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"İndir"})]})}),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsx("button",{onClick:()=>q(()=>be(he)),className:`${G} text-red-500 hover:bg-red-500/12`,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(gn,{className:"w-3.5 h-3.5 text-red-500"}),c.jsx("span",{children:"Çöp Kutusuna Taşı"})]})})]}),b&&c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:()=>q(()=>ee(he)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(F0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Geri Yükle"})]})}),c.jsx("button",{onClick:()=>q(()=>me(he)),className:`${G} text-red-500 hover:bg-red-500/12`,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(gn,{className:"w-3.5 h-3.5 text-red-500"}),c.jsx("span",{children:"Kalıcı Olarak Sil"})]})})]}),he.length===1&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsx("button",{onClick:()=>q(()=>we(de)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(K0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Bilgi Ver"})]})})]})]}),(a.kind==="desktop"||a.kind==="folder-bg")&&c.jsxs(c.Fragment,{children:[a.dirPath==="/.trash"?c.jsx("button",{disabled:!d,onClick:()=>q(ve),className:`${G} text-red-500 disabled:opacity-40`,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(gn,{className:"w-3.5 h-3.5 text-red-500"}),c.jsx("span",{children:"Çöp Kutusunu Boşalt"})]})}):c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:()=>q(()=>p(a.dirPath,a.spawnPos)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(U0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yeni Klasör"})]})}),c.jsxs("div",{onMouseEnter:()=>C("new-file"),onMouseLeave:()=>C(null),className:"relative",children:[c.jsxs("button",{onClick:()=>q(()=>_(a.dirPath,a.spawnPos)),className:G,children:[c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(H0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yeni Dosya"})]}),c.jsx(Bc,{className:"w-3.5 h-3.5 text-[var(--os-text-subtle)]"})]}),ce==="new-file"&&c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:`absolute top-0 ${B?"right-full mr-1.5":"left-full ml-1.5"} w-52 rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-1.5 z-50`,children:[c.jsx("button",{onClick:()=>q(()=>_(a.dirPath,a.spawnPos)),className:`${G} font-medium`,children:c.jsx("span",{children:"Özel Uzantı Seç..."})}),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),[{name:"notlar.txt",label:"Metin (.txt)",icon:Rc},{name:"sayfa.html",label:"HTML (.html)",icon:Dd},{name:"betik.py",label:"Python (.py)",icon:Dd},{name:"veri.json",label:"JSON (.json)",icon:Dd},{name:"belge.md",label:"Markdown (.md)",icon:Rc},{name:"tablo.csv",label:"Tablo (.csv)",icon:_S}].map(fe=>c.jsx("button",{onClick:()=>q(()=>v(a.dirPath,fe.name,a.spawnPos)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(fe.icon,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:fe.label})]})},fe.name))]})]}),c.jsx("button",{onClick:()=>q(()=>w(a.dirPath)),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(V0,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Dosya Yükle..."})]})}),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsxs("button",{disabled:!(l!=null&&l.paths.length),onClick:()=>q(()=>pe(a.dirPath)),className:`${G} disabled:opacity-35 disabled:pointer-events-none`,children:[c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(nS,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yapıştır"})]}),c.jsx("span",{className:"text-[10px] text-[var(--os-text-subtle)] font-mono",children:"⌘V"})]})]}),a.kind==="desktop"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsxs("div",{onMouseEnter:()=>C("view"),onMouseLeave:()=>C(null),className:"relative",children:[c.jsxs("button",{className:G,children:[c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(Yf,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Görünüm ve Sıralama"})]}),c.jsx(Bc,{className:"w-3.5 h-3.5 text-[var(--os-text-subtle)]"})]}),ce==="view"&&c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:`absolute top-0 ${B?"right-full mr-1.5":"left-full ml-1.5"} w-48 rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-1.5 z-50`,children:[[["sm","Küçük Simgeler"],["md","Orta Simgeler"],["lg","Büyük Simgeler"]].map(([fe,ne])=>c.jsxs("button",{onClick:()=>q(()=>Q({iconSize:fe})),className:G,children:[c.jsx("span",{children:ne}),u.iconSize===fe&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--os-text)]"})]},fe)),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),[["name","Ada Göre Sırala"],["extension","Türe Göre Sırala"],["size","Boyuta Göre Sırala"],["modifiedAt","Tarihe Göre Sırala"]].map(([fe,ne])=>c.jsxs("button",{onClick:()=>q(()=>Q({sortBy:fe,autoArrange:!0})),className:G,children:[c.jsx("span",{children:ne}),u.sortBy===fe&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--os-text)]"})]},fe))]})]}),c.jsx("button",{onClick:()=>q(g),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(Cc,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Arka Plan Resmi Seç..."})]})}),c.jsx("button",{onClick:()=>q($),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(wg,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Hazır Arka Planı Değiştir"})]})})]}),c.jsx("div",{className:"my-1 border-t border-[var(--os-border)]"}),c.jsx("button",{onClick:()=>q(j),className:G,children:c.jsxs("span",{className:"flex items-center gap-2.5",children:[c.jsx(qf,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)]"}),c.jsx("span",{children:"Yenile"})]})})]})]})},B2=[{ext:"txt",label:"Metin"},{ext:"html",label:"HTML"},{ext:"py",label:"Python"},{ext:"tsx",label:"TSX"},{ext:"json",label:"JSON"},{ext:"csv",label:"CSV"},{ext:"sql",label:"SQL"},{ext:"md",label:"Markdown"},{ext:"pdf",label:"PDF"},{ext:"zip",label:"ZIP"},{ext:"mp3",label:"MP3"},{ext:"mp4",label:"MP4"},{ext:"exe",label:"EXE"},{ext:"iso",label:"ISO"},{ext:"env",label:".env"},{ext:"sh",label:"Shell"}],R2=({parentPath:t,onClose:s,onCreate:a})=>{const[l,u]=E.useState("yeni-dosya.txt");E.useEffect(()=>{const _=w=>{w.key==="Escape"&&s()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[s]);const d=l.trim()||"adsiz.txt",f=d.toLowerCase(),p=f.endsWith(".tar.gz")?"tar.gz":f.startsWith(".")&&!f.slice(1).includes(".")?f.slice(1):f.includes(".")?f.slice(f.lastIndexOf(".")+1):"",v={name:d,path:"",parentPath:t,isDir:!1,extension:p,size:0,childCount:0,createdAt:new Date().toISOString(),modifiedAt:new Date().toISOString()};return c.jsx("div",{className:"fixed inset-0 z-[9990] bg-black/45 flex items-center justify-center p-4",onPointerDown:_=>{_.target===_.currentTarget&&s()},children:c.jsxs("form",{onSubmit:_=>{_.preventDefault(),a(d)},style:{boxShadow:"var(--os-shadow)"},className:"w-full max-w-md rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] overflow-hidden text-[var(--os-text)]",children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[var(--os-border)]",children:[c.jsx("span",{className:"text-xs font-semibold",children:"Yeni Dosya"}),c.jsx("button",{type:"button",onClick:s,className:"p-1 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)]",children:c.jsx(Hl,{className:"w-4 h-4"})})]}),c.jsxs("div",{className:"p-5 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-4 p-3.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)]",children:[c.jsx("div",{className:"w-14 h-14 rounded-xl bg-[var(--os-surface-2)] flex items-center justify-center shrink-0",children:c.jsx(Ji,{node:v,size:46})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-sm font-medium text-[var(--os-text)] truncate",children:d}),c.jsx("div",{className:"text-xs text-[var(--os-text-muted)] mt-0.5",children:Cn(v)})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs text-[var(--os-text-muted)] mb-1.5",children:"Dosya Adı ve Uzantısı"}),c.jsx("input",{type:"text",autoFocus:!0,value:l,onChange:_=>u(_.target.value),placeholder:"ornek: analiz.py, rapor.pdf, paket.zip...",className:"w-full px-3.5 py-2.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border-strong)] focus:border-[var(--os-text-muted)] focus:outline-none text-sm text-[var(--os-text)] font-mono"})]}),c.jsx("div",{className:"grid grid-cols-4 gap-1.5",children:B2.map(_=>c.jsx("button",{type:"button",onClick:()=>{const w=d.includes(".")?d.slice(0,d.lastIndexOf("."))||"dosya":d;u(_.ext==="env"?".env":`${w}.${_.ext}`)},className:`px-2.5 py-1.5 rounded-lg text-xs transition-colors flex items-center justify-between border ${p===_.ext?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] border-transparent font-semibold":"bg-[var(--os-bg)] border-[var(--os-border)] text-[var(--os-text-secondary)] hover:bg-[var(--os-surface-3)]"}`,children:c.jsx("span",{className:"truncate",children:_.label})},_.ext))})]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 px-5 py-3 border-t border-[var(--os-border)] bg-[var(--os-sidebar)]",children:[c.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 rounded-xl text-xs font-medium text-[var(--os-text-muted)] hover:bg-[var(--os-hover)]",children:"Vazgeç"}),c.jsxs("button",{type:"submit",className:"px-4 py-2 rounded-xl text-xs font-semibold bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90 flex items-center gap-1.5",children:[c.jsx(Pf,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Oluştur"})]})]})]})})},O2=({node:t,onOpenNode:s,onClose:a})=>t?c.jsxs("div",{className:"flex-1 flex flex-col justify-between p-5 bg-[var(--os-surface)] text-[var(--os-text)] select-text",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-4 pb-4 border-b border-[var(--os-border)]",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border)] flex items-center justify-center shrink-0",children:c.jsx(Ji,{node:t,size:48})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-sm font-semibold break-all",children:xn(t.path,t.name)}),c.jsx("div",{className:"text-xs text-[var(--os-text-muted)] mt-0.5",children:Cn(t)})]})]}),c.jsxs("div",{className:"space-y-2.5 text-xs",children:[c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("span",{className:"text-[var(--os-text-subtle)]",children:"Konum"}),c.jsx("span",{className:"font-mono text-right break-all",children:t.path})]}),c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("span",{className:"text-[var(--os-text-subtle)]",children:"Uzantı"}),c.jsx("span",{className:"font-mono",children:t.isDir?"Klasör":t.extension?`.${t.extension}`:"Yok"})]}),c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("span",{className:"text-[var(--os-text-subtle)]",children:"Boyut"}),c.jsx("span",{children:Tl(t.size)})]}),t.isDir&&c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("span",{className:"text-[var(--os-text-subtle)]",children:"Öğe Sayısı"}),c.jsxs("span",{children:[t.childCount," öğe"]})]}),c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("span",{className:"text-[var(--os-text-subtle)]",children:"Oluşturulma"}),c.jsx("span",{children:Jd(t.createdAt)})]}),c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("span",{className:"text-[var(--os-text-subtle)]",children:"Değiştirilme"}),c.jsx("span",{children:Jd(t.modifiedAt)})]})]})]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 pt-4 border-t border-[var(--os-border)]",children:[c.jsxs("button",{onClick:()=>{s(t),a()},className:"px-3.5 py-2 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-xs font-medium text-[var(--os-text)] flex items-center gap-1.5",children:[c.jsx(Oc,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Aç"})]}),c.jsx("button",{onClick:a,className:"px-4 py-2 rounded-xl bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90 text-xs font-semibold",children:"Tamam"})]})]}):c.jsx("div",{className:"flex-1 flex items-center justify-center text-xs text-[var(--os-text-muted)] p-6",children:"Öğe bulunamadı."});function Bd(){var s;if(typeof document>"u")return!1;const t=document;return!!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||typeof window<"u"&&((s=window.matchMedia)!=null&&s.call(window,"(display-mode: fullscreen)").matches))}const z2=({locked:t=!1})=>{const[s,a]=E.useState(()=>Bd()),[l,u]=E.useState(!1),[d,f]=E.useState(!1);E.useEffect(()=>{const _=setTimeout(()=>f(!0),450);return()=>clearTimeout(_)},[]),E.useEffect(()=>{const _=()=>a(Bd());return document.addEventListener("fullscreenchange",_),document.addEventListener("webkitfullscreenchange",_),document.addEventListener("mozfullscreenchange",_),window.addEventListener("resize",_),()=>{document.removeEventListener("fullscreenchange",_),document.removeEventListener("webkitfullscreenchange",_),document.removeEventListener("mozfullscreenchange",_),window.removeEventListener("resize",_)}},[]);const p=async()=>{const _=document.documentElement;try{_.requestFullscreen?await _.requestFullscreen():_.webkitRequestFullscreen?await _.webkitRequestFullscreen():_.mozRequestFullScreen&&await _.mozRequestFullScreen(),a(Bd())}catch{}},v=d&&!s&&!l&&!t;return c.jsx("div",{"data-testid":"fullscreen-notice","data-visible":v?"true":"false","aria-hidden":!v,style:{boxShadow:"var(--os-shadow)",transition:"transform 480ms cubic-bezier(0.22, 1, 0.36, 1), opacity 340ms cubic-bezier(0.22, 1, 0.36, 1)"},className:`fixed top-4 right-4 z-[9965] w-[348px] max-w-[calc(100vw-32px)] rounded-2xl bg-[var(--os-dock)] backdrop-blur-md border border-[var(--os-border-strong)] p-3.5 text-[var(--os-text)] select-none ${v?"translate-x-0 opacity-100 pointer-events-auto":"translate-x-[calc(100%+28px)] opacity-0 pointer-events-none"}`,children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"w-9 h-9 rounded-xl bg-[var(--os-surface-3)] border border-[var(--os-border)] flex items-center justify-center shrink-0 mt-0.5",children:c.jsx(Wd,{className:"w-4 h-4 text-[var(--os-text)]"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsx("div",{className:"text-xs font-semibold text-[var(--os-text)] leading-snug",children:"Tam Ekran Önerilir"}),c.jsx("button",{type:"button",onClick:()=>u(!0),"data-testid":"fullscreen-dismiss-btn",title:"Kapat",className:"p-1 -mr-1 -mt-1 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-subtle)] hover:text-[var(--os-text)] transition-colors shrink-0",children:c.jsx(Hl,{className:"w-3.5 h-3.5"})})]}),c.jsx("p",{className:"text-[11px] text-[var(--os-text-muted)] leading-relaxed mt-0.5",children:"Daha iyi bir masaüstü deneyimi için tam ekrana geçmenizi öneririz."}),c.jsxs("div",{className:"mt-2.5 flex items-center gap-1.5",children:[c.jsxs("button",{type:"button",onClick:p,"data-testid":"fullscreen-enter-btn",className:"px-3 py-1.5 rounded-xl bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90 text-[11px] font-semibold flex items-center gap-1.5 transition-opacity",children:[c.jsx(Wd,{className:"w-3 h-3"}),c.jsx("span",{children:"Tam Ekrana Geç"})]}),c.jsx("button",{type:"button",onClick:()=>u(!0),className:"px-2.5 py-1.5 rounded-xl hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)] text-[11px] font-medium transition-colors",children:"Şimdi Değil"})]})]})]})})},L2=({serverName:t="TamgaVDesktop",hostname:s,version:a,onSuccess:l})=>{const[u,d]=E.useState("admin"),[f,p]=E.useState(""),[v,_]=E.useState(!1),[w,g]=E.useState(null),y=async T=>{T.preventDefault(),g(null),_(!0);try{const R=await $d.login(u,f);l(R.username)}catch(R){g(R.message||"Giriş başarısız.")}finally{_(!1)}};return c.jsxs("div",{className:"relative w-screen h-screen overflow-hidden select-none flex items-center justify-center bg-[var(--os-bg)] text-[var(--os-text)]",children:[c.jsx(G0,{wallpaperId:"mono-peaks"}),c.jsx("div",{className:"fixed inset-0 bg-black/45 backdrop-blur-md"}),c.jsxs("form",{onSubmit:y,style:{boxShadow:"var(--os-shadow)"},className:"relative z-10 w-[340px] max-w-[calc(100vw-32px)] rounded-3xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-6 space-y-5",children:[c.jsxs("div",{className:"flex flex-col items-center text-center space-y-2",children:[c.jsx("div",{className:"w-12 h-12 rounded-2xl bg-[var(--os-surface-3)] border border-[var(--os-border)] flex items-center justify-center",children:c.jsx(qc,{className:"w-5 h-5 text-[var(--os-text)]"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-base font-semibold tracking-tight text-[var(--os-text)]",children:t}),c.jsxs("p",{className:"text-[11px] text-[var(--os-text-muted)] mt-0.5 font-mono",children:[s?`${s}`:"Linux Sanal Masaüstü",a?` · v${a}`:""]})]})]}),c.jsxs("div",{className:"space-y-2.5",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[11px] text-[var(--os-text-muted)] mb-1",children:"Kullanıcı Adı"}),c.jsx("input",{type:"text",autoComplete:"username",value:u,onChange:T=>d(T.target.value),"data-testid":"login-username",className:"w-full px-3.5 py-2.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] focus:border-[var(--os-border-strong)] focus:outline-none text-xs text-[var(--os-text)]"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[11px] text-[var(--os-text-muted)] mb-1",children:"Parola"}),c.jsx("input",{type:"password",autoFocus:!0,autoComplete:"current-password",value:f,onChange:T=>p(T.target.value),placeholder:"Parolanızı girin","data-testid":"login-password",className:"w-full px-3.5 py-2.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] focus:border-[var(--os-border-strong)] focus:outline-none text-xs text-[var(--os-text)]"})]})]}),w&&c.jsx("div",{className:"px-3 py-2 rounded-xl bg-red-500/12 border border-red-500/25 text-[11px] text-red-400",children:w}),c.jsxs("button",{type:"submit",disabled:v,"data-testid":"login-submit",className:"w-full py-2.5 px-4 rounded-xl bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90 disabled:opacity-50 text-xs font-semibold flex items-center justify-center gap-2 transition-opacity",children:[c.jsx("span",{children:v?"Doğrulanıyor...":"Masaüstüne Bağlan"}),c.jsx(Uf,{className:"w-3.5 h-3.5"})]})]})]})};/**
|
|
371
|
-
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
372
|
-
* @license MIT
|
|
373
|
-
*
|
|
374
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
375
|
-
* @license MIT
|
|
376
|
-
*
|
|
377
|
-
* Originally forked from (with the author's permission):
|
|
378
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
379
|
-
* http://bellard.org/jslinux/
|
|
380
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
381
|
-
*/var e1=Object.defineProperty,H2=Object.getOwnPropertyDescriptor,U2=(t,s)=>{for(var a in s)e1(t,a,{get:s[a],enumerable:!0})},jt=(t,s,a,l)=>{for(var u=l>1?void 0:l?H2(s,a):s,d=t.length-1,f;d>=0;d--)(f=t[d])&&(u=(l?f(s,a,u):f(u))||u);return l&&u&&e1(s,a,u),u},Ee=(t,s)=>(a,l)=>s(a,l,t),Tg="Terminal input",ef={get:()=>Tg,set:t=>Tg=t},jg="Too much output to announce, navigate to rows manually to read",tf={get:()=>jg,set:t=>jg=t};function P2(t){return t.replace(/\r?\n/g,"\r")}function Y2(t,s){return s?"\x1B[200~"+t+"\x1B[201~":t}function K2(t,s){t.clipboardData&&t.clipboardData.setData("text/plain",s.selectionText),t.preventDefault()}function q2(t,s,a,l){if(t.stopPropagation(),t.clipboardData){let u=t.clipboardData.getData("text/plain");t1(u,s,a,l)}}function t1(t,s,a,l){t=P2(t),t=Y2(t,a.decPrivateModes.bracketedPasteMode&&l.rawOptions.ignoreBracketedPasteMode!==!0),a.triggerDataEvent(t,!0),s.value=""}function i1(t,s,a){let l=a.getBoundingClientRect(),u=t.clientX-l.left-10,d=t.clientY-l.top-10;s.style.width="20px",s.style.height="20px",s.style.left=`${u}px`,s.style.top=`${d}px`,s.style.zIndex="1000",s.focus()}function Ag(t,s,a,l,u){i1(t,s,a),u&&l.rightClickSelect(t),s.value=l.selectionText,s.select()}function Or(t){return t>65535?(t-=65536,String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)}function Fc(t,s=0,a=t.length){let l="";for(let u=s;u<a;++u){let d=t[u];d>65535?(d-=65536,l+=String.fromCharCode((d>>10)+55296)+String.fromCharCode(d%1024+56320)):l+=String.fromCharCode(d)}return l}var F2=class{constructor(){this._interim=0}clear(){this._interim=0}decode(t,s){let a=t.length;if(!a)return 0;let l=0,u=0;if(this._interim){let d=t.charCodeAt(u++);56320<=d&&d<=57343?s[l++]=(this._interim-55296)*1024+d-56320+65536:(s[l++]=this._interim,s[l++]=d),this._interim=0}for(let d=u;d<a;++d){let f=t.charCodeAt(d);if(55296<=f&&f<=56319){if(++d>=a)return this._interim=f,l;let p=t.charCodeAt(d);56320<=p&&p<=57343?s[l++]=(f-55296)*1024+p-56320+65536:(s[l++]=f,s[l++]=p);continue}f!==65279&&(s[l++]=f)}return l}},I2=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(t,s){let a=t.length;if(!a)return 0;let l=0,u,d,f,p,v=0,_=0;if(this.interim[0]){let y=!1,T=this.interim[0];T&=(T&224)===192?31:(T&240)===224?15:7;let R=0,I;for(;(I=this.interim[++R]&63)&&R<4;)T<<=6,T|=I;let Z=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,ue=Z-R;for(;_<ue;){if(_>=a)return 0;if(I=t[_++],(I&192)!==128){_--,y=!0;break}else this.interim[R++]=I,T<<=6,T|=I&63}y||(Z===2?T<128?_--:s[l++]=T:Z===3?T<2048||T>=55296&&T<=57343||T===65279||(s[l++]=T):T<65536||T>1114111||(s[l++]=T)),this.interim.fill(0)}let w=a-4,g=_;for(;g<a;){for(;g<w&&!((u=t[g])&128)&&!((d=t[g+1])&128)&&!((f=t[g+2])&128)&&!((p=t[g+3])&128);)s[l++]=u,s[l++]=d,s[l++]=f,s[l++]=p,g+=4;if(u=t[g++],u<128)s[l++]=u;else if((u&224)===192){if(g>=a)return this.interim[0]=u,l;if(d=t[g++],(d&192)!==128){g--;continue}if(v=(u&31)<<6|d&63,v<128){g--;continue}s[l++]=v}else if((u&240)===224){if(g>=a)return this.interim[0]=u,l;if(d=t[g++],(d&192)!==128){g--;continue}if(g>=a)return this.interim[0]=u,this.interim[1]=d,l;if(f=t[g++],(f&192)!==128){g--;continue}if(v=(u&15)<<12|(d&63)<<6|f&63,v<2048||v>=55296&&v<=57343||v===65279)continue;s[l++]=v}else if((u&248)===240){if(g>=a)return this.interim[0]=u,l;if(d=t[g++],(d&192)!==128){g--;continue}if(g>=a)return this.interim[0]=u,this.interim[1]=d,l;if(f=t[g++],(f&192)!==128){g--;continue}if(g>=a)return this.interim[0]=u,this.interim[1]=d,this.interim[2]=f,l;if(p=t[g++],(p&192)!==128){g--;continue}if(v=(u&7)<<18|(d&63)<<12|(f&63)<<6|p&63,v<65536||v>1114111)continue;s[l++]=v}}return l}},s1="",zr=" ",Ul=class r1{constructor(){this.fg=0,this.bg=0,this.extended=new Lc}static toColorRGB(s){return[s>>>16&255,s>>>8&255,s&255]}static fromColorRGB(s){return(s[0]&255)<<16|(s[1]&255)<<8|s[2]&255}clone(){let s=new r1;return s.fg=this.fg,s.bg=this.bg,s.extended=this.extended.clone(),s}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Lc=class n1{constructor(s=0,a=0){this._ext=0,this._urlId=0,this._ext=s,this._urlId=a}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(s){this._ext=s}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(s){this._ext&=-469762049,this._ext|=s<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(s){this._ext&=-67108864,this._ext|=s&67108863}get urlId(){return this._urlId}set urlId(s){this._urlId=s}get underlineVariantOffset(){let s=(this._ext&3758096384)>>29;return s<0?s^4294967288:s}set underlineVariantOffset(s){this._ext&=536870911,this._ext|=s<<29&3758096384}clone(){return new n1(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},es=class a1 extends Ul{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Lc,this.combinedData=""}static fromCharData(s){let a=new a1;return a.setFromCharData(s),a}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Or(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(s){this.fg=s[0],this.bg=0;let a=!1;if(s[1].length>2)a=!0;else if(s[1].length===2){let l=s[1].charCodeAt(0);if(55296<=l&&l<=56319){let u=s[1].charCodeAt(1);56320<=u&&u<=57343?this.content=(l-55296)*1024+u-56320+65536|s[2]<<22:a=!0}else a=!0}else this.content=s[1].charCodeAt(0)|s[2]<<22;a&&(this.combinedData=s[1],this.content=2097152|s[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Bg="di$target",sf="di$dependencies",Rd=new Map;function V2(t){return t[sf]||[]}function ti(t){if(Rd.has(t))return Rd.get(t);let s=function(a,l,u){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");X2(s,a,u)};return s._id=t,Rd.set(t,s),s}function X2(t,s,a){s[Bg]===s?s[sf].push({id:t,index:a}):(s[sf]=[{id:t,index:a}],s[Bg]=s)}var yi=ti("BufferService"),l1=ti("CoreMouseService"),Nn=ti("CoreService"),W2=ti("CharsetService"),If=ti("InstantiationService"),o1=ti("LogService"),bi=ti("OptionsService"),c1=ti("OscLinkService"),G2=ti("UnicodeService"),Pl=ti("DecorationService"),rf=class{constructor(t,s,a){this._bufferService=t,this._optionsService=s,this._oscLinkService=a}provideLinks(t,s){var w;let a=this._bufferService.buffer.lines.get(t-1);if(!a){s(void 0);return}let l=[],u=this._optionsService.rawOptions.linkHandler,d=new es,f=a.getTrimmedLength(),p=-1,v=-1,_=!1;for(let g=0;g<f;g++)if(!(v===-1&&!a.hasContent(g))){if(a.loadCell(g,d),d.hasExtendedAttrs()&&d.extended.urlId)if(v===-1){v=g,p=d.extended.urlId;continue}else _=d.extended.urlId!==p;else v!==-1&&(_=!0);if(_||v!==-1&&g===f-1){let y=(w=this._oscLinkService.getLinkData(p))==null?void 0:w.uri;if(y){let T={start:{x:v+1,y:t},end:{x:g+(!_&&g===f-1?1:0),y:t}},R=!1;if(!(u!=null&&u.allowNonHttpProtocols))try{let I=new URL(y);["http:","https:"].includes(I.protocol)||(R=!0)}catch{R=!0}R||l.push({text:y,range:T,activate:(I,Z)=>u?u.activate(I,Z,T):$2(I,Z),hover:(I,Z)=>{var ue;return(ue=u==null?void 0:u.hover)==null?void 0:ue.call(u,I,Z,T)},leave:(I,Z)=>{var ue;return(ue=u==null?void 0:u.leave)==null?void 0:ue.call(u,I,Z,T)}})}_=!1,d.hasExtendedAttrs()&&d.extended.urlId?(v=g,p=d.extended.urlId):(v=-1,p=-1)}}s(l)}};rf=jt([Ee(0,yi),Ee(1,bi),Ee(2,c1)],rf);function $2(t,s){if(confirm(`Do you want to navigate to ${s}?
|
|
382
|
-
|
|
383
|
-
WARNING: This link could potentially be dangerous`)){let a=window.open();if(a){try{a.opener=null}catch{}a.location.href=s}else console.warn("Opening link blocked as opener could not be cleared")}}var Ic=ti("CharSizeService"),Js=ti("CoreBrowserService"),Vf=ti("MouseService"),er=ti("RenderService"),Z2=ti("SelectionService"),h1=ti("CharacterJoinerService"),wa=ti("ThemeService"),u1=ti("LinkProviderService"),Q2=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Rg.isErrorNoTelemetry(t)?new Rg(t.message+`
|
|
384
|
-
|
|
385
|
-
`+t.stack):new Error(t.message+`
|
|
386
|
-
|
|
387
|
-
`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(s=>{s(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},J2=new Q2;function Nc(t){ew(t)||J2.onUnexpectedError(t)}var nf="Canceled";function ew(t){return t instanceof tw?!0:t instanceof Error&&t.name===nf&&t.message===nf}var tw=class extends Error{constructor(){super(nf),this.name=this.message}};function iw(t){return new Error(`Illegal argument: ${t}`)}var Rg=class af extends Error{constructor(s){super(s),this.name="CodeExpectedError"}static fromError(s){if(s instanceof af)return s;let a=new af;return a.message=s.message,a.stack=s.stack,a}static isErrorNoTelemetry(s){return s.name==="CodeExpectedError"}},lf=class d1 extends Error{constructor(s){super(s||"An unexpected bug occurred."),Object.setPrototypeOf(this,d1.prototype)}};function Li(t,s=0){return t[t.length-(1+s)]}var sw;(t=>{function s(d){return d<0}t.isLessThan=s;function a(d){return d<=0}t.isLessThanOrEqual=a;function l(d){return d>0}t.isGreaterThan=l;function u(d){return d===0}t.isNeitherLessOrGreaterThan=u,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(sw||(sw={}));function rw(t,s){let a=this,l=!1,u;return function(){return l||(l=!0,s||(u=t.apply(a,arguments))),u}}var f1;(t=>{function s(ee){return ee&&typeof ee=="object"&&typeof ee[Symbol.iterator]=="function"}t.is=s;let a=Object.freeze([]);function l(){return a}t.empty=l;function*u(ee){yield ee}t.single=u;function d(ee){return s(ee)?ee:u(ee)}t.wrap=d;function f(ee){return ee||a}t.from=f;function*p(ee){for(let me=ee.length-1;me>=0;me--)yield ee[me]}t.reverse=p;function v(ee){return!ee||ee[Symbol.iterator]().next().done===!0}t.isEmpty=v;function _(ee){return ee[Symbol.iterator]().next().value}t.first=_;function w(ee,me){let ve=0;for(let ae of ee)if(me(ae,ve++))return!0;return!1}t.some=w;function g(ee,me){for(let ve of ee)if(me(ve))return ve}t.find=g;function*y(ee,me){for(let ve of ee)me(ve)&&(yield ve)}t.filter=y;function*T(ee,me){let ve=0;for(let ae of ee)yield me(ae,ve++)}t.map=T;function*R(ee,me){let ve=0;for(let ae of ee)yield*me(ae,ve++)}t.flatMap=R;function*I(...ee){for(let me of ee)yield*me}t.concat=I;function Z(ee,me,ve){let ae=ve;for(let ge of ee)ae=me(ae,ge);return ae}t.reduce=Z;function*ue(ee,me,ve=ee.length){for(me<0&&(me+=ee.length),ve<0?ve+=ee.length:ve>ee.length&&(ve=ee.length);me<ve;me++)yield ee[me]}t.slice=ue;function pe(ee,me=Number.POSITIVE_INFINITY){let ve=[];if(me===0)return[ve,ee];let ae=ee[Symbol.iterator]();for(let ge=0;ge<me;ge++){let _e=ae.next();if(_e.done)return[ve,t.empty()];ve.push(_e.value)}return[ve,{[Symbol.iterator](){return ae}}]}t.consume=pe;async function be(ee){let me=[];for await(let ve of ee)me.push(ve);return Promise.resolve(me)}t.asyncToArray=be})(f1||(f1={}));function kn(t){if(f1.is(t)){let s=[];for(let a of t)if(a)try{a.dispose()}catch(l){s.push(l)}if(s.length===1)throw s[0];if(s.length>1)throw new AggregateError(s,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function nw(...t){return wt(()=>kn(t))}function wt(t){return{dispose:rw(()=>{t()})}}var m1=class _1{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{kn(this._toDispose)}finally{this._toDispose.clear()}}add(s){if(!s)return s;if(s===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?_1.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(s),s}delete(s){if(s){if(s===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(s),s.dispose()}}deleteAndLeak(s){s&&this._toDispose.has(s)&&(this._toDispose.delete(s),void 0)}};m1.DISABLE_DISPOSED_WARNING=!1;var Lr=m1,Xe=class{constructor(){this._store=new Lr,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};Xe.None=Object.freeze({dispose(){}});var Sa=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(t){var s;this._isDisposed||t===this._value||((s=this._value)==null||s.dispose(),this._value=t)}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,(t=this._value)==null||t.dispose(),this._value=void 0}clearAndLeak(){let t=this._value;return this._value=void 0,t}},Qs=typeof window=="object"?window:globalThis,of=class cf{constructor(s){this.element=s,this.next=cf.Undefined,this.prev=cf.Undefined}};of.Undefined=new of(void 0);var kt=of,Og=class{constructor(){this._first=kt.Undefined,this._last=kt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===kt.Undefined}clear(){let t=this._first;for(;t!==kt.Undefined;){let s=t.next;t.prev=kt.Undefined,t.next=kt.Undefined,t=s}this._first=kt.Undefined,this._last=kt.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,s){let a=new kt(t);if(this._first===kt.Undefined)this._first=a,this._last=a;else if(s){let u=this._last;this._last=a,a.prev=u,u.next=a}else{let u=this._first;this._first=a,a.next=u,u.prev=a}this._size+=1;let l=!1;return()=>{l||(l=!0,this._remove(a))}}shift(){if(this._first!==kt.Undefined){let t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==kt.Undefined){let t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==kt.Undefined&&t.next!==kt.Undefined){let s=t.prev;s.next=t.next,t.next.prev=s}else t.prev===kt.Undefined&&t.next===kt.Undefined?(this._first=kt.Undefined,this._last=kt.Undefined):t.next===kt.Undefined?(this._last=this._last.prev,this._last.next=kt.Undefined):t.prev===kt.Undefined&&(this._first=this._first.next,this._first.prev=kt.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==kt.Undefined;)yield t.element,t=t.next}},aw=globalThis.performance&&typeof globalThis.performance.now=="function",lw=class p1{static create(s){return new p1(s)}constructor(s){this._now=aw&&s===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},ui;(t=>{t.None=()=>Xe.None;function s(X,Q){return g(X,()=>{},0,void 0,!0,void 0,Q)}t.defer=s;function a(X){return(Q,$=null,j)=>{let z=!1,W;return W=X(D=>{if(!z)return W?W.dispose():z=!0,Q.call($,D)},null,j),z&&W.dispose(),W}}t.once=a;function l(X,Q,$){return _((j,z=null,W)=>X(D=>j.call(z,Q(D)),null,W),$)}t.map=l;function u(X,Q,$){return _((j,z=null,W)=>X(D=>{Q(D),j.call(z,D)},null,W),$)}t.forEach=u;function d(X,Q,$){return _((j,z=null,W)=>X(D=>Q(D)&&j.call(z,D),null,W),$)}t.filter=d;function f(X){return X}t.signal=f;function p(...X){return(Q,$=null,j)=>{let z=nw(...X.map(W=>W(D=>Q.call($,D))));return w(z,j)}}t.any=p;function v(X,Q,$,j){let z=$;return l(X,W=>(z=Q(z,W),z),j)}t.reduce=v;function _(X,Q){let $,j={onWillAddFirstListener(){$=X(z.fire,z)},onDidRemoveLastListener(){$==null||$.dispose()}},z=new Se(j);return Q==null||Q.add(z),z.event}function w(X,Q){return Q instanceof Array?Q.push(X):Q&&Q.add(X),X}function g(X,Q,$=100,j=!1,z=!1,W,D){let ce,C,q,he=0,de,b={leakWarningThreshold:W,onWillAddFirstListener(){ce=X(Y=>{he++,C=Q(C,Y),j&&!q&&(B.fire(C),C=void 0),de=()=>{let G=C;C=void 0,q=void 0,(!j||he>1)&&B.fire(G),he=0},typeof $=="number"?(clearTimeout(q),q=setTimeout(de,$)):q===void 0&&(q=0,queueMicrotask(de))})},onWillRemoveListener(){z&&he>0&&(de==null||de())},onDidRemoveLastListener(){de=void 0,ce.dispose()}},B=new Se(b);return D==null||D.add(B),B.event}t.debounce=g;function y(X,Q=0,$){return t.debounce(X,(j,z)=>j?(j.push(z),j):[z],Q,void 0,!0,void 0,$)}t.accumulate=y;function T(X,Q=(j,z)=>j===z,$){let j=!0,z;return d(X,W=>{let D=j||!Q(W,z);return j=!1,z=W,D},$)}t.latch=T;function R(X,Q,$){return[t.filter(X,Q,$),t.filter(X,j=>!Q(j),$)]}t.split=R;function I(X,Q=!1,$=[],j){let z=$.slice(),W=X(C=>{z?z.push(C):ce.fire(C)});j&&j.add(W);let D=()=>{z==null||z.forEach(C=>ce.fire(C)),z=null},ce=new Se({onWillAddFirstListener(){W||(W=X(C=>ce.fire(C)),j&&j.add(W))},onDidAddFirstListener(){z&&(Q?setTimeout(D):D())},onDidRemoveLastListener(){W&&W.dispose(),W=null}});return j&&j.add(ce),ce.event}t.buffer=I;function Z(X,Q){return($,j,z)=>{let W=Q(new pe);return X(function(D){let ce=W.evaluate(D);ce!==ue&&$.call(j,ce)},void 0,z)}}t.chain=Z;let ue=Symbol("HaltChainable");class pe{constructor(){this.steps=[]}map(Q){return this.steps.push(Q),this}forEach(Q){return this.steps.push($=>(Q($),$)),this}filter(Q){return this.steps.push($=>Q($)?$:ue),this}reduce(Q,$){let j=$;return this.steps.push(z=>(j=Q(j,z),j)),this}latch(Q=($,j)=>$===j){let $=!0,j;return this.steps.push(z=>{let W=$||!Q(z,j);return $=!1,j=z,W?z:ue}),this}evaluate(Q){for(let $ of this.steps)if(Q=$(Q),Q===ue)break;return Q}}function be(X,Q,$=j=>j){let j=(...ce)=>D.fire($(...ce)),z=()=>X.on(Q,j),W=()=>X.removeListener(Q,j),D=new Se({onWillAddFirstListener:z,onDidRemoveLastListener:W});return D.event}t.fromNodeEventEmitter=be;function ee(X,Q,$=j=>j){let j=(...ce)=>D.fire($(...ce)),z=()=>X.addEventListener(Q,j),W=()=>X.removeEventListener(Q,j),D=new Se({onWillAddFirstListener:z,onDidRemoveLastListener:W});return D.event}t.fromDOMEventEmitter=ee;function me(X){return new Promise(Q=>a(X)(Q))}t.toPromise=me;function ve(X){let Q=new Se;return X.then($=>{Q.fire($)},()=>{Q.fire(void 0)}).finally(()=>{Q.dispose()}),Q.event}t.fromPromise=ve;function ae(X,Q){return X($=>Q.fire($))}t.forward=ae;function ge(X,Q,$){return Q($),X(j=>Q(j))}t.runAndSubscribe=ge;class _e{constructor(Q,$){this._observable=Q,this._counter=0,this._hasChanged=!1;let j={onWillAddFirstListener:()=>{Q.addObserver(this)},onDidRemoveLastListener:()=>{Q.removeObserver(this)}};this.emitter=new Se(j),$&&$.add(this.emitter)}beginUpdate(Q){this._counter++}handlePossibleChange(Q){}handleChange(Q,$){this._hasChanged=!0}endUpdate(Q){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function we(X,Q){return new _e(X,Q).emitter.event}t.fromObservable=we;function ye(X){return(Q,$,j)=>{let z=0,W=!1,D={beginUpdate(){z++},endUpdate(){z--,z===0&&(X.reportChanges(),W&&(W=!1,Q.call($)))},handlePossibleChange(){},handleChange(){W=!0}};X.addObserver(D),X.reportChanges();let ce={dispose(){X.removeObserver(D)}};return j instanceof Lr?j.add(ce):Array.isArray(j)&&j.push(ce),ce}}t.fromObservableLight=ye})(ui||(ui={}));var hf=class uf{constructor(s){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${s}_${uf._idPool++}`,uf.all.add(this)}start(s){this._stopWatch=new lw,this.listenerCount=s}stop(){if(this._stopWatch){let s=this._stopWatch.elapsed();this.durations.push(s),this.elapsedOverall+=s,this.invocationCount+=1,this._stopWatch=void 0}}};hf.all=new Set,hf._idPool=0;var ow=hf,cw=-1,v1=class g1{constructor(s,a,l=(g1._idPool++).toString(16).padStart(3,"0")){this._errorHandler=s,this.threshold=a,this.name=l,this._warnCountdown=0}dispose(){var s;(s=this._stacks)==null||s.clear()}check(s,a){let l=this.threshold;if(l<=0||a<l)return;this._stacks||(this._stacks=new Map);let u=this._stacks.get(s.value)||0;if(this._stacks.set(s.value,u+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=l*.5;let[d,f]=this.getMostFrequentStack(),p=`[${this.name}] potential listener LEAK detected, having ${a} listeners already. MOST frequent listener (${f}):`;console.warn(p),console.warn(d);let v=new dw(p,d);this._errorHandler(v)}return()=>{let d=this._stacks.get(s.value)||0;this._stacks.set(s.value,d-1)}}getMostFrequentStack(){if(!this._stacks)return;let s,a=0;for(let[l,u]of this._stacks)(!s||a<u)&&(s=[l,u],a=u);return s}};v1._idPool=1;var hw=v1,uw=class x1{constructor(s){this.value=s}static create(){let s=new Error;return new x1(s.stack??"")}print(){console.warn(this.value.split(`
|
|
388
|
-
`).slice(2).join(`
|
|
389
|
-
`))}},dw=class extends Error{constructor(t,s){super(t),this.name="ListenerLeakError",this.stack=s}},fw=class extends Error{constructor(t,s){super(t),this.name="ListenerRefusalError",this.stack=s}},mw=0,Od=class{constructor(t){this.value=t,this.id=mw++}},_w=2,pw,Se=class{constructor(t){var s,a,l,u;this._size=0,this._options=t,this._leakageMon=(s=this._options)!=null&&s.leakWarningThreshold?new hw((t==null?void 0:t.onListenerError)??Nc,((a=this._options)==null?void 0:a.leakWarningThreshold)??cw):void 0,this._perfMon=(l=this._options)!=null&&l._profName?new ow(this._options._profName):void 0,this._deliveryQueue=(u=this._options)==null?void 0:u.deliveryQueue}dispose(){var t,s,a,l;this._disposed||(this._disposed=!0,((t=this._deliveryQueue)==null?void 0:t.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(a=(s=this._options)==null?void 0:s.onDidRemoveLastListener)==null||a.call(s),(l=this._leakageMon)==null||l.dispose())}get event(){return this._event??(this._event=(t,s,a)=>{var f,p,v,_,w;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let g=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(g);let y=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],T=new fw(`${g}. HINT: Stack shows most frequent listener (${y[1]}-times)`,y[0]);return(((f=this._options)==null?void 0:f.onListenerError)||Nc)(T),Xe.None}if(this._disposed)return Xe.None;s&&(t=t.bind(s));let l=new Od(t),u;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(l.stack=uw.create(),u=this._leakageMon.check(l.stack,this._size+1)),this._listeners?this._listeners instanceof Od?(this._deliveryQueue??(this._deliveryQueue=new vw),this._listeners=[this._listeners,l]):this._listeners.push(l):((v=(p=this._options)==null?void 0:p.onWillAddFirstListener)==null||v.call(p,this),this._listeners=l,(w=(_=this._options)==null?void 0:_.onDidAddFirstListener)==null||w.call(_,this)),this._size++;let d=wt(()=>{u==null||u(),this._removeListener(l)});return a instanceof Lr?a.add(d):Array.isArray(a)&&a.push(d),d}),this._event}_removeListener(t){var u,d,f,p;if((d=(u=this._options)==null?void 0:u.onWillRemoveListener)==null||d.call(u,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(p=(f=this._options)==null?void 0:f.onDidRemoveLastListener)==null||p.call(f,this),this._size=0;return}let s=this._listeners,a=s.indexOf(t);if(a===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,s[a]=void 0;let l=this._deliveryQueue.current===this;if(this._size*_w<=s.length){let v=0;for(let _=0;_<s.length;_++)s[_]?s[v++]=s[_]:l&&(this._deliveryQueue.end--,v<this._deliveryQueue.i&&this._deliveryQueue.i--);s.length=v}}_deliver(t,s){var l;if(!t)return;let a=((l=this._options)==null?void 0:l.onListenerError)||Nc;if(!a){t.value(s);return}try{t.value(s)}catch(u){a(u)}}_deliverQueue(t){let s=t.current._listeners;for(;t.i<t.end;)this._deliver(s[t.i++],t.value);t.reset()}fire(t){var s,a,l,u;if((s=this._deliveryQueue)!=null&&s.current&&(this._deliverQueue(this._deliveryQueue),(a=this._perfMon)==null||a.stop()),(l=this._perfMon)==null||l.start(this._size),this._listeners)if(this._listeners instanceof Od)this._deliver(this._listeners,t);else{let d=this._deliveryQueue;d.enqueue(this,t,this._listeners.length),this._deliverQueue(d)}(u=this._perfMon)==null||u.stop()}hasListeners(){return this._size>0}},vw=class{constructor(){this.i=-1,this.end=0}enqueue(t,s,a){this.i=0,this.end=a,this.current=t,this.value=s}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},df=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Se,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Se,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(s){return this.mapWindowIdToZoomLevel.get(this.getWindowId(s))??0}setZoomLevel(s,a){if(this.getZoomLevel(a)===s)return;let l=this.getWindowId(a);this.mapWindowIdToZoomLevel.set(l,s),this._onDidChangeZoomLevel.fire(l)}getZoomFactor(s){return this.mapWindowIdToZoomFactor.get(this.getWindowId(s))??1}setZoomFactor(s,a){this.mapWindowIdToZoomFactor.set(this.getWindowId(a),s)}setFullscreen(s,a){if(this.isFullscreen(a)===s)return;let l=this.getWindowId(a);this.mapWindowIdToFullScreen.set(l,s),this._onDidChangeFullscreen.fire(l)}isFullscreen(s){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(s))}getWindowId(s){return s.vscodeWindowId}};df.INSTANCE=new df;var Xf=df;function gw(t,s,a){typeof s=="string"&&(s=t.matchMedia(s)),s.addEventListener("change",a)}Xf.INSTANCE.onDidChangeZoomLevel;function xw(t){return Xf.INSTANCE.getZoomFactor(t)}Xf.INSTANCE.onDidChangeFullscreen;var Ca=typeof navigator=="object"?navigator.userAgent:"",ff=Ca.indexOf("Firefox")>=0,yw=Ca.indexOf("AppleWebKit")>=0,Wf=Ca.indexOf("Chrome")>=0,bw=!Wf&&Ca.indexOf("Safari")>=0;Ca.indexOf("Electron/")>=0;Ca.indexOf("Android")>=0;var zd=!1;if(typeof Qs.matchMedia=="function"){let t=Qs.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),s=Qs.matchMedia("(display-mode: fullscreen)");zd=t.matches,gw(Qs,t,({matches:a})=>{zd&&s.matches||(zd=a)})}var ya="en",mf=!1,_f=!1,Mc=!1,y1=!1,gc,Dc=ya,zg=ya,Sw,ds,Sn=globalThis,hi,N0;typeof Sn.vscode<"u"&&typeof Sn.vscode.process<"u"?hi=Sn.vscode.process:typeof process<"u"&&typeof((N0=process==null?void 0:process.versions)==null?void 0:N0.node)=="string"&&(hi=process);var M0,ww=typeof((M0=hi==null?void 0:hi.versions)==null?void 0:M0.electron)=="string",Cw=ww&&(hi==null?void 0:hi.type)==="renderer",D0;if(typeof hi=="object"){mf=hi.platform==="win32",_f=hi.platform==="darwin",Mc=hi.platform==="linux",Mc&&hi.env.SNAP&&hi.env.SNAP_REVISION,hi.env.CI||hi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,gc=ya,Dc=ya;let t=hi.env.VSCODE_NLS_CONFIG;if(t)try{let s=JSON.parse(t);gc=s.userLocale,zg=s.osLocale,Dc=s.resolvedLanguage||ya,Sw=(D0=s.languagePack)==null?void 0:D0.translationsConfigFile}catch{}y1=!0}else typeof navigator=="object"&&!Cw?(ds=navigator.userAgent,mf=ds.indexOf("Windows")>=0,_f=ds.indexOf("Macintosh")>=0,(ds.indexOf("Macintosh")>=0||ds.indexOf("iPad")>=0||ds.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Mc=ds.indexOf("Linux")>=0,(ds==null?void 0:ds.indexOf("Mobi"))>=0,Dc=globalThis._VSCODE_NLS_LANGUAGE||ya,gc=navigator.language.toLowerCase(),zg=gc):console.error("Unable to resolve platform.");var b1=mf,js=_f,kw=Mc,Lg=y1,As=ds,Ar=Dc,Ew;(t=>{function s(){return Ar}t.value=s;function a(){return Ar.length===2?Ar==="en":Ar.length>=3?Ar[0]==="e"&&Ar[1]==="n"&&Ar[2]==="-":!1}t.isDefaultVariant=a;function l(){return Ar==="en"}t.isDefault=l})(Ew||(Ew={}));var Nw=typeof Sn.postMessage=="function"&&!Sn.importScripts;(()=>{if(Nw){let t=[];Sn.addEventListener("message",a=>{if(a.data&&a.data.vscodeScheduleAsyncWork)for(let l=0,u=t.length;l<u;l++){let d=t[l];if(d.id===a.data.vscodeScheduleAsyncWork){t.splice(l,1),d.callback();return}}});let s=0;return a=>{let l=++s;t.push({id:l,callback:a}),Sn.postMessage({vscodeScheduleAsyncWork:l},"*")}}return t=>setTimeout(t)})();var Mw=!!(As&&As.indexOf("Chrome")>=0);As&&As.indexOf("Firefox")>=0;!Mw&&As&&As.indexOf("Safari")>=0;As&&As.indexOf("Edg/")>=0;As&&As.indexOf("Android")>=0;var ga=typeof navigator=="object"?navigator:{};Lg||document.queryCommandSupported&&document.queryCommandSupported("copy")||ga&&ga.clipboard&&ga.clipboard.writeText,Lg||ga&&ga.clipboard&&ga.clipboard.readText;var Gf=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,s){this._keyCodeToStr[t]=s,this._strToKeyCode[s.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},Ld=new Gf,Hg=new Gf,Ug=new Gf,Dw=new Array(230),S1;(t=>{function s(p){return Ld.keyCodeToStr(p)}t.toString=s;function a(p){return Ld.strToKeyCode(p)}t.fromString=a;function l(p){return Hg.keyCodeToStr(p)}t.toUserSettingsUS=l;function u(p){return Ug.keyCodeToStr(p)}t.toUserSettingsGeneral=u;function d(p){return Hg.strToKeyCode(p)||Ug.strToKeyCode(p)}t.fromUserSettings=d;function f(p){if(p>=98&&p<=113)return null;switch(p){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Ld.keyCodeToStr(p)}t.toElectronAccelerator=f})(S1||(S1={}));var Tw=class w1{constructor(s,a,l,u,d){this.ctrlKey=s,this.shiftKey=a,this.altKey=l,this.metaKey=u,this.keyCode=d}equals(s){return s instanceof w1&&this.ctrlKey===s.ctrlKey&&this.shiftKey===s.shiftKey&&this.altKey===s.altKey&&this.metaKey===s.metaKey&&this.keyCode===s.keyCode}getHashCode(){let s=this.ctrlKey?"1":"0",a=this.shiftKey?"1":"0",l=this.altKey?"1":"0",u=this.metaKey?"1":"0";return`K${s}${a}${l}${u}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new jw([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},jw=class{constructor(t){if(t.length===0)throw iw("chords");this.chords=t}getHashCode(){let t="";for(let s=0,a=this.chords.length;s<a;s++)s!==0&&(t+=";"),t+=this.chords[s].getHashCode();return t}equals(t){if(t===null||this.chords.length!==t.chords.length)return!1;for(let s=0;s<this.chords.length;s++)if(!this.chords[s].equals(t.chords[s]))return!1;return!0}};function Aw(t){if(t.charCode){let a=String.fromCharCode(t.charCode).toUpperCase();return S1.fromString(a)}let s=t.keyCode;if(s===3)return 7;if(ff)switch(s){case 59:return 85;case 60:if(kw)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(js)return 57;break}else if(yw&&(js&&s===93||!js&&s===92))return 57;return Dw[s]||0}var Bw=js?256:2048,Rw=512,Ow=1024,zw=js?2048:256,Pg=class{constructor(t){var a;this._standardKeyboardEventBrand=!0;let s=t;this.browserEvent=s,this.target=s.target,this.ctrlKey=s.ctrlKey,this.shiftKey=s.shiftKey,this.altKey=s.altKey,this.metaKey=s.metaKey,this.altGraphKey=(a=s.getModifierState)==null?void 0:a.call(s,"AltGraph"),this.keyCode=Aw(s),this.code=s.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(t){return this._asKeybinding===t}_computeKeybinding(){let t=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(t=this.keyCode);let s=0;return this.ctrlKey&&(s|=Bw),this.altKey&&(s|=Rw),this.shiftKey&&(s|=Ow),this.metaKey&&(s|=zw),s|=t,s}_computeKeyCodeChord(){let t=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(t=this.keyCode),new Tw(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,t)}},Yg=new WeakMap;function Lw(t){if(!t.parent||t.parent===t)return null;try{let s=t.location,a=t.parent.location;if(s.origin!=="null"&&a.origin!=="null"&&s.origin!==a.origin)return null}catch{return null}return t.parent}var Hw=class{static getSameOriginWindowChain(t){let s=Yg.get(t);if(!s){s=[],Yg.set(t,s);let a=t,l;do l=Lw(a),l?s.push({window:new WeakRef(a),iframeElement:a.frameElement||null}):s.push({window:new WeakRef(a),iframeElement:null}),a=l;while(a)}return s.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(t,s){if(!s||t===s)return{top:0,left:0};let a=0,l=0,u=this.getSameOriginWindowChain(t);for(let d of u){let f=d.window.deref();if(a+=(f==null?void 0:f.scrollY)??0,l+=(f==null?void 0:f.scrollX)??0,f===s||!d.iframeElement)break;let p=d.iframeElement.getBoundingClientRect();a+=p.top,l+=p.left}return{top:a,left:l}}},xc=class{constructor(t,s){this.timestamp=Date.now(),this.browserEvent=s,this.leftButton=s.button===0,this.middleButton=s.button===1,this.rightButton=s.button===2,this.buttons=s.buttons,this.target=s.target,this.detail=s.detail||1,s.type==="dblclick"&&(this.detail=2),this.ctrlKey=s.ctrlKey,this.shiftKey=s.shiftKey,this.altKey=s.altKey,this.metaKey=s.metaKey,typeof s.pageX=="number"?(this.posx=s.pageX,this.posy=s.pageY):(this.posx=s.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=s.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let a=Hw.getPositionOfChildWindowRelativeToAncestorWindow(t,s.view);this.posx-=a.left,this.posy-=a.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Kg=class{constructor(t,s=0,a=0){var u;this.browserEvent=t||null,this.target=t?t.target||t.targetNode||t.srcElement:null,this.deltaY=a,this.deltaX=s;let l=!1;if(Wf){let d=navigator.userAgent.match(/Chrome\/(\d+)/);l=(d?parseInt(d[1]):123)<=122}if(t){let d=t,f=t,p=((u=t.view)==null?void 0:u.devicePixelRatio)||1;if(typeof d.wheelDeltaY<"u")l?this.deltaY=d.wheelDeltaY/(120*p):this.deltaY=d.wheelDeltaY/120;else if(typeof f.VERTICAL_AXIS<"u"&&f.axis===f.VERTICAL_AXIS)this.deltaY=-f.detail/3;else if(t.type==="wheel"){let v=t;v.deltaMode===v.DOM_DELTA_LINE?ff&&!js?this.deltaY=-t.deltaY/3:this.deltaY=-t.deltaY:this.deltaY=-t.deltaY/40}if(typeof d.wheelDeltaX<"u")bw&&b1?this.deltaX=-(d.wheelDeltaX/120):l?this.deltaX=d.wheelDeltaX/(120*p):this.deltaX=d.wheelDeltaX/120;else if(typeof f.HORIZONTAL_AXIS<"u"&&f.axis===f.HORIZONTAL_AXIS)this.deltaX=-t.detail/3;else if(t.type==="wheel"){let v=t;v.deltaMode===v.DOM_DELTA_LINE?ff&&!js?this.deltaX=-t.deltaX/3:this.deltaX=-t.deltaX:this.deltaX=-t.deltaX/40}this.deltaY===0&&this.deltaX===0&&t.wheelDelta&&(l?this.deltaY=t.wheelDelta/(120*p):this.deltaY=t.wheelDelta/120)}}preventDefault(){var t;(t=this.browserEvent)==null||t.preventDefault()}stopPropagation(){var t;(t=this.browserEvent)==null||t.stopPropagation()}},C1=Object.freeze(function(t,s){let a=setTimeout(t.bind(s),0);return{dispose(){clearTimeout(a)}}}),Uw;(t=>{function s(a){return a===t.None||a===t.Cancelled||a instanceof Pw?!0:!a||typeof a!="object"?!1:typeof a.isCancellationRequested=="boolean"&&typeof a.onCancellationRequested=="function"}t.isCancellationToken=s,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ui.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:C1})})(Uw||(Uw={}));var Pw=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?C1:(this._emitter||(this._emitter=new Se),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},$f=class{constructor(t,s){this._isDisposed=!1,this._token=-1,typeof t=="function"&&typeof s=="number"&&this.setIfNotSet(t,s)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(t,s){if(this._isDisposed)throw new lf("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,t()},s)}setIfNotSet(t,s){if(this._isDisposed)throw new lf("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,t()},s))}},Yw=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var t;(t=this.disposable)==null||t.dispose(),this.disposable=void 0}cancelAndSet(t,s,a=globalThis){if(this.isDisposed)throw new lf("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let l=a.setInterval(()=>{t()},s);this.disposable=wt(()=>{a.clearInterval(l),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},Kw;(t=>{async function s(l){let u,d=await Promise.all(l.map(f=>f.then(p=>p,p=>{u||(u=p)})));if(typeof u<"u")throw u;return d}t.settled=s;function a(l){return new Promise(async(u,d)=>{try{await l(u,d)}catch(f){d(f)}})}t.withAsyncBody=a})(Kw||(Kw={}));var qg=class Zi{static fromArray(s){return new Zi(a=>{a.emitMany(s)})}static fromPromise(s){return new Zi(async a=>{a.emitMany(await s)})}static fromPromises(s){return new Zi(async a=>{await Promise.all(s.map(async l=>a.emitOne(await l)))})}static merge(s){return new Zi(async a=>{await Promise.all(s.map(async l=>{for await(let u of l)a.emitOne(u)}))})}constructor(s,a){this._state=0,this._results=[],this._error=null,this._onReturn=a,this._onStateChanged=new Se,queueMicrotask(async()=>{let l={emitOne:u=>this.emitOne(u),emitMany:u=>this.emitMany(u),reject:u=>this.reject(u)};try{await Promise.resolve(s(l)),this.resolve()}catch(u){this.reject(u)}finally{l.emitOne=void 0,l.emitMany=void 0,l.reject=void 0}})}[Symbol.asyncIterator](){let s=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(s<this._results.length)return{done:!1,value:this._results[s++]};if(this._state===1)return{done:!0,value:void 0};await ui.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var a;return(a=this._onReturn)==null||a.call(this),{done:!0,value:void 0}}}}static map(s,a){return new Zi(async l=>{for await(let u of s)l.emitOne(a(u))})}map(s){return Zi.map(this,s)}static filter(s,a){return new Zi(async l=>{for await(let u of s)a(u)&&l.emitOne(u)})}filter(s){return Zi.filter(this,s)}static coalesce(s){return Zi.filter(s,a=>!!a)}coalesce(){return Zi.coalesce(this)}static async toPromise(s){let a=[];for await(let l of s)a.push(l);return a}toPromise(){return Zi.toPromise(this)}emitOne(s){this._state===0&&(this._results.push(s),this._onStateChanged.fire())}emitMany(s){this._state===0&&(this._results=this._results.concat(s),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(s){this._state===0&&(this._state=2,this._error=s,this._onStateChanged.fire())}};qg.EMPTY=qg.fromArray([]);var{getWindow:Ts,getWindowId:qw,onDidRegisterWindow:Fw}=(function(){let t=new Map,s={window:Qs,disposables:new Lr};t.set(Qs.vscodeWindowId,s);let a=new Se,l=new Se,u=new Se;function d(f,p){return(typeof f=="number"?t.get(f):void 0)??(p?s:void 0)}return{onDidRegisterWindow:a.event,onWillUnregisterWindow:u.event,onDidUnregisterWindow:l.event,registerWindow(f){if(t.has(f.vscodeWindowId))return Xe.None;let p=new Lr,v={window:f,disposables:p.add(new Lr)};return t.set(f.vscodeWindowId,v),p.add(wt(()=>{t.delete(f.vscodeWindowId),l.fire(f)})),p.add(He(f,Zt.BEFORE_UNLOAD,()=>{u.fire(f)})),a.fire(v),p},getWindows(){return t.values()},getWindowsCount(){return t.size},getWindowId(f){return f.vscodeWindowId},hasWindow(f){return t.has(f)},getWindowById:d,getWindow(f){var _;let p=f;if((_=p==null?void 0:p.ownerDocument)!=null&&_.defaultView)return p.ownerDocument.defaultView.window;let v=f;return v!=null&&v.view?v.view.window:Qs},getDocument(f){return Ts(f).document}}})(),Iw=class{constructor(t,s,a,l){this._node=t,this._type=s,this._handler=a,this._options=l||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function He(t,s,a,l){return new Iw(t,s,a,l)}var Fg=function(t,s,a,l){return He(t,s,a,l)},Zf,Vw=class extends Yw{constructor(t){super(),this.defaultTarget=t&&Ts(t)}cancelAndSet(t,s,a){return super.cancelAndSet(t,s,a??this.defaultTarget)}},Ig=class{constructor(t,s=0){this._runner=t,this.priority=s,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(t){Nc(t)}}static sort(t,s){return s.priority-t.priority}};(function(){let t=new Map,s=new Map,a=new Map,l=new Map,u=d=>{a.set(d,!1);let f=t.get(d)??[];for(s.set(d,f),t.set(d,[]),l.set(d,!0);f.length>0;)f.sort(Ig.sort),f.shift().execute();l.set(d,!1)};Zf=(d,f,p=0)=>{let v=qw(d),_=new Ig(f,p),w=t.get(v);return w||(w=[],t.set(v,w)),w.push(_),a.get(v)||(a.set(v,!0),d.requestAnimationFrame(()=>u(v))),_}})();function Xw(t){let s=t.getBoundingClientRect(),a=Ts(t);return{left:s.left+a.scrollX,top:s.top+a.scrollY,width:s.width,height:s.height}}var Zt={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},Ww=class{constructor(t){this.domNode=t,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(t){let s=Ni(t);this._maxWidth!==s&&(this._maxWidth=s,this.domNode.style.maxWidth=this._maxWidth)}setWidth(t){let s=Ni(t);this._width!==s&&(this._width=s,this.domNode.style.width=this._width)}setHeight(t){let s=Ni(t);this._height!==s&&(this._height=s,this.domNode.style.height=this._height)}setTop(t){let s=Ni(t);this._top!==s&&(this._top=s,this.domNode.style.top=this._top)}setLeft(t){let s=Ni(t);this._left!==s&&(this._left=s,this.domNode.style.left=this._left)}setBottom(t){let s=Ni(t);this._bottom!==s&&(this._bottom=s,this.domNode.style.bottom=this._bottom)}setRight(t){let s=Ni(t);this._right!==s&&(this._right=s,this.domNode.style.right=this._right)}setPaddingTop(t){let s=Ni(t);this._paddingTop!==s&&(this._paddingTop=s,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(t){let s=Ni(t);this._paddingLeft!==s&&(this._paddingLeft=s,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(t){let s=Ni(t);this._paddingBottom!==s&&(this._paddingBottom=s,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(t){let s=Ni(t);this._paddingRight!==s&&(this._paddingRight=s,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(t){this._fontFamily!==t&&(this._fontFamily=t,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(t){let s=Ni(t);this._fontSize!==s&&(this._fontSize=s,this.domNode.style.fontSize=this._fontSize)}setFontStyle(t){this._fontStyle!==t&&(this._fontStyle=t,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(t){this._fontFeatureSettings!==t&&(this._fontFeatureSettings=t,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(t){this._fontVariationSettings!==t&&(this._fontVariationSettings=t,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(t){this._textDecoration!==t&&(this._textDecoration=t,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(t){let s=Ni(t);this._lineHeight!==s&&(this._lineHeight=s,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(t){let s=Ni(t);this._letterSpacing!==s&&(this._letterSpacing=s,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(t){this._className!==t&&(this._className=t,this.domNode.className=this._className)}toggleClassName(t,s){this.domNode.classList.toggle(t,s),this._className=this.domNode.className}setDisplay(t){this._display!==t&&(this._display=t,this.domNode.style.display=this._display)}setPosition(t){this._position!==t&&(this._position=t,this.domNode.style.position=this._position)}setVisibility(t){this._visibility!==t&&(this._visibility=t,this.domNode.style.visibility=this._visibility)}setColor(t){this._color!==t&&(this._color=t,this.domNode.style.color=this._color)}setBackgroundColor(t){this._backgroundColor!==t&&(this._backgroundColor=t,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(t){this._layerHint!==t&&(this._layerHint=t,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(t){this._boxShadow!==t&&(this._boxShadow=t,this.domNode.style.boxShadow=t)}setContain(t){this._contain!==t&&(this._contain=t,this.domNode.style.contain=this._contain)}setAttribute(t,s){this.domNode.setAttribute(t,s)}removeAttribute(t){this.domNode.removeAttribute(t)}appendChild(t){this.domNode.appendChild(t.domNode)}removeChild(t){this.domNode.removeChild(t.domNode)}};function Ni(t){return typeof t=="number"?`${t}px`:t}function jl(t){return new Ww(t)}var k1=class{constructor(){this._hooks=new Lr,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(t,s){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let a=this._onStopCallback;this._onStopCallback=null,t&&a&&a(s)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(t,s,a,l,u){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=l,this._onStopCallback=u;let d=t;try{t.setPointerCapture(s),this._hooks.add(wt(()=>{try{t.releasePointerCapture(s)}catch{}}))}catch{d=Ts(t)}this._hooks.add(He(d,Zt.POINTER_MOVE,f=>{if(f.buttons!==a){this.stopMonitoring(!0);return}f.preventDefault(),this._pointerMoveCallback(f)})),this._hooks.add(He(d,Zt.POINTER_UP,f=>this.stopMonitoring(!0)))}};function Gw(t,s,a){let l=null,u=null;if(typeof a.value=="function"?(l="value",u=a.value,u.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof a.get=="function"&&(l="get",u=a.get),!u)throw new Error("not supported");let d=`$memoize$${s}`;a[l]=function(...f){return this.hasOwnProperty(d)||Object.defineProperty(this,d,{configurable:!1,enumerable:!1,writable:!1,value:u.apply(this,f)}),this[d]}}var Ds;(t=>(t.Tap="-xterm-gesturetap",t.Change="-xterm-gesturechange",t.Start="-xterm-gesturestart",t.End="-xterm-gesturesend",t.Contextmenu="-xterm-gesturecontextmenu"))(Ds||(Ds={}));var kl=class fi extends Xe{constructor(){super(),this.dispatched=!1,this.targets=new Og,this.ignoreTargets=new Og,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ui.runAndSubscribe(Fw,({window:s,disposables:a})=>{a.add(He(s.document,"touchstart",l=>this.onTouchStart(l),{passive:!1})),a.add(He(s.document,"touchend",l=>this.onTouchEnd(s,l))),a.add(He(s.document,"touchmove",l=>this.onTouchMove(l),{passive:!1}))},{window:Qs,disposables:this._store}))}static addTarget(s){if(!fi.isTouchDevice())return Xe.None;fi.INSTANCE||(fi.INSTANCE=new fi);let a=fi.INSTANCE.targets.push(s);return wt(a)}static ignoreTarget(s){if(!fi.isTouchDevice())return Xe.None;fi.INSTANCE||(fi.INSTANCE=new fi);let a=fi.INSTANCE.ignoreTargets.push(s);return wt(a)}static isTouchDevice(){return"ontouchstart"in Qs||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(s){let a=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let l=0,u=s.targetTouches.length;l<u;l++){let d=s.targetTouches.item(l);this.activeTouches[d.identifier]={id:d.identifier,initialTarget:d.target,initialTimeStamp:a,initialPageX:d.pageX,initialPageY:d.pageY,rollingTimestamps:[a],rollingPageX:[d.pageX],rollingPageY:[d.pageY]};let f=this.newGestureEvent(Ds.Start,d.target);f.pageX=d.pageX,f.pageY=d.pageY,this.dispatchEvent(f)}this.dispatched&&(s.preventDefault(),s.stopPropagation(),this.dispatched=!1)}onTouchEnd(s,a){let l=Date.now(),u=Object.keys(this.activeTouches).length;for(let d=0,f=a.changedTouches.length;d<f;d++){let p=a.changedTouches.item(d);if(!this.activeTouches.hasOwnProperty(String(p.identifier))){console.warn("move of an UNKNOWN touch",p);continue}let v=this.activeTouches[p.identifier],_=Date.now()-v.initialTimeStamp;if(_<fi.HOLD_DELAY&&Math.abs(v.initialPageX-Li(v.rollingPageX))<30&&Math.abs(v.initialPageY-Li(v.rollingPageY))<30){let w=this.newGestureEvent(Ds.Tap,v.initialTarget);w.pageX=Li(v.rollingPageX),w.pageY=Li(v.rollingPageY),this.dispatchEvent(w)}else if(_>=fi.HOLD_DELAY&&Math.abs(v.initialPageX-Li(v.rollingPageX))<30&&Math.abs(v.initialPageY-Li(v.rollingPageY))<30){let w=this.newGestureEvent(Ds.Contextmenu,v.initialTarget);w.pageX=Li(v.rollingPageX),w.pageY=Li(v.rollingPageY),this.dispatchEvent(w)}else if(u===1){let w=Li(v.rollingPageX),g=Li(v.rollingPageY),y=Li(v.rollingTimestamps)-v.rollingTimestamps[0],T=w-v.rollingPageX[0],R=g-v.rollingPageY[0],I=[...this.targets].filter(Z=>v.initialTarget instanceof Node&&Z.contains(v.initialTarget));this.inertia(s,I,l,Math.abs(T)/y,T>0?1:-1,w,Math.abs(R)/y,R>0?1:-1,g)}this.dispatchEvent(this.newGestureEvent(Ds.End,v.initialTarget)),delete this.activeTouches[p.identifier]}this.dispatched&&(a.preventDefault(),a.stopPropagation(),this.dispatched=!1)}newGestureEvent(s,a){let l=document.createEvent("CustomEvent");return l.initEvent(s,!1,!0),l.initialTarget=a,l.tapCount=0,l}dispatchEvent(s){if(s.type===Ds.Tap){let a=new Date().getTime(),l=0;a-this._lastSetTapCountTime>fi.CLEAR_TAP_COUNT_TIME?l=1:l=2,this._lastSetTapCountTime=a,s.tapCount=l}else(s.type===Ds.Change||s.type===Ds.Contextmenu)&&(this._lastSetTapCountTime=0);if(s.initialTarget instanceof Node){for(let l of this.ignoreTargets)if(l.contains(s.initialTarget))return;let a=[];for(let l of this.targets)if(l.contains(s.initialTarget)){let u=0,d=s.initialTarget;for(;d&&d!==l;)u++,d=d.parentElement;a.push([u,l])}a.sort((l,u)=>l[0]-u[0]);for(let[l,u]of a)u.dispatchEvent(s),this.dispatched=!0}}inertia(s,a,l,u,d,f,p,v,_){this.handle=Zf(s,()=>{let w=Date.now(),g=w-l,y=0,T=0,R=!0;u+=fi.SCROLL_FRICTION*g,p+=fi.SCROLL_FRICTION*g,u>0&&(R=!1,y=d*u*g),p>0&&(R=!1,T=v*p*g);let I=this.newGestureEvent(Ds.Change);I.translationX=y,I.translationY=T,a.forEach(Z=>Z.dispatchEvent(I)),R||this.inertia(s,a,w,u,d,f+y,p,v,_+T)})}onTouchMove(s){let a=Date.now();for(let l=0,u=s.changedTouches.length;l<u;l++){let d=s.changedTouches.item(l);if(!this.activeTouches.hasOwnProperty(String(d.identifier))){console.warn("end of an UNKNOWN touch",d);continue}let f=this.activeTouches[d.identifier],p=this.newGestureEvent(Ds.Change,f.initialTarget);p.translationX=d.pageX-Li(f.rollingPageX),p.translationY=d.pageY-Li(f.rollingPageY),p.pageX=d.pageX,p.pageY=d.pageY,this.dispatchEvent(p),f.rollingPageX.length>3&&(f.rollingPageX.shift(),f.rollingPageY.shift(),f.rollingTimestamps.shift()),f.rollingPageX.push(d.pageX),f.rollingPageY.push(d.pageY),f.rollingTimestamps.push(a)}this.dispatched&&(s.preventDefault(),s.stopPropagation(),this.dispatched=!1)}};kl.SCROLL_FRICTION=-.005,kl.HOLD_DELAY=700,kl.CLEAR_TAP_COUNT_TIME=400,jt([Gw],kl,"isTouchDevice",1);var $w=kl,Qf=class extends Xe{onclick(t,s){this._register(He(t,Zt.CLICK,a=>s(new xc(Ts(t),a))))}onmousedown(t,s){this._register(He(t,Zt.MOUSE_DOWN,a=>s(new xc(Ts(t),a))))}onmouseover(t,s){this._register(He(t,Zt.MOUSE_OVER,a=>s(new xc(Ts(t),a))))}onmouseleave(t,s){this._register(He(t,Zt.MOUSE_LEAVE,a=>s(new xc(Ts(t),a))))}onkeydown(t,s){this._register(He(t,Zt.KEY_DOWN,a=>s(new Pg(a))))}onkeyup(t,s){this._register(He(t,Zt.KEY_UP,a=>s(new Pg(a))))}oninput(t,s){this._register(He(t,Zt.INPUT,s))}onblur(t,s){this._register(He(t,Zt.BLUR,s))}onfocus(t,s){this._register(He(t,Zt.FOCUS,s))}onchange(t,s){this._register(He(t,Zt.CHANGE,s))}ignoreGesture(t){return $w.ignoreTarget(t)}},Vg=11,Zw=class extends Qf{constructor(t){super(),this._onActivate=t.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=t.bgWidth+"px",this.bgDomNode.style.height=t.bgHeight+"px",typeof t.top<"u"&&(this.bgDomNode.style.top="0px"),typeof t.left<"u"&&(this.bgDomNode.style.left="0px"),typeof t.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof t.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=t.className,this.domNode.style.position="absolute",this.domNode.style.width=Vg+"px",this.domNode.style.height=Vg+"px",typeof t.top<"u"&&(this.domNode.style.top=t.top+"px"),typeof t.left<"u"&&(this.domNode.style.left=t.left+"px"),typeof t.bottom<"u"&&(this.domNode.style.bottom=t.bottom+"px"),typeof t.right<"u"&&(this.domNode.style.right=t.right+"px"),this._pointerMoveMonitor=this._register(new k1),this._register(Fg(this.bgDomNode,Zt.POINTER_DOWN,s=>this._arrowPointerDown(s))),this._register(Fg(this.domNode,Zt.POINTER_DOWN,s=>this._arrowPointerDown(s))),this._pointerdownRepeatTimer=this._register(new Vw),this._pointerdownScheduleRepeatTimer=this._register(new $f)}_arrowPointerDown(t){if(!t.target||!(t.target instanceof Element))return;let s=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Ts(t))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(s,200),this._pointerMoveMonitor.startMonitoring(t.target,t.pointerId,t.buttons,a=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),t.preventDefault()}},Qw=class pf{constructor(s,a,l,u,d,f,p){this._forceIntegerValues=s,this._scrollStateBrand=void 0,this._forceIntegerValues&&(a=a|0,l=l|0,u=u|0,d=d|0,f=f|0,p=p|0),this.rawScrollLeft=u,this.rawScrollTop=p,a<0&&(a=0),u+a>l&&(u=l-a),u<0&&(u=0),d<0&&(d=0),p+d>f&&(p=f-d),p<0&&(p=0),this.width=a,this.scrollWidth=l,this.scrollLeft=u,this.height=d,this.scrollHeight=f,this.scrollTop=p}equals(s){return this.rawScrollLeft===s.rawScrollLeft&&this.rawScrollTop===s.rawScrollTop&&this.width===s.width&&this.scrollWidth===s.scrollWidth&&this.scrollLeft===s.scrollLeft&&this.height===s.height&&this.scrollHeight===s.scrollHeight&&this.scrollTop===s.scrollTop}withScrollDimensions(s,a){return new pf(this._forceIntegerValues,typeof s.width<"u"?s.width:this.width,typeof s.scrollWidth<"u"?s.scrollWidth:this.scrollWidth,a?this.rawScrollLeft:this.scrollLeft,typeof s.height<"u"?s.height:this.height,typeof s.scrollHeight<"u"?s.scrollHeight:this.scrollHeight,a?this.rawScrollTop:this.scrollTop)}withScrollPosition(s){return new pf(this._forceIntegerValues,this.width,this.scrollWidth,typeof s.scrollLeft<"u"?s.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof s.scrollTop<"u"?s.scrollTop:this.rawScrollTop)}createScrollEvent(s,a){let l=this.width!==s.width,u=this.scrollWidth!==s.scrollWidth,d=this.scrollLeft!==s.scrollLeft,f=this.height!==s.height,p=this.scrollHeight!==s.scrollHeight,v=this.scrollTop!==s.scrollTop;return{inSmoothScrolling:a,oldWidth:s.width,oldScrollWidth:s.scrollWidth,oldScrollLeft:s.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:s.height,oldScrollHeight:s.scrollHeight,oldScrollTop:s.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:l,scrollWidthChanged:u,scrollLeftChanged:d,heightChanged:f,scrollHeightChanged:p,scrollTopChanged:v}}},Jw=class extends Xe{constructor(t){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Se),this.onScroll=this._onScroll.event,this._smoothScrollDuration=t.smoothScrollDuration,this._scheduleAtNextAnimationFrame=t.scheduleAtNextAnimationFrame,this._state=new Qw(t.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(t){this._smoothScrollDuration=t}validateScrollPosition(t){return this._state.withScrollPosition(t)}getScrollDimensions(){return this._state}setScrollDimensions(t,s){var l;let a=this._state.withScrollDimensions(t,s);this._setState(a,!!this._smoothScrolling),(l=this._smoothScrolling)==null||l.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(t){let s=this._state.withScrollPosition(t);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(s,!1)}setScrollPositionSmooth(t,s){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(t);if(this._smoothScrolling){t={scrollLeft:typeof t.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:t.scrollLeft,scrollTop:typeof t.scrollTop>"u"?this._smoothScrolling.to.scrollTop:t.scrollTop};let a=this._state.withScrollPosition(t);if(this._smoothScrolling.to.scrollLeft===a.scrollLeft&&this._smoothScrolling.to.scrollTop===a.scrollTop)return;let l;s?l=new Wg(this._smoothScrolling.from,a,this._smoothScrolling.startTime,this._smoothScrolling.duration):l=this._smoothScrolling.combine(this._state,a,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=l}else{let a=this._state.withScrollPosition(t);this._smoothScrolling=Wg.start(this._state,a,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let t=this._smoothScrolling.tick(),s=this._state.withScrollPosition(t);if(this._setState(s,!0),!!this._smoothScrolling){if(t.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(t,s){let a=this._state;a.equals(t)||(this._state=t,this._onScroll.fire(this._state.createScrollEvent(a,s)))}},Xg=class{constructor(t,s,a){this.scrollLeft=t,this.scrollTop=s,this.isDone=a}};function Hd(t,s){let a=s-t;return function(l){return t+a*iC(l)}}function eC(t,s,a){return function(l){return l<a?t(l/a):s((l-a)/(1-a))}}var Wg=class vf{constructor(s,a,l,u){this.from=s,this.to=a,this.duration=u,this.startTime=l,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(s,a,l){if(Math.abs(s-a)>2.5*l){let u,d;return s<a?(u=s+.75*l,d=a-.75*l):(u=s-.75*l,d=a+.75*l),eC(Hd(s,u),Hd(d,a),.33)}return Hd(s,a)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(s){this.to=s.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(s){let a=(s-this.startTime)/this.duration;if(a<1){let l=this.scrollLeft(a),u=this.scrollTop(a);return new Xg(l,u,!1)}return new Xg(this.to.scrollLeft,this.to.scrollTop,!0)}combine(s,a,l){return vf.start(s,a,l)}static start(s,a,l){l=l+10;let u=Date.now()-10;return new vf(s,a,u,l)}};function tC(t){return Math.pow(t,3)}function iC(t){return 1-tC(1-t)}var sC=class extends Xe{constructor(t,s,a){super(),this._visibility=t,this._visibleClassName=s,this._invisibleClassName=a,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new $f)}setVisibility(t){this._visibility!==t&&(this._visibility=t,this._updateShouldBeVisible())}setShouldBeVisible(t){this._rawShouldBeVisible=t,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let t=this._applyVisibilitySetting();this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(t){this._isNeeded!==t&&(this._isNeeded=t,this.ensureVisibility())}setDomNode(t){this._domNode=t,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var t;(t=this._domNode)==null||t.setClassName(this._visibleClassName)},0))}_hide(t){var s;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(s=this._domNode)==null||s.setClassName(this._invisibleClassName+(t?" fade":"")))}},rC=140,E1=class extends Qf{constructor(t){super(),this._lazyRender=t.lazyRender,this._host=t.host,this._scrollable=t.scrollable,this._scrollByPage=t.scrollByPage,this._scrollbarState=t.scrollbarState,this._visibilityController=this._register(new sC(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new k1),this._shouldRender=!0,this.domNode=jl(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(He(this.domNode.domNode,Zt.POINTER_DOWN,s=>this._domNodePointerDown(s)))}_createArrow(t){let s=this._register(new Zw(t));this.domNode.domNode.appendChild(s.bgDomNode),this.domNode.domNode.appendChild(s.domNode)}_createSlider(t,s,a,l){this.slider=jl(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(t),this.slider.setLeft(s),typeof a=="number"&&this.slider.setWidth(a),typeof l=="number"&&this.slider.setHeight(l),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(He(this.slider.domNode,Zt.POINTER_DOWN,u=>{u.button===0&&(u.preventDefault(),this._sliderPointerDown(u))})),this.onclick(this.slider.domNode,u=>{u.leftButton&&u.stopPropagation()})}_onElementSize(t){return this._scrollbarState.setVisibleSize(t)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(t){return this._scrollbarState.setScrollSize(t)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(t){return this._scrollbarState.setScrollPosition(t)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(t){t.target===this.domNode.domNode&&this._onPointerDown(t)}delegatePointerDown(t){let s=this.domNode.domNode.getClientRects()[0].top,a=s+this._scrollbarState.getSliderPosition(),l=s+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),u=this._sliderPointerPosition(t);a<=u&&u<=l?t.button===0&&(t.preventDefault(),this._sliderPointerDown(t)):this._onPointerDown(t)}_onPointerDown(t){let s,a;if(t.target===this.domNode.domNode&&typeof t.offsetX=="number"&&typeof t.offsetY=="number")s=t.offsetX,a=t.offsetY;else{let u=Xw(this.domNode.domNode);s=t.pageX-u.left,a=t.pageY-u.top}let l=this._pointerDownRelativePosition(s,a);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(l):this._scrollbarState.getDesiredScrollPositionFromOffset(l)),t.button===0&&(t.preventDefault(),this._sliderPointerDown(t))}_sliderPointerDown(t){if(!t.target||!(t.target instanceof Element))return;let s=this._sliderPointerPosition(t),a=this._sliderOrthogonalPointerPosition(t),l=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(t.target,t.pointerId,t.buttons,u=>{let d=this._sliderOrthogonalPointerPosition(u),f=Math.abs(d-a);if(b1&&f>rC){this._setDesiredScrollPositionNow(l.getScrollPosition());return}let p=this._sliderPointerPosition(u)-s;this._setDesiredScrollPositionNow(l.getDesiredScrollPositionFromDelta(p))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(t){let s={};this.writeScrollPosition(s,t),this._scrollable.setScrollPositionNow(s)}updateScrollbarSize(t){this._updateScrollbarSize(t),this._scrollbarState.setScrollbarSize(t),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},N1=class gf{constructor(s,a,l,u,d,f){this._scrollbarSize=Math.round(a),this._oppositeScrollbarSize=Math.round(l),this._arrowSize=Math.round(s),this._visibleSize=u,this._scrollSize=d,this._scrollPosition=f,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new gf(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(s){let a=Math.round(s);return this._visibleSize!==a?(this._visibleSize=a,this._refreshComputedValues(),!0):!1}setScrollSize(s){let a=Math.round(s);return this._scrollSize!==a?(this._scrollSize=a,this._refreshComputedValues(),!0):!1}setScrollPosition(s){let a=Math.round(s);return this._scrollPosition!==a?(this._scrollPosition=a,this._refreshComputedValues(),!0):!1}setScrollbarSize(s){this._scrollbarSize=Math.round(s)}setOppositeScrollbarSize(s){this._oppositeScrollbarSize=Math.round(s)}static _computeValues(s,a,l,u,d){let f=Math.max(0,l-s),p=Math.max(0,f-2*a),v=u>0&&u>l;if(!v)return{computedAvailableSize:Math.round(f),computedIsNeeded:v,computedSliderSize:Math.round(p),computedSliderRatio:0,computedSliderPosition:0};let _=Math.round(Math.max(20,Math.floor(l*p/u))),w=(p-_)/(u-l),g=d*w;return{computedAvailableSize:Math.round(f),computedIsNeeded:v,computedSliderSize:Math.round(_),computedSliderRatio:w,computedSliderPosition:Math.round(g)}}_refreshComputedValues(){let s=gf._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=s.computedAvailableSize,this._computedIsNeeded=s.computedIsNeeded,this._computedSliderSize=s.computedSliderSize,this._computedSliderRatio=s.computedSliderRatio,this._computedSliderPosition=s.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(s){if(!this._computedIsNeeded)return 0;let a=s-this._arrowSize-this._computedSliderSize/2;return Math.round(a/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(s){if(!this._computedIsNeeded)return 0;let a=s-this._arrowSize,l=this._scrollPosition;return a<this._computedSliderPosition?l-=this._visibleSize:l+=this._visibleSize,l}getDesiredScrollPositionFromDelta(s){if(!this._computedIsNeeded)return 0;let a=this._computedSliderPosition+s;return Math.round(a/this._computedSliderRatio)}},nC=class extends E1{constructor(t,s,a){let l=t.getScrollDimensions(),u=t.getCurrentScrollPosition();if(super({lazyRender:s.lazyRender,host:a,scrollbarState:new N1(s.horizontalHasArrows?s.arrowSize:0,s.horizontal===2?0:s.horizontalScrollbarSize,s.vertical===2?0:s.verticalScrollbarSize,l.width,l.scrollWidth,u.scrollLeft),visibility:s.horizontal,extraScrollbarClassName:"horizontal",scrollable:t,scrollByPage:s.scrollByPage}),s.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((s.horizontalScrollbarSize-s.horizontalSliderSize)/2),0,void 0,s.horizontalSliderSize)}_updateSlider(t,s){this.slider.setWidth(t),this.slider.setLeft(s)}_renderDomNode(t,s){this.domNode.setWidth(t),this.domNode.setHeight(s),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(t){return this._shouldRender=this._onElementScrollSize(t.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(t.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(t.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(t,s){return t}_sliderPointerPosition(t){return t.pageX}_sliderOrthogonalPointerPosition(t){return t.pageY}_updateScrollbarSize(t){this.slider.setHeight(t)}writeScrollPosition(t,s){t.scrollLeft=s}updateOptions(t){this.updateScrollbarSize(t.horizontal===2?0:t.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(t.vertical===2?0:t.verticalScrollbarSize),this._visibilityController.setVisibility(t.horizontal),this._scrollByPage=t.scrollByPage}},aC=class extends E1{constructor(t,s,a){let l=t.getScrollDimensions(),u=t.getCurrentScrollPosition();if(super({lazyRender:s.lazyRender,host:a,scrollbarState:new N1(s.verticalHasArrows?s.arrowSize:0,s.vertical===2?0:s.verticalScrollbarSize,0,l.height,l.scrollHeight,u.scrollTop),visibility:s.vertical,extraScrollbarClassName:"vertical",scrollable:t,scrollByPage:s.scrollByPage}),s.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((s.verticalScrollbarSize-s.verticalSliderSize)/2),s.verticalSliderSize,void 0)}_updateSlider(t,s){this.slider.setHeight(t),this.slider.setTop(s)}_renderDomNode(t,s){this.domNode.setWidth(s),this.domNode.setHeight(t),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(t){return this._shouldRender=this._onElementScrollSize(t.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(t.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(t.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(t,s){return s}_sliderPointerPosition(t){return t.pageY}_sliderOrthogonalPointerPosition(t){return t.pageX}_updateScrollbarSize(t){this.slider.setWidth(t)}writeScrollPosition(t,s){t.scrollTop=s}updateOptions(t){this.updateScrollbarSize(t.vertical===2?0:t.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(t.vertical),this._scrollByPage=t.scrollByPage}},lC=500,Gg=50,oC=class{constructor(t,s,a){this.timestamp=t,this.deltaX=s,this.deltaY=a,this.score=0}},xf=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let s=1,a=0,l=1,u=this._rear;do{let d=u===this._front?s:Math.pow(2,-l);if(s-=d,a+=this._memory[u].score*d,u===this._front)break;u=(this._capacity+u-1)%this._capacity,l++}while(!0);return a<=.5}acceptStandardWheelEvent(s){if(Wf){let a=Ts(s.browserEvent),l=xw(a);this.accept(Date.now(),s.deltaX*l,s.deltaY*l)}else this.accept(Date.now(),s.deltaX,s.deltaY)}accept(s,a,l){let u=null,d=new oC(s,a,l);this._front===-1&&this._rear===-1?(this._memory[0]=d,this._front=0,this._rear=0):(u=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=d),d.score=this._computeScore(d,u)}_computeScore(s,a){if(Math.abs(s.deltaX)>0&&Math.abs(s.deltaY)>0)return 1;let l=.5;if((!this._isAlmostInt(s.deltaX)||!this._isAlmostInt(s.deltaY))&&(l+=.25),a){let u=Math.abs(s.deltaX),d=Math.abs(s.deltaY),f=Math.abs(a.deltaX),p=Math.abs(a.deltaY),v=Math.max(Math.min(u,f),1),_=Math.max(Math.min(d,p),1),w=Math.max(u,f),g=Math.max(d,p);w%v===0&&g%_===0&&(l-=.5)}return Math.min(Math.max(l,0),1)}_isAlmostInt(s){return Math.abs(Math.round(s)-s)<.01}};xf.INSTANCE=new xf;var cC=xf,hC=class extends Qf{constructor(t,s,a){super(),this._onScroll=this._register(new Se),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Se),this.onWillScroll=this._onWillScroll.event,this._options=dC(s),this._scrollable=a,this._register(this._scrollable.onScroll(u=>{this._onWillScroll.fire(u),this._onDidScroll(u),this._onScroll.fire(u)}));let l={onMouseWheel:u=>this._onMouseWheel(u),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new aC(this._scrollable,this._options,l)),this._horizontalScrollbar=this._register(new nC(this._scrollable,this._options,l)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(t),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=jl(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=jl(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=jl(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,u=>this._onMouseOver(u)),this.onmouseleave(this._listenOnDomNode,u=>this._onMouseLeave(u)),this._hideTimeout=this._register(new $f),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=kn(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(t){this._verticalScrollbar.delegatePointerDown(t)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(t){this._scrollable.setScrollDimensions(t,!1)}updateClassName(t){this._options.className=t,js&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(t){typeof t.handleMouseWheel<"u"&&(this._options.handleMouseWheel=t.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof t.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity),typeof t.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=t.fastScrollSensitivity),typeof t.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=t.scrollPredominantAxis),typeof t.horizontal<"u"&&(this._options.horizontal=t.horizontal),typeof t.vertical<"u"&&(this._options.vertical=t.vertical),typeof t.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=t.horizontalScrollbarSize),typeof t.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=t.verticalScrollbarSize),typeof t.scrollByPage<"u"&&(this._options.scrollByPage=t.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(t){this._revealOnScroll=t}delegateScrollFromMouseWheelEvent(t){this._onMouseWheel(new Kg(t))}_setListeningToMouseWheel(t){if(this._mouseWheelToDispose.length>0!==t&&(this._mouseWheelToDispose=kn(this._mouseWheelToDispose),t)){let s=a=>{this._onMouseWheel(new Kg(a))};this._mouseWheelToDispose.push(He(this._listenOnDomNode,Zt.MOUSE_WHEEL,s,{passive:!1}))}}_onMouseWheel(t){var u;if((u=t.browserEvent)!=null&&u.defaultPrevented)return;let s=cC.INSTANCE;s.acceptStandardWheelEvent(t);let a=!1;if(t.deltaY||t.deltaX){let d=t.deltaY*this._options.mouseWheelScrollSensitivity,f=t.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&f+d===0?f=d=0:Math.abs(d)>=Math.abs(f)?f=0:d=0),this._options.flipAxes&&([d,f]=[f,d]);let p=!js&&t.browserEvent&&t.browserEvent.shiftKey;(this._options.scrollYToX||p)&&!f&&(f=d,d=0),t.browserEvent&&t.browserEvent.altKey&&(f=f*this._options.fastScrollSensitivity,d=d*this._options.fastScrollSensitivity);let v=this._scrollable.getFutureScrollPosition(),_={};if(d){let w=Gg*d,g=v.scrollTop-(w<0?Math.floor(w):Math.ceil(w));this._verticalScrollbar.writeScrollPosition(_,g)}if(f){let w=Gg*f,g=v.scrollLeft-(w<0?Math.floor(w):Math.ceil(w));this._horizontalScrollbar.writeScrollPosition(_,g)}_=this._scrollable.validateScrollPosition(_),(v.scrollLeft!==_.scrollLeft||v.scrollTop!==_.scrollTop)&&(this._options.mouseWheelSmoothScroll&&s.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(_):this._scrollable.setScrollPositionNow(_),a=!0)}let l=a;!l&&this._options.alwaysConsumeMouseWheel&&(l=!0),!l&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(l=!0),l&&(t.preventDefault(),t.stopPropagation())}_onDidScroll(t){this._shouldRender=this._horizontalScrollbar.onDidScroll(t)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(t)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let t=this._scrollable.getCurrentScrollPosition(),s=t.scrollTop>0,a=t.scrollLeft>0,l=a?" left":"",u=s?" top":"",d=a||s?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${l}`),this._topShadowDomNode.setClassName(`shadow${u}`),this._topLeftShadowDomNode.setClassName(`shadow${d}${u}${l}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(t){this._mouseIsOver=!1,this._hide()}_onMouseOver(t){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),lC)}},uC=class extends hC{constructor(t,s,a){super(t,s,a)}setScrollPosition(t){t.reuseAnimation?this._scrollable.setScrollPositionSmooth(t,t.reuseAnimation):this._scrollable.setScrollPositionNow(t)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function dC(t){let s={lazyRender:typeof t.lazyRender<"u"?t.lazyRender:!1,className:typeof t.className<"u"?t.className:"",useShadows:typeof t.useShadows<"u"?t.useShadows:!0,handleMouseWheel:typeof t.handleMouseWheel<"u"?t.handleMouseWheel:!0,flipAxes:typeof t.flipAxes<"u"?t.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof t.consumeMouseWheelIfScrollbarIsNeeded<"u"?t.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof t.alwaysConsumeMouseWheel<"u"?t.alwaysConsumeMouseWheel:!1,scrollYToX:typeof t.scrollYToX<"u"?t.scrollYToX:!1,mouseWheelScrollSensitivity:typeof t.mouseWheelScrollSensitivity<"u"?t.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof t.fastScrollSensitivity<"u"?t.fastScrollSensitivity:5,scrollPredominantAxis:typeof t.scrollPredominantAxis<"u"?t.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof t.mouseWheelSmoothScroll<"u"?t.mouseWheelSmoothScroll:!0,arrowSize:typeof t.arrowSize<"u"?t.arrowSize:11,listenOnDomNode:typeof t.listenOnDomNode<"u"?t.listenOnDomNode:null,horizontal:typeof t.horizontal<"u"?t.horizontal:1,horizontalScrollbarSize:typeof t.horizontalScrollbarSize<"u"?t.horizontalScrollbarSize:10,horizontalSliderSize:typeof t.horizontalSliderSize<"u"?t.horizontalSliderSize:0,horizontalHasArrows:typeof t.horizontalHasArrows<"u"?t.horizontalHasArrows:!1,vertical:typeof t.vertical<"u"?t.vertical:1,verticalScrollbarSize:typeof t.verticalScrollbarSize<"u"?t.verticalScrollbarSize:10,verticalHasArrows:typeof t.verticalHasArrows<"u"?t.verticalHasArrows:!1,verticalSliderSize:typeof t.verticalSliderSize<"u"?t.verticalSliderSize:0,scrollByPage:typeof t.scrollByPage<"u"?t.scrollByPage:!1};return s.horizontalSliderSize=typeof t.horizontalSliderSize<"u"?t.horizontalSliderSize:s.horizontalScrollbarSize,s.verticalSliderSize=typeof t.verticalSliderSize<"u"?t.verticalSliderSize:s.verticalScrollbarSize,js&&(s.className+=" mac"),s}var yf=class extends Xe{constructor(t,s,a,l,u,d,f,p){super(),this._bufferService=a,this._optionsService=f,this._renderService=p,this._onRequestScrollLines=this._register(new Se),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let v=this._register(new Jw({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:_=>Zf(l.window,_)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{v.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new uC(s,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},v)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(u.onProtocolChange(_=>{this._scrollableElement.updateOptions({handleMouseWheel:!(_&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(ui.runAndSubscribe(d.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=d.colors.background.css})),t.appendChild(this._scrollableElement.getDomNode()),this._register(wt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=l.mainDocument.createElement("style"),s.appendChild(this._styleElement),this._register(wt(()=>this._styleElement.remove())),this._register(ui.runAndSubscribe(d.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${d.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${d.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${d.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
390
|
-
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(_=>this._handleScroll(_)))}scrollLines(t){let s=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:s.scrollTop+t*this._renderService.dimensions.css.cell.height})}scrollToLine(t,s){s&&(this._latestYDisp=t),this._scrollableElement.setScrollPosition({reuseAnimation:!s,scrollTop:t*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var t;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((t=this._optionsService.rawOptions.overviewRuler)==null?void 0:t.width)||14}}queueSync(t){t!==void 0&&(this._latestYDisp=t),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(t=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,t!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:t*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(t){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let s=Math.round(t.scrollTop/this._renderService.dimensions.css.cell.height),a=s-this._bufferService.buffer.ydisp;a!==0&&(this._latestYDisp=s,this._onRequestScrollLines.fire(a)),this._isHandlingScroll=!1}};yf=jt([Ee(2,yi),Ee(3,Js),Ee(4,l1),Ee(5,wa),Ee(6,bi),Ee(7,er)],yf);var bf=class extends Xe{constructor(t,s,a,l,u){super(),this._screenElement=t,this._bufferService=s,this._coreBrowserService=a,this._decorationService=l,this._renderService=u,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(d=>this._removeDecoration(d))),this._register(wt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let t of this._decorationService.decorations)this._renderDecoration(t);this._dimensionsChanged=!1}_renderDecoration(t){this._refreshStyle(t),this._dimensionsChanged&&this._refreshXPosition(t)}_createElement(t){var l;let s=this._coreBrowserService.mainDocument.createElement("div");s.classList.add("xterm-decoration"),s.classList.toggle("xterm-decoration-top-layer",((l=t==null?void 0:t.options)==null?void 0:l.layer)==="top"),s.style.width=`${Math.round((t.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,s.style.height=`${(t.options.height||1)*this._renderService.dimensions.css.cell.height}px`,s.style.top=`${(t.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,s.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let a=t.options.x??0;return a&&a>this._bufferService.cols&&(s.style.display="none"),this._refreshXPosition(t,s),s}_refreshStyle(t){let s=t.marker.line-this._bufferService.buffers.active.ydisp;if(s<0||s>=this._bufferService.rows)t.element&&(t.element.style.display="none",t.onRenderEmitter.fire(t.element));else{let a=this._decorationElements.get(t);a||(a=this._createElement(t),t.element=a,this._decorationElements.set(t,a),this._container.appendChild(a),t.onDispose(()=>{this._decorationElements.delete(t),a.remove()})),a.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(a.style.width=`${Math.round((t.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,a.style.height=`${(t.options.height||1)*this._renderService.dimensions.css.cell.height}px`,a.style.top=`${s*this._renderService.dimensions.css.cell.height}px`,a.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),t.onRenderEmitter.fire(a)}}_refreshXPosition(t,s=t.element){if(!s)return;let a=t.options.x??0;(t.options.anchor||"left")==="right"?s.style.right=a?`${a*this._renderService.dimensions.css.cell.width}px`:"":s.style.left=a?`${a*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(t){var s;(s=this._decorationElements.get(t))==null||s.remove(),this._decorationElements.delete(t),t.dispose()}};bf=jt([Ee(1,yi),Ee(2,Js),Ee(3,Pl),Ee(4,er)],bf);var fC=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(t){if(t.options.overviewRulerOptions){for(let s of this._zones)if(s.color===t.options.overviewRulerOptions.color&&s.position===t.options.overviewRulerOptions.position){if(this._lineIntersectsZone(s,t.marker.line))return;if(this._lineAdjacentToZone(s,t.marker.line,t.options.overviewRulerOptions.position)){this._addLineToZone(s,t.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=t.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=t.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=t.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=t.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:t.options.overviewRulerOptions.color,position:t.options.overviewRulerOptions.position,startBufferLine:t.marker.line,endBufferLine:t.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(t){this._linePadding=t}_lineIntersectsZone(t,s){return s>=t.startBufferLine&&s<=t.endBufferLine}_lineAdjacentToZone(t,s,a){return s>=t.startBufferLine-this._linePadding[a||"full"]&&s<=t.endBufferLine+this._linePadding[a||"full"]}_addLineToZone(t,s){t.startBufferLine=Math.min(t.startBufferLine,s),t.endBufferLine=Math.max(t.endBufferLine,s)}},Ns={full:0,left:0,center:0,right:0},Br={full:0,left:0,center:0,right:0},xl={full:0,left:0,center:0,right:0},Hc=class extends Xe{constructor(t,s,a,l,u,d,f,p){var _;super(),this._viewportElement=t,this._screenElement=s,this._bufferService=a,this._decorationService=l,this._renderService=u,this._optionsService=d,this._themeService=f,this._coreBrowserService=p,this._colorZoneStore=new fC,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(),(_=this._viewportElement.parentElement)==null||_.insertBefore(this._canvas,this._viewportElement),this._register(wt(()=>{var w;return(w=this._canvas)==null?void 0:w.remove()}));let v=this._canvas.getContext("2d");if(v)this._ctx=v;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),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())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var t;return((t=this._optionsService.options.overviewRuler)==null?void 0:t.width)||0}_refreshDrawConstants(){let t=Math.floor((this._canvas.width-1)/3),s=Math.ceil((this._canvas.width-1)/3);Br.full=this._canvas.width,Br.left=t,Br.center=s,Br.right=t,this._refreshDrawHeightConstants(),xl.full=1,xl.left=1,xl.center=1+Br.left,xl.right=1+Br.left+Br.center}_refreshDrawHeightConstants(){Ns.full=Math.round(2*this._coreBrowserService.dpr);let t=this._canvas.height/this._bufferService.buffer.lines.length,s=Math.round(Math.max(Math.min(t,12),6)*this._coreBrowserService.dpr);Ns.left=s,Ns.center=s,Ns.right=s}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Ns.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Ns.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Ns.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Ns.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(let s of this._decorationService.decorations)this._colorZoneStore.addDecoration(s);this._ctx.lineWidth=1,this._renderRulerOutline();let t=this._colorZoneStore.zones;for(let s of t)s.position!=="full"&&this._renderColorZone(s);for(let s of t)s.position==="full"&&this._renderColorZone(s);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(t){this._ctx.fillStyle=t.color,this._ctx.fillRect(xl[t.position||"full"],Math.round((this._canvas.height-1)*(t.startBufferLine/this._bufferService.buffers.active.lines.length)-Ns[t.position||"full"]/2),Br[t.position||"full"],Math.round((this._canvas.height-1)*((t.endBufferLine-t.startBufferLine)/this._bufferService.buffers.active.lines.length)+Ns[t.position||"full"]))}_queueRefresh(t,s){this._shouldUpdateDimensions=t||this._shouldUpdateDimensions,this._shouldUpdateAnchor=s||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};Hc=jt([Ee(2,yi),Ee(3,Pl),Ee(4,er),Ee(5,bi),Ee(6,wa),Ee(7,Js)],Hc);var le;(t=>(t.NUL="\0",t.SOH="",t.STX="",t.ETX="",t.EOT="",t.ENQ="",t.ACK="",t.BEL="\x07",t.BS="\b",t.HT=" ",t.LF=`
|
|
391
|
-
`,t.VT="\v",t.FF="\f",t.CR="\r",t.SO="",t.SI="",t.DLE="",t.DC1="",t.DC2="",t.DC3="",t.DC4="",t.NAK="",t.SYN="",t.ETB="",t.CAN="",t.EM="",t.SUB="",t.ESC="\x1B",t.FS="",t.GS="",t.RS="",t.US="",t.SP=" ",t.DEL=""))(le||(le={}));var Tc;(t=>(t.PAD="",t.HOP="",t.BPH="",t.NBH="",t.IND="",t.NEL="
",t.SSA="",t.ESA="",t.HTS="",t.HTJ="",t.VTS="",t.PLD="",t.PLU="",t.RI="",t.SS2="",t.SS3="",t.DCS="",t.PU1="",t.PU2="",t.STS="",t.CCH="",t.MW="",t.SPA="",t.EPA="",t.SOS="",t.SGCI="",t.SCI="",t.CSI="",t.ST="",t.OSC="",t.PM="",t.APC=""))(Tc||(Tc={}));var M1;(t=>t.ST=`${le.ESC}\\`)(M1||(M1={}));var Sf=class{constructor(t,s,a,l,u,d){this._textarea=t,this._compositionView=s,this._bufferService=a,this._optionsService=l,this._coreService=u,this._renderService=d,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(t){this._compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(t){if(this._isComposing||this._isSendingComposition){if(t.keyCode===20||t.keyCode===229||t.keyCode===16||t.keyCode===17||t.keyCode===18)return!1;this._finalizeComposition(!1)}return t.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(t){if(this._compositionView.classList.remove("active"),this._isComposing=!1,t){let s={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let a;s.start+=this._dataAlreadySent.length,this._isComposing?a=this._textarea.value.substring(s.start,this._compositionPosition.start):a=this._textarea.value.substring(s.start),a.length>0&&this._coreService.triggerDataEvent(a,!0)}},0)}else{this._isSendingComposition=!1;let s=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(s,!0)}}_handleAnyTextareaChanges(){let t=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let s=this._textarea.value,a=s.replace(t,"");this._dataAlreadySent=a,s.length>t.length?this._coreService.triggerDataEvent(a,!0):s.length<t.length?this._coreService.triggerDataEvent(`${le.DEL}`,!0):s.length===t.length&&s!==t&&this._coreService.triggerDataEvent(s,!0)}},0)}updateCompositionElements(t){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let s=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),a=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,u=s*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=u+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=a+"px",this._compositionView.style.lineHeight=a+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let d=this._compositionView.getBoundingClientRect();this._textarea.style.left=u+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(d.width,1)+"px",this._textarea.style.height=Math.max(d.height,1)+"px",this._textarea.style.lineHeight=d.height+"px"}t||setTimeout(()=>this.updateCompositionElements(!0),0)}}};Sf=jt([Ee(2,yi),Ee(3,bi),Ee(4,Nn),Ee(5,er)],Sf);var Qt=0,Jt=0,ei=0,Tt=0,$g={css:"#00000000",rgba:0},Yt;(t=>{function s(u,d,f,p){return p!==void 0?`#${mn(u)}${mn(d)}${mn(f)}${mn(p)}`:`#${mn(u)}${mn(d)}${mn(f)}`}t.toCss=s;function a(u,d,f,p=255){return(u<<24|d<<16|f<<8|p)>>>0}t.toRgba=a;function l(u,d,f,p){return{css:t.toCss(u,d,f,p),rgba:t.toRgba(u,d,f,p)}}t.toColor=l})(Yt||(Yt={}));var yt;(t=>{function s(v,_){if(Tt=(_.rgba&255)/255,Tt===1)return{css:_.css,rgba:_.rgba};let w=_.rgba>>24&255,g=_.rgba>>16&255,y=_.rgba>>8&255,T=v.rgba>>24&255,R=v.rgba>>16&255,I=v.rgba>>8&255;Qt=T+Math.round((w-T)*Tt),Jt=R+Math.round((g-R)*Tt),ei=I+Math.round((y-I)*Tt);let Z=Yt.toCss(Qt,Jt,ei),ue=Yt.toRgba(Qt,Jt,ei);return{css:Z,rgba:ue}}t.blend=s;function a(v){return(v.rgba&255)===255}t.isOpaque=a;function l(v,_,w){let g=jc.ensureContrastRatio(v.rgba,_.rgba,w);if(g)return Yt.toColor(g>>24&255,g>>16&255,g>>8&255)}t.ensureContrastRatio=l;function u(v){let _=(v.rgba|255)>>>0;return[Qt,Jt,ei]=jc.toChannels(_),{css:Yt.toCss(Qt,Jt,ei),rgba:_}}t.opaque=u;function d(v,_){return Tt=Math.round(_*255),[Qt,Jt,ei]=jc.toChannels(v.rgba),{css:Yt.toCss(Qt,Jt,ei,Tt),rgba:Yt.toRgba(Qt,Jt,ei,Tt)}}t.opacity=d;function f(v,_){return Tt=v.rgba&255,d(v,Tt*_/255)}t.multiplyOpacity=f;function p(v){return[v.rgba>>24&255,v.rgba>>16&255,v.rgba>>8&255]}t.toColorRGB=p})(yt||(yt={}));var Et;(t=>{let s,a;try{let u=document.createElement("canvas");u.width=1,u.height=1;let d=u.getContext("2d",{willReadFrequently:!0});d&&(s=d,s.globalCompositeOperation="copy",a=s.createLinearGradient(0,0,1,1))}catch{}function l(u){if(u.match(/#[\da-f]{3,8}/i))switch(u.length){case 4:return Qt=parseInt(u.slice(1,2).repeat(2),16),Jt=parseInt(u.slice(2,3).repeat(2),16),ei=parseInt(u.slice(3,4).repeat(2),16),Yt.toColor(Qt,Jt,ei);case 5:return Qt=parseInt(u.slice(1,2).repeat(2),16),Jt=parseInt(u.slice(2,3).repeat(2),16),ei=parseInt(u.slice(3,4).repeat(2),16),Tt=parseInt(u.slice(4,5).repeat(2),16),Yt.toColor(Qt,Jt,ei,Tt);case 7:return{css:u,rgba:(parseInt(u.slice(1),16)<<8|255)>>>0};case 9:return{css:u,rgba:parseInt(u.slice(1),16)>>>0}}let d=u.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(d)return Qt=parseInt(d[1]),Jt=parseInt(d[2]),ei=parseInt(d[3]),Tt=Math.round((d[5]===void 0?1:parseFloat(d[5]))*255),Yt.toColor(Qt,Jt,ei,Tt);if(!s||!a)throw new Error("css.toColor: Unsupported css format");if(s.fillStyle=a,s.fillStyle=u,typeof s.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(s.fillRect(0,0,1,1),[Qt,Jt,ei,Tt]=s.getImageData(0,0,1,1).data,Tt!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Yt.toRgba(Qt,Jt,ei,Tt),css:u}}t.toColor=l})(Et||(Et={}));var xi;(t=>{function s(l){return a(l>>16&255,l>>8&255,l&255)}t.relativeLuminance=s;function a(l,u,d){let f=l/255,p=u/255,v=d/255,_=f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4),w=p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4),g=v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4);return _*.2126+w*.7152+g*.0722}t.relativeLuminance2=a})(xi||(xi={}));var jc;(t=>{function s(f,p){if(Tt=(p&255)/255,Tt===1)return p;let v=p>>24&255,_=p>>16&255,w=p>>8&255,g=f>>24&255,y=f>>16&255,T=f>>8&255;return Qt=g+Math.round((v-g)*Tt),Jt=y+Math.round((_-y)*Tt),ei=T+Math.round((w-T)*Tt),Yt.toRgba(Qt,Jt,ei)}t.blend=s;function a(f,p,v){let _=xi.relativeLuminance(f>>8),w=xi.relativeLuminance(p>>8);if($s(_,w)<v){if(w<_){let T=l(f,p,v),R=$s(_,xi.relativeLuminance(T>>8));if(R<v){let I=u(f,p,v),Z=$s(_,xi.relativeLuminance(I>>8));return R>Z?T:I}return T}let g=u(f,p,v),y=$s(_,xi.relativeLuminance(g>>8));if(y<v){let T=l(f,p,v),R=$s(_,xi.relativeLuminance(T>>8));return y>R?g:T}return g}}t.ensureContrastRatio=a;function l(f,p,v){let _=f>>24&255,w=f>>16&255,g=f>>8&255,y=p>>24&255,T=p>>16&255,R=p>>8&255,I=$s(xi.relativeLuminance2(y,T,R),xi.relativeLuminance2(_,w,g));for(;I<v&&(y>0||T>0||R>0);)y-=Math.max(0,Math.ceil(y*.1)),T-=Math.max(0,Math.ceil(T*.1)),R-=Math.max(0,Math.ceil(R*.1)),I=$s(xi.relativeLuminance2(y,T,R),xi.relativeLuminance2(_,w,g));return(y<<24|T<<16|R<<8|255)>>>0}t.reduceLuminance=l;function u(f,p,v){let _=f>>24&255,w=f>>16&255,g=f>>8&255,y=p>>24&255,T=p>>16&255,R=p>>8&255,I=$s(xi.relativeLuminance2(y,T,R),xi.relativeLuminance2(_,w,g));for(;I<v&&(y<255||T<255||R<255);)y=Math.min(255,y+Math.ceil((255-y)*.1)),T=Math.min(255,T+Math.ceil((255-T)*.1)),R=Math.min(255,R+Math.ceil((255-R)*.1)),I=$s(xi.relativeLuminance2(y,T,R),xi.relativeLuminance2(_,w,g));return(y<<24|T<<16|R<<8|255)>>>0}t.increaseLuminance=u;function d(f){return[f>>24&255,f>>16&255,f>>8&255,f&255]}t.toChannels=d})(jc||(jc={}));function mn(t){let s=t.toString(16);return s.length<2?"0"+s:s}function $s(t,s){return t<s?(s+.05)/(t+.05):(t+.05)/(s+.05)}var mC=class extends Ul{constructor(t,s,a){super(),this.content=0,this.combinedData="",this.fg=t.fg,this.bg=t.bg,this.combinedData=s,this._width=a}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(t){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Uc=class{constructor(t){this._bufferService=t,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new es}register(t){let s={id:this._nextCharacterJoinerId++,handler:t};return this._characterJoiners.push(s),s.id}deregister(t){for(let s=0;s<this._characterJoiners.length;s++)if(this._characterJoiners[s].id===t)return this._characterJoiners.splice(s,1),!0;return!1}getJoinedCharacters(t){if(this._characterJoiners.length===0)return[];let s=this._bufferService.buffer.lines.get(t);if(!s||s.length===0)return[];let a=[],l=s.translateToString(!0),u=0,d=0,f=0,p=s.getFg(0),v=s.getBg(0);for(let _=0;_<s.getTrimmedLength();_++)if(s.loadCell(_,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==p||this._workCell.bg!==v){if(_-u>1){let w=this._getJoinedRanges(l,f,d,s,u);for(let g=0;g<w.length;g++)a.push(w[g])}u=_,f=d,p=this._workCell.fg,v=this._workCell.bg}d+=this._workCell.getChars().length||zr.length}if(this._bufferService.cols-u>1){let _=this._getJoinedRanges(l,f,d,s,u);for(let w=0;w<_.length;w++)a.push(_[w])}return a}_getJoinedRanges(t,s,a,l,u){let d=t.substring(s,a),f=[];try{f=this._characterJoiners[0].handler(d)}catch(p){console.error(p)}for(let p=1;p<this._characterJoiners.length;p++)try{let v=this._characterJoiners[p].handler(d);for(let _=0;_<v.length;_++)Uc._mergeRanges(f,v[_])}catch(v){console.error(v)}return this._stringRangesToCellRanges(f,l,u),f}_stringRangesToCellRanges(t,s,a){let l=0,u=!1,d=0,f=t[l];if(f){for(let p=a;p<this._bufferService.cols;p++){let v=s.getWidth(p),_=s.getString(p).length||zr.length;if(v!==0){if(!u&&f[0]<=d&&(f[0]=p,u=!0),f[1]<=d){if(f[1]=p,f=t[++l],!f)break;f[0]<=d?(f[0]=p,u=!0):u=!1}d+=_}}f&&(f[1]=this._bufferService.cols)}}static _mergeRanges(t,s){let a=!1;for(let l=0;l<t.length;l++){let u=t[l];if(a){if(s[1]<=u[0])return t[l-1][1]=s[1],t;if(s[1]<=u[1])return t[l-1][1]=Math.max(s[1],u[1]),t.splice(l,1),t;t.splice(l,1),l--}else{if(s[1]<=u[0])return t.splice(l,0,s),t;if(s[1]<=u[1])return u[0]=Math.min(s[0],u[0]),t;s[0]<u[1]&&(u[0]=Math.min(s[0],u[0]),a=!0);continue}}return a?t[t.length-1][1]=s[1]:t.push(s),t}};Uc=jt([Ee(0,yi)],Uc);function _C(t){return 57508<=t&&t<=57558}function pC(t){return 9472<=t&&t<=9631}function vC(t){return _C(t)||pC(t)}function gC(){return{css:{canvas:yc(),cell:yc()},device:{canvas:yc(),cell:yc(),char:{width:0,height:0,left:0,top:0}}}}function yc(){return{width:0,height:0}}var wf=class{constructor(t,s,a,l,u,d,f){this._document=t,this._characterJoinerService=s,this._optionsService=a,this._coreBrowserService=l,this._coreService=u,this._decorationService=d,this._themeService=f,this._workCell=new es,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(t,s,a){this._selectionStart=t,this._selectionEnd=s,this._columnSelectMode=a}createRow(t,s,a,l,u,d,f,p,v,_,w){let g=[],y=this._characterJoinerService.getJoinedCharacters(s),T=this._themeService.colors,R=t.getNoBgTrimmedLength();a&&R<d+1&&(R=d+1);let I,Z=0,ue="",pe=0,be=0,ee=0,me=0,ve=!1,ae=0,ge=!1,_e=0,we=0,ye=[],X=_!==-1&&w!==-1;for(let Q=0;Q<R;Q++){t.loadCell(Q,this._workCell);let $=this._workCell.getWidth();if($===0)continue;let j=!1,z=Q>=we,W=Q,D=this._workCell;if(y.length>0&&Q===y[0][0]&&z){let te=y.shift(),ke=this._isCellInSelection(te[0],s);for(pe=te[0]+1;pe<te[1];pe++)z&&(z=ke===this._isCellInSelection(pe,s));z&&(z=!a||d<te[0]||d>=te[1]),z?(j=!0,D=new mC(this._workCell,t.translateToString(!0,te[0],te[1]),te[1]-te[0]),W=te[1]-1,$=D.getWidth()):we=te[1]}let ce=this._isCellInSelection(Q,s),C=a&&Q===d,q=X&&Q>=_&&Q<=w,he=!1;this._decorationService.forEachDecorationAtCell(Q,s,void 0,te=>{he=!0});let de=D.getChars()||zr;if(de===" "&&(D.isUnderline()||D.isOverline())&&(de=" "),_e=$*p-v.get(de,D.isBold(),D.isItalic()),!I)I=this._document.createElement("span");else if(Z&&(ce&&ge||!ce&&!ge&&D.bg===be)&&(ce&&ge&&T.selectionForeground||D.fg===ee)&&D.extended.ext===me&&q===ve&&_e===ae&&!C&&!j&&!he&&z){D.isInvisible()?ue+=zr:ue+=de,Z++;continue}else Z&&(I.textContent=ue),I=this._document.createElement("span"),Z=0,ue="";if(be=D.bg,ee=D.fg,me=D.extended.ext,ve=q,ae=_e,ge=ce,j&&d>=Q&&d<=W&&(d=Q),!this._coreService.isCursorHidden&&C&&this._coreService.isCursorInitialized){if(ye.push("xterm-cursor"),this._coreBrowserService.isFocused)f&&ye.push("xterm-cursor-blink"),ye.push(l==="bar"?"xterm-cursor-bar":l==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(u)switch(u){case"outline":ye.push("xterm-cursor-outline");break;case"block":ye.push("xterm-cursor-block");break;case"bar":ye.push("xterm-cursor-bar");break;case"underline":ye.push("xterm-cursor-underline");break}}if(D.isBold()&&ye.push("xterm-bold"),D.isItalic()&&ye.push("xterm-italic"),D.isDim()&&ye.push("xterm-dim"),D.isInvisible()?ue=zr:ue=D.getChars()||zr,D.isUnderline()&&(ye.push(`xterm-underline-${D.extended.underlineStyle}`),ue===" "&&(ue=" "),!D.isUnderlineColorDefault()))if(D.isUnderlineColorRGB())I.style.textDecorationColor=`rgb(${Ul.toColorRGB(D.getUnderlineColor()).join(",")})`;else{let te=D.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&D.isBold()&&te<8&&(te+=8),I.style.textDecorationColor=T.ansi[te].css}D.isOverline()&&(ye.push("xterm-overline"),ue===" "&&(ue=" ")),D.isStrikethrough()&&ye.push("xterm-strikethrough"),q&&(I.style.textDecoration="underline");let b=D.getFgColor(),B=D.getFgColorMode(),Y=D.getBgColor(),G=D.getBgColorMode(),fe=!!D.isInverse();if(fe){let te=b;b=Y,Y=te;let ke=B;B=G,G=ke}let ne,A,J=!1;this._decorationService.forEachDecorationAtCell(Q,s,void 0,te=>{te.options.layer!=="top"&&J||(te.backgroundColorRGB&&(G=50331648,Y=te.backgroundColorRGB.rgba>>8&16777215,ne=te.backgroundColorRGB),te.foregroundColorRGB&&(B=50331648,b=te.foregroundColorRGB.rgba>>8&16777215,A=te.foregroundColorRGB),J=te.options.layer==="top")}),!J&&ce&&(ne=this._coreBrowserService.isFocused?T.selectionBackgroundOpaque:T.selectionInactiveBackgroundOpaque,Y=ne.rgba>>8&16777215,G=50331648,J=!0,T.selectionForeground&&(B=50331648,b=T.selectionForeground.rgba>>8&16777215,A=T.selectionForeground)),J&&ye.push("xterm-decoration-top");let N;switch(G){case 16777216:case 33554432:N=T.ansi[Y],ye.push(`xterm-bg-${Y}`);break;case 50331648:N=Yt.toColor(Y>>16,Y>>8&255,Y&255),this._addStyle(I,`background-color:#${Zg((Y>>>0).toString(16),"0",6)}`);break;case 0:default:fe?(N=T.foreground,ye.push("xterm-bg-257")):N=T.background}switch(ne||D.isDim()&&(ne=yt.multiplyOpacity(N,.5)),B){case 16777216:case 33554432:D.isBold()&&b<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(b+=8),this._applyMinimumContrast(I,N,T.ansi[b],D,ne,void 0)||ye.push(`xterm-fg-${b}`);break;case 50331648:let te=Yt.toColor(b>>16&255,b>>8&255,b&255);this._applyMinimumContrast(I,N,te,D,ne,A)||this._addStyle(I,`color:#${Zg(b.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(I,N,T.foreground,D,ne,A)||fe&&ye.push("xterm-fg-257")}ye.length&&(I.className=ye.join(" "),ye.length=0),!C&&!j&&!he&&z?Z++:I.textContent=ue,_e!==this.defaultSpacing&&(I.style.letterSpacing=`${_e}px`),g.push(I),Q=W}return I&&Z&&(I.textContent=ue),g}_applyMinimumContrast(t,s,a,l,u,d){if(this._optionsService.rawOptions.minimumContrastRatio===1||vC(l.getCode()))return!1;let f=this._getContrastCache(l),p;if(!u&&!d&&(p=f.getColor(s.rgba,a.rgba)),p===void 0){let v=this._optionsService.rawOptions.minimumContrastRatio/(l.isDim()?2:1);p=yt.ensureContrastRatio(u||s,d||a,v),f.setColor((u||s).rgba,(d||a).rgba,p??null)}return p?(this._addStyle(t,`color:${p.css}`),!0):!1}_getContrastCache(t){return t.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(t,s){t.setAttribute("style",`${t.getAttribute("style")||""}${s};`)}_isCellInSelection(t,s){let a=this._selectionStart,l=this._selectionEnd;return!a||!l?!1:this._columnSelectMode?a[0]<=l[0]?t>=a[0]&&s>=a[1]&&t<l[0]&&s<=l[1]:t<a[0]&&s>=a[1]&&t>=l[0]&&s<=l[1]:s>a[1]&&s<l[1]||a[1]===l[1]&&s===a[1]&&t>=a[0]&&t<l[0]||a[1]<l[1]&&s===l[1]&&t<l[0]||a[1]<l[1]&&s===a[1]&&t>=a[0]}};wf=jt([Ee(1,h1),Ee(2,bi),Ee(3,Js),Ee(4,Nn),Ee(5,Pl),Ee(6,wa)],wf);function Zg(t,s,a){for(;t.length<a;)t=s+t;return t}var xC=class{constructor(t,s){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=t.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";let a=t.createElement("span");a.classList.add("xterm-char-measure-element");let l=t.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold";let u=t.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontStyle="italic";let d=t.createElement("span");d.classList.add("xterm-char-measure-element"),d.style.fontWeight="bold",d.style.fontStyle="italic",this._measureElements=[a,l,u,d],this._container.appendChild(a),this._container.appendChild(l),this._container.appendChild(u),this._container.appendChild(d),s.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(t,s,a,l){t===this._font&&s===this._fontSize&&a===this._weight&&l===this._weightBold||(this._font=t,this._fontSize=s,this._weight=a,this._weightBold=l,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${a}`,this._measureElements[1].style.fontWeight=`${l}`,this._measureElements[2].style.fontWeight=`${a}`,this._measureElements[3].style.fontWeight=`${l}`,this.clear())}get(t,s,a){let l=0;if(!s&&!a&&t.length===1&&(l=t.charCodeAt(0))<256){if(this._flat[l]!==-9999)return this._flat[l];let f=this._measure(t,0);return f>0&&(this._flat[l]=f),f}let u=t;s&&(u+="B"),a&&(u+="I");let d=this._holey.get(u);if(d===void 0){let f=0;s&&(f|=1),a&&(f|=2),d=this._measure(t,f),d>0&&this._holey.set(u,d)}return d}_measure(t,s){let a=this._measureElements[s];return a.textContent=t.repeat(32),a.offsetWidth/32}},yC=class{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(t,s,a,l=!1){if(this.selectionStart=s,this.selectionEnd=a,!s||!a||s[0]===a[0]&&s[1]===a[1]){this.clear();return}let u=t.buffers.active.ydisp,d=s[1]-u,f=a[1]-u,p=Math.max(d,0),v=Math.min(f,t.rows-1);if(p>=t.rows||v<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=l,this.viewportStartRow=d,this.viewportEndRow=f,this.viewportCappedStartRow=p,this.viewportCappedEndRow=v,this.startCol=s[0],this.endCol=a[0]}isCellSelected(t,s,a){return this.hasSelection?(a-=t.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?s>=this.startCol&&a>=this.viewportCappedStartRow&&s<this.endCol&&a<=this.viewportCappedEndRow:s<this.startCol&&a>=this.viewportCappedStartRow&&s>=this.endCol&&a<=this.viewportCappedEndRow:a>this.viewportStartRow&&a<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&a===this.viewportStartRow&&s>=this.startCol&&s<this.endCol||this.viewportStartRow<this.viewportEndRow&&a===this.viewportEndRow&&s<this.endCol||this.viewportStartRow<this.viewportEndRow&&a===this.viewportStartRow&&s>=this.startCol):!1}};function bC(){return new yC}var Ud="xterm-dom-renderer-owner-",$i="xterm-rows",bc="xterm-fg-",Qg="xterm-bg-",yl="xterm-focus",Sc="xterm-selection",SC=1,Cf=class extends Xe{constructor(t,s,a,l,u,d,f,p,v,_,w,g,y,T){super(),this._terminal=t,this._document=s,this._element=a,this._screenElement=l,this._viewportElement=u,this._helperContainer=d,this._linkifier2=f,this._charSizeService=v,this._optionsService=_,this._bufferService=w,this._coreService=g,this._coreBrowserService=y,this._themeService=T,this._terminalClass=SC++,this._rowElements=[],this._selectionRenderModel=bC(),this.onRequestRedraw=this._register(new Se).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add($i),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(Sc),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=gC(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(R=>this._injectCss(R))),this._injectCss(this._themeService.colors),this._rowFactory=p.createInstance(wf,document),this._element.classList.add(Ud+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(R=>this._handleLinkHover(R))),this._register(this._linkifier2.onHideLinkUnderline(R=>this._handleLinkLeave(R))),this._register(wt(()=>{this._element.classList.remove(Ud+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new xC(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(){let t=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*t,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*t),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/t),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/t),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(let a of this._rowElements)a.style.width=`${this.dimensions.css.canvas.width}px`,a.style.height=`${this.dimensions.css.cell.height}px`,a.style.lineHeight=`${this.dimensions.css.cell.height}px`,a.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let s=`${this._terminalSelector} .${$i} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=s,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(t){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let s=`${this._terminalSelector} .${$i} { pointer-events: none; color: ${t.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;s+=`${this._terminalSelector} .${$i} .xterm-dim { color: ${yt.multiplyOpacity(t.foreground,.5).css};}`,s+=`${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;}`;let a=`blink_underline_${this._terminalClass}`,l=`blink_bar_${this._terminalClass}`,u=`blink_block_${this._terminalClass}`;s+=`@keyframes ${a} { 50% { border-bottom-style: hidden; }}`,s+=`@keyframes ${l} { 50% { box-shadow: none; }}`,s+=`@keyframes ${u} { 0% { background-color: ${t.cursor.css}; color: ${t.cursorAccent.css}; } 50% { background-color: inherit; color: ${t.cursor.css}; }}`,s+=`${this._terminalSelector} .${$i}.${yl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${a} 1s step-end infinite;}${this._terminalSelector} .${$i}.${yl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${l} 1s step-end infinite;}${this._terminalSelector} .${$i}.${yl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${u} 1s step-end infinite;}${this._terminalSelector} .${$i} .xterm-cursor.xterm-cursor-block { background-color: ${t.cursor.css}; color: ${t.cursorAccent.css};}${this._terminalSelector} .${$i} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${t.cursor.css} !important; color: ${t.cursorAccent.css} !important;}${this._terminalSelector} .${$i} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${t.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${$i} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${t.cursor.css} inset;}${this._terminalSelector} .${$i} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${t.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,s+=`${this._terminalSelector} .${Sc} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Sc} div { position: absolute; background-color: ${t.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Sc} div { position: absolute; background-color: ${t.selectionInactiveBackgroundOpaque.css};}`;for(let[d,f]of t.ansi.entries())s+=`${this._terminalSelector} .${bc}${d} { color: ${f.css}; }${this._terminalSelector} .${bc}${d}.xterm-dim { color: ${yt.multiplyOpacity(f,.5).css}; }${this._terminalSelector} .${Qg}${d} { background-color: ${f.css}; }`;s+=`${this._terminalSelector} .${bc}257 { color: ${yt.opaque(t.background).css}; }${this._terminalSelector} .${bc}257.xterm-dim { color: ${yt.multiplyOpacity(yt.opaque(t.background),.5).css}; }${this._terminalSelector} .${Qg}257 { background-color: ${t.foreground.css}; }`,this._themeStyleElement.textContent=s}_setDefaultSpacing(){let t=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${t}px`,this._rowFactory.defaultSpacing=t}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(t,s){for(let a=this._rowElements.length;a<=s;a++){let l=this._document.createElement("div");this._rowContainer.appendChild(l),this._rowElements.push(l)}for(;this._rowElements.length>s;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(t,s){this._refreshRowElements(t,s),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(yl),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(yl),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(t,s,a){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(t,s,a),this.renderRows(0,this._bufferService.rows-1),!t||!s||(this._selectionRenderModel.update(this._terminal,t,s,a),!this._selectionRenderModel.hasSelection))return;let l=this._selectionRenderModel.viewportStartRow,u=this._selectionRenderModel.viewportEndRow,d=this._selectionRenderModel.viewportCappedStartRow,f=this._selectionRenderModel.viewportCappedEndRow,p=this._document.createDocumentFragment();if(a){let v=t[0]>s[0];p.appendChild(this._createSelectionElement(d,v?s[0]:t[0],v?t[0]:s[0],f-d+1))}else{let v=l===d?t[0]:0,_=d===u?s[0]:this._bufferService.cols;p.appendChild(this._createSelectionElement(d,v,_));let w=f-d-1;if(p.appendChild(this._createSelectionElement(d+1,0,this._bufferService.cols,w)),d!==f){let g=u===f?s[0]:this._bufferService.cols;p.appendChild(this._createSelectionElement(f,0,g))}}this._selectionContainer.appendChild(p)}_createSelectionElement(t,s,a,l=1){let u=this._document.createElement("div"),d=s*this.dimensions.css.cell.width,f=this.dimensions.css.cell.width*(a-s);return d+f>this.dimensions.css.canvas.width&&(f=this.dimensions.css.canvas.width-d),u.style.height=`${l*this.dimensions.css.cell.height}px`,u.style.top=`${t*this.dimensions.css.cell.height}px`,u.style.left=`${d}px`,u.style.width=`${f}px`,u}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(let t of this._rowElements)t.replaceChildren()}renderRows(t,s){let a=this._bufferService.buffer,l=a.ybase+a.y,u=Math.min(a.x,this._bufferService.cols-1),d=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,f=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,p=this._optionsService.rawOptions.cursorInactiveStyle;for(let v=t;v<=s;v++){let _=v+a.ydisp,w=this._rowElements[v],g=a.lines.get(_);if(!w||!g)break;w.replaceChildren(...this._rowFactory.createRow(g,_,_===l,f,p,u,d,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${Ud}${this._terminalClass}`}_handleLinkHover(t){this._setCellUnderline(t.x1,t.x2,t.y1,t.y2,t.cols,!0)}_handleLinkLeave(t){this._setCellUnderline(t.x1,t.x2,t.y1,t.y2,t.cols,!1)}_setCellUnderline(t,s,a,l,u,d){a<0&&(t=0),l<0&&(s=0);let f=this._bufferService.rows-1;a=Math.max(Math.min(a,f),0),l=Math.max(Math.min(l,f),0),u=Math.min(u,this._bufferService.cols);let p=this._bufferService.buffer,v=p.ybase+p.y,_=Math.min(p.x,u-1),w=this._optionsService.rawOptions.cursorBlink,g=this._optionsService.rawOptions.cursorStyle,y=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=a;T<=l;++T){let R=T+p.ydisp,I=this._rowElements[T],Z=p.lines.get(R);if(!I||!Z)break;I.replaceChildren(...this._rowFactory.createRow(Z,R,R===v,g,y,_,w,this.dimensions.css.cell.width,this._widthCache,d?T===a?t:0:-1,d?(T===l?s:u)-1:-1))}}};Cf=jt([Ee(7,If),Ee(8,Ic),Ee(9,bi),Ee(10,yi),Ee(11,Nn),Ee(12,Js),Ee(13,wa)],Cf);var kf=class extends Xe{constructor(t,s,a){super(),this._optionsService=a,this.width=0,this.height=0,this._onCharSizeChange=this._register(new Se),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new CC(this._optionsService))}catch{this._measureStrategy=this._register(new wC(t,s,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let t=this._measureStrategy.measure();(t.width!==this.width||t.height!==this.height)&&(this.width=t.width,this.height=t.height,this._onCharSizeChange.fire())}};kf=jt([Ee(2,bi)],kf);var D1=class extends Xe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(t,s){t!==void 0&&t>0&&s!==void 0&&s>0&&(this._result.width=t,this._result.height=s)}},wC=class extends D1{constructor(t,s,a){super(),this._document=t,this._parentElement=s,this._optionsService=a,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}},CC=class extends D1{constructor(t){super(),this._optionsService=t,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let s=this._ctx.measureText("W");if(!("width"in s&&"fontBoundingBoxAscent"in s&&"fontBoundingBoxDescent"in s))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let t=this._ctx.measureText("W");return this._validateAndSet(t.width,t.fontBoundingBoxAscent+t.fontBoundingBoxDescent),this._result}},kC=class extends Xe{constructor(t,s,a){super(),this._textarea=t,this._window=s,this.mainDocument=a,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new EC(this._window)),this._onDprChange=this._register(new Se),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new Se),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(l=>this._screenDprMonitor.setWindow(l))),this._register(ui.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(He(this._textarea,"focus",()=>this._isFocused=!0)),this._register(He(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(t){this._window!==t&&(this._window=t,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}},EC=class extends Xe{constructor(t){super(),this._parentWindow=t,this._windowResizeListener=this._register(new Sa),this._onDprChange=this._register(new Se),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(wt(()=>this.clearListener()))}setWindow(t){this._parentWindow=t,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=He(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var t;this._outerListener&&((t=this._resolutionMediaMatchList)==null||t.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)}},NC=class extends Xe{constructor(){super(),this.linkProviders=[],this._register(wt(()=>this.linkProviders.length=0))}registerLinkProvider(t){return this.linkProviders.push(t),{dispose:()=>{let s=this.linkProviders.indexOf(t);s!==-1&&this.linkProviders.splice(s,1)}}}};function Jf(t,s,a){let l=a.getBoundingClientRect(),u=t.getComputedStyle(a),d=parseInt(u.getPropertyValue("padding-left")),f=parseInt(u.getPropertyValue("padding-top"));return[s.clientX-l.left-d,s.clientY-l.top-f]}function MC(t,s,a,l,u,d,f,p,v){if(!d)return;let _=Jf(t,s,a);if(_)return _[0]=Math.ceil((_[0]+(v?f/2:0))/f),_[1]=Math.ceil(_[1]/p),_[0]=Math.min(Math.max(_[0],1),l+(v?1:0)),_[1]=Math.min(Math.max(_[1],1),u),_}var Ef=class{constructor(t,s){this._renderService=t,this._charSizeService=s}getCoords(t,s,a,l,u){return MC(window,t,s,a,l,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,u)}getMouseReportCoords(t,s){let a=Jf(window,t,s);if(this._charSizeService.hasValidSize)return a[0]=Math.min(Math.max(a[0],0),this._renderService.dimensions.css.canvas.width-1),a[1]=Math.min(Math.max(a[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(a[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(a[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(a[0]),y:Math.floor(a[1])}}};Ef=jt([Ee(0,er),Ee(1,Ic)],Ef);var DC=class{constructor(t,s){this._renderCallback=t,this._coreBrowserService=s,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(t){return this._refreshCallbacks.push(t),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(t,s,a){this._rowCount=a,t=t!==void 0?t:0,s=s!==void 0?s:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,t):t,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,s):s,!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){this._runRefreshCallbacks();return}let t=Math.max(this._rowStart,0),s=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(t,s),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let t of this._refreshCallbacks)t(0);this._refreshCallbacks=[]}},T1={};U2(T1,{getSafariVersion:()=>jC,isChromeOS:()=>R1,isFirefox:()=>j1,isIpad:()=>AC,isIphone:()=>BC,isLegacyEdge:()=>TC,isLinux:()=>em,isMac:()=>Pc,isNode:()=>Vc,isSafari:()=>A1,isWindows:()=>B1});var Vc=typeof process<"u"&&"title"in process,Yl=Vc?"node":navigator.userAgent,Kl=Vc?"node":navigator.platform,j1=Yl.includes("Firefox"),TC=Yl.includes("Edge"),A1=/^((?!chrome|android).)*safari/i.test(Yl);function jC(){if(!A1)return 0;let t=Yl.match(/Version\/(\d+)/);return t===null||t.length<2?0:parseInt(t[1])}var Pc=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Kl),AC=Kl==="iPad",BC=Kl==="iPhone",B1=["Windows","Win16","Win32","WinCE"].includes(Kl),em=Kl.indexOf("Linux")>=0,R1=/\bCrOS\b/.test(Yl),O1=class{constructor(){this._tasks=[],this._i=0}enqueue(t){this._tasks.push(t),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(t){this._idleCallback=void 0;let s=0,a=0,l=t.timeRemaining(),u=0;for(;this._i<this._tasks.length;){if(s=performance.now(),this._tasks[this._i]()||this._i++,s=Math.max(1,performance.now()-s),a=Math.max(s,a),u=t.timeRemaining(),a*1.5>u){l-s<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-s))}ms`),this._start();return}l=u}this.clear()}},RC=class extends O1{_requestCallback(t){return setTimeout(()=>t(this._createDeadline(16)))}_cancelCallback(t){clearTimeout(t)}_createDeadline(t){let s=performance.now()+t;return{timeRemaining:()=>Math.max(0,s-performance.now())}}},OC=class extends O1{_requestCallback(t){return requestIdleCallback(t)}_cancelCallback(t){cancelIdleCallback(t)}},Yc=!Vc&&"requestIdleCallback"in window?OC:RC,zC=class{constructor(){this._queue=new Yc}set(t){this._queue.clear(),this._queue.enqueue(t)}flush(){this._queue.flush()}},Nf=class extends Xe{constructor(t,s,a,l,u,d,f,p,v){super(),this._rowCount=t,this._optionsService=a,this._charSizeService=l,this._coreService=u,this._coreBrowserService=p,this._renderer=this._register(new Sa),this._pausedResizeTask=new zC,this._observerDisposable=this._register(new Sa),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 Se),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new Se),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new Se),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new Se),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new DC((_,w)=>this._renderRows(_,w),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new LC(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(wt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(f.onResize(()=>this._fullRefresh())),this._register(f.buffers.onBufferActivate(()=>{var _;return(_=this._renderer.value)==null?void 0:_.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(d.onDecorationRegistered(()=>this._fullRefresh())),this._register(d.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(f.cols,f.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(f.buffer.y,f.buffer.y,!0))),this._register(v.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,s),this._register(this._coreBrowserService.onWindowChange(_=>this._registerIntersectionObserver(_,s)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(t,s){if("IntersectionObserver"in t){let a=new t.IntersectionObserver(l=>this._handleIntersectionChange(l[l.length-1]),{threshold:0});a.observe(s),this._observerDisposable.value=wt(()=>a.disconnect())}}_handleIntersectionChange(t){this._isPaused=t.isIntersecting===void 0?t.intersectionRatio===0:!t.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(t,s,a=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(t,s);return}let l=this._syncOutputHandler.flush();l&&(t=Math.min(t,l.start),s=Math.max(s,l.end)),a||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(t,s,this._rowCount)}_renderRows(t,s){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(t,s);return}t=Math.min(t,this._rowCount-1),s=Math.min(s,this._rowCount-1),this._renderer.value.renderRows(t,s),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:t,end:s}),this._onRender.fire({start:t,end:s}),this._isNextRenderRedrawOnly=!0}}resize(t,s){this._rowCount=s,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(t){this._renderer.value=t,this._renderer.value&&(this._renderer.value.onRequestRedraw(s=>this.refreshRows(s.start,s.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(t){return this._renderDebouncer.addRefreshCallback(t)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var t,s;this._renderer.value&&((s=(t=this._renderer.value).clearTextureAtlas)==null||s.call(t),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(t,s){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var a;return(a=this._renderer.value)==null?void 0:a.handleResize(t,s)}):this._renderer.value.handleResize(t,s),this._fullRefresh())}handleCharSizeChanged(){var t;(t=this._renderer.value)==null||t.handleCharSizeChanged()}handleBlur(){var t;(t=this._renderer.value)==null||t.handleBlur()}handleFocus(){var t;(t=this._renderer.value)==null||t.handleFocus()}handleSelectionChanged(t,s,a){var l;this._selectionState.start=t,this._selectionState.end=s,this._selectionState.columnSelectMode=a,(l=this._renderer.value)==null||l.handleSelectionChanged(t,s,a)}handleCursorMove(){var t;(t=this._renderer.value)==null||t.handleCursorMove()}clear(){var t;(t=this._renderer.value)==null||t.clear()}};Nf=jt([Ee(2,bi),Ee(3,Ic),Ee(4,Nn),Ee(5,Pl),Ee(6,yi),Ee(7,Js),Ee(8,wa)],Nf);var LC=class{constructor(t,s,a){this._coreBrowserService=t,this._coreService=s,this._onTimeout=a,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(t,s){this._isBuffering?(this._start=Math.min(this._start,t),this._end=Math.max(this._end,s)):(this._start=t,this._end=s,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let t={start:this._start,end:this._end};return this._isBuffering=!1,t}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function HC(t,s,a,l){let u=a.buffer.x,d=a.buffer.y;if(!a.buffer.hasScrollback)return YC(u,d,t,s,a,l)+Xc(d,s,a,l)+KC(u,d,t,s,a,l);let f;if(d===s)return f=u>t?"D":"C",zl(Math.abs(u-t),Ol(f,l));f=d>s?"D":"C";let p=Math.abs(d-s),v=PC(d>s?t:u,a)+(p-1)*a.cols+1+UC(d>s?u:t);return zl(v,Ol(f,l))}function UC(t,s){return t-1}function PC(t,s){return s.cols-t}function YC(t,s,a,l,u,d){return Xc(s,l,u,d).length===0?"":zl(L1(t,s,t,s-En(s,u),!1,u).length,Ol("D",d))}function Xc(t,s,a,l){let u=t-En(t,a),d=s-En(s,a),f=Math.abs(u-d)-qC(t,s,a);return zl(f,Ol(z1(t,s),l))}function KC(t,s,a,l,u,d){let f;Xc(s,l,u,d).length>0?f=l-En(l,u):f=s;let p=l,v=FC(t,s,a,l,u,d);return zl(L1(t,f,a,p,v==="C",u).length,Ol(v,d))}function qC(t,s,a){var f;let l=0,u=t-En(t,a),d=s-En(s,a);for(let p=0;p<Math.abs(u-d);p++){let v=z1(t,s)==="A"?-1:1;(f=a.buffer.lines.get(u+v*p))!=null&&f.isWrapped&&l++}return l}function En(t,s){let a=0,l=s.buffer.lines.get(t),u=l==null?void 0:l.isWrapped;for(;u&&t>=0&&t<s.rows;)a++,l=s.buffer.lines.get(--t),u=l==null?void 0:l.isWrapped;return a}function FC(t,s,a,l,u,d){let f;return Xc(a,l,u,d).length>0?f=l-En(l,u):f=s,t<a&&f<=l||t>=a&&f<l?"C":"D"}function z1(t,s){return t>s?"A":"B"}function L1(t,s,a,l,u,d){let f=t,p=s,v="";for(;(f!==a||p!==l)&&p>=0&&p<d.buffer.lines.length;)f+=u?1:-1,u&&f>d.cols-1?(v+=d.buffer.translateBufferLineToString(p,!1,t,f),f=0,t=0,p++):!u&&f<0&&(v+=d.buffer.translateBufferLineToString(p,!1,0,t+1),f=d.cols-1,t=f,p--);return v+d.buffer.translateBufferLineToString(p,!1,t,f)}function Ol(t,s){let a=s?"O":"[";return le.ESC+a+t}function zl(t,s){t=Math.floor(t);let a="";for(let l=0;l<t;l++)a+=s;return a}var IC=class{constructor(t){this._bufferService=t,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.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()){let t=this.selectionStart[0]+this.selectionStartLength;return t>this._bufferService.cols?t%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(t/this._bufferService.cols)-1]:[t%this._bufferService.cols,this.selectionStart[1]+Math.floor(t/this._bufferService.cols)]:[t,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let t=this.selectionStart[0]+this.selectionStartLength;return t>this._bufferService.cols?[t%this._bufferService.cols,this.selectionStart[1]+Math.floor(t/this._bufferService.cols)]:[Math.max(t,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let t=this.selectionStart,s=this.selectionEnd;return!t||!s?!1:t[1]>s[1]||t[1]===s[1]&&t[0]>s[0]}handleTrim(t){return this.selectionStart&&(this.selectionStart[1]-=t),this.selectionEnd&&(this.selectionEnd[1]-=t),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function Jg(t,s){if(t.start.y>t.end.y)throw new Error(`Buffer range end (${t.end.x}, ${t.end.y}) cannot be before start (${t.start.x}, ${t.start.y})`);return s*(t.end.y-t.start.y)+(t.end.x-t.start.x+1)}var Pd=50,VC=15,XC=50,WC=500,GC=" ",$C=new RegExp(GC,"g"),Mf=class extends Xe{constructor(t,s,a,l,u,d,f,p,v){super(),this._element=t,this._screenElement=s,this._linkifier=a,this._bufferService=l,this._coreService=u,this._mouseService=d,this._optionsService=f,this._renderService=p,this._coreBrowserService=v,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new es,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new Se),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new Se),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new Se),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new Se),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=_=>this._handleMouseMove(_),this._mouseUpListener=_=>this._handleMouseUp(_),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(_=>this._handleTrim(_)),this._register(this._bufferService.buffers.onBufferActivate(_=>this._handleBufferActivate(_))),this.enable(),this._model=new IC(this._bufferService),this._activeSelectionMode=0,this._register(wt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(_=>{_.rowsChanged&&this.clearSelection()}))}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(){let t=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!t||!s?!1:t[0]!==s[0]||t[1]!==s[1]}get selectionText(){let t=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;if(!t||!s)return"";let a=this._bufferService.buffer,l=[];if(this._activeSelectionMode===3){if(t[0]===s[0])return"";let u=t[0]<s[0]?t[0]:s[0],d=t[0]<s[0]?s[0]:t[0];for(let f=t[1];f<=s[1];f++){let p=a.translateBufferLineToString(f,!0,u,d);l.push(p)}}else{let u=t[1]===s[1]?s[0]:void 0;l.push(a.translateBufferLineToString(t[1],!0,t[0],u));for(let d=t[1]+1;d<=s[1]-1;d++){let f=a.lines.get(d),p=a.translateBufferLineToString(d,!0);f!=null&&f.isWrapped?l[l.length-1]+=p:l.push(p)}if(t[1]!==s[1]){let d=a.lines.get(s[1]),f=a.translateBufferLineToString(s[1],!0,0,s[0]);d&&d.isWrapped?l[l.length-1]+=f:l.push(f)}}return l.map(u=>u.replace($C," ")).join(B1?`\r
|
|
392
|
-
`:`
|
|
393
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(t){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),em&&t&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(t){let s=this._getMouseBufferCoords(t),a=this._model.finalSelectionStart,l=this._model.finalSelectionEnd;return!a||!l||!s?!1:this._areCoordsInSelection(s,a,l)}isCellInSelection(t,s){let a=this._model.finalSelectionStart,l=this._model.finalSelectionEnd;return!a||!l?!1:this._areCoordsInSelection([t,s],a,l)}_areCoordsInSelection(t,s,a){return t[1]>s[1]&&t[1]<a[1]||s[1]===a[1]&&t[1]===s[1]&&t[0]>=s[0]&&t[0]<a[0]||s[1]<a[1]&&t[1]===a[1]&&t[0]<a[0]||s[1]<a[1]&&t[1]===s[1]&&t[0]>=s[0]}_selectWordAtCursor(t,s){var u,d;let a=(d=(u=this._linkifier.currentLink)==null?void 0:u.link)==null?void 0:d.range;if(a)return this._model.selectionStart=[a.start.x-1,a.start.y-1],this._model.selectionStartLength=Jg(a,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let l=this._getMouseBufferCoords(t);return l?(this._selectWordAt(l,s),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(t,s){this._model.clearSelection(),t=Math.max(t,0),s=Math.min(s,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,t],this._model.selectionEnd=[this._bufferService.cols,s],this.refresh(),this._onSelectionChange.fire()}_handleTrim(t){this._model.handleTrim(t)&&this.refresh()}_getMouseBufferCoords(t){let s=this._mouseService.getCoords(t,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(s)return s[0]--,s[1]--,s[1]+=this._bufferService.buffer.ydisp,s}_getMouseEventScrollAmount(t){let s=Jf(this._coreBrowserService.window,t,this._screenElement)[1],a=this._renderService.dimensions.css.canvas.height;return s>=0&&s<=a?0:(s>a&&(s-=a),s=Math.min(Math.max(s,-Pd),Pd),s/=Pd,s/Math.abs(s)+Math.round(s*(VC-1)))}shouldForceSelection(t){return Pc?t.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:t.shiftKey}handleMouseDown(t){if(this._mouseDownTimeStamp=t.timeStamp,!(t.button===2&&this.hasSelection)&&t.button===0){if(!this._enabled){if(!this.shouldForceSelection(t))return;t.stopPropagation()}t.preventDefault(),this._dragScrollAmount=0,this._enabled&&t.shiftKey?this._handleIncrementalClick(t):t.detail===1?this._handleSingleClick(t):t.detail===2?this._handleDoubleClick(t):t.detail===3&&this._handleTripleClick(t),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),XC)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(t){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(t))}_handleSingleClick(t){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(t)?3:0,this._model.selectionStart=this._getMouseBufferCoords(t),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let s=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);s&&s.length!==this._model.selectionStart[0]&&s.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(t){this._selectWordAtCursor(t,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(t){let s=this._getMouseBufferCoords(t);s&&(this._activeSelectionMode=2,this._selectLineAt(s[1]))}shouldColumnSelect(t){return t.altKey&&!(Pc&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(t){if(t.stopImmediatePropagation(),!this._model.selectionStart)return;let s=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(t),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(t),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let a=this._bufferService.buffer;if(this._model.selectionEnd[1]<a.lines.length){let l=a.lines.get(this._model.selectionEnd[1]);l&&l.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!s||s[0]!==this._model.selectionEnd[0]||s[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});let t=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(t.ydisp+this._bufferService.rows,t.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=t.ydisp),this.refresh()}}_handleMouseUp(t){let s=t.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&s<WC&&t.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let a=this._mouseService.getCoords(t,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(a&&a[0]!==void 0&&a[1]!==void 0){let l=HC(a[0]-1,a[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(l,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let t=this._model.finalSelectionStart,s=this._model.finalSelectionEnd,a=!!t&&!!s&&(t[0]!==s[0]||t[1]!==s[1]);if(!a){this._oldHasSelection&&this._fireOnSelectionChange(t,s,a);return}!t||!s||(!this._oldSelectionStart||!this._oldSelectionEnd||t[0]!==this._oldSelectionStart[0]||t[1]!==this._oldSelectionStart[1]||s[0]!==this._oldSelectionEnd[0]||s[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(t,s,a)}_fireOnSelectionChange(t,s,a){this._oldSelectionStart=t,this._oldSelectionEnd=s,this._oldHasSelection=a,this._onSelectionChange.fire()}_handleBufferActivate(t){this.clearSelection(),this._trimListener.dispose(),this._trimListener=t.activeBuffer.lines.onTrim(s=>this._handleTrim(s))}_convertViewportColToCharacterIndex(t,s){let a=s;for(let l=0;s>=l;l++){let u=t.loadCell(l,this._workCell).getChars().length;this._workCell.getWidth()===0?a--:u>1&&s!==l&&(a+=u-1)}return a}setSelection(t,s,a){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[t,s],this._model.selectionStartLength=a,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(t){this._isClickInSelection(t)||(this._selectWordAtCursor(t,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(t,s,a=!0,l=!0){if(t[0]>=this._bufferService.cols)return;let u=this._bufferService.buffer,d=u.lines.get(t[1]);if(!d)return;let f=u.translateBufferLineToString(t[1],!1),p=this._convertViewportColToCharacterIndex(d,t[0]),v=p,_=t[0]-p,w=0,g=0,y=0,T=0;if(f.charAt(p)===" "){for(;p>0&&f.charAt(p-1)===" ";)p--;for(;v<f.length&&f.charAt(v+1)===" ";)v++}else{let Z=t[0],ue=t[0];d.getWidth(Z)===0&&(w++,Z--),d.getWidth(ue)===2&&(g++,ue++);let pe=d.getString(ue).length;for(pe>1&&(T+=pe-1,v+=pe-1);Z>0&&p>0&&!this._isCharWordSeparator(d.loadCell(Z-1,this._workCell));){d.loadCell(Z-1,this._workCell);let be=this._workCell.getChars().length;this._workCell.getWidth()===0?(w++,Z--):be>1&&(y+=be-1,p-=be-1),p--,Z--}for(;ue<d.length&&v+1<f.length&&!this._isCharWordSeparator(d.loadCell(ue+1,this._workCell));){d.loadCell(ue+1,this._workCell);let be=this._workCell.getChars().length;this._workCell.getWidth()===2?(g++,ue++):be>1&&(T+=be-1,v+=be-1),v++,ue++}}v++;let R=p+_-w+y,I=Math.min(this._bufferService.cols,v-p+w+g-y-T);if(!(!s&&f.slice(p,v).trim()==="")){if(a&&R===0&&d.getCodePoint(0)!==32){let Z=u.lines.get(t[1]-1);if(Z&&d.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){let ue=this._getWordAt([this._bufferService.cols-1,t[1]-1],!1,!0,!1);if(ue){let pe=this._bufferService.cols-ue.start;R-=pe,I+=pe}}}if(l&&R+I===this._bufferService.cols&&d.getCodePoint(this._bufferService.cols-1)!==32){let Z=u.lines.get(t[1]+1);if(Z!=null&&Z.isWrapped&&Z.getCodePoint(0)!==32){let ue=this._getWordAt([0,t[1]+1],!1,!1,!0);ue&&(I+=ue.length)}}return{start:R,length:I}}}_selectWordAt(t,s){let a=this._getWordAt(t,s);if(a){for(;a.start<0;)a.start+=this._bufferService.cols,t[1]--;this._model.selectionStart=[a.start,t[1]],this._model.selectionStartLength=a.length}}_selectToWordAt(t){let s=this._getWordAt(t,!0);if(s){let a=t[1];for(;s.start<0;)s.start+=this._bufferService.cols,a--;if(!this._model.areSelectionValuesReversed())for(;s.start+s.length>this._bufferService.cols;)s.length-=this._bufferService.cols,a++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?s.start:s.start+s.length,a]}}_isCharWordSeparator(t){return t.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(t.getChars())>=0}_selectLineAt(t){let s=this._bufferService.buffer.getWrappedRangeForLine(t),a={start:{x:0,y:s.first},end:{x:this._bufferService.cols-1,y:s.last}};this._model.selectionStart=[0,s.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=Jg(a,this._bufferService.cols)}};Mf=jt([Ee(3,yi),Ee(4,Nn),Ee(5,Vf),Ee(6,bi),Ee(7,er),Ee(8,Js)],Mf);var e0=class{constructor(){this._data={}}set(t,s,a){this._data[t]||(this._data[t]={}),this._data[t][s]=a}get(t,s){return this._data[t]?this._data[t][s]:void 0}clear(){this._data={}}},t0=class{constructor(){this._color=new e0,this._css=new e0}setCss(t,s,a){this._css.set(t,s,a)}getCss(t,s){return this._css.get(t,s)}setColor(t,s,a){this._color.set(t,s,a)}getColor(t,s){return this._color.get(t,s)}clear(){this._color.clear(),this._css.clear()}},qt=Object.freeze((()=>{let t=[Et.toColor("#2e3436"),Et.toColor("#cc0000"),Et.toColor("#4e9a06"),Et.toColor("#c4a000"),Et.toColor("#3465a4"),Et.toColor("#75507b"),Et.toColor("#06989a"),Et.toColor("#d3d7cf"),Et.toColor("#555753"),Et.toColor("#ef2929"),Et.toColor("#8ae234"),Et.toColor("#fce94f"),Et.toColor("#729fcf"),Et.toColor("#ad7fa8"),Et.toColor("#34e2e2"),Et.toColor("#eeeeec")],s=[0,95,135,175,215,255];for(let a=0;a<216;a++){let l=s[a/36%6|0],u=s[a/6%6|0],d=s[a%6];t.push({css:Yt.toCss(l,u,d),rgba:Yt.toRgba(l,u,d)})}for(let a=0;a<24;a++){let l=8+a*10;t.push({css:Yt.toCss(l,l,l),rgba:Yt.toRgba(l,l,l)})}return t})()),_n=Et.toColor("#ffffff"),El=Et.toColor("#000000"),i0=Et.toColor("#ffffff"),s0=El,bl={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},ZC=_n,Df=class extends Xe{constructor(t){super(),this._optionsService=t,this._contrastCache=new t0,this._halfContrastCache=new t0,this._onChangeColors=this._register(new Se),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:_n,background:El,cursor:i0,cursorAccent:s0,selectionForeground:void 0,selectionBackgroundTransparent:bl,selectionBackgroundOpaque:yt.blend(El,bl),selectionInactiveBackgroundTransparent:bl,selectionInactiveBackgroundOpaque:yt.blend(El,bl),scrollbarSliderBackground:yt.opacity(_n,.2),scrollbarSliderHoverBackground:yt.opacity(_n,.4),scrollbarSliderActiveBackground:yt.opacity(_n,.5),overviewRulerBorder:_n,ansi:qt.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)))}get colors(){return this._colors}_setTheme(t={}){let s=this._colors;if(s.foreground=dt(t.foreground,_n),s.background=dt(t.background,El),s.cursor=yt.blend(s.background,dt(t.cursor,i0)),s.cursorAccent=yt.blend(s.background,dt(t.cursorAccent,s0)),s.selectionBackgroundTransparent=dt(t.selectionBackground,bl),s.selectionBackgroundOpaque=yt.blend(s.background,s.selectionBackgroundTransparent),s.selectionInactiveBackgroundTransparent=dt(t.selectionInactiveBackground,s.selectionBackgroundTransparent),s.selectionInactiveBackgroundOpaque=yt.blend(s.background,s.selectionInactiveBackgroundTransparent),s.selectionForeground=t.selectionForeground?dt(t.selectionForeground,$g):void 0,s.selectionForeground===$g&&(s.selectionForeground=void 0),yt.isOpaque(s.selectionBackgroundTransparent)&&(s.selectionBackgroundTransparent=yt.opacity(s.selectionBackgroundTransparent,.3)),yt.isOpaque(s.selectionInactiveBackgroundTransparent)&&(s.selectionInactiveBackgroundTransparent=yt.opacity(s.selectionInactiveBackgroundTransparent,.3)),s.scrollbarSliderBackground=dt(t.scrollbarSliderBackground,yt.opacity(s.foreground,.2)),s.scrollbarSliderHoverBackground=dt(t.scrollbarSliderHoverBackground,yt.opacity(s.foreground,.4)),s.scrollbarSliderActiveBackground=dt(t.scrollbarSliderActiveBackground,yt.opacity(s.foreground,.5)),s.overviewRulerBorder=dt(t.overviewRulerBorder,ZC),s.ansi=qt.slice(),s.ansi[0]=dt(t.black,qt[0]),s.ansi[1]=dt(t.red,qt[1]),s.ansi[2]=dt(t.green,qt[2]),s.ansi[3]=dt(t.yellow,qt[3]),s.ansi[4]=dt(t.blue,qt[4]),s.ansi[5]=dt(t.magenta,qt[5]),s.ansi[6]=dt(t.cyan,qt[6]),s.ansi[7]=dt(t.white,qt[7]),s.ansi[8]=dt(t.brightBlack,qt[8]),s.ansi[9]=dt(t.brightRed,qt[9]),s.ansi[10]=dt(t.brightGreen,qt[10]),s.ansi[11]=dt(t.brightYellow,qt[11]),s.ansi[12]=dt(t.brightBlue,qt[12]),s.ansi[13]=dt(t.brightMagenta,qt[13]),s.ansi[14]=dt(t.brightCyan,qt[14]),s.ansi[15]=dt(t.brightWhite,qt[15]),t.extendedAnsi){let a=Math.min(s.ansi.length-16,t.extendedAnsi.length);for(let l=0;l<a;l++)s.ansi[l+16]=dt(t.extendedAnsi[l],qt[l+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(t){this._restoreColor(t),this._onChangeColors.fire(this.colors)}_restoreColor(t){if(t===void 0){for(let s=0;s<this._restoreColors.ansi.length;++s)this._colors.ansi[s]=this._restoreColors.ansi[s];return}switch(t){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[t]=this._restoreColors.ansi[t]}}modifyColors(t){t(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()}}};Df=jt([Ee(0,bi)],Df);function dt(t,s){if(t!==void 0)try{return Et.toColor(t)}catch{}return s}var QC=class{constructor(...t){this._entries=new Map;for(let[s,a]of t)this.set(s,a)}set(t,s){let a=this._entries.get(t);return this._entries.set(t,s),a}forEach(t){for(let[s,a]of this._entries.entries())t(s,a)}has(t){return this._entries.has(t)}get(t){return this._entries.get(t)}},JC=class{constructor(){this._services=new QC,this._services.set(If,this)}setService(t,s){this._services.set(t,s)}getService(t){return this._services.get(t)}createInstance(t,...s){let a=V2(t).sort((d,f)=>d.index-f.index),l=[];for(let d of a){let f=this._services.get(d.id);if(!f)throw new Error(`[createInstance] ${t.name} depends on UNKNOWN service ${d.id._id}.`);l.push(f)}let u=a.length>0?a[0].index:s.length;if(s.length!==u)throw new Error(`[createInstance] First service dependency of ${t.name} at position ${u+1} conflicts with ${s.length} static arguments`);return new t(...s,...l)}},e5={trace:0,debug:1,info:2,warn:3,error:4,off:5},t5="xterm.js: ",Tf=class extends Xe{constructor(t){super(),this._optionsService=t,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=e5[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let s=0;s<t.length;s++)typeof t[s]=="function"&&(t[s]=t[s]())}_log(t,s,a){this._evalLazyOptionalParams(a),t.call(console,(this._optionsService.options.logger?"":t5)+s,...a)}trace(t,...s){var a;this._logLevel<=0&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.trace.bind(this._optionsService.options.logger))??console.log,t,s)}debug(t,...s){var a;this._logLevel<=1&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.debug.bind(this._optionsService.options.logger))??console.log,t,s)}info(t,...s){var a;this._logLevel<=2&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.info.bind(this._optionsService.options.logger))??console.info,t,s)}warn(t,...s){var a;this._logLevel<=3&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.warn.bind(this._optionsService.options.logger))??console.warn,t,s)}error(t,...s){var a;this._logLevel<=4&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.error.bind(this._optionsService.options.logger))??console.error,t,s)}};Tf=jt([Ee(0,bi)],Tf);var r0=class extends Xe{constructor(t){super(),this._maxLength=t,this.onDeleteEmitter=this._register(new Se),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new Se),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new Se),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(t){if(this._maxLength===t)return;let s=new Array(t);for(let a=0;a<Math.min(t,this.length);a++)s[a]=this._array[this._getCyclicIndex(a)];this._array=s,this._maxLength=t,this._startIndex=0}get length(){return this._length}set length(t){if(t>this._length)for(let s=this._length;s<t;s++)this._array[s]=void 0;this._length=t}get(t){return this._array[this._getCyclicIndex(t)]}set(t,s){this._array[this._getCyclicIndex(t)]=s}push(t){this._array[this._getCyclicIndex(this._length)]=t,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(t,s,...a){if(s){for(let l=t;l<this._length-s;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+s)];this._length-=s,this.onDeleteEmitter.fire({index:t,amount:s})}for(let l=this._length-1;l>=t;l--)this._array[this._getCyclicIndex(l+a.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<a.length;l++)this._array[this._getCyclicIndex(t+l)]=a[l];if(a.length&&this.onInsertEmitter.fire({index:t,amount:a.length}),this._length+a.length>this._maxLength){let l=this._length+a.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=a.length}trimStart(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t,this.onTrimEmitter.fire(t)}shiftElements(t,s,a){if(!(s<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+a<0)throw new Error("Cannot shift elements in list beyond index 0");if(a>0){for(let u=s-1;u>=0;u--)this.set(t+u+a,this.get(t+u));let l=t+s+a-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<s;l++)this.set(t+l+a,this.get(t+l))}}_getCyclicIndex(t){return(this._startIndex+t)%this._maxLength}},Ve=3,Pt=Object.freeze(new Ul),wc=0,Yd=2,Nl=class H1{constructor(s,a,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(s*Ve);let u=a||es.fromCharData([0,s1,1,0]);for(let d=0;d<s;++d)this.setCell(d,u);this.length=s}get(s){let a=this._data[s*Ve+0],l=a&2097151;return[this._data[s*Ve+1],a&2097152?this._combined[s]:l?Or(l):"",a>>22,a&2097152?this._combined[s].charCodeAt(this._combined[s].length-1):l]}set(s,a){this._data[s*Ve+1]=a[0],a[1].length>1?(this._combined[s]=a[1],this._data[s*Ve+0]=s|2097152|a[2]<<22):this._data[s*Ve+0]=a[1].charCodeAt(0)|a[2]<<22}getWidth(s){return this._data[s*Ve+0]>>22}hasWidth(s){return this._data[s*Ve+0]&12582912}getFg(s){return this._data[s*Ve+1]}getBg(s){return this._data[s*Ve+2]}hasContent(s){return this._data[s*Ve+0]&4194303}getCodePoint(s){let a=this._data[s*Ve+0];return a&2097152?this._combined[s].charCodeAt(this._combined[s].length-1):a&2097151}isCombined(s){return this._data[s*Ve+0]&2097152}getString(s){let a=this._data[s*Ve+0];return a&2097152?this._combined[s]:a&2097151?Or(a&2097151):""}isProtected(s){return this._data[s*Ve+2]&536870912}loadCell(s,a){return wc=s*Ve,a.content=this._data[wc+0],a.fg=this._data[wc+1],a.bg=this._data[wc+2],a.content&2097152&&(a.combinedData=this._combined[s]),a.bg&268435456&&(a.extended=this._extendedAttrs[s]),a}setCell(s,a){a.content&2097152&&(this._combined[s]=a.combinedData),a.bg&268435456&&(this._extendedAttrs[s]=a.extended),this._data[s*Ve+0]=a.content,this._data[s*Ve+1]=a.fg,this._data[s*Ve+2]=a.bg}setCellFromCodepoint(s,a,l,u){u.bg&268435456&&(this._extendedAttrs[s]=u.extended),this._data[s*Ve+0]=a|l<<22,this._data[s*Ve+1]=u.fg,this._data[s*Ve+2]=u.bg}addCodepointToCell(s,a,l){let u=this._data[s*Ve+0];u&2097152?this._combined[s]+=Or(a):u&2097151?(this._combined[s]=Or(u&2097151)+Or(a),u&=-2097152,u|=2097152):u=a|1<<22,l&&(u&=-12582913,u|=l<<22),this._data[s*Ve+0]=u}insertCells(s,a,l){if(s%=this.length,s&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,l),a<this.length-s){let u=new es;for(let d=this.length-s-a-1;d>=0;--d)this.setCell(s+a+d,this.loadCell(s+d,u));for(let d=0;d<a;++d)this.setCell(s+d,l)}else for(let u=s;u<this.length;++u)this.setCell(u,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(s,a,l){if(s%=this.length,a<this.length-s){let u=new es;for(let d=0;d<this.length-s-a;++d)this.setCell(s+d,this.loadCell(s+a+d,u));for(let d=this.length-a;d<this.length;++d)this.setCell(d,l)}else for(let u=s;u<this.length;++u)this.setCell(u,l);s&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,l),this.getWidth(s)===0&&!this.hasContent(s)&&this.setCellFromCodepoint(s,0,1,l)}replaceCells(s,a,l,u=!1){if(u){for(s&&this.getWidth(s-1)===2&&!this.isProtected(s-1)&&this.setCellFromCodepoint(s-1,0,1,l),a<this.length&&this.getWidth(a-1)===2&&!this.isProtected(a)&&this.setCellFromCodepoint(a,0,1,l);s<a&&s<this.length;)this.isProtected(s)||this.setCell(s,l),s++;return}for(s&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,l),a<this.length&&this.getWidth(a-1)===2&&this.setCellFromCodepoint(a,0,1,l);s<a&&s<this.length;)this.setCell(s++,l)}resize(s,a){if(s===this.length)return this._data.length*4*Yd<this._data.buffer.byteLength;let l=s*Ve;if(s>this.length){if(this._data.buffer.byteLength>=l*4)this._data=new Uint32Array(this._data.buffer,0,l);else{let u=new Uint32Array(l);u.set(this._data),this._data=u}for(let u=this.length;u<s;++u)this.setCell(u,a)}else{this._data=this._data.subarray(0,l);let u=Object.keys(this._combined);for(let f=0;f<u.length;f++){let p=parseInt(u[f],10);p>=s&&delete this._combined[p]}let d=Object.keys(this._extendedAttrs);for(let f=0;f<d.length;f++){let p=parseInt(d[f],10);p>=s&&delete this._extendedAttrs[p]}}return this.length=s,l*4*Yd<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*Yd<this._data.buffer.byteLength){let s=new Uint32Array(this._data.length);return s.set(this._data),this._data=s,1}return 0}fill(s,a=!1){if(a){for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,s);return}this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,s)}copyFrom(s){this.length!==s.length?this._data=new Uint32Array(s._data):this._data.set(s._data),this.length=s.length,this._combined={};for(let a in s._combined)this._combined[a]=s._combined[a];this._extendedAttrs={};for(let a in s._extendedAttrs)this._extendedAttrs[a]=s._extendedAttrs[a];this.isWrapped=s.isWrapped}clone(){let s=new H1(0);s._data=new Uint32Array(this._data),s.length=this.length;for(let a in this._combined)s._combined[a]=this._combined[a];for(let a in this._extendedAttrs)s._extendedAttrs[a]=this._extendedAttrs[a];return s.isWrapped=this.isWrapped,s}getTrimmedLength(){for(let s=this.length-1;s>=0;--s)if(this._data[s*Ve+0]&4194303)return s+(this._data[s*Ve+0]>>22);return 0}getNoBgTrimmedLength(){for(let s=this.length-1;s>=0;--s)if(this._data[s*Ve+0]&4194303||this._data[s*Ve+2]&50331648)return s+(this._data[s*Ve+0]>>22);return 0}copyCellsFrom(s,a,l,u,d){let f=s._data;if(d)for(let v=u-1;v>=0;v--){for(let _=0;_<Ve;_++)this._data[(l+v)*Ve+_]=f[(a+v)*Ve+_];f[(a+v)*Ve+2]&268435456&&(this._extendedAttrs[l+v]=s._extendedAttrs[a+v])}else for(let v=0;v<u;v++){for(let _=0;_<Ve;_++)this._data[(l+v)*Ve+_]=f[(a+v)*Ve+_];f[(a+v)*Ve+2]&268435456&&(this._extendedAttrs[l+v]=s._extendedAttrs[a+v])}let p=Object.keys(s._combined);for(let v=0;v<p.length;v++){let _=parseInt(p[v],10);_>=a&&(this._combined[_-a+l]=s._combined[_])}}translateToString(s,a,l,u){a=a??0,l=l??this.length,s&&(l=Math.min(l,this.getTrimmedLength())),u&&(u.length=0);let d="";for(;a<l;){let f=this._data[a*Ve+0],p=f&2097151,v=f&2097152?this._combined[a]:p?Or(p):zr;if(d+=v,u)for(let _=0;_<v.length;++_)u.push(a);a+=f>>22||1}return u&&u.push(a),d}};function i5(t,s,a,l,u,d){let f=[];for(let p=0;p<t.length-1;p++){let v=p,_=t.get(++v);if(!_.isWrapped)continue;let w=[t.get(p)];for(;v<t.length&&_.isWrapped;)w.push(_),_=t.get(++v);if(!d&&l>=p&&l<v){p+=w.length-1;continue}let g=0,y=Ll(w,g,s),T=1,R=0;for(;T<w.length;){let Z=Ll(w,T,s),ue=Z-R,pe=a-y,be=Math.min(ue,pe);w[g].copyCellsFrom(w[T],R,y,be,!1),y+=be,y===a&&(g++,y=0),R+=be,R===Z&&(T++,R=0),y===0&&g!==0&&w[g-1].getWidth(a-1)===2&&(w[g].copyCellsFrom(w[g-1],a-1,y++,1,!1),w[g-1].setCell(a-1,u))}w[g].replaceCells(y,a,u);let I=0;for(let Z=w.length-1;Z>0&&(Z>g||w[Z].getTrimmedLength()===0);Z--)I++;I>0&&(f.push(p+w.length-I),f.push(I)),p+=w.length-1}return f}function s5(t,s){let a=[],l=0,u=s[l],d=0;for(let f=0;f<t.length;f++)if(u===f){let p=s[++l];t.onDeleteEmitter.fire({index:f-d,amount:p}),f+=p-1,d+=p,u=s[++l]}else a.push(f);return{layout:a,countRemoved:d}}function r5(t,s){let a=[];for(let l=0;l<s.length;l++)a.push(t.get(s[l]));for(let l=0;l<a.length;l++)t.set(l,a[l]);t.length=s.length}function n5(t,s,a){let l=[],u=t.map((v,_)=>Ll(t,_,s)).reduce((v,_)=>v+_),d=0,f=0,p=0;for(;p<u;){if(u-p<a){l.push(u-p);break}d+=a;let v=Ll(t,f,s);d>v&&(d-=v,f++);let _=t[f].getWidth(d-1)===2;_&&d--;let w=_?a-1:a;l.push(w),p+=w}return l}function Ll(t,s,a){if(s===t.length-1)return t[s].getTrimmedLength();let l=!t[s].hasContent(a-1)&&t[s].getWidth(a-1)===1,u=t[s+1].getWidth(0)===2;return l&&u?a-1:a}var U1=class P1{constructor(s){this.line=s,this.isDisposed=!1,this._disposables=[],this._id=P1._nextId++,this._onDispose=this.register(new Se),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),kn(this._disposables),this._disposables.length=0)}register(s){return this._disposables.push(s),s}};U1._nextId=1;var a5=U1,It={},pn=It.B;It[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:"≥","{":"π","|":"≠","}":"£","~":"·"};It.A={"#":"£"};It.B=void 0;It[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};It.C=It[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};It.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};It.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};It.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};It.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};It.E=It[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};It.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};It.H=It[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};It["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var n0=4294967295,a0=class{constructor(t,s,a){this._hasScrollback=t,this._optionsService=s,this._bufferService=a,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Pt.clone(),this.savedCharset=pn,this.markers=[],this._nullCell=es.fromCharData([0,s1,1,0]),this._whitespaceCell=es.fromCharData([0,zr,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Yc,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r0(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new Lc),this._nullCell}getWhitespaceCell(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new Lc),this._whitespaceCell}getBlankLine(t,s){return new Nl(this._bufferService.cols,this.getNullCell(t),s)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._rows}_getCorrectBufferLength(t){if(!this._hasScrollback)return t;let s=t+this._optionsService.rawOptions.scrollback;return s>n0?n0:s}fillViewportRows(t){if(this.lines.length===0){t===void 0&&(t=Pt);let s=this._rows;for(;s--;)this.lines.push(this.getBlankLine(t))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r0(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(t,s){let a=this.getNullCell(Pt),l=0,u=this._getCorrectBufferLength(s);if(u>this.lines.maxLength&&(this.lines.maxLength=u),this.lines.length>0){if(this._cols<t)for(let f=0;f<this.lines.length;f++)l+=+this.lines.get(f).resize(t,a);let d=0;if(this._rows<s)for(let f=this._rows;f<s;f++)this.lines.length<s+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Nl(t,a)):this.ybase>0&&this.lines.length<=this.ybase+this.y+d+1?(this.ybase--,d++,this.ydisp>0&&this.ydisp--):this.lines.push(new Nl(t,a)));else for(let f=this._rows;f>s;f--)this.lines.length>s+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(u<this.lines.maxLength){let f=this.lines.length-u;f>0&&(this.lines.trimStart(f),this.ybase=Math.max(this.ybase-f,0),this.ydisp=Math.max(this.ydisp-f,0),this.savedY=Math.max(this.savedY-f,0)),this.lines.maxLength=u}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,s-1),d&&(this.y+=d),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=s-1,this._isReflowEnabled&&(this._reflow(t,s),this._cols>t))for(let d=0;d<this.lines.length;d++)l+=+this.lines.get(d).resize(t,a);this._cols=t,this._rows=s,this._memoryCleanupQueue.clear(),l>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let t=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,t=!1);let s=0;for(;this._memoryCleanupPosition<this.lines.length;)if(s+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),s>100)return!0;return t}get _isReflowEnabled(){let t=this._optionsService.rawOptions.windowsPty;return t&&t.buildNumber?this._hasScrollback&&t.backend==="conpty"&&t.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(t,s){this._cols!==t&&(t>this._cols?this._reflowLarger(t,s):this._reflowSmaller(t,s))}_reflowLarger(t,s){let a=this._optionsService.rawOptions.reflowCursorLine,l=i5(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(Pt),a);if(l.length>0){let u=s5(this.lines,l);r5(this.lines,u.layout),this._reflowLargerAdjustViewport(t,s,u.countRemoved)}}_reflowLargerAdjustViewport(t,s,a){let l=this.getNullCell(Pt),u=a;for(;u-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<s&&this.lines.push(new Nl(t,l))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-a,0)}_reflowSmaller(t,s){let a=this._optionsService.rawOptions.reflowCursorLine,l=this.getNullCell(Pt),u=[],d=0;for(let f=this.lines.length-1;f>=0;f--){let p=this.lines.get(f);if(!p||!p.isWrapped&&p.getTrimmedLength()<=t)continue;let v=[p];for(;p.isWrapped&&f>0;)p=this.lines.get(--f),v.unshift(p);if(!a){let be=this.ybase+this.y;if(be>=f&&be<f+v.length)continue}let _=v[v.length-1].getTrimmedLength(),w=n5(v,this._cols,t),g=w.length-v.length,y;this.ybase===0&&this.y!==this.lines.length-1?y=Math.max(0,this.y-this.lines.maxLength+g):y=Math.max(0,this.lines.length-this.lines.maxLength+g);let T=[];for(let be=0;be<g;be++){let ee=this.getBlankLine(Pt,!0);T.push(ee)}T.length>0&&(u.push({start:f+v.length+d,newLines:T}),d+=T.length),v.push(...T);let R=w.length-1,I=w[R];I===0&&(R--,I=w[R]);let Z=v.length-g-1,ue=_;for(;Z>=0;){let be=Math.min(ue,I);if(v[R]===void 0)break;if(v[R].copyCellsFrom(v[Z],ue-be,I-be,be,!0),I-=be,I===0&&(R--,I=w[R]),ue-=be,ue===0){Z--;let ee=Math.max(Z,0);ue=Ll(v,ee,this._cols)}}for(let be=0;be<v.length;be++)w[be]<t&&v[be].setCell(w[be],l);let pe=g-y;for(;pe-- >0;)this.ybase===0?this.y<s-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+d)-s&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+g,this.ybase+s-1)}if(u.length>0){let f=[],p=[];for(let I=0;I<this.lines.length;I++)p.push(this.lines.get(I));let v=this.lines.length,_=v-1,w=0,g=u[w];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+d);let y=0;for(let I=Math.min(this.lines.maxLength-1,v+d-1);I>=0;I--)if(g&&g.start>_+y){for(let Z=g.newLines.length-1;Z>=0;Z--)this.lines.set(I--,g.newLines[Z]);I++,f.push({index:_+1,amount:g.newLines.length}),y+=g.newLines.length,g=u[++w]}else this.lines.set(I,p[_--]);let T=0;for(let I=f.length-1;I>=0;I--)f[I].index+=T,this.lines.onInsertEmitter.fire(f[I]),T+=f[I].amount;let R=Math.max(0,v+d-this.lines.maxLength);R>0&&this.lines.onTrimEmitter.fire(R)}}translateBufferLineToString(t,s,a=0,l){let u=this.lines.get(t);return u?u.translateToString(s,a,l):""}getWrappedRangeForLine(t){let s=t,a=t;for(;s>0&&this.lines.get(s).isWrapped;)s--;for(;a+1<this.lines.length&&this.lines.get(a+1).isWrapped;)a++;return{first:s,last:a}}setupTabStops(t){for(t!=null?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._cols;t+=this._optionsService.rawOptions.tabStopWidth)this.tabs[t]=!0}prevStop(t){for(t==null&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._cols?this._cols-1:t<0?0:t}nextStop(t){for(t==null&&(t=this.x);!this.tabs[++t]&&t<this._cols;);return t>=this._cols?this._cols-1:t<0?0:t}clearMarkers(t){this._isClearing=!0;for(let s=0;s<this.markers.length;s++)this.markers[s].line===t&&(this.markers[s].dispose(),this.markers.splice(s--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].dispose();this.markers.length=0,this._isClearing=!1}addMarker(t){let s=new a5(t);return this.markers.push(s),s.register(this.lines.onTrim(a=>{s.line-=a,s.line<0&&s.dispose()})),s.register(this.lines.onInsert(a=>{s.line>=a.index&&(s.line+=a.amount)})),s.register(this.lines.onDelete(a=>{s.line>=a.index&&s.line<a.index+a.amount&&s.dispose(),s.line>a.index&&(s.line-=a.amount)})),s.register(s.onDispose(()=>this._removeMarker(s))),s}_removeMarker(t){this._isClearing||this.markers.splice(this.markers.indexOf(t),1)}},l5=class extends Xe{constructor(t,s){super(),this._optionsService=t,this._bufferService=s,this._onBufferActivate=this._register(new Se),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 a0(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new a0(!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(t){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(t),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(t,s){this._normal.resize(t,s),this._alt.resize(t,s),this.setupTabStops(t)}setupTabStops(t){this._normal.setupTabStops(t),this._alt.setupTabStops(t)}},Y1=2,K1=1,jf=class extends Xe{constructor(t){super(),this.isUserScrolling=!1,this._onResize=this._register(new Se),this.onResize=this._onResize.event,this._onScroll=this._register(new Se),this.onScroll=this._onScroll.event,this.cols=Math.max(t.rawOptions.cols||0,Y1),this.rows=Math.max(t.rawOptions.rows||0,K1),this.buffers=this._register(new l5(t,this)),this._register(this.buffers.onBufferActivate(s=>{this._onScroll.fire(s.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(t,s){let a=this.cols!==t,l=this.rows!==s;this.cols=t,this.rows=s,this.buffers.resize(t,s),this._onResize.fire({cols:t,rows:s,colsChanged:a,rowsChanged:l})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(t,s=!1){let a=this.buffer,l;l=this._cachedBlankLine,(!l||l.length!==this.cols||l.getFg(0)!==t.fg||l.getBg(0)!==t.bg)&&(l=a.getBlankLine(t,s),this._cachedBlankLine=l),l.isWrapped=s;let u=a.ybase+a.scrollTop,d=a.ybase+a.scrollBottom;if(a.scrollTop===0){let f=a.lines.isFull;d===a.lines.length-1?f?a.lines.recycle().copyFrom(l):a.lines.push(l.clone()):a.lines.splice(d+1,0,l.clone()),f?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{let f=d-u+1;a.lines.shiftElements(u+1,f-1,-1),a.lines.set(d,l.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(t,s){let a=this.buffer;if(t<0){if(a.ydisp===0)return;this.isUserScrolling=!0}else t+a.ydisp>=a.ybase&&(this.isUserScrolling=!1);let l=a.ydisp;a.ydisp=Math.max(Math.min(a.ydisp+t,a.ybase),0),l!==a.ydisp&&(s||this._onScroll.fire(a.ydisp))}};jf=jt([Ee(0,bi)],jf);var xa={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Pc,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},o5=["normal","bold","100","200","300","400","500","600","700","800","900"],c5=class extends Xe{constructor(t){super(),this._onOptionChange=this._register(new Se),this.onOptionChange=this._onOptionChange.event;let s={...xa};for(let a in t)if(a in s)try{let l=t[a];s[a]=this._sanitizeAndValidateOption(a,l)}catch(l){console.error(l)}this.rawOptions=s,this.options={...s},this._setupOptions(),this._register(wt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(t,s){return this.onOptionChange(a=>{a===t&&s(this.rawOptions[t])})}onMultipleOptionChange(t,s){return this.onOptionChange(a=>{t.indexOf(a)!==-1&&s()})}_setupOptions(){let t=a=>{if(!(a in xa))throw new Error(`No option with key "${a}"`);return this.rawOptions[a]},s=(a,l)=>{if(!(a in xa))throw new Error(`No option with key "${a}"`);l=this._sanitizeAndValidateOption(a,l),this.rawOptions[a]!==l&&(this.rawOptions[a]=l,this._onOptionChange.fire(a))};for(let a in this.rawOptions){let l={get:t.bind(this,a),set:s.bind(this,a)};Object.defineProperty(this.options,a,l)}}_sanitizeAndValidateOption(t,s){switch(t){case"cursorStyle":if(s||(s=xa[t]),!h5(s))throw new Error(`"${s}" is not a valid value for ${t}`);break;case"wordSeparator":s||(s=xa[t]);break;case"fontWeight":case"fontWeightBold":if(typeof s=="number"&&1<=s&&s<=1e3)break;s=o5.includes(s)?s:xa[t];break;case"cursorWidth":s=Math.floor(s);case"lineHeight":case"tabStopWidth":if(s<1)throw new Error(`${t} cannot be less than 1, value: ${s}`);break;case"minimumContrastRatio":s=Math.max(1,Math.min(21,Math.round(s*10)/10));break;case"scrollback":if(s=Math.min(s,4294967295),s<0)throw new Error(`${t} cannot be less than 0, value: ${s}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(s<=0)throw new Error(`${t} cannot be less than or equal to 0, value: ${s}`);break;case"rows":case"cols":if(!s&&s!==0)throw new Error(`${t} must be numeric, value: ${s}`);break;case"windowsPty":s=s??{};break}return s}};function h5(t){return t==="block"||t==="underline"||t==="bar"}function Ml(t,s=5){if(typeof t!="object")return t;let a=Array.isArray(t)?[]:{};for(let l in t)a[l]=s<=1?t[l]:t[l]&&Ml(t[l],s-1);return a}var l0=Object.freeze({insertMode:!1}),o0=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),Af=class extends Xe{constructor(t,s,a){super(),this._bufferService=t,this._logService=s,this._optionsService=a,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new Se),this.onData=this._onData.event,this._onUserInput=this._register(new Se),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new Se),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new Se),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=Ml(l0),this.decPrivateModes=Ml(o0)}reset(){this.modes=Ml(l0),this.decPrivateModes=Ml(o0)}triggerDataEvent(t,s=!1){if(this._optionsService.rawOptions.disableStdin)return;let a=this._bufferService.buffer;s&&this._optionsService.rawOptions.scrollOnUserInput&&a.ybase!==a.ydisp&&this._onRequestScrollToBottom.fire(),s&&this._onUserInput.fire(),this._logService.debug(`sending data "${t}"`),this._logService.trace("sending data (codes)",()=>t.split("").map(l=>l.charCodeAt(0))),this._onData.fire(t)}triggerBinaryEvent(t){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${t}"`),this._logService.trace("sending binary (codes)",()=>t.split("").map(s=>s.charCodeAt(0))),this._onBinary.fire(t))}};Af=jt([Ee(0,yi),Ee(1,o1),Ee(2,bi)],Af);var c0={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:t=>t.button===4||t.action!==1?!1:(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)},VT200:{events:19,restrict:t=>t.action!==32},DRAG:{events:23,restrict:t=>!(t.action===32&&t.button===3)},ANY:{events:31,restrict:t=>!0}};function Kd(t,s){let a=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return t.button===4?(a|=64,a|=t.action):(a|=t.button&3,t.button&4&&(a|=64),t.button&8&&(a|=128),t.action===32?a|=32:t.action===0&&!s&&(a|=3)),a}var qd=String.fromCharCode,h0={DEFAULT:t=>{let s=[Kd(t,!1)+32,t.col+32,t.row+32];return s[0]>255||s[1]>255||s[2]>255?"":`\x1B[M${qd(s[0])}${qd(s[1])}${qd(s[2])}`},SGR:t=>{let s=t.action===0&&t.button!==4?"m":"M";return`\x1B[<${Kd(t,!0)};${t.col};${t.row}${s}`},SGR_PIXELS:t=>{let s=t.action===0&&t.button!==4?"m":"M";return`\x1B[<${Kd(t,!0)};${t.x};${t.y}${s}`}},Bf=class extends Xe{constructor(t,s,a){super(),this._bufferService=t,this._coreService=s,this._optionsService=a,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new Se),this.onProtocolChange=this._onProtocolChange.event;for(let l of Object.keys(c0))this.addProtocol(l,c0[l]);for(let l of Object.keys(h0))this.addEncoding(l,h0[l]);this.reset()}addProtocol(t,s){this._protocols[t]=s}addEncoding(t,s){this._encodings[t]=s}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(t){if(!this._protocols[t])throw new Error(`unknown protocol "${t}"`);this._activeProtocol=t,this._onProtocolChange.fire(this._protocols[t].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(t){if(!this._encodings[t])throw new Error(`unknown encoding "${t}"`);this._activeEncoding=t}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(t,s,a){if(t.deltaY===0||t.shiftKey||s===void 0||a===void 0)return 0;let l=s/a,u=this._applyScrollModifier(t.deltaY,t);return t.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(u/=l+0,Math.abs(t.deltaY)<50&&(u*=.3),this._wheelPartialScroll+=u,u=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(u*=this._bufferService.rows),u}_applyScrollModifier(t,s){return s.altKey||s.ctrlKey||s.shiftKey?t*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:t*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(t){if(t.col<0||t.col>=this._bufferService.cols||t.row<0||t.row>=this._bufferService.rows||t.button===4&&t.action===32||t.button===3&&t.action!==32||t.button!==4&&(t.action===2||t.action===3)||(t.col++,t.row++,t.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,t,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(t))return!1;let s=this._encodings[this._activeEncoding](t);return s&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(s):this._coreService.triggerDataEvent(s,!0)),this._lastEvent=t,!0}explainEvents(t){return{down:!!(t&1),up:!!(t&2),drag:!!(t&4),move:!!(t&8),wheel:!!(t&16)}}_equalEvents(t,s,a){if(a){if(t.x!==s.x||t.y!==s.y)return!1}else if(t.col!==s.col||t.row!==s.row)return!1;return!(t.button!==s.button||t.action!==s.action||t.ctrl!==s.ctrl||t.alt!==s.alt||t.shift!==s.shift)}};Bf=jt([Ee(0,yi),Ee(1,Nn),Ee(2,bi)],Bf);var Fd=[[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]],u5=[[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]],Ft;function d5(t,s){let a=0,l=s.length-1,u;if(t<s[0][0]||t>s[l][1])return!1;for(;l>=a;)if(u=a+l>>1,t>s[u][1])a=u+1;else if(t<s[u][0])l=u-1;else return!0;return!1}var f5=class{constructor(){if(this.version="6",!Ft){Ft=new Uint8Array(65536),Ft.fill(1),Ft[0]=0,Ft.fill(0,1,32),Ft.fill(0,127,160),Ft.fill(2,4352,4448),Ft[9001]=2,Ft[9002]=2,Ft.fill(2,11904,42192),Ft[12351]=1,Ft.fill(2,44032,55204),Ft.fill(2,63744,64256),Ft.fill(2,65040,65050),Ft.fill(2,65072,65136),Ft.fill(2,65280,65377),Ft.fill(2,65504,65511);for(let t=0;t<Fd.length;++t)Ft.fill(0,Fd[t][0],Fd[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?Ft[t]:d5(t,u5)?0:t>=131072&&t<=196605||t>=196608&&t<=262141?2:1}charProperties(t,s){let a=this.wcwidth(t),l=a===0&&s!==0;if(l){let u=yn.extractWidth(s);u===0?l=!1:u>a&&(a=u)}return yn.createPropertyValue(0,a,l)}},yn=class Ac{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Se,this.onChange=this._onChange.event;let s=new f5;this.register(s),this._active=s.version,this._activeProvider=s}static extractShouldJoin(s){return(s&1)!==0}static extractWidth(s){return s>>1&3}static extractCharKind(s){return s>>3}static createPropertyValue(s,a,l=!1){return(s&16777215)<<3|(a&3)<<1|(l?1:0)}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 a=0,l=0,u=s.length;for(let d=0;d<u;++d){let f=s.charCodeAt(d);if(55296<=f&&f<=56319){if(++d>=u)return a+this.wcwidth(f);let _=s.charCodeAt(d);56320<=_&&_<=57343?f=(f-55296)*1024+_-56320+65536:a+=this.wcwidth(_)}let p=this.charProperties(f,l),v=Ac.extractWidth(p);Ac.extractShouldJoin(p)&&(v-=Ac.extractWidth(l)),a+=v,l=p}return a}charProperties(s,a){return this._activeProvider.charProperties(s,a)}},m5=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(t){this.glevel=t,this.charset=this._charsets[t]}setgCharset(t,s){this._charsets[t]=s,this.glevel===t&&(this.charset=s)}};function u0(t){var l;let s=(l=t.buffer.lines.get(t.buffer.ybase+t.buffer.y-1))==null?void 0:l.get(t.cols-1),a=t.buffer.lines.get(t.buffer.ybase+t.buffer.y);a&&s&&(a.isWrapped=s[3]!==0&&s[3]!==32)}var Sl=2147483647,_5=256,q1=class Rf{constructor(s=32,a=32){if(this.maxLength=s,this.maxSubParamsLength=a,a>_5)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(s),this.length=0,this._subParams=new Int32Array(a),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(s),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(s){let a=new Rf;if(!s.length)return a;for(let l=Array.isArray(s[0])?1:0;l<s.length;++l){let u=s[l];if(Array.isArray(u))for(let d=0;d<u.length;++d)a.addSubParam(u[d]);else a.addParam(u)}return a}clone(){let s=new Rf(this.maxLength,this.maxSubParamsLength);return s.params.set(this.params),s.length=this.length,s._subParams.set(this._subParams),s._subParamsLength=this._subParamsLength,s._subParamsIdx.set(this._subParamsIdx),s._rejectDigits=this._rejectDigits,s._rejectSubDigits=this._rejectSubDigits,s._digitIsSub=this._digitIsSub,s}toArray(){let s=[];for(let a=0;a<this.length;++a){s.push(this.params[a]);let l=this._subParamsIdx[a]>>8,u=this._subParamsIdx[a]&255;u-l>0&&s.push(Array.prototype.slice.call(this._subParams,l,u))}return s}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(s){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(s<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=s>Sl?Sl:s}addSubParam(s){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(s<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=s>Sl?Sl:s,this._subParamsIdx[this.length-1]++}}hasSubParams(s){return(this._subParamsIdx[s]&255)-(this._subParamsIdx[s]>>8)>0}getSubParams(s){let a=this._subParamsIdx[s]>>8,l=this._subParamsIdx[s]&255;return l-a>0?this._subParams.subarray(a,l):null}getSubParamsAll(){let s={};for(let a=0;a<this.length;++a){let l=this._subParamsIdx[a]>>8,u=this._subParamsIdx[a]&255;u-l>0&&(s[a]=this._subParams.slice(l,u))}return s}addDigit(s){let a;if(this._rejectDigits||!(a=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let l=this._digitIsSub?this._subParams:this.params,u=l[a-1];l[a-1]=~u?Math.min(u*10+s,Sl):s}},wl=[],p5=class{constructor(){this._state=0,this._active=wl,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(t,s){this._handlers[t]===void 0&&(this._handlers[t]=[]);let a=this._handlers[t];return a.push(s),{dispose:()=>{let l=a.indexOf(s);l!==-1&&a.splice(l,1)}}}clearHandler(t){this._handlers[t]&&delete this._handlers[t]}setHandlerFallback(t){this._handlerFb=t}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=wl}reset(){if(this._state===2)for(let t=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;t>=0;--t)this._active[t].end(!1);this._stack.paused=!1,this._active=wl,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||wl,!this._active.length)this._handlerFb(this._id,"START");else for(let t=this._active.length-1;t>=0;t--)this._active[t].start()}_put(t,s,a){if(!this._active.length)this._handlerFb(this._id,"PUT",Fc(t,s,a));else for(let l=this._active.length-1;l>=0;l--)this._active[l].put(t,s,a)}start(){this.reset(),this._state=1}put(t,s,a){if(this._state!==3){if(this._state===1)for(;s<a;){let l=t[s++];if(l===59){this._state=2,this._start();break}if(l<48||57<l){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+l-48}this._state===2&&a-s>0&&this._put(t,s,a)}}end(t,s=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",t);else{let a=!1,l=this._active.length-1,u=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,a=s,u=this._stack.fallThrough,this._stack.paused=!1),!u&&a===!1){for(;l>=0&&(a=this._active[l].end(t),a!==!0);l--)if(a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,a;l--}for(;l>=0;l--)if(a=this._active[l].end(!1),a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,a}this._active=wl,this._id=-1,this._state=0}}},Hi=class{constructor(t){this._handler=t,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(t,s,a){this._hitLimit||(this._data+=Fc(t,s,a),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(t){let s=!1;if(this._hitLimit)s=!1;else if(t&&(s=this._handler(this._data),s instanceof Promise))return s.then(a=>(this._data="",this._hitLimit=!1,a));return this._data="",this._hitLimit=!1,s}},Cl=[],v5=class{constructor(){this._handlers=Object.create(null),this._active=Cl,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Cl}registerHandler(t,s){this._handlers[t]===void 0&&(this._handlers[t]=[]);let a=this._handlers[t];return a.push(s),{dispose:()=>{let l=a.indexOf(s);l!==-1&&a.splice(l,1)}}}clearHandler(t){this._handlers[t]&&delete this._handlers[t]}setHandlerFallback(t){this._handlerFb=t}reset(){if(this._active.length)for(let t=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;t>=0;--t)this._active[t].unhook(!1);this._stack.paused=!1,this._active=Cl,this._ident=0}hook(t,s){if(this.reset(),this._ident=t,this._active=this._handlers[t]||Cl,!this._active.length)this._handlerFb(this._ident,"HOOK",s);else for(let a=this._active.length-1;a>=0;a--)this._active[a].hook(s)}put(t,s,a){if(!this._active.length)this._handlerFb(this._ident,"PUT",Fc(t,s,a));else for(let l=this._active.length-1;l>=0;l--)this._active[l].put(t,s,a)}unhook(t,s=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",t);else{let a=!1,l=this._active.length-1,u=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,a=s,u=this._stack.fallThrough,this._stack.paused=!1),!u&&a===!1){for(;l>=0&&(a=this._active[l].unhook(t),a!==!0);l--)if(a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,a;l--}for(;l>=0;l--)if(a=this._active[l].unhook(!1),a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,a}this._active=Cl,this._ident=0}},Dl=new q1;Dl.addParam(0);var d0=class{constructor(t){this._handler=t,this._data="",this._params=Dl,this._hitLimit=!1}hook(t){this._params=t.length>1||t.params[0]?t.clone():Dl,this._data="",this._hitLimit=!1}put(t,s,a){this._hitLimit||(this._data+=Fc(t,s,a),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(t){let s=!1;if(this._hitLimit)s=!1;else if(t&&(s=this._handler(this._data,this._params),s instanceof Promise))return s.then(a=>(this._params=Dl,this._data="",this._hitLimit=!1,a));return this._params=Dl,this._data="",this._hitLimit=!1,s}},g5=class{constructor(t){this.table=new Uint8Array(t)}setDefault(t,s){this.table.fill(t<<4|s)}add(t,s,a,l){this.table[s<<8|t]=a<<4|l}addMany(t,s,a,l){for(let u=0;u<t.length;u++)this.table[s<<8|t[u]]=a<<4|l}},Qi=160,x5=(function(){let t=new g5(4095),s=Array.apply(null,Array(256)).map((p,v)=>v),a=(p,v)=>s.slice(p,v),l=a(32,127),u=a(0,24);u.push(25),u.push.apply(u,a(28,32));let d=a(0,14),f;t.setDefault(1,0),t.addMany(l,0,2,0);for(f in d)t.addMany([24,26,153,154],f,3,0),t.addMany(a(128,144),f,3,0),t.addMany(a(144,152),f,3,0),t.add(156,f,0,0),t.add(27,f,11,1),t.add(157,f,4,8),t.addMany([152,158,159],f,0,7),t.add(155,f,11,3),t.add(144,f,11,9);return t.addMany(u,0,3,0),t.addMany(u,1,3,1),t.add(127,1,0,1),t.addMany(u,8,0,8),t.addMany(u,3,3,3),t.add(127,3,0,3),t.addMany(u,4,3,4),t.add(127,4,0,4),t.addMany(u,6,3,6),t.addMany(u,5,3,5),t.add(127,5,0,5),t.addMany(u,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(l,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(a(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(l,7,0,7),t.addMany(u,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(a(64,127),3,7,0),t.addMany(a(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(a(48,60),4,8,4),t.addMany(a(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(a(32,64),6,0,6),t.add(127,6,0,6),t.addMany(a(64,127),6,0,0),t.addMany(a(32,48),3,9,5),t.addMany(a(32,48),5,9,5),t.addMany(a(48,64),5,0,6),t.addMany(a(64,127),5,7,0),t.addMany(a(32,48),4,9,5),t.addMany(a(32,48),1,9,2),t.addMany(a(32,48),2,9,2),t.addMany(a(48,127),2,10,0),t.addMany(a(48,80),1,10,0),t.addMany(a(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(a(96,127),1,10,0),t.add(80,1,11,9),t.addMany(u,9,0,9),t.add(127,9,0,9),t.addMany(a(28,32),9,0,9),t.addMany(a(32,48),9,9,12),t.addMany(a(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(u,11,0,11),t.addMany(a(32,128),11,0,11),t.addMany(a(28,32),11,0,11),t.addMany(u,10,0,10),t.add(127,10,0,10),t.addMany(a(28,32),10,0,10),t.addMany(a(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(a(32,48),10,9,12),t.addMany(u,12,0,12),t.add(127,12,0,12),t.addMany(a(28,32),12,0,12),t.addMany(a(32,48),12,9,12),t.addMany(a(48,64),12,0,11),t.addMany(a(64,127),12,12,13),t.addMany(a(64,127),10,12,13),t.addMany(a(64,127),9,12,13),t.addMany(u,13,13,13),t.addMany(l,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(Qi,0,2,0),t.add(Qi,8,5,8),t.add(Qi,6,0,6),t.add(Qi,11,0,11),t.add(Qi,13,13,13),t})(),y5=class extends Xe{constructor(t=x5){super(),this._transitions=t,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new q1,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(s,a,l)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,a)=>{},this._escHandlerFb=s=>{},this._errorHandlerFb=s=>s,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(wt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new p5),this._dcsParser=this._register(new v5),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(t,s=[64,126]){let a=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if(a=t.prefix.charCodeAt(0),a&&60>a||a>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let u=0;u<t.intermediates.length;++u){let d=t.intermediates.charCodeAt(u);if(32>d||d>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");a<<=8,a|=d}}if(t.final.length!==1)throw new Error("final must be a single byte");let l=t.final.charCodeAt(0);if(s[0]>l||l>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return a<<=8,a|=l,a}identToString(t){let s=[];for(;t;)s.push(String.fromCharCode(t&255)),t>>=8;return s.reverse().join("")}setPrintHandler(t){this._printHandler=t}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(t,s){let a=this._identifier(t,[48,126]);this._escHandlers[a]===void 0&&(this._escHandlers[a]=[]);let l=this._escHandlers[a];return l.push(s),{dispose:()=>{let u=l.indexOf(s);u!==-1&&l.splice(u,1)}}}clearEscHandler(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]}setEscHandlerFallback(t){this._escHandlerFb=t}setExecuteHandler(t,s){this._executeHandlers[t.charCodeAt(0)]=s}clearExecuteHandler(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]}setExecuteHandlerFallback(t){this._executeHandlerFb=t}registerCsiHandler(t,s){let a=this._identifier(t);this._csiHandlers[a]===void 0&&(this._csiHandlers[a]=[]);let l=this._csiHandlers[a];return l.push(s),{dispose:()=>{let u=l.indexOf(s);u!==-1&&l.splice(u,1)}}}clearCsiHandler(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]}setCsiHandlerFallback(t){this._csiHandlerFb=t}registerDcsHandler(t,s){return this._dcsParser.registerHandler(this._identifier(t),s)}clearDcsHandler(t){this._dcsParser.clearHandler(this._identifier(t))}setDcsHandlerFallback(t){this._dcsParser.setHandlerFallback(t)}registerOscHandler(t,s){return this._oscParser.registerHandler(t,s)}clearOscHandler(t){this._oscParser.clearHandler(t)}setOscHandlerFallback(t){this._oscParser.setHandlerFallback(t)}setErrorHandler(t){this._errorHandler=t}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(t,s,a,l,u){this._parseStack.state=t,this._parseStack.handlers=s,this._parseStack.handlerPos=a,this._parseStack.transition=l,this._parseStack.chunkPos=u}parse(t,s,a){let l=0,u=0,d=0,f;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,d=this._parseStack.chunkPos+1;else{if(a===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let p=this._parseStack.handlers,v=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(a===!1&&v>-1){for(;v>=0&&(f=p[v](this._params),f!==!0);v--)if(f instanceof Promise)return this._parseStack.handlerPos=v,f}this._parseStack.handlers=[];break;case 4:if(a===!1&&v>-1){for(;v>=0&&(f=p[v](),f!==!0);v--)if(f instanceof Promise)return this._parseStack.handlerPos=v,f}this._parseStack.handlers=[];break;case 6:if(l=t[this._parseStack.chunkPos],f=this._dcsParser.unhook(l!==24&&l!==26,a),f)return f;l===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(l=t[this._parseStack.chunkPos],f=this._oscParser.end(l!==24&&l!==26,a),f)return f;l===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,d=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let p=d;p<s;++p){switch(l=t[p],u=this._transitions.table[this.currentState<<8|(l<160?l:Qi)],u>>4){case 2:for(let y=p+1;;++y){if(y>=s||(l=t[y])<32||l>126&&l<Qi){this._printHandler(t,p,y),p=y-1;break}if(++y>=s||(l=t[y])<32||l>126&&l<Qi){this._printHandler(t,p,y),p=y-1;break}if(++y>=s||(l=t[y])<32||l>126&&l<Qi){this._printHandler(t,p,y),p=y-1;break}if(++y>=s||(l=t[y])<32||l>126&&l<Qi){this._printHandler(t,p,y),p=y-1;break}}break;case 3:this._executeHandlers[l]?this._executeHandlers[l]():this._executeHandlerFb(l),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:l,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let v=this._csiHandlers[this._collect<<8|l],_=v?v.length-1:-1;for(;_>=0&&(f=v[_](this._params),f!==!0);_--)if(f instanceof Promise)return this._preserveStack(3,v,_,u,p),f;_<0&&this._csiHandlerFb(this._collect<<8|l,this._params),this.precedingJoinState=0;break;case 8:do switch(l){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(l-48)}while(++p<s&&(l=t[p])>47&&l<60);p--;break;case 9:this._collect<<=8,this._collect|=l;break;case 10:let w=this._escHandlers[this._collect<<8|l],g=w?w.length-1:-1;for(;g>=0&&(f=w[g](),f!==!0);g--)if(f instanceof Promise)return this._preserveStack(4,w,g,u,p),f;g<0&&this._escHandlerFb(this._collect<<8|l),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|l,this._params);break;case 13:for(let y=p+1;;++y)if(y>=s||(l=t[y])===24||l===26||l===27||l>127&&l<Qi){this._dcsParser.put(t,p,y),p=y-1;break}break;case 14:if(f=this._dcsParser.unhook(l!==24&&l!==26),f)return this._preserveStack(6,[],0,u,p),f;l===27&&(u|=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 y=p+1;;y++)if(y>=s||(l=t[y])<32||l>127&&l<Qi){this._oscParser.put(t,p,y),p=y-1;break}break;case 6:if(f=this._oscParser.end(l!==24&&l!==26),f)return this._preserveStack(5,[],0,u,p),f;l===27&&(u|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=u&15}}},b5=/^([\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})$/,S5=/^[\da-f]+$/;function f0(t){if(!t)return;let s=t.toLowerCase();if(s.indexOf("rgb:")===0){s=s.slice(4);let a=b5.exec(s);if(a){let l=a[1]?15:a[4]?255:a[7]?4095:65535;return[Math.round(parseInt(a[1]||a[4]||a[7]||a[10],16)/l*255),Math.round(parseInt(a[2]||a[5]||a[8]||a[11],16)/l*255),Math.round(parseInt(a[3]||a[6]||a[9]||a[12],16)/l*255)]}}else if(s.indexOf("#")===0&&(s=s.slice(1),S5.exec(s)&&[3,6,9,12].includes(s.length))){let a=s.length/3,l=[0,0,0];for(let u=0;u<3;++u){let d=parseInt(s.slice(a*u,a*u+a),16);l[u]=a===1?d<<4:a===2?d:a===3?d>>4:d>>8}return l}}function Id(t,s){let a=t.toString(16),l=a.length<2?"0"+a:a;switch(s){case 4:return a[0];case 8:return l;case 12:return(l+l).slice(0,3);default:return l+l}}function w5(t,s=16){let[a,l,u]=t;return`rgb:${Id(a,s)}/${Id(l,s)}/${Id(u,s)}`}var C5={"(":0,")":1,"*":2,"+":3,"-":1,".":2},Rr=131072,m0=10;function _0(t,s){if(t>24)return s.setWinLines||!1;switch(t){case 1:return!!s.restoreWin;case 2:return!!s.minimizeWin;case 3:return!!s.setWinPosition;case 4:return!!s.setWinSizePixels;case 5:return!!s.raiseWin;case 6:return!!s.lowerWin;case 7:return!!s.refreshWin;case 8:return!!s.setWinSizeChars;case 9:return!!s.maximizeWin;case 10:return!!s.fullscreenWin;case 11:return!!s.getWinState;case 13:return!!s.getWinPosition;case 14:return!!s.getWinSizePixels;case 15:return!!s.getScreenSizePixels;case 16:return!!s.getCellSizePixels;case 18:return!!s.getWinSizeChars;case 19:return!!s.getScreenSizeChars;case 20:return!!s.getIconTitle;case 21:return!!s.getWinTitle;case 22:return!!s.pushTitle;case 23:return!!s.popTitle;case 24:return!!s.setWinLines}return!1}var p0=5e3,v0=0,k5=class extends Xe{constructor(t,s,a,l,u,d,f,p,v=new y5){super(),this._bufferService=t,this._charsetService=s,this._coreService=a,this._logService=l,this._optionsService=u,this._oscLinkService=d,this._coreMouseService=f,this._unicodeService=p,this._parser=v,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new F2,this._utf8Decoder=new I2,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Pt.clone(),this._eraseAttrDataInternal=Pt.clone(),this._onRequestBell=this._register(new Se),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new Se),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new Se),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new Se),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new Se),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new Se),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new Se),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new Se),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new Se),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new Se),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new Se),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new Se),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new Se),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 Of(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(_=>this._activeBuffer=_.activeBuffer)),this._parser.setCsiHandlerFallback((_,w)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(_),params:w.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((_,w,g)=>{this._logService.debug("Unknown OSC code: ",{identifier:_,action:w,data:g})}),this._parser.setDcsHandlerFallback((_,w,g)=>{w==="HOOK"&&(g=g.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(_),action:w,payload:g})}),this._parser.setPrintHandler((_,w,g)=>this.print(_,w,g)),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(le.BEL,()=>this.bell()),this._parser.setExecuteHandler(le.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(le.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(le.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(le.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(le.BS,()=>this.backspace()),this._parser.setExecuteHandler(le.HT,()=>this.tab()),this._parser.setExecuteHandler(le.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(le.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Tc.IND,()=>this.index()),this._parser.setExecuteHandler(Tc.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Tc.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Hi(_=>(this.setTitle(_),this.setIconName(_),!0))),this._parser.registerOscHandler(1,new Hi(_=>this.setIconName(_))),this._parser.registerOscHandler(2,new Hi(_=>this.setTitle(_))),this._parser.registerOscHandler(4,new Hi(_=>this.setOrReportIndexedColor(_))),this._parser.registerOscHandler(8,new Hi(_=>this.setHyperlink(_))),this._parser.registerOscHandler(10,new Hi(_=>this.setOrReportFgColor(_))),this._parser.registerOscHandler(11,new Hi(_=>this.setOrReportBgColor(_))),this._parser.registerOscHandler(12,new Hi(_=>this.setOrReportCursorColor(_))),this._parser.registerOscHandler(104,new Hi(_=>this.restoreIndexedColor(_))),this._parser.registerOscHandler(110,new Hi(_=>this.restoreFgColor(_))),this._parser.registerOscHandler(111,new Hi(_=>this.restoreBgColor(_))),this._parser.registerOscHandler(112,new Hi(_=>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(let _ in It)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 d0((_,w)=>this.requestStatusString(_,w)))}getAttrData(){return this._curAttrData}_preserveStack(t,s,a,l){this._parseStack.paused=!0,this._parseStack.cursorStartX=t,this._parseStack.cursorStartY=s,this._parseStack.decodedLength=a,this._parseStack.position=l}_logSlowResolvingAsync(t){this._logService.logLevel<=3&&Promise.race([t,new Promise((s,a)=>setTimeout(()=>a("#SLOW_TIMEOUT"),p0))]).catch(s=>{if(s!=="#SLOW_TIMEOUT")throw s;console.warn(`async parser handler taking longer than ${p0} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(t,s){let a,l=this._activeBuffer.x,u=this._activeBuffer.y,d=0,f=this._parseStack.paused;if(f){if(a=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,s))return this._logSlowResolvingAsync(a),a;l=this._parseStack.cursorStartX,u=this._parseStack.cursorStartY,this._parseStack.paused=!1,t.length>Rr&&(d=this._parseStack.position+Rr)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof t=="string"?` "${t}"`:` "${Array.prototype.map.call(t,_=>String.fromCharCode(_)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof t=="string"?t.split("").map(_=>_.charCodeAt(0)):t),this._parseBuffer.length<t.length&&this._parseBuffer.length<Rr&&(this._parseBuffer=new Uint32Array(Math.min(t.length,Rr))),f||this._dirtyRowTracker.clearRange(),t.length>Rr)for(let _=d;_<t.length;_+=Rr){let w=_+Rr<t.length?_+Rr:t.length,g=typeof t=="string"?this._stringDecoder.decode(t.substring(_,w),this._parseBuffer):this._utf8Decoder.decode(t.subarray(_,w),this._parseBuffer);if(a=this._parser.parse(this._parseBuffer,g))return this._preserveStack(l,u,g,_),this._logSlowResolvingAsync(a),a}else if(!f){let _=typeof t=="string"?this._stringDecoder.decode(t,this._parseBuffer):this._utf8Decoder.decode(t,this._parseBuffer);if(a=this._parser.parse(this._parseBuffer,_))return this._preserveStack(l,u,_,0),this._logSlowResolvingAsync(a),a}(this._activeBuffer.x!==l||this._activeBuffer.y!==u)&&this._onCursorMove.fire();let p=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({start:Math.min(v,this._bufferService.rows-1),end:Math.min(p,this._bufferService.rows-1)})}print(t,s,a){let l,u,d=this._charsetService.charset,f=this._optionsService.rawOptions.screenReaderMode,p=this._bufferService.cols,v=this._coreService.decPrivateModes.wraparound,_=this._coreService.modes.insertMode,w=this._curAttrData,g=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&a-s>0&&g.getWidth(this._activeBuffer.x-1)===2&&g.setCellFromCodepoint(this._activeBuffer.x-1,0,1,w);let y=this._parser.precedingJoinState;for(let T=s;T<a;++T){if(l=t[T],l<127&&d){let ue=d[String.fromCharCode(l)];ue&&(l=ue.charCodeAt(0))}let R=this._unicodeService.charProperties(l,y);u=yn.extractWidth(R);let I=yn.extractShouldJoin(R),Z=I?yn.extractWidth(y):0;if(y=R,f&&this._onA11yChar.fire(Or(l)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+u-Z>p){if(v){let ue=g,pe=this._activeBuffer.x-Z;for(this._activeBuffer.x=Z,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),g=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Z>0&&g instanceof Nl&&g.copyCellsFrom(ue,pe,0,Z,!1);pe<p;)ue.setCellFromCodepoint(pe++,0,1,w)}else if(this._activeBuffer.x=p-1,u===2)continue}if(I&&this._activeBuffer.x){let ue=g.getWidth(this._activeBuffer.x-1)?1:2;g.addCodepointToCell(this._activeBuffer.x-ue,l,u);for(let pe=u-Z;--pe>=0;)g.setCellFromCodepoint(this._activeBuffer.x++,0,0,w);continue}if(_&&(g.insertCells(this._activeBuffer.x,u-Z,this._activeBuffer.getNullCell(w)),g.getWidth(p-1)===2&&g.setCellFromCodepoint(p-1,0,1,w)),g.setCellFromCodepoint(this._activeBuffer.x++,l,u,w),u>0)for(;--u;)g.setCellFromCodepoint(this._activeBuffer.x++,0,0,w)}this._parser.precedingJoinState=y,this._activeBuffer.x<p&&a-s>0&&g.getWidth(this._activeBuffer.x)===0&&!g.hasContent(this._activeBuffer.x)&&g.setCellFromCodepoint(this._activeBuffer.x,0,1,w),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(t,s){return t.final==="t"&&!t.prefix&&!t.intermediates?this._parser.registerCsiHandler(t,a=>_0(a.params[0],this._optionsService.rawOptions.windowOptions)?s(a):!0):this._parser.registerCsiHandler(t,s)}registerDcsHandler(t,s){return this._parser.registerDcsHandler(t,new d0(s))}registerEscHandler(t,s){return this._parser.registerEscHandler(t,s)}registerOscHandler(t,s){return this._parser.registerOscHandler(t,new Hi(s))}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 t;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&&((t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&t.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);s.hasWidth(this._activeBuffer.x)&&!s.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-t),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(t=this._bufferService.cols-1){this._activeBuffer.x=Math.min(t,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(t,s){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=t,this._activeBuffer.y=this._activeBuffer.scrollTop+s):(this._activeBuffer.x=t,this._activeBuffer.y=s),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(t,s){this._restrictCursor(),this._setCursor(this._activeBuffer.x+t,this._activeBuffer.y+s)}cursorUp(t){let s=this._activeBuffer.y-this._activeBuffer.scrollTop;return s>=0?this._moveCursor(0,-Math.min(s,t.params[0]||1)):this._moveCursor(0,-(t.params[0]||1)),!0}cursorDown(t){let s=this._activeBuffer.scrollBottom-this._activeBuffer.y;return s>=0?this._moveCursor(0,Math.min(s,t.params[0]||1)):this._moveCursor(0,t.params[0]||1),!0}cursorForward(t){return this._moveCursor(t.params[0]||1,0),!0}cursorBackward(t){return this._moveCursor(-(t.params[0]||1),0),!0}cursorNextLine(t){return this.cursorDown(t),this._activeBuffer.x=0,!0}cursorPrecedingLine(t){return this.cursorUp(t),this._activeBuffer.x=0,!0}cursorCharAbsolute(t){return this._setCursor((t.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(t){return this._setCursor(t.length>=2?(t.params[1]||1)-1:0,(t.params[0]||1)-1),!0}charPosAbsolute(t){return this._setCursor((t.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(t){return this._moveCursor(t.params[0]||1,0),!0}linePosAbsolute(t){return this._setCursor(this._activeBuffer.x,(t.params[0]||1)-1),!0}vPositionRelative(t){return this._moveCursor(0,t.params[0]||1),!0}hVPosition(t){return this.cursorPosition(t),!0}tabClear(t){let s=t.params[0];return s===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:s===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(t){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let s=t.params[0]||1;for(;s--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(t){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let s=t.params[0]||1;for(;s--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(t){let s=t.params[0];return s===1&&(this._curAttrData.bg|=536870912),(s===2||s===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(t,s,a,l=!1,u=!1){let d=this._activeBuffer.lines.get(this._activeBuffer.ybase+t);d.replaceCells(s,a,this._activeBuffer.getNullCell(this._eraseAttrData()),u),l&&(d.isWrapped=!1)}_resetBufferLine(t,s=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+t);a&&(a.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),s),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+t),a.isWrapped=!1)}eraseInDisplay(t,s=!1){var l;this._restrictCursor(this._bufferService.cols);let a;switch(t.params[0]){case 0:for(a=this._activeBuffer.y,this._dirtyRowTracker.markDirty(a),this._eraseInBufferLine(a++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,s);a<this._bufferService.rows;a++)this._resetBufferLine(a,s);this._dirtyRowTracker.markDirty(a);break;case 1:for(a=this._activeBuffer.y,this._dirtyRowTracker.markDirty(a),this._eraseInBufferLine(a,0,this._activeBuffer.x+1,!0,s),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(a+1).isWrapped=!1);a--;)this._resetBufferLine(a,s);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(a=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,a-1);a--&&!((l=this._activeBuffer.lines.get(this._activeBuffer.ybase+a))!=null&&l.getTrimmedLength()););for(;a>=0;a--)this._bufferService.scroll(this._eraseAttrData())}else{for(a=this._bufferService.rows,this._dirtyRowTracker.markDirty(a-1);a--;)this._resetBufferLine(a,s);this._dirtyRowTracker.markDirty(0)}break;case 3:let u=this._activeBuffer.lines.length-this._bufferService.rows;u>0&&(this._activeBuffer.lines.trimStart(u),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-u,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-u,0),this._onScroll.fire(0));break}return!0}eraseInLine(t,s=!1){switch(this._restrictCursor(this._bufferService.cols),t.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,s);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,s);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,s);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(t){this._restrictCursor();let s=t.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let a=this._activeBuffer.ybase+this._activeBuffer.y,l=this._bufferService.rows-1-this._activeBuffer.scrollBottom,u=this._bufferService.rows-1+this._activeBuffer.ybase-l+1;for(;s--;)this._activeBuffer.lines.splice(u-1,1),this._activeBuffer.lines.splice(a,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(t){this._restrictCursor();let s=t.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let a=this._activeBuffer.ybase+this._activeBuffer.y,l;for(l=this._bufferService.rows-1-this._activeBuffer.scrollBottom,l=this._bufferService.rows-1+this._activeBuffer.ybase-l;s--;)this._activeBuffer.lines.splice(a,1),this._activeBuffer.lines.splice(l,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(t){this._restrictCursor();let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return s&&(s.insertCells(this._activeBuffer.x,t.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(t){this._restrictCursor();let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return s&&(s.deleteCells(this._activeBuffer.x,t.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(t){let s=t.params[0]||1;for(;s--;)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(t){let s=t.params[0]||1;for(;s--;)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(Pt));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(t){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let s=t.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let l=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);l.deleteCells(0,s,this._activeBuffer.getNullCell(this._eraseAttrData())),l.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(t){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let s=t.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let l=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);l.insertCells(0,s,this._activeBuffer.getNullCell(this._eraseAttrData())),l.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(t){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let s=t.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let l=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);l.insertCells(this._activeBuffer.x,s,this._activeBuffer.getNullCell(this._eraseAttrData())),l.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(t){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let s=t.params[0]||1;for(let a=this._activeBuffer.scrollTop;a<=this._activeBuffer.scrollBottom;++a){let l=this._activeBuffer.lines.get(this._activeBuffer.ybase+a);l.deleteCells(this._activeBuffer.x,s,this._activeBuffer.getNullCell(this._eraseAttrData())),l.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(t){this._restrictCursor();let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return s&&(s.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(t.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(t){let s=this._parser.precedingJoinState;if(!s)return!0;let a=t.params[0]||1,l=yn.extractWidth(s),u=this._activeBuffer.x-l,d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(u),f=new Uint32Array(d.length*a),p=0;for(let _=0;_<d.length;){let w=d.codePointAt(_)||0;f[p++]=w,_+=w>65535?2:1}let v=p;for(let _=1;_<a;++_)f.copyWithin(v,0,p),v+=p;return this.print(f,0,v),!0}sendDeviceAttributesPrimary(t){return t.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(le.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(le.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(t){return t.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(le.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(le.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(t.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(le.ESC+"[>83;40003;0c")),!0}_is(t){return(this._optionsService.rawOptions.termName+"").indexOf(t)===0}setMode(t){for(let s=0;s<t.length;s++)switch(t.params[s]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(t){for(let s=0;s<t.length;s++)switch(t.params[s]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,pn),this._charsetService.setgCharset(1,pn),this._charsetService.setgCharset(2,pn),this._charsetService.setgCharset(3,pn);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(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(t){for(let s=0;s<t.length;s++)switch(t.params[s]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(t){for(let s=0;s<t.length;s++)switch(t.params[s]){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:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),t.params[s]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(t,s){(I=>(I[I.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",I[I.SET=1]="SET",I[I.RESET=2]="RESET",I[I.PERMANENTLY_SET=3]="PERMANENTLY_SET",I[I.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(a={}));let l=this._coreService.decPrivateModes,{activeProtocol:u,activeEncoding:d}=this._coreMouseService,f=this._coreService,{buffers:p,cols:v}=this._bufferService,{active:_,alt:w}=p,g=this._optionsService.rawOptions,y=(I,Z)=>(f.triggerDataEvent(`${le.ESC}[${s?"":"?"}${I};${Z}$y`),!0),T=I=>I?1:2,R=t.params[0];return s?R===2?y(R,4):R===4?y(R,T(f.modes.insertMode)):R===12?y(R,3):R===20?y(R,T(g.convertEol)):y(R,0):R===1?y(R,T(l.applicationCursorKeys)):R===3?y(R,g.windowOptions.setWinLines?v===80?2:v===132?1:0:0):R===6?y(R,T(l.origin)):R===7?y(R,T(l.wraparound)):R===8?y(R,3):R===9?y(R,T(u==="X10")):R===12?y(R,T(g.cursorBlink)):R===25?y(R,T(!f.isCursorHidden)):R===45?y(R,T(l.reverseWraparound)):R===66?y(R,T(l.applicationKeypad)):R===67?y(R,4):R===1e3?y(R,T(u==="VT200")):R===1002?y(R,T(u==="DRAG")):R===1003?y(R,T(u==="ANY")):R===1004?y(R,T(l.sendFocus)):R===1005?y(R,4):R===1006?y(R,T(d==="SGR")):R===1015?y(R,4):R===1016?y(R,T(d==="SGR_PIXELS")):R===1048?y(R,1):R===47||R===1047||R===1049?y(R,T(_===w)):R===2004?y(R,T(l.bracketedPasteMode)):R===2026?y(R,T(l.synchronizedOutput)):y(R,0)}_updateAttrColor(t,s,a,l,u){return s===2?(t|=50331648,t&=-16777216,t|=Ul.fromColorRGB([a,l,u])):s===5&&(t&=-50331904,t|=33554432|a&255),t}_extractColor(t,s,a){let l=[0,0,-1,0,0,0],u=0,d=0;do{if(l[d+u]=t.params[s+d],t.hasSubParams(s+d)){let f=t.getSubParams(s+d),p=0;do l[1]===5&&(u=1),l[d+p+1+u]=f[p];while(++p<f.length&&p+d+1+u<l.length);break}if(l[1]===5&&d+u>=2||l[1]===2&&d+u>=5)break;l[1]&&(u=1)}while(++d+s<t.length&&d+u<l.length);for(let f=2;f<l.length;++f)l[f]===-1&&(l[f]=0);switch(l[0]){case 38:a.fg=this._updateAttrColor(a.fg,l[1],l[3],l[4],l[5]);break;case 48:a.bg=this._updateAttrColor(a.bg,l[1],l[3],l[4],l[5]);break;case 58:a.extended=a.extended.clone(),a.extended.underlineColor=this._updateAttrColor(a.extended.underlineColor,l[1],l[3],l[4],l[5])}return d}_processUnderline(t,s){s.extended=s.extended.clone(),(!~t||t>5)&&(t=1),s.extended.underlineStyle=t,s.fg|=268435456,t===0&&(s.fg&=-268435457),s.updateExtended()}_processSGR0(t){t.fg=Pt.fg,t.bg=Pt.bg,t.extended=t.extended.clone(),t.extended.underlineStyle=0,t.extended.underlineColor&=-67108864,t.updateExtended()}charAttributes(t){if(t.length===1&&t.params[0]===0)return this._processSGR0(this._curAttrData),!0;let s=t.length,a,l=this._curAttrData;for(let u=0;u<s;u++)a=t.params[u],a>=30&&a<=37?(l.fg&=-50331904,l.fg|=16777216|a-30):a>=40&&a<=47?(l.bg&=-50331904,l.bg|=16777216|a-40):a>=90&&a<=97?(l.fg&=-50331904,l.fg|=16777216|a-90|8):a>=100&&a<=107?(l.bg&=-50331904,l.bg|=16777216|a-100|8):a===0?this._processSGR0(l):a===1?l.fg|=134217728:a===3?l.bg|=67108864:a===4?(l.fg|=268435456,this._processUnderline(t.hasSubParams(u)?t.getSubParams(u)[0]:1,l)):a===5?l.fg|=536870912:a===7?l.fg|=67108864:a===8?l.fg|=1073741824:a===9?l.fg|=2147483648:a===2?l.bg|=134217728:a===21?this._processUnderline(2,l):a===22?(l.fg&=-134217729,l.bg&=-134217729):a===23?l.bg&=-67108865:a===24?(l.fg&=-268435457,this._processUnderline(0,l)):a===25?l.fg&=-536870913:a===27?l.fg&=-67108865:a===28?l.fg&=-1073741825:a===29?l.fg&=2147483647:a===39?(l.fg&=-67108864,l.fg|=Pt.fg&16777215):a===49?(l.bg&=-67108864,l.bg|=Pt.bg&16777215):a===38||a===48||a===58?u+=this._extractColor(t,u,l):a===53?l.bg|=1073741824:a===55?l.bg&=-1073741825:a===59?(l.extended=l.extended.clone(),l.extended.underlineColor=-1,l.updateExtended()):a===100?(l.fg&=-67108864,l.fg|=Pt.fg&16777215,l.bg&=-67108864,l.bg|=Pt.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",a);return!0}deviceStatus(t){switch(t.params[0]){case 5:this._coreService.triggerDataEvent(`${le.ESC}[0n`);break;case 6:let s=this._activeBuffer.y+1,a=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${le.ESC}[${s};${a}R`);break}return!0}deviceStatusPrivate(t){switch(t.params[0]){case 6:let s=this._activeBuffer.y+1,a=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${le.ESC}[?${s};${a}R`);break}return!0}softReset(t){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Pt.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(t){let s=t.length===0?1:t.params[0];if(s===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(s){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let a=s%2===1;this._coreService.decPrivateModes.cursorBlink=a}return!0}setScrollRegion(t){let s=t.params[0]||1,a;return(t.length<2||(a=t.params[1])>this._bufferService.rows||a===0)&&(a=this._bufferService.rows),a>s&&(this._activeBuffer.scrollTop=s-1,this._activeBuffer.scrollBottom=a-1,this._setCursor(0,0)),!0}windowOptions(t){if(!_0(t.params[0],this._optionsService.rawOptions.windowOptions))return!0;let s=t.length>1?t.params[1]:0;switch(t.params[0]){case 14:s!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${le.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(s===0||s===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>m0&&this._windowTitleStack.shift()),(s===0||s===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>m0&&this._iconNameStack.shift());break;case 23:(s===0||s===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(s===0||s===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(t){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(t){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(t){return this._windowTitle=t,this._onTitleChange.fire(t),!0}setIconName(t){return this._iconName=t,!0}setOrReportIndexedColor(t){let s=[],a=t.split(";");for(;a.length>1;){let l=a.shift(),u=a.shift();if(/^\d+$/.exec(l)){let d=parseInt(l);if(g0(d))if(u==="?")s.push({type:0,index:d});else{let f=f0(u);f&&s.push({type:1,index:d,color:f})}}}return s.length&&this._onColor.fire(s),!0}setHyperlink(t){let s=t.indexOf(";");if(s===-1)return!0;let a=t.slice(0,s).trim(),l=t.slice(s+1);return l?this._createHyperlink(a,l):a.trim()?!1:this._finishHyperlink()}_createHyperlink(t,s){this._getCurrentLinkId()&&this._finishHyperlink();let a=t.split(":"),l,u=a.findIndex(d=>d.startsWith("id="));return u!==-1&&(l=a[u].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:l,uri:s}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(t,s){let a=t.split(";");for(let l=0;l<a.length&&!(s>=this._specialColors.length);++l,++s)if(a[l]==="?")this._onColor.fire([{type:0,index:this._specialColors[s]}]);else{let u=f0(a[l]);u&&this._onColor.fire([{type:1,index:this._specialColors[s],color:u}])}return!0}setOrReportFgColor(t){return this._setOrReportSpecialColor(t,0)}setOrReportBgColor(t){return this._setOrReportSpecialColor(t,1)}setOrReportCursorColor(t){return this._setOrReportSpecialColor(t,2)}restoreIndexedColor(t){if(!t)return this._onColor.fire([{type:2}]),!0;let s=[],a=t.split(";");for(let l=0;l<a.length;++l)if(/^\d+$/.exec(a[l])){let u=parseInt(a[l]);g0(u)&&s.push({type:2,index:u})}return s.length&&this._onColor.fire(s),!0}restoreFgColor(t){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(t){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(t){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,pn),!0}selectCharset(t){return t.length!==2?(this.selectDefaultCharset(),!0):(t[0]==="/"||this._charsetService.setgCharset(C5[t[0]],It[t[1]]||pn),!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){let t=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,t,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=Pt.clone(),this._eraseAttrDataInternal=Pt.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(t){return this._charsetService.setgLevel(t),!0}screenAlignmentPattern(){let t=new es;t.content=1<<22|69,t.fg=this._curAttrData.fg,t.bg=this._curAttrData.bg,this._setCursor(0,0);for(let s=0;s<this._bufferService.rows;++s){let a=this._activeBuffer.ybase+this._activeBuffer.y+s,l=this._activeBuffer.lines.get(a);l&&(l.fill(t),l.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(t,s){let a=f=>(this._coreService.triggerDataEvent(`${le.ESC}${f}${le.ESC}\\`),!0),l=this._bufferService.buffer,u=this._optionsService.rawOptions;return a(t==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:t==='"p'?'P1$r61;1"p':t==="r"?`P1$r${l.scrollTop+1};${l.scrollBottom+1}r`:t==="m"?"P1$r0m":t===" q"?`P1$r${{block:2,underline:4,bar:6}[u.cursorStyle]-(u.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(t,s){this._dirtyRowTracker.markRangeDirty(t,s)}},Of=class{constructor(t){this._bufferService=t,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(t){t<this.start?this.start=t:t>this.end&&(this.end=t)}markRangeDirty(t,s){t>s&&(v0=t,t=s,s=v0),t<this.start&&(this.start=t),s>this.end&&(this.end=s)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};Of=jt([Ee(0,yi)],Of);function g0(t){return 0<=t&&t<256}var E5=5e7,x0=12,N5=50,M5=class extends Xe{constructor(t){super(),this._action=t,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new Se),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(t,s){if(s!==void 0&&this._syncCalls>s){this._syncCalls=0;return}if(this._pendingData+=t.length,this._writeBuffer.push(t),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let a;for(;a=this._writeBuffer.shift();){this._action(a);let l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(t,s){if(this._pendingData>E5)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=t.length,this._writeBuffer.push(t),this._callbacks.push(s),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=t.length,this._writeBuffer.push(t),this._callbacks.push(s)}_innerWrite(t=0,s=!0){let a=t||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let l=this._writeBuffer[this._bufferOffset],u=this._action(l,s);if(u){let f=p=>performance.now()-a>=x0?setTimeout(()=>this._innerWrite(0,p)):this._innerWrite(a,p);u.catch(p=>(queueMicrotask(()=>{throw p}),Promise.resolve(!1))).then(f);return}let d=this._callbacks[this._bufferOffset];if(d&&d(),this._bufferOffset++,this._pendingData-=l.length,performance.now()-a>=x0)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>N5&&(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()}},zf=class{constructor(t){this._bufferService=t,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(t){let s=this._bufferService.buffer;if(t.id===void 0){let p=s.addMarker(s.ybase+s.y),v={data:t,id:this._nextId++,lines:[p]};return p.onDispose(()=>this._removeMarkerFromLink(v,p)),this._dataByLinkId.set(v.id,v),v.id}let a=t,l=this._getEntryIdKey(a),u=this._entriesWithId.get(l);if(u)return this.addLineToLink(u.id,s.ybase+s.y),u.id;let d=s.addMarker(s.ybase+s.y),f={id:this._nextId++,key:this._getEntryIdKey(a),data:a,lines:[d]};return d.onDispose(()=>this._removeMarkerFromLink(f,d)),this._entriesWithId.set(f.key,f),this._dataByLinkId.set(f.id,f),f.id}addLineToLink(t,s){let a=this._dataByLinkId.get(t);if(a&&a.lines.every(l=>l.line!==s)){let l=this._bufferService.buffer.addMarker(s);a.lines.push(l),l.onDispose(()=>this._removeMarkerFromLink(a,l))}}getLinkData(t){var s;return(s=this._dataByLinkId.get(t))==null?void 0:s.data}_getEntryIdKey(t){return`${t.id};;${t.uri}`}_removeMarkerFromLink(t,s){let a=t.lines.indexOf(s);a!==-1&&(t.lines.splice(a,1),t.lines.length===0&&(t.data.id!==void 0&&this._entriesWithId.delete(t.key),this._dataByLinkId.delete(t.id)))}};zf=jt([Ee(0,yi)],zf);var y0=!1,D5=class extends Xe{constructor(t){super(),this._windowsWrappingHeuristics=this._register(new Sa),this._onBinary=this._register(new Se),this.onBinary=this._onBinary.event,this._onData=this._register(new Se),this.onData=this._onData.event,this._onLineFeed=this._register(new Se),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new Se),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new Se),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new Se),this._instantiationService=new JC,this.optionsService=this._register(new c5(t)),this._instantiationService.setService(bi,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(jf)),this._instantiationService.setService(yi,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Tf)),this._instantiationService.setService(o1,this._logService),this.coreService=this._register(this._instantiationService.createInstance(Af)),this._instantiationService.setService(Nn,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(Bf)),this._instantiationService.setService(l1,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(yn)),this._instantiationService.setService(G2,this.unicodeService),this._charsetService=this._instantiationService.createInstance(m5),this._instantiationService.setService(W2,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(zf),this._instantiationService.setService(c1,this._oscLinkService),this._inputHandler=this._register(new k5(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(ui.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(ui.forward(this._bufferService.onResize,this._onResize)),this._register(ui.forward(this.coreService.onData,this._onData)),this._register(ui.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new M5((s,a)=>this._inputHandler.parse(s,a))),this._register(ui.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new Se),this._onScroll.event(t=>{var s;(s=this._onScrollApi)==null||s.fire(t.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(t){for(let s in t)this.optionsService.options[s]=t[s]}write(t,s){this._writeBuffer.write(t,s)}writeSync(t,s){this._logService.logLevel<=3&&!y0&&(this._logService.warn("writeSync is unreliable and will be removed soon."),y0=!0),this._writeBuffer.writeSync(t,s)}input(t,s=!0){this.coreService.triggerDataEvent(t,s)}resize(t,s){isNaN(t)||isNaN(s)||(t=Math.max(t,Y1),s=Math.max(s,K1),this._bufferService.resize(t,s))}scroll(t,s=!1){this._bufferService.scroll(t,s)}scrollLines(t,s){this._bufferService.scrollLines(t,s)}scrollPages(t){this.scrollLines(t*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(t){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(t){let s=t-this._bufferService.buffer.ydisp;s!==0&&this.scrollLines(s)}registerEscHandler(t,s){return this._inputHandler.registerEscHandler(t,s)}registerDcsHandler(t,s){return this._inputHandler.registerDcsHandler(t,s)}registerCsiHandler(t,s){return this._inputHandler.registerCsiHandler(t,s)}registerOscHandler(t,s){return this._inputHandler.registerOscHandler(t,s)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let t=!1,s=this.optionsService.rawOptions.windowsPty;s&&s.buildNumber!==void 0&&s.buildNumber!==void 0?t=s.backend==="conpty"&&s.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(t=!0),t?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let t=[];t.push(this.onLineFeed(u0.bind(null,this._bufferService))),t.push(this.registerCsiHandler({final:"H"},()=>(u0(this._bufferService),!1))),this._windowsWrappingHeuristics.value=wt(()=>{for(let s of t)s.dispose()})}}},T5={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:["'",'"']};function j5(t,s,a,l){var f;let u={type:0,cancel:!1,key:void 0},d=(t.shiftKey?1:0)|(t.altKey?2:0)|(t.ctrlKey?4:0)|(t.metaKey?8:0);switch(t.keyCode){case 0:t.key==="UIKeyInputUpArrow"?s?u.key=le.ESC+"OA":u.key=le.ESC+"[A":t.key==="UIKeyInputLeftArrow"?s?u.key=le.ESC+"OD":u.key=le.ESC+"[D":t.key==="UIKeyInputRightArrow"?s?u.key=le.ESC+"OC":u.key=le.ESC+"[C":t.key==="UIKeyInputDownArrow"&&(s?u.key=le.ESC+"OB":u.key=le.ESC+"[B");break;case 8:u.key=t.ctrlKey?"\b":le.DEL,t.altKey&&(u.key=le.ESC+u.key);break;case 9:if(t.shiftKey){u.key=le.ESC+"[Z";break}u.key=le.HT,u.cancel=!0;break;case 13:u.key=t.altKey?le.ESC+le.CR:le.CR,u.cancel=!0;break;case 27:u.key=le.ESC,t.altKey&&(u.key=le.ESC+le.ESC),u.cancel=!0;break;case 37:if(t.metaKey)break;d?u.key=le.ESC+"[1;"+(d+1)+"D":s?u.key=le.ESC+"OD":u.key=le.ESC+"[D";break;case 39:if(t.metaKey)break;d?u.key=le.ESC+"[1;"+(d+1)+"C":s?u.key=le.ESC+"OC":u.key=le.ESC+"[C";break;case 38:if(t.metaKey)break;d?u.key=le.ESC+"[1;"+(d+1)+"A":s?u.key=le.ESC+"OA":u.key=le.ESC+"[A";break;case 40:if(t.metaKey)break;d?u.key=le.ESC+"[1;"+(d+1)+"B":s?u.key=le.ESC+"OB":u.key=le.ESC+"[B";break;case 45:!t.shiftKey&&!t.ctrlKey&&(u.key=le.ESC+"[2~");break;case 46:d?u.key=le.ESC+"[3;"+(d+1)+"~":u.key=le.ESC+"[3~";break;case 36:d?u.key=le.ESC+"[1;"+(d+1)+"H":s?u.key=le.ESC+"OH":u.key=le.ESC+"[H";break;case 35:d?u.key=le.ESC+"[1;"+(d+1)+"F":s?u.key=le.ESC+"OF":u.key=le.ESC+"[F";break;case 33:t.shiftKey?u.type=2:t.ctrlKey?u.key=le.ESC+"[5;"+(d+1)+"~":u.key=le.ESC+"[5~";break;case 34:t.shiftKey?u.type=3:t.ctrlKey?u.key=le.ESC+"[6;"+(d+1)+"~":u.key=le.ESC+"[6~";break;case 112:d?u.key=le.ESC+"[1;"+(d+1)+"P":u.key=le.ESC+"OP";break;case 113:d?u.key=le.ESC+"[1;"+(d+1)+"Q":u.key=le.ESC+"OQ";break;case 114:d?u.key=le.ESC+"[1;"+(d+1)+"R":u.key=le.ESC+"OR";break;case 115:d?u.key=le.ESC+"[1;"+(d+1)+"S":u.key=le.ESC+"OS";break;case 116:d?u.key=le.ESC+"[15;"+(d+1)+"~":u.key=le.ESC+"[15~";break;case 117:d?u.key=le.ESC+"[17;"+(d+1)+"~":u.key=le.ESC+"[17~";break;case 118:d?u.key=le.ESC+"[18;"+(d+1)+"~":u.key=le.ESC+"[18~";break;case 119:d?u.key=le.ESC+"[19;"+(d+1)+"~":u.key=le.ESC+"[19~";break;case 120:d?u.key=le.ESC+"[20;"+(d+1)+"~":u.key=le.ESC+"[20~";break;case 121:d?u.key=le.ESC+"[21;"+(d+1)+"~":u.key=le.ESC+"[21~";break;case 122:d?u.key=le.ESC+"[23;"+(d+1)+"~":u.key=le.ESC+"[23~";break;case 123:d?u.key=le.ESC+"[24;"+(d+1)+"~":u.key=le.ESC+"[24~";break;default:if(t.ctrlKey&&!t.shiftKey&&!t.altKey&&!t.metaKey)t.keyCode>=65&&t.keyCode<=90?u.key=String.fromCharCode(t.keyCode-64):t.keyCode===32?u.key=le.NUL:t.keyCode>=51&&t.keyCode<=55?u.key=String.fromCharCode(t.keyCode-51+27):t.keyCode===56?u.key=le.DEL:t.keyCode===219?u.key=le.ESC:t.keyCode===220?u.key=le.FS:t.keyCode===221&&(u.key=le.GS);else if((!a||l)&&t.altKey&&!t.metaKey){let p=(f=T5[t.keyCode])==null?void 0:f[t.shiftKey?1:0];if(p)u.key=le.ESC+p;else if(t.keyCode>=65&&t.keyCode<=90){let v=t.ctrlKey?t.keyCode-64:t.keyCode+32,_=String.fromCharCode(v);t.shiftKey&&(_=_.toUpperCase()),u.key=le.ESC+_}else if(t.keyCode===32)u.key=le.ESC+(t.ctrlKey?le.NUL:" ");else if(t.key==="Dead"&&t.code.startsWith("Key")){let v=t.code.slice(3,4);t.shiftKey||(v=v.toLowerCase()),u.key=le.ESC+v,u.cancel=!0}}else a&&!t.altKey&&!t.ctrlKey&&!t.shiftKey&&t.metaKey?t.keyCode===65&&(u.type=1):t.key&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&t.keyCode>=48&&t.key.length===1?u.key=t.key:t.key&&t.ctrlKey&&(t.key==="_"&&(u.key=le.US),t.key==="@"&&(u.key=le.NUL));break}return u}var Ot=0,A5=class{constructor(t){this._getKey=t,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Yc,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Yc,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(t){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(t)}_flushInserted(){let t=this._insertedValues.sort((u,d)=>this._getKey(u)-this._getKey(d)),s=0,a=0,l=new Array(this._array.length+this._insertedValues.length);for(let u=0;u<l.length;u++)a>=this._array.length||this._getKey(t[s])<=this._getKey(this._array[a])?(l[u]=t[s],s++):l[u]=this._array[a++];this._array=l,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(t){if(this._flushCleanupInserted(),this._array.length===0)return!1;let s=this._getKey(t);if(s===void 0||(Ot=this._search(s),Ot===-1)||this._getKey(this._array[Ot])!==s)return!1;do if(this._array[Ot]===t)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Ot),!0;while(++Ot<this._array.length&&this._getKey(this._array[Ot])===s);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let t=this._deletedIndices.sort((u,d)=>u-d),s=0,a=new Array(this._array.length-t.length),l=0;for(let u=0;u<this._array.length;u++)t[s]===u?s++:a[l++]=this._array[u];this._array=a,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ot=this._search(t),!(Ot<0||Ot>=this._array.length)&&this._getKey(this._array[Ot])===t))do yield this._array[Ot];while(++Ot<this._array.length&&this._getKey(this._array[Ot])===t)}forEachByKey(t,s){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ot=this._search(t),!(Ot<0||Ot>=this._array.length)&&this._getKey(this._array[Ot])===t))do s(this._array[Ot]);while(++Ot<this._array.length&&this._getKey(this._array[Ot])===t)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(t){let s=0,a=this._array.length-1;for(;a>=s;){let l=s+a>>1,u=this._getKey(this._array[l]);if(u>t)a=l-1;else if(u<t)s=l+1;else{for(;l>0&&this._getKey(this._array[l-1])===t;)l--;return l}}return s}},Vd=0,b0=0,B5=class extends Xe{constructor(){super(),this._decorations=new A5(t=>t==null?void 0:t.marker.line),this._onDecorationRegistered=this._register(new Se),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new Se),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(wt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(t){if(t.marker.isDisposed)return;let s=new R5(t);if(s){let a=s.marker.onDispose(()=>s.dispose()),l=s.onDispose(()=>{l.dispose(),s&&(this._decorations.delete(s)&&this._onDecorationRemoved.fire(s),a.dispose())});this._decorations.insert(s),this._onDecorationRegistered.fire(s)}return s}reset(){for(let t of this._decorations.values())t.dispose();this._decorations.clear()}*getDecorationsAtCell(t,s,a){let l=0,u=0;for(let d of this._decorations.getKeyIterator(s))l=d.options.x??0,u=l+(d.options.width??1),t>=l&&t<u&&(!a||(d.options.layer??"bottom")===a)&&(yield d)}forEachDecorationAtCell(t,s,a,l){this._decorations.forEachByKey(s,u=>{Vd=u.options.x??0,b0=Vd+(u.options.width??1),t>=Vd&&t<b0&&(!a||(u.options.layer??"bottom")===a)&&l(u)})}},R5=class extends Lr{constructor(t){super(),this.options=t,this.onRenderEmitter=this.add(new Se),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new Se),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=t.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Et.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Et.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},O5=1e3,z5=class{constructor(t,s=O5){this._renderCallback=t,this._debounceThresholdMS=s,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(t,s,a){this._rowCount=a,t=t!==void 0?t:0,s=s!==void 0?s:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,t):t,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,s):s;let l=performance.now();if(l-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=l,this._innerRefresh();else if(!this._additionalRefreshRequested){let u=l-this._lastRefreshMs,d=this._debounceThresholdMS-u;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},d)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let t=Math.max(this._rowStart,0),s=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(t,s)}},S0=20,Kc=class extends Xe{constructor(t,s,a,l){super(),this._terminal=t,this._coreBrowserService=a,this._renderService=l,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let u=this._coreBrowserService.mainDocument;this._accessibilityContainer=u.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=u.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let d=0;d<this._terminal.rows;d++)this._rowElements[d]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[d]);if(this._topBoundaryFocusListener=d=>this._handleBoundaryFocus(d,0),this._bottomBoundaryFocusListener=d=>this._handleBoundaryFocus(d,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=u.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new z5(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(d=>this._handleResize(d.rows))),this._register(this._terminal.onRender(d=>this._refreshRows(d.start,d.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(d=>this._handleChar(d))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
394
|
-
`))),this._register(this._terminal.onA11yTab(d=>this._handleTab(d))),this._register(this._terminal.onKey(d=>this._handleKey(d.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(He(u,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(wt(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(t){for(let s=0;s<t;s++)this._handleChar(" ")}_handleChar(t){this._liveRegionLineCount<S0+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
|
|
395
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===S0+1&&(this._liveRegion.textContent+=tf.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(t){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(t)||this._charsToConsume.push(t)}_refreshRows(t,s){this._liveRegionDebouncer.refresh(t,s,this._terminal.rows)}_renderRows(t,s){let a=this._terminal.buffer,l=a.lines.length.toString();for(let u=t;u<=s;u++){let d=a.lines.get(a.ydisp+u),f=[],p=(d==null?void 0:d.translateToString(!0,void 0,void 0,f))||"",v=(a.ydisp+u+1).toString(),_=this._rowElements[u];_&&(p.length===0?(_.textContent=" ",this._rowColumns.set(_,[0,1])):(_.textContent=p,this._rowColumns.set(_,f)),_.setAttribute("aria-posinset",v),_.setAttribute("aria-setsize",l),this._alignRowWidth(_))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(t,s){let a=t.target,l=this._rowElements[s===0?1:this._rowElements.length-2],u=a.getAttribute("aria-posinset"),d=s===0?"1":`${this._terminal.buffer.lines.length}`;if(u===d||t.relatedTarget!==l)return;let f,p;if(s===0?(f=a,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(f=this._rowElements.shift(),p=a,this._rowContainer.removeChild(f)),f.removeEventListener("focus",this._topBoundaryFocusListener),p.removeEventListener("focus",this._bottomBoundaryFocusListener),s===0){let v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else{let v=this._createAccessibilityTreeNode();this._rowElements.push(v),this._rowContainer.appendChild(v)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}_handleSelectionChange(){var p;if(this._rowElements.length===0)return;let t=this._coreBrowserService.mainDocument.getSelection();if(!t)return;if(t.isCollapsed){this._rowContainer.contains(t.anchorNode)&&this._terminal.clearSelection();return}if(!t.anchorNode||!t.focusNode){console.error("anchorNode and/or focusNode are null");return}let s={node:t.anchorNode,offset:t.anchorOffset},a={node:t.focusNode,offset:t.focusOffset};if((s.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||s.node===a.node&&s.offset>a.offset)&&([s,a]=[a,s]),s.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(s={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(s.node))return;let l=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(l)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:l,offset:((p=l.textContent)==null?void 0:p.length)??0}),!this._rowContainer.contains(a.node))return;let u=({node:v,offset:_})=>{let w=v instanceof Text?v.parentNode:v,g=parseInt(w==null?void 0:w.getAttribute("aria-posinset"),10)-1;if(isNaN(g))return console.warn("row is invalid. Race condition?"),null;let y=this._rowColumns.get(w);if(!y)return console.warn("columns is null. Race condition?"),null;let T=_<y.length?y[_]:y.slice(-1)[0]+1;return T>=this._terminal.cols&&(++g,T=0),{row:g,column:T}},d=u(s),f=u(a);if(!(!d||!f)){if(d.row>f.row||d.row===f.row&&d.column>=f.column)throw new Error("invalid range");this._terminal.select(d.column,d.row,(f.row-d.row)*this._terminal.cols-d.column+f.column)}}_handleResize(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let t=this._coreBrowserService.mainDocument.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t]),this._alignRowWidth(this._rowElements[t])}}_refreshRowDimensions(t){t.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(t){var u,d;t.style.transform="";let s=t.getBoundingClientRect().width,a=(d=(u=this._rowColumns.get(t))==null?void 0:u.slice(-1))==null?void 0:d[0];if(!a)return;let l=a*this._renderService.dimensions.css.cell.width;t.style.transform=`scaleX(${l/s})`}};Kc=jt([Ee(1,If),Ee(2,Js),Ee(3,er)],Kc);var Lf=class extends Xe{constructor(t,s,a,l,u){super(),this._element=t,this._mouseService=s,this._renderService=a,this._bufferService=l,this._linkProviderService=u,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new Se),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new Se),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(wt(()=>{var d;kn(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(d=this._activeProviderReplies)==null||d.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(He(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(He(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(He(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(He(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(t){this._lastMouseEvent=t;let s=this._positionFromMouseEvent(t,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;let a=t.composedPath();for(let l=0;l<a.length;l++){let u=a[l];if(u.classList.contains("xterm"))break;if(u.classList.contains("xterm-hover"))return}(!this._lastBufferCell||s.x!==this._lastBufferCell.x||s.y!==this._lastBufferCell.y)&&(this._handleHover(s),this._lastBufferCell=s)}_handleHover(t){if(this._activeLine!==t.y||this._wasResized){this._clearCurrentLink(),this._askForLink(t,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,t)||(this._clearCurrentLink(),this._askForLink(t,!0))}_askForLink(t,s){var l,u;(!this._activeProviderReplies||!s)&&((l=this._activeProviderReplies)==null||l.forEach(d=>{d==null||d.forEach(f=>{f.link.dispose&&f.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=t.y);let a=!1;for(let[d,f]of this._linkProviderService.linkProviders.entries())s?(u=this._activeProviderReplies)!=null&&u.get(d)&&(a=this._checkLinkProviderResult(d,t,a)):f.provideLinks(t.y,p=>{var _,w;if(this._isMouseOut)return;let v=p==null?void 0:p.map(g=>({link:g}));(_=this._activeProviderReplies)==null||_.set(d,v),a=this._checkLinkProviderResult(d,t,a),((w=this._activeProviderReplies)==null?void 0:w.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(t.y,this._activeProviderReplies)})}_removeIntersectingLinks(t,s){let a=new Set;for(let l=0;l<s.size;l++){let u=s.get(l);if(u)for(let d=0;d<u.length;d++){let f=u[d],p=f.link.range.start.y<t?0:f.link.range.start.x,v=f.link.range.end.y>t?this._bufferService.cols:f.link.range.end.x;for(let _=p;_<=v;_++){if(a.has(_)){u.splice(d--,1);break}a.add(_)}}}}_checkLinkProviderResult(t,s,a){var d;if(!this._activeProviderReplies)return a;let l=this._activeProviderReplies.get(t),u=!1;for(let f=0;f<t;f++)(!this._activeProviderReplies.has(f)||this._activeProviderReplies.get(f))&&(u=!0);if(!u&&l){let f=l.find(p=>this._linkAtPosition(p.link,s));f&&(a=!0,this._handleNewLink(f))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!a)for(let f=0;f<this._activeProviderReplies.size;f++){let p=(d=this._activeProviderReplies.get(f))==null?void 0:d.find(v=>this._linkAtPosition(v.link,s));if(p){a=!0,this._handleNewLink(p);break}}return a}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(t){if(!this._currentLink)return;let s=this._positionFromMouseEvent(t,this._element,this._mouseService);s&&this._mouseDownLink&&L5(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(t,this._currentLink.link.text)}_clearCurrentLink(t,s){!this._currentLink||!this._lastMouseEvent||(!t||!s||this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,kn(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(t){if(!this._lastMouseEvent)return;let s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(t.link,s)&&(this._currentLink=t,this._currentLink.state={decorations:{underline:t.link.decorations===void 0?!0:t.link.decorations.underline,pointerCursor:t.link.decorations===void 0?!0:t.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,t.link,this._lastMouseEvent),t.link.decorations={},Object.defineProperties(t.link.decorations,{pointerCursor:{get:()=>{var a,l;return(l=(a=this._currentLink)==null?void 0:a.state)==null?void 0:l.decorations.pointerCursor},set:a=>{var l;(l=this._currentLink)!=null&&l.state&&this._currentLink.state.decorations.pointerCursor!==a&&(this._currentLink.state.decorations.pointerCursor=a,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",a))}},underline:{get:()=>{var a,l;return(l=(a=this._currentLink)==null?void 0:a.state)==null?void 0:l.decorations.underline},set:a=>{var l,u,d;(l=this._currentLink)!=null&&l.state&&((d=(u=this._currentLink)==null?void 0:u.state)==null?void 0:d.decorations.underline)!==a&&(this._currentLink.state.decorations.underline=a,this._currentLink.state.isHovered&&this._fireUnderlineEvent(t.link,a))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(a=>{if(!this._currentLink)return;let l=a.start===0?0:a.start+1+this._bufferService.buffer.ydisp,u=this._bufferService.buffer.ydisp+1+a.end;if(this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=u&&(this._clearCurrentLink(l,u),this._lastMouseEvent)){let d=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);d&&this._askForLink(d,!1)}})))}_linkHover(t,s,a){var l;(l=this._currentLink)!=null&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&t.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(a,s.text)}_fireUnderlineEvent(t,s){let a=t.range,l=this._bufferService.buffer.ydisp,u=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-l-1,a.end.x,a.end.y-l-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(u)}_linkLeave(t,s,a){var l;(l=this._currentLink)!=null&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&t.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(a,s.text)}_linkAtPosition(t,s){let a=t.range.start.y*this._bufferService.cols+t.range.start.x,l=t.range.end.y*this._bufferService.cols+t.range.end.x,u=s.y*this._bufferService.cols+s.x;return a<=u&&u<=l}_positionFromMouseEvent(t,s,a){let l=a.getCoords(t,s,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(t,s,a,l,u){return{x1:t,y1:s,x2:a,y2:l,cols:this._bufferService.cols,fg:u}}};Lf=jt([Ee(1,Vf),Ee(2,er),Ee(3,yi),Ee(4,u1)],Lf);function L5(t,s){return t.text===s.text&&t.range.start.x===s.range.start.x&&t.range.start.y===s.range.start.y&&t.range.end.x===s.range.end.x&&t.range.end.y===s.range.end.y}var H5=class extends D5{constructor(t={}){super(t),this._linkifier=this._register(new Sa),this.browser=T1,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Sa),this._onCursorMove=this._register(new Se),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new Se),this.onKey=this._onKey.event,this._onRender=this._register(new Se),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new Se),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new Se),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new Se),this.onBell=this._onBell.event,this._onFocus=this._register(new Se),this._onBlur=this._register(new Se),this._onA11yCharEmitter=this._register(new Se),this._onA11yTabEmitter=this._register(new Se),this._onWillOpen=this._register(new Se),this._setup(),this._decorationService=this._instantiationService.createInstance(B5),this._instantiationService.setService(Pl,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(NC),this._instantiationService.setService(u1,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(rf)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(s=>this.refresh((s==null?void 0:s.start)??0,(s==null?void 0:s.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(s=>this._reportWindowsOptions(s))),this._register(this._inputHandler.onColor(s=>this._handleColorEvent(s))),this._register(ui.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(ui.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(ui.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(ui.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(s=>this._afterResize(s.cols,s.rows))),this._register(wt(()=>{var s,a;this._customKeyEventHandler=void 0,(a=(s=this.element)==null?void 0:s.parentNode)==null||a.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}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}_handleColorEvent(t){if(this._themeService)for(let s of t){let a,l="";switch(s.index){case 256:a="foreground",l="10";break;case 257:a="background",l="11";break;case 258:a="cursor",l="12";break;default:a="ansi",l="4;"+s.index}switch(s.type){case 0:let u=yt.toColorRGB(a==="ansi"?this._themeService.colors.ansi[s.index]:this._themeService.colors[a]);this.coreService.triggerDataEvent(`${le.ESC}]${l};${w5(u)}${M1.ST}`);break;case 1:if(a==="ansi")this._themeService.modifyColors(d=>d.ansi[s.index]=Yt.toColor(...s.color));else{let d=a;this._themeService.modifyColors(f=>f[d]=Yt.toColor(...s.color))}break;case 2:this._themeService.restoreColor(s.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(t){t?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Kc,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(t){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(le.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var t;return(t=this.textarea)==null?void 0:t.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(le.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let t=this.buffer.ybase+this.buffer.y,s=this.buffer.lines.get(t);if(!s)return;let a=Math.min(this.buffer.x,this.cols-1),l=this._renderService.dimensions.css.cell.height,u=s.getWidth(a),d=this._renderService.dimensions.css.cell.width*u,f=this.buffer.y*this._renderService.dimensions.css.cell.height,p=a*this._renderService.dimensions.css.cell.width;this.textarea.style.left=p+"px",this.textarea.style.top=f+"px",this.textarea.style.width=d+"px",this.textarea.style.height=l+"px",this.textarea.style.lineHeight=l+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(He(this.element,"copy",s=>{this.hasSelection()&&K2(s,this._selectionService)}));let t=s=>q2(s,this.textarea,this.coreService,this.optionsService);this._register(He(this.textarea,"paste",t)),this._register(He(this.element,"paste",t)),j1?this._register(He(this.element,"mousedown",s=>{s.button===2&&Ag(s,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(He(this.element,"contextmenu",s=>{Ag(s,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),em&&this._register(He(this.element,"auxclick",s=>{s.button===1&&i1(s,this.textarea,this.screenElement)}))}_bindKeys(){this._register(He(this.textarea,"keyup",t=>this._keyUp(t),!0)),this._register(He(this.textarea,"keydown",t=>this._keyDown(t),!0)),this._register(He(this.textarea,"keypress",t=>this._keyPress(t),!0)),this._register(He(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(He(this.textarea,"compositionupdate",t=>this._compositionHelper.compositionupdate(t))),this._register(He(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(He(this.textarea,"input",t=>this._inputEvent(t),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(t){var u;if(!t)throw new Error("Terminal requires a parent element.");if(t.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((u=this.element)==null?void 0:u.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=t.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"),t.appendChild(this.element);let s=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),s.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(He(this.screenElement,"mousemove",d=>this.updateCursorStyle(d))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),s.appendChild(this.screenElement);let a=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ef.get()),R1||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._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>a.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(kC,this.textarea,t.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(Js,this._coreBrowserService),this._register(He(this.textarea,"focus",d=>this._handleTextAreaFocus(d))),this._register(He(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(kf,this._document,this._helperContainer),this._instantiationService.setService(Ic,this._charSizeService),this._themeService=this._instantiationService.createInstance(Df),this._instantiationService.setService(wa,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(Uc),this._instantiationService.setService(h1,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Nf,this.rows,this.screenElement)),this._instantiationService.setService(er,this._renderService),this._register(this._renderService.onRenderedViewportChange(d=>this._onRender.fire(d))),this.onResize(d=>this._renderService.resize(d.cols,d.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Sf,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Ef),this._instantiationService.setService(Vf,this._mouseService);let l=this._linkifier.value=this._register(this._instantiationService.createInstance(Lf,this.screenElement));this.element.appendChild(s);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),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._viewport=this._register(this._instantiationService.createInstance(yf,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(d=>{super.scrollLines(d,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Mf,this.element,this.screenElement,l)),this._instantiationService.setService(Z2,this._selectionService),this._register(this._selectionService.onRequestScrollLines(d=>this.scrollLines(d.amount,d.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(d=>this._renderService.handleSelectionChanged(d.start,d.end,d.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(d=>{this.textarea.value=d,this.textarea.focus(),this.textarea.select()})),this._register(ui.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var d;this._selectionService.refresh(),(d=this._viewport)==null||d.queueSync()})),this._register(this._instantiationService.createInstance(bf,this.screenElement)),this._register(He(this.element,"mousedown",d=>this._selectionService.handleMouseDown(d))),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(Kc,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",d=>this._handleScreenReaderModeOptionChange(d))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Hc,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",d=>{!this._overviewRulerRenderer&&d&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Hc,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Cf,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let t=this,s=this.element;function a(d){var _,w,g,y,T;let f=t._mouseService.getMouseReportCoords(d,t.screenElement);if(!f)return!1;let p,v;switch(d.overrideType||d.type){case"mousemove":v=32,d.buttons===void 0?(p=3,d.button!==void 0&&(p=d.button<3?d.button:3)):p=d.buttons&1?0:d.buttons&4?1:d.buttons&2?2:3;break;case"mouseup":v=0,p=d.button<3?d.button:3;break;case"mousedown":v=1,p=d.button<3?d.button:3;break;case"wheel":if(t._customWheelEventHandler&&t._customWheelEventHandler(d)===!1)return!1;let R=d.deltaY;if(R===0||t.coreMouseService.consumeWheelEvent(d,(y=(g=(w=(_=t._renderService)==null?void 0:_.dimensions)==null?void 0:w.device)==null?void 0:g.cell)==null?void 0:y.height,(T=t._coreBrowserService)==null?void 0:T.dpr)===0)return!1;v=R<0?0:1,p=4;break;default:return!1}return v===void 0||p===void 0||p>4?!1:t.coreMouseService.triggerMouseEvent({col:f.col,row:f.row,x:f.x,y:f.y,button:p,action:v,ctrl:d.ctrlKey,alt:d.altKey,shift:d.shiftKey})}let l={mouseup:null,wheel:null,mousedrag:null,mousemove:null},u={mouseup:d=>(a(d),d.buttons||(this._document.removeEventListener("mouseup",l.mouseup),l.mousedrag&&this._document.removeEventListener("mousemove",l.mousedrag)),this.cancel(d)),wheel:d=>(a(d),this.cancel(d,!0)),mousedrag:d=>{d.buttons&&a(d)},mousemove:d=>{d.buttons||a(d)}};this._register(this.coreMouseService.onProtocolChange(d=>{d?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(d)),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()),d&8?l.mousemove||(s.addEventListener("mousemove",u.mousemove),l.mousemove=u.mousemove):(s.removeEventListener("mousemove",l.mousemove),l.mousemove=null),d&16?l.wheel||(s.addEventListener("wheel",u.wheel,{passive:!1}),l.wheel=u.wheel):(s.removeEventListener("wheel",l.wheel),l.wheel=null),d&2?l.mouseup||(l.mouseup=u.mouseup):(this._document.removeEventListener("mouseup",l.mouseup),l.mouseup=null),d&4?l.mousedrag||(l.mousedrag=u.mousedrag):(this._document.removeEventListener("mousemove",l.mousedrag),l.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(He(s,"mousedown",d=>{if(d.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(d)))return a(d),l.mouseup&&this._document.addEventListener("mouseup",l.mouseup),l.mousedrag&&this._document.addEventListener("mousemove",l.mousedrag),this.cancel(d)})),this._register(He(s,"wheel",d=>{var f,p,v,_,w;if(!l.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(d)===!1)return!1;if(!this.buffer.hasScrollback){if(d.deltaY===0)return!1;if(t.coreMouseService.consumeWheelEvent(d,(_=(v=(p=(f=t._renderService)==null?void 0:f.dimensions)==null?void 0:p.device)==null?void 0:v.cell)==null?void 0:_.height,(w=t._coreBrowserService)==null?void 0:w.dpr)===0)return this.cancel(d,!0);let g=le.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(d.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(g,!0),this.cancel(d,!0)}}},{passive:!1}))}refresh(t,s){var a;(a=this._renderService)==null||a.refreshRows(t,s)}updateCursorStyle(t){var s;(s=this._selectionService)!=null&&s.shouldColumnSelect(t)?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(t,s){this._viewport?this._viewport.scrollLines(t):super.scrollLines(t,s),this.refresh(0,this.rows-1)}scrollPages(t){this.scrollLines(t*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(t){t&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(t){let s=t-this._bufferService.buffer.ydisp;s!==0&&this.scrollLines(s)}paste(t){t1(t,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(t){this._customKeyEventHandler=t}attachCustomWheelEventHandler(t){this._customWheelEventHandler=t}registerLinkProvider(t){return this._linkProviderService.registerLinkProvider(t)}registerCharacterJoiner(t){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let s=this._characterJoinerService.register(t);return this.refresh(0,this.rows-1),s}deregisterCharacterJoiner(t){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(t)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(t){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+t)}registerDecoration(t){return this._decorationService.registerDecoration(t)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(t,s,a){this._selectionService.setSelection(t,s,a)}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 t;(t=this._selectionService)==null||t.clearSelection()}selectAll(){var t;(t=this._selectionService)==null||t.selectAll()}selectLines(t,s){var a;(a=this._selectionService)==null||a.selectLines(t,s)}_keyDown(t){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(t)===!1)return!1;let s=this.browser.isMac&&this.options.macOptionIsMeta&&t.altKey;if(!s&&!this._compositionHelper.keydown(t))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!s&&(t.key==="Dead"||t.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let a=j5(t,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(t),a.type===3||a.type===2){let l=this.rows-1;return this.scrollLines(a.type===2?-l:l),this.cancel(t,!0)}if(a.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,t)||(a.cancel&&this.cancel(t,!0),!a.key)||t.key&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&t.key.length===1&&t.key.charCodeAt(0)>=65&&t.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((a.key===le.ETX||a.key===le.CR)&&(this.textarea.value=""),this._onKey.fire({key:a.key,domEvent:t}),this._showCursor(),this.coreService.triggerDataEvent(a.key,!0),!this.optionsService.rawOptions.screenReaderMode||t.altKey||t.ctrlKey)return this.cancel(t,!0);this._keyDownHandled=!0}_isThirdLevelShift(t,s){let a=t.isMac&&!this.options.macOptionIsMeta&&s.altKey&&!s.ctrlKey&&!s.metaKey||t.isWindows&&s.altKey&&s.ctrlKey&&!s.metaKey||t.isWindows&&s.getModifierState("AltGraph");return s.type==="keypress"?a:a&&(!s.keyCode||s.keyCode>47)}_keyUp(t){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(t)===!1)&&(U5(t)||this.focus(),this.updateCursorStyle(t),this._keyPressHandled=!1)}_keyPress(t){let s;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(t)===!1)return!1;if(this.cancel(t),t.charCode)s=t.charCode;else if(t.which===null||t.which===void 0)s=t.keyCode;else if(t.which!==0&&t.charCode!==0)s=t.which;else return!1;return!s||(t.altKey||t.ctrlKey||t.metaKey)&&!this._isThirdLevelShift(this.browser,t)?!1:(s=String.fromCharCode(s),this._onKey.fire({key:s,domEvent:t}),this._showCursor(),this.coreService.triggerDataEvent(s,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(t){if(t.data&&t.inputType==="insertText"&&(!t.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let s=t.data;return this.coreService.triggerDataEvent(s,!0),this.cancel(t),!0}return!1}resize(t,s){if(t===this.cols&&s===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(t,s)}_afterResize(t,s){var a;(a=this._charSizeService)==null||a.measure()}clear(){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 t=1;t<this.rows;t++)this.buffer.lines.push(this.buffer.getBlankLine(Pt));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var s;this.options.rows=this.rows,this.options.cols=this.cols;let t=this._customKeyEventHandler;this._setup(),super.reset(),(s=this._selectionService)==null||s.reset(),this._decorationService.reset(),this._customKeyEventHandler=t,this.refresh(0,this.rows-1)}clearTextureAtlas(){var t;(t=this._renderService)==null||t.clearTextureAtlas()}_reportFocus(){var t;(t=this.element)!=null&&t.classList.contains("focus")?this.coreService.triggerDataEvent(le.ESC+"[I"):this.coreService.triggerDataEvent(le.ESC+"[O")}_reportWindowsOptions(t){if(this._renderService)switch(t){case 0:let s=this._renderService.dimensions.css.canvas.width.toFixed(0),a=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${le.ESC}[4;${a};${s}t`);break;case 1:let l=this._renderService.dimensions.css.cell.width.toFixed(0),u=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${le.ESC}[6;${u};${l}t`);break}}cancel(t,s){if(!(!this.options.cancelEvents&&!s))return t.preventDefault(),t.stopPropagation(),!1}};function U5(t){return t.keyCode===16||t.keyCode===17||t.keyCode===18}var P5=class{constructor(){this._addons=[]}dispose(){for(let t=this._addons.length-1;t>=0;t--)this._addons[t].instance.dispose()}loadAddon(t,s){let a={instance:s,dispose:s.dispose,isDisposed:!1};this._addons.push(a),s.dispose=()=>this._wrappedAddonDispose(a),s.activate(t)}_wrappedAddonDispose(t){if(t.isDisposed)return;let s=-1;for(let a=0;a<this._addons.length;a++)if(this._addons[a]===t){s=a;break}if(s===-1)throw new Error("Could not dispose an addon that has not been loaded");t.isDisposed=!0,t.dispose.apply(t.instance),this._addons.splice(s,1)}},Y5=class{constructor(t){this._line=t}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(t,s){if(!(t<0||t>=this._line.length))return s?(this._line.loadCell(t,s),s):this._line.loadCell(t,new es)}translateToString(t,s,a){return this._line.translateToString(t,s,a)}},w0=class{constructor(t,s){this._buffer=t,this.type=s}init(t){return this._buffer=t,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(t){let s=this._buffer.lines.get(t);if(s)return new Y5(s)}getNullCell(){return new es}},K5=class extends Xe{constructor(t){super(),this._core=t,this._onBufferChange=this._register(new Se),this.onBufferChange=this._onBufferChange.event,this._normal=new w0(this._core.buffers.normal,"normal"),this._alternate=new w0(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)}},q5=class{constructor(t){this._core=t}registerCsiHandler(t,s){return this._core.registerCsiHandler(t,a=>s(a.toArray()))}addCsiHandler(t,s){return this.registerCsiHandler(t,s)}registerDcsHandler(t,s){return this._core.registerDcsHandler(t,(a,l)=>s(a,l.toArray()))}addDcsHandler(t,s){return this.registerDcsHandler(t,s)}registerEscHandler(t,s){return this._core.registerEscHandler(t,s)}addEscHandler(t,s){return this.registerEscHandler(t,s)}registerOscHandler(t,s){return this._core.registerOscHandler(t,s)}addOscHandler(t,s){return this.registerOscHandler(t,s)}},F5=class{constructor(t){this._core=t}register(t){this._core.unicodeService.register(t)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(t){this._core.unicodeService.activeVersion=t}},I5=["cols","rows"],Ms=0,V5=class extends Xe{constructor(t){super(),this._core=this._register(new H5(t)),this._addonManager=this._register(new P5),this._publicOptions={...this._core.options};let s=l=>this._core.options[l],a=(l,u)=>{this._checkReadonlyOptions(l),this._core.options[l]=u};for(let l in this._core.options){let u={get:s.bind(this,l),set:a.bind(this,l)};Object.defineProperty(this._publicOptions,l,u)}}_checkReadonlyOptions(t){if(I5.includes(t))throw new Error(`Option "${t}" 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 q5(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new F5(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 K5(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let t=this._core.coreService.decPrivateModes,s="none";switch(this._core.coreMouseService.activeProtocol){case"X10":s="x10";break;case"VT200":s="vt200";break;case"DRAG":s="drag";break;case"ANY":s="any";break}return{applicationCursorKeysMode:t.applicationCursorKeys,applicationKeypadMode:t.applicationKeypad,bracketedPasteMode:t.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:t.origin,reverseWraparoundMode:t.reverseWraparound,sendFocusMode:t.sendFocus,synchronizedOutputMode:t.synchronizedOutput,wraparoundMode:t.wraparound}}get options(){return this._publicOptions}set options(t){for(let s in t)this._publicOptions[s]=t[s]}blur(){this._core.blur()}focus(){this._core.focus()}input(t,s=!0){this._core.input(t,s)}resize(t,s){this._verifyIntegers(t,s),this._core.resize(t,s)}open(t){this._core.open(t)}attachCustomKeyEventHandler(t){this._core.attachCustomKeyEventHandler(t)}attachCustomWheelEventHandler(t){this._core.attachCustomWheelEventHandler(t)}registerLinkProvider(t){return this._core.registerLinkProvider(t)}registerCharacterJoiner(t){return this._checkProposedApi(),this._core.registerCharacterJoiner(t)}deregisterCharacterJoiner(t){this._checkProposedApi(),this._core.deregisterCharacterJoiner(t)}registerMarker(t=0){return this._verifyIntegers(t),this._core.registerMarker(t)}registerDecoration(t){return this._checkProposedApi(),this._verifyPositiveIntegers(t.x??0,t.width??0,t.height??0),this._core.registerDecoration(t)}hasSelection(){return this._core.hasSelection()}select(t,s,a){this._verifyIntegers(t,s,a),this._core.select(t,s,a)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(t,s){this._verifyIntegers(t,s),this._core.selectLines(t,s)}dispose(){super.dispose()}scrollLines(t){this._verifyIntegers(t),this._core.scrollLines(t)}scrollPages(t){this._verifyIntegers(t),this._core.scrollPages(t)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(t){this._verifyIntegers(t),this._core.scrollToLine(t)}clear(){this._core.clear()}write(t,s){this._core.write(t,s)}writeln(t,s){this._core.write(t),this._core.write(`\r
|
|
396
|
-
`,s)}paste(t){this._core.paste(t)}refresh(t,s){this._verifyIntegers(t,s),this._core.refresh(t,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(t){this._addonManager.loadAddon(this,t)}static get strings(){return{get promptLabel(){return ef.get()},set promptLabel(t){ef.set(t)},get tooMuchOutput(){return tf.get()},set tooMuchOutput(t){tf.set(t)}}}_verifyIntegers(...t){for(Ms of t)if(Ms===1/0||isNaN(Ms)||Ms%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...t){for(Ms of t)if(Ms&&(Ms===1/0||isNaN(Ms)||Ms%1!==0||Ms<0))throw new Error("This API only accepts positive integers")}};/**
|
|
397
|
-
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
398
|
-
* @license MIT
|
|
399
|
-
*
|
|
400
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
401
|
-
* @license MIT
|
|
402
|
-
*
|
|
403
|
-
* Originally forked from (with the author's permission):
|
|
404
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
405
|
-
* http://bellard.org/jslinux/
|
|
406
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
407
|
-
*/var X5=2,W5=1,G5=class{activate(t){this._terminal=t}dispose(){}fit(){let t=this.proposeDimensions();if(!t||!this._terminal||isNaN(t.cols)||isNaN(t.rows))return;let s=this._terminal._core;(this._terminal.rows!==t.rows||this._terminal.cols!==t.cols)&&(s._renderService.clear(),this._terminal.resize(t.cols,t.rows))}proposeDimensions(){var g;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let t=this._terminal._core._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let s=this._terminal.options.scrollback===0?0:((g=this._terminal.options.overviewRuler)==null?void 0:g.width)||14,a=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(a.getPropertyValue("height")),u=Math.max(0,parseInt(a.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),f={top:parseInt(d.getPropertyValue("padding-top")),bottom:parseInt(d.getPropertyValue("padding-bottom")),right:parseInt(d.getPropertyValue("padding-right")),left:parseInt(d.getPropertyValue("padding-left"))},p=f.top+f.bottom,v=f.right+f.left,_=l-p,w=u-v-s;return{cols:Math.max(X5,Math.floor(w/t.css.cell.width)),rows:Math.max(W5,Math.floor(_/t.css.cell.height))}}};const C0={background:"#141416",foreground:"#f5f5f7",cursor:"#f5f5f7",selectionBackground:"rgba(255,255,255,0.22)",black:"#1c1c1e",red:"#f87171",green:"#4ade80",yellow:"#facc15",blue:"#60a5fa",magenta:"#c084fc",cyan:"#22d3ee",white:"#e4e4e7",brightBlack:"#71717a",brightRed:"#fca5a5",brightGreen:"#86efac",brightYellow:"#fde047",brightBlue:"#93c5fd",brightMagenta:"#d8b4fe",brightCyan:"#67e8f9",brightWhite:"#ffffff"},k0={background:"#ffffff",foreground:"#18181b",cursor:"#18181b",selectionBackground:"rgba(0,0,0,0.16)",black:"#18181b",red:"#dc2626",green:"#16a34a",yellow:"#ca8a04",blue:"#2563eb",magenta:"#9333ea",cyan:"#0891b2",white:"#e4e4e7",brightBlack:"#71717a",brightRed:"#ef4444",brightGreen:"#22c55e",brightYellow:"#eab308",brightBlue:"#3b82f6",brightMagenta:"#a855f7",brightCyan:"#06b6d4",brightWhite:"#ffffff"},$5=({sessionId:t,theme:s,onExit:a})=>{const l=E.useRef(null),u=E.useRef(null),d=E.useRef(null);return E.useEffect(()=>{const f=l.current;if(!f)return;const p=new V5({cursorBlink:!0,fontSize:13,lineHeight:1.32,fontFamily:"'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace",theme:s==="light"?k0:C0,scrollback:4e3}),v=new G5;p.loadAddon(v),p.open(f),v.fit(),p.focus(),u.current=p;const _=window.location.protocol==="https:"?"wss:":"ws:",w=p2(),g=new WebSocket(`${_}//${window.location.host}/ws/terminal?desktop=${encodeURIComponent(w)}&sessionId=${encodeURIComponent(t)}&cols=${p.cols}&rows=${p.rows}`);d.current=g,g.onmessage=R=>{try{const I=JSON.parse(String(R.data));I.type==="output"&&typeof I.data=="string"?p.write(I.data):I.type==="exit"&&(p.writeln(`\r
|
|
408
|
-
\x1B[90m[Oturum sonlandı]\x1B[0m`),a==null||a())}catch{}},g.onclose=()=>{p.writeln(`\r
|
|
409
|
-
\x1B[90m[Bağlantı kapatıldı]\x1B[0m`)};const y=p.onData(R=>{g.readyState===WebSocket.OPEN&&g.send(JSON.stringify({type:"input",data:R}))}),T=new ResizeObserver(()=>{requestAnimationFrame(()=>{try{v.fit(),g.readyState===WebSocket.OPEN&&g.send(JSON.stringify({type:"resize",cols:p.cols,rows:p.rows}))}catch{}})});return T.observe(f),()=>{T.disconnect(),y.dispose(),g.close(),p.dispose(),u.current=null,d.current=null}},[t]),E.useEffect(()=>{u.current&&(u.current.options.theme=s==="light"?k0:C0)},[s]),c.jsx("div",{"data-testid":"terminal-window",onPointerDown:()=>{var f;return(f=u.current)==null?void 0:f.focus()},className:"w-full h-full p-2.5 overflow-hidden bg-[var(--os-bg)]",children:c.jsx("div",{ref:l,className:"w-full h-full"})})},Z5=({sessionId:t,viewId:s="main",appName:a,isFocused:l=!0,onTitleChange:u,onAppExit:d,onWindowOpened:f})=>{const p=E.useRef(null),v=E.useRef(null),_=E.useRef(null),w=E.useRef(!1),g=E.useRef(null),y=E.useRef(0),T=E.useRef(null),R=E.useRef({width:720,height:480}),I=E.useRef(!1),Z=E.useRef({width:0,height:0}),ue=Q0(),pe=E.useRef(ue);pe.current=ue;const be=E.useRef(u);be.current=u;const ee=E.useRef(d);ee.current=d;const me=E.useRef(f);me.current=f;const[ve,ae]=E.useState(!1),[ge,_e]=E.useState(null),[we,ye]=E.useState("default"),X=j=>{const z=_.current;z&&z.readyState===WebSocket.OPEN&&z.send(JSON.stringify(j))};E.useEffect(()=>{l&&X({type:"focus"})},[l]),E.useEffect(()=>{let j=!1;I.current=!1,Z.current={width:0,height:0};const z=window.location.protocol==="https:"?"wss:":"ws:",W=new WebSocket(`${z}//${window.location.host}/ws/app?sessionId=${encodeURIComponent(t)}&view=${encodeURIComponent(s)}`);W.binaryType="arraybuffer",_.current=W;const D=async ce=>{if(w.current){g.current=ce;return}w.current=!0;try{const C=new Blob([ce],{type:"image/jpeg"}),q=await createImageBitmap(C),he=v.current;if(he&&!j){(he.width!==q.width||he.height!==q.height)&&(he.width=q.width,he.height=q.height);const de=he.getContext("2d");de==null||de.drawImage(q,0,0),ae(!0)}q.close()}catch{}finally{w.current=!1;const C=g.current;C&&!j&&(g.current=null,D(C))}};return W.onopen=()=>{l&&X({type:"focus"})},W.onmessage=ce=>{var C,q,he,de,b,B;if(ce.data instanceof ArrayBuffer){const Y=ce.data;if(Y.byteLength<2)return;const G=new Uint8Array(Y,0,1)[0];G===1?D(new Uint8Array(Y,1)):G===2&&Zs.pushPcm16(Y.slice(1));return}try{const Y=JSON.parse(String(ce.data));if(Y.type==="title"&&typeof Y.title=="string")(C=be.current)==null||C.call(be,Y.title);else if(Y.type==="cursor"&&typeof Y.cursor=="string")ye(Y.cursor);else if(Y.type==="view_geometry"&&Y.width&&Y.height){const G=Math.round(Number(Y.width)),fe=Math.round(Number(Y.height));I.current=!0,Z.current={width:G,height:fe},R.current={width:G,height:fe},(q=pe.current)==null||q.resizeFrame(G,fe,{center:!!Y.initial})}else Y.type==="view_maximize"?(I.current=!0,(he=pe.current)==null||he.setMaximized(!0)):Y.type==="window_opened"&&typeof Y.view=="string"?(de=me.current)==null||de.call(me,{view:Y.view,title:String(Y.title||a),width:Number(Y.width)||900,height:Number(Y.height)||640}):Y.type==="app_exit"?(b=ee.current)==null||b.call(ee):Y.type==="error"&&Y.message?_e(String(Y.message)):Y.type==="clipboard"&&typeof Y.text=="string"&&((B=navigator.clipboard)==null||B.writeText(Y.text).catch(()=>{}))}catch{}},()=>{j=!0,W.close(),_.current=null}},[t,s]),E.useEffect(()=>{const j=p.current;if(!j)return;let z=null;const W=new ResizeObserver(D=>{var he;const ce=(he=D[0])==null?void 0:he.contentRect;if(!ce||ce.width<120||ce.height<120||!I.current)return;const C=Math.round(ce.width),q=Math.round(ce.height);Math.abs(C-Z.current.width)<=3&&Math.abs(q-Z.current.height)<=3||(R.current={width:C,height:q},z&&clearTimeout(z),z=setTimeout(()=>{Math.abs(C-Z.current.width)<=3&&Math.abs(q-Z.current.height)<=3||(Z.current={width:C,height:q},X({type:"resize",width:C,height:q}))},200))});return W.observe(j),()=>{W.disconnect(),z&&clearTimeout(z)}},[t,s]);const Q=(j,z)=>{const W=v.current;if(!W)return{x:0,y:0};const D=W.getBoundingClientRect(),ce=(W.width||R.current.width)/Math.max(1,D.width),C=(W.height||R.current.height)/Math.max(1,D.height);return{x:Math.max(0,Math.round((j-D.left)*ce)),y:Math.max(0,Math.round((z-D.top)*C))}},$=j=>j===2?"right":j===1?"middle":"left";return c.jsxs("div",{ref:p,"data-testid":"linux-app-window","data-app-session":t,"data-app-view":s,className:"relative w-full h-full overflow-hidden bg-[var(--os-bg)] select-none",children:[c.jsx("canvas",{ref:v,tabIndex:0,onContextMenu:j=>j.preventDefault(),onPointerDown:j=>{var D;Zs.ensureContext(),(D=v.current)==null||D.focus(),X({type:"focus"});const{x:z,y:W}=Q(j.clientX,j.clientY);if(j.pointerType==="touch"){T.current={lastY:j.clientY,moved:!1},X({type:"mousemove",x:z,y:W});return}X({type:"mousedown",x:z,y:W,button:$(j.button)})},onPointerMove:j=>{const z=performance.now();if(z-y.current<16)return;y.current=z;const{x:W,y:D}=Q(j.clientX,j.clientY);if(j.pointerType==="touch"&&T.current){const ce=T.current.lastY-j.clientY;Math.abs(ce)>4&&(T.current.moved=!0,T.current.lastY=j.clientY,X({type:"wheel",x:W,y:D,deltaY:ce*2.2,deltaX:0}));return}X({type:"mousemove",x:W,y:D})},onPointerUp:j=>{const{x:z,y:W}=Q(j.clientX,j.clientY);if(j.pointerType==="touch"&&T.current){const D=T.current.moved;T.current=null,D||(X({type:"mousedown",x:z,y:W,button:"left"}),X({type:"mouseup",x:z,y:W,button:"left"}));return}X({type:"mouseup",x:z,y:W,button:$(j.button)})},onWheel:j=>{j.preventDefault();const{x:z,y:W}=Q(j.clientX,j.clientY);X({type:"wheel",x:z,y:W,deltaX:j.deltaX,deltaY:j.deltaY})},onKeyDown:async j=>{if((j.ctrlKey||j.metaKey)&&j.key.toLowerCase()==="v"){j.preventDefault();try{const z=await navigator.clipboard.readText();z&&X({type:"clipboard_set",text:z})}catch{}setTimeout(()=>{X({type:"keydown",key:"Control",ctrlKey:!0}),X({type:"keydown",key:"v",ctrlKey:!0}),X({type:"keyup",key:"v",ctrlKey:!0}),X({type:"keyup",key:"Control",ctrlKey:!1})},35);return}(j.ctrlKey||j.metaKey)&&j.key.toLowerCase()==="c"&&setTimeout(()=>X({type:"clipboard_get"}),90),j.preventDefault(),X({type:"keydown",key:j.key,code:j.code,ctrlKey:j.ctrlKey,altKey:j.altKey,shiftKey:j.shiftKey,metaKey:j.metaKey})},onKeyUp:j=>{j.preventDefault(),X({type:"keyup",key:j.key,code:j.code,ctrlKey:j.ctrlKey,altKey:j.altKey,shiftKey:j.shiftKey,metaKey:j.metaKey})},style:{cursor:we},className:"w-full h-full block object-contain outline-none touch-none"}),!ve&&!ge&&c.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-[var(--os-bg)] text-[var(--os-text-muted)]",children:[c.jsx(Bl,{className:"w-6 h-6 animate-spin text-[var(--os-text)]"}),c.jsxs("div",{className:"text-xs font-medium text-[var(--os-text)]",children:[a," başlatılıyor..."]}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-subtle)]",children:"Linux çekirdeği üzerinde yerel pencere hazırlanıyor"})]}),ge&&c.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 p-6 text-center bg-[var(--os-bg)]",children:[c.jsx("div",{className:"text-xs font-semibold text-red-400",children:"Uygulama Başlatılamadı"}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)] max-w-md",children:ge})]})]})},Q5=({runtime:t,apps:s,allowInstall:a,onRefreshApps:l,onLaunchApp:u,onLaunchCustomCommand:d,onOpenTerminal:f,onOpenChromium:p})=>{const[v,_]=E.useState(null),[w,g]=E.useState(null),[y,T]=E.useState(""),[R,I]=E.useState("idle"),[Z,ue]=E.useState(""),[pe,be]=E.useState(""),[ee,me]=E.useState({});E.useEffect(()=>{if(!w)return;const _e=setInterval(async()=>{try{const we=await bn.getInstallJob(w);T(we.log),I(we.status),we.status!=="running"&&(clearInterval(_e),_(null),await l())}catch{clearInterval(_e),_(null)}},1e3);return()=>clearInterval(_e)},[w,l]);const ve=async(_e,we)=>{_(we),I("running"),T(`Kurulum başlatılıyor...
|
|
410
|
-
`);try{const ye=await bn.install(_e);g(ye.jobId)}catch(ye){I("error"),T(ye.message),_(null)}},ae=s.filter(_e=>_e.installed),ge=s.filter(_e=>!_e.installed);return c.jsxs("div",{className:"w-full h-full flex flex-col bg-[var(--os-surface)] text-[var(--os-text)] overflow-hidden",children:[c.jsxs("div",{className:"px-5 py-3.5 bg-[var(--os-surface-2)] border-b border-[var(--os-border)] flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-sm font-semibold text-[var(--os-text)]",children:"Linux Uygulamaları"}),c.jsxs("div",{className:"text-[11px] text-[var(--os-text-muted)] truncate mt-0.5",children:[(t==null?void 0:t.distro)||"Sunucu"," ·"," ",t!=null&&t.guiReady?"Yerel X11 GUI Motoru Hazır":t!=null&&t.isLinux?`Eksik paket: ${t.missingDeps.join(", ")}`:"Yerel Linux GUI motoru Linux sunucularda aktiftir"]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c.jsxs("button",{onClick:f,className:"px-3 py-1.5 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-xs font-medium text-[var(--os-text)] flex items-center gap-1.5 transition-colors",children:[c.jsx(I0,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Terminal"})]}),c.jsx("button",{onClick:()=>l(),title:"Yenile",className:"p-2 rounded-xl hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)] transition-colors",children:c.jsx(qf,{className:"w-4 h-4"})})]})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-5 space-y-6",children:[c.jsxs("section",{className:"space-y-2.5",children:[c.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-[var(--os-text-subtle)]",children:["Kurulu Uygulamalar (",ae.length+(p?1:0),")"]}),ae.length===0&&!p?c.jsx("div",{className:"p-4 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border)] text-xs text-[var(--os-text-muted)]",children:"Henüz kurulu yerel Linux GUI uygulaması bulunamadı. Aşağıdan Firefox, VS Code veya Antigravity kurabilirsiniz."}):c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:[p&&c.jsxs("div",{className:"p-3 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border)] flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-[var(--os-surface-3)] flex items-center justify-center shrink-0 overflow-hidden",children:c.jsx(Rl,{size:26})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-xs font-semibold text-[var(--os-text)] truncate",children:"Chromium"}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)] truncate",children:"Yerleşik HiDPI tarayıcı (Firefox’tan bağımsız)"})]}),c.jsx("div",{className:"flex items-center gap-1 shrink-0",children:c.jsxs("button",{onClick:()=>p(),"data-testid":"launch-app-chromium",className:"px-3 py-1.5 rounded-xl bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90 text-xs font-semibold flex items-center gap-1 transition-opacity",children:[c.jsx(kg,{className:"w-3 h-3"}),c.jsx("span",{children:"Aç"})]})})]}),ae.map(_e=>c.jsxs("div",{className:"p-3 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border)] flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-[var(--os-surface-3)] flex items-center justify-center shrink-0 overflow-hidden",children:_e.iconName&&!ee[_e.id]?c.jsx("img",{src:W0(_e.iconName),alt:_e.name,onError:()=>me(we=>({...we,[_e.id]:!0})),className:"w-7 h-7 object-contain"}):c.jsx(zc,{className:"w-5 h-5 text-[var(--os-text-secondary)]"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-xs font-semibold text-[var(--os-text)] truncate",children:_e.name}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)] truncate",children:_e.description})]}),c.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[["firefox","vscode","chrome","mousepad","gimp","vlc"].includes(_e.id)&&c.jsx("button",{onClick:()=>u(_e,{forceNew:!0}),disabled:!(t!=null&&t.guiReady),"data-testid":`launch-new-window-${_e.id}`,title:`${_e.name} — Yeni Pencere Aç`,className:"p-1.5 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] disabled:opacity-40 text-[var(--os-text)] transition-colors",children:c.jsx(Kf,{className:"w-3.5 h-3.5"})}),c.jsxs("button",{onClick:()=>u(_e),disabled:!(t!=null&&t.guiReady),"data-testid":`launch-app-${_e.id}`,className:"px-3 py-1.5 rounded-xl bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] hover:opacity-90 disabled:opacity-40 text-xs font-semibold flex items-center gap-1 transition-opacity",children:[c.jsx(kg,{className:"w-3 h-3"}),c.jsx("span",{children:"Aç"})]})]})]},_e.id))]})]}),ge.length>0&&c.jsxs("section",{className:"space-y-2.5",children:[c.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-[var(--os-text-subtle)]",children:"Tek Tıkla Kurulabilir"}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:ge.map(_e=>{const we=v===_e.id;return c.jsxs("div",{className:"p-3 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border)] flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-[var(--os-surface-3)] flex items-center justify-center shrink-0",children:c.jsx(zc,{className:"w-5 h-5 text-[var(--os-text-muted)]"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-xs font-semibold text-[var(--os-text)] truncate",children:_e.name}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)] truncate",children:_e.description})]}),c.jsxs("button",{onClick:()=>ve({appId:_e.id},_e.id),disabled:!a||!(t!=null&&t.isLinux)||!!v,className:"px-3 py-1.5 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] disabled:opacity-40 text-xs font-medium text-[var(--os-text)] flex items-center gap-1.5 shrink-0 transition-colors",children:[we?c.jsx(Bl,{className:"w-3.5 h-3.5 animate-spin"}):c.jsx(Al,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:we?"Kuruluyor":"Kur"})]})]},_e.id)})})]}),c.jsxs("section",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pt-2 border-t border-[var(--os-border)]",children:[c.jsxs("form",{onSubmit:_e=>{_e.preventDefault(),Z.trim()&&(ve({aptPackage:Z.trim()},"custom-apt"),ue(""))},className:"p-3.5 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border)] space-y-2",children:[c.jsx("div",{className:"text-xs font-medium text-[var(--os-text)]",children:"APT Paketi Kur"}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("input",{type:"text",value:Z,onChange:_e=>ue(_e.target.value),placeholder:"ör. xcalc, mousepad, inkscape",className:"flex-1 px-3 py-2 rounded-xl bg-[var(--os-surface)] border border-[var(--os-border)] focus:border-[var(--os-border-strong)] focus:outline-none text-xs text-[var(--os-text)] font-mono"}),c.jsx("button",{type:"submit",disabled:!a||!(t!=null&&t.isLinux)||!!v,className:"px-3 py-2 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] disabled:opacity-40 text-xs font-medium text-[var(--os-text)]",children:"Kur"})]})]}),c.jsxs("form",{onSubmit:_e=>{_e.preventDefault(),pe.trim()&&(d(pe.trim()),be(""))},className:"p-3.5 rounded-2xl bg-[var(--os-bg)] border border-[var(--os-border)] space-y-2",children:[c.jsx("div",{className:"text-xs font-medium text-[var(--os-text)]",children:"Linux GUI Komutu Çalıştır"}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("input",{type:"text",value:pe,onChange:_e=>be(_e.target.value),placeholder:"ör. firefox https://github.com",className:"flex-1 px-3 py-2 rounded-xl bg-[var(--os-surface)] border border-[var(--os-border)] focus:border-[var(--os-border-strong)] focus:outline-none text-xs text-[var(--os-text)] font-mono"}),c.jsxs("button",{type:"submit",disabled:!(t!=null&&t.guiReady),className:"px-3 py-2 rounded-xl bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] disabled:opacity-40 text-xs font-semibold flex items-center gap-1",children:[c.jsx(L0,{className:"w-3 h-3"}),c.jsx("span",{children:"Çalıştır"})]})]})]})]}),y&&c.jsxs("section",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium",children:[R==="running"?c.jsx(Bl,{className:"w-3.5 h-3.5 animate-spin"}):R==="done"?c.jsx(O0,{className:"w-3.5 h-3.5 text-emerald-500"}):null,c.jsx("span",{children:"Kurulum Çıktısı"})]}),c.jsx("pre",{className:"p-3.5 rounded-2xl bg-[#121214] text-neutral-200 border border-[var(--os-border)] text-[11px] font-mono max-h-48 overflow-auto whitespace-pre-wrap",children:y})]})]})]})},E0=["button","a","input","textarea","select",'[role="button"]','[role="menuitem"]','[role="textbox"]','[role="combobox"]','[role="tab"]',".menubar-menu-button",".command-center",".action-item",".window-appicon",".monaco-action-bar"].join(", ");function J5(t){if(!t)return{};const s=t.match(/(?:^|,)\s*width\s*=\s*(\d+)/i),a=t.match(/(?:^|,)\s*height\s*=\s*(\d+)/i);return{width:s?Number(s[1]):void 0,height:a?Number(a[1]):void 0}}const e3=({folderPath:t,directUrl:s,theme:a="dark",onOpenNewWindow:l})=>{const[u,d]=E.useState(s||null),[f,p]=E.useState("VS Code hazırlanıyor..."),[v,_]=E.useState(null),w=E.useRef(null),g=E.useRef(null),y=Q0(),T=E.useRef(y);T.current=y;const R=E.useRef(l);R.current=l;const I=E.useRef(a);E.useEffect(()=>{if(s){d(s);return}let pe=!1;bn.startVSCodeWeb(t,I.current).then(ee=>{pe||d(ee.url)}).catch(ee=>{pe||_(ee.message)});const be=setInterval(()=>{bn.vscodeStatus().then(ee=>{!pe&&ee.statusMessage&&p(ee.statusMessage)}).catch(()=>{})},1500);return()=>{pe=!0,clearInterval(be)}},[t,s]);const Z=E.useCallback(()=>{const pe=w.current;if(!pe)return;let be=null,ee=null;try{be=pe.contentDocument,ee=pe.contentWindow}catch{return}if(!be||!ee)return;const me=()=>{var ye;if(!be)return;if(be.head&&!be.getElementById("tamga-vscode-wco")){const X=be.createElement("style");X.id="tamga-vscode-wco",X.textContent=`
|
|
411
|
-
/* Reserve left slot inside VS Code's real custom titlebar for macOS traffic lights */
|
|
412
|
-
.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left {
|
|
413
|
-
padding-left: 72px !important;
|
|
414
|
-
}
|
|
415
|
-
.monaco-workbench .part.titlebar > .titlebar-container {
|
|
416
|
-
cursor: default;
|
|
417
|
-
}
|
|
418
|
-
`,be.head.appendChild(X)}const we=be.querySelector(".monaco-workbench .part.titlebar");if(we){const X=we.getBoundingClientRect();X.height>16&&((ye=T.current)==null||ye.setTitlebarMetrics(Math.max(0,Math.round(X.top)),Math.round(X.height)))}};me();const ve=new MutationObserver(()=>me());be.documentElement&&ve.observe(be.documentElement,{childList:!0,subtree:!0,attributes:!0});const ae=we=>{var $,j;if(($=T.current)==null||$.focusWindow(),we.button!==0)return;const ye=we.target;if(!ye||!ye.closest(".part.titlebar, .part.banner")||ye.closest(E0))return;we.preventDefault();const Q=pe.getBoundingClientRect();(j=T.current)==null||j.startExternalDrag({clientX:Q.left+we.clientX,clientY:Q.top+we.clientY,screenX:we.screenX,screenY:we.screenY,sourceWindow:ee})},ge=we=>{var X;const ye=we.target;ye&&ye.closest(".part.titlebar")&&(ye.closest(E0)||(we.preventDefault(),(X=T.current)==null||X.toggleMaximize()))},_e=ee.open.bind(ee);return ee.open=((we,ye,X)=>{const Q=we?String(we):"",$=J5(X);try{const j=Q?new URL(Q,window.location.href):null;if(R.current&&(!j||j.origin===window.location.origin&&j.pathname.startsWith("/vscode-web")))return R.current({url:j?`${j.pathname}${j.search}${j.hash}`:void 0,width:$.width,height:$.height}),null}catch{}return _e(we,ye,X)}),ee.resizeTo=(we,ye)=>{var X;we>200&&ye>160&&((X=T.current)==null||X.resizeFrame(we,ye))},ee.resizeBy=(we,ye)=>{var Q;const X=pe.getBoundingClientRect();(Q=T.current)==null||Q.resizeFrame(X.width+we,X.height+ye)},ee.addEventListener("mousedown",ae,!0),ee.addEventListener("dblclick",ge,!0),ee.addEventListener("resize",me),()=>{ve.disconnect();try{ee==null||ee.removeEventListener("mousedown",ae,!0),ee==null||ee.removeEventListener("dblclick",ge,!0),ee==null||ee.removeEventListener("resize",me),ee&&(ee.open=_e)}catch{}}},[]);E.useEffect(()=>()=>{var pe;(pe=g.current)==null||pe.call(g),g.current=null},[]),E.useEffect(()=>{u||y==null||y.setTitlebarMetrics(0,35)},[u,y]);const ue=pe=>{pe.button===0&&(y==null||y.startExternalDrag({clientX:pe.clientX,clientY:pe.clientY,screenX:pe.screenX,screenY:pe.screenY,sourceWindow:window}))};return v?c.jsxs("div",{className:"relative w-full h-full flex flex-col items-center justify-center p-6 text-center bg-[#181818] text-[#cccccc] gap-2",children:[c.jsx("div",{onMouseDown:ue,onDoubleClick:()=>y==null?void 0:y.toggleMaximize(),className:"absolute top-0 left-0 right-0 h-[35px] select-none"}),c.jsx("div",{className:"text-xs font-semibold text-red-400",children:"VS Code Başlatılamadı"}),c.jsx("div",{className:"text-[11px] opacity-75 max-w-md",children:v})]}):u?c.jsx("iframe",{ref:w,src:u,onLoad:()=>{var pe;(pe=g.current)==null||pe.call(g),g.current=Z()||null},title:"Visual Studio Code","data-testid":"vscode-web-iframe",allow:"clipboard-read; clipboard-write",className:"w-full h-full border-0 bg-[#181818]"}):c.jsxs("div",{className:"relative w-full h-full flex flex-col items-center justify-center gap-3 bg-[#181818] text-[#e5e5e5]",children:[c.jsx("div",{onMouseDown:ue,onDoubleClick:()=>y==null?void 0:y.toggleMaximize(),className:"absolute top-0 left-0 right-0 h-[35px] select-none"}),c.jsx(Bl,{className:"w-6 h-6 animate-spin"}),c.jsx("div",{className:"text-xs font-medium",children:f}),c.jsx("div",{className:"text-[11px] opacity-60",children:"Görüntü aktarımı olmadan %100 yerli DOM editörü açılıyor"})]})};function Xd(t){if(t.clientX||t.clientY)return{x:t.clientX,y:t.clientY};const s=t.currentTarget.getBoundingClientRect();return{x:s.left+s.width/2,y:s.top+s.height/2}}const t3=({windows:t,focusedWindowId:s,allNodes:a,telemetry:l,pingMs:u,notificationHistory:d,wallpaperId:f,customWallpaper:p,theme:v,brightness:_,volume:w,muted:g,currentDesktop:y,desktops:T,linuxApps:R,linuxGuiReady:I,useFirefoxIcon:Z,primaryBrowserLabel:ue,authEnabled:pe,onSwitchDesktop:be,onCreateDesktop:ee,onDeleteDesktop:me,onCopyDesktopLink:ve,onChangeBrightness:ae,onChangeVolume:ge,onToggleMute:_e,onSelectWallpaper:we,onTriggerWallpaperUpload:ye,onToggleTheme:X,onClearNotifications:Q,onOpenBrowser:$,onOpenTerminal:j,onOpenAppStore:z,onLaunchLinuxApp:W,onOpenFolder:D,onOpenNode:ce,onToggleWindowFromTaskbar:C,onLockScreen:q,onReboot:he,onLogout:de})=>{const[b,B]=E.useState(null),[Y,G]=E.useState(()=>new Date),[fe,ne]=E.useState(""),[A,J]=E.useState(""),[N,te]=E.useState(null),[ke,oe]=E.useState(()=>new Date),Ye=E.useRef(null);E.useEffect(()=>{const ie=setInterval(()=>G(new Date),1e3);return()=>clearInterval(ie)},[]),E.useEffect(()=>{const ie=$e=>{Ye.current&&!Ye.current.contains($e.target)&&B(null)};return window.addEventListener("pointerdown",ie),()=>window.removeEventListener("pointerdown",ie)},[]);const ze=ie=>{B($e=>$e===ie?null:ie)},De=E.useMemo(()=>R.filter(ie=>ie.installed),[R]),Te=E.useMemo(()=>{const ie=fe.trim().toLowerCase();return ie?De.filter($e=>$e.name.toLowerCase().includes(ie)||$e.description.toLowerCase().includes(ie)||$e.command.toLowerCase().includes(ie)):[]},[De,fe]),mt=E.useMemo(()=>{const ie=fe.trim().toLowerCase();return ie?a.filter($e=>!$e.path.startsWith("/.trash")&&($e.name.toLowerCase().includes(ie)||$e.extension.toLowerCase().includes(ie)||Cn($e).toLowerCase().includes(ie))).slice(0,6):[]},[a,fe]),_t=E.useMemo(()=>a.filter(ie=>!ie.isDir&&!ie.path.startsWith("/.trash")).sort((ie,$e)=>new Date($e.modifiedAt).getTime()-new Date(ie.modifiedAt).getTime()).slice(0,4),[a]),gt=E.useMemo(()=>{const ie=ke.getFullYear(),$e=ke.getMonth(),ir=(new Date(ie,$e,1).getDay()+6)%7,Hr=new Date(ie,$e+1,0).getDate(),Ze=[];for(let mi=0;mi<ir;mi++)Ze.push({day:null,isToday:!1});for(let mi=1;mi<=Hr;mi++){const At=mi===Y.getDate()&&$e===Y.getMonth()&&ie===Y.getFullYear();Ze.push({day:mi,isToday:At})}return Ze},[ke,Y]),bt=t.find(ie=>ie.kind==="browser"),lt=t.find(ie=>ie.kind==="terminal"),Nt=t.find(ie=>ie.kind==="app-store"),Ui=t.filter(ie=>ie.id!==(bt==null?void 0:bt.id)&&ie.id!==(lt==null?void 0:lt.id)&&ie.id!==(Nt==null?void 0:Nt.id)),ts=p?X0(p):void 0,Pi=Y.toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"}),Vt=Y.toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),is=Y.toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric"}),tr=Y.toLocaleDateString("tr-TR",{weekday:"long",day:"numeric",month:"long",year:"numeric"});return c.jsxs("div",{ref:Ye,className:"select-none",children:[b==="launcher"&&c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:"fixed bottom-20 left-4 z-[9980] w-[390px] max-w-[calc(100vw-32px)] rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] overflow-hidden text-[var(--os-text)]",children:[c.jsxs("div",{className:"p-4 space-y-4",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Ff,{className:"w-4 h-4 text-[var(--os-text-subtle)] absolute left-3.5 top-1/2 -translate-y-1/2"}),c.jsx("input",{type:"text",autoFocus:!0,value:fe,onChange:ie=>ne(ie.target.value),placeholder:"Uygulama veya dosya ara...",className:"w-full pl-10 pr-3 py-2.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] focus:border-[var(--os-border-strong)] focus:outline-none text-xs text-[var(--os-text)] placeholder:text-[var(--os-text-subtle)]"})]}),fe.trim()?c.jsxs("div",{className:"space-y-1 max-h-64 overflow-y-auto",children:["terminal bash shell konsol".includes(fe.toLowerCase())&&c.jsxs("button",{onClick:()=>{j(),B(null)},className:"w-full p-2.5 rounded-xl hover:bg-[var(--os-hover)] flex items-center gap-3 text-left transition-colors",children:[c.jsx(Ec,{size:28}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-medium text-[var(--os-text)]",children:"Terminal"}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)]",children:"Linux Kabuğu"})]})]}),Te.map(ie=>c.jsxs("button",{onClick:()=>{W(ie),B(null)},className:"w-full p-2.5 rounded-xl hover:bg-[var(--os-hover)] flex items-center gap-3 text-left transition-colors",children:[c.jsx(zc,{className:"w-5 h-5 text-[var(--os-text-secondary)] shrink-0"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-xs font-medium text-[var(--os-text)] truncate",children:ie.name}),c.jsx("div",{className:"text-[10px] text-[var(--os-text-muted)] truncate",children:ie.description})]})]},ie.id)),mt.map(ie=>c.jsxs("button",{onClick:()=>{ce(ie),B(null)},className:"w-full p-2 rounded-xl hover:bg-[var(--os-hover)] flex items-center gap-3 text-left transition-colors",children:[c.jsx(Ji,{node:ie,size:28}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"text-xs font-medium text-[var(--os-text)] truncate",children:ie.name}),c.jsx("div",{className:"text-[10px] text-[var(--os-text-subtle)] truncate",children:ie.path})]})]},ie.path))]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[c.jsxs("button",{onClick:()=>{$(),B(null)},className:"p-2.5 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] border border-[var(--os-border)] flex flex-col items-center gap-1.5 text-center transition-colors",children:[Z?c.jsx(Zd,{size:32}):c.jsx(Rl,{size:32}),c.jsx("span",{className:"text-[11px] font-medium text-[var(--os-text)] truncate w-full",children:ue})]}),c.jsxs("button",{onClick:()=>{j(),B(null)},className:"p-2.5 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] border border-[var(--os-border)] flex flex-col items-center gap-1.5 text-center transition-colors",children:[c.jsx(Ec,{size:32}),c.jsx("span",{className:"text-[11px] font-medium text-[var(--os-text)]",children:"Terminal"})]}),c.jsxs("button",{onClick:()=>{z(),B(null)},className:"p-2.5 rounded-xl bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] border border-[var(--os-border)] flex flex-col items-center gap-1.5 text-center transition-colors",children:[c.jsx(Qd,{size:32}),c.jsx("span",{className:"text-[11px] font-medium text-[var(--os-text)]",children:"Uygulamalar"})]})]}),I&&De.length>0&&c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[var(--os-text-subtle)] px-1",children:"Kurulu Linux Uygulamaları"}),c.jsx("div",{className:"grid grid-cols-2 gap-1.5 max-h-32 overflow-y-auto",children:De.map(ie=>c.jsxs("button",{onClick:()=>{W(ie),B(null)},className:"p-2 rounded-xl bg-[var(--os-bg)] hover:bg-[var(--os-surface-3)] border border-[var(--os-border)] flex items-center gap-2 text-left transition-colors",children:[ie.iconName?c.jsx("img",{src:W0(ie.iconName),alt:"",onError:$e=>{$e.currentTarget.style.display="none"},className:"w-5 h-5 object-contain shrink-0"}):c.jsx(zc,{className:"w-4 h-4 text-[var(--os-text-muted)] shrink-0"}),c.jsx("span",{className:"text-xs text-[var(--os-text)] truncate",children:ie.name})]},ie.id))})]}),c.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:[{label:"Disk",path:"/",icon:Y0},{label:"Masaüstü",path:"/Desktop",icon:q0},{label:"Belgeler",path:"/Documents",icon:gl},{label:"İndirilenler",path:"/Downloads",icon:gl},{label:"Projeler",path:"/Projects",icon:gl},{label:"Çöp Kutusu",path:"/.trash",icon:gl}].map(ie=>c.jsxs("button",{onClick:()=>{D(ie.path),B(null)},className:"p-2 rounded-xl bg-[var(--os-bg)] hover:bg-[var(--os-surface-3)] border border-[var(--os-border)] flex items-center gap-2 text-xs text-[var(--os-text-secondary)] transition-colors",children:[c.jsx(ie.icon,{className:"w-3.5 h-3.5 text-[var(--os-text-muted)] shrink-0"}),c.jsx("span",{className:"truncate",children:ie.label})]},ie.path))}),_t.length>0&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[var(--os-text-subtle)] px-1",children:"Son Dosyalar"}),_t.map(ie=>c.jsxs("button",{onClick:()=>{ce(ie),B(null)},className:"w-full px-2.5 py-1.5 rounded-lg hover:bg-[var(--os-hover)] flex items-center gap-2.5 text-left transition-colors",children:[c.jsx(Ji,{node:ie,size:22}),c.jsx("span",{className:"text-xs text-[var(--os-text-secondary)] truncate flex-1",children:ie.name})]},ie.path))]})]})]}),c.jsxs("div",{className:"px-4 py-2.5 bg-[var(--os-sidebar)] border-t border-[var(--os-border)] flex items-center justify-between text-xs",children:[c.jsxs("span",{className:"text-[var(--os-text-muted)] font-medium truncate",children:["TamgaVDesktop · ",y.name]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{onClick:()=>{B(null),q()},title:"Kilitle",className:"p-2 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)] transition-colors",children:c.jsx(qc,{className:"w-3.5 h-3.5"})}),c.jsx("button",{onClick:()=>{B(null),he()},title:"Yenile",className:"p-2 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)] transition-colors",children:c.jsx(JS,{className:"w-3.5 h-3.5"})}),pe&&de&&c.jsx("button",{onClick:()=>{B(null),de()},title:"Oturumu Kapat",className:"p-2 rounded-lg hover:bg-red-500/15 text-[var(--os-text-muted)] hover:text-red-500 transition-colors",children:c.jsx(LS,{className:"w-3.5 h-3.5"})})]})]})]}),b==="spaces"&&c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:"fixed bottom-20 left-16 z-[9980] w-80 max-w-[calc(100vw-32px)] rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-4 space-y-3.5 text-[var(--os-text)]",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold text-[var(--os-text)]",children:"Bağımsız Sanal Masaüstleri"}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)] mt-0.5",children:"Her masaüstünün dosya sistemi, profilleri ve oturumları izoledir."})]}),c.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto",children:T.map(ie=>{const $e=ie.id===y.id;return c.jsxs("div",{className:`flex items-center justify-between p-2.5 rounded-xl border transition-colors ${$e?"bg-[var(--os-surface-3)] border-[var(--os-border-strong)] text-[var(--os-text)]":"bg-[var(--os-bg)] border-[var(--os-border)] text-[var(--os-text-secondary)] hover:bg-[var(--os-hover)]"}`,children:[c.jsxs("button",{onClick:()=>{$e||be(ie.id),B(null)},className:"flex-1 text-left min-w-0",children:[c.jsx("div",{className:"text-xs font-medium truncate",children:ie.name}),c.jsxs("div",{className:"text-[10px] text-[var(--os-text-subtle)] font-mono truncate",children:["?desktop=",ie.id]})]}),c.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[c.jsx("button",{onClick:()=>{ve(ie.id),te(ie.id),setTimeout(()=>te(null),1500)},title:"Doğrudan masaüstü bağlantısını kopyala",className:"p-1.5 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)] transition-colors",children:N===ie.id?c.jsx(Pf,{className:"w-3.5 h-3.5 text-[var(--os-text)]"}):c.jsx(jS,{className:"w-3.5 h-3.5"})}),T.length>1&&c.jsx("button",{onClick:()=>me(ie.id),title:"Masaüstünü Sil",className:"p-1.5 rounded-lg hover:bg-red-500/15 text-[var(--os-text-subtle)] hover:text-red-500 transition-colors",children:c.jsx(gn,{className:"w-3.5 h-3.5"})})]})]},ie.id)})}),c.jsxs("form",{onSubmit:ie=>{ie.preventDefault(),ee(A.trim()||void 0),J(""),B(null)},className:"flex items-center gap-1.5 pt-2 border-t border-[var(--os-border)]",children:[c.jsx("input",{type:"text",value:A,onChange:ie=>J(ie.target.value),placeholder:"Yeni masaüstü adı...",className:"flex-1 px-3 py-2 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] focus:border-[var(--os-border-strong)] focus:outline-none text-xs text-[var(--os-text)] placeholder:text-[var(--os-text-subtle)]"}),c.jsxs("button",{type:"submit",className:"px-3 py-2 rounded-xl bg-[var(--os-accent-bg)] hover:opacity-90 text-[var(--os-accent-fg)] text-xs font-semibold flex items-center gap-1 shrink-0 transition-opacity",children:[c.jsx(Kf,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Oluştur"})]})]})]}),b==="controls"&&c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:"fixed bottom-20 right-4 z-[9980] w-[356px] max-w-[calc(100vw-32px)] rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-4 space-y-4 text-[var(--os-text)]",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)]",children:"Görünüm"}),c.jsxs("div",{className:"grid grid-cols-2 gap-1 p-1 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)]",children:[c.jsxs("button",{onClick:ie=>X("dark",Xd(ie)),"data-testid":"theme-dark-btn",className:`py-2 px-2.5 rounded-lg text-xs font-medium flex items-center justify-center gap-1.5 transition-all ${v==="dark"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] shadow-sm":"text-[var(--os-text-muted)] hover:text-[var(--os-text)]"}`,children:[c.jsx(Cg,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Koyu Tema"})]}),c.jsxs("button",{onClick:ie=>X("light",Xd(ie)),"data-testid":"theme-light-btn",className:`py-2 px-2.5 rounded-lg text-xs font-medium flex items-center justify-center gap-1.5 transition-all ${v==="light"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] shadow-sm":"text-[var(--os-text-muted)] hover:text-[var(--os-text)]"}`,children:[c.jsx(Td,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Açık Tema"})]})]})]}),c.jsxs("div",{className:"space-y-3 pt-3 border-t border-[var(--os-border)]",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between text-[11px] text-[var(--os-text-muted)]",children:[c.jsx("span",{children:"Ses"}),c.jsxs("span",{className:"font-mono",children:["%",g?0:w]})]}),c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("button",{onClick:_e,className:"p-1.5 rounded-lg bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text)] transition-colors",children:g||w===0?c.jsx(Eg,{className:"w-4 h-4 text-red-500"}):c.jsx(Gd,{className:"w-4 h-4"})}),c.jsx("input",{type:"range",min:0,max:100,value:g?0:w,onChange:ie=>ge(Number(ie.target.value)),style:{accentColor:"var(--os-accent-bg)"},className:"flex-1"})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between text-[11px] text-[var(--os-text-muted)]",children:[c.jsx("span",{children:"Ekran Parlaklığı"}),c.jsxs("span",{className:"font-mono",children:["%",_]})]}),c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("div",{className:"p-1.5 rounded-lg bg-[var(--os-surface-3)] text-[var(--os-text)]",children:c.jsx(Td,{className:"w-4 h-4"})}),c.jsx("input",{type:"range",min:45,max:100,value:_,onChange:ie=>ae(Number(ie.target.value)),style:{accentColor:"var(--os-accent-bg)"},className:"flex-1"})]})]})]}),c.jsxs("div",{className:"space-y-2 pt-3 border-t border-[var(--os-border)]",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[11px] text-[var(--os-text-muted)]",children:"Arka Plan"}),c.jsxs("button",{onClick:()=>ye(),"data-testid":"wallpaper-upload-btn",className:"text-[11px] font-medium text-[var(--os-text)] hover:opacity-80 flex items-center gap-1 transition-opacity",children:[c.jsx(Cc,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Resim Seç..."})]})]}),c.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:kc.map(ie=>c.jsx("button",{onClick:()=>we(ie.id),className:`px-1.5 py-2 rounded-xl text-[11px] font-medium border transition-colors whitespace-nowrap ${f===ie.id?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] border-transparent":"bg-[var(--os-bg)] border-[var(--os-border)] text-[var(--os-text-secondary)] hover:bg-[var(--os-surface-3)]"}`,children:ie.name},ie.id))}),ts?c.jsxs("div",{className:"flex items-center gap-1.5 pt-0.5",children:[c.jsxs("button",{onClick:()=>we("custom"),className:`flex-1 flex items-center gap-2.5 p-1.5 pr-3 rounded-xl border transition-all text-left ${f==="custom"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] border-transparent":"bg-[var(--os-bg)] border-[var(--os-border)] text-[var(--os-text-secondary)] hover:bg-[var(--os-surface-3)]"}`,children:[c.jsx("img",{src:ts,alt:"Özel Arka Plan",className:"w-10 h-7 rounded-lg object-cover shrink-0 border border-black/15"}),c.jsx("span",{className:"text-[11px] font-medium truncate",children:"Özel Resim"})]}),c.jsx("button",{onClick:()=>ye(),title:"Farklı Resim Seç",className:"px-2.5 py-2.5 rounded-xl bg-[var(--os-bg)] hover:bg-[var(--os-surface-3)] border border-[var(--os-border)] text-[var(--os-text-secondary)] transition-colors shrink-0",children:c.jsx(Cc,{className:"w-3.5 h-3.5"})})]}):c.jsxs("button",{onClick:()=>ye(),className:"w-full py-2 px-3 rounded-xl bg-[var(--os-bg)] hover:bg-[var(--os-surface-3)] border border-dashed border-[var(--os-border-strong)] text-[11px] font-medium text-[var(--os-text-secondary)] flex items-center justify-center gap-2 transition-colors",children:[c.jsx(Cc,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Cihazdan Arka Plan Resmi Seç"})]})]}),c.jsxs("div",{className:"pt-3 border-t border-[var(--os-border)] grid grid-cols-3 gap-2 text-[11px]",children:[c.jsxs("div",{className:"p-2 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)]",children:[c.jsx("div",{className:"text-[var(--os-text-subtle)]",children:"CPU"}),c.jsxs("div",{className:"font-mono font-semibold text-[var(--os-text)] mt-0.5",children:["%",(l==null?void 0:l.cpuPercent)??6]})]}),c.jsxs("div",{className:"p-2 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)]",children:[c.jsx("div",{className:"text-[var(--os-text-subtle)]",children:"Bellek"}),c.jsxs("div",{className:"font-mono font-semibold text-[var(--os-text)] mt-0.5",children:["%",(l==null?void 0:l.ramPercent)??35]})]}),c.jsxs("div",{className:"p-2 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)]",children:[c.jsx("div",{className:"text-[var(--os-text-subtle)]",children:"Gecikme"}),c.jsxs("div",{className:"font-mono font-semibold text-[var(--os-text)] mt-0.5",children:[u," ms"]})]})]}),c.jsxs("div",{className:"text-[10px] text-[var(--os-text-subtle)] flex justify-between",children:[c.jsxs("span",{children:["Çalışma Süresi: ",w2((l==null?void 0:l.uptimeSeconds)??0)]}),c.jsx("span",{children:(l==null?void 0:l.hostname)||`${(l==null?void 0:l.desktopsCount)??1} Masaüstü`})]})]}),b==="notifications"&&c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:"fixed bottom-20 right-4 z-[9980] w-80 max-w-[calc(100vw-32px)] rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-4 space-y-3 text-[var(--os-text)]",children:[c.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-[var(--os-border)]",children:[c.jsx("span",{className:"text-xs font-semibold",children:"Bildirimler"}),d.length>0&&c.jsx("button",{onClick:Q,className:"text-[11px] text-[var(--os-text-muted)] hover:text-[var(--os-text)] transition-colors",children:"Temizle"})]}),c.jsx("div",{className:"max-h-64 overflow-y-auto space-y-2",children:d.length===0?c.jsx("div",{className:"py-6 text-center text-xs text-[var(--os-text-subtle)]",children:"Bildirim yok."}):d.map(ie=>c.jsxs("div",{className:"p-2.5 rounded-xl bg-[var(--os-bg)] border border-[var(--os-border)] text-xs space-y-0.5",children:[c.jsx("div",{className:"font-medium text-[var(--os-text)]",children:ie.title}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)]",children:ie.message})]},ie.id))})]}),b==="calendar"&&c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:"fixed bottom-20 right-4 z-[9980] w-76 max-w-[calc(100vw-32px)] rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] p-4 space-y-4 text-[var(--os-text)]",children:[c.jsxs("div",{className:"pb-3 border-b border-[var(--os-border)]",children:[c.jsx("div",{className:"text-3xl font-light font-mono tracking-tight text-[var(--os-text)]",children:Vt}),c.jsx("div",{className:"text-xs text-[var(--os-text-muted)] capitalize mt-1",children:tr})]}),c.jsxs("div",{className:"space-y-2.5",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-xs font-semibold capitalize",children:ke.toLocaleDateString("tr-TR",{month:"long",year:"numeric"})}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{onClick:()=>oe(ie=>new Date(ie.getFullYear(),ie.getMonth()-1,1)),className:"p-1 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)]",children:c.jsx(tS,{className:"w-4 h-4"})}),c.jsx("button",{onClick:()=>oe(new Date),className:"px-2 py-0.5 rounded-md text-[10px] bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text)]",children:"Bugün"}),c.jsx("button",{onClick:()=>oe(ie=>new Date(ie.getFullYear(),ie.getMonth()+1,1)),className:"p-1 rounded-lg hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)]",children:c.jsx(Bc,{className:"w-4 h-4"})})]})]}),c.jsx("div",{className:"grid grid-cols-7 gap-1 text-center text-[10px] text-[var(--os-text-subtle)] font-medium",children:["Pzt","Sal","Çar","Per","Cum","Cmt","Paz"].map(ie=>c.jsx("div",{children:ie},ie))}),c.jsx("div",{className:"grid grid-cols-7 gap-1 text-center text-xs",children:gt.map((ie,$e)=>c.jsx("div",{className:`h-8 rounded-lg flex items-center justify-center ${ie.day?ie.isToday?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] font-bold":"text-[var(--os-text-secondary)] hover:bg-[var(--os-hover)]":""}`,children:ie.day||""},$e))})]})]}),c.jsxs("div",{style:{boxShadow:"var(--os-dock-shadow)"},className:"fixed bottom-3 left-4 right-4 h-[54px] z-[9950] rounded-2xl bg-[var(--os-dock)] backdrop-blur-md border border-[var(--os-border-strong)] px-3 flex items-center justify-between gap-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[c.jsx("button",{onClick:()=>ze("launcher"),"data-testid":"dock-launcher-btn",title:"Menü",className:`h-10 w-10 rounded-xl flex items-center justify-center transition-colors shrink-0 ${b==="launcher"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)]":"hover:bg-[var(--os-hover)] text-[var(--os-text)]"}`,children:c.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-xs bg-current"}),c.jsx("span",{className:"w-1.5 h-1.5 rounded-xs bg-current"}),c.jsx("span",{className:"w-1.5 h-1.5 rounded-xs bg-current"}),c.jsx("span",{className:"w-1.5 h-1.5 rounded-xs bg-current"})]})}),c.jsxs("button",{onClick:()=>ze("spaces"),title:"Sanal Masaüstleri",className:`h-10 px-3 rounded-xl flex items-center gap-2 text-xs font-medium transition-colors shrink-0 ${b==="spaces"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)]":"bg-[var(--os-surface-3)] hover:bg-[var(--os-surface-4)] text-[var(--os-text)]"}`,children:[c.jsx(MS,{className:"w-3.5 h-3.5 shrink-0"}),c.jsx("span",{className:"hidden sm:inline max-w-[110px] truncate",children:y.name})]}),c.jsx("div",{className:"h-5 w-[1px] bg-[var(--os-border-strong)] mx-1 shrink-0"}),c.jsxs("button",{onClick:()=>{bt?C(bt.id):$()},"data-testid":"dock-browser-btn",title:ue,className:`relative h-10 px-2.5 rounded-xl flex items-center gap-2 transition-colors shrink-0 ${bt&&!bt.minimized&&s===bt.id?"bg-[var(--os-active)] text-[var(--os-text)]":"hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)]"}`,children:[Z?c.jsx(Zd,{size:23}):c.jsx(Rl,{size:23}),c.jsx("span",{className:"text-xs font-medium hidden lg:inline",children:ue}),bt&&c.jsx("span",{className:`absolute bottom-1 left-1/2 -translate-x-1/2 h-1 rounded-full ${!bt.minimized&&s===bt.id?"w-4 bg-[var(--os-accent-bg)]":"w-1.5 bg-[var(--os-text-subtle)]"}`})]}),c.jsxs("button",{onClick:()=>{lt?C(lt.id):j()},"data-testid":"dock-terminal-btn",title:"Terminal",className:`relative h-10 px-2.5 rounded-xl flex items-center gap-2 transition-colors shrink-0 ${lt&&!lt.minimized&&s===lt.id?"bg-[var(--os-active)] text-[var(--os-text)]":"hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)]"}`,children:[c.jsx(Ec,{size:23}),c.jsx("span",{className:"text-xs font-medium hidden lg:inline",children:"Terminal"}),lt&&c.jsx("span",{className:`absolute bottom-1 left-1/2 -translate-x-1/2 h-1 rounded-full ${!lt.minimized&&s===lt.id?"w-4 bg-[var(--os-accent-bg)]":"w-1.5 bg-[var(--os-text-subtle)]"}`})]}),c.jsxs("button",{onClick:()=>{Nt?C(Nt.id):z()},"data-testid":"dock-apps-btn",title:"Uygulamalar",className:`relative h-10 px-2.5 rounded-xl flex items-center gap-2 transition-colors shrink-0 ${Nt&&!Nt.minimized&&s===Nt.id?"bg-[var(--os-active)] text-[var(--os-text)]":"hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)]"}`,children:[c.jsx(Qd,{size:23}),c.jsx("span",{className:"text-xs font-medium hidden xl:inline",children:"Uygulamalar"}),Nt&&c.jsx("span",{className:`absolute bottom-1 left-1/2 -translate-x-1/2 h-1 rounded-full ${!Nt.minimized&&s===Nt.id?"w-4 bg-[var(--os-accent-bg)]":"w-1.5 bg-[var(--os-text-subtle)]"}`})]}),c.jsx("div",{className:"flex items-center gap-1 overflow-x-auto no-scrollbar min-w-0",children:Ui.map(ie=>{const $e=!ie.minimized&&s===ie.id;return c.jsxs("button",{onClick:()=>C(ie.id),className:`relative h-10 px-3 rounded-xl flex items-center gap-2 max-w-[165px] shrink-0 text-xs transition-colors ${$e?"bg-[var(--os-active)] text-[var(--os-text)]":"hover:bg-[var(--os-hover)] text-[var(--os-text-muted)] hover:text-[var(--os-text)]"}`,children:[ie.kind==="terminal"?c.jsx(I0,{className:"w-4 h-4 shrink-0"}):ie.kind==="linux-app"||ie.kind==="vscode"?c.jsx(Fb,{className:"w-4 h-4 shrink-0"}):ie.kind==="app-store"?c.jsx(Yf,{className:"w-4 h-4 shrink-0"}):c.jsx(gl,{className:"w-4 h-4 shrink-0"}),c.jsx("span",{className:"truncate",children:ie.title}),c.jsx("span",{className:`absolute bottom-1 left-1/2 -translate-x-1/2 h-1 rounded-full ${$e?"w-3.5 bg-[var(--os-accent-bg)]":"w-1.5 bg-[var(--os-text-subtle)]"}`})]},ie.id)})})]}),c.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[c.jsx("button",{onClick:ie=>X(v==="dark"?"light":"dark",Xd(ie)),"data-testid":"dock-theme-toggle",title:v==="dark"?"Açık Temaya Geç":"Koyu Temaya Geç",className:"h-10 w-9 rounded-xl flex items-center justify-center hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)] hover:text-[var(--os-text)] transition-colors",children:v==="dark"?c.jsx(Td,{className:"w-4 h-4"}):c.jsx(Cg,{className:"w-4 h-4"})}),c.jsx("button",{onClick:_e,title:g?"Sesi Aç":"Sessize Al",className:"h-10 w-9 rounded-xl flex items-center justify-center hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)] hover:text-[var(--os-text)] transition-colors",children:g||w===0?c.jsx(Eg,{className:"w-4 h-4 text-red-500"}):c.jsx(Gd,{className:"w-4 h-4"})}),c.jsx("button",{onClick:()=>ze("controls"),"data-testid":"dock-controls-btn",title:"Kontrol Merkezi",className:`h-10 px-2.5 rounded-xl flex items-center gap-2 text-xs transition-colors ${b==="controls"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)]":"hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)] hover:text-[var(--os-text)]"}`,children:c.jsx(a2,{className:"w-4 h-4"})}),c.jsxs("button",{onClick:()=>ze("notifications"),title:"Bildirimler",className:`relative h-10 w-9 rounded-xl flex items-center justify-center transition-colors ${b==="notifications"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)]":"hover:bg-[var(--os-hover)] text-[var(--os-text-secondary)] hover:text-[var(--os-text)]"}`,children:[c.jsx(Qb,{className:"w-4 h-4"}),d.length>0&&c.jsx("span",{className:"absolute top-2 right-2 w-1.5 h-1.5 rounded-full bg-[var(--os-accent-bg)]"})]}),c.jsxs("button",{onClick:()=>ze("calendar"),title:"Saat ve Takvim",className:`h-10 px-3 rounded-xl flex flex-col items-end justify-center leading-tight transition-colors ${b==="calendar"?"bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)]":"hover:bg-[var(--os-hover)] text-[var(--os-text)]"}`,children:[c.jsx("span",{className:"text-xs font-semibold font-mono",children:Pi}),c.jsx("span",{className:"text-[10px] opacity-65 font-mono",children:is})]})]})]})]})},i3={positions:{},trashOrigins:{},preferences:{wallpaper:"mono-peaks",theme:"dark",iconSize:"md",autoArrange:!1,sortBy:"name"}};function s3(){return typeof window>"u"?"main":new URLSearchParams(window.location.search).get("desktop")||"main"}function r3(){const[t,s]=E.useState(!1),[a,l]=E.useState({enabled:!1,authenticated:!0,serverName:"TamgaVDesktop"}),[u,d]=E.useState(()=>{const S=s3();return jd(S),S}),[f,p]=E.useState({id:u,name:"Masaüstü 1",createdAt:new Date().toISOString()}),[v,_]=E.useState([f]),[w,g]=E.useState(null),[y,T]=E.useState([]),[R,I]=E.useState(!0),[Z,ue]=E.useState(!1),[pe,be]=E.useState(()=>new Date),[ee,me]=E.useState([]),[ve,ae]=E.useState(i3),[ge,_e]=E.useState([]),[we,ye]=E.useState(null),[X,Q]=E.useState(null),[$,j]=E.useState([]),z=E.useRef($);z.current=$;const[W,D]=E.useState(null),[ce,C]=E.useState(null),q=E.useRef(20),[he,de]=E.useState(null),[b,B]=E.useState(null),Y=E.useRef(null),G=E.useRef(null),fe=E.useRef(null),[ne,A]=E.useState("/Desktop"),J=E.useRef(null),N=E.useRef([]),te=E.useRef(new Set),ke=E.useRef(null),[oe,Ye]=E.useState([]),[ze,De]=E.useState(null),[Te,mt]=E.useState("default"),[_t,gt]=E.useState(null),[bt,lt]=E.useState(2),Nt=t&&(!a.enabled||a.authenticated),[Ui,ts]=E.useState(100),[Pi,Vt]=E.useState(85),[is,tr]=E.useState(!1),[ie,$e]=E.useState([]),[Mn,ir]=E.useState([]);E.useEffect(()=>{Zs.setVolume(Pi,is)},[Pi,is]);const Hr=E.useCallback(S=>(te.current.add(S),ke.current&&S(ke.current),()=>{te.current.delete(S)}),[]),Ze=E.useCallback((S,O,K="info",xe,Be)=>{const Oe={id:`toast-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:S,message:O,kind:K,createdAt:Date.now(),actionLabel:xe,onAction:Be};$e(Fe=>[...Fe.slice(-2),Oe]),ir(Fe=>[Oe,...Fe].slice(0,25)),setTimeout(()=>{$e(Fe=>Fe.filter(je=>je.id!==Oe.id))},4e3)},[]),mi=E.useCallback(async()=>{try{const S=await xt.getSnapshot();me(S.nodes),ae(S.meta),S.desktop&&p(S.desktop),S.desktops&&_(S.desktops)}catch{}},[]),At=E.useCallback(async()=>{try{const S=await bn.list();g(S.runtime),T(S.apps),I(S.allowInstall)}catch{}},[]);E.useEffect(()=>{$d.status().then(S=>{l(S),s(!0)}).catch(()=>{s(!0)})},[]),E.useEffect(()=>{jd(u);const S=new URL(window.location.href);u==="main"?S.searchParams.delete("desktop"):S.searchParams.set("desktop",u),window.history.replaceState({},"",S.toString()),Nt&&(mi(),At())},[u,Nt,mi,At]);const Wc=E.useCallback(async()=>{try{await $d.logout()}catch{}j([]),D(null),l(S=>({...S,authenticated:!1}))},[]);E.useEffect(()=>{if(!Z)return;const S=setInterval(()=>be(new Date),1e3);return()=>clearInterval(S)},[Z]);const Ur=E.useCallback(S=>{var K;const O=JSON.stringify(S);((K=J.current)==null?void 0:K.readyState)===WebSocket.OPEN?J.current.send(O):N.current.push(O)},[]),Dn=E.useCallback(S=>{const O=++q.current;j(K=>K.map(xe=>xe.id===S?{...xe,minimized:!1,zIndex:O}:xe)),D(S)},[]),Mi=E.useCallback(S=>{const O=++q.current;let K="";j(xe=>{const Be=xe.find(Bt=>Bt.kind==="folder"&&Bt.folderPath===S);if(Be)return K=Be.id,xe.map(Bt=>Bt.id===Be.id?{...Bt,minimized:!1,zIndex:O}:Bt);const Oe=xe.length%5*24,Fe=window.innerWidth,je=window.innerHeight-76,Ue=Math.min(900,Fe-36),nt=Math.min(580,je-36);return K=`win-folder-${Date.now()}`,[...xe,{id:K,kind:"folder",title:xn(S,S.split("/").filter(Boolean).pop()||"Klasör"),folderPath:S,x:Math.max(18,Math.round((Fe-Ue)/2)+Oe-24),y:Math.max(18,Math.round((je-nt)/2)+Oe-18),width:Ue,height:nt,minimized:!1,maximized:!1,zIndex:O}]}),K&&D(K)},[]),Pr=E.useCallback(S=>{Zs.ensureContext();const O=++q.current,K="win-chromium-main";j(xe=>{const Be=xe.find(nt=>nt.kind==="browser");if(Be)return xe.map(nt=>nt.id===Be.id?{...nt,minimized:!1,zIndex:O}:nt);const Oe=window.innerWidth,Fe=window.innerHeight-76,je=Math.min(1160,Oe-36),Ue=Math.min(730,Fe-28);return[...xe,{id:K,kind:"browser",title:"Chromium",x:Math.max(18,Math.round((Oe-je)/2)),y:Math.max(18,Math.round((Fe-Ue)/2)),width:je,height:Ue,minimized:!1,maximized:!1,zIndex:O}]}),D(K),S&&Ur({type:"browser_new_tab",url:S})},[Ur]),Tn=E.useCallback(()=>{const S=++q.current,O=`term-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,K=`win-${O}`,xe=window.innerWidth,Be=window.innerHeight-76,Oe=Math.min(820,xe-36),Fe=Math.min(520,Be-36);j(je=>{const Ue=je.length%5*24;return[...je,{id:K,kind:"terminal",title:"Terminal",terminalSessionId:O,x:Math.max(18,Math.round((xe-Oe)/2)+Ue-20),y:Math.max(18,Math.round((Be-Fe)/2)+Ue-20),width:Oe,height:Fe,minimized:!1,maximized:!1,zIndex:S}]}),D(K)},[]),ql=E.useCallback(()=>{const S=++q.current,O="win-app-store";j(K=>{if(K.find(Ue=>Ue.id===O))return K.map(Ue=>Ue.id===O?{...Ue,minimized:!1,zIndex:S}:Ue);const Be=window.innerWidth,Oe=window.innerHeight-76,Fe=Math.min(840,Be-36),je=Math.min(600,Oe-36);return[...K,{id:O,kind:"app-store",title:"Uygulamalar",x:Math.max(18,Math.round((Be-Fe)/2)),y:Math.max(18,Math.round((Oe-je)/2)),width:Fe,height:je,minimized:!1,maximized:!1,zIndex:S}]}),D(O),At()},[At]),ka=E.useCallback(S=>{const O=window.innerWidth,K=window.innerHeight-76,xe=Math.min((S==null?void 0:S.width)||1160,O-36),Be=Math.min((S==null?void 0:S.height)||720,K-32),Oe=++q.current;if(!(S!=null&&S.forceNew)&&!(S!=null&&S.url)){const je=z.current.find(Ue=>Ue.kind==="vscode");if(je){j(Ue=>Ue.map(nt=>nt.id===je.id?{...nt,minimized:!1,zIndex:Oe}:nt)),D(je.id);return}}const Fe=!(S!=null&&S.forceNew)&&!(S!=null&&S.url)?"win-vscode-main":`win-vscode-${Date.now()}-${Math.random().toString(36).slice(2,5)}`;j(je=>{const Ue=je.filter(nt=>nt.kind==="vscode").length%5*26;return[...je,{id:Fe,kind:"vscode",title:"Visual Studio Code",folderPath:(S==null?void 0:S.folderPath)||"/Projects",vscodeUrl:S==null?void 0:S.url,x:Math.max(18,Math.round((O-xe)/2)+Ue),y:Math.max(18,Math.round((K-Be)/2)+Ue),width:xe,height:Be,minimized:!1,maximized:!1,zIndex:Oe}]}),D(Fe)},[]),Bs=E.useCallback(async S=>{var je;Zs.ensureContext();const O=window.innerWidth,K=window.innerHeight-76,xe=Math.max(960,O-36),Be=Math.max(600,K-32-42),Oe=Math.min(740,O-36),Fe=Math.min(520,K-32);if(S.appId==="vscode"||((je=S.command)==null?void 0:je.trim())==="code"){ka({folderPath:"/Projects",forceNew:S.forceNew});return}try{const Ue=await bn.launch({...S,width:Oe,height:Fe-42,viewportWidth:xe,viewportHeight:Be}),nt=z.current.some(ns=>ns.kind==="linux-app"&&ns.appSessionId===Ue.sessionId);if(Ue.openedAsExtraWindow&&nt)return;const Bt=++q.current,Rs=`win-linux-${Ue.sessionId}-main`;j(ns=>{const Os=ns.length%4*20;return[...ns,{id:Rs,kind:"linux-app",title:Ue.title||Ue.appName,appSessionId:Ue.sessionId,appViewId:"main",appId:Ue.appId,x:Math.max(18,Math.round((O-Oe)/2)+Os-16),y:Math.max(18,Math.round((K-Fe)/2)+Os-16),width:Oe,height:Fe,minimized:!1,maximized:!1,zIndex:Bt}]}),D(Rs)}catch(Ue){Ze("Uygulama Başlatılamadı",Ue.message,"error")}},[Ze,ka]),ii=E.useCallback(S=>{Pr(S)},[Pr]),fs=E.useCallback(S=>{const O=++q.current,K=`win-prop-${S.path}`;j(xe=>xe.find(Oe=>Oe.id===K)?xe.map(Oe=>Oe.id===K?{...Oe,minimized:!1,zIndex:O}:Oe):[...xe,{id:K,kind:"properties",title:`${xn(S.path,S.name)} — Bilgi`,targetNodePath:S.path,x:Math.max(24,Math.round(window.innerWidth/2-200)),y:Math.max(24,Math.round((window.innerHeight-76)/2-210)),width:400,height:420,minimized:!1,maximized:!1,zIndex:O}]),D(K)},[]);E.useEffect(()=>{if(!Nt)return;let S=!1,O=null,K=null;ke.current=null;const xe=()=>{if(S)return;const Be=window.location.protocol==="https:"?"wss:":"ws:",Oe=new WebSocket(`${Be}//${window.location.host}/ws?desktop=${encodeURIComponent(u)}`);Oe.binaryType="arraybuffer",J.current=Oe,Oe.onopen=()=>{for(;N.current.length>0;){const Fe=N.current.shift();Fe&&Oe.send(Fe)}Oe.send(JSON.stringify({type:"ping",ts:performance.now()})),K=setInterval(()=>{Oe.readyState===WebSocket.OPEN&&Oe.send(JSON.stringify({type:"ping",ts:performance.now()}))},4500)},Oe.onmessage=Fe=>{if(Fe.data instanceof ArrayBuffer){const je=Fe.data;if(je.byteLength<2)return;const Ue=new Uint8Array(je,0,1)[0];if(Ue===1){const nt=new Uint8Array(je,1);ke.current=nt;for(const Bt of te.current)Bt(nt)}else Ue===2&&Zs.pushPcm16(je.slice(1));return}try{const je=JSON.parse(String(Fe.data));switch(je.type){case"tabs_state":Ye(je.tabs||[]),De(je.activeTabId||null);break;case"browser_cursor":mt(String(je.cursor||"default"));break;case"telemetry":gt(je.data);break;case"vfs_snapshot":je.snapshot&&(me(je.snapshot.nodes),ae(je.snapshot.meta));break;case"download_complete":Ze("İndirme Tamamlandı",`${je.fileName} İndirilenler klasörüne kaydedildi.`,"success","Aç",()=>Mi("/Downloads"));break;case"browser_error":Ze("Tarayıcı",String(je.message||""),"warning");break;case"pong":typeof je.ts=="number"&<(Math.max(1,Math.round(performance.now()-je.ts)));break}}catch{}},Oe.onclose=()=>{K&&clearInterval(K),S||(O=setTimeout(xe,1200))}};return xe(),()=>{var Be;S=!0,K&&clearInterval(K),O&&clearTimeout(O),(Be=J.current)==null||Be.close()}},[u,Nt,Ze,Mi]);const si=E.useCallback(S=>{j([]),D(null),_e([]),ye(null),de(null),jd(S),d(S)},[]),Gc=async S=>{try{const O=await xt.createDesktop(S);_(O.desktops),si(O.desktop.id),Ze("Yeni Masaüstü Hazır",`${O.desktop.name} oluşturuldu.`,"success")}catch(O){Ze("Hata",O.message,"error")}},$c=async S=>{try{const O=await xt.deleteDesktop(S);_(O.desktops),u===S&&O.desktops[0]&&si(O.desktops[0].id)}catch(O){Ze("Silinemedi",O.message,"error")}},Zc=S=>{var K;const O=new URL(window.location.origin+window.location.pathname);O.searchParams.set("desktop",S),(K=navigator.clipboard)==null||K.writeText(O.toString()).catch(()=>{}),Ze("Bağlantı Kopyalandı",`${O.toString()} panoya kopyalandı.`,"info")},ms=E.useMemo(()=>ee.filter(S=>S.parentPath==="/Desktop"),[ee]),Yr=E.useMemo(()=>{var S;return((S=ee.find(O=>O.path==="/.trash"))==null?void 0:S.childCount)??0},[ee]),ss=E.useCallback(S=>{S.isDir?Mi(S.path):Pr(`file://${S.path}`)},[Mi,Pr]),_s=async(S,O)=>{try{const K=await xt.createFolder(S,"Yeni Klasör",O);me(K.snapshot.nodes),ae(K.snapshot.meta),ye(K.node.path),S==="/Desktop"&&_e([K.node.path])}catch(K){Ze("Hata",K.message,"error")}},Kr=async(S,O,K)=>{try{const xe=await xt.createFile(S,O,void 0,K);me(xe.snapshot.nodes),ae(xe.snapshot.meta),S==="/Desktop"&&_e([xe.node.path])}catch(xe){Ze("Hata",xe.message,"error")}},sr=async(S,O)=>{try{const K=await xt.rename(S,O);me(K.snapshot.nodes),ae(K.snapshot.meta),K.node.parentPath==="/Desktop"&&_e([K.node.path])}catch(K){Ze("Hata",K.message,"error")}},Ea=async(S,O)=>{try{const K=await xt.move(S,O);me(K.snapshot.nodes),ae(K.snapshot.meta),_e([])}catch(K){Ze("Taşıma Hatası",K.message,"error")}},Fl=async S=>{if(X!=null&&X.paths.length)try{if(X.mode==="cut"){const O=await xt.move(X.paths,S);me(O.snapshot.nodes),ae(O.snapshot.meta),Q(null)}else{const O=await xt.copy(X.paths,S);me(O.snapshot.nodes),ae(O.snapshot.meta)}}catch(O){Ze("Hata",O.message,"error")}},Il=async S=>{if(S.length)try{const O=await xt.copy(S.map(K=>K.path),S[0].parentPath);me(O.snapshot.nodes),ae(O.snapshot.meta)}catch(O){Ze("Hata",O.message,"error")}},rr=async S=>{if(S.length)try{const O=await xt.trash(S);me(O.snapshot.nodes),ae(O.snapshot.meta),_e([])}catch(O){Ze("Hata",O.message,"error")}},nr=async S=>{try{const O=await xt.restore(S.map(K=>K.path));me(O.snapshot.nodes),ae(O.snapshot.meta)}catch(O){Ze("Hata",O.message,"error")}},Qc=async S=>{try{const O=await xt.deletePermanently(S.map(K=>K.path));me(O.snapshot.nodes),ae(O.snapshot.meta)}catch(O){Ze("Hata",O.message,"error")}},Na=async()=>{try{const S=await xt.emptyTrash();me(S.snapshot.nodes),ae(S.snapshot.meta)}catch(S){Ze("Hata",S.message,"error")}},Vl=async(S,O)=>{try{const K=await xt.compressToZip(S.map(xe=>xe.path),O);me(K.snapshot.nodes),ae(K.snapshot.meta),Ze("Arşivlendi",`${K.node.name} oluşturuldu.`,"success")}catch(K){Ze("Hata",K.message,"error")}},Xl=async S=>{try{const O=await xt.extractZip(S.path,S.parentPath);me(O.snapshot.nodes),ae(O.snapshot.meta),Ze("Ayıklandı",`${O.node.name} klasörüne çıkartıldı.`,"success")}catch(O){Ze("Hata",O.message,"error")}},qr=async(S,O)=>{try{const K=await xt.uploadFiles(S,O);me(K.snapshot.nodes),ae(K.snapshot.meta),Ze("Yüklendi",`${K.saved.length} dosya aktarıldı.`,"success")}catch(K){Ze("Hata",K.message,"error")}},Fr=async S=>{try{S.autoArrange&&await xt.resetPositions();const O=await xt.updateMeta({preferences:S});ae(O.meta)}catch{}};E.useEffect(()=>{const S=ve.preferences.theme||"dark";document.documentElement.setAttribute("data-theme",S)},[ve.preferences.theme]),E.useEffect(()=>()=>{fe.current&&clearTimeout(fe.current)},[]);const Wl=E.useCallback((S,O)=>{var Fe;if((ve.preferences.theme||"dark")===S)return;const xe=()=>{A0.flushSync(()=>{ae(je=>({...je,preferences:{...je.preferences,theme:S}}))}),document.documentElement.setAttribute("data-theme",S)},Be=document,Oe=typeof window<"u"&&((Fe=window.matchMedia)==null?void 0:Fe.call(window,"(prefers-reduced-motion: reduce)").matches);if(typeof Be.startViewTransition=="function"&&!Oe){const je=(O==null?void 0:O.x)??window.innerWidth/2,Ue=(O==null?void 0:O.y)??window.innerHeight/2,nt=Math.hypot(Math.max(je,window.innerWidth-je),Math.max(Ue,window.innerHeight-Ue));Be.startViewTransition(xe).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${je}px ${Ue}px)`,`circle(${nt}px at ${je}px ${Ue}px)`]},{duration:560,easing:"cubic-bezier(0.22, 1, 0.36, 1)",pseudoElement:"::view-transition-new(root)"})}).catch(()=>{})}else fe.current&&clearTimeout(fe.current),document.documentElement.classList.add("theme-transitioning"),xe(),fe.current=setTimeout(()=>{document.documentElement.classList.remove("theme-transitioning")},460);xt.updateMeta({preferences:{theme:S}}).then(je=>ae(je.meta)).catch(()=>{})},[ve.preferences.theme]),Gl=async S=>{try{const O=await xt.uploadWallpaper(S);ae(O.meta),Ze("Arka Plan Güncellendi",`${S.name} masaüstü arka planı yapıldı.`,"success")}catch(O){Ze("Arka Plan Hatası",O.message,"error")}},rs=async S=>{try{const O=await xt.setWallpaperFromVfs(S.path);ae(O.meta),Ze("Arka Plan Güncellendi",`${S.name} masaüstü arka planı yapıldı.`,"success")}catch(O){Ze("Arka Plan Hatası",O.message,"error")}};return E.useEffect(()=>{const S=O=>{if(Z){(O.key==="Enter"||O.key===" ")&&ue(!1);return}const K=document.activeElement;if(!(K&&(K.tagName==="INPUT"||K.tagName==="TEXTAREA"||K.tagName==="CANVAS"||K.isContentEditable)))if(O.key==="F2"&&ge.length===1)O.preventDefault(),ye(ge[0]);else if((O.key==="Delete"||O.key==="Backspace")&&ge.length>0)O.preventDefault(),rr(ge);else if(O.key==="Enter"&&ge.length===1){const xe=ms.find(Be=>Be.path===ge[0]);xe&&ss(xe)}else(O.metaKey||O.ctrlKey)&&O.key.toLowerCase()==="a"?(O.preventDefault(),_e(ms.map(xe=>xe.path))):(O.metaKey||O.ctrlKey)&&O.key.toLowerCase()==="c"&&ge.length?(O.preventDefault(),Q({mode:"copy",paths:ge})):(O.metaKey||O.ctrlKey)&&O.key.toLowerCase()==="x"&&ge.length?(O.preventDefault(),Q({mode:"cut",paths:ge})):(O.metaKey||O.ctrlKey)&&O.key.toLowerCase()==="v"&&(O.preventDefault(),Fl("/Desktop"))};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[Z,ge,ms,X]),t?a.enabled&&!a.authenticated?c.jsx(L2,{serverName:a.serverName,hostname:a.hostname,version:a.version,onSuccess:S=>l(O=>({...O,authenticated:!0,username:S}))}):c.jsxs("div",{className:"relative w-screen h-screen overflow-hidden select-none bg-[var(--os-bg)] text-[var(--os-text)]",children:[c.jsx(G0,{wallpaperId:ve.preferences.wallpaper,customWallpaper:ve.preferences.customWallpaper}),c.jsx("input",{ref:Y,type:"file",multiple:!0,className:"hidden",onChange:S=>{var O;(O=S.target.files)!=null&&O.length&&(qr(ne,S.target.files),S.target.value="")}}),c.jsx("input",{ref:G,type:"file",accept:"image/*","data-testid":"wallpaper-file-input",className:"hidden",onChange:S=>{var K;const O=(K=S.target.files)==null?void 0:K[0];O&&(Gl(O),S.target.value="")}}),c.jsx(b2,{desktopNodes:ms,trashCount:Yr,meta:ve,clipboard:X,selectedPaths:ge,onSelectPaths:_e,renamingPath:we,onSetRenamingPath:ye,onRenameCommit:sr,onOpenNode:ss,primaryBrowserLabel:"Chromium",useFirefoxIcon:!1,onOpenChromium:ii,onOpenTerminal:Tn,onOpenAppStore:ql,onOpenFolderWindow:Mi,onMoveNodesToFolder:Ea,onTrashNodes:rr,onSaveIconPosition:async(S,O)=>{const K=await xt.updateMeta({positions:{[S]:O},preferences:{autoArrange:!1}});ae(K.meta)},onUploadHostFiles:S=>qr("/Desktop",S),onContextMenu:(S,O,K)=>de({x:S,y:O,target:K}),onExternalDropHover:C}),$.map(S=>{const O=S.kind==="browser"&&ce==="browser"||S.kind==="folder"&&!!S.folderPath&&ce===`folder:${S.folderPath}`;return c.jsxs(S2,{win:S,isFocused:W===S.id,isDropHighlighted:O,onFocus:Dn,onClose:K=>{const xe=$.find(Be=>Be.id===K);(xe==null?void 0:xe.kind)==="linux-app"&&xe.appSessionId&&bn.close(xe.appSessionId,xe.appViewId||"main").catch(()=>{}),j(Be=>Be.filter(Oe=>Oe.id!==K)),W===K&&D(null)},onMinimize:K=>j(xe=>xe.map(Be=>Be.id===K?{...Be,minimized:!0}:Be)),onToggleMaximize:K=>j(xe=>xe.map(Be=>Be.id===K?{...Be,maximized:!Be.maximized,snap:null}:Be)),onUpdateBounds:(K,xe)=>j(Be=>Be.map(Oe=>Oe.id===K?{...Oe,...xe}:Oe)),minWidth:S.kind==="properties"?280:S.kind==="linux-app"?240:420,minHeight:S.kind==="properties"?220:S.kind==="linux-app"?180:300,overlayTitlebar:S.kind==="vscode",headerContent:S.kind==="browser"?c.jsx(D2,{tabs:oe,activeTabId:ze,sendWs:Ur}):void 0,children:[S.kind==="browser"&&c.jsx(j2,{tabs:oe,activeTabId:ze,subscribeVideoFrame:Hr,desktopNodes:ms,allNodes:ee,volume:Pi,muted:is,sendWs:Ur,onOpenFolder:Mi,onVfsSaved:mi,onNotify:Ze,browserCursor:Te}),S.kind==="terminal"&&S.terminalSessionId&&c.jsx($5,{sessionId:S.terminalSessionId,theme:ve.preferences.theme||"dark",onExit:()=>{j(K=>K.filter(xe=>xe.id!==S.id))}}),S.kind==="vscode"&&c.jsx(e3,{folderPath:S.folderPath,directUrl:S.vscodeUrl,theme:ve.preferences.theme||"dark",onOpenNewWindow:K=>ka({folderPath:K.folderPath||S.folderPath,url:K.url,width:K.width,height:K.height,forceNew:!0})}),S.kind==="linux-app"&&S.appSessionId&&c.jsx(Z5,{sessionId:S.appSessionId,viewId:S.appViewId||"main",appName:S.title,isFocused:W===S.id,onTitleChange:K=>j(xe=>xe.map(Be=>Be.id===S.id?{...Be,title:K}:Be)),onWindowOpened:K=>{const xe=window.innerWidth,Be=window.innerHeight-76,Oe=Math.max(240,Math.min(xe-28,Math.round(K.width||900))),Fe=Math.max(222,Math.min(Be-14,Math.round((K.height||640)+42))),je=`win-linux-${S.appSessionId}-${K.view}`,Ue=++q.current;j(nt=>nt.some(Bt=>Bt.id===je)?nt:[...nt,{id:je,kind:"linux-app",title:K.title||S.title,appSessionId:S.appSessionId,appViewId:K.view,appId:S.appId,x:Math.max(18,Math.min(xe-Oe-18,S.x+34)),y:Math.max(18,Math.min(Be-Fe-12,S.y+34)),width:Oe,height:Fe,minimized:!1,maximized:!1,zIndex:Ue}]),D(je)},onAppExit:()=>{j(K=>K.filter(xe=>xe.id!==S.id))}}),S.kind==="app-store"&&c.jsx(Q5,{runtime:w,apps:y,allowInstall:R,onRefreshApps:At,onLaunchApp:(K,xe)=>Bs({appId:K.id,command:K.command,appName:K.name,needsNoSandbox:K.needsNoSandbox,forceNew:xe==null?void 0:xe.forceNew}),onLaunchCustomCommand:K=>Bs({appId:"custom",command:K,appName:K.split(" ")[0]||"Uygulama"}),onOpenTerminal:Tn,onOpenChromium:()=>Pr()}),S.kind==="folder"&&c.jsx(M2,{initialPath:S.folderPath||"/Desktop",allNodes:ee,clipboard:X,externalDropTarget:ce,renamingPath:we,onSetRenamingPath:ye,onRenameCommit:sr,onOpenNode:ss,onPathChangeTitle:(K,xe)=>j(Be=>Be.map(Oe=>Oe.id===S.id?{...Oe,title:K,folderPath:xe}:Oe)),onCreateFolder:K=>_s(K),onOpenCustomFileDialog:K=>B({parentPath:K}),onUploadFiles:qr,onMoveNodes:Ea,onTrashNodes:K=>rr(K.map(xe=>xe.path)),onRestoreNodes:nr,onEmptyTrash:Na,onContextMenu:(K,xe,Be)=>de({x:K,y:xe,target:Be})}),S.kind==="properties"&&c.jsx(O2,{node:ee.find(K=>K.path===S.targetNodePath),onOpenNode:ss,onClose:()=>j(K=>K.filter(xe=>xe.id!==S.id))})]},S.id)}),he&&c.jsx(A2,{x:he.x,y:he.y,target:he.target,clipboard:X,preferences:ve.preferences,hasTrashItems:Yr>0,onClose:()=>de(null),onCreateFolder:_s,onCreateQuickFile:Kr,onOpenCustomFileDialog:(S,O)=>B({parentPath:S,pos:O}),onTriggerUpload:S=>{var O;A(S),(O=Y.current)==null||O.click()},onTriggerWallpaperUpload:()=>{var S;return(S=G.current)==null?void 0:S.click()},onSetWallpaperFromNode:rs,onOpenNode:ss,onStartRename:S=>ye(S.path),onCopy:S=>Q({mode:"copy",paths:S.map(O=>O.path)}),onCut:S=>Q({mode:"cut",paths:S.map(O=>O.path)}),onDuplicate:Il,onPaste:Fl,onTrash:S=>rr(S.map(O=>O.path)),onRestore:nr,onDeletePermanent:Qc,onEmptyTrash:Na,onCompressZip:Vl,onExtractZip:Xl,onDownloadHost:S=>{const O=document.createElement("a");O.href=vn(S.path,"&download=1"),O.click()},onShowProperties:fs,onOpenChromium:()=>ii(),onOpenFolderWindow:Mi,onUpdatePreferences:Fr,onCycleWallpaper:()=>{const S=kc.findIndex(K=>K.id===ve.preferences.wallpaper),O=kc[(S+1)%kc.length];Fr({wallpaper:O.id})},onRefresh:mi}),b&&c.jsx(R2,{parentPath:b.parentPath,onClose:()=>B(null),onCreate:S=>{const{parentPath:O,pos:K}=b;B(null),Kr(O,S,K)}}),c.jsx(z2,{locked:Z}),c.jsx("div",{className:"fixed bottom-20 right-5 z-[9970] flex flex-col gap-2 w-76 pointer-events-none",children:ie.map(S=>c.jsxs("div",{style:{boxShadow:"var(--os-shadow)"},className:"pointer-events-auto p-3.5 rounded-2xl bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] flex items-start gap-2.5 text-xs text-[var(--os-text)]",children:[S.kind==="success"?c.jsx(O0,{className:"w-4 h-4 text-[var(--os-text)] shrink-0 mt-0.5"}):S.kind==="error"||S.kind==="warning"?c.jsx(u2,{className:"w-4 h-4 text-amber-500 shrink-0 mt-0.5"}):c.jsx(K0,{className:"w-4 h-4 text-[var(--os-text-secondary)] shrink-0 mt-0.5"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:"font-medium text-[var(--os-text)]",children:S.title}),c.jsx("div",{className:"text-[11px] text-[var(--os-text-muted)] mt-0.5",children:S.message}),S.actionLabel&&S.onAction&&c.jsx("button",{onClick:()=>{var O;(O=S.onAction)==null||O.call(S),$e(K=>K.filter(xe=>xe.id!==S.id))},className:"mt-2 px-2.5 py-1 rounded-lg bg-[var(--os-accent-bg)] text-[var(--os-accent-fg)] text-[11px] font-semibold",children:S.actionLabel})]}),c.jsx("button",{onClick:()=>$e(O=>O.filter(K=>K.id!==S.id)),className:"text-[var(--os-text-subtle)] hover:text-[var(--os-text)]",children:c.jsx(Hl,{className:"w-3.5 h-3.5"})})]},S.id))}),c.jsx(t3,{windows:$,focusedWindowId:W,allNodes:ee,telemetry:_t,pingMs:bt,notificationHistory:Mn,wallpaperId:ve.preferences.wallpaper,customWallpaper:ve.preferences.customWallpaper,theme:ve.preferences.theme||"dark",brightness:Ui,volume:Pi,muted:is,currentDesktop:f,desktops:v,linuxApps:y,linuxGuiReady:!!(w!=null&&w.guiReady),useFirefoxIcon:!1,primaryBrowserLabel:"Chromium",authEnabled:a.enabled,onSwitchDesktop:si,onCreateDesktop:Gc,onDeleteDesktop:$c,onCopyDesktopLink:Zc,onChangeBrightness:ts,onChangeVolume:S=>{Vt(S),S>0&&is&&tr(!1)},onToggleMute:()=>tr(S=>!S),onSelectWallpaper:S=>Fr({wallpaper:S}),onTriggerWallpaperUpload:()=>{var S;return(S=G.current)==null?void 0:S.click()},onToggleTheme:Wl,onClearNotifications:()=>ir([]),onOpenBrowser:()=>ii(),onOpenTerminal:Tn,onOpenAppStore:ql,onLaunchLinuxApp:S=>Bs({appId:S.id,command:S.command,appName:S.name,needsNoSandbox:S.needsNoSandbox}),onOpenFolder:Mi,onOpenNode:ss,onToggleWindowFromTaskbar:S=>{const O=$.find(K=>K.id===S);O&&(O.minimized?Dn(S):W===S?(j(K=>K.map(xe=>xe.id===S?{...xe,minimized:!0}:xe)),D(null)):Dn(S))},onLockScreen:()=>ue(!0),onReboot:mi,onLogout:Wc}),Z&&c.jsxs("div",{onClick:()=>ue(!1),className:"fixed inset-0 z-[9998] bg-[var(--os-lock-bg)] backdrop-blur-xl flex flex-col items-center justify-center text-[var(--os-text)] cursor-pointer",children:[c.jsx("div",{className:"text-7xl font-extralight font-mono tracking-tight",children:pe.toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"})}),c.jsx("div",{className:"text-sm text-[var(--os-text-muted)] capitalize mt-3",children:pe.toLocaleDateString("tr-TR",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}),c.jsxs("div",{className:"mt-10 px-5 py-2.5 rounded-full bg-[var(--os-surface-2)] border border-[var(--os-border-strong)] flex items-center gap-2 text-xs text-[var(--os-text-secondary)]",children:[c.jsx(qc,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"Açmak için dokunun veya tıklayın"})]})]}),Ui<100&&c.jsx("div",{style:{opacity:(100-Ui)/100},className:"pointer-events-none fixed inset-0 z-[9997] bg-black"})]}):c.jsx("div",{className:"w-screen h-screen bg-[var(--os-bg)]"})}Lb.createRoot(document.getElementById("root")).render(c.jsx(ba.StrictMode,{children:c.jsx(r3,{})}));
|