handmux 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/README.zh-CN.md +2 -1
- package/hooks/handmux-codex-usage.cjs +141 -0
- package/hooks/handmux-statusline.cjs +16 -3
- package/hooks/handmux-write.cjs +9 -0
- package/package.json +4 -3
- package/public/assets/index-CIlbBw_U.js +330 -0
- package/public/assets/index-erQcVC-q.css +32 -0
- package/public/index.html +5 -6
- package/src/cli/codexHooks.js +10 -0
- package/src/cli/hookScaffold.js +3 -3
- package/src/routes/system.js +4 -5
- package/src/routes/terminal.js +23 -0
- package/src/server.js +9 -0
- package/src/staticCompression.js +10 -0
- package/src/tmux/commands.js +8 -3
- package/src/usage.js +214 -60
- package/public/assets/index-CvNuQ-bC.js +0 -330
- package/public/assets/index-DjJf1FX9.css +0 -32
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
var JA=Object.defineProperty;var XN=i=>{throw TypeError(i)};var ZA=(i,s,l)=>s in i?JA(i,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[s]=l;var yi=(i,s,l)=>ZA(i,typeof s!="symbol"?s+"":s,l),QA=(i,s,l)=>s.has(i)||XN("Cannot "+l);var JN=(i,s,l)=>s.has(i)?XN("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,l);var Km=(i,s,l)=>(QA(i,s,"access private method"),l);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))m(S);new MutationObserver(S=>{for(const D of S)if(D.type==="childList")for(const b of D.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&m(b)}).observe(document,{childList:!0,subtree:!0});function l(S){const D={};return S.integrity&&(D.integrity=S.integrity),S.referrerPolicy&&(D.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?D.credentials="include":S.crossOrigin==="anonymous"?D.credentials="omit":D.credentials="same-origin",D}function m(S){if(S.ep)return;S.ep=!0;const D=l(S);fetch(S.href,D)}})();var BS={exports:{}},i_={},FS={exports:{}},hf={exports:{}};hf.exports;(function(i,s){/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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
|
+
*/(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var l="18.3.1",m=Symbol.for("react.element"),S=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),f=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),c=Symbol.iterator,p="@@iterator";function v(z){if(z===null||typeof z!="object")return null;var oe=c&&z[c]||z[p];return typeof oe=="function"?oe:null}var g={current:null},E={transition:null},R={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},j={current:null},A={},k=null;function L(z){k=z}A.setExtraStackFrame=function(z){k=z},A.getCurrentStack=null,A.getStackAddendum=function(){var z="";k&&(z+=k);var oe=A.getCurrentStack;return oe&&(z+=oe()||""),z};var O=!1,H=!1,V=!1,B=!1,q=!1,ne={ReactCurrentDispatcher:g,ReactCurrentBatchConfig:E,ReactCurrentOwner:j};ne.ReactDebugCurrentFrame=A,ne.ReactCurrentActQueue=R;function Y(z){{for(var oe=arguments.length,Se=new Array(oe>1?oe-1:0),Ae=1;Ae<oe;Ae++)Se[Ae-1]=arguments[Ae];ee("warn",z,Se)}}function J(z){{for(var oe=arguments.length,Se=new Array(oe>1?oe-1:0),Ae=1;Ae<oe;Ae++)Se[Ae-1]=arguments[Ae];ee("error",z,Se)}}function ee(z,oe,Se){{var Ae=ne.ReactDebugCurrentFrame,it=Ae.getStackAddendum();it!==""&&(oe+="%s",Se=Se.concat([it]));var It=Se.map(function(_t){return String(_t)});It.unshift("Warning: "+oe),Function.prototype.apply.call(console[z],console,It)}}var P={};function W(z,oe){{var Se=z.constructor,Ae=Se&&(Se.displayName||Se.name)||"ReactClass",it=Ae+"."+oe;if(P[it])return;J("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",oe,Ae),P[it]=!0}}var Q={isMounted:function(z){return!1},enqueueForceUpdate:function(z,oe,Se){W(z,"forceUpdate")},enqueueReplaceState:function(z,oe,Se,Ae){W(z,"replaceState")},enqueueSetState:function(z,oe,Se,Ae){W(z,"setState")}},K=Object.assign,he={};Object.freeze(he);function ce(z,oe,Se){this.props=z,this.context=oe,this.refs=he,this.updater=Se||Q}ce.prototype.isReactComponent={},ce.prototype.setState=function(z,oe){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,oe,"setState")},ce.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};{var ke={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},we=function(z,oe){Object.defineProperty(ce.prototype,z,{get:function(){Y("%s(...) is deprecated in plain JavaScript React classes. %s",oe[0],oe[1])}})};for(var re in ke)ke.hasOwnProperty(re)&&we(re,ke[re])}function G(){}G.prototype=ce.prototype;function ge(z,oe,Se){this.props=z,this.context=oe,this.refs=he,this.updater=Se||Q}var de=ge.prototype=new G;de.constructor=ge,K(de,ce.prototype),de.isPureReactComponent=!0;function pe(){var z={current:null};return Object.seal(z),z}var Ne=Array.isArray;function Ie(z){return Ne(z)}function Ze(z){{var oe=typeof Symbol=="function"&&Symbol.toStringTag,Se=oe&&z[Symbol.toStringTag]||z.constructor.name||"Object";return Se}}function ut(z){try{return At(z),!1}catch{return!0}}function At(z){return""+z}function Ke(z){if(ut(z))return J("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(z)),At(z)}function qt(z,oe,Se){var Ae=z.displayName;if(Ae)return Ae;var it=oe.displayName||oe.name||"";return it!==""?Se+"("+it+")":Se}function Ut(z){return z.displayName||"Context"}function xe(z){if(z==null)return null;if(typeof z.tag=="number"&&J("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof z=="function")return z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case D:return"Fragment";case S:return"Portal";case a:return"Profiler";case b:return"StrictMode";case h:return"Suspense";case _:return"SuspenseList"}if(typeof z=="object")switch(z.$$typeof){case f:var oe=z;return Ut(oe)+".Consumer";case d:var Se=z;return Ut(Se._context)+".Provider";case w:return qt(z,z.render,"ForwardRef");case N:var Ae=z.displayName||null;return Ae!==null?Ae:xe(z.type)||"Memo";case C:{var it=z,It=it._payload,_t=it._init;try{return xe(_t(It))}catch{return null}}}return null}var Ve=Object.prototype.hasOwnProperty,Xe={key:!0,ref:!0,__self:!0,__source:!0},Te,lt,dt;dt={};function $(z){if(Ve.call(z,"ref")){var oe=Object.getOwnPropertyDescriptor(z,"ref").get;if(oe&&oe.isReactWarning)return!1}return z.ref!==void 0}function at(z){if(Ve.call(z,"key")){var oe=Object.getOwnPropertyDescriptor(z,"key").get;if(oe&&oe.isReactWarning)return!1}return z.key!==void 0}function De(z,oe){var Se=function(){Te||(Te=!0,J("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",oe))};Se.isReactWarning=!0,Object.defineProperty(z,"key",{get:Se,configurable:!0})}function We(z,oe){var Se=function(){lt||(lt=!0,J("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",oe))};Se.isReactWarning=!0,Object.defineProperty(z,"ref",{get:Se,configurable:!0})}function be(z){if(typeof z.ref=="string"&&j.current&&z.__self&&j.current.stateNode!==z.__self){var oe=xe(j.current.type);dt[oe]||(J('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',oe,z.ref),dt[oe]=!0)}}var Pe=function(z,oe,Se,Ae,it,It,_t){var Xt={$$typeof:m,type:z,key:oe,ref:Se,props:_t,_owner:It};return Xt._store={},Object.defineProperty(Xt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Xt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ae}),Object.defineProperty(Xt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:it}),Object.freeze&&(Object.freeze(Xt.props),Object.freeze(Xt)),Xt};function He(z,oe,Se){var Ae,it={},It=null,_t=null,Xt=null,pn=null;if(oe!=null){$(oe)&&(_t=oe.ref,be(oe)),at(oe)&&(Ke(oe.key),It=""+oe.key),Xt=oe.__self===void 0?null:oe.__self,pn=oe.__source===void 0?null:oe.__source;for(Ae in oe)Ve.call(oe,Ae)&&!Xe.hasOwnProperty(Ae)&&(it[Ae]=oe[Ae])}var Ln=arguments.length-2;if(Ln===1)it.children=Se;else if(Ln>1){for(var xn=Array(Ln),Pn=0;Pn<Ln;Pn++)xn[Pn]=arguments[Pn+2];Object.freeze&&Object.freeze(xn),it.children=xn}if(z&&z.defaultProps){var nn=z.defaultProps;for(Ae in nn)it[Ae]===void 0&&(it[Ae]=nn[Ae])}if(It||_t){var oi=typeof z=="function"?z.displayName||z.name||"Unknown":z;It&&De(it,oi),_t&&We(it,oi)}return Pe(z,It,_t,Xt,pn,j.current,it)}function Ot(z,oe){var Se=Pe(z.type,oe,z.ref,z._self,z._source,z._owner,z.props);return Se}function Le(z,oe,Se){if(z==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var Ae,it=K({},z.props),It=z.key,_t=z.ref,Xt=z._self,pn=z._source,Ln=z._owner;if(oe!=null){$(oe)&&(_t=oe.ref,Ln=j.current),at(oe)&&(Ke(oe.key),It=""+oe.key);var xn;z.type&&z.type.defaultProps&&(xn=z.type.defaultProps);for(Ae in oe)Ve.call(oe,Ae)&&!Xe.hasOwnProperty(Ae)&&(oe[Ae]===void 0&&xn!==void 0?it[Ae]=xn[Ae]:it[Ae]=oe[Ae])}var Pn=arguments.length-2;if(Pn===1)it.children=Se;else if(Pn>1){for(var nn=Array(Pn),oi=0;oi<Pn;oi++)nn[oi]=arguments[oi+2];it.children=nn}return Pe(z.type,It,_t,Xt,pn,Ln,it)}function ve(z){return typeof z=="object"&&z!==null&&z.$$typeof===m}var xt=".",Kt=":";function ot(z){var oe=/[=:]/g,Se={"=":"=0",":":"=2"},Ae=z.replace(oe,function(it){return Se[it]});return"$"+Ae}var Tt=!1,Qt=/\/+/g;function Vt(z){return z.replace(Qt,"$&/")}function Fn(z,oe){return typeof z=="object"&&z!==null&&z.key!=null?(Ke(z.key),ot(""+z.key)):oe.toString(36)}function mn(z,oe,Se,Ae,it){var It=typeof z;(It==="undefined"||It==="boolean")&&(z=null);var _t=!1;if(z===null)_t=!0;else switch(It){case"string":case"number":_t=!0;break;case"object":switch(z.$$typeof){case m:case S:_t=!0}}if(_t){var Xt=z,pn=it(Xt),Ln=Ae===""?xt+Fn(Xt,0):Ae;if(Ie(pn)){var xn="";Ln!=null&&(xn=Vt(Ln)+"/"),mn(pn,oe,xn,"",function(Je){return Je})}else pn!=null&&(ve(pn)&&(pn.key&&(!Xt||Xt.key!==pn.key)&&Ke(pn.key),pn=Ot(pn,Se+(pn.key&&(!Xt||Xt.key!==pn.key)?Vt(""+pn.key)+"/":"")+Ln)),oe.push(pn));return 1}var Pn,nn,oi=0,bi=Ae===""?xt:Ae+Kt;if(Ie(z))for(var Ds=0;Ds<z.length;Ds++)Pn=z[Ds],nn=bi+Fn(Pn,Ds),oi+=mn(Pn,oe,Se,nn,it);else{var mi=v(z);if(typeof mi=="function"){var Or=z;mi===Or.entries&&(Tt||Y("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Tt=!0);for(var Ws=mi.call(Or),Gs,ue=0;!(Gs=Ws.next()).done;)Pn=Gs.value,nn=bi+Fn(Pn,ue++),oi+=mn(Pn,oe,Se,nn,it)}else if(It==="object"){var $e=String(z);throw new Error("Objects are not valid as a React child (found: "+($e==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":$e)+"). If you meant to render a collection of children, use an array instead.")}}return oi}function xi(z,oe,Se){if(z==null)return z;var Ae=[],it=0;return mn(z,Ae,"","",function(It){return oe.call(Se,It,it++)}),Ae}function ci(z){var oe=0;return xi(z,function(){oe++}),oe}function Hn(z,oe,Se){xi(z,function(){oe.apply(this,arguments)},Se)}function vi(z){return xi(z,function(oe){return oe})||[]}function Yn(z){if(!ve(z))throw new Error("React.Children.only expected to receive a single React element child.");return z}function st(z){var oe={$$typeof:f,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};oe.Provider={$$typeof:d,_context:oe};var Se=!1,Ae=!1,it=!1;{var It={$$typeof:f,_context:oe};Object.defineProperties(It,{Provider:{get:function(){return Ae||(Ae=!0,J("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),oe.Provider},set:function(_t){oe.Provider=_t}},_currentValue:{get:function(){return oe._currentValue},set:function(_t){oe._currentValue=_t}},_currentValue2:{get:function(){return oe._currentValue2},set:function(_t){oe._currentValue2=_t}},_threadCount:{get:function(){return oe._threadCount},set:function(_t){oe._threadCount=_t}},Consumer:{get:function(){return Se||(Se=!0,J("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),oe.Consumer}},displayName:{get:function(){return oe.displayName},set:function(_t){it||(Y("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",_t),it=!0)}}}),oe.Consumer=It}return oe._currentRenderer=null,oe._currentRenderer2=null,oe}var tn=-1,Pt=0,Tn=1,Sn=2;function zn(z){if(z._status===tn){var oe=z._result,Se=oe();if(Se.then(function(It){if(z._status===Pt||z._status===tn){var _t=z;_t._status=Tn,_t._result=It}},function(It){if(z._status===Pt||z._status===tn){var _t=z;_t._status=Sn,_t._result=It}}),z._status===tn){var Ae=z;Ae._status=Pt,Ae._result=Se}}if(z._status===Tn){var it=z._result;return it===void 0&&J(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
10
|
+
|
|
11
|
+
Your code should look like:
|
|
12
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
13
|
+
|
|
14
|
+
Did you accidentally put curly braces around the import?`,it),"default"in it||J(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
15
|
+
|
|
16
|
+
Your code should look like:
|
|
17
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,it),it.default}else throw z._result}function ae(z){var oe={_status:tn,_result:z},Se={$$typeof:C,_payload:oe,_init:zn};{var Ae,it;Object.defineProperties(Se,{defaultProps:{configurable:!0,get:function(){return Ae},set:function(It){J("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ae=It,Object.defineProperty(Se,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return it},set:function(It){J("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),it=It,Object.defineProperty(Se,"propTypes",{enumerable:!0})}}})}return Se}function Be(z){z!=null&&z.$$typeof===N?J("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof z!="function"?J("forwardRef requires a render function but was given %s.",z===null?"null":typeof z):z.length!==0&&z.length!==2&&J("forwardRef render functions accept exactly two parameters: props and ref. %s",z.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),z!=null&&(z.defaultProps!=null||z.propTypes!=null)&&J("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var oe={$$typeof:w,render:z};{var Se;Object.defineProperty(oe,"displayName",{enumerable:!1,configurable:!0,get:function(){return Se},set:function(Ae){Se=Ae,!z.name&&!z.displayName&&(z.displayName=Ae)}})}return oe}var et;et=Symbol.for("react.module.reference");function Ct(z){return!!(typeof z=="string"||typeof z=="function"||z===D||z===a||q||z===b||z===h||z===_||B||z===y||O||H||V||typeof z=="object"&&z!==null&&(z.$$typeof===C||z.$$typeof===N||z.$$typeof===d||z.$$typeof===f||z.$$typeof===w||z.$$typeof===et||z.getModuleId!==void 0))}function jt(z,oe){Ct(z)||J("memo: The first argument must be a component. Instead received: %s",z===null?"null":typeof z);var Se={$$typeof:N,type:z,compare:oe===void 0?null:oe};{var Ae;Object.defineProperty(Se,"displayName",{enumerable:!1,configurable:!0,get:function(){return Ae},set:function(it){Ae=it,!z.name&&!z.displayName&&(z.displayName=it)}})}return Se}function Rt(){var z=g.current;return z===null&&J(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
18
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
19
|
+
2. You might be breaking the Rules of Hooks
|
|
20
|
+
3. You might have more than one copy of React in the same app
|
|
21
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),z}function Lt(z){var oe=Rt();if(z._context!==void 0){var Se=z._context;Se.Consumer===z?J("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):Se.Provider===z&&J("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return oe.useContext(z)}function Nt(z){var oe=Rt();return oe.useState(z)}function $n(z,oe,Se){var Ae=Rt();return Ae.useReducer(z,oe,Se)}function Bt(z){var oe=Rt();return oe.useRef(z)}function fn(z,oe){var Se=Rt();return Se.useEffect(z,oe)}function ni(z,oe){var Se=Rt();return Se.useInsertionEffect(z,oe)}function Xn(z,oe){var Se=Rt();return Se.useLayoutEffect(z,oe)}function Ui(z,oe){var Se=Rt();return Se.useCallback(z,oe)}function wn(z,oe){var Se=Rt();return Se.useMemo(z,oe)}function gi(z,oe,Se){var Ae=Rt();return Ae.useImperativeHandle(z,oe,Se)}function Ni(z,oe){{var Se=Rt();return Se.useDebugValue(z,oe)}}function Ht(){var z=Rt();return z.useTransition()}function Gi(z){var oe=Rt();return oe.useDeferredValue(z)}function Si(){var z=Rt();return z.useId()}function pt(z,oe,Se){var Ae=Rt();return Ae.useSyncExternalStore(z,oe,Se)}var ie=0,Re,nt,hn,Ft,$t,vn,ai;function Wn(){}Wn.__reactDisabledLog=!0;function rr(){{if(ie===0){Re=console.log,nt=console.info,hn=console.warn,Ft=console.error,$t=console.group,vn=console.groupCollapsed,ai=console.groupEnd;var z={configurable:!0,enumerable:!0,value:Wn,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}ie++}}function En(){{if(ie--,ie===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},z,{value:Re}),info:K({},z,{value:nt}),warn:K({},z,{value:hn}),error:K({},z,{value:Ft}),group:K({},z,{value:$t}),groupCollapsed:K({},z,{value:vn}),groupEnd:K({},z,{value:ai})})}ie<0&&J("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Oi=ne.ReactCurrentDispatcher,ji;function Ar(z,oe,Se){{if(ji===void 0)try{throw Error()}catch(it){var Ae=it.stack.trim().match(/\n( *(at )?)/);ji=Ae&&Ae[1]||""}return`
|
|
22
|
+
`+ji+z}}var qi=!1,Gr;{var ms=typeof WeakMap=="function"?WeakMap:Map;Gr=new ms}function fs(z,oe){if(!z||qi)return"";{var Se=Gr.get(z);if(Se!==void 0)return Se}var Ae;qi=!0;var it=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var It;It=Oi.current,Oi.current=null,rr();try{if(oe){var _t=function(){throw Error()};if(Object.defineProperty(_t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_t,[])}catch(bi){Ae=bi}Reflect.construct(z,[],_t)}else{try{_t.call()}catch(bi){Ae=bi}z.call(_t.prototype)}}else{try{throw Error()}catch(bi){Ae=bi}z()}}catch(bi){if(bi&&Ae&&typeof bi.stack=="string"){for(var Xt=bi.stack.split(`
|
|
23
|
+
`),pn=Ae.stack.split(`
|
|
24
|
+
`),Ln=Xt.length-1,xn=pn.length-1;Ln>=1&&xn>=0&&Xt[Ln]!==pn[xn];)xn--;for(;Ln>=1&&xn>=0;Ln--,xn--)if(Xt[Ln]!==pn[xn]){if(Ln!==1||xn!==1)do if(Ln--,xn--,xn<0||Xt[Ln]!==pn[xn]){var Pn=`
|
|
25
|
+
`+Xt[Ln].replace(" at new "," at ");return z.displayName&&Pn.includes("<anonymous>")&&(Pn=Pn.replace("<anonymous>",z.displayName)),typeof z=="function"&&Gr.set(z,Pn),Pn}while(Ln>=1&&xn>=0);break}}}finally{qi=!1,Oi.current=It,En(),Error.prepareStackTrace=it}var nn=z?z.displayName||z.name:"",oi=nn?Ar(nn):"";return typeof z=="function"&&Gr.set(z,oi),oi}function wi(z,oe,Se){return fs(z,!1)}function se(z){var oe=z.prototype;return!!(oe&&oe.isReactComponent)}function Me(z,oe,Se){if(z==null)return"";if(typeof z=="function")return fs(z,se(z));if(typeof z=="string")return Ar(z);switch(z){case h:return Ar("Suspense");case _:return Ar("SuspenseList")}if(typeof z=="object")switch(z.$$typeof){case w:return wi(z.render);case N:return Me(z.type,oe,Se);case C:{var Ae=z,it=Ae._payload,It=Ae._init;try{return Me(It(it),oe,Se)}catch{}}}return""}var tt={},vt=ne.ReactDebugCurrentFrame;function Dt(z){if(z){var oe=z._owner,Se=Me(z.type,z._source,oe?oe.type:null);vt.setExtraStackFrame(Se)}else vt.setExtraStackFrame(null)}function Vi(z,oe,Se,Ae,it){{var It=Function.call.bind(Ve);for(var _t in z)if(It(z,_t)){var Xt=void 0;try{if(typeof z[_t]!="function"){var pn=Error((Ae||"React class")+": "+Se+" type `"+_t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[_t]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw pn.name="Invariant Violation",pn}Xt=z[_t](oe,_t,Ae,Se,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ln){Xt=Ln}Xt&&!(Xt instanceof Error)&&(Dt(it),J("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ae||"React class",Se,_t,typeof Xt),Dt(null)),Xt instanceof Error&&!(Xt.message in tt)&&(tt[Xt.message]=!0,Dt(it),J("Failed %s type: %s",Se,Xt.message),Dt(null))}}}function Ii(z){if(z){var oe=z._owner,Se=Me(z.type,z._source,oe?oe.type:null);L(Se)}else L(null)}var ft;ft=!1;function ui(){if(j.current){var z=xe(j.current.type);if(z)return`
|
|
26
|
+
|
|
27
|
+
Check the render method of \``+z+"`."}return""}function An(z){if(z!==void 0){var oe=z.fileName.replace(/^.*[\\\/]/,""),Se=z.lineNumber;return`
|
|
28
|
+
|
|
29
|
+
Check your code at `+oe+":"+Se+"."}return""}function di(z){return z!=null?An(z.__source):""}var hi={};function ii(z){var oe=ui();if(!oe){var Se=typeof z=="string"?z:z.displayName||z.name;Se&&(oe=`
|
|
30
|
+
|
|
31
|
+
Check the top-level render call using <`+Se+">.")}return oe}function cn(z,oe){if(!(!z._store||z._store.validated||z.key!=null)){z._store.validated=!0;var Se=ii(oe);if(!hi[Se]){hi[Se]=!0;var Ae="";z&&z._owner&&z._owner!==j.current&&(Ae=" It was passed a child from "+xe(z._owner.type)+"."),Ii(z),J('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Se,Ae),Ii(null)}}}function un(z,oe){if(typeof z=="object"){if(Ie(z))for(var Se=0;Se<z.length;Se++){var Ae=z[Se];ve(Ae)&&cn(Ae,oe)}else if(ve(z))z._store&&(z._store.validated=!0);else if(z){var it=v(z);if(typeof it=="function"&&it!==z.entries)for(var It=it.call(z),_t;!(_t=It.next()).done;)ve(_t.value)&&cn(_t.value,oe)}}}function sr(z){{var oe=z.type;if(oe==null||typeof oe=="string")return;var Se;if(typeof oe=="function")Se=oe.propTypes;else if(typeof oe=="object"&&(oe.$$typeof===w||oe.$$typeof===N))Se=oe.propTypes;else return;if(Se){var Ae=xe(oe);Vi(Se,z.props,"prop",Ae,z)}else if(oe.PropTypes!==void 0&&!ft){ft=!0;var it=xe(oe);J("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",it||"Unknown")}typeof oe.getDefaultProps=="function"&&!oe.getDefaultProps.isReactClassApproved&&J("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kn(z){{for(var oe=Object.keys(z.props),Se=0;Se<oe.length;Se++){var Ae=oe[Se];if(Ae!=="children"&&Ae!=="key"){Ii(z),J("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ae),Ii(null);break}}z.ref!==null&&(Ii(z),J("Invalid attribute `ref` supplied to `React.Fragment`."),Ii(null))}}function Vn(z,oe,Se){var Ae=Ct(z);if(!Ae){var it="";(z===void 0||typeof z=="object"&&z!==null&&Object.keys(z).length===0)&&(it+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var It=di(oe);It?it+=It:it+=ui();var _t;z===null?_t="null":Ie(z)?_t="array":z!==void 0&&z.$$typeof===m?(_t="<"+(xe(z.type)||"Unknown")+" />",it=" Did you accidentally export a JSX literal instead of a component?"):_t=typeof z,J("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_t,it)}var Xt=He.apply(this,arguments);if(Xt==null)return Xt;if(Ae)for(var pn=2;pn<arguments.length;pn++)un(arguments[pn],z);return z===D?Kn(Xt):sr(Xt),Xt}var Di=!1;function ps(z){var oe=Vn.bind(null,z);return oe.type=z,Di||(Di=!0,Y("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(oe,"type",{enumerable:!1,get:function(){return Y("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:z}),z}}),oe}function Mr(z,oe,Se){for(var Ae=Le.apply(this,arguments),it=2;it<arguments.length;it++)un(arguments[it],Ae.type);return sr(Ae),Ae}function fa(z,oe){var Se=E.transition;E.transition={};var Ae=E.transition;E.transition._updatedFibers=new Set;try{z()}finally{if(E.transition=Se,Se===null&&Ae._updatedFibers){var it=Ae._updatedFibers.size;it>10&&Y("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),Ae._updatedFibers.clear()}}}var jn=!1,vs=null;function rn(z){if(vs===null)try{var oe=("require"+Math.random()).slice(0,7),Se=i&&i[oe];vs=Se.call(i,"timers").setImmediate}catch{vs=function(it){jn===!1&&(jn=!0,typeof MessageChannel>"u"&&J("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var It=new MessageChannel;It.port1.onmessage=it,It.port2.postMessage(void 0)}}return vs(z)}var ki=0,Sr=!1;function $s(z){{var oe=ki;ki++,R.current===null&&(R.current=[]);var Se=R.isBatchingLegacy,Ae;try{if(R.isBatchingLegacy=!0,Ae=z(),!Se&&R.didScheduleLegacyUpdate){var it=R.current;it!==null&&(R.didScheduleLegacyUpdate=!1,ns(it))}}catch(nn){throw qr(oe),nn}finally{R.isBatchingLegacy=Se}if(Ae!==null&&typeof Ae=="object"&&typeof Ae.then=="function"){var It=Ae,_t=!1,Xt={then:function(nn,oi){_t=!0,It.then(function(bi){qr(oe),ki===0?Cs(bi,nn,oi):nn(bi)},function(bi){qr(oe),oi(bi)})}};return!Sr&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){_t||(Sr=!0,J("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),Xt}else{var pn=Ae;if(qr(oe),ki===0){var Ln=R.current;Ln!==null&&(ns(Ln),R.current=null);var xn={then:function(nn,oi){R.current===null?(R.current=[],Cs(pn,nn,oi)):nn(pn)}};return xn}else{var Pn={then:function(nn,oi){nn(pn)}};return Pn}}}}function qr(z){z!==ki-1&&J("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ki=z}function Cs(z,oe,Se){{var Ae=R.current;if(Ae!==null)try{ns(Ae),rn(function(){Ae.length===0?(R.current=null,oe(z)):Cs(z,oe,Se)})}catch(it){Se(it)}else oe(z)}}var js=!1;function ns(z){if(!js){js=!0;var oe=0;try{for(;oe<z.length;oe++){var Se=z[oe];do Se=Se(!0);while(Se!==null)}z.length=0}catch(Ae){throw z=z.slice(oe+1),Ae}finally{js=!1}}}var Ei=Vn,Er=Mr,Ur=ps,Ri={map:xi,forEach:Hn,count:ci,toArray:vi,only:Yn};s.Children=Ri,s.Component=ce,s.Fragment=D,s.Profiler=a,s.PureComponent=ge,s.StrictMode=b,s.Suspense=h,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,s.act=$s,s.cloneElement=Er,s.createContext=st,s.createElement=Ei,s.createFactory=Ur,s.createRef=pe,s.forwardRef=Be,s.isValidElement=ve,s.lazy=ae,s.memo=jt,s.startTransition=fa,s.unstable_act=$s,s.useCallback=Ui,s.useContext=Lt,s.useDebugValue=Ni,s.useDeferredValue=Gi,s.useEffect=fn,s.useId=Si,s.useImperativeHandle=gi,s.useInsertionEffect=ni,s.useLayoutEffect=Xn,s.useMemo=wn,s.useReducer=$n,s.useRef=Bt,s.useState=Nt,s.useSyncExternalStore=pt,s.useTransition=Ht,s.version=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(hf,hf.exports);var eM=hf.exports;FS.exports=eM;var M=FS.exports;/**
|
|
32
|
+
* @license React
|
|
33
|
+
* react-jsx-dev-runtime.development.js
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/(function(){var i=M,s=Symbol.for("react.element"),l=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),a=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),C=Symbol.iterator,y="@@iterator";function c(ae){if(ae===null||typeof ae!="object")return null;var Be=C&&ae[C]||ae[y];return typeof Be=="function"?Be:null}var p=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(ae){{for(var Be=arguments.length,et=new Array(Be>1?Be-1:0),Ct=1;Ct<Be;Ct++)et[Ct-1]=arguments[Ct];g("error",ae,et)}}function g(ae,Be,et){{var Ct=p.ReactDebugCurrentFrame,jt=Ct.getStackAddendum();jt!==""&&(Be+="%s",et=et.concat([jt]));var Rt=et.map(function(Lt){return String(Lt)});Rt.unshift("Warning: "+Be),Function.prototype.apply.call(console[ae],console,Rt)}}var E=!1,R=!1,j=!1,A=!1,k=!1,L;L=Symbol.for("react.module.reference");function O(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===m||ae===D||k||ae===S||ae===f||ae===w||A||ae===N||E||R||j||typeof ae=="object"&&ae!==null&&(ae.$$typeof===_||ae.$$typeof===h||ae.$$typeof===b||ae.$$typeof===a||ae.$$typeof===d||ae.$$typeof===L||ae.getModuleId!==void 0))}function H(ae,Be,et){var Ct=ae.displayName;if(Ct)return Ct;var jt=Be.displayName||Be.name||"";return jt!==""?et+"("+jt+")":et}function V(ae){return ae.displayName||"Context"}function B(ae){if(ae==null)return null;if(typeof ae.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ae=="function")return ae.displayName||ae.name||null;if(typeof ae=="string")return ae;switch(ae){case m:return"Fragment";case l:return"Portal";case D:return"Profiler";case S:return"StrictMode";case f:return"Suspense";case w:return"SuspenseList"}if(typeof ae=="object")switch(ae.$$typeof){case a:var Be=ae;return V(Be)+".Consumer";case b:var et=ae;return V(et._context)+".Provider";case d:return H(ae,ae.render,"ForwardRef");case h:var Ct=ae.displayName||null;return Ct!==null?Ct:B(ae.type)||"Memo";case _:{var jt=ae,Rt=jt._payload,Lt=jt._init;try{return B(Lt(Rt))}catch{return null}}}return null}var q=Object.assign,ne=0,Y,J,ee,P,W,Q,K;function he(){}he.__reactDisabledLog=!0;function ce(){{if(ne===0){Y=console.log,J=console.info,ee=console.warn,P=console.error,W=console.group,Q=console.groupCollapsed,K=console.groupEnd;var ae={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:ae,log:ae,warn:ae,error:ae,group:ae,groupCollapsed:ae,groupEnd:ae})}ne++}}function ke(){{if(ne--,ne===0){var ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},ae,{value:Y}),info:q({},ae,{value:J}),warn:q({},ae,{value:ee}),error:q({},ae,{value:P}),group:q({},ae,{value:W}),groupCollapsed:q({},ae,{value:Q}),groupEnd:q({},ae,{value:K})})}ne<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var we=p.ReactCurrentDispatcher,re;function G(ae,Be,et){{if(re===void 0)try{throw Error()}catch(jt){var Ct=jt.stack.trim().match(/\n( *(at )?)/);re=Ct&&Ct[1]||""}return`
|
|
40
|
+
`+re+ae}}var ge=!1,de;{var pe=typeof WeakMap=="function"?WeakMap:Map;de=new pe}function Ne(ae,Be){if(!ae||ge)return"";{var et=de.get(ae);if(et!==void 0)return et}var Ct;ge=!0;var jt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Rt;Rt=we.current,we.current=null,ce();try{if(Be){var Lt=function(){throw Error()};if(Object.defineProperty(Lt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Lt,[])}catch(wn){Ct=wn}Reflect.construct(ae,[],Lt)}else{try{Lt.call()}catch(wn){Ct=wn}ae.call(Lt.prototype)}}else{try{throw Error()}catch(wn){Ct=wn}ae()}}catch(wn){if(wn&&Ct&&typeof wn.stack=="string"){for(var Nt=wn.stack.split(`
|
|
41
|
+
`),$n=Ct.stack.split(`
|
|
42
|
+
`),Bt=Nt.length-1,fn=$n.length-1;Bt>=1&&fn>=0&&Nt[Bt]!==$n[fn];)fn--;for(;Bt>=1&&fn>=0;Bt--,fn--)if(Nt[Bt]!==$n[fn]){if(Bt!==1||fn!==1)do if(Bt--,fn--,fn<0||Nt[Bt]!==$n[fn]){var ni=`
|
|
43
|
+
`+Nt[Bt].replace(" at new "," at ");return ae.displayName&&ni.includes("<anonymous>")&&(ni=ni.replace("<anonymous>",ae.displayName)),typeof ae=="function"&&de.set(ae,ni),ni}while(Bt>=1&&fn>=0);break}}}finally{ge=!1,we.current=Rt,ke(),Error.prepareStackTrace=jt}var Xn=ae?ae.displayName||ae.name:"",Ui=Xn?G(Xn):"";return typeof ae=="function"&&de.set(ae,Ui),Ui}function Ie(ae,Be,et){return Ne(ae,!1)}function Ze(ae){var Be=ae.prototype;return!!(Be&&Be.isReactComponent)}function ut(ae,Be,et){if(ae==null)return"";if(typeof ae=="function")return Ne(ae,Ze(ae));if(typeof ae=="string")return G(ae);switch(ae){case f:return G("Suspense");case w:return G("SuspenseList")}if(typeof ae=="object")switch(ae.$$typeof){case d:return Ie(ae.render);case h:return ut(ae.type,Be,et);case _:{var Ct=ae,jt=Ct._payload,Rt=Ct._init;try{return ut(Rt(jt),Be,et)}catch{}}}return""}var At=Object.prototype.hasOwnProperty,Ke={},qt=p.ReactDebugCurrentFrame;function Ut(ae){if(ae){var Be=ae._owner,et=ut(ae.type,ae._source,Be?Be.type:null);qt.setExtraStackFrame(et)}else qt.setExtraStackFrame(null)}function xe(ae,Be,et,Ct,jt){{var Rt=Function.call.bind(At);for(var Lt in ae)if(Rt(ae,Lt)){var Nt=void 0;try{if(typeof ae[Lt]!="function"){var $n=Error((Ct||"React class")+": "+et+" type `"+Lt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ae[Lt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $n.name="Invariant Violation",$n}Nt=ae[Lt](Be,Lt,Ct,et,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Bt){Nt=Bt}Nt&&!(Nt instanceof Error)&&(Ut(jt),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ct||"React class",et,Lt,typeof Nt),Ut(null)),Nt instanceof Error&&!(Nt.message in Ke)&&(Ke[Nt.message]=!0,Ut(jt),v("Failed %s type: %s",et,Nt.message),Ut(null))}}}var Ve=Array.isArray;function Xe(ae){return Ve(ae)}function Te(ae){{var Be=typeof Symbol=="function"&&Symbol.toStringTag,et=Be&&ae[Symbol.toStringTag]||ae.constructor.name||"Object";return et}}function lt(ae){try{return dt(ae),!1}catch{return!0}}function dt(ae){return""+ae}function $(ae){if(lt(ae))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Te(ae)),dt(ae)}var at=p.ReactCurrentOwner,De={key:!0,ref:!0,__self:!0,__source:!0},We,be,Pe;Pe={};function He(ae){if(At.call(ae,"ref")){var Be=Object.getOwnPropertyDescriptor(ae,"ref").get;if(Be&&Be.isReactWarning)return!1}return ae.ref!==void 0}function Ot(ae){if(At.call(ae,"key")){var Be=Object.getOwnPropertyDescriptor(ae,"key").get;if(Be&&Be.isReactWarning)return!1}return ae.key!==void 0}function Le(ae,Be){if(typeof ae.ref=="string"&&at.current&&Be&&at.current.stateNode!==Be){var et=B(at.current.type);Pe[et]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(at.current.type),ae.ref),Pe[et]=!0)}}function ve(ae,Be){{var et=function(){We||(We=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Be))};et.isReactWarning=!0,Object.defineProperty(ae,"key",{get:et,configurable:!0})}}function xt(ae,Be){{var et=function(){be||(be=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Be))};et.isReactWarning=!0,Object.defineProperty(ae,"ref",{get:et,configurable:!0})}}var Kt=function(ae,Be,et,Ct,jt,Rt,Lt){var Nt={$$typeof:s,type:ae,key:Be,ref:et,props:Lt,_owner:Rt};return Nt._store={},Object.defineProperty(Nt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Nt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ct}),Object.defineProperty(Nt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:jt}),Object.freeze&&(Object.freeze(Nt.props),Object.freeze(Nt)),Nt};function ot(ae,Be,et,Ct,jt){{var Rt,Lt={},Nt=null,$n=null;et!==void 0&&($(et),Nt=""+et),Ot(Be)&&($(Be.key),Nt=""+Be.key),He(Be)&&($n=Be.ref,Le(Be,jt));for(Rt in Be)At.call(Be,Rt)&&!De.hasOwnProperty(Rt)&&(Lt[Rt]=Be[Rt]);if(ae&&ae.defaultProps){var Bt=ae.defaultProps;for(Rt in Bt)Lt[Rt]===void 0&&(Lt[Rt]=Bt[Rt])}if(Nt||$n){var fn=typeof ae=="function"?ae.displayName||ae.name||"Unknown":ae;Nt&&ve(Lt,fn),$n&&xt(Lt,fn)}return Kt(ae,Nt,$n,jt,Ct,at.current,Lt)}}var Tt=p.ReactCurrentOwner,Qt=p.ReactDebugCurrentFrame;function Vt(ae){if(ae){var Be=ae._owner,et=ut(ae.type,ae._source,Be?Be.type:null);Qt.setExtraStackFrame(et)}else Qt.setExtraStackFrame(null)}var Fn;Fn=!1;function mn(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===s}function xi(){{if(Tt.current){var ae=B(Tt.current.type);if(ae)return`
|
|
44
|
+
|
|
45
|
+
Check the render method of \``+ae+"`."}return""}}function ci(ae){{if(ae!==void 0){var Be=ae.fileName.replace(/^.*[\\\/]/,""),et=ae.lineNumber;return`
|
|
46
|
+
|
|
47
|
+
Check your code at `+Be+":"+et+"."}return""}}var Hn={};function vi(ae){{var Be=xi();if(!Be){var et=typeof ae=="string"?ae:ae.displayName||ae.name;et&&(Be=`
|
|
48
|
+
|
|
49
|
+
Check the top-level render call using <`+et+">.")}return Be}}function Yn(ae,Be){{if(!ae._store||ae._store.validated||ae.key!=null)return;ae._store.validated=!0;var et=vi(Be);if(Hn[et])return;Hn[et]=!0;var Ct="";ae&&ae._owner&&ae._owner!==Tt.current&&(Ct=" It was passed a child from "+B(ae._owner.type)+"."),Vt(ae),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',et,Ct),Vt(null)}}function st(ae,Be){{if(typeof ae!="object")return;if(Xe(ae))for(var et=0;et<ae.length;et++){var Ct=ae[et];mn(Ct)&&Yn(Ct,Be)}else if(mn(ae))ae._store&&(ae._store.validated=!0);else if(ae){var jt=c(ae);if(typeof jt=="function"&&jt!==ae.entries)for(var Rt=jt.call(ae),Lt;!(Lt=Rt.next()).done;)mn(Lt.value)&&Yn(Lt.value,Be)}}}function tn(ae){{var Be=ae.type;if(Be==null||typeof Be=="string")return;var et;if(typeof Be=="function")et=Be.propTypes;else if(typeof Be=="object"&&(Be.$$typeof===d||Be.$$typeof===h))et=Be.propTypes;else return;if(et){var Ct=B(Be);xe(et,ae.props,"prop",Ct,ae)}else if(Be.PropTypes!==void 0&&!Fn){Fn=!0;var jt=B(Be);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",jt||"Unknown")}typeof Be.getDefaultProps=="function"&&!Be.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pt(ae){{for(var Be=Object.keys(ae.props),et=0;et<Be.length;et++){var Ct=Be[et];if(Ct!=="children"&&Ct!=="key"){Vt(ae),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ct),Vt(null);break}}ae.ref!==null&&(Vt(ae),v("Invalid attribute `ref` supplied to `React.Fragment`."),Vt(null))}}var Tn={};function Sn(ae,Be,et,Ct,jt,Rt){{var Lt=O(ae);if(!Lt){var Nt="";(ae===void 0||typeof ae=="object"&&ae!==null&&Object.keys(ae).length===0)&&(Nt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var $n=ci(jt);$n?Nt+=$n:Nt+=xi();var Bt;ae===null?Bt="null":Xe(ae)?Bt="array":ae!==void 0&&ae.$$typeof===s?(Bt="<"+(B(ae.type)||"Unknown")+" />",Nt=" Did you accidentally export a JSX literal instead of a component?"):Bt=typeof ae,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Bt,Nt)}var fn=ot(ae,Be,et,jt,Rt);if(fn==null)return fn;if(Lt){var ni=Be.children;if(ni!==void 0)if(Ct)if(Xe(ni)){for(var Xn=0;Xn<ni.length;Xn++)st(ni[Xn],ae);Object.freeze&&Object.freeze(ni)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else st(ni,ae)}if(At.call(Be,"key")){var Ui=B(ae),wn=Object.keys(Be).filter(function(Ht){return Ht!=="key"}),gi=wn.length>0?"{key: someKey, "+wn.join(": ..., ")+": ...}":"{key: someKey}";if(!Tn[Ui+gi]){var Ni=wn.length>0?"{"+wn.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
|
|
50
|
+
let props = %s;
|
|
51
|
+
<%s {...props} />
|
|
52
|
+
React keys must be passed directly to JSX without using spread:
|
|
53
|
+
let props = %s;
|
|
54
|
+
<%s key={someKey} {...props} />`,gi,Ui,Ni,Ui),Tn[Ui+gi]=!0}}return ae===m?Pt(fn):tn(fn),fn}}var zn=Sn;i_.Fragment=m,i_.jsxDEV=zn})();BS.exports=i_;var o=BS.exports,HS={exports:{}},ds={},zS={exports:{}},$S={};(function(i){/**
|
|
55
|
+
* @license React
|
|
56
|
+
* scheduler.development.js
|
|
57
|
+
*
|
|
58
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the MIT license found in the
|
|
61
|
+
* LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var s=!1,l=5;function m(be,Pe){var He=be.length;be.push(Pe),b(be,Pe,He)}function S(be){return be.length===0?null:be[0]}function D(be){if(be.length===0)return null;var Pe=be[0],He=be.pop();return He!==Pe&&(be[0]=He,a(be,He,0)),Pe}function b(be,Pe,He){for(var Ot=He;Ot>0;){var Le=Ot-1>>>1,ve=be[Le];if(d(ve,Pe)>0)be[Le]=Pe,be[Ot]=ve,Ot=Le;else return}}function a(be,Pe,He){for(var Ot=He,Le=be.length,ve=Le>>>1;Ot<ve;){var xt=(Ot+1)*2-1,Kt=be[xt],ot=xt+1,Tt=be[ot];if(d(Kt,Pe)<0)ot<Le&&d(Tt,Kt)<0?(be[Ot]=Tt,be[ot]=Pe,Ot=ot):(be[Ot]=Kt,be[xt]=Pe,Ot=xt);else if(ot<Le&&d(Tt,Pe)<0)be[Ot]=Tt,be[ot]=Pe,Ot=ot;else return}}function d(be,Pe){var He=be.sortIndex-Pe.sortIndex;return He!==0?He:be.id-Pe.id}var f=1,w=2,h=3,_=4,N=5;function C(be,Pe){}var y=typeof performance=="object"&&typeof performance.now=="function";if(y){var c=performance;i.unstable_now=function(){return c.now()}}else{var p=Date,v=p.now();i.unstable_now=function(){return p.now()-v}}var g=1073741823,E=-1,R=250,j=5e3,A=1e4,k=g,L=[],O=[],H=1,V=null,B=h,q=!1,ne=!1,Y=!1,J=typeof setTimeout=="function"?setTimeout:null,ee=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function W(be){for(var Pe=S(O);Pe!==null;){if(Pe.callback===null)D(O);else if(Pe.startTime<=be)D(O),Pe.sortIndex=Pe.expirationTime,m(L,Pe);else return;Pe=S(O)}}function Q(be){if(Y=!1,W(be),!ne)if(S(L)!==null)ne=!0,dt(K);else{var Pe=S(O);Pe!==null&&$(Q,Pe.startTime-be)}}function K(be,Pe){ne=!1,Y&&(Y=!1,at()),q=!0;var He=B;try{var Ot;if(!s)return he(be,Pe)}finally{V=null,B=He,q=!1}}function he(be,Pe){var He=Pe;for(W(He),V=S(L);V!==null&&!(V.expirationTime>He&&(!be||qt()));){var Ot=V.callback;if(typeof Ot=="function"){V.callback=null,B=V.priorityLevel;var Le=V.expirationTime<=He,ve=Ot(Le);He=i.unstable_now(),typeof ve=="function"?V.callback=ve:V===S(L)&&D(L),W(He)}else D(L);V=S(L)}if(V!==null)return!0;var xt=S(O);return xt!==null&&$(Q,xt.startTime-He),!1}function ce(be,Pe){switch(be){case f:case w:case h:case _:case N:break;default:be=h}var He=B;B=be;try{return Pe()}finally{B=He}}function ke(be){var Pe;switch(B){case f:case w:case h:Pe=h;break;default:Pe=B;break}var He=B;B=Pe;try{return be()}finally{B=He}}function we(be){var Pe=B;return function(){var He=B;B=Pe;try{return be.apply(this,arguments)}finally{B=He}}}function re(be,Pe,He){var Ot=i.unstable_now(),Le;if(typeof He=="object"&&He!==null){var ve=He.delay;typeof ve=="number"&&ve>0?Le=Ot+ve:Le=Ot}else Le=Ot;var xt;switch(be){case f:xt=E;break;case w:xt=R;break;case N:xt=k;break;case _:xt=A;break;case h:default:xt=j;break}var Kt=Le+xt,ot={id:H++,callback:Pe,priorityLevel:be,startTime:Le,expirationTime:Kt,sortIndex:-1};return Le>Ot?(ot.sortIndex=Le,m(O,ot),S(L)===null&&ot===S(O)&&(Y?at():Y=!0,$(Q,Le-Ot))):(ot.sortIndex=Kt,m(L,ot),!ne&&!q&&(ne=!0,dt(K))),ot}function G(){}function ge(){!ne&&!q&&(ne=!0,dt(K))}function de(){return S(L)}function pe(be){be.callback=null}function Ne(){return B}var Ie=!1,Ze=null,ut=-1,At=l,Ke=-1;function qt(){var be=i.unstable_now()-Ke;return!(be<At)}function Ut(){}function xe(be){if(be<0||be>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}be>0?At=Math.floor(1e3/be):At=l}var Ve=function(){if(Ze!==null){var be=i.unstable_now();Ke=be;var Pe=!0,He=!0;try{He=Ze(Pe,be)}finally{He?Xe():(Ie=!1,Ze=null)}}else Ie=!1},Xe;if(typeof P=="function")Xe=function(){P(Ve)};else if(typeof MessageChannel<"u"){var Te=new MessageChannel,lt=Te.port2;Te.port1.onmessage=Ve,Xe=function(){lt.postMessage(null)}}else Xe=function(){J(Ve,0)};function dt(be){Ze=be,Ie||(Ie=!0,Xe())}function $(be,Pe){ut=J(function(){be(i.unstable_now())},Pe)}function at(){ee(ut),ut=-1}var De=Ut,We=null;i.unstable_IdlePriority=N,i.unstable_ImmediatePriority=f,i.unstable_LowPriority=_,i.unstable_NormalPriority=h,i.unstable_Profiling=We,i.unstable_UserBlockingPriority=w,i.unstable_cancelCallback=pe,i.unstable_continueExecution=ge,i.unstable_forceFrameRate=xe,i.unstable_getCurrentPriorityLevel=Ne,i.unstable_getFirstCallbackNode=de,i.unstable_next=ke,i.unstable_pauseExecution=G,i.unstable_requestPaint=De,i.unstable_runWithPriority=ce,i.unstable_scheduleCallback=re,i.unstable_shouldYield=qt,i.unstable_wrapCallback=we,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})($S);zS.exports=$S;var tM=zS.exports;/**
|
|
63
|
+
* @license React
|
|
64
|
+
* react-dom.development.js
|
|
65
|
+
*
|
|
66
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the MIT license found in the
|
|
69
|
+
* LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var i=M,s=tM,l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,m=!1;function S(e){m=e}function D(e){if(!m){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a("warn",e,n)}}function b(e){if(!m){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a("error",e,n)}}function a(e,t,n){{var r=l.ReactDebugCurrentFrame,u=r.getStackAddendum();u!==""&&(t+="%s",n=n.concat([u]));var x=n.map(function(T){return String(T)});x.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,x)}}var d=0,f=1,w=2,h=3,_=4,N=5,C=6,y=7,c=8,p=9,v=10,g=11,E=12,R=13,j=14,A=15,k=16,L=17,O=18,H=19,V=21,B=22,q=23,ne=24,Y=25,J=!0,ee=!1,P=!1,W=!1,Q=!1,K=!0,he=!0,ce=!0,ke=!0,we=new Set,re={},G={};function ge(e,t){de(e,t),de(e+"Capture",t)}function de(e,t){re[e]&&b("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),re[e]=t;{var n=e.toLowerCase();G[n]=e,e==="onDoubleClick"&&(G.ondblclick=e)}for(var r=0;r<t.length;r++)we.add(t[r])}var pe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ne=Object.prototype.hasOwnProperty;function Ie(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Ze(e){try{return ut(e),!1}catch{return!0}}function ut(e){return""+e}function At(e,t){if(Ze(e))return b("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Ie(e)),ut(e)}function Ke(e){if(Ze(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ie(e)),ut(e)}function qt(e,t){if(Ze(e))return b("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Ie(e)),ut(e)}function Ut(e,t){if(Ze(e))return b("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Ie(e)),ut(e)}function xe(e){if(Ze(e))return b("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",Ie(e)),ut(e)}function Ve(e){if(Ze(e))return b("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",Ie(e)),ut(e)}var Xe=0,Te=1,lt=2,dt=3,$=4,at=5,De=6,We=":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",be=We+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Pe=new RegExp("^["+We+"]["+be+"]*$"),He={},Ot={};function Le(e){return Ne.call(Ot,e)?!0:Ne.call(He,e)?!1:Pe.test(e)?(Ot[e]=!0,!0):(He[e]=!0,b("Invalid attribute name: `%s`",e),!1)}function ve(e,t,n){return t!==null?t.type===Xe:n?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function xt(e,t,n,r){if(n!==null&&n.type===Xe)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(r)return!1;if(n!==null)return!n.acceptsBooleans;var u=e.toLowerCase().slice(0,5);return u!=="data-"&&u!=="aria-"}default:return!1}}function Kt(e,t,n,r){if(t===null||typeof t>"u"||xt(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case dt:return!t;case $:return t===!1;case at:return isNaN(t);case De:return isNaN(t)||t<1}return!1}function ot(e){return Qt.hasOwnProperty(e)?Qt[e]:null}function Tt(e,t,n,r,u,x,T){this.acceptsBooleans=t===lt||t===dt||t===$,this.attributeName=r,this.attributeNamespace=u,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=x,this.removeEmptyString=T}var Qt={},Vt=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Vt.forEach(function(e){Qt[e]=new Tt(e,Xe,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],n=e[1];Qt[t]=new Tt(t,Te,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Qt[e]=new Tt(e,lt,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Qt[e]=new Tt(e,lt,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){Qt[e]=new Tt(e,dt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Qt[e]=new Tt(e,dt,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Qt[e]=new Tt(e,$,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Qt[e]=new Tt(e,De,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Qt[e]=new Tt(e,at,!1,e.toLowerCase(),null,!1,!1)});var Fn=/[\-\:]([a-z])/g,mn=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(e){var t=e.replace(Fn,mn);Qt[t]=new Tt(t,Te,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(Fn,mn);Qt[t]=new Tt(t,Te,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fn,mn);Qt[t]=new Tt(t,Te,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Qt[e]=new Tt(e,Te,!1,e.toLowerCase(),null,!1,!1)});var xi="xlinkHref";Qt[xi]=new Tt("xlinkHref",Te,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Qt[e]=new Tt(e,Te,!1,e.toLowerCase(),null,!0,!0)});var ci=/^[\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,Hn=!1;function vi(e){!Hn&&ci.test(e)&&(Hn=!0,b("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function Yn(e,t,n,r){if(r.mustUseProperty){var u=r.propertyName;return e[u]}else{At(n,t),r.sanitizeURL&&vi(""+n);var x=r.attributeName,T=null;if(r.type===$){if(e.hasAttribute(x)){var I=e.getAttribute(x);return I===""?!0:Kt(t,n,r,!1)?I:I===""+n?n:I}}else if(e.hasAttribute(x)){if(Kt(t,n,r,!1))return e.getAttribute(x);if(r.type===dt)return n;T=e.getAttribute(x)}return Kt(t,n,r,!1)?T===null?n:T:T===""+n?n:T}}function st(e,t,n,r){{if(!Le(t))return;if(!e.hasAttribute(t))return n===void 0?void 0:null;var u=e.getAttribute(t);return At(n,t),u===""+n?n:u}}function tn(e,t,n,r){var u=ot(t);if(!ve(t,u,r)){if(Kt(t,n,u,r)&&(n=null),r||u===null){if(Le(t)){var x=t;n===null?e.removeAttribute(x):(At(n,t),e.setAttribute(x,""+n))}return}var T=u.mustUseProperty;if(T){var I=u.propertyName;if(n===null){var F=u.type;e[I]=F===dt?!1:""}else e[I]=n;return}var X=u.attributeName,te=u.attributeNamespace;if(n===null)e.removeAttribute(X);else{var fe=u.type,me;fe===dt||fe===$&&n===!0?me="":(At(n,X),me=""+n,u.sanitizeURL&&vi(me.toString())),te?e.setAttributeNS(te,X,me):e.setAttribute(X,me)}}}var Pt=Symbol.for("react.element"),Tn=Symbol.for("react.portal"),Sn=Symbol.for("react.fragment"),zn=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),Be=Symbol.for("react.provider"),et=Symbol.for("react.context"),Ct=Symbol.for("react.forward_ref"),jt=Symbol.for("react.suspense"),Rt=Symbol.for("react.suspense_list"),Lt=Symbol.for("react.memo"),Nt=Symbol.for("react.lazy"),$n=Symbol.for("react.scope"),Bt=Symbol.for("react.debug_trace_mode"),fn=Symbol.for("react.offscreen"),ni=Symbol.for("react.legacy_hidden"),Xn=Symbol.for("react.cache"),Ui=Symbol.for("react.tracing_marker"),wn=Symbol.iterator,gi="@@iterator";function Ni(e){if(e===null||typeof e!="object")return null;var t=wn&&e[wn]||e[gi];return typeof t=="function"?t:null}var Ht=Object.assign,Gi=0,Si,pt,ie,Re,nt,hn,Ft;function $t(){}$t.__reactDisabledLog=!0;function vn(){{if(Gi===0){Si=console.log,pt=console.info,ie=console.warn,Re=console.error,nt=console.group,hn=console.groupCollapsed,Ft=console.groupEnd;var e={configurable:!0,enumerable:!0,value:$t,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Gi++}}function ai(){{if(Gi--,Gi===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ht({},e,{value:Si}),info:Ht({},e,{value:pt}),warn:Ht({},e,{value:ie}),error:Ht({},e,{value:Re}),group:Ht({},e,{value:nt}),groupCollapsed:Ht({},e,{value:hn}),groupEnd:Ht({},e,{value:Ft})})}Gi<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Wn=l.ReactCurrentDispatcher,rr;function En(e,t,n){{if(rr===void 0)try{throw Error()}catch(u){var r=u.stack.trim().match(/\n( *(at )?)/);rr=r&&r[1]||""}return`
|
|
71
|
+
`+rr+e}}var Oi=!1,ji;{var Ar=typeof WeakMap=="function"?WeakMap:Map;ji=new Ar}function qi(e,t){if(!e||Oi)return"";{var n=ji.get(e);if(n!==void 0)return n}var r;Oi=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=Wn.current,Wn.current=null,vn();try{if(t){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(je){r=je}Reflect.construct(e,[],T)}else{try{T.call()}catch(je){r=je}e.call(T.prototype)}}else{try{throw Error()}catch(je){r=je}e()}}catch(je){if(je&&r&&typeof je.stack=="string"){for(var I=je.stack.split(`
|
|
72
|
+
`),F=r.stack.split(`
|
|
73
|
+
`),X=I.length-1,te=F.length-1;X>=1&&te>=0&&I[X]!==F[te];)te--;for(;X>=1&&te>=0;X--,te--)if(I[X]!==F[te]){if(X!==1||te!==1)do if(X--,te--,te<0||I[X]!==F[te]){var fe=`
|
|
74
|
+
`+I[X].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),typeof e=="function"&&ji.set(e,fe),fe}while(X>=1&&te>=0);break}}}finally{Oi=!1,Wn.current=x,ai(),Error.prepareStackTrace=u}var me=e?e.displayName||e.name:"",Ee=me?En(me):"";return typeof e=="function"&&ji.set(e,Ee),Ee}function Gr(e,t,n){return qi(e,!0)}function ms(e,t,n){return qi(e,!1)}function fs(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function wi(e,t,n){if(e==null)return"";if(typeof e=="function")return qi(e,fs(e));if(typeof e=="string")return En(e);switch(e){case jt:return En("Suspense");case Rt:return En("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case Ct:return ms(e.render);case Lt:return wi(e.type,t,n);case Nt:{var r=e,u=r._payload,x=r._init;try{return wi(x(u),t,n)}catch{}}}return""}function se(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case N:return En(e.type);case k:return En("Lazy");case R:return En("Suspense");case H:return En("SuspenseList");case d:case w:case A:return ms(e.type);case g:return ms(e.type.render);case f:return Gr(e.type);default:return""}}function Me(e){try{var t="",n=e;do t+=se(n),n=n.return;while(n);return t}catch(r){return`
|
|
75
|
+
Error generating stack: `+r.message+`
|
|
76
|
+
`+r.stack}}function tt(e,t,n){var r=e.displayName;if(r)return r;var u=t.displayName||t.name||"";return u!==""?n+"("+u+")":n}function vt(e){return e.displayName||"Context"}function Dt(e){if(e==null)return null;if(typeof e.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sn:return"Fragment";case Tn:return"Portal";case ae:return"Profiler";case zn:return"StrictMode";case jt:return"Suspense";case Rt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case et:var t=e;return vt(t)+".Consumer";case Be:var n=e;return vt(n._context)+".Provider";case Ct:return tt(e,e.render,"ForwardRef");case Lt:var r=e.displayName||null;return r!==null?r:Dt(e.type)||"Memo";case Nt:{var u=e,x=u._payload,T=u._init;try{return Dt(T(x))}catch{return null}}}return null}function Vi(e,t,n){var r=t.displayName||t.name||"";return e.displayName||(r!==""?n+"("+r+")":n)}function Ii(e){return e.displayName||"Context"}function ft(e){var t=e.tag,n=e.type;switch(t){case ne:return"Cache";case p:var r=n;return Ii(r)+".Consumer";case v:var u=n;return Ii(u._context)+".Provider";case O:return"DehydratedFragment";case g:return Vi(n,n.render,"ForwardRef");case y:return"Fragment";case N:return n;case _:return"Portal";case h:return"Root";case C:return"Text";case k:return Dt(n);case c:return n===zn?"StrictMode":"Mode";case B:return"Offscreen";case E:return"Profiler";case V:return"Scope";case R:return"Suspense";case H:return"SuspenseList";case Y:return"TracingMarker";case f:case d:case L:case w:case j:case A:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break}return null}var ui=l.ReactDebugCurrentFrame,An=null,di=!1;function hi(){{if(An===null)return null;var e=An._debugOwner;if(e!==null&&typeof e<"u")return ft(e)}return null}function ii(){return An===null?"":Me(An)}function cn(){ui.getCurrentStack=null,An=null,di=!1}function un(e){ui.getCurrentStack=e===null?null:ii,An=e,di=!1}function sr(){return An}function Kn(e){di=e}function Vn(e){return""+e}function Di(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Ve(e),e;default:return""}}var ps={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Mr(e,t){ps[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||b("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||b("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function fa(e){var t=e.type,n=e.nodeName;return n&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jn(e){return e._valueTracker}function vs(e){e._valueTracker=null}function rn(e){var t="";return e&&(fa(e)?t=e.checked?"true":"false":t=e.value),t}function ki(e){var t=fa(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Ve(e[t]);var r=""+e[t];if(!(e.hasOwnProperty(t)||typeof n>"u"||typeof n.get!="function"||typeof n.set!="function")){var u=n.get,x=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(I){Ve(I),r=""+I,x.call(this,I)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var T={getValue:function(){return r},setValue:function(I){Ve(I),r=""+I},stopTracking:function(){vs(e),delete e[t]}};return T}}function Sr(e){jn(e)||(e._valueTracker=ki(e))}function $s(e){if(!e)return!1;var t=jn(e);if(!t)return!0;var n=t.getValue(),r=rn(e);return r!==n?(t.setValue(r),!0):!1}function qr(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}}var Cs=!1,js=!1,ns=!1,Ei=!1;function Er(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function Ur(e,t){var n=e,r=t.checked,u=Ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??n._wrapperState.initialChecked});return u}function Ri(e,t){Mr("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!js&&(b("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",hi()||"A component",t.type),js=!0),t.value!==void 0&&t.defaultValue!==void 0&&!Cs&&(b("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",hi()||"A component",t.type),Cs=!0);var n=e,r=t.defaultValue==null?"":t.defaultValue;n._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:Di(t.value!=null?t.value:r),controlled:Er(t)}}function z(e,t){var n=e,r=t.checked;r!=null&&tn(n,"checked",r,!1)}function oe(e,t){var n=e;{var r=Er(t);!n._wrapperState.controlled&&r&&!Ei&&(b("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Ei=!0),n._wrapperState.controlled&&!r&&!ns&&(b("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),ns=!0)}z(e,t);var u=Di(t.value),x=t.type;if(u!=null)x==="number"?(u===0&&n.value===""||n.value!=u)&&(n.value=Vn(u)):n.value!==Vn(u)&&(n.value=Vn(u));else if(x==="submit"||x==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?It(n,t.type,u):t.hasOwnProperty("defaultValue")&&It(n,t.type,Di(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function Se(e,t,n){var r=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var u=t.type,x=u==="submit"||u==="reset";if(x&&(t.value===void 0||t.value===null))return;var T=Vn(r._wrapperState.initialValue);n||T!==r.value&&(r.value=T),r.defaultValue=T}var I=r.name;I!==""&&(r.name=""),r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!r._wrapperState.initialChecked,I!==""&&(r.name=I)}function Ae(e,t){var n=e;oe(n,t),it(n,t)}function it(e,t){var n=t.name;if(t.type==="radio"&&n!=null){for(var r=e;r.parentNode;)r=r.parentNode;At(n,"name");for(var u=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),x=0;x<u.length;x++){var T=u[x];if(!(T===e||T.form!==e.form)){var I=Uh(T);if(!I)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");$s(T),oe(T,I)}}}}function It(e,t,n){(t!=="number"||qr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=Vn(e._wrapperState.initialValue):e.defaultValue!==Vn(n)&&(e.defaultValue=Vn(n)))}var _t=!1,Xt=!1,pn=!1;function Ln(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?i.Children.forEach(t.children,function(n){n!=null&&(typeof n=="string"||typeof n=="number"||Xt||(Xt=!0,b("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&(pn||(pn=!0,b("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!_t&&(b("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),_t=!0)}function xn(e,t){t.value!=null&&e.setAttribute("value",Vn(Di(t.value)))}var Pn=Array.isArray;function nn(e){return Pn(e)}var oi;oi=!1;function bi(){var e=hi();return e?`
|
|
77
|
+
|
|
78
|
+
Check the render method of \``+e+"`.":""}var Ds=["value","defaultValue"];function mi(e){{Mr("select",e);for(var t=0;t<Ds.length;t++){var n=Ds[t];if(e[n]!=null){var r=nn(e[n]);e.multiple&&!r?b("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,bi()):!e.multiple&&r&&b("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,bi())}}}}function Or(e,t,n,r){var u=e.options;if(t){for(var x=n,T={},I=0;I<x.length;I++)T["$"+x[I]]=!0;for(var F=0;F<u.length;F++){var X=T.hasOwnProperty("$"+u[F].value);u[F].selected!==X&&(u[F].selected=X),X&&r&&(u[F].defaultSelected=!0)}}else{for(var te=Vn(Di(n)),fe=null,me=0;me<u.length;me++){if(u[me].value===te){u[me].selected=!0,r&&(u[me].defaultSelected=!0);return}fe===null&&!u[me].disabled&&(fe=u[me])}fe!==null&&(fe.selected=!0)}}function Ws(e,t){return Ht({},t,{value:void 0})}function Gs(e,t){var n=e;mi(t),n._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!oi&&(b("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),oi=!0)}function ue(e,t){var n=e;n.multiple=!!t.multiple;var r=t.value;r!=null?Or(n,!!t.multiple,r,!1):t.defaultValue!=null&&Or(n,!!t.multiple,t.defaultValue,!0)}function $e(e,t){var n=e,r=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var u=t.value;u!=null?Or(n,!!t.multiple,u,!1):r!==!!t.multiple&&(t.defaultValue!=null?Or(n,!!t.multiple,t.defaultValue,!0):Or(n,!!t.multiple,t.multiple?[]:"",!1))}function Je(e,t){var n=e,r=t.value;r!=null&&Or(n,!!t.multiple,r,!1)}var rt=!1;function ht(e,t){var n=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var r=Ht({},t,{value:void 0,defaultValue:void 0,children:Vn(n._wrapperState.initialValue)});return r}function Wt(e,t){var n=e;Mr("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!rt&&(b("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",hi()||"A component"),rt=!0);var r=t.value;if(r==null){var u=t.children,x=t.defaultValue;if(u!=null){b("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(x!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(nn(u)){if(u.length>1)throw new Error("<textarea> can only have at most one child.");u=u[0]}x=u}}x==null&&(x=""),r=x}n._wrapperState={initialValue:Di(r)}}function Gt(e,t){var n=e,r=Di(t.value),u=Di(t.defaultValue);if(r!=null){var x=Vn(r);x!==n.value&&(n.value=x),t.defaultValue==null&&n.defaultValue!==x&&(n.defaultValue=x)}u!=null&&(n.defaultValue=Vn(u))}function dn(e,t){var n=e,r=n.textContent;r===n._wrapperState.initialValue&&r!==""&&r!==null&&(n.value=r)}function ri(e,t){Gt(e,t)}var Jt="http://www.w3.org/1999/xhtml",Jn="http://www.w3.org/1998/Math/MathML",Gn="http://www.w3.org/2000/svg";function Ti(e){switch(e){case"svg":return Gn;case"math":return Jn;default:return Jt}}function hr(e,t){return e==null||e===Jt?Ti(t):e===Gn&&t==="foreignObject"?Jt:e}var ks=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,u){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,u)})}:e},Yr,qs=ks(function(e,t){if(e.namespaceURI===Gn&&!("innerHTML"in e)){Yr=Yr||document.createElement("div"),Yr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=Yr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild);return}e.innerHTML=t}),Bi=1,Yi=3,si=8,ar=9,xc=11,Ba=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===Yi){n.nodeValue=t;return}}e.textContent=t},Pf={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},Fa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function If(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var Td=["Webkit","ms","Moz","O"];Object.keys(Fa).forEach(function(e){Td.forEach(function(t){Fa[If(t,e)]=Fa[e]})});function Nc(e,t,n){var r=t==null||typeof t=="boolean"||t==="";return r?"":!n&&typeof t=="number"&&t!==0&&!(Fa.hasOwnProperty(e)&&Fa[e])?t+"px":(Ut(t,e),(""+t).trim())}var Sc=/([A-Z])/g,Ec=/^ms-/;function Cc(e){return e.replace(Sc,"-$1").toLowerCase().replace(Ec,"-ms-")}var ml=function(){};{var Ld=/^(?:webkit|moz|o)[A-Z]/,Bf=/^-ms-/,Ff=/-(.)/g,yo=/;\s*$/,pa={},fl={},pl=!1,Ad=!1,jc=function(e){return e.replace(Ff,function(t,n){return n.toUpperCase()})},Hf=function(e){pa.hasOwnProperty(e)&&pa[e]||(pa[e]=!0,b("Unsupported style property %s. Did you mean %s?",e,jc(e.replace(Bf,"ms-"))))},zf=function(e){pa.hasOwnProperty(e)&&pa[e]||(pa[e]=!0,b("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},Md=function(e,t){fl.hasOwnProperty(t)&&fl[t]||(fl[t]=!0,b(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(yo,"")))},Ud=function(e,t){pl||(pl=!0,b("`NaN` is an invalid value for the `%s` css style property.",e))},$f=function(e,t){Ad||(Ad=!0,b("`Infinity` is an invalid value for the `%s` css style property.",e))};ml=function(e,t){e.indexOf("-")>-1?Hf(e):Ld.test(e)?zf(e):yo.test(t)&&Md(e,t),typeof t=="number"&&(isNaN(t)?Ud(e,t):isFinite(t)||$f(e,t))}}var Wf=ml;function Gf(e){{var t="",n="";for(var r in e)if(e.hasOwnProperty(r)){var u=e[r];if(u!=null){var x=r.indexOf("--")===0;t+=n+(x?r:Cc(r))+":",t+=Nc(r,u,x),n=";"}}return t||null}}function Od(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var u=r.indexOf("--")===0;u||Wf(r,t[r]);var x=Nc(r,t[r],u);r==="float"&&(r="cssFloat"),u?n.setProperty(r,x):n[r]=x}}function Dc(e){return e==null||typeof e=="boolean"||e===""}function Vd(e){var t={};for(var n in e)for(var r=Pf[n]||[n],u=0;u<r.length;u++)t[r[u]]=n;return t}function qf(e,t){{if(!t)return;var n=Vd(e),r=Vd(t),u={};for(var x in n){var T=n[x],I=r[x];if(I&&T!==I){var F=T+","+I;if(u[F])continue;u[F]=!0,b("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",Dc(e[T])?"Removing":"Updating",T,I)}}}}var Pd={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Yf=Ht({menuitem:!0},Pd),Id="__html";function vl(e,t){if(t){if(Yf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw new Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof t.dangerouslySetInnerHTML!="object"||!(Id in t.dangerouslySetInnerHTML))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!t.suppressContentEditableWarning&&t.contentEditable&&t.children!=null&&b("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),t.style!=null&&typeof t.style!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function Ys(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 gl={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Bd={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Ha={},Fd=new RegExp("^(aria)-["+be+"]*$"),Kf=new RegExp("^(aria)[A-Z]["+be+"]*$");function Xf(e,t){{if(Ne.call(Ha,t)&&Ha[t])return!0;if(Kf.test(t)){var n="aria-"+t.slice(4).toLowerCase(),r=Bd.hasOwnProperty(n)?n:null;if(r==null)return b("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Ha[t]=!0,!0;if(t!==r)return b("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,r),Ha[t]=!0,!0}if(Fd.test(t)){var u=t.toLowerCase(),x=Bd.hasOwnProperty(u)?u:null;if(x==null)return Ha[t]=!0,!1;if(t!==x)return b("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,x),Ha[t]=!0,!0}}return!0}function Jf(e,t){{var n=[];for(var r in t){var u=Xf(e,r);u||n.push(r)}var x=n.map(function(T){return"`"+T+"`"}).join(", ");n.length===1?b("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",x,e):n.length>1&&b("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",x,e)}}function Hd(e,t){Ys(e,t)||Jf(e,t)}var kc=!1;function zd(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!kc&&(kc=!0,e==="select"&&t.multiple?b("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):b("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var Rc=function(){};{var or={},Tc=/^on./,$d=/^on[^A-Z]/,Wd=new RegExp("^(aria)-["+be+"]*$"),Gd=new RegExp("^(aria)[A-Z]["+be+"]*$");Rc=function(e,t,n,r){if(Ne.call(or,t)&&or[t])return!0;var u=t.toLowerCase();if(u==="onfocusin"||u==="onfocusout")return b("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),or[t]=!0,!0;if(r!=null){var x=r.registrationNameDependencies,T=r.possibleRegistrationNames;if(x.hasOwnProperty(t))return!0;var I=T.hasOwnProperty(u)?T[u]:null;if(I!=null)return b("Invalid event handler property `%s`. Did you mean `%s`?",t,I),or[t]=!0,!0;if(Tc.test(t))return b("Unknown event handler property `%s`. It will be ignored.",t),or[t]=!0,!0}else if(Tc.test(t))return $d.test(t)&&b("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),or[t]=!0,!0;if(Wd.test(t)||Gd.test(t))return!0;if(u==="innerhtml")return b("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),or[t]=!0,!0;if(u==="aria")return b("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),or[t]=!0,!0;if(u==="is"&&n!==null&&n!==void 0&&typeof n!="string")return b("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),or[t]=!0,!0;if(typeof n=="number"&&isNaN(n))return b("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),or[t]=!0,!0;var F=ot(t),X=F!==null&&F.type===Xe;if(gl.hasOwnProperty(u)){var te=gl[u];if(te!==t)return b("Invalid DOM property `%s`. Did you mean `%s`?",t,te),or[t]=!0,!0}else if(!X&&t!==u)return b("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,u),or[t]=!0,!0;return typeof n=="boolean"&&xt(t,n,F,!1)?(n?b('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):b('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),or[t]=!0,!0):X?!0:xt(t,n,F,!1)?(or[t]=!0,!1):((n==="false"||n==="true")&&F!==null&&F.type===dt&&(b("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,n==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),or[t]=!0),!0)}}var qd=function(e,t,n){{var r=[];for(var u in t){var x=Rc(e,u,t[u],n);x||r.push(u)}var T=r.map(function(I){return"`"+I+"`"}).join(", ");r.length===1?b("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",T,e):r.length>1&&b("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",T,e)}};function Yd(e,t,n){Ys(e,t)||qd(e,t,n)}var Lc=1,bl=2,za=4,Kd=Lc|bl|za,$a=null;function Xd(e){$a!==null&&b("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),$a=e}function Jd(){$a===null&&b("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),$a=null}function Zd(e){return e===$a}function _l(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===Yi?t.parentNode:t}var yl=null,va=null,ga=null;function Ac(e){var t=Qa(e);if(t){if(typeof yl!="function")throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var n=t.stateNode;if(n){var r=Uh(n);yl(t.stateNode,t.type,r)}}}function Qd(e){yl=e}function Mc(e){va?ga?ga.push(e):ga=[e]:va=e}function Z(){return va!==null||ga!==null}function le(){if(va){var e=va,t=ga;if(va=null,ga=null,Ac(e),t)for(var n=0;n<t.length;n++)Ac(t[n])}}var Ce=function(e,t){return e(t)},ze=function(){},Ge=!1;function qe(){var e=Z();e&&(ze(),le())}function Et(e,t,n){if(Ge)return e(t,n);Ge=!0;try{return Ce(e,t,n)}finally{Ge=!1,qe()}}function St(e,t,n){Ce=e,ze=n}function Mn(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function bn(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(n.disabled&&Mn(t));default:return!1}}function Fi(e,t){var n=e.stateNode;if(n===null)return null;var r=Uh(n);if(r===null)return null;var u=r[t];if(bn(t,e.type,r))return null;if(u&&typeof u!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof u+"` type.");return u}var mr=!1;if(pe)try{var Kr={};Object.defineProperty(Kr,"passive",{get:function(){mr=!0}}),window.addEventListener("test",Kr,Kr),window.removeEventListener("test",Kr,Kr)}catch{mr=!1}function Xr(e,t,n,r,u,x,T,I,F){var X=Array.prototype.slice.call(arguments,3);try{t.apply(n,X)}catch(te){this.onError(te)}}var Ks=Xr;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Zf=document.createElement("react");Ks=function(t,n,r,u,x,T,I,F,X){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var te=document.createEvent("Event"),fe=!1,me=!0,Ee=window.event,je=Object.getOwnPropertyDescriptor(window,"event");function Ue(){Zf.removeEventListener(Oe,zt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Ee)}var mt=Array.prototype.slice.call(arguments,3);function zt(){fe=!0,Ue(),n.apply(r,mt),me=!1}var Mt,Rn=!1,Nn=!1;function _e(ye){if(Mt=ye.error,Rn=!0,Mt===null&&ye.colno===0&&ye.lineno===0&&(Nn=!0),ye.defaultPrevented&&Mt!=null&&typeof Mt=="object")try{Mt._suppressLogging=!0}catch{}}var Oe="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",_e),Zf.addEventListener(Oe,zt,!1),te.initEvent(Oe,!1,!1),Zf.dispatchEvent(te),je&&Object.defineProperty(window,"event",je),fe&&me&&(Rn?Nn&&(Mt=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):Mt=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(Mt)),window.removeEventListener("error",_e),!fe)return Ue(),Xr.apply(this,arguments)}}var RC=Ks,wl=!1,eh=null,th=!1,Qf=null,TC={onError:function(e){wl=!0,eh=e}};function ep(e,t,n,r,u,x,T,I,F){wl=!1,eh=null,RC.apply(TC,arguments)}function LC(e,t,n,r,u,x,T,I,F){if(ep.apply(this,arguments),wl){var X=tp();th||(th=!0,Qf=X)}}function AC(){if(th){var e=Qf;throw th=!1,Qf=null,e}}function MC(){return wl}function tp(){if(wl){var e=eh;return wl=!1,eh=null,e}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function xl(e){return e._reactInternals}function UC(e){return e._reactInternals!==void 0}function OC(e,t){e._reactInternals=t}var Zt=0,Nl=1,Hi=2,In=4,wo=16,Uc=32,hy=64,Bn=128,ba=256,xo=512,Sl=1024,Wa=2048,_a=4096,No=8192,np=16384,VC=32767,nh=32768,Vr=65536,ip=131072,my=1048576,rp=2097152,So=4194304,sp=8388608,Ga=16777216,ap=33554432,op=In|Sl|0,lp=Hi|In|wo|Uc|xo|_a|No,Oc=In|hy|xo|No,El=Wa|wo,ya=So|sp|rp,PC=l.ReactCurrentOwner;function Eo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var r=t;do t=r,(t.flags&(Hi|_a))!==Zt&&(n=t.return),r=t.return;while(r)}return t.tag===h?n:null}function fy(e){if(e.tag===R){var t=e.memoizedState;if(t===null){var n=e.alternate;n!==null&&(t=n.memoizedState)}if(t!==null)return t.dehydrated}return null}function py(e){return e.tag===h?e.stateNode.containerInfo:null}function IC(e){return Eo(e)===e}function BC(e){{var t=PC.current;if(t!==null&&t.tag===f){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||b("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",ft(n)||"A component"),r._warnedAboutRefsInRender=!0}}var u=xl(e);return u?Eo(u)===u:!1}function vy(e){if(Eo(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function gy(e){var t=e.alternate;if(!t){var n=Eo(e);if(n===null)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var r=e,u=t;;){var x=r.return;if(x===null)break;var T=x.alternate;if(T===null){var I=x.return;if(I!==null){r=u=I;continue}break}if(x.child===T.child){for(var F=x.child;F;){if(F===r)return vy(x),e;if(F===u)return vy(x),t;F=F.sibling}throw new Error("Unable to find node on an unmounted component.")}if(r.return!==u.return)r=x,u=T;else{for(var X=!1,te=x.child;te;){if(te===r){X=!0,r=x,u=T;break}if(te===u){X=!0,u=x,r=T;break}te=te.sibling}if(!X){for(te=T.child;te;){if(te===r){X=!0,r=T,u=x;break}if(te===u){X=!0,u=T,r=x;break}te=te.sibling}if(!X)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==u)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag!==h)throw new Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?e:t}function by(e){var t=gy(e);return t!==null?_y(t):null}function _y(e){if(e.tag===N||e.tag===C)return e;for(var t=e.child;t!==null;){var n=_y(t);if(n!==null)return n;t=t.sibling}return null}function FC(e){var t=gy(e);return t!==null?yy(t):null}function yy(e){if(e.tag===N||e.tag===C)return e;for(var t=e.child;t!==null;){if(t.tag!==_){var n=yy(t);if(n!==null)return n}t=t.sibling}return null}var wy=s.unstable_scheduleCallback,HC=s.unstable_cancelCallback,zC=s.unstable_shouldYield,$C=s.unstable_requestPaint,lr=s.unstable_now,WC=s.unstable_getCurrentPriorityLevel,ih=s.unstable_ImmediatePriority,cp=s.unstable_UserBlockingPriority,Co=s.unstable_NormalPriority,GC=s.unstable_LowPriority,up=s.unstable_IdlePriority,qC=s.unstable_yieldValue,YC=s.unstable_setDisableYieldValue,Cl=null,Cr=null,bt=null,Xs=!1,Rs=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function KC(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return b("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{he&&(e=Ht({},e,{getLaneLabelMap:tj,injectProfilingHooks:ej})),Cl=t.inject(e),Cr=t}catch(n){b("React instrumentation encountered an error: %s.",n)}return!!t.checkDCE}function XC(e,t){if(Cr&&typeof Cr.onScheduleFiberRoot=="function")try{Cr.onScheduleFiberRoot(Cl,e,t)}catch(n){Xs||(Xs=!0,b("React instrumentation encountered an error: %s",n))}}function JC(e,t){if(Cr&&typeof Cr.onCommitFiberRoot=="function")try{var n=(e.current.flags&Bn)===Bn;if(ce){var r;switch(t){case ss:r=ih;break;case xa:r=cp;break;case Na:r=Co;break;case uh:r=up;break;default:r=Co;break}Cr.onCommitFiberRoot(Cl,e,r,n)}}catch(u){Xs||(Xs=!0,b("React instrumentation encountered an error: %s",u))}}function ZC(e){if(Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(Cl,e)}catch(t){Xs||(Xs=!0,b("React instrumentation encountered an error: %s",t))}}function QC(e){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Cl,e)}catch(t){Xs||(Xs=!0,b("React instrumentation encountered an error: %s",t))}}function cr(e){if(typeof qC=="function"&&(YC(e),S(e)),Cr&&typeof Cr.setStrictMode=="function")try{Cr.setStrictMode(Cl,e)}catch(t){Xs||(Xs=!0,b("React instrumentation encountered an error: %s",t))}}function ej(e){bt=e}function tj(){{for(var e=new Map,t=1,n=0;n<hp;n++){var r=wj(t);e.set(t,r),t*=2}return e}}function nj(e){bt!==null&&typeof bt.markCommitStarted=="function"&&bt.markCommitStarted(e)}function xy(){bt!==null&&typeof bt.markCommitStopped=="function"&&bt.markCommitStopped()}function Vc(e){bt!==null&&typeof bt.markComponentRenderStarted=="function"&&bt.markComponentRenderStarted(e)}function jl(){bt!==null&&typeof bt.markComponentRenderStopped=="function"&&bt.markComponentRenderStopped()}function ij(e){bt!==null&&typeof bt.markComponentPassiveEffectMountStarted=="function"&&bt.markComponentPassiveEffectMountStarted(e)}function rj(){bt!==null&&typeof bt.markComponentPassiveEffectMountStopped=="function"&&bt.markComponentPassiveEffectMountStopped()}function sj(e){bt!==null&&typeof bt.markComponentPassiveEffectUnmountStarted=="function"&&bt.markComponentPassiveEffectUnmountStarted(e)}function aj(){bt!==null&&typeof bt.markComponentPassiveEffectUnmountStopped=="function"&&bt.markComponentPassiveEffectUnmountStopped()}function oj(e){bt!==null&&typeof bt.markComponentLayoutEffectMountStarted=="function"&&bt.markComponentLayoutEffectMountStarted(e)}function lj(){bt!==null&&typeof bt.markComponentLayoutEffectMountStopped=="function"&&bt.markComponentLayoutEffectMountStopped()}function Ny(e){bt!==null&&typeof bt.markComponentLayoutEffectUnmountStarted=="function"&&bt.markComponentLayoutEffectUnmountStarted(e)}function Sy(){bt!==null&&typeof bt.markComponentLayoutEffectUnmountStopped=="function"&&bt.markComponentLayoutEffectUnmountStopped()}function cj(e,t,n){bt!==null&&typeof bt.markComponentErrored=="function"&&bt.markComponentErrored(e,t,n)}function uj(e,t,n){bt!==null&&typeof bt.markComponentSuspended=="function"&&bt.markComponentSuspended(e,t,n)}function dj(e){bt!==null&&typeof bt.markLayoutEffectsStarted=="function"&&bt.markLayoutEffectsStarted(e)}function hj(){bt!==null&&typeof bt.markLayoutEffectsStopped=="function"&&bt.markLayoutEffectsStopped()}function mj(e){bt!==null&&typeof bt.markPassiveEffectsStarted=="function"&&bt.markPassiveEffectsStarted(e)}function fj(){bt!==null&&typeof bt.markPassiveEffectsStopped=="function"&&bt.markPassiveEffectsStopped()}function Ey(e){bt!==null&&typeof bt.markRenderStarted=="function"&&bt.markRenderStarted(e)}function pj(){bt!==null&&typeof bt.markRenderYielded=="function"&&bt.markRenderYielded()}function Cy(){bt!==null&&typeof bt.markRenderStopped=="function"&&bt.markRenderStopped()}function vj(e){bt!==null&&typeof bt.markRenderScheduled=="function"&&bt.markRenderScheduled(e)}function gj(e,t){bt!==null&&typeof bt.markForceUpdateScheduled=="function"&&bt.markForceUpdateScheduled(e,t)}function dp(e,t){bt!==null&&typeof bt.markStateUpdateScheduled=="function"&&bt.markStateUpdateScheduled(e,t)}var Yt=0,Dn=1,Zn=2,Li=8,Js=16,jy=Math.clz32?Math.clz32:yj,bj=Math.log,_j=Math.LN2;function yj(e){var t=e>>>0;return t===0?32:31-(bj(t)/_j|0)|0}var hp=31,Ye=0,ur=0,sn=1,Dl=2,wa=4,jo=8,Zs=16,Pc=32,kl=4194240,Ic=64,mp=128,fp=256,pp=512,vp=1024,gp=2048,bp=4096,_p=8192,yp=16384,wp=32768,xp=65536,Np=131072,Sp=262144,Ep=524288,Cp=1048576,jp=2097152,rh=130023424,Rl=4194304,Dp=8388608,kp=16777216,Rp=33554432,Tp=67108864,Dy=Rl,Bc=134217728,ky=268435455,Fc=268435456,Do=536870912,is=1073741824;function wj(e){{if(e&sn)return"Sync";if(e&Dl)return"InputContinuousHydration";if(e&wa)return"InputContinuous";if(e&jo)return"DefaultHydration";if(e&Zs)return"Default";if(e&Pc)return"TransitionHydration";if(e&kl)return"Transition";if(e&rh)return"Retry";if(e&Bc)return"SelectiveHydration";if(e&Fc)return"IdleHydration";if(e&Do)return"Idle";if(e&is)return"Offscreen"}}var pi=-1,sh=Ic,ah=Rl;function Hc(e){switch(ko(e)){case sn:return sn;case Dl:return Dl;case wa:return wa;case jo:return jo;case Zs:return Zs;case Pc:return Pc;case Ic:case mp:case fp:case pp:case vp:case gp:case bp:case _p:case yp:case wp:case xp:case Np:case Sp:case Ep:case Cp:case jp:return e&kl;case Rl:case Dp:case kp:case Rp:case Tp:return e&rh;case Bc:return Bc;case Fc:return Fc;case Do:return Do;case is:return is;default:return b("Should have found matching lanes. This is a bug in React."),e}}function oh(e,t){var n=e.pendingLanes;if(n===Ye)return Ye;var r=Ye,u=e.suspendedLanes,x=e.pingedLanes,T=n&ky;if(T!==Ye){var I=T&~u;if(I!==Ye)r=Hc(I);else{var F=T&x;F!==Ye&&(r=Hc(F))}}else{var X=n&~u;X!==Ye?r=Hc(X):x!==Ye&&(r=Hc(x))}if(r===Ye)return Ye;if(t!==Ye&&t!==r&&(t&u)===Ye){var te=ko(r),fe=ko(t);if(te>=fe||te===Zs&&(fe&kl)!==Ye)return t}(r&wa)!==Ye&&(r|=n&Zs);var me=e.entangledLanes;if(me!==Ye)for(var Ee=e.entanglements,je=r&me;je>0;){var Ue=Ro(je),mt=1<<Ue;r|=Ee[Ue],je&=~mt}return r}function xj(e,t){for(var n=e.eventTimes,r=pi;t>0;){var u=Ro(t),x=1<<u,T=n[u];T>r&&(r=T),t&=~x}return r}function Nj(e,t){switch(e){case sn:case Dl:case wa:return t+250;case jo:case Zs:case Pc:case Ic:case mp:case fp:case pp:case vp:case gp:case bp:case _p:case yp:case wp:case xp:case Np:case Sp:case Ep:case Cp:case jp:return t+5e3;case Rl:case Dp:case kp:case Rp:case Tp:return pi;case Bc:case Fc:case Do:case is:return pi;default:return b("Should have found matching lanes. This is a bug in React."),pi}}function Sj(e,t){for(var n=e.pendingLanes,r=e.suspendedLanes,u=e.pingedLanes,x=e.expirationTimes,T=n;T>0;){var I=Ro(T),F=1<<I,X=x[I];X===pi?((F&r)===Ye||(F&u)!==Ye)&&(x[I]=Nj(F,t)):X<=t&&(e.expiredLanes|=F),T&=~F}}function Ej(e){return Hc(e.pendingLanes)}function Lp(e){var t=e.pendingLanes&~is;return t!==Ye?t:t&is?is:Ye}function Cj(e){return(e&sn)!==Ye}function Ap(e){return(e&ky)!==Ye}function Ry(e){return(e&rh)===e}function jj(e){var t=sn|wa|Zs;return(e&t)===Ye}function Dj(e){return(e&kl)===e}function lh(e,t){var n=Dl|wa|jo|Zs;return(t&n)!==Ye}function kj(e,t){return(t&e.expiredLanes)!==Ye}function Ty(e){return(e&kl)!==Ye}function Ly(){var e=sh;return sh<<=1,(sh&kl)===Ye&&(sh=Ic),e}function Rj(){var e=ah;return ah<<=1,(ah&rh)===Ye&&(ah=Rl),e}function ko(e){return e&-e}function zc(e){return ko(e)}function Ro(e){return 31-jy(e)}function Mp(e){return Ro(e)}function rs(e,t){return(e&t)!==Ye}function Tl(e,t){return(e&t)===t}function gn(e,t){return e|t}function ch(e,t){return e&~t}function Ay(e,t){return e&t}function pI(e){return e}function Tj(e,t){return e!==ur&&e<t?e:t}function Up(e){for(var t=[],n=0;n<hp;n++)t.push(e);return t}function $c(e,t,n){e.pendingLanes|=t,t!==Do&&(e.suspendedLanes=Ye,e.pingedLanes=Ye);var r=e.eventTimes,u=Mp(t);r[u]=n}function Lj(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,r=t;r>0;){var u=Ro(r),x=1<<u;n[u]=pi,r&=~x}}function My(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function Aj(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=Ye,e.pingedLanes=Ye,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var r=e.entanglements,u=e.eventTimes,x=e.expirationTimes,T=n;T>0;){var I=Ro(T),F=1<<I;r[I]=Ye,u[I]=pi,x[I]=pi,T&=~F}}function Op(e,t){for(var n=e.entangledLanes|=t,r=e.entanglements,u=n;u;){var x=Ro(u),T=1<<x;T&t|r[x]&t&&(r[x]|=t),u&=~T}}function Mj(e,t){var n=ko(t),r;switch(n){case wa:r=Dl;break;case Zs:r=jo;break;case Ic:case mp:case fp:case pp:case vp:case gp:case bp:case _p:case yp:case wp:case xp:case Np:case Sp:case Ep:case Cp:case jp:case Rl:case Dp:case kp:case Rp:case Tp:r=Pc;break;case Do:r=Fc;break;default:r=ur;break}return(r&(e.suspendedLanes|t))!==ur?ur:r}function Uy(e,t,n){if(Rs)for(var r=e.pendingUpdatersLaneMap;n>0;){var u=Mp(n),x=1<<u,T=r[u];T.add(t),n&=~x}}function Oy(e,t){if(Rs)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;t>0;){var u=Mp(t),x=1<<u,T=n[u];T.size>0&&(T.forEach(function(I){var F=I.alternate;(F===null||!r.has(F))&&r.add(I)}),T.clear()),t&=~x}}function Vy(e,t){return null}var ss=sn,xa=wa,Na=Zs,uh=Do,Wc=ur;function Ts(){return Wc}function dr(e){Wc=e}function Uj(e,t){var n=Wc;try{return Wc=e,t()}finally{Wc=n}}function Oj(e,t){return e!==0&&e<t?e:t}function Vj(e,t){return e>t?e:t}function Vp(e,t){return e!==0&&e<t}function Py(e){var t=ko(e);return Vp(ss,t)?Vp(xa,t)?Ap(t)?Na:uh:xa:ss}function dh(e){var t=e.current.memoizedState;return t.isDehydrated}var Iy;function Pj(e){Iy=e}function Ij(e){Iy(e)}var Pp;function Bj(e){Pp=e}var By;function Fj(e){By=e}var Fy;function Hj(e){Fy=e}var Hy;function zj(e){Hy=e}var Ip=!1,hh=[],qa=null,Ya=null,Ka=null,Gc=new Map,qc=new Map,Xa=[],$j=["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","submit"];function Wj(e){return $j.indexOf(e)>-1}function Gj(e,t,n,r,u){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:u,targetContainers:[r]}}function zy(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":Ka=null;break;case"pointerover":case"pointerout":{var n=t.pointerId;Gc.delete(n);break}case"gotpointercapture":case"lostpointercapture":{var r=t.pointerId;qc.delete(r);break}}}function Yc(e,t,n,r,u,x){if(e===null||e.nativeEvent!==x){var T=Gj(t,n,r,u,x);if(t!==null){var I=Qa(t);I!==null&&Pp(I)}return T}e.eventSystemFlags|=r;var F=e.targetContainers;return u!==null&&F.indexOf(u)===-1&&F.push(u),e}function qj(e,t,n,r,u){switch(t){case"focusin":{var x=u;return qa=Yc(qa,e,t,n,r,x),!0}case"dragenter":{var T=u;return Ya=Yc(Ya,e,t,n,r,T),!0}case"mouseover":{var I=u;return Ka=Yc(Ka,e,t,n,r,I),!0}case"pointerover":{var F=u,X=F.pointerId;return Gc.set(X,Yc(Gc.get(X)||null,e,t,n,r,F)),!0}case"gotpointercapture":{var te=u,fe=te.pointerId;return qc.set(fe,Yc(qc.get(fe)||null,e,t,n,r,te)),!0}}return!1}function $y(e){var t=Ao(e.target);if(t!==null){var n=Eo(t);if(n!==null){var r=n.tag;if(r===R){var u=fy(n);if(u!==null){e.blockedOn=u,Hy(e.priority,function(){By(n)});return}}else if(r===h){var x=n.stateNode;if(dh(x)){e.blockedOn=py(n);return}}}}e.blockedOn=null}function Yj(e){for(var t=Fy(),n={blockedOn:null,target:e,priority:t},r=0;r<Xa.length&&Vp(t,Xa[r].priority);r++);Xa.splice(r,0,n),r===0&&$y(n)}function mh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var n=t[0],r=Hp(e.domEventName,e.eventSystemFlags,n,e.nativeEvent);if(r===null){var u=e.nativeEvent,x=new u.constructor(u.type,u);Xd(x),u.target.dispatchEvent(x),Jd()}else{var T=Qa(r);return T!==null&&Pp(T),e.blockedOn=r,!1}t.shift()}return!0}function Wy(e,t,n){mh(e)&&n.delete(t)}function Kj(){Ip=!1,qa!==null&&mh(qa)&&(qa=null),Ya!==null&&mh(Ya)&&(Ya=null),Ka!==null&&mh(Ka)&&(Ka=null),Gc.forEach(Wy),qc.forEach(Wy)}function Kc(e,t){e.blockedOn===t&&(e.blockedOn=null,Ip||(Ip=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Kj)))}function Xc(e){if(hh.length>0){Kc(hh[0],e);for(var t=1;t<hh.length;t++){var n=hh[t];n.blockedOn===e&&(n.blockedOn=null)}}qa!==null&&Kc(qa,e),Ya!==null&&Kc(Ya,e),Ka!==null&&Kc(Ka,e);var r=function(I){return Kc(I,e)};Gc.forEach(r),qc.forEach(r);for(var u=0;u<Xa.length;u++){var x=Xa[u];x.blockedOn===e&&(x.blockedOn=null)}for(;Xa.length>0;){var T=Xa[0];if(T.blockedOn!==null)break;$y(T),T.blockedOn===null&&Xa.shift()}}var Ll=l.ReactCurrentBatchConfig,Bp=!0;function Gy(e){Bp=!!e}function Xj(){return Bp}function Jj(e,t,n){var r=qy(t),u;switch(r){case ss:u=Zj;break;case xa:u=Qj;break;case Na:default:u=Fp;break}return u.bind(null,t,n,e)}function Zj(e,t,n,r){var u=Ts(),x=Ll.transition;Ll.transition=null;try{dr(ss),Fp(e,t,n,r)}finally{dr(u),Ll.transition=x}}function Qj(e,t,n,r){var u=Ts(),x=Ll.transition;Ll.transition=null;try{dr(xa),Fp(e,t,n,r)}finally{dr(u),Ll.transition=x}}function Fp(e,t,n,r){Bp&&eD(e,t,n,r)}function eD(e,t,n,r){var u=Hp(e,t,n,r);if(u===null){nv(e,t,r,fh,n),zy(e,r);return}if(qj(u,e,t,n,r)){r.stopPropagation();return}if(zy(e,r),t&za&&Wj(e)){for(;u!==null;){var x=Qa(u);x!==null&&Ij(x);var T=Hp(e,t,n,r);if(T===null&&nv(e,t,r,fh,n),T===u)break;u=T}u!==null&&r.stopPropagation();return}nv(e,t,r,null,n)}var fh=null;function Hp(e,t,n,r){fh=null;var u=_l(r),x=Ao(u);if(x!==null){var T=Eo(x);if(T===null)x=null;else{var I=T.tag;if(I===R){var F=fy(T);if(F!==null)return F;x=null}else if(I===h){var X=T.stateNode;if(dh(X))return py(T);x=null}else T!==x&&(x=null)}}return fh=x,null}function qy(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return ss;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return xa;case"message":{var t=WC();switch(t){case ih:return ss;case cp:return xa;case Co:case GC:return Na;case up:return uh;default:return Na}}default:return Na}}function tD(e,t,n){return e.addEventListener(t,n,!1),n}function nD(e,t,n){return e.addEventListener(t,n,!0),n}function iD(e,t,n,r){return e.addEventListener(t,n,{capture:!0,passive:r}),n}function rD(e,t,n,r){return e.addEventListener(t,n,{passive:r}),n}var Jc=null,zp=null,Zc=null;function sD(e){return Jc=e,zp=Ky(),!0}function aD(){Jc=null,zp=null,Zc=null}function Yy(){if(Zc)return Zc;var e,t=zp,n=t.length,r,u=Ky(),x=u.length;for(e=0;e<n&&t[e]===u[e];e++);var T=n-e;for(r=1;r<=T&&t[n-r]===u[x-r];r++);var I=r>1?1-r:void 0;return Zc=u.slice(e,I),Zc}function Ky(){return"value"in Jc?Jc.value:Jc.textContent}function ph(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),t>=32||t===13?t:0}function vh(){return!0}function Xy(){return!1}function as(e){function t(n,r,u,x,T){this._reactName=n,this._targetInst=u,this.type=r,this.nativeEvent=x,this.target=T,this.currentTarget=null;for(var I in e)if(e.hasOwnProperty(I)){var F=e[I];F?this[I]=F(x):this[I]=x[I]}var X=x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1;return X?this.isDefaultPrevented=vh:this.isDefaultPrevented=Xy,this.isPropagationStopped=Xy,this}return Ht(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=vh)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=vh)},persist:function(){},isPersistent:vh}),t}var Al={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$p=as(Al),Qc=Ht({},Al,{view:0,detail:0}),oD=as(Qc),Wp,Gp,eu;function lD(e){e!==eu&&(eu&&e.type==="mousemove"?(Wp=e.screenX-eu.screenX,Gp=e.screenY-eu.screenY):(Wp=0,Gp=0),eu=e)}var gh=Ht({},Qc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yp,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:(lD(e),Wp)},movementY:function(e){return"movementY"in e?e.movementY:Gp}}),Jy=as(gh),cD=Ht({},gh,{dataTransfer:0}),uD=as(cD),dD=Ht({},Qc,{relatedTarget:0}),qp=as(dD),hD=Ht({},Al,{animationName:0,elapsedTime:0,pseudoElement:0}),mD=as(hD),fD=Ht({},Al,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pD=as(fD),vD=Ht({},Al,{data:0}),Zy=as(vD),gD=Zy,bD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_D={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"};function yD(e){if(e.key){var t=bD[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var n=ph(e);return n===13?"Enter":String.fromCharCode(n)}return e.type==="keydown"||e.type==="keyup"?_D[e.keyCode]||"Unidentified":""}var wD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xD(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=wD[e];return r?!!n[r]:!1}function Yp(e){return xD}var ND=Ht({},Qc,{key:yD,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yp,charCode:function(e){return e.type==="keypress"?ph(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ph(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SD=as(ND),ED=Ht({},gh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qy=as(ED),CD=Ht({},Qc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yp}),jD=as(CD),DD=Ht({},Al,{propertyName:0,elapsedTime:0,pseudoElement:0}),kD=as(DD),RD=Ht({},gh,{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}),TD=as(RD),LD=[9,13,27,32],ew=229,Kp=pe&&"CompositionEvent"in window,tu=null;pe&&"documentMode"in document&&(tu=document.documentMode);var AD=pe&&"TextEvent"in window&&!tu,tw=pe&&(!Kp||tu&&tu>8&&tu<=11),nw=32,iw=String.fromCharCode(nw);function MD(){ge("onBeforeInput",["compositionend","keypress","textInput","paste"]),ge("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),ge("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),ge("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var rw=!1;function UD(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function OD(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function VD(e,t){return e==="keydown"&&t.keyCode===ew}function sw(e,t){switch(e){case"keyup":return LD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==ew;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aw(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function ow(e){return e.locale==="ko"}var Ml=!1;function PD(e,t,n,r,u){var x,T;if(Kp?x=OD(t):Ml?sw(t,r)&&(x="onCompositionEnd"):VD(t,r)&&(x="onCompositionStart"),!x)return null;tw&&!ow(r)&&(!Ml&&x==="onCompositionStart"?Ml=sD(u):x==="onCompositionEnd"&&Ml&&(T=Yy()));var I=xh(n,x);if(I.length>0){var F=new Zy(x,t,null,r,u);if(e.push({event:F,listeners:I}),T)F.data=T;else{var X=aw(r);X!==null&&(F.data=X)}}}function ID(e,t){switch(e){case"compositionend":return aw(t);case"keypress":var n=t.which;return n!==nw?null:(rw=!0,iw);case"textInput":var r=t.data;return r===iw&&rw?null:r;default:return null}}function BD(e,t){if(Ml){if(e==="compositionend"||!Kp&&sw(e,t)){var n=Yy();return aD(),Ml=!1,n}return null}switch(e){case"paste":return null;case"keypress":if(!UD(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return tw&&!ow(t)?null:t.data;default:return null}}function FD(e,t,n,r,u){var x;if(AD?x=ID(t,r):x=BD(t,r),!x)return null;var T=xh(n,"onBeforeInput");if(T.length>0){var I=new gD("onBeforeInput","beforeinput",null,r,u);e.push({event:I,listeners:T}),I.data=x}}function HD(e,t,n,r,u,x,T){PD(e,t,n,r,u),FD(e,t,n,r,u)}var zD={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 lw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zD[e.type]:t==="textarea"}/**
|
|
79
|
+
* Checks if an event is supported in the current execution environment.
|
|
80
|
+
*
|
|
81
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
82
|
+
* `reset`, `load`, `error`, and `select`.
|
|
83
|
+
*
|
|
84
|
+
* Borrows from Modernizr.
|
|
85
|
+
*
|
|
86
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
87
|
+
* @return {boolean} True if the event is supported.
|
|
88
|
+
* @internal
|
|
89
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
90
|
+
*/function $D(e){if(!pe)return!1;var t="on"+e,n=t in document;if(!n){var r=document.createElement("div");r.setAttribute(t,"return;"),n=typeof r[t]=="function"}return n}function WD(){ge("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function cw(e,t,n,r){Mc(r);var u=xh(t,"onChange");if(u.length>0){var x=new $p("onChange","change",null,n,r);e.push({event:x,listeners:u})}}var nu=null,iu=null;function GD(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function qD(e){var t=[];cw(t,iu,e,_l(e)),Et(YD,t)}function YD(e){jw(e,0)}function bh(e){var t=Bl(e);if($s(t))return e}function KD(e,t){if(e==="change")return t}var uw=!1;pe&&(uw=$D("input")&&(!document.documentMode||document.documentMode>9));function XD(e,t){nu=e,iu=t,nu.attachEvent("onpropertychange",hw)}function dw(){nu&&(nu.detachEvent("onpropertychange",hw),nu=null,iu=null)}function hw(e){e.propertyName==="value"&&bh(iu)&&qD(e)}function JD(e,t,n){e==="focusin"?(dw(),XD(t,n)):e==="focusout"&&dw()}function ZD(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bh(iu)}function QD(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function ek(e,t){if(e==="click")return bh(t)}function tk(e,t){if(e==="input"||e==="change")return bh(t)}function nk(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||It(e,"number",e.value)}function ik(e,t,n,r,u,x,T){var I=n?Bl(n):window,F,X;if(GD(I)?F=KD:lw(I)?uw?F=tk:(F=ZD,X=JD):QD(I)&&(F=ek),F){var te=F(t,n);if(te){cw(e,te,r,u);return}}X&&X(t,I,n),t==="focusout"&&nk(I)}function rk(){de("onMouseEnter",["mouseout","mouseover"]),de("onMouseLeave",["mouseout","mouseover"]),de("onPointerEnter",["pointerout","pointerover"]),de("onPointerLeave",["pointerout","pointerover"])}function sk(e,t,n,r,u,x,T){var I=t==="mouseover"||t==="pointerover",F=t==="mouseout"||t==="pointerout";if(I&&!Zd(r)){var X=r.relatedTarget||r.fromElement;if(X&&(Ao(X)||bu(X)))return}if(!(!F&&!I)){var te;if(u.window===u)te=u;else{var fe=u.ownerDocument;fe?te=fe.defaultView||fe.parentWindow:te=window}var me,Ee;if(F){var je=r.relatedTarget||r.toElement;if(me=n,Ee=je?Ao(je):null,Ee!==null){var Ue=Eo(Ee);(Ee!==Ue||Ee.tag!==N&&Ee.tag!==C)&&(Ee=null)}}else me=null,Ee=n;if(me!==Ee){var mt=Jy,zt="onMouseLeave",Mt="onMouseEnter",Rn="mouse";(t==="pointerout"||t==="pointerover")&&(mt=Qy,zt="onPointerLeave",Mt="onPointerEnter",Rn="pointer");var Nn=me==null?te:Bl(me),_e=Ee==null?te:Bl(Ee),Oe=new mt(zt,Rn+"leave",me,r,u);Oe.target=Nn,Oe.relatedTarget=_e;var ye=null,Qe=Ao(u);if(Qe===n){var wt=new mt(Mt,Rn+"enter",Ee,r,u);wt.target=_e,wt.relatedTarget=Nn,ye=wt}kk(e,Oe,ye,me,Ee)}}}function ak(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var os=typeof Object.is=="function"?Object.is:ak;function ru(e,t){if(os(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var u=0;u<n.length;u++){var x=n[u];if(!Ne.call(t,x)||!os(e[x],t[x]))return!1}return!0}function mw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ok(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function fw(e,t){for(var n=mw(e),r=0,u=0;n;){if(n.nodeType===Yi){if(u=r+n.textContent.length,r<=t&&u>=t)return{node:n,offset:t-r};r=u}n=mw(ok(n))}}function lk(e){var t=e.ownerDocument,n=t&&t.defaultView||window,r=n.getSelection&&n.getSelection();if(!r||r.rangeCount===0)return null;var u=r.anchorNode,x=r.anchorOffset,T=r.focusNode,I=r.focusOffset;try{u.nodeType,T.nodeType}catch{return null}return ck(e,u,x,T,I)}function ck(e,t,n,r,u){var x=0,T=-1,I=-1,F=0,X=0,te=e,fe=null;e:for(;;){for(var me=null;te===t&&(n===0||te.nodeType===Yi)&&(T=x+n),te===r&&(u===0||te.nodeType===Yi)&&(I=x+u),te.nodeType===Yi&&(x+=te.nodeValue.length),(me=te.firstChild)!==null;)fe=te,te=me;for(;;){if(te===e)break e;if(fe===t&&++F===n&&(T=x),fe===r&&++X===u&&(I=x),(me=te.nextSibling)!==null)break;te=fe,fe=te.parentNode}te=me}return T===-1||I===-1?null:{start:T,end:I}}function uk(e,t){var n=e.ownerDocument||document,r=n&&n.defaultView||window;if(r.getSelection){var u=r.getSelection(),x=e.textContent.length,T=Math.min(t.start,x),I=t.end===void 0?T:Math.min(t.end,x);if(!u.extend&&T>I){var F=I;I=T,T=F}var X=fw(e,T),te=fw(e,I);if(X&&te){if(u.rangeCount===1&&u.anchorNode===X.node&&u.anchorOffset===X.offset&&u.focusNode===te.node&&u.focusOffset===te.offset)return;var fe=n.createRange();fe.setStart(X.node,X.offset),u.removeAllRanges(),T>I?(u.addRange(fe),u.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),u.addRange(fe))}}}function pw(e){return e&&e.nodeType===Yi}function vw(e,t){return!e||!t?!1:e===t?!0:pw(e)?!1:pw(t)?vw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function dk(e){return e&&e.ownerDocument&&vw(e.ownerDocument.documentElement,e)}function hk(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function gw(){for(var e=window,t=qr();t instanceof e.HTMLIFrameElement;){if(hk(t))e=t.contentWindow;else return t;t=qr(e.document)}return t}function Xp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function mk(){var e=gw();return{focusedElem:e,selectionRange:Xp(e)?pk(e):null}}function fk(e){var t=gw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&dk(n)){r!==null&&Xp(n)&&vk(n,r);for(var u=[],x=n;x=x.parentNode;)x.nodeType===Bi&&u.push({element:x,left:x.scrollLeft,top:x.scrollTop});typeof n.focus=="function"&&n.focus();for(var T=0;T<u.length;T++){var I=u[T];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}}function pk(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=lk(e),t||{start:0,end:0}}function vk(e,t){var n=t.start,r=t.end;r===void 0&&(r=n),"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):uk(e,t)}var gk=pe&&"documentMode"in document&&document.documentMode<=11;function bk(){ge("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var Ul=null,Jp=null,su=null,Zp=!1;function _k(e){if("selectionStart"in e&&Xp(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,n=t.getSelection();return{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}}function yk(e){return e.window===e?e.document:e.nodeType===ar?e:e.ownerDocument}function bw(e,t,n){var r=yk(n);if(!(Zp||Ul==null||Ul!==qr(r))){var u=_k(Ul);if(!su||!ru(su,u)){su=u;var x=xh(Jp,"onSelect");if(x.length>0){var T=new $p("onSelect","select",null,t,n);e.push({event:T,listeners:x}),T.target=Ul}}}}function wk(e,t,n,r,u,x,T){var I=n?Bl(n):window;switch(t){case"focusin":(lw(I)||I.contentEditable==="true")&&(Ul=I,Jp=n,su=null);break;case"focusout":Ul=null,Jp=null,su=null;break;case"mousedown":Zp=!0;break;case"contextmenu":case"mouseup":case"dragend":Zp=!1,bw(e,r,u);break;case"selectionchange":if(gk)break;case"keydown":case"keyup":bw(e,r,u)}}function _h(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ol={animationend:_h("Animation","AnimationEnd"),animationiteration:_h("Animation","AnimationIteration"),animationstart:_h("Animation","AnimationStart"),transitionend:_h("Transition","TransitionEnd")},Qp={},_w={};pe&&(_w=document.createElement("div").style,"AnimationEvent"in window||(delete Ol.animationend.animation,delete Ol.animationiteration.animation,delete Ol.animationstart.animation),"TransitionEvent"in window||delete Ol.transitionend.transition);function yh(e){if(Qp[e])return Qp[e];if(!Ol[e])return e;var t=Ol[e];for(var n in t)if(t.hasOwnProperty(n)&&n in _w)return Qp[e]=t[n];return e}var yw=yh("animationend"),ww=yh("animationiteration"),xw=yh("animationstart"),Nw=yh("transitionend"),Sw=new Map,Ew=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function Ja(e,t){Sw.set(e,t),ge(t,[e])}function xk(){for(var e=0;e<Ew.length;e++){var t=Ew[e],n=t.toLowerCase(),r=t[0].toUpperCase()+t.slice(1);Ja(n,"on"+r)}Ja(yw,"onAnimationEnd"),Ja(ww,"onAnimationIteration"),Ja(xw,"onAnimationStart"),Ja("dblclick","onDoubleClick"),Ja("focusin","onFocus"),Ja("focusout","onBlur"),Ja(Nw,"onTransitionEnd")}function Nk(e,t,n,r,u,x,T){var I=Sw.get(t);if(I!==void 0){var F=$p,X=t;switch(t){case"keypress":if(ph(r)===0)return;case"keydown":case"keyup":F=SD;break;case"focusin":X="focus",F=qp;break;case"focusout":X="blur",F=qp;break;case"beforeblur":case"afterblur":F=qp;break;case"click":if(r.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=Jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=uD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=jD;break;case yw:case ww:case xw:F=mD;break;case Nw:F=kD;break;case"scroll":F=oD;break;case"wheel":F=TD;break;case"copy":case"cut":case"paste":F=pD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=Qy;break}var te=(x&za)!==0;{var fe=!te&&t==="scroll",me=jk(n,I,r.type,te,fe);if(me.length>0){var Ee=new F(I,X,null,r,u);e.push({event:Ee,listeners:me})}}}}xk(),rk(),WD(),bk(),MD();function Sk(e,t,n,r,u,x,T){Nk(e,t,n,r,u,x);var I=(x&Kd)===0;I&&(sk(e,t,n,r,u),ik(e,t,n,r,u),wk(e,t,n,r,u),HD(e,t,n,r,u))}var au=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],ev=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(au));function Cw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,LC(r,t,void 0,e),e.currentTarget=null}function Ek(e,t,n){var r;if(n)for(var u=t.length-1;u>=0;u--){var x=t[u],T=x.instance,I=x.currentTarget,F=x.listener;if(T!==r&&e.isPropagationStopped())return;Cw(e,F,I),r=T}else for(var X=0;X<t.length;X++){var te=t[X],fe=te.instance,me=te.currentTarget,Ee=te.listener;if(fe!==r&&e.isPropagationStopped())return;Cw(e,Ee,me),r=fe}}function jw(e,t){for(var n=(t&za)!==0,r=0;r<e.length;r++){var u=e[r],x=u.event,T=u.listeners;Ek(x,T,n)}AC()}function Ck(e,t,n,r,u){var x=_l(n),T=[];Sk(T,e,r,n,x,t),jw(T,t)}function _i(e,t){ev.has(e)||b('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=!1,r=nT(t),u=Rk(e);r.has(u)||(Dw(t,e,bl,n),r.add(u))}function tv(e,t,n){ev.has(e)&&!t&&b('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var r=0;t&&(r|=za),Dw(n,e,r,t)}var wh="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[wh]){e[wh]=!0,we.forEach(function(n){n!=="selectionchange"&&(ev.has(n)||tv(n,!1,e),tv(n,!0,e))});var t=e.nodeType===ar?e:e.ownerDocument;t!==null&&(t[wh]||(t[wh]=!0,tv("selectionchange",!1,t)))}}function Dw(e,t,n,r,u){var x=Jj(e,t,n),T=void 0;mr&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(T=!0),e=e,r?T!==void 0?iD(e,t,x,T):nD(e,t,x):T!==void 0?rD(e,t,x,T):tD(e,t,x)}function kw(e,t){return e===t||e.nodeType===si&&e.parentNode===t}function nv(e,t,n,r,u){var x=r;if(!(t&Lc)&&!(t&bl)){var T=u;if(r!==null){var I=r;e:for(;;){if(I===null)return;var F=I.tag;if(F===h||F===_){var X=I.stateNode.containerInfo;if(kw(X,T))break;if(F===_)for(var te=I.return;te!==null;){var fe=te.tag;if(fe===h||fe===_){var me=te.stateNode.containerInfo;if(kw(me,T))return}te=te.return}for(;X!==null;){var Ee=Ao(X);if(Ee===null)return;var je=Ee.tag;if(je===N||je===C){I=x=Ee;continue e}X=X.parentNode}}I=I.return}}}Et(function(){return Ck(e,t,n,x)})}function lu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jk(e,t,n,r,u,x){for(var T=t!==null?t+"Capture":null,I=r?T:t,F=[],X=e,te=null;X!==null;){var fe=X,me=fe.stateNode,Ee=fe.tag;if(Ee===N&&me!==null&&(te=me,I!==null)){var je=Fi(X,I);je!=null&&F.push(lu(X,je,te))}if(u)break;X=X.return}return F}function xh(e,t){for(var n=t+"Capture",r=[],u=e;u!==null;){var x=u,T=x.stateNode,I=x.tag;if(I===N&&T!==null){var F=T,X=Fi(u,n);X!=null&&r.unshift(lu(u,X,F));var te=Fi(u,t);te!=null&&r.push(lu(u,te,F))}u=u.return}return r}function Vl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==N);return e||null}function Dk(e,t){for(var n=e,r=t,u=0,x=n;x;x=Vl(x))u++;for(var T=0,I=r;I;I=Vl(I))T++;for(;u-T>0;)n=Vl(n),u--;for(;T-u>0;)r=Vl(r),T--;for(var F=u;F--;){if(n===r||r!==null&&n===r.alternate)return n;n=Vl(n),r=Vl(r)}return null}function Rw(e,t,n,r,u){for(var x=t._reactName,T=[],I=n;I!==null&&I!==r;){var F=I,X=F.alternate,te=F.stateNode,fe=F.tag;if(X!==null&&X===r)break;if(fe===N&&te!==null){var me=te;if(u){var Ee=Fi(I,x);Ee!=null&&T.unshift(lu(I,Ee,me))}else if(!u){var je=Fi(I,x);je!=null&&T.push(lu(I,je,me))}}I=I.return}T.length!==0&&e.push({event:t,listeners:T})}function kk(e,t,n,r,u){var x=r&&u?Dk(r,u):null;r!==null&&Rw(e,t,r,x,!1),u!==null&&n!==null&&Rw(e,n,u,x,!0)}function Rk(e,t){return e+"__bubble"}var Jr=!1,cu="dangerouslySetInnerHTML",Nh="suppressContentEditableWarning",Za="suppressHydrationWarning",Tw="autoFocus",To="children",Lo="style",Sh="__html",iv,Eh,uu,Lw,Ch,Aw,Mw;iv={dialog:!0,webview:!0},Eh=function(e,t){Hd(e,t),zd(e,t),Yd(e,t,{registrationNameDependencies:re,possibleRegistrationNames:G})},Aw=pe&&!document.documentMode,uu=function(e,t,n){if(!Jr){var r=jh(n),u=jh(t);u!==r&&(Jr=!0,b("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(u),JSON.stringify(r)))}},Lw=function(e){if(!Jr){Jr=!0;var t=[];e.forEach(function(n){t.push(n)}),b("Extra attributes from the server: %s",t)}},Ch=function(e,t){t===!1?b("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):b("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},Mw=function(e,t){var n=e.namespaceURI===Jt?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var Tk=/\r\n?/g,Lk=/\u0000|\uFFFD/g;function jh(e){xe(e);var t=typeof e=="string"?e:""+e;return t.replace(Tk,`
|
|
91
|
+
`).replace(Lk,"")}function Dh(e,t,n,r){var u=jh(t),x=jh(e);if(x!==u&&(r&&(Jr||(Jr=!0,b('Text content did not match. Server: "%s" Client: "%s"',x,u))),n&&J))throw new Error("Text content does not match server-rendered HTML.")}function Uw(e){return e.nodeType===ar?e:e.ownerDocument}function Ak(){}function kh(e){e.onclick=Ak}function Mk(e,t,n,r,u){for(var x in r)if(r.hasOwnProperty(x)){var T=r[x];if(x===Lo)T&&Object.freeze(T),Od(t,T);else if(x===cu){var I=T?T[Sh]:void 0;I!=null&&qs(t,I)}else if(x===To)if(typeof T=="string"){var F=e!=="textarea"||T!=="";F&&Ba(t,T)}else typeof T=="number"&&Ba(t,""+T);else x===Nh||x===Za||x===Tw||(re.hasOwnProperty(x)?T!=null&&(typeof T!="function"&&Ch(x,T),x==="onScroll"&&_i("scroll",t)):T!=null&&tn(t,x,T,u))}}function Uk(e,t,n,r){for(var u=0;u<t.length;u+=2){var x=t[u],T=t[u+1];x===Lo?Od(e,T):x===cu?qs(e,T):x===To?Ba(e,T):tn(e,x,T,r)}}function Ok(e,t,n,r){var u,x=Uw(n),T,I=r;if(I===Jt&&(I=Ti(e)),I===Jt){if(u=Ys(e,t),!u&&e!==e.toLowerCase()&&b("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var F=x.createElement("div");F.innerHTML="<script><\/script>";var X=F.firstChild;T=F.removeChild(X)}else if(typeof t.is=="string")T=x.createElement(e,{is:t.is});else if(T=x.createElement(e),e==="select"){var te=T;t.multiple?te.multiple=!0:t.size&&(te.size=t.size)}}else T=x.createElementNS(I,e);return I===Jt&&!u&&Object.prototype.toString.call(T)==="[object HTMLUnknownElement]"&&!Ne.call(iv,e)&&(iv[e]=!0,b("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),T}function Vk(e,t){return Uw(t).createTextNode(e)}function Pk(e,t,n,r){var u=Ys(t,n);Eh(t,n);var x;switch(t){case"dialog":_i("cancel",e),_i("close",e),x=n;break;case"iframe":case"object":case"embed":_i("load",e),x=n;break;case"video":case"audio":for(var T=0;T<au.length;T++)_i(au[T],e);x=n;break;case"source":_i("error",e),x=n;break;case"img":case"image":case"link":_i("error",e),_i("load",e),x=n;break;case"details":_i("toggle",e),x=n;break;case"input":Ri(e,n),x=Ur(e,n),_i("invalid",e);break;case"option":Ln(e,n),x=n;break;case"select":Gs(e,n),x=Ws(e,n),_i("invalid",e);break;case"textarea":Wt(e,n),x=ht(e,n),_i("invalid",e);break;default:x=n}switch(vl(t,x),Mk(t,e,r,x,u),t){case"input":Sr(e),Se(e,n,!1);break;case"textarea":Sr(e),dn(e);break;case"option":xn(e,n);break;case"select":ue(e,n);break;default:typeof x.onClick=="function"&&kh(e);break}}function Ik(e,t,n,r,u){Eh(t,r);var x=null,T,I;switch(t){case"input":T=Ur(e,n),I=Ur(e,r),x=[];break;case"select":T=Ws(e,n),I=Ws(e,r),x=[];break;case"textarea":T=ht(e,n),I=ht(e,r),x=[];break;default:T=n,I=r,typeof T.onClick!="function"&&typeof I.onClick=="function"&&kh(e);break}vl(t,I);var F,X,te=null;for(F in T)if(!(I.hasOwnProperty(F)||!T.hasOwnProperty(F)||T[F]==null))if(F===Lo){var fe=T[F];for(X in fe)fe.hasOwnProperty(X)&&(te||(te={}),te[X]="")}else F===cu||F===To||F===Nh||F===Za||F===Tw||(re.hasOwnProperty(F)?x||(x=[]):(x=x||[]).push(F,null));for(F in I){var me=I[F],Ee=T!=null?T[F]:void 0;if(!(!I.hasOwnProperty(F)||me===Ee||me==null&&Ee==null))if(F===Lo)if(me&&Object.freeze(me),Ee){for(X in Ee)Ee.hasOwnProperty(X)&&(!me||!me.hasOwnProperty(X))&&(te||(te={}),te[X]="");for(X in me)me.hasOwnProperty(X)&&Ee[X]!==me[X]&&(te||(te={}),te[X]=me[X])}else te||(x||(x=[]),x.push(F,te)),te=me;else if(F===cu){var je=me?me[Sh]:void 0,Ue=Ee?Ee[Sh]:void 0;je!=null&&Ue!==je&&(x=x||[]).push(F,je)}else F===To?(typeof me=="string"||typeof me=="number")&&(x=x||[]).push(F,""+me):F===Nh||F===Za||(re.hasOwnProperty(F)?(me!=null&&(typeof me!="function"&&Ch(F,me),F==="onScroll"&&_i("scroll",e)),!x&&Ee!==me&&(x=[])):(x=x||[]).push(F,me))}return te&&(qf(te,I[Lo]),(x=x||[]).push(Lo,te)),x}function Bk(e,t,n,r,u){n==="input"&&u.type==="radio"&&u.name!=null&&z(e,u);var x=Ys(n,r),T=Ys(n,u);switch(Uk(e,t,x,T),n){case"input":oe(e,u);break;case"textarea":Gt(e,u);break;case"select":$e(e,u);break}}function Fk(e){{var t=e.toLowerCase();return gl.hasOwnProperty(t)&&gl[t]||null}}function Hk(e,t,n,r,u,x,T){var I,F;switch(I=Ys(t,n),Eh(t,n),t){case"dialog":_i("cancel",e),_i("close",e);break;case"iframe":case"object":case"embed":_i("load",e);break;case"video":case"audio":for(var X=0;X<au.length;X++)_i(au[X],e);break;case"source":_i("error",e);break;case"img":case"image":case"link":_i("error",e),_i("load",e);break;case"details":_i("toggle",e);break;case"input":Ri(e,n),_i("invalid",e);break;case"option":Ln(e,n);break;case"select":Gs(e,n),_i("invalid",e);break;case"textarea":Wt(e,n),_i("invalid",e);break}vl(t,n);{F=new Set;for(var te=e.attributes,fe=0;fe<te.length;fe++){var me=te[fe].name.toLowerCase();switch(me){case"value":break;case"checked":break;case"selected":break;default:F.add(te[fe].name)}}}var Ee=null;for(var je in n)if(n.hasOwnProperty(je)){var Ue=n[je];if(je===To)typeof Ue=="string"?e.textContent!==Ue&&(n[Za]!==!0&&Dh(e.textContent,Ue,x,T),Ee=[To,Ue]):typeof Ue=="number"&&e.textContent!==""+Ue&&(n[Za]!==!0&&Dh(e.textContent,Ue,x,T),Ee=[To,""+Ue]);else if(re.hasOwnProperty(je))Ue!=null&&(typeof Ue!="function"&&Ch(je,Ue),je==="onScroll"&&_i("scroll",e));else if(T&&typeof I=="boolean"){var mt=void 0,zt=ot(je);if(n[Za]!==!0){if(!(je===Nh||je===Za||je==="value"||je==="checked"||je==="selected")){if(je===cu){var Mt=e.innerHTML,Rn=Ue?Ue[Sh]:void 0;if(Rn!=null){var Nn=Mw(e,Rn);Nn!==Mt&&uu(je,Mt,Nn)}}else if(je===Lo){if(F.delete(je),Aw){var _e=Gf(Ue);mt=e.getAttribute("style"),_e!==mt&&uu(je,mt,_e)}}else if(I&&!Q)F.delete(je.toLowerCase()),mt=st(e,je,Ue),Ue!==mt&&uu(je,mt,Ue);else if(!ve(je,zt,I)&&!Kt(je,Ue,zt,I)){var Oe=!1;if(zt!==null)F.delete(zt.attributeName),mt=Yn(e,je,Ue,zt);else{var ye=r;if(ye===Jt&&(ye=Ti(t)),ye===Jt)F.delete(je.toLowerCase());else{var Qe=Fk(je);Qe!==null&&Qe!==je&&(Oe=!0,F.delete(Qe)),F.delete(je)}mt=st(e,je,Ue)}var wt=Q;!wt&&Ue!==mt&&!Oe&&uu(je,mt,Ue)}}}}}switch(T&&F.size>0&&n[Za]!==!0&&Lw(F),t){case"input":Sr(e),Se(e,n,!0);break;case"textarea":Sr(e),dn(e);break;case"select":case"option":break;default:typeof n.onClick=="function"&&kh(e);break}return Ee}function zk(e,t,n){var r=e.nodeValue!==t;return r}function rv(e,t){{if(Jr)return;Jr=!0,b("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function sv(e,t){{if(Jr)return;Jr=!0,b('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function av(e,t,n){{if(Jr)return;Jr=!0,b("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function ov(e,t){{if(t===""||Jr)return;Jr=!0,b('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function $k(e,t,n){switch(t){case"input":Ae(e,n);return;case"textarea":ri(e,n);return;case"select":Je(e,n);return}}var du=function(){},hu=function(){};{var Wk=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Ow=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Gk=Ow.concat(["button"]),qk=["dd","dt","li","option","optgroup","p","rp","rt"],Vw={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};hu=function(e,t){var n=Ht({},e||Vw),r={tag:t};return Ow.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),Gk.indexOf(t)!==-1&&(n.pTagInButtonScope=null),Wk.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=r,t==="form"&&(n.formTag=r),t==="a"&&(n.aTagInScope=r),t==="button"&&(n.buttonTagInScope=r),t==="nobr"&&(n.nobrTagInScope=r),t==="p"&&(n.pTagInButtonScope=r),t==="li"&&(n.listItemTagAutoclosing=r),(t==="dd"||t==="dt")&&(n.dlItemTagAutoclosing=r),n};var Yk=function(e,t){switch(t){case"select":return e==="option"||e==="optgroup"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return qk.indexOf(t)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null}return!0},Kk=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},Pw={};du=function(e,t,n){n=n||Vw;var r=n.current,u=r&&r.tag;t!=null&&(e!=null&&b("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var x=Yk(e,u)?null:r,T=x?null:Kk(e,n),I=x||T;if(I){var F=I.tag,X=!!x+"|"+e+"|"+F;if(!Pw[X]){Pw[X]=!0;var te=e,fe="";if(e==="#text"?/\S/.test(t)?te="Text nodes":(te="Whitespace text nodes",fe=" Make sure you don't have any extra whitespace between tags on each line of your source code."):te="<"+e+">",x){var me="";F==="table"&&e==="tr"&&(me+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),b("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",te,F,fe,me)}else b("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",te,F)}}}}var Rh="suppressHydrationWarning",Th="$",Lh="/$",mu="$?",fu="$!",Xk="style",lv=null,cv=null;function Jk(e){var t,n,r=e.nodeType;switch(r){case ar:case xc:{t=r===ar?"#document":"#fragment";var u=e.documentElement;n=u?u.namespaceURI:hr(null,"");break}default:{var x=r===si?e.parentNode:e,T=x.namespaceURI||null;t=x.tagName,n=hr(T,t);break}}{var I=t.toLowerCase(),F=hu(null,I);return{namespace:n,ancestorInfo:F}}}function Zk(e,t,n){{var r=e,u=hr(r.namespace,t),x=hu(r.ancestorInfo,t);return{namespace:u,ancestorInfo:x}}}function vI(e){return e}function Qk(e){lv=Xj(),cv=mk();var t=null;return Gy(!1),t}function eR(e){fk(cv),Gy(lv),lv=null,cv=null}function tR(e,t,n,r,u){var x;{var T=r;if(du(e,null,T.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var I=""+t.children,F=hu(T.ancestorInfo,e);du(null,I,F)}x=T.namespace}var X=Ok(e,t,n,x);return gu(u,X),gv(X,t),X}function nR(e,t){e.appendChild(t)}function iR(e,t,n,r,u){switch(Pk(e,t,n,r),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}function rR(e,t,n,r,u,x){{var T=x;if(typeof r.children!=typeof n.children&&(typeof r.children=="string"||typeof r.children=="number")){var I=""+r.children,F=hu(T.ancestorInfo,t);du(null,I,F)}}return Ik(e,t,n,r)}function uv(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function sR(e,t,n,r){{var u=n;du(null,e,u.ancestorInfo)}var x=Vk(e,t);return gu(r,x),x}function aR(){var e=window.event;return e===void 0?Na:qy(e.type)}var dv=typeof setTimeout=="function"?setTimeout:void 0,oR=typeof clearTimeout=="function"?clearTimeout:void 0,hv=-1,Iw=typeof Promise=="function"?Promise:void 0,lR=typeof queueMicrotask=="function"?queueMicrotask:typeof Iw<"u"?function(e){return Iw.resolve(null).then(e).catch(cR)}:dv;function cR(e){setTimeout(function(){throw e})}function uR(e,t,n,r){switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&e.focus();return;case"img":{n.src&&(e.src=n.src);return}}}function dR(e,t,n,r,u,x){Bk(e,t,n,r,u),gv(e,u)}function Bw(e){Ba(e,"")}function hR(e,t,n){e.nodeValue=n}function mR(e,t){e.appendChild(t)}function fR(e,t){var n;e.nodeType===si?(n=e.parentNode,n.insertBefore(t,e)):(n=e,n.appendChild(t));var r=e._reactRootContainer;r==null&&n.onclick===null&&kh(n)}function pR(e,t,n){e.insertBefore(t,n)}function vR(e,t,n){e.nodeType===si?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}function gR(e,t){e.removeChild(t)}function bR(e,t){e.nodeType===si?e.parentNode.removeChild(t):e.removeChild(t)}function mv(e,t){var n=t,r=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===si){var x=u.data;if(x===Lh)if(r===0){e.removeChild(u),Xc(t);return}else r--;else(x===Th||x===mu||x===fu)&&r++}n=u}while(n);Xc(t)}function _R(e,t){e.nodeType===si?mv(e.parentNode,t):e.nodeType===Bi&&mv(e,t),Xc(e)}function yR(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function wR(e){e.nodeValue=""}function xR(e,t){e=e;var n=t[Xk],r=n!=null&&n.hasOwnProperty("display")?n.display:null;e.style.display=Nc("display",r)}function NR(e,t){e.nodeValue=t}function SR(e){e.nodeType===Bi?e.textContent="":e.nodeType===ar&&e.documentElement&&e.removeChild(e.documentElement)}function ER(e,t,n){return e.nodeType!==Bi||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function CR(e,t){return t===""||e.nodeType!==Yi?null:e}function jR(e){return e.nodeType!==si?null:e}function Fw(e){return e.data===mu}function fv(e){return e.data===fu}function DR(e){var t=e.nextSibling&&e.nextSibling.dataset,n,r,u;return t&&(n=t.dgst,r=t.msg,u=t.stck),{message:r,digest:n,stack:u}}function kR(e,t){e._reactRetry=t}function Ah(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===Bi||t===Yi)break;if(t===si){var n=e.data;if(n===Th||n===fu||n===mu)break;if(n===Lh)return null}}return e}function pu(e){return Ah(e.nextSibling)}function RR(e){return Ah(e.firstChild)}function TR(e){return Ah(e.firstChild)}function LR(e){return Ah(e.nextSibling)}function AR(e,t,n,r,u,x,T){gu(x,e),gv(e,n);var I;{var F=u;I=F.namespace}var X=(x.mode&Dn)!==Yt;return Hk(e,t,n,I,r,X,T)}function MR(e,t,n,r){return gu(n,e),n.mode&Dn,zk(e,t)}function UR(e,t){gu(t,e)}function OR(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===si){var r=t.data;if(r===Lh){if(n===0)return pu(t);n--}else(r===Th||r===fu||r===mu)&&n++}t=t.nextSibling}return null}function Hw(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===si){var r=t.data;if(r===Th||r===fu||r===mu){if(n===0)return t;n--}else r===Lh&&n++}t=t.previousSibling}return null}function VR(e){Xc(e)}function PR(e){Xc(e)}function IR(e){return e!=="head"&&e!=="body"}function BR(e,t,n,r){var u=!0;Dh(t.nodeValue,n,r,u)}function FR(e,t,n,r,u,x){if(t[Rh]!==!0){var T=!0;Dh(r.nodeValue,u,x,T)}}function HR(e,t){t.nodeType===Bi?rv(e,t):t.nodeType===si||sv(e,t)}function zR(e,t){{var n=e.parentNode;n!==null&&(t.nodeType===Bi?rv(n,t):t.nodeType===si||sv(n,t))}}function $R(e,t,n,r,u){(u||t[Rh]!==!0)&&(r.nodeType===Bi?rv(n,r):r.nodeType===si||sv(n,r))}function WR(e,t,n){av(e,t)}function GR(e,t){ov(e,t)}function qR(e,t,n){{var r=e.parentNode;r!==null&&av(r,t)}}function YR(e,t){{var n=e.parentNode;n!==null&&ov(n,t)}}function KR(e,t,n,r,u,x){(x||t[Rh]!==!0)&&av(n,r)}function XR(e,t,n,r,u){(u||t[Rh]!==!0)&&ov(n,r)}function JR(e){b("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function ZR(e){ou(e)}var Pl=Math.random().toString(36).slice(2),Il="__reactFiber$"+Pl,pv="__reactProps$"+Pl,vu="__reactContainer$"+Pl,vv="__reactEvents$"+Pl,QR="__reactListeners$"+Pl,eT="__reactHandles$"+Pl;function tT(e){delete e[Il],delete e[pv],delete e[vv],delete e[QR],delete e[eT]}function gu(e,t){t[Il]=e}function Mh(e,t){t[vu]=e}function zw(e){e[vu]=null}function bu(e){return!!e[vu]}function Ao(e){var t=e[Il];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vu]||n[Il],t){var r=t.alternate;if(t.child!==null||r!==null&&r.child!==null)for(var u=Hw(e);u!==null;){var x=u[Il];if(x)return x;u=Hw(u)}return t}e=n,n=e.parentNode}return null}function Qa(e){var t=e[Il]||e[vu];return t&&(t.tag===N||t.tag===C||t.tag===R||t.tag===h)?t:null}function Bl(e){if(e.tag===N||e.tag===C)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Uh(e){return e[pv]||null}function gv(e,t){e[pv]=t}function nT(e){var t=e[vv];return t===void 0&&(t=e[vv]=new Set),t}var $w={},Ww=l.ReactDebugCurrentFrame;function Oh(e){if(e){var t=e._owner,n=wi(e.type,e._source,t?t.type:null);Ww.setExtraStackFrame(n)}else Ww.setExtraStackFrame(null)}function Ls(e,t,n,r,u){{var x=Function.call.bind(Ne);for(var T in e)if(x(e,T)){var I=void 0;try{if(typeof e[T]!="function"){var F=Error((r||"React class")+": "+n+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F.name="Invariant Violation",F}I=e[T](t,T,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(X){I=X}I&&!(I instanceof Error)&&(Oh(u),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,T,typeof I),Oh(null)),I instanceof Error&&!(I.message in $w)&&($w[I.message]=!0,Oh(u),b("Failed %s type: %s",n,I.message),Oh(null))}}}var bv=[],Vh;Vh=[];var Sa=-1;function eo(e){return{current:e}}function jr(e,t){if(Sa<0){b("Unexpected pop.");return}t!==Vh[Sa]&&b("Unexpected Fiber popped."),e.current=bv[Sa],bv[Sa]=null,Vh[Sa]=null,Sa--}function Dr(e,t,n){Sa++,bv[Sa]=e.current,Vh[Sa]=n,e.current=t}var _v;_v={};var ls={};Object.freeze(ls);var Ea=eo(ls),Qs=eo(!1),yv=ls;function Fl(e,t,n){return n&&ea(t)?yv:Ea.current}function Gw(e,t,n){{var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}}function Hl(e,t){{var n=e.type,r=n.contextTypes;if(!r)return ls;var u=e.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===t)return u.__reactInternalMemoizedMaskedChildContext;var x={};for(var T in r)x[T]=t[T];{var I=ft(e)||"Unknown";Ls(r,x,"context",I)}return u&&Gw(e,t,x),x}}function Ph(){return Qs.current}function ea(e){{var t=e.childContextTypes;return t!=null}}function Ih(e){jr(Qs,e),jr(Ea,e)}function wv(e){jr(Qs,e),jr(Ea,e)}function qw(e,t,n){{if(Ea.current!==ls)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Dr(Ea,t,e),Dr(Qs,n,e)}}function Yw(e,t,n){{var r=e.stateNode,u=t.childContextTypes;if(typeof r.getChildContext!="function"){{var x=ft(e)||"Unknown";_v[x]||(_v[x]=!0,b("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",x,x))}return n}var T=r.getChildContext();for(var I in T)if(!(I in u))throw new Error((ft(e)||"Unknown")+'.getChildContext(): key "'+I+'" is not defined in childContextTypes.');{var F=ft(e)||"Unknown";Ls(u,T,"child context",F)}return Ht({},n,T)}}function Bh(e){{var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||ls;return yv=Ea.current,Dr(Ea,n,e),Dr(Qs,Qs.current,e),!0}}function Kw(e,t,n){{var r=e.stateNode;if(!r)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(n){var u=Yw(e,t,yv);r.__reactInternalMemoizedMergedChildContext=u,jr(Qs,e),jr(Ea,e),Dr(Ea,u,e),Dr(Qs,n,e)}else jr(Qs,e),Dr(Qs,n,e)}}function iT(e){{if(!IC(e)||e.tag!==f)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case h:return t.stateNode.context;case f:{var n=t.type;if(ea(n))return t.stateNode.__reactInternalMemoizedMergedChildContext;break}}t=t.return}while(t!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var to=0,Fh=1,Ca=null,xv=!1,Nv=!1;function Xw(e){Ca===null?Ca=[e]:Ca.push(e)}function rT(e){xv=!0,Xw(e)}function Jw(){xv&&no()}function no(){if(!Nv&&Ca!==null){Nv=!0;var e=0,t=Ts();try{var n=!0,r=Ca;for(dr(ss);e<r.length;e++){var u=r[e];do u=u(n);while(u!==null)}Ca=null,xv=!1}catch(x){throw Ca!==null&&(Ca=Ca.slice(e+1)),wy(ih,no),x}finally{dr(t),Nv=!1}}return null}var zl=[],$l=0,Hh=null,zh=0,gs=[],bs=0,Mo=null,ja=1,Da="";function sT(e){return Oo(),(e.flags&my)!==Zt}function aT(e){return Oo(),zh}function oT(){var e=Da,t=ja,n=t&~lT(t);return n.toString(32)+e}function Uo(e,t){Oo(),zl[$l++]=zh,zl[$l++]=Hh,Hh=e,zh=t}function Zw(e,t,n){Oo(),gs[bs++]=ja,gs[bs++]=Da,gs[bs++]=Mo,Mo=e;var r=ja,u=Da,x=$h(r)-1,T=r&~(1<<x),I=n+1,F=$h(t)+x;if(F>30){var X=x-x%5,te=(1<<X)-1,fe=(T&te).toString(32),me=T>>X,Ee=x-X,je=$h(t)+Ee,Ue=I<<Ee,mt=Ue|me,zt=fe+u;ja=1<<je|mt,Da=zt}else{var Mt=I<<x,Rn=Mt|T,Nn=u;ja=1<<F|Rn,Da=Nn}}function Sv(e){Oo();var t=e.return;if(t!==null){var n=1,r=0;Uo(e,n),Zw(e,n,r)}}function $h(e){return 32-jy(e)}function lT(e){return 1<<$h(e)-1}function Ev(e){for(;e===Hh;)Hh=zl[--$l],zl[$l]=null,zh=zl[--$l],zl[$l]=null;for(;e===Mo;)Mo=gs[--bs],gs[bs]=null,Da=gs[--bs],gs[bs]=null,ja=gs[--bs],gs[bs]=null}function cT(){return Oo(),Mo!==null?{id:ja,overflow:Da}:null}function uT(e,t){Oo(),gs[bs++]=ja,gs[bs++]=Da,gs[bs++]=Mo,ja=t.id,Da=t.overflow,Mo=e}function Oo(){pr()||b("Expected to be hydrating. This is a bug in React. Please file an issue.")}var fr=null,_s=null,As=!1,Vo=!1,io=null;function dT(){As&&b("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Qw(){Vo=!0}function hT(){return Vo}function mT(e){var t=e.stateNode.containerInfo;return _s=TR(t),fr=e,As=!0,io=null,Vo=!1,!0}function fT(e,t,n){return _s=LR(t),fr=e,As=!0,io=null,Vo=!1,n!==null&&uT(e,n),!0}function ex(e,t){switch(e.tag){case h:{HR(e.stateNode.containerInfo,t);break}case N:{var n=(e.mode&Dn)!==Yt;$R(e.type,e.memoizedProps,e.stateNode,t,n);break}case R:{var r=e.memoizedState;r.dehydrated!==null&&zR(r.dehydrated,t);break}}}function tx(e,t){ex(e,t);var n=bA();n.stateNode=t,n.return=e;var r=e.deletions;r===null?(e.deletions=[n],e.flags|=wo):r.push(n)}function Cv(e,t){{if(Vo)return;switch(e.tag){case h:{var n=e.stateNode.containerInfo;switch(t.tag){case N:var r=t.type;t.pendingProps,WR(n,r);break;case C:var u=t.pendingProps;GR(n,u);break}break}case N:{var x=e.type,T=e.memoizedProps,I=e.stateNode;switch(t.tag){case N:{var F=t.type,X=t.pendingProps,te=(e.mode&Dn)!==Yt;KR(x,T,I,F,X,te);break}case C:{var fe=t.pendingProps,me=(e.mode&Dn)!==Yt;XR(x,T,I,fe,me);break}}break}case R:{var Ee=e.memoizedState,je=Ee.dehydrated;if(je!==null)switch(t.tag){case N:var Ue=t.type;t.pendingProps,qR(je,Ue);break;case C:var mt=t.pendingProps;YR(je,mt);break}break}default:return}}}function nx(e,t){t.flags=t.flags&~_a|Hi,Cv(e,t)}function ix(e,t){switch(e.tag){case N:{var n=e.type;e.pendingProps;var r=ER(t,n);return r!==null?(e.stateNode=r,fr=e,_s=RR(r),!0):!1}case C:{var u=e.pendingProps,x=CR(t,u);return x!==null?(e.stateNode=x,fr=e,_s=null,!0):!1}case R:{var T=jR(t);if(T!==null){var I={dehydrated:T,treeContext:cT(),retryLane:is};e.memoizedState=I;var F=_A(T);return F.return=e,e.child=F,fr=e,_s=null,!0}return!1}default:return!1}}function jv(e){return(e.mode&Dn)!==Yt&&(e.flags&Bn)===Zt}function Dv(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function kv(e){if(As){var t=_s;if(!t){jv(e)&&(Cv(fr,e),Dv()),nx(fr,e),As=!1,fr=e;return}var n=t;if(!ix(e,t)){jv(e)&&(Cv(fr,e),Dv()),t=pu(n);var r=fr;if(!t||!ix(e,t)){nx(fr,e),As=!1,fr=e;return}tx(r,n)}}}function pT(e,t,n){var r=e.stateNode,u=!Vo,x=AR(r,e.type,e.memoizedProps,t,n,e,u);return e.updateQueue=x,x!==null}function vT(e){var t=e.stateNode,n=e.memoizedProps,r=MR(t,n,e);if(r){var u=fr;if(u!==null)switch(u.tag){case h:{var x=u.stateNode.containerInfo,T=(u.mode&Dn)!==Yt;BR(x,t,n,T);break}case N:{var I=u.type,F=u.memoizedProps,X=u.stateNode,te=(u.mode&Dn)!==Yt;FR(I,F,X,t,n,te);break}}}return r}function gT(e){var t=e.memoizedState,n=t!==null?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");UR(n,e)}function bT(e){var t=e.memoizedState,n=t!==null?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return OR(n)}function rx(e){for(var t=e.return;t!==null&&t.tag!==N&&t.tag!==h&&t.tag!==R;)t=t.return;fr=t}function Wh(e){if(e!==fr)return!1;if(!As)return rx(e),As=!0,!1;if(e.tag!==h&&(e.tag!==N||IR(e.type)&&!uv(e.type,e.memoizedProps))){var t=_s;if(t)if(jv(e))sx(e),Dv();else for(;t;)tx(e,t),t=pu(t)}return rx(e),e.tag===R?_s=bT(e):_s=fr?pu(e.stateNode):null,!0}function _T(){return As&&_s!==null}function sx(e){for(var t=_s;t;)ex(e,t),t=pu(t)}function Wl(){fr=null,_s=null,As=!1,Vo=!1}function ax(){io!==null&&(Q0(io),io=null)}function pr(){return As}function Rv(e){io===null?io=[e]:io.push(e)}var yT=l.ReactCurrentBatchConfig,wT=null;function xT(){return yT.transition}var Ms={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var NT=function(e){for(var t=null,n=e;n!==null;)n.mode&Li&&(t=n),n=n.return;return t},Po=function(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")},_u=[],yu=[],wu=[],xu=[],Nu=[],Su=[],Io=new Set;Ms.recordUnsafeLifecycleWarnings=function(e,t){Io.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&_u.push(e),e.mode&Li&&typeof t.UNSAFE_componentWillMount=="function"&&yu.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&wu.push(e),e.mode&Li&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&xu.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&Nu.push(e),e.mode&Li&&typeof t.UNSAFE_componentWillUpdate=="function"&&Su.push(e))},Ms.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;_u.length>0&&(_u.forEach(function(me){e.add(ft(me)||"Component"),Io.add(me.type)}),_u=[]);var t=new Set;yu.length>0&&(yu.forEach(function(me){t.add(ft(me)||"Component"),Io.add(me.type)}),yu=[]);var n=new Set;wu.length>0&&(wu.forEach(function(me){n.add(ft(me)||"Component"),Io.add(me.type)}),wu=[]);var r=new Set;xu.length>0&&(xu.forEach(function(me){r.add(ft(me)||"Component"),Io.add(me.type)}),xu=[]);var u=new Set;Nu.length>0&&(Nu.forEach(function(me){u.add(ft(me)||"Component"),Io.add(me.type)}),Nu=[]);var x=new Set;if(Su.length>0&&(Su.forEach(function(me){x.add(ft(me)||"Component"),Io.add(me.type)}),Su=[]),t.size>0){var T=Po(t);b(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
92
|
+
|
|
93
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
94
|
+
|
|
95
|
+
Please update the following components: %s`,T)}if(r.size>0){var I=Po(r);b(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
96
|
+
|
|
97
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
98
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
99
|
+
|
|
100
|
+
Please update the following components: %s`,I)}if(x.size>0){var F=Po(x);b(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
101
|
+
|
|
102
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
103
|
+
|
|
104
|
+
Please update the following components: %s`,F)}if(e.size>0){var X=Po(e);D(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
105
|
+
|
|
106
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
107
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
108
|
+
|
|
109
|
+
Please update the following components: %s`,X)}if(n.size>0){var te=Po(n);D(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
110
|
+
|
|
111
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
112
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
113
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
114
|
+
|
|
115
|
+
Please update the following components: %s`,te)}if(u.size>0){var fe=Po(u);D(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
116
|
+
|
|
117
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
118
|
+
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
119
|
+
|
|
120
|
+
Please update the following components: %s`,fe)}};var Gh=new Map,ox=new Set;Ms.recordLegacyContextWarning=function(e,t){var n=NT(e);if(n===null){b("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!ox.has(e.type)){var r=Gh.get(n);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(r===void 0&&(r=[],Gh.set(n,r)),r.push(e))}},Ms.flushLegacyContextWarning=function(){Gh.forEach(function(e,t){if(e.length!==0){var n=e[0],r=new Set;e.forEach(function(x){r.add(ft(x)||"Component"),ox.add(x.type)});var u=Po(r);try{un(n),b(`Legacy context API has been detected within a strict-mode tree.
|
|
121
|
+
|
|
122
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
123
|
+
|
|
124
|
+
Please update the following components: %s
|
|
125
|
+
|
|
126
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`,u)}finally{cn()}}})},Ms.discardPendingWarnings=function(){_u=[],yu=[],wu=[],xu=[],Nu=[],Su=[],Gh=new Map}}var Tv,Lv,Av,Mv,Uv,lx=function(e,t){};Tv=!1,Lv=!1,Av={},Mv={},Uv={},lx=function(e,t){if(!(e===null||typeof e!="object")&&!(!e._store||e._store.validated||e.key!=null)){if(typeof e._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var n=ft(t)||"Component";Mv[n]||(Mv[n]=!0,b('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function ST(e){return e.prototype&&e.prototype.isReactComponent}function Eu(e,t,n){var r=n.ref;if(r!==null&&typeof r!="function"&&typeof r!="object"){if((e.mode&Li||K)&&!(n._owner&&n._self&&n._owner.stateNode!==n._self)&&!(n._owner&&n._owner.tag!==f)&&!(typeof n.type=="function"&&!ST(n.type))&&n._owner){var u=ft(e)||"Component";Av[u]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',u,r),Av[u]=!0)}if(n._owner){var x=n._owner,T;if(x){var I=x;if(I.tag!==f)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");T=I.stateNode}if(!T)throw new Error("Missing owner for string ref "+r+". This error is likely caused by a bug in React. Please file an issue.");var F=T;qt(r,"ref");var X=""+r;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===X)return t.ref;var te=function(fe){var me=F.refs;fe===null?delete me[X]:me[X]=fe};return te._stringRef=X,te}else{if(typeof r!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!n._owner)throw new Error("Element ref was specified as a string ("+r+`) but no owner was set. This could happen for one of the following reasons:
|
|
127
|
+
1. You may be adding a ref to a function component
|
|
128
|
+
2. You may be adding a ref to a component that was not created inside a component's render method
|
|
129
|
+
3. You have multiple copies of React loaded
|
|
130
|
+
See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return r}function qh(e,t){var n=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function Yh(e){{var t=ft(e)||"Component";if(Uv[t])return;Uv[t]=!0,b("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function cx(e){var t=e._payload,n=e._init;return n(t)}function ux(e){function t(_e,Oe){if(e){var ye=_e.deletions;ye===null?(_e.deletions=[Oe],_e.flags|=wo):ye.push(Oe)}}function n(_e,Oe){if(!e)return null;for(var ye=Oe;ye!==null;)t(_e,ye),ye=ye.sibling;return null}function r(_e,Oe){for(var ye=new Map,Qe=Oe;Qe!==null;)Qe.key!==null?ye.set(Qe.key,Qe):ye.set(Qe.index,Qe),Qe=Qe.sibling;return ye}function u(_e,Oe){var ye=Yo(_e,Oe);return ye.index=0,ye.sibling=null,ye}function x(_e,Oe,ye){if(_e.index=ye,!e)return _e.flags|=my,Oe;var Qe=_e.alternate;if(Qe!==null){var wt=Qe.index;return wt<Oe?(_e.flags|=Hi,Oe):wt}else return _e.flags|=Hi,Oe}function T(_e){return e&&_e.alternate===null&&(_e.flags|=Hi),_e}function I(_e,Oe,ye,Qe){if(Oe===null||Oe.tag!==C){var wt=Rb(ye,_e.mode,Qe);return wt.return=_e,wt}else{var gt=u(Oe,ye);return gt.return=_e,gt}}function F(_e,Oe,ye,Qe){var wt=ye.type;if(wt===Sn)return te(_e,Oe,ye.props.children,Qe,ye.key);if(Oe!==null&&(Oe.elementType===wt||pN(Oe,ye)||typeof wt=="object"&&wt!==null&&wt.$$typeof===Nt&&cx(wt)===Oe.type)){var gt=u(Oe,ye.props);return gt.ref=Eu(_e,Oe,ye),gt.return=_e,gt._debugSource=ye._source,gt._debugOwner=ye._owner,gt}var en=kb(ye,_e.mode,Qe);return en.ref=Eu(_e,Oe,ye),en.return=_e,en}function X(_e,Oe,ye,Qe){if(Oe===null||Oe.tag!==_||Oe.stateNode.containerInfo!==ye.containerInfo||Oe.stateNode.implementation!==ye.implementation){var wt=Tb(ye,_e.mode,Qe);return wt.return=_e,wt}else{var gt=u(Oe,ye.children||[]);return gt.return=_e,gt}}function te(_e,Oe,ye,Qe,wt){if(Oe===null||Oe.tag!==y){var gt=po(ye,_e.mode,Qe,wt);return gt.return=_e,gt}else{var en=u(Oe,ye);return en.return=_e,en}}function fe(_e,Oe,ye){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number"){var Qe=Rb(""+Oe,_e.mode,ye);return Qe.return=_e,Qe}if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case Pt:{var wt=kb(Oe,_e.mode,ye);return wt.ref=Eu(_e,null,Oe),wt.return=_e,wt}case Tn:{var gt=Tb(Oe,_e.mode,ye);return gt.return=_e,gt}case Nt:{var en=Oe._payload,ln=Oe._init;return fe(_e,ln(en),ye)}}if(nn(Oe)||Ni(Oe)){var ei=po(Oe,_e.mode,ye,null);return ei.return=_e,ei}qh(_e,Oe)}return typeof Oe=="function"&&Yh(_e),null}function me(_e,Oe,ye,Qe){var wt=Oe!==null?Oe.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return wt!==null?null:I(_e,Oe,""+ye,Qe);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Pt:return ye.key===wt?F(_e,Oe,ye,Qe):null;case Tn:return ye.key===wt?X(_e,Oe,ye,Qe):null;case Nt:{var gt=ye._payload,en=ye._init;return me(_e,Oe,en(gt),Qe)}}if(nn(ye)||Ni(ye))return wt!==null?null:te(_e,Oe,ye,Qe,null);qh(_e,ye)}return typeof ye=="function"&&Yh(_e),null}function Ee(_e,Oe,ye,Qe,wt){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number"){var gt=_e.get(ye)||null;return I(Oe,gt,""+Qe,wt)}if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case Pt:{var en=_e.get(Qe.key===null?ye:Qe.key)||null;return F(Oe,en,Qe,wt)}case Tn:{var ln=_e.get(Qe.key===null?ye:Qe.key)||null;return X(Oe,ln,Qe,wt)}case Nt:var ei=Qe._payload,Un=Qe._init;return Ee(_e,Oe,ye,Un(ei),wt)}if(nn(Qe)||Ni(Qe)){var Pi=_e.get(ye)||null;return te(Oe,Pi,Qe,wt,null)}qh(Oe,Qe)}return typeof Qe=="function"&&Yh(Oe),null}function je(_e,Oe,ye){{if(typeof _e!="object"||_e===null)return Oe;switch(_e.$$typeof){case Pt:case Tn:lx(_e,ye);var Qe=_e.key;if(typeof Qe!="string")break;if(Oe===null){Oe=new Set,Oe.add(Qe);break}if(!Oe.has(Qe)){Oe.add(Qe);break}b("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Qe);break;case Nt:var wt=_e._payload,gt=_e._init;je(gt(wt),Oe,ye);break}}return Oe}function Ue(_e,Oe,ye,Qe){for(var wt=null,gt=0;gt<ye.length;gt++){var en=ye[gt];wt=je(en,wt,_e)}for(var ln=null,ei=null,Un=Oe,Pi=0,On=0,Ai=null;Un!==null&&On<ye.length;On++){Un.index>On?(Ai=Un,Un=null):Ai=Un.sibling;var Rr=me(_e,Un,ye[On],Qe);if(Rr===null){Un===null&&(Un=Ai);break}e&&Un&&Rr.alternate===null&&t(_e,Un),Pi=x(Rr,Pi,On),ei===null?ln=Rr:ei.sibling=Rr,ei=Rr,Un=Ai}if(On===ye.length){if(n(_e,Un),pr()){var xr=On;Uo(_e,xr)}return ln}if(Un===null){for(;On<ye.length;On++){var us=fe(_e,ye[On],Qe);us!==null&&(Pi=x(us,Pi,On),ei===null?ln=us:ei.sibling=us,ei=us)}if(pr()){var Fr=On;Uo(_e,Fr)}return ln}for(var Hr=r(_e,Un);On<ye.length;On++){var Tr=Ee(Hr,_e,On,ye[On],Qe);Tr!==null&&(e&&Tr.alternate!==null&&Hr.delete(Tr.key===null?On:Tr.key),Pi=x(Tr,Pi,On),ei===null?ln=Tr:ei.sibling=Tr,ei=Tr)}if(e&&Hr.forEach(function(uc){return t(_e,uc)}),pr()){var Ua=On;Uo(_e,Ua)}return ln}function mt(_e,Oe,ye,Qe){var wt=Ni(ye);if(typeof wt!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&ye[Symbol.toStringTag]==="Generator"&&(Lv||b("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Lv=!0),ye.entries===wt&&(Tv||b("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Tv=!0);var gt=wt.call(ye);if(gt)for(var en=null,ln=gt.next();!ln.done;ln=gt.next()){var ei=ln.value;en=je(ei,en,_e)}}var Un=wt.call(ye);if(Un==null)throw new Error("An iterable object provided no iterator.");for(var Pi=null,On=null,Ai=Oe,Rr=0,xr=0,us=null,Fr=Un.next();Ai!==null&&!Fr.done;xr++,Fr=Un.next()){Ai.index>xr?(us=Ai,Ai=null):us=Ai.sibling;var Hr=me(_e,Ai,Fr.value,Qe);if(Hr===null){Ai===null&&(Ai=us);break}e&&Ai&&Hr.alternate===null&&t(_e,Ai),Rr=x(Hr,Rr,xr),On===null?Pi=Hr:On.sibling=Hr,On=Hr,Ai=us}if(Fr.done){if(n(_e,Ai),pr()){var Tr=xr;Uo(_e,Tr)}return Pi}if(Ai===null){for(;!Fr.done;xr++,Fr=Un.next()){var Ua=fe(_e,Fr.value,Qe);Ua!==null&&(Rr=x(Ua,Rr,xr),On===null?Pi=Ua:On.sibling=Ua,On=Ua)}if(pr()){var uc=xr;Uo(_e,uc)}return Pi}for(var id=r(_e,Ai);!Fr.done;xr++,Fr=Un.next()){var la=Ee(id,_e,xr,Fr.value,Qe);la!==null&&(e&&la.alternate!==null&&id.delete(la.key===null?xr:la.key),Rr=x(la,Rr,xr),On===null?Pi=la:On.sibling=la,On=la)}if(e&&id.forEach(function(XA){return t(_e,XA)}),pr()){var KA=xr;Uo(_e,KA)}return Pi}function zt(_e,Oe,ye,Qe){if(Oe!==null&&Oe.tag===C){n(_e,Oe.sibling);var wt=u(Oe,ye);return wt.return=_e,wt}n(_e,Oe);var gt=Rb(ye,_e.mode,Qe);return gt.return=_e,gt}function Mt(_e,Oe,ye,Qe){for(var wt=ye.key,gt=Oe;gt!==null;){if(gt.key===wt){var en=ye.type;if(en===Sn){if(gt.tag===y){n(_e,gt.sibling);var ln=u(gt,ye.props.children);return ln.return=_e,ln._debugSource=ye._source,ln._debugOwner=ye._owner,ln}}else if(gt.elementType===en||pN(gt,ye)||typeof en=="object"&&en!==null&&en.$$typeof===Nt&&cx(en)===gt.type){n(_e,gt.sibling);var ei=u(gt,ye.props);return ei.ref=Eu(_e,gt,ye),ei.return=_e,ei._debugSource=ye._source,ei._debugOwner=ye._owner,ei}n(_e,gt);break}else t(_e,gt);gt=gt.sibling}if(ye.type===Sn){var Un=po(ye.props.children,_e.mode,Qe,ye.key);return Un.return=_e,Un}else{var Pi=kb(ye,_e.mode,Qe);return Pi.ref=Eu(_e,Oe,ye),Pi.return=_e,Pi}}function Rn(_e,Oe,ye,Qe){for(var wt=ye.key,gt=Oe;gt!==null;){if(gt.key===wt)if(gt.tag===_&>.stateNode.containerInfo===ye.containerInfo&>.stateNode.implementation===ye.implementation){n(_e,gt.sibling);var en=u(gt,ye.children||[]);return en.return=_e,en}else{n(_e,gt);break}else t(_e,gt);gt=gt.sibling}var ln=Tb(ye,_e.mode,Qe);return ln.return=_e,ln}function Nn(_e,Oe,ye,Qe){var wt=typeof ye=="object"&&ye!==null&&ye.type===Sn&&ye.key===null;if(wt&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Pt:return T(Mt(_e,Oe,ye,Qe));case Tn:return T(Rn(_e,Oe,ye,Qe));case Nt:var gt=ye._payload,en=ye._init;return Nn(_e,Oe,en(gt),Qe)}if(nn(ye))return Ue(_e,Oe,ye,Qe);if(Ni(ye))return mt(_e,Oe,ye,Qe);qh(_e,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?T(zt(_e,Oe,""+ye,Qe)):(typeof ye=="function"&&Yh(_e),n(_e,Oe))}return Nn}var Gl=ux(!0),dx=ux(!1);function ET(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var n=t.child,r=Yo(n,n.pendingProps);for(t.child=r,r.return=t;n.sibling!==null;)n=n.sibling,r=r.sibling=Yo(n,n.pendingProps),r.return=t;r.sibling=null}}function CT(e,t){for(var n=e.child;n!==null;)mA(n,t),n=n.sibling}var Ov=eo(null),Vv;Vv={};var Kh=null,ql=null,Pv=null,Xh=!1;function Jh(){Kh=null,ql=null,Pv=null,Xh=!1}function hx(){Xh=!0}function mx(){Xh=!1}function fx(e,t,n){Dr(Ov,t._currentValue,e),t._currentValue=n,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==Vv&&b("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=Vv}function Iv(e,t){var n=Ov.current;jr(Ov,t),e._currentValue=n}function Bv(e,t,n){for(var r=e;r!==null;){var u=r.alternate;if(Tl(r.childLanes,t)?u!==null&&!Tl(u.childLanes,t)&&(u.childLanes=gn(u.childLanes,t)):(r.childLanes=gn(r.childLanes,t),u!==null&&(u.childLanes=gn(u.childLanes,t))),r===n)break;r=r.return}r!==n&&b("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function jT(e,t,n){DT(e,t,n)}function DT(e,t,n){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var u=void 0,x=r.dependencies;if(x!==null){u=r.child;for(var T=x.firstContext;T!==null;){if(T.context===t){if(r.tag===f){var I=zc(n),F=ka(pi,I);F.tag=Qh;var X=r.updateQueue;if(X!==null){var te=X.shared,fe=te.pending;fe===null?F.next=F:(F.next=fe.next,fe.next=F),te.pending=F}}r.lanes=gn(r.lanes,n);var me=r.alternate;me!==null&&(me.lanes=gn(me.lanes,n)),Bv(r.return,n,e),x.lanes=gn(x.lanes,n);break}T=T.next}}else if(r.tag===v)u=r.type===e.type?null:r.child;else if(r.tag===O){var Ee=r.return;if(Ee===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");Ee.lanes=gn(Ee.lanes,n);var je=Ee.alternate;je!==null&&(je.lanes=gn(je.lanes,n)),Bv(Ee,n,e),u=r.sibling}else u=r.child;if(u!==null)u.return=r;else for(u=r;u!==null;){if(u===e){u=null;break}var Ue=u.sibling;if(Ue!==null){Ue.return=u.return,u=Ue;break}u=u.return}r=u}}function Yl(e,t){Kh=e,ql=null,Pv=null;var n=e.dependencies;if(n!==null){var r=n.firstContext;r!==null&&(rs(n.lanes,t)&&Bu(),n.firstContext=null)}}function zi(e){Xh&&b("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(Pv!==e){var n={context:e,memoizedValue:t,next:null};if(ql===null){if(Kh===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");ql=n,Kh.dependencies={lanes:Ye,firstContext:n}}else ql=ql.next=n}return t}var Bo=null;function Fv(e){Bo===null?Bo=[e]:Bo.push(e)}function kT(){if(Bo!==null){for(var e=0;e<Bo.length;e++){var t=Bo[e],n=t.interleaved;if(n!==null){t.interleaved=null;var r=n.next,u=t.pending;if(u!==null){var x=u.next;u.next=r,n.next=x}t.pending=n}}Bo=null}}function px(e,t,n,r){var u=t.interleaved;return u===null?(n.next=n,Fv(t)):(n.next=u.next,u.next=n),t.interleaved=n,Zh(e,r)}function RT(e,t,n,r){var u=t.interleaved;u===null?(n.next=n,Fv(t)):(n.next=u.next,u.next=n),t.interleaved=n}function TT(e,t,n,r){var u=t.interleaved;return u===null?(n.next=n,Fv(t)):(n.next=u.next,u.next=n),t.interleaved=n,Zh(e,r)}function Zr(e,t){return Zh(e,t)}var LT=Zh;function Zh(e,t){e.lanes=gn(e.lanes,t);var n=e.alternate;n!==null&&(n.lanes=gn(n.lanes,t)),n===null&&(e.flags&(Hi|_a))!==Zt&&dN(e);for(var r=e,u=e.return;u!==null;)u.childLanes=gn(u.childLanes,t),n=u.alternate,n!==null?n.childLanes=gn(n.childLanes,t):(u.flags&(Hi|_a))!==Zt&&dN(e),r=u,u=u.return;if(r.tag===h){var x=r.stateNode;return x}else return null}var vx=0,gx=1,Qh=2,Hv=3,em=!1,zv,tm;zv=!1,tm=null;function $v(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:Ye},effects:null};e.updateQueue=t}function bx(e,t){var n=t.updateQueue,r=e.updateQueue;if(n===r){var u={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects};t.updateQueue=u}}function ka(e,t){var n={eventTime:e,lane:t,tag:vx,payload:null,callback:null,next:null};return n}function ro(e,t,n){var r=e.updateQueue;if(r===null)return null;var u=r.shared;if(tm===u&&!zv&&(b("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),zv=!0),RL()){var x=u.pending;return x===null?t.next=t:(t.next=x.next,x.next=t),u.pending=t,LT(e,n)}else return TT(e,u,t,n)}function nm(e,t,n){var r=t.updateQueue;if(r!==null){var u=r.shared;if(Ty(n)){var x=u.lanes;x=Ay(x,e.pendingLanes);var T=gn(x,n);u.lanes=T,Op(e,T)}}}function Wv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null){var u=r.updateQueue;if(n===u){var x=null,T=null,I=n.firstBaseUpdate;if(I!==null){var F=I;do{var X={eventTime:F.eventTime,lane:F.lane,tag:F.tag,payload:F.payload,callback:F.callback,next:null};T===null?x=T=X:(T.next=X,T=X),F=F.next}while(F!==null);T===null?x=T=t:(T.next=t,T=t)}else x=T=t;n={baseState:u.baseState,firstBaseUpdate:x,lastBaseUpdate:T,shared:u.shared,effects:u.effects},e.updateQueue=n;return}}var te=n.lastBaseUpdate;te===null?n.firstBaseUpdate=t:te.next=t,n.lastBaseUpdate=t}function AT(e,t,n,r,u,x){switch(n.tag){case gx:{var T=n.payload;if(typeof T=="function"){hx();var I=T.call(x,r,u);{if(e.mode&Li){cr(!0);try{T.call(x,r,u)}finally{cr(!1)}}mx()}return I}return T}case Hv:e.flags=e.flags&~Vr|Bn;case vx:{var F=n.payload,X;if(typeof F=="function"){hx(),X=F.call(x,r,u);{if(e.mode&Li){cr(!0);try{F.call(x,r,u)}finally{cr(!1)}}mx()}}else X=F;return X==null?r:Ht({},r,X)}case Qh:return em=!0,r}return r}function im(e,t,n,r){var u=e.updateQueue;em=!1,tm=u.shared;var x=u.firstBaseUpdate,T=u.lastBaseUpdate,I=u.shared.pending;if(I!==null){u.shared.pending=null;var F=I,X=F.next;F.next=null,T===null?x=X:T.next=X,T=F;var te=e.alternate;if(te!==null){var fe=te.updateQueue,me=fe.lastBaseUpdate;me!==T&&(me===null?fe.firstBaseUpdate=X:me.next=X,fe.lastBaseUpdate=F)}}if(x!==null){var Ee=u.baseState,je=Ye,Ue=null,mt=null,zt=null,Mt=x;do{var Rn=Mt.lane,Nn=Mt.eventTime;if(Tl(r,Rn)){if(zt!==null){var Oe={eventTime:Nn,lane:ur,tag:Mt.tag,payload:Mt.payload,callback:Mt.callback,next:null};zt=zt.next=Oe}Ee=AT(e,u,Mt,Ee,t,n);var ye=Mt.callback;if(ye!==null&&Mt.lane!==ur){e.flags|=hy;var Qe=u.effects;Qe===null?u.effects=[Mt]:Qe.push(Mt)}}else{var _e={eventTime:Nn,lane:Rn,tag:Mt.tag,payload:Mt.payload,callback:Mt.callback,next:null};zt===null?(mt=zt=_e,Ue=Ee):zt=zt.next=_e,je=gn(je,Rn)}if(Mt=Mt.next,Mt===null){if(I=u.shared.pending,I===null)break;var wt=I,gt=wt.next;wt.next=null,Mt=gt,u.lastBaseUpdate=wt,u.shared.pending=null}}while(!0);zt===null&&(Ue=Ee),u.baseState=Ue,u.firstBaseUpdate=mt,u.lastBaseUpdate=zt;var en=u.shared.interleaved;if(en!==null){var ln=en;do je=gn(je,ln.lane),ln=ln.next;while(ln!==en)}else x===null&&(u.shared.lanes=Ye);Zu(je),e.lanes=je,e.memoizedState=Ee}tm=null}function MT(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function _x(){em=!1}function rm(){return em}function yx(e,t,n){var r=t.effects;if(t.effects=null,r!==null)for(var u=0;u<r.length;u++){var x=r[u],T=x.callback;T!==null&&(x.callback=null,MT(T,n))}}var Cu={},so=eo(Cu),ju=eo(Cu),sm=eo(Cu);function am(e){if(e===Cu)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function wx(){var e=am(sm.current);return e}function Gv(e,t){Dr(sm,t,e),Dr(ju,e,e),Dr(so,Cu,e);var n=Jk(t);jr(so,e),Dr(so,n,e)}function Kl(e){jr(so,e),jr(ju,e),jr(sm,e)}function qv(){var e=am(so.current);return e}function xx(e){am(sm.current);var t=am(so.current),n=Zk(t,e.type);t!==n&&(Dr(ju,e,e),Dr(so,n,e))}function Yv(e){ju.current===e&&(jr(so,e),jr(ju,e))}var UT=0,Nx=1,Sx=1,Du=2,Us=eo(UT);function Kv(e,t){return(e&t)!==0}function Xl(e){return e&Nx}function Xv(e,t){return e&Nx|t}function OT(e,t){return e|t}function ao(e,t){Dr(Us,t,e)}function Jl(e){jr(Us,e)}function VT(e,t){var n=e.memoizedState;return n!==null?n.dehydrated!==null:(e.memoizedProps,!0)}function om(e){for(var t=e;t!==null;){if(t.tag===R){var n=t.memoizedState;if(n!==null){var r=n.dehydrated;if(r===null||Fw(r)||fv(r))return t}}else if(t.tag===H&&t.memoizedProps.revealOrder!==void 0){var u=(t.flags&Bn)!==Zt;if(u)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Qr=0,Ki=1,ta=2,Xi=4,vr=8,Jv=[];function Zv(){for(var e=0;e<Jv.length;e++){var t=Jv[e];t._workInProgressVersionPrimary=null}Jv.length=0}function PT(e,t){var n=t._getVersion,r=n(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,r]:e.mutableSourceEagerHydrationData.push(t,r)}var yt=l.ReactCurrentDispatcher,ku=l.ReactCurrentBatchConfig,Qv,Zl;Qv=new Set;var Fo=Ye,Qn=null,Ji=null,Zi=null,lm=!1,Ru=!1,Tu=0,IT=0,BT=25,Fe=null,ys=null,oo=-1,eg=!1;function qn(){{var e=Fe;ys===null?ys=[e]:ys.push(e)}}function ct(){{var e=Fe;ys!==null&&(oo++,ys[oo]!==e&&FT(e))}}function Ql(e){e!=null&&!nn(e)&&b("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Fe,typeof e)}function FT(e){{var t=ft(Qn);if(!Qv.has(t)&&(Qv.add(t),ys!==null)){for(var n="",r=30,u=0;u<=oo;u++){for(var x=ys[u],T=u===oo?e:x,I=u+1+". "+x;I.length<r;)I+=" ";I+=T+`
|
|
131
|
+
`,n+=I}b(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
|
|
132
|
+
|
|
133
|
+
Previous render Next render
|
|
134
|
+
------------------------------------------------------
|
|
135
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
136
|
+
`,t,n)}}}function kr(){throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
137
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
138
|
+
2. You might be breaking the Rules of Hooks
|
|
139
|
+
3. You might have more than one copy of React in the same app
|
|
140
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function tg(e,t){if(eg)return!1;if(t===null)return b("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Fe),!1;e.length!==t.length&&b(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
141
|
+
|
|
142
|
+
Previous: %s
|
|
143
|
+
Incoming: %s`,Fe,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!os(e[n],t[n]))return!1;return!0}function ec(e,t,n,r,u,x){Fo=x,Qn=t,ys=e!==null?e._debugHookTypes:null,oo=-1,eg=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=Ye,e!==null&&e.memoizedState!==null?yt.current=Gx:ys!==null?yt.current=Wx:yt.current=$x;var T=n(r,u);if(Ru){var I=0;do{if(Ru=!1,Tu=0,I>=BT)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");I+=1,eg=!1,Ji=null,Zi=null,t.updateQueue=null,oo=-1,yt.current=qx,T=n(r,u)}while(Ru)}yt.current=wm,t._debugHookTypes=ys;var F=Ji!==null&&Ji.next!==null;if(Fo=Ye,Qn=null,Ji=null,Zi=null,Fe=null,ys=null,oo=-1,e!==null&&(e.flags&ya)!==(t.flags&ya)&&(e.mode&Dn)!==Yt&&b("Internal React error: Expected static flag was missing. Please notify the React team."),lm=!1,F)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return T}function tc(){var e=Tu!==0;return Tu=0,e}function Ex(e,t,n){t.updateQueue=e.updateQueue,(t.mode&Js)!==Yt?t.flags&=-50333701:t.flags&=-2053,e.lanes=ch(e.lanes,n)}function Cx(){if(yt.current=wm,lm){for(var e=Qn.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lm=!1}Fo=Ye,Qn=null,Ji=null,Zi=null,ys=null,oo=-1,Fe=null,Ix=!1,Ru=!1,Tu=0}function na(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zi===null?Qn.memoizedState=Zi=e:Zi=Zi.next=e,Zi}function ws(){var e;if(Ji===null){var t=Qn.alternate;t!==null?e=t.memoizedState:e=null}else e=Ji.next;var n;if(Zi===null?n=Qn.memoizedState:n=Zi.next,n!==null)Zi=n,n=Zi.next,Ji=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");Ji=e;var r={memoizedState:Ji.memoizedState,baseState:Ji.baseState,baseQueue:Ji.baseQueue,queue:Ji.queue,next:null};Zi===null?Qn.memoizedState=Zi=r:Zi=Zi.next=r}return Zi}function jx(){return{lastEffect:null,stores:null}}function ng(e,t){return typeof t=="function"?t(e):t}function ig(e,t,n){var r=na(),u;n!==void 0?u=n(t):u=t,r.memoizedState=r.baseState=u;var x={pending:null,interleaved:null,lanes:Ye,dispatch:null,lastRenderedReducer:e,lastRenderedState:u};r.queue=x;var T=x.dispatch=WT.bind(null,Qn,x);return[r.memoizedState,T]}function rg(e,t,n){var r=ws(),u=r.queue;if(u===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");u.lastRenderedReducer=e;var x=Ji,T=x.baseQueue,I=u.pending;if(I!==null){if(T!==null){var F=T.next,X=I.next;T.next=X,I.next=F}x.baseQueue!==T&&b("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),x.baseQueue=T=I,u.pending=null}if(T!==null){var te=T.next,fe=x.baseState,me=null,Ee=null,je=null,Ue=te;do{var mt=Ue.lane;if(Tl(Fo,mt)){if(je!==null){var Mt={lane:ur,action:Ue.action,hasEagerState:Ue.hasEagerState,eagerState:Ue.eagerState,next:null};je=je.next=Mt}if(Ue.hasEagerState)fe=Ue.eagerState;else{var Rn=Ue.action;fe=e(fe,Rn)}}else{var zt={lane:mt,action:Ue.action,hasEagerState:Ue.hasEagerState,eagerState:Ue.eagerState,next:null};je===null?(Ee=je=zt,me=fe):je=je.next=zt,Qn.lanes=gn(Qn.lanes,mt),Zu(mt)}Ue=Ue.next}while(Ue!==null&&Ue!==te);je===null?me=fe:je.next=Ee,os(fe,r.memoizedState)||Bu(),r.memoizedState=fe,r.baseState=me,r.baseQueue=je,u.lastRenderedState=fe}var Nn=u.interleaved;if(Nn!==null){var _e=Nn;do{var Oe=_e.lane;Qn.lanes=gn(Qn.lanes,Oe),Zu(Oe),_e=_e.next}while(_e!==Nn)}else T===null&&(u.lanes=Ye);var ye=u.dispatch;return[r.memoizedState,ye]}function sg(e,t,n){var r=ws(),u=r.queue;if(u===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");u.lastRenderedReducer=e;var x=u.dispatch,T=u.pending,I=r.memoizedState;if(T!==null){u.pending=null;var F=T.next,X=F;do{var te=X.action;I=e(I,te),X=X.next}while(X!==F);os(I,r.memoizedState)||Bu(),r.memoizedState=I,r.baseQueue===null&&(r.baseState=I),u.lastRenderedState=I}return[I,x]}function gI(e,t,n){}function bI(e,t,n){}function ag(e,t,n){var r=Qn,u=na(),x,T=pr();if(T){if(n===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");x=n(),Zl||x!==n()&&(b("The result of getServerSnapshot should be cached to avoid an infinite loop"),Zl=!0)}else{if(x=t(),!Zl){var I=t();os(x,I)||(b("The result of getSnapshot should be cached to avoid an infinite loop"),Zl=!0)}var F=Bm();if(F===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");lh(F,Fo)||Dx(r,t,x)}u.memoizedState=x;var X={value:x,getSnapshot:t};return u.queue=X,mm(Rx.bind(null,r,X,e),[e]),r.flags|=Wa,Lu(Ki|vr,kx.bind(null,r,X,x,t),void 0,null),x}function cm(e,t,n){var r=Qn,u=ws(),x=t();if(!Zl){var T=t();os(x,T)||(b("The result of getSnapshot should be cached to avoid an infinite loop"),Zl=!0)}var I=u.memoizedState,F=!os(I,x);F&&(u.memoizedState=x,Bu());var X=u.queue;if(Mu(Rx.bind(null,r,X,e),[e]),X.getSnapshot!==t||F||Zi!==null&&Zi.memoizedState.tag&Ki){r.flags|=Wa,Lu(Ki|vr,kx.bind(null,r,X,x,t),void 0,null);var te=Bm();if(te===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");lh(te,Fo)||Dx(r,t,x)}return x}function Dx(e,t,n){e.flags|=np;var r={getSnapshot:t,value:n},u=Qn.updateQueue;if(u===null)u=jx(),Qn.updateQueue=u,u.stores=[r];else{var x=u.stores;x===null?u.stores=[r]:x.push(r)}}function kx(e,t,n,r){t.value=n,t.getSnapshot=r,Tx(t)&&Lx(e)}function Rx(e,t,n){var r=function(){Tx(t)&&Lx(e)};return n(r)}function Tx(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!os(n,r)}catch{return!0}}function Lx(e){var t=Zr(e,sn);t!==null&&nr(t,e,sn,pi)}function um(e){var t=na();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:Ye,dispatch:null,lastRenderedReducer:ng,lastRenderedState:e};t.queue=n;var r=n.dispatch=GT.bind(null,Qn,n);return[t.memoizedState,r]}function og(e){return rg(ng)}function lg(e){return sg(ng)}function Lu(e,t,n,r){var u={tag:e,create:t,destroy:n,deps:r,next:null},x=Qn.updateQueue;if(x===null)x=jx(),Qn.updateQueue=x,x.lastEffect=u.next=u;else{var T=x.lastEffect;if(T===null)x.lastEffect=u.next=u;else{var I=T.next;T.next=u,u.next=I,x.lastEffect=u}}return u}function cg(e){var t=na();{var n={current:e};return t.memoizedState=n,n}}function dm(e){var t=ws();return t.memoizedState}function Au(e,t,n,r){var u=na(),x=r===void 0?null:r;Qn.flags|=e,u.memoizedState=Lu(Ki|t,n,void 0,x)}function hm(e,t,n,r){var u=ws(),x=r===void 0?null:r,T=void 0;if(Ji!==null){var I=Ji.memoizedState;if(T=I.destroy,x!==null){var F=I.deps;if(tg(x,F)){u.memoizedState=Lu(t,n,T,x);return}}}Qn.flags|=e,u.memoizedState=Lu(Ki|t,n,T,x)}function mm(e,t){return(Qn.mode&Js)!==Yt?Au(ap|Wa|sp,vr,e,t):Au(Wa|sp,vr,e,t)}function Mu(e,t){return hm(Wa,vr,e,t)}function ug(e,t){return Au(In,ta,e,t)}function fm(e,t){return hm(In,ta,e,t)}function dg(e,t){var n=In;return n|=So,(Qn.mode&Js)!==Yt&&(n|=Ga),Au(n,Xi,e,t)}function pm(e,t){return hm(In,Xi,e,t)}function Ax(e,t){if(typeof t=="function"){var n=t,r=e();return n(r),function(){n(null)}}else if(t!=null){var u=t;u.hasOwnProperty("current")||b("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(u).join(", ")+"}");var x=e();return u.current=x,function(){u.current=null}}}function hg(e,t,n){typeof t!="function"&&b("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var r=n!=null?n.concat([e]):null,u=In;return u|=So,(Qn.mode&Js)!==Yt&&(u|=Ga),Au(u,Xi,Ax.bind(null,t,e),r)}function vm(e,t,n){typeof t!="function"&&b("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var r=n!=null?n.concat([e]):null;return hm(In,Xi,Ax.bind(null,t,e),r)}function HT(e,t){}var gm=HT;function mg(e,t){var n=na(),r=t===void 0?null:t;return n.memoizedState=[e,r],e}function bm(e,t){var n=ws(),r=t===void 0?null:t,u=n.memoizedState;if(u!==null&&r!==null){var x=u[1];if(tg(r,x))return u[0]}return n.memoizedState=[e,r],e}function fg(e,t){var n=na(),r=t===void 0?null:t,u=e();return n.memoizedState=[u,r],u}function _m(e,t){var n=ws(),r=t===void 0?null:t,u=n.memoizedState;if(u!==null&&r!==null){var x=u[1];if(tg(r,x))return u[0]}var T=e();return n.memoizedState=[T,r],T}function pg(e){var t=na();return t.memoizedState=e,e}function Mx(e){var t=ws(),n=Ji,r=n.memoizedState;return Ox(t,r,e)}function Ux(e){var t=ws();if(Ji===null)return t.memoizedState=e,e;var n=Ji.memoizedState;return Ox(t,n,e)}function Ox(e,t,n){var r=!jj(Fo);if(r){if(!os(n,t)){var u=Ly();Qn.lanes=gn(Qn.lanes,u),Zu(u),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,Bu()),e.memoizedState=n,n}function zT(e,t,n){var r=Ts();dr(Oj(r,xa)),e(!0);var u=ku.transition;ku.transition={};var x=ku.transition;ku.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(dr(r),ku.transition=u,u===null&&x._updatedFibers){var T=x._updatedFibers.size;T>10&&D("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),x._updatedFibers.clear()}}}function vg(){var e=um(!1),t=e[0],n=e[1],r=zT.bind(null,n),u=na();return u.memoizedState=r,[t,r]}function Vx(){var e=og(),t=e[0],n=ws(),r=n.memoizedState;return[t,r]}function Px(){var e=lg(),t=e[0],n=ws(),r=n.memoizedState;return[t,r]}var Ix=!1;function $T(){return Ix}function gg(){var e=na(),t=Bm(),n=t.identifierPrefix,r;if(pr()){var u=oT();r=":"+n+"R"+u;var x=Tu++;x>0&&(r+="H"+x.toString(32)),r+=":"}else{var T=IT++;r=":"+n+"r"+T.toString(32)+":"}return e.memoizedState=r,r}function ym(){var e=ws(),t=e.memoizedState;return t}function WT(e,t,n){typeof arguments[3]=="function"&&b("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=mo(e),u={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bx(e))Fx(t,u);else{var x=px(e,t,u,r);if(x!==null){var T=Br();nr(x,e,r,T),Hx(x,t,r)}}zx(e,r)}function GT(e,t,n){typeof arguments[3]=="function"&&b("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=mo(e),u={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bx(e))Fx(t,u);else{var x=e.alternate;if(e.lanes===Ye&&(x===null||x.lanes===Ye)){var T=t.lastRenderedReducer;if(T!==null){var I;I=yt.current,yt.current=Os;try{var F=t.lastRenderedState,X=T(F,n);if(u.hasEagerState=!0,u.eagerState=X,os(X,F)){RT(e,t,u,r);return}}catch{}finally{yt.current=I}}}var te=px(e,t,u,r);if(te!==null){var fe=Br();nr(te,e,r,fe),Hx(te,t,r)}}zx(e,r)}function Bx(e){var t=e.alternate;return e===Qn||t!==null&&t===Qn}function Fx(e,t){Ru=lm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hx(e,t,n){if(Ty(n)){var r=t.lanes;r=Ay(r,e.pendingLanes);var u=gn(r,n);t.lanes=u,Op(e,u)}}function zx(e,t,n){dp(e,t)}var wm={readContext:zi,useCallback:kr,useContext:kr,useEffect:kr,useImperativeHandle:kr,useInsertionEffect:kr,useLayoutEffect:kr,useMemo:kr,useReducer:kr,useRef:kr,useState:kr,useDebugValue:kr,useDeferredValue:kr,useTransition:kr,useMutableSource:kr,useSyncExternalStore:kr,useId:kr,unstable_isNewReconciler:ee},$x=null,Wx=null,Gx=null,qx=null,ia=null,Os=null,xm=null;{var bg=function(){b("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},an=function(){b("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};$x={readContext:function(e){return zi(e)},useCallback:function(e,t){return Fe="useCallback",qn(),Ql(t),mg(e,t)},useContext:function(e){return Fe="useContext",qn(),zi(e)},useEffect:function(e,t){return Fe="useEffect",qn(),Ql(t),mm(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",qn(),Ql(n),hg(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",qn(),Ql(t),ug(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",qn(),Ql(t),dg(e,t)},useMemo:function(e,t){Fe="useMemo",qn(),Ql(t);var n=yt.current;yt.current=ia;try{return fg(e,t)}finally{yt.current=n}},useReducer:function(e,t,n){Fe="useReducer",qn();var r=yt.current;yt.current=ia;try{return ig(e,t,n)}finally{yt.current=r}},useRef:function(e){return Fe="useRef",qn(),cg(e)},useState:function(e){Fe="useState",qn();var t=yt.current;yt.current=ia;try{return um(e)}finally{yt.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",qn(),void 0},useDeferredValue:function(e){return Fe="useDeferredValue",qn(),pg(e)},useTransition:function(){return Fe="useTransition",qn(),vg()},useMutableSource:function(e,t,n){return Fe="useMutableSource",qn(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",qn(),ag(e,t,n)},useId:function(){return Fe="useId",qn(),gg()},unstable_isNewReconciler:ee},Wx={readContext:function(e){return zi(e)},useCallback:function(e,t){return Fe="useCallback",ct(),mg(e,t)},useContext:function(e){return Fe="useContext",ct(),zi(e)},useEffect:function(e,t){return Fe="useEffect",ct(),mm(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",ct(),hg(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",ct(),ug(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",ct(),dg(e,t)},useMemo:function(e,t){Fe="useMemo",ct();var n=yt.current;yt.current=ia;try{return fg(e,t)}finally{yt.current=n}},useReducer:function(e,t,n){Fe="useReducer",ct();var r=yt.current;yt.current=ia;try{return ig(e,t,n)}finally{yt.current=r}},useRef:function(e){return Fe="useRef",ct(),cg(e)},useState:function(e){Fe="useState",ct();var t=yt.current;yt.current=ia;try{return um(e)}finally{yt.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",ct(),void 0},useDeferredValue:function(e){return Fe="useDeferredValue",ct(),pg(e)},useTransition:function(){return Fe="useTransition",ct(),vg()},useMutableSource:function(e,t,n){return Fe="useMutableSource",ct(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",ct(),ag(e,t,n)},useId:function(){return Fe="useId",ct(),gg()},unstable_isNewReconciler:ee},Gx={readContext:function(e){return zi(e)},useCallback:function(e,t){return Fe="useCallback",ct(),bm(e,t)},useContext:function(e){return Fe="useContext",ct(),zi(e)},useEffect:function(e,t){return Fe="useEffect",ct(),Mu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",ct(),vm(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",ct(),fm(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",ct(),pm(e,t)},useMemo:function(e,t){Fe="useMemo",ct();var n=yt.current;yt.current=Os;try{return _m(e,t)}finally{yt.current=n}},useReducer:function(e,t,n){Fe="useReducer",ct();var r=yt.current;yt.current=Os;try{return rg(e,t,n)}finally{yt.current=r}},useRef:function(e){return Fe="useRef",ct(),dm()},useState:function(e){Fe="useState",ct();var t=yt.current;yt.current=Os;try{return og(e)}finally{yt.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",ct(),gm()},useDeferredValue:function(e){return Fe="useDeferredValue",ct(),Mx(e)},useTransition:function(){return Fe="useTransition",ct(),Vx()},useMutableSource:function(e,t,n){return Fe="useMutableSource",ct(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",ct(),cm(e,t)},useId:function(){return Fe="useId",ct(),ym()},unstable_isNewReconciler:ee},qx={readContext:function(e){return zi(e)},useCallback:function(e,t){return Fe="useCallback",ct(),bm(e,t)},useContext:function(e){return Fe="useContext",ct(),zi(e)},useEffect:function(e,t){return Fe="useEffect",ct(),Mu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",ct(),vm(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",ct(),fm(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",ct(),pm(e,t)},useMemo:function(e,t){Fe="useMemo",ct();var n=yt.current;yt.current=xm;try{return _m(e,t)}finally{yt.current=n}},useReducer:function(e,t,n){Fe="useReducer",ct();var r=yt.current;yt.current=xm;try{return sg(e,t,n)}finally{yt.current=r}},useRef:function(e){return Fe="useRef",ct(),dm()},useState:function(e){Fe="useState",ct();var t=yt.current;yt.current=xm;try{return lg(e)}finally{yt.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",ct(),gm()},useDeferredValue:function(e){return Fe="useDeferredValue",ct(),Ux(e)},useTransition:function(){return Fe="useTransition",ct(),Px()},useMutableSource:function(e,t,n){return Fe="useMutableSource",ct(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",ct(),cm(e,t)},useId:function(){return Fe="useId",ct(),ym()},unstable_isNewReconciler:ee},ia={readContext:function(e){return bg(),zi(e)},useCallback:function(e,t){return Fe="useCallback",an(),qn(),mg(e,t)},useContext:function(e){return Fe="useContext",an(),qn(),zi(e)},useEffect:function(e,t){return Fe="useEffect",an(),qn(),mm(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",an(),qn(),hg(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",an(),qn(),ug(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",an(),qn(),dg(e,t)},useMemo:function(e,t){Fe="useMemo",an(),qn();var n=yt.current;yt.current=ia;try{return fg(e,t)}finally{yt.current=n}},useReducer:function(e,t,n){Fe="useReducer",an(),qn();var r=yt.current;yt.current=ia;try{return ig(e,t,n)}finally{yt.current=r}},useRef:function(e){return Fe="useRef",an(),qn(),cg(e)},useState:function(e){Fe="useState",an(),qn();var t=yt.current;yt.current=ia;try{return um(e)}finally{yt.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",an(),qn(),void 0},useDeferredValue:function(e){return Fe="useDeferredValue",an(),qn(),pg(e)},useTransition:function(){return Fe="useTransition",an(),qn(),vg()},useMutableSource:function(e,t,n){return Fe="useMutableSource",an(),qn(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",an(),qn(),ag(e,t,n)},useId:function(){return Fe="useId",an(),qn(),gg()},unstable_isNewReconciler:ee},Os={readContext:function(e){return bg(),zi(e)},useCallback:function(e,t){return Fe="useCallback",an(),ct(),bm(e,t)},useContext:function(e){return Fe="useContext",an(),ct(),zi(e)},useEffect:function(e,t){return Fe="useEffect",an(),ct(),Mu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",an(),ct(),vm(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",an(),ct(),fm(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",an(),ct(),pm(e,t)},useMemo:function(e,t){Fe="useMemo",an(),ct();var n=yt.current;yt.current=Os;try{return _m(e,t)}finally{yt.current=n}},useReducer:function(e,t,n){Fe="useReducer",an(),ct();var r=yt.current;yt.current=Os;try{return rg(e,t,n)}finally{yt.current=r}},useRef:function(e){return Fe="useRef",an(),ct(),dm()},useState:function(e){Fe="useState",an(),ct();var t=yt.current;yt.current=Os;try{return og(e)}finally{yt.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",an(),ct(),gm()},useDeferredValue:function(e){return Fe="useDeferredValue",an(),ct(),Mx(e)},useTransition:function(){return Fe="useTransition",an(),ct(),Vx()},useMutableSource:function(e,t,n){return Fe="useMutableSource",an(),ct(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",an(),ct(),cm(e,t)},useId:function(){return Fe="useId",an(),ct(),ym()},unstable_isNewReconciler:ee},xm={readContext:function(e){return bg(),zi(e)},useCallback:function(e,t){return Fe="useCallback",an(),ct(),bm(e,t)},useContext:function(e){return Fe="useContext",an(),ct(),zi(e)},useEffect:function(e,t){return Fe="useEffect",an(),ct(),Mu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",an(),ct(),vm(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",an(),ct(),fm(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",an(),ct(),pm(e,t)},useMemo:function(e,t){Fe="useMemo",an(),ct();var n=yt.current;yt.current=Os;try{return _m(e,t)}finally{yt.current=n}},useReducer:function(e,t,n){Fe="useReducer",an(),ct();var r=yt.current;yt.current=Os;try{return sg(e,t,n)}finally{yt.current=r}},useRef:function(e){return Fe="useRef",an(),ct(),dm()},useState:function(e){Fe="useState",an(),ct();var t=yt.current;yt.current=Os;try{return lg(e)}finally{yt.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",an(),ct(),gm()},useDeferredValue:function(e){return Fe="useDeferredValue",an(),ct(),Ux(e)},useTransition:function(){return Fe="useTransition",an(),ct(),Px()},useMutableSource:function(e,t,n){return Fe="useMutableSource",an(),ct(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",an(),ct(),cm(e,t)},useId:function(){return Fe="useId",an(),ct(),ym()},unstable_isNewReconciler:ee}}var lo=s.unstable_now,Yx=0,Nm=-1,Uu=-1,Sm=-1,_g=!1,Em=!1;function Kx(){return _g}function qT(){Em=!0}function YT(){_g=!1,Em=!1}function KT(){_g=Em,Em=!1}function Xx(){return Yx}function Jx(){Yx=lo()}function yg(e){Uu=lo(),e.actualStartTime<0&&(e.actualStartTime=lo())}function Zx(e){Uu=-1}function Cm(e,t){if(Uu>=0){var n=lo()-Uu;e.actualDuration+=n,t&&(e.selfBaseDuration=n),Uu=-1}}function ra(e){if(Nm>=0){var t=lo()-Nm;Nm=-1;for(var n=e.return;n!==null;){switch(n.tag){case h:var r=n.stateNode;r.effectDuration+=t;return;case E:var u=n.stateNode;u.effectDuration+=t;return}n=n.return}}}function wg(e){if(Sm>=0){var t=lo()-Sm;Sm=-1;for(var n=e.return;n!==null;){switch(n.tag){case h:var r=n.stateNode;r!==null&&(r.passiveEffectDuration+=t);return;case E:var u=n.stateNode;u!==null&&(u.passiveEffectDuration+=t);return}n=n.return}}}function sa(){Nm=lo()}function xg(){Sm=lo()}function Ng(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Vs(e,t){if(e&&e.defaultProps){var n=Ht({},t),r=e.defaultProps;for(var u in r)n[u]===void 0&&(n[u]=r[u]);return n}return t}var Sg={},Eg,Cg,jg,Dg,kg,Qx,jm,Rg,Tg,Lg,Ou;{Eg=new Set,Cg=new Set,jg=new Set,Dg=new Set,Rg=new Set,kg=new Set,Tg=new Set,Lg=new Set,Ou=new Set;var e0=new Set;jm=function(e,t){if(!(e===null||typeof e=="function")){var n=t+"_"+e;e0.has(n)||(e0.add(n),b("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},Qx=function(e,t){if(t===void 0){var n=Dt(e)||"Component";kg.has(n)||(kg.add(n),b("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Sg,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(Sg)}function Ag(e,t,n,r){var u=e.memoizedState,x=n(r,u);{if(e.mode&Li){cr(!0);try{x=n(r,u)}finally{cr(!1)}}Qx(t,x)}var T=x==null?u:Ht({},u,x);if(e.memoizedState=T,e.lanes===Ye){var I=e.updateQueue;I.baseState=T}}var Mg={isMounted:BC,enqueueSetState:function(e,t,n){var r=xl(e),u=Br(),x=mo(r),T=ka(u,x);T.payload=t,n!=null&&(jm(n,"setState"),T.callback=n);var I=ro(r,T,x);I!==null&&(nr(I,r,x,u),nm(I,r,x)),dp(r,x)},enqueueReplaceState:function(e,t,n){var r=xl(e),u=Br(),x=mo(r),T=ka(u,x);T.tag=gx,T.payload=t,n!=null&&(jm(n,"replaceState"),T.callback=n);var I=ro(r,T,x);I!==null&&(nr(I,r,x,u),nm(I,r,x)),dp(r,x)},enqueueForceUpdate:function(e,t){var n=xl(e),r=Br(),u=mo(n),x=ka(r,u);x.tag=Qh,t!=null&&(jm(t,"forceUpdate"),x.callback=t);var T=ro(n,x,u);T!==null&&(nr(T,n,u,r),nm(T,n,u)),gj(n,u)}};function t0(e,t,n,r,u,x,T){var I=e.stateNode;if(typeof I.shouldComponentUpdate=="function"){var F=I.shouldComponentUpdate(r,x,T);{if(e.mode&Li){cr(!0);try{F=I.shouldComponentUpdate(r,x,T)}finally{cr(!1)}}F===void 0&&b("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Dt(t)||"Component")}return F}return t.prototype&&t.prototype.isPureReactComponent?!ru(n,r)||!ru(u,x):!0}function XT(e,t,n){var r=e.stateNode;{var u=Dt(t)||"Component",x=r.render;x||(t.prototype&&typeof t.prototype.render=="function"?b("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",u):b("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",u)),r.getInitialState&&!r.getInitialState.isReactClassApproved&&!r.state&&b("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",u),r.getDefaultProps&&!r.getDefaultProps.isReactClassApproved&&b("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",u),r.propTypes&&b("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",u),r.contextType&&b("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",u),t.childContextTypes&&!Ou.has(t)&&(e.mode&Li)===Yt&&(Ou.add(t),b(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
|
|
144
|
+
|
|
145
|
+
.Learn more about this warning here: https://reactjs.org/link/legacy-context`,u)),t.contextTypes&&!Ou.has(t)&&(e.mode&Li)===Yt&&(Ou.add(t),b(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
|
|
146
|
+
|
|
147
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`,u)),r.contextTypes&&b("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",u),t.contextType&&t.contextTypes&&!Tg.has(t)&&(Tg.add(t),b("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",u)),typeof r.componentShouldUpdate=="function"&&b("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",u),t.prototype&&t.prototype.isPureReactComponent&&typeof r.shouldComponentUpdate<"u"&&b("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Dt(t)||"A pure component"),typeof r.componentDidUnmount=="function"&&b("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",u),typeof r.componentDidReceiveProps=="function"&&b("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",u),typeof r.componentWillRecieveProps=="function"&&b("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",u),typeof r.UNSAFE_componentWillRecieveProps=="function"&&b("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",u);var T=r.props!==n;r.props!==void 0&&T&&b("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",u,u),r.defaultProps&&b("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",u,u),typeof r.getSnapshotBeforeUpdate=="function"&&typeof r.componentDidUpdate!="function"&&!jg.has(t)&&(jg.add(t),b("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Dt(t))),typeof r.getDerivedStateFromProps=="function"&&b("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",u),typeof r.getDerivedStateFromError=="function"&&b("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",u),typeof t.getSnapshotBeforeUpdate=="function"&&b("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",u);var I=r.state;I&&(typeof I!="object"||nn(I))&&b("%s.state: must be set to an object or null",u),typeof r.getChildContext=="function"&&typeof t.childContextTypes!="object"&&b("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",u)}}function n0(e,t){t.updater=Mg,e.stateNode=t,OC(t,e),t._reactInternalInstance=Sg}function i0(e,t,n){var r=!1,u=ls,x=ls,T=t.contextType;if("contextType"in t){var I=T===null||T!==void 0&&T.$$typeof===et&&T._context===void 0;if(!I&&!Lg.has(t)){Lg.add(t);var F="";T===void 0?F=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof T!="object"?F=" However, it is set to a "+typeof T+".":T.$$typeof===Be?F=" Did you accidentally pass the Context.Provider instead?":T._context!==void 0?F=" Did you accidentally pass the Context.Consumer instead?":F=" However, it is set to an object with keys {"+Object.keys(T).join(", ")+"}.",b("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Dt(t)||"Component",F)}}if(typeof T=="object"&&T!==null)x=zi(T);else{u=Fl(e,t,!0);var X=t.contextTypes;r=X!=null,x=r?Hl(e,u):ls}var te=new t(n,x);if(e.mode&Li){cr(!0);try{te=new t(n,x)}finally{cr(!1)}}var fe=e.memoizedState=te.state!==null&&te.state!==void 0?te.state:null;n0(e,te);{if(typeof t.getDerivedStateFromProps=="function"&&fe===null){var me=Dt(t)||"Component";Cg.has(me)||(Cg.add(me),b("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",me,te.state===null?"null":"undefined",me))}if(typeof t.getDerivedStateFromProps=="function"||typeof te.getSnapshotBeforeUpdate=="function"){var Ee=null,je=null,Ue=null;if(typeof te.componentWillMount=="function"&&te.componentWillMount.__suppressDeprecationWarning!==!0?Ee="componentWillMount":typeof te.UNSAFE_componentWillMount=="function"&&(Ee="UNSAFE_componentWillMount"),typeof te.componentWillReceiveProps=="function"&&te.componentWillReceiveProps.__suppressDeprecationWarning!==!0?je="componentWillReceiveProps":typeof te.UNSAFE_componentWillReceiveProps=="function"&&(je="UNSAFE_componentWillReceiveProps"),typeof te.componentWillUpdate=="function"&&te.componentWillUpdate.__suppressDeprecationWarning!==!0?Ue="componentWillUpdate":typeof te.UNSAFE_componentWillUpdate=="function"&&(Ue="UNSAFE_componentWillUpdate"),Ee!==null||je!==null||Ue!==null){var mt=Dt(t)||"Component",zt=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Dg.has(mt)||(Dg.add(mt),b(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
148
|
+
|
|
149
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
150
|
+
|
|
151
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
152
|
+
https://reactjs.org/link/unsafe-component-lifecycles`,mt,zt,Ee!==null?`
|
|
153
|
+
`+Ee:"",je!==null?`
|
|
154
|
+
`+je:"",Ue!==null?`
|
|
155
|
+
`+Ue:""))}}}return r&&Gw(e,u,x),te}function JT(e,t){var n=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),n!==t.state&&(b("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ft(e)||"Component"),Mg.enqueueReplaceState(t,t.state,null))}function r0(e,t,n,r){var u=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==u){{var x=ft(e)||"Component";Eg.has(x)||(Eg.add(x),b("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",x))}Mg.enqueueReplaceState(t,t.state,null)}}function Ug(e,t,n,r){XT(e,t,n);var u=e.stateNode;u.props=n,u.state=e.memoizedState,u.refs={},$v(e);var x=t.contextType;if(typeof x=="object"&&x!==null)u.context=zi(x);else{var T=Fl(e,t,!0);u.context=Hl(e,T)}{if(u.state===n){var I=Dt(t)||"Component";Rg.has(I)||(Rg.add(I),b("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",I))}e.mode&Li&&Ms.recordLegacyContextWarning(e,u),Ms.recordUnsafeLifecycleWarnings(e,u)}u.state=e.memoizedState;var F=t.getDerivedStateFromProps;if(typeof F=="function"&&(Ag(e,t,F,n),u.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof u.getSnapshotBeforeUpdate!="function"&&(typeof u.UNSAFE_componentWillMount=="function"||typeof u.componentWillMount=="function")&&(JT(e,u),im(e,n,u,r),u.state=e.memoizedState),typeof u.componentDidMount=="function"){var X=In;X|=So,(e.mode&Js)!==Yt&&(X|=Ga),e.flags|=X}}function ZT(e,t,n,r){var u=e.stateNode,x=e.memoizedProps;u.props=x;var T=u.context,I=t.contextType,F=ls;if(typeof I=="object"&&I!==null)F=zi(I);else{var X=Fl(e,t,!0);F=Hl(e,X)}var te=t.getDerivedStateFromProps,fe=typeof te=="function"||typeof u.getSnapshotBeforeUpdate=="function";!fe&&(typeof u.UNSAFE_componentWillReceiveProps=="function"||typeof u.componentWillReceiveProps=="function")&&(x!==n||T!==F)&&r0(e,u,n,F),_x();var me=e.memoizedState,Ee=u.state=me;if(im(e,n,u,r),Ee=e.memoizedState,x===n&&me===Ee&&!Ph()&&!rm()){if(typeof u.componentDidMount=="function"){var je=In;je|=So,(e.mode&Js)!==Yt&&(je|=Ga),e.flags|=je}return!1}typeof te=="function"&&(Ag(e,t,te,n),Ee=e.memoizedState);var Ue=rm()||t0(e,t,x,n,me,Ee,F);if(Ue){if(!fe&&(typeof u.UNSAFE_componentWillMount=="function"||typeof u.componentWillMount=="function")&&(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"){var mt=In;mt|=So,(e.mode&Js)!==Yt&&(mt|=Ga),e.flags|=mt}}else{if(typeof u.componentDidMount=="function"){var zt=In;zt|=So,(e.mode&Js)!==Yt&&(zt|=Ga),e.flags|=zt}e.memoizedProps=n,e.memoizedState=Ee}return u.props=n,u.state=Ee,u.context=F,Ue}function QT(e,t,n,r,u){var x=t.stateNode;bx(e,t);var T=t.memoizedProps,I=t.type===t.elementType?T:Vs(t.type,T);x.props=I;var F=t.pendingProps,X=x.context,te=n.contextType,fe=ls;if(typeof te=="object"&&te!==null)fe=zi(te);else{var me=Fl(t,n,!0);fe=Hl(t,me)}var Ee=n.getDerivedStateFromProps,je=typeof Ee=="function"||typeof x.getSnapshotBeforeUpdate=="function";!je&&(typeof x.UNSAFE_componentWillReceiveProps=="function"||typeof x.componentWillReceiveProps=="function")&&(T!==F||X!==fe)&&r0(t,x,r,fe),_x();var Ue=t.memoizedState,mt=x.state=Ue;if(im(t,r,x,u),mt=t.memoizedState,T===F&&Ue===mt&&!Ph()&&!rm()&&!P)return typeof x.componentDidUpdate=="function"&&(T!==e.memoizedProps||Ue!==e.memoizedState)&&(t.flags|=In),typeof x.getSnapshotBeforeUpdate=="function"&&(T!==e.memoizedProps||Ue!==e.memoizedState)&&(t.flags|=Sl),!1;typeof Ee=="function"&&(Ag(t,n,Ee,r),mt=t.memoizedState);var zt=rm()||t0(t,n,I,r,Ue,mt,fe)||P;return zt?(!je&&(typeof x.UNSAFE_componentWillUpdate=="function"||typeof x.componentWillUpdate=="function")&&(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(r,mt,fe),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(r,mt,fe)),typeof x.componentDidUpdate=="function"&&(t.flags|=In),typeof x.getSnapshotBeforeUpdate=="function"&&(t.flags|=Sl)):(typeof x.componentDidUpdate=="function"&&(T!==e.memoizedProps||Ue!==e.memoizedState)&&(t.flags|=In),typeof x.getSnapshotBeforeUpdate=="function"&&(T!==e.memoizedProps||Ue!==e.memoizedState)&&(t.flags|=Sl),t.memoizedProps=r,t.memoizedState=mt),x.props=r,x.state=mt,x.context=fe,zt}function Ho(e,t){return{value:e,source:t,stack:Me(t),digest:null}}function Og(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function e5(e,t){return!0}function Vg(e,t){try{var n=e5(e,t);if(n===!1)return;var r=t.value,u=t.source,x=t.stack,T=x!==null?x:"";if(r!=null&&r._suppressLogging){if(e.tag===f)return;console.error(r)}var I=u?ft(u):null,F=I?"The above error occurred in the <"+I+"> component:":"The above error occurred in one of your React components:",X;if(e.tag===h)X=`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
156
|
+
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var te=ft(e)||"Anonymous";X="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+te+".")}var fe=F+`
|
|
157
|
+
`+T+`
|
|
158
|
+
|
|
159
|
+
`+(""+X);console.error(fe)}catch(me){setTimeout(function(){throw me})}}var t5=typeof WeakMap=="function"?WeakMap:Map;function s0(e,t,n){var r=ka(pi,n);r.tag=Hv,r.payload={element:null};var u=t.value;return r.callback=function(){qL(u),Vg(e,t)},r}function Pg(e,t,n){var r=ka(pi,n);r.tag=Hv;var u=e.type.getDerivedStateFromError;if(typeof u=="function"){var x=t.value;r.payload=function(){return u(x)},r.callback=function(){vN(e),Vg(e,t)}}var T=e.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(r.callback=function(){vN(e),Vg(e,t),typeof u!="function"&&WL(this);var F=t.value,X=t.stack;this.componentDidCatch(F,{componentStack:X!==null?X:""}),typeof u!="function"&&(rs(e.lanes,sn)||b("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",ft(e)||"Unknown"))}),r}function a0(e,t,n){var r=e.pingCache,u;if(r===null?(r=e.pingCache=new t5,u=new Set,r.set(t,u)):(u=r.get(t),u===void 0&&(u=new Set,r.set(t,u))),!u.has(n)){u.add(n);var x=YL.bind(null,e,t,n);Rs&&Qu(e,n),t.then(x,x)}}function n5(e,t,n,r){var u=e.updateQueue;if(u===null){var x=new Set;x.add(n),e.updateQueue=x}else u.add(n)}function i5(e,t){var n=e.tag;if((e.mode&Dn)===Yt&&(n===d||n===g||n===A)){var r=e.alternate;r?(e.updateQueue=r.updateQueue,e.memoizedState=r.memoizedState,e.lanes=r.lanes):(e.updateQueue=null,e.memoizedState=null)}}function o0(e){var t=e;do{if(t.tag===R&&VT(t))return t;t=t.return}while(t!==null);return null}function l0(e,t,n,r,u){if((e.mode&Dn)===Yt){if(e===t)e.flags|=Vr;else{if(e.flags|=Bn,n.flags|=ip,n.flags&=-52805,n.tag===f){var x=n.alternate;if(x===null)n.tag=L;else{var T=ka(pi,sn);T.tag=Qh,ro(n,T,sn)}}n.lanes=gn(n.lanes,sn)}return e}return e.flags|=Vr,e.lanes=u,e}function r5(e,t,n,r,u){if(n.flags|=nh,Rs&&Qu(e,u),r!==null&&typeof r=="object"&&typeof r.then=="function"){var x=r;i5(n),pr()&&n.mode&Dn&&Qw();var T=o0(t);if(T!==null){T.flags&=~ba,l0(T,t,n,e,u),T.mode&Dn&&a0(e,x,u),n5(T,e,x);return}else{if(!Cj(u)){a0(e,x,u),gb();return}var I=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");r=I}}else if(pr()&&n.mode&Dn){Qw();var F=o0(t);if(F!==null){(F.flags&Vr)===Zt&&(F.flags|=ba),l0(F,t,n,e,u),Rv(Ho(r,n));return}}r=Ho(r,n),VL(r);var X=t;do{switch(X.tag){case h:{var te=r;X.flags|=Vr;var fe=zc(u);X.lanes=gn(X.lanes,fe);var me=s0(X,te,fe);Wv(X,me);return}case f:var Ee=r,je=X.type,Ue=X.stateNode;if((X.flags&Bn)===Zt&&(typeof je.getDerivedStateFromError=="function"||Ue!==null&&typeof Ue.componentDidCatch=="function"&&!oN(Ue))){X.flags|=Vr;var mt=zc(u);X.lanes=gn(X.lanes,mt);var zt=Pg(X,Ee,mt);Wv(X,zt);return}break}X=X.return}while(X!==null)}function s5(){return null}var Vu=l.ReactCurrentOwner,Ps=!1,Ig,Pu,Bg,Fg,Hg,zo,zg,Dm,Iu;Ig={},Pu={},Bg={},Fg={},Hg={},zo=!1,zg={},Dm={},Iu={};function Pr(e,t,n,r){e===null?t.child=dx(t,null,n,r):t.child=Gl(t,e.child,n,r)}function a5(e,t,n,r){t.child=Gl(t,e.child,null,r),t.child=Gl(t,null,n,r)}function c0(e,t,n,r,u){if(t.type!==t.elementType){var x=n.propTypes;x&&Ls(x,r,"prop",Dt(n))}var T=n.render,I=t.ref,F,X;Yl(t,u),Vc(t);{if(Vu.current=t,Kn(!0),F=ec(e,t,T,r,I,u),X=tc(),t.mode&Li){cr(!0);try{F=ec(e,t,T,r,I,u),X=tc()}finally{cr(!1)}}Kn(!1)}return jl(),e!==null&&!Ps?(Ex(e,t,u),Ra(e,t,u)):(pr()&&X&&Sv(t),t.flags|=Nl,Pr(e,t,F,u),t.child)}function u0(e,t,n,r,u){if(e===null){var x=n.type;if(dA(x)&&n.compare===null&&n.defaultProps===void 0){var T=x;return T=cc(x),t.tag=A,t.type=T,Gg(t,x),d0(e,t,T,r,u)}{var I=x.propTypes;if(I&&Ls(I,r,"prop",Dt(x)),n.defaultProps!==void 0){var F=Dt(x)||"Unknown";Iu[F]||(b("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",F),Iu[F]=!0)}}var X=Db(n.type,null,r,t,t.mode,u);return X.ref=t.ref,X.return=t,t.child=X,X}{var te=n.type,fe=te.propTypes;fe&&Ls(fe,r,"prop",Dt(te))}var me=e.child,Ee=Zg(e,u);if(!Ee){var je=me.memoizedProps,Ue=n.compare;if(Ue=Ue!==null?Ue:ru,Ue(je,r)&&e.ref===t.ref)return Ra(e,t,u)}t.flags|=Nl;var mt=Yo(me,r);return mt.ref=t.ref,mt.return=t,t.child=mt,mt}function d0(e,t,n,r,u){if(t.type!==t.elementType){var x=t.elementType;if(x.$$typeof===Nt){var T=x,I=T._payload,F=T._init;try{x=F(I)}catch{x=null}var X=x&&x.propTypes;X&&Ls(X,r,"prop",Dt(x))}}if(e!==null){var te=e.memoizedProps;if(ru(te,r)&&e.ref===t.ref&&t.type===e.type)if(Ps=!1,t.pendingProps=r=te,Zg(e,u))(e.flags&ip)!==Zt&&(Ps=!0);else return t.lanes=e.lanes,Ra(e,t,u)}return $g(e,t,n,r,u)}function h0(e,t,n){var r=t.pendingProps,u=r.children,x=e!==null?e.memoizedState:null;if(r.mode==="hidden"||W)if((t.mode&Dn)===Yt){var T={baseLanes:Ye,cachePool:null,transitions:null};t.memoizedState=T,Fm(t,n)}else if(rs(n,is)){var fe={baseLanes:Ye,cachePool:null,transitions:null};t.memoizedState=fe;var me=x!==null?x.baseLanes:n;Fm(t,me)}else{var I=null,F;if(x!==null){var X=x.baseLanes;F=gn(X,n)}else F=n;t.lanes=t.childLanes=is;var te={baseLanes:F,cachePool:I,transitions:null};return t.memoizedState=te,t.updateQueue=null,Fm(t,F),null}else{var Ee;x!==null?(Ee=gn(x.baseLanes,n),t.memoizedState=null):Ee=n,Fm(t,Ee)}return Pr(e,t,u,n),t.child}function o5(e,t,n){var r=t.pendingProps;return Pr(e,t,r,n),t.child}function l5(e,t,n){var r=t.pendingProps.children;return Pr(e,t,r,n),t.child}function c5(e,t,n){{t.flags|=In;{var r=t.stateNode;r.effectDuration=0,r.passiveEffectDuration=0}}var u=t.pendingProps,x=u.children;return Pr(e,t,x,n),t.child}function m0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=xo,t.flags|=rp)}function $g(e,t,n,r,u){if(t.type!==t.elementType){var x=n.propTypes;x&&Ls(x,r,"prop",Dt(n))}var T;{var I=Fl(t,n,!0);T=Hl(t,I)}var F,X;Yl(t,u),Vc(t);{if(Vu.current=t,Kn(!0),F=ec(e,t,n,r,T,u),X=tc(),t.mode&Li){cr(!0);try{F=ec(e,t,n,r,T,u),X=tc()}finally{cr(!1)}}Kn(!1)}return jl(),e!==null&&!Ps?(Ex(e,t,u),Ra(e,t,u)):(pr()&&X&&Sv(t),t.flags|=Nl,Pr(e,t,F,u),t.child)}function f0(e,t,n,r,u){{switch(CA(t)){case!1:{var x=t.stateNode,T=t.type,I=new T(t.memoizedProps,x.context),F=I.state;x.updater.enqueueSetState(x,F,null);break}case!0:{t.flags|=Bn,t.flags|=Vr;var X=new Error("Simulated error coming from DevTools"),te=zc(u);t.lanes=gn(t.lanes,te);var fe=Pg(t,Ho(X,t),te);Wv(t,fe);break}}if(t.type!==t.elementType){var me=n.propTypes;me&&Ls(me,r,"prop",Dt(n))}}var Ee;ea(n)?(Ee=!0,Bh(t)):Ee=!1,Yl(t,u);var je=t.stateNode,Ue;je===null?(Rm(e,t),i0(t,n,r),Ug(t,n,r,u),Ue=!0):e===null?Ue=ZT(t,n,r,u):Ue=QT(e,t,n,r,u);var mt=Wg(e,t,n,Ue,Ee,u);{var zt=t.stateNode;Ue&&zt.props!==r&&(zo||b("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ft(t)||"a component"),zo=!0)}return mt}function Wg(e,t,n,r,u,x){m0(e,t);var T=(t.flags&Bn)!==Zt;if(!r&&!T)return u&&Kw(t,n,!1),Ra(e,t,x);var I=t.stateNode;Vu.current=t;var F;if(T&&typeof n.getDerivedStateFromError!="function")F=null,Zx();else{Vc(t);{if(Kn(!0),F=I.render(),t.mode&Li){cr(!0);try{I.render()}finally{cr(!1)}}Kn(!1)}jl()}return t.flags|=Nl,e!==null&&T?a5(e,t,F,x):Pr(e,t,F,x),t.memoizedState=I.state,u&&Kw(t,n,!0),t.child}function p0(e){var t=e.stateNode;t.pendingContext?qw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qw(e,t.context,!1),Gv(e,t.containerInfo)}function u5(e,t,n){if(p0(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var r=t.pendingProps,u=t.memoizedState,x=u.element;bx(e,t),im(t,r,null,n);var T=t.memoizedState;t.stateNode;var I=T.element;if(u.isDehydrated){var F={element:I,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},X=t.updateQueue;if(X.baseState=F,t.memoizedState=F,t.flags&ba){var te=Ho(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t);return v0(e,t,I,n,te)}else if(I!==x){var fe=Ho(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return v0(e,t,I,n,fe)}else{mT(t);var me=dx(t,null,I,n);t.child=me;for(var Ee=me;Ee;)Ee.flags=Ee.flags&~Hi|_a,Ee=Ee.sibling}}else{if(Wl(),I===x)return Ra(e,t,n);Pr(e,t,I,n)}return t.child}function v0(e,t,n,r,u){return Wl(),Rv(u),t.flags|=ba,Pr(e,t,n,r),t.child}function d5(e,t,n){xx(t),e===null&&kv(t);var r=t.type,u=t.pendingProps,x=e!==null?e.memoizedProps:null,T=u.children,I=uv(r,u);return I?T=null:x!==null&&uv(r,x)&&(t.flags|=Uc),m0(e,t),Pr(e,t,T,n),t.child}function h5(e,t){return e===null&&kv(t),null}function m5(e,t,n,r){Rm(e,t);var u=t.pendingProps,x=n,T=x._payload,I=x._init,F=I(T);t.type=F;var X=t.tag=hA(F),te=Vs(F,u),fe;switch(X){case d:return Gg(t,F),t.type=F=cc(F),fe=$g(null,t,F,te,r),fe;case f:return t.type=F=xb(F),fe=f0(null,t,F,te,r),fe;case g:return t.type=F=Nb(F),fe=c0(null,t,F,te,r),fe;case j:{if(t.type!==t.elementType){var me=F.propTypes;me&&Ls(me,te,"prop",Dt(F))}return fe=u0(null,t,F,Vs(F.type,te),r),fe}}var Ee="";throw F!==null&&typeof F=="object"&&F.$$typeof===Nt&&(Ee=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+F+". "+("Lazy element type must resolve to a class or function."+Ee))}function f5(e,t,n,r,u){Rm(e,t),t.tag=f;var x;return ea(n)?(x=!0,Bh(t)):x=!1,Yl(t,u),i0(t,n,r),Ug(t,n,r,u),Wg(null,t,n,!0,x,u)}function p5(e,t,n,r){Rm(e,t);var u=t.pendingProps,x;{var T=Fl(t,n,!1);x=Hl(t,T)}Yl(t,r);var I,F;Vc(t);{if(n.prototype&&typeof n.prototype.render=="function"){var X=Dt(n)||"Unknown";Ig[X]||(b("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",X,X),Ig[X]=!0)}t.mode&Li&&Ms.recordLegacyContextWarning(t,null),Kn(!0),Vu.current=t,I=ec(null,t,n,u,x,r),F=tc(),Kn(!1)}if(jl(),t.flags|=Nl,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0){var te=Dt(n)||"Unknown";Pu[te]||(b("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",te,te,te),Pu[te]=!0)}if(typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0){{var fe=Dt(n)||"Unknown";Pu[fe]||(b("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",fe,fe,fe),Pu[fe]=!0)}t.tag=f,t.memoizedState=null,t.updateQueue=null;var me=!1;return ea(n)?(me=!0,Bh(t)):me=!1,t.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,$v(t),n0(t,I),Ug(t,n,u,r),Wg(null,t,n,!0,me,r)}else{if(t.tag=d,t.mode&Li){cr(!0);try{I=ec(null,t,n,u,x,r),F=tc()}finally{cr(!1)}}return pr()&&F&&Sv(t),Pr(null,t,I,r),Gg(t,n),t.child}}function Gg(e,t){{if(t&&t.childContextTypes&&b("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var n="",r=hi();r&&(n+=`
|
|
160
|
+
|
|
161
|
+
Check the render method of \``+r+"`.");var u=r||"",x=e._debugSource;x&&(u=x.fileName+":"+x.lineNumber),Hg[u]||(Hg[u]=!0,b("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",n))}if(t.defaultProps!==void 0){var T=Dt(t)||"Unknown";Iu[T]||(b("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",T),Iu[T]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var I=Dt(t)||"Unknown";Fg[I]||(b("%s: Function components do not support getDerivedStateFromProps.",I),Fg[I]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var F=Dt(t)||"Unknown";Bg[F]||(b("%s: Function components do not support contextType.",F),Bg[F]=!0)}}}var qg={dehydrated:null,treeContext:null,retryLane:ur};function Yg(e){return{baseLanes:e,cachePool:s5(),transitions:null}}function v5(e,t){var n=null;return{baseLanes:gn(e.baseLanes,t),cachePool:n,transitions:e.transitions}}function g5(e,t,n,r){if(t!==null){var u=t.memoizedState;if(u===null)return!1}return Kv(e,Du)}function b5(e,t){return ch(e.childLanes,t)}function g0(e,t,n){var r=t.pendingProps;jA(t)&&(t.flags|=Bn);var u=Us.current,x=!1,T=(t.flags&Bn)!==Zt;if(T||g5(u,e)?(x=!0,t.flags&=~Bn):(e===null||e.memoizedState!==null)&&(u=OT(u,Sx)),u=Xl(u),ao(t,u),e===null){kv(t);var I=t.memoizedState;if(I!==null){var F=I.dehydrated;if(F!==null)return N5(t,F)}var X=r.children,te=r.fallback;if(x){var fe=_5(t,X,te,n),me=t.child;return me.memoizedState=Yg(n),t.memoizedState=qg,fe}else return Kg(t,X)}else{var Ee=e.memoizedState;if(Ee!==null){var je=Ee.dehydrated;if(je!==null)return S5(e,t,T,r,je,Ee,n)}if(x){var Ue=r.fallback,mt=r.children,zt=w5(e,t,mt,Ue,n),Mt=t.child,Rn=e.child.memoizedState;return Mt.memoizedState=Rn===null?Yg(n):v5(Rn,n),Mt.childLanes=b5(e,n),t.memoizedState=qg,zt}else{var Nn=r.children,_e=y5(e,t,Nn,n);return t.memoizedState=null,_e}}}function Kg(e,t,n){var r=e.mode,u={mode:"visible",children:t},x=Xg(u,r);return x.return=e,e.child=x,x}function _5(e,t,n,r){var u=e.mode,x=e.child,T={mode:"hidden",children:t},I,F;return(u&Dn)===Yt&&x!==null?(I=x,I.childLanes=Ye,I.pendingProps=T,e.mode&Zn&&(I.actualDuration=0,I.actualStartTime=-1,I.selfBaseDuration=0,I.treeBaseDuration=0),F=po(n,u,r,null)):(I=Xg(T,u),F=po(n,u,r,null)),I.return=e,F.return=e,I.sibling=F,e.child=I,F}function Xg(e,t,n){return bN(e,t,Ye,null)}function b0(e,t){return Yo(e,t)}function y5(e,t,n,r){var u=e.child,x=u.sibling,T=b0(u,{mode:"visible",children:n});if((t.mode&Dn)===Yt&&(T.lanes=r),T.return=t,T.sibling=null,x!==null){var I=t.deletions;I===null?(t.deletions=[x],t.flags|=wo):I.push(x)}return t.child=T,T}function w5(e,t,n,r,u){var x=t.mode,T=e.child,I=T.sibling,F={mode:"hidden",children:n},X;if((x&Dn)===Yt&&t.child!==T){var te=t.child;X=te,X.childLanes=Ye,X.pendingProps=F,t.mode&Zn&&(X.actualDuration=0,X.actualStartTime=-1,X.selfBaseDuration=T.selfBaseDuration,X.treeBaseDuration=T.treeBaseDuration),t.deletions=null}else X=b0(T,F),X.subtreeFlags=T.subtreeFlags&ya;var fe;return I!==null?fe=Yo(I,r):(fe=po(r,x,u,null),fe.flags|=Hi),fe.return=t,X.return=t,X.sibling=fe,t.child=X,fe}function km(e,t,n,r){r!==null&&Rv(r),Gl(t,e.child,null,n);var u=t.pendingProps,x=u.children,T=Kg(t,x);return T.flags|=Hi,t.memoizedState=null,T}function x5(e,t,n,r,u){var x=t.mode,T={mode:"visible",children:n},I=Xg(T,x),F=po(r,x,u,null);return F.flags|=Hi,I.return=t,F.return=t,I.sibling=F,t.child=I,(t.mode&Dn)!==Yt&&Gl(t,e.child,null,u),F}function N5(e,t,n){return(e.mode&Dn)===Yt?(b("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=sn):fv(t)?e.lanes=jo:e.lanes=is,null}function S5(e,t,n,r,u,x,T){if(n)if(t.flags&ba){t.flags&=~ba;var _e=Og(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return km(e,t,T,_e)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Bn,null;var Oe=r.children,ye=r.fallback,Qe=x5(e,t,Oe,ye,T),wt=t.child;return wt.memoizedState=Yg(T),t.memoizedState=qg,Qe}else{if(dT(),(t.mode&Dn)===Yt)return km(e,t,T,null);if(fv(u)){var I,F,X;{var te=DR(u);I=te.digest,F=te.message,X=te.stack}var fe;F?fe=new Error(F):fe=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var me=Og(fe,I,X);return km(e,t,T,me)}var Ee=rs(T,e.childLanes);if(Ps||Ee){var je=Bm();if(je!==null){var Ue=Mj(je,T);if(Ue!==ur&&Ue!==x.retryLane){x.retryLane=Ue;var mt=pi;Zr(e,Ue),nr(je,e,Ue,mt)}}gb();var zt=Og(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return km(e,t,T,zt)}else if(Fw(u)){t.flags|=Bn,t.child=e.child;var Mt=KL.bind(null,e);return kR(u,Mt),null}else{fT(t,u,x.treeContext);var Rn=r.children,Nn=Kg(t,Rn);return Nn.flags|=_a,Nn}}}function _0(e,t,n){e.lanes=gn(e.lanes,t);var r=e.alternate;r!==null&&(r.lanes=gn(r.lanes,t)),Bv(e.return,t,n)}function E5(e,t,n){for(var r=t;r!==null;){if(r.tag===R){var u=r.memoizedState;u!==null&&_0(r,n,e)}else if(r.tag===H)_0(r,n,e);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)return;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function C5(e){for(var t=e,n=null;t!==null;){var r=t.alternate;r!==null&&om(r)===null&&(n=t),t=t.sibling}return n}function j5(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!zg[e])if(zg[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{b('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{b('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break}default:b('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else b('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function D5(e,t){e!==void 0&&!Dm[e]&&(e!=="collapsed"&&e!=="hidden"?(Dm[e]=!0,b('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Dm[e]=!0,b('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function y0(e,t){{var n=nn(e),r=!n&&typeof Ni(e)=="function";if(n||r){var u=n?"array":"iterable";return b("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",u,t,u),!1}}return!0}function k5(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(nn(e)){for(var n=0;n<e.length;n++)if(!y0(e[n],n))return}else{var r=Ni(e);if(typeof r=="function"){var u=r.call(e);if(u)for(var x=u.next(),T=0;!x.done;x=u.next()){if(!y0(x.value,T))return;T++}}else b('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}function Jg(e,t,n,r,u){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:u}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=r,x.tail=n,x.tailMode=u)}function w0(e,t,n){var r=t.pendingProps,u=r.revealOrder,x=r.tail,T=r.children;j5(u),D5(x,u),k5(T,u),Pr(e,t,T,n);var I=Us.current,F=Kv(I,Du);if(F)I=Xv(I,Du),t.flags|=Bn;else{var X=e!==null&&(e.flags&Bn)!==Zt;X&&E5(t,t.child,n),I=Xl(I)}if(ao(t,I),(t.mode&Dn)===Yt)t.memoizedState=null;else switch(u){case"forwards":{var te=C5(t.child),fe;te===null?(fe=t.child,t.child=null):(fe=te.sibling,te.sibling=null),Jg(t,!1,fe,te,x);break}case"backwards":{var me=null,Ee=t.child;for(t.child=null;Ee!==null;){var je=Ee.alternate;if(je!==null&&om(je)===null){t.child=Ee;break}var Ue=Ee.sibling;Ee.sibling=me,me=Ee,Ee=Ue}Jg(t,!0,me,null,x);break}case"together":{Jg(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function R5(e,t,n){Gv(t,t.stateNode.containerInfo);var r=t.pendingProps;return e===null?t.child=Gl(t,null,r,n):Pr(e,t,r,n),t.child}var x0=!1;function T5(e,t,n){var r=t.type,u=r._context,x=t.pendingProps,T=t.memoizedProps,I=x.value;{"value"in x||x0||(x0=!0,b("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var F=t.type.propTypes;F&&Ls(F,x,"prop","Context.Provider")}if(fx(t,u,I),T!==null){var X=T.value;if(os(X,I)){if(T.children===x.children&&!Ph())return Ra(e,t,n)}else jT(t,u,n)}var te=x.children;return Pr(e,t,te,n),t.child}var N0=!1;function L5(e,t,n){var r=t.type;r._context===void 0?r!==r.Consumer&&(N0||(N0=!0,b("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):r=r._context;var u=t.pendingProps,x=u.children;typeof x!="function"&&b("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Yl(t,n);var T=zi(r);Vc(t);var I;return Vu.current=t,Kn(!0),I=x(T),Kn(!1),jl(),t.flags|=Nl,Pr(e,t,I,n),t.child}function Bu(){Ps=!0}function Rm(e,t){(t.mode&Dn)===Yt&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=Hi)}function Ra(e,t,n){return e!==null&&(t.dependencies=e.dependencies),Zx(),Zu(t.lanes),rs(n,t.childLanes)?(ET(e,t),t.child):null}function A5(e,t,n){{var r=t.return;if(r===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,t===r.child)r.child=n;else{var u=r.child;if(u===null)throw new Error("Expected parent to have a child.");for(;u.sibling!==t;)if(u=u.sibling,u===null)throw new Error("Expected to find the previous sibling.");u.sibling=n}var x=r.deletions;return x===null?(r.deletions=[e],r.flags|=wo):x.push(e),n.flags|=Hi,n}}function Zg(e,t){var n=e.lanes;return!!rs(n,t)}function M5(e,t,n){switch(t.tag){case h:p0(t),t.stateNode,Wl();break;case N:xx(t);break;case f:{var r=t.type;ea(r)&&Bh(t);break}case _:Gv(t,t.stateNode.containerInfo);break;case v:{var u=t.memoizedProps.value,x=t.type._context;fx(t,x,u);break}case E:{var T=rs(n,t.childLanes);T&&(t.flags|=In);{var I=t.stateNode;I.effectDuration=0,I.passiveEffectDuration=0}}break;case R:{var F=t.memoizedState;if(F!==null){if(F.dehydrated!==null)return ao(t,Xl(Us.current)),t.flags|=Bn,null;var X=t.child,te=X.childLanes;if(rs(n,te))return g0(e,t,n);ao(t,Xl(Us.current));var fe=Ra(e,t,n);return fe!==null?fe.sibling:null}else ao(t,Xl(Us.current));break}case H:{var me=(e.flags&Bn)!==Zt,Ee=rs(n,t.childLanes);if(me){if(Ee)return w0(e,t,n);t.flags|=Bn}var je=t.memoizedState;if(je!==null&&(je.rendering=null,je.tail=null,je.lastEffect=null),ao(t,Us.current),Ee)break;return null}case B:case q:return t.lanes=Ye,h0(e,t,n)}return Ra(e,t,n)}function S0(e,t,n){if(t._debugNeedsRemount&&e!==null)return A5(e,t,Db(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var r=e.memoizedProps,u=t.pendingProps;if(r!==u||Ph()||t.type!==e.type)Ps=!0;else{var x=Zg(e,n);if(!x&&(t.flags&Bn)===Zt)return Ps=!1,M5(e,t,n);(e.flags&ip)!==Zt?Ps=!0:Ps=!1}}else if(Ps=!1,pr()&&sT(t)){var T=t.index,I=aT();Zw(t,I,T)}switch(t.lanes=Ye,t.tag){case w:return p5(e,t,t.type,n);case k:{var F=t.elementType;return m5(e,t,F,n)}case d:{var X=t.type,te=t.pendingProps,fe=t.elementType===X?te:Vs(X,te);return $g(e,t,X,fe,n)}case f:{var me=t.type,Ee=t.pendingProps,je=t.elementType===me?Ee:Vs(me,Ee);return f0(e,t,me,je,n)}case h:return u5(e,t,n);case N:return d5(e,t,n);case C:return h5(e,t);case R:return g0(e,t,n);case _:return R5(e,t,n);case g:{var Ue=t.type,mt=t.pendingProps,zt=t.elementType===Ue?mt:Vs(Ue,mt);return c0(e,t,Ue,zt,n)}case y:return o5(e,t,n);case c:return l5(e,t,n);case E:return c5(e,t,n);case v:return T5(e,t,n);case p:return L5(e,t,n);case j:{var Mt=t.type,Rn=t.pendingProps,Nn=Vs(Mt,Rn);if(t.type!==t.elementType){var _e=Mt.propTypes;_e&&Ls(_e,Nn,"prop",Dt(Mt))}return Nn=Vs(Mt.type,Nn),u0(e,t,Mt,Nn,n)}case A:return d0(e,t,t.type,t.pendingProps,n);case L:{var Oe=t.type,ye=t.pendingProps,Qe=t.elementType===Oe?ye:Vs(Oe,ye);return f5(e,t,Oe,Qe,n)}case H:return w0(e,t,n);case V:break;case B:return h0(e,t,n)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function nc(e){e.flags|=In}function E0(e){e.flags|=xo,e.flags|=rp}var C0,Qg,j0,D0;C0=function(e,t,n,r){for(var u=t.child;u!==null;){if(u.tag===N||u.tag===C)nR(e,u.stateNode);else if(u.tag!==_){if(u.child!==null){u.child.return=u,u=u.child;continue}}if(u===t)return;for(;u.sibling===null;){if(u.return===null||u.return===t)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Qg=function(e,t){},j0=function(e,t,n,r,u){var x=e.memoizedProps;if(x!==r){var T=t.stateNode,I=qv(),F=rR(T,n,x,r,u,I);t.updateQueue=F,F&&nc(t)}},D0=function(e,t,n,r){n!==r&&nc(t)};function Fu(e,t){if(!pr())switch(e.tailMode){case"hidden":{for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break}case"collapsed":{for(var u=e.tail,x=null;u!==null;)u.alternate!==null&&(x=u),u=u.sibling;x===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:x.sibling=null;break}}}function gr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=Ye,r=Zt;if(t){if((e.mode&Zn)!==Yt){for(var F=e.selfBaseDuration,X=e.child;X!==null;)n=gn(n,gn(X.lanes,X.childLanes)),r|=X.subtreeFlags&ya,r|=X.flags&ya,F+=X.treeBaseDuration,X=X.sibling;e.treeBaseDuration=F}else for(var te=e.child;te!==null;)n=gn(n,gn(te.lanes,te.childLanes)),r|=te.subtreeFlags&ya,r|=te.flags&ya,te.return=e,te=te.sibling;e.subtreeFlags|=r}else{if((e.mode&Zn)!==Yt){for(var u=e.actualDuration,x=e.selfBaseDuration,T=e.child;T!==null;)n=gn(n,gn(T.lanes,T.childLanes)),r|=T.subtreeFlags,r|=T.flags,u+=T.actualDuration,x+=T.treeBaseDuration,T=T.sibling;e.actualDuration=u,e.treeBaseDuration=x}else for(var I=e.child;I!==null;)n=gn(n,gn(I.lanes,I.childLanes)),r|=I.subtreeFlags,r|=I.flags,I.return=e,I=I.sibling;e.subtreeFlags|=r}return e.childLanes=n,t}function U5(e,t,n){if(_T()&&(t.mode&Dn)!==Yt&&(t.flags&Bn)===Zt)return sx(t),Wl(),t.flags|=ba|nh|Vr,!1;var r=Wh(t);if(n!==null&&n.dehydrated!==null)if(e===null){if(!r)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(gT(t),gr(t),(t.mode&Zn)!==Yt){var u=n!==null;if(u){var x=t.child;x!==null&&(t.treeBaseDuration-=x.treeBaseDuration)}}return!1}else{if(Wl(),(t.flags&Bn)===Zt&&(t.memoizedState=null),t.flags|=In,gr(t),(t.mode&Zn)!==Yt){var T=n!==null;if(T){var I=t.child;I!==null&&(t.treeBaseDuration-=I.treeBaseDuration)}}return!1}else return ax(),!0}function k0(e,t,n){var r=t.pendingProps;switch(Ev(t),t.tag){case w:case k:case A:case d:case g:case y:case c:case E:case p:case j:return gr(t),null;case f:{var u=t.type;return ea(u)&&Ih(t),gr(t),null}case h:{var x=t.stateNode;if(Kl(t),wv(t),Zv(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),e===null||e.child===null){var T=Wh(t);if(T)nc(t);else if(e!==null){var I=e.memoizedState;(!I.isDehydrated||(t.flags&ba)!==Zt)&&(t.flags|=Sl,ax())}}return Qg(e,t),gr(t),null}case N:{Yv(t);var F=wx(),X=t.type;if(e!==null&&t.stateNode!=null)j0(e,t,X,r,F),e.ref!==t.ref&&E0(t);else{if(!r){if(t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return gr(t),null}var te=qv(),fe=Wh(t);if(fe)pT(t,F,te)&&nc(t);else{var me=tR(X,r,F,te,t);C0(me,t,!1,!1),t.stateNode=me,iR(me,X,r,F)&&nc(t)}t.ref!==null&&E0(t)}return gr(t),null}case C:{var Ee=r;if(e&&t.stateNode!=null){var je=e.memoizedProps;D0(e,t,je,Ee)}else{if(typeof Ee!="string"&&t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var Ue=wx(),mt=qv(),zt=Wh(t);zt?vT(t)&&nc(t):t.stateNode=sR(Ee,Ue,mt,t)}return gr(t),null}case R:{Jl(t);var Mt=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var Rn=U5(e,t,Mt);if(!Rn)return t.flags&Vr?t:null}if((t.flags&Bn)!==Zt)return t.lanes=n,(t.mode&Zn)!==Yt&&Ng(t),t;var Nn=Mt!==null,_e=e!==null&&e.memoizedState!==null;if(Nn!==_e&&Nn){var Oe=t.child;if(Oe.flags|=No,(t.mode&Dn)!==Yt){var ye=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);ye||Kv(Us.current,Sx)?OL():gb()}}var Qe=t.updateQueue;if(Qe!==null&&(t.flags|=In),gr(t),(t.mode&Zn)!==Yt&&Nn){var wt=t.child;wt!==null&&(t.treeBaseDuration-=wt.treeBaseDuration)}return null}case _:return Kl(t),Qg(e,t),e===null&&ZR(t.stateNode.containerInfo),gr(t),null;case v:var gt=t.type._context;return Iv(gt,t),gr(t),null;case L:{var en=t.type;return ea(en)&&Ih(t),gr(t),null}case H:{Jl(t);var ln=t.memoizedState;if(ln===null)return gr(t),null;var ei=(t.flags&Bn)!==Zt,Un=ln.rendering;if(Un===null)if(ei)Fu(ln,!1);else{var Pi=PL()&&(e===null||(e.flags&Bn)===Zt);if(!Pi)for(var On=t.child;On!==null;){var Ai=om(On);if(Ai!==null){ei=!0,t.flags|=Bn,Fu(ln,!1);var Rr=Ai.updateQueue;return Rr!==null&&(t.updateQueue=Rr,t.flags|=In),t.subtreeFlags=Zt,CT(t,n),ao(t,Xv(Us.current,Du)),t.child}On=On.sibling}ln.tail!==null&&lr()>X0()&&(t.flags|=Bn,ei=!0,Fu(ln,!1),t.lanes=Dy)}else{if(!ei){var xr=om(Un);if(xr!==null){t.flags|=Bn,ei=!0;var us=xr.updateQueue;if(us!==null&&(t.updateQueue=us,t.flags|=In),Fu(ln,!0),ln.tail===null&&ln.tailMode==="hidden"&&!Un.alternate&&!pr())return gr(t),null}else lr()*2-ln.renderingStartTime>X0()&&n!==is&&(t.flags|=Bn,ei=!0,Fu(ln,!1),t.lanes=Dy)}if(ln.isBackwards)Un.sibling=t.child,t.child=Un;else{var Fr=ln.last;Fr!==null?Fr.sibling=Un:t.child=Un,ln.last=Un}}if(ln.tail!==null){var Hr=ln.tail;ln.rendering=Hr,ln.tail=Hr.sibling,ln.renderingStartTime=lr(),Hr.sibling=null;var Tr=Us.current;return ei?Tr=Xv(Tr,Du):Tr=Xl(Tr),ao(t,Tr),Hr}return gr(t),null}case V:break;case B:case q:{vb(t);var Ua=t.memoizedState,uc=Ua!==null;if(e!==null){var id=e.memoizedState,la=id!==null;la!==uc&&!W&&(t.flags|=No)}return!uc||(t.mode&Dn)===Yt?gr(t):rs(oa,is)&&(gr(t),t.subtreeFlags&(Hi|In)&&(t.flags|=No)),null}case ne:return null;case Y:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function O5(e,t,n){switch(Ev(t),t.tag){case f:{var r=t.type;ea(r)&&Ih(t);var u=t.flags;return u&Vr?(t.flags=u&~Vr|Bn,(t.mode&Zn)!==Yt&&Ng(t),t):null}case h:{t.stateNode,Kl(t),wv(t),Zv();var x=t.flags;return(x&Vr)!==Zt&&(x&Bn)===Zt?(t.flags=x&~Vr|Bn,t):null}case N:return Yv(t),null;case R:{Jl(t);var T=t.memoizedState;if(T!==null&&T.dehydrated!==null){if(t.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Wl()}var I=t.flags;return I&Vr?(t.flags=I&~Vr|Bn,(t.mode&Zn)!==Yt&&Ng(t),t):null}case H:return Jl(t),null;case _:return Kl(t),null;case v:var F=t.type._context;return Iv(F,t),null;case B:case q:return vb(t),null;case ne:return null;default:return null}}function R0(e,t,n){switch(Ev(t),t.tag){case f:{var r=t.type.childContextTypes;r!=null&&Ih(t);break}case h:{t.stateNode,Kl(t),wv(t),Zv();break}case N:{Yv(t);break}case _:Kl(t);break;case R:Jl(t);break;case H:Jl(t);break;case v:var u=t.type._context;Iv(u,t);break;case B:case q:vb(t);break}}var T0=null;T0=new Set;var Tm=!1,br=!1,V5=typeof WeakSet=="function"?WeakSet:Set,kt=null,ic=null,rc=null;function P5(e){ep(null,function(){throw e}),tp()}var I5=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&Zn)try{sa(),t.componentWillUnmount()}finally{ra(e)}else t.componentWillUnmount()};function L0(e,t){try{co(Xi,e)}catch(n){fi(e,t,n)}}function eb(e,t,n){try{I5(e,n)}catch(r){fi(e,t,r)}}function B5(e,t,n){try{n.componentDidMount()}catch(r){fi(e,t,r)}}function A0(e,t){try{U0(e)}catch(n){fi(e,t,n)}}function sc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function"){var r;try{if(ce&&ke&&e.mode&Zn)try{sa(),r=n(null)}finally{ra(e)}else r=n(null)}catch(u){fi(e,t,u)}typeof r=="function"&&b("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ft(e))}else n.current=null}function Lm(e,t,n){try{n()}catch(r){fi(e,t,r)}}var M0=!1;function F5(e,t){Qk(e.containerInfo),kt=t,H5();var n=M0;return M0=!1,n}function H5(){for(;kt!==null;){var e=kt,t=e.child;(e.subtreeFlags&op)!==Zt&&t!==null?(t.return=e,kt=t):z5()}}function z5(){for(;kt!==null;){var e=kt;un(e);try{$5(e)}catch(n){fi(e,e.return,n)}cn();var t=e.sibling;if(t!==null){t.return=e.return,kt=t;return}kt=e.return}}function $5(e){var t=e.alternate,n=e.flags;if((n&Sl)!==Zt){switch(un(e),e.tag){case d:case g:case A:break;case f:{if(t!==null){var r=t.memoizedProps,u=t.memoizedState,x=e.stateNode;e.type===e.elementType&&!zo&&(x.props!==e.memoizedProps&&b("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(e)||"instance"),x.state!==e.memoizedState&&b("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(e)||"instance"));var T=x.getSnapshotBeforeUpdate(e.elementType===e.type?r:Vs(e.type,r),u);{var I=T0;T===void 0&&!I.has(e.type)&&(I.add(e.type),b("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",ft(e)))}x.__reactInternalSnapshotBeforeUpdate=T}break}case h:{{var F=e.stateNode;SR(F.containerInfo)}break}case N:case C:case _:case L:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}cn()}}function Is(e,t,n){var r=t.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var x=u.next,T=x;do{if((T.tag&e)===e){var I=T.destroy;T.destroy=void 0,I!==void 0&&((e&vr)!==Qr?sj(t):(e&Xi)!==Qr&&Ny(t),(e&ta)!==Qr&&ed(!0),Lm(t,n,I),(e&ta)!==Qr&&ed(!1),(e&vr)!==Qr?aj():(e&Xi)!==Qr&&Sy())}T=T.next}while(T!==x)}}function co(e,t){var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var u=r.next,x=u;do{if((x.tag&e)===e){(e&vr)!==Qr?ij(t):(e&Xi)!==Qr&&oj(t);var T=x.create;(e&ta)!==Qr&&ed(!0),x.destroy=T(),(e&ta)!==Qr&&ed(!1),(e&vr)!==Qr?rj():(e&Xi)!==Qr&&lj();{var I=x.destroy;if(I!==void 0&&typeof I!="function"){var F=void 0;(x.tag&Xi)!==Zt?F="useLayoutEffect":(x.tag&ta)!==Zt?F="useInsertionEffect":F="useEffect";var X=void 0;I===null?X=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof I.then=="function"?X=`
|
|
162
|
+
|
|
163
|
+
It looks like you wrote `+F+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
164
|
+
|
|
165
|
+
`+F+`(() => {
|
|
166
|
+
async function fetchData() {
|
|
167
|
+
// You can await here
|
|
168
|
+
const response = await MyAPI.getData(someId);
|
|
169
|
+
// ...
|
|
170
|
+
}
|
|
171
|
+
fetchData();
|
|
172
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
173
|
+
|
|
174
|
+
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:X=" You returned: "+I,b("%s must not return anything besides a function, which is used for clean-up.%s",F,X)}}}x=x.next}while(x!==u)}}function W5(e,t){if((t.flags&In)!==Zt)switch(t.tag){case E:{var n=t.stateNode.passiveEffectDuration,r=t.memoizedProps,u=r.id,x=r.onPostCommit,T=Xx(),I=t.alternate===null?"mount":"update";Kx()&&(I="nested-update"),typeof x=="function"&&x(u,I,n,T);var F=t.return;e:for(;F!==null;){switch(F.tag){case h:var X=F.stateNode;X.passiveEffectDuration+=n;break e;case E:var te=F.stateNode;te.passiveEffectDuration+=n;break e}F=F.return}break}}}function G5(e,t,n,r){if((n.flags&Oc)!==Zt)switch(n.tag){case d:case g:case A:{if(!br)if(n.mode&Zn)try{sa(),co(Xi|Ki,n)}finally{ra(n)}else co(Xi|Ki,n);break}case f:{var u=n.stateNode;if(n.flags&In&&!br)if(t===null)if(n.type===n.elementType&&!zo&&(u.props!==n.memoizedProps&&b("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(n)||"instance"),u.state!==n.memoizedState&&b("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(n)||"instance")),n.mode&Zn)try{sa(),u.componentDidMount()}finally{ra(n)}else u.componentDidMount();else{var x=n.elementType===n.type?t.memoizedProps:Vs(n.type,t.memoizedProps),T=t.memoizedState;if(n.type===n.elementType&&!zo&&(u.props!==n.memoizedProps&&b("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(n)||"instance"),u.state!==n.memoizedState&&b("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(n)||"instance")),n.mode&Zn)try{sa(),u.componentDidUpdate(x,T,u.__reactInternalSnapshotBeforeUpdate)}finally{ra(n)}else u.componentDidUpdate(x,T,u.__reactInternalSnapshotBeforeUpdate)}var I=n.updateQueue;I!==null&&(n.type===n.elementType&&!zo&&(u.props!==n.memoizedProps&&b("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ft(n)||"instance"),u.state!==n.memoizedState&&b("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ft(n)||"instance")),yx(n,I,u));break}case h:{var F=n.updateQueue;if(F!==null){var X=null;if(n.child!==null)switch(n.child.tag){case N:X=n.child.stateNode;break;case f:X=n.child.stateNode;break}yx(n,F,X)}break}case N:{var te=n.stateNode;if(t===null&&n.flags&In){var fe=n.type,me=n.memoizedProps;uR(te,fe,me)}break}case C:break;case _:break;case E:{{var Ee=n.memoizedProps,je=Ee.onCommit,Ue=Ee.onRender,mt=n.stateNode.effectDuration,zt=Xx(),Mt=t===null?"mount":"update";Kx()&&(Mt="nested-update"),typeof Ue=="function"&&Ue(n.memoizedProps.id,Mt,n.actualDuration,n.treeBaseDuration,n.actualStartTime,zt);{typeof je=="function"&&je(n.memoizedProps.id,Mt,mt,zt),zL(n);var Rn=n.return;e:for(;Rn!==null;){switch(Rn.tag){case h:var Nn=Rn.stateNode;Nn.effectDuration+=mt;break e;case E:var _e=Rn.stateNode;_e.effectDuration+=mt;break e}Rn=Rn.return}}}break}case R:{eL(e,n);break}case H:case L:case V:case B:case q:case Y:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}br||n.flags&xo&&U0(n)}function q5(e){switch(e.tag){case d:case g:case A:{if(e.mode&Zn)try{sa(),L0(e,e.return)}finally{ra(e)}else L0(e,e.return);break}case f:{var t=e.stateNode;typeof t.componentDidMount=="function"&&B5(e,e.return,t),A0(e,e.return);break}case N:{A0(e,e.return);break}}}function Y5(e,t){for(var n=null,r=e;;){if(r.tag===N){if(n===null){n=r;try{var u=r.stateNode;t?yR(u):xR(r.stateNode,r.memoizedProps)}catch(T){fi(e,e.return,T)}}}else if(r.tag===C){if(n===null)try{var x=r.stateNode;t?wR(x):NR(x,r.memoizedProps)}catch(T){fi(e,e.return,T)}}else if(!((r.tag===B||r.tag===q)&&r.memoizedState!==null&&r!==e)){if(r.child!==null){r.child.return=r,r=r.child;continue}}if(r===e)return;for(;r.sibling===null;){if(r.return===null||r.return===e)return;n===r&&(n=null),r=r.return}n===r&&(n=null),r.sibling.return=r.return,r=r.sibling}}function U0(e){var t=e.ref;if(t!==null){var n=e.stateNode,r;switch(e.tag){case N:r=n;break;default:r=n}if(typeof t=="function"){var u;if(e.mode&Zn)try{sa(),u=t(r)}finally{ra(e)}else u=t(r);typeof u=="function"&&b("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ft(e))}else t.hasOwnProperty("current")||b("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",ft(e)),t.current=r}}function K5(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function O0(e){var t=e.alternate;t!==null&&(e.alternate=null,O0(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===N){var n=e.stateNode;n!==null&&tT(n)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}}function X5(e){for(var t=e.return;t!==null;){if(V0(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function V0(e){return e.tag===N||e.tag===h||e.tag===_}function P0(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||V0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==N&&t.tag!==C&&t.tag!==O;){if(t.flags&Hi||t.child===null||t.tag===_)continue e;t.child.return=t,t=t.child}if(!(t.flags&Hi))return t.stateNode}}function J5(e){var t=X5(e);switch(t.tag){case N:{var n=t.stateNode;t.flags&Uc&&(Bw(n),t.flags&=~Uc);var r=P0(e);nb(e,r,n);break}case h:case _:{var u=t.stateNode.containerInfo,x=P0(e);tb(e,x,u);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function tb(e,t,n){var r=e.tag,u=r===N||r===C;if(u){var x=e.stateNode;t?vR(n,x,t):fR(n,x)}else if(r!==_){var T=e.child;if(T!==null){tb(T,t,n);for(var I=T.sibling;I!==null;)tb(I,t,n),I=I.sibling}}}function nb(e,t,n){var r=e.tag,u=r===N||r===C;if(u){var x=e.stateNode;t?pR(n,x,t):mR(n,x)}else if(r!==_){var T=e.child;if(T!==null){nb(T,t,n);for(var I=T.sibling;I!==null;)nb(I,t,n),I=I.sibling}}}var _r=null,Bs=!1;function Z5(e,t,n){{var r=t;e:for(;r!==null;){switch(r.tag){case N:{_r=r.stateNode,Bs=!1;break e}case h:{_r=r.stateNode.containerInfo,Bs=!0;break e}case _:{_r=r.stateNode.containerInfo,Bs=!0;break e}}r=r.return}if(_r===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");I0(e,t,n),_r=null,Bs=!1}K5(n)}function uo(e,t,n){for(var r=n.child;r!==null;)I0(e,t,r),r=r.sibling}function I0(e,t,n){switch(QC(n),n.tag){case N:br||sc(n,t);case C:{{var r=_r,u=Bs;_r=null,uo(e,t,n),_r=r,Bs=u,_r!==null&&(Bs?bR(_r,n.stateNode):gR(_r,n.stateNode))}return}case O:{_r!==null&&(Bs?_R(_r,n.stateNode):mv(_r,n.stateNode));return}case _:{{var x=_r,T=Bs;_r=n.stateNode.containerInfo,Bs=!0,uo(e,t,n),_r=x,Bs=T}return}case d:case g:case j:case A:{if(!br){var I=n.updateQueue;if(I!==null){var F=I.lastEffect;if(F!==null){var X=F.next,te=X;do{var fe=te,me=fe.destroy,Ee=fe.tag;me!==void 0&&((Ee&ta)!==Qr?Lm(n,t,me):(Ee&Xi)!==Qr&&(Ny(n),n.mode&Zn?(sa(),Lm(n,t,me),ra(n)):Lm(n,t,me),Sy())),te=te.next}while(te!==X)}}}uo(e,t,n);return}case f:{if(!br){sc(n,t);var je=n.stateNode;typeof je.componentWillUnmount=="function"&&eb(n,t,je)}uo(e,t,n);return}case V:{uo(e,t,n);return}case B:{if(n.mode&Dn){var Ue=br;br=Ue||n.memoizedState!==null,uo(e,t,n),br=Ue}else uo(e,t,n);break}default:{uo(e,t,n);return}}}function Q5(e){e.memoizedState}function eL(e,t){var n=t.memoizedState;if(n===null){var r=t.alternate;if(r!==null){var u=r.memoizedState;if(u!==null){var x=u.dehydrated;x!==null&&PR(x)}}}}function B0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new V5),t.forEach(function(r){var u=XL.bind(null,e,r);if(!n.has(r)){if(n.add(r),Rs)if(ic!==null&&rc!==null)Qu(rc,ic);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");r.then(u,u)}})}}function tL(e,t,n){ic=n,rc=e,un(t),F0(t,e),un(t),ic=null,rc=null}function Fs(e,t,n){var r=t.deletions;if(r!==null)for(var u=0;u<r.length;u++){var x=r[u];try{Z5(e,t,x)}catch(F){fi(x,t,F)}}var T=sr();if(t.subtreeFlags&lp)for(var I=t.child;I!==null;)un(I),F0(I,e),I=I.sibling;un(T)}function F0(e,t,n){var r=e.alternate,u=e.flags;switch(e.tag){case d:case g:case j:case A:{if(Fs(t,e),aa(e),u&In){try{Is(ta|Ki,e,e.return),co(ta|Ki,e)}catch(en){fi(e,e.return,en)}if(e.mode&Zn){try{sa(),Is(Xi|Ki,e,e.return)}catch(en){fi(e,e.return,en)}ra(e)}else try{Is(Xi|Ki,e,e.return)}catch(en){fi(e,e.return,en)}}return}case f:{Fs(t,e),aa(e),u&xo&&r!==null&&sc(r,r.return);return}case N:{Fs(t,e),aa(e),u&xo&&r!==null&&sc(r,r.return);{if(e.flags&Uc){var x=e.stateNode;try{Bw(x)}catch(en){fi(e,e.return,en)}}if(u&In){var T=e.stateNode;if(T!=null){var I=e.memoizedProps,F=r!==null?r.memoizedProps:I,X=e.type,te=e.updateQueue;if(e.updateQueue=null,te!==null)try{dR(T,te,X,F,I,e)}catch(en){fi(e,e.return,en)}}}}return}case C:{if(Fs(t,e),aa(e),u&In){if(e.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var fe=e.stateNode,me=e.memoizedProps,Ee=r!==null?r.memoizedProps:me;try{hR(fe,Ee,me)}catch(en){fi(e,e.return,en)}}return}case h:{if(Fs(t,e),aa(e),u&In&&r!==null){var je=r.memoizedState;if(je.isDehydrated)try{VR(t.containerInfo)}catch(en){fi(e,e.return,en)}}return}case _:{Fs(t,e),aa(e);return}case R:{Fs(t,e),aa(e);var Ue=e.child;if(Ue.flags&No){var mt=Ue.stateNode,zt=Ue.memoizedState,Mt=zt!==null;if(mt.isHidden=Mt,Mt){var Rn=Ue.alternate!==null&&Ue.alternate.memoizedState!==null;Rn||UL()}}if(u&In){try{Q5(e)}catch(en){fi(e,e.return,en)}B0(e)}return}case B:{var Nn=r!==null&&r.memoizedState!==null;if(e.mode&Dn){var _e=br;br=_e||Nn,Fs(t,e),br=_e}else Fs(t,e);if(aa(e),u&No){var Oe=e.stateNode,ye=e.memoizedState,Qe=ye!==null,wt=e;if(Oe.isHidden=Qe,Qe&&!Nn&&(wt.mode&Dn)!==Yt){kt=wt;for(var gt=wt.child;gt!==null;)kt=gt,iL(gt),gt=gt.sibling}Y5(wt,Qe)}return}case H:{Fs(t,e),aa(e),u&In&&B0(e);return}case V:return;default:{Fs(t,e),aa(e);return}}}function aa(e){var t=e.flags;if(t&Hi){try{J5(e)}catch(n){fi(e,e.return,n)}e.flags&=~Hi}t&_a&&(e.flags&=~_a)}function nL(e,t,n){ic=n,rc=t,kt=e,H0(e,t,n),ic=null,rc=null}function H0(e,t,n){for(var r=(e.mode&Dn)!==Yt;kt!==null;){var u=kt,x=u.child;if(u.tag===B&&r){var T=u.memoizedState!==null,I=T||Tm;if(I){ib(e,t,n);continue}else{var F=u.alternate,X=F!==null&&F.memoizedState!==null,te=X||br,fe=Tm,me=br;Tm=I,br=te,br&&!me&&(kt=u,rL(u));for(var Ee=x;Ee!==null;)kt=Ee,H0(Ee,t,n),Ee=Ee.sibling;kt=u,Tm=fe,br=me,ib(e,t,n);continue}}(u.subtreeFlags&Oc)!==Zt&&x!==null?(x.return=u,kt=x):ib(e,t,n)}}function ib(e,t,n){for(;kt!==null;){var r=kt;if((r.flags&Oc)!==Zt){var u=r.alternate;un(r);try{G5(t,u,r,n)}catch(T){fi(r,r.return,T)}cn()}if(r===e){kt=null;return}var x=r.sibling;if(x!==null){x.return=r.return,kt=x;return}kt=r.return}}function iL(e){for(;kt!==null;){var t=kt,n=t.child;switch(t.tag){case d:case g:case j:case A:{if(t.mode&Zn)try{sa(),Is(Xi,t,t.return)}finally{ra(t)}else Is(Xi,t,t.return);break}case f:{sc(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&eb(t,t.return,r);break}case N:{sc(t,t.return);break}case B:{var u=t.memoizedState!==null;if(u){z0(e);continue}break}}n!==null?(n.return=t,kt=n):z0(e)}}function z0(e){for(;kt!==null;){var t=kt;if(t===e){kt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,kt=n;return}kt=t.return}}function rL(e){for(;kt!==null;){var t=kt,n=t.child;if(t.tag===B){var r=t.memoizedState!==null;if(r){$0(e);continue}}n!==null?(n.return=t,kt=n):$0(e)}}function $0(e){for(;kt!==null;){var t=kt;un(t);try{q5(t)}catch(r){fi(t,t.return,r)}if(cn(),t===e){kt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,kt=n;return}kt=t.return}}function sL(e,t,n,r){kt=t,aL(t,e,n,r)}function aL(e,t,n,r){for(;kt!==null;){var u=kt,x=u.child;(u.subtreeFlags&El)!==Zt&&x!==null?(x.return=u,kt=x):oL(e,t,n,r)}}function oL(e,t,n,r){for(;kt!==null;){var u=kt;if((u.flags&Wa)!==Zt){un(u);try{lL(t,u,n,r)}catch(T){fi(u,u.return,T)}cn()}if(u===e){kt=null;return}var x=u.sibling;if(x!==null){x.return=u.return,kt=x;return}kt=u.return}}function lL(e,t,n,r){switch(t.tag){case d:case g:case A:{if(t.mode&Zn){xg();try{co(vr|Ki,t)}finally{wg(t)}}else co(vr|Ki,t);break}}}function cL(e){kt=e,uL()}function uL(){for(;kt!==null;){var e=kt,t=e.child;if((kt.flags&wo)!==Zt){var n=e.deletions;if(n!==null){for(var r=0;r<n.length;r++){var u=n[r];kt=u,mL(u,e)}{var x=e.alternate;if(x!==null){var T=x.child;if(T!==null){x.child=null;do{var I=T.sibling;T.sibling=null,T=I}while(T!==null)}}}kt=e}}(e.subtreeFlags&El)!==Zt&&t!==null?(t.return=e,kt=t):dL()}}function dL(){for(;kt!==null;){var e=kt;(e.flags&Wa)!==Zt&&(un(e),hL(e),cn());var t=e.sibling;if(t!==null){t.return=e.return,kt=t;return}kt=e.return}}function hL(e){switch(e.tag){case d:case g:case A:{e.mode&Zn?(xg(),Is(vr|Ki,e,e.return),wg(e)):Is(vr|Ki,e,e.return);break}}}function mL(e,t){for(;kt!==null;){var n=kt;un(n),pL(n,t),cn();var r=n.child;r!==null?(r.return=n,kt=r):fL(e)}}function fL(e){for(;kt!==null;){var t=kt,n=t.sibling,r=t.return;if(O0(t),t===e){kt=null;return}if(n!==null){n.return=r,kt=n;return}kt=r}}function pL(e,t){switch(e.tag){case d:case g:case A:{e.mode&Zn?(xg(),Is(vr,e,t),wg(e)):Is(vr,e,t);break}}}function vL(e){switch(e.tag){case d:case g:case A:{try{co(Xi|Ki,e)}catch(n){fi(e,e.return,n)}break}case f:{var t=e.stateNode;try{t.componentDidMount()}catch(n){fi(e,e.return,n)}break}}}function gL(e){switch(e.tag){case d:case g:case A:{try{co(vr|Ki,e)}catch(t){fi(e,e.return,t)}break}}}function bL(e){switch(e.tag){case d:case g:case A:{try{Is(Xi|Ki,e,e.return)}catch(n){fi(e,e.return,n)}break}case f:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&eb(e,e.return,t);break}}}function _L(e){switch(e.tag){case d:case g:case A:try{Is(vr|Ki,e,e.return)}catch(t){fi(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var Hu=Symbol.for;Hu("selector.component"),Hu("selector.has_pseudo_class"),Hu("selector.role"),Hu("selector.test_id"),Hu("selector.text")}var yL=[];function wL(){yL.forEach(function(e){return e()})}var xL=l.ReactCurrentActQueue;function NL(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,n=typeof jest<"u";return n&&t!==!1}}function W0(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&xL.current!==null&&b("The current testing environment is not configured to support act(...)"),e}}var SL=Math.ceil,rb=l.ReactCurrentDispatcher,sb=l.ReactCurrentOwner,yr=l.ReactCurrentBatchConfig,Hs=l.ReactCurrentActQueue,Qi=0,G0=1,wr=2,xs=4,Ta=0,zu=1,$o=2,Am=3,$u=4,q0=5,ab=6,kn=Qi,Ir=null,Ci=null,er=Ye,oa=Ye,ob=eo(Ye),tr=Ta,Wu=null,Mm=Ye,Gu=Ye,Um=Ye,qu=null,es=null,lb=0,Y0=500,K0=1/0,EL=500,La=null;function Yu(){K0=lr()+EL}function X0(){return K0}var Om=!1,cb=null,ac=null,Wo=!1,ho=null,Ku=Ye,ub=[],db=null,CL=50,Xu=0,hb=null,mb=!1,Vm=!1,jL=50,oc=0,Pm=null,Ju=pi,Im=Ye,J0=!1;function Bm(){return Ir}function Br(){return(kn&(wr|xs))!==Qi?lr():(Ju!==pi||(Ju=lr()),Ju)}function mo(e){var t=e.mode;if((t&Dn)===Yt)return sn;if((kn&wr)!==Qi&&er!==Ye)return zc(er);var n=xT()!==wT;if(n){if(yr.transition!==null){var r=yr.transition;r._updatedFibers||(r._updatedFibers=new Set),r._updatedFibers.add(e)}return Im===ur&&(Im=Ly()),Im}var u=Ts();if(u!==ur)return u;var x=aR();return x}function DL(e){var t=e.mode;return(t&Dn)===Yt?sn:Rj()}function nr(e,t,n,r){ZL(),J0&&b("useInsertionEffect must not schedule updates."),mb&&(Vm=!0),$c(e,n,r),(kn&wr)!==Ye&&e===Ir?tA(t):(Rs&&Uy(e,t,n),nA(t),e===Ir&&((kn&wr)===Qi&&(Gu=gn(Gu,n)),tr===$u&&fo(e,er)),ts(e,r),n===sn&&kn===Qi&&(t.mode&Dn)===Yt&&!Hs.isBatchingLegacy&&(Yu(),Jw()))}function kL(e,t,n){var r=e.current;r.lanes=t,$c(e,t,n),ts(e,n)}function RL(e){return(kn&wr)!==Qi}function ts(e,t){var n=e.callbackNode;Sj(e,t);var r=oh(e,e===Ir?er:Ye);if(r===Ye){n!==null&&mN(n),e.callbackNode=null,e.callbackPriority=ur;return}var u=ko(r),x=e.callbackPriority;if(x===u&&!(Hs.current!==null&&n!==yb)){n==null&&x!==sn&&b("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}n!=null&&mN(n);var T;if(u===sn)e.tag===to?(Hs.isBatchingLegacy!==null&&(Hs.didScheduleLegacyUpdate=!0),rT(eN.bind(null,e))):Xw(eN.bind(null,e)),Hs.current!==null?Hs.current.push(no):lR(function(){(kn&(wr|xs))===Qi&&no()}),T=null;else{var I;switch(Py(r)){case ss:I=ih;break;case xa:I=cp;break;case Na:I=Co;break;case uh:I=up;break;default:I=Co;break}T=wb(I,Z0.bind(null,e))}e.callbackPriority=u,e.callbackNode=T}function Z0(e,t){if(YT(),Ju=pi,Im=Ye,(kn&(wr|xs))!==Qi)throw new Error("Should not already be working.");var n=e.callbackNode,r=Ma();if(r&&e.callbackNode!==n)return null;var u=oh(e,e===Ir?er:Ye);if(u===Ye)return null;var x=!lh(e,u)&&!kj(e,u)&&!t,T=x?BL(e,u):Hm(e,u);if(T!==Ta){if(T===$o){var I=Lp(e);I!==Ye&&(u=I,T=fb(e,I))}if(T===zu){var F=Wu;throw Go(e,Ye),fo(e,u),ts(e,lr()),F}if(T===ab)fo(e,u);else{var X=!lh(e,u),te=e.current.alternate;if(X&&!LL(te)){if(T=Hm(e,u),T===$o){var fe=Lp(e);fe!==Ye&&(u=fe,T=fb(e,fe))}if(T===zu){var me=Wu;throw Go(e,Ye),fo(e,u),ts(e,lr()),me}}e.finishedWork=te,e.finishedLanes=u,TL(e,T,u)}}return ts(e,lr()),e.callbackNode===n?Z0.bind(null,e):null}function fb(e,t){var n=qu;if(dh(e)){var r=Go(e,t);r.flags|=ba,JR(e.containerInfo)}var u=Hm(e,t);if(u!==$o){var x=es;es=n,x!==null&&Q0(x)}return u}function Q0(e){es===null?es=e:es.push.apply(es,e)}function TL(e,t,n){switch(t){case Ta:case zu:throw new Error("Root did not complete. This is a bug in React.");case $o:{qo(e,es,La);break}case Am:{if(fo(e,n),Ry(n)&&!fN()){var r=lb+Y0-lr();if(r>10){var u=oh(e,Ye);if(u!==Ye)break;var x=e.suspendedLanes;if(!Tl(x,n)){Br(),My(e,x);break}e.timeoutHandle=dv(qo.bind(null,e,es,La),r);break}}qo(e,es,La);break}case $u:{if(fo(e,n),Dj(n))break;if(!fN()){var T=xj(e,n),I=T,F=lr()-I,X=JL(F)-F;if(X>10){e.timeoutHandle=dv(qo.bind(null,e,es,La),X);break}}qo(e,es,La);break}case q0:{qo(e,es,La);break}default:throw new Error("Unknown root exit status.")}}function LL(e){for(var t=e;;){if(t.flags&np){var n=t.updateQueue;if(n!==null){var r=n.stores;if(r!==null)for(var u=0;u<r.length;u++){var x=r[u],T=x.getSnapshot,I=x.value;try{if(!os(T(),I))return!1}catch{return!1}}}}var F=t.child;if(t.subtreeFlags&np&&F!==null){F.return=t,t=F;continue}if(t===e)return!0;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}return!0}function fo(e,t){t=ch(t,Um),t=ch(t,Gu),Lj(e,t)}function eN(e){if(KT(),(kn&(wr|xs))!==Qi)throw new Error("Should not already be working.");Ma();var t=oh(e,Ye);if(!rs(t,sn))return ts(e,lr()),null;var n=Hm(e,t);if(e.tag!==to&&n===$o){var r=Lp(e);r!==Ye&&(t=r,n=fb(e,r))}if(n===zu){var u=Wu;throw Go(e,Ye),fo(e,t),ts(e,lr()),u}if(n===ab)throw new Error("Root did not complete. This is a bug in React.");var x=e.current.alternate;return e.finishedWork=x,e.finishedLanes=t,qo(e,es,La),ts(e,lr()),null}function AL(e,t){t!==Ye&&(Op(e,gn(t,sn)),ts(e,lr()),(kn&(wr|xs))===Qi&&(Yu(),no()))}function pb(e,t){var n=kn;kn|=G0;try{return e(t)}finally{kn=n,kn===Qi&&!Hs.isBatchingLegacy&&(Yu(),Jw())}}function ML(e,t,n,r,u){var x=Ts(),T=yr.transition;try{return yr.transition=null,dr(ss),e(t,n,r,u)}finally{dr(x),yr.transition=T,kn===Qi&&Yu()}}function Aa(e){ho!==null&&ho.tag===to&&(kn&(wr|xs))===Qi&&Ma();var t=kn;kn|=G0;var n=yr.transition,r=Ts();try{return yr.transition=null,dr(ss),e?e():void 0}finally{dr(r),yr.transition=n,kn=t,(kn&(wr|xs))===Qi&&no()}}function tN(){return(kn&(wr|xs))!==Qi}function Fm(e,t){Dr(ob,oa,e),oa=gn(oa,t)}function vb(e){oa=ob.current,jr(ob,e)}function Go(e,t){e.finishedWork=null,e.finishedLanes=Ye;var n=e.timeoutHandle;if(n!==hv&&(e.timeoutHandle=hv,oR(n)),Ci!==null)for(var r=Ci.return;r!==null;){var u=r.alternate;R0(u,r),r=r.return}Ir=e;var x=Yo(e.current,null);return Ci=x,er=oa=t,tr=Ta,Wu=null,Mm=Ye,Gu=Ye,Um=Ye,qu=null,es=null,kT(),Ms.discardPendingWarnings(),x}function nN(e,t){do{var n=Ci;try{if(Jh(),Cx(),cn(),sb.current=null,n===null||n.return===null){tr=zu,Wu=t,Ci=null;return}if(ce&&n.mode&Zn&&Cm(n,!0),he)if(jl(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var r=t;uj(n,r,er)}else cj(n,t,er);r5(e,n.return,n,t,er),aN(n)}catch(u){t=u,Ci===n&&n!==null?(n=n.return,Ci=n):n=Ci;continue}return}while(!0)}function iN(){var e=rb.current;return rb.current=wm,e===null?wm:e}function rN(e){rb.current=e}function UL(){lb=lr()}function Zu(e){Mm=gn(e,Mm)}function OL(){tr===Ta&&(tr=Am)}function gb(){(tr===Ta||tr===Am||tr===$o)&&(tr=$u),Ir!==null&&(Ap(Mm)||Ap(Gu))&&fo(Ir,er)}function VL(e){tr!==$u&&(tr=$o),qu===null?qu=[e]:qu.push(e)}function PL(){return tr===Ta}function Hm(e,t){var n=kn;kn|=wr;var r=iN();if(Ir!==e||er!==t){if(Rs){var u=e.memoizedUpdaters;u.size>0&&(Qu(e,er),u.clear()),Oy(e,t)}La=Vy(),Go(e,t)}Ey(t);do try{IL();break}catch(x){nN(e,x)}while(!0);if(Jh(),kn=n,rN(r),Ci!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Cy(),Ir=null,er=Ye,tr}function IL(){for(;Ci!==null;)sN(Ci)}function BL(e,t){var n=kn;kn|=wr;var r=iN();if(Ir!==e||er!==t){if(Rs){var u=e.memoizedUpdaters;u.size>0&&(Qu(e,er),u.clear()),Oy(e,t)}La=Vy(),Yu(),Go(e,t)}Ey(t);do try{FL();break}catch(x){nN(e,x)}while(!0);return Jh(),rN(r),kn=n,Ci!==null?(pj(),Ta):(Cy(),Ir=null,er=Ye,tr)}function FL(){for(;Ci!==null&&!zC();)sN(Ci)}function sN(e){var t=e.alternate;un(e);var n;(e.mode&Zn)!==Yt?(yg(e),n=bb(t,e,oa),Cm(e,!0)):n=bb(t,e,oa),cn(),e.memoizedProps=e.pendingProps,n===null?aN(e):Ci=n,sb.current=null}function aN(e){var t=e;do{var n=t.alternate,r=t.return;if((t.flags&nh)===Zt){un(t);var u=void 0;if((t.mode&Zn)===Yt?u=k0(n,t,oa):(yg(t),u=k0(n,t,oa),Cm(t,!1)),cn(),u!==null){Ci=u;return}}else{var x=O5(n,t);if(x!==null){x.flags&=VC,Ci=x;return}if((t.mode&Zn)!==Yt){Cm(t,!1);for(var T=t.actualDuration,I=t.child;I!==null;)T+=I.actualDuration,I=I.sibling;t.actualDuration=T}if(r!==null)r.flags|=nh,r.subtreeFlags=Zt,r.deletions=null;else{tr=ab,Ci=null;return}}var F=t.sibling;if(F!==null){Ci=F;return}t=r,Ci=t}while(t!==null);tr===Ta&&(tr=q0)}function qo(e,t,n){var r=Ts(),u=yr.transition;try{yr.transition=null,dr(ss),HL(e,t,n,r)}finally{yr.transition=u,dr(r)}return null}function HL(e,t,n,r){do Ma();while(ho!==null);if(QL(),(kn&(wr|xs))!==Qi)throw new Error("Should not already be working.");var u=e.finishedWork,x=e.finishedLanes;if(nj(x),u===null)return xy(),null;if(x===Ye&&b("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=Ye,u===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=ur;var T=gn(u.lanes,u.childLanes);Aj(e,T),e===Ir&&(Ir=null,Ci=null,er=Ye),((u.subtreeFlags&El)!==Zt||(u.flags&El)!==Zt)&&(Wo||(Wo=!0,db=n,wb(Co,function(){return Ma(),null})));var I=(u.subtreeFlags&(op|lp|Oc|El))!==Zt,F=(u.flags&(op|lp|Oc|El))!==Zt;if(I||F){var X=yr.transition;yr.transition=null;var te=Ts();dr(ss);var fe=kn;kn|=xs,sb.current=null,F5(e,u),Jx(),tL(e,u,x),eR(e.containerInfo),e.current=u,dj(x),nL(u,e,x),hj(),$C(),kn=fe,dr(te),yr.transition=X}else e.current=u,Jx();var me=Wo;if(Wo?(Wo=!1,ho=e,Ku=x):(oc=0,Pm=null),T=e.pendingLanes,T===Ye&&(ac=null),me||uN(e.current,!1),JC(u.stateNode,r),Rs&&e.memoizedUpdaters.clear(),wL(),ts(e,lr()),t!==null)for(var Ee=e.onRecoverableError,je=0;je<t.length;je++){var Ue=t[je],mt=Ue.stack,zt=Ue.digest;Ee(Ue.value,{componentStack:mt,digest:zt})}if(Om){Om=!1;var Mt=cb;throw cb=null,Mt}return rs(Ku,sn)&&e.tag!==to&&Ma(),T=e.pendingLanes,rs(T,sn)?(qT(),e===hb?Xu++:(Xu=0,hb=e)):Xu=0,no(),xy(),null}function Ma(){if(ho!==null){var e=Py(Ku),t=Vj(Na,e),n=yr.transition,r=Ts();try{return yr.transition=null,dr(t),$L()}finally{dr(r),yr.transition=n}}return!1}function zL(e){ub.push(e),Wo||(Wo=!0,wb(Co,function(){return Ma(),null}))}function $L(){if(ho===null)return!1;var e=db;db=null;var t=ho,n=Ku;if(ho=null,Ku=Ye,(kn&(wr|xs))!==Qi)throw new Error("Cannot flush passive effects while already rendering.");mb=!0,Vm=!1,mj(n);var r=kn;kn|=xs,cL(t.current),sL(t,t.current,n,e);{var u=ub;ub=[];for(var x=0;x<u.length;x++){var T=u[x];W5(t,T)}}fj(),uN(t.current,!0),kn=r,no(),Vm?t===Pm?oc++:(oc=0,Pm=t):oc=0,mb=!1,Vm=!1,ZC(t);{var I=t.current.stateNode;I.effectDuration=0,I.passiveEffectDuration=0}return!0}function oN(e){return ac!==null&&ac.has(e)}function WL(e){ac===null?ac=new Set([e]):ac.add(e)}function GL(e){Om||(Om=!0,cb=e)}var qL=GL;function lN(e,t,n){var r=Ho(n,t),u=s0(e,r,sn),x=ro(e,u,sn),T=Br();x!==null&&($c(x,sn,T),ts(x,T))}function fi(e,t,n){if(P5(n),ed(!1),e.tag===h){lN(e,e,n);return}var r=null;for(r=t;r!==null;){if(r.tag===h){lN(r,e,n);return}else if(r.tag===f){var u=r.type,x=r.stateNode;if(typeof u.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&!oN(x)){var T=Ho(n,e),I=Pg(r,T,sn),F=ro(r,I,sn),X=Br();F!==null&&($c(F,sn,X),ts(F,X));return}}r=r.return}b(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
175
|
+
|
|
176
|
+
Error message:
|
|
177
|
+
|
|
178
|
+
%s`,n)}function YL(e,t,n){var r=e.pingCache;r!==null&&r.delete(t);var u=Br();My(e,n),iA(e),Ir===e&&Tl(er,n)&&(tr===$u||tr===Am&&Ry(er)&&lr()-lb<Y0?Go(e,Ye):Um=gn(Um,n)),ts(e,u)}function cN(e,t){t===ur&&(t=DL(e));var n=Br(),r=Zr(e,t);r!==null&&($c(r,t,n),ts(r,n))}function KL(e){var t=e.memoizedState,n=ur;t!==null&&(n=t.retryLane),cN(e,n)}function XL(e,t){var n=ur,r;switch(e.tag){case R:r=e.stateNode;var u=e.memoizedState;u!==null&&(n=u.retryLane);break;case H:r=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}r!==null&&r.delete(t),cN(e,n)}function JL(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:SL(e/1960)*1960}function ZL(){if(Xu>CL)throw Xu=0,hb=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");oc>jL&&(oc=0,Pm=null,b("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function QL(){Ms.flushLegacyContextWarning(),Ms.flushPendingUnsafeLifecycleWarnings()}function uN(e,t){un(e),zm(e,Ga,bL),t&&zm(e,ap,_L),zm(e,Ga,vL),t&&zm(e,ap,gL),cn()}function zm(e,t,n){for(var r=e,u=null;r!==null;){var x=r.subtreeFlags&t;r!==u&&r.child!==null&&x!==Zt?r=r.child:((r.flags&t)!==Zt&&n(r),r.sibling!==null?r=r.sibling:r=u=r.return)}}var $m=null;function dN(e){{if((kn&wr)!==Qi||!(e.mode&Dn))return;var t=e.tag;if(t!==w&&t!==h&&t!==f&&t!==d&&t!==g&&t!==j&&t!==A)return;var n=ft(e)||"ReactComponent";if($m!==null){if($m.has(n))return;$m.add(n)}else $m=new Set([n]);var r=An;try{un(e),b("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{r?un(e):cn()}}}var bb;{var eA=null;bb=function(e,t,n){var r=_N(eA,t);try{return S0(e,t,n)}catch(x){if(hT()||x!==null&&typeof x=="object"&&typeof x.then=="function")throw x;if(Jh(),Cx(),R0(e,t),_N(t,r),t.mode&Zn&&yg(t),ep(null,S0,null,e,t,n),MC()){var u=tp();typeof u=="object"&&u!==null&&u._suppressLogging&&typeof x=="object"&&x!==null&&!x._suppressLogging&&(x._suppressLogging=!0)}throw x}}}var hN=!1,_b;_b=new Set;function tA(e){if(di&&!$T())switch(e.tag){case d:case g:case A:{var t=Ci&&ft(Ci)||"Unknown",n=t;if(!_b.has(n)){_b.add(n);var r=ft(e)||"Unknown";b("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",r,t,t)}break}case f:{hN||(b("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),hN=!0);break}}}function Qu(e,t){if(Rs){var n=e.memoizedUpdaters;n.forEach(function(r){Uy(e,r,t)})}}var yb={};function wb(e,t){{var n=Hs.current;return n!==null?(n.push(t),yb):wy(e,t)}}function mN(e){if(e!==yb)return HC(e)}function fN(){return Hs.current!==null}function nA(e){{if(e.mode&Dn){if(!W0())return}else if(!NL()||kn!==Qi||e.tag!==d&&e.tag!==g&&e.tag!==A)return;if(Hs.current===null){var t=An;try{un(e),b(`An update to %s inside a test was not wrapped in act(...).
|
|
179
|
+
|
|
180
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
181
|
+
|
|
182
|
+
act(() => {
|
|
183
|
+
/* fire events that update state */
|
|
184
|
+
});
|
|
185
|
+
/* assert on the output */
|
|
186
|
+
|
|
187
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,ft(e))}finally{t?un(e):cn()}}}}function iA(e){e.tag!==to&&W0()&&Hs.current===null&&b(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
188
|
+
|
|
189
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
190
|
+
|
|
191
|
+
act(() => {
|
|
192
|
+
/* finish loading suspended data */
|
|
193
|
+
});
|
|
194
|
+
/* assert on the output */
|
|
195
|
+
|
|
196
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function ed(e){J0=e}var Ns=null,lc=null,rA=function(e){Ns=e};function cc(e){{if(Ns===null)return e;var t=Ns(e);return t===void 0?e:t.current}}function xb(e){return cc(e)}function Nb(e){{if(Ns===null)return e;var t=Ns(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var n=cc(e.render);if(e.render!==n){var r={$$typeof:Ct,render:n};return e.displayName!==void 0&&(r.displayName=e.displayName),r}}return e}return t.current}}function pN(e,t){{if(Ns===null)return!1;var n=e.elementType,r=t.type,u=!1,x=typeof r=="object"&&r!==null?r.$$typeof:null;switch(e.tag){case f:{typeof r=="function"&&(u=!0);break}case d:{(typeof r=="function"||x===Nt)&&(u=!0);break}case g:{(x===Ct||x===Nt)&&(u=!0);break}case j:case A:{(x===Lt||x===Nt)&&(u=!0);break}default:return!1}if(u){var T=Ns(n);if(T!==void 0&&T===Ns(r))return!0}return!1}}function vN(e){{if(Ns===null||typeof WeakSet!="function")return;lc===null&&(lc=new WeakSet),lc.add(e)}}var sA=function(e,t){{if(Ns===null)return;var n=t.staleFamilies,r=t.updatedFamilies;Ma(),Aa(function(){Sb(e.current,r,n)})}},aA=function(e,t){{if(e.context!==ls)return;Ma(),Aa(function(){td(t,e,null,null)})}};function Sb(e,t,n){{var r=e.alternate,u=e.child,x=e.sibling,T=e.tag,I=e.type,F=null;switch(T){case d:case A:case f:F=I;break;case g:F=I.render;break}if(Ns===null)throw new Error("Expected resolveFamily to be set during hot reload.");var X=!1,te=!1;if(F!==null){var fe=Ns(F);fe!==void 0&&(n.has(fe)?te=!0:t.has(fe)&&(T===f?te=!0:X=!0))}if(lc!==null&&(lc.has(e)||r!==null&&lc.has(r))&&(te=!0),te&&(e._debugNeedsRemount=!0),te||X){var me=Zr(e,sn);me!==null&&nr(me,e,sn,pi)}u!==null&&!te&&Sb(u,t,n),x!==null&&Sb(x,t,n)}}var oA=function(e,t){{var n=new Set,r=new Set(t.map(function(u){return u.current}));return Eb(e.current,r,n),n}};function Eb(e,t,n){{var r=e.child,u=e.sibling,x=e.tag,T=e.type,I=null;switch(x){case d:case A:case f:I=T;break;case g:I=T.render;break}var F=!1;I!==null&&t.has(I)&&(F=!0),F?lA(e,n):r!==null&&Eb(r,t,n),u!==null&&Eb(u,t,n)}}function lA(e,t){{var n=cA(e,t);if(n)return;for(var r=e;;){switch(r.tag){case N:t.add(r.stateNode);return;case _:t.add(r.stateNode.containerInfo);return;case h:t.add(r.stateNode.containerInfo);return}if(r.return===null)throw new Error("Expected to reach root first.");r=r.return}}}function cA(e,t){for(var n=e,r=!1;;){if(n.tag===N)r=!0,t.add(n.stateNode);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)return r;for(;n.sibling===null;){if(n.return===null||n.return===e)return r;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}var Cb;{Cb=!1;try{var gN=Object.preventExtensions({})}catch{Cb=!0}}function uA(e,t,n,r){this.tag=e,this.key=n,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=r,this.flags=Zt,this.subtreeFlags=Zt,this.deletions=null,this.lanes=Ye,this.childLanes=Ye,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!Cb&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var cs=function(e,t,n,r){return new uA(e,t,n,r)};function jb(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function dA(e){return typeof e=="function"&&!jb(e)&&e.defaultProps===void 0}function hA(e){if(typeof e=="function")return jb(e)?f:d;if(e!=null){var t=e.$$typeof;if(t===Ct)return g;if(t===Lt)return j}return w}function Yo(e,t){var n=e.alternate;n===null?(n=cs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugSource=e._debugSource,n._debugOwner=e._debugOwner,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=Zt,n.subtreeFlags=Zt,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&ya,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue;var r=e.dependencies;switch(n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case w:case d:case A:n.type=cc(e.type);break;case f:n.type=xb(e.type);break;case g:n.type=Nb(e.type);break}return n}function mA(e,t){e.flags&=ya|Hi;var n=e.alternate;if(n===null)e.childLanes=Ye,e.lanes=t,e.child=null,e.subtreeFlags=Zt,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=Zt,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var r=n.dependencies;e.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function fA(e,t,n){var r;return e===Fh?(r=Dn,t===!0&&(r|=Li,r|=Js)):r=Yt,Rs&&(r|=Zn),cs(h,null,null,r)}function Db(e,t,n,r,u,x){var T=w,I=e;if(typeof e=="function")jb(e)?(T=f,I=xb(I)):I=cc(I);else if(typeof e=="string")T=N;else e:switch(e){case Sn:return po(n.children,u,x,t);case zn:T=c,u|=Li,(u&Dn)!==Yt&&(u|=Js);break;case ae:return pA(n,u,x,t);case jt:return vA(n,u,x,t);case Rt:return gA(n,u,x,t);case fn:return bN(n,u,x,t);case ni:case $n:case Xn:case Ui:case Bt:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Be:T=v;break e;case et:T=p;break e;case Ct:T=g,I=Nb(I);break e;case Lt:T=j;break e;case Nt:T=k,I=null;break e}var F="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(F+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var X=r?ft(r):null;X&&(F+=`
|
|
197
|
+
|
|
198
|
+
Check the render method of \``+X+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(e==null?e:typeof e)+"."+F))}}var te=cs(T,n,t,u);return te.elementType=e,te.type=I,te.lanes=x,te._debugOwner=r,te}function kb(e,t,n){var r=null;r=e._owner;var u=e.type,x=e.key,T=e.props,I=Db(u,x,T,r,t,n);return I._debugSource=e._source,I._debugOwner=e._owner,I}function po(e,t,n,r){var u=cs(y,e,r,t);return u.lanes=n,u}function pA(e,t,n,r){typeof e.id!="string"&&b('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var u=cs(E,e,r,t|Zn);return u.elementType=ae,u.lanes=n,u.stateNode={effectDuration:0,passiveEffectDuration:0},u}function vA(e,t,n,r){var u=cs(R,e,r,t);return u.elementType=jt,u.lanes=n,u}function gA(e,t,n,r){var u=cs(H,e,r,t);return u.elementType=Rt,u.lanes=n,u}function bN(e,t,n,r){var u=cs(B,e,r,t);u.elementType=fn,u.lanes=n;var x={isHidden:!1};return u.stateNode=x,u}function Rb(e,t,n){var r=cs(C,e,null,t);return r.lanes=n,r}function bA(){var e=cs(N,null,null,Yt);return e.elementType="DELETED",e}function _A(e){var t=cs(O,null,null,Yt);return t.stateNode=e,t}function Tb(e,t,n){var r=e.children!==null?e.children:[],u=cs(_,r,e.key,t);return u.lanes=n,u.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},u}function _N(e,t){return e===null&&(e=cs(w,null,null,Yt)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function yA(e,t,n,r,u){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=hv,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=ur,this.eventTimes=Up(Ye),this.expirationTimes=Up(pi),this.pendingLanes=Ye,this.suspendedLanes=Ye,this.pingedLanes=Ye,this.expiredLanes=Ye,this.mutableReadLanes=Ye,this.finishedLanes=Ye,this.entangledLanes=Ye,this.entanglements=Up(Ye),this.identifierPrefix=r,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var x=this.pendingUpdatersLaneMap=[],T=0;T<hp;T++)x.push(new Set)}switch(t){case Fh:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case to:this._debugRootType=n?"hydrate()":"render()";break}}function yN(e,t,n,r,u,x,T,I,F,X){var te=new yA(e,t,n,I,F),fe=fA(t,x);te.current=fe,fe.stateNode=te;{var me={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};fe.memoizedState=me}return $v(fe),te}var Lb="18.3.1";function wA(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Ke(r),{$$typeof:Tn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Ab,Mb;Ab=!1,Mb={};function wN(e){if(!e)return ls;var t=xl(e),n=iT(t);if(t.tag===f){var r=t.type;if(ea(r))return Yw(t,r,n)}return n}function xA(e,t){{var n=xl(e);if(n===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var r=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+r)}var u=by(n);if(u===null)return null;if(u.mode&Li){var x=ft(n)||"Component";if(!Mb[x]){Mb[x]=!0;var T=An;try{un(u),n.mode&Li?b("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,x):b("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,x)}finally{T?un(T):cn()}}}return u.stateNode}}function xN(e,t,n,r,u,x,T,I){var F=!1,X=null;return yN(e,t,F,X,n,r,u,x,T)}function NN(e,t,n,r,u,x,T,I,F,X){var te=!0,fe=yN(n,r,te,e,u,x,T,I,F);fe.context=wN(null);var me=fe.current,Ee=Br(),je=mo(me),Ue=ka(Ee,je);return Ue.callback=t??null,ro(me,Ue,je),kL(fe,je,Ee),fe}function td(e,t,n,r){XC(t,e);var u=t.current,x=Br(),T=mo(u);vj(T);var I=wN(n);t.context===null?t.context=I:t.pendingContext=I,di&&An!==null&&!Ab&&(Ab=!0,b(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
199
|
+
|
|
200
|
+
Check the render method of %s.`,ft(An)||"Unknown"));var F=ka(x,T);F.payload={element:e},r=r===void 0?null:r,r!==null&&(typeof r!="function"&&b("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),F.callback=r);var X=ro(u,F,T);return X!==null&&(nr(X,u,T,x),nm(X,u,T)),T}function Wm(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case N:return t.child.stateNode;default:return t.child.stateNode}}function NA(e){switch(e.tag){case h:{var t=e.stateNode;if(dh(t)){var n=Ej(t);AL(t,n)}break}case R:{Aa(function(){var u=Zr(e,sn);if(u!==null){var x=Br();nr(u,e,sn,x)}});var r=sn;Ub(e,r);break}}}function SN(e,t){var n=e.memoizedState;n!==null&&n.dehydrated!==null&&(n.retryLane=Tj(n.retryLane,t))}function Ub(e,t){SN(e,t);var n=e.alternate;n&&SN(n,t)}function SA(e){if(e.tag===R){var t=Bc,n=Zr(e,t);if(n!==null){var r=Br();nr(n,e,t,r)}Ub(e,t)}}function EA(e){if(e.tag===R){var t=mo(e),n=Zr(e,t);if(n!==null){var r=Br();nr(n,e,t,r)}Ub(e,t)}}function EN(e){var t=FC(e);return t===null?null:t.stateNode}var CN=function(e){return null};function CA(e){return CN(e)}var jN=function(e){return!1};function jA(e){return jN(e)}var DN=null,kN=null,RN=null,TN=null,LN=null,AN=null,MN=null,UN=null,ON=null;{var VN=function(e,t,n){var r=t[n],u=nn(e)?e.slice():Ht({},e);return n+1===t.length?(nn(u)?u.splice(r,1):delete u[r],u):(u[r]=VN(e[r],t,n+1),u)},PN=function(e,t){return VN(e,t,0)},IN=function(e,t,n,r){var u=t[r],x=nn(e)?e.slice():Ht({},e);if(r+1===t.length){var T=n[r];x[T]=x[u],nn(x)?x.splice(u,1):delete x[u]}else x[u]=IN(e[u],t,n,r+1);return x},BN=function(e,t,n){if(t.length!==n.length){D("copyWithRename() expects paths of the same length");return}else for(var r=0;r<n.length-1;r++)if(t[r]!==n[r]){D("copyWithRename() expects paths to be the same except for the deepest key");return}return IN(e,t,n,0)},FN=function(e,t,n,r){if(n>=t.length)return r;var u=t[n],x=nn(e)?e.slice():Ht({},e);return x[u]=FN(e[u],t,n+1,r),x},HN=function(e,t,n){return FN(e,t,0,n)},Ob=function(e,t){for(var n=e.memoizedState;n!==null&&t>0;)n=n.next,t--;return n};DN=function(e,t,n,r){var u=Ob(e,t);if(u!==null){var x=HN(u.memoizedState,n,r);u.memoizedState=x,u.baseState=x,e.memoizedProps=Ht({},e.memoizedProps);var T=Zr(e,sn);T!==null&&nr(T,e,sn,pi)}},kN=function(e,t,n){var r=Ob(e,t);if(r!==null){var u=PN(r.memoizedState,n);r.memoizedState=u,r.baseState=u,e.memoizedProps=Ht({},e.memoizedProps);var x=Zr(e,sn);x!==null&&nr(x,e,sn,pi)}},RN=function(e,t,n,r){var u=Ob(e,t);if(u!==null){var x=BN(u.memoizedState,n,r);u.memoizedState=x,u.baseState=x,e.memoizedProps=Ht({},e.memoizedProps);var T=Zr(e,sn);T!==null&&nr(T,e,sn,pi)}},TN=function(e,t,n){e.pendingProps=HN(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=Zr(e,sn);r!==null&&nr(r,e,sn,pi)},LN=function(e,t){e.pendingProps=PN(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=Zr(e,sn);n!==null&&nr(n,e,sn,pi)},AN=function(e,t,n){e.pendingProps=BN(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=Zr(e,sn);r!==null&&nr(r,e,sn,pi)},MN=function(e){var t=Zr(e,sn);t!==null&&nr(t,e,sn,pi)},UN=function(e){CN=e},ON=function(e){jN=e}}function DA(e){var t=by(e);return t===null?null:t.stateNode}function kA(e){return null}function RA(){return An}function TA(e){var t=e.findFiberByHostInstance,n=l.ReactCurrentDispatcher;return KC({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:DN,overrideHookStateDeletePath:kN,overrideHookStateRenamePath:RN,overrideProps:TN,overridePropsDeletePath:LN,overridePropsRenamePath:AN,setErrorHandler:UN,setSuspenseHandler:ON,scheduleUpdate:MN,currentDispatcherRef:n,findHostInstanceByFiber:DA,findFiberByHostInstance:t||kA,findHostInstancesForRefresh:oA,scheduleRefresh:sA,scheduleRoot:aA,setRefreshHandler:rA,getCurrentFiber:RA,reconcilerVersion:Lb})}var zN=typeof reportError=="function"?reportError:function(e){console.error(e)};function Vb(e){this._internalRoot=e}Gm.prototype.render=Vb.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?b("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):qm(arguments[1])?b("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&b("You passed a second argument to root.render(...) but it only accepts one argument.");var n=t.containerInfo;if(n.nodeType!==si){var r=EN(t.current);r&&r.parentNode!==n&&b("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}td(e,t,null,null)},Gm.prototype.unmount=Vb.prototype.unmount=function(){typeof arguments[0]=="function"&&b("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tN()&&b("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Aa(function(){td(null,e,null,null)}),zw(t)}};function LA(e,t){if(!qm(e))throw new Error("createRoot(...): Target container is not a DOM element.");$N(e);var n=!1,r=!1,u="",x=zN;t!=null&&(t.hydrate?D("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Pt&&b(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
201
|
+
|
|
202
|
+
let root = createRoot(domContainer);
|
|
203
|
+
root.render(<App />);`),t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var T=xN(e,Fh,null,n,r,u,x);Mh(T.current,e);var I=e.nodeType===si?e.parentNode:e;return ou(I),new Vb(T)}function Gm(e){this._internalRoot=e}function AA(e){e&&Yj(e)}Gm.prototype.unstable_scheduleHydration=AA;function MA(e,t,n){if(!qm(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");$N(e),t===void 0&&b("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=n??null,u=n!=null&&n.hydratedSources||null,x=!1,T=!1,I="",F=zN;n!=null&&(n.unstable_strictMode===!0&&(x=!0),n.identifierPrefix!==void 0&&(I=n.identifierPrefix),n.onRecoverableError!==void 0&&(F=n.onRecoverableError));var X=NN(t,null,e,Fh,r,x,T,I,F);if(Mh(X.current,e),ou(e),u)for(var te=0;te<u.length;te++){var fe=u[te];PT(X,fe)}return new Gm(X)}function qm(e){return!!(e&&(e.nodeType===Bi||e.nodeType===ar||e.nodeType===xc))}function nd(e){return!!(e&&(e.nodeType===Bi||e.nodeType===ar||e.nodeType===xc||e.nodeType===si&&e.nodeValue===" react-mount-point-unstable "))}function $N(e){e.nodeType===Bi&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&b("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),bu(e)&&(e._reactRootContainer?b("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):b("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var UA=l.ReactCurrentOwner,WN;WN=function(e){if(e._reactRootContainer&&e.nodeType!==si){var t=EN(e._reactRootContainer.current);t&&t.parentNode!==e&&b("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,r=Pb(e),u=!!(r&&Qa(r));u&&!n&&b("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Bi&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&b("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function Pb(e){return e?e.nodeType===ar?e.documentElement:e.firstChild:null}function GN(){}function OA(e,t,n,r,u){if(u){if(typeof r=="function"){var x=r;r=function(){var me=Wm(T);x.call(me)}}var T=NN(t,r,e,to,null,!1,!1,"",GN);e._reactRootContainer=T,Mh(T.current,e);var I=e.nodeType===si?e.parentNode:e;return ou(I),Aa(),T}else{for(var F;F=e.lastChild;)e.removeChild(F);if(typeof r=="function"){var X=r;r=function(){var me=Wm(te);X.call(me)}}var te=xN(e,to,null,!1,!1,"",GN);e._reactRootContainer=te,Mh(te.current,e);var fe=e.nodeType===si?e.parentNode:e;return ou(fe),Aa(function(){td(t,te,n,r)}),te}}function VA(e,t){e!==null&&typeof e!="function"&&b("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function Ym(e,t,n,r,u){WN(n),VA(u===void 0?null:u,"render");var x=n._reactRootContainer,T;if(!x)T=OA(n,t,e,u,r);else{if(T=x,typeof u=="function"){var I=u;u=function(){var F=Wm(T);I.call(F)}}td(t,T,e,u)}return Wm(T)}var qN=!1;function PA(e){{qN||(qN=!0,b("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=UA.current;if(t!==null&&t.stateNode!==null){var n=t.stateNode._warnedAboutRefsInRender;n||b("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Dt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Bi?e:xA(e,"findDOMNode")}function IA(e,t,n){if(b("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!nd(t))throw new Error("Target container is not a DOM element.");{var r=bu(t)&&t._reactRootContainer===void 0;r&&b("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return Ym(null,e,t,!0,n)}function BA(e,t,n){if(b("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!nd(t))throw new Error("Target container is not a DOM element.");{var r=bu(t)&&t._reactRootContainer===void 0;r&&b("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Ym(null,e,t,!1,n)}function FA(e,t,n,r){if(b("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!nd(n))throw new Error("Target container is not a DOM element.");if(e==null||!UC(e))throw new Error("parentComponent must be a valid React Component");return Ym(e,t,n,!1,r)}var YN=!1;function HA(e){if(YN||(YN=!0,b("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!nd(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=bu(e)&&e._reactRootContainer===void 0;t&&b("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var n=Pb(e),r=n&&!Qa(n);r&&b("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Aa(function(){Ym(null,null,e,!1,function(){e._reactRootContainer=null,zw(e)})}),!0}else{{var u=Pb(e),x=!!(u&&Qa(u)),T=e.nodeType===Bi&&nd(e.parentNode)&&!!e.parentNode._reactRootContainer;x&&b("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",T?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}Pj(NA),Bj(SA),Fj(EA),Hj(Ts),zj(Uj),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&b("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Qd($k),St(pb,ML,Aa);function zA(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!qm(t))throw new Error("Target container is not a DOM element.");return wA(e,t,null,n)}function $A(e,t,n,r){return FA(e,t,n,r)}var Ib={usingClientEntryPoint:!1,Events:[Qa,Bl,Uh,Mc,le,pb]};function WA(e,t){return Ib.usingClientEntryPoint||b('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),LA(e,t)}function GA(e,t,n){return Ib.usingClientEntryPoint||b('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),MA(e,t,n)}function qA(e){return tN()&&b("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Aa(e)}var YA=TA({findFiberByHostInstance:Ao,bundleType:1,version:Lb,rendererPackageName:"react-dom"});if(!YA&&pe&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var KN=window.location.protocol;/^(https?|file):$/.test(KN)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(KN==="file:"?`
|
|
204
|
+
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}ds.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ib,ds.createPortal=zA,ds.createRoot=WA,ds.findDOMNode=PA,ds.flushSync=qA,ds.hydrate=IA,ds.hydrateRoot=GA,ds.render=BA,ds.unmountComponentAtNode=HA,ds.unstable_batchedUpdates=pb,ds.unstable_renderSubtreeIntoContainer=$A,ds.version=Lb,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();HS.exports=ds;var ul=HS.exports,WS,ZN=ul;{var QN=ZN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;WS=function(i,s){QN.usingClientEntryPoint=!0;try{return ZN.createRoot(i,s)}finally{QN.usingClientEntryPoint=!1}}}const GS={"terminal.disconnected":"Connection lost. Reconnecting…","terminal.paneMissing":"This pane has closed. Switch to another pane.","common.save":"Save","common.cancel":"Cancel","common.confirm":"Confirm","common.ok":"OK","common.close":"Close","common.delete":"Delete","common.undo":"Undo","common.copy":"Copy","common.rename":"Rename","common.create":"Create","common.back":"Back","common.open":"Open","common.loading":"Loading…","common.done":"Done","token.title":"Access token required","token.placeholder":"Paste HANDMUX_TOKEN","settings.language":"Language","home.empty":"No files opened yet","home.emptyHint":'Switch to "New" to pick one',"home.remove":"Remove","drawer.empty":"No sessions bound yet","drawer.unbind":"Unbind","drawer.bind":"Bind session","drawer.logout":"Log out","windowbar.newWindow":"New window","rename.new_name":"New name","rename.name_rule":"Letters, digits, hyphens only (≤16)","rename.failed":"Rename failed, please retry","rename.saving":"Saving…","newwindow.title":"New window","newwindow.window_name":"Window name (optional)","newwindow.name_placeholder":"Leave blank to auto-name · letters/digits/hyphens ≤16","newwindow.name_rule":"Letters, digits, hyphens only (≤16)","newwindow.start_dir":"Start directory","newwindow.session_dir_named":"{dir} (session dir)","newwindow.session_dir_default":"Session dir (default)","newwindow.choose":"Choose","newwindow.reset_to_session_dir":"Reset to session dir","newwindow.creating":"Creating…","startup.label":"Startup command (optional)","startup.aria":"Startup command","startup.preset_shell":"Plain shell (default)","startup.preset_claude":"claude (launch Claude Code)","startup.preset_claude_continue":"claude -c (resume last session)","startup.preset_codex":"codex (launch Codex CLI)","startup.custom":"Custom…","startup.custom_placeholder":'e.g. claude "fix login bug"',"bind.title":"Bind session","bind.sessionName":"Session name","bind.pickSession":"Choose a session to bind","bind.newSession":"+ New session","bind.modeNew":"New","bind.modeExisting":"Existing","bind.alreadyExists":"Session already exists","bind.bind":"Bind","bind.checking":"Checking…","bind.createAndOpen":"Create & open","bind.creating":"Creating…","bind.createHint":`Session "{name}" doesn't exist — tap "Create & open" to create it`,"bind.alreadyBound":"Session already bound","bind.createFailed":"Create failed, please retry","bind.invalidName":"Only letters, digits, hyphens (≤16)","bind.desktopHint":"On the computer, one command takes any session here back over: handmux open <name>","bind.checkFailed":"Check failed, please retry","bind.startDir":"Start directory","bind.homeDirDefault":"Home directory (default)","bind.choose":"Choose","bind.reset":"Reset","actionsheet.confirmAgain":"Confirm? Tap again","dirpicker.title":"Choose directory","inbox.title":"Inbox","inbox.working":"Working","inbox.done":"Done","inbox.needs":"Needs you","inbox.clearDone":"Clear done","inbox.empty":"No pane status yet","inbox.enableTitle":"Turn on AI session notifications","inbox.enableHint":"Tag every Claude / Codex pane working / waiting on you / done, and get pinged when one needs you.","inbox.enableBtn":"Enable","inbox.enabling":"Enabling…","inbox.enableFailed":"Could not enable — check the server logs.","drawer.orphans.title":"{n} not taken over","drawer.orphans.hint":"Take over to control remotely","inbox.orphans.takeover":"Take over","inbox.orphans.noSession":"no resumable history","inbox.orphans.busy":"busy","inbox.orphans.idle":"idle","inbox.orphans.working":"Taking over…","inbox.orphans.failed":"Takeover failed","inbox.orphans.targetLabel":"Take over into","inbox.orphans.targetNew":"New session","inbox.orphans.nameLabel":"Session name","inbox.orphans.namePlaceholder":"session name","inbox.orphans.killTitle":"The original process","inbox.orphans.killEnd":"End it","inbox.orphans.killKeep":"Keep it","inbox.orphans.recommended":"Recommended","inbox.orphans.killWhy":"If the same session is written from both your computer and your phone, its history gets scrambled. Ending the original lets this device own it cleanly.","inbox.orphans.reopenPre":"Want to continue on the computer instead? Run in a terminal:","idea.title":"Ideas","idea.editPlaceholder":"Edit idea…","idea.addPlaceholder":"Jot an idea…","idea.add":"Add","idea.empty":"No ideas yet — jot one down","idea.dragSort":"Drag to reorder","idea.fillInput":"Fill into input","idea.send":"Send","doclink.title":"Open file","localurl.title":"Proxy & preview","localurl.open":"Enable proxy","localurl.disabled":"Dynamic preview is off — set a preview domain in Settings to proxy local ports.","localurl.notListening":"Nothing is listening on :{port}.","localurl.badProtocol":"This link is not a proxyable HTTP or HTTPS address.","localurl.network":"Could not reach the handmux service. Check your connection and try again.","localurl.failed":"Could not start the preview: {reason}. Check the configuration and try again.","changelog.title":"What's new","preview.dynamic":"Dynamic preview","preview.static":"Static preview","preview.tabs":"Open previews","preview.remainTitle":"Time left — tap to renew / stop","preview.toPcView":"Switch to desktop view","preview.toMobileView":"Switch to mobile view","preview.pcView":"Desktop view","preview.mobileView":"Mobile view","preview.refresh":"Refresh","preview.minimize":"Minimize","preview.ttlDialog":"Preview lifetime","preview.renew":"Renew (reset to 1 hour)","preview.stop":"Stop preview","preview.iframeTitle":"Preview","preview.zoomOut":"Zoom out","preview.zoomIn":"Zoom in","imageviewer.loadFailed":"Failed to load image","imageviewer.saved":"Saved — find it in your album/gallery or Downloads","imageviewer.shareUnsupported":"Image sharing requires Chrome or Safari","imageviewer.zoomOut":"Zoom out","imageviewer.zoomIn":"Zoom in","imageviewer.imageTitle":"Image","imageviewer.saveImage":"Save image","imageviewer.shareImage":"Share image","mic.stop":"Stop voice input","mic.start":"Voice input","dock.send":"Send","dock.send.hint":"Tap to send · hold to insert","dock.phrases":"Phrases","dock.attach":"Upload","dock.history":"History","dock.kbdShow":"Keyboard","dock.kbdHide":"Hide keyboard","history.empty":"No history yet","history.scope":"This window only","dock.input.placeholder":"Draft area","dock.input.enterDraft":"Press Shift + Enter to enter draft mode","dock.input.exitDraft":"Press Esc to return to terminal mode · Shift + Enter for a new line","dock.command.placeholder":"Type a command · Enter runs it","dock.mode.agent":"Chat","dock.mode.toggle":"Switch input mode","dock.mode.command":"Command","dock.mode.chat":"Chat","fav.title":"Favorites","fav.add":"Add","fav.addPlaceholder":"Add a favorite…","cmd.editTitle":"Saved commands","cmd.global":"GLOBAL","cmd.window":"THIS WINDOW","cmd.withEnter":"Send directly","cmd.configPresets":"Config presets","cmd.removeDevice":"Remove from this device","cmd.removedDevice":"Removed from this device","cmd.addPlaceholder":"Add a command…","cmd.tabCmd":"Command","cmd.tabKey":"Key","cmd.addTo":"Add to","cmd.addTitle":"Add","cmd.added":"Added","cmd.editItem":"Edit","cmd.sticky":"Modifier","cmd.stickyNone":"None","cmd.baseKey":"Key","cmd.pickKey":"Pick a key","cmd.moveUp":"Move up","cmd.moveDown":"Move down","cmd.empty":"None yet","chat.editTitle":"Saved messages","chat.composer.placeholder":"Message Claude…","chat.stop":"Stop","chat.interrupted":"You stopped the response","chat.compacted":"Context compacted","chat.slash.handedOff":"Switched to terminal — run {cmd} there","chat.favs":"Saved","chat.tabMsg":"Message","chat.addPlaceholder":"Message / slash-command…","dock.upload.aria":"Upload file","dock.upload.title":"Upload file (saved to home upload area, not the project)","dock.upload.progress":"Uploading {name}{tag}","dock.upload.failed":"Upload failed: {names}","dock.upload.rejected":"Unsupported file type: {names}","app.nameExists":"That name already exists","app.renameFailed":"Rename failed, please retry","app.deleteFailed":"Delete failed, please retry","app.moveFailed":"Move failed, please retry","app.sessionGone":'Session "{name}" not found, it may have closed',"app.docNotFound":"File not found","app.docTooLarge":"File too large (over 2MB)","app.docUnsupported":"Unsupported file or path","app.docOpenFailed":"Open failed, please retry","app.preview":"Preview","app.openPreview":"Open preview","app.ideas":"Ideas","app.files":"Files","app.settings":"Settings","usage.title":"Usage","usage.win5h":"5-hour","usage.winWeekly":"Weekly","usage.winMonthly":"Monthly","usage.winGeneric":"{h}h window","usage.winPrimary":"Limit","usage.winSecondary":"Secondary","usage.resetIn":"resets in {t}","usage.resetSoon":"resetting…","usage.claudeOff":"Not wired yet — Claude's 5h/weekly usage needs the handmux statusLine:","usage.claudePending":"No data yet — send a message in a Claude session, then reopen.","usage.codexOff":"Codex not detected on this machine.","usage.codexNoQuota":"Codex has not returned quota data yet.","usage.loadFailed":"Failed to load usage.","usage.updatedNow":"updated just now","usage.updatedMin":"updated {n}m ago","usage.updatedHr":"updated {n}h ago","usage.updatedDay":"updated {n}d ago","usage.activityNote":"Shared across devices","usage.timeMark":"Time elapsed in this window","app.renameSession":"Rename session","app.renameWindow":"Rename window","app.manageWindow":"Window Management","app.moveLeft":"◀ Move left","app.moveRight":"Move right ▶","app.deleteWindow":"Delete window","pane.splitH":"Split left/right","pane.splitV":"Split top/bottom","pane.manage":"Manage split","pane.manageTitle":"Split Management","pane.close":"Close pane","pane.closeConfirm":"Close? Tap again","pane.splitFailed":"Split failed","pane.closeFailed":"Close failed","app.deleteLastWindowConfirm":"This is the last window; deleting it closes the whole session! Tap again","app.deleteConfirm":"Delete? Tap again","app.cannotLocate":"Cannot locate","app.pickItsDir":", pick the directory it lives in:","app.noBoundSession":"No bound session yet","app.tapToBind":"Tap here to bind one","app.selectSessionHint":"Tap ☰ at the top-left to pick a session","app.backToExit":"Press Back again to exit","settings.title":"Settings","settings.group_global":"Global settings","settings.font_size":"Font size","settings.font_decrease":"Decrease font size","settings.font_increase":"Increase font size","settings.font_auto":"Auto","settings.font_auto_title":"Auto-fit to height","settings.keyboard_mode":"Keyboard mode","settings.keyboard_mode_auto":"Auto detect","settings.keyboard_mode_mobile":"Mobile","settings.keyboard_mode_desktop":"Desktop","settings.keyboard_mode_hint":"Applies only to this browser; override it if detection is wrong.","settings.chat_lens":"Enable chat view (experimental)","settings.chat_lens_hint":"Experimental — may be unstable. View and drive Claude sessions as a chat; enables the view switch in the window bar and the chat colour tones below.","settings.chat_lens_need_hooks":"Requires Claude hooks first — question cards and status cues in the chat view depend on them.","settings.chat_lens_no_claude":"Claude Code not found — install and run it first.","settings.chat_lens_install_hooks":"Install hooks","settings.chat_lens_installing":"Installing…","settings.chat_lens_hooks_err":"Install failed — run handmux hooks install on your computer","boot.loading":"Loading","boot.chat_empty":"Send your first message to start the conversation","settings.chat_tone":"Chat colour","settings.chat_tone_dusk":"Warm Dusk","settings.chat_tone_ink":"Warm Gold","settings.chat_tone_light":"Warm Cream","settings.chat_tone_hint":"The colour tone of the 对话 (chat) view — all warm.","settings.path_highlight":"Highlight file paths","settings.path_highlight_hint":"Tint tappable file paths in the terminal. Paths stay tappable either way.","settings.whats_new":"What's new","settings.view_changelog":"View changelog","settings.has_update":"Has update","settings.version":"Version","settings.feedback":"Feedback","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat group","settings.feedback_hint":"Bugs and ideas welcome — issues are tracked and answered.","settings.update_available":"Version {v} available","settings.update_more":"{n} more version updates","settings.update_how":"On your computer, run","settings.push_notifications":"Push notifications","settings.notify_on":"Enabled ✓","settings.notify_enable":"Enable device notifications","settings.notify_enabled":"Enabled, you should receive a welcome notification","settings.notify_disabled":"Disabled","settings.notify_failed":"Operation failed","settings.processing":"Processing","settings.push_hint":'Listens for "Needs you" and "Done": when a watched session needs your authorization/answer, or a turn just finished, a push is sent to this device.',"settings.push_unsupported":"Push requires Chrome or Safari","settings.group_session":"Current session settings","settings.screen_cols":"Screen columns","settings.cols_dec":"Fewer","settings.cols_dec_title":"Fewer columns","settings.cols_inc":"More","settings.cols_inc_title":"More columns","settings.cols_restore":"Default","settings.cols_restore_title":"Restore default window size","settings.preview_site":"Preview site","settings.preview_static_site":"Preview static site","settings.preview_running_dynamic":"Dynamic preview running","settings.preview_running_static":"Static preview running","settings.preview_remain_title":"Time remaining","settings.preview_remain":"{time} left","settings.preview_renew":"Renew","settings.preview_confirm_stop":"Confirm stop","settings.preview_stop":"Stop","settings.preview_name":"Name: {name}","settings.preview_port":"(port :{port})","settings.preview_type":"Preview type","settings.preview_off":"Off","settings.preview_static":"Static","settings.preview_dynamic":"Dynamic","settings.preview_off_hint":'Preview is off. Choose "Static" to start.',"settings.preview_off_hint_both":'Preview is off. Choose "Static" or "Dynamic" to start.',"settings.preview_dynamic_disabled":"Dynamic port preview is off. To turn it on, point a wildcard preview domain (previewDomain, e.g. *.example.com) at the gateway with a matching TLS cert. See the README for the Cloudflare vs self-hosted specifics.","settings.preview_pick_dir":"Pick directory & start","settings.preview_static_hint":"Pick a directory containing index.html to preview on your phone.","settings.preview_port_placeholder":"Port, e.g. 3000","settings.preview_port_label":"Port","settings.preview_starting":"Starting…","settings.preview_start":"Start","settings.preview_dynamic_hint":"Enter a port running on this machine (dev server / backend); your phone accesses it directly via a subdomain.","settings.dir_picker_hint":"Pick the static site directory to preview (containing index.html)","settings.err_port_not_listening":"That port is not listening; make sure the service is running","settings.err_bad_port":"Invalid port (1–65535)","settings.err_dynamic_disabled":"Dynamic preview is not enabled","settings.err_start_failed":"Failed to start","filebrowser.openDirFailed":"Cannot open this directory","filebrowser.copiedPath":"Path copied: {abs}","filebrowser.mkdirFailed":"Failed to create folder (invalid name or already exists)","filebrowser.downloading":"Downloading {name}","filebrowser.downloadFailed":"Download failed","filebrowser.uploading":"Uploading {name}{tag}","filebrowser.uploadFailed":"Upload failed","filebrowser.uploadPartialFailed":"These files failed to upload: {names}","filebrowser.uploadRejected":"Unsupported file type: {names}","filebrowser.sessionDir":"Session directory","filebrowser.jumpToSessionDir":"Jump to current session directory","filebrowser.parentDir":"Parent directory","filebrowser.rootSelect":"Switch root (home / temp dirs)","filebrowser.pathPlaceholder":"Enter path (live filter / jump)","filebrowser.newFolder":"New folder","filebrowser.createBtn":"Create","filebrowser.uploadFile":"Upload file","filebrowser.uploadToCurrentDir":"Upload to current directory","filebrowser.enterSubdirToUpload":"Enter a subdirectory to upload","filebrowser.folderNamePlaceholder":"Folder name","filebrowser.uploadPendingTo":"Upload “{name}” to the current directory","filebrowser.enterSubdirFirst":"(enter a subdirectory first)","filebrowser.upload":"Upload","filebrowser.savedToDownloads":"Saved “{name}” to the Downloads folder; view it in the system file manager","filebrowser.noMatches":"No matching files or directories","filebrowser.tooMany":"Showing the first {shown} of {total} — type in the path box to filter","filebrowser.previewUnsupported":"Preview not supported for this file type; tap the button on the right to download","filebrowser.copyAbsPath":"Copy absolute path","filebrowser.download":"Download","filebrowser.pickThisDir":"Select this directory {path}","filebrowser.downloadConfirm":"Download {name}?","filemanager.files":"Files","filemanager.closeTab":"Close tab","filemanager.minimize":"Minimize","filemanager.recent":"Recent","filemanager.directory":"Directory","git.errReadRepo":"Cannot read repository","git.errLoad":"Load failed","git.noRepoInDir":"No git repository here yet — pick another directory, or run git init in this one.","git.outsideRoots":"This folder is outside the area handmux can open — only your home directory and /tmp are reachable. Move the repo under your home directory to browse it here.","git.errReadDir":"Cannot read this directory","git.commitDetail":"Commit details","git.diff":"Diff","git.bindRepo":"Bind repository","git.collapse":"Collapse","git.currentBranch":"Current branch","git.switchViewedBranch":"Switch viewed branch","git.switchBranch":"Switch branch","git.noBranches":"No branches","git.noRepoBound":'No repository bound — tap "+" at the top left to choose a directory.',"git.changes":"Changes","git.commits":"Commits","git.pullToLoadMore":"Pull to load more","git.pickerHint":"Choose a directory to auto-discover git repositories inside it","git.cleanTree":"Working tree clean","git.noCommits":"No commits","git.noDiff":"No diff","git.fontSmaller":"Decrease font size","git.fontLarger":"Increase font size","git.diffTruncated":"Diff too large, truncated","cmd.panel":"Command panel","cmd.title":"Commands","cmd.empty":"No commands yet — send one or save a favorite","cmd.favorites":"Favorites","cmd.scopeGlobal":"Global · all sessions","cmd.recent":"Recent","cmd.scopeSession":"This session only","cmd.favorite":"Favorite","cmd.itemConflict":"That shortcut already exists. Change its content or choose another list.","cmd.unfavorite":"Unfavorite","doc.home":"Recent","doc.read":"Read aloud","doc.pauseRead":"Pause reading","doc.resumeRead":"Resume reading","doc.stopRead":"Stop reading","doc.rate":"Speed","doc.fontSmaller":"Smaller font","doc.fontLarger":"Larger font","inbox.view.working":"Running","inbox.view.done":"Completed","inbox.view.needs":"Needs you","push.unsupported":"Push notifications require Chrome or Safari","push.iosAddToHome":'On iOS, first "Add to Home Screen", then open from the home-screen icon to enable',"a2hs.title":"Add handmux to your Home Screen","a2hs.lead":"Open it like an app — full-screen, no address bar. On iPhone it’s also how push reaches you the moment a pane needs you.","a2hs.install":"Install handmux","a2hs.ios1":"Tap the Share button (the ⬆︎ box) in Safari.","a2hs.ios2":"Tap “More”, or scroll down the list.","a2hs.ios3":"Choose “Add to Home Screen”, then “Add”.","a2hs.iosHint":"In Safari: Share → More → Add to Home Screen.","a2hs.iosOpenSafari":"You’re not in Safari. Open this page in Safari, then add it to your Home Screen — other iOS browsers can’t install it.","a2hs.androidManual":"Open your browser menu (⋮) and choose “Add to Home screen” or “Install app”.","a2hs.later":"Maybe later","push.permissionTimeout":"The system did not return the notification permission result. Check notification access for handmux or your browser in system settings, then try again.","push.permissionDenied":"Notification permission denied","push.swRegisterTimeout":"Registering the notification service timed out. Check your connection and try again.","push.swRegisterFailed":"Could not register the notification service: {reason}. Clear this site’s data, reopen it, and try again.","push.swTimeout":"The notification service was registered but did not activate. Clear this site’s data, reopen it, and try again.","push.unknownReason":"unknown reason","push.configTimeout":"Push configuration timed out. Check the connection to your handmux server and try again.","push.browserTimeout":"The browser push service did not respond. On Android Chrome, make sure Google Play services are available, then try again.","push.noVapid":"Push is not configured on the server (VAPID)","push.reportTimeout":"The subscription was created, but reporting it to the server timed out. Check the connection and try again.","push.subscriptionExpired":"Chrome returned an expired push subscription. It has been reset; tap Enable notifications again.","push.deliveryRejected":"The push service rejected the new subscription. Check the server log and try again.","push.subscribeFailed":"Failed to report subscription","push.sendFailed":"Send failed","api.loadFailed":"Load failed","api.uploadFailed":"Upload failed","upload.title":"Uploading","upload.processing":"Sent — receiving on the server…","api.uploadBadDir":"Cannot upload to this directory","api.uploadDuplicate":"A file with this name already exists","api.uploadTooLarge":"File too large (50MB limit)","api.uploadBadType":"Unsupported file type","time.secAgo":"{n}s ago","time.minAgo":"{n}m ago","time.hourAgo":"{n}h ago","time.dayAgo":"{n}d ago","time.expired":"Expired","time.minutes":"{n} min","settings.script_push":"Script push","settings.script_push_open":"How it works","settings.script_push_hint":"Let a script on your computer push a notification to your phone.","scriptPush.title":"Script push","scriptPush.intro":"Let scripts on your computer reuse handmux’s push channel: on the machine running handmux, one `handmux push` command sends a notification to your phone — handy when a build, CI run, or long task finishes, with no separate push service to wire up.","scriptPush.copied":"Copied","scriptPush.session_placeholder":"<session>","scriptPush.device_placeholder":"<device-key>","scriptPush.scope_all":"All subscribed devices (default)","scriptPush.scope_session":"Only devices in one session","scriptPush.scope_device":"Only this device","scriptPush.device_key_note":"The key above is this device’s — copy and run as-is.","scriptPush.device_need_enable":"Turn on push notifications above first to generate this device’s key.","scriptPush.opts_label":"Optional (append to any of the above)","scriptPush.opt_tag":"--tag <tag> — the same tag replaces the previous push instead of stacking.","scriptPush.opt_url":"--url <path> — opens this path when the notification is tapped.","scriptPush.reliability":"Heads-up: Web Push goes through the phone OS (FCM/APNs) and is best-effort — battery-saver, offline, or vendor policy can delay or drop it. It is not a guaranteed real-time channel. For delivery-critical alerts use a dedicated IM (WeChat / Telegram bot, etc.).","pushInbox.title":"Notifications","pushInbox.empty":"No notifications yet","pushInbox.delete":"Delete","pushInbox.justNow":"just now","pushInbox.minutesAgo":"{n} min ago","pushInbox.hoursAgo":"{n} h ago","pushInbox.detailTitle":"Notification","pushInbox.openUrl":"Open link","pushInbox.expired":"This message has expired","pushInbox.back":"Back","pushInbox.markAllRead":"Mark all read","pushInbox.unreadCount":"{n} unread","pushInbox.loadFailed":"Could not load notifications. Check the connection and retry.","pushInbox.deleteFailed":"Could not delete the notification. It was kept; please retry.","pushInbox.retry":"Retry","pushInbox.deliveryPending":"Sending","pushInbox.deliverySuccess":"Success","pushInbox.deliveryFailed":"Failed","pushInbox.deliveryReasonExpired":"subscription expired","pushInbox.deliveryReasonRateLimited":"push service rate limit","pushInbox.deliveryReasonUnavailable":"push service unavailable","pushInbox.deliveryReasonRejected":"push service rejected it","pushInbox.deliveryReasonNetwork":"network error","pushInbox.deliveryReasonNotConfigured":"push is not configured","pushInbox.deliveryReasonUnknown":"unknown reason","workspace.bootDetected":"Computer restart detected","workspace.tmuxDetected":"tmux restart detected","workspace.summary":"Last workspace · {sessions} sessions · saved {time}","workspace.restoreLast":"Restore last workspace","workspace.partialCard":"{failures} sessions still need attention","workspace.unknownTime":"unknown time","workspace.savedAt":"Saved {time}","workspace.topologySummary":"{sessions} sessions · {windows} windows · {panes} panes","workspace.planSummary":"Restore {restore} sessions; {already} already present","workspace.renameRule":"A -restored suffix is added only when a session with the same name already exists.","workspace.nonDestructive":"Current sessions will not be modified, renamed, or stopped.","workspace.progress":"Restoring {completed} / {total}…","workspace.progressDone":"Restored {completed} / {total}","workspace.complete":"Workspace restored.","workspace.completedSummary":"Restored: {sessions} sessions · {windows} windows · {panes} panes","workspace.rebindHint":"Restored sessions stay hidden until you choose which ones to bind to this phone.","workspace.rebind":"Bind restored sessions","workspace.sessionFailure":"{session}: {reason}","workspace.unknownSession":"Unknown session","workspace.restore":"Restore","workspace.ignore":"Ignore this backup","workspace.protectionTitle":"Workspace is not protected","workspace.protection.live-corrupt":"Workspace state copies are damaged. Check disk health and ~/.handmux permissions, then restart handmux.","workspace.protection.live-unavailable":"Workspace state cannot be read or written. Check free disk space and ~/.handmux permissions, then restart handmux.","workspace.protection.unknown":"Background snapshots are unavailable. Check the handmux log on your computer.","workspace.error.restore-interrupted":"restore was interrupted; retry this backup","workspace.error.checkpoint-not-found":"this backup is no longer available; refresh and choose another backup","workspace.error.storage-full":"workspace storage is full; free disk space and retry","workspace.error.permission-denied":"workspace storage is not writable; check permissions and retry","workspace.error.plan-failed":"the restore plan changed; refresh and retry","workspace.error.agent-unavailable":"the agent could not resume; open the restored shell and retry manually","workspace.error.tmux-unavailable":"tmux is unavailable; make sure tmux is running and retry","workspace.error.restore-failed":"the session was not restored; check the handmux log and retry","workspace.error.operation-not-found":"this restore operation is no longer available; retry the backup","workspace.sessionWarning":"{session}: {reason}","workspace.warning.cwd-fallback":"the working directory was unavailable; restored in the home directory","workspace.warning.layout-fallback":"the pane layout could not be fully restored; the default layout was kept","workspace.warning.agent-warning":"the agent did not resume automatically; the restored shell is still available","workspace.warning.live-reconcile-failed":"live workspace reconciliation failed; check the handmux log","workspace.warning.workspace-unavailable":"workspace storage is temporarily unavailable; check disk space and permissions","workspace.warning.restore-warning":"the restore completed with a warning that may need attention"},nM={"terminal.disconnected":"连接断开,重连中…","terminal.paneMissing":"窗格已关闭,请切换到其他窗格。","common.save":"保存","common.cancel":"取消","common.confirm":"确认","common.ok":"确定","common.close":"关闭","common.delete":"删除","common.undo":"撤销","common.copy":"复制","common.rename":"重命名","common.create":"新建","common.back":"返回","common.open":"打开","common.loading":"加载中…","common.done":"完成","token.title":"需要访问 token","token.placeholder":"粘贴 HANDMUX_TOKEN","settings.language":"语言 Language","home.empty":"还没有打开过文件","home.emptyHint":"切到「新增」去挑一个","home.remove":"移除","drawer.empty":"还没有绑定会话","drawer.unbind":"解绑","drawer.bind":"绑定会话","drawer.logout":"退出登录","windowbar.newWindow":"新建窗口","rename.new_name":"新名称","rename.name_rule":"只能用字母、数字、横线(≤16)","rename.failed":"重命名失败,请重试","rename.saving":"保存中…","newwindow.title":"新建窗口","newwindow.window_name":"窗口名称(可选)","newwindow.name_placeholder":"留空自动命名 · 字母/数字/横线 ≤16","newwindow.name_rule":"只能用字母、数字、横线(≤16)","newwindow.start_dir":"起始目录","newwindow.session_dir_named":"{dir}(会话目录)","newwindow.session_dir_default":"会话目录(默认)","newwindow.choose":"选择","newwindow.reset_to_session_dir":"重置为会话目录","newwindow.creating":"新建中…","startup.label":"启动命令(可选)","startup.aria":"启动命令","startup.preset_shell":"空 shell(默认)","startup.preset_claude":"claude(启动 Claude Code)","startup.preset_claude_continue":"claude -c(接着上次会话)","startup.preset_codex":"codex(启动 Codex CLI)","startup.custom":"自定义…","startup.custom_placeholder":'例如 claude "修复登录bug"',"bind.title":"绑定会话","bind.sessionName":"会话名称","bind.pickSession":"选择要绑定的会话","bind.newSession":"+ 新建会话","bind.modeNew":"新建会话","bind.modeExisting":"已有会话","bind.alreadyExists":"该会话已存在","bind.bind":"绑定","bind.checking":"校验中…","bind.createAndOpen":"新建并打开","bind.creating":"新建中…","bind.createHint":"会话「{name}」不存在,点「新建并打开」创建","bind.alreadyBound":"已绑定该会话","bind.createFailed":"新建失败,请重试","bind.invalidName":"只能用字母、数字、横线(≤16)","bind.desktopHint":"这里的会话(包括手机新建的),电脑上一条命令即可接管:handmux open <会话名>","bind.checkFailed":"校验失败,请重试","bind.startDir":"起始目录","bind.homeDirDefault":"主目录(默认)","bind.choose":"选择","bind.reset":"重置","actionsheet.confirmAgain":"确认?再点一次","dirpicker.title":"选择目录","inbox.title":"收件箱","inbox.working":"进行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"暂无面板状态","inbox.enableTitle":"开启 AI 会话通知","inbox.enableHint":"把每个 Claude / Codex 面板标记为进行中 / 需要你 / 已完成,需要你时还会推送提醒。","inbox.enableBtn":"开启","inbox.enabling":"开启中…","inbox.enableFailed":"开启失败 —— 看看服务端日志。","drawer.orphans.title":"{n} 个未接管会话","drawer.orphans.hint":"接管即可远程操控","inbox.orphans.takeover":"接管","inbox.orphans.noSession":"无可续接的历史","inbox.orphans.busy":"运行中","inbox.orphans.idle":"空闲","inbox.orphans.working":"接管中…","inbox.orphans.failed":"接管失败","inbox.orphans.targetLabel":"接管到","inbox.orphans.targetNew":"新建会话","inbox.orphans.nameLabel":"会话名称","inbox.orphans.namePlaceholder":"会话名","inbox.orphans.killTitle":"接管后原来的进程","inbox.orphans.killEnd":"结束","inbox.orphans.killKeep":"保留","inbox.orphans.recommended":"推荐","inbox.orphans.killWhy":"同一个会话如果电脑和手机同时在写,历史记录会错乱。结束原进程后由手机这边独占,更稳妥。","inbox.orphans.reopenPre":"想回电脑上继续?在电脑终端运行:","idea.title":"想法","idea.editPlaceholder":"编辑想法…","idea.addPlaceholder":"记一条想法…","idea.add":"添加","idea.empty":"还没有想法,记一条吧","idea.dragSort":"拖动排序","idea.fillInput":"填入输入框","idea.send":"发送","doclink.title":"打开文件","localurl.title":"开启代理并预览","localurl.open":"开启代理","localurl.disabled":"动态预览未开启——在设置里配置预览域名后可代理本机端口。","localurl.notListening":"端口 :{port} 没有服务在监听。","localurl.badProtocol":"该链接不是可代理的 HTTP 或 HTTPS 地址。","localurl.network":"连接 handmux 服务失败,请检查网络后重试。","localurl.failed":"无法开启预览:{reason}。请检查配置后重试。","changelog.title":"新功能","preview.dynamic":"动态预览","preview.static":"静态预览","preview.tabs":"打开的预览","preview.remainTitle":"剩余有效期 — 点击续期 / 停止","preview.toPcView":"切换到电脑视图","preview.toMobileView":"切换到手机视图","preview.pcView":"电脑视图","preview.mobileView":"手机视图","preview.refresh":"刷新","preview.minimize":"收起","preview.ttlDialog":"预览有效期","preview.renew":"续期(重置为 1 小时)","preview.stop":"停止预览","preview.iframeTitle":"预览","preview.zoomOut":"缩小","preview.zoomIn":"放大","imageviewer.loadFailed":"图片加载失败","imageviewer.saved":"已保存,可在相册/图库或「下载」中查看","imageviewer.shareUnsupported":"图片分享需要 Chrome 或 Safari 浏览器","imageviewer.zoomOut":"缩小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"图片","imageviewer.saveImage":"保存图片","imageviewer.shareImage":"分享图片","mic.stop":"停止语音输入","mic.start":"语音输入","dock.send":"发送","dock.send.hint":"点发送 · 长按填入","dock.phrases":"常用语","dock.attach":"上传","dock.history":"历史","dock.kbdShow":"展开键盘","dock.kbdHide":"收起键盘","history.empty":"还没有发送记录","history.scope":"仅当前窗口的记录","dock.input.placeholder":"草稿区","dock.input.enterDraft":"按 Shift + Enter 进入草稿模式","dock.input.exitDraft":"按 Esc 回到终端模式 · Shift + Enter 换行","dock.command.placeholder":"输入命令 · 回车执行","dock.mode.agent":"对话","dock.mode.toggle":"切换输入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"添加","fav.addPlaceholder":"加一条常用…","cmd.editTitle":"常用命令","cmd.global":"全局","cmd.window":"当前窗口","cmd.withEnter":"直接发送","cmd.configPresets":"配置预置","cmd.removeDevice":"从本机移除","cmd.removedDevice":"已从本机移除","cmd.addPlaceholder":"加一条命令…","cmd.tabCmd":"命令","cmd.tabKey":"按键","cmd.addTo":"添加到","cmd.addTitle":"添加","cmd.added":"已添加","cmd.editItem":"编辑","cmd.sticky":"粘滞键","cmd.stickyNone":"无","cmd.baseKey":"基键","cmd.pickKey":"选择按键","cmd.moveUp":"上移","cmd.moveDown":"下移","cmd.empty":"还没有","chat.editTitle":"常用消息","chat.composer.placeholder":"和 Claude 对话…","chat.stop":"停止","chat.interrupted":"你终止了这次回复","chat.compacted":"上下文已压缩","chat.slash.handedOff":"已切到终端视图 · 在这里操作 {cmd}","chat.favs":"常用","chat.tabMsg":"消息","chat.addPlaceholder":"消息 / 斜杠命令…","dock.upload.aria":"上传文件","dock.upload.title":"上传文件(存到家目录上传区,不进项目)","dock.upload.progress":"上传 {name}{tag}","dock.upload.failed":"上传失败:{names}","dock.upload.rejected":"不支持的文件类型:{names}","app.nameExists":"该名已存在","app.renameFailed":"重命名失败,请重试","app.deleteFailed":"删除失败,请重试","app.moveFailed":"移动失败,请重试","app.sessionGone":"会话「{name}」不存在,可能已关闭","app.docNotFound":"文件不存在","app.docTooLarge":"文件过大(超过 2MB)","app.docUnsupported":"不支持的文件或路径","app.docOpenFailed":"打开失败,请重试","app.preview":"预览","app.openPreview":"打开预览","app.ideas":"想法","app.files":"文件","app.settings":"设置","usage.title":"用量","usage.win5h":"5 小时","usage.winWeekly":"本周","usage.winMonthly":"本月","usage.winGeneric":"{h} 小时窗口","usage.winPrimary":"额度","usage.winSecondary":"次级额度","usage.resetIn":"{t}后重置","usage.resetSoon":"即将重置…","usage.claudeOff":"尚未接入 —— Claude 的 5h/周额度需要 handmux statusLine:","usage.claudePending":"暂无数据 —— 在 Claude 会话里发一条消息,再重新打开。","usage.codexOff":"本机未检测到 Codex。","usage.codexNoQuota":"Codex 暂未返回额度数据。","usage.loadFailed":"加载用量失败。","usage.updatedNow":"刚刚更新","usage.updatedMin":"{n} 分钟前更新","usage.updatedHr":"{n} 小时前更新","usage.updatedDay":"{n} 天前更新","usage.activityNote":"所有设备共享","usage.timeMark":"本窗口已过去的时间","app.renameSession":"重命名会话","app.renameWindow":"重命名窗口","app.manageWindow":"窗口管理","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"删除窗口","pane.splitH":"左右分屏","pane.splitV":"上下分屏","pane.manage":"管理分屏","pane.manageTitle":"分屏管理","pane.close":"关闭此格","pane.closeConfirm":"确认关闭?再点一次","pane.splitFailed":"分屏失败","pane.closeFailed":"关闭失败","app.deleteLastWindowConfirm":"这是最后一个窗口,删除将关闭整个会话!再点一次","app.deleteConfirm":"确认删除?再点一次","app.cannotLocate":"无法定位","app.pickItsDir":",请选它所在的目录:","app.noBoundSession":"还没有绑定会话","app.tapToBind":"点此绑定一个","app.selectSessionHint":"点击左上角 ☰ 选择会话","app.backToExit":"再按一次返回键退出","settings.title":"设置","settings.group_global":"全局设置","settings.font_size":"字体大小","settings.font_decrease":"减小字体","settings.font_increase":"增大字体","settings.font_auto":"自适应","settings.font_auto_title":"按高度自动适配","settings.keyboard_mode":"键盘模式","settings.keyboard_mode_auto":"自动识别","settings.keyboard_mode_mobile":"手机","settings.keyboard_mode_desktop":"电脑","settings.keyboard_mode_hint":"仅应用于当前浏览器;识别不准时可手动指定。","settings.chat_lens":"启用对话视图(实验性功能)","settings.chat_lens_hint":"实验性功能,可能不稳定。以对话形式查看和操作 Claude 会话;开启后,窗口栏出现视图切换,并可选择对话配色。","boot.loading":"正在加载","boot.chat_empty":"发送你的第一条消息,对话就开始啦","settings.chat_lens_need_hooks":"需先安装 Claude hooks:对话里的问题卡、状态提示都依赖它。","settings.chat_lens_no_claude":"未检测到 Claude Code;安装并运行后再开启。","settings.chat_lens_install_hooks":"一键安装 hooks","settings.chat_lens_installing":"安装中…","settings.chat_lens_hooks_err":"安装失败,请到电脑上运行 handmux hooks install","settings.chat_tone":"对话配色","settings.chat_tone_dusk":"暖夜","settings.chat_tone_ink":"暖金","settings.chat_tone_light":"暖黄","settings.chat_tone_hint":"对话视图的色调,均为暖色系。暖夜=暖棕暗、暖金=品牌橄榄金、暖黄=奶油亮。","settings.path_highlight":"高亮文件路径","settings.path_highlight_hint":"给终端里可点开的文件路径加底色。无论开关与否,路径都可点开。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日志","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"反馈与交流","settings.feedback_issues":"GitHub 反馈","settings.feedback_group":"微信用户群","settings.feedback_hint":"bug、想法都欢迎——Issue 会被跟踪处理;微信群反馈直达。","settings.update_available":"有新版本 v{v} 可用","settings.update_more":"另有 {n} 个版本更新","settings.update_how":"在电脑上运行","settings.push_notifications":"推送通知","settings.notify_on":"已开启 ✓","settings.notify_enable":"开启设备通知","settings.notify_enabled":"已开启,应会收到一条欢迎通知","settings.notify_disabled":"已关闭","settings.notify_failed":"操作失败","settings.processing":"处理中","settings.push_hint":"监听「需要你」和「已完成」:所关注会话需要你授权/回答,或一个回合刚做完时,推送到此设备。","settings.push_unsupported":"推送需要 Chrome 或 Safari 浏览器","settings.group_session":"当前会话设置","settings.screen_cols":"屏幕列数","settings.cols_dec":"减少","settings.cols_dec_title":"减少列数","settings.cols_inc":"增加","settings.cols_inc_title":"增加列数","settings.cols_restore":"默认","settings.cols_restore_title":"恢复窗口默认尺寸","settings.preview_site":"预览站点","settings.preview_static_site":"预览静态站点","settings.preview_running_dynamic":"动态预览 运行中","settings.preview_running_static":"静态预览 运行中","settings.preview_remain_title":"剩余有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"续期","settings.preview_confirm_stop":"确认停止","settings.preview_stop":"停止","settings.preview_name":"名称:{name}","settings.preview_port":"(端口 :{port})","settings.preview_type":"预览类型","settings.preview_off":"不开启","settings.preview_static":"静态","settings.preview_dynamic":"动态","settings.preview_off_hint":"未开启预览。选择「静态」开始。","settings.preview_off_hint_both":"未开启预览。选择「静态」或「动态」开始。","settings.preview_dynamic_disabled":"动态端口预览未启用。要开启:把一个通配预览域名(previewDomain,如 *.example.com)指向网关,并配上对应的 TLS 证书。Cloudflare / 自建的证书差异见 README。","settings.preview_pick_dir":"选择目录启动","settings.preview_static_hint":"选一个含 index.html 的目录,在手机上预览。","settings.preview_port_placeholder":"端口,如 3000","settings.preview_port_label":"端口","settings.preview_starting":"启动中…","settings.preview_start":"启动","settings.preview_dynamic_hint":"填本机正在运行的端口(dev server / 后端),手机经子域名直接访问。","settings.dir_picker_hint":"选择要预览的静态站点目录(含 index.html)","settings.err_port_not_listening":"该端口未在监听,请确认服务已启动","settings.err_bad_port":"端口不合法(1–65535)","settings.err_dynamic_disabled":"动态预览未开启","settings.err_start_failed":"启动失败","filebrowser.openDirFailed":"无法打开该目录","filebrowser.copiedPath":"已复制路径:{abs}","filebrowser.mkdirFailed":"新建目录失败(名称非法或已存在)","filebrowser.downloading":"下载 {name}","filebrowser.downloadFailed":"下载失败","filebrowser.uploading":"上传 {name}{tag}","filebrowser.uploadFailed":"上传失败","filebrowser.uploadPartialFailed":"以下文件上传失败:{names}","filebrowser.uploadRejected":"不支持的文件类型:{names}","filebrowser.sessionDir":"会话目录","filebrowser.jumpToSessionDir":"跳到当前会话目录","filebrowser.parentDir":"上级目录","filebrowser.rootSelect":"切换根目录(家目录 / 临时目录)","filebrowser.pathPlaceholder":"输入路径(实时筛选/跳转)","filebrowser.newFolder":"新建文件夹","filebrowser.createBtn":"创建","filebrowser.uploadFile":"上传文件","filebrowser.uploadToCurrentDir":"上传到当前目录","filebrowser.enterSubdirToUpload":"请进入一个子目录上传","filebrowser.folderNamePlaceholder":"文件夹名称","filebrowser.uploadPendingTo":"把「{name}」上传到当前目录","filebrowser.enterSubdirFirst":"(请先进入一个子目录)","filebrowser.upload":"上传","filebrowser.savedToDownloads":"已保存「{name}」到「下载」文件夹,可在系统文件管理器查看","filebrowser.noMatches":"没有匹配的文件或目录","filebrowser.tooMany":"共 {total} 项,只显示前 {shown} 项——在路径框输入关键词可筛选","filebrowser.previewUnsupported":"暂不支持该类型文件的预览,点右侧按钮可下载","filebrowser.copyAbsPath":"复制绝对路径","filebrowser.download":"下载","filebrowser.pickThisDir":"选定此目录 {path}","filebrowser.downloadConfirm":"下载 {name}?","filemanager.files":"文件","filemanager.closeTab":"关闭标签","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目录","git.errReadRepo":"无法读取仓库","git.errLoad":"加载失败","git.noRepoInDir":"这个目录还不是 git 仓库 —— 换一个目录,或在这里 git init 一下。","git.outsideRoots":"这个目录在 handmux 可访问范围之外 —— 只开放主目录和 /tmp。把仓库放到主目录下,就能在这里查看了。","git.errReadDir":"无法读取该目录","git.commitDetail":"提交详情","git.diff":"差异","git.bindRepo":"绑定仓库","git.collapse":"收起","git.currentBranch":"当前分支","git.switchViewedBranch":"切换查看的分支","git.switchBranch":"切换分支","git.noBranches":"暂无分支","git.noRepoBound":"未绑定仓库,点左上角「+」选择一个目录。","git.changes":"变更","git.commits":"提交","git.pullToLoadMore":"下拉加载更多","git.pickerHint":"选择一个目录,自动查找其中的 git 仓库","git.cleanTree":"工作区干净","git.noCommits":"暂无提交","git.noDiff":"无差异","git.fontSmaller":"缩小字体","git.fontLarger":"放大字体","git.diffTruncated":"diff 过大,已截断","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"还没有命令,发送一条或保存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全局 · 所有会话","cmd.recent":"最近","cmd.scopeSession":"仅本会话","cmd.favorite":"收藏","cmd.itemConflict":"该快捷项已存在,请更换内容或选择其他列表。","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗读","doc.pauseRead":"暂停朗读","doc.resumeRead":"继续朗读","doc.stopRead":"停止朗读","doc.rate":"语速","doc.fontSmaller":"缩小字体","doc.fontLarger":"放大字体","inbox.view.working":"进行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推送通知需要 Chrome 或 Safari 浏览器","push.iosAddToHome":'iOS 需先把本站"添加到主屏幕",从主屏图标打开后再开启',"a2hs.title":"把 handmux 添加到主屏","a2hs.lead":"像 App 一样打开——全屏、没有地址栏。在 iPhone 上,pane 需要你时的推送也靠它送达。","a2hs.install":"安装 handmux","a2hs.ios1":"点 Safari 里的分享按钮(⬆︎ 方框)。","a2hs.ios2":"点「更多」,或向下滑动列表。","a2hs.ios3":"选「添加到主屏幕」,再点「添加」。","a2hs.iosHint":"Safari 里:分享 → 更多 → 添加到主屏幕。","a2hs.iosOpenSafari":"当前不是 Safari。请在 Safari 里打开本页再添加到主屏——其他 iOS 浏览器无法安装。","a2hs.androidManual":"打开浏览器菜单(⋮),选「添加到主屏幕」或「安装应用」。","a2hs.later":"以后再说","push.permissionTimeout":"系统未返回通知授权结果,请在系统设置中检查 handmux 或浏览器的通知权限后重试","push.permissionDenied":"通知权限被拒绝","push.swRegisterTimeout":"注册通知服务超时,请检查网络后重试","push.swRegisterFailed":"注册通知服务失败:{reason}。请清除本站数据后重新打开再试","push.swTimeout":"通知服务已注册但未能激活,请清除本站数据后重新打开再试","push.unknownReason":"原因未知","push.configTimeout":"读取推送配置超时,请检查与 handmux 服务的连接后重试","push.browserTimeout":"浏览器推送服务没有响应;Android Chrome 请确认 Google Play 服务可用后重试","push.noVapid":"服务端未配置推送(VAPID)","push.reportTimeout":"订阅已创建,但上报服务器超时,请检查连接后重试","push.subscriptionExpired":"Chrome 返回的推送订阅已经失效,已为你重置;请再次点击开启通知","push.deliveryRejected":"推送服务拒绝了新订阅,请检查服务器日志后重试","push.subscribeFailed":"订阅上报失败","push.sendFailed":"发送失败","api.loadFailed":"加载失败","api.uploadFailed":"上传失败","upload.title":"上传中","upload.processing":"已发送,服务器接收中…","api.uploadBadDir":"无法上传到该目录","api.uploadDuplicate":"已存在同名文件","api.uploadTooLarge":"文件过大(上限 50MB)","api.uploadBadType":"不支持的文件类型","time.secAgo":"{n}秒前","time.minAgo":"{n}分钟前","time.hourAgo":"{n}小时前","time.dayAgo":"{n}天前","time.expired":"已过期","time.minutes":"{n} 分钟","settings.script_push":"脚本推送","settings.script_push_open":"怎么用","settings.script_push_hint":"让电脑上的脚本把一条通知推到手机。","scriptPush.title":"脚本推送","scriptPush.intro":"让电脑上的脚本复用 handmux 的推送通道:在运行 handmux 的电脑上,一条 handmux push 命令就能把通知推到手机——构建、CI 或长任务结束时提醒你,不用另接推送服务。","scriptPush.copied":"已复制","scriptPush.session_placeholder":"<会话名>","scriptPush.device_placeholder":"<本设备key>","scriptPush.scope_all":"推给所有已订阅设备(默认)","scriptPush.scope_session":"只推某个会话里的设备","scriptPush.scope_device":"只推这台设备","scriptPush.device_key_note":"上面这串 key 就是这台设备的,复制即用。","scriptPush.device_need_enable":"先在上方开启推送通知,才会生成这台设备的 key。","scriptPush.opts_label":"可选参数(追加到上面任意一条后面)","scriptPush.opt_tag":"--tag <标签> —— 相同 tag 会覆盖上一条推送,而不是堆叠。","scriptPush.opt_url":"--url <路径> —— 点击通知时打开这个路径。","scriptPush.reliability":"注意:Web 推送经手机系统(FCM/APNs)中转,属尽力而为——省电模式、离线或厂商策略都可能延迟或丢弃它,并不保证实时送达。对送达强依赖的场景,请改用专门的 IM(微信 / Telegram bot 等)。","pushInbox.title":"通知记录","pushInbox.empty":"还没有脚本通知","pushInbox.delete":"删除","pushInbox.justNow":"刚刚","pushInbox.minutesAgo":"{n}分钟前","pushInbox.hoursAgo":"{n}小时前","pushInbox.detailTitle":"通知详情","pushInbox.openUrl":"打开链接","pushInbox.expired":"这条消息已过期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已读","pushInbox.unreadCount":"{n} 未读","pushInbox.loadFailed":"通知记录加载失败,请检查连接后重试","pushInbox.deleteFailed":"通知删除失败,消息已保留,请重试","pushInbox.retry":"重试","pushInbox.deliveryPending":"发送中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失败","pushInbox.deliveryReasonExpired":"订阅已失效","pushInbox.deliveryReasonRateLimited":"推送服务限流","pushInbox.deliveryReasonUnavailable":"推送服务暂不可用","pushInbox.deliveryReasonRejected":"推送服务已拒绝","pushInbox.deliveryReasonNetwork":"网络错误","pushInbox.deliveryReasonNotConfigured":"服务端未配置推送","pushInbox.deliveryReasonUnknown":"未知原因","workspace.bootDetected":"检测到电脑已重启","workspace.tmuxDetected":"检测到 tmux 已重新启动","workspace.summary":"上次工作区 · {sessions} 个会话 · 保存于 {time}","workspace.restoreLast":"恢复上次工作区","workspace.partialCard":"仍有 {failures} 个会话需要处理","workspace.unknownTime":"未知时间","workspace.savedAt":"保存于 {time}","workspace.topologySummary":"{sessions} 个会话 · {windows} 个窗口 · {panes} 个窗格","workspace.planSummary":"将恢复 {restore} 个会话;{already} 个已经存在","workspace.renameRule":"仅当当前已有同名会话时,恢复名称才会添加 -restored 后缀。","workspace.nonDestructive":"当前会话不会被修改、重命名或停止。","workspace.progress":"正在恢复 {completed} / {total}…","workspace.progressDone":"已恢复 {completed} / {total}","workspace.complete":"工作区已恢复。","workspace.completedSummary":"本次恢复:{sessions} 个会话 · {windows} 个窗口 · {panes} 个窗格","workspace.rebindHint":"恢复的会话不会自动显示;可重新选择要绑定到这台手机的会话。","workspace.rebind":"重新绑定会话","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"未知会话","workspace.restore":"恢复","workspace.ignore":"忽略此备份","workspace.protectionTitle":"工作区未受保护","workspace.protection.live-corrupt":"工作区状态副本已损坏;请检查磁盘和 ~/.handmux 权限,然后重启 handmux。","workspace.protection.live-unavailable":"无法读写工作区状态;请检查磁盘空间和 ~/.handmux 权限,然后重启 handmux。","workspace.protection.unknown":"后台快照暂时不可用;请检查电脑上的 handmux 日志。","workspace.error.restore-interrupted":"恢复已中断;请重试此备份","workspace.error.checkpoint-not-found":"此备份已不可用;请刷新后选择其它备份","workspace.error.storage-full":"工作区存储空间不足;请释放磁盘空间后重试","workspace.error.permission-denied":"无法写入工作区存储;请检查权限后重试","workspace.error.plan-failed":"恢复计划已变化;请刷新后重试","workspace.error.agent-unavailable":"Agent 无法续接;请打开已恢复的 shell 后手动重试","workspace.error.tmux-unavailable":"tmux 不可用;请确认 tmux 已运行后重试","workspace.error.restore-failed":"会话未恢复;请检查 handmux 日志后重试","workspace.error.operation-not-found":"此恢复任务已不可用;请重新恢复此备份","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"工作目录不可用;已在主目录中恢复","workspace.warning.layout-fallback":"窗格布局无法完整恢复;已保留默认布局","workspace.warning.agent-warning":"Agent 未能自动续接;已恢复的 shell 仍可使用","workspace.warning.live-reconcile-failed":"实时工作区状态核对失败;请检查 handmux 日志","workspace.warning.workspace-unavailable":"工作区存储暂时不可用;请检查磁盘空间和权限","workspace.warning.restore-warning":"恢复时出现了可继续处理的提醒;请检查恢复结果"},iM={"terminal.disconnected":"連線中斷,正在重新連線…","terminal.paneMissing":"窗格已關閉,請切換到其他窗格。","common.save":"儲存","common.cancel":"取消","common.confirm":"確認","common.ok":"確定","common.close":"關閉","common.delete":"刪除","common.copy":"複製","common.rename":"重新命名","common.create":"新增","common.back":"返回","common.open":"開啟","common.loading":"載入中…","common.done":"完成","token.title":"需要存取 Token","token.placeholder":"貼上 HANDMUX_TOKEN","settings.language":"語言 Language","home.empty":"尚未開啟任何檔案","home.emptyHint":"切換到「新增」挑選一個","home.remove":"移除","drawer.empty":"尚未綁定工作階段","drawer.unbind":"解除綁定","drawer.bind":"綁定工作階段","drawer.logout":"登出","windowbar.newWindow":"新增視窗","rename.new_name":"新名稱","rename.name_rule":"只能使用字母、數字、連字號(≤16)","rename.failed":"重新命名失敗,請重試","rename.saving":"儲存中…","newwindow.title":"新增視窗","newwindow.window_name":"視窗名稱(選填)","newwindow.name_placeholder":"留空自動命名 · 字母/數字/連字號 ≤16","newwindow.name_rule":"只能使用字母、數字、連字號(≤16)","newwindow.start_dir":"起始目錄","newwindow.session_dir_named":"{dir}(工作階段目錄)","newwindow.session_dir_default":"工作階段目錄(預設)","newwindow.choose":"選擇","newwindow.reset_to_session_dir":"重置為工作階段目錄","newwindow.creating":"建立中…","startup.label":"啟動命令(選填)","startup.aria":"啟動命令","startup.preset_shell":"空白 Shell(預設)","startup.preset_claude":"claude(啟動 Claude Code)","startup.preset_claude_continue":"claude -c(繼續上次工作階段)","startup.preset_codex":"codex(啟動 Codex CLI)","startup.custom":"自訂…","startup.custom_placeholder":'例如 claude "修復登入 bug"',"bind.title":"綁定工作階段","bind.sessionName":"工作階段名稱","bind.pickSession":"選擇要綁定的工作階段","bind.newSession":"+ 新增工作階段","bind.modeNew":"新增工作階段","bind.modeExisting":"既有工作階段","bind.alreadyExists":"此工作階段已存在","bind.bind":"綁定","bind.checking":"驗證中…","bind.createAndOpen":"新增並開啟","bind.creating":"建立中…","bind.createHint":"工作階段「{name}」不存在,點「新增並開啟」建立","bind.alreadyBound":"已綁定此工作階段","bind.createFailed":"建立失敗,請重試","bind.invalidName":"只能使用字母、數字、連字號(≤16)","bind.desktopHint":"這裡的工作階段(包括手機新建的),電腦上一條命令即可接管:handmux open <名稱>","bind.checkFailed":"驗證失敗,請重試","bind.startDir":"起始目錄","bind.homeDirDefault":"主目錄(預設)","bind.choose":"選擇","bind.reset":"重置","actionsheet.confirmAgain":"確認?再點一次","dirpicker.title":"選擇目錄","inbox.title":"收件匣","inbox.working":"進行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"目前沒有面板狀態","inbox.enableTitle":"開啟 AI 工作階段通知","inbox.enableHint":"將每個 Claude / Codex 面板標記為進行中 / 需要你 / 已完成,需要時也會推播提醒。","inbox.enableBtn":"開啟","inbox.enabling":"開啟中…","inbox.enableFailed":"開啟失敗——請查看伺服器日誌。","idea.title":"想法","idea.editPlaceholder":"編輯想法…","idea.addPlaceholder":"記錄一條想法…","idea.add":"新增","idea.empty":"還沒有想法,記錄一條吧","idea.dragSort":"拖曳排序","idea.fillInput":"填入輸入框","idea.send":"傳送","doclink.title":"開啟檔案","changelog.title":"新功能","preview.dynamic":"動態預覽","preview.static":"靜態預覽","preview.remainTitle":"剩餘有效期 — 點擊續期 / 停止","preview.toPcView":"切換到電腦檢視","preview.toMobileView":"切換到手機檢視","preview.pcView":"電腦檢視","preview.mobileView":"手機檢視","preview.refresh":"重新整理","preview.minimize":"收起","preview.ttlDialog":"預覽有效期","preview.renew":"續期(重置為 1 小時)","preview.stop":"停止預覽","preview.iframeTitle":"預覽","preview.zoomOut":"縮小","preview.zoomIn":"放大","imageviewer.loadFailed":"圖片載入失敗","imageviewer.saved":"已儲存,可在相簿或「下載」中查看","imageviewer.shareUnsupported":"圖片分享需要 Chrome 或 Safari 瀏覽器","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"圖片","imageviewer.saveImage":"儲存圖片","imageviewer.shareImage":"分享圖片","mic.stop":"停止語音輸入","mic.start":"語音輸入","dock.send":"傳送","dock.send.hint":"點傳送 · 長按填入","dock.phrases":"常用語","dock.attach":"上傳","dock.history":"歷史","history.empty":"還沒有發送記錄","history.scope":"僅目前視窗的記錄","dock.input.placeholder":"草稿區","dock.input.enterDraft":"按 Shift + Enter 進入草稿模式","dock.input.exitDraft":"按 Esc 回到終端模式 · Shift + Enter 換行","dock.command.placeholder":"輸入指令 · Enter 執行","dock.mode.agent":"對話","dock.mode.toggle":"切換輸入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"新增","fav.addPlaceholder":"新增常用…","dock.upload.aria":"上傳檔案","dock.upload.title":"上傳檔案(存到主目錄上傳區,不進專案)","dock.upload.progress":"上傳 {name}{tag}","dock.upload.failed":"上傳失敗:{names}","app.nameExists":"該名稱已存在","app.renameFailed":"重新命名失敗,請重試","app.deleteFailed":"刪除失敗,請重試","app.moveFailed":"移動失敗,請重試","app.sessionGone":"工作階段「{name}」不存在,可能已關閉","app.docNotFound":"檔案不存在","app.docTooLarge":"檔案過大(超過 2MB)","app.docUnsupported":"不支援的檔案或路徑","app.docOpenFailed":"開啟失敗,請重試","app.preview":"預覽","app.openPreview":"開啟預覽","app.ideas":"想法","app.files":"檔案","app.settings":"設定","app.renameSession":"重新命名工作階段","app.renameWindow":"重新命名視窗","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"刪除視窗","pane.splitH":"左右分割","pane.splitV":"上下分割","pane.manage":"管理分割","pane.close":"關閉此格","pane.closeConfirm":"確認關閉?再點一次","pane.splitFailed":"分割失敗","pane.closeFailed":"關閉失敗","app.deleteLastWindowConfirm":"這是最後一個視窗,刪除將關閉整個工作階段!再點一次","app.deleteConfirm":"確認刪除?再點一次","app.cannotLocate":"無法定位","app.pickItsDir":",請選擇所在目錄:","app.noBoundSession":"尚未綁定工作階段","app.tapToBind":"點此綁定一個","app.selectSessionHint":"點擊左上角 ☰ 選擇工作階段","app.backToExit":"再按一次返回鍵結束","settings.title":"設定","settings.group_global":"全域設定","settings.font_size":"字型大小","settings.font_decrease":"縮小字型","settings.font_increase":"放大字型","settings.font_auto":"自適應","settings.font_auto_title":"依高度自動調整","settings.keyboard_mode":"鍵盤模式","settings.keyboard_mode_auto":"自動識別","settings.keyboard_mode_mobile":"手機","settings.keyboard_mode_desktop":"電腦","settings.keyboard_mode_hint":"僅套用於目前瀏覽器;識別不準時可手動指定。","settings.chat_lens":"啟用對話視圖(實驗性功能)","settings.chat_lens_hint":"實驗性功能,可能不穩定。以對話形式查看和操作 Claude 工作階段;開啟後,視窗列出現視圖切換,並可選擇對話配色。","boot.loading":"正在載入","boot.chat_empty":"發送你的第一則訊息,對話就開始啦","settings.chat_lens_need_hooks":"需先安裝 Claude hooks:對話裡的問題卡、狀態提示都依賴它。","settings.chat_lens_no_claude":"未檢測到 Claude Code;安裝並運行後再開啟。","settings.chat_lens_install_hooks":"一鍵安裝 hooks","settings.chat_lens_installing":"安裝中…","settings.chat_lens_hooks_err":"安裝失敗,請到電腦上運行 handmux hooks install","settings.path_highlight":"高亮檔案路徑","settings.path_highlight_hint":"為終端機裡可點開的檔案路徑加底色。無論開關與否,路徑都可點開。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日誌","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"意見回饋","settings.feedback_issues":"GitHub 回報","settings.feedback_group":"微信用戶群","settings.feedback_hint":"bug、想法都歡迎——Issue 會被追蹤處理;微信群回饋直達。","settings.update_available":"有新版本 v{v} 可用","settings.update_more":"另有 {n} 個版本更新","settings.update_how":"在電腦上執行","settings.push_notifications":"推播通知","settings.notify_on":"已開啟 ✓","settings.notify_enable":"開啟裝置通知","settings.notify_enabled":"已開啟,應會收到一則歡迎通知","settings.notify_disabled":"已關閉","settings.notify_failed":"操作失敗","settings.processing":"處理中","settings.push_hint":"監聽「需要你」和「已完成」:所關注工作階段需要授權/回答,或一輪剛完成時,推播到此裝置。","settings.push_unsupported":"推播需要 Chrome 或 Safari 瀏覽器","settings.group_session":"目前工作階段設定","settings.screen_cols":"螢幕欄數","settings.cols_dec":"減少","settings.cols_dec_title":"減少欄數","settings.cols_inc":"增加","settings.cols_inc_title":"增加欄數","settings.cols_restore":"預設","settings.cols_restore_title":"恢復視窗預設尺寸","settings.preview_site":"預覽站台","settings.preview_static_site":"預覽靜態站台","settings.preview_running_dynamic":"動態預覽 執行中","settings.preview_running_static":"靜態預覽 執行中","settings.preview_remain_title":"剩餘有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"續期","settings.preview_confirm_stop":"確認停止","settings.preview_stop":"停止","settings.preview_name":"名稱:{name}","settings.preview_port":"(連接埠:{port})","settings.preview_type":"預覽類型","settings.preview_off":"不開啟","settings.preview_static":"靜態","settings.preview_dynamic":"動態","settings.preview_off_hint":"未開啟預覽。選擇「靜態」開始。","settings.preview_off_hint_both":"未開啟預覽。選擇「靜態」或「動態」開始。","settings.preview_dynamic_disabled":"動態連接埠預覽未啟用。要開啟:將一個萬用字元預覽網域(previewDomain,如 *.example.com)指向閘道,並設定對應的 TLS 憑證。Cloudflare / 自建憑證差異請見 README。","settings.preview_pick_dir":"選擇目錄啟動","settings.preview_static_hint":"選一個含 index.html 的目錄,在手機上預覽。","settings.preview_port_placeholder":"連接埠,如 3000","settings.preview_port_label":"連接埠","settings.preview_starting":"啟動中…","settings.preview_start":"啟動","settings.preview_dynamic_hint":"填入本機正在執行的連接埠(dev server / 後端),手機透過子網域直接存取。","settings.dir_picker_hint":"選擇要預覽的靜態站台目錄(含 index.html)","settings.err_port_not_listening":"該連接埠未在監聽,請確認服務已啟動","settings.err_bad_port":"連接埠不合法(1–65535)","settings.err_dynamic_disabled":"動態預覽未開啟","settings.err_start_failed":"啟動失敗","localurl.title":"開啟代理並預覽","localurl.open":"開啟代理","localurl.disabled":"動態預覽未開啟——在設定中配置預覽網域後即可代理本機連接埠。","localurl.notListening":"連接埠 :{port} 沒有服務在監聽。","localurl.badProtocol":"此連結不是可代理的 HTTP 或 HTTPS 位址。","localurl.network":"無法連線 handmux 服務,請檢查網路後重試。","localurl.failed":"無法開啟預覽:{reason}。請檢查設定後重試。","filebrowser.openDirFailed":"無法開啟該目錄","filebrowser.copiedPath":"已複製路徑:{abs}","filebrowser.mkdirFailed":"建立目錄失敗(名稱不合法或已存在)","filebrowser.downloading":"下載 {name}","filebrowser.downloadFailed":"下載失敗","filebrowser.uploading":"上傳 {name}{tag}","filebrowser.uploadFailed":"上傳失敗","filebrowser.uploadPartialFailed":"以下檔案上傳失敗:{names}","filebrowser.sessionDir":"工作階段目錄","filebrowser.jumpToSessionDir":"跳到目前工作階段目錄","filebrowser.parentDir":"上層目錄","filebrowser.rootSelect":"切換根目錄(主目錄 / 暫存目錄)","filebrowser.pathPlaceholder":"輸入路徑(即時篩選/跳轉)","filebrowser.newFolder":"新增資料夾","filebrowser.createBtn":"建立","filebrowser.uploadFile":"上傳檔案","filebrowser.uploadToCurrentDir":"上傳到目前目錄","filebrowser.enterSubdirToUpload":"請進入一個子目錄上傳","filebrowser.folderNamePlaceholder":"資料夾名稱","filebrowser.uploadPendingTo":"將「{name}」上傳到目前目錄","filebrowser.enterSubdirFirst":"(請先進入一個子目錄)","filebrowser.upload":"上傳","filebrowser.savedToDownloads":"已儲存「{name}」到「下載」資料夾,可在系統檔案管理員查看","filebrowser.noMatches":"沒有符合的檔案或目錄","filebrowser.tooMany":"共 {total} 項,僅顯示前 {shown} 項——在路徑框輸入關鍵字可篩選","filebrowser.previewUnsupported":"暫不支援此類型檔案的預覽,點右側按鈕可下載","filebrowser.copyAbsPath":"複製絕對路徑","filebrowser.download":"下載","filebrowser.pickThisDir":"選定此目錄 {path}","filebrowser.downloadConfirm":"下載 {name}?","filemanager.files":"檔案","filemanager.closeTab":"關閉標籤","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目錄","git.errReadRepo":"無法讀取儲存庫","git.errLoad":"載入失敗","git.noRepoInDir":"這個目錄還不是 git 儲存庫 —— 換一個目錄,或在這裡 git init 一下。","git.outsideRoots":"這個目錄在 handmux 可存取範圍之外 —— 只開放主目錄和 /tmp。把儲存庫放到主目錄下,就能在這裡檢視了。","git.errReadDir":"無法讀取該目錄","git.commitDetail":"提交詳情","git.diff":"差異","git.bindRepo":"綁定儲存庫","git.collapse":"收起","git.currentBranch":"目前分支","git.switchViewedBranch":"切換查看的分支","git.switchBranch":"切換分支","git.noBranches":"目前沒有分支","git.noRepoBound":"未綁定儲存庫,點左上角「+」選擇一個目錄。","git.changes":"變更","git.commits":"提交","git.pullToLoadMore":"下拉載入更多","git.pickerHint":"選擇一個目錄,自動尋找其中的 git 儲存庫","git.cleanTree":"工作區乾淨","git.noCommits":"目前沒有提交","git.noDiff":"無差異","git.fontSmaller":"縮小字型","git.fontLarger":"放大字型","git.diffTruncated":"diff 過大,已截斷","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"還沒有命令,傳送一條或儲存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全域 · 所有工作階段","cmd.recent":"最近","cmd.scopeSession":"僅本工作階段","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗讀","doc.pauseRead":"暫停朗讀","doc.resumeRead":"繼續朗讀","doc.stopRead":"停止朗讀","doc.rate":"語速","doc.fontSmaller":"縮小字型","doc.fontLarger":"放大字型","inbox.view.working":"進行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推播通知需要 Chrome 或 Safari 瀏覽器","push.iosAddToHome":"iOS 需先將本站「加入主畫面」,從主畫面圖示開啟後再開啟","a2hs.title":"將 handmux 加入主畫面","a2hs.lead":"像 App 一樣開啟——全螢幕、沒有網址列。在 iPhone 上,pane 需要你時的推播也靠它送達。","a2hs.install":"安裝 handmux","a2hs.ios1":"點 Safari 的分享按鈕(⬆︎ 方框)。","a2hs.ios2":"點「更多」,或向下滑動清單。","a2hs.ios3":"選「加入主畫面」,再點「加入」。","a2hs.iosHint":"Safari 裡:分享 → 更多 → 加入主畫面。","a2hs.iosOpenSafari":"目前不是 Safari。請在 Safari 開啟本頁再加入主畫面——其他 iOS 瀏覽器無法安裝。","a2hs.androidManual":"開啟瀏覽器選單(⋮),選「加入主畫面」或「安裝應用程式」。","a2hs.later":"稍後再說","push.permissionTimeout":"系統未回傳通知授權結果,請在系統設定中檢查 handmux 或瀏覽器的通知權限後再試","push.permissionDenied":"通知權限被拒絕","push.swRegisterTimeout":"註冊通知服務逾時,請檢查網路後再試","push.swRegisterFailed":"註冊通知服務失敗:{reason}。請清除本站資料後重新開啟再試","push.swTimeout":"通知服務已註冊但未能啟用,請清除本站資料後重新開啟再試","push.unknownReason":"原因不明","push.configTimeout":"讀取推播設定逾時,請檢查與 handmux 伺服器的連線後再試","push.browserTimeout":"瀏覽器推播服務沒有回應;Android Chrome 請確認 Google Play 服務可用後再試","push.noVapid":"伺服器未設定推播(VAPID)","push.reportTimeout":"訂閱已建立,但回報伺服器逾時,請檢查連線後再試","push.subscriptionExpired":"Chrome 回傳的推播訂閱已失效,已為你重設;請再次點擊開啟通知","push.deliveryRejected":"推播服務拒絕了新訂閱,請檢查伺服器記錄後再試","push.subscribeFailed":"訂閱回報失敗","push.sendFailed":"傳送失敗","api.loadFailed":"載入失敗","api.uploadFailed":"上傳失敗","upload.title":"上傳中","upload.processing":"已傳送,伺服器接收中…","api.uploadBadDir":"無法上傳到該目錄","api.uploadDuplicate":"已存在同名檔案","api.uploadTooLarge":"檔案過大(上限 50MB)","api.uploadBadType":"不支援的檔案類型","time.secAgo":"{n} 秒前","time.minAgo":"{n} 分鐘前","time.hourAgo":"{n} 小時前","time.dayAgo":"{n} 天前","time.expired":"已過期","time.minutes":"{n} 分鐘","settings.script_push":"腳本推送","settings.script_push_open":"怎麼用","settings.script_push_hint":"讓電腦上的腳本把一條通知推到手機。","scriptPush.title":"腳本推送","scriptPush.intro":"讓電腦上的腳本複用 handmux 的推送通道:在執行 handmux 的電腦上,一條 handmux push 命令就能把通知推到手機——建置、CI 或長任務結束時提醒你,不用另接推送服務。","scriptPush.copied":"已複製","scriptPush.session_placeholder":"<會話名>","scriptPush.device_placeholder":"<本裝置key>","scriptPush.scope_all":"推給所有已訂閱裝置(預設)","scriptPush.scope_session":"只推某個會話裡的裝置","scriptPush.scope_device":"只推這台裝置","scriptPush.device_key_note":"上面這串 key 就是這台裝置的,複製即用。","scriptPush.device_need_enable":"先在上方開啟推送通知,才會生成這台裝置的 key。","scriptPush.opts_label":"可選參數(追加到上面任意一條後面)","scriptPush.opt_tag":"--tag <標籤> —— 相同 tag 會覆蓋上一條推送,而不是堆疊。","scriptPush.opt_url":"--url <路徑> —— 點擊通知時開啟這個路徑。","scriptPush.reliability":"注意:Web 推送經手機系統(FCM/APNs)中轉,屬盡力而為——省電模式、離線或廠商策略都可能延遲或丟棄它,並不保證即時送達。對送達強依賴的場景,請改用專門的 IM(WeChat / Telegram bot 等)。","pushInbox.title":"通知記錄","pushInbox.empty":"還沒有腳本通知","pushInbox.delete":"刪除","pushInbox.justNow":"剛剛","pushInbox.minutesAgo":"{n}分鐘前","pushInbox.hoursAgo":"{n}小時前","pushInbox.detailTitle":"通知詳情","pushInbox.openUrl":"打開連結","pushInbox.expired":"這條訊息已過期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已讀","pushInbox.unreadCount":"{n} 未讀","pushInbox.loadFailed":"通知記錄載入失敗,請檢查連線後重試","pushInbox.deleteFailed":"通知刪除失敗,訊息已保留,請重試","pushInbox.retry":"重試","pushInbox.deliveryPending":"傳送中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失敗","pushInbox.deliveryReasonExpired":"訂閱已失效","pushInbox.deliveryReasonRateLimited":"推播服務限流","pushInbox.deliveryReasonUnavailable":"推播服務暫不可用","pushInbox.deliveryReasonRejected":"推播服務已拒絕","pushInbox.deliveryReasonNetwork":"網路錯誤","pushInbox.deliveryReasonNotConfigured":"伺服器未設定推播","pushInbox.deliveryReasonUnknown":"不明原因","workspace.bootDetected":"偵測到電腦已重新啟動","workspace.tmuxDetected":"偵測到 tmux 已重新啟動","workspace.summary":"上次工作區 · {sessions} 個工作階段 · 儲存於 {time}","workspace.restoreLast":"還原上次工作區","workspace.partialCard":"仍有 {failures} 個工作階段需要處理","workspace.unknownTime":"未知時間","workspace.savedAt":"儲存於 {time}","workspace.topologySummary":"{sessions} 個工作階段 · {windows} 個視窗 · {panes} 個窗格","workspace.planSummary":"將還原 {restore} 個工作階段;{already} 個已存在","workspace.renameRule":"僅當目前已有同名工作階段時,還原名稱才會加上 -restored 後綴。","workspace.nonDestructive":"目前的工作階段不會被修改、重新命名或停止。","workspace.progress":"正在還原 {completed} / {total}…","workspace.progressDone":"已還原 {completed} / {total}","workspace.complete":"工作區已還原。","workspace.completedSummary":"本次還原:{sessions} 個工作階段 · {windows} 個視窗 · {panes} 個窗格","workspace.rebindHint":"還原的工作階段不會自動顯示;可重新選擇要綁定到這台手機的工作階段。","workspace.rebind":"重新綁定工作階段","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"未知工作階段","workspace.restore":"還原","workspace.ignore":"忽略此備份","workspace.protectionTitle":"工作區未受保護","workspace.protection.live-corrupt":"工作區狀態副本已損壞;請檢查磁碟與 ~/.handmux 權限,然後重新啟動 handmux。","workspace.protection.live-unavailable":"無法讀寫工作區狀態;請檢查磁碟空間與 ~/.handmux 權限,然後重新啟動 handmux。","workspace.protection.unknown":"背景快照暫時無法使用;請檢查電腦上的 handmux 日誌。","workspace.error.restore-interrupted":"還原已中斷;請重試此備份","workspace.error.checkpoint-not-found":"此備份已無法使用;請重新整理後選擇其他備份","workspace.error.storage-full":"工作區儲存空間不足;請釋放磁碟空間後重試","workspace.error.permission-denied":"無法寫入工作區儲存;請檢查權限後重試","workspace.error.plan-failed":"還原計畫已變更;請重新整理後重試","workspace.error.agent-unavailable":"Agent 無法續接;請開啟已還原的 shell 後手動重試","workspace.error.tmux-unavailable":"tmux 無法使用;請確認 tmux 已執行後重試","workspace.error.restore-failed":"工作階段未還原;請檢查 handmux 日誌後重試","workspace.error.operation-not-found":"此還原任務已無法使用;請重新還原此備份","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"工作目錄無法使用;已在主目錄中還原","workspace.warning.layout-fallback":"窗格配置無法完整還原;已保留預設配置","workspace.warning.agent-warning":"Agent 未能自動續接;已還原的 shell 仍可使用","workspace.warning.live-reconcile-failed":"即時工作區狀態核對失敗;請檢查 handmux 日誌","workspace.warning.workspace-unavailable":"工作區儲存暫時無法使用;請檢查磁碟空間和權限","workspace.warning.restore-warning":"還原時出現可繼續處理的提醒;請檢查還原結果"},rM={"terminal.disconnected":"接続が切れました。再接続しています…","terminal.paneMissing":"このペインは閉じられました。別のペインに切り替えてください。","common.save":"保存","common.cancel":"キャンセル","common.confirm":"確認","common.ok":"OK","common.close":"閉じる","common.delete":"削除","common.copy":"コピー","common.rename":"名前を変更","common.create":"新規作成","common.back":"戻る","common.open":"開く","common.loading":"読み込み中…","common.done":"完了","token.title":"アクセストークンが必要です","token.placeholder":"HANDMUX_TOKEN を貼り付け","settings.language":"言語 Language","home.empty":"ファイルが開かれていません","home.emptyHint":"「新規」タブでファイルを選択してください","home.remove":"削除","drawer.empty":"セッションが紐付けられていません","drawer.unbind":"紐付け解除","drawer.bind":"セッションを紐付け","drawer.logout":"ログアウト","windowbar.newWindow":"新規ウィンドウ","rename.new_name":"新しい名前","rename.name_rule":"英数字とハイフンのみ(≤16文字)","rename.failed":"名前の変更に失敗しました。再試行してください","rename.saving":"保存中…","newwindow.title":"新規ウィンドウ","newwindow.window_name":"ウィンドウ名(任意)","newwindow.name_placeholder":"空白で自動命名 · 英数字/ハイフン ≤16","newwindow.name_rule":"英数字とハイフンのみ(≤16文字)","newwindow.start_dir":"開始ディレクトリ","newwindow.session_dir_named":"{dir}(セッションディレクトリ)","newwindow.session_dir_default":"セッションディレクトリ(デフォルト)","newwindow.choose":"選択","newwindow.reset_to_session_dir":"セッションディレクトリにリセット","newwindow.creating":"作成中…","startup.label":"起動コマンド(任意)","startup.aria":"起動コマンド","startup.preset_shell":"空のシェル(デフォルト)","startup.preset_claude":"claude(Claude Code を起動)","startup.preset_claude_continue":"claude -c(前回のセッションを継続)","startup.preset_codex":"codex(Codex CLI を起動)","startup.custom":"カスタム…","startup.custom_placeholder":'例:claude "ログインバグを修正"',"bind.title":"セッションを紐付け","bind.sessionName":"セッション名","bind.pickSession":"紐付けるセッションを選択","bind.newSession":"+ 新規セッション","bind.modeNew":"新規作成","bind.modeExisting":"既存を選択","bind.alreadyExists":"このセッションは既に存在します","bind.bind":"紐付け","bind.checking":"確認中…","bind.createAndOpen":"作成して開く","bind.creating":"作成中…","bind.createHint":"セッション「{name}」が存在しません。「作成して開く」をタップして作成してください","bind.alreadyBound":"このセッションはすでに紐付けられています","bind.createFailed":"作成に失敗しました。再試行してください","bind.invalidName":"英数字とハイフンのみ(≤16文字)","bind.desktopHint":"ここのセッション(スマホで作成したものも)は、PC で 1 コマンドで引き継げます:handmux open <名前>","bind.checkFailed":"確認に失敗しました。再試行してください","bind.startDir":"開始ディレクトリ","bind.homeDirDefault":"ホームディレクトリ(デフォルト)","bind.choose":"選択","bind.reset":"リセット","actionsheet.confirmAgain":"確認しますか?もう一度タップ","dirpicker.title":"ディレクトリを選択","inbox.title":"受信トレイ","inbox.working":"進行中","inbox.done":"完了","inbox.needs":"要対応","inbox.clearDone":"完了済みをクリア","inbox.empty":"パネルの状態なし","inbox.enableTitle":"AI セッション通知を有効にする","inbox.enableHint":"各 Claude / Codex パネルを「進行中」「要対応」「完了」にマークし、対応が必要なときにプッシュ通知を送信します。","inbox.enableBtn":"有効にする","inbox.enabling":"有効化中…","inbox.enableFailed":"有効化に失敗しました——サーバーログを確認してください。","idea.title":"アイデア","idea.editPlaceholder":"アイデアを編集…","idea.addPlaceholder":"アイデアを記録…","idea.add":"追加","idea.empty":"まだアイデアがありません。記録してみましょう","idea.dragSort":"ドラッグで並べ替え","idea.fillInput":"入力欄に挿入","idea.send":"送信","doclink.title":"ファイルを開く","changelog.title":"新機能","preview.dynamic":"ダイナミックプレビュー","preview.static":"静的プレビュー","preview.remainTitle":"残り有効期限 — タップして更新 / 停止","preview.toPcView":"PCビューに切り替え","preview.toMobileView":"モバイルビューに切り替え","preview.pcView":"PCビュー","preview.mobileView":"モバイルビュー","preview.refresh":"更新","preview.minimize":"最小化","preview.ttlDialog":"プレビュー有効期限","preview.renew":"更新(1時間にリセット)","preview.stop":"プレビューを停止","preview.iframeTitle":"プレビュー","preview.zoomOut":"縮小","preview.zoomIn":"拡大","imageviewer.loadFailed":"画像の読み込みに失敗しました","imageviewer.saved":"保存しました。フォトライブラリまたは「ダウンロード」で確認できます","imageviewer.shareUnsupported":"画像の共有には Chrome または Safari が必要です","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"拡大","imageviewer.imageTitle":"画像","imageviewer.saveImage":"画像を保存","imageviewer.shareImage":"画像を共有","mic.stop":"音声入力を停止","mic.start":"音声入力","dock.send":"送信","dock.send.hint":"タップで送信 · 長押しで挿入","dock.phrases":"よく使うフレーズ","dock.attach":"添付","dock.history":"履歴","history.empty":"履歴はまだありません","history.scope":"このウィンドウの記録のみ","dock.input.placeholder":"下書き欄","dock.input.enterDraft":"Shift + Enter で下書きモードへ","dock.input.exitDraft":"Esc でターミナルモードへ戻る · Shift + Enter で改行","dock.command.placeholder":"コマンドを入力 · Enterで実行","dock.mode.agent":"会話","dock.mode.toggle":"入力モードを切替","dock.mode.command":"コマンド","dock.mode.chat":"チャット","fav.title":"よく使う","fav.add":"追加","fav.addPlaceholder":"よく使う項目を追加…","dock.upload.aria":"ファイルをアップロード","dock.upload.title":"ファイルをアップロード(ホームのアップロードフォルダに保存、プロジェクトには含まない)","dock.upload.progress":"{name}{tag} をアップロード中","dock.upload.failed":"アップロード失敗:{names}","app.nameExists":"その名前はすでに使われています","app.renameFailed":"名前の変更に失敗しました。再試行してください","app.deleteFailed":"削除に失敗しました。再試行してください","app.moveFailed":"移動に失敗しました。再試行してください","app.sessionGone":"セッション「{name}」が存在しません。閉じられた可能性があります","app.docNotFound":"ファイルが存在しません","app.docTooLarge":"ファイルが大きすぎます(2MB超)","app.docUnsupported":"サポートされていないファイルまたはパス","app.docOpenFailed":"開くのに失敗しました。再試行してください","app.preview":"プレビュー","app.openPreview":"プレビューを開く","app.ideas":"アイデア","app.files":"ファイル","app.settings":"設定","app.renameSession":"セッション名を変更","app.renameWindow":"ウィンドウ名を変更","app.moveLeft":"◀ 左へ移動","app.moveRight":"右へ移動 ▶","app.deleteWindow":"ウィンドウを削除","pane.splitH":"左右に分割","pane.splitV":"上下に分割","pane.manage":"分割を管理","pane.close":"ペインを閉じる","pane.closeConfirm":"閉じますか?もう一度タップ","pane.splitFailed":"分割に失敗しました","pane.closeFailed":"閉じる操作に失敗しました","app.deleteLastWindowConfirm":"これは最後のウィンドウです。削除するとセッション全体が閉じます!もう一度タップ","app.deleteConfirm":"削除しますか?もう一度タップ","app.cannotLocate":"場所を特定できません","app.pickItsDir":"。ディレクトリを選択してください:","app.noBoundSession":"セッションが紐付けられていません","app.tapToBind":"タップして紐付け","app.selectSessionHint":"左上の ☰ をタップしてセッションを選択","app.backToExit":"もう一度戻るで終了します","settings.title":"設定","settings.group_global":"グローバル設定","settings.font_size":"フォントサイズ","settings.font_decrease":"フォントを縮小","settings.font_increase":"フォントを拡大","settings.font_auto":"自動調整","settings.font_auto_title":"高さに合わせて自動調整","settings.keyboard_mode":"キーボードモード","settings.keyboard_mode_auto":"自動判定","settings.keyboard_mode_mobile":"モバイル","settings.keyboard_mode_desktop":"デスクトップ","settings.keyboard_mode_hint":"このブラウザだけに適用されます。判定が違う場合は手動で選択できます。","settings.path_highlight":"ファイルパスをハイライト","settings.path_highlight_hint":"ターミナル内のタップ可能なファイルパスに色を付けます。オフでもパスはタップできます。","settings.whats_new":"新機能","settings.view_changelog":"変更履歴を表示","settings.has_update":"更新あり","settings.version":"バージョン","settings.feedback":"フィードバック","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat グループ","settings.feedback_hint":"バグ報告や要望は Issue へ — 必ず追跡・返信されます。","settings.update_available":"バージョン {v} が利用可能","settings.update_more":"ほか {n} バージョンの更新","settings.update_how":"パソコンで実行:","settings.push_notifications":"プッシュ通知","settings.notify_on":"有効 ✓","settings.notify_enable":"デバイス通知を有効にする","settings.notify_enabled":"有効にしました。ウェルカム通知が届くはずです","settings.notify_disabled":"無効","settings.notify_failed":"操作に失敗しました","settings.processing":"処理中","settings.push_hint":"「要対応」と「完了」を監視:注目しているセッションが承認/回答を必要としているとき、またはラウンドが完了したときにこのデバイスへ通知します。","settings.push_unsupported":"プッシュ通知には Chrome または Safari が必要です","settings.group_session":"現在のセッション設定","settings.screen_cols":"画面の列数","settings.cols_dec":"減らす","settings.cols_dec_title":"列数を減らす","settings.cols_inc":"増やす","settings.cols_inc_title":"列数を増やす","settings.cols_restore":"デフォルト","settings.cols_restore_title":"ウィンドウのデフォルトサイズに戻す","settings.preview_site":"プレビューサイト","settings.preview_static_site":"静的サイトをプレビュー","settings.preview_running_dynamic":"ダイナミックプレビュー 実行中","settings.preview_running_static":"静的プレビュー 実行中","settings.preview_remain_title":"残り有効期限","settings.preview_remain":"残り {time}","settings.preview_renew":"更新","settings.preview_confirm_stop":"停止を確認","settings.preview_stop":"停止","settings.preview_name":"名前:{name}","settings.preview_port":"(ポート:{port})","settings.preview_type":"プレビュータイプ","settings.preview_off":"無効","settings.preview_static":"静的","settings.preview_dynamic":"ダイナミック","settings.preview_off_hint":"プレビューは無効です。「静的」を選択して開始してください。","settings.preview_off_hint_both":"プレビューは無効です。「静的」または「ダイナミック」を選択して開始してください。","settings.preview_dynamic_disabled":"ダイナミックポートプレビューは無効です。有効にするには:ワイルドカードプレビュードメイン(previewDomain、例:*.example.com)をゲートウェイに向け、対応するTLS証明書を設定してください。Cloudflare /自己署名証明書の違いはREADMEを参照。","settings.preview_pick_dir":"ディレクトリを選択して開始","settings.preview_static_hint":"index.html を含むディレクトリを選択して、スマートフォンでプレビュー。","settings.preview_port_placeholder":"ポート番号(例:3000)","settings.preview_port_label":"ポート","settings.preview_starting":"起動中…","settings.preview_start":"起動","settings.preview_dynamic_hint":"ローカルで実行中のポート(devサーバー / バックエンド)を入力すると、スマートフォンからサブドメイン経由でアクセスできます。","settings.dir_picker_hint":"プレビューする静的サイトのディレクトリを選択(index.html を含む)","settings.err_port_not_listening":"そのポートはリッスンしていません。サービスが起動しているか確認してください","settings.err_bad_port":"ポート番号が無効です(1〜65535)","settings.err_dynamic_disabled":"ダイナミックプレビューは無効です","settings.err_start_failed":"起動に失敗しました","localurl.title":"プロキシを有効にしてプレビュー","localurl.open":"プロキシを有効化","localurl.disabled":"ダイナミックプレビューは無効です。設定でプレビュードメインを構成するとローカルポートをプロキシできます。","localurl.notListening":"ポート :{port} で待ち受けているサービスがありません。","localurl.badProtocol":"このリンクはプロキシ可能な HTTP または HTTPS アドレスではありません。","localurl.network":"handmux サービスに接続できません。ネットワークを確認して再試行してください。","localurl.failed":"プレビューを開始できません:{reason}。設定を確認して再試行してください。","filebrowser.openDirFailed":"ディレクトリを開けませんでした","filebrowser.copiedPath":"パスをコピーしました:{abs}","filebrowser.mkdirFailed":"ディレクトリの作成に失敗しました(名前が無効または既に存在します)","filebrowser.downloading":"{name} をダウンロード中","filebrowser.downloadFailed":"ダウンロードに失敗しました","filebrowser.uploading":"{name}{tag} をアップロード中","filebrowser.uploadFailed":"アップロードに失敗しました","filebrowser.uploadPartialFailed":"以下のファイルのアップロードに失敗しました:{names}","filebrowser.sessionDir":"セッションディレクトリ","filebrowser.jumpToSessionDir":"現在のセッションディレクトリへ移動","filebrowser.parentDir":"親ディレクトリ","filebrowser.rootSelect":"ルートディレクトリを切り替え(ホーム / 一時)","filebrowser.pathPlaceholder":"パスを入力(リアルタイムフィルタ / ジャンプ)","filebrowser.newFolder":"新規フォルダ","filebrowser.createBtn":"作成","filebrowser.uploadFile":"ファイルをアップロード","filebrowser.uploadToCurrentDir":"現在のディレクトリにアップロード","filebrowser.enterSubdirToUpload":"サブディレクトリに移動してからアップロードしてください","filebrowser.folderNamePlaceholder":"フォルダ名","filebrowser.uploadPendingTo":"「{name}」を現在のディレクトリにアップロード","filebrowser.enterSubdirFirst":"(先にサブディレクトリに移動してください)","filebrowser.upload":"アップロード","filebrowser.savedToDownloads":"「{name}」を「ダウンロード」フォルダに保存しました。ファイルマネージャーで確認できます","filebrowser.noMatches":"一致するファイルまたはディレクトリがありません","filebrowser.tooMany":"合計 {total} 件、最初の {shown} 件のみ表示——パス欄にキーワードを入力してフィルタできます","filebrowser.previewUnsupported":"このファイルタイプのプレビューはサポートされていません。右のボタンでダウンロードできます","filebrowser.copyAbsPath":"絶対パスをコピー","filebrowser.download":"ダウンロード","filebrowser.pickThisDir":"このディレクトリを選択 {path}","filebrowser.downloadConfirm":"{name} をダウンロードしますか?","filemanager.files":"ファイル","filemanager.closeTab":"タブを閉じる","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"ディレクトリ","git.errReadRepo":"リポジトリを読み込めませんでした","git.errLoad":"読み込みに失敗しました","git.noRepoInDir":"このディレクトリにはまだ git リポジトリがありません — 別のディレクトリを選ぶか、ここで git init してください。","git.outsideRoots":"このフォルダは handmux がアクセスできる範囲外です — ホームディレクトリと /tmp のみ開けます。リポジトリをホーム配下に移すとここで閲覧できます。","git.errReadDir":"ディレクトリを読み込めませんでした","git.commitDetail":"コミット詳細","git.diff":"差分","git.bindRepo":"リポジトリを紐付け","git.collapse":"折りたたむ","git.currentBranch":"現在のブランチ","git.switchViewedBranch":"表示するブランチを切り替え","git.switchBranch":"ブランチを切り替え","git.noBranches":"ブランチがありません","git.noRepoBound":"リポジトリが紐付けられていません。左上の「+」をタップしてディレクトリを選択してください。","git.changes":"変更","git.commits":"コミット","git.pullToLoadMore":"引っ張ってさらに読み込む","git.pickerHint":"ディレクトリを選択すると、その中の git リポジトリを自動的に検索します","git.cleanTree":"ワーキングツリーはクリーンです","git.noCommits":"コミットがありません","git.noDiff":"差分なし","git.fontSmaller":"フォントを縮小","git.fontLarger":"フォントを拡大","git.diffTruncated":"差分が大きすぎるため、切り捨てられました","cmd.panel":"コマンドパネル","cmd.title":"コマンド","cmd.empty":"コマンドがありません。送信するか、よく使うものを保存してください","cmd.favorites":"お気に入り","cmd.scopeGlobal":"グローバル · 全セッション","cmd.recent":"最近","cmd.scopeSession":"このセッションのみ","cmd.favorite":"お気に入りに追加","cmd.unfavorite":"お気に入りから削除","doc.home":"最近","doc.read":"読み上げ","doc.pauseRead":"一時停止","doc.resumeRead":"再開","doc.stopRead":"読み上げを停止","doc.rate":"読み上げ速度","doc.fontSmaller":"フォントを縮小","doc.fontLarger":"フォントを拡大","inbox.view.working":"進行中","inbox.view.done":"完了","inbox.view.needs":"要対応","push.unsupported":"プッシュ通知には Chrome または Safari が必要です","push.iosAddToHome":"iOS では先にこのサイトを「ホーム画面に追加」し、ホーム画面のアイコンから開いてください","a2hs.title":"handmux をホーム画面に追加","a2hs.lead":"アプリのように全画面で開けます。iPhone では、pane があなたを必要とするときの通知もこれで届きます。","a2hs.install":"handmux をインストール","a2hs.ios1":"Safari の共有ボタン(⬆︎ の四角)をタップ。","a2hs.ios2":"「その他」をタップ、または下にスクロール。","a2hs.ios3":"「ホーム画面に追加」を選び、「追加」をタップ。","a2hs.iosHint":"Safari で:共有 → その他 → ホーム画面に追加。","a2hs.iosOpenSafari":"現在 Safari ではありません。Safari でこのページを開いてからホーム画面に追加してください(他の iOS ブラウザではインストールできません)。","a2hs.androidManual":"ブラウザのメニュー(⋮)から「ホーム画面に追加」または「アプリをインストール」を選択。","a2hs.later":"あとで","push.permissionTimeout":"通知権限の結果が返されませんでした。システム設定で handmux またはブラウザの通知権限を確認して再試行してください。","push.permissionDenied":"通知の権限が拒否されました","push.swRegisterTimeout":"通知サービスの登録がタイムアウトしました。接続を確認して再試行してください。","push.swRegisterFailed":"通知サービスを登録できませんでした:{reason}。このサイトのデータを消去し、再度開いてお試しください。","push.swTimeout":"通知サービスは登録されましたが有効化できませんでした。このサイトのデータを消去し、再度開いてお試しください。","push.unknownReason":"原因不明","push.configTimeout":"プッシュ設定の読み込みがタイムアウトしました。handmux サーバーへの接続を確認して再試行してください。","push.browserTimeout":"ブラウザのプッシュサービスが応答しません。Android Chrome では Google Play 開発者サービスが利用可能か確認して再試行してください。","push.noVapid":"サーバーにプッシュ通知(VAPID)が設定されていません","push.reportTimeout":"購読は作成されましたが、サーバーへの登録がタイムアウトしました。接続を確認して再試行してください。","push.subscriptionExpired":"Chrome が期限切れのプッシュ購読を返しました。リセットしたので、もう一度「通知を有効にする」をタップしてください。","push.deliveryRejected":"プッシュサービスが新しい購読を拒否しました。サーバーログを確認して再試行してください。","push.subscribeFailed":"サブスクリプションの登録に失敗しました","push.sendFailed":"送信に失敗しました","pushInbox.loadFailed":"通知を読み込めませんでした。接続を確認して再試行してください。","pushInbox.deleteFailed":"通知を削除できませんでした。メッセージは保持されています。再試行してください。","pushInbox.retry":"再試行","pushInbox.deliveryPending":"送信中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失敗","pushInbox.deliveryReasonExpired":"購読の有効期限切れ","pushInbox.deliveryReasonRateLimited":"プッシュサービスの制限","pushInbox.deliveryReasonUnavailable":"プッシュサービスを利用できません","pushInbox.deliveryReasonRejected":"プッシュサービスが拒否","pushInbox.deliveryReasonNetwork":"ネットワークエラー","pushInbox.deliveryReasonNotConfigured":"プッシュ未設定","pushInbox.deliveryReasonUnknown":"原因不明","api.loadFailed":"読み込みに失敗しました","api.uploadFailed":"アップロードに失敗しました","upload.title":"アップロード中","upload.processing":"送信完了 — サーバーで受信中…","api.uploadBadDir":"そのディレクトリへはアップロードできません","api.uploadDuplicate":"同名のファイルが既に存在します","api.uploadTooLarge":"ファイルが大きすぎます(上限 50MB)","api.uploadBadType":"サポートされていないファイルタイプです","time.secAgo":"{n}秒前","time.minAgo":"{n}分前","time.hourAgo":"{n}時間前","time.dayAgo":"{n}日前","time.expired":"期限切れ","time.minutes":"{n} 分","workspace.bootDetected":"コンピュータの再起動を検出しました","workspace.tmuxDetected":"tmux の再起動を検出しました","workspace.summary":"前回のワークスペース · {sessions} セッション · {time} に保存","workspace.restoreLast":"前回のワークスペースを復元","workspace.partialCard":"残り {failures} セッションの確認が必要です","workspace.unknownTime":"時刻不明","workspace.savedAt":"{time} に保存","workspace.topologySummary":"{sessions} セッション · {windows} ウィンドウ · {panes} ペイン","workspace.planSummary":"{restore} セッションを復元;{already} セッションは既に存在します","workspace.renameRule":"同名のセッションが現在存在する場合にのみ、復元名に -restored が付きます。","workspace.nonDestructive":"現在のセッションは変更、名前変更、停止されません。","workspace.progress":"復元中 {completed} / {total}…","workspace.progressDone":"復元済み {completed} / {total}","workspace.complete":"ワークスペースを復元しました。","workspace.completedSummary":"今回の復元:{sessions} セッション · {windows} ウィンドウ · {panes} ペイン","workspace.rebindHint":"復元したセッションは自動表示されません。この端末にバインドするセッションを選択できます。","workspace.rebind":"セッションを再バインド","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"不明なセッション","workspace.restore":"復元","workspace.ignore":"このバックアップを無視","workspace.protectionTitle":"ワークスペースは保護されていません","workspace.protection.live-corrupt":"ワークスペース状態のコピーが破損しています。ディスクと ~/.handmux の権限を確認し、handmux を再起動してください。","workspace.protection.live-unavailable":"ワークスペース状態を読み書きできません。空き容量と ~/.handmux の権限を確認し、handmux を再起動してください。","workspace.protection.unknown":"バックグラウンドスナップショットを利用できません。コンピュータの handmux ログを確認してください。","workspace.error.restore-interrupted":"復元が中断されました;このバックアップを再試行してください","workspace.error.checkpoint-not-found":"このバックアップは利用できません;更新して別のバックアップを選んでください","workspace.error.storage-full":"ストレージの空きがありません;空き容量を増やして再試行してください","workspace.error.permission-denied":"ワークスペースを書き込めません;権限を確認して再試行してください","workspace.error.plan-failed":"復元計画が変わりました;更新して再試行してください","workspace.error.agent-unavailable":"Agent を再開できません;復元した shell を開いて手動で再試行してください","workspace.error.tmux-unavailable":"tmux を利用できません;tmux が起動中か確認して再試行してください","workspace.error.restore-failed":"セッションを復元できませんでした;handmux ログを確認して再試行してください","workspace.error.operation-not-found":"この復元処理は利用できません。バックアップの復元をやり直してください","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"作業ディレクトリを使用できなかったため、ホームディレクトリに復元しました","workspace.warning.layout-fallback":"ペイン配置を完全に復元できなかったため、既定の配置を維持しました","workspace.warning.agent-warning":"Agent を自動再開できませんでした。復元したシェルは利用できます","workspace.warning.live-reconcile-failed":"現在のワークスペース状態を照合できませんでした。handmux ログを確認してください","workspace.warning.workspace-unavailable":"ワークスペースストレージを一時的に利用できません。空き容量と権限を確認してください","workspace.warning.restore-warning":"復元は完了しましたが、確認が必要な警告があります"},sM={"terminal.disconnected":"연결이 끊겼습니다. 다시 연결하는 중…","terminal.paneMissing":"이 창이 닫혔습니다. 다른 창으로 전환하세요.","common.save":"저장","common.cancel":"취소","common.confirm":"확인","common.ok":"확인","common.close":"닫기","common.delete":"삭제","common.copy":"복사","common.rename":"이름 변경","common.create":"새로 만들기","common.back":"뒤로","common.open":"열기","common.loading":"로드 중…","common.done":"완료","token.title":"액세스 토큰이 필요합니다","token.placeholder":"HANDMUX_TOKEN 붙여넣기","settings.language":"언어 Language","home.empty":"열린 파일이 없습니다","home.emptyHint":"「새로 만들기」 탭에서 파일을 선택하세요","home.remove":"제거","drawer.empty":"연결된 세션이 없습니다","drawer.unbind":"연결 해제","drawer.bind":"세션 연결","drawer.logout":"로그아웃","windowbar.newWindow":"새 창","rename.new_name":"새 이름","rename.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","rename.failed":"이름 변경에 실패했습니다. 다시 시도하세요","rename.saving":"저장 중…","newwindow.title":"새 창","newwindow.window_name":"창 이름(선택 사항)","newwindow.name_placeholder":"비워두면 자동 이름 지정 · 영문/숫자/하이픈 ≤16","newwindow.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","newwindow.start_dir":"시작 디렉토리","newwindow.session_dir_named":"{dir}(세션 디렉토리)","newwindow.session_dir_default":"세션 디렉토리(기본값)","newwindow.choose":"선택","newwindow.reset_to_session_dir":"세션 디렉토리로 초기화","newwindow.creating":"생성 중…","startup.label":"시작 명령(선택 사항)","startup.aria":"시작 명령","startup.preset_shell":"빈 셸(기본값)","startup.preset_claude":"claude(Claude Code 시작)","startup.preset_claude_continue":"claude -c(이전 세션 이어서)","startup.preset_codex":"codex(Codex CLI 시작)","startup.custom":"사용자 정의…","startup.custom_placeholder":'예:claude "로그인 버그 수정"',"bind.title":"세션 연결","bind.sessionName":"세션 이름","bind.pickSession":"연결할 세션 선택","bind.newSession":"+ 새 세션","bind.modeNew":"새 세션","bind.modeExisting":"기존 세션","bind.alreadyExists":"이미 존재하는 세션입니다","bind.bind":"연결","bind.checking":"확인 중…","bind.createAndOpen":"생성 후 열기","bind.creating":"생성 중…","bind.createHint":"세션「{name}」이 존재하지 않습니다. 「생성 후 열기」를 탭하여 생성하세요","bind.alreadyBound":"이미 연결된 세션입니다","bind.createFailed":"생성에 실패했습니다. 다시 시도하세요","bind.invalidName":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","bind.desktopHint":"여기의 세션(폰에서 만든 것 포함)은 컴퓨터에서 명령 하나로 이어받을 수 있습니다: handmux open <이름>","bind.checkFailed":"확인에 실패했습니다. 다시 시도하세요","bind.startDir":"시작 디렉토리","bind.homeDirDefault":"홈 디렉토리(기본값)","bind.choose":"선택","bind.reset":"초기화","actionsheet.confirmAgain":"확인하시겠습니까? 한 번 더 탭하세요","dirpicker.title":"디렉토리 선택","inbox.title":"받은 편지함","inbox.working":"진행 중","inbox.done":"완료","inbox.needs":"확인 필요","inbox.clearDone":"완료 항목 지우기","inbox.empty":"패널 상태 없음","inbox.enableTitle":"AI 세션 알림 활성화","inbox.enableHint":"각 Claude / Codex 패널을 「진행 중」「확인 필요」「완료」로 표시하고, 확인이 필요할 때 푸시 알림을 보냅니다.","inbox.enableBtn":"활성화","inbox.enabling":"활성화 중…","inbox.enableFailed":"활성화에 실패했습니다——서버 로그를 확인하세요.","idea.title":"아이디어","idea.editPlaceholder":"아이디어 편집…","idea.addPlaceholder":"아이디어를 기록하세요…","idea.add":"추가","idea.empty":"아직 아이디어가 없습니다. 하나 기록해보세요","idea.dragSort":"드래그하여 정렬","idea.fillInput":"입력창에 삽입","idea.send":"보내기","doclink.title":"파일 열기","changelog.title":"새 기능","preview.dynamic":"동적 미리보기","preview.static":"정적 미리보기","preview.remainTitle":"남은 유효 기간 — 탭하여 갱신 / 중지","preview.toPcView":"PC 보기로 전환","preview.toMobileView":"모바일 보기로 전환","preview.pcView":"PC 보기","preview.mobileView":"모바일 보기","preview.refresh":"새로 고침","preview.minimize":"최소화","preview.ttlDialog":"미리보기 유효 기간","preview.renew":"갱신(1시간으로 초기화)","preview.stop":"미리보기 중지","preview.iframeTitle":"미리보기","preview.zoomOut":"축소","preview.zoomIn":"확대","imageviewer.loadFailed":"이미지를 불러오지 못했습니다","imageviewer.saved":"저장되었습니다. 사진 앱 또는 「다운로드」에서 확인할 수 있습니다","imageviewer.shareUnsupported":"이미지 공유는 Chrome 또는 Safari가 필요합니다","imageviewer.zoomOut":"축소","imageviewer.zoomIn":"확대","imageviewer.imageTitle":"이미지","imageviewer.saveImage":"이미지 저장","imageviewer.shareImage":"이미지 공유","mic.stop":"음성 입력 중지","mic.start":"음성 입력","dock.send":"보내기","dock.send.hint":"탭하여 보내기 · 길게 눌러 삽입","dock.phrases":"자주 쓰는 문구","dock.attach":"첨부","dock.history":"기록","history.empty":"기록이 아직 없습니다","history.scope":"현재 창의 기록만","dock.input.placeholder":"초안 영역","dock.input.enterDraft":"Shift + Enter로 초안 모드 열기","dock.input.exitDraft":"Esc로 터미널 모드 돌아가기 · Shift + Enter로 줄바꿈","dock.command.placeholder":"명령 입력 · Enter로 실행","dock.mode.agent":"대화","dock.mode.toggle":"입력 모드 전환","dock.mode.command":"명령 모드","dock.mode.chat":"채팅 모드","fav.title":"자주 쓰기","fav.add":"추가","fav.addPlaceholder":"자주 쓰는 항목 추가…","dock.upload.aria":"파일 업로드","dock.upload.title":"파일 업로드(홈 업로드 폴더에 저장, 프로젝트에는 포함되지 않음)","dock.upload.progress":"{name}{tag} 업로드 중","dock.upload.failed":"업로드 실패:{names}","app.nameExists":"해당 이름은 이미 사용 중입니다","app.renameFailed":"이름 변경에 실패했습니다. 다시 시도하세요","app.deleteFailed":"삭제에 실패했습니다. 다시 시도하세요","app.moveFailed":"이동에 실패했습니다. 다시 시도하세요","app.sessionGone":"세션「{name}」이 존재하지 않습니다. 이미 닫혔을 수 있습니다","app.docNotFound":"파일이 존재하지 않습니다","app.docTooLarge":"파일이 너무 큽니다(2MB 초과)","app.docUnsupported":"지원되지 않는 파일 또는 경로","app.docOpenFailed":"열기에 실패했습니다. 다시 시도하세요","app.preview":"미리보기","app.openPreview":"미리보기 열기","app.ideas":"아이디어","app.files":"파일","app.settings":"설정","app.renameSession":"세션 이름 변경","app.renameWindow":"창 이름 변경","app.moveLeft":"◀ 왼쪽으로 이동","app.moveRight":"오른쪽으로 이동 ▶","app.deleteWindow":"창 삭제","pane.splitH":"좌우 분할","pane.splitV":"상하 분할","pane.manage":"분할 관리","pane.close":"창 닫기","pane.closeConfirm":"닫을까요? 다시 탭","pane.splitFailed":"분할 실패","pane.closeFailed":"닫기 실패","app.deleteLastWindowConfirm":"마지막 창입니다. 삭제하면 전체 세션이 닫힙니다!한 번 더 탭하세요","app.deleteConfirm":"삭제하시겠습니까? 한 번 더 탭하세요","app.cannotLocate":"위치를 찾을 수 없습니다","app.pickItsDir":",디렉토리를 선택하세요:","app.noBoundSession":"연결된 세션이 없습니다","app.tapToBind":"탭하여 연결","app.selectSessionHint":"왼쪽 상단의 ☰ 를 탭하여 세션 선택","app.backToExit":"한 번 더 뒤로가기를 누르면 종료됩니다","settings.title":"설정","settings.group_global":"전체 설정","settings.font_size":"글꼴 크기","settings.font_decrease":"글꼴 축소","settings.font_increase":"글꼴 확대","settings.font_auto":"자동 조정","settings.font_auto_title":"높이에 맞게 자동 조정","settings.keyboard_mode":"키보드 모드","settings.keyboard_mode_auto":"자동 감지","settings.keyboard_mode_mobile":"모바일","settings.keyboard_mode_desktop":"데스크톱","settings.keyboard_mode_hint":"현재 브라우저에만 적용됩니다. 감지가 틀리면 직접 선택하세요.","settings.path_highlight":"파일 경로 강조","settings.path_highlight_hint":"터미널에서 탭 가능한 파일 경로에 색을 입힙니다. 꺼져 있어도 경로는 탭할 수 있습니다.","settings.whats_new":"새 기능","settings.view_changelog":"변경 내역 보기","settings.has_update":"업데이트 있음","settings.version":"버전","settings.feedback":"피드백","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat 그룹","settings.feedback_hint":"버그와 아이디어 모두 환영 — Issue는 추적되고 답변됩니다.","settings.update_available":"버전 {v} 사용 가능","settings.update_more":"이전 버전 업데이트 {n}개 더 보기","settings.update_how":"컴퓨터에서 실행:","settings.push_notifications":"푸시 알림","settings.notify_on":"활성화됨 ✓","settings.notify_enable":"기기 알림 활성화","settings.notify_enabled":"활성화되었습니다. 환영 알림이 도착할 것입니다","settings.notify_disabled":"비활성화됨","settings.notify_failed":"작업에 실패했습니다","settings.processing":"처리 중","settings.push_hint":"「확인 필요」및「완료」를 모니터링:관심 세션에서 승인/응답이 필요하거나 한 라운드가 완료되면 이 기기로 알림을 보냅니다.","settings.push_unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","settings.group_session":"현재 세션 설정","settings.screen_cols":"화면 열 수","settings.cols_dec":"감소","settings.cols_dec_title":"열 수 감소","settings.cols_inc":"증가","settings.cols_inc_title":"열 수 증가","settings.cols_restore":"기본값","settings.cols_restore_title":"창 기본 크기로 복원","settings.preview_site":"미리보기 사이트","settings.preview_static_site":"정적 사이트 미리보기","settings.preview_running_dynamic":"동적 미리보기 실행 중","settings.preview_running_static":"정적 미리보기 실행 중","settings.preview_remain_title":"남은 유효 기간","settings.preview_remain":"남은 시간 {time}","settings.preview_renew":"갱신","settings.preview_confirm_stop":"중지 확인","settings.preview_stop":"중지","settings.preview_name":"이름:{name}","settings.preview_port":"(포트:{port})","settings.preview_type":"미리보기 유형","settings.preview_off":"비활성화","settings.preview_static":"정적","settings.preview_dynamic":"동적","settings.preview_off_hint":"미리보기가 비활성화되어 있습니다. 「정적」을 선택하여 시작하세요.","settings.preview_off_hint_both":"미리보기가 비활성화되어 있습니다. 「정적」또는「동적」을 선택하여 시작하세요.","settings.preview_dynamic_disabled":"동적 포트 미리보기가 비활성화되어 있습니다. 활성화하려면:와일드카드 미리보기 도메인(previewDomain, 예:*.example.com)을 게이트웨이로 지정하고 TLS 인증서를 설정하세요. Cloudflare /자체 서명 인증서 차이는 README를 참조하세요.","settings.preview_pick_dir":"디렉토리를 선택하여 시작","settings.preview_static_hint":"index.html이 포함된 디렉토리를 선택하여 스마트폰에서 미리보기.","settings.preview_port_placeholder":"포트 번호(예:3000)","settings.preview_port_label":"포트","settings.preview_starting":"시작 중…","settings.preview_start":"시작","settings.preview_dynamic_hint":"로컬에서 실행 중인 포트(dev 서버 / 백엔드)를 입력하면 스마트폰에서 서브도메인을 통해 직접 접속할 수 있습니다.","settings.dir_picker_hint":"미리볼 정적 사이트 디렉토리 선택(index.html 포함)","settings.err_port_not_listening":"해당 포트가 수신 대기 중이지 않습니다. 서비스가 시작되었는지 확인하세요","settings.err_bad_port":"포트 번호가 유효하지 않습니다(1–65535)","settings.err_dynamic_disabled":"동적 미리보기가 비활성화되어 있습니다","settings.err_start_failed":"시작에 실패했습니다","localurl.title":"프록시를 활성화하여 미리보기","localurl.open":"프록시 활성화","localurl.disabled":"동적 미리보기가 비활성화되어 있습니다. 설정에서 미리보기 도메인을 구성하면 로컬 포트를 프록시할 수 있습니다.","localurl.notListening":"포트 :{port}에서 수신 중인 서비스가 없습니다.","localurl.badProtocol":"이 링크는 프록시할 수 있는 HTTP 또는 HTTPS 주소가 아닙니다.","localurl.network":"handmux 서비스에 연결할 수 없습니다. 네트워크를 확인한 후 다시 시도하세요.","localurl.failed":"미리보기를 시작할 수 없습니다: {reason}. 설정을 확인한 후 다시 시도하세요.","filebrowser.openDirFailed":"디렉토리를 열 수 없습니다","filebrowser.copiedPath":"경로가 복사되었습니다:{abs}","filebrowser.mkdirFailed":"디렉토리 생성에 실패했습니다(이름이 유효하지 않거나 이미 존재합니다)","filebrowser.downloading":"{name} 다운로드 중","filebrowser.downloadFailed":"다운로드에 실패했습니다","filebrowser.uploading":"{name}{tag} 업로드 중","filebrowser.uploadFailed":"업로드에 실패했습니다","filebrowser.uploadPartialFailed":"다음 파일 업로드에 실패했습니다:{names}","filebrowser.sessionDir":"세션 디렉토리","filebrowser.jumpToSessionDir":"현재 세션 디렉토리로 이동","filebrowser.parentDir":"상위 디렉토리","filebrowser.rootSelect":"루트 디렉토리 전환(홈 / 임시)","filebrowser.pathPlaceholder":"경로 입력(실시간 필터 / 이동)","filebrowser.newFolder":"새 폴더","filebrowser.createBtn":"생성","filebrowser.uploadFile":"파일 업로드","filebrowser.uploadToCurrentDir":"현재 디렉토리에 업로드","filebrowser.enterSubdirToUpload":"하위 디렉토리로 이동한 후 업로드하세요","filebrowser.folderNamePlaceholder":"폴더 이름","filebrowser.uploadPendingTo":"「{name}」을 현재 디렉토리에 업로드","filebrowser.enterSubdirFirst":"(먼저 하위 디렉토리로 이동하세요)","filebrowser.upload":"업로드","filebrowser.savedToDownloads":"「{name}」이 「다운로드」 폴더에 저장되었습니다. 파일 관리자에서 확인할 수 있습니다","filebrowser.noMatches":"일치하는 파일 또는 디렉토리가 없습니다","filebrowser.tooMany":"총 {total}개, 처음 {shown}개만 표시——경로 입력창에 키워드를 입력하여 필터할 수 있습니다","filebrowser.previewUnsupported":"이 파일 유형의 미리보기는 지원되지 않습니다. 오른쪽 버튼으로 다운로드할 수 있습니다","filebrowser.copyAbsPath":"절대 경로 복사","filebrowser.download":"다운로드","filebrowser.pickThisDir":"이 디렉토리 선택 {path}","filebrowser.downloadConfirm":"{name}을 다운로드하시겠습니까?","filemanager.files":"파일","filemanager.closeTab":"탭 닫기","filemanager.minimize":"최소화","filemanager.recent":"최근","filemanager.directory":"디렉토리","git.errReadRepo":"저장소를 읽을 수 없습니다","git.errLoad":"불러오기에 실패했습니다","git.noRepoInDir":"아직 git 저장소가 없습니다 — 다른 디렉토리를 선택하거나 여기서 git init 하세요.","git.outsideRoots":"이 폴더는 handmux가 열 수 있는 범위 밖입니다 — 홈 디렉토리와 /tmp만 접근할 수 있습니다. 저장소를 홈 디렉토리 아래로 옮기면 여기서 볼 수 있습니다.","git.errReadDir":"디렉토리를 읽을 수 없습니다","git.commitDetail":"커밋 상세","git.diff":"변경 사항","git.bindRepo":"저장소 연결","git.collapse":"접기","git.currentBranch":"현재 브랜치","git.switchViewedBranch":"표시할 브랜치 전환","git.switchBranch":"브랜치 전환","git.noBranches":"브랜치가 없습니다","git.noRepoBound":"저장소가 연결되지 않았습니다. 왼쪽 상단의 「+」를 탭하여 디렉토리를 선택하세요.","git.changes":"변경사항","git.commits":"커밋","git.pullToLoadMore":"당겨서 더 불러오기","git.pickerHint":"디렉토리를 선택하면 그 안의 git 저장소를 자동으로 찾습니다","git.cleanTree":"작업 트리가 깨끗합니다","git.noCommits":"커밋이 없습니다","git.noDiff":"변경 사항 없음","git.fontSmaller":"글꼴 축소","git.fontLarger":"글꼴 확대","git.diffTruncated":"변경 사항이 너무 커서 잘렸습니다","cmd.panel":"명령 패널","cmd.title":"명령","cmd.empty":"명령이 없습니다. 보내거나 자주 쓰는 것을 저장하세요","cmd.favorites":"즐겨찾기","cmd.scopeGlobal":"전체 · 모든 세션","cmd.recent":"최근","cmd.scopeSession":"현재 세션만","cmd.favorite":"즐겨찾기 추가","cmd.unfavorite":"즐겨찾기 해제","doc.home":"최근","doc.read":"읽어주기","doc.pauseRead":"읽기 일시 정지","doc.resumeRead":"읽기 재개","doc.stopRead":"읽기 중지","doc.rate":"읽기 속도","doc.fontSmaller":"글꼴 축소","doc.fontLarger":"글꼴 확대","inbox.view.working":"진행 중","inbox.view.done":"완료","inbox.view.needs":"확인 필요","push.unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","push.iosAddToHome":"iOS에서는 먼저 이 사이트를 「홈 화면에 추가」한 후 홈 화면 아이콘에서 열어주세요","a2hs.title":"handmux를 홈 화면에 추가","a2hs.lead":"앱처럼 전체 화면으로 열 수 있습니다. iPhone에서는 pane이 당신을 필요로 할 때의 푸시도 이 방식으로 전달됩니다.","a2hs.install":"handmux 설치","a2hs.ios1":"Safari의 공유 버튼(⬆︎ 상자)을 탭하세요.","a2hs.ios2":"「더 보기」를 탭하거나 목록을 아래로 스크롤하세요.","a2hs.ios3":"「홈 화면에 추가」를 선택한 뒤 「추가」를 탭하세요.","a2hs.iosHint":"Safari에서: 공유 → 더 보기 → 홈 화면에 추가.","a2hs.iosOpenSafari":"현재 Safari가 아닙니다. Safari에서 이 페이지를 연 뒤 홈 화면에 추가하세요 — 다른 iOS 브라우저는 설치할 수 없습니다.","a2hs.androidManual":"브라우저 메뉴(⋮)에서 「홈 화면에 추가」 또는 「앱 설치」를 선택하세요.","a2hs.later":"나중에","push.permissionTimeout":"알림 권한 결과가 반환되지 않았습니다. 시스템 설정에서 handmux 또는 브라우저의 알림 권한을 확인한 후 다시 시도하세요.","push.permissionDenied":"알림 권한이 거부되었습니다","push.swRegisterTimeout":"알림 서비스 등록 시간이 초과되었습니다. 연결을 확인한 후 다시 시도하세요.","push.swRegisterFailed":"알림 서비스를 등록하지 못했습니다: {reason}. 이 사이트의 데이터를 삭제하고 다시 열어 시도하세요.","push.swTimeout":"알림 서비스가 등록되었지만 활성화되지 않았습니다. 이 사이트의 데이터를 삭제하고 다시 열어 시도하세요.","push.unknownReason":"알 수 없는 원인","push.configTimeout":"푸시 설정을 불러오는 시간이 초과되었습니다. handmux 서버 연결을 확인한 후 다시 시도하세요.","push.browserTimeout":"브라우저 푸시 서비스가 응답하지 않습니다. Android Chrome에서는 Google Play 서비스를 사용할 수 있는지 확인한 후 다시 시도하세요.","push.noVapid":"서버에 푸시 알림(VAPID)이 설정되지 않았습니다","push.reportTimeout":"구독은 생성되었지만 서버 등록 시간이 초과되었습니다. 연결을 확인한 후 다시 시도하세요.","push.subscriptionExpired":"Chrome이 만료된 푸시 구독을 반환했습니다. 구독을 초기화했으니 알림 켜기를 다시 누르세요.","push.deliveryRejected":"푸시 서비스가 새 구독을 거부했습니다. 서버 로그를 확인한 후 다시 시도하세요.","push.subscribeFailed":"구독 등록에 실패했습니다","push.sendFailed":"전송에 실패했습니다","pushInbox.loadFailed":"알림을 불러오지 못했습니다. 연결을 확인한 후 다시 시도하세요.","pushInbox.deleteFailed":"알림을 삭제하지 못했습니다. 메시지는 유지됩니다. 다시 시도하세요.","pushInbox.retry":"다시 시도","pushInbox.deliveryPending":"전송 중","pushInbox.deliverySuccess":"성공","pushInbox.deliveryFailed":"실패","pushInbox.deliveryReasonExpired":"구독 만료","pushInbox.deliveryReasonRateLimited":"푸시 서비스 요청 제한","pushInbox.deliveryReasonUnavailable":"푸시 서비스를 사용할 수 없음","pushInbox.deliveryReasonRejected":"푸시 서비스가 거부함","pushInbox.deliveryReasonNetwork":"네트워크 오류","pushInbox.deliveryReasonNotConfigured":"푸시가 설정되지 않음","pushInbox.deliveryReasonUnknown":"알 수 없는 원인","api.loadFailed":"불러오기에 실패했습니다","api.uploadFailed":"업로드에 실패했습니다","upload.title":"업로드 중","upload.processing":"전송 완료 — 서버에서 수신 중…","api.uploadBadDir":"해당 디렉토리에는 업로드할 수 없습니다","api.uploadDuplicate":"같은 이름의 파일이 이미 존재합니다","api.uploadTooLarge":"파일이 너무 큽니다(최대 50MB)","api.uploadBadType":"지원되지 않는 파일 유형입니다","time.secAgo":"{n}초 전","time.minAgo":"{n}분 전","time.hourAgo":"{n}시간 전","time.dayAgo":"{n}일 전","time.expired":"만료됨","time.minutes":"{n}분","workspace.bootDetected":"컴퓨터 재시작이 감지되었습니다","workspace.tmuxDetected":"tmux 재시작이 감지되었습니다","workspace.summary":"이전 작업 공간 · 세션 {sessions}개 · {time} 저장","workspace.restoreLast":"이전 작업 공간 복원","workspace.partialCard":"세션 {failures}개를 더 확인해야 합니다","workspace.unknownTime":"알 수 없는 시간","workspace.savedAt":"{time} 저장","workspace.topologySummary":"세션 {sessions}개 · 창 {windows}개 · 패널 {panes}개","workspace.planSummary":"세션 {restore}개 복원;{already}개는 이미 존재","workspace.renameRule":"현재 같은 이름의 세션이 있을 때만 복원 이름에 -restored 접미사가 붙습니다.","workspace.nonDestructive":"현재 세션은 수정하거나 이름을 바꾸거나 중지하지 않습니다.","workspace.progress":"복원 중 {completed} / {total}…","workspace.progressDone":"복원됨 {completed} / {total}","workspace.complete":"작업 공간을 복원했습니다.","workspace.completedSummary":"이번 복원: 세션 {sessions}개 · 창 {windows}개 · 패널 {panes}개","workspace.rebindHint":"복원된 세션은 자동으로 표시되지 않습니다. 이 휴대폰에 연결할 세션을 다시 선택할 수 있습니다.","workspace.rebind":"세션 다시 연결","workspace.sessionFailure":"{session}: {reason}","workspace.unknownSession":"알 수 없는 세션","workspace.restore":"복원","workspace.ignore":"이 백업 무시","workspace.protectionTitle":"작업 공간이 보호되지 않음","workspace.protection.live-corrupt":"작업 공간 상태 사본이 손상되었습니다. 디스크와 ~/.handmux 권한을 확인한 뒤 handmux를 재시작하세요.","workspace.protection.live-unavailable":"작업 공간 상태를 읽거나 쓸 수 없습니다. 디스크 여유 공간과 ~/.handmux 권한을 확인한 뒤 handmux를 재시작하세요.","workspace.protection.unknown":"백그라운드 스냅샷을 사용할 수 없습니다. 컴퓨터의 handmux 로그를 확인하세요.","workspace.error.restore-interrupted":"복원이 중단되었습니다. 이 백업을 다시 시도하세요","workspace.error.checkpoint-not-found":"이 백업을 더 이상 사용할 수 없습니다. 새로 고친 뒤 다른 백업을 선택하세요","workspace.error.storage-full":"작업 공간 저장소가 가득 찼습니다. 디스크 공간을 확보한 뒤 다시 시도하세요","workspace.error.permission-denied":"작업 공간 저장소에 쓸 수 없습니다. 권한을 확인한 뒤 다시 시도하세요","workspace.error.plan-failed":"복원 계획이 변경되었습니다. 새로 고친 뒤 다시 시도하세요","workspace.error.agent-unavailable":"Agent를 재개할 수 없습니다. 복원된 shell을 열고 수동으로 다시 시도하세요","workspace.error.tmux-unavailable":"tmux를 사용할 수 없습니다. tmux 실행 여부를 확인한 뒤 다시 시도하세요","workspace.error.restore-failed":"세션을 복원하지 못했습니다. handmux 로그를 확인한 뒤 다시 시도하세요","workspace.error.operation-not-found":"이 복원 작업을 더 이상 사용할 수 없습니다. 백업 복원을 다시 시작하세요","workspace.sessionWarning":"{session}: {reason}","workspace.warning.cwd-fallback":"작업 디렉터리를 사용할 수 없어 홈 디렉터리에 복원했습니다","workspace.warning.layout-fallback":"창 분할 배치를 완전히 복원하지 못해 기본 배치를 유지했습니다","workspace.warning.agent-warning":"Agent를 자동으로 재개하지 못했습니다. 복원된 셸은 계속 사용할 수 있습니다","workspace.warning.live-reconcile-failed":"현재 작업 공간 상태를 대조하지 못했습니다. handmux 로그를 확인하세요","workspace.warning.workspace-unavailable":"작업 공간 저장소를 일시적으로 사용할 수 없습니다. 디스크 공간과 권한을 확인하세요","workspace.warning.restore-warning":"복원 중 확인이 필요한 경고가 발생했습니다"},M_={zh:nM,"zh-TW":iM,en:GS,ja:rM,ko:sM},e1=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],qS="tw_lang";function aM(i,s,l=M_){if(i&&l[i])return i;for(const m of s&&s.length?s:["en"]){const S=String(m).toLowerCase();if(l[S])return S;const D=S.split("-")[0];if(l[D])return D}return"en"}function oM(i,s,l,m){let S=i&&i[l]!=null?i[l]:s&&s[l]!=null?s[l]:l;return m&&(S=S.replace(/\{(\w+)\}/g,(D,b)=>m[b]!=null?m[b]:`{${b}}`)),S}const lM=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,cM=()=>{try{return localStorage.getItem(qS)}catch{return null}};let mf=aM(cM(),lM());function U(i,s){return oM(M_[mf],GS,i,s)}function vo(){return mf}function uM(i){if(!(!M_[i]||i===mf)){try{localStorage.setItem(qS,i)}catch{}mf=i,typeof location<"u"&&location.reload()}}const U_="tw_token",O_="tw_font",Cd="tw_bound",ff="tw_last_session",V_="tw_win",P_="tw_pane",I_="tw_favs",dM="tw_recent",hM=30,pf="tw_inbox_seen",YS="tw_inbox_read_ts",B_="tw_browse_dir",F_="tw_preview_dir",KS="tw_startup_cmd",r_="tw_chat_draft",XS="tw_chat_tone",s_="tw_chat_lens",mM="tw_ideas",JS="tw_changelog_seen",ZS="tw_version_seen",Rf="tw_git_repos",fM="tw_git_dirs",a_="tw_workspace_prompt",QS="tw_workspace_applied_mappings",pM=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,t1={sessions:/^\$\d+$/,windows:/^@\d+$/,panes:/^%\d+$/},hd=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),go=()=>localStorage.getItem(U_),vM=i=>localStorage.setItem(U_,i),gM=()=>localStorage.removeItem(U_);function ma(){try{const i=JSON.parse(localStorage.getItem(Cd));return Array.isArray(i)?i.filter(s=>typeof s=="string"):[]}catch{return[]}}function o_(i){const s=ma();return s.includes(i)||s.push(i),localStorage.setItem(Cd,JSON.stringify(s)),s}function n1(i){const s=ma().filter(l=>l!==i);return localStorage.setItem(Cd,JSON.stringify(s)),s}function bM(i){const s=new Set((Array.isArray(i)?i:[]).filter(m=>(m==null?void 0:m.status)==="restored"&&typeof m.targetName=="string"&&m.targetName).map(m=>m.targetName)),l=ma().filter(m=>!s.has(m));return localStorage.setItem(Cd,JSON.stringify(l)),l}function _M(i,s){const l=ma().map(m=>m===i?s:m);return localStorage.setItem(Cd,JSON.stringify(l)),H_.renameSession(i,s),Tf.renameSession(i,s),l}function $r(i){try{const s=JSON.parse(localStorage.getItem(i));return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}catch{return{}}}function bo(i,s,l){const m=$r(i);m[s]=l,localStorage.setItem(i,JSON.stringify(m))}function eE(i,s){if(!i)return{};const l=$r(a_),m=l[i];return l[i]={...m&&typeof m=="object"&&!Array.isArray(m)?m:{},...s},localStorage.setItem(a_,JSON.stringify(l)),l[i]}const yM=i=>{if(!i)return{};const s=$r(a_)[i];return s&&typeof s=="object"&&!Array.isArray(s)?s:{}},i1=i=>eE(i,{autoShown:!0}),wM=i=>eE(i,{ignored:!0,autoShown:!0});function xM(){try{const i=JSON.parse(localStorage.getItem(QS));return Array.isArray(i)?i.filter(s=>typeof s=="string"):[]}catch{return[]}}function cd(i){if(!i||typeof i!="object"||Array.isArray(i))return!1;const s=Object.getPrototypeOf(i);return s===Object.prototype||s===null}function NM(i){try{if(!cd(i)||typeof i.id!="string"||!pM.test(i.id)||i.runtime!==void 0&&!cd(i.runtime)||i.names!==void 0&&!cd(i.names))return null;const s=i.runtime||{};if(Object.keys(s).some(D=>!hd(t1,D)))return null;const l={sessions:{},windows:{},panes:{}};for(const[D,b]of Object.entries(t1)){const a=s[D];if(a!==void 0){if(!cd(a))return null;for(const[d,f]of Object.entries(a)){if(!b.test(d)||typeof f!="string"||!b.test(f))return null;l[D][d]=f}}}const m={};for(const[D,b]of Object.entries(i.names||{})){if(!D||typeof b!="string"||!b)return null;m[D]=b}return Object.keys(m).length>0||Object.values(l).some(D=>Object.keys(D).length>0)?{id:i.id,runtime:l,names:m}:null}catch{return null}}function SM(i){const s=localStorage.getItem(i);if(s===null)return null;try{const l=JSON.parse(s);return cd(l)?{raw:s,value:l}:null}catch{return null}}function Xm(i,s,l={}){const m=SM(i);if(!m)return;const S=m.value,D=Object.keys(s).filter(d=>hd(S,d));if(D.length===0)return;const b={};for(const[d,f]of Object.entries(S))hd(s,d)||(b[d]=f);for(const d of D){const f=s[d],w=S[d];b[f]=typeof w=="string"&&hd(l,w)?l[w]:w}const a=JSON.stringify(b);a!==m.raw&&localStorage.setItem(i,a)}function EM(i){const{sessions:s,windows:l,panes:m}=i;if(Object.keys(s).length>0){const S=localStorage.getItem(ff);S&&hd(s,S)&&localStorage.setItem(ff,s[S]),Xm(V_,s,l)}if(Object.keys(l).length>0){Xm(P_,l,m);for(const S of[Rf,fM,B_,F_])Xm(S,l)}if(Object.keys(m).length>0)for(const S of[W_,pf])Xm(S,m)}function CM(i){const s=NM(i);if(!s)return!1;const l=xM();if(l.includes(s.id))return!1;if(EM(s.runtime),Object.keys(s.names).length>0){const m=ma();for(const[S,D]of Object.entries(s.names))m.includes(S)&&o_(D)}return localStorage.setItem(QS,JSON.stringify([...l,s.id])),!0}function tE(i){const s=l=>l&&typeof l=="object"&&!Array.isArray(l)?l:{};return{get(l,m){return!l||!m?[]:s($r(i)[l])[m]??[]},set(l,m,S){const D=$r(i),b=s(D[l]);return S&&S.length?b[m]=S:delete b[m],Object.keys(b).length?D[l]=b:delete D[l],localStorage.setItem(i,JSON.stringify(D)),S??[]},renameWindow(l,m,S){if(!l||!m||!S||m===S)return;const D=$r(i),b=s(D[l]);b[m]!=null&&(b[S]=b[m],delete b[m],D[l]=b,localStorage.setItem(i,JSON.stringify(D)))},renameSession(l,m){const S=$r(i);S[l]!=null&&(S[m]=S[l],delete S[l],localStorage.setItem(i,JSON.stringify(S)))}}}const H_=tE(dM),Tf=tE(mM),r1=()=>$r(pf);function s1(i,s){return bo(pf,i,s),$r(pf)}const jM=()=>{const i=localStorage.getItem(YS);return i==null?null:Number(i)},a1=i=>localStorage.setItem(YS,String(i)),nE="tw_notif_seen_ts",DM=()=>{const i=localStorage.getItem(nE);return i==null?0:Number(i)},kM=i=>localStorage.setItem(nE,String(i)),z_="tw_notif_read_ids",md=()=>{try{const i=JSON.parse(localStorage.getItem(z_)||"[]");return Array.isArray(i)?i:[]}catch{return[]}},o1=i=>{const s=md();s.includes(i)||localStorage.setItem(z_,JSON.stringify([...s,i]))},RM=i=>{const s=md().filter(l=>i.includes(l));return localStorage.setItem(z_,JSON.stringify(s)),s},TM=i=>i?$r(B_)[i]??null:null,l1=(i,s)=>{i&&s&&bo(B_,i,s)},LM=i=>i?$r(F_)[i]??null:null,AM=(i,s)=>{i&&s&&bo(F_,i,s)},MM=()=>localStorage.getItem(ff),UM=i=>$r(V_)[i]??null,rd=i=>$r(P_)[i]??null;function Ko({sessionId:i,windowId:s,paneId:l}={}){i&&localStorage.setItem(ff,i),i&&s&&bo(V_,i,s),s&&l&&bo(P_,s,l)}function OM(){const i=Number(localStorage.getItem(O_));return Number.isFinite(i)&&i>0?i:null}const sd=i=>localStorage.setItem(O_,String(i)),VM=()=>localStorage.removeItem(O_),iE=["dusk","ink","light"],PM=()=>{const i=localStorage.getItem(XS);return iE.includes(i)?i:"dusk"},IM=i=>{iE.includes(i)&&localStorage.setItem(XS,i)},BM=()=>localStorage.getItem(s_)==="1",FM=i=>{i?localStorage.setItem(s_,"1"):localStorage.removeItem(s_)},rE=()=>localStorage.getItem(r_)||"",sE=i=>{i?localStorage.setItem(r_,i):localStorage.removeItem(r_)};function vf(){try{return JSON.parse(localStorage.getItem(I_))||[]}catch{return[]}}function HM(i){const s=i.trim(),l=vf();return s&&!l.includes(s)&&l.push(s),localStorage.setItem(I_,JSON.stringify(l)),l}function zM(i){const s=vf().filter(l=>l!==i);return localStorage.setItem(I_,JSON.stringify(s)),s}const aE=()=>localStorage.getItem(KS)||"",oE=i=>localStorage.setItem(KS,i||""),lE="tw_orphan_kill",$M=()=>localStorage.getItem(lE)!=="0",WM=i=>localStorage.setItem(lE,i?"1":"0"),cE="tw_doc_highlight",uE=()=>localStorage.getItem(cE)==="1",GM=i=>localStorage.setItem(cE,i?"1":"0"),gf=(i,s)=>H_.get(i,s),dE=(i,s,l)=>H_.set(i,s,l);function qM(i,s,l){const m=(l||"").trim(),S=gf(i,s);return!m||!i||!s?S:dE(i,s,[m,...S.filter(D=>D!==m)].slice(0,hM))}function YM(i,s,l){return!i||!s?gf(i,s):dE(i,s,gf(i,s).filter(m=>m!==l))}const $_="tw_recent_docs",W_="tw_pane_base",KM=30;function fd(){try{return JSON.parse(localStorage.getItem($_))||[]}catch{return[]}}function c1({path:i,name:s,type:l,ts:m=Date.now()}){const S=[{path:i,name:s,type:l,ts:m},...fd().filter(D=>D.path!==i)].slice(0,KM);return localStorage.setItem($_,JSON.stringify(S)),S}function XM(i){const s=fd().filter(l=>l.path!==i);return localStorage.setItem($_,JSON.stringify(s)),s}const u1=i=>$r(W_)[i]??null,JM=(i,s)=>bo(W_,i,s),Pa=[10,11,12,13,14,16,18,20,22],ZM=4,hE="tw_doc_font";function QM(){const i=localStorage.getItem(hE),s=Number(i);return i!==null&&Number.isInteger(s)&&s>=0&&s<Pa.length?s:ZM}const eU=i=>localStorage.setItem(hE,String(Math.min(Pa.length-1,Math.max(0,i)))),tU=2,mE="tw_diff_font";function nU(){const i=localStorage.getItem(mE),s=Number(i);return i!==null&&Number.isInteger(s)&&s>=0&&s<Pa.length?s:tU}const iU=i=>localStorage.setItem(mE,String(Math.min(Pa.length-1,Math.max(0,i)))),fE=(i,s)=>Tf.get(i,s);function d1(i,s,l){return!i||!s?[]:Tf.set(i,s,l)}const rU=()=>localStorage.getItem(JS),sU=i=>{i&&localStorage.setItem(JS,i)},aU=()=>localStorage.getItem(ZS),oU=i=>{i&&localStorage.setItem(ZS,i)};function lU(i,s,l){Tf.renameWindow(i,s,l)}function G_(i){if(!i)return[];const s=$r(Rf)[i];return Array.isArray(s)?s:[]}function h1(i,s){if(!i)return[];const l=[...G_(i)];for(const m of s)m&&!l.includes(m)&&l.push(m);return bo(Rf,i,l),l}function cU(i,s){if(!i)return[];const l=G_(i).filter(m=>m!==s);return bo(Rf,i,l),l}const l_=[{version:"0.19.0",date:"2026-07-25",highlight:{zh:"电脑物理键盘直输 · Window 切换更流畅",en:"Desktop keyboard input · faster window switching"},items:{zh:["电脑浏览器现在可以用物理键盘直接操作终端,并支持常用终端快捷键、输入法和复制粘贴;Shift+Enter 可进入保留快捷用语、上传、历史和语音的草稿模式,设置中也可手动指定手机或电脑键盘模式。","全站滚动条现在更统一;终端内容超宽时会显示独立横向滚动条,网络较慢时切换 Window 也会立即进入目标终端的加载页面。","Agent 用量现在稳定展示所有设备共享的本机最新状态,Codex 主额度与 CLI /status 保持一致。"],en:["Desktop browsers can now drive the terminal directly from a physical keyboard, with common terminal shortcuts, IME, and copy/paste; Shift+Enter opens draft mode with shortcuts, uploads, history, and voice intact, and Settings can force Mobile or Desktop keyboard mode.","Scrollbars are now consistent across the app; wide terminal content gets its own horizontal scrollbar, and switching Windows on a slow network enters the target terminal loading view immediately.","Agent usage now keeps the latest machine state stable and shared across devices, while the main Codex quota matches CLI /status."]}},{version:"0.18.0",date:"2026-07-22",highlight:{zh:"Tmux 工作区恢复 · 快捷栏自由定制",en:"Tmux workspace recovery · customizable shortcuts"},items:{zh:["新增 Tmux 工作区恢复:电脑或 Tmux 重启后,可从手机或 handmux restore 恢复上次的会话、窗口、分屏、目录和布局;Claude Code / Codex 会话还能继续原对话。","新增 handmux shortcuts:可分别配置命令与聊天模式的共享快捷项;每台手机也能自由混排共享与本机项,或只在本机移除共享项。","handmux setup 现在可以配置动态预览域名;预览不再自动续期,需要延长时由你手动续期或重新打开。"],en:["Added Tmux workspace recovery: after the computer or Tmux restarts, restore the previous sessions, windows, panes, working directories, and layouts from the phone or handmux restore; Claude Code and Codex sessions can also continue their original conversations.","Added handmux shortcuts to configure shared command-mode and chat-mode items; each phone can also freely mix shared and local items or remove a shared item only on that device.","handmux setup can now configure the dynamic-preview domain; previews no longer renew automatically and can be extended manually or reopened when needed."]}},{version:"0.17.8",date:"2026-07-20",highlight:{zh:"分屏地图显示尺寸 · iPhone 交互修复",en:"Pane dimensions in the map · iPhone interaction fixes"},items:{zh:["分屏地图现在会在空间足够的窗格里低调显示真实终端尺寸(列×行),较小窗格仍保持简洁。","修复了分屏地图在 iPhone 上无法显示、长按窗格时触发系统文字选择的问题。","设置分屏列宽时现在会读取当前窗格的实际宽度,不同窗格不再互相沿用调整值。"],en:["The pane map now quietly shows each terminal's real columns × rows when space allows, while smaller tiles stay uncluttered.","Fixed the pane map failing to appear on iPhone and long-pressing a pane triggering the system text-selection UI.","Pane-width settings now read the active pane's actual width, so adjustments no longer carry over between panes."]}},{version:"0.17.7",date:"2026-07-20",highlight:{zh:"单实例启动兜底 · WSL 状态命令修复",en:"Single-instance startup guard · WSL status fix"},items:{zh:["修复安装开机自启后升级、重启可能产生两个后台实例,导致端口占用、URL 不出现或 stop 后仍可访问的问题;启停命令现在统一管理同一个服务,发现重复副本会列出 PID 并全部回收。","handmux status 现在显示实际运行版本,升级后可区分已安装版本;修复了 WSL 中内容显示完毕却不返回命令行的问题。"],en:["Fixed upgrades or restarts creating two background instances after autostart was installed, which could occupy the port, hide the URL, or remain reachable after stop; lifecycle commands now manage one service and list/reap every duplicate PID.","handmux status now shows the actual running version and distinguishes a newly installed version; fixed WSL terminals not returning to the prompt after status output completed."]}},{version:"0.17.6",date:"2026-07-20",highlight:{zh:"推送结果可追踪 · 对话与权限操作更可靠",en:"Traceable push results · safer chats and permissions"},items:{zh:["脚本通知现在会按设备显示成功或失败,失败详情会区分订阅失效、限流、推送服务不可用、拒绝和网络错误;handmux push 也不会再把零送达或部分失败报告为成功。","修复了关闭通知、打开或删除通知记录、查询设备 key 等操作在浏览器或网络无响应时可能一直等待的问题;关闭本地通知开关现在会立即生效。","长对话轮询不再遍历整段会话;历史记录统一每次加载 20 条,首次打开不足一屏时也会自动继续补取更早内容。","权限确认卡调整为左侧取消、右侧确认;取消需要在 2 秒内再次点击,避免误触中断正在等待的请求。"],en:["Script notifications now show success or failure per device, with details for expired subscriptions, rate limits, unavailable push services, rejection, and network errors; handmux push no longer reports zero delivery or partial failure as success.","Fixed notification disabling, inbox loading or deletion, and device-key lookup waiting forever when the browser or network stops responding; the local notification switch now turns off immediately.","Long-chat polling no longer walks the entire session; history loads 20 messages at a time and automatically keeps fetching older messages when the first page does not fill the screen.","Permission cards now place Cancel on the left and Confirm on the right; cancellation requires a second tap within two seconds to prevent accidentally interrupting a pending request."]}},{version:"0.17.5",date:"2026-07-20",highlight:{zh:"通知开启修复 · 长会话与设置可靠性提升",en:"Notification setup fixed · stronger chat and settings reliability"},items:{zh:["修复了安卓 Chrome 开启通知永久转圈、失效订阅假报成功以及更换域名后收不到通知的问题;注册、激活、FCM 与服务器上报现在会分别检查,失效订阅可自动重置。","修复了超长对话反复全量解析、可能拖慢服务并持续占用手机内存的问题;对话记录改为增量读取并限制缓存规模。","恢复设置里的完整版本更新历史;有新版本时的升级提示仍只展示最新一条,更早版本可按需展开。","修复通知记录加载或删除失败时误显示为空、消息短暂消失的问题,现在会保留已有内容并提示重试。","修复 Agent 退出后偶尔残留旧状态、普通 Node 程序被误认成 Codex 的问题;动态预览认证也限制在当前子域,启动失败会显示真实原因。"],en:["Fixed Android Chrome notification setup spinning forever, stale subscriptions being reported as enabled, and notifications not arriving after a domain change; registration, activation, FCM, and server reporting are now checked separately, with expired subscriptions reset automatically.","Fixed very long chats being repeatedly parsed in full, which could slow the service and keep growing phone memory use; transcripts now load incrementally with bounded caches.","Restored the complete version history in Settings; the upgrade prompt still shows only the newest release by default, with older versions expandable on demand.","Fixed notification history appearing empty or briefly losing a message when loading or deletion failed; existing content is now preserved with a retry action.","Fixed stale Agent state after exit and ordinary Node programs occasionally being mistaken for Codex; dynamic-preview authentication is now scoped to the current subdomain and startup failures show their real cause."]}},{version:"0.17.4",date:"2026-07-19",highlight:{zh:"HTTPS 本机预览修复 · 通知链接安全加固",en:"HTTPS localhost previews fixed · safer notification links"},items:{zh:["修复了 HTTPS/WSS 本机服务无法一键预览、带 # 的深链打开失败,以及 Codex pane 偶尔误出现 Claude 对话视图的问题;通知跳转链接也增加了安全校验。"],en:["Fixed one-tap previews for local HTTPS/WSS services, deep links with # fragments, and Claude chat view occasionally appearing on a Codex pane; notification links now receive stricter safety checks too."]}},{version:"0.17.3",date:"2026-07-19",highlight:{zh:"三修官方一键安装的 Claude 识别,真机已验证",en:"Third fix for native-install Claude detection, device-verified"},items:{zh:["修复了官方一键安装器版 Claude Code 仍识别不出的问题(0.17.2 的对账依据在真实环境不成立);本次按真机数据修正,已验证所有官方安装方式都能正确识别(agent 图标、对话视图切换钮正常出现)。"],en:["Fixed native-installer Claude detection still not working (0.17.2 relied on a signal that doesn't hold in the real environment); corrected against real-device data — verified across all official install methods (agent icon and chat-view switch appear)."]}},{version:"0.17.0",date:"2026-07-18",highlight:{zh:"对话视图(实验性)· 通知记录 · 本机地址一键预览",en:"Chat view (experimental) · notification inbox · one-tap localhost preview"},items:{zh:["新增「对话视图」(实验性功能,默认关):到设置里打开「启用对话视图(实验性功能)」后,窗口栏就能把 Claude 会话在终端/对话两个视图间一键切换(需已装 Claude hooks,没装可一键安装)。对话视图把会话读成聊天记录——气泡 + Markdown、工具卡(编辑文件带 +A/−B 和彩色 diff)、Claude 提问时点按即答的问题卡、上下文压缩动画、三套暖色配色;终端视图照旧,完全不受影响。","新增「通知记录」:脚本推送(handmux push)的通知按设备留存(各 100 条),全屏翻看、点开看详情、逐条删除;点手机上的通知直接跳到那条消息的详情。","终端里打印的本机地址(localhost:3000 等)自动变成可点的:点一下就能起代理在手机上预览(带路径),多个端口还能并行切换、自动续期。"],en:["New chat view (experimental, off by default): enable it in Settings → Enable chat view, then flip a Claude pane between terminal and chat from the window bar (requires Claude hooks — one-tap install offered). The chat view reads the session as a conversation — bubbles with Markdown, tool cards (+A/−B and colored diffs for file edits), question cards you answer with a tap, a visible compaction animation, and three warm colour tones. The terminal view is untouched.","New notification inbox: pushes from handmux push are kept per device (latest 100) — browse full-screen, open details, delete one by one; tapping a push lands on that message’s detail.","Localhost URLs printed in the terminal (localhost:3000, …) are now tappable: one tap proxies and previews them on your phone (path preserved), with several ports open in parallel and auto-renewed."]}},{version:"0.16.0",date:"2026-07-15",highlight:{zh:"分屏布局地图 · 手机也能建/删窗格",en:"Split-layout map · create & close panes from the phone"},items:{zh:["有多个窗格的窗口,选择器不再是一条干巴巴的下拉列表,而是照着你屏幕上真实的分屏样子画出来:每一格对应一个窗格,标着序号、正在跑的命令和 Agent 图标,一眼就看出谁在左谁在右、谁在上谁在下,点一下就切过去看那一格。","现在手机上就能直接分屏和关窗格了:长按地图里的某一格,就能把它「左右分屏」或「上下分屏」,也能「关闭」;还没分屏的窗口在它的菜单里也能分,已经分屏的窗口菜单里点「管理分屏」直接进地图。分好之后自动就落在新的那格里,地图也一直开着,随时能接着分或关。","绑定会话的弹窗更清楚了:「新建会话」和「选已有会话」分成两个明确的选项,不会再让人以为点一下「新建」就直接把会话建出来。"],en:["For a window with several panes, the picker is no longer a plain dropdown — it’s drawn to match the way your screen is actually split: each tile is one pane, labelled with its number, the command it’s running, and its agent, so you can tell at a glance which pane is where. Tap a tile to jump to that pane.","You can now split and close panes right from the phone: long-press a tile in the map to Split it left/right or top/bottom, or Close it; a window that isn’t split yet can be split from its menu, and a split window has a “Manage split” entry that opens the map. After a split you’re dropped into the new pane, and the map stays open so you can keep splitting or closing.","The bind-session dialog is clearer: “New session” and “Pick an existing session” are now two distinct choices, so tapping “New” no longer looks like it creates a session on the spot."]}},{version:"0.15.0",date:"2026-07-14",highlight:{zh:"键盘弹起终端自适应 · 全屏程序可上下滚动",en:"Keyboard-aware terminal · scroll inside full-screen apps"},items:{zh:["键盘弹起时终端不再被顶飞:内容自动重排到键盘上方,主屏短内容贴着键盘上沿显示;全屏程序(vim/less/htop 等)可以在里面上下滚动、到顶/底才翻页,默认显示程序的第一行,移动光标时自动跟随。","全屏程序翻页键上方新增「适配高度」和「定位」两个按钮:「适配高度」一键缩字号,收起键盘就能把整屏程序完整塞进手机屏;「定位」点亮后高亮光标所在行并跟随,方便在长内容里盯住光标。键盘弹起的瞬间光标也一直可见,不用再补按一下。","收件箱在一种特定场景下抓不到状态变更:你回应了权限弹窗、但那次回应没产生任何收尾信号时(普通授权、拒绝并反馈、或按 ESC 中断),它会停留在「需要你」。这一版补上识别——授权或拒绝反馈后回到「进行中」,ESC 中断则消掉状态。","光标不用点屏幕也能看到了:一进会话就能看到光标位置,发键/发指令后即使 Claude 正在忙也会亮着。","从设置里启动动态端口预览,现在会像静态预览一样自动弹出预览面板。","会话重命名撞到已有名字时,会明确提示「名称已存在」;修复了终端上滑一点后画面自己往上爬的问题。"],en:["The terminal no longer gets shoved off-screen when the keyboard opens: content reflows to sit just above the keyboard, with short main-screen output resting on its top edge. Full-screen programs (vim/less/htop, etc.) now scroll up/down inside themselves and only page at the edges, default to showing the program’s first line, and follow the cursor as you move it.","Two new buttons above the full-screen pager: “Fit height” shrinks the font in one tap so the whole program fits on the phone with the keyboard down, and “Locate” highlights and follows the cursor’s row so you can keep track of it in long content. The cursor also stays visible the moment the keyboard opens — no extra tap needed.","In one specific case the inbox couldn’t pick up a state change: when you responded to a permission prompt but that response produced no closing signal (a normal approval, a deny-with-feedback, or an ESC interrupt), it would linger on “needs you”. This release adds that detection — approving or denying returns it to “working”, and an ESC interrupt clears it.","The cursor now shows without tapping the screen: you can see where it is the moment you open a session, and it stays lit after you send a key/command even while Claude is busy.","Starting a dynamic-port preview from Settings now auto-opens the preview sheet, just like a static one.","Renaming a session to a name that already exists now says so clearly; and fixed the terminal creeping upward a line at a time after a small scroll up."]}},{version:"0.14.0",date:"2026-07-13",highlight:{zh:"终端文字选中拷贝 · 脚本复用推送通道",en:"Terminal select & copy · scripts reuse the push channel"},items:{zh:["终端可以长按选中文字了:iOS 式首尾手柄精调、跨屏选择,浮条一键拷贝/整行/整段,复制自动去掉行尾空格;选中期间顶部显示「复制模式 · N 行 · M 字」。","你自己的脚本也能复用 handmux 的推送通道:命令行用 handmux push <标题> <正文> 直接给手机发通知(可选 --session/--device 限定范围),脚本跑完主动提醒你。","滚动终端不再收起键盘:滑动时键盘保持、单击才收起;还能用 ⌨ 按钮或底部手柄拖拽显隐键盘,命令/聊天切换也保持键盘不掉。","往上滑看历史更顺了:一次滑到顶只加载一页、不再叠加拉取来回跳,位置稳停在你看的那行,顶部显示「距底 N/M 行」。","全屏程序(vim/less/htop 等)上方不再串出无关的终端历史。","修复了主页误触返回直接退出、以及从通知进入要多按一次返回才能退出的问题。"],en:["You can now long-press to select text in the terminal: iOS-style start/end handles, selection across screens, a callout to copy / whole line / whole paragraph, with trailing spaces trimmed on copy. A “copy mode · N lines · M chars” bar shows while selecting.","Your own scripts can reuse handmux’s push channel: run handmux push <title> <body> to send a notification straight to your phone (optionally scoped with --session/--device) — handy for a script pinging you when it finishes.","Scrolling the terminal no longer dismisses the keyboard: a swipe keeps it up, a single tap puts it away; you can also show/hide it with the ⌨ button or the dock’s grip handle, and it stays up when you switch between command and chat.","Scrolling up through history is smoother: reaching the top loads exactly one page instead of stacking pulls and jumping around, and your place holds steady on the line you were reading, with a “N/M lines from bottom” readout.","A full-screen program (vim/less/htop, etc.) no longer leaks unrelated terminal history above it.","Fixed a stray Back on the home page dropping you straight out, and needing an extra Back to leave after opening the app from a notification."]}},{version:"0.13.0",date:"2026-07-12",highlight:{zh:"终端文件路径高亮可点",en:"Tappable, highlighted file paths"},items:{zh:["终端里的文件路径现在会高亮显示、可以直接点开;这个高亮可以在设置里开关(默认关闭)。","桌面浏览器用鼠标滚轮往上翻,现在能拉出更深的历史了(不再卡在第一屏);桌面和手机都加了一条纤细的滚动条。","设置面板太高时可以整体滚动了,标题和关闭按钮始终可见、够得到。","修复了 agent 图标和底部输入模式偶尔乱跳的问题——现在按 agent 是否真的在运行来判断,分屏里每个窗格也各显各的图标。","handmux setup 新增「令牌」一项:可以手动固定访问令牌,这样每次重启后手机网址不再变化(留空则仍每次自动生成一个)。"],en:["File paths in the terminal are now highlighted and tappable — tap one to open it. You can toggle the highlight in Settings (off by default).","On a desktop browser the mouse wheel now pulls deeper history instead of stalling at the first screen, and a thin scrollbar was added on both desktop and mobile.","The Settings sheet scrolls as a whole when it is taller than the screen, with the title and close button always reachable.","Fixed the agent icon and the bottom input mode occasionally jumping around — both now track whether the agent is actually running, and each pane in a split shows its own icon.","handmux setup has a new “Token” item: you can pin the access token by hand so the phone URL stops changing on every restart (leave it blank to keep auto-generating one each start)."]}},{version:"0.12.3",date:"2026-07-11",highlight:{zh:"接管会话可自定义名称 + Homebrew 一键安装",en:"Name a takeover session · Homebrew install"},items:{zh:["接管电脑上的会话时,可以自己给新会话起名(默认也帮你填好);接管后想回电脑继续的命令,现在直接显示成 handmux open <名称>,照着敲即可。","新增 Homebrew 一键安装:没装 Node 的 Mac 也能用 brew install handmux/tap/handmux 一条命令装好(handmux + Node + tmux)。已有 Node 的话,npm i -g handmux 仍是更轻的选择。"],en:["When taking over a session running on your computer, you can now name the new session yourself (a default is filled in), and the “continue on the computer” hint shows the exact command to run — handmux open <name>.","New Homebrew install: on a Mac without Node, brew install handmux/tap/handmux sets up handmux, Node, and tmux in one command. If you already have Node, npm i -g handmux stays the lighter option."]}},{version:"0.12.2",date:"2026-07-11",highlight:{zh:"修复主屏图标偏大 / 换图标后不刷新",en:"Home-screen icon: right size & always fresh"},items:{zh:["修复了「添加到主屏」的图标在安卓上偏大、以及更换图标后旧图标不刷新的问题——图标更新现在会自动生效(已加到 iPhone 主屏的需删掉重加一次)。"],en:["Fixed the Add-to-Home-Screen icon looking oversized on Android and a changed icon not refreshing for returning users — icon updates now apply automatically (one already on an iOS home screen needs a one-time remove + re-add)."]}},{version:"0.12.1",date:"2026-07-11",highlight:{zh:"全新品牌图标与双色字标",en:"New brand icon & two-tone wordmark"},items:{zh:["焕新品牌:全新的发光终端图标(主屏图标、启动页都换了)+ 圆润的双色「handmux」字标(hand 白、mux 青→绿),官网、分享卡和 README 也一并更新。"],en:['Brand refresh: a new glowing terminal app icon (home-screen icon + boot splash) and a rounded two-tone "handmux" wordmark (hand in white, mux teal→green), with the site, share cards, and README updated to match.']}},{version:"0.12.0",date:"2026-07-11",highlight:{zh:"全屏程序也能滑动滚动 · 反馈入口 · 聊天草稿不丢",en:"Swipe-scroll full-screen apps · feedback channels · chat drafts kept"},items:{zh:["全屏程序(vim / htop / less 等)现在能直接滑动滚动了:开了鼠标的程序像电脑滚轮一样滑着滚,没开鼠标的分页器(less / man / git log)靠滑动逐行滚;每个全屏画面右侧还多了一枚翻页按钮做整页跳。","设置里新增「反馈与交流」:直达 GitHub Issues,中文用户还能扫码进微信交流群;README、官网、文档里也都能找到入口。","聊天框里没发出去的内容现在会自动保存,下次打开自动填回——误划走、切后台被杀、崩溃都不会再丢半截提示词。","修复:从终端链接或「最近」直接打开的文档,点返回会一次收起面板,不再被硬塞进「目录」层、再返一次直接退出 App。"],en:["Full-screen apps (vim / htop / less …) now scroll by swipe: mouse-mode apps scroll like a desktop wheel, and pagers (less / man / git log) scroll line-by-line on a swipe; every full-screen view also gets a page up/down button on the right for whole-page jumps.",'New "Feedback" section in Settings: a direct link to GitHub Issues, plus a WeChat user group for Chinese users — also surfaced in the README, the site, and the docs.',"Whatever you've typed in the chat box is now saved automatically and restored next time you open it — an accidental swipe-away, a background kill, or a crash no longer eats a half-written prompt.","Fixed: a doc opened straight from a terminal link or 最近 now closes the sheet in one Back press, instead of being forced into its folder view and then dropping you out of the app on the next Back."]}},{version:"0.11.1",date:"2026-07-09",highlight:{zh:"修复 Node 18 下无法启动的问题",en:"Fixes startup crash on Node 18"},items:{zh:["修复了电脑用 Node 18 时 handmux 任何命令都启动不了的问题(0.11.0 配置向导引入的依赖要求过新的 Node)。"],en:["Fixed handmux failing to start any command on Node 18 (a dependency introduced by the 0.11.0 setup wizard required a newer Node)."]}},{version:"0.11.0",date:"2026-07-08",highlight:{zh:"国内可用隧道 natapp/cpolar · 配置向导重做",en:"China-usable tunnels · setup redesigned"},items:{zh:["新增两条国内可用的隧道 natapp 和 cpolar:当 Cloudflare 在国内不稳定时,用你自己的免费账号就能把手机连到电脑。只要一个 authtoken;想要固定地址就填公网地址,留空则用免费临时域名;cpolar 的客户端还会自动下载。","`handmux setup` 重做成菜单式向导:每项设置一行、直接显示当前值,想改哪项就点哪项,不用再一路问到底。连接分两级——先选隧道类型,再进去配它的参数;推送、语音也各成小面板。第一次用会一步步带你走,默认落在「直连」并停在「保存并启动」,小白也能顺下来。"],en:["Two China-usable tunnels, natapp and cpolar: when Cloudflare is unreliable inside mainland China, reach your computer from your phone using your own free account. Just an authtoken; add a public URL for a fixed address or leave it blank for a free temporary one — and cpolar's client auto-downloads.",'`handmux setup` is now a menu-style wizard: every setting is a row showing its current value, so you jump straight to what you want to change instead of answering every prompt in order. Connection is two levels — pick the tunnel type, then configure it inside; push and voice are their own mini-panels. A first run walks you through it, defaulting to "Direct" with the cursor on "Save & start".']}},{version:"0.10.0",date:"2026-07-06",highlight:{zh:"升级前预览新功能 · 电脑 handmux open 接管",en:"Preview an update before installing · handmux open"},items:{zh:["更新提示现在会提前告诉你新版有什么:检测到有新版本时,设置里会逐版列出这次升级带来的新功能(一句话说明),让你在电脑上跑 `handmux update` 之前就知道值不值得。","电脑上新增 `handmux open <会话名>`:把你在手机上建的会话直接在电脑终端接回来(没有就新建),不用再记 `tmux new -A -s`。绑定/新建会话的弹窗里也加了这句提示。"],en:["The update notice now tells you what a new version brings before you install it: when an update is detected, Settings lists each newer version's highlight in one line, so you know whether it's worth running `handmux update` on your computer.","New `handmux open <session>` on the computer: reclaim a session you created from your phone straight into your computer's terminal (created if missing) — no need to remember `tmux new -A -s`. The bind/create dialog now hints at it too."]}},{version:"0.9.1",date:"2026-07-06",highlight:{zh:"「添加到主屏」引导",en:'"Add to Home Screen" coach'},items:{zh:["新增「添加到主屏」引导:第一次在浏览器里打开时,提示你把 handmux 装到主屏,像 App 一样全屏打开。安卓可一键安装;iPhone 给出 Safari 的「分享 → 更多 → 添加到主屏幕」三步——iOS 上收推送也需要它。装好后不再打扰。"],en:[`New "Add to Home Screen" coach: the first time you open handmux in a browser, it shows how to install it to your home screen and run it full-screen like an app. Android installs in one tap; iPhone gets the Safari steps (Share → More → Add to Home Screen) — which is also what iOS push needs. It won't nag once you've added it.`]}},{version:"0.9.0",date:"2026-07-05",highlight:{zh:"聊天输入框多行重做",en:"Multi-line chat composer redone"},items:{zh:["聊天输入框多行重做:文字占满整行,麦克风/发送悬到右下角,末行快挤到按钮才让出一行——长消息不再被右侧按钮列挤窄,多行时拖光标也不会误收键盘。"],en:["Chat composer redone for multi-line: text takes the full width, mic/send float in the bottom-right corner, and a row is yielded only when the last line actually reaches them — long messages are no longer squeezed by a right-hand button column, and dragging the caret no longer collapses the keyboard."]}},{version:"0.8.0",date:"2026-07-05",highlight:{zh:"快捷栏可自定义 · 上传体验重做",en:"Customizable quick-bars · upload redone"},items:{zh:["命令模式的常用命令分成「全局」和「当前窗口」两组:快捷栏里全局的(灰)排前、当前窗口的(绿)排后。尾部改成 ⚙ 齿轮,点开更高的编辑器分两区、各自 ▲▼ 排序。新增区一行搞定:顶部「命令/按键」大 Tab 选类型,左侧开关选加到全局还是本窗口。命令可勾「带回车」(点一下直接执行,末尾带 ⏎);按键用 ⌃⇧⌥ + 一个基键拼出组合键(如 Ctrl+C),点一下直接发到终端。","聊天模式的快捷条也能自定义了:末尾同样是 ⚙,点开编辑器,「消息/按键」两个 Tab —— 消息就是一句发给 agent 的话(以 / 开头当斜杠命令),按键用同一套 ⌃⇧⌥ + 基键拼组合键(ESC/Tab/退格默认就在里面)。点任意一条可回到弹窗改,▲▼ 排序。","上传体验重做:进度条不再一冲到 100% 就假装完事——先显示真实发送进度,字节发完后转成「服务器接收中…」,大文件不再像卡死。上传中可随时「取消」,已传完的文件会保留。","重名不再报错:上传一个已存在的文件名会自动改名(如 `报告 (1).pdf`),绝不覆盖原文件。上传失败时也会告诉你具体原因(过大 / 不支持的类型)。","现在可以上传视频了(mp4、mov、webm 等)。","Git 面板现在能打开 `/tmp` 等家目录以外的仓库(比如 agent 在 /tmp 里干活的项目),不再报红。","用量进度条新增「时间竖线」:标出当前重置窗口已过去的时间比例。已用量在竖线左边=烧得比时间慢(稳),越过竖线=烧得偏快,一眼看出自己的节奏。","新增版本更新提示:每次打开检测一次,服务端落后于 npm 最新版时设置齿轮亮红点,进设置能看到当前/最新版本号,按提示在电脑上跑 `handmux update` 升级即可。"],en:[`Command mode's saved commands now split into "Global" and "This window": the quick-bar shows global ones (grey) first, then this window's (green). The trailing + is now a ⚙ opening a taller two-section editor, each reorderable with ▲▼. One add row does it all: a big Command/Key tab picks the type, a left switch picks which list it lands in. Commands can tick "Send Enter" (a tap runs it, marked ⏎); keys are built from ⌃⇧⌥ + a base key into a combo like Ctrl+C that fires straight into the terminal.`,"Chat mode's quick-bar is now customizable too: the same ⚙ at the end opens an editor with a Message/Key tab — a message is a line sent to the agent (starts with / for a slash-command), a key is built from the same ⌃⇧⌥ + base-key picker (ESC/Tab/Backspace ship as defaults). Tap any row to re-open the card and edit it, ▲▼ to reorder.","Upload redone: the bar no longer jumps to 100% and then hangs — it shows real send progress, then flips to “receiving on the server…” once bytes are flushed, so a big file no longer looks stuck. You can Cancel mid-upload; already-uploaded files are kept.","Name clashes no longer fail: uploading an existing name auto-renames (e.g. `report (1).pdf`) and never overwrites. Failures now tell you why (too large / unsupported type).","Video files can now be uploaded (mp4, mov, webm, …).","The git panel can now open repos outside your home directory (e.g. a project an agent is working in under `/tmp`) instead of erroring.",`Usage bars now show a "time marker": a thin vertical line at how far the current reset window has elapsed. Usage left of the line = you're burning slower than the clock; past it = faster — pacing at a glance.`,"New update notice: checked once each time you open the app — when the server is behind the latest npm release, the settings gear lights a dot and Settings shows the current/latest version so you can run `handmux update` on your computer."]}},{version:"0.7.0",date:"2026-07-03",highlight:{zh:"新增「用量」页",en:'New "Usage" page'},items:{zh:["新增「用量」页(顶栏仪表盘图标):一眼看 Claude 的 5 小时 / 本周额度进度条 + 重置倒计时,以及 Codex 的额度环。全部读主机本地文件,不登录账号、不调用 API。Codex 零配置即用;Claude 的实时额度需要在电脑上运行一次 handmux hooks install(会装一个 statusLine 捕获器,已有自定义 statusLine 的绝不覆盖)。"],en:["New \"Usage\" page (gauge icon in the top bar): see Claude's 5-hour / weekly limit bars with reset countdowns, plus Codex's quota ring — at a glance. All read from local files on the host: no account login, no API calls. Codex works with zero setup; Claude's live limits need a one-time `handmux hooks install` on the computer (it adds a statusLine capturer and never clobbers an existing custom statusLine)."]}},{version:"0.6.0",date:"2026-07-02",highlight:{zh:"新增 Codex 支持",en:"Codex support added"},items:{zh:["新增 Codex 支持:收件箱与推送现在同时认得 Claude 和 Codex——Codex 会话的「进行中 / 需要你 / 已完成」都会像 Claude 一样推到手机;tmux 外跑着的 Codex 会话也能一键「接管」进来(codex resume);新建会话的启动命令预设新增 codex。收件箱每一条、以及顶栏当前会话,都带上 Claude / Codex 标记,一眼区分是哪种 agent。","会话抽屉底部新增「未接管会话」:一眼看到在 tmux 外跑着、手机还控制不了的 Claude / Codex(带状态、时间、最后一条消息),点「接管」即可在 tmux 里续接同一会话——自动加进会话列表并跳进去,以后手机随时回来。"],en:["Added Codex support: the inbox and push now recognize both Claude and Codex — a Codex session's working / waiting-on-you / done states reach your phone just like Claude. You can take over Codex sessions running outside tmux (codex resume), and there's a new codex startup-command preset. Every inbox row and the current-session topbar now carry a Claude / Codex mark so you can tell the two apart at a glance.",`The session drawer now has a "not taken over" section at the bottom: Claude / Codex sessions running outside tmux that your phone can't steer yet (with their state, time, and last message). Tap Take over to resume the same conversation inside tmux — it's added to your session list and opened, so you can return to it from your phone anytime.`]}},{version:"0.5.0",date:"2026-06-28",highlight:{zh:"首个公开版 · 多语言界面",en:"First public release · multi-language UI"},items:{zh:["首个公开发布版本(npm 上的 handmux)。","新增繁体中文、日语、韩语界面(设置 → Language 切换)。","想法角标:有未完成想法时,灯泡图标右上角显示数量。","设置面板列数调节:实时显示当前列数,新增 ±1 精细调节按钮。"],en:["First public release (handmux on npm).","Added Traditional Chinese, Japanese, and Korean UI (Settings → Language to switch).","Idea badge: when there are pending ideas, the lightbulb icon shows a count in the corner.","Settings column control: shows the current column count live, with new ±1 fine-adjust buttons."]}},{date:"2026-06",label:{zh:"早期内测",en:"Early builds"},highlight:{zh:"早期内测",en:"Early builds"},items:{zh:["新增「Git」面板(顶栏图标):仿 VS Code,一页同屏看变更 + 提交历史,点文件/提交看全屏彩色 diff;只读,不动你的工作树。可绑多个目录用 tab 切换。","新增「想法」管理器(顶栏灯泡):按窗口记待办,可编辑、拖拽排序、一键填入、语音输入。","网站预览:选目录预览静态站点,或填端口预览本机正在跑的服务(走专属子域名);图片预览:文件/终端里点图片(含 GIF)直接内嵌打开,可捏合缩放、长按保存。","文件:上传/下载(进度条、系统分享上传),浏览器打开即落到当前会话目录,支持 /tmp、$TMPDIR;文档在应用内预览 Markdown/txt/log/sh,可语音朗读(逐句高亮)。","收件箱 + Web Push:汇总各会话「进行中/已完成/需要你」,窗口标签带状态色点,需要你时推送到手机。","命令面板:常用 + 每会话最近命令,斜杠命令快捷键(/clear、/compact、/model…)。","可靠性:断线重连(退避 + 每请求超时 + 断线横幅,后台自动暂停轮询),离线兜底页。","首版:手机浏览器驱动真实 tmux 面板(xterm 终端 + 会话/窗口/pane 导航 + 深链),移动按键区、键盘自动抬升、列宽/字号调节,可添加到主屏(PWA)。"],en:['New "Git" panel (top-bar icon): VS Code style — changes + commit history on one screen, tap a file/commit for a full-screen colored diff; read-only, never touches your working tree. Bind multiple dirs and switch via tabs.','New "Ideas" manager (top-bar lightbulb): per-window to-dos — edit, drag to reorder, one-tap insert, voice input.',"Website preview: pick a directory for a static site, or a port for a service running locally (dedicated subdomain); image preview: tap an image (including GIFs) in Files or the terminal to open inline, pinch to zoom, long-press to save.","Files: upload/download (progress bar, share-to-upload), the browser opens straight to the current session dir, /tmp and $TMPDIR supported; documents preview in-app (Markdown/txt/log/sh) and can be read aloud (sentence-by-sentence highlight).","Inbox + Web Push: summarizes each session's In-progress / Done / Needs-you, window tabs get a status color dot, and Needs-you pushes to your phone.","Command panel: frequent + per-session recent commands, slash-command shortcuts (/clear, /compact, /model, …).","Reliability: reconnect on disconnect (backoff + per-request timeout + connection-lost banner, polling auto-paused in the background) and an offline fallback page.","First release: a phone browser drives real tmux panes (xterm terminal + session/window/pane navigation + deep links), a mobile key bar, keyboard auto-lift, column-width/font-size adjustment, and add-to-home-screen (PWA)."]}}],uU=i=>i.version||i.date,Jm=l_[0]?uU(l_[0]):null,dU={jpg:"image/jpeg",jpeg:"image/jpeg",jfif:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",svg:"image/svg+xml",ico:"image/x-icon",heic:"image/heic",heif:"image/heif",avif:"image/avif",tif:"image/tiff",tiff:"image/tiff",pdf:"application/pdf",txt:"text/plain",log:"text/plain",md:"text/markdown",markdown:"text/markdown",csv:"text/csv",json:"application/json",xml:"application/xml",html:"text/html",htm:"text/html",zip:"application/zip",mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",mkv:"video/x-matroska",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv","3gp":"video/3gpp",ogv:"video/ogg",mpeg:"video/mpeg",mpg:"video/mpeg",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};function Lf(i){const s=(i||"").lastIndexOf(".");return s<0?"":dU[i.slice(s+1).toLowerCase()]||""}function hU(i){return Lf(i).startsWith("image/")}class $i extends Error{}class pE extends Error{constructor(s,l,m){super(s),this.status=l,this.serverError=m??null}}async function on(i,s={}){const l=go(),{timeoutMs:m,...S}=s,D={Authorization:`Bearer ${l??""}`,...S.headers||{}};S.body&&(D["Content-Type"]="application/json");let b=null,a=null;m&&(b=new AbortController,a=setTimeout(()=>b.abort(),m));try{const d=await fetch(i,{cache:"no-store",...S,headers:D,signal:b==null?void 0:b.signal});if(d.status===401)throw new $i;if(!d.ok){let f=null;try{const w=await d.json();w!=null&&w.error&&(f=w.error)}catch{}throw new pE(f||`${i} -> ${d.status}`,d.status,f)}return d.status===204?{unchanged:!0}:await d.json()}catch(d){throw b!=null&&b.signal.aborted?new Error(`${i} -> timeout`):d}finally{a&&clearTimeout(a)}}const Jo=()=>on("/api/sessions"),mU=()=>on("/api/usage"),dc=i=>on(`/api/windows?session=${encodeURIComponent(i)}`),zs=i=>on(`/api/panes?window=${encodeURIComponent(i)}`,{timeoutMs:8e3}),fU=(i,s=1500,l)=>on(`/api/history?pane=${encodeURIComponent(i)}&lines=${s}${l?`&since=${l}`:""}`,{timeoutMs:8e3}),m1=(i,{since:s,before:l,limit:m=10}={})=>{let S=`/api/transcript?pane=${encodeURIComponent(i)}&agent=claude&limit=${encodeURIComponent(m)}`;return s&&(S+=`&since=${encodeURIComponent(s)}`),l!=null&&(S+=`&before=${encodeURIComponent(l)}`),on(S,{timeoutMs:8e3}).then(D=>D.unchanged?null:D)},pU=i=>on(`/api/context?pane=${encodeURIComponent(i)}&agent=claude`,{timeoutMs:8e3}),vU=i=>on(`/api/pending-prompt?pane=${encodeURIComponent(i)}&agent=claude`,{timeoutMs:8e3}).then(s=>s.prompt||null),tl=(i,s,l=!0)=>on("/api/send",{method:"POST",body:JSON.stringify({pane:i,text:s,enter:l})}),_d=(i,s)=>on("/api/keys",{method:"POST",body:JSON.stringify({pane:i,keys:s})}),gU=(i,s)=>on("/api/input",{method:"POST",body:JSON.stringify({pane:i,hex:s})}),bU=(i,s,l=1)=>on("/api/scroll",{method:"POST",body:JSON.stringify({pane:i,dir:s,lines:l})}),_U=(i,s,l)=>on("/api/resize",{method:"POST",body:JSON.stringify({window:i,cols:s,rows:l})}),yU=(i,s)=>on("/api/resize",{method:"POST",body:JSON.stringify({pane:i,cols:s})}),wU=i=>on(`/api/layout?window=${encodeURIComponent(i)}`),xU=(i,s)=>on("/api/resize",{method:"POST",body:JSON.stringify({window:i,auto:!0,layout:s})}),NU=(i,s,l)=>on("/api/sessions",{method:"POST",body:JSON.stringify({name:i,cwd:s,cmd:l})}),SU=(i,s,l,m,S)=>on("/api/windows",{method:"POST",body:JSON.stringify({session:i,pane:s,name:l,cwd:m,cmd:S})}),EU=(i,s)=>on("/api/sessions",{method:"PATCH",body:JSON.stringify({id:i,name:s})}),CU=(i,s)=>on("/api/windows",{method:"PATCH",body:JSON.stringify({id:i,name:s})}),jU=i=>on(`/api/windows?window=${encodeURIComponent(i)}`,{method:"DELETE"}),DU=(i,s)=>on("/api/windows/swap",{method:"POST",body:JSON.stringify({a:i,b:s})}),f1=(i,s)=>on("/api/panes/split",{method:"POST",body:JSON.stringify({pane:i,dir:s})}),kU=i=>on(`/api/panes?pane=${encodeURIComponent(i)}`,{method:"DELETE"}),RU=(i,s)=>on("/api/dir",{method:"POST",body:JSON.stringify({dir:i,name:s})}),p1=(i,s=null)=>on(`/api/file?path=${encodeURIComponent(i)}${s!=null?`&mtime=${encodeURIComponent(s)}`:""}`,{timeoutMs:8e3}),vE=i=>on(`/api/dir${i?`?path=${encodeURIComponent(i)}`:""}`,{timeoutMs:8e3}),rl=i=>on(`/api/pane-cwd?pane=${encodeURIComponent(i)}`,{timeoutMs:8e3}),TU=()=>on("/api/asr/sign",{timeoutMs:8e3}),LU=()=>on("/api/config",{timeoutMs:8e3}),AU=()=>on("/api/version",{timeoutMs:8e3}),v1=()=>on("/api/workspace/status",{timeoutMs:8e3}),g1=(i="latest")=>on(`/api/workspace/restore-plan?checkpoint=${encodeURIComponent(i)}`,{timeoutMs:8e3}),MU=(i={checkpointId:"latest"})=>on("/api/workspace/restore",{method:"POST",body:JSON.stringify(i),timeoutMs:8e3}),UU=i=>on(`/api/workspace/restore/${encodeURIComponent(i)}`,{timeoutMs:8e3}),OU=()=>on("/api/hooks/install",{method:"POST",timeoutMs:15e3}),VU=(i=[])=>on(`/api/states?sessions=${encodeURIComponent(i.join(","))}`,{timeoutMs:4e3}),b1=()=>on("/api/orphans",{timeoutMs:8e3}),PU=i=>on("/api/orphans/takeover",{method:"POST",body:JSON.stringify(i),timeoutMs:15e3}),_1=i=>on(`/api/git/repos?dir=${encodeURIComponent(i)}`,{timeoutMs:8e3}),IU=i=>on(`/api/git/status?repo=${encodeURIComponent(i)}`,{timeoutMs:8e3}),BU=(i,{limit:s=50,ref:l}={})=>{let m=`/api/git/log?repo=${encodeURIComponent(i)}&limit=${s}`;return l&&(m+=`&ref=${encodeURIComponent(l)}`),on(m,{timeoutMs:8e3})},FU=i=>on(`/api/git/branches?repo=${encodeURIComponent(i)}`,{timeoutMs:8e3}),HU=(i,{path:s,commit:l,staged:m}={})=>{let S=`/api/git/diff?repo=${encodeURIComponent(i)}&path=${encodeURIComponent(s??"")}`;return l&&(S+=`&commit=${encodeURIComponent(l)}`),m&&(S+="&staged=1"),on(S,{timeoutMs:8e3})},zU=(i,s)=>on(`/api/git/commit?repo=${encodeURIComponent(i)}&hash=${encodeURIComponent(s)}`,{timeoutMs:8e3});function $U(i,s){return new Promise((l,m)=>{const S=go(),D=new XMLHttpRequest;D.open("GET",`/api/download?path=${encodeURIComponent(i)}`),D.setRequestHeader("Authorization",`Bearer ${S??""}`),D.responseType="blob",D.onprogress=b=>{s&&b.lengthComputable&&s(b.loaded/b.total)},D.onerror=()=>m(new Error("download failed")),D.onload=()=>{if(D.status===401)return m(new $i);if(D.status<200||D.status>=300)return m(new Error(`download -> ${D.status}`));const b=i.split("/").pop()||"download";let a=D.response;const d=Lf(b);d&&a&&a.type!==d&&(a=a.slice(0,a.size,d));const f=URL.createObjectURL(a),w=document.createElement("a");w.href=f,w.download=b,document.body.appendChild(w),w.click(),w.remove(),setTimeout(()=>URL.revokeObjectURL(f),1e3),l()},D.send()})}function y1(i,s=null){return new Promise((l,m)=>{const S=go(),D=new XMLHttpRequest,b=s!=null?`&mtime=${encodeURIComponent(s)}`:"";D.open("GET",`/api/download?path=${encodeURIComponent(i)}${b}`),D.setRequestHeader("Authorization",`Bearer ${S??""}`),D.responseType="blob",D.onerror=()=>m(new Error(U("api.loadFailed"))),D.onload=()=>{if(D.status===304)return l({notModified:!0});if(D.status===401)return m(new $i);if(D.status<200||D.status>=300)return m(new Error(`image -> ${D.status}`));let a=D.response;const d=Lf(i.split("/").pop()||"");d&&a&&a.type!==d&&(a=a.slice(0,a.size,d));const f=Number(D.getResponseHeader("X-Mtime"));l({url:URL.createObjectURL(a),mtimeMs:Number.isFinite(f)?f:null})},D.send()})}const WU=(i,s,l="/")=>{if((i==null?void 0:i.kind)==="dynamic"){const m=l&&l.startsWith("/")?l:"/",S=new URL(m,`https://${encodeURIComponent(i.name)}.${s}/`);return S.searchParams.set("token",go()??""),S.toString()}return`/preview/${encodeURIComponent(i==null?void 0:i.name)}/?token=${encodeURIComponent(go()??"")}`},Zm=(i,s={})=>{const l=s.port!=null?{name:i,port:s.port}:{name:i,dir:s.dir};return s.port!=null&&s.protocol&&(l.protocol=s.protocol),on("/api/previews",{method:"POST",body:JSON.stringify(l)})},GU=()=>on("/api/previews"),qU=i=>on(`/api/previews/${encodeURIComponent(i)}`,{method:"DELETE"});class bf extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function gE(i,s,l,m=!1,{signal:S}={}){return new Promise((D,b)=>{if(S!=null&&S.aborted)return b(new bf);const a=go(),d=new FormData;d.append("dir",i),m&&d.append("stash","1"),d.append("file",s,s.name);const f=new XMLHttpRequest;f.open("POST","/api/upload"),f.setRequestHeader("Authorization",`Bearer ${a??""}`),f.upload.onprogress=_=>{l&&_.lengthComputable&&l(_.loaded/_.total,"sending")},f.upload.onload=()=>{l==null||l(1,"processing")};const w=()=>f.abort();S&&S.addEventListener("abort",w,{once:!0});const h=()=>{S&&S.removeEventListener("abort",w)};f.onabort=()=>{h(),b(new bf)},f.onerror=()=>{h(),b(new Error(U("api.uploadFailed")))},f.onload=()=>{if(h(),f.status===401)return b(new $i);if(f.status>=200&&f.status<300)try{return D(JSON.parse(f.responseText))}catch{return D({})}const _={400:U("api.uploadBadDir"),409:U("api.uploadDuplicate"),413:U("api.uploadTooLarge"),415:U("api.uploadBadType")}[f.status]||U("api.uploadFailed");b(new Error(_))},f.send(d)})}async function w1({paneId:i,dir:s,windowId:l,api:m,getPanes:S}){const{id:D}=await m.splitPane(i,s);return{panes:await S(l),selectPaneId:D}}async function YU({paneId:i,windowId:s,viewedPaneId:l,api:m,getPanes:S,pickId:D}){await m.closePane(i);const b=await S(s),a=i===l&&b.length?D(b,null):null;return{panes:b,selectPaneId:a}}const KU=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Claude"><title>Claude</title><path fill="#d97757" d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>
|
|
205
|
+
`,XU=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Codex"><title>Codex (OpenAI)</title><path fill="#ededed" d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>
|
|
206
|
+
`,Cn={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function yd(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:14,columnNumber:5},this)}function JU(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:24,columnNumber:7},this),o.jsxDEV("path",{d:"M12 10v6M9 13h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:23,columnNumber:5},this)}function _f(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:33,columnNumber:7},this),o.jsxDEV("circle",{cx:"12",cy:"12",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:34,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:32,columnNumber:5},this)}function bE(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:43,columnNumber:7},this),o.jsxDEV("path",{d:"M14 3v5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:44,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:42,columnNumber:5},this)}function ZU(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:53,columnNumber:7},this),o.jsxDEV("circle",{cx:"9",cy:"9",r:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:54,columnNumber:7},this),o.jsxDEV("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:55,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:52,columnNumber:5},this)}function q_(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M12 19V5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:64,columnNumber:7},this),o.jsxDEV("path",{d:"m5 12 7-7 7 7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:65,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:63,columnNumber:5},this)}function QU(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("line",{x1:"2",x2:"5",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:74,columnNumber:7},this),o.jsxDEV("line",{x1:"19",x2:"22",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:75,columnNumber:7},this),o.jsxDEV("line",{x1:"12",x2:"12",y1:"2",y2:"5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:76,columnNumber:7},this),o.jsxDEV("line",{x1:"12",x2:"12",y1:"19",y2:"22"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:77,columnNumber:7},this),o.jsxDEV("circle",{cx:"12",cy:"12",r:"7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:73,columnNumber:5},this)}function Ia(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("path",{d:"m6 9 6 6 6-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:87,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:86,columnNumber:5},this)}function Y_(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("path",{d:"M12 5v14M5 12h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:96,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:95,columnNumber:5},this)}function K_(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("path",{d:"M20 6 9 17l-5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:105,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:104,columnNumber:5},this)}function _E(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:124,columnNumber:7},this),o.jsxDEV("path",{d:"M12 7v5l3 2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:125,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:123,columnNumber:5},this)}function e3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M9 18h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:135,columnNumber:7},this),o.jsxDEV("path",{d:"M10 22h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:136,columnNumber:7},this),o.jsxDEV("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:137,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:134,columnNumber:5},this)}function t3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:146,columnNumber:7},this),o.jsxDEV("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"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:147,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:145,columnNumber:5},this)}function n3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M12 3v12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:156,columnNumber:7},this),o.jsxDEV("path",{d:"m7 10 5 5 5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:157,columnNumber:7},this),o.jsxDEV("path",{d:"M5 21h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:158,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:155,columnNumber:5},this)}function yE(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:168,columnNumber:7},this),o.jsxDEV("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:169,columnNumber:7},this),o.jsxDEV("path",{d:"M12 18v-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:170,columnNumber:7},this),o.jsxDEV("path",{d:"m9 15 3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:171,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:167,columnNumber:5},this)}function wE(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:180,columnNumber:7},this),o.jsxDEV("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:181,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:179,columnNumber:5},this)}function i3(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("path",{d:"M7 5l12 7-12 7z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:190,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:189,columnNumber:5},this)}function r3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("line",{x1:"9",y1:"5",x2:"9",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:199,columnNumber:7},this),o.jsxDEV("line",{x1:"15",y1:"5",x2:"15",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:200,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:198,columnNumber:5},this)}function xE(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:209,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:208,columnNumber:5},this)}function s3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"9",y:"3",width:"6",height:"11",rx:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:218,columnNumber:7},this),o.jsxDEV("path",{d:"M5 11a7 7 0 0 0 14 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:219,columnNumber:7},this),o.jsxDEV("line",{x1:"12",y1:"18",x2:"12",y2:"21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:220,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:217,columnNumber:5},this)}function yf(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:229,columnNumber:7},this),o.jsxDEV("path",{d:"M8 21h8M12 17v4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:230,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:228,columnNumber:5},this)}function a3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M12 14l4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:239,columnNumber:7},this),o.jsxDEV("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:240,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:238,columnNumber:5},this)}function o3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:249,columnNumber:7},this),o.jsxDEV("path",{d:"M12 18h.01"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:250,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:248,columnNumber:5},this)}function l3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:259,columnNumber:7},this),o.jsxDEV("path",{d:"M21 3v5h-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:260,columnNumber:7},this),o.jsxDEV("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:261,columnNumber:7},this),o.jsxDEV("path",{d:"M3 21v-5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:262,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:258,columnNumber:5},this)}function NE(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("line",{x1:"6",y1:"3",x2:"6",y2:"15"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:271,columnNumber:7},this),o.jsxDEV("circle",{cx:"18",cy:"6",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:272,columnNumber:7},this),o.jsxDEV("circle",{cx:"6",cy:"18",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:273,columnNumber:7},this),o.jsxDEV("path",{d:"M18 9a9 9 0 0 1-9 9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:274,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:270,columnNumber:5},this)}function Oa(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M18 6 6 18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:283,columnNumber:7},this),o.jsxDEV("path",{d:"m6 6 12 12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:284,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:282,columnNumber:5},this)}function c3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"m7 11 2-2-2-2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:302,columnNumber:7},this),o.jsxDEV("path",{d:"M11 13h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:303,columnNumber:7},this),o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:304,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:301,columnNumber:5},this)}function u3({down:i=!1}){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"3",y:"9",width:"18",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:326,columnNumber:7},this),o.jsxDEV("path",{d:"M7 13h.01M11 13h.01M15 13h.01M8 16.5h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:327,columnNumber:7},this),i?o.jsxDEV("path",{d:"M9 4.5l3 3 3-3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:15},this):o.jsxDEV("path",{d:"M9 6.5l3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:325,columnNumber:5},this)}function x1(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:337,columnNumber:7},this),o.jsxDEV("path",{d:"M12 4v16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:338,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:336,columnNumber:5},this)}function N1(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:347,columnNumber:7},this),o.jsxDEV("path",{d:"M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:348,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:346,columnNumber:5},this)}function d3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:357,columnNumber:7},this),o.jsxDEV("path",{d:"M12 3v18M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:358,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:356,columnNumber:5},this)}function SE(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"m18 5-2.4-2.4A2 2 0 0 0 14.2 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:369,columnNumber:7},this),o.jsxDEV("path",{d:"M21.4 12.6a1 1 0 0 0-3-3l-4 4a2 2 0 0 0-.5.9l-.8 2.9a.5.5 0 0 0 .6.6l2.9-.8a2 2 0 0 0 .8-.5z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:370,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:368,columnNumber:5},this)}function h3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("circle",{cx:"11",cy:"11",r:"8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:378,columnNumber:7},this),o.jsxDEV("path",{d:"m21 21-4.3-4.3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:379,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:377,columnNumber:5},this)}function m3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("circle",{cx:"12",cy:"12",r:"10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:387,columnNumber:7},this),o.jsxDEV("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:388,columnNumber:7},this),o.jsxDEV("path",{d:"M2 12h20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:389,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:386,columnNumber:5},this)}function f3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"m3 17 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:397,columnNumber:7},this),o.jsxDEV("path",{d:"m3 7 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:398,columnNumber:7},this),o.jsxDEV("path",{d:"M13 6h8M13 12h8M13 18h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:399,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:396,columnNumber:5},this)}function p3(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:407,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:406,columnNumber:5},this)}function v3(){return o.jsxDEV("svg",{...Cn,children:[o.jsxDEV("path",{d:"M12 8V4H8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:415,columnNumber:7},this),o.jsxDEV("rect",{x:"4",y:"8",width:"16",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:416,columnNumber:7},this),o.jsxDEV("path",{d:"M2 14h2M20 14h2M15 13v2M9 13v2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:417,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:414,columnNumber:5},this)}function g3(){return o.jsxDEV("svg",{...Cn,children:o.jsxDEV("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:425,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:424,columnNumber:5},this)}const S1={claude:KU,codex:XU};function sl({agent:i}){const s=S1[i]?i:"claude";return o.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":s,dangerouslySetInnerHTML:{__html:S1[s]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:440,columnNumber:10},this)}const EE=i=>{if(i<=0)return U("time.expired");const s=Math.max(1,Math.round(i/6e4));return U("time.minutes",{n:s})};function CE(i,s=!0){const[l,m]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!s||i==null)return;m(Date.now());const S=setInterval(()=>m(Date.now()),1e3);return()=>clearInterval(S)},[s,i]),i!=null?Math.max(0,i-l):0}const Bb=1280,E1=6;function b3({open:i,tabs:s,activeName:l,name:m,kind:S="static",domain:D=null,port:b,dir:a,expiresAt:d,initialPath:f="/",onSwitchTab:w,onCloseTab:h,onRenew:_,onStop:N,onMinimize:C}){const y=s&&s.length?s:m?[{name:m,kind:S,port:b,dir:a,expiresAt:d,path:f}]:[],c=y.find(K=>K.name===l)||y[0]||null,[p,v]=M.useState(!1),[g,E]=M.useState("mobile"),[R,j]=M.useState(1),[A,k]=M.useState({w:0,h:0}),L=M.useRef(null),O=M.useRef(null);M.useEffect(()=>{i||v(!1)},[i]),M.useEffect(()=>{g==="mobile"&&j(1)},[g]),M.useEffect(()=>{const K=O.current;if(!i||!K)return;const he=()=>k({w:K.clientWidth,h:K.clientHeight});if(he(),typeof ResizeObserver>"u")return;const ce=new ResizeObserver(he);return ce.observe(K),()=>ce.disconnect()},[i]);const H=CE(c==null?void 0:c.expiresAt,i),V=(c==null?void 0:c.kind)==="dynamic"?c.port!=null?`:${c.port}`:"":(c==null?void 0:c.dir)||"",B=K=>K.kind==="dynamic"?K.port!=null?`:${K.port}`:K.name:K.dir?K.dir.split("/").filter(Boolean).pop():U("preview.static"),q=g==="pc"&&A.w>0,ne=A.w>0?A.w/Bb:1,Y=A.h>0?A.h/ne:0,J=ne*R,ee=q?{width:`${Bb*J}px`,height:`${Y*J}px`}:void 0,P=q?{width:`${Bb}px`,height:`${Y}px`,transform:`scale(${J})`,transformOrigin:"0 0"}:void 0,W=K=>j(he=>Math.min(E1,Math.max(1,+(he+K).toFixed(2)))),Q=()=>{const K=L.current;if(K)try{K.contentWindow.location.reload()}catch{K.src=K.src}};return ul.createPortal(o.jsxDEV("div",{className:`file-sheet ${i?"open":""}`,"aria-hidden":!i,children:[o.jsxDEV("div",{className:"file-tabs preview-head",children:[o.jsxDEV("span",{className:"preview-status",children:[o.jsxDEV(yf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:79,columnNumber:11},this),o.jsxDEV("span",{className:"preview-state",children:(c==null?void 0:c.kind)==="dynamic"?U("preview.dynamic"):U("preview.static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:80,columnNumber:11},this),(c==null?void 0:c.name)&&o.jsxDEV("span",{className:"preview-name",title:`${c.name}${V?" "+V:""}`,children:[c.name,V&&o.jsxDEV("span",{className:"preview-detail",children:V},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:83,columnNumber:39},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:82,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:78,columnNumber:9},this),o.jsxDEV("button",{className:"preview-remain",title:U("preview.remainTitle"),"aria-haspopup":"dialog","aria-expanded":p,onClick:()=>v(K=>!K),children:EE(H)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:87,columnNumber:9},this),o.jsxDEV("button",{className:"preview-iconbtn",onClick:()=>E(K=>K==="mobile"?"pc":"mobile"),"aria-label":U(g==="mobile"?"preview.toPcView":"preview.toMobileView"),title:U(g==="mobile"?"preview.pcView":"preview.mobileView"),"aria-pressed":g==="pc",children:g==="mobile"?o.jsxDEV(yf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:34},this):o.jsxDEV(o3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:52},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:89,columnNumber:9},this),o.jsxDEV("button",{className:"preview-iconbtn",onClick:Q,"aria-label":U("preview.refresh"),title:U("preview.refresh"),children:o.jsxDEV(l3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:126},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:9},this),o.jsxDEV("button",{className:"file-min","aria-label":U("preview.minimize"),title:U("preview.minimize"),onClick:C,children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:95,columnNumber:124},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:95,columnNumber:9},this),p&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"preview-pop-backdrop",onClick:()=>v(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:98,columnNumber:13},this),o.jsxDEV("div",{className:"preview-pop",role:"dialog","aria-label":U("preview.ttlDialog"),children:[o.jsxDEV("button",{className:"preview-pop-item",onClick:()=>{v(!1),_==null||_()},children:U("preview.renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:100,columnNumber:15},this),o.jsxDEV("button",{className:"preview-pop-item preview-pop-danger",onClick:()=>{v(!1),N==null||N()},children:U("preview.stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:101,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:99,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:77,columnNumber:7},this),y.length>1&&o.jsxDEV("div",{className:"preview-tabs",role:"tablist","aria-label":U("preview.tabs"),children:y.map(K=>{const he=c&&K.name===c.name;return o.jsxDEV("span",{className:`preview-tab ${he?"active":""}`,children:[o.jsxDEV("button",{className:"preview-tab-btn",role:"tab","aria-selected":he,title:K.name,onClick:()=>w==null?void 0:w(K.name),children:B(K)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:112,columnNumber:17},this),o.jsxDEV("button",{className:"preview-tab-close","aria-label":U("preview.stop"),title:U("preview.stop"),onClick:()=>h==null?void 0:h(K.name),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:114,columnNumber:17},this)]},K.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:111,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:107,columnNumber:9},this),o.jsxDEV("div",{className:`file-body preview-body ${q?"pc":""}`,ref:O,children:y.map(K=>{const he=c&&K.name===c.name,ce=we=>{he&&(L.current=we)},ke=WU({name:K.name,kind:K.kind},D,K.path||"/");return o.jsxDEV("div",{className:"preview-pane",style:he?void 0:{display:"none"},children:he&&q?o.jsxDEV("div",{className:"preview-scaler",style:ee,children:o.jsxDEV("iframe",{ref:ce,className:"preview-frame",title:U("preview.iframeTitle"),style:P,src:ke},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:132,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:131,columnNumber:17},this):o.jsxDEV("iframe",{ref:ce,className:"preview-frame",title:U("preview.iframeTitle"),src:ke},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:135,columnNumber:17},this)},K.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:129,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:121,columnNumber:7},this),q&&o.jsxDEV("div",{className:"preview-zoom",children:[o.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>W(-.5),disabled:R<=1,"aria-label":U("preview.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:143,columnNumber:11},this),o.jsxDEV("span",{className:"preview-zoom-val","aria-hidden":"true",children:[Math.round(R*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:144,columnNumber:11},this),o.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>W(.5),disabled:R>=E1,"aria-label":U("preview.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:142,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:76,columnNumber:5},this),document.body)}const _3={working:"working",compacting:"working",done:"done",idle:"done",permission:"needs"},c_={needs:3,done:2,working:1},y3={working:U("inbox.view.working"),done:U("inbox.view.done"),needs:U("inbox.view.needs")};function w3(i,s={},l=0){const m=[];for(const[S,D]of Object.entries(i)){const b=_3[D.kind];if(!b)continue;const a=D.ts||0;b==="done"&&!(a>Math.max(l||0,s[S]||0))||m.push({pane:S,session:D.session,window:D.window,windowName:D.windowName,view:b,msg:D.msg||"",ts:a,agent:D.agent||"claude"})}return m.sort((S,D)=>S.session<D.session?-1:S.session>D.session?1:c_[D.view]-c_[S.view]||D.ts-S.ts),m}function x3(i){const s={working:0,done:0,needs:0};for(const l of i)s[l.view]!=null&&(s[l.view]+=1);return s}function N3(i){let s=null,l=0;for(const m of i){const S=c_[m.view]||0;S>l&&(l=S,s=m.view)}return s}function C1(i){let s=0;for(const l of Object.values(i))(l.ts||0)>s&&(s=l.ts);return s}function jE(i,s){if(!i)return"";const l=Math.max(0,Math.round((s-i)/1e3));if(l<60)return U("time.secAgo",{n:l});const m=Math.round(l/60);if(m<60)return U("time.minAgo",{n:m});const S=Math.round(m/60);return S<24?U("time.hourAgo",{n:S}):U("time.dayAgo",{n:Math.round(S/24)})}function Fb(i,s,l){const m=i.findIndex(S=>S.id===s);return m<0?null:i[l==="left"?m-1:m+1]??null}const DE="tw_notify",wd=1e4,X_=2e4,u_=()=>localStorage.getItem(DE)==="1",d_=i=>localStorage.setItem(DE,i?"1":"0");function yc(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function kE(){var i;return typeof window<"u"&&(((i=window.matchMedia)==null?void 0:i.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const S3=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function al(i={}){return{Authorization:`Bearer ${go()??""}`,...i}}function h_(i){const s=new Error(U(i));return s.code=i,s}function Hb(i,s){const l=new Error(U(i,s));return l.code=i,l}function nl(i,s,l){let m;return Promise.race([Promise.resolve(i),new Promise((S,D)=>{m=setTimeout(()=>D(h_(l)),s)})]).finally(()=>clearTimeout(m))}async function ol(i,s,l){const m=new AbortController;let S,D=!1;try{return await Promise.race([fetch(i,{...s,signal:m.signal}),new Promise((b,a)=>{S=setTimeout(()=>{D=!0,m.abort(),a(h_(l))},wd)})])}catch(b){throw D?h_(l):b}finally{clearTimeout(S)}}const jd=()=>nl(navigator.serviceWorker.ready,wd,"push.swTimeout"),Af=i=>nl(i.pushManager.getSubscription(),X_,"push.browserTimeout");function E3(i){const s="=".repeat((4-i.length%4)%4),l=(i+s).replace(/-/g,"+").replace(/_/g,"/"),m=atob(l),S=new Uint8Array(m.length);for(let D=0;D<m.length;D+=1)S[D]=m.charCodeAt(D);return S}async function C3(){if(!yc())throw new Error(U("push.unsupported"));if(S3()&&!kE())throw new Error(U("push.iosAddToHome"));if(await nl(Notification.requestPermission(),wd,"push.permissionTimeout")!=="granted")throw new Error(U("push.permissionDenied"));try{await nl(navigator.serviceWorker.register("/sw.js"),wd,"push.swRegisterTimeout")}catch(b){throw(b==null?void 0:b.code)==="push.swRegisterTimeout"?b:Hb("push.swRegisterFailed",{reason:(b==null?void 0:b.message)||U("push.unknownReason")})}const s=await jd(),l=await ol("/api/push/vapid",{headers:al(),cache:"no-store"},"push.configTimeout");if(!l.ok)throw new Error(U("push.noVapid"));const{key:m}=await l.json();let S=await Af(s);S||(S=await nl(s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:E3(m)}),X_,"push.browserTimeout"));const D=await ol("/api/push/subscribe",{method:"POST",headers:al({"Content-Type":"application/json"}),body:JSON.stringify({subscription:S,boundSessions:ma()})},"push.reportTimeout");if(!D.ok){if(D.status===410){try{await S.unsubscribe()}catch{}throw d_(!1),Hb("push.subscriptionExpired")}throw D.status===502?Hb("push.deliveryRejected"):new Error(U("push.subscribeFailed"))}return d_(!0),!0}async function j3(){d_(!1),(async()=>{try{const i=await jd(),s=await Af(i);if(!s)return;await Promise.allSettled([ol("/api/push/unsubscribe",{method:"POST",headers:al({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})},"push.reportTimeout"),nl(Promise.resolve().then(()=>s.unsubscribe()),X_,"push.browserTimeout")])}catch{}})()}async function hc(){if(!(!u_()||!yc()))try{const i=await jd(),s=await Af(i);if(!s)return;await ol("/api/push/bound",{method:"POST",headers:al({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint,boundSessions:ma()})},"push.reportTimeout")}catch{}}async function J_(i){if(!yc())return null;try{const s=await jd(),l=await Af(s);if(!l)return null;const m=await ol("/api/push/key",{method:"POST",headers:al({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:l.endpoint})},"push.configTimeout");if(m.status===401)throw new $i;if(!m.ok){if(i)throw new Error("push key lookup failed");return null}return(await m.json()).pushKey||null}catch(s){if(i)throw s;return null}}const D3=()=>J_(!1);async function k3(i){if(yc())try{const s=await jd();(await nl(s.getNotifications({tag:`pane-${i}`}),wd,"push.swTimeout")).forEach(m=>m.close())}catch{}}async function R3(){const i=await J_(!0);if(!i)return[];const s=await ol(`/api/notifications?device=${encodeURIComponent(i)}`,{headers:al(),cache:"no-store"},"push.configTimeout");if(s.status===401)throw new $i;if(!s.ok)throw new Error("notification inbox load failed");return(await s.json()).items||[]}async function T3(i){const s=await J_(!0);if(!s)throw new Error("notification device unavailable");const l=await ol(`/api/notifications/${encodeURIComponent(i)}?device=${encodeURIComponent(s)}`,{method:"DELETE",headers:al()},"push.reportTimeout");if(l.status===401)throw new $i;if(!l.ok||(await l.json()).ok!==!0)throw new Error("notification delete failed");return!0}function L3(i){if(typeof i!="string")return null;const s=i.trim();if(!s)return null;try{const l=new URL(s,window.location.origin);return l.protocol!=="http:"&&l.protocol!=="https:"?null:s}catch{return null}}function j1(i){const s=Math.max(0,Date.now()-i),l=Math.floor(s/6e4);if(l<1)return U("pushInbox.justNow");if(l<60)return U("pushInbox.minutesAgo").replace("{n}",l);const m=Math.floor(l/60);return m<24?U("pushInbox.hoursAgo").replace("{n}",m):new Date(i).toLocaleDateString()}const A3={expired:"pushInbox.deliveryReasonExpired",rate_limited:"pushInbox.deliveryReasonRateLimited",service_unavailable:"pushInbox.deliveryReasonUnavailable",rejected:"pushInbox.deliveryReasonRejected",network_error:"pushInbox.deliveryReasonNetwork",not_configured:"pushInbox.deliveryReasonNotConfigured"};function zb(i,s=!1){if((i==null?void 0:i.status)==="pending")return U("pushInbox.deliveryPending");if((i==null?void 0:i.status)==="success")return U("pushInbox.deliverySuccess");if((i==null?void 0:i.status)==="failed"){if(!s)return U("pushInbox.deliveryFailed");const l=U(A3[i.reason]||"pushInbox.deliveryReasonUnknown");return`${U("pushInbox.deliveryFailed")} · ${l}`}return""}function M3({open:i,detailId:s,items:l,readIds:m=[],onOpenDetail:S,onCloseDetail:D,onClose:b,onDelete:a,deletingId:d=null,error:f="",onRetry:w,onMarkAllRead:h,unreadCount:_=0}){const N=new Set(m),C=s!=null,y=C?l.find(g=>g.id===s):null,c=L3(y==null?void 0:y.url),p=zb(y==null?void 0:y.delivery,!0),v=l.some(g=>!N.has(g.id));return ul.createPortal(o.jsxDEV("div",{className:`file-sheet push-inbox-sheet ${i?"open":""}`,"aria-hidden":!i,role:"dialog","aria-label":U("pushInbox.title"),children:[o.jsxDEV("div",{className:"file-tabs push-inbox-head",children:[C?o.jsxDEV("div",{className:"push-inbox-drill-head",children:[o.jsxDEV("button",{className:"push-inbox-back","aria-label":U("pushInbox.back"),title:U("pushInbox.back"),onClick:D,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:57,columnNumber:13},this),o.jsxDEV("span",{className:"push-inbox-head-title",children:U("pushInbox.detailTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:58,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:56,columnNumber:11},this):o.jsxDEV("span",{className:"push-inbox-head-title push-inbox-list-title",children:[U("pushInbox.title"),_>0&&o.jsxDEV("span",{className:"push-inbox-unread-count",children:U("pushInbox.unreadCount").replace("{n}",_)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:63,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:61,columnNumber:11},this),!C&&v&&o.jsxDEV("button",{className:"push-inbox-markall",onClick:h,children:U("pushInbox.markAllRead")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:67,columnNumber:11},this),o.jsxDEV("button",{className:"file-min","aria-label":U("common.close"),title:U("common.close"),onClick:b,children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:113},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:54,columnNumber:7},this),o.jsxDEV("div",{className:"push-inbox-body",children:[f&&o.jsxDEV("div",{className:"push-inbox-error",role:"alert",children:[o.jsxDEV("span",{children:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:75,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:w,children:U("pushInbox.retry")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:76,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:74,columnNumber:11},this),C?y?o.jsxDEV("div",{className:"push-inbox-detail",children:[o.jsxDEV("div",{className:"push-inbox-detail-title",children:y.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:82,columnNumber:15},this),o.jsxDEV("div",{className:"push-inbox-detail-time",children:j1(y.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:83,columnNumber:15},this),p&&o.jsxDEV("div",{className:`push-inbox-delivery detail ${y.delivery.status}`,children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:84,columnNumber:34},this),o.jsxDEV("div",{className:"push-inbox-detail-text",children:y.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:85,columnNumber:15},this),c&&o.jsxDEV("a",{className:"fontbtn push-inbox-openurl",href:c,children:U("pushInbox.openUrl")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:86,columnNumber:29},this),o.jsxDEV("button",{className:"fontbtn push-inbox-detail-del",disabled:d!=null,onClick:async()=>{await a(y.id)&&D()},children:U("pushInbox.delete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:87,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:81,columnNumber:13},this):o.jsxDEV("p",{className:"push-inbox-empty",children:U("pushInbox.expired")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:93,columnNumber:13},this):l.length===0&&!f?o.jsxDEV("p",{className:"push-inbox-empty",children:U("pushInbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:96,columnNumber:11},this):l.length>0?o.jsxDEV("ul",{className:"push-inbox-list",children:l.map(g=>o.jsxDEV("li",{className:`push-inbox-row${N.has(g.id)?"":" push-inbox-unread"}`,children:[o.jsxDEV("button",{className:"push-inbox-main",onClick:()=>S(g.id),children:[o.jsxDEV("div",{className:"push-inbox-row-top",children:[o.jsxDEV("span",{className:"push-inbox-row-title",children:g.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:103,columnNumber:21},this),zb(g.delivery)&&o.jsxDEV("span",{className:`push-inbox-delivery ${g.delivery.status}`,children:zb(g.delivery)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:105,columnNumber:23},this),o.jsxDEV("span",{className:"push-inbox-row-time",children:j1(g.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:107,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:102,columnNumber:19},this),o.jsxDEV("div",{className:"push-inbox-row-body",children:g.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:109,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:101,columnNumber:17},this),o.jsxDEV("button",{className:"push-inbox-del",disabled:d!=null,onClick:()=>a(g.id),"aria-label":U("pushInbox.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:111,columnNumber:17},this)]},g.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:100,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:98,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:72,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:52,columnNumber:5},this),document.body)}const m_="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",U3=["md","markdown","html","htm","txt","log","sh"],O3=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],V3=[...U3,...O3].join("|"),D1=new RegExp(`[^${m_}]+\\.(?:${V3})(?=$|[${m_}.])`,"gi");function P3(i){const s=[];if(!i)return s;D1.lastIndex=0;let l;for(;(l=D1.exec(i))!==null;){let m=l.index,S=l[0];const D=/^@+/.exec(S);D&&(m+=D[0].length,S=S.slice(D[0].length)),S&&s.push({start:m,end:m+S.length,path:S})}return s}const RE=i=>typeof i=="string"&&i.startsWith("/");function Zo(i,s){const l=RE(s)?s:`${i.replace(/\/+$/,"")}/${s}`,m=l.startsWith("/"),S=[];for(const D of l.split("/"))if(!(!D||D===".")){if(D===".."){S.pop();continue}S.push(D)}return(m?"/":"")+S.join("/")}const I3={key:"home",type:"home",name:U("doc.home")},TE=(i,s)=>({...i,type:s.type??i.type,name:s.name??i.name,content:s.content!==void 0?s.content:i.content,mtime:s.mtime!==void 0?s.mtime:i.mtime});function B3(i,s,l){if(i.tabs.some(S=>S.key===s))return{tabs:i.tabs.map(S=>S.key===s?TE(S,l):S),active:s};const m={key:s,type:l.type,name:l.name,content:l.content,mtime:l.mtime,path:s};return{tabs:[...i.tabs,m],active:s}}function F3(i,s,l){return i.tabs.some(m=>m.key===s)?{...i,tabs:i.tabs.map(m=>m.key===s?TE(m,l):m)}:i}function H3(i,s){const l=i.tabs.findIndex(D=>D.key===s);if(l<=0)return i;const m=i.tabs.filter(D=>D.key!==s),S=i.active===s?i.tabs[l-1].key:i.active;return{tabs:m,active:S}}function z3(){const[i,s]=M.useState({tabs:[I3],active:"home"}),l=M.useCallback((b,a)=>s(d=>B3(d,b,a)),[]),m=M.useCallback((b,a)=>s(d=>F3(d,b,a)),[]),S=M.useCallback(b=>s(a=>H3(a,b)),[]),D=M.useCallback(b=>s(a=>({...a,active:b})),[]);return{tabs:i.tabs,active:i.active,openDoc:l,refreshDoc:m,closeTab:S,activate:D}}function k1(i){return String(i||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function $3({session:i,windowName:s,windowId:l}){const m=[i,s].map(k1).filter(Boolean);return m.push(k1(l)||"w"),m.join("-")}function W3(i,{settingsOpen:s,setSettingsOpen:l}){var ee,P,W,Q,K,he;const[m,S]=M.useState([]),[D,b]=M.useState(null),[a,d]=M.useState(!1),[f,w]=M.useState(!1),[h,_]=M.useState(null),[N,C]=M.useState({}),y=M.useCallback(async()=>{try{const ce=await GU();S(ce.previews||[]),b(ce.domain??null),d(!!ce.dynamicEnabled)}catch{}},[]);M.useEffect(()=>{y()},[y]);const c=i?$3({session:(ee=i.session)==null?void 0:ee.name,windowName:(P=i.window)==null?void 0:P.name,windowId:(W=i.window)==null?void 0:W.id}):null,p=m.find(ce=>ce.name===c&&ce.expiresAt>Date.now())||null,v=(p==null?void 0:p.expiresAt)??null,g=ce=>!!c&&(ce===c||ce.startsWith(`${c}-`)),E=Date.now(),R=m.filter(ce=>ce&&ce.expiresAt>E&&g(ce.name)).map(ce=>({name:ce.name,kind:ce.kind,port:ce.port,protocol:ce.protocol,dir:ce.dir,expiresAt:ce.expiresAt,path:N[ce.name]||"/"})).sort((ce,ke)=>ce.name===c?-1:ke.name===c?1:(ce.port||0)-(ke.port||0)),j=((Q=R.find(ce=>ce.name===h))==null?void 0:Q.name)??((K=R[0])==null?void 0:K.name)??null,A=R.find(ce=>ce.name===j)??null,k=(A==null?void 0:A.path)||"/";M.useEffect(()=>{_(null)},[c]);const L=R.length>0;M.useEffect(()=>{L||w(!1)},[L]),M.useEffect(()=>{if(v==null)return;const ce=setTimeout(y,Math.max(0,v-Date.now())+500);return()=>clearTimeout(ce)},[v,y]);const O=M.useCallback(()=>{_(c),s?(l(!1),requestAnimationFrame(()=>w(!0))):w(!0)},[s,l,c]),H=M.useCallback(async ce=>{var ke;if(c)try{await Zm(c,{dir:ce}),AM((ke=i==null?void 0:i.window)==null?void 0:ke.id,ce),C(we=>({...we,[c]:"/"})),await y(),O()}catch{}},[c,(he=i==null?void 0:i.window)==null?void 0:he.id,y,O]),V=M.useCallback(async ce=>{if(!c)return;await Zm(c,{port:ce}),C(ge=>({...ge,[c]:"/"})),_(c),await y();let ke=!1;const we=()=>{ke||(ke=!0,window.removeEventListener("popstate",re),clearTimeout(G),w(!0))},re=()=>we();window.addEventListener("popstate",re);const G=setTimeout(we,300);l(!1)},[c,y,l]),B=M.useCallback(async({protocol:ce="http",port:ke,path:we})=>{if(!c)return;const re=`${c}-${ke}`;await Zm(re,{port:ke,protocol:ce}),C(G=>({...G,[re]:we||"/"})),_(re),await y(),w(!0)},[c,y]),q=M.useCallback(ce=>_(ce),[]),ne=M.useCallback(async ce=>{if(ce)try{await qU(ce),C(ke=>{const we={...ke};return delete we[ce],we}),h===ce&&_(null),await y()}catch{}},[h,y]),Y=M.useCallback(()=>ne(j),[ne,j]),J=M.useCallback(async()=>{const ce=R.find(we=>we.name===j);if(!ce)return;const ke=ce.kind==="dynamic"?{port:ce.port,protocol:ce.protocol||"http"}:{dir:ce.dir};try{await Zm(ce.name,ke),await y()}catch{}},[R,j,y]);return{previews:m,previewDomain:D,dynamicEnabled:a,previewSheetOpen:f,setPreviewSheetOpen:w,activePreview:p,curPreviewName:c,tabs:R,activeName:j,shownPreview:A,shownPath:k,refreshPreviews:y,openPreviewSheet:O,startPreview:H,startDynamicPreview:V,startUrlPreview:B,switchTab:q,closeTab:ne,stopPreview:Y,renewPreview:J}}function LE(i,{port:s}={}){const l=(i==null?void 0:i.serverError)||(i==null?void 0:i.message)||"";return l==="port not listening"?U("localurl.notListening",{port:s??"?"}):l==="bad port"?U("settings.err_bad_port"):l==="dynamic disabled"||l==="previews disabled"?U("localurl.disabled"):l==="bad protocol"?U("localurl.badProtocol"):(i==null?void 0:i.name)==="TypeError"||/(?:timeout|failed to fetch|network)/i.test(l)?U("localurl.network"):l?U("localurl.failed",{reason:l}):U("settings.err_start_failed")}function lf({fetch:i,apply:s,intervalMs:l,enabled:m=!0,deps:S=[]}){const D=M.useRef(i),b=M.useRef(s);D.current=i,b.current=s,M.useEffect(()=>{if(!m)return;let a=!1,d=null;const f=async()=>{if(!document.hidden)try{const _=await D.current();a||b.current(_)}catch{}},w=()=>{f(),d=setTimeout(w,l)};w();const h=()=>{document.hidden||(clearTimeout(d),w())};return document.addEventListener("visibilitychange",h),()=>{a=!0,clearTimeout(d),document.removeEventListener("visibilitychange",h)}},[m,l,...S])}const R1={type:"key",key:"C-c",label:"Ctrl+C"},Mf={command:[{...R1}],chat:[{...R1},{type:"key",key:"Escape",label:"Esc"},{type:"key",key:"Tab",label:"Tab"},{type:"key",key:"BSpace",label:"⌫"},{type:"text",text:"ok",enter:!0},{type:"text",text:"go on",enter:!0},{type:"text",text:"1",enter:!0},{type:"text",text:"2",enter:!0},{type:"text",text:"3",enter:!0},{type:"text",text:"/compact",enter:!0},{type:"text",text:"/clear",enter:!0},{type:"text",text:"/model",enter:!0}]};function yn(i){return i.type==="key"||i.kind==="key"?`key:${i.key||i.text}`:`text:${i.text}:${i.enter?"enter":"no-enter"}`}function G3(i,s){return i.type==="key"?{kind:"key",text:i.key,label:i.label||i.key,source:"config"}:{kind:s==="chat"&&!i.text.startsWith("/")?"reply":"cmd",text:i.text,enter:!!i.enter,source:"config"}}function il(i,s,l){const m=(Array.isArray(i)?i:[]).map(b=>G3(b,l)),S=new Set(m.map(yn)),D=(Array.isArray(s)?s:[]).filter(b=>!S.has(yn(b))).map(b=>({...b,source:"local"}));return[...m,...D]}function q3(i){return i&&Array.isArray(i.command)&&Array.isArray(i.chat)}function Y3({enabled:i=!0}={}){const[s,l]=M.useState(null),m=M.useRef(!1),S=M.useRef(!1),D=M.useRef(!0),b=M.useRef(i),a=M.useRef(0);M.useLayoutEffect(()=>(D.current=!0,()=>{D.current=!1}),[]),M.useLayoutEffect(()=>{b.current!==i&&(b.current=i,a.current+=1)},[i]);const d=M.useCallback(()=>{if(!D.current||!b.current||S.current)return;S.current=!0;const f=a.current;let w;try{w=LU()}catch{S.current=!1;return}Promise.resolve(w).then(h=>{!D.current||!b.current||a.current!==f||!h||typeof h!="object"||l({...h,shortcuts:q3(h.shortcuts)?h.shortcuts:Mf})}).catch(()=>{}).finally(()=>{S.current=!1})},[]);return M.useEffect(()=>{!i||m.current||(m.current=!0,d())},[i,d]),M.useEffect(()=>{if(!i)return;const f=()=>{document.hidden||d()};return document.addEventListener("visibilitychange",f),()=>{document.removeEventListener("visibilitychange",f)}},[i,d]),s}function K3(i,s){return i instanceof $i?(s==null||s(),!0):!1}function X3(i,{ignored:s=!1,autoShown:l=!1,liveSessionCount:m=0}={}){return!i||!i.promptEligible||s===!0||i.resolved||i.pendingCount<1?"none":m===0&&l!==!0?"auto-dialog":"card"}function AE(i){return(i==null?void 0:i.changeReason)==="boot-changed"?"workspace.bootDetected":"workspace.tmuxDetected"}function ME(i){const s=Date.parse(i);if(!Number.isFinite(s))return U("workspace.unknownTime");try{return new Intl.DateTimeFormat(vo(),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(s))}catch{return new Date(s).toLocaleString()}}function J3({plan:i,operation:s=null,onOpen:l}){var S;if(!i)return null;const m=(s==null?void 0:s.status)==="partial"?(s.results||[]).filter(D=>D.status==="failed").length:0;return o.jsxDEV("button",{type:"button",className:"workspace-recovery-card",onClick:l,children:[o.jsxDEV("strong",{children:U(AE(i))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:23,columnNumber:7},this),o.jsxDEV("span",{children:U("workspace.summary",{sessions:((S=i.summary)==null?void 0:S.sessions)??0,time:ME(i.capturedAt)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:24,columnNumber:7},this),m>0&&o.jsxDEV("span",{className:"workspace-recovery-partial",children:U("workspace.partialCard",{failures:m})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:28,columnNumber:24},this),o.jsxDEV("span",{className:"workspace-recovery-action",children:U("workspace.restoreLast")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:22,columnNumber:5},this)}function Z3({open:i,currentSessionName:s,bound:l,onSelectSession:m,onUnbind:S,onBind:D,onClose:b,onLogout:a,orphans:d=[],onTakeoverRequest:f,recoveryPlan:w=null,recoveryOperation:h=null,onOpenRecovery:_}){const[N,C]=M.useState(!1);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:`drawer ${i?"open":""}`,children:[o.jsxDEV("div",{className:"drawer-list",children:[o.jsxDEV("div",{className:"drawer-title",children:"SESSIONS"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:21,columnNumber:11},this),l.length===0&&o.jsxDEV("div",{className:"drawer-empty",children:U("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:34},this),l.map(y=>o.jsxDEV("div",{className:`drawer-row drawer-session ${y===s?"active":""}`,children:[o.jsxDEV("span",{className:"drawer-name",onClick:()=>m(y),children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:28,columnNumber:15},this),o.jsxDEV("button",{className:"drawer-unbind",onClick:c=>{c.stopPropagation(),S(y)},"aria-label":U("drawer.unbind"),title:U("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:29,columnNumber:15},this)]},y,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:24,columnNumber:13},this)),o.jsxDEV("button",{className:"drawer-bind",onClick:D,children:["+ ",U("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:37,columnNumber:11},this),d.length>0&&o.jsxDEV("div",{className:"drawer-orphans",children:[o.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>C(y=>!y),children:[o.jsxDEV("span",{children:U("drawer.orphans.title",{n:d.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:42,columnNumber:17},this),o.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:N?"▾":"▸"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:43,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:41,columnNumber:15},this),N&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"drawer-orphans-hint",children:U("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:47,columnNumber:19},this),d.map(y=>{const c=!y.sessionId,p=y.state==="busy"||c;return o.jsxDEV("div",{className:"drawer-orphan-row",children:[o.jsxDEV("div",{className:"drawer-orphan-head",children:[o.jsxDEV("span",{className:"drawer-orphan-cwd",title:y.cwd,children:y.cwdLabel||y.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:54,columnNumber:27},this),o.jsxDEV("button",{className:"drawer-orphan-btn",disabled:p,title:c?U("inbox.orphans.noSession"):void 0,onClick:()=>f==null?void 0:f(y),children:U("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:55,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:53,columnNumber:25},this),o.jsxDEV("div",{className:"drawer-orphan-meta",children:[y.agentLabel&&o.jsxDEV("span",{className:"drawer-orphan-agent",children:y.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:65,columnNumber:44},this),o.jsxDEV("span",{className:`drawer-orphan-state ${y.state==="busy"?"busy":"idle"}`,children:y.state==="busy"?U("inbox.orphans.busy"):U("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:66,columnNumber:27},this),o.jsxDEV("span",{className:"drawer-orphan-time",children:jE(y.startedAt||y.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:69,columnNumber:27},this),y.snippet&&o.jsxDEV("span",{className:"drawer-orphan-msg",children:y.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:70,columnNumber:41},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:25},this)]},y.pid,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:46,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:13},this),w&&o.jsxDEV(J3,{plan:w,operation:h,onOpen:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:80,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:9},this),o.jsxDEV("button",{className:"drawer-logout",onClick:a,children:U("drawer.logout")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:83,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:19,columnNumber:7},this),i&&o.jsxDEV("div",{className:"drawer-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:85,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:18,columnNumber:5},this)}const Q3=500,T1=10;function Uf(i,{onClick:s}={}){const l=M.useRef(null),m=M.useRef(null),S=M.useRef(!1),D=()=>{l.current&&(clearTimeout(l.current),l.current=null)};return{onPointerDown:b=>{S.current=!1,m.current={x:b.clientX,y:b.clientY},D(),l.current=setTimeout(()=>{l.current=null,S.current=!0,i==null||i()},Q3)},onPointerMove:b=>{!l.current||!m.current||(Math.abs(b.clientX-m.current.x)>T1||Math.abs(b.clientY-m.current.y)>T1)&&D()},onPointerUp:D,onPointerLeave:D,onPointerCancel:D,onClick:b=>{var a,d;if(S.current){S.current=!1,(a=b.preventDefault)==null||a.call(b),(d=b.stopPropagation)==null||d.call(b);return}s==null||s(b)}}}const f_=248,p_=158,wf=6,L1=2,e2=52,t2=34,Qm=i=>typeof i=="number"&&Number.isFinite(i);function v_(i){return Array.isArray(i)&&i.length>0&&i.every(s=>Qm(s.left)&&Qm(s.top)&&Qm(s.width)&&Qm(s.height))}const A1=i=>[...new Set(i)].sort((s,l)=>s-l);function M1(i,s,l){const m=[];for(let d=0;d<i.length-1;d+=1){const f=i[d],w=i[d+1],h=s.some(([_,N])=>_===f&&N===w);m.push(w-f<=1&&!h)}const S=m.filter(d=>!d).length,D=S>0?(l-m.filter(Boolean).length*L1)/S:l,b=[{at:0}];let a=0;for(let d=0;d<m.length;d+=1)a+=m[d]?L1:D,b.push({at:a});return b}function n2(i){if(!v_(i))return null;const s=Math.max(...i.map(w=>w.left+w.width)),l=Math.max(...i.map(w=>w.top+w.height));if(s<=0||l<=0)return null;const m=A1(i.flatMap(w=>[w.left,w.left+w.width])),S=A1(i.flatMap(w=>[w.top,w.top+w.height])),D=i.map(w=>[w.left,w.left+w.width]),b=i.map(w=>[w.top,w.top+w.height]),a=M1(m,D,f_-wf*2),d=M1(S,b,p_-wf*2),f=i.map((w,h)=>{const _=a[m.indexOf(w.left)].at,N=a[m.indexOf(w.left+w.width)].at,C=d[S.indexOf(w.top)].at,y=d[S.indexOf(w.top+w.height)].at;return{id:w.id,active:!!w.active,command:w.command,seq:h,left:_,top:C,width:N-_,height:y-C,cols:w.width,rows:w.height}});return{w:f_,h:p_,cells:f}}function i2(i){const s=i.width<e2,l=i.height<t2;return s&&l?"tiny":s?"narrow":l?"flat":""}const $b={terminal:"终端",chat:"对话"};function r2(){return o.jsxDEV("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsxDEV("path",{d:"M4 8h13M13 4l4 4-4 4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:12,columnNumber:7},this),o.jsxDEV("path",{d:"M20 16H7M11 20l-4-4 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:13,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:10,columnNumber:5},this)}function s2({value:i,onChange:s}){const l=i==="chat"?"terminal":"chat";return o.jsxDEV("button",{type:"button",className:"lens-toggle",onClick:()=>s(l),"aria-label":`切换到${$b[l]}视图`,title:`切换到${$b[l]}视图`,children:[o.jsxDEV(r2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:28,columnNumber:7},this),o.jsxDEV("span",{className:"lens-toggle-label",children:$b[i]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:21,columnNumber:5},this)}const U1="①②③④⑤⑥⑦⑧⑨",pd=i=>i<U1.length?U1[i]:String(i+1),a2=(i,s)=>`${pd(s)} ${i.command||i.id}`;function o2({window:i,active:s,agent:l,onSelect:m,onManage:S}){const D=Uf(()=>S(i),{onClick:()=>m(i)});return o.jsxDEV("button",{"data-win":i.id,className:`win-tab ${s?"active":""}`,...D,children:[l&&o.jsxDEV(sl,{agent:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:25,columnNumber:17},this),i.name||i.id,i.panes>1&&o.jsxDEV("span",{className:"win-panes",children:i.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:27,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:24,columnNumber:5},this)}const l2=200,c2=90;function u2({cell:i,cur:s,releasing:l,picking:m,agent:S,onChoose:D,onManage:b}){const a=i2(i),d=i.command||i.id,w=Number.isFinite(i.cols)&&Number.isFinite(i.rows)?`${i.cols}×${i.rows}`:"",h=a===""&&i.width>=c2&&w,_=Uf(()=>b(i.id),{onClick:()=>D(i.id)});return o.jsxDEV("button",{type:"button",role:"option","aria-selected":s,"aria-label":w?`${d}, ${w}`:d,className:`pane-map-cell${s?" is-current":""}${l?" is-releasing":""}${a?` is-${a}`:""}${m?" is-picking":""}`,style:{left:`${i.left+wf}px`,top:`${i.top+wf}px`,width:`${i.width}px`,height:`${i.height}px`},..._,children:o.jsxDEV("span",{className:"pmc-surf",children:a==="narrow"||a==="tiny"?o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:pd(i.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:61,columnNumber:11},this):a==="flat"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:pd(i.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:64,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:65,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:63,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-row",children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:pd(i.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:70,columnNumber:15},this),S&&o.jsxDEV(sl,{agent:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:71,columnNumber:25},this),h&&o.jsxDEV("span",{className:"pmc-dims","aria-hidden":"true",children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:72,columnNumber:34},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:69,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:74,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:68,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:59,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:50,columnNumber:5},this)}function d2({window:i,panes:s,paneAgents:l={},currentPaneId:m,agent:S,onManage:D,onManagePane:b,onSelectPane:a,onBeforePaneMapOpen:d,paneSheetOpen:f=!1,openMapFor:w=null,onMapOpened:h,onPaneMapOpenChange:_}){const[N,C]=M.useState(!1),y=M.useRef(N),c=M.useRef(_);y.current=N,c.current=_,M.useEffect(()=>{_==null||_(N)},[N,_]),M.useEffect(()=>()=>{var Y;y.current&&((Y=c.current)==null||Y.call(c,!1))},[]);const[p,v]=M.useState(null),g=M.useRef(null);M.useEffect(()=>()=>clearTimeout(g.current),[]);const E=Y=>{var ee;try{(ee=navigator.vibrate)==null||ee.call(navigator,10)}catch{}if(f&&(b==null||b(Y)),typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(Y);return}v(Y),clearTimeout(g.current),g.current=setTimeout(()=>{v(null),a(Y)},l2)},[R,j]=M.useState(null),A=M.useRef(null),k=M.useRef(null),L=v_(s)?n2(s):null,O=L?L.w:f_,H=L?L.h:p_,V=()=>{var K;const Y=(K=A.current)==null?void 0:K.getBoundingClientRect();if(!Y)return;const J=8,ee=window.innerWidth,P=window.innerHeight,W=Math.max(J,Math.min(Y.left,ee-O-J));let Q=Y.bottom+6;if(Q+H+J>P){const he=Y.top-6-H;Q=he>=J?he:Math.max(J,P-H-J)}j({top:Q,left:W})},B=Uf(()=>D(i),{onClick:()=>{if(N){C(!1);return}const Y=()=>{V(),C(!0)};d?Promise.resolve(d(i.id)).then(Y,Y):Y()}});M.useEffect(()=>{w&&w===i.id&&(V(),C(!0),h==null||h())},[w,i.id]),M.useEffect(()=>{if(!N)return;const Y=ee=>{var P,W;f||!((P=A.current)!=null&&P.contains(ee.target))&&!((W=k.current)!=null&&W.contains(ee.target))&&C(!1)},J=()=>V();return document.addEventListener("pointerdown",Y,!0),window.addEventListener("scroll",J,!0),window.addEventListener("resize",J),()=>{document.removeEventListener("pointerdown",Y,!0),window.removeEventListener("scroll",J,!0),window.removeEventListener("resize",J)}},[N,f]);const q=Math.max(0,s.findIndex(Y=>Y.id===m)),ne=s[q];return o.jsxDEV("div",{className:"wt-dd active","data-win":i.id,ref:A,children:[o.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":N,...B,children:[S&&o.jsxDEV(sl,{agent:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:199,columnNumber:19},this),o.jsxDEV("span",{className:"wt-name",children:i.name||i.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:200,columnNumber:9},this),o.jsxDEV("span",{className:"wt-sep","aria-hidden":"true",children:"│"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:201,columnNumber:9},this),o.jsxDEV("span",{className:"wt-pane",children:a2(ne,q)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:202,columnNumber:9},this),o.jsxDEV("span",{className:`wt-caret${N?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:203,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:193,columnNumber:7},this),N&&R&&(v_(s)?ul.createPortal(o.jsxDEV("div",{ref:k,className:"pane-map",role:"listbox",style:{top:R.top,left:R.left,width:O,height:H},children:L.cells.map(Y=>{const J=Y.id===m;return o.jsxDEV(u2,{cell:Y,cur:J,releasing:J&&!!p&&p!==m,picking:p===Y.id,agent:l[Y.id],onChoose:E,onManage:b},Y.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:212,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:208,columnNumber:13},this),document.body):o.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:R.top,left:R.left},children:s.map((Y,J)=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":Y.id===m,className:`dd-option${Y.id===m?" is-selected":""}`,onClick:()=>{a(Y.id),C(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:[o.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:pd(J)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:239,columnNumber:19},this),l[Y.id]&&o.jsxDEV(sl,{agent:l[Y.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:240,columnNumber:40},this),o.jsxDEV("span",{className:"dd-pane-cmd",children:Y.command||Y.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:241,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:238,columnNumber:17},this),Y.id===m&&o.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:243,columnNumber:44},this)]},Y.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:230,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:228,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:192,columnNumber:5},this)}function h2({windows:i,windowAgents:s={},paneAgents:l={},currentAgent:m,currentWindowId:S,panes:D,currentPaneId:b,onSelectWindow:a,onSelectPane:d,onNewWindow:f,onManageWindow:w,onManagePane:h,onBeforePaneMapOpen:_,paneSheetOpen:N=!1,openMapFor:C=null,onMapOpened:y,onPaneMapOpenChange:c,trackWindowId:p,lens:v="terminal",onLensChange:g=()=>{},chatLensEnabled:E=!1}){const R=M.useRef(null);return M.useLayoutEffect(()=>{var j,A;p&&((A=(j=R.current)==null?void 0:j.querySelector(`[data-win="${p}"]`))==null||A.scrollIntoView({block:"nearest",inline:"nearest"}))},[i,p]),o.jsxDEV("div",{className:"windowbar",children:[o.jsxDEV("div",{className:"windowbar-scroll",ref:R,children:[i.map(j=>{const A=j.id===S;return A&&D.length>1?o.jsxDEV(d2,{window:j,panes:D,paneAgents:l,currentPaneId:b,agent:m,onManage:w,onManagePane:h,onSelectPane:d,onBeforePaneMapOpen:_,paneSheetOpen:N,openMapFor:C,onMapOpened:y,onPaneMapOpenChange:c},j.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:275,columnNumber:15},this):o.jsxDEV(o2,{window:j,active:A,agent:s[j.id],onSelect:a,onManage:w},j.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:294,columnNumber:13},this)}),o.jsxDEV("button",{className:"win-tab win-new",onClick:f,"aria-label":U("windowbar.newWindow"),title:U("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:304,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:270,columnNumber:7},this),m==="claude"&&E&&o.jsxDEV(s2,{value:v,onChange:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:307,columnNumber:56},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:269,columnNumber:5},this)}var UE={exports:{}};(function(i,s){(function(l,m){i.exports=m()})(globalThis,()=>(()=>{var l={4567:function(b,a,d){var f=this&&this.__decorate||function(v,g,E,R){var j,A=arguments.length,k=A<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,g,E,R);else for(var L=v.length-1;L>=0;L--)(j=v[L])&&(k=(A<3?j(k):A>3?j(g,E,k):j(g,E))||k);return A>3&&k&&Object.defineProperty(g,E,k),k},w=this&&this.__param||function(v,g){return function(E,R){g(E,R,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=d(9042),_=d(9924),N=d(844),C=d(4725),y=d(2585),c=d(3656);let p=a.AccessibilityManager=class extends N.Disposable{constructor(v,g,E,R){super(),this._terminal=v,this._coreBrowserService=E,this._renderService=R,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let j=0;j<this._terminal.rows;j++)this._rowElements[j]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[j]);if(this._topBoundaryFocusListener=j=>this._handleBoundaryFocus(j,0),this._bottomBoundaryFocusListener=j=>this._handleBoundaryFocus(j,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new _.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(j=>this._handleResize(j.rows))),this.register(this._terminal.onRender(j=>this._refreshRows(j.start,j.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(j=>this._handleChar(j))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
207
|
+
`))),this.register(this._terminal.onA11yTab(j=>this._handleTab(j))),this.register(this._terminal.onKey(j=>this._handleKey(j.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,c.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,N.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(v){for(let g=0;g<v;g++)this._handleChar(" ")}_handleChar(v){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==v&&(this._charsToAnnounce+=v):this._charsToAnnounce+=v,v===`
|
|
208
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(v){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(v)||this._charsToConsume.push(v)}_refreshRows(v,g){this._liveRegionDebouncer.refresh(v,g,this._terminal.rows)}_renderRows(v,g){const E=this._terminal.buffer,R=E.lines.length.toString();for(let j=v;j<=g;j++){const A=E.lines.get(E.ydisp+j),k=[],L=(A==null?void 0:A.translateToString(!0,void 0,void 0,k))||"",O=(E.ydisp+j+1).toString(),H=this._rowElements[j];H&&(L.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=L,this._rowColumns.set(H,k)),H.setAttribute("aria-posinset",O),H.setAttribute("aria-setsize",R))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(v,g){const E=v.target,R=this._rowElements[g===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||v.relatedTarget!==R)return;let j,A;if(g===0?(j=E,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(j=this._rowElements.shift(),A=E,this._rowContainer.removeChild(j)),j.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const k=this._createAccessibilityTreeNode();this._rowElements.unshift(k),this._rowContainer.insertAdjacentElement("afterbegin",k)}else{const k=this._createAccessibilityTreeNode();this._rowElements.push(k),this._rowContainer.appendChild(k)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),v.preventDefault(),v.stopImmediatePropagation()}_handleSelectionChange(){var L;if(this._rowElements.length===0)return;const v=document.getSelection();if(!v)return;if(v.isCollapsed)return void(this._rowContainer.contains(v.anchorNode)&&this._terminal.clearSelection());if(!v.anchorNode||!v.focusNode)return void console.error("anchorNode and/or focusNode are null");let g={node:v.anchorNode,offset:v.anchorOffset},E={node:v.focusNode,offset:v.focusOffset};if((g.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||g.node===E.node&&g.offset>E.offset)&&([g,E]=[E,g]),g.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(g={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(g.node))return;const R=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(R)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:R,offset:((L=R.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(E.node))return;const j=({node:O,offset:H})=>{const V=O instanceof Text?O.parentNode:O;let B=parseInt(V==null?void 0:V.getAttribute("aria-posinset"),10)-1;if(isNaN(B))return console.warn("row is invalid. Race condition?"),null;const q=this._rowColumns.get(V);if(!q)return console.warn("columns is null. Race condition?"),null;let ne=H<q.length?q[H]:q.slice(-1)[0]+1;return ne>=this._terminal.cols&&(++B,ne=0),{row:B,column:ne}},A=j(g),k=j(E);if(A&&k){if(A.row>k.row||A.row===k.row&&A.column>=k.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(k.row-A.row)*this._terminal.cols-A.column+k.column)}}_handleResize(v){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);for(;this._rowElements.length>v;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const v=this._coreBrowserService.mainDocument.createElement("div");return v.setAttribute("role","listitem"),v.tabIndex=-1,this._refreshRowDimensions(v),v}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let v=0;v<this._terminal.rows;v++)this._refreshRowDimensions(this._rowElements[v])}}_refreshRowDimensions(v){v.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=p=f([w(1,y.IInstantiationService),w(2,C.ICoreBrowserService),w(3,C.IRenderService)],p)},3614:(b,a)=>{function d(_){return _.replace(/\r?\n/g,"\r")}function f(_,N){return N?"\x1B[200~"+_+"\x1B[201~":_}function w(_,N,C,y){_=f(_=d(_),C.decPrivateModes.bracketedPasteMode&&y.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(_,!0),N.value=""}function h(_,N,C){const y=C.getBoundingClientRect(),c=_.clientX-y.left-10,p=_.clientY-y.top-10;N.style.width="20px",N.style.height="20px",N.style.left=`${c}px`,N.style.top=`${p}px`,N.style.zIndex="1000",N.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=d,a.bracketTextForPaste=f,a.copyHandler=function(_,N){_.clipboardData&&_.clipboardData.setData("text/plain",N.selectionText),_.preventDefault()},a.handlePasteEvent=function(_,N,C,y){_.stopPropagation(),_.clipboardData&&w(_.clipboardData.getData("text/plain"),N,C,y)},a.paste=w,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(_,N,C,y,c){h(_,N,C),c&&y.rightClickSelect(_),N.value=y.selectionText,N.select()}},7239:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=d(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(w,h,_){this._css.set(w,h,_)}getCss(w,h){return this._css.get(w,h)}setColor(w,h,_){this._color.set(w,h,_)}getColor(w,h){return this._color.get(w,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,f,w,h){d.addEventListener(f,w,h);let _=!1;return{dispose:()=>{_||(_=!0,d.removeEventListener(f,w,h))}}}},3551:function(b,a,d){var f=this&&this.__decorate||function(p,v,g,E){var R,j=arguments.length,A=j<3?v:E===null?E=Object.getOwnPropertyDescriptor(v,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,v,g,E);else for(var k=p.length-1;k>=0;k--)(R=p[k])&&(A=(j<3?R(A):j>3?R(v,g,A):R(v,g))||A);return j>3&&A&&Object.defineProperty(v,g,A),A},w=this&&this.__param||function(p,v){return function(g,E){v(g,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const h=d(3656),_=d(8460),N=d(844),C=d(2585),y=d(4725);let c=a.Linkifier=class extends N.Disposable{get currentLink(){return this._currentLink}constructor(p,v,g,E,R){super(),this._element=p,this._mouseService=v,this._renderService=g,this._bufferService=E,this._linkProviderService=R,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,N.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,N.toDisposable)(()=>{var j;this._lastMouseEvent=void 0,(j=this._activeProviderReplies)==null||j.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(p){this._lastMouseEvent=p;const v=this._positionFromMouseEvent(p,this._element,this._mouseService);if(!v)return;this._isMouseOut=!1;const g=p.composedPath();for(let E=0;E<g.length;E++){const R=g[E];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&v.x===this._lastBufferCell.x&&v.y===this._lastBufferCell.y||(this._handleHover(v),this._lastBufferCell=v)}_handleHover(p){if(this._activeLine!==p.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(p,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,p)||(this._clearCurrentLink(),this._askForLink(p,!0))}_askForLink(p,v){var E,R;this._activeProviderReplies&&v||((E=this._activeProviderReplies)==null||E.forEach(j=>{j==null||j.forEach(A=>{A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=p.y);let g=!1;for(const[j,A]of this._linkProviderService.linkProviders.entries())v?(R=this._activeProviderReplies)!=null&&R.get(j)&&(g=this._checkLinkProviderResult(j,p,g)):A.provideLinks(p.y,k=>{var O,H;if(this._isMouseOut)return;const L=k==null?void 0:k.map(V=>({link:V}));(O=this._activeProviderReplies)==null||O.set(j,L),g=this._checkLinkProviderResult(j,p,g),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(p.y,this._activeProviderReplies)})}_removeIntersectingLinks(p,v){const g=new Set;for(let E=0;E<v.size;E++){const R=v.get(E);if(R)for(let j=0;j<R.length;j++){const A=R[j],k=A.link.range.start.y<p?0:A.link.range.start.x,L=A.link.range.end.y>p?this._bufferService.cols:A.link.range.end.x;for(let O=k;O<=L;O++){if(g.has(O)){R.splice(j--,1);break}g.add(O)}}}}_checkLinkProviderResult(p,v,g){var j;if(!this._activeProviderReplies)return g;const E=this._activeProviderReplies.get(p);let R=!1;for(let A=0;A<p;A++)this._activeProviderReplies.has(A)&&!this._activeProviderReplies.get(A)||(R=!0);if(!R&&E){const A=E.find(k=>this._linkAtPosition(k.link,v));A&&(g=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!g)for(let A=0;A<this._activeProviderReplies.size;A++){const k=(j=this._activeProviderReplies.get(A))==null?void 0:j.find(L=>this._linkAtPosition(L.link,v));if(k){g=!0,this._handleNewLink(k);break}}return g}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(p){if(!this._currentLink)return;const v=this._positionFromMouseEvent(p,this._element,this._mouseService);v&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,v)&&this._currentLink.link.activate(p,this._currentLink.link.text)}_clearCurrentLink(p,v){this._currentLink&&this._lastMouseEvent&&(!p||!v||this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=v)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,N.disposeArray)(this._linkCacheDisposables))}_handleNewLink(p){if(!this._lastMouseEvent)return;const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._linkAtPosition(p.link,v)&&(this._currentLink=p,this._currentLink.state={decorations:{underline:p.link.decorations===void 0||p.link.decorations.underline,pointerCursor:p.link.decorations===void 0||p.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,p.link,this._lastMouseEvent),p.link.decorations={},Object.defineProperties(p.link.decorations,{pointerCursor:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.pointerCursor},set:g=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==g&&(this._currentLink.state.decorations.pointerCursor=g,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",g))}},underline:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.underline},set:g=>{var E,R,j;(E=this._currentLink)!=null&&E.state&&((j=(R=this._currentLink)==null?void 0:R.state)==null?void 0:j.decorations.underline)!==g&&(this._currentLink.state.decorations.underline=g,this._currentLink.state.isHovered&&this._fireUnderlineEvent(p.link,g))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(g=>{if(!this._currentLink)return;const E=g.start===0?0:g.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+g.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=R&&(this._clearCurrentLink(E,R),this._lastMouseEvent)){const j=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);j&&this._askForLink(j,!1)}})))}_linkHover(p,v,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(v,!0),this._currentLink.state.decorations.pointerCursor&&p.classList.add("xterm-cursor-pointer")),v.hover&&v.hover(g,v.text)}_fireUnderlineEvent(p,v){const g=p.range,E=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(g.start.x-1,g.start.y-E-1,g.end.x,g.end.y-E-1,void 0);(v?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(p,v,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(v,!1),this._currentLink.state.decorations.pointerCursor&&p.classList.remove("xterm-cursor-pointer")),v.leave&&v.leave(g,v.text)}_linkAtPosition(p,v){const g=p.range.start.y*this._bufferService.cols+p.range.start.x,E=p.range.end.y*this._bufferService.cols+p.range.end.x,R=v.y*this._bufferService.cols+v.x;return g<=R&&R<=E}_positionFromMouseEvent(p,v,g){const E=g.getCoords(p,v,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(p,v,g,E,R){return{x1:p,y1:v,x2:g,y2:E,cols:this._bufferService.cols,fg:R}}};a.Linkifier=c=f([w(1,y.IMouseService),w(2,y.IRenderService),w(3,C.IBufferService),w(4,y.ILinkProviderService)],c)},9042:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(b,a,d){var f=this&&this.__decorate||function(y,c,p,v){var g,E=arguments.length,R=E<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,c,p,v);else for(var j=y.length-1;j>=0;j--)(g=y[j])&&(R=(E<3?g(R):E>3?g(c,p,R):g(c,p))||R);return E>3&&R&&Object.defineProperty(c,p,R),R},w=this&&this.__param||function(y,c){return function(p,v){c(p,v,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=d(511),_=d(2585);let N=a.OscLinkProvider=class{constructor(y,c,p){this._bufferService=y,this._optionsService=c,this._oscLinkService=p}provideLinks(y,c){var L;const p=this._bufferService.buffer.lines.get(y-1);if(!p)return void c(void 0);const v=[],g=this._optionsService.rawOptions.linkHandler,E=new h.CellData,R=p.getTrimmedLength();let j=-1,A=-1,k=!1;for(let O=0;O<R;O++)if(A!==-1||p.hasContent(O)){if(p.loadCell(O,E),E.hasExtendedAttrs()&&E.extended.urlId){if(A===-1){A=O,j=E.extended.urlId;continue}k=E.extended.urlId!==j}else A!==-1&&(k=!0);if(k||A!==-1&&O===R-1){const H=(L=this._oscLinkService.getLinkData(j))==null?void 0:L.uri;if(H){const V={start:{x:A+1,y},end:{x:O+(k||O!==R-1?0:1),y}};let B=!1;if(!(g!=null&&g.allowNonHttpProtocols))try{const q=new URL(H);["http:","https:"].includes(q.protocol)||(B=!0)}catch{B=!0}B||v.push({text:H,range:V,activate:(q,ne)=>g?g.activate(q,ne,V):C(0,ne),hover:(q,ne)=>{var Y;return(Y=g==null?void 0:g.hover)==null?void 0:Y.call(g,q,ne,V)},leave:(q,ne)=>{var Y;return(Y=g==null?void 0:g.leave)==null?void 0:Y.call(g,q,ne,V)}})}k=!1,E.hasExtendedAttrs()&&E.extended.urlId?(A=O,j=E.extended.urlId):(A=-1,j=-1)}}c(v)}};function C(y,c){if(confirm(`Do you want to navigate to ${c}?
|
|
209
|
+
|
|
210
|
+
WARNING: This link could potentially be dangerous`)){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=N=f([w(0,_.IBufferService),w(1,_.IOptionsService),w(2,_.IOscLinkService)],N)},6193:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(d,f){this._renderCallback=d,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(d,f,w){this._rowCount=w,d=d!==void 0?d:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const d=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=d(3614),w=d(3656),h=d(3551),_=d(9042),N=d(3730),C=d(1680),y=d(3107),c=d(5744),p=d(2950),v=d(1296),g=d(428),E=d(4269),R=d(5114),j=d(8934),A=d(3230),k=d(9312),L=d(4725),O=d(6731),H=d(8055),V=d(8969),B=d(8460),q=d(844),ne=d(6114),Y=d(8437),J=d(2584),ee=d(7399),P=d(5941),W=d(9074),Q=d(2585),K=d(5435),he=d(4567),ce=d(779);class ke extends V.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(re={}){super(re),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new q.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(W.DecorationService),this._instantiationService.setService(Q.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ce.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(N.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((G,ge)=>this.refresh(G,ge))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(G=>this._reportWindowsOptions(G))),this.register(this._inputHandler.onColor(G=>this._handleColorEvent(G))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(G=>this._afterResize(G.cols,G.rows))),this.register((0,q.toDisposable)(()=>{var G,ge;this._customKeyEventHandler=void 0,(ge=(G=this.element)==null?void 0:G.parentNode)==null||ge.removeChild(this.element)}))}_handleColorEvent(re){if(this._themeService)for(const G of re){let ge,de="";switch(G.index){case 256:ge="foreground",de="10";break;case 257:ge="background",de="11";break;case 258:ge="cursor",de="12";break;default:ge="ansi",de="4;"+G.index}switch(G.type){case 0:const pe=H.color.toColorRGB(ge==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[ge]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${de};${(0,P.toRgbString)(pe)}${J.C1_ESCAPED.ST}`);break;case 1:if(ge==="ansi")this._themeService.modifyColors(Ne=>Ne.ansi[G.index]=H.channels.toColor(...G.color));else{const Ne=ge;this._themeService.modifyColors(Ie=>Ie[Ne]=H.channels.toColor(...G.color))}break;case 2:this._themeService.restoreColor(G.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(he.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,G=this.buffer.lines.get(re);if(!G)return;const ge=Math.min(this.buffer.x,this.cols-1),de=this._renderService.dimensions.css.cell.height,pe=G.getWidth(ge),Ne=this._renderService.dimensions.css.cell.width*pe,Ie=this.buffer.y*this._renderService.dimensions.css.cell.height,Ze=ge*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ze+"px",this.textarea.style.top=Ie+"px",this.textarea.style.width=Ne+"px",this.textarea.style.height=de+"px",this.textarea.style.lineHeight=de+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,w.addDisposableDomListener)(this.element,"copy",G=>{this.hasSelection()&&(0,f.copyHandler)(G,this._selectionService)}));const re=G=>(0,f.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,w.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,w.addDisposableDomListener)(this.element,"paste",re)),ne.isFirefox?this.register((0,w.addDisposableDomListener)(this.element,"mousedown",G=>{G.button===2&&(0,f.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,w.addDisposableDomListener)(this.element,"contextmenu",G=>{(0,f.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),ne.isLinux&&this.register((0,w.addDisposableDomListener)(this.element,"auxclick",G=>{G.button===1&&(0,f.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,w.addDisposableDomListener)(this.textarea,"keyup",re=>this._keyUp(re),!0)),this.register((0,w.addDisposableDomListener)(this.textarea,"keydown",re=>this._keyDown(re),!0)),this.register((0,w.addDisposableDomListener)(this.textarea,"keypress",re=>this._keyPress(re),!0)),this.register((0,w.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,w.addDisposableDomListener)(this.textarea,"compositionupdate",re=>this._compositionHelper.compositionupdate(re))),this.register((0,w.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,w.addDisposableDomListener)(this.textarea,"input",re=>this._inputEvent(re),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(re){var ge;if(!re)throw new Error("Terminal requires a parent element.");if(re.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ge=this.element)==null?void 0:ge.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=re.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"),re.appendChild(this.element);const G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,w.addDisposableDomListener)(this.screenElement,"mousemove",de=>this.updateCursorStyle(de))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.promptLabel),ne.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(R.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,w.addDisposableDomListener)(this.textarea,"focus",de=>this._handleTextAreaFocus(de))),this.register((0,w.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(de=>this._onRender.fire(de))),this.onResize(de=>this._renderService.resize(de.cols,de.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(p.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(j.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(G);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(C.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(de=>this.scrollLines(de.amount,de.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(k.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(de=>this.scrollLines(de.amount,de.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(de=>this._renderService.handleSelectionChanged(de.start,de.end,de.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(de=>{this.textarea.value=de,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(de=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,w.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(y.BufferDecorationRenderer,this.screenElement)),this.register((0,w.addDisposableDomListener)(this.element,"mousedown",de=>this._selectionService.handleMouseDown(de))),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(he.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",de=>this._handleScreenReaderModeOptionChange(de))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",de=>{!this._overviewRulerRenderer&&de&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(v.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,G=this.element;function ge(Ne){const Ie=re._mouseService.getMouseReportCoords(Ne,re.screenElement);if(!Ie)return!1;let Ze,ut;switch(Ne.overrideType||Ne.type){case"mousemove":ut=32,Ne.buttons===void 0?(Ze=3,Ne.button!==void 0&&(Ze=Ne.button<3?Ne.button:3)):Ze=1&Ne.buttons?0:4&Ne.buttons?1:2&Ne.buttons?2:3;break;case"mouseup":ut=0,Ze=Ne.button<3?Ne.button:3;break;case"mousedown":ut=1,Ze=Ne.button<3?Ne.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(Ne)===!1||re.viewport.getLinesScrolled(Ne)===0)return!1;ut=Ne.deltaY<0?0:1,Ze=4;break;default:return!1}return!(ut===void 0||Ze===void 0||Ze>4)&&re.coreMouseService.triggerMouseEvent({col:Ie.col,row:Ie.row,x:Ie.x,y:Ie.y,button:Ze,action:ut,ctrl:Ne.ctrlKey,alt:Ne.altKey,shift:Ne.shiftKey})}const de={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:Ne=>(ge(Ne),Ne.buttons||(this._document.removeEventListener("mouseup",de.mouseup),de.mousedrag&&this._document.removeEventListener("mousemove",de.mousedrag)),this.cancel(Ne)),wheel:Ne=>(ge(Ne),this.cancel(Ne,!0)),mousedrag:Ne=>{Ne.buttons&&ge(Ne)},mousemove:Ne=>{Ne.buttons||ge(Ne)}};this.register(this.coreMouseService.onProtocolChange(Ne=>{Ne?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Ne)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&Ne?de.mousemove||(G.addEventListener("mousemove",pe.mousemove),de.mousemove=pe.mousemove):(G.removeEventListener("mousemove",de.mousemove),de.mousemove=null),16&Ne?de.wheel||(G.addEventListener("wheel",pe.wheel,{passive:!1}),de.wheel=pe.wheel):(G.removeEventListener("wheel",de.wheel),de.wheel=null),2&Ne?de.mouseup||(de.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",de.mouseup),de.mouseup=null),4&Ne?de.mousedrag||(de.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",de.mousedrag),de.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,w.addDisposableDomListener)(G,"mousedown",Ne=>{if(Ne.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Ne))return ge(Ne),de.mouseup&&this._document.addEventListener("mouseup",de.mouseup),de.mousedrag&&this._document.addEventListener("mousemove",de.mousedrag),this.cancel(Ne)})),this.register((0,w.addDisposableDomListener)(G,"wheel",Ne=>{if(!de.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Ne)===!1)return!1;if(!this.buffer.hasScrollback){const Ie=this.viewport.getLinesScrolled(Ne);if(Ie===0)return;const Ze=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ne.deltaY<0?"A":"B");let ut="";for(let At=0;At<Math.abs(Ie);At++)ut+=Ze;return this.coreService.triggerDataEvent(ut,!0),this.cancel(Ne,!0)}return this.viewport.handleWheel(Ne)?this.cancel(Ne):void 0}},{passive:!1})),this.register((0,w.addDisposableDomListener)(G,"touchstart",Ne=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Ne),this.cancel(Ne)},{passive:!0})),this.register((0,w.addDisposableDomListener)(G,"touchmove",Ne=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Ne)?void 0:this.cancel(Ne)},{passive:!1}))}refresh(re,G){var ge;(ge=this._renderService)==null||ge.refreshRows(re,G)}updateCursorStyle(re){var G;(G=this._selectionService)!=null&&G.shouldColumnSelect(re)?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(re,G,ge=0){var de;ge===1?(super.scrollLines(re,G,ge),this.refresh(0,this.rows-1)):(de=this.viewport)==null||de.scrollLines(re)}paste(re){(0,f.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const G=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),G}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,G,ge){this._selectionService.setSelection(re,G,ge)}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 re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,G){var ge;(ge=this._selectionService)==null||ge.selectLines(re,G)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!G&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ge=(0,ee.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),ge.type===3||ge.type===2){const de=this.rows-1;return this.scrollLines(ge.type===2?-de:de),this.cancel(re,!0)}return ge.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(ge.cancel&&this.cancel(re,!0),!ge.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ge.key!==J.C0.ETX&&ge.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ge.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(ge.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,G){const ge=re.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||re.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||re.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?ge:ge&&(!G.keyCode||G.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||(function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18}(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)G=re.charCode;else if(re.which===null||re.which===void 0)G=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;G=re.which}return!(!G||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(G,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const G=re.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(re),!0}return!1}resize(re,G){re!==this.cols||G!==this.rows?super.resize(re,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,G){var ge,de;(ge=this._charSizeService)==null||ge.measure(),(de=this.viewport)==null||de.syncScrollArea(!0)}clear(){var re;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 G=1;G<this.rows;G++)this.buffer.lines.push(this.buffer.getBlankLine(Y.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(re=this.viewport)==null||re.reset(),this.refresh(0,this.rows-1)}}reset(){var G,ge;this.options.rows=this.rows,this.options.cols=this.cols;const re=this._customKeyEventHandler;this._setup(),super.reset(),(G=this._selectionService)==null||G.reset(),this._decorationService.reset(),(ge=this.viewport)==null||ge.reset(),this._customKeyEventHandler=re,this.refresh(0,this.rows-1)}clearTextureAtlas(){var re;(re=this._renderService)==null||re.clearTextureAtlas()}_reportFocus(){var re;(re=this.element)!=null&&re.classList.contains("focus")?this.coreService.triggerDataEvent(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(re){if(this._renderService)switch(re){case K.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const G=this._renderService.dimensions.css.canvas.width.toFixed(0),ge=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${ge};${G}t`);break;case K.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const de=this._renderService.dimensions.css.cell.width.toFixed(0),pe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${pe};${de}t`)}}cancel(re,G){if(this.options.cancelEvents||G)return re.preventDefault(),re.stopPropagation(),!1}}a.Terminal=ke},9924:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(d,f=1e3){this._renderCallback=d,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,f,w){this._rowCount=w,d=d!==void 0?d:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=h-this._lastRefreshMs,N=this._debounceThresholdMS-_;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},N)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const d=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f)}}},1680:function(b,a,d){var f=this&&this.__decorate||function(p,v,g,E){var R,j=arguments.length,A=j<3?v:E===null?E=Object.getOwnPropertyDescriptor(v,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,v,g,E);else for(var k=p.length-1;k>=0;k--)(R=p[k])&&(A=(j<3?R(A):j>3?R(v,g,A):R(v,g))||A);return j>3&&A&&Object.defineProperty(v,g,A),A},w=this&&this.__param||function(p,v){return function(g,E){v(g,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const h=d(3656),_=d(4725),N=d(8460),C=d(844),y=d(2585);let c=a.Viewport=class extends C.Disposable{constructor(p,v,g,E,R,j,A,k){super(),this._viewportElement=p,this._scrollArea=v,this._bufferService=g,this._optionsService=E,this._charSizeService=R,this._renderService=j,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new N.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(L=>this._renderDimensions=L)),this._handleThemeChange(k.colors),this.register(k.onChangeColors(L=>this._handleThemeChange(L))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(p){this._viewportElement.style.backgroundColor=p.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(p){if(p)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const v=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==v&&(this._lastRecordedBufferHeight=v,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const p=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==p&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=p),this._refreshAnimationFrame=null}syncScrollArea(p=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(p);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(p)}_handleScroll(p){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const v=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:v,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const p=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(p*(this._smoothScrollState.target-this._smoothScrollState.origin)),p<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(p,v){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(v<0&&this._viewportElement.scrollTop!==0||v>0&&g<this._lastRecordedBufferHeight)||(p.cancelable&&p.preventDefault(),!1)}handleWheel(p){const v=this._getPixelsScrolled(p);return v!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+v:this._smoothScrollState.target+=v,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=v,this._bubbleScroll(p,v))}scrollLines(p){if(p!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const v=p*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+v,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:p,suppressScrollEvent:!1})}_getPixelsScrolled(p){if(p.deltaY===0||p.shiftKey)return 0;let v=this._applyScrollModifier(p.deltaY,p);return p.deltaMode===WheelEvent.DOM_DELTA_LINE?v*=this._currentRowHeight:p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(v*=this._currentRowHeight*this._bufferService.rows),v}getBufferElements(p,v){var k;let g,E="";const R=[],j=v??this._bufferService.buffer.lines.length,A=this._bufferService.buffer.lines;for(let L=p;L<j;L++){const O=A.get(L);if(!O)continue;const H=(k=A.get(L+1))==null?void 0:k.isWrapped;if(E+=O.translateToString(!H),!H||L===A.length-1){const V=document.createElement("div");V.textContent=E,R.push(V),E.length>0&&(g=V),E=""}}return{bufferElements:R,cursorElement:g}}getLinesScrolled(p){if(p.deltaY===0||p.shiftKey)return 0;let v=this._applyScrollModifier(p.deltaY,p);return p.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(v/=this._currentRowHeight+0,this._wheelPartialScroll+=v,v=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(v*=this._bufferService.rows),v}_applyScrollModifier(p,v){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&v.altKey||g==="ctrl"&&v.ctrlKey||g==="shift"&&v.shiftKey?p*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:p*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(p){this._lastTouchY=p.touches[0].pageY}handleTouchMove(p){const v=this._lastTouchY-p.touches[0].pageY;return this._lastTouchY=p.touches[0].pageY,v!==0&&(this._viewportElement.scrollTop+=v,this._bubbleScroll(p,v))}};a.Viewport=c=f([w(2,y.IBufferService),w(3,y.IOptionsService),w(4,_.ICharSizeService),w(5,_.IRenderService),w(6,_.ICoreBrowserService),w(7,_.IThemeService)],c)},3107:function(b,a,d){var f=this&&this.__decorate||function(y,c,p,v){var g,E=arguments.length,R=E<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,c,p,v);else for(var j=y.length-1;j>=0;j--)(g=y[j])&&(R=(E<3?g(R):E>3?g(c,p,R):g(c,p))||R);return E>3&&R&&Object.defineProperty(c,p,R),R},w=this&&this.__param||function(y,c){return function(p,v){c(p,v,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=d(4725),_=d(844),N=d(2585);let C=a.BufferDecorationRenderer=class extends _.Disposable{constructor(y,c,p,v,g){super(),this._screenElement=y,this._bufferService=c,this._coreBrowserService=p,this._decorationService=v,this._renderService=g,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(E=>this._removeDecoration(E))),this.register((0,_.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const y of this._decorationService.decorations)this._renderDecoration(y);this._dimensionsChanged=!1}_renderDecoration(y){this._refreshStyle(y),this._dimensionsChanged&&this._refreshXPosition(y)}_createElement(y){var v;const c=this._coreBrowserService.mainDocument.createElement("div");c.classList.add("xterm-decoration"),c.classList.toggle("xterm-decoration-top-layer",((v=y==null?void 0:y.options)==null?void 0:v.layer)==="top"),c.style.width=`${Math.round((y.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,c.style.height=(y.options.height||1)*this._renderService.dimensions.css.cell.height+"px",c.style.top=(y.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",c.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const p=y.options.x??0;return p&&p>this._bufferService.cols&&(c.style.display="none"),this._refreshXPosition(y,c),c}_refreshStyle(y){const c=y.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)y.element&&(y.element.style.display="none",y.onRenderEmitter.fire(y.element));else{let p=this._decorationElements.get(y);p||(p=this._createElement(y),y.element=p,this._decorationElements.set(y,p),this._container.appendChild(p),y.onDispose(()=>{this._decorationElements.delete(y),p.remove()})),p.style.top=c*this._renderService.dimensions.css.cell.height+"px",p.style.display=this._altBufferIsActive?"none":"block",y.onRenderEmitter.fire(p)}}_refreshXPosition(y,c=y.element){if(!c)return;const p=y.options.x??0;(y.options.anchor||"left")==="right"?c.style.right=p?p*this._renderService.dimensions.css.cell.width+"px":"":c.style.left=p?p*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(y){var c;(c=this._decorationElements.get(y))==null||c.remove(),this._decorationElements.delete(y),y.dispose()}};a.BufferDecorationRenderer=C=f([w(1,N.IBufferService),w(2,h.ICoreBrowserService),w(3,N.IDecorationService),w(4,h.IRenderService)],C)},5871:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(d){if(d.options.overviewRulerOptions){for(const f of this._zones)if(f.color===d.options.overviewRulerOptions.color&&f.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,d.marker.line))return;if(this._lineAdjacentToZone(f,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(f,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,f){return f>=d.startBufferLine&&f<=d.endBufferLine}_lineAdjacentToZone(d,f,w){return f>=d.startBufferLine-this._linePadding[w||"full"]&&f<=d.endBufferLine+this._linePadding[w||"full"]}_addLineToZone(d,f){d.startBufferLine=Math.min(d.startBufferLine,f),d.endBufferLine=Math.max(d.endBufferLine,f)}}},5744:function(b,a,d){var f=this&&this.__decorate||function(g,E,R,j){var A,k=arguments.length,L=k<3?E:j===null?j=Object.getOwnPropertyDescriptor(E,R):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(g,E,R,j);else for(var O=g.length-1;O>=0;O--)(A=g[O])&&(L=(k<3?A(L):k>3?A(E,R,L):A(E,R))||L);return k>3&&L&&Object.defineProperty(E,R,L),L},w=this&&this.__param||function(g,E){return function(R,j){E(R,j,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const h=d(5871),_=d(4725),N=d(844),C=d(2585),y={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0},p={full:0,left:0,center:0,right:0};let v=a.OverviewRulerRenderer=class extends N.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,E,R,j,A,k,L){var H;super(),this._viewportElement=g,this._screenElement=E,this._bufferService=R,this._decorationService=j,this._renderService=A,this._optionsService=k,this._coreBrowserService=L,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(H=this._viewportElement.parentElement)==null||H.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,N.toDisposable)(()=>{var V;(V=this._canvas)==null||V.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const g=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=g,c.center=E,c.right=g,this._refreshDrawHeightConstants(),p.full=0,p.left=0,p.center=c.left,p.right=c.left+c.center}_refreshDrawHeightConstants(){y.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);y.left=E,y.center=E,y.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*y.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const E of g)E.position!=="full"&&this._renderColorZone(E);for(const E of g)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(p[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-y[g.position||"full"]/2),c[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+y[g.position||"full"]))}_queueRefresh(g,E){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};a.OverviewRulerRenderer=v=f([w(2,C.IBufferService),w(3,C.IDecorationService),w(4,_.IRenderService),w(5,C.IOptionsService),w(6,_.ICoreBrowserService)],v)},2950:function(b,a,d){var f=this&&this.__decorate||function(y,c,p,v){var g,E=arguments.length,R=E<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,c,p,v);else for(var j=y.length-1;j>=0;j--)(g=y[j])&&(R=(E<3?g(R):E>3?g(c,p,R):g(c,p))||R);return E>3&&R&&Object.defineProperty(c,p,R),R},w=this&&this.__param||function(y,c){return function(p,v){c(p,v,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=d(4725),_=d(2585),N=d(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(y,c,p,v,g,E){this._textarea=y,this._compositionView=c,this._bufferService=p,this._optionsService=v,this._coreService=g,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(y){this._compositionView.textContent=y.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(y){if(this._isComposing||this._isSendingComposition){if(y.keyCode===229||y.keyCode===16||y.keyCode===17||y.keyCode===18)return!1;this._finalizeComposition(!1)}return y.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(y){if(this._compositionView.classList.remove("active"),this._isComposing=!1,y){const c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let p;this._isSendingComposition=!1,c.start+=this._dataAlreadySent.length,p=this._isComposing?this._textarea.value.substring(c.start,c.end):this._textarea.value.substring(c.start),p.length>0&&this._coreService.triggerDataEvent(p,!0)}},0)}else{this._isSendingComposition=!1;const c=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(c,!0)}}_handleAnyTextareaChanges(){const y=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const c=this._textarea.value,p=c.replace(y,"");this._dataAlreadySent=p,c.length>y.length?this._coreService.triggerDataEvent(p,!0):c.length<y.length?this._coreService.triggerDataEvent(`${N.C0.DEL}`,!0):c.length===y.length&&c!==y&&this._coreService.triggerDataEvent(c,!0)}},0)}updateCompositionElements(y){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),p=this._renderService.dimensions.css.cell.height,v=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=c*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=v+"px",this._compositionView.style.height=p+"px",this._compositionView.style.lineHeight=p+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=v+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}y||setTimeout(()=>this.updateCompositionElements(!0),0)}}};a.CompositionHelper=C=f([w(2,_.IBufferService),w(3,_.IOptionsService),w(4,_.ICoreService),w(5,h.IRenderService)],C)},9806:(b,a)=>{function d(f,w,h){const _=h.getBoundingClientRect(),N=f.getComputedStyle(h),C=parseInt(N.getPropertyValue("padding-left")),y=parseInt(N.getPropertyValue("padding-top"));return[w.clientX-_.left-C,w.clientY-_.top-y]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=d,a.getCoords=function(f,w,h,_,N,C,y,c,p){if(!C)return;const v=d(f,w,h);return v?(v[0]=Math.ceil((v[0]+(p?y/2:0))/y),v[1]=Math.ceil(v[1]/c),v[0]=Math.min(Math.max(v[0],1),_+(p?1:0)),v[1]=Math.min(Math.max(v[1],1),N),v):void 0}},9504:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=d(2584);function w(c,p,v,g){const E=c-h(c,v),R=p-h(p,v),j=Math.abs(E-R)-function(A,k,L){let O=0;const H=A-h(A,L),V=k-h(k,L);for(let B=0;B<Math.abs(H-V);B++){const q=_(A,k)==="A"?-1:1,ne=L.buffer.lines.get(H+q*B);ne!=null&&ne.isWrapped&&O++}return O}(c,p,v);return y(j,C(_(c,p),g))}function h(c,p){let v=0,g=p.buffer.lines.get(c),E=g==null?void 0:g.isWrapped;for(;E&&c>=0&&c<p.rows;)v++,g=p.buffer.lines.get(--c),E=g==null?void 0:g.isWrapped;return v}function _(c,p){return c>p?"A":"B"}function N(c,p,v,g,E,R){let j=c,A=p,k="";for(;j!==v||A!==g;)j+=E?1:-1,E&&j>R.cols-1?(k+=R.buffer.translateBufferLineToString(A,!1,c,j),j=0,c=0,A++):!E&&j<0&&(k+=R.buffer.translateBufferLineToString(A,!1,0,c+1),j=R.cols-1,c=j,A--);return k+R.buffer.translateBufferLineToString(A,!1,c,j)}function C(c,p){const v=p?"O":"[";return f.C0.ESC+v+c}function y(c,p){c=Math.floor(c);let v="";for(let g=0;g<c;g++)v+=p;return v}a.moveToCellSequence=function(c,p,v,g){const E=v.buffer.x,R=v.buffer.y;if(!v.buffer.hasScrollback)return function(k,L,O,H,V,B){return w(L,H,V,B).length===0?"":y(N(k,L,k,L-h(L,V),!1,V).length,C("D",B))}(E,R,0,p,v,g)+w(R,p,v,g)+function(k,L,O,H,V,B){let q;q=w(L,H,V,B).length>0?H-h(H,V):L;const ne=H,Y=function(J,ee,P,W,Q,K){let he;return he=w(P,W,Q,K).length>0?W-h(W,Q):ee,J<P&&he<=W||J>=P&&he<W?"C":"D"}(k,L,O,H,V,B);return y(N(k,q,O,ne,Y==="C",V).length,C(Y,B))}(E,R,c,p,v,g);let j;if(R===p)return j=E>c?"D":"C",y(Math.abs(E-c),C(j,g));j=R>p?"D":"C";const A=Math.abs(R-p);return y(function(k,L){return L.cols-k}(R>p?c:E,v)+(A-1)*v.cols+1+((R>p?E:c)-1),C(j,g))}},1296:function(b,a,d){var f=this&&this.__decorate||function(B,q,ne,Y){var J,ee=arguments.length,P=ee<3?q:Y===null?Y=Object.getOwnPropertyDescriptor(q,ne):Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(B,q,ne,Y);else for(var W=B.length-1;W>=0;W--)(J=B[W])&&(P=(ee<3?J(P):ee>3?J(q,ne,P):J(q,ne))||P);return ee>3&&P&&Object.defineProperty(q,ne,P),P},w=this&&this.__param||function(B,q){return function(ne,Y){q(ne,Y,B)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const h=d(3787),_=d(2550),N=d(2223),C=d(6171),y=d(6052),c=d(4725),p=d(8055),v=d(8460),g=d(844),E=d(2585),R="xterm-dom-renderer-owner-",j="xterm-rows",A="xterm-fg-",k="xterm-bg-",L="xterm-focus",O="xterm-selection";let H=1,V=a.DomRenderer=class extends g.Disposable{constructor(B,q,ne,Y,J,ee,P,W,Q,K,he,ce,ke){super(),this._terminal=B,this._document=q,this._element=ne,this._screenElement=Y,this._viewportElement=J,this._helperContainer=ee,this._linkifier2=P,this._charSizeService=Q,this._optionsService=K,this._bufferService=he,this._coreBrowserService=ce,this._themeService=ke,this._terminalClass=H++,this._rowElements=[],this._selectionRenderModel=(0,y.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new v.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(j),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,C.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(we=>this._injectCss(we))),this._injectCss(this._themeService.colors),this._rowFactory=W.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(we=>this._handleLinkHover(we))),this.register(this._linkifier2.onHideLinkUnderline(we=>this._handleLinkLeave(we))),this.register((0,g.toDisposable)(()=>{this._element.classList.remove(R+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new _.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const B=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*B,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*B),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/B),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/B),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ne of this._rowElements)ne.style.width=`${this.dimensions.css.canvas.width}px`,ne.style.height=`${this.dimensions.css.cell.height}px`,ne.style.lineHeight=`${this.dimensions.css.cell.height}px`,ne.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const q=`${this._terminalSelector} .${j} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=q,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(B){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let q=`${this._terminalSelector} .${j} { color: ${B.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;q+=`${this._terminalSelector} .${j} .xterm-dim { color: ${p.color.multiplyOpacity(B.foreground,.5).css};}`,q+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const ne=`blink_underline_${this._terminalClass}`,Y=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;q+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,q+=`@keyframes ${Y} { 50% { box-shadow: none; }}`,q+=`@keyframes ${J} { 0% { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css}; } 50% { background-color: inherit; color: ${B.cursor.css}; }}`,q+=`${this._terminalSelector} .${j}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${j}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${j}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css};}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${B.cursor.css} !important; color: ${B.cursorAccent.css} !important;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${B.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${B.cursor.css} inset;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${B.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,q+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${B.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${B.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,P]of B.ansi.entries())q+=`${this._terminalSelector} .${A}${ee} { color: ${P.css}; }${this._terminalSelector} .${A}${ee}.xterm-dim { color: ${p.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${k}${ee} { background-color: ${P.css}; }`;q+=`${this._terminalSelector} .${A}${N.INVERTED_DEFAULT_COLOR} { color: ${p.color.opaque(B.background).css}; }${this._terminalSelector} .${A}${N.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${p.color.multiplyOpacity(p.color.opaque(B.background),.5).css}; }${this._terminalSelector} .${k}${N.INVERTED_DEFAULT_COLOR} { background-color: ${B.foreground.css}; }`,this._themeStyleElement.textContent=q}_setDefaultSpacing(){const B=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${B}px`,this._rowFactory.defaultSpacing=B}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(B,q){for(let ne=this._rowElements.length;ne<=q;ne++){const Y=this._document.createElement("div");this._rowContainer.appendChild(Y),this._rowElements.push(Y)}for(;this._rowElements.length>q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(B,q){this._refreshRowElements(B,q),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(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(B,q,ne){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(B,q,ne),this.renderRows(0,this._bufferService.rows-1),!B||!q)return;this._selectionRenderModel.update(this._terminal,B,q,ne);const Y=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||P<0)return;const W=this._document.createDocumentFragment();if(ne){const Q=B[0]>q[0];W.appendChild(this._createSelectionElement(ee,Q?q[0]:B[0],Q?B[0]:q[0],P-ee+1))}else{const Q=Y===ee?B[0]:0,K=ee===J?q[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(ee,Q,K));const he=P-ee-1;if(W.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,he)),ee!==P){const ce=J===P?q[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(P,0,ce))}}this._selectionContainer.appendChild(W)}_createSelectionElement(B,q,ne,Y=1){const J=this._document.createElement("div"),ee=q*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(ne-q);return ee+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-ee),J.style.height=Y*this.dimensions.css.cell.height+"px",J.style.top=B*this.dimensions.css.cell.height+"px",J.style.left=`${ee}px`,J.style.width=`${P}px`,J}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const B of this._rowElements)B.replaceChildren()}renderRows(B,q){const ne=this._bufferService.buffer,Y=ne.ybase+ne.y,J=Math.min(ne.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,W=this._optionsService.rawOptions.cursorInactiveStyle;for(let Q=B;Q<=q;Q++){const K=Q+ne.ydisp,he=this._rowElements[Q],ce=ne.lines.get(K);if(!he||!ce)break;he.replaceChildren(...this._rowFactory.createRow(ce,K,K===Y,P,W,J,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!0)}_handleLinkLeave(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!1)}_setCellUnderline(B,q,ne,Y,J,ee){ne<0&&(B=0),Y<0&&(q=0);const P=this._bufferService.rows-1;ne=Math.max(Math.min(ne,P),0),Y=Math.max(Math.min(Y,P),0),J=Math.min(J,this._bufferService.cols);const W=this._bufferService.buffer,Q=W.ybase+W.y,K=Math.min(W.x,J-1),he=this._optionsService.rawOptions.cursorBlink,ce=this._optionsService.rawOptions.cursorStyle,ke=this._optionsService.rawOptions.cursorInactiveStyle;for(let we=ne;we<=Y;++we){const re=we+W.ydisp,G=this._rowElements[we],ge=W.lines.get(re);if(!G||!ge)break;G.replaceChildren(...this._rowFactory.createRow(ge,re,re===Q,ce,ke,K,he,this.dimensions.css.cell.width,this._widthCache,ee?we===ne?B:0:-1,ee?(we===Y?q:J)-1:-1))}}};a.DomRenderer=V=f([w(7,E.IInstantiationService),w(8,c.ICharSizeService),w(9,E.IOptionsService),w(10,E.IBufferService),w(11,c.ICoreBrowserService),w(12,c.IThemeService)],V)},3787:function(b,a,d){var f=this&&this.__decorate||function(j,A,k,L){var O,H=arguments.length,V=H<3?A:L===null?L=Object.getOwnPropertyDescriptor(A,k):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(j,A,k,L);else for(var B=j.length-1;B>=0;B--)(O=j[B])&&(V=(H<3?O(V):H>3?O(A,k,V):O(A,k))||V);return H>3&&V&&Object.defineProperty(A,k,V),V},w=this&&this.__param||function(j,A){return function(k,L){A(k,L,j)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const h=d(2223),_=d(643),N=d(511),C=d(2585),y=d(8055),c=d(4725),p=d(4269),v=d(6171),g=d(3734);let E=a.DomRendererRowFactory=class{constructor(j,A,k,L,O,H,V){this._document=j,this._characterJoinerService=A,this._optionsService=k,this._coreBrowserService=L,this._coreService=O,this._decorationService=H,this._themeService=V,this._workCell=new N.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(j,A,k){this._selectionStart=j,this._selectionEnd=A,this._columnSelectMode=k}createRow(j,A,k,L,O,H,V,B,q,ne,Y){const J=[],ee=this._characterJoinerService.getJoinedCharacters(A),P=this._themeService.colors;let W,Q=j.getNoBgTrimmedLength();k&&Q<H+1&&(Q=H+1);let K=0,he="",ce=0,ke=0,we=0,re=!1,G=0,ge=!1,de=0;const pe=[],Ne=ne!==-1&&Y!==-1;for(let Ie=0;Ie<Q;Ie++){j.loadCell(Ie,this._workCell);let Ze=this._workCell.getWidth();if(Ze===0)continue;let ut=!1,At=Ie,Ke=this._workCell;if(ee.length>0&&Ie===ee[0][0]){ut=!0;const He=ee.shift();Ke=new p.JoinedCellData(this._workCell,j.translateToString(!0,He[0],He[1]),He[1]-He[0]),At=He[1]-1,Ze=Ke.getWidth()}const qt=this._isCellInSelection(Ie,A),Ut=k&&Ie===H,xe=Ne&&Ie>=ne&&Ie<=Y;let Ve=!1;this._decorationService.forEachDecorationAtCell(Ie,A,void 0,He=>{Ve=!0});let Xe=Ke.getChars()||_.WHITESPACE_CELL_CHAR;if(Xe===" "&&(Ke.isUnderline()||Ke.isOverline())&&(Xe=" "),de=Ze*B-q.get(Xe,Ke.isBold(),Ke.isItalic()),W){if(K&&(qt&&ge||!qt&&!ge&&Ke.bg===ce)&&(qt&&ge&&P.selectionForeground||Ke.fg===ke)&&Ke.extended.ext===we&&xe===re&&de===G&&!Ut&&!ut&&!Ve){Ke.isInvisible()?he+=_.WHITESPACE_CELL_CHAR:he+=Xe,K++;continue}K&&(W.textContent=he),W=this._document.createElement("span"),K=0,he=""}else W=this._document.createElement("span");if(ce=Ke.bg,ke=Ke.fg,we=Ke.extended.ext,re=xe,G=de,ge=qt,ut&&H>=Ie&&H<=At&&(H=Ie),!this._coreService.isCursorHidden&&Ut&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)V&&pe.push("xterm-cursor-blink"),pe.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline")}}if(Ke.isBold()&&pe.push("xterm-bold"),Ke.isItalic()&&pe.push("xterm-italic"),Ke.isDim()&&pe.push("xterm-dim"),he=Ke.isInvisible()?_.WHITESPACE_CELL_CHAR:Ke.getChars()||_.WHITESPACE_CELL_CHAR,Ke.isUnderline()&&(pe.push(`xterm-underline-${Ke.extended.underlineStyle}`),he===" "&&(he=" "),!Ke.isUnderlineColorDefault()))if(Ke.isUnderlineColorRGB())W.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(Ke.getUnderlineColor()).join(",")})`;else{let He=Ke.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ke.isBold()&&He<8&&(He+=8),W.style.textDecorationColor=P.ansi[He].css}Ke.isOverline()&&(pe.push("xterm-overline"),he===" "&&(he=" ")),Ke.isStrikethrough()&&pe.push("xterm-strikethrough"),xe&&(W.style.textDecoration="underline");let Te=Ke.getFgColor(),lt=Ke.getFgColorMode(),dt=Ke.getBgColor(),$=Ke.getBgColorMode();const at=!!Ke.isInverse();if(at){const He=Te;Te=dt,dt=He;const Ot=lt;lt=$,$=Ot}let De,We,be,Pe=!1;switch(this._decorationService.forEachDecorationAtCell(Ie,A,void 0,He=>{He.options.layer!=="top"&&Pe||(He.backgroundColorRGB&&($=50331648,dt=He.backgroundColorRGB.rgba>>8&16777215,De=He.backgroundColorRGB),He.foregroundColorRGB&&(lt=50331648,Te=He.foregroundColorRGB.rgba>>8&16777215,We=He.foregroundColorRGB),Pe=He.options.layer==="top")}),!Pe&&qt&&(De=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,dt=De.rgba>>8&16777215,$=50331648,Pe=!0,P.selectionForeground&&(lt=50331648,Te=P.selectionForeground.rgba>>8&16777215,We=P.selectionForeground)),Pe&&pe.push("xterm-decoration-top"),$){case 16777216:case 33554432:be=P.ansi[dt],pe.push(`xterm-bg-${dt}`);break;case 50331648:be=y.channels.toColor(dt>>16,dt>>8&255,255&dt),this._addStyle(W,`background-color:#${R((dt>>>0).toString(16),"0",6)}`);break;default:at?(be=P.foreground,pe.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):be=P.background}switch(De||Ke.isDim()&&(De=y.color.multiplyOpacity(be,.5)),lt){case 16777216:case 33554432:Ke.isBold()&&Te<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Te+=8),this._applyMinimumContrast(W,be,P.ansi[Te],Ke,De,void 0)||pe.push(`xterm-fg-${Te}`);break;case 50331648:const He=y.channels.toColor(Te>>16&255,Te>>8&255,255&Te);this._applyMinimumContrast(W,be,He,Ke,De,We)||this._addStyle(W,`color:#${R(Te.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(W,be,P.foreground,Ke,De,We)||at&&pe.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}pe.length&&(W.className=pe.join(" "),pe.length=0),Ut||ut||Ve?W.textContent=he:K++,de!==this.defaultSpacing&&(W.style.letterSpacing=`${de}px`),J.push(W),Ie=At}return W&&K&&(W.textContent=he),J}_applyMinimumContrast(j,A,k,L,O,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,v.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const V=this._getContrastCache(L);let B;if(O||H||(B=V.getColor(A.rgba,k.rgba)),B===void 0){const q=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);B=y.color.ensureContrastRatio(O||A,H||k,q),V.setColor((O||A).rgba,(H||k).rgba,B??null)}return!!B&&(this._addStyle(j,`color:${B.css}`),!0)}_getContrastCache(j){return j.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(j,A){j.setAttribute("style",`${j.getAttribute("style")||""}${A};`)}_isCellInSelection(j,A){const k=this._selectionStart,L=this._selectionEnd;return!(!k||!L)&&(this._columnSelectMode?k[0]<=L[0]?j>=k[0]&&A>=k[1]&&j<L[0]&&A<=L[1]:j<k[0]&&A>=k[1]&&j>=L[0]&&A<=L[1]:A>k[1]&&A<L[1]||k[1]===L[1]&&A===k[1]&&j>=k[0]&&j<L[0]||k[1]<L[1]&&A===L[1]&&j<L[0]||k[1]<L[1]&&A===k[1]&&j>=k[0])}};function R(j,A,k){for(;j.length<k;)j=A+j;return j}a.DomRendererRowFactory=E=f([w(1,c.ICharacterJoinerService),w(2,C.IOptionsService),w(3,c.ICoreBrowserService),w(4,C.ICoreService),w(5,C.IDecorationService),w(6,c.IThemeService)],E)},2550:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(d,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const w=d.createElement("span");w.classList.add("xterm-char-measure-element");const h=d.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const _=d.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontStyle="italic";const N=d.createElement("span");N.classList.add("xterm-char-measure-element"),N.style.fontWeight="bold",N.style.fontStyle="italic",this._measureElements=[w,h,_,N],this._container.appendChild(w),this._container.appendChild(h),this._container.appendChild(_),this._container.appendChild(N),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(d,f,w,h){d===this._font&&f===this._fontSize&&w===this._weight&&h===this._weightBold||(this._font=d,this._fontSize=f,this._weight=w,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${w}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${w}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(d,f,w){let h=0;if(!f&&!w&&d.length===1&&(h=d.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const C=this._measure(d,0);return C>0&&(this._flat[h]=C),C}let _=d;f&&(_+="B"),w&&(_+="I");let N=this._holey.get(_);if(N===void 0){let C=0;f&&(C|=1),w&&(C|=2),N=this._measure(d,C),N>0&&this._holey.set(_,N)}return N}_measure(d,f){const w=this._measureElements[f];return w.textContent=d.repeat(32),w.offsetWidth/32}}},2223:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=d(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(b,a)=>{function d(w){return 57508<=w&&w<=57558}function f(w){return w>=128512&&w<=128591||w>=127744&&w<=128511||w>=128640&&w<=128767||w>=9728&&w<=9983||w>=9984&&w<=10175||w>=65024&&w<=65039||w>=129280&&w<=129535||w>=127462&&w<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(w){if(!w)throw new Error("value must not be falsy");return w},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(w){return 57520<=w&&w<=57527},a.isEmoji=f,a.allowRescaling=function(w,h,_,N){return h===1&&_>Math.ceil(1.5*N)&&w!==void 0&&w>255&&!f(w)&&!d(w)&&!function(C){return 57344<=C&&C<=63743}(w)},a.treatGlyphAsBackgroundColor=function(w){return d(w)||function(h){return 9472<=h&&h<=9631}(w)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(w,h,_=0){return(w-(2*Math.round(h)-_))%(2*Math.round(h))}},6052:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(w,h,_,N=!1){if(this.selectionStart=h,this.selectionEnd=_,!h||!_||h[0]===_[0]&&h[1]===_[1])return void this.clear();const C=w.buffers.active.ydisp,y=h[1]-C,c=_[1]-C,p=Math.max(y,0),v=Math.min(c,w.rows-1);p>=w.rows||v<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=N,this.viewportStartRow=y,this.viewportEndRow=c,this.viewportCappedStartRow=p,this.viewportCappedEndRow=v,this.startCol=h[0],this.endCol=_[0])}isCellSelected(w,h,_){return!!this.hasSelection&&(_-=w.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&_>=this.viewportCappedStartRow&&h<this.endCol&&_<=this.viewportCappedEndRow:h<this.startCol&&_>=this.viewportCappedStartRow&&h>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},456:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(d){this._bufferService=d,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,f=this.selectionEnd;return!(!d||!f)&&(d[1]>f[1]||d[1]===f[1]&&d[0]>f[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(b,a,d){var f=this&&this.__decorate||function(v,g,E,R){var j,A=arguments.length,k=A<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,g,E,R);else for(var L=v.length-1;L>=0;L--)(j=v[L])&&(k=(A<3?j(k):A>3?j(g,E,k):j(g,E))||k);return A>3&&k&&Object.defineProperty(g,E,k),k},w=this&&this.__param||function(v,g){return function(E,R){g(E,R,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const h=d(2585),_=d(8460),N=d(844);let C=a.CharSizeService=class extends N.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(v,g,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new p(this._optionsService))}catch{this._measureStrategy=this.register(new c(v,g,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const v=this._measureStrategy.measure();v.width===this.width&&v.height===this.height||(this.width=v.width,this.height=v.height,this._onCharSizeChange.fire())}};a.CharSizeService=C=f([w(2,h.IOptionsService)],C);class y extends N.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(g,E){g!==void 0&&g>0&&E!==void 0&&E>0&&(this._result.width=g,this._result.height=E)}}class c extends y{constructor(g,E,R){super(),this._document=g,this._parentElement=E,this._optionsService=R,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class p extends y{constructor(g){super(),this._optionsService=g,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const g=this._ctx.measureText("W");return this._validateAndSet(g.width,g.fontBoundingBoxAscent+g.fontBoundingBoxDescent),this._result}}},4269:function(b,a,d){var f=this&&this.__decorate||function(p,v,g,E){var R,j=arguments.length,A=j<3?v:E===null?E=Object.getOwnPropertyDescriptor(v,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,v,g,E);else for(var k=p.length-1;k>=0;k--)(R=p[k])&&(A=(j<3?R(A):j>3?R(v,g,A):R(v,g))||A);return j>3&&A&&Object.defineProperty(v,g,A),A},w=this&&this.__param||function(p,v){return function(g,E){v(g,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const h=d(3734),_=d(643),N=d(511),C=d(2585);class y extends h.AttributeData{constructor(v,g,E){super(),this.content=0,this.combinedData="",this.fg=v.fg,this.bg=v.bg,this.combinedData=g,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(v){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=y;let c=a.CharacterJoinerService=class OE{constructor(v){this._bufferService=v,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new N.CellData}register(v){const g={id:this._nextCharacterJoinerId++,handler:v};return this._characterJoiners.push(g),g.id}deregister(v){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===v)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(v){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(v);if(!g||g.length===0)return[];const E=[],R=g.translateToString(!0);let j=0,A=0,k=0,L=g.getFg(0),O=g.getBg(0);for(let H=0;H<g.getTrimmedLength();H++)if(g.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==O){if(H-j>1){const V=this._getJoinedRanges(R,k,A,g,j);for(let B=0;B<V.length;B++)E.push(V[B])}j=H,k=A,L=this._workCell.fg,O=this._workCell.bg}A+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-j>1){const H=this._getJoinedRanges(R,k,A,g,j);for(let V=0;V<H.length;V++)E.push(H[V])}return E}_getJoinedRanges(v,g,E,R,j){const A=v.substring(g,E);let k=[];try{k=this._characterJoiners[0].handler(A)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const O=this._characterJoiners[L].handler(A);for(let H=0;H<O.length;H++)OE._mergeRanges(k,O[H])}catch(O){console.error(O)}return this._stringRangesToCellRanges(k,R,j),k}_stringRangesToCellRanges(v,g,E){let R=0,j=!1,A=0,k=v[R];if(k){for(let L=E;L<this._bufferService.cols;L++){const O=g.getWidth(L),H=g.getString(L).length||_.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!j&&k[0]<=A&&(k[0]=L,j=!0),k[1]<=A){if(k[1]=L,k=v[++R],!k)break;k[0]<=A?(k[0]=L,j=!0):j=!1}A+=H}}k&&(k[1]=this._bufferService.cols)}}static _mergeRanges(v,g){let E=!1;for(let R=0;R<v.length;R++){const j=v[R];if(E){if(g[1]<=j[0])return v[R-1][1]=g[1],v;if(g[1]<=j[1])return v[R-1][1]=Math.max(g[1],j[1]),v.splice(R,1),v;v.splice(R,1),R--}else{if(g[1]<=j[0])return v.splice(R,0,g),v;if(g[1]<=j[1])return j[0]=Math.min(g[0],j[0]),v;g[0]<j[1]&&(j[0]=Math.min(g[0],j[0]),E=!0)}}return E?v[v.length-1][1]=g[1]:v.push(g),v}};a.CharacterJoinerService=c=f([w(0,C.IBufferService)],c)},5114:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=d(844),w=d(8460),h=d(3656);class _ extends f.Disposable{constructor(y,c,p){super(),this._textarea=y,this._window=c,this.mainDocument=p,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new N(this._window),this._onDprChange=this.register(new w.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new w.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(v=>this._screenDprMonitor.setWindow(v))),this.register((0,w.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(y){this._window!==y&&(this._window=y,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}a.CoreBrowserService=_;class N extends f.Disposable{constructor(y){super(),this._parentWindow=y,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new w.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)(()=>this.clearListener()))}setWindow(y){this._parentWindow=y,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var y;this._outerListener&&((y=this._resolutionMediaMatchList)==null||y.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=d(844);class w extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const N=this.linkProviders.indexOf(_);N!==-1&&this.linkProviders.splice(N,1)}}}}a.LinkProviderService=w},8934:function(b,a,d){var f=this&&this.__decorate||function(C,y,c,p){var v,g=arguments.length,E=g<3?y:p===null?p=Object.getOwnPropertyDescriptor(y,c):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(C,y,c,p);else for(var R=C.length-1;R>=0;R--)(v=C[R])&&(E=(g<3?v(E):g>3?v(y,c,E):v(y,c))||E);return g>3&&E&&Object.defineProperty(y,c,E),E},w=this&&this.__param||function(C,y){return function(c,p){y(c,p,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const h=d(4725),_=d(9806);let N=a.MouseService=class{constructor(C,y){this._renderService=C,this._charSizeService=y}getCoords(C,y,c,p,v){return(0,_.getCoords)(window,C,y,c,p,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,v)}getMouseReportCoords(C,y){const c=(0,_.getCoordsRelativeToElement)(window,C,y);if(this._charSizeService.hasValidSize)return c[0]=Math.min(Math.max(c[0],0),this._renderService.dimensions.css.canvas.width-1),c[1]=Math.min(Math.max(c[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(c[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(c[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(c[0]),y:Math.floor(c[1])}}};a.MouseService=N=f([w(0,h.IRenderService),w(1,h.ICharSizeService)],N)},3230:function(b,a,d){var f=this&&this.__decorate||function(v,g,E,R){var j,A=arguments.length,k=A<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,g,E,R);else for(var L=v.length-1;L>=0;L--)(j=v[L])&&(k=(A<3?j(k):A>3?j(g,E,k):j(g,E))||k);return A>3&&k&&Object.defineProperty(g,E,k),k},w=this&&this.__param||function(v,g){return function(E,R){g(E,R,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const h=d(6193),_=d(4725),N=d(8460),C=d(844),y=d(7226),c=d(2585);let p=a.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(v,g,E,R,j,A,k,L){super(),this._rowCount=v,this._charSizeService=R,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new y.DebouncedIdleTask,this._observerDisposable=this.register(new C.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new N.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new N.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new N.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new N.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer((O,H)=>this._renderRows(O,H),k),this.register(this._renderDebouncer),this.register(k.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(A.onResize(()=>this._fullRefresh())),this.register(A.buffers.onBufferActivate(()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()})),this.register(E.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(j.onDecorationRegistered(()=>this._fullRefresh())),this.register(j.onDecorationRemoved(()=>this._fullRefresh())),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()})),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(A.buffer.y,A.buffer.y,!0))),this.register(L.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(k.window,g),this.register(k.onWindowChange(O=>this._registerIntersectionObserver(O,g)))}_registerIntersectionObserver(v,g){if("IntersectionObserver"in v){const E=new v.IntersectionObserver(R=>this._handleIntersectionChange(R[R.length-1]),{threshold:0});E.observe(g),this._observerDisposable.value=(0,C.toDisposable)(()=>E.disconnect())}}_handleIntersectionChange(v){this._isPaused=v.isIntersecting===void 0?v.intersectionRatio===0:!v.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(v,g,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(v,g,this._rowCount))}_renderRows(v,g){this._renderer.value&&(v=Math.min(v,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(v,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:v,end:g}),this._onRender.fire({start:v,end:g}),this._isNextRenderRedrawOnly=!0)}resize(v,g){this._rowCount=g,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(v){this._renderer.value=v,this._renderer.value&&(this._renderer.value.onRequestRedraw(g=>this.refreshRows(g.start,g.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(v){return this._renderDebouncer.addRefreshCallback(v)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var v,g;this._renderer.value&&((g=(v=this._renderer.value).clearTextureAtlas)==null||g.call(v),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(v,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(v,g)}):this._renderer.value.handleResize(v,g),this._fullRefresh())}handleCharSizeChanged(){var v;(v=this._renderer.value)==null||v.handleCharSizeChanged()}handleBlur(){var v;(v=this._renderer.value)==null||v.handleBlur()}handleFocus(){var v;(v=this._renderer.value)==null||v.handleFocus()}handleSelectionChanged(v,g,E){var R;this._selectionState.start=v,this._selectionState.end=g,this._selectionState.columnSelectMode=E,(R=this._renderer.value)==null||R.handleSelectionChanged(v,g,E)}handleCursorMove(){var v;(v=this._renderer.value)==null||v.handleCursorMove()}clear(){var v;(v=this._renderer.value)==null||v.clear()}};a.RenderService=p=f([w(2,c.IOptionsService),w(3,_.ICharSizeService),w(4,c.IDecorationService),w(5,c.IBufferService),w(6,_.ICoreBrowserService),w(7,_.IThemeService)],p)},9312:function(b,a,d){var f=this&&this.__decorate||function(k,L,O,H){var V,B=arguments.length,q=B<3?L:H===null?H=Object.getOwnPropertyDescriptor(L,O):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(k,L,O,H);else for(var ne=k.length-1;ne>=0;ne--)(V=k[ne])&&(q=(B<3?V(q):B>3?V(L,O,q):V(L,O))||q);return B>3&&q&&Object.defineProperty(L,O,q),q},w=this&&this.__param||function(k,L){return function(O,H){L(O,H,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=d(9806),_=d(9504),N=d(456),C=d(4725),y=d(8460),c=d(844),p=d(6114),v=d(4841),g=d(511),E=d(2585),R=" ",j=new RegExp(R,"g");let A=a.SelectionService=class extends c.Disposable{constructor(k,L,O,H,V,B,q,ne,Y){super(),this._element=k,this._screenElement=L,this._linkifier=O,this._bufferService=H,this._coreService=V,this._mouseService=B,this._optionsService=q,this._renderService=ne,this._coreBrowserService=Y,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new y.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new y.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new y.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(J=>this._handleTrim(J)),this.register(this._bufferService.buffers.onBufferActivate(J=>this._handleBufferActivate(J))),this.enable(),this._model=new N.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,c.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const k=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!k||!L||k[0]===L[0]&&k[1]===L[1])}get selectionText(){const k=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!k||!L)return"";const O=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(k[0]===L[0])return"";const V=k[0]<L[0]?k[0]:L[0],B=k[0]<L[0]?L[0]:k[0];for(let q=k[1];q<=L[1];q++){const ne=O.translateBufferLineToString(q,!0,V,B);H.push(ne)}}else{const V=k[1]===L[1]?L[0]:void 0;H.push(O.translateBufferLineToString(k[1],!0,k[0],V));for(let B=k[1]+1;B<=L[1]-1;B++){const q=O.lines.get(B),ne=O.translateBufferLineToString(B,!0);q!=null&&q.isWrapped?H[H.length-1]+=ne:H.push(ne)}if(k[1]!==L[1]){const B=O.lines.get(L[1]),q=O.translateBufferLineToString(L[1],!0,0,L[0]);B&&B.isWrapped?H[H.length-1]+=q:H.push(q)}}return H.map(V=>V.replace(j," ")).join(p.isWindows?`\r
|
|
211
|
+
`:`
|
|
212
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(k){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),p.isLinux&&k&&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(k){const L=this._getMouseBufferCoords(k),O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(O&&H&&L)&&this._areCoordsInSelection(L,O,H)}isCellInSelection(k,L){const O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!O||!H)&&this._areCoordsInSelection([k,L],O,H)}_areCoordsInSelection(k,L,O){return k[1]>L[1]&&k[1]<O[1]||L[1]===O[1]&&k[1]===L[1]&&k[0]>=L[0]&&k[0]<O[0]||L[1]<O[1]&&k[1]===O[1]&&k[0]<O[0]||L[1]<O[1]&&k[1]===L[1]&&k[0]>=L[0]}_selectWordAtCursor(k,L){var V,B;const O=(B=(V=this._linkifier.currentLink)==null?void 0:V.link)==null?void 0:B.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,v.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(k);return!!H&&(this._selectWordAt(H,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(k,L){this._model.clearSelection(),k=Math.max(k,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,k],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(k){this._model.handleTrim(k)&&this.refresh()}_getMouseBufferCoords(k){const L=this._mouseService.getCoords(k,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(k){let L=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,k,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=O?0:(L>O&&(L-=O),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(k){return p.isMac?k.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:k.shiftKey}handleMouseDown(k){if(this._mouseDownTimeStamp=k.timeStamp,(k.button!==2||!this.hasSelection)&&k.button===0){if(!this._enabled){if(!this.shouldForceSelection(k))return;k.stopPropagation()}k.preventDefault(),this._dragScrollAmount=0,this._enabled&&k.shiftKey?this._handleIncrementalClick(k):k.detail===1?this._handleSingleClick(k):k.detail===2?this._handleDoubleClick(k):k.detail===3&&this._handleTripleClick(k),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(k){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(k))}_handleSingleClick(k){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(k)?3:0,this._model.selectionStart=this._getMouseBufferCoords(k),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(k){this._selectWordAtCursor(k,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(k){const L=this._getMouseBufferCoords(k);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(k){return k.altKey&&!(p.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(k){if(k.stopImmediatePropagation(),!this._model.selectionStart)return;const L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(k),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(k),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const H=O.lines.get(this._model.selectionEnd[1]);H&&H.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}L&&L[0]===this._model.selectionEnd[0]&&L[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const k=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(k.ydisp+this._bufferService.rows,k.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=k.ydisp),this.refresh()}}_handleMouseUp(k){const L=k.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&k.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(k,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const H=(0,_.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const k=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,O=!(!k||!L||k[0]===L[0]&&k[1]===L[1]);O?k&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&k[0]===this._oldSelectionStart[0]&&k[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(k,L,O)):this._oldHasSelection&&this._fireOnSelectionChange(k,L,O)}_fireOnSelectionChange(k,L,O){this._oldSelectionStart=k,this._oldSelectionEnd=L,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(k){this.clearSelection(),this._trimListener.dispose(),this._trimListener=k.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(k,L){let O=L;for(let H=0;L>=H;H++){const V=k.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:V>1&&L!==H&&(O+=V-1)}return O}setSelection(k,L,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[k,L],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(k){this._isClickInSelection(k)||(this._selectWordAtCursor(k,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(k,L,O=!0,H=!0){if(k[0]>=this._bufferService.cols)return;const V=this._bufferService.buffer,B=V.lines.get(k[1]);if(!B)return;const q=V.translateBufferLineToString(k[1],!1);let ne=this._convertViewportColToCharacterIndex(B,k[0]),Y=ne;const J=k[0]-ne;let ee=0,P=0,W=0,Q=0;if(q.charAt(ne)===" "){for(;ne>0&&q.charAt(ne-1)===" ";)ne--;for(;Y<q.length&&q.charAt(Y+1)===" ";)Y++}else{let ce=k[0],ke=k[0];B.getWidth(ce)===0&&(ee++,ce--),B.getWidth(ke)===2&&(P++,ke++);const we=B.getString(ke).length;for(we>1&&(Q+=we-1,Y+=we-1);ce>0&&ne>0&&!this._isCharWordSeparator(B.loadCell(ce-1,this._workCell));){B.loadCell(ce-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,ce--):re>1&&(W+=re-1,ne-=re-1),ne--,ce--}for(;ke<B.length&&Y+1<q.length&&!this._isCharWordSeparator(B.loadCell(ke+1,this._workCell));){B.loadCell(ke+1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===2?(P++,ke++):re>1&&(Q+=re-1,Y+=re-1),Y++,ke++}}Y++;let K=ne+J-ee+W,he=Math.min(this._bufferService.cols,Y-ne+ee+P-W-Q);if(L||q.slice(ne,Y).trim()!==""){if(O&&K===0&&B.getCodePoint(0)!==32){const ce=V.lines.get(k[1]-1);if(ce&&B.isWrapped&&ce.getCodePoint(this._bufferService.cols-1)!==32){const ke=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(ke){const we=this._bufferService.cols-ke.start;K-=we,he+=we}}}if(H&&K+he===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const ce=V.lines.get(k[1]+1);if(ce!=null&&ce.isWrapped&&ce.getCodePoint(0)!==32){const ke=this._getWordAt([0,k[1]+1],!1,!1,!0);ke&&(he+=ke.length)}}return{start:K,length:he}}}_selectWordAt(k,L){const O=this._getWordAt(k,L);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,k[1]--;this._model.selectionStart=[O.start,k[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(k){const L=this._getWordAt(k,!0);if(L){let O=k[1];for(;L.start<0;)L.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,O]}}_isCharWordSeparator(k){return k.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(k.getChars())>=0}_selectLineAt(k){const L=this._bufferService.buffer.getWrappedRangeForLine(k),O={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,v.getRangeLength)(O,this._bufferService.cols)}};a.SelectionService=A=f([w(3,E.IBufferService),w(4,E.ICoreService),w(5,C.IMouseService),w(6,E.IOptionsService),w(7,C.IRenderService),w(8,C.ICoreBrowserService)],A)},4725:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const f=d(8343);a.ICharSizeService=(0,f.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),a.IMouseService=(0,f.createDecorator)("MouseService"),a.IRenderService=(0,f.createDecorator)("RenderService"),a.ISelectionService=(0,f.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,f.createDecorator)("ThemeService"),a.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(b,a,d){var f=this&&this.__decorate||function(A,k,L,O){var H,V=arguments.length,B=V<3?k:O===null?O=Object.getOwnPropertyDescriptor(k,L):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(A,k,L,O);else for(var q=A.length-1;q>=0;q--)(H=A[q])&&(B=(V<3?H(B):V>3?H(k,L,B):H(k,L))||B);return V>3&&B&&Object.defineProperty(k,L,B),B},w=this&&this.__param||function(A,k){return function(L,O){k(L,O,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const h=d(7239),_=d(8055),N=d(8460),C=d(844),y=d(2585),c=_.css.toColor("#ffffff"),p=_.css.toColor("#000000"),v=_.css.toColor("#ffffff"),g=_.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],k=[0,95,135,175,215,255];for(let L=0;L<216;L++){const O=k[L/36%6|0],H=k[L/6%6|0],V=k[L%6];A.push({css:_.channels.toCss(O,H,V),rgba:_.channels.toRgba(O,H,V)})}for(let L=0;L<24;L++){const O=8+10*L;A.push({css:_.channels.toCss(O,O,O),rgba:_.channels.toRgba(O,O,O)})}return A})());let R=a.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new N.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:c,background:p,cursor:v,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:_.color.blend(p,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:_.color.blend(p,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(A={}){const k=this._colors;if(k.foreground=j(A.foreground,c),k.background=j(A.background,p),k.cursor=j(A.cursor,v),k.cursorAccent=j(A.cursorAccent,g),k.selectionBackgroundTransparent=j(A.selectionBackground,E),k.selectionBackgroundOpaque=_.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=j(A.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=_.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=A.selectionForeground?j(A.selectionForeground,_.NULL_COLOR):void 0,k.selectionForeground===_.NULL_COLOR&&(k.selectionForeground=void 0),_.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=_.color.opacity(k.selectionBackgroundTransparent,.3)),_.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=_.color.opacity(k.selectionInactiveBackgroundTransparent,.3)),k.ansi=a.DEFAULT_ANSI_COLORS.slice(),k.ansi[0]=j(A.black,a.DEFAULT_ANSI_COLORS[0]),k.ansi[1]=j(A.red,a.DEFAULT_ANSI_COLORS[1]),k.ansi[2]=j(A.green,a.DEFAULT_ANSI_COLORS[2]),k.ansi[3]=j(A.yellow,a.DEFAULT_ANSI_COLORS[3]),k.ansi[4]=j(A.blue,a.DEFAULT_ANSI_COLORS[4]),k.ansi[5]=j(A.magenta,a.DEFAULT_ANSI_COLORS[5]),k.ansi[6]=j(A.cyan,a.DEFAULT_ANSI_COLORS[6]),k.ansi[7]=j(A.white,a.DEFAULT_ANSI_COLORS[7]),k.ansi[8]=j(A.brightBlack,a.DEFAULT_ANSI_COLORS[8]),k.ansi[9]=j(A.brightRed,a.DEFAULT_ANSI_COLORS[9]),k.ansi[10]=j(A.brightGreen,a.DEFAULT_ANSI_COLORS[10]),k.ansi[11]=j(A.brightYellow,a.DEFAULT_ANSI_COLORS[11]),k.ansi[12]=j(A.brightBlue,a.DEFAULT_ANSI_COLORS[12]),k.ansi[13]=j(A.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),k.ansi[14]=j(A.brightCyan,a.DEFAULT_ANSI_COLORS[14]),k.ansi[15]=j(A.brightWhite,a.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const L=Math.min(k.ansi.length-16,A.extendedAnsi.length);for(let O=0;O<L;O++)k.ansi[O+16]=j(A.extendedAnsi[O],a.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(A){this._restoreColor(A),this._onChangeColors.fire(this.colors)}_restoreColor(A){if(A!==void 0)switch(A){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[A]=this._restoreColors.ansi[A]}else for(let k=0;k<this._restoreColors.ansi.length;++k)this._colors.ansi[k]=this._restoreColors.ansi[k]}modifyColors(A){A(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function j(A,k){if(A!==void 0)try{return _.css.toColor(A)}catch{}return k}a.ThemeService=R=f([w(0,y.IOptionsService)],R)},6349:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=d(8460),w=d(844);class h extends w.Disposable{constructor(N){super(),this._maxLength=N,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(N){if(this._maxLength===N)return;const C=new Array(N);for(let y=0;y<Math.min(N,this.length);y++)C[y]=this._array[this._getCyclicIndex(y)];this._array=C,this._maxLength=N,this._startIndex=0}get length(){return this._length}set length(N){if(N>this._length)for(let C=this._length;C<N;C++)this._array[C]=void 0;this._length=N}get(N){return this._array[this._getCyclicIndex(N)]}set(N,C){this._array[this._getCyclicIndex(N)]=C}push(N){this._array[this._getCyclicIndex(this._length)]=N,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(N,C,...y){if(C){for(let c=N;c<this._length-C;c++)this._array[this._getCyclicIndex(c)]=this._array[this._getCyclicIndex(c+C)];this._length-=C,this.onDeleteEmitter.fire({index:N,amount:C})}for(let c=this._length-1;c>=N;c--)this._array[this._getCyclicIndex(c+y.length)]=this._array[this._getCyclicIndex(c)];for(let c=0;c<y.length;c++)this._array[this._getCyclicIndex(N+c)]=y[c];if(y.length&&this.onInsertEmitter.fire({index:N,amount:y.length}),this._length+y.length>this._maxLength){const c=this._length+y.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=y.length}trimStart(N){N>this._length&&(N=this._length),this._startIndex+=N,this._length-=N,this.onTrimEmitter.fire(N)}shiftElements(N,C,y){if(!(C<=0)){if(N<0||N>=this._length)throw new Error("start argument out of range");if(N+y<0)throw new Error("Cannot shift elements in list beyond index 0");if(y>0){for(let p=C-1;p>=0;p--)this.set(N+p+y,this.get(N+p));const c=N+C+y-this._length;if(c>0)for(this._length+=c;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let c=0;c<C;c++)this.set(N+c+y,this.get(N+c))}}_getCyclicIndex(N){return(this._startIndex+N)%this._maxLength}}a.CircularList=h},1439:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function d(f,w=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const _ in f)h[_]=w<=1?f[_]:f[_]&&d(f[_],w-1);return h}},8055:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,f=0,w=0,h=0;var _,N,C,y,c;function p(g){const E=g.toString(16);return E.length<2?"0"+E:E}function v(g,E){return g<E?(E+.05)/(g+.05):(g+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(g){g.toCss=function(E,R,j,A){return A!==void 0?`#${p(E)}${p(R)}${p(j)}${p(A)}`:`#${p(E)}${p(R)}${p(j)}`},g.toRgba=function(E,R,j,A=255){return(E<<24|R<<16|j<<8|A)>>>0},g.toColor=function(E,R,j,A){return{css:g.toCss(E,R,j,A),rgba:g.toRgba(E,R,j,A)}}}(_||(a.channels=_={})),function(g){function E(R,j){return h=Math.round(255*j),[d,f,w]=c.toChannels(R.rgba),{css:_.toCss(d,f,w,h),rgba:_.toRgba(d,f,w,h)}}g.blend=function(R,j){if(h=(255&j.rgba)/255,h===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,k=j.rgba>>16&255,L=j.rgba>>8&255,O=R.rgba>>24&255,H=R.rgba>>16&255,V=R.rgba>>8&255;return d=O+Math.round((A-O)*h),f=H+Math.round((k-H)*h),w=V+Math.round((L-V)*h),{css:_.toCss(d,f,w),rgba:_.toRgba(d,f,w)}},g.isOpaque=function(R){return(255&R.rgba)==255},g.ensureContrastRatio=function(R,j,A){const k=c.ensureContrastRatio(R.rgba,j.rgba,A);if(k)return _.toColor(k>>24&255,k>>16&255,k>>8&255)},g.opaque=function(R){const j=(255|R.rgba)>>>0;return[d,f,w]=c.toChannels(j),{css:_.toCss(d,f,w),rgba:j}},g.opacity=E,g.multiplyOpacity=function(R,j){return h=255&R.rgba,E(R,h*j/255)},g.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}}(N||(a.color=N={})),function(g){let E,R;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(E=A,E.globalCompositeOperation="copy",R=E.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return d=parseInt(j.slice(1,2).repeat(2),16),f=parseInt(j.slice(2,3).repeat(2),16),w=parseInt(j.slice(3,4).repeat(2),16),_.toColor(d,f,w);case 5:return d=parseInt(j.slice(1,2).repeat(2),16),f=parseInt(j.slice(2,3).repeat(2),16),w=parseInt(j.slice(3,4).repeat(2),16),h=parseInt(j.slice(4,5).repeat(2),16),_.toColor(d,f,w,h);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return d=parseInt(A[1]),f=parseInt(A[2]),w=parseInt(A[3]),h=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),_.toColor(d,f,w,h);if(!E||!R)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=R,E.fillStyle=j,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[d,f,w,h]=E.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(d,f,w,h),css:j}}}(C||(a.css=C={})),function(g){function E(R,j,A){const k=R/255,L=j/255,O=A/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}g.relativeLuminance=function(R){return E(R>>16&255,R>>8&255,255&R)},g.relativeLuminance2=E}(y||(a.rgb=y={})),function(g){function E(j,A,k){const L=j>>24&255,O=j>>16&255,H=j>>8&255;let V=A>>24&255,B=A>>16&255,q=A>>8&255,ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));for(;ne<k&&(V>0||B>0||q>0);)V-=Math.max(0,Math.ceil(.1*V)),B-=Math.max(0,Math.ceil(.1*B)),q-=Math.max(0,Math.ceil(.1*q)),ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));return(V<<24|B<<16|q<<8|255)>>>0}function R(j,A,k){const L=j>>24&255,O=j>>16&255,H=j>>8&255;let V=A>>24&255,B=A>>16&255,q=A>>8&255,ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));for(;ne<k&&(V<255||B<255||q<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),B=Math.min(255,B+Math.ceil(.1*(255-B))),q=Math.min(255,q+Math.ceil(.1*(255-q))),ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));return(V<<24|B<<16|q<<8|255)>>>0}g.blend=function(j,A){if(h=(255&A)/255,h===1)return A;const k=A>>24&255,L=A>>16&255,O=A>>8&255,H=j>>24&255,V=j>>16&255,B=j>>8&255;return d=H+Math.round((k-H)*h),f=V+Math.round((L-V)*h),w=B+Math.round((O-B)*h),_.toRgba(d,f,w)},g.ensureContrastRatio=function(j,A,k){const L=y.relativeLuminance(j>>8),O=y.relativeLuminance(A>>8);if(v(L,O)<k){if(O<L){const B=E(j,A,k),q=v(L,y.relativeLuminance(B>>8));if(q<k){const ne=R(j,A,k);return q>v(L,y.relativeLuminance(ne>>8))?B:ne}return B}const H=R(j,A,k),V=v(L,y.relativeLuminance(H>>8));if(V<k){const B=E(j,A,k);return V>v(L,y.relativeLuminance(B>>8))?H:B}return H}},g.reduceLuminance=E,g.increaseLuminance=R,g.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}}(c||(a.rgba=c={})),a.toPaddedHex=p,a.contrastRatio=v},8969:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=d(844),w=d(2585),h=d(4348),_=d(7866),N=d(744),C=d(7302),y=d(6975),c=d(8460),p=d(1753),v=d(1480),g=d(7994),E=d(9282),R=d(5435),j=d(5981),A=d(2660);let k=!1;class L extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new c.EventEmitter),this._onScroll.event(H=>{var V;(V=this._onScrollApi)==null||V.fire(H.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(H){for(const V in H)this.optionsService.options[V]=H[V]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new c.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new c.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new C.OptionsService(H)),this._instantiationService.setService(w.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(N.BufferService)),this._instantiationService.setService(w.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(w.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(y.CoreService)),this._instantiationService.setService(w.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(p.CoreMouseService)),this._instantiationService.setService(w.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(v.UnicodeService)),this._instantiationService.setService(w.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(g.CharsetService),this._instantiationService.setService(w.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(w.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new R.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(V=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(V=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new j.WriteBuffer((V,B)=>this._inputHandler.parse(V,B))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,V){this._writeBuffer.write(H,V)}writeSync(H,V){this._logService.logLevel<=w.LogLevelEnum.WARN&&!k&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k=!0),this._writeBuffer.writeSync(H,V)}input(H,V=!0){this.coreService.triggerDataEvent(H,V)}resize(H,V){isNaN(H)||isNaN(V)||(H=Math.max(H,N.MINIMUM_COLS),V=Math.max(V,N.MINIMUM_ROWS),this._bufferService.resize(H,V))}scroll(H,V=!1){this._bufferService.scroll(H,V)}scrollLines(H,V,B){this._bufferService.scrollLines(H,V,B)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const V=H-this._bufferService.buffer.ydisp;V!==0&&this.scrollLines(V)}registerEscHandler(H,V){return this._inputHandler.registerEscHandler(H,V)}registerDcsHandler(H,V){return this._inputHandler.registerDcsHandler(H,V)}registerCsiHandler(H,V){return this._inputHandler.registerCsiHandler(H,V)}registerOscHandler(H,V){return this._inputHandler.registerOscHandler(H,V)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const V=this.optionsService.rawOptions.windowsPty;V&&V.buildNumber!==void 0&&V.buildNumber!==void 0?H=V.backend==="conpty"&&V.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const V of H)V.dispose()})}}}a.CoreTerminal=L},8460:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===d)return void this._listeners.splice(f,1)}}})),this._event}fire(d,f){const w=[];for(let h=0;h<this._listeners.length;h++)w.push(this._listeners[h]);for(let h=0;h<w.length;h++)w[h].call(void 0,d,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,f){return d(w=>f.fire(w))},a.runAndSubscribe=function(d,f){return f(void 0),d(w=>f(w))}},5435:function(b,a,d){var f=this&&this.__decorate||function(ee,P,W,Q){var K,he=arguments.length,ce=he<3?P:Q===null?Q=Object.getOwnPropertyDescriptor(P,W):Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(ee,P,W,Q);else for(var ke=ee.length-1;ke>=0;ke--)(K=ee[ke])&&(ce=(he<3?K(ce):he>3?K(P,W,ce):K(P,W))||ce);return he>3&&ce&&Object.defineProperty(P,W,ce),ce},w=this&&this.__param||function(ee,P){return function(W,Q){P(W,Q,ee)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const h=d(2584),_=d(7116),N=d(2015),C=d(844),y=d(482),c=d(8437),p=d(8460),v=d(643),g=d(511),E=d(3734),R=d(2585),j=d(1480),A=d(6242),k=d(6351),L=d(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function V(ee,P){if(ee>24)return P.setWinLines||!1;switch(ee){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var B;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(B||(a.WindowsOptionsReportType=B={}));let q=0;class ne extends C.Disposable{getAttrData(){return this._curAttrData}constructor(P,W,Q,K,he,ce,ke,we,re=new N.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=W,this._coreService=Q,this._logService=K,this._optionsService=he,this._oscLinkService=ce,this._coreMouseService=ke,this._unicodeService=we,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new y.StringToUtf32,this._utf8Decoder=new y.Utf8ToUtf32,this._workCell=new g.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new p.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new p.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new p.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new p.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new p.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new p.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new p.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new p.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new p.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new p.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new p.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new p.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new Y(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(G=>this._activeBuffer=G.activeBuffer)),this._parser.setCsiHandlerFallback((G,ge)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:ge.toArray()})}),this._parser.setEscHandlerFallback(G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})}),this._parser.setExecuteHandlerFallback(G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})}),this._parser.setOscHandlerFallback((G,ge,de)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:ge,data:de})}),this._parser.setDcsHandlerFallback((G,ge,de)=>{ge==="HOOK"&&(de=de.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:ge,payload:de})}),this._parser.setPrintHandler((G,ge,de)=>this.print(G,ge,de)),this._parser.registerCsiHandler({final:"@"},G=>this.insertChars(G)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},G=>this.scrollLeft(G)),this._parser.registerCsiHandler({final:"A"},G=>this.cursorUp(G)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},G=>this.scrollRight(G)),this._parser.registerCsiHandler({final:"B"},G=>this.cursorDown(G)),this._parser.registerCsiHandler({final:"C"},G=>this.cursorForward(G)),this._parser.registerCsiHandler({final:"D"},G=>this.cursorBackward(G)),this._parser.registerCsiHandler({final:"E"},G=>this.cursorNextLine(G)),this._parser.registerCsiHandler({final:"F"},G=>this.cursorPrecedingLine(G)),this._parser.registerCsiHandler({final:"G"},G=>this.cursorCharAbsolute(G)),this._parser.registerCsiHandler({final:"H"},G=>this.cursorPosition(G)),this._parser.registerCsiHandler({final:"I"},G=>this.cursorForwardTab(G)),this._parser.registerCsiHandler({final:"J"},G=>this.eraseInDisplay(G,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},G=>this.eraseInDisplay(G,!0)),this._parser.registerCsiHandler({final:"K"},G=>this.eraseInLine(G,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},G=>this.eraseInLine(G,!0)),this._parser.registerCsiHandler({final:"L"},G=>this.insertLines(G)),this._parser.registerCsiHandler({final:"M"},G=>this.deleteLines(G)),this._parser.registerCsiHandler({final:"P"},G=>this.deleteChars(G)),this._parser.registerCsiHandler({final:"S"},G=>this.scrollUp(G)),this._parser.registerCsiHandler({final:"T"},G=>this.scrollDown(G)),this._parser.registerCsiHandler({final:"X"},G=>this.eraseChars(G)),this._parser.registerCsiHandler({final:"Z"},G=>this.cursorBackwardTab(G)),this._parser.registerCsiHandler({final:"`"},G=>this.charPosAbsolute(G)),this._parser.registerCsiHandler({final:"a"},G=>this.hPositionRelative(G)),this._parser.registerCsiHandler({final:"b"},G=>this.repeatPrecedingCharacter(G)),this._parser.registerCsiHandler({final:"c"},G=>this.sendDeviceAttributesPrimary(G)),this._parser.registerCsiHandler({prefix:">",final:"c"},G=>this.sendDeviceAttributesSecondary(G)),this._parser.registerCsiHandler({final:"d"},G=>this.linePosAbsolute(G)),this._parser.registerCsiHandler({final:"e"},G=>this.vPositionRelative(G)),this._parser.registerCsiHandler({final:"f"},G=>this.hVPosition(G)),this._parser.registerCsiHandler({final:"g"},G=>this.tabClear(G)),this._parser.registerCsiHandler({final:"h"},G=>this.setMode(G)),this._parser.registerCsiHandler({prefix:"?",final:"h"},G=>this.setModePrivate(G)),this._parser.registerCsiHandler({final:"l"},G=>this.resetMode(G)),this._parser.registerCsiHandler({prefix:"?",final:"l"},G=>this.resetModePrivate(G)),this._parser.registerCsiHandler({final:"m"},G=>this.charAttributes(G)),this._parser.registerCsiHandler({final:"n"},G=>this.deviceStatus(G)),this._parser.registerCsiHandler({prefix:"?",final:"n"},G=>this.deviceStatusPrivate(G)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},G=>this.softReset(G)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},G=>this.setCursorStyle(G)),this._parser.registerCsiHandler({final:"r"},G=>this.setScrollRegion(G)),this._parser.registerCsiHandler({final:"s"},G=>this.saveCursor(G)),this._parser.registerCsiHandler({final:"t"},G=>this.windowOptions(G)),this._parser.registerCsiHandler({final:"u"},G=>this.restoreCursor(G)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},G=>this.insertColumns(G)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},G=>this.deleteColumns(G)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},G=>this.selectProtected(G)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},G=>this.requestMode(G,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},G=>this.requestMode(G,!1)),this._parser.setExecuteHandler(h.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(h.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(h.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(h.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(h.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(h.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(h.C1.IND,()=>this.index()),this._parser.setExecuteHandler(h.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(h.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new A.OscHandler(G=>(this.setTitle(G),this.setIconName(G),!0))),this._parser.registerOscHandler(1,new A.OscHandler(G=>this.setIconName(G))),this._parser.registerOscHandler(2,new A.OscHandler(G=>this.setTitle(G))),this._parser.registerOscHandler(4,new A.OscHandler(G=>this.setOrReportIndexedColor(G))),this._parser.registerOscHandler(8,new A.OscHandler(G=>this.setHyperlink(G))),this._parser.registerOscHandler(10,new A.OscHandler(G=>this.setOrReportFgColor(G))),this._parser.registerOscHandler(11,new A.OscHandler(G=>this.setOrReportBgColor(G))),this._parser.registerOscHandler(12,new A.OscHandler(G=>this.setOrReportCursorColor(G))),this._parser.registerOscHandler(104,new A.OscHandler(G=>this.restoreIndexedColor(G))),this._parser.registerOscHandler(110,new A.OscHandler(G=>this.restoreFgColor(G))),this._parser.registerOscHandler(111,new A.OscHandler(G=>this.restoreBgColor(G))),this._parser.registerOscHandler(112,new A.OscHandler(G=>this.restoreCursorColor(G))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const G in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},()=>this.selectCharset("("+G)),this._parser.registerEscHandler({intermediates:")",final:G},()=>this.selectCharset(")"+G)),this._parser.registerEscHandler({intermediates:"*",final:G},()=>this.selectCharset("*"+G)),this._parser.registerEscHandler({intermediates:"+",final:G},()=>this.selectCharset("+"+G)),this._parser.registerEscHandler({intermediates:"-",final:G},()=>this.selectCharset("-"+G)),this._parser.registerEscHandler({intermediates:".",final:G},()=>this.selectCharset("."+G)),this._parser.registerEscHandler({intermediates:"/",final:G},()=>this.selectCharset("/"+G));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(G=>(this._logService.error("Parsing error: ",G),G)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler((G,ge)=>this.requestStatusString(G,ge)))}_preserveStack(P,W,Q,K){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=W,this._parseStack.decodedLength=Q,this._parseStack.position=K}_logSlowResolvingAsync(P){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([P,new Promise((W,Q)=>setTimeout(()=>Q("#SLOW_TIMEOUT"),5e3))]).catch(W=>{if(W!=="#SLOW_TIMEOUT")throw W;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,W){let Q,K=this._activeBuffer.x,he=this._activeBuffer.y,ce=0;const ke=this._parseStack.paused;if(ke){if(Q=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,W))return this._logSlowResolvingAsync(Q),Q;K=this._parseStack.cursorStartX,he=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>H&&(ce=this._parseStack.position+H)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,G=>String.fromCharCode(G)).join("")}"`),typeof P=="string"?P.split("").map(G=>G.charCodeAt(0)):P),this._parseBuffer.length<P.length&&this._parseBuffer.length<H&&(this._parseBuffer=new Uint32Array(Math.min(P.length,H))),ke||this._dirtyRowTracker.clearRange(),P.length>H)for(let G=ce;G<P.length;G+=H){const ge=G+H<P.length?G+H:P.length,de=typeof P=="string"?this._stringDecoder.decode(P.substring(G,ge),this._parseBuffer):this._utf8Decoder.decode(P.subarray(G,ge),this._parseBuffer);if(Q=this._parser.parse(this._parseBuffer,de))return this._preserveStack(K,he,de,G),this._logSlowResolvingAsync(Q),Q}else if(!ke){const G=typeof P=="string"?this._stringDecoder.decode(P,this._parseBuffer):this._utf8Decoder.decode(P,this._parseBuffer);if(Q=this._parser.parse(this._parseBuffer,G))return this._preserveStack(K,he,G,0),this._logSlowResolvingAsync(Q),Q}this._activeBuffer.x===K&&this._activeBuffer.y===he||this._onCursorMove.fire();const we=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),re=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);re<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(re,this._bufferService.rows-1),Math.min(we,this._bufferService.rows-1))}print(P,W,Q){let K,he;const ce=this._charsetService.charset,ke=this._optionsService.rawOptions.screenReaderMode,we=this._bufferService.cols,re=this._coreService.decPrivateModes.wraparound,G=this._coreService.modes.insertMode,ge=this._curAttrData;let de=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&Q-W>0&&de.getWidth(this._activeBuffer.x-1)===2&&de.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ge);let pe=this._parser.precedingJoinState;for(let Ne=W;Ne<Q;++Ne){if(K=P[Ne],K<127&&ce){const At=ce[String.fromCharCode(K)];At&&(K=At.charCodeAt(0))}const Ie=this._unicodeService.charProperties(K,pe);he=j.UnicodeService.extractWidth(Ie);const Ze=j.UnicodeService.extractShouldJoin(Ie),ut=Ze?j.UnicodeService.extractWidth(pe):0;if(pe=Ie,ke&&this._onA11yChar.fire((0,y.stringFromCodePoint)(K)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+he-ut>we){if(re){const At=de;let Ke=this._activeBuffer.x-ut;for(this._activeBuffer.x=ut,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),de=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ut>0&&de instanceof c.BufferLine&&de.copyCellsFrom(At,Ke,0,ut,!1);Ke<we;)At.setCellFromCodepoint(Ke++,0,1,ge)}else if(this._activeBuffer.x=we-1,he===2)continue}if(Ze&&this._activeBuffer.x){const At=de.getWidth(this._activeBuffer.x-1)?1:2;de.addCodepointToCell(this._activeBuffer.x-At,K,he);for(let Ke=he-ut;--Ke>=0;)de.setCellFromCodepoint(this._activeBuffer.x++,0,0,ge)}else if(G&&(de.insertCells(this._activeBuffer.x,he-ut,this._activeBuffer.getNullCell(ge)),de.getWidth(we-1)===2&&de.setCellFromCodepoint(we-1,v.NULL_CELL_CODE,v.NULL_CELL_WIDTH,ge)),de.setCellFromCodepoint(this._activeBuffer.x++,K,he,ge),he>0)for(;--he;)de.setCellFromCodepoint(this._activeBuffer.x++,0,0,ge)}this._parser.precedingJoinState=pe,this._activeBuffer.x<we&&Q-W>0&&de.getWidth(this._activeBuffer.x)===0&&!de.hasContent(this._activeBuffer.x)&&de.setCellFromCodepoint(this._activeBuffer.x,0,1,ge),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,W){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,W):this._parser.registerCsiHandler(P,Q=>!V(Q.params[0],this._optionsService.rawOptions.windowOptions)||W(Q))}registerDcsHandler(P,W){return this._parser.registerDcsHandler(P,new k.DcsHandler(W))}registerEscHandler(P,W){return this._parser.registerEscHandler(P,W)}registerOscHandler(P,W){return this._parser.registerOscHandler(P,new A.OscHandler(W))}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 P;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&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);W.hasWidth(this._activeBuffer.x)&&!W.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,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(P,W){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+W):(this._activeBuffer.x=P,this._activeBuffer.y=W),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,W){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+W)}cursorUp(P){const W=this._activeBuffer.y-this._activeBuffer.scrollTop;return W>=0?this._moveCursor(0,-Math.min(W,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const W=this._activeBuffer.scrollBottom-this._activeBuffer.y;return W>=0?this._moveCursor(0,Math.min(W,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const W=P.params[0];return W===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:W===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=P.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=P.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const W=P.params[0];return W===1&&(this._curAttrData.bg|=536870912),W!==2&&W!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,W,Q,K=!1,he=!1){const ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);ce.replaceCells(W,Q,this._activeBuffer.getNullCell(this._eraseAttrData()),he),K&&(ce.isWrapped=!1)}_resetBufferLine(P,W=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);Q&&(Q.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),W),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),Q.isWrapped=!1)}eraseInDisplay(P,W=!1){let Q;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(Q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(Q),this._eraseInBufferLine(Q++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);Q<this._bufferService.rows;Q++)this._resetBufferLine(Q,W);this._dirtyRowTracker.markDirty(Q);break;case 1:for(Q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(Q),this._eraseInBufferLine(Q,0,this._activeBuffer.x+1,!0,W),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(Q+1).isWrapped=!1);Q--;)this._resetBufferLine(Q,W);this._dirtyRowTracker.markDirty(0);break;case 2:for(Q=this._bufferService.rows,this._dirtyRowTracker.markDirty(Q-1);Q--;)this._resetBufferLine(Q,W);this._dirtyRowTracker.markDirty(0);break;case 3:const K=this._activeBuffer.lines.length-this._bufferService.rows;K>0&&(this._activeBuffer.lines.trimStart(K),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-K,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-K,0),this._onScroll.fire(0))}return!0}eraseInLine(P,W=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,W);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,W)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let W=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const Q=this._activeBuffer.ybase+this._activeBuffer.y,K=this._bufferService.rows-1-this._activeBuffer.scrollBottom,he=this._bufferService.rows-1+this._activeBuffer.ybase-K+1;for(;W--;)this._activeBuffer.lines.splice(he-1,1),this._activeBuffer.lines.splice(Q,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(P){this._restrictCursor();let W=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const Q=this._activeBuffer.ybase+this._activeBuffer.y;let K;for(K=this._bufferService.rows-1-this._activeBuffer.scrollBottom,K=this._bufferService.rows-1+this._activeBuffer.ybase-K;W--;)this._activeBuffer.lines.splice(Q,1),this._activeBuffer.lines.splice(K,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(P){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.insertCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(P){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.deleteCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(P){let W=P.params[0]||1;for(;W--;)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(P){let W=P.params[0]||1;for(;W--;)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(c.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=P.params[0]||1;for(let Q=this._activeBuffer.scrollTop;Q<=this._activeBuffer.scrollBottom;++Q){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+Q);K.deleteCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=P.params[0]||1;for(let Q=this._activeBuffer.scrollTop;Q<=this._activeBuffer.scrollBottom;++Q){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+Q);K.insertCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=P.params[0]||1;for(let Q=this._activeBuffer.scrollTop;Q<=this._activeBuffer.scrollBottom;++Q){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+Q);K.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=P.params[0]||1;for(let Q=this._activeBuffer.scrollTop;Q<=this._activeBuffer.scrollBottom;++Q){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+Q);K.deleteCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(P){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(P.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(P){const W=this._parser.precedingJoinState;if(!W)return!0;const Q=P.params[0]||1,K=j.UnicodeService.extractWidth(W),he=this._activeBuffer.x-K,ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(he),ke=new Uint32Array(ce.length*Q);let we=0;for(let G=0;G<ce.length;){const ge=ce.codePointAt(G)||0;ke[we++]=ge,G+=ge>65535?2:1}let re=we;for(let G=1;G<Q;++G)ke.copyWithin(re,0,we),re+=we;return this.print(ke,0,re),!0}sendDeviceAttributesPrimary(P){return P.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let W=0;W<P.length;W++)switch(P.params[W]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(P){for(let W=0;W<P.length;W++)switch(P.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(P){for(let W=0;W<P.length;W++)switch(P.params[W]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(P){for(let W=0;W<P.length;W++)switch(P.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),P.params[W]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(P,W){const Q=this._coreService.decPrivateModes,{activeProtocol:K,activeEncoding:he}=this._coreMouseService,ce=this._coreService,{buffers:ke,cols:we}=this._bufferService,{active:re,alt:G}=ke,ge=this._optionsService.rawOptions,de=Ze=>Ze?1:2,pe=P.params[0];return Ne=pe,Ie=W?pe===2?4:pe===4?de(ce.modes.insertMode):pe===12?3:pe===20?de(ge.convertEol):0:pe===1?de(Q.applicationCursorKeys):pe===3?ge.windowOptions.setWinLines?we===80?2:we===132?1:0:0:pe===6?de(Q.origin):pe===7?de(Q.wraparound):pe===8?3:pe===9?de(K==="X10"):pe===12?de(ge.cursorBlink):pe===25?de(!ce.isCursorHidden):pe===45?de(Q.reverseWraparound):pe===66?de(Q.applicationKeypad):pe===67?4:pe===1e3?de(K==="VT200"):pe===1002?de(K==="DRAG"):pe===1003?de(K==="ANY"):pe===1004?de(Q.sendFocus):pe===1005?4:pe===1006?de(he==="SGR"):pe===1015?4:pe===1016?de(he==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?de(re===G):pe===2004?de(Q.bracketedPasteMode):0,ce.triggerDataEvent(`${h.C0.ESC}[${W?"":"?"}${Ne};${Ie}$y`),!0;var Ne,Ie}_updateAttrColor(P,W,Q,K,he){return W===2?(P|=50331648,P&=-16777216,P|=E.AttributeData.fromColorRGB([Q,K,he])):W===5&&(P&=-50331904,P|=33554432|255&Q),P}_extractColor(P,W,Q){const K=[0,0,-1,0,0,0];let he=0,ce=0;do{if(K[ce+he]=P.params[W+ce],P.hasSubParams(W+ce)){const ke=P.getSubParams(W+ce);let we=0;do K[1]===5&&(he=1),K[ce+we+1+he]=ke[we];while(++we<ke.length&&we+ce+1+he<K.length);break}if(K[1]===5&&ce+he>=2||K[1]===2&&ce+he>=5)break;K[1]&&(he=1)}while(++ce+W<P.length&&ce+he<K.length);for(let ke=2;ke<K.length;++ke)K[ke]===-1&&(K[ke]=0);switch(K[0]){case 38:Q.fg=this._updateAttrColor(Q.fg,K[1],K[3],K[4],K[5]);break;case 48:Q.bg=this._updateAttrColor(Q.bg,K[1],K[3],K[4],K[5]);break;case 58:Q.extended=Q.extended.clone(),Q.extended.underlineColor=this._updateAttrColor(Q.extended.underlineColor,K[1],K[3],K[4],K[5])}return ce}_processUnderline(P,W){W.extended=W.extended.clone(),(!~P||P>5)&&(P=1),W.extended.underlineStyle=P,W.fg|=268435456,P===0&&(W.fg&=-268435457),W.updateExtended()}_processSGR0(P){P.fg=c.DEFAULT_ATTR_DATA.fg,P.bg=c.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const W=P.length;let Q;const K=this._curAttrData;for(let he=0;he<W;he++)Q=P.params[he],Q>=30&&Q<=37?(K.fg&=-50331904,K.fg|=16777216|Q-30):Q>=40&&Q<=47?(K.bg&=-50331904,K.bg|=16777216|Q-40):Q>=90&&Q<=97?(K.fg&=-50331904,K.fg|=16777224|Q-90):Q>=100&&Q<=107?(K.bg&=-50331904,K.bg|=16777224|Q-100):Q===0?this._processSGR0(K):Q===1?K.fg|=134217728:Q===3?K.bg|=67108864:Q===4?(K.fg|=268435456,this._processUnderline(P.hasSubParams(he)?P.getSubParams(he)[0]:1,K)):Q===5?K.fg|=536870912:Q===7?K.fg|=67108864:Q===8?K.fg|=1073741824:Q===9?K.fg|=2147483648:Q===2?K.bg|=134217728:Q===21?this._processUnderline(2,K):Q===22?(K.fg&=-134217729,K.bg&=-134217729):Q===23?K.bg&=-67108865:Q===24?(K.fg&=-268435457,this._processUnderline(0,K)):Q===25?K.fg&=-536870913:Q===27?K.fg&=-67108865:Q===28?K.fg&=-1073741825:Q===29?K.fg&=2147483647:Q===39?(K.fg&=-67108864,K.fg|=16777215&c.DEFAULT_ATTR_DATA.fg):Q===49?(K.bg&=-67108864,K.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):Q===38||Q===48||Q===58?he+=this._extractColor(P,he,K):Q===53?K.bg|=1073741824:Q===55?K.bg&=-1073741825:Q===59?(K.extended=K.extended.clone(),K.extended.underlineColor=-1,K.updateExtended()):Q===100?(K.fg&=-67108864,K.fg|=16777215&c.DEFAULT_ATTR_DATA.fg,K.bg&=-67108864,K.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Q);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const W=this._activeBuffer.y+1,Q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${W};${Q}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const W=this._activeBuffer.y+1,Q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${W};${Q}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){const W=P.params[0]||1;switch(W){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const Q=W%2==1;return this._optionsService.options.cursorBlink=Q,!0}setScrollRegion(P){const W=P.params[0]||1;let Q;return(P.length<2||(Q=P.params[1])>this._bufferService.rows||Q===0)&&(Q=this._bufferService.rows),Q>W&&(this._activeBuffer.scrollTop=W-1,this._activeBuffer.scrollBottom=Q-1,this._setCursor(0,0)),!0}windowOptions(P){if(!V(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const W=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:W!==2&&this._onRequestWindowsOptionsReport.fire(B.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(B.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:W!==0&&W!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),W!==0&&W!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:W!==0&&W!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),W!==0&&W!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){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(P){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(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const W=[],Q=P.split(";");for(;Q.length>1;){const K=Q.shift(),he=Q.shift();if(/^\d+$/.exec(K)){const ce=parseInt(K);if(J(ce))if(he==="?")W.push({type:0,index:ce});else{const ke=(0,L.parseColor)(he);ke&&W.push({type:1,index:ce,color:ke})}}}return W.length&&this._onColor.fire(W),!0}setHyperlink(P){const W=P.split(";");return!(W.length<2)&&(W[1]?this._createHyperlink(W[0],W[1]):!W[0]&&this._finishHyperlink())}_createHyperlink(P,W){this._getCurrentLinkId()&&this._finishHyperlink();const Q=P.split(":");let K;const he=Q.findIndex(ce=>ce.startsWith("id="));return he!==-1&&(K=Q[he].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:K,uri:W}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,W){const Q=P.split(";");for(let K=0;K<Q.length&&!(W>=this._specialColors.length);++K,++W)if(Q[K]==="?")this._onColor.fire([{type:0,index:this._specialColors[W]}]);else{const he=(0,L.parseColor)(Q[K]);he&&this._onColor.fire([{type:1,index:this._specialColors[W],color:he}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const W=[],Q=P.split(";");for(let K=0;K<Q.length;++K)if(/^\d+$/.exec(Q[K])){const he=parseInt(Q[K]);J(he)&&W.push({type:2,index:he})}return W.length&&this._onColor.fire(W),!0}restoreFgColor(P){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(P){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(P){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),!0}selectCharset(P){return P.length!==2?(this.selectDefaultCharset(),!0):(P[0]==="/"||this._charsetService.setgCharset(O[P[0]],_.CHARSETS[P[1]]||_.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,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=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new g.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let W=0;W<this._bufferService.rows;++W){const Q=this._activeBuffer.ybase+this._activeBuffer.y+W,K=this._activeBuffer.lines.get(Q);K&&(K.fill(P),K.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(P,W){const Q=this._bufferService.buffer,K=this._optionsService.rawOptions;return(he=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${he}${h.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${Q.scrollTop+1};${Q.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[K.cursorStyle]-(K.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,W){this._dirtyRowTracker.markRangeDirty(P,W)}}a.InputHandler=ne;let Y=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,P){ee>P&&(q=ee,ee=P,P=q),ee<this.start&&(this.start=ee),P>this.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ee){return 0<=ee&&ee<256}Y=f([w(0,R.IBufferService)],Y)},844:(b,a)=>{function d(f){for(const w of f)w.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const w=this._disposables.indexOf(f);w!==-1&&this._disposables.splice(w,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var w;this._isDisposed||f===this._value||((w=this._value)==null||w.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=d,a.getDisposeArrayDisposable=function(f){return{dispose:()=>d(f)}}},1505:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(w,h,_){this._data[w]||(this._data[w]={}),this._data[w][h]=_}get(w,h){return this._data[w]?this._data[w][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(f,w,h,_,N){this._data.get(f,w)||this._data.set(f,w,new d),this._data.get(f,w).set(h,_,N)}get(f,w,h,_){var N;return(N=this._data.get(f,w))==null?void 0:N.get(h,_)}clear(){this._data.clear()}}},6114:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const w=d.match(/Version\/(\d+)/);return w===null||w.length<2?0:parseInt(w[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},6106:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let d=0;a.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(d=this._search(this._getKey(f)),this._array.splice(d,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const w=this._getKey(f);if(w===void 0||(d=this._search(w),d===-1)||this._getKey(this._array[d])!==w)return!1;do if(this._array[d]===f)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===w);return!1}*getKeyIterator(f){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===f)}forEachByKey(f,w){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do w(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===f)}values(){return[...this._array].values()}_search(f){let w=0,h=this._array.length-1;for(;h>=w;){let _=w+h>>1;const N=this._getKey(this._array[_]);if(N>f)h=_-1;else{if(!(N<f)){for(;_>0&&this._getKey(this._array[_-1])===f;)_--;return _}w=_+1}}return w}}},7226:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=d(6114);class w{constructor(){this._tasks=[],this._i=0}enqueue(N){this._tasks.push(N),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(N){this._idleCallback=void 0;let C=0,y=0,c=N.timeRemaining(),p=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),y=Math.max(C,y),p=N.timeRemaining(),1.5*y>p)return c-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-C))}ms`),void this._start();c=p}this.clear()}}class h extends w{_requestCallback(N){return setTimeout(()=>N(this._createDeadline(16)))}_cancelCallback(N){clearTimeout(N)}_createDeadline(N){const C=Date.now()+N;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends w{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=d(643);a.updateWindowsModeWrappedState=function(w){const h=w.buffer.lines.get(w.buffer.ybase+w.buffer.y-1),_=h==null?void 0:h.get(w.cols-1),N=w.buffer.lines.get(w.buffer.ybase+w.buffer.y);N&&_&&(N.isWrapped=_[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&_[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new d;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,_=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=_}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=d(6349),w=d(7226),h=d(3734),_=d(8437),N=d(4634),C=d(511),y=d(643),c=d(4863),p=d(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(v,g,E){this._hasScrollback=v,this._optionsService=g,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,y.WHITESPACE_CELL_CHAR,y.WHITESPACE_CELL_WIDTH,y.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new w.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(v){return v?(this._nullCell.fg=v.fg,this._nullCell.bg=v.bg,this._nullCell.extended=v.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(v){return v?(this._whitespaceCell.fg=v.fg,this._whitespaceCell.bg=v.bg,this._whitespaceCell.extended=v.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(v,g){return new _.BufferLine(this._bufferService.cols,this.getNullCell(v),g)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const v=this.ybase+this.y-this.ydisp;return v>=0&&v<this._rows}_getCorrectBufferLength(v){if(!this._hasScrollback)return v;const g=v+this._optionsService.rawOptions.scrollback;return g>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:g}fillViewportRows(v){if(this.lines.length===0){v===void 0&&(v=_.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)this.lines.push(this.getBlankLine(v))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(v,g){const E=this.getNullCell(_.DEFAULT_ATTR_DATA);let R=0;const j=this._getCorrectBufferLength(g);if(j>this.lines.maxLength&&(this.lines.maxLength=j),this.lines.length>0){if(this._cols<v)for(let k=0;k<this.lines.length;k++)R+=+this.lines.get(k).resize(v,E);let A=0;if(this._rows<g)for(let k=this._rows;k<g;k++)this.lines.length<g+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new _.BufferLine(v,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(v,E)));else for(let k=this._rows;k>g;k--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(j<this.lines.maxLength){const k=this.lines.length-j;k>0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,0)),this.lines.maxLength=j}this.x=Math.min(this.x,v-1),this.y=Math.min(this.y,g-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,v-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(v,g),this._cols>v))for(let A=0;A<this.lines.length;A++)R+=+this.lines.get(A).resize(v,E);this._cols=v,this._rows=g,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let v=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,v=!1);let g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>100)return!0;return v}get _isReflowEnabled(){const v=this._optionsService.rawOptions.windowsPty;return v&&v.buildNumber?this._hasScrollback&&v.backend==="conpty"&&v.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(v,g){this._cols!==v&&(v>this._cols?this._reflowLarger(v,g):this._reflowSmaller(v,g))}_reflowLarger(v,g){const E=(0,N.reflowLargerGetLinesToRemove)(this.lines,this._cols,v,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(E.length>0){const R=(0,N.reflowLargerCreateNewLayout)(this.lines,E);(0,N.reflowLargerApplyNewLayout)(this.lines,R.layout),this._reflowLargerAdjustViewport(v,g,R.countRemoved)}}_reflowLargerAdjustViewport(v,g,E){const R=this.getNullCell(_.DEFAULT_ATTR_DATA);let j=E;for(;j-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new _.BufferLine(v,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(v,g){const E=this.getNullCell(_.DEFAULT_ATTR_DATA),R=[];let j=0;for(let A=this.lines.length-1;A>=0;A--){let k=this.lines.get(A);if(!k||!k.isWrapped&&k.getTrimmedLength()<=v)continue;const L=[k];for(;k.isWrapped&&A>0;)k=this.lines.get(--A),L.unshift(k);const O=this.ybase+this.y;if(O>=A&&O<A+L.length)continue;const H=L[L.length-1].getTrimmedLength(),V=(0,N.reflowSmallerGetNewLineLengths)(L,this._cols,v),B=V.length-L.length;let q;q=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const ne=[];for(let Q=0;Q<B;Q++){const K=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);ne.push(K)}ne.length>0&&(R.push({start:A+L.length+j,newLines:ne}),j+=ne.length),L.push(...ne);let Y=V.length-1,J=V[Y];J===0&&(Y--,J=V[Y]);let ee=L.length-B-1,P=H;for(;ee>=0;){const Q=Math.min(P,J);if(L[Y]===void 0)break;if(L[Y].copyCellsFrom(L[ee],P-Q,J-Q,Q,!0),J-=Q,J===0&&(Y--,J=V[Y]),P-=Q,P===0){ee--;const K=Math.max(ee,0);P=(0,N.getWrappedLineTrimmedLength)(L,K,this._cols)}}for(let Q=0;Q<L.length;Q++)V[Q]<v&&L[Q].setCell(V[Q],E);let W=B-q;for(;W-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+j)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+B,this.ybase+g-1)}if(R.length>0){const A=[],k=[];for(let Y=0;Y<this.lines.length;Y++)k.push(this.lines.get(Y));const L=this.lines.length;let O=L-1,H=0,V=R[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+j);let B=0;for(let Y=Math.min(this.lines.maxLength-1,L+j-1);Y>=0;Y--)if(V&&V.start>O+B){for(let J=V.newLines.length-1;J>=0;J--)this.lines.set(Y--,V.newLines[J]);Y++,A.push({index:O+1,amount:V.newLines.length}),B+=V.newLines.length,V=R[++H]}else this.lines.set(Y,k[O--]);let q=0;for(let Y=A.length-1;Y>=0;Y--)A[Y].index+=q,this.lines.onInsertEmitter.fire(A[Y]),q+=A[Y].amount;const ne=Math.max(0,L+j-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(v,g,E=0,R){const j=this.lines.get(v);return j?j.translateToString(g,E,R):""}getWrappedRangeForLine(v){let g=v,E=v;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:g,last:E}}setupTabStops(v){for(v!=null?this.tabs[v]||(v=this.prevStop(v)):(this.tabs={},v=0);v<this._cols;v+=this._optionsService.rawOptions.tabStopWidth)this.tabs[v]=!0}prevStop(v){for(v==null&&(v=this.x);!this.tabs[--v]&&v>0;);return v>=this._cols?this._cols-1:v<0?0:v}nextStop(v){for(v==null&&(v=this.x);!this.tabs[++v]&&v<this._cols;);return v>=this._cols?this._cols-1:v<0?0:v}clearMarkers(v){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].line===v&&(this.markers[g].dispose(),this.markers.splice(g--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let v=0;v<this.markers.length;v++)this.markers[v].dispose(),this.markers.splice(v--,1);this._isClearing=!1}addMarker(v){const g=new c.Marker(v);return this.markers.push(g),g.register(this.lines.onTrim(E=>{g.line-=E,g.line<0&&g.dispose()})),g.register(this.lines.onInsert(E=>{g.line>=E.index&&(g.line+=E.amount)})),g.register(this.lines.onDelete(E=>{g.line>=E.index&&g.line<E.index+E.amount&&g.dispose(),g.line>E.index&&(g.line-=E.amount)})),g.register(g.onDispose(()=>this._removeMarker(g))),g}_removeMarker(v){this._isClearing||this.markers.splice(this.markers.indexOf(v),1)}}},8437:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=d(3734),w=d(511),h=d(643),_=d(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let N=0;class C{constructor(c,p,v=!1){this.isWrapped=v,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*c);const g=p||w.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let E=0;E<c;++E)this.setCell(E,g);this.length=c}get(c){const p=this._data[3*c+0],v=2097151&p;return[this._data[3*c+1],2097152&p?this._combined[c]:v?(0,_.stringFromCodePoint)(v):"",p>>22,2097152&p?this._combined[c].charCodeAt(this._combined[c].length-1):v]}set(c,p){this._data[3*c+1]=p[h.CHAR_DATA_ATTR_INDEX],p[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[c]=p[1],this._data[3*c+0]=2097152|c|p[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*c+0]=p[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(c){return this._data[3*c+0]>>22}hasWidth(c){return 12582912&this._data[3*c+0]}getFg(c){return this._data[3*c+1]}getBg(c){return this._data[3*c+2]}hasContent(c){return 4194303&this._data[3*c+0]}getCodePoint(c){const p=this._data[3*c+0];return 2097152&p?this._combined[c].charCodeAt(this._combined[c].length-1):2097151&p}isCombined(c){return 2097152&this._data[3*c+0]}getString(c){const p=this._data[3*c+0];return 2097152&p?this._combined[c]:2097151&p?(0,_.stringFromCodePoint)(2097151&p):""}isProtected(c){return 536870912&this._data[3*c+2]}loadCell(c,p){return N=3*c,p.content=this._data[N+0],p.fg=this._data[N+1],p.bg=this._data[N+2],2097152&p.content&&(p.combinedData=this._combined[c]),268435456&p.bg&&(p.extended=this._extendedAttrs[c]),p}setCell(c,p){2097152&p.content&&(this._combined[c]=p.combinedData),268435456&p.bg&&(this._extendedAttrs[c]=p.extended),this._data[3*c+0]=p.content,this._data[3*c+1]=p.fg,this._data[3*c+2]=p.bg}setCellFromCodepoint(c,p,v,g){268435456&g.bg&&(this._extendedAttrs[c]=g.extended),this._data[3*c+0]=p|v<<22,this._data[3*c+1]=g.fg,this._data[3*c+2]=g.bg}addCodepointToCell(c,p,v){let g=this._data[3*c+0];2097152&g?this._combined[c]+=(0,_.stringFromCodePoint)(p):2097151&g?(this._combined[c]=(0,_.stringFromCodePoint)(2097151&g)+(0,_.stringFromCodePoint)(p),g&=-2097152,g|=2097152):g=p|4194304,v&&(g&=-12582913,g|=v<<22),this._data[3*c+0]=g}insertCells(c,p,v){if((c%=this.length)&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,v),p<this.length-c){const g=new w.CellData;for(let E=this.length-c-p-1;E>=0;--E)this.setCell(c+p+E,this.loadCell(c+E,g));for(let E=0;E<p;++E)this.setCell(c+E,v)}else for(let g=c;g<this.length;++g)this.setCell(g,v);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,v)}deleteCells(c,p,v){if(c%=this.length,p<this.length-c){const g=new w.CellData;for(let E=0;E<this.length-c-p;++E)this.setCell(c+E,this.loadCell(c+p+E,g));for(let E=this.length-p;E<this.length;++E)this.setCell(E,v)}else for(let g=c;g<this.length;++g)this.setCell(g,v);c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,v),this.getWidth(c)!==0||this.hasContent(c)||this.setCellFromCodepoint(c,0,1,v)}replaceCells(c,p,v,g=!1){if(g)for(c&&this.getWidth(c-1)===2&&!this.isProtected(c-1)&&this.setCellFromCodepoint(c-1,0,1,v),p<this.length&&this.getWidth(p-1)===2&&!this.isProtected(p)&&this.setCellFromCodepoint(p,0,1,v);c<p&&c<this.length;)this.isProtected(c)||this.setCell(c,v),c++;else for(c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,v),p<this.length&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p,0,1,v);c<p&&c<this.length;)this.setCell(c++,v)}resize(c,p){if(c===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const v=3*c;if(c>this.length){if(this._data.buffer.byteLength>=4*v)this._data=new Uint32Array(this._data.buffer,0,v);else{const g=new Uint32Array(v);g.set(this._data),this._data=g}for(let g=this.length;g<c;++g)this.setCell(g,p)}else{this._data=this._data.subarray(0,v);const g=Object.keys(this._combined);for(let R=0;R<g.length;R++){const j=parseInt(g[R],10);j>=c&&delete this._combined[j]}const E=Object.keys(this._extendedAttrs);for(let R=0;R<E.length;R++){const j=parseInt(E[R],10);j>=c&&delete this._extendedAttrs[j]}}return this.length=c,4*v*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const c=new Uint32Array(this._data.length);return c.set(this._data),this._data=c,1}return 0}fill(c,p=!1){if(p)for(let v=0;v<this.length;++v)this.isProtected(v)||this.setCell(v,c);else{this._combined={},this._extendedAttrs={};for(let v=0;v<this.length;++v)this.setCell(v,c)}}copyFrom(c){this.length!==c.length?this._data=new Uint32Array(c._data):this._data.set(c._data),this.length=c.length,this._combined={};for(const p in c._combined)this._combined[p]=c._combined[p];this._extendedAttrs={};for(const p in c._extendedAttrs)this._extendedAttrs[p]=c._extendedAttrs[p];this.isWrapped=c.isWrapped}clone(){const c=new C(0);c._data=new Uint32Array(this._data),c.length=this.length;for(const p in this._combined)c._combined[p]=this._combined[p];for(const p in this._extendedAttrs)c._extendedAttrs[p]=this._extendedAttrs[p];return c.isWrapped=this.isWrapped,c}getTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0])return c+(this._data[3*c+0]>>22);return 0}getNoBgTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0]||50331648&this._data[3*c+2])return c+(this._data[3*c+0]>>22);return 0}copyCellsFrom(c,p,v,g,E){const R=c._data;if(E)for(let A=g-1;A>=0;A--){for(let k=0;k<3;k++)this._data[3*(v+A)+k]=R[3*(p+A)+k];268435456&R[3*(p+A)+2]&&(this._extendedAttrs[v+A]=c._extendedAttrs[p+A])}else for(let A=0;A<g;A++){for(let k=0;k<3;k++)this._data[3*(v+A)+k]=R[3*(p+A)+k];268435456&R[3*(p+A)+2]&&(this._extendedAttrs[v+A]=c._extendedAttrs[p+A])}const j=Object.keys(c._combined);for(let A=0;A<j.length;A++){const k=parseInt(j[A],10);k>=p&&(this._combined[k-p+v]=c._combined[k])}}translateToString(c,p,v,g){p=p??0,v=v??this.length,c&&(v=Math.min(v,this.getTrimmedLength())),g&&(g.length=0);let E="";for(;p<v;){const R=this._data[3*p+0],j=2097151&R,A=2097152&R?this._combined[p]:j?(0,_.stringFromCodePoint)(j):h.WHITESPACE_CELL_CHAR;if(E+=A,g)for(let k=0;k<A.length;++k)g.push(p);p+=R>>22||1}return g&&g.push(p),E}}a.BufferLine=C},4841:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(d,f){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return f*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(b,a)=>{function d(f,w,h){if(w===f.length-1)return f[w].getTrimmedLength();const _=!f[w].hasContent(h-1)&&f[w].getWidth(h-1)===1,N=f[w+1].getWidth(0)===2;return _&&N?h-1:h}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(f,w,h,_,N){const C=[];for(let y=0;y<f.length-1;y++){let c=y,p=f.get(++c);if(!p.isWrapped)continue;const v=[f.get(y)];for(;c<f.length&&p.isWrapped;)v.push(p),p=f.get(++c);if(_>=y&&_<c){y+=v.length-1;continue}let g=0,E=d(v,g,w),R=1,j=0;for(;R<v.length;){const k=d(v,R,w),L=k-j,O=h-E,H=Math.min(L,O);v[g].copyCellsFrom(v[R],j,E,H,!1),E+=H,E===h&&(g++,E=0),j+=H,j===k&&(R++,j=0),E===0&&g!==0&&v[g-1].getWidth(h-1)===2&&(v[g].copyCellsFrom(v[g-1],h-1,E++,1,!1),v[g-1].setCell(h-1,N))}v[g].replaceCells(E,h,N);let A=0;for(let k=v.length-1;k>0&&(k>g||v[k].getTrimmedLength()===0);k--)A++;A>0&&(C.push(y+v.length-A),C.push(A)),y+=v.length-1}return C},a.reflowLargerCreateNewLayout=function(f,w){const h=[];let _=0,N=w[_],C=0;for(let y=0;y<f.length;y++)if(N===y){const c=w[++_];f.onDeleteEmitter.fire({index:y-C,amount:c}),y+=c-1,C+=c,N=w[++_]}else h.push(y);return{layout:h,countRemoved:C}},a.reflowLargerApplyNewLayout=function(f,w){const h=[];for(let _=0;_<w.length;_++)h.push(f.get(w[_]));for(let _=0;_<h.length;_++)f.set(_,h[_]);f.length=w.length},a.reflowSmallerGetNewLineLengths=function(f,w,h){const _=[],N=f.map((p,v)=>d(f,v,w)).reduce((p,v)=>p+v);let C=0,y=0,c=0;for(;c<N;){if(N-c<h){_.push(N-c);break}C+=h;const p=d(f,y,w);C>p&&(C-=p,y++);const v=f[y].getWidth(C-1)===2;v&&C--;const g=v?h-1:h;_.push(g),c+=g}return _},a.getWrappedLineTrimmedLength=d},5295:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=d(8460),w=d(844),h=d(9092);class _ extends w.Disposable{constructor(C,y){super(),this._optionsService=C,this._bufferService=y,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(C){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(C),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(C,y){this._normal.resize(C,y),this._alt.resize(C,y),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}a.BufferSet=_},511:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=d(482),w=d(643),h=d(3734);class _ extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const y=new _;return y.setFromCharData(C),y}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[w.CHAR_DATA_ATTR_INDEX],this.bg=0;let y=!1;if(C[w.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(C[w.CHAR_DATA_CHAR_INDEX].length===2){const c=C[w.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const p=C[w.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=p&&p<=57343?this.content=1024*(c-55296)+p-56320+65536|C[w.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=C[w.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[w.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=C[w.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[w.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},643:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=d(8460),w=d(844);class h{get id(){return this._id}constructor(N){this.line=N,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,w.disposeArray)(this._disposables),this._disposables.length=0)}register(N){return this._disposables.push(N),N}}a.Marker=h,h._nextId=1},7116:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(b,a)=>{var d,f,w;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
213
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""}(d||(a.C0=d={})),function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""}(f||(a.C1=f={})),function(h){h.ST=`${d.ESC}\\`}(w||(a.C1_ESCAPED=w={}))},7399:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=d(2584),w={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(h,_,N,C){const y={type:0,cancel:!1,key:void 0},c=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?y.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?y.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?y.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(y.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:y.key=h.ctrlKey?"\b":f.C0.DEL,h.altKey&&(y.key=f.C0.ESC+y.key);break;case 9:if(h.shiftKey){y.key=f.C0.ESC+"[Z";break}y.key=f.C0.HT,y.cancel=!0;break;case 13:y.key=h.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,y.cancel=!0;break;case 27:y.key=f.C0.ESC,h.altKey&&(y.key=f.C0.ESC+f.C0.ESC),y.cancel=!0;break;case 37:if(h.metaKey)break;c?(y.key=f.C0.ESC+"[1;"+(c+1)+"D",y.key===f.C0.ESC+"[1;3D"&&(y.key=f.C0.ESC+(N?"b":"[1;5D"))):y.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;c?(y.key=f.C0.ESC+"[1;"+(c+1)+"C",y.key===f.C0.ESC+"[1;3C"&&(y.key=f.C0.ESC+(N?"f":"[1;5C"))):y.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;c?(y.key=f.C0.ESC+"[1;"+(c+1)+"A",N||y.key!==f.C0.ESC+"[1;3A"||(y.key=f.C0.ESC+"[1;5A")):y.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;c?(y.key=f.C0.ESC+"[1;"+(c+1)+"B",N||y.key!==f.C0.ESC+"[1;3B"||(y.key=f.C0.ESC+"[1;5B")):y.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(y.key=f.C0.ESC+"[2~");break;case 46:y.key=c?f.C0.ESC+"[3;"+(c+1)+"~":f.C0.ESC+"[3~";break;case 36:y.key=c?f.C0.ESC+"[1;"+(c+1)+"H":_?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:y.key=c?f.C0.ESC+"[1;"+(c+1)+"F":_?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?y.type=2:h.ctrlKey?y.key=f.C0.ESC+"[5;"+(c+1)+"~":y.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?y.type=3:h.ctrlKey?y.key=f.C0.ESC+"[6;"+(c+1)+"~":y.key=f.C0.ESC+"[6~";break;case 112:y.key=c?f.C0.ESC+"[1;"+(c+1)+"P":f.C0.ESC+"OP";break;case 113:y.key=c?f.C0.ESC+"[1;"+(c+1)+"Q":f.C0.ESC+"OQ";break;case 114:y.key=c?f.C0.ESC+"[1;"+(c+1)+"R":f.C0.ESC+"OR";break;case 115:y.key=c?f.C0.ESC+"[1;"+(c+1)+"S":f.C0.ESC+"OS";break;case 116:y.key=c?f.C0.ESC+"[15;"+(c+1)+"~":f.C0.ESC+"[15~";break;case 117:y.key=c?f.C0.ESC+"[17;"+(c+1)+"~":f.C0.ESC+"[17~";break;case 118:y.key=c?f.C0.ESC+"[18;"+(c+1)+"~":f.C0.ESC+"[18~";break;case 119:y.key=c?f.C0.ESC+"[19;"+(c+1)+"~":f.C0.ESC+"[19~";break;case 120:y.key=c?f.C0.ESC+"[20;"+(c+1)+"~":f.C0.ESC+"[20~";break;case 121:y.key=c?f.C0.ESC+"[21;"+(c+1)+"~":f.C0.ESC+"[21~";break;case 122:y.key=c?f.C0.ESC+"[23;"+(c+1)+"~":f.C0.ESC+"[23~";break;case 123:y.key=c?f.C0.ESC+"[24;"+(c+1)+"~":f.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(N&&!C||!h.altKey||h.metaKey)!N||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?y.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(y.key=f.C0.US),h.key==="@"&&(y.key=f.C0.NUL)):h.keyCode===65&&(y.type=1);else{const p=w[h.keyCode],v=p==null?void 0:p[h.shiftKey?1:0];if(v)y.key=f.C0.ESC+v;else if(h.keyCode>=65&&h.keyCode<=90){const g=h.ctrlKey?h.keyCode-64:h.keyCode+32;let E=String.fromCharCode(g);h.shiftKey&&(E=E.toUpperCase()),y.key=f.C0.ESC+E}else if(h.keyCode===32)y.key=f.C0.ESC+(h.ctrlKey?f.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let g=h.code.slice(3,4);h.shiftKey||(g=g.toLowerCase()),y.key=f.C0.ESC+g,y.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?y.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?y.key=f.C0.NUL:h.keyCode>=51&&h.keyCode<=55?y.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?y.key=f.C0.DEL:h.keyCode===219?y.key=f.C0.ESC:h.keyCode===220?y.key=f.C0.FS:h.keyCode===221&&(y.key=f.C0.GS)}return y}},482:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,f=0,w=d.length){let h="";for(let _=f;_<w;++_){let N=d[_];N>65535?(N-=65536,h+=String.fromCharCode(55296+(N>>10))+String.fromCharCode(N%1024+56320)):h+=String.fromCharCode(N)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,f){const w=d.length;if(!w)return 0;let h=0,_=0;if(this._interim){const N=d.charCodeAt(_++);56320<=N&&N<=57343?f[h++]=1024*(this._interim-55296)+N-56320+65536:(f[h++]=this._interim,f[h++]=N),this._interim=0}for(let N=_;N<w;++N){const C=d.charCodeAt(N);if(55296<=C&&C<=56319){if(++N>=w)return this._interim=C,h;const y=d.charCodeAt(N);56320<=y&&y<=57343?f[h++]=1024*(C-55296)+y-56320+65536:(f[h++]=C,f[h++]=y)}else C!==65279&&(f[h++]=C)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,f){const w=d.length;if(!w)return 0;let h,_,N,C,y=0,c=0,p=0;if(this.interim[0]){let E=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let j,A=0;for(;(j=63&this.interim[++A])&&A<4;)R<<=6,R|=j;const k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=k-A;for(;p<L;){if(p>=w)return 0;if(j=d[p++],(192&j)!=128){p--,E=!0;break}this.interim[A++]=j,R<<=6,R|=63&j}E||(k===2?R<128?p--:f[y++]=R:k===3?R<2048||R>=55296&&R<=57343||R===65279||(f[y++]=R):R<65536||R>1114111||(f[y++]=R)),this.interim.fill(0)}const v=w-4;let g=p;for(;g<w;){for(;!(!(g<v)||128&(h=d[g])||128&(_=d[g+1])||128&(N=d[g+2])||128&(C=d[g+3]));)f[y++]=h,f[y++]=_,f[y++]=N,f[y++]=C,g+=4;if(h=d[g++],h<128)f[y++]=h;else if((224&h)==192){if(g>=w)return this.interim[0]=h,y;if(_=d[g++],(192&_)!=128){g--;continue}if(c=(31&h)<<6|63&_,c<128){g--;continue}f[y++]=c}else if((240&h)==224){if(g>=w)return this.interim[0]=h,y;if(_=d[g++],(192&_)!=128){g--;continue}if(g>=w)return this.interim[0]=h,this.interim[1]=_,y;if(N=d[g++],(192&N)!=128){g--;continue}if(c=(15&h)<<12|(63&_)<<6|63&N,c<2048||c>=55296&&c<=57343||c===65279)continue;f[y++]=c}else if((248&h)==240){if(g>=w)return this.interim[0]=h,y;if(_=d[g++],(192&_)!=128){g--;continue}if(g>=w)return this.interim[0]=h,this.interim[1]=_,y;if(N=d[g++],(192&N)!=128){g--;continue}if(g>=w)return this.interim[0]=h,this.interim[1]=_,this.interim[2]=N,y;if(C=d[g++],(192&C)!=128){g--;continue}if(c=(7&h)<<18|(63&_)<<12|(63&N)<<6|63&C,c<65536||c>1114111)continue;f[y++]=c}}return y}}},225:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=d(1480),w=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let N=0;N<w.length;++N)_.fill(0,w[N][0],w[N][1]+1)}}wcwidth(N){return N<32?0:N<127?1:N<65536?_[N]:function(C,y){let c,p=0,v=y.length-1;if(C<y[0][0]||C>y[v][1])return!1;for(;v>=p;)if(c=p+v>>1,C>y[c][1])p=c+1;else{if(!(C<y[c][0]))return!0;v=c-1}return!1}(N,h)?0:N>=131072&&N<=196605||N>=196608&&N<=262141?2:1}charProperties(N,C){let y=this.wcwidth(N),c=y===0&&C!==0;if(c){const p=f.UnicodeService.extractWidth(C);p===0?c=!1:p>y&&(y=p)}return f.UnicodeService.createPropertyValue(0,y,c)}}},5981:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=d(8460),w=d(844);class h extends w.Disposable{constructor(N){super(),this._action=N,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(N,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=N.length,this._writeBuffer.push(N),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let y;for(this._isSyncWriting=!0;y=this._writeBuffer.shift();){this._action(y);const c=this._callbacks.shift();c&&c()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(N,C){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=N.length,this._writeBuffer.push(N),this._callbacks.push(C),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=N.length,this._writeBuffer.push(N),this._callbacks.push(C)}_innerWrite(N=0,C=!0){const y=N||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const c=this._writeBuffer[this._bufferOffset],p=this._action(c,C);if(p){const g=E=>Date.now()-y>=12?setTimeout(()=>this._innerWrite(0,E)):this._innerWrite(y,E);return void p.catch(E=>(queueMicrotask(()=>{throw E}),Promise.resolve(!1))).then(g)}const v=this._callbacks[this._bufferOffset];if(v&&v(),this._bufferOffset++,this._pendingData-=c.length,Date.now()-y>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=h},5941:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const d=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function w(h,_){const N=h.toString(16),C=N.length<2?"0"+N:N;switch(_){case 4:return N[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}a.parseColor=function(h){if(!h)return;let _=h.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const N=d.exec(_);if(N){const C=N[1]?15:N[4]?255:N[7]?4095:65535;return[Math.round(parseInt(N[1]||N[4]||N[7]||N[10],16)/C*255),Math.round(parseInt(N[2]||N[5]||N[8]||N[11],16)/C*255),Math.round(parseInt(N[3]||N[6]||N[9]||N[12],16)/C*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),f.exec(_)&&[3,6,9,12].includes(_.length))){const N=_.length/3,C=[0,0,0];for(let y=0;y<3;++y){const c=parseInt(_.slice(N*y,N*y+N),16);C[y]=N===1?c<<4:N===2?c:N===3?c>>4:c>>8}return C}},a.toRgbString=function(h,_=16){const[N,C,y]=h;return`rgb:${w(N,_)}/${w(C,_)}/${w(y,_)}`}},5770:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=d(482),w=d(8742),h=d(5770),_=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(C,y){this._handlers[C]===void 0&&(this._handlers[C]=[]);const c=this._handlers[C];return c.push(y),{dispose:()=>{const p=c.indexOf(y);p!==-1&&c.splice(p,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}reset(){if(this._active.length)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(C,y){if(this.reset(),this._ident=C,this._active=this._handlers[C]||_,this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].hook(y);else this._handlerFb(this._ident,"HOOK",y)}put(C,y,c){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(C,y,c);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(C,y,c))}unhook(C,y=!0){if(this._active.length){let c=!1,p=this._active.length-1,v=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,c=y,v=this._stack.fallThrough,this._stack.paused=!1),!v&&c===!1){for(;p>=0&&(c=this._active[p].unhook(C),c!==!0);p--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!1,c;p--}for(;p>=0;p--)if(c=this._active[p].unhook(!1),c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,c}else this._handlerFb(this._ident,"UNHOOK",C);this._active=_,this._ident=0}};const N=new w.Params;N.addParam(0),a.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=N,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():N,this._data="",this._hitLimit=!1}put(C,y,c){this._hitLimit||(this._data+=(0,f.utf32ToString)(C,y,c),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let y=!1;if(this._hitLimit)y=!1;else if(C&&(y=this._handler(this._data,this._params),y instanceof Promise))return y.then(c=>(this._params=N,this._data="",this._hitLimit=!1,c));return this._params=N,this._data="",this._hitLimit=!1,y}}},2015:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=d(844),w=d(8742),h=d(6242),_=d(6351);class N{constructor(p){this.table=new Uint8Array(p)}setDefault(p,v){this.table.fill(p<<4|v)}add(p,v,g,E){this.table[v<<8|p]=g<<4|E}addMany(p,v,g,E){for(let R=0;R<p.length;R++)this.table[v<<8|p[R]]=g<<4|E}}a.TransitionTable=N;const C=160;a.VT500_TRANSITION_TABLE=function(){const c=new N(4095),p=Array.apply(null,Array(256)).map((A,k)=>k),v=(A,k)=>p.slice(A,k),g=v(32,127),E=v(0,24);E.push(25),E.push.apply(E,v(28,32));const R=v(0,14);let j;for(j in c.setDefault(1,0),c.addMany(g,0,2,0),R)c.addMany([24,26,153,154],j,3,0),c.addMany(v(128,144),j,3,0),c.addMany(v(144,152),j,3,0),c.add(156,j,0,0),c.add(27,j,11,1),c.add(157,j,4,8),c.addMany([152,158,159],j,0,7),c.add(155,j,11,3),c.add(144,j,11,9);return c.addMany(E,0,3,0),c.addMany(E,1,3,1),c.add(127,1,0,1),c.addMany(E,8,0,8),c.addMany(E,3,3,3),c.add(127,3,0,3),c.addMany(E,4,3,4),c.add(127,4,0,4),c.addMany(E,6,3,6),c.addMany(E,5,3,5),c.add(127,5,0,5),c.addMany(E,2,3,2),c.add(127,2,0,2),c.add(93,1,4,8),c.addMany(g,8,5,8),c.add(127,8,5,8),c.addMany([156,27,24,26,7],8,6,0),c.addMany(v(28,32),8,0,8),c.addMany([88,94,95],1,0,7),c.addMany(g,7,0,7),c.addMany(E,7,0,7),c.add(156,7,0,0),c.add(127,7,0,7),c.add(91,1,11,3),c.addMany(v(64,127),3,7,0),c.addMany(v(48,60),3,8,4),c.addMany([60,61,62,63],3,9,4),c.addMany(v(48,60),4,8,4),c.addMany(v(64,127),4,7,0),c.addMany([60,61,62,63],4,0,6),c.addMany(v(32,64),6,0,6),c.add(127,6,0,6),c.addMany(v(64,127),6,0,0),c.addMany(v(32,48),3,9,5),c.addMany(v(32,48),5,9,5),c.addMany(v(48,64),5,0,6),c.addMany(v(64,127),5,7,0),c.addMany(v(32,48),4,9,5),c.addMany(v(32,48),1,9,2),c.addMany(v(32,48),2,9,2),c.addMany(v(48,127),2,10,0),c.addMany(v(48,80),1,10,0),c.addMany(v(81,88),1,10,0),c.addMany([89,90,92],1,10,0),c.addMany(v(96,127),1,10,0),c.add(80,1,11,9),c.addMany(E,9,0,9),c.add(127,9,0,9),c.addMany(v(28,32),9,0,9),c.addMany(v(32,48),9,9,12),c.addMany(v(48,60),9,8,10),c.addMany([60,61,62,63],9,9,10),c.addMany(E,11,0,11),c.addMany(v(32,128),11,0,11),c.addMany(v(28,32),11,0,11),c.addMany(E,10,0,10),c.add(127,10,0,10),c.addMany(v(28,32),10,0,10),c.addMany(v(48,60),10,8,10),c.addMany([60,61,62,63],10,0,11),c.addMany(v(32,48),10,9,12),c.addMany(E,12,0,12),c.add(127,12,0,12),c.addMany(v(28,32),12,0,12),c.addMany(v(32,48),12,9,12),c.addMany(v(48,64),12,0,11),c.addMany(v(64,127),12,12,13),c.addMany(v(64,127),10,12,13),c.addMany(v(64,127),9,12,13),c.addMany(E,13,13,13),c.addMany(g,13,13,13),c.add(127,13,0,13),c.addMany([27,156,24,26],13,14,0),c.add(C,0,2,0),c.add(C,8,5,8),c.add(C,6,0,6),c.add(C,11,0,11),c.add(C,13,13,13),c}();class y extends f.Disposable{constructor(p=a.VT500_TRANSITION_TABLE){super(),this._transitions=p,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new w.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(v,g,E)=>{},this._executeHandlerFb=v=>{},this._csiHandlerFb=(v,g)=>{},this._escHandlerFb=v=>{},this._errorHandlerFb=v=>v,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(p,v=[64,126]){let g=0;if(p.prefix){if(p.prefix.length>1)throw new Error("only one byte as prefix supported");if(g=p.prefix.charCodeAt(0),g&&60>g||g>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(p.intermediates){if(p.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<p.intermediates.length;++R){const j=p.intermediates.charCodeAt(R);if(32>j||j>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");g<<=8,g|=j}}if(p.final.length!==1)throw new Error("final must be a single byte");const E=p.final.charCodeAt(0);if(v[0]>E||E>v[1])throw new Error(`final must be in range ${v[0]} .. ${v[1]}`);return g<<=8,g|=E,g}identToString(p){const v=[];for(;p;)v.push(String.fromCharCode(255&p)),p>>=8;return v.reverse().join("")}setPrintHandler(p){this._printHandler=p}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(p,v){const g=this._identifier(p,[48,126]);this._escHandlers[g]===void 0&&(this._escHandlers[g]=[]);const E=this._escHandlers[g];return E.push(v),{dispose:()=>{const R=E.indexOf(v);R!==-1&&E.splice(R,1)}}}clearEscHandler(p){this._escHandlers[this._identifier(p,[48,126])]&&delete this._escHandlers[this._identifier(p,[48,126])]}setEscHandlerFallback(p){this._escHandlerFb=p}setExecuteHandler(p,v){this._executeHandlers[p.charCodeAt(0)]=v}clearExecuteHandler(p){this._executeHandlers[p.charCodeAt(0)]&&delete this._executeHandlers[p.charCodeAt(0)]}setExecuteHandlerFallback(p){this._executeHandlerFb=p}registerCsiHandler(p,v){const g=this._identifier(p);this._csiHandlers[g]===void 0&&(this._csiHandlers[g]=[]);const E=this._csiHandlers[g];return E.push(v),{dispose:()=>{const R=E.indexOf(v);R!==-1&&E.splice(R,1)}}}clearCsiHandler(p){this._csiHandlers[this._identifier(p)]&&delete this._csiHandlers[this._identifier(p)]}setCsiHandlerFallback(p){this._csiHandlerFb=p}registerDcsHandler(p,v){return this._dcsParser.registerHandler(this._identifier(p),v)}clearDcsHandler(p){this._dcsParser.clearHandler(this._identifier(p))}setDcsHandlerFallback(p){this._dcsParser.setHandlerFallback(p)}registerOscHandler(p,v){return this._oscParser.registerHandler(p,v)}clearOscHandler(p){this._oscParser.clearHandler(p)}setOscHandlerFallback(p){this._oscParser.setHandlerFallback(p)}setErrorHandler(p){this._errorHandler=p}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(p,v,g,E,R){this._parseStack.state=p,this._parseStack.handlers=v,this._parseStack.handlerPos=g,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(p,v,g){let E,R=0,j=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(g===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const k=this._parseStack.handlers;let L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(g===!1&&L>-1){for(;L>=0&&(E=k[L](this._params),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 4:if(g===!1&&L>-1){for(;L>=0&&(E=k[L](),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 6:if(R=p[this._parseStack.chunkPos],E=this._dcsParser.unhook(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=p[this._parseStack.chunkPos],E=this._oscParser.end(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let k=A;k<v;++k){switch(R=p[k],j=this._transitions.table[this.currentState<<8|(R<160?R:C)],j>>4){case 2:for(let B=k+1;;++B){if(B>=v||(R=p[B])<32||R>126&&R<C){this._printHandler(p,k,B),k=B-1;break}if(++B>=v||(R=p[B])<32||R>126&&R<C){this._printHandler(p,k,B),k=B-1;break}if(++B>=v||(R=p[B])<32||R>126&&R<C){this._printHandler(p,k,B),k=B-1;break}if(++B>=v||(R=p[B])<32||R>126&&R<C){this._printHandler(p,k,B),k=B-1;break}}break;case 3:this._executeHandlers[R]?this._executeHandlers[R]():this._executeHandlerFb(R),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:k,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|R];let O=L?L.length-1:-1;for(;O>=0&&(E=L[O](this._params),E!==!0);O--)if(E instanceof Promise)return this._preserveStack(3,L,O,j,k),E;O<0&&this._csiHandlerFb(this._collect<<8|R,this._params),this.precedingJoinState=0;break;case 8:do switch(R){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(R-48)}while(++k<v&&(R=p[k])>47&&R<60);k--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const H=this._escHandlers[this._collect<<8|R];let V=H?H.length-1:-1;for(;V>=0&&(E=H[V](),E!==!0);V--)if(E instanceof Promise)return this._preserveStack(4,H,V,j,k),E;V<0&&this._escHandlerFb(this._collect<<8|R),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|R,this._params);break;case 13:for(let B=k+1;;++B)if(B>=v||(R=p[B])===24||R===26||R===27||R>127&&R<C){this._dcsParser.put(p,k,B),k=B-1;break}break;case 14:if(E=this._dcsParser.unhook(R!==24&&R!==26),E)return this._preserveStack(6,[],0,j,k),E;R===27&&(j|=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 B=k+1;;B++)if(B>=v||(R=p[B])<32||R>127&&R<C){this._oscParser.put(p,k,B),k=B-1;break}break;case 6:if(E=this._oscParser.end(R!==24&&R!==26),E)return this._preserveStack(5,[],0,j,k),E;R===27&&(j|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&j}}}a.EscapeSequenceParser=y},6242:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=d(5770),w=d(482),h=[];a.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,N){this._handlers[_]===void 0&&(this._handlers[_]=[]);const C=this._handlers[_];return C.push(N),{dispose:()=>{const y=C.indexOf(N);y!==-1&&C.splice(y,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,N,C){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(_,N,C);else this._handlerFb(this._id,"PUT",(0,w.utf32ToString)(_,N,C))}start(){this.reset(),this._state=1}put(_,N,C){if(this._state!==3){if(this._state===1)for(;N<C;){const y=_[N++];if(y===59){this._state=2,this._start();break}if(y<48||57<y)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+y-48}this._state===2&&C-N>0&&this._put(_,N,C)}}end(_,N=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,y=this._active.length-1,c=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,C=N,c=this._stack.fallThrough,this._stack.paused=!1),!c&&C===!1){for(;y>=0&&(C=this._active[y].end(_),C!==!0);y--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,C;y--}for(;y>=0;y--)if(C=this._active[y].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",_);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,N,C){this._hitLimit||(this._data+=(0,w.utf32ToString)(_,N,C),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let N=!1;if(this._hitLimit)N=!1;else if(_&&(N=this._handler(this._data),N instanceof Promise))return N.then(C=>(this._data="",this._hitLimit=!1,C));return this._data="",this._hitLimit=!1,N}}},8742:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const d=2147483647;class f{static fromArray(h){const _=new f;if(!h.length)return _;for(let N=Array.isArray(h[0])?1:0;N<h.length;++N){const C=h[N];if(Array.isArray(C))for(let y=0;y<C.length;++y)_.addSubParam(C[y]);else _.addParam(C)}return _}constructor(h=32,_=32){if(this.maxLength=h,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new f(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let _=0;_<this.length;++_){h.push(this.params[_]);const N=this._subParamsIdx[_]>>8,C=255&this._subParamsIdx[_];C-N>0&&h.push(Array.prototype.slice.call(this._subParams,N,C))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>d?d:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>d?d:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const _=this._subParamsIdx[h]>>8,N=255&this._subParamsIdx[h];return N-_>0?this._subParams.subarray(_,N):null}getSubParamsAll(){const h={};for(let _=0;_<this.length;++_){const N=this._subParamsIdx[_]>>8,C=255&this._subParamsIdx[_];C-N>0&&(h[_]=this._subParams.slice(N,C))}return h}addDigit(h){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const N=this._digitIsSub?this._subParams:this.params,C=N[_-1];N[_-1]=~C?Math.min(10*C+h,d):h}}a.Params=f},5741:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,f){const w={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(w),f.dispose=()=>this._wrappedAddonDispose(w),f.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let f=-1;for(let w=0;w<this._addons.length;w++)if(this._addons[w]===d){f=w;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(f,1)}}},8771:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=d(3785),w=d(511);a.BufferApiView=class{constructor(h,_){this._buffer=h,this.type=_}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const _=this._buffer.lines.get(h);if(_)return new f.BufferLineApiView(_)}getNullCell(){return new w.CellData}}},3785:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=d(511);a.BufferLineApiView=class{constructor(w){this._line=w}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(w,h){if(!(w<0||w>=this._line.length))return h?(this._line.loadCell(w,h),h):this._line.loadCell(w,new f.CellData)}translateToString(w,h,_){return this._line.translateToString(w,h,_)}}},8285:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=d(8771),w=d(8460),h=d(844);class _ extends h.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new w.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=_},7975:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,f){return this._core.registerCsiHandler(d,w=>f(w.toArray()))}addCsiHandler(d,f){return this.registerCsiHandler(d,f)}registerDcsHandler(d,f){return this._core.registerDcsHandler(d,(w,h)=>f(w,h.toArray()))}addDcsHandler(d,f){return this.registerDcsHandler(d,f)}registerEscHandler(d,f){return this._core.registerEscHandler(d,f)}addEscHandler(d,f){return this.registerEscHandler(d,f)}registerOscHandler(d,f){return this._core.registerOscHandler(d,f)}addOscHandler(d,f){return this.registerOscHandler(d,f)}}},7090:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(b,a,d){var f=this&&this.__decorate||function(c,p,v,g){var E,R=arguments.length,j=R<3?p:g===null?g=Object.getOwnPropertyDescriptor(p,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(c,p,v,g);else for(var A=c.length-1;A>=0;A--)(E=c[A])&&(j=(R<3?E(j):R>3?E(p,v,j):E(p,v))||j);return R>3&&j&&Object.defineProperty(p,v,j),j},w=this&&this.__param||function(c,p){return function(v,g){p(v,g,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=d(8460),_=d(844),N=d(5295),C=d(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let y=a.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(c){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(c.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(c.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new N.BufferSet(c,this))}resize(c,p){this.cols=c,this.rows=p,this.buffers.resize(c,p),this._onResize.fire({cols:c,rows:p})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(c,p=!1){const v=this.buffer;let g;g=this._cachedBlankLine,g&&g.length===this.cols&&g.getFg(0)===c.fg&&g.getBg(0)===c.bg||(g=v.getBlankLine(c,p),this._cachedBlankLine=g),g.isWrapped=p;const E=v.ybase+v.scrollTop,R=v.ybase+v.scrollBottom;if(v.scrollTop===0){const j=v.lines.isFull;R===v.lines.length-1?j?v.lines.recycle().copyFrom(g):v.lines.push(g.clone()):v.lines.splice(R+1,0,g.clone()),j?this.isUserScrolling&&(v.ydisp=Math.max(v.ydisp-1,0)):(v.ybase++,this.isUserScrolling||v.ydisp++)}else{const j=R-E+1;v.lines.shiftElements(E+1,j-1,-1),v.lines.set(R,g.clone())}this.isUserScrolling||(v.ydisp=v.ybase),this._onScroll.fire(v.ydisp)}scrollLines(c,p,v){const g=this.buffer;if(c<0){if(g.ydisp===0)return;this.isUserScrolling=!0}else c+g.ydisp>=g.ybase&&(this.isUserScrolling=!1);const E=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+c,g.ybase),0),E!==g.ydisp&&(p||this._onScroll.fire(g.ydisp))}};a.BufferService=y=f([w(0,C.IOptionsService)],y)},7994:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,f){this._charsets[d]=f,this.glevel===d&&(this.charset=f)}}},1753:function(b,a,d){var f=this&&this.__decorate||function(g,E,R,j){var A,k=arguments.length,L=k<3?E:j===null?j=Object.getOwnPropertyDescriptor(E,R):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(g,E,R,j);else for(var O=g.length-1;O>=0;O--)(A=g[O])&&(L=(k<3?A(L):k>3?A(E,R,L):A(E,R))||L);return k>3&&L&&Object.defineProperty(E,R,L),L},w=this&&this.__param||function(g,E){return function(R,j){E(R,j,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const h=d(2585),_=d(8460),N=d(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:g=>g.button!==4&&g.action===1&&(g.ctrl=!1,g.alt=!1,g.shift=!1,!0)},VT200:{events:19,restrict:g=>g.action!==32},DRAG:{events:23,restrict:g=>g.action!==32||g.button!==3},ANY:{events:31,restrict:g=>!0}};function y(g,E){let R=(g.ctrl?16:0)|(g.shift?4:0)|(g.alt?8:0);return g.button===4?(R|=64,R|=g.action):(R|=3&g.button,4&g.button&&(R|=64),8&g.button&&(R|=128),g.action===32?R|=32:g.action!==0||E||(R|=3)),R}const c=String.fromCharCode,p={DEFAULT:g=>{const E=[y(g,!1)+32,g.col+32,g.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${c(E[0])}${c(E[1])}${c(E[2])}`},SGR:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${y(g,!0)};${g.col};${g.row}${E}`},SGR_PIXELS:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${y(g,!0)};${g.x};${g.y}${E}`}};let v=a.CoreMouseService=class extends N.Disposable{constructor(g,E){super(),this._bufferService=g,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(C))this.addProtocol(R,C[R]);for(const R of Object.keys(p))this.addEncoding(R,p[R]);this.reset()}addProtocol(g,E){this._protocols[g]=E}addEncoding(g,E){this._encodings[g]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(g){if(!this._protocols[g])throw new Error(`unknown protocol "${g}"`);this._activeProtocol=g,this._onProtocolChange.fire(this._protocols[g].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(g){if(!this._encodings[g])throw new Error(`unknown encoding "${g}"`);this._activeEncoding=g}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(g){if(g.col<0||g.col>=this._bufferService.cols||g.row<0||g.row>=this._bufferService.rows||g.button===4&&g.action===32||g.button===3&&g.action!==32||g.button!==4&&(g.action===2||g.action===3)||(g.col++,g.row++,g.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,g,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(g))return!1;const E=this._encodings[this._activeEncoding](g);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=g,!0}explainEvents(g){return{down:!!(1&g),up:!!(2&g),drag:!!(4&g),move:!!(8&g),wheel:!!(16&g)}}_equalEvents(g,E,R){if(R){if(g.x!==E.x||g.y!==E.y)return!1}else if(g.col!==E.col||g.row!==E.row)return!1;return g.button===E.button&&g.action===E.action&&g.ctrl===E.ctrl&&g.alt===E.alt&&g.shift===E.shift}};a.CoreMouseService=v=f([w(0,h.IBufferService),w(1,h.ICoreService)],v)},6975:function(b,a,d){var f=this&&this.__decorate||function(v,g,E,R){var j,A=arguments.length,k=A<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,g,E,R);else for(var L=v.length-1;L>=0;L--)(j=v[L])&&(k=(A<3?j(k):A>3?j(g,E,k):j(g,E))||k);return A>3&&k&&Object.defineProperty(g,E,k),k},w=this&&this.__param||function(v,g){return function(E,R){g(E,R,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const h=d(1439),_=d(8460),N=d(844),C=d(2585),y=Object.freeze({insertMode:!1}),c=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let p=a.CoreService=class extends N.Disposable{constructor(v,g,E){super(),this._bufferService=v,this._logService=g,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(y),this.decPrivateModes=(0,h.clone)(c)}reset(){this.modes=(0,h.clone)(y),this.decPrivateModes=(0,h.clone)(c)}triggerDataEvent(v,g=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;g&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),g&&this._onUserInput.fire(),this._logService.debug(`sending data "${v}"`,()=>v.split("").map(R=>R.charCodeAt(0))),this._onData.fire(v)}triggerBinaryEvent(v){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${v}"`,()=>v.split("").map(g=>g.charCodeAt(0))),this._onBinary.fire(v))}};a.CoreService=p=f([w(0,C.IBufferService),w(1,C.ILogService),w(2,C.IOptionsService)],p)},9074:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=d(8055),w=d(8460),h=d(844),_=d(6106);let N=0,C=0;class y extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList(v=>v==null?void 0:v.marker.line),this._onDecorationRegistered=this.register(new w.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new w.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)(()=>this.reset()))}registerDecoration(v){if(v.marker.isDisposed)return;const g=new c(v);if(g){const E=g.marker.onDispose(()=>g.dispose());g.onDispose(()=>{g&&(this._decorations.delete(g)&&this._onDecorationRemoved.fire(g),E.dispose())}),this._decorations.insert(g),this._onDecorationRegistered.fire(g)}return g}reset(){for(const v of this._decorations.values())v.dispose();this._decorations.clear()}*getDecorationsAtCell(v,g,E){let R=0,j=0;for(const A of this._decorations.getKeyIterator(g))R=A.options.x??0,j=R+(A.options.width??1),v>=R&&v<j&&(!E||(A.options.layer??"bottom")===E)&&(yield A)}forEachDecorationAtCell(v,g,E,R){this._decorations.forEachByKey(g,j=>{N=j.options.x??0,C=N+(j.options.width??1),v>=N&&v<C&&(!E||(j.options.layer??"bottom")===E)&&R(j)})}}a.DecorationService=y;class c extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(v){super(),this.options=v,this.onRenderEmitter=this.register(new w.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new w.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=v.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=d(2585),w=d(8343);class h{constructor(...N){this._entries=new Map;for(const[C,y]of N)this.set(C,y)}set(N,C){const y=this._entries.get(N);return this._entries.set(N,C),y}forEach(N){for(const[C,y]of this._entries.entries())N(C,y)}has(N){return this._entries.has(N)}get(N){return this._entries.get(N)}}a.ServiceCollection=h,a.InstantiationService=class{constructor(){this._services=new h,this._services.set(f.IInstantiationService,this)}setService(_,N){this._services.set(_,N)}getService(_){return this._services.get(_)}createInstance(_,...N){const C=(0,w.getServiceDependencies)(_).sort((p,v)=>p.index-v.index),y=[];for(const p of C){const v=this._services.get(p.id);if(!v)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${p.id}.`);y.push(v)}const c=C.length>0?C[0].index:N.length;if(N.length!==c)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${c+1} conflicts with ${N.length} static arguments`);return new _(...N,...y)}}},7866:function(b,a,d){var f=this&&this.__decorate||function(c,p,v,g){var E,R=arguments.length,j=R<3?p:g===null?g=Object.getOwnPropertyDescriptor(p,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(c,p,v,g);else for(var A=c.length-1;A>=0;A--)(E=c[A])&&(j=(R<3?E(j):R>3?E(p,v,j):E(p,v))||j);return R>3&&j&&Object.defineProperty(p,v,j),j},w=this&&this.__param||function(c,p){return function(v,g){p(v,g,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=d(844),_=d(2585),N={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let C,y=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=N[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let p=0;p<c.length;p++)typeof c[p]=="function"&&(c[p]=c[p]())}_log(c,p,v){this._evalLazyOptionalParams(v),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+p,...v)}trace(c,...p){var v;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.trace.bind(this._optionsService.options.logger))??console.log,c,p)}debug(c,...p){var v;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.debug.bind(this._optionsService.options.logger))??console.log,c,p)}info(c,...p){var v;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.info.bind(this._optionsService.options.logger))??console.info,c,p)}warn(c,...p){var v;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.warn.bind(this._optionsService.options.logger))??console.warn,c,p)}error(c,...p){var v;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.error.bind(this._optionsService.options.logger))??console.error,c,p)}};a.LogService=y=f([w(0,_.IOptionsService)],y),a.setTraceLogger=function(c){C=c},a.traceCall=function(c,p,v){if(typeof v.value!="function")throw new Error("not supported");const g=v.value;v.value=function(...E){if(C.logLevel!==_.LogLevelEnum.TRACE)return g.apply(this,E);C.trace(`GlyphRenderer#${g.name}(${E.map(j=>JSON.stringify(j)).join(", ")})`);const R=g.apply(this,E);return C.trace(`GlyphRenderer#${g.name} return`,R),R}}},7302:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=d(8460),w=d(844),h=d(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class N extends w.Disposable{constructor(y){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const c={...a.DEFAULT_OPTIONS};for(const p in y)if(p in c)try{const v=y[p];c[p]=this._sanitizeAndValidateOption(p,v)}catch(v){console.error(v)}this.rawOptions=c,this.options={...c},this._setupOptions(),this.register((0,w.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(y,c){return this.onOptionChange(p=>{p===y&&c(this.rawOptions[y])})}onMultipleOptionChange(y,c){return this.onOptionChange(p=>{y.indexOf(p)!==-1&&c()})}_setupOptions(){const y=p=>{if(!(p in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);return this.rawOptions[p]},c=(p,v)=>{if(!(p in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);v=this._sanitizeAndValidateOption(p,v),this.rawOptions[p]!==v&&(this.rawOptions[p]=v,this._onOptionChange.fire(p))};for(const p in this.rawOptions){const v={get:y.bind(this,p),set:c.bind(this,p)};Object.defineProperty(this.options,p,v)}}_sanitizeAndValidateOption(y,c){switch(y){case"cursorStyle":if(c||(c=a.DEFAULT_OPTIONS[y]),!function(p){return p==="block"||p==="underline"||p==="bar"}(c))throw new Error(`"${c}" is not a valid value for ${y}`);break;case"wordSeparator":c||(c=a.DEFAULT_OPTIONS[y]);break;case"fontWeight":case"fontWeightBold":if(typeof c=="number"&&1<=c&&c<=1e3)break;c=_.includes(c)?c:a.DEFAULT_OPTIONS[y];break;case"cursorWidth":c=Math.floor(c);case"lineHeight":case"tabStopWidth":if(c<1)throw new Error(`${y} cannot be less than 1, value: ${c}`);break;case"minimumContrastRatio":c=Math.max(1,Math.min(21,Math.round(10*c)/10));break;case"scrollback":if((c=Math.min(c,4294967295))<0)throw new Error(`${y} cannot be less than 0, value: ${c}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(c<=0)throw new Error(`${y} cannot be less than or equal to 0, value: ${c}`);break;case"rows":case"cols":if(!c&&c!==0)throw new Error(`${y} must be numeric, value: ${c}`);break;case"windowsPty":c=c??{}}return c}}a.OptionsService=N},2660:function(b,a,d){var f=this&&this.__decorate||function(N,C,y,c){var p,v=arguments.length,g=v<3?C:c===null?c=Object.getOwnPropertyDescriptor(C,y):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(N,C,y,c);else for(var E=N.length-1;E>=0;E--)(p=N[E])&&(g=(v<3?p(g):v>3?p(C,y,g):p(C,y))||g);return v>3&&g&&Object.defineProperty(C,y,g),g},w=this&&this.__param||function(N,C){return function(y,c){C(y,c,N)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const h=d(2585);let _=a.OscLinkService=class{constructor(N){this._bufferService=N,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(N){const C=this._bufferService.buffer;if(N.id===void 0){const E=C.addMarker(C.ybase+C.y),R={data:N,id:this._nextId++,lines:[E]};return E.onDispose(()=>this._removeMarkerFromLink(R,E)),this._dataByLinkId.set(R.id,R),R.id}const y=N,c=this._getEntryIdKey(y),p=this._entriesWithId.get(c);if(p)return this.addLineToLink(p.id,C.ybase+C.y),p.id;const v=C.addMarker(C.ybase+C.y),g={id:this._nextId++,key:this._getEntryIdKey(y),data:y,lines:[v]};return v.onDispose(()=>this._removeMarkerFromLink(g,v)),this._entriesWithId.set(g.key,g),this._dataByLinkId.set(g.id,g),g.id}addLineToLink(N,C){const y=this._dataByLinkId.get(N);if(y&&y.lines.every(c=>c.line!==C)){const c=this._bufferService.buffer.addMarker(C);y.lines.push(c),c.onDispose(()=>this._removeMarkerFromLink(y,c))}}getLinkData(N){var C;return(C=this._dataByLinkId.get(N))==null?void 0:C.data}_getEntryIdKey(N){return`${N.id};;${N.uri}`}_removeMarkerFromLink(N,C){const y=N.lines.indexOf(C);y!==-1&&(N.lines.splice(y,1),N.lines.length===0&&(N.data.id!==void 0&&this._entriesWithId.delete(N.key),this._dataByLinkId.delete(N.id)))}};a.OscLinkService=_=f([w(0,h.IBufferService)],_)},8343:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(w){return w[f]||[]},a.createDecorator=function(w){if(a.serviceRegistry.has(w))return a.serviceRegistry.get(w);const h=function(_,N,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(y,c,p){c[d]===c?c[f].push({id:y,index:p}):(c[f]=[{id:y,index:p}],c[d]=c)})(h,_,C)};return h.toString=()=>w,a.serviceRegistry.set(w,h),h}},2585:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=d(8343);var w;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"}(w||(a.LogLevelEnum=w={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=d(8460),w=d(225);class h{static extractShouldJoin(N){return(1&N)!=0}static extractWidth(N){return N>>1&3}static extractCharKind(N){return N>>3}static createPropertyValue(N,C,y=!1){return(16777215&N)<<3|(3&C)<<1|(y?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const N=new w.UnicodeV6;this.register(N),this._active=N.version,this._activeProvider=N}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(N){if(!this._providers[N])throw new Error(`unknown Unicode version "${N}"`);this._active=N,this._activeProvider=this._providers[N],this._onChange.fire(N)}register(N){this._providers[N.version]=N}wcwidth(N){return this._activeProvider.wcwidth(N)}getStringCellWidth(N){let C=0,y=0;const c=N.length;for(let p=0;p<c;++p){let v=N.charCodeAt(p);if(55296<=v&&v<=56319){if(++p>=c)return C+this.wcwidth(v);const R=N.charCodeAt(p);56320<=R&&R<=57343?v=1024*(v-55296)+R-56320+65536:C+=this.wcwidth(R)}const g=this.charProperties(v,y);let E=h.extractWidth(g);h.extractShouldJoin(g)&&(E-=h.extractWidth(y)),C+=E,y=g}return C}charProperties(N,C){return this._activeProvider.charProperties(N,C)}}a.UnicodeService=h}},m={};function S(b){var a=m[b];if(a!==void 0)return a.exports;var d=m[b]={exports:{}};return l[b].call(d.exports,d,d.exports,S),d.exports}var D={};return(()=>{var b=D;Object.defineProperty(b,"__esModule",{value:!0}),b.Terminal=void 0;const a=S(9042),d=S(3236),f=S(844),w=S(5741),h=S(8285),_=S(7975),N=S(7090),C=["cols","rows"];class y extends f.Disposable{constructor(p){super(),this._core=this.register(new d.Terminal(p)),this._addonManager=this.register(new w.AddonManager),this._publicOptions={...this._core.options};const v=E=>this._core.options[E],g=(E,R)=>{this._checkReadonlyOptions(E),this._core.options[E]=R};for(const E in this._core.options){const R={get:v.bind(this,E),set:g.bind(this,E)};Object.defineProperty(this._publicOptions,E,R)}}_checkReadonlyOptions(p){if(C.includes(p))throw new Error(`Option "${p}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new _.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new N.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const p=this._core.coreService.decPrivateModes;let v="none";switch(this._core.coreMouseService.activeProtocol){case"X10":v="x10";break;case"VT200":v="vt200";break;case"DRAG":v="drag";break;case"ANY":v="any"}return{applicationCursorKeysMode:p.applicationCursorKeys,applicationKeypadMode:p.applicationKeypad,bracketedPasteMode:p.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:v,originMode:p.origin,reverseWraparoundMode:p.reverseWraparound,sendFocusMode:p.sendFocus,wraparoundMode:p.wraparound}}get options(){return this._publicOptions}set options(p){for(const v in p)this._publicOptions[v]=p[v]}blur(){this._core.blur()}focus(){this._core.focus()}input(p,v=!0){this._core.input(p,v)}resize(p,v){this._verifyIntegers(p,v),this._core.resize(p,v)}open(p){this._core.open(p)}attachCustomKeyEventHandler(p){this._core.attachCustomKeyEventHandler(p)}attachCustomWheelEventHandler(p){this._core.attachCustomWheelEventHandler(p)}registerLinkProvider(p){return this._core.registerLinkProvider(p)}registerCharacterJoiner(p){return this._checkProposedApi(),this._core.registerCharacterJoiner(p)}deregisterCharacterJoiner(p){this._checkProposedApi(),this._core.deregisterCharacterJoiner(p)}registerMarker(p=0){return this._verifyIntegers(p),this._core.registerMarker(p)}registerDecoration(p){return this._checkProposedApi(),this._verifyPositiveIntegers(p.x??0,p.width??0,p.height??0),this._core.registerDecoration(p)}hasSelection(){return this._core.hasSelection()}select(p,v,g){this._verifyIntegers(p,v,g),this._core.select(p,v,g)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(p,v){this._verifyIntegers(p,v),this._core.selectLines(p,v)}dispose(){super.dispose()}scrollLines(p){this._verifyIntegers(p),this._core.scrollLines(p)}scrollPages(p){this._verifyIntegers(p),this._core.scrollPages(p)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(p){this._verifyIntegers(p),this._core.scrollToLine(p)}clear(){this._core.clear()}write(p,v){this._core.write(p,v)}writeln(p,v){this._core.write(p),this._core.write(`\r
|
|
214
|
+
`,v)}paste(p){this._core.paste(p)}refresh(p,v){this._verifyIntegers(p,v),this._core.refresh(p,v)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(p){this._addonManager.loadAddon(this,p)}static get strings(){return a}_verifyIntegers(...p){for(const v of p)if(v===1/0||isNaN(v)||v%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...p){for(const v of p)if(v&&(v===1/0||isNaN(v)||v%1!=0||v<0))throw new Error("This API only accepts positive integers")}}b.Terminal=y})(),D})())})(UE);var m2=UE.exports,VE={exports:{}};(function(i,s){(function(l,m){i.exports=m()})(self,()=>(()=>{var l={965:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const f=d(374),w=d(509),h=d(855),_=d(859),N=d(381),C=11,y=C*Float32Array.BYTES_PER_ELEMENT;let c,p=0,v=0,g=0;class E extends _.Disposable{constructor(j,A,k,L){super(),this._terminal=j,this._gl=A,this._dimensions=k,this._optionsService=L,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const O=this._gl;w.TextureAtlas.maxAtlasPages===void 0&&(w.TextureAtlas.maxAtlasPages=Math.min(32,(0,f.throwIfFalsy)(O.getParameter(O.MAX_TEXTURE_IMAGE_UNITS))),w.TextureAtlas.maxTextureSize=(0,f.throwIfFalsy)(O.getParameter(O.MAX_TEXTURE_SIZE))),this._program=(0,f.throwIfFalsy)((0,N.createProgram)(O,`#version 300 es
|
|
215
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
216
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
217
|
+
layout (location = 2) in vec2 a_offset;
|
|
218
|
+
layout (location = 3) in vec2 a_size;
|
|
219
|
+
layout (location = 4) in float a_texpage;
|
|
220
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
221
|
+
layout (location = 6) in vec2 a_texsize;
|
|
222
|
+
|
|
223
|
+
uniform mat4 u_projection;
|
|
224
|
+
uniform vec2 u_resolution;
|
|
225
|
+
|
|
226
|
+
out vec2 v_texcoord;
|
|
227
|
+
flat out int v_texpage;
|
|
228
|
+
|
|
229
|
+
void main() {
|
|
230
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
231
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
232
|
+
v_texpage = int(a_texpage);
|
|
233
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
234
|
+
}`,function(Y){let J="";for(let ee=1;ee<Y;ee++)J+=` else if (v_texpage == ${ee}) { outColor = texture(u_texture[${ee}], v_texcoord); }`;return`#version 300 es
|
|
235
|
+
precision lowp float;
|
|
236
|
+
|
|
237
|
+
in vec2 v_texcoord;
|
|
238
|
+
flat in int v_texpage;
|
|
239
|
+
|
|
240
|
+
uniform sampler2D u_texture[${Y}];
|
|
241
|
+
|
|
242
|
+
out vec4 outColor;
|
|
243
|
+
|
|
244
|
+
void main() {
|
|
245
|
+
if (v_texpage == 0) {
|
|
246
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
247
|
+
} ${J}
|
|
248
|
+
}`}(w.TextureAtlas.maxAtlasPages))),this.register((0,_.toDisposable)(()=>O.deleteProgram(this._program))),this._projectionLocation=(0,f.throwIfFalsy)(O.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,f.throwIfFalsy)(O.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,f.throwIfFalsy)(O.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=O.createVertexArray(),O.bindVertexArray(this._vertexArrayObject);const H=new Float32Array([0,0,1,0,0,1,1,1]),V=O.createBuffer();this.register((0,_.toDisposable)(()=>O.deleteBuffer(V))),O.bindBuffer(O.ARRAY_BUFFER,V),O.bufferData(O.ARRAY_BUFFER,H,O.STATIC_DRAW),O.enableVertexAttribArray(0),O.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const B=new Uint8Array([0,1,2,3]),q=O.createBuffer();this.register((0,_.toDisposable)(()=>O.deleteBuffer(q))),O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,q),O.bufferData(O.ELEMENT_ARRAY_BUFFER,B,O.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(O.createBuffer()),this.register((0,_.toDisposable)(()=>O.deleteBuffer(this._attributesBuffer))),O.bindBuffer(O.ARRAY_BUFFER,this._attributesBuffer),O.enableVertexAttribArray(2),O.vertexAttribPointer(2,2,O.FLOAT,!1,y,0),O.vertexAttribDivisor(2,1),O.enableVertexAttribArray(3),O.vertexAttribPointer(3,2,O.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(3,1),O.enableVertexAttribArray(4),O.vertexAttribPointer(4,1,O.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(4,1),O.enableVertexAttribArray(5),O.vertexAttribPointer(5,2,O.FLOAT,!1,y,5*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(5,1),O.enableVertexAttribArray(6),O.vertexAttribPointer(6,2,O.FLOAT,!1,y,7*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(6,1),O.enableVertexAttribArray(1),O.vertexAttribPointer(1,2,O.FLOAT,!1,y,9*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(1,1),O.useProgram(this._program);const ne=new Int32Array(w.TextureAtlas.maxAtlasPages);for(let Y=0;Y<w.TextureAtlas.maxAtlasPages;Y++)ne[Y]=Y;O.uniform1iv(this._textureLocation,ne),O.uniformMatrix4fv(this._projectionLocation,!1,N.PROJECTION_MATRIX),this._atlasTextures=[];for(let Y=0;Y<w.TextureAtlas.maxAtlasPages;Y++){const J=new N.GLTexture((0,f.throwIfFalsy)(O.createTexture()));this.register((0,_.toDisposable)(()=>O.deleteTexture(J.texture))),O.activeTexture(O.TEXTURE0+Y),O.bindTexture(O.TEXTURE_2D,J.texture),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,O.CLAMP_TO_EDGE),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,O.CLAMP_TO_EDGE),O.texImage2D(O.TEXTURE_2D,0,O.RGBA,1,1,0,O.RGBA,O.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[Y]=J}O.enable(O.BLEND),O.blendFunc(O.SRC_ALPHA,O.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(j,A,k,L,O,H,V,B,q){this._updateCell(this._vertices.attributes,j,A,k,L,O,H,V,B,q)}_updateCell(j,A,k,L,O,H,V,B,q,ne){p=(k*this._terminal.cols+A)*C,L!==h.NULL_CELL_CODE&&L!==void 0?this._atlas&&(c=B&&B.length>1?this._atlas.getRasterizedGlyphCombinedChar(B,O,H,V,!1):this._atlas.getRasterizedGlyph(L,O,H,V,!1),v=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),O!==ne&&c.offset.x>v?(g=c.offset.x-v,j[p]=-(c.offset.x-g)+this._dimensions.device.char.left,j[p+1]=-c.offset.y+this._dimensions.device.char.top,j[p+2]=(c.size.x-g)/this._dimensions.device.canvas.width,j[p+3]=c.size.y/this._dimensions.device.canvas.height,j[p+4]=c.texturePage,j[p+5]=c.texturePositionClipSpace.x+g/this._atlas.pages[c.texturePage].canvas.width,j[p+6]=c.texturePositionClipSpace.y,j[p+7]=c.sizeClipSpace.x-g/this._atlas.pages[c.texturePage].canvas.width,j[p+8]=c.sizeClipSpace.y):(j[p]=-c.offset.x+this._dimensions.device.char.left,j[p+1]=-c.offset.y+this._dimensions.device.char.top,j[p+2]=c.size.x/this._dimensions.device.canvas.width,j[p+3]=c.size.y/this._dimensions.device.canvas.height,j[p+4]=c.texturePage,j[p+5]=c.texturePositionClipSpace.x,j[p+6]=c.texturePositionClipSpace.y,j[p+7]=c.sizeClipSpace.x,j[p+8]=c.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,f.allowRescaling)(L,q,c.size.x,this._dimensions.device.cell.width)&&(j[p+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):j.fill(0,p,p+C-1-2)}clear(){const j=this._terminal,A=j.cols*j.rows*C;this._vertices.count!==A?this._vertices.attributes=new Float32Array(A):this._vertices.attributes.fill(0);let k=0;for(;k<this._vertices.attributesBuffers.length;k++)this._vertices.count!==A?this._vertices.attributesBuffers[k]=new Float32Array(A):this._vertices.attributesBuffers[k].fill(0);this._vertices.count=A,k=0;for(let L=0;L<j.rows;L++)for(let O=0;O<j.cols;O++)this._vertices.attributes[k+9]=O/j.cols,this._vertices.attributes[k+10]=L/j.rows,k+=C}handleResize(){const j=this._gl;j.useProgram(this._program),j.viewport(0,0,j.canvas.width,j.canvas.height),j.uniform2f(this._resolutionLocation,j.canvas.width,j.canvas.height),this.clear()}render(j){if(!this._atlas)return;const A=this._gl;A.useProgram(this._program),A.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const k=this._vertices.attributesBuffers[this._activeBuffer];let L=0;for(let O=0;O<j.lineLengths.length;O++){const H=O*this._terminal.cols*C,V=this._vertices.attributes.subarray(H,H+j.lineLengths[O]*C);k.set(V,L),L+=V.length}A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.bufferData(A.ARRAY_BUFFER,k.subarray(0,L),A.STREAM_DRAW);for(let O=0;O<this._atlas.pages.length;O++)this._atlas.pages[O].version!==this._atlasTextures[O].version&&this._bindAtlasPageTexture(A,this._atlas,O);A.drawElementsInstanced(A.TRIANGLE_STRIP,4,A.UNSIGNED_BYTE,0,L/C)}setAtlas(j){this._atlas=j;for(const A of this._atlasTextures)A.version=-1}_bindAtlasPageTexture(j,A,k){j.activeTexture(j.TEXTURE0+k),j.bindTexture(j.TEXTURE_2D,this._atlasTextures[k].texture),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_WRAP_S,j.CLAMP_TO_EDGE),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_WRAP_T,j.CLAMP_TO_EDGE),j.texImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,A.pages[k].canvas),j.generateMipmap(j.TEXTURE_2D),this._atlasTextures[k].version=A.pages[k].version}setDimensions(j){this._dimensions=j}}a.GlyphRenderer=E},742:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const f=d(374),w=d(859),h=d(310),_=d(381),N=8*Float32Array.BYTES_PER_ELEMENT;class C{constructor(){this.attributes=new Float32Array(160),this.count=0}}let y=0,c=0,p=0,v=0,g=0,E=0,R=0;class j extends w.Disposable{constructor(k,L,O,H){super(),this._terminal=k,this._gl=L,this._dimensions=O,this._themeService=H,this._vertices=new C,this._verticesCursor=new C;const V=this._gl;this._program=(0,f.throwIfFalsy)((0,_.createProgram)(V,`#version 300 es
|
|
249
|
+
layout (location = 0) in vec2 a_position;
|
|
250
|
+
layout (location = 1) in vec2 a_size;
|
|
251
|
+
layout (location = 2) in vec4 a_color;
|
|
252
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
253
|
+
|
|
254
|
+
uniform mat4 u_projection;
|
|
255
|
+
|
|
256
|
+
out vec4 v_color;
|
|
257
|
+
|
|
258
|
+
void main() {
|
|
259
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
260
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
261
|
+
v_color = a_color;
|
|
262
|
+
}`,`#version 300 es
|
|
263
|
+
precision lowp float;
|
|
264
|
+
|
|
265
|
+
in vec4 v_color;
|
|
266
|
+
|
|
267
|
+
out vec4 outColor;
|
|
268
|
+
|
|
269
|
+
void main() {
|
|
270
|
+
outColor = v_color;
|
|
271
|
+
}`)),this.register((0,w.toDisposable)(()=>V.deleteProgram(this._program))),this._projectionLocation=(0,f.throwIfFalsy)(V.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=V.createVertexArray(),V.bindVertexArray(this._vertexArrayObject);const B=new Float32Array([0,0,1,0,0,1,1,1]),q=V.createBuffer();this.register((0,w.toDisposable)(()=>V.deleteBuffer(q))),V.bindBuffer(V.ARRAY_BUFFER,q),V.bufferData(V.ARRAY_BUFFER,B,V.STATIC_DRAW),V.enableVertexAttribArray(3),V.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const ne=new Uint8Array([0,1,2,3]),Y=V.createBuffer();this.register((0,w.toDisposable)(()=>V.deleteBuffer(Y))),V.bindBuffer(V.ELEMENT_ARRAY_BUFFER,Y),V.bufferData(V.ELEMENT_ARRAY_BUFFER,ne,V.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(V.createBuffer()),this.register((0,w.toDisposable)(()=>V.deleteBuffer(this._attributesBuffer))),V.bindBuffer(V.ARRAY_BUFFER,this._attributesBuffer),V.enableVertexAttribArray(0),V.vertexAttribPointer(0,2,V.FLOAT,!1,N,0),V.vertexAttribDivisor(0,1),V.enableVertexAttribArray(1),V.vertexAttribPointer(1,2,V.FLOAT,!1,N,2*Float32Array.BYTES_PER_ELEMENT),V.vertexAttribDivisor(1,1),V.enableVertexAttribArray(2),V.vertexAttribPointer(2,4,V.FLOAT,!1,N,4*Float32Array.BYTES_PER_ELEMENT),V.vertexAttribDivisor(2,1),this._updateCachedColors(H.colors),this.register(this._themeService.onChangeColors(J=>{this._updateCachedColors(J),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(k){const L=this._gl;L.useProgram(this._program),L.bindVertexArray(this._vertexArrayObject),L.uniformMatrix4fv(this._projectionLocation,!1,_.PROJECTION_MATRIX),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.bufferData(L.ARRAY_BUFFER,k.attributes,L.DYNAMIC_DRAW),L.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,L.UNSIGNED_BYTE,0,k.count)}handleResize(){this._updateViewportRectangle()}setDimensions(k){this._dimensions=k}_updateCachedColors(k){this._bgFloat=this._colorToFloat32Array(k.background),this._cursorFloat=this._colorToFloat32Array(k.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(k){const L=this._terminal,O=this._vertices;let H,V,B,q,ne,Y,J,ee,P,W,Q,K=1;for(H=0;H<L.rows;H++){for(B=-1,q=0,ne=0,Y=!1,V=0;V<L.cols;V++)J=(H*L.cols+V)*h.RENDER_MODEL_INDICIES_PER_CELL,ee=k.cells[J+h.RENDER_MODEL_BG_OFFSET],P=k.cells[J+h.RENDER_MODEL_FG_OFFSET],W=!!(67108864&P),(ee!==q||P!==ne&&(Y||W))&&((q!==0||Y&&ne!==0)&&(Q=8*K++,this._updateRectangle(O,Q,ne,q,B,V,H)),B=V,q=ee,ne=P,Y=W);(q!==0||Y&&ne!==0)&&(Q=8*K++,this._updateRectangle(O,Q,ne,q,B,L.cols,H))}O.count=K}updateCursor(k){const L=this._verticesCursor,O=k.cursor;if(!O||O.style==="block")return void(L.count=0);let H,V=0;O.style!=="bar"&&O.style!=="outline"||(H=8*V++,this._addRectangleFloat(L.attributes,H,O.x*this._dimensions.device.cell.width,O.y*this._dimensions.device.cell.height,O.style==="bar"?O.dpr*O.cursorWidth:O.dpr,this._dimensions.device.cell.height,this._cursorFloat)),O.style!=="underline"&&O.style!=="outline"||(H=8*V++,this._addRectangleFloat(L.attributes,H,O.x*this._dimensions.device.cell.width,(O.y+1)*this._dimensions.device.cell.height-O.dpr,O.width*this._dimensions.device.cell.width,O.dpr,this._cursorFloat)),O.style==="outline"&&(H=8*V++,this._addRectangleFloat(L.attributes,H,O.x*this._dimensions.device.cell.width,O.y*this._dimensions.device.cell.height,O.width*this._dimensions.device.cell.width,O.dpr,this._cursorFloat),H=8*V++,this._addRectangleFloat(L.attributes,H,(O.x+O.width)*this._dimensions.device.cell.width-O.dpr,O.y*this._dimensions.device.cell.height,O.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.count=V}_updateRectangle(k,L,O,H,V,B,q){if(67108864&O)switch(50331648&O){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&O].rgba;break;case 50331648:y=(16777215&O)<<8;break;default:y=this._themeService.colors.foreground.rgba}else switch(50331648&H){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&H].rgba;break;case 50331648:y=(16777215&H)<<8;break;default:y=this._themeService.colors.background.rgba}k.attributes.length<L+4&&(k.attributes=(0,_.expandFloat32Array)(k.attributes,this._terminal.rows*this._terminal.cols*8)),c=V*this._dimensions.device.cell.width,p=q*this._dimensions.device.cell.height,v=(y>>24&255)/255,g=(y>>16&255)/255,E=(y>>8&255)/255,R=1,this._addRectangle(k.attributes,L,c,p,(B-V)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,v,g,E,R)}_addRectangle(k,L,O,H,V,B,q,ne,Y,J){k[L]=O/this._dimensions.device.canvas.width,k[L+1]=H/this._dimensions.device.canvas.height,k[L+2]=V/this._dimensions.device.canvas.width,k[L+3]=B/this._dimensions.device.canvas.height,k[L+4]=q,k[L+5]=ne,k[L+6]=Y,k[L+7]=J}_addRectangleFloat(k,L,O,H,V,B,q){k[L]=O/this._dimensions.device.canvas.width,k[L+1]=H/this._dimensions.device.canvas.height,k[L+2]=V/this._dimensions.device.canvas.width,k[L+3]=B/this._dimensions.device.canvas.height,k[L+4]=q[0],k[L+5]=q[1],k[L+6]=q[2],k[L+7]=q[3]}_colorToFloat32Array(k){return new Float32Array([(k.rgba>>24&255)/255,(k.rgba>>16&255)/255,(k.rgba>>8&255)/255,(255&k.rgba)/255])}}a.RectangleRenderer=j},310:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const f=d(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,f.createSelectionRenderModel)()}resize(w,h){const _=w*h*a.RENDER_MODEL_INDICIES_PER_CELL;_!==this.cells.length&&(this.cells=new Uint32Array(_),this.lineLengths=new Uint32Array(h))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const f=d(820),w=d(274),h=d(627),_=d(457),N=d(56),C=d(374),y=d(345),c=d(859),p=d(147),v=d(782),g=d(855),E=d(965),R=d(742),j=d(310),A=d(733);class k extends c.Disposable{constructor(V,B,q,ne,Y,J,ee,P,W){super(),this._terminal=V,this._characterJoinerService=B,this._charSizeService=q,this._coreBrowserService=ne,this._coreService=Y,this._decorationService=J,this._optionsService=ee,this._themeService=P,this._cursorBlinkStateManager=new c.MutableDisposable,this._charAtlasDisposable=this.register(new c.MutableDisposable),this._observerDisposable=this.register(new c.MutableDisposable),this._model=new j.RenderModel,this._workCell=new v.CellData,this._workCell2=new v.CellData,this._rectangleRenderer=this.register(new c.MutableDisposable),this._glyphRenderer=this.register(new c.MutableDisposable),this._onChangeTextureAtlas=this.register(new y.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new y.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new y.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new y.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new y.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new w.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new A.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,ee,this._themeService)],this.dimensions=(0,C.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(ee.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const Q={antialias:!1,depth:!1,preserveDrawingBuffer:W};if(this._gl=this._canvas.getContext("webgl2",Q),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",K=>{console.log("webglcontextlost event received"),K.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(K)},3e3)})),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",K=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,h.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,N.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(K,he)=>this._setCanvasDevicePixelDimensions(K,he)),this.register(this._coreBrowserService.onWindowChange(K=>{this._observerDisposable.value=(0,N.observeDevicePixelDimensions)(this._canvas,K,(he,ce)=>this._setCanvasDevicePixelDimensions(he,ce))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,c.toDisposable)(()=>{var K;for(const he of this._renderLayers)he.dispose();(K=this._canvas.parentElement)==null||K.removeChild(this._canvas),(0,h.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var V;return(V=this._charAtlas)==null?void 0:V.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(V,B){var q,ne,Y,J;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const ee of this._renderLayers)ee.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(q=this._rectangleRenderer.value)==null||q.setDimensions(this.dimensions),(ne=this._rectangleRenderer.value)==null||ne.handleResize(),(Y=this._glyphRenderer.value)==null||Y.setDimensions(this.dimensions),(J=this._glyphRenderer.value)==null||J.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var V;for(const B of this._renderLayers)B.handleBlur(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.pause(),this._requestRedrawViewport()}handleFocus(){var V;for(const B of this._renderLayers)B.handleFocus(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.resume(),this._requestRedrawViewport()}handleSelectionChanged(V,B,q){for(const ne of this._renderLayers)ne.handleSelectionChanged(this._terminal,V,B,q);this._model.selection.update(this._core,V,B,q),this._requestRedrawViewport()}handleCursorMove(){var V;for(const B of this._renderLayers)B.handleCursorMove(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new R.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new E.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var B;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const V=(0,h.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==V&&(this._onChangeTextureAtlas.fire(V.pages[0].canvas),this._charAtlasDisposable.value=(0,c.getDisposeArrayDisposable)([(0,y.forwardEvent)(V.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,y.forwardEvent)(V.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=V,this._charAtlas.warmUp(),(B=this._glyphRenderer.value)==null||B.setAtlas(this._charAtlas)}_clearModel(V){var B;this._model.clear(),V&&((B=this._glyphRenderer.value)==null||B.clear())}clearTextureAtlas(){var V;(V=this._charAtlas)==null||V.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var V;this._clearModel(!0);for(const B of this._renderLayers)B.reset(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(V){return-1}deregisterCharacterJoiner(V){return!1}renderRows(V,B){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const q of this._renderLayers)q.handleGridChanged(this._terminal,V,B);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(V,B),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new _.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(V,B){const q=this._core;let ne,Y,J,ee,P,W,Q,K,he,ce,ke,we,re,G,ge=this._workCell;V=O(V,q.rows-1,0),B=O(B,q.rows-1,0);const de=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,pe=de-q.buffer.ydisp,Ne=Math.min(this._terminal.buffer.active.cursorX,q.cols-1);let Ie=-1;const Ze=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ut=!1;for(Y=V;Y<=B;Y++)for(J=Y+q.buffer.ydisp,ee=q.buffer.lines.get(J),this._model.lineLengths[Y]=0,P=this._characterJoinerService.getJoinedCharacters(J),re=0;re<q.cols;re++)if(ne=this._cellColorResolver.result.bg,ee.loadCell(re,ge),re===0&&(ne=this._cellColorResolver.result.bg),W=!1,Q=re,P.length>0&&re===P[0][0]&&(W=!0,K=P.shift(),ge=new L(ge,ee.translateToString(!0,K[0],K[1]),K[1]-K[0]),Q=K[1]-1),he=ge.getChars(),ce=ge.getCode(),we=(Y*q.cols+re)*j.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ge,re,J,this.dimensions.device.cell.width),Ze&&J===de&&(re===Ne&&(this._model.cursor={x:Ne,y:pe,width:ge.getWidth(),style:this._coreBrowserService.isFocused?q.options.cursorStyle||"block":q.options.cursorInactiveStyle,cursorWidth:q.options.cursorWidth,dpr:this._devicePixelRatio},Ie=Ne+ge.getWidth()-1),re>=Ne&&re<=Ie&&(this._coreBrowserService.isFocused&&(q.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&q.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),ce!==g.NULL_CELL_CODE&&(this._model.lineLengths[Y]=re+1),(this._model.cells[we]!==ce||this._model.cells[we+j.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[we+j.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[we+j.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(ut=!0,he.length>1&&(ce|=j.COMBINED_CHAR_BIT_MASK),this._model.cells[we]=ce,this._model.cells[we+j.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[we+j.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[we+j.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ke=ge.getWidth(),this._glyphRenderer.value.updateCell(re,Y,ce,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,he,ke,ne),W))for(ge=this._workCell,re++;re<Q;re++)G=(Y*q.cols+re)*j.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(re,Y,g.NULL_CELL_CODE,0,0,0,g.NULL_CELL_CHAR,0,0),this._model.cells[G]=g.NULL_CELL_CODE,this._model.cells[G+j.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[G+j.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[G+j.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;ut&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(V,B){this._canvas.width===V&&this._canvas.height===B||(this._canvas.width=V,this._canvas.height=B,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const V=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:V,end:V})}}a.WebglRenderer=k;class L extends p.AttributeData{constructor(V,B,q){super(),this.content=0,this.combinedData="",this.fg=V.fg,this.bg=V.bg,this.combinedData=B,this._width=q}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(V){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function O(H,V,B=0){return Math.max(Math.min(H,V),B)}a.JoinedCellData=L},381:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const f=d(374);function w(h,_,N){const C=(0,f.throwIfFalsy)(h.createShader(_));if(h.shaderSource(C,N),h.compileShader(C),h.getShaderParameter(C,h.COMPILE_STATUS))return C;console.error(h.getShaderInfoLog(C)),h.deleteShader(C)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(h,_,N){const C=(0,f.throwIfFalsy)(h.createProgram());if(h.attachShader(C,(0,f.throwIfFalsy)(w(h,h.VERTEX_SHADER,_))),h.attachShader(C,(0,f.throwIfFalsy)(w(h,h.FRAGMENT_SHADER,N))),h.linkProgram(C),h.getProgramParameter(C,h.LINK_STATUS))return C;console.error(h.getProgramInfoLog(C)),h.deleteProgram(C)},a.createShader=w,a.expandFloat32Array=function(h,_){const N=Math.min(2*h.length,_),C=new Float32Array(N);for(let y=0;y<h.length;y++)C[y]=h[y];return C},a.GLTexture=class{constructor(h){this.texture=h,this.version=-1}}},592:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const f=d(627),w=d(237),h=d(374),_=d(859);class N extends _.Disposable{constructor(y,c,p,v,g,E,R,j){super(),this._container=c,this._alpha=g,this._coreBrowserService=E,this._optionsService=R,this._themeService=j,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${p}-layer`),this._canvas.style.zIndex=v.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(A=>{this._refreshCharAtlas(y,A),this.reset(y)})),this.register((0,_.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,h.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(y){}handleFocus(y){}handleCursorMove(y){}handleGridChanged(y,c,p){}handleSelectionChanged(y,c,p,v=!1){}_setTransparency(y,c){if(c===this._alpha)return;const p=this._canvas;this._alpha=c,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,p),this._refreshCharAtlas(y,this._themeService.colors),this.handleGridChanged(y,0,y.rows-1)}_refreshCharAtlas(y,c){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,f.acquireTextureAtlas)(y,this._optionsService.rawOptions,c,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(y,c){this._deviceCellWidth=c.device.cell.width,this._deviceCellHeight=c.device.cell.height,this._deviceCharWidth=c.device.char.width,this._deviceCharHeight=c.device.char.height,this._deviceCharLeft=c.device.char.left,this._deviceCharTop=c.device.char.top,this._canvas.width=c.device.canvas.width,this._canvas.height=c.device.canvas.height,this._canvas.style.width=`${c.css.canvas.width}px`,this._canvas.style.height=`${c.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(y,this._themeService.colors)}_fillBottomLineAtCells(y,c,p=1){this._ctx.fillRect(y*this._deviceCellWidth,(c+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,p*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(y,c,p,v){this._alpha?this._ctx.clearRect(y*this._deviceCellWidth,c*this._deviceCellHeight,p*this._deviceCellWidth,v*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(y*this._deviceCellWidth,c*this._deviceCellHeight,p*this._deviceCellWidth,v*this._deviceCellHeight))}_fillCharTrueColor(y,c,p,v){this._ctx.font=this._getFont(y,!1,!1),this._ctx.textBaseline=w.TEXT_BASELINE,this._clipCell(p,v,c.getWidth()),this._ctx.fillText(c.getChars(),p*this._deviceCellWidth+this._deviceCharLeft,v*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(y,c,p){this._ctx.beginPath(),this._ctx.rect(y*this._deviceCellWidth,c*this._deviceCellHeight,p*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(y,c,p){return`${p?"italic":""} ${c?y.options.fontWeightBold:y.options.fontWeight} ${y.options.fontSize*this._coreBrowserService.dpr}px ${y.options.fontFamily}`}}a.BaseRenderLayer=N},733:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const f=d(197),w=d(237),h=d(592);class _ extends h.BaseRenderLayer{constructor(C,y,c,p,v,g,E){super(c,C,"link",y,!0,v,g,E),this.register(p.onShowLinkUnderline(R=>this._handleShowLinkUnderline(R))),this.register(p.onHideLinkUnderline(R=>this._handleHideLinkUnderline(R)))}resize(C,y){super.resize(C,y),this._state=void 0}reset(C){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const C=this._state.y2-this._state.y1-1;C>0&&this._clearCells(0,this._state.y1+1,this._state.cols,C),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(C){if(C.fg===w.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:C.fg!==void 0&&(0,f.is256Color)(C.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[C.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,C.y1===C.y2)this._fillBottomLineAtCells(C.x1,C.y1,C.x2-C.x1);else{this._fillBottomLineAtCells(C.x1,C.y1,C.cols-C.x1);for(let y=C.y1+1;y<C.y2;y++)this._fillBottomLineAtCells(0,y,C.cols);this._fillBottomLineAtCells(0,C.y2,C.x2)}this._state=C}_handleHideLinkUnderline(C){this._clearCurrentLink()}}a.LinkRenderLayer=_},820:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,f,w,h){d.addEventListener(f,w,h);let _=!1;return{dispose:()=>{_||(_=!0,d.removeEventListener(f,w,h))}}}},274:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const f=d(855),w=d(160),h=d(374);let _,N=0,C=0,y=!1,c=!1,p=!1,v=0;a.CellColorResolver=class{constructor(g,E,R,j,A,k){this._terminal=g,this._optionService=E,this._selectionRenderModel=R,this._decorationService=j,this._coreBrowserService=A,this._themeService=k,this.result={fg:0,bg:0,ext:0}}resolve(g,E,R,j){if(this.result.bg=g.bg,this.result.fg=g.fg,this.result.ext=268435456&g.bg?g.extended.ext:0,C=0,N=0,c=!1,y=!1,p=!1,_=this._themeService.colors,v=0,g.getCode()!==f.NULL_CELL_CODE&&g.extended.underlineStyle===4){const A=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));v=E*j%(2*Math.round(A))}if(this._decorationService.forEachDecorationAtCell(E,R,"bottom",A=>{A.backgroundColorRGB&&(C=A.backgroundColorRGB.rgba>>8&16777215,c=!0),A.foregroundColorRGB&&(N=A.foregroundColorRGB.rgba>>8&16777215,y=!0)}),p=this._selectionRenderModel.isCellSelected(this._terminal,E,R),p){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:C=(16777215&this.result.fg)<<8|255;break;default:C=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:C=(16777215&this.result.bg)<<8|255}C=w.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(c=!0,_.selectionForeground&&(N=_.selectionForeground.rgba>>8&16777215,y=!0),(0,h.treatGlyphAsBackgroundColor)(g.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))N=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:N=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:N=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:N=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:N=(16777215&this.result.fg)<<8|255;break;default:N=this._themeService.colors.foreground.rgba}N=w.rgba.blend(N,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}y=!0}}this._decorationService.forEachDecorationAtCell(E,R,"top",A=>{A.backgroundColorRGB&&(C=A.backgroundColorRGB.rgba>>8&16777215,c=!0),A.foregroundColorRGB&&(N=A.foregroundColorRGB.rgba>>8&16777215,y=!0)}),c&&(C=p?-16777216&g.bg&-134217729|C|50331648:-16777216&g.bg|C|50331648),y&&(N=-16777216&g.fg&-67108865|N|50331648),67108864&this.result.fg&&(c&&!y&&(N=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&_.background.rgba>>8|50331648,y=!0),!c&&y&&(C=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&_.foreground.rgba>>8|50331648,c=!0)),_=void 0,this.result.bg=c?C:this.result.bg,this.result.fg=y?N:this.result.fg,this.result.ext&=536870911,this.result.ext|=v<<29&3758096384}}},627:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const f=d(509),w=d(197),h=[];a.acquireTextureAtlas=function(_,N,C,y,c,p,v,g){const E=(0,w.generateConfig)(y,c,p,v,N,C,g);for(let A=0;A<h.length;A++){const k=h[A],L=k.ownedBy.indexOf(_);if(L>=0){if((0,w.configEquals)(k.config,E))return k.atlas;k.ownedBy.length===1?(k.atlas.dispose(),h.splice(A,1)):k.ownedBy.splice(L,1);break}}for(let A=0;A<h.length;A++){const k=h[A];if((0,w.configEquals)(k.config,E))return k.ownedBy.push(_),k.atlas}const R=_._core,j={atlas:new f.TextureAtlas(document,E,R.unicodeService),config:E,ownedBy:[_]};return h.push(j),j.atlas},a.removeTerminalFromCache=function(_){for(let N=0;N<h.length;N++){const C=h[N].ownedBy.indexOf(_);if(C!==-1){h[N].ownedBy.length===1?(h[N].atlas.dispose(),h.splice(N,1)):h[N].ownedBy.splice(C,1);break}}}},197:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const f=d(160);a.generateConfig=function(w,h,_,N,C,y,c){const p={foreground:y.foreground,background:y.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:y.ansi.slice(),contrastCache:y.contrastCache,halfContrastCache:y.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:c,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:w,deviceCellHeight:h,deviceCharWidth:_,deviceCharHeight:N,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:p}},a.configEquals=function(w,h){for(let _=0;_<w.colors.ansi.length;_++)if(w.colors.ansi[_].rgba!==h.colors.ansi[_].rgba)return!1;return w.devicePixelRatio===h.devicePixelRatio&&w.customGlyphs===h.customGlyphs&&w.lineHeight===h.lineHeight&&w.letterSpacing===h.letterSpacing&&w.fontFamily===h.fontFamily&&w.fontSize===h.fontSize&&w.fontWeight===h.fontWeight&&w.fontWeightBold===h.fontWeightBold&&w.allowTransparency===h.allowTransparency&&w.deviceCharWidth===h.deviceCharWidth&&w.deviceCharHeight===h.deviceCharHeight&&w.drawBoldTextInBrightColors===h.drawBoldTextInBrightColors&&w.minimumContrastRatio===h.minimumContrastRatio&&w.colors.foreground.rgba===h.colors.foreground.rgba&&w.colors.background.rgba===h.colors.background.rgba},a.is256Color=function(w){return(50331648&w)==16777216||(50331648&w)==33554432}},237:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=d(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(d,f){this._renderCallback=d,this._coreBrowserService=f,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(d=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},d)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const f=d(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const w={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(y,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"║":{1:(y,c)=>`M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1`},"╒":{1:(y,c)=>`M.5,1 L.5,${.5-c} L1,${.5-c} M.5,${.5+c} L1,${.5+c}`},"╓":{1:(y,c)=>`M${.5-y},1 L${.5-y},.5 L1,.5 M${.5+y},.5 L${.5+y},1`},"╔":{1:(y,c)=>`M1,${.5-c} L${.5-y},${.5-c} L${.5-y},1 M1,${.5+c} L${.5+y},${.5+c} L${.5+y},1`},"╕":{1:(y,c)=>`M0,${.5-c} L.5,${.5-c} L.5,1 M0,${.5+c} L.5,${.5+c}`},"╖":{1:(y,c)=>`M${.5+y},1 L${.5+y},.5 L0,.5 M${.5-y},.5 L${.5-y},1`},"╗":{1:(y,c)=>`M0,${.5+c} L${.5-y},${.5+c} L${.5-y},1 M0,${.5-c} L${.5+y},${.5-c} L${.5+y},1`},"╘":{1:(y,c)=>`M.5,0 L.5,${.5+c} L1,${.5+c} M.5,${.5-c} L1,${.5-c}`},"╙":{1:(y,c)=>`M1,.5 L${.5-y},.5 L${.5-y},0 M${.5+y},.5 L${.5+y},0`},"╚":{1:(y,c)=>`M1,${.5-c} L${.5+y},${.5-c} L${.5+y},0 M1,${.5+c} L${.5-y},${.5+c} L${.5-y},0`},"╛":{1:(y,c)=>`M0,${.5+c} L.5,${.5+c} L.5,0 M0,${.5-c} L.5,${.5-c}`},"╜":{1:(y,c)=>`M0,.5 L${.5+y},.5 L${.5+y},0 M${.5-y},.5 L${.5-y},0`},"╝":{1:(y,c)=>`M0,${.5-c} L${.5-y},${.5-c} L${.5-y},0 M0,${.5+c} L${.5+y},${.5+c} L${.5+y},0`},"╞":{1:(y,c)=>`M.5,0 L.5,1 M.5,${.5-c} L1,${.5-c} M.5,${.5+c} L1,${.5+c}`},"╟":{1:(y,c)=>`M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1 M${.5+y},.5 L1,.5`},"╠":{1:(y,c)=>`M${.5-y},0 L${.5-y},1 M1,${.5+c} L${.5+y},${.5+c} L${.5+y},1 M1,${.5-c} L${.5+y},${.5-c} L${.5+y},0`},"╡":{1:(y,c)=>`M.5,0 L.5,1 M0,${.5-c} L.5,${.5-c} M0,${.5+c} L.5,${.5+c}`},"╢":{1:(y,c)=>`M0,.5 L${.5-y},.5 M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1`},"╣":{1:(y,c)=>`M${.5+y},0 L${.5+y},1 M0,${.5+c} L${.5-y},${.5+c} L${.5-y},1 M0,${.5-c} L${.5-y},${.5-c} L${.5-y},0`},"╤":{1:(y,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c} M.5,${.5+c} L.5,1`},"╥":{1:(y,c)=>`M0,.5 L1,.5 M${.5-y},.5 L${.5-y},1 M${.5+y},.5 L${.5+y},1`},"╦":{1:(y,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L${.5-y},${.5+c} L${.5-y},1 M1,${.5+c} L${.5+y},${.5+c} L${.5+y},1`},"╧":{1:(y,c)=>`M.5,0 L.5,${.5-c} M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"╨":{1:(y,c)=>`M0,.5 L1,.5 M${.5-y},.5 L${.5-y},0 M${.5+y},.5 L${.5+y},0`},"╩":{1:(y,c)=>`M0,${.5+c} L1,${.5+c} M0,${.5-c} L${.5-y},${.5-c} L${.5-y},0 M1,${.5-c} L${.5+y},${.5-c} L${.5+y},0`},"╪":{1:(y,c)=>`M.5,0 L.5,1 M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"╫":{1:(y,c)=>`M0,.5 L1,.5 M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1`},"╬":{1:(y,c)=>`M0,${.5+c} L${.5-y},${.5+c} L${.5-y},1 M1,${.5+c} L${.5+y},${.5+c} L${.5+y},1 M0,${.5-c} L${.5-y},${.5-c} L${.5-y},0 M1,${.5-c} L${.5+y},${.5-c} L${.5+y},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(y,c)=>`M.5,1 L.5,${.5+c/.15*.5} C.5,${.5+c/.15*.5},.5,.5,1,.5`},"╮":{1:(y,c)=>`M.5,1 L.5,${.5+c/.15*.5} C.5,${.5+c/.15*.5},.5,.5,0,.5`},"╯":{1:(y,c)=>`M.5,0 L.5,${.5-c/.15*.5} C.5,${.5-c/.15*.5},.5,.5,0,.5`},"╰":{1:(y,c)=>`M.5,0 L.5,${.5-c/.15*.5} C.5,${.5-c/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(y,c,p,v,g,E,R,j){const A=a.blockElementDefinitions[c];if(A)return function(H,V,B,q,ne,Y){for(let J=0;J<V.length;J++){const ee=V[J],P=ne/8,W=Y/8;H.fillRect(B+ee.x*P,q+ee.y*W,ee.w*P,ee.h*W)}}(y,A,p,v,g,E),!0;const k=w[c];if(k)return function(H,V,B,q,ne,Y){let J=h.get(V);J||(J=new Map,h.set(V,J));const ee=H.fillStyle;if(typeof ee!="string")throw new Error(`Unexpected fillStyle type "${ee}"`);let P=J.get(ee);if(!P){const W=V[0].length,Q=V.length,K=H.canvas.ownerDocument.createElement("canvas");K.width=W,K.height=Q;const he=(0,f.throwIfFalsy)(K.getContext("2d")),ce=new ImageData(W,Q);let ke,we,re,G;if(ee.startsWith("#"))ke=parseInt(ee.slice(1,3),16),we=parseInt(ee.slice(3,5),16),re=parseInt(ee.slice(5,7),16),G=ee.length>7&&parseInt(ee.slice(7,9),16)||1;else{if(!ee.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${ee}" when drawing pattern glyph`);[ke,we,re,G]=ee.substring(5,ee.length-1).split(",").map(ge=>parseFloat(ge))}for(let ge=0;ge<Q;ge++)for(let de=0;de<W;de++)ce.data[4*(ge*W+de)]=ke,ce.data[4*(ge*W+de)+1]=we,ce.data[4*(ge*W+de)+2]=re,ce.data[4*(ge*W+de)+3]=V[ge][de]*(255*G);he.putImageData(ce,0,0),P=(0,f.throwIfFalsy)(H.createPattern(K,null)),J.set(ee,P)}H.fillStyle=P,H.fillRect(B,q,ne,Y)}(y,k,p,v,g,E),!0;const L=a.boxDrawingDefinitions[c];if(L)return function(H,V,B,q,ne,Y,J){H.strokeStyle=H.fillStyle;for(const[ee,P]of Object.entries(V)){let W;H.beginPath(),H.lineWidth=J*Number.parseInt(ee),W=typeof P=="function"?P(.15,.15/Y*ne):P;for(const Q of W.split(" ")){const K=Q[0],he=N[K];if(!he){console.error(`Could not find drawing instructions for "${K}"`);continue}const ce=Q.substring(1).split(",");ce[0]&&ce[1]&&he(H,C(ce,ne,Y,B,q,!0,J))}H.stroke(),H.closePath()}}(y,L,p,v,g,E,j),!0;const O=a.powerlineDefinitions[c];return!!O&&(function(H,V,B,q,ne,Y,J,ee){const P=new Path2D;P.rect(B,q,ne,Y),H.clip(P),H.beginPath();const W=J/12;H.lineWidth=ee*W;for(const Q of V.d.split(" ")){const K=Q[0],he=N[K];if(!he){console.error(`Could not find drawing instructions for "${K}"`);continue}const ce=Q.substring(1).split(",");ce[0]&&ce[1]&&he(H,C(ce,ne,Y,B,q,!1,ee,(V.leftPadding??0)*(W/2),(V.rightPadding??0)*(W/2)))}V.type===1?(H.strokeStyle=H.fillStyle,H.stroke()):H.fill(),H.closePath()}(y,O,p,v,g,E,R,j),!0)};const h=new Map;function _(y,c,p=0){return Math.max(Math.min(y,c),p)}const N={C:(y,c)=>y.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]),L:(y,c)=>y.lineTo(c[0],c[1]),M:(y,c)=>y.moveTo(c[0],c[1])};function C(y,c,p,v,g,E,R,j=0,A=0){const k=y.map(L=>parseFloat(L)||parseInt(L));if(k.length<2)throw new Error("Too few arguments for instruction");for(let L=0;L<k.length;L+=2)k[L]*=c-j*R-A*R,E&&k[L]!==0&&(k[L]=_(Math.round(k[L]+.5)-.5,c,0)),k[L]+=v+j*R;for(let L=1;L<k.length;L+=2)k[L]*=p,E&&k[L]!==0&&(k[L]=_(Math.round(k[L]+.5)-.5,p,0)),k[L]+=g;return k}},56:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const f=d(859);a.observeDevicePixelDimensions=function(w,h,_){let N=new h.ResizeObserver(C=>{const y=C.find(v=>v.target===w);if(!y)return;if(!("devicePixelContentBoxSize"in y))return N==null||N.disconnect(),void(N=void 0);const c=y.devicePixelContentBoxSize[0].inlineSize,p=y.devicePixelContentBoxSize[0].blockSize;c>0&&p>0&&_(c,p)});try{N.observe(w,{box:["device-pixel-content-box"]})}catch{N.disconnect(),N=void 0}return(0,f.toDisposable)(()=>N==null?void 0:N.disconnect())}},374:(b,a)=>{function d(w){return 57508<=w&&w<=57558}function f(w){return w>=128512&&w<=128591||w>=127744&&w<=128511||w>=128640&&w<=128767||w>=9728&&w<=9983||w>=9984&&w<=10175||w>=65024&&w<=65039||w>=129280&&w<=129535||w>=127462&&w<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(w){if(!w)throw new Error("value must not be falsy");return w},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(w){return 57520<=w&&w<=57527},a.isEmoji=f,a.allowRescaling=function(w,h,_,N){return h===1&&_>Math.ceil(1.5*N)&&w!==void 0&&w>255&&!f(w)&&!d(w)&&!function(C){return 57344<=C&&C<=63743}(w)},a.treatGlyphAsBackgroundColor=function(w){return d(w)||function(h){return 9472<=h&&h<=9631}(w)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(w,h,_=0){return(w-(2*Math.round(h)-_))%(2*Math.round(h))}},296:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(w,h,_,N=!1){if(this.selectionStart=h,this.selectionEnd=_,!h||!_||h[0]===_[0]&&h[1]===_[1])return void this.clear();const C=w.buffers.active.ydisp,y=h[1]-C,c=_[1]-C,p=Math.max(y,0),v=Math.min(c,w.rows-1);p>=w.rows||v<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=N,this.viewportStartRow=y,this.viewportEndRow=c,this.viewportCappedStartRow=p,this.viewportCappedEndRow=v,this.startCol=h[0],this.endCol=_[0])}isCellSelected(w,h,_){return!!this.hasSelection&&(_-=w.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&_>=this.viewportCappedStartRow&&h<this.endCol&&_<=this.viewportCappedEndRow:h<this.startCol&&_>=this.viewportCappedStartRow&&h>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},509:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const f=d(237),w=d(860),h=d(374),_=d(160),N=d(345),C=d(485),y=d(385),c=d(147),p=d(855),v={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let g;class E{get pages(){return this._pages}constructor(L,O,H){this._document=L,this._config=O,this._unicodeService=H,this._didWarmUp=!1,this._cacheMap=new C.FourKeyMap,this._cacheMapCombined=new C.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new c.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new N.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new N.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=A(L,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,h.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const L of this.pages)L.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const L=new y.IdleTaskQueue;for(let O=33;O<126;O++)L.enqueue(()=>{if(!this._cacheMap.get(O,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT)){const H=this._drawToCache(O,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT);this._cacheMap.set(O,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT,H)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const L of this._pages)L.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(E.maxAtlasPages&&this._pages.length>=Math.max(4,E.maxAtlasPages)){const O=this._pages.filter(J=>2*J.canvas.width<=(E.maxTextureSize||4096)).sort((J,ee)=>ee.canvas.width!==J.canvas.width?ee.canvas.width-J.canvas.width:ee.percentageUsed-J.percentageUsed);let H=-1,V=0;for(let J=0;J<O.length;J++)if(O[J].canvas.width!==V)H=J,V=O[J].canvas.width;else if(J-H==3)break;const B=O.slice(H,H+4),q=B.map(J=>J.glyphs[0].texturePage).sort((J,ee)=>J>ee?1:-1),ne=this.pages.length-B.length,Y=this._mergePages(B,ne);Y.version++;for(let J=q.length-1;J>=0;J--)this._deletePage(q[J]);this.pages.push(Y),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(Y.canvas)}const L=new R(this._document,this._textureSize);return this._pages.push(L),this._activePages.push(L),this._onAddTextureAtlasCanvas.fire(L.canvas),L}_mergePages(L,O){const H=2*L[0].canvas.width,V=new R(this._document,H,L);for(const[B,q]of L.entries()){const ne=B*q.canvas.width%H,Y=Math.floor(B/2)*q.canvas.height;V.ctx.drawImage(q.canvas,ne,Y);for(const ee of q.glyphs)ee.texturePage=O,ee.sizeClipSpace.x=ee.size.x/H,ee.sizeClipSpace.y=ee.size.y/H,ee.texturePosition.x+=ne,ee.texturePosition.y+=Y,ee.texturePositionClipSpace.x=ee.texturePosition.x/H,ee.texturePositionClipSpace.y=ee.texturePosition.y/H;this._onRemoveTextureAtlasCanvas.fire(q.canvas);const J=this._activePages.indexOf(q);J!==-1&&this._activePages.splice(J,1)}return V}_deletePage(L){this._pages.splice(L,1);for(let O=L;O<this._pages.length;O++){const H=this._pages[O];for(const V of H.glyphs)V.texturePage--;H.version++}}getRasterizedGlyphCombinedChar(L,O,H,V,B){return this._getFromCacheMap(this._cacheMapCombined,L,O,H,V,B)}getRasterizedGlyph(L,O,H,V,B){return this._getFromCacheMap(this._cacheMap,L,O,H,V,B)}_getFromCacheMap(L,O,H,V,B,q=!1){return g=L.get(O,H,V,B),g||(g=this._drawToCache(O,H,V,B,q),L.set(O,H,V,B,g)),g}_getColorFromAnsiIndex(L){if(L>=this._config.colors.ansi.length)throw new Error("No color found for idx "+L);return this._config.colors.ansi[L]}_getBackgroundColor(L,O,H,V){if(this._config.allowTransparency)return _.NULL_COLOR;let B;switch(L){case 16777216:case 33554432:B=this._getColorFromAnsiIndex(O);break;case 50331648:const q=c.AttributeData.toColorRGB(O);B=_.channels.toColor(q[0],q[1],q[2]);break;default:B=H?_.color.opaque(this._config.colors.foreground):this._config.colors.background}return B}_getForegroundColor(L,O,H,V,B,q,ne,Y,J,ee){const P=this._getMinimumContrastColor(L,O,H,V,B,q,ne,J,Y,ee);if(P)return P;let W;switch(B){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&J&&q<8&&(q+=8),W=this._getColorFromAnsiIndex(q);break;case 50331648:const Q=c.AttributeData.toColorRGB(q);W=_.channels.toColor(Q[0],Q[1],Q[2]);break;default:W=ne?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(W=_.color.opaque(W)),Y&&(W=_.color.multiplyOpacity(W,f.DIM_OPACITY)),W}_resolveBackgroundRgba(L,O,H){switch(L){case 16777216:case 33554432:return this._getColorFromAnsiIndex(O).rgba;case 50331648:return O<<8;default:return H?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(L,O,H,V){switch(L){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&V&&O<8&&(O+=8),this._getColorFromAnsiIndex(O).rgba;case 50331648:return O<<8;default:return H?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(L,O,H,V,B,q,ne,Y,J,ee){if(this._config.minimumContrastRatio===1||ee)return;const P=this._getContrastCache(J),W=P.getColor(L,V);if(W!==void 0)return W||void 0;const Q=this._resolveBackgroundRgba(O,H,ne),K=this._resolveForegroundRgba(B,q,ne,Y),he=_.rgba.ensureContrastRatio(Q,K,this._config.minimumContrastRatio/(J?2:1));if(!he)return void P.setColor(L,V,null);const ce=_.channels.toColor(he>>24&255,he>>16&255,he>>8&255);return P.setColor(L,V,ce),ce}_getContrastCache(L){return L?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(L,O,H,V,B=!1){const q=typeof L=="number"?String.fromCharCode(L):L,ne=Math.min(this._config.deviceCellWidth*Math.max(q.length,2)+4,this._textureSize);this._tmpCanvas.width<ne&&(this._tmpCanvas.width=ne);const Y=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<Y&&(this._tmpCanvas.height=Y),this._tmpCtx.save(),this._workAttributeData.fg=H,this._workAttributeData.bg=O,this._workAttributeData.extended.ext=V,this._workAttributeData.isInvisible())return v;const J=!!this._workAttributeData.isBold(),ee=!!this._workAttributeData.isInverse(),P=!!this._workAttributeData.isDim(),W=!!this._workAttributeData.isItalic(),Q=!!this._workAttributeData.isUnderline(),K=!!this._workAttributeData.isStrikethrough(),he=!!this._workAttributeData.isOverline();let ce=this._workAttributeData.getFgColor(),ke=this._workAttributeData.getFgColorMode(),we=this._workAttributeData.getBgColor(),re=this._workAttributeData.getBgColorMode();if(ee){const Te=ce;ce=we,we=Te;const lt=ke;ke=re,re=lt}const G=this._getBackgroundColor(re,we,ee,P);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ge=J?this._config.fontWeightBold:this._config.fontWeight,de=W?"italic":"";this._tmpCtx.font=`${de} ${ge} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const pe=q.length===1&&(0,h.isPowerlineGlyph)(q.charCodeAt(0)),Ne=q.length===1&&(0,h.isRestrictedPowerlineGlyph)(q.charCodeAt(0)),Ie=this._getForegroundColor(O,re,we,H,ke,ce,ee,P,J,(0,h.treatGlyphAsBackgroundColor)(q.charCodeAt(0)));this._tmpCtx.fillStyle=Ie.css;const Ze=Ne?0:4;let ut=!1;this._config.customGlyphs!==!1&&(ut=(0,w.tryDrawCustomChar)(this._tmpCtx,q,Ze,Ze,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let At,Ke=!pe;if(At=typeof L=="number"?this._unicodeService.wcwidth(L):this._unicodeService.getStringCellWidth(L),Q){this._tmpCtx.save();const Te=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),lt=Te%2==1?.5:0;if(this._tmpCtx.lineWidth=Te,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Ke=!1,this._tmpCtx.strokeStyle=`rgb(${c.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Ke=!1;let be=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&be<8&&(be+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(be).css}this._tmpCtx.beginPath();const dt=Ze,$=Math.ceil(Ze+this._config.deviceCharHeight)-lt-(B?2*Te:0),at=$+Te,De=$+2*Te;let We=this._workAttributeData.getUnderlineVariantOffset();for(let be=0;be<At;be++){this._tmpCtx.save();const Pe=dt+be*this._config.deviceCellWidth,He=dt+(be+1)*this._config.deviceCellWidth,Ot=Pe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Pe,$),this._tmpCtx.lineTo(He,$),this._tmpCtx.moveTo(Pe,De),this._tmpCtx.lineTo(He,De);break;case 3:const Le=Te<=1?De:Math.ceil(Ze+this._config.deviceCharHeight-Te/2)-lt,ve=Te<=1?$:Math.ceil(Ze+this._config.deviceCharHeight+Te/2)-lt,xt=new Path2D;xt.rect(Pe,$,this._config.deviceCellWidth,De-$),this._tmpCtx.clip(xt),this._tmpCtx.moveTo(Pe-this._config.deviceCellWidth/2,at),this._tmpCtx.bezierCurveTo(Pe-this._config.deviceCellWidth/2,ve,Pe,ve,Pe,at),this._tmpCtx.bezierCurveTo(Pe,Le,Ot,Le,Ot,at),this._tmpCtx.bezierCurveTo(Ot,ve,He,ve,He,at),this._tmpCtx.bezierCurveTo(He,Le,He+this._config.deviceCellWidth/2,Le,He+this._config.deviceCellWidth/2,at);break;case 4:const Kt=We===0?0:We>=Te?2*Te-We:Te-We;We>=Te||Kt===0?(this._tmpCtx.setLineDash([Math.round(Te),Math.round(Te)]),this._tmpCtx.moveTo(Pe+Kt,$),this._tmpCtx.lineTo(He,$)):(this._tmpCtx.setLineDash([Math.round(Te),Math.round(Te)]),this._tmpCtx.moveTo(Pe,$),this._tmpCtx.lineTo(Pe+Kt,$),this._tmpCtx.moveTo(Pe+Kt+Te,$),this._tmpCtx.lineTo(He,$)),We=(0,h.computeNextVariantOffset)(He-Pe,Te,We);break;case 5:const ot=.6,Tt=.3,Qt=He-Pe,Vt=Math.floor(ot*Qt),Fn=Math.floor(Tt*Qt),mn=Qt-Vt-Fn;this._tmpCtx.setLineDash([Vt,Fn,mn]),this._tmpCtx.moveTo(Pe,$),this._tmpCtx.lineTo(He,$);break;default:this._tmpCtx.moveTo(Pe,$),this._tmpCtx.lineTo(He,$)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ut&&this._config.fontSize>=12&&!this._config.allowTransparency&&q!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const be=this._tmpCtx.measureText(q);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in be&&be.actualBoundingBoxDescent>0){this._tmpCtx.save();const Pe=new Path2D;Pe.rect(dt,$-Math.ceil(Te/2),this._config.deviceCellWidth*At,De-$+Math.ceil(Te/2)),this._tmpCtx.clip(Pe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=G.css,this._tmpCtx.strokeText(q,Ze,Ze+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(he){const Te=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),lt=Te%2==1?.5:0;this._tmpCtx.lineWidth=Te,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Ze,Ze+lt),this._tmpCtx.lineTo(Ze+this._config.deviceCharWidth*At,Ze+lt),this._tmpCtx.stroke()}if(ut||this._tmpCtx.fillText(q,Ze,Ze+this._config.deviceCharHeight),q==="_"&&!this._config.allowTransparency){let Te=j(this._tmpCtx.getImageData(Ze,Ze,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Ie,Ke);if(Te)for(let lt=1;lt<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(q,Ze,Ze+this._config.deviceCharHeight-lt),Te=j(this._tmpCtx.getImageData(Ze,Ze,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Ie,Ke),Te);lt++);}if(K){const Te=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),lt=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Te,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Ze,Ze+Math.floor(this._config.deviceCharHeight/2)-lt),this._tmpCtx.lineTo(Ze+this._config.deviceCharWidth*At,Ze+Math.floor(this._config.deviceCharHeight/2)-lt),this._tmpCtx.stroke()}this._tmpCtx.restore();const qt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ut;if(Ut=this._config.allowTransparency?function(Te){for(let lt=0;lt<Te.data.length;lt+=4)if(Te.data[lt+3]>0)return!1;return!0}(qt):j(qt,G,Ie,Ke),Ut)return v;const xe=this._findGlyphBoundingBox(qt,this._workBoundingBox,ne,Ne,ut,Ze);let Ve,Xe;for(;;){if(this._activePages.length===0){const Te=this._createNewPage();Ve=Te,Xe=Te.currentRow,Xe.height=xe.size.y;break}Ve=this._activePages[this._activePages.length-1],Xe=Ve.currentRow;for(const Te of this._activePages)xe.size.y<=Te.currentRow.height&&(Ve=Te,Xe=Te.currentRow);for(let Te=this._activePages.length-1;Te>=0;Te--)for(const lt of this._activePages[Te].fixedRows)lt.height<=Xe.height&&xe.size.y<=lt.height&&(Ve=this._activePages[Te],Xe=lt);if(Xe.y+xe.size.y>=Ve.canvas.height||Xe.height>xe.size.y+2){let Te=!1;if(Ve.currentRow.y+Ve.currentRow.height+xe.size.y>=Ve.canvas.height){let lt;for(const dt of this._activePages)if(dt.currentRow.y+dt.currentRow.height+xe.size.y<dt.canvas.height){lt=dt;break}if(lt)Ve=lt;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&Xe.y+xe.size.y<=Ve.canvas.height&&Xe.height>=xe.size.y&&Xe.x+xe.size.x<=Ve.canvas.width)Te=!0;else{const dt=this._createNewPage();Ve=dt,Xe=dt.currentRow,Xe.height=xe.size.y,Te=!0}}Te||(Ve.currentRow.height>0&&Ve.fixedRows.push(Ve.currentRow),Xe={x:0,y:Ve.currentRow.y+Ve.currentRow.height,height:xe.size.y},Ve.fixedRows.push(Xe),Ve.currentRow={x:0,y:Xe.y+Xe.height,height:0})}if(Xe.x+xe.size.x<=Ve.canvas.width)break;Xe===Ve.currentRow?(Xe.x=0,Xe.y+=Xe.height,Xe.height=0):Ve.fixedRows.splice(Ve.fixedRows.indexOf(Xe),1)}return xe.texturePage=this._pages.indexOf(Ve),xe.texturePosition.x=Xe.x,xe.texturePosition.y=Xe.y,xe.texturePositionClipSpace.x=Xe.x/Ve.canvas.width,xe.texturePositionClipSpace.y=Xe.y/Ve.canvas.height,xe.sizeClipSpace.x/=Ve.canvas.width,xe.sizeClipSpace.y/=Ve.canvas.height,Xe.height=Math.max(Xe.height,xe.size.y),Xe.x+=xe.size.x,Ve.ctx.putImageData(qt,xe.texturePosition.x-this._workBoundingBox.left,xe.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,xe.size.x,xe.size.y),Ve.addGlyph(xe),Ve.version++,xe}_findGlyphBoundingBox(L,O,H,V,B,q){O.top=0;const ne=V?this._config.deviceCellHeight:this._tmpCanvas.height,Y=V?this._config.deviceCellWidth:H;let J=!1;for(let ee=0;ee<ne;ee++){for(let P=0;P<Y;P++){const W=ee*this._tmpCanvas.width*4+4*P+3;if(L.data[W]!==0){O.top=ee,J=!0;break}}if(J)break}O.left=0,J=!1;for(let ee=0;ee<q+Y;ee++){for(let P=0;P<ne;P++){const W=P*this._tmpCanvas.width*4+4*ee+3;if(L.data[W]!==0){O.left=ee,J=!0;break}}if(J)break}O.right=Y,J=!1;for(let ee=q+Y-1;ee>=q;ee--){for(let P=0;P<ne;P++){const W=P*this._tmpCanvas.width*4+4*ee+3;if(L.data[W]!==0){O.right=ee,J=!0;break}}if(J)break}O.bottom=ne,J=!1;for(let ee=ne-1;ee>=0;ee--){for(let P=0;P<Y;P++){const W=ee*this._tmpCanvas.width*4+4*P+3;if(L.data[W]!==0){O.bottom=ee,J=!0;break}}if(J)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:O.right-O.left+1,y:O.bottom-O.top+1},sizeClipSpace:{x:O.right-O.left+1,y:O.bottom-O.top+1},offset:{x:-O.left+q+(V||B?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-O.top+q+(V||B?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=E;class R{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(L){this._glyphs.push(L),this._usedPixels+=L.size.x*L.size.y}constructor(L,O,H){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],H)for(const V of H)this._glyphs.push(...V.glyphs),this._usedPixels+=V._usedPixels;this.canvas=A(L,O,O),this.ctx=(0,h.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function j(k,L,O,H){const V=L.rgba>>>24,B=L.rgba>>>16&255,q=L.rgba>>>8&255,ne=O.rgba>>>24,Y=O.rgba>>>16&255,J=O.rgba>>>8&255,ee=Math.floor((Math.abs(V-ne)+Math.abs(B-Y)+Math.abs(q-J))/12);let P=!0;for(let W=0;W<k.data.length;W+=4)k.data[W]===V&&k.data[W+1]===B&&k.data[W+2]===q||H&&Math.abs(k.data[W]-V)+Math.abs(k.data[W+1]-B)+Math.abs(k.data[W+2]-q)<ee?k.data[W+3]=0:P=!1;return P}function A(k,L,O){const H=k.createElement("canvas");return H.width=L,H.height=O,H}},160:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,f=0,w=0,h=0;var _,N,C,y,c;function p(g){const E=g.toString(16);return E.length<2?"0"+E:E}function v(g,E){return g<E?(E+.05)/(g+.05):(g+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(g){g.toCss=function(E,R,j,A){return A!==void 0?`#${p(E)}${p(R)}${p(j)}${p(A)}`:`#${p(E)}${p(R)}${p(j)}`},g.toRgba=function(E,R,j,A=255){return(E<<24|R<<16|j<<8|A)>>>0},g.toColor=function(E,R,j,A){return{css:g.toCss(E,R,j,A),rgba:g.toRgba(E,R,j,A)}}}(_||(a.channels=_={})),function(g){function E(R,j){return h=Math.round(255*j),[d,f,w]=c.toChannels(R.rgba),{css:_.toCss(d,f,w,h),rgba:_.toRgba(d,f,w,h)}}g.blend=function(R,j){if(h=(255&j.rgba)/255,h===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,k=j.rgba>>16&255,L=j.rgba>>8&255,O=R.rgba>>24&255,H=R.rgba>>16&255,V=R.rgba>>8&255;return d=O+Math.round((A-O)*h),f=H+Math.round((k-H)*h),w=V+Math.round((L-V)*h),{css:_.toCss(d,f,w),rgba:_.toRgba(d,f,w)}},g.isOpaque=function(R){return(255&R.rgba)==255},g.ensureContrastRatio=function(R,j,A){const k=c.ensureContrastRatio(R.rgba,j.rgba,A);if(k)return _.toColor(k>>24&255,k>>16&255,k>>8&255)},g.opaque=function(R){const j=(255|R.rgba)>>>0;return[d,f,w]=c.toChannels(j),{css:_.toCss(d,f,w),rgba:j}},g.opacity=E,g.multiplyOpacity=function(R,j){return h=255&R.rgba,E(R,h*j/255)},g.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}}(N||(a.color=N={})),function(g){let E,R;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(E=A,E.globalCompositeOperation="copy",R=E.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return d=parseInt(j.slice(1,2).repeat(2),16),f=parseInt(j.slice(2,3).repeat(2),16),w=parseInt(j.slice(3,4).repeat(2),16),_.toColor(d,f,w);case 5:return d=parseInt(j.slice(1,2).repeat(2),16),f=parseInt(j.slice(2,3).repeat(2),16),w=parseInt(j.slice(3,4).repeat(2),16),h=parseInt(j.slice(4,5).repeat(2),16),_.toColor(d,f,w,h);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return d=parseInt(A[1]),f=parseInt(A[2]),w=parseInt(A[3]),h=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),_.toColor(d,f,w,h);if(!E||!R)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=R,E.fillStyle=j,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[d,f,w,h]=E.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(d,f,w,h),css:j}}}(C||(a.css=C={})),function(g){function E(R,j,A){const k=R/255,L=j/255,O=A/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}g.relativeLuminance=function(R){return E(R>>16&255,R>>8&255,255&R)},g.relativeLuminance2=E}(y||(a.rgb=y={})),function(g){function E(j,A,k){const L=j>>24&255,O=j>>16&255,H=j>>8&255;let V=A>>24&255,B=A>>16&255,q=A>>8&255,ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));for(;ne<k&&(V>0||B>0||q>0);)V-=Math.max(0,Math.ceil(.1*V)),B-=Math.max(0,Math.ceil(.1*B)),q-=Math.max(0,Math.ceil(.1*q)),ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));return(V<<24|B<<16|q<<8|255)>>>0}function R(j,A,k){const L=j>>24&255,O=j>>16&255,H=j>>8&255;let V=A>>24&255,B=A>>16&255,q=A>>8&255,ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));for(;ne<k&&(V<255||B<255||q<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),B=Math.min(255,B+Math.ceil(.1*(255-B))),q=Math.min(255,q+Math.ceil(.1*(255-q))),ne=v(y.relativeLuminance2(V,B,q),y.relativeLuminance2(L,O,H));return(V<<24|B<<16|q<<8|255)>>>0}g.blend=function(j,A){if(h=(255&A)/255,h===1)return A;const k=A>>24&255,L=A>>16&255,O=A>>8&255,H=j>>24&255,V=j>>16&255,B=j>>8&255;return d=H+Math.round((k-H)*h),f=V+Math.round((L-V)*h),w=B+Math.round((O-B)*h),_.toRgba(d,f,w)},g.ensureContrastRatio=function(j,A,k){const L=y.relativeLuminance(j>>8),O=y.relativeLuminance(A>>8);if(v(L,O)<k){if(O<L){const B=E(j,A,k),q=v(L,y.relativeLuminance(B>>8));if(q<k){const ne=R(j,A,k);return q>v(L,y.relativeLuminance(ne>>8))?B:ne}return B}const H=R(j,A,k),V=v(L,y.relativeLuminance(H>>8));if(V<k){const B=E(j,A,k);return V>v(L,y.relativeLuminance(B>>8))?H:B}return H}},g.reduceLuminance=E,g.increaseLuminance=R,g.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}}(c||(a.rgba=c={})),a.toPaddedHex=p,a.contrastRatio=v},345:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===d)return void this._listeners.splice(f,1)}}})),this._event}fire(d,f){const w=[];for(let h=0;h<this._listeners.length;h++)w.push(this._listeners[h]);for(let h=0;h<w.length;h++)w[h].call(void 0,d,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,f){return d(w=>f.fire(w))},a.runAndSubscribe=function(d,f){return f(void 0),d(w=>f(w))}},859:(b,a)=>{function d(f){for(const w of f)w.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const w=this._disposables.indexOf(f);w!==-1&&this._disposables.splice(w,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var w;this._isDisposed||f===this._value||((w=this._value)==null||w.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=d,a.getDisposeArrayDisposable=function(f){return{dispose:()=>d(f)}}},485:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(w,h,_){this._data[w]||(this._data[w]={}),this._data[w][h]=_}get(w,h){return this._data[w]?this._data[w][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(f,w,h,_,N){this._data.get(f,w)||this._data.set(f,w,new d),this._data.get(f,w).set(h,_,N)}get(f,w,h,_){var N;return(N=this._data.get(f,w))==null?void 0:N.get(h,_)}clear(){this._data.clear()}}},399:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const w=d.match(/Version\/(\d+)/);return w===null||w.length<2?0:parseInt(w[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},385:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=d(399);class w{constructor(){this._tasks=[],this._i=0}enqueue(N){this._tasks.push(N),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(N){this._idleCallback=void 0;let C=0,y=0,c=N.timeRemaining(),p=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),y=Math.max(C,y),p=N.timeRemaining(),1.5*y>p)return c-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-C))}ms`),void this._start();c=p}this.clear()}}class h extends w{_requestCallback(N){return setTimeout(()=>N(this._createDeadline(16)))}_cancelCallback(N){clearTimeout(N)}_createDeadline(N){const C=Date.now()+N;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends w{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},147:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new d;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,_=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=_}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},782:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=d(133),w=d(855),h=d(147);class _ extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const y=new _;return y.setFromCharData(C),y}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[w.CHAR_DATA_ATTR_INDEX],this.bg=0;let y=!1;if(C[w.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(C[w.CHAR_DATA_CHAR_INDEX].length===2){const c=C[w.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const p=C[w.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=p&&p<=57343?this.content=1024*(c-55296)+p-56320+65536|C[w.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=C[w.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[w.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=C[w.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[w.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},855:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,f=0,w=d.length){let h="";for(let _=f;_<w;++_){let N=d[_];N>65535?(N-=65536,h+=String.fromCharCode(55296+(N>>10))+String.fromCharCode(N%1024+56320)):h+=String.fromCharCode(N)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,f){const w=d.length;if(!w)return 0;let h=0,_=0;if(this._interim){const N=d.charCodeAt(_++);56320<=N&&N<=57343?f[h++]=1024*(this._interim-55296)+N-56320+65536:(f[h++]=this._interim,f[h++]=N),this._interim=0}for(let N=_;N<w;++N){const C=d.charCodeAt(N);if(55296<=C&&C<=56319){if(++N>=w)return this._interim=C,h;const y=d.charCodeAt(N);56320<=y&&y<=57343?f[h++]=1024*(C-55296)+y-56320+65536:(f[h++]=C,f[h++]=y)}else C!==65279&&(f[h++]=C)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,f){const w=d.length;if(!w)return 0;let h,_,N,C,y=0,c=0,p=0;if(this.interim[0]){let E=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let j,A=0;for(;(j=63&this.interim[++A])&&A<4;)R<<=6,R|=j;const k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=k-A;for(;p<L;){if(p>=w)return 0;if(j=d[p++],(192&j)!=128){p--,E=!0;break}this.interim[A++]=j,R<<=6,R|=63&j}E||(k===2?R<128?p--:f[y++]=R:k===3?R<2048||R>=55296&&R<=57343||R===65279||(f[y++]=R):R<65536||R>1114111||(f[y++]=R)),this.interim.fill(0)}const v=w-4;let g=p;for(;g<w;){for(;!(!(g<v)||128&(h=d[g])||128&(_=d[g+1])||128&(N=d[g+2])||128&(C=d[g+3]));)f[y++]=h,f[y++]=_,f[y++]=N,f[y++]=C,g+=4;if(h=d[g++],h<128)f[y++]=h;else if((224&h)==192){if(g>=w)return this.interim[0]=h,y;if(_=d[g++],(192&_)!=128){g--;continue}if(c=(31&h)<<6|63&_,c<128){g--;continue}f[y++]=c}else if((240&h)==224){if(g>=w)return this.interim[0]=h,y;if(_=d[g++],(192&_)!=128){g--;continue}if(g>=w)return this.interim[0]=h,this.interim[1]=_,y;if(N=d[g++],(192&N)!=128){g--;continue}if(c=(15&h)<<12|(63&_)<<6|63&N,c<2048||c>=55296&&c<=57343||c===65279)continue;f[y++]=c}else if((248&h)==240){if(g>=w)return this.interim[0]=h,y;if(_=d[g++],(192&_)!=128){g--;continue}if(g>=w)return this.interim[0]=h,this.interim[1]=_,y;if(N=d[g++],(192&N)!=128){g--;continue}if(g>=w)return this.interim[0]=h,this.interim[1]=_,this.interim[2]=N,y;if(C=d[g++],(192&C)!=128){g--;continue}if(c=(7&h)<<18|(63&_)<<12|(63&N)<<6|63&C,c<65536||c>1114111)continue;f[y++]=c}}return y}}},776:function(b,a,d){var f=this&&this.__decorate||function(c,p,v,g){var E,R=arguments.length,j=R<3?p:g===null?g=Object.getOwnPropertyDescriptor(p,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(c,p,v,g);else for(var A=c.length-1;A>=0;A--)(E=c[A])&&(j=(R<3?E(j):R>3?E(p,v,j):E(p,v))||j);return R>3&&j&&Object.defineProperty(p,v,j),j},w=this&&this.__param||function(c,p){return function(v,g){p(v,g,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=d(859),_=d(97),N={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let C,y=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=N[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let p=0;p<c.length;p++)typeof c[p]=="function"&&(c[p]=c[p]())}_log(c,p,v){this._evalLazyOptionalParams(v),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+p,...v)}trace(c,...p){var v;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.trace.bind(this._optionsService.options.logger))??console.log,c,p)}debug(c,...p){var v;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.debug.bind(this._optionsService.options.logger))??console.log,c,p)}info(c,...p){var v;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.info.bind(this._optionsService.options.logger))??console.info,c,p)}warn(c,...p){var v;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.warn.bind(this._optionsService.options.logger))??console.warn,c,p)}error(c,...p){var v;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.error.bind(this._optionsService.options.logger))??console.error,c,p)}};a.LogService=y=f([w(0,_.IOptionsService)],y),a.setTraceLogger=function(c){C=c},a.traceCall=function(c,p,v){if(typeof v.value!="function")throw new Error("not supported");const g=v.value;v.value=function(...E){if(C.logLevel!==_.LogLevelEnum.TRACE)return g.apply(this,E);C.trace(`GlyphRenderer#${g.name}(${E.map(j=>JSON.stringify(j)).join(", ")})`);const R=g.apply(this,E);return C.trace(`GlyphRenderer#${g.name} return`,R),R}}},726:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(w){return w[f]||[]},a.createDecorator=function(w){if(a.serviceRegistry.has(w))return a.serviceRegistry.get(w);const h=function(_,N,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(y,c,p){c[d]===c?c[f].push({id:y,index:p}):(c[f]=[{id:y,index:p}],c[d]=c)})(h,_,C)};return h.toString=()=>w,a.serviceRegistry.set(w,h),h}},97:(b,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=d(726);var w;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"}(w||(a.LogLevelEnum=w={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")}},m={};function S(b){var a=m[b];if(a!==void 0)return a.exports;var d=m[b]={exports:{}};return l[b].call(d.exports,d,d.exports,S),d.exports}var D={};return(()=>{var b=D;Object.defineProperty(b,"__esModule",{value:!0}),b.WebglAddon=void 0;const a=S(345),d=S(859),f=S(399),w=S(666),h=S(776);class _ extends d.Disposable{constructor(C){if(f.isSafari&&(0,f.getSafariVersion)()<16){const y={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",y))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=C,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(C){const y=C._core;if(!C.element)return void this.register(y.onWillOpen(()=>this.activate(C)));this._terminal=C;const c=y.coreService,p=y.optionsService,v=y,g=v._renderService,E=v._characterJoinerService,R=v._charSizeService,j=v._coreBrowserService,A=v._decorationService,k=v._logService,L=v._themeService;(0,h.setTraceLogger)(k),this._renderer=this.register(new w.WebglRenderer(C,E,R,j,c,A,p,L,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),g.setRenderer(this._renderer),this.register((0,d.toDisposable)(()=>{const O=this._terminal._core._renderService;O.setRenderer(this._terminal._core._createRenderer()),O.handleResize(C.cols,C.rows)}))}get textureAtlas(){var C;return(C=this._renderer)==null?void 0:C.textureAtlas}clearTextureAtlas(){var C;(C=this._renderer)==null||C.clearTextureAtlas()}}b.WebglAddon=_})(),D})())})(VE);var f2=VE.exports;function O1(i,s){let l=0,m=i;for(;Math.abs(m)>=s;)m>0?(l+=1,m-=s):(l-=1,m+=s);return{notches:l,rem:m}}const p2=i=>i>0?"up":"down";function v2(i,s,l=24){return Math.abs(s)<=Math.abs(i)?null:s<=-l?"show":s>=l?"hide":null}function g2(i,s){if(!i)return!1;const l=i.scrollHeight-i.clientHeight;return l<=1?!1:s<0?i.scrollTop<l-1:s>0?i.scrollTop>1:!1}function b2(i,s=44,l=.5){return i*s*l/(s+l*Math.abs(i))}function V1(i){if(!i)return!1;const s=i.tagName;return!(s!=="INPUT"&&s!=="TEXTAREA"||i.closest&&i.closest(".xterm"))}function _2(i){return i.replace(/\r?\n/g,`\r
|
|
272
|
+
`)}function y2(i,s){let l=s,m=!1,S=!1,D=!1;const b=w=>{/\S/.test(w)&&(m=!0,l&&(S=!0)),l&&w.length&&(D=!0)},a=/\x1b\[([0-9;]*)m/g;let d=0,f=a.exec(i);for(;f;){b(i.slice(d,f.index)),d=a.lastIndex;const w=f[1]===""?[0]:f[1].split(";").map(Number);for(let h=0;h<w.length;h+=1){const _=w[h];if(_===0||_===49)l=!1;else if(_>=40&&_<=47||_>=100&&_<=107)l=!0;else if(_===38||_===48){const N=_===48;w[h+1]===5?(h+=2,N&&(l=!0)):w[h+1]===2&&(h+=4,N&&(l=!0))}}f=a.exec(i)}return b(i.slice(d)),{bgEnd:l,hasText:m,hasShadeText:S,hasShadeBlank:D}}function w2(i){const s=[];let l=!1,m=[],S=-1,D=!1;const b=()=>{S>=0&&D&&(s[S]+="\x1B[49m"),S=-1,D=!1},a=()=>{if(m.length){s.push("\x1B[0m");for(let d=1;d<m.length;d+=1)s.push("");m=[]}};for(const d of i){const f=y2(d,l);f.hasShadeText?(s.push(...m),m=[],s.push(d),S=s.length-1,D=f.bgEnd):!f.hasText&&(l||f.bgEnd||f.hasShadeBlank)?m.push(d):(b(),a(),s.push(d)),l=f.bgEnd}return b(),a(),s}function x2(i){const s=_2(i.replace(/\n$/,""));return w2(s.split(`\r
|
|
273
|
+
`)).join(`\r
|
|
274
|
+
`)}function N2(i,s,l=0,m=!1){if(!i||!i.vis&&!m)return"\x1B[?25l";const S=l?Math.min(s|0,l|0):s|0,D=Math.max(1,S-Math.max(0,i.row|0)),b=Math.max(0,i.col|0)+1;return`\x1B[${D};${b}H\x1B[?25h`}function PE({hint:i}){return o.jsxDEV("div",{className:"lens-boot","aria-live":"polite",children:[o.jsxDEV("div",{className:"lens-boot-dots","aria-hidden":"true",children:[o.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:7,columnNumber:9},this),o.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:8,columnNumber:9},this),o.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:9,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:6,columnNumber:7},this),i&&o.jsxDEV("div",{className:"lens-boot-hint",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:11,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:5,columnNumber:5},this)}function S2(i,{base:s=1e3,max:l=1e4,factor:m=2,jitter:S=.2,rng:D=Math.random}={}){if(i<=0)return 0;const b=Math.min(l,s*m**(i-1));return Math.round(b*(1+S*(D()*2-1)))}const E2=1e3;function C2(i){return i<8e3?E2:i<6e4?5e3:1e4}const j2=.95,D2=.015,k2=.1,R2=50;function T2(i,s,l=j2,m=D2){const S=i*s,D=i*l**(s/16);return{delta:S,v:D,done:Math.abs(D)<m}}function L2(i,s,l=k2,m=R2){return s<=m&&Math.abs(i)>=l}const A2={failCount:0,connected:!0};function Wb(i,s,{threshold:l=2}={}){switch(s){case"ok":case"reset":return{failCount:0,connected:!0};case"fail":{const m=i.failCount+1;return{failCount:m,connected:m<l}}default:return i}}const M2="(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|\\[::1\\])",P1=new RegExp(`https?://${M2}(?::(\\d{1,5}))?(/[^${m_}]*)?`,"gi");function IE(i){const s=[];if(!i)return s;P1.lastIndex=0;let l;for(;(l=P1.exec(i))!==null;){const m=/^https:/i.test(l[0]),S=l[1]?Number(l[1]):m?443:80;if(!Number.isInteger(S)||S<1||S>65535)continue;const D=l[2]||"",b=D.replace(/\.+$/,""),a=l.index+l[0].length-(D.length-b.length);s.push({start:l.index,end:a,protocol:m?"https":"http",port:S,path:b||"/",raw:i.slice(l.index,a)})}return s}function BE(i){const s=IE(i),l=s.map(m=>({start:m.start,end:m.end,kind:"url",protocol:m.protocol,port:m.port,urlPath:m.path,raw:m.raw}));for(const m of P3(i))s.some(S=>m.start<S.end&&m.end>S.start)||l.push({start:m.start,end:m.end,kind:"doc"});return l.sort((m,S)=>m.start-S.start),l}function U2(i,s){const l=i.getCell(s-1);if(!l)return!1;if(l.getWidth()===0)return!0;const m=l.getChars();if(m&&m!==" ")return!0;const S=i.getCell(s-2);return!!S&&S.getWidth()===0}function g_(i,s,l){var b;const m=i.getLine(s+1);if(!m)return!1;if(m.isWrapped)return!0;const S=i.getLine(s);if(!S||!U2(S,l))return!1;const D=(b=m.getCell(0))==null?void 0:b.getChars();return!!D&&D!==" "}function FE(i,s,l){let m=s;for(;m>0&&g_(i,m-1,l);)m--;let S="";const D=[];let b=m;for(;;){const a=i.getLine(b);if(!a)break;const d=b+1<i.length&&g_(i,b,l),f=[],w=[];for(let _=0;_<l;_++){const N=a.getCell(_);if(!N)continue;const C=N.getWidth();C!==0&&(f.push(N.getChars()),w.push({row:b,col:_,w:C}))}let h=f.length;if(d)for(;h>0&&(f[h-1]===""||f[h-1]===" ");)h--;for(let _=0;_<h;_++)S+=f[_]||" ",D.push(w[_]);if(d){b++;continue}break}return{text:S,cells:D}}function O2(i){const s=i.buffer.active,l=i.cols,m=0,S=s.length,D=[];let b=m;for(;b>0&&g_(s,b-1,l);)b--;for(;b<S;){if(!s.getLine(b)){b++;continue}const{text:a,cells:d}=FE(s,b,l);for(const{start:f,end:w,kind:h}of BE(a)){let _=f;for(;_<w;){const N=d[_].row;let C=_;for(;C<w&&d[C].row===N;)C++;const y=d[_].col,c=d[C-1],p=c.col+c.w;N>=m&&N<S&&D.push({y:N,x:y,width:p-y,kind:h,path:a.slice(f,w)}),_=C}}b=d.length?d[d.length-1].row+1:b+1}return D}function V2(i,s){const l=i.buffer.active,m=i.cols,S=s-1;if(S<0||S>=l.length)return[];const{text:D,cells:b}=FE(l,S,m),a=[];for(const{start:d,end:f,kind:w,protocol:h,port:_,urlPath:N,raw:C}of BE(D)){const y=b[d],c=b[f-1];S<y.row||S>c.row||a.push({range:{start:{x:y.col+1,y:y.row+1},end:{x:c.col+c.w,y:c.row+1}},kind:w,path:D.slice(d,f),protocol:h,port:_,urlPath:N,raw:C})}return a}const HE=(i,s,l)=>Math.max(s,Math.min(l,i));function P2(i,s){return!s||s<=0?1:Math.max(1,Math.floor(i/s))}function I1(i,s,l){return l<0?i>0?"internal":"forward":i<s?"internal":"forward"}function I2(i,s){return HE(i,0,s)}function B2(i,s,l){return HE(i-s+1,0,l)}function B1(i,s){return!i||!i.vis?null:Math.max(0,s-1-Math.max(0,i.row|0))}function F1(i,s){return Math.max(0,s-i)}function H1({cursorLine:i,viewportY:s,visibleRows:l,baseY:m,armed:S}){return S?i<s?I2(i,m):i>=s+l?B2(i,l,m):null:null}const F2=[{family:"JetBrainsMono Nerd Font",url:"/fonts/JetBrainsMonoNerdFontMono-Regular.woff2",probe:void 0},{family:"TW Unifont",url:"/fonts/TWUnifont.woff2",probe:"⏵",unicodeRange:"U+2190-21FF, U+2300-23FF, U+2400-243F, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+2800-28FF"}],H2=4,z2=1500,$2=i=>{for(const s of document.fonts)if(s.family.replace(/["']/g,"")===i)return s;return null},W2=async({family:i,url:s,probe:l,unicodeRange:m},S)=>{var D;for(let b=0;b<H2;b++){try{await document.fonts.load(`${S}px "${i}"`,l)}catch{}if(((D=$2(i))==null?void 0:D.status)==="loaded")return!0;try{const a=new FontFace(i,`url(${s}) format('woff2')`,m?{unicodeRange:m}:{});return await a.load(),document.fonts.add(a),!0}catch{}await new Promise(a=>setTimeout(a,z2*2**b))}return!1};let Gb=null;function G2(i=14){var s;return Gb||(Gb=typeof document<"u"&&((s=document.fonts)!=null&&s.load)?Promise.all(F2.map(l=>W2(l,i))):Promise.resolve([!1,!1])),Gb}function zE(i){const s=i.split(`
|
|
275
|
+
`).map(S=>S.trim());let l=0,m=s.length;for(;l<m&&s[l]==="";)l++;for(;m>l&&s[m-1]==="";)m--;return s.slice(l,m).join(`
|
|
276
|
+
`)}function q2(i){return i?{lines:i.split(`
|
|
277
|
+
`).length,chars:zE(i).replace(/\n/g,"").length}:{lines:0,chars:0}}function Y2(i,s){return{start:{col:0,row:i.start.row},end:{col:s-1,row:i.end.row}}}function K2(i,s,l,m,S){let D=i.start.row,b=i.end.row;for(;D>m&&l(D-1).trim()!=="";)D--;for(;b<S&&l(b+1).trim()!=="";)b++;return{start:{col:0,row:D},end:{col:s-1,row:b}}}function z1(i,s,l,m,S){return{x:i*m,y:(s-l)*S}}function X2(i){const[s,l]=M.useState(""),[m,S]=M.useState(!1),D=M.useRef(null),b=M.useRef(null);return M.useEffect(()=>()=>{clearTimeout(D.current),clearInterval(b.current)},[]),{dbg:s,dbgVisible:m,flash:()=>{const d=()=>{const f=i.current;f&&l(`${f.cols}×${f.rows} · ${f.options.fontSize}px`)};d(),S(!0),clearTimeout(D.current),clearInterval(b.current),b.current=setInterval(d,400),D.current=setTimeout(()=>{S(!1),clearInterval(b.current)},3e3)}}}const J2=200,Z2=20,qb=100,ef=5e3,Q2=15;function eO(i,s){const l=s==null?void 0:s.querySelector(".xterm-helper-textarea");l&&(l.readOnly=!0,l.tabIndex=-1,l.setAttribute("inputmode","none"),l.setAttribute("aria-hidden","true"));const m=document.activeElement;i.focus(),i.blur(),m&&m!==document.body&&typeof m.focus=="function"&&m.focus()}function tO(i,s,l,m){const S=s==null?void 0:s.querySelector(".xterm-helper-textarea");if(l){S&&(S.readOnly=!1,S.tabIndex=0,S.removeAttribute("inputmode"),S.removeAttribute("aria-hidden")),m&&i.focus();return}eO(i,s)}function nO(){var s;const i=((s=navigator.userAgentData)==null?void 0:s.platform)||navigator.platform||"";return/mac|iphone|ipad|ipod/i.test(i)}const iO=M.forwardRef(function({pane:s,inset:l=0,desktop:m=!1,autoFocusInput:S=!0,onAuthFail:D,onDocLinkTap:b,onTap:a,onRequestDraft:d,onInputFocusChange:f,onInputData:w},h){const _=M.useRef(null),N=M.useRef(null),C=M.useRef(0),y=M.useRef(!1),c=M.useRef(!1),p=M.useRef(""),v=M.useRef(a);v.current=a;const g=M.useRef(d);g.current=d;const E=M.useRef(D);E.current=D;const R=M.useRef(f);R.current=f;const j=M.useRef(w);j.current=w;const A=M.useRef([]),k=M.useRef(null),L=M.useRef(null),O=M.useRef(!1),H=M.useRef(null),V=M.useRef(b);V.current=b;const B=M.useRef(uE()),q=M.useRef(null),ne=M.useRef(OM()),Y=M.useRef(null),[J,ee]=M.useState(!1),[P,W]=M.useState(!0),[Q,K]=M.useState(null),he=M.useRef(!1),[ce,ke]=M.useState(""),[we,re]=M.useState(null),G=M.useRef(!1),ge=M.useRef(!1),[de,pe]=M.useState(!1),[Ne,Ie]=M.useState(!1),{dbg:Ze,dbgVisible:ut,flash:At}=X2(N),[Ke,qt]=M.useState(""),[Ut,xe]=M.useState(!1),Ve=M.useRef(null),Xe=M.useRef(!1),Te=M.useRef(!1),lt=M.useRef(!1),dt=M.useRef(0),$=M.useRef(null),at=M.useRef(!1),De=M.useRef(null);M.useImperativeHandle(h,()=>({getSize:()=>{const Le=N.current;return Le?{cols:Le.cols,rows:Le.rows}:null},flash:At,getFontSize:()=>{const Le=N.current;return Le?{size:Le.options.fontSize,auto:ne.current==null}:null},setFontSize:Le=>{var Kt;const ve=N.current;if(!ve)return null;const xt=Math.max(8,Math.min(40,Math.round(Le)));return ve.options.fontSize=xt,ne.current=xt,sd(xt),(Kt=Ve.current)==null||Kt.call(Ve),xt},autoFont:()=>{var ve;const Le=N.current;Le&&(Le.options.fontSize=14,ne.current=null,VM(),(ve=Ve.current)==null||ve.call(Ve))},wake:()=>{var Le;return(Le=$.current)==null?void 0:Le.call($)},inputFailed:Le=>{K((Le==null?void 0:Le.serverError)==="pane not found"?"pane-missing":"disconnected"),W(!1)},focusInput:()=>{var Le;return(Le=N.current)==null?void 0:Le.focus()},blurInput:()=>{var Le;return(Le=N.current)==null?void 0:Le.blur()},setDocHighlight:Le=>{var ve;B.current=!!Le,(ve=q.current)==null||ve.call(q)}}),[]),M.useEffect(()=>{var ve;const Le=C.current;C.current=l,l>0&&Le===0&&(c.current=!0),l===0&&Le>0&&(lt.current=!0),(ve=Ve.current)==null||ve.call(Ve),l===0&&(c.current=!1)},[l]),M.useEffect(()=>{var Ws,Gs;let Le=!1;const ve=new m2.Terminal({disableStdin:!m,allowProposedApi:!0,scrollback:ef+100,convertEol:!1,fontSize:ne.current??14,fontFamily:"ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Cascadia Mono', 'Roboto Mono', 'Noto Sans Mono', 'DejaVu Sans Mono', 'Courier New', 'JetBrainsMono Nerd Font', 'TW Unifont', monospace",theme:{selectionBackground:"rgba(10,132,255,0.9)",selectionForeground:"#ffffff"},cursorInactiveStyle:"block",linkHandler:{activate:(ue,$e)=>{const Je=IE($e)[0];if(Je&&V.current){V.current({kind:"url",protocol:Je.protocol,port:Je.port,urlPath:Je.path,raw:Je.raw,path:Je.raw},(ue==null?void 0:ue.clientX)??0,(ue==null?void 0:ue.clientY)??0);return}try{window.open($e,"_blank","noopener,noreferrer")}catch{}}}});ve.open(_.current),N.current=ve,ve.attachCustomKeyEventHandler(ue=>{var Gt,dn,ri,Jt,Jn,Gn,Ti,hr;if(m&&((Gt=ue.key)==null?void 0:Gt.toLowerCase())==="v"&&!ue.altKey&&(nO()?ue.metaKey&&!ue.ctrlKey:ue.ctrlKey&&!ue.metaKey))return!1;const rt=m&&((dn=ue.key)==null?void 0:dn.toLowerCase())==="c"&&((ri=ve.hasSelection)==null?void 0:ri.call(ve)),ht=rt&&ue.metaKey&&!ue.ctrlKey&&!ue.altKey,Wt=rt&&ue.ctrlKey&&ue.shiftKey&&!ue.metaKey&&!ue.altKey;if(ht||Wt){if(Wt){(Jt=ue.preventDefault)==null||Jt.call(ue);const ks=ve.getSelection(),Yr=()=>{try{document.execCommand("copy")}catch{}};try{const qs=(Gn=(Jn=navigator.clipboard)==null?void 0:Jn.writeText)==null?void 0:Gn.call(Jn,ks);qs?Promise.resolve(qs).catch(Yr):Yr()}catch{Yr()}}return!1}return m&&ue.key==="Enter"&&ue.shiftKey&&!ue.ctrlKey&&!ue.altKey&&!ue.metaKey&&!ue.isComposing?((Ti=ue.preventDefault)==null||Ti.call(ue),(hr=g.current)==null||hr.call(g),!1):!(ue.metaKey&&["w","t","l","r"].includes(ue.key.toLowerCase()))});const xt=m?ve.onData(ue=>{var $e;return($e=j.current)==null?void 0:$e.call(j,s,ue)}):null;let Kt=!1;const ot=m?ve.onSelectionChange(()=>{var $e;if(Le)return;ve.hasSelection()?(Kt=!0,he.current=!0,re(null),ke("")):Kt&&(Kt=!1,he.current=!1,($e=$.current)==null||$e.call($))}):null,Tt=m?(Ws=_.current)==null?void 0:Ws.querySelector(".xterm-helper-textarea"):null,Qt=()=>{var ue;Le||(ue=R.current)==null||ue.call(R,!0)},Vt=()=>{var ue;Le||(ue=R.current)==null||ue.call(R,!1)};Tt==null||Tt.addEventListener("focus",Qt),Tt==null||Tt.addEventListener("blur",Vt),tO(ve,_.current,m,S);const Fn=ve.registerLinkProvider({provideLinks(ue,$e){if(!V.current){$e(void 0);return}const Je=V2(ve,ue).map(rt=>({range:rt.range,text:rt.raw??rt.path,decorations:{pointerCursor:!0,underline:!1},activate:ht=>{var Wt;return(Wt=V.current)==null?void 0:Wt.call(V,rt,(ht==null?void 0:ht.clientX)??0,(ht==null?void 0:ht.clientY)??0)}}));$e(Je.length?Je:void 0)}});let mn=null;const xi=()=>{try{mn=new f2.WebglAddon,mn.onContextLoss(()=>mn.dispose()),ve.loadAddon(mn)}catch{mn=null}};xi();let ci=null,Hn=!1,vi=!1,Yn=!1;G.current=!1,ge.current=!1,pe(!1),he.current=!1,re(null),ke("");const st=()=>Math.min(ef,Math.max(24,ve.rows+Z2));let tn=st(),Pt=!0,Tn=0,Sn=null,zn="",ae=null,Be=0,et=null,Ct=null,jt=Date.now();ee(!1),xe(!1);let Rt=!1;const Lt=()=>{Le||Rt||(Rt=!0,requestAnimationFrame(()=>{Le||xe(!0)}))};let Nt=A2;const $n=ue=>{Nt=ue,ue.connected&&K(null),W(ue.connected)};G2(ne.current??14).then(()=>{if(!(Le||!mn)){try{mn.dispose()}catch{}xi(),ve.refresh(0,ve.rows-1)}});const Bt=()=>ve.buffer.active,fn=(ue="")=>{const $e=Bt();qt(Yn&&!Xn()&&!G.current?`历史模式 · 距底 ${$e.baseY-$e.viewportY}/${$e.baseY} 行${Hn?" · 拉取中":""}${ue}`:"")},ni=()=>Bt().viewportY>=Bt().baseY,Xn=()=>Bt().baseY-Bt().viewportY<=Q2,Ui=()=>Bt().viewportY<=3,wn=()=>{!Yn||Hn||!Pt||tn>=ef||!Ui()||(Pt=!1,Di(),tn=Math.min(Math.floor(tn/qb)*qb+qb,ef),fn(" · 拉取↑"),pn(tn,!0,!0))};let gi=0;const Ni=()=>{k.current&&(k.current.deco.dispose(),k.current.marker.dispose(),k.current=null)},Ht=()=>{if(Le)return;const ue=ae,$e=ve.buffer.active;if(!(ue&&(ue.vis||at.current)&&G.current&&$e.viewportY<$e.baseY)){Ni(),ve.write(N2(ue,ve.rows,Be,at.current)),Si();return}ve.write("\x1B[?25l"),Ni();const rt=Be-1-(ue.row|0),ht=ve.registerMarker(rt-($e.baseY+$e.cursorY));if(!ht){Si();return}const Wt=ve.registerDecoration({marker:ht,x:Math.max(0,ue.col|0),width:1});if(!Wt){ht.dispose(),Si();return}Wt.onRender(Gt=>{Gt.classList.add("cursor-deco")}),k.current={deco:Wt,marker:ht},Si()},Gi=()=>{L.current&&(L.current.deco.dispose(),L.current.marker.dispose(),L.current=null)},Si=()=>{Gi();const ue=ae;if(Le||!O.current||!G.current||!ue)return;const $e=ve.buffer.active,Je=Be-1-(ue.row|0),rt=ve.registerMarker(Je-($e.baseY+$e.cursorY));if(!rt)return;const ht=ve.registerDecoration({marker:rt,x:0,width:ve.cols});if(!ht){rt.dispose();return}ht.onRender(Wt=>{Wt.classList.add("locate-deco")}),L.current={deco:ht,marker:rt}};H.current=Si;const pt=()=>{if(Le||!et||et.alt)return Promise.resolve();const{seed:ue,contentRows:$e}=et,Je=$e<ve.rows?F1($e,ve.rows):0;if($e+Je===Be)return Promise.resolve();const rt=Je?`
|
|
278
|
+
`.repeat(Je)+ue:ue;return Be=rt.split(`
|
|
279
|
+
`).length,new Promise(ht=>ve.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+rt,()=>{if(!Le){ve.scrollToBottom();try{Xt(ve)}catch{}}ht()}))},ie=(ue=0)=>{var Jt;if(Le||!_.current||!ve.rows)return;const $e=_.current.getBoundingClientRect(),Je=Math.min($e.bottom,window.innerHeight-(C.current||0)),rt=Math.max($e.top,0),ht=Math.max(0,Je-rt),Wt=_.current.querySelector(".xterm-screen"),Gt=Wt?Wt.getBoundingClientRect().height:0;if(!ht||!Gt)return;(Jt=_.current.parentElement)==null||Jt.style.setProperty("--vis-h",`${ht}px`),C.current===0&&(dt.current=ht);const dn=Gt/ve.rows;if(Xe.current&&gi){Xe.current=!1;const Jn=ve.options.fontSize||14,Gn=Math.max(8,Math.min(40,Math.round(Jn*(dt.current||ht)/(gi*dn))));if(Te.current=!0,ne.current=Gn,sd(Gn),Gn!==Jn){ve.options.fontSize=Gn,requestAnimationFrame(()=>ie(ue));return}}if(Te.current&&gi){const Jn=Math.floor((dt.current||ht)/dn),Gn=ve.options.fontSize||14;if(Jn<gi&&Gn>8){ne.current=Gn-1,sd(Gn-1),ve.options.fontSize=Gn-1,requestAnimationFrame(()=>ie(ue));return}Te.current=!1,ne.current=Gn,sd(Gn)}if(C.current===0&&ne.current==null&&gi&&ue<4){const Jn=gi*dn;if(Jn>ht+4){const Gn=ve.options.fontSize||14,Ti=Math.max(6,Math.round(Gn*(ht/Jn)));if(Ti<Gn){ve.options.fontSize=Ti,requestAnimationFrame(()=>ie(ue+1));return}}}const ri=P2(ht,dn);if(ri!==ve.rows){ve.write(`\x1B[?25l\x1B[${ve.rows};1H`,()=>{if(!Le){if(ve.resize(ve.cols,ri),G.current){const Jn=B1(ae,Be),Gn=()=>{const Ti=Jn==null?null:H1({cursorLine:Jn,viewportY:Bt().viewportY,visibleRows:ve.rows,baseY:Bt().baseY,armed:!0});Ti!=null&&ve.scrollToLine(Ti)};C.current>0?(ve.scrollToTop(),Gn()):lt.current?(lt.current=!1,Gn()):ve.scrollToTop()}else ve.scrollToBottom();ue<4?requestAnimationFrame(()=>ie(ue+1)):pt().then(()=>{Le||(Ht(),Lt())})}});return}pt().then(()=>{Le||(Ht(),Lt())})},Re=()=>requestAnimationFrame(()=>ie(0));Ve.current=Re;const nt=()=>Re();window.addEventListener("resize",nt),window.addEventListener("orientationchange",nt);let hn=((Gs=_.current)==null?void 0:Gs.clientHeight)||0;const Ft=typeof ResizeObserver<"u"?new ResizeObserver(()=>{var Je;const ue=((Je=_.current)==null?void 0:Je.clientHeight)||0;if(!ue)return;const $e=ue>hn;hn=ue,$e&&Re()}):null;Ft&&_.current&&Ft.observe(_.current);const $t=(ue,$e)=>{var ri;const Je=(ri=_.current)==null?void 0:ri.querySelector(".xterm-screen");if(!Je||!ve.cols||!ve.rows)return null;const rt=Je.getBoundingClientRect(),ht=rt.width/ve.cols,Wt=rt.height/ve.rows;if(!ht||!Wt)return null;const Gt=Math.max(0,Math.min(ve.cols-1,Math.floor((ue-rt.left)/ht))),dn=Math.max(0,Math.min(ve.rows-1,Math.floor(($e-rt.top)/Wt)));return{col:Gt,row:Bt().viewportY+dn}};let vn=null;const ai=()=>{var rt;const ue=(rt=ve.getSelectionPosition)==null?void 0:rt.call(ve);if(!ue)return null;let $e=ue.end.x-1,Je=ue.end.y;return $e<0&&(Je-=1,$e=ve.cols-1),{start:{col:ue.start.x,row:ue.start.y},end:{col:$e,row:Je}}},Wn=()=>{var Gn;const ue=ai(),$e=(Gn=_.current)==null?void 0:Gn.querySelector(".xterm-screen");if(!ue||!$e){re(null),ke("");return}const Je=$e.getBoundingClientRect(),rt=_.current.parentElement.getBoundingClientRect(),ht=Je.width/ve.cols,Wt=Je.height/ve.rows,Gt=Bt().viewportY,dn={x:Je.left-rt.left,y:Je.top-rt.top},ri=z1(ue.start.col,ue.start.row,Gt,ht,Wt),Jt=z1(ue.end.col+1,ue.end.row,Gt,ht,Wt);re({start:{x:ri.x+dn.x,y:ri.y+dn.y,ch:Wt},end:{x:Jt.x+dn.x,y:Jt.y+dn.y,ch:Wt},wrapW:rt.width});const Jn=ve.getSelection();if(Jn){const{lines:Ti,chars:hr}=q2(Jn);ke(`复制模式 · ${Ti} 行 · ${hr} 字`)}else ke("")},rr=()=>ai(),En=ue=>{var $e;return(($e=Bt().getLine(ue))==null?void 0:$e.translateToString(!0))??""},Oi=ue=>{if(!ue)return;const $e=ve.cols,Je=ue.end.row*$e+ue.end.col-(ue.start.row*$e+ue.start.col)+1;ve.select(ue.start.col,ue.start.row,Je),Wn()};De.current={currentRange:rr,paraLineText:En,selectRange:Oi};const ji=(ue,$e)=>{var Gt,dn;const Je=$t(ue,$e);if(!Je)return;const rt=((Gt=Bt().getLine(Je.row))==null?void 0:Gt.translateToString(!1))??"";let ht=Je.col,Wt=Je.col;if(/\S/.test(rt[Je.col]||"")){for(;ht>0&&/\S/.test(rt[ht-1]);)ht--;for(;Wt<ve.cols-1&&/\S/.test(rt[Wt+1]);)Wt++}vn={col:ht,row:Je.row},he.current=!0,re(null),ve.select(ht,Je.row,Wt-ht+1),Wn(),(dn=navigator.vibrate)==null||dn.call(navigator,12)},Ar=(ue,$e)=>{var Je,rt;return((rt=(Je=Bt().getLine(Math.floor(ue/$e)))==null?void 0:Je.getCell(ue%$e))==null?void 0:rt.getWidth())??1},qi=(ue,$e)=>ue>0&&Ar(ue,$e)===0?ue-1:ue,Gr=(ue,$e)=>Ar(ue,$e)===2?ue+1:ue,ms=(ue,$e)=>{const Je=$t(ue,$e);if(!Je||!vn)return;const rt=ve.cols,ht=vn.row*rt+vn.col,Wt=Je.row*rt+Je.col,Gt=qi(Math.min(ht,Wt),rt),dn=Gr(Math.max(ht,Wt),rt);ve.select(Gt%rt,Math.floor(Gt/rt),dn-Gt+1),Wn()},fs=()=>{vn=null,he.current=!1,re(null),ke(""),ve.clearSelection()},wi=_.current;let se=0,Me=0,tt=0,vt=0,Dt=!1,Vi=0,Ii=0,ft=!1,ui=!1,An=null;const di=()=>{An&&(clearTimeout(An),An=null)},hi=ue=>Math.hypot(ue[0].clientX-ue[1].clientX,ue[0].clientY-ue[1].clientY);let ii=0,cn=0,un=0,sr=0,Kn=0,Vn=null;const Di=()=>{Vn!=null&&(cancelAnimationFrame(Vn),Vn=null)};Y.current=Di;const ps=(ue,$e,Je)=>{if(!ue)return;let rt=Je,ht=null;const Wt=Gt=>{if(ht==null){ht=Gt,Vn=requestAnimationFrame(Wt);return}const dn=Gt-ht;ht=Gt;const ri=T2(rt,dn);rt=ri.v;const Jt=ue[$e];ue[$e]=Jt+ri.delta;const Jn=Math.abs(ri.delta)>=1&&ue[$e]===Jt;if($e==="scrollTop"&&(fn(),wn()),ri.done||Jn||Vn==null){Vn=null;return}Vn=requestAnimationFrame(Wt)};Vn=requestAnimationFrame(Wt)},Mr=22,fa=12;let jn=0,vs=0,rn=0,ki=!1;const Sr=async()=>{var Je;if(ki||rn===0)return;ki=!0;const ue=p2(rn),$e=Math.min(Math.abs(rn),40);rn=0;try{ge.current?await bU(s,ue,$e):await _d(s,Array($e).fill(ue==="up"?"Up":"Down")),(Je=$.current)==null||Je.call($)}catch{}finally{ki=!1,rn!==0&&Sr()}},$s=ue=>{if(jt=Date.now(),di(),Di(),Pt=!0,ui=he.current,ft=!1,ue.touches.length===2){Dt=!0,vt=-1,Vi=hi(ue.touches),Ii=ve.options.fontSize||14;return}if(Dt=!1,ue.touches.length!==1){vt=-1;return}se=ue.touches[0].clientX,Me=ue.touches[0].clientY,tt=wi.scrollLeft,vt=0,ii=se,cn=Me,un=ue.timeStamp,sr=0,Kn=0,vs=Me,jn=0,An=setTimeout(()=>{An=null,ft=!0,vt=-1,ji(se,Me)},500)},qr=ue=>{if(Dt&&ue.touches.length===2){if(Vi>0){const rt=Math.max(8,Math.min(40,Math.round(Ii*(hi(ue.touches)/Vi))));rt!==(ve.options.fontSize||14)&&(ve.options.fontSize=rt,ne.current=rt)}ue.preventDefault(),ue.stopPropagation();return}if(ft&&ue.touches.length===1){ms(ue.touches[0].clientX,ue.touches[0].clientY),ue.preventDefault(),ue.stopPropagation();return}if(ue.touches.length===1&&(fn(),wn()),ue.touches.length!==1)return;const $e=ue.touches[0].clientX-se,Je=ue.touches[0].clientY-Me;if((Math.abs($e)>6||Math.abs(Je)>6)&&di(),vt===0){if(Math.abs($e)<6&&Math.abs(Je)<6)return;vt=Math.abs($e)>Math.abs(Je)?1:-1}if(vt===1){wi.scrollLeft=tt-$e;const rt=ue.touches[0].clientX,ht=ue.timeStamp-un;ht>0&&(sr=(ii-rt)/ht),ii=rt,un=ue.timeStamp,ue.preventDefault(),ue.stopPropagation()}else{if(G.current){ue.preventDefault(),ue.stopPropagation();const Wt=ue.touches[0].clientY,Gt=Wt-vs;vs=Wt;const dn=_.current.querySelector(".xterm-viewport"),ri=Gt>0?-1:1;if(dn&&I1(Bt().viewportY,Bt().baseY,ri)==="internal"){dn.scrollTop-=Gt,y.current=!0;return}const{notches:Jt,rem:Jn}=O1(jn+Gt,fa);jn=Jn,Jt&&(rn+=Jt,Sr());return}const rt=ue.touches[0].clientY,ht=ue.timeStamp-un;ht>0&&(Kn=(cn-rt)/ht),cn=rt,un=ue.timeStamp}},Cs=ue=>{var $e;if(di(),ft&&ue.touches.length===0){ft=!1;const Je=ve.getSelection();Je&&Je.trim()?Wn():fs();return}if(Dt&&ue.touches.length<2){Dt=!1,sd(ve.options.fontSize||14),Re();return}ue.touches.length===0&&L2(vt===1?sr:Kn,ue.timeStamp-un)&&(vt===1?ps(wi,"scrollLeft",sr):vt===-1&&ps(wi.querySelector(".xterm-viewport"),"scrollTop",Kn)),ue.touches.length===0&&!ft&&!Dt&&vt===0&&(ui?fs():($e=v.current)==null||$e.call(v))},js=ue=>{if(ue.deltaY){if(G.current){ue.preventDefault(),ue.stopPropagation();const $e=ue.deltaMode===1?ue.deltaY*Mr:ue.deltaMode===2?ue.deltaY*ve.rows*Mr:ue.deltaY,{notches:Je,rem:rt}=O1(jn-$e,Mr);jn=rt,Je&&(rn+=Je,Sr());return}ue.timeStamp-Tn>200&&(Pt=!0),Tn=ue.timeStamp,fn(),wn()}},ns=ue=>{var $e;if(m){($e=v.current)==null||$e.call(v);return}V1(document.activeElement)&&ue.cancelable&&ue.preventDefault()};wi.addEventListener("pointerdown",ns,{capture:!0}),wi.addEventListener("wheel",js,{capture:!0,passive:!1}),wi.addEventListener("touchstart",$s,{capture:!0,passive:!0}),wi.addEventListener("touchmove",qr,{capture:!0,passive:!1}),wi.addEventListener("touchend",Cs,{capture:!0,passive:!0});const Ei=_.current.parentElement;let Er=null,Ur=null,Ri=null,z=null,oe=0,Se=0;const Ae=(ue,$e)=>{const Je=$t(ue,$e);if(!Je||Ur==null)return;const rt=ve.cols,ht=Je.row*rt+Je.col,Wt=Er==="start"?ht:ht+1;let Gt=Math.min(Ur,Wt),dn=Math.max(Ur,Wt);dn<=Gt&&(dn=Gt+1),Gt=qi(Gt,rt),dn=Gr(dn-1,rt)+1,ve.select(Gt%rt,Math.floor(Gt/rt),dn-Gt),Wn()},it=ue=>{var rt,ht,Wt;const $e=(ht=(rt=ue.target).closest)==null?void 0:ht.call(rt,".sel-handle");if(!$e)return;Er=$e.dataset.end;const Je=ai();if(Je){const Gt=ve.cols,dn=Je.start.row*Gt+Je.start.col,ri=Je.end.row*Gt+Je.end.col;Ur=Er==="start"?ri+1:dn}else Ur=null;ue.preventDefault(),ue.stopPropagation(),(Wt=Ei.setPointerCapture)==null||Wt.call(Ei,ue.pointerId)},It=ue=>{if(!Er||Ur==null)return;Ae(ue.clientX,ue.clientY);const $e=28;z={x:ue.clientX,y:ue.clientY};const Je=mi.getBoundingClientRect();let rt=0;if(ue.clientY<Je.top+$e?(oe=-1,rt=Je.top+$e-ue.clientY):ue.clientY>Je.bottom-$e?(oe=1,rt=ue.clientY-(Je.bottom-$e)):oe=0,Se=Math.min(14,2+rt*.28),oe!==0&&Ri==null){const ht=()=>{if(!Er||oe===0){Ri=null;return}const Wt=mi.scrollTop;if(mi.scrollTop=Wt+oe*Se,Ae(z.x,z.y),mi.scrollTop===Wt){Ri=null;return}Ri=requestAnimationFrame(ht)};Ri=requestAnimationFrame(ht)}else oe===0&&Ri!=null&&(cancelAnimationFrame(Ri),Ri=null);ue.preventDefault()},_t=ue=>{var $e;Er&&(Er=null,Ur=null,oe=0,Ri!=null&&(cancelAnimationFrame(Ri),Ri=null),($e=Ei.releasePointerCapture)==null||$e.call(Ei,ue.pointerId))};Ei.addEventListener("pointerdown",it,{capture:!0}),Ei.addEventListener("pointermove",It,{capture:!0}),Ei.addEventListener("pointerup",_t,{capture:!0}),Ei.addEventListener("pointercancel",_t,{capture:!0});const Xt=ue=>{for(const{deco:rt,marker:ht}of A.current)rt.dispose(),ht.dispose();if(A.current=[],!V.current||!B.current)return;const $e=ue.buffer.active,Je=$e.baseY+$e.cursorY;for(const{y:rt,x:ht,width:Wt}of O2(ue)){const Gt=ue.registerMarker(rt-Je);if(!Gt)continue;const dn=ue.registerDecoration({marker:Gt,x:ht,width:Wt});if(!dn){Gt.dispose();continue}dn.onRender(ri=>{ri.classList.add("doc-deco")}),A.current.push({deco:dn,marker:Gt})}};q.current=()=>{!Le&&Yn&&Xt(ve)};const pn=async(ue,$e,Je=!1)=>{var dn,ri;if(Hn||Le)return;Hn=!0;const rt=$e&&Je?(dn=_.current)==null?void 0:dn.querySelector(".xterm-viewport"):null,ht=rt&&Bt().length?rt.scrollHeight/Bt().length:0,Wt=ht?Math.floor(rt.scrollTop/ht):Bt().viewportY,Gt=$e?Bt().length-Wt:0;try{const Jt=await fU(s,ue,Ct);if(Le||($n(Wb(Nt,"ok")),he.current))return;if(Jt.unchanged){ee($e);return}Ct=Jt.hash,G.current=!!Jt.alt,ge.current=!!Jt.mouseAware,pe(Yi=>Yi===!!Jt.alt?Yi:!!Jt.alt),jt=Date.now();let Jn=!1;Jt.width&&Jt.width!==ve.cols&&(ve.resize(Jt.width,ve.rows),Jn=!0);const Gn=gi;Jt.height&&(gi=Jt.height);const Ti=!Yn,hr=Jt.cur?`${Jt.cur.row},${Jt.cur.col},${Jt.cur.vis?1:0}`:"";if(!Jn&&!Ti&&Jt.ansi===Sn&&hr===zn){ee($e);return}const ks=x2(Jt.ansi),Yr=ks?ks.split(`
|
|
280
|
+
`).length:0;et={seed:ks,contentRows:Yr,alt:Jt.alt};const qs=!Jt.alt&&Yr<ve.rows?F1(Yr,ve.rows):0,Bi=qs?`
|
|
281
|
+
`.repeat(qs)+ks:ks;if(Be=Bi?Bi.split(`
|
|
282
|
+
`).length:0,await new Promise(Yi=>ve.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Bi,Yi)),Le)return;if(Sn=Jt.ansi,zn=hr,ae=Jt.cur,Jt.cur&&Jt.cur.vis&&(at.current=!1),$e?ve.scrollToLine(Math.max(0,Bt().length-Gt)):G.current&&Ti?ve.scrollToTop():ve.scrollToBottom(),G.current&&C.current>0){hr!==p.current&&(Ti||(c.current=!0),p.current=hr);const Yi=B1(Jt.cur,Be);if(Yi!=null){const si=H1({cursorLine:Yi,viewportY:Bt().viewportY,visibleRows:ve.rows,baseY:Bt().baseY,armed:c.current});si!=null&&ve.scrollToLine(si)}}Yn=!0;try{Xt(ve)}catch{}ee($e),Ht(),(Jn||Ti||gi!==Gn)&&Re(),Ti&&setTimeout(Lt,400)}catch(Jt){Jt instanceof $i?(ri=E.current)==null||ri.call(E):Le||$n(Wb(Nt,"fail"))}finally{Hn=!1,!Le&&Yn&&fn(),vi&&!Le&&(vi=!1,nn())}},Ln=async()=>{if(!(Hn||Le)&&!he.current){if(Yn&&!Xn()&&!G.current){ee(!0);return}tn=st(),await pn(tn,!ni())}};let xn=0;async function Pn(ue){if(!Le&&ue===xn&&await Ln(),Le||document.hidden||ue!==xn)return;const $e=Nt.failCount>0?S2(Nt.failCount):C2(Date.now()-jt);ci=setTimeout(()=>Pn(ue),$e)}const nn=()=>{xn+=1,ci&&(clearTimeout(ci),ci=null),Pn(xn)};nn();const oi=()=>{if(jt=Date.now(),at.current=!0,Ht(),Hn){vi=!0;return}nn()};$.current=oi;const bi=()=>{document.hidden?(xn+=1,ci&&(clearTimeout(ci),ci=null)):($n(Wb(Nt,"reset")),tn=st(),jt=Date.now(),nn())};document.addEventListener("visibilitychange",bi);const Ds=ve.onScroll(()=>{if(!Le){if(ni()){ee(!1),qt("");return}ee(!0),fn(),wn()}}),mi=_.current.querySelector(".xterm-viewport"),Or=()=>{!m&&he.current&&Wn()};return mi==null||mi.addEventListener("scroll",Or,{passive:!0}),()=>{Le=!0,Ri!=null&&cancelAnimationFrame(Ri),Ve.current=null,$.current=null,Y.current=null,q.current=null,De.current=null,di(),Di(),ci&&clearTimeout(ci),document.removeEventListener("visibilitychange",bi),window.removeEventListener("resize",nt),window.removeEventListener("orientationchange",nt),Ft==null||Ft.disconnect(),wi.removeEventListener("pointerdown",ns,{capture:!0}),wi.removeEventListener("wheel",js,{capture:!0}),wi.removeEventListener("touchstart",$s,{capture:!0}),wi.removeEventListener("touchmove",qr,{capture:!0}),wi.removeEventListener("touchend",Cs,{capture:!0}),Ei.removeEventListener("pointerdown",it,{capture:!0}),Ei.removeEventListener("pointermove",It,{capture:!0}),Ei.removeEventListener("pointerup",_t,{capture:!0}),Ei.removeEventListener("pointercancel",_t,{capture:!0}),mi==null||mi.removeEventListener("scroll",Or),xt==null||xt.dispose(),ot==null||ot.dispose(),Tt==null||Tt.removeEventListener("focus",Qt),Tt==null||Tt.removeEventListener("blur",Vt),Ds.dispose(),Fn.dispose();for(const{deco:ue,marker:$e}of A.current)ue.dispose(),$e.dispose();A.current=[],Ni(),Gi(),H.current=null,ve.dispose(),N.current=null}},[s,m]);const We=()=>{var ve,xt,Kt,ot;(ve=Y.current)==null||ve.call(Y);const Le=(xt=_.current)==null?void 0:xt.querySelector(".xterm-viewport");Le&&(Le.scrollTop=Le.scrollHeight),(Kt=N.current)==null||Kt.scrollToBottom(),ee(!1),qt(""),(ot=$.current)==null||ot.call($)},be=async Le=>{var ot;const ve=N.current,xt=ve==null?void 0:ve.buffer.active,Kt=Le==="up"?-1:1;if(ve&&xt&&I1(xt.viewportY,xt.baseY,Kt)==="internal"){ve.scrollLines(Kt*Math.max(1,ve.rows-1)),y.current=!0;return}try{await _d(s,[Le==="up"?"PageUp":"PageDown"]),(ot=$.current)==null||ot.call($)}catch{}},Pe=()=>{var ve;const Le=!Ne;Ie(Le),O.current=Le,(ve=H.current)==null||ve.call(H)},He=()=>{var Le;Xe.current=!0,(Le=Ve.current)==null||Le.call(Ve)},Ot=async()=>{const Le=N.current,ve=zE((Le==null?void 0:Le.getSelection())??"");if(ve){let xt=!1;if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText(ve),xt=!0}catch{}if(!xt){const Kt=document.createElement("textarea");Kt.value=ve,Kt.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(Kt),Kt.focus(),Kt.select();try{document.execCommand("copy")}catch{}document.body.removeChild(Kt)}}Le==null||Le.clearSelection(),he.current=!1,re(null),ke("")};return o.jsxDEV("div",{className:"terminal-wrap",children:[o.jsxDEV("div",{ref:_,className:`terminal${Ut?"":" terminal--loading"}${m?" desktop-input":""}`},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1546,columnNumber:7},this),!Ut&&o.jsxDEV(PE,{hint:U("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1550,columnNumber:18},this),!P&&o.jsxDEV("div",{className:"term-banner term-banner--err",children:["⚠ ",U(Q==="pane-missing"?"terminal.paneMissing":"terminal.disconnected")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1552,columnNumber:9},this),ut&&o.jsxDEV("div",{className:"dbg",children:Ze},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1556,columnNumber:22},this),P&&Ke&&!ce&&o.jsxDEV("div",{className:"term-banner term-banner--hist",children:Ke},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1557,columnNumber:47},this),ce&&o.jsxDEV("div",{className:"term-banner term-banner--sel",children:ce},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1558,columnNumber:19},this),Ke&&o.jsxDEV("button",{className:"new-output",onClick:We,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1559,columnNumber:22},this),de&&o.jsxDEV("div",{className:"term-pager",role:"group","aria-label":"翻页",onPointerDown:Le=>{V1(document.activeElement)&&Le.cancelable&&Le.preventDefault()},children:[o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"上翻页",onClick:()=>be("up"),children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:o.jsxDEV("path",{d:"M6 14.5l6-6 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1572,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1571,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1570,columnNumber:13},this),o.jsxDEV("span",{className:"term-pager-div","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1575,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"下翻页",onClick:()=>be("down"),children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:o.jsxDEV("path",{d:"M6 9.5l6 6 6-6",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1578,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1577,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1576,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1569,columnNumber:11},this),o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"适配高度",title:"适配高度",onClick:He,children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[o.jsxDEV("path",{d:"M5 4.5h14M5 19.5h14",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1585,columnNumber:17},this),o.jsxDEV("path",{d:"M12 8.5v7M9.8 10.8L12 8.5l2.2 2.3M9.8 13.2L12 15.5l2.2-2.3",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1586,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1584,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1583,columnNumber:13},this),o.jsxDEV("span",{className:"term-pager-div","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1589,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"定位光标行",title:"定位光标行","aria-pressed":Ne,onClick:Pe,children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[o.jsxDEV("path",{d:"M5 7h14M5 17h14",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",opacity:"0.7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1592,columnNumber:17},this),o.jsxDEV("rect",{x:"4",y:"10.5",width:"16",height:"3",rx:"1.5",fill:"currentColor"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1593,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1591,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1590,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1582,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1561,columnNumber:9},this),we&&(()=>{const Le=Math.min(we.start.x,we.end.x),ve=Math.min(we.start.y,we.end.y),xt=Math.max(we.start.y,we.end.y),Kt=Math.max(8,Math.min(Le,(we.wrapW??0)-J2-8)),ot=ve-44,Tt=xt+(we.start.ch||0)+8,Qt=ot<4?Tt:ot;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"sel-handle sel-handle--start",style:{left:we.start.x,top:we.start.y,"--h":`${we.start.ch}px`},"data-end":"start"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1611,columnNumber:11},this),o.jsxDEV("div",{className:"sel-handle sel-handle--end",style:{left:we.end.x,top:we.end.y,"--h":`${we.end.ch}px`},"data-end":"end"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1614,columnNumber:11},this),o.jsxDEV("div",{className:"sel-callout",style:{left:Kt,top:Qt},children:[o.jsxDEV("button",{type:"button",onClick:Ot,children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1619,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:()=>{const Vt=De.current;Vt&&Vt.selectRange(Y2(Vt.currentRange(),N.current.cols))},children:"整行"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1620,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:()=>{const Vt=De.current;if(!Vt)return;const Fn=N.current.buffer.active;Vt.selectRange(K2(Vt.currentRange(),N.current.cols,Vt.paraLineText,0,Fn.length-1))},children:"整段"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1624,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1617,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1610,columnNumber:9},this)})()]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1545,columnNumber:5},this)}),rO=[["esc","tab","tilde","slash","up","at","del"],["ctrl","shift","alt","left","down","right","enter"]],xd=["ctrl","shift","alt"],b_={kbd:"⌨",esc:"Esc",up:"▲",tab:"Tab",ctrl:"Ctrl",shift:"Shift",del:"⌫",left:"◀",down:"▼",right:"▶",alt:"Alt",slash:"/",tilde:"~",at:"@",enter:"Enter"},sO=new Set(["up","down","left","right","del"]),$1={esc:"Escape",tab:"Tab",del:"BSpace",enter:"Enter",up:"Up",down:"Down",left:"Left",right:"Right"},W1={slash:"/",tilde:"~",at:"@"};function aO(i){return i in $1?{kind:"key",name:$1[i]}:i in W1?{kind:"text",ch:W1[i]}:null}const __="off",Z_="armed",y_="locked",Va=i=>i===Z_||i===y_,oO=i=>xd.some(s=>Va(i[s]));function w_(i){const s={};for(const l of xd)s[l]=i[l]===Z_?__:i[l]??__;return s}function $E(i,s){if(!i||!oO(s))return i;const l=Va(s.ctrl),m=Va(s.shift),S=Va(s.alt);if(m&&i.kind==="key"){if(i.name==="Tab")return{kind:"key",name:"BTab"};if(["Up","Down","Left","Right"].includes(i.name))return{kind:"key",name:`S-${i.name}`}}return(l||S)&&i.kind==="text"&&/^[a-z0-9]$/i.test(i.ch)?{kind:"key",name:`${l?"C":"M"}-${i.ch.toLowerCase()}`}:i}const lO={up:"Up",down:"Down",left:"Left",right:"Right",enter:"Enter",ret:"Enter",return:"Enter",cr:"Enter",esc:"Escape",escape:"Escape",tab:"Tab",space:"Space",del:"BSpace",bs:"BSpace",bspace:"BSpace",backspace:"BSpace",home:"Home",end:"End",pgup:"PageUp",pageup:"PageUp",pgdn:"PageDown",pagedown:"PageDown"},cO={Escape:"Esc",BSpace:"⌫",Space:"Space",PageUp:"PgUp",PageDown:"PgDn"};function uO(i,s){const l=!!i.ctrl,m=!!i.shift,S=!!i.alt,D=(s||"").trim();if(!D)return null;const b=[];l&&b.push("Ctrl"),m&&b.push("Shift"),S&&b.push("Alt");const a=f=>[...b,f].join("+"),d=lO[D.toLowerCase()];return d?{name:d==="Tab"&&m&&!l&&!S?"BTab":(l?"C-":"")+(S?"M-":"")+(m?"S-":"")+d,label:a(cO[d]||d)}:D.length!==1||!l&&!S&&!m?null:l||S?{name:(l?"C-":"")+(S?"M-":"")+D.toLowerCase(),label:a(D.toUpperCase())}:{name:D.toUpperCase(),label:a(D.toUpperCase())}}function dO(i,{delay:s=400,interval:l=120}={}){let m=null,S=null;const D=()=>{m&&clearTimeout(m),S&&clearInterval(S),m=null,S=null};return{start:()=>{D(),i(),m=setTimeout(()=>{S=setInterval(i,l)},s)},stop:D}}const G1={up:"Up",down:"Down",left:"Left",right:"Right",tilde:"Tilde",slash:"Slash",at:"At",del:"Backspace"},WE=i=>{i.cancelable&&i.preventDefault()},hO=500;function mO({onKey:i,onText:s,mods:l,setMods:m,keyHeldRef:S}){const D=M.useRef(l);D.current=l;const b=d=>{const f=aO(d);if(!f)return;const w=xd.some(_=>Va(D.current[_])),h=w?$E(f,D.current):f;h.kind==="key"?i(h.name):s(h.ch),w&&m(w_)},a=d=>xd.includes(d)?o.jsxDEV(pO,{id:d,state:l[d],setMods:m},d,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:43,columnNumber:40},this):o.jsxDEV(vO,{id:d,dispatch:b,keyHeldRef:S},d,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:44,columnNumber:12},this);return o.jsxDEV("div",{className:"keybar-grid",children:rO.flat().map(a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:49,columnNumber:10},this)}const fO=300;function pO({id:i,state:s,setMods:l}){const m=M.useRef(-1/0),S=b=>{const a=b.timeStamp||0;if(a-m.current<fO){m.current=-1/0,l(d=>({...d,[i]:y_}));return}m.current=a,l(d=>({...d,[i]:Va(d[i])?__:Z_}))},D=s===y_?" locked":Va(s)?" armed":"";return o.jsxDEV("button",{type:"button",className:`keybar-key keybar-mod${D}`,"data-key":i,"data-state":s,"aria-pressed":Va(s),"aria-label":b_[i],onPointerDown:WE,onClick:S,children:b_[i]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:75,columnNumber:5},this)}function vO({id:i,dispatch:s,keyHeldRef:l}){const m=M.useRef(null),S=M.useRef(s);S.current=s;const D=M.useRef(null),b=N=>{l&&(l.current=N)},a=b_[i];if(!sO.has(i))return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":i,"aria-label":G1[i]||a,onPointerDown:WE,onClick:()=>s(i),children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:94,columnNumber:12},this);const d=()=>{const N=D.current;N!=null&&N.guard&&(clearTimeout(N.guard),N.guard=null)},f=N=>{N.cancelable&&N.preventDefault(),m.current||(m.current=dO(()=>S.current(i)));const C={x:N.clientX,y:N.clientY,held:!1,moved:!1,guard:null};C.guard=setTimeout(()=>{C.held=!0,C.guard=null,m.current.start()},hO),D.current=C,b(!0)},w=N=>{const C=D.current;!C||C.held||(Math.abs(N.clientX-C.x)>8||Math.abs(N.clientY-C.y)>8)&&(C.moved=!0,d(),b(!1))},h=()=>{const N=D.current;b(!1),N&&(d(),N.held?m.current.stop():N.moved||S.current(i),D.current=null)},_=()=>{var N;b(!1),d(),(N=D.current)!=null&&N.held&&m.current.stop(),D.current=null};return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":i,"aria-label":G1[i]||a,onPointerDown:f,onPointerMove:w,onPointerUp:h,onPointerCancel:_,onPointerLeave:_,children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:130,columnNumber:5},this)}const GE=i=>`hm_favs7_${i}`,gO=i=>`hm_favs6_${i}`,qE="command",x_=i=>i?`command@${i}`:qE,bO={command:[],agent:[]},q1={ESC:{kind:"key",text:"Escape",label:"Esc"},Esc:{kind:"key",text:"Escape",label:"Esc"},Tab:{kind:"key",text:"Tab",label:"Tab"},"⌫":{kind:"key",text:"BSpace",label:"⌫"}};function _O(i,s){return s.map(l=>l.kind!=="key"&&q1[l.text]?{...q1[l.text]}:l.kind==="key"?{kind:"key",text:l.text,label:l.label||l.text}:{kind:l.kind,text:l.text,enter:i==="agent"?!0:!!l.enter})}function ir(i){try{const s=localStorage.getItem(GE(i));if(s)return JSON.parse(s);const l=localStorage.getItem(gO(i));if(l){const m=_O(i,JSON.parse(l));return _o(i,m),m}}catch{}return(bO[i]||[]).map(s=>({...s}))}function _o(i,s){try{localStorage.setItem(GE(i),JSON.stringify(s))}catch{}return s}function Q_(i){return i.kind==="key"?{kind:"key",text:i.text,label:i.label}:{kind:i.kind,text:i.text,enter:!!i.enter}}function YE(i,s){const l=ir(i),m=yn(s);return l.some(D=>yn(D)===m)?{ok:!1,reason:"conflict",items:l}:{ok:!0,items:_o(i,[...l,Q_(s)])}}function yO(i,s){return YE(i,s).items}function wO(i,s){return _o(i,ir(i).filter(l=>l.text!==s))}function xO(i,s){return _o(i,ir(i).filter(l=>yn(l)!==s))}function KE(i,s,l){const m=ir(i),S=m.findIndex(a=>yn(a)===s);if(S<0)return{ok:!1,reason:"missing",items:m};const D=yn(l);if(m.some((a,d)=>d!==S&&yn(a)===D))return{ok:!1,reason:"conflict",items:m};const b=m.slice();return b[S]=Q_(l),{ok:!0,items:_o(i,b)}}function NO(i,s,l,m){if(i===l)return KE(i,s,m);const S=ir(i),D=ir(l);if(!S.some(f=>yn(f)===s))return{ok:!1,reason:"missing",source:S,target:D};const b=yn(m);if(D.some(f=>yn(f)===b))return{ok:!1,reason:"conflict",source:S,target:D};const a=_o(i,S.filter(f=>yn(f)!==s)),d=_o(l,[...D,Q_(m)]);return{ok:!0,source:a,target:d}}function SO(i,s,l){const m=ir(i),S=m.findIndex(a=>yn(a)===s),D=m.findIndex(a=>yn(a)===l);if(S<0||D<0||S===D)return m;const b=m.slice();return[b[S],b[D]]=[b[D],b[S]],_o(i,b)}const EO=i=>{var s;try{(s=navigator.clipboard)==null||s.writeText(i)}catch{}};function CO({open:i,mode:s,recent:l=[],onSend:m,onFill:S,onClose:D,onDelete:b,historyOnly:a=!1}){const[d,f]=M.useState(()=>ir(s)),w=M.useRef(null),[h,_]=M.useState(s);if(h!==s&&(_(s),f(ir(s))),!i)return null;const N=a?[]:d.filter(p=>p.kind==="reply"),C=a?[]:d.filter(p=>p.kind==="cmd"),y=()=>{var g;const p=(((g=w.current)==null?void 0:g.value)||"").trim();if(!p)return;const v=s==="agent"&&!p.startsWith("/")?"reply":"cmd";f(yO(s,{kind:v,text:p})),w.current&&(w.current.value="")},c=p=>f(wO(s,p));return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:35,columnNumber:7},this),o.jsxDEV("div",{className:`cmd-panel${a?" history":""}`,role:"dialog","aria-label":U("fav.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:U(a?"dock.history":"fav.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:38,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:D,"aria-label":U("common.close"),children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:39,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:37,columnNumber:9},this),o.jsxDEV("div",{className:"cmd-list",children:[a&&o.jsxDEV("div",{className:"cmd-hint",children:U("history.scope")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:42,columnNumber:27},this),N.length>0&&o.jsxDEV("div",{className:"fav-chips",children:N.map(p=>o.jsxDEV("span",{className:"fav-chip",onClick:()=>m(p.text),onContextMenu:v=>{v.preventDefault(),c(p.text)},children:p.text},p.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:46,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:44,columnNumber:13},this),C.map(p=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>m(p.text),onDoubleClick:()=>S(p.text),children:p.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:53,columnNumber:15},this),o.jsxDEV("button",{className:"cmd-del",onClick:()=>c(p.text),"aria-label":U("common.delete"),children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:54,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:54,columnNumber:15},this)]},p.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:52,columnNumber:13},this)),l.map(p=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>m(p),onDoubleClick:()=>S(p),children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:59,columnNumber:15},this),o.jsxDEV("button",{className:"cmd-copy",onClick:()=>EO(p),"aria-label":U("common.copy"),children:o.jsxDEV(wE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:60,columnNumber:104},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:60,columnNumber:15},this),b&&o.jsxDEV("button",{className:"cmd-del",onClick:()=>b(p),"aria-label":U("common.delete"),children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:62,columnNumber:107},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:62,columnNumber:17},this)]},`r:${p}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:58,columnNumber:13},this)),a&&l.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:U("history.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:66,columnNumber:50},this),!a&&o.jsxDEV("div",{className:"fav-add",children:[o.jsxDEV("input",{ref:w,className:"fav-add-input",placeholder:U("fav.addPlaceholder"),onKeyDown:p=>{p.key==="Enter"&&y()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:69,columnNumber:15},this),o.jsxDEV("button",{className:"fav-add-btn",onClick:y,children:U("fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:71,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:68,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:41,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:34,columnNumber:5},this)}const XE=i=>`hm_shortcut_layout1_${i}`,Y1=()=>({hidden:[],order:[]}),Nd=i=>[...new Set(Array.isArray(i)?i.filter(s=>typeof s=="string"&&s):[])],dl=i=>({hidden:Nd(i==null?void 0:i.hidden),order:Nd(i==null?void 0:i.order)});function el(i){try{const s=localStorage.getItem(XE(i));return s?dl(JSON.parse(s)):Y1()}catch{return Y1()}}function jO(i,s){const l=dl(s);try{localStorage.setItem(XE(i),JSON.stringify(l))}catch{}return l}function wc(i,s){const l=dl(s),m=new Set(l.hidden),S=new Map((Array.isArray(i)?i:[]).map(b=>[yn(b),b])),D=[];for(const b of l.order)m.has(b)||!S.has(b)||(D.push(S.get(b)),S.delete(b));for(const[b,a]of S)m.has(b)||D.push(a);return D}function DO(i,s,l,m){const S=dl(i),D=wc(s,i).map(yn),b=D.indexOf(l),a=b+(m<0?-1:1);if(b<0||a<0||a>=D.length)return S;[D[b],D[a]]=[D[a],D[b]];const d=new Set(S.hidden),f=new Set(D);let w=0;const h=[];for(const _ of S.order)d.has(_)?h.push(_):f.has(_)&&h.push(D[w++]);return h.push(...D.slice(w)),{...S,order:Nd(h)}}function kO(i,s,l){const m=dl(i),S=wc(s,m).map(yn);return{hidden:Nd([...m.hidden,l]),order:S}}function ud(i,s){const l=dl(i);return{...l,hidden:l.hidden.filter(m=>m!==s)}}function K1(i,s){const l=dl(i);return{hidden:l.hidden.filter(m=>m!==s),order:l.order.filter(m=>m!==s)}}function RO(i,s,l){const m=ud(i,l);return{hidden:m.hidden.filter(S=>S!==s),order:Nd(m.order.map(S=>S===s?l:S))}}const xf=[{key:"none",mods:{}},{key:"ctrl",label:"Ctrl",mods:{ctrl:!0}},{key:"shift",label:"Shift",mods:{shift:!0}},{key:"alt",label:"Alt",mods:{alt:!0}},{key:"ctrl-shift",label:"Ctrl+Shift",mods:{ctrl:!0,shift:!0}},{key:"ctrl-alt",label:"Ctrl+Alt",mods:{ctrl:!0,alt:!0}}],TO=i=>xf.find(s=>s.key===i)||xf[0],LO=[["Up","↑ Up"],["Down","↓ Down"],["Left","← Left"],["Right","→ Right"],["Tab","⇥ Tab"],["Enter","⏎ Enter"],["Escape","⎋ Esc"],["Space","␣ Space"],["BSpace","⌫ Backspace"],["Home","Home"],["End","End"],["PageUp","PgUp"],["PageDown","PgDn"]],AO=[...LO.map(([i,s])=>({value:i,label:s})),..."abcdefghijklmnopqrstuvwxyz".split("").map(i=>({value:i,label:i.toUpperCase()})),..."0123456789".split("").map(i=>({value:i,label:i}))];function MO(i){let s=i.text||"";if(s==="BTab")return{sticky:"shift",base:"Tab"};let l=!1,m=!1,S=!1;s.startsWith("C-")&&(l=!0,s=s.slice(2)),s.startsWith("M-")&&(m=!0,s=s.slice(2)),s.startsWith("S-")&&(S=!0,s=s.slice(2)),!l&&!m&&!S&&s.length===1&&s>="A"&&s<="Z"&&(S=!0);const D=xf.find(b=>!!b.mods.ctrl===l&&!!b.mods.shift===S&&!!b.mods.alt===m);return{sticky:D?D.key:"none",base:s.length===1?s.toLowerCase():s}}function X1({value:i,options:s,onChange:l,placeholder:m}){const[S,D]=M.useState(!1),b=s.find(a=>a.value===i);return o.jsxDEV("div",{className:"cmd-dd",children:[o.jsxDEV("button",{type:"button",className:`cmd-dd-btn${S?" open":""}`,onClick:()=>D(a=>!a),"aria-haspopup":"listbox","aria-expanded":S,children:[o.jsxDEV("span",{className:b?void 0:"cmd-dd-ph",children:b?b.label:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:70,columnNumber:9},this),o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:70,columnNumber:95},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:68,columnNumber:7},this),S&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-dd-scrim",onClick:()=>D(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:74,columnNumber:11},this),o.jsxDEV("div",{className:"cmd-dd-menu",role:"listbox",children:s.map(a=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":a.value===i,className:`cmd-dd-opt${a.value===i?" on":""}`,onClick:()=>{l(a.value),D(!1)},children:[o.jsxDEV("span",{children:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:80,columnNumber:17},this),a.value===i&&o.jsxDEV(K_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:81,columnNumber:39},this)]},a.value,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:77,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:75,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:73,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:67,columnNumber:5},this)}function UO({title:i,accent:s,items:l,showTitle:m=!0,onMove:S,onDel:D,onEdit:b}){return o.jsxDEV("div",{className:`cmd-esection ${s}`,children:[m&&o.jsxDEV("div",{className:`cmd-section ${s}`,children:o.jsxDEV("span",{className:"cmd-section-name",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:96,columnNumber:62},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:96,columnNumber:21},this),l.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:U("cmd.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:97,columnNumber:30},this),l.map((a,d)=>o.jsxDEV("div",{className:"cmd-row",children:[a.source==="config"?o.jsxDEV("span",{className:"cmd-text cmd-fav-text",children:[a.kind==="key"&&a.label||a.text,a.kind!=="key"&&a.enter&&o.jsxDEV("span",{className:"cmd-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:103,columnNumber:47},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:101,columnNumber:15},this):o.jsxDEV("button",{type:"button",className:"cmd-text cmd-fav-text",onClick:()=>b(a),children:[a.kind==="key"&&a.label||a.text,a.kind!=="key"&&a.enter&&o.jsxDEV("span",{className:"cmd-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:107,columnNumber:47},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:105,columnNumber:15},this),o.jsxDEV("button",{className:"cmd-move up",disabled:d===0,onClick:()=>S(a,-1),"aria-label":U("cmd.moveUp"),children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:110,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:109,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-move",disabled:d===l.length-1,onClick:()=>S(a,1),"aria-label":U("cmd.moveDown"),children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:112,columnNumber:44},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:111,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-del",onClick:()=>D(a),"aria-label":U(a.source==="config"?"cmd.removeDevice":"common.delete"),children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:114,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:113,columnNumber:11},this)]},yn(a),!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:99,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:95,columnNumber:5},this)}function OO({scopes:i,cfg:s,edit:l,inset:m,onAdd:S,onUpdate:D,onClose:b}){const a=l&&l.fav.kind==="key"?MO(l.fav):null,[d,f]=M.useState(l&&l.fav.kind==="key"?"key":"msg"),[w,h]=M.useState(l?l.scope:i[0].key),[_,N]=M.useState(l?a?a.base:l.fav.text:""),[C,y]=M.useState(l&&l.fav.kind!=="key"?!!l.fav.enter:!!s.defaultEnter),[c,p]=M.useState(a?a.sticky:"none"),[v,g]=M.useState(null),E=O=>{O!==d&&(f(O),N(""),g(null))},R=xf.map(O=>({value:O.key,label:O.label??U("cmd.stickyNone")})),j=d==="key"?uO(TO(c).mods,_):null,A=i.some(O=>O.key===w)?w:i[0].key,k=d==="key"?!!j:!!_.trim(),L=()=>{if(!k)return;const O=d==="key"?{kind:"key",text:j.name,label:j.label}:{kind:s.msgKind(_.trim()),text:_.trim(),enter:C},H=l?D(l.scope,l.fav,A,O):S(A,O);if(!(H!=null&&H.ok)){g(U("cmd.itemConflict"));return}g(null)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop cmd-add-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:158,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-addcard",role:"dialog","aria-label":U(l?"cmd.editItem":"cmd.addTitle"),style:{transform:`translate(-50%, calc(-50% + ${m/2}px))`},children:[o.jsxDEV("div",{className:"cmd-addcard-head",children:[o.jsxDEV("span",{className:"cmd-title",children:U(l?"cmd.editItem":"cmd.addTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:162,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:b,"aria-label":U("common.close"),children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:163,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:163,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:161,columnNumber:9},this),o.jsxDEV("div",{className:"cmd-modetabs",role:"tablist",children:[o.jsxDEV("button",{type:"button",role:"tab","aria-selected":d==="msg",className:`cmd-modetab${d==="msg"?" on":""}`,onClick:()=>E("msg"),children:s.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:169,columnNumber:11},this),o.jsxDEV("button",{type:"button",role:"tab","aria-selected":d==="key",className:`cmd-modetab${d==="key"?" on":""}`,onClick:()=>E("key"),children:U("cmd.tabKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:171,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:168,columnNumber:9},this),i.length>1&&o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:U("cmd.addTo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:178,columnNumber:13},this),o.jsxDEV("div",{className:"cmd-seg",role:"group",children:i.map(O=>o.jsxDEV("button",{type:"button","aria-pressed":A===O.key,className:`cmd-seg-btn${O.accent==="win"?" win":""}${A===O.key?" on":""}`,onClick:()=>{h(O.key),g(null)},children:O.title},O.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:181,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:179,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:177,columnNumber:11},this),d==="key"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:U("cmd.sticky")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:193,columnNumber:15},this),o.jsxDEV(X1,{value:c,options:R,onChange:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:194,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:192,columnNumber:13},this),o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:U("cmd.baseKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:197,columnNumber:15},this),o.jsxDEV(X1,{value:_,options:AO,onChange:N,placeholder:U("cmd.pickKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:198,columnNumber:15},this),j&&o.jsxDEV("span",{className:"cmd-chord-preview",children:j.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:199,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:196,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:190,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:s.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:205,columnNumber:15},this),o.jsxDEV("input",{className:"cmd-add-input",value:_,placeholder:s.placeholder,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:O=>{N(O.target.value),g(null)},onKeyDown:O=>{O.key==="Enter"&&L()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:206,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:204,columnNumber:13},this),s.hasEnter&&o.jsxDEV("label",{className:"cmd-toggle-row",children:[o.jsxDEV("span",{children:U("cmd.withEnter")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:214,columnNumber:17},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:C,onChange:O=>y(O.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:216,columnNumber:19},this),o.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:217,columnNumber:19},this),o.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:218,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:215,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:213,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:203,columnNumber:11},this),v&&o.jsxDEV("div",{className:"cmd-add-error",role:"status",children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:225,columnNumber:19},this),o.jsxDEV("button",{type:"button",className:"cmd-submit",disabled:!k,onClick:L,children:U(l?"common.save":"fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:227,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:159,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:157,columnNumber:5},this)}function VO(i,s){if(i==="chat")return{title:U("chat.editTitle"),scopes:[{key:"agent",title:U("chat.favs"),accent:"global"}],card:{msgLabel:U("chat.tabMsg"),placeholder:U("chat.addPlaceholder"),hasEnter:!0,defaultEnter:!0,msgKind:m=>m.startsWith("/")?"cmd":"reply"}};const l=s?x_(s):null;return{title:U("cmd.editTitle"),scopes:[{key:qE,title:U("cmd.global"),accent:"global"},...l?[{key:l,title:U("cmd.window"),accent:"win"}]:[]],card:{msgLabel:U("cmd.tabCmd"),placeholder:U("cmd.addPlaceholder"),hasEnter:!0,defaultEnter:!1,msgKind:()=>"cmd"}}}function N_({windowId:i,inset:s=0,variant:l="command",presets:m=[],onChange:S,onClose:D}){const{title:b,scopes:a,card:d}=VO(l,i),[f,w]=M.useState(()=>Object.fromEntries(a.map(Y=>[Y.key,ir(Y.key)]))),[h,_]=M.useState(null),N=l==="chat"?"chat":"command",C=a[0].key,[y,c]=M.useState(()=>el(N)),[p,v]=M.useState(null),[g,E]=M.useState(0),R=wc(il(m,f[C]||[],N),y),j=new Set(R.map(yn)),A=(Y,J=null,ee=null)=>R.some(P=>yn(P)===Y&&!(J===C&&P.source==="local"&&yn(P)===yn(ee))),k=()=>w(Object.fromEntries(a.map(Y=>[Y.key,ir(Y.key)]))),L=Y=>{const J=jO(N,Y);return c(J),S==null||S(),J};M.useEffect(()=>{if(!p)return;const Y=setTimeout(()=>v(null),4e3);return()=>clearTimeout(Y)},[p]),M.useEffect(()=>{if(!g)return;const Y=setTimeout(()=>E(0),2e3);return()=>clearTimeout(Y)},[g]);const O=()=>{k(),v(null),_(null),E(Y=>Y+1)},H=(Y,J,ee,P)=>{if(Y===C)L(DO(y,R,yn(J),ee));else{const W=P.findIndex(K=>yn(K)===yn(J)),Q=P[W+(ee<0?-1:1)];if(!Q)return;SO(Y,yn(J),yn(Q)),k(),S==null||S()}},V=(Y,J)=>{E(0);const ee=yn(J);if(J.source==="config"){L(kO(y,R,ee)),v({identity:ee});return}xO(Y,ee),Y===C?L(K1(y,ee)):S==null||S(),k()},B=()=>{p&&(L(ud(y,p.identity)),v(null))},q=(Y,J)=>{const ee=yn(J);if(A(ee))return{ok:!1,reason:"conflict"};const P=il(m,[],N).some(K=>yn(K)===ee),W=(f[Y]||[]).some(K=>yn(K)===ee);if(Y===C&&y.hidden.includes(ee)&&(P||W))return L(ud(y,ee)),O(),{ok:!0};const Q=YE(Y,J);return Q.ok?(Y===C?L(ud(y,yn(J))):S==null||S(),O(),{ok:!0}):Q},ne=(Y,J,ee,P)=>{const W=yn(J),Q=yn(P);if(A(Q,Y,J))return{ok:!1,reason:"conflict"};const K=Y===ee?KE(Y,W,P):NO(Y,W,ee,P);return K.ok&&(Y===C&&ee===C?L(RO(y,W,Q)):Y===C?L(K1(y,W)):ee===C?L(ud(y,Q)):S==null||S(),k(),_(null)),K};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:388,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-panel cmd-editor",role:"dialog","aria-label":b,children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:391,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-add-open",onClick:()=>{E(0),_({edit:null})},"aria-label":U("cmd.addTitle"),children:o.jsxDEV(Y_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:392,columnNumber:139},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:392,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:D,"aria-label":U("common.close"),children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:393,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:393,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:390,columnNumber:9},this),o.jsxDEV("div",{className:"cmd-list",children:a.map(Y=>{const J=Y.key===C?R:il([],f[Y.key]||[],"command").filter(ee=>!j.has(yn(ee)));return o.jsxDEV(UO,{title:Y.title,accent:Y.accent,items:J,showTitle:a.length>1,onMove:(ee,P)=>H(Y.key,ee,P,J),onDel:ee=>V(Y.key,ee),onEdit:ee=>{E(0),_({edit:{fav:ee,scope:Y.key}})}},Y.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:401,columnNumber:20},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:395,columnNumber:9},this),p&&o.jsxDEV("div",{className:"cmd-undo-toast",role:"status",children:[o.jsxDEV("span",{children:U("cmd.removedDevice")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:409,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"cmd-undo",onClick:B,children:U("common.undo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:410,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:408,columnNumber:18},this),!!g&&o.jsxDEV("div",{className:"cmd-undo-toast cmd-added-toast",role:"status",children:U("cmd.added")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:412,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:389,columnNumber:7},this),h&&o.jsxDEV(OO,{scopes:a,cfg:d,edit:h.edit,inset:s,onAdd:q,onUpdate:ne,onClose:()=>_(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:416,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:387,columnNumber:5},this)}function ey({active:i,disabled:s,onToggle:l}){const m=M.useRef({x:0,y:0,moved:!1}),S=a=>{m.current={x:a.clientX,y:a.clientY,moved:!1}},D=a=>{const d=m.current;!d.moved&&Math.hypot(a.clientX-d.x,a.clientY-d.y)>10&&(d.moved=!0)},b=()=>{m.current.moved||l()};return o.jsxDEV("button",{type:"button",className:`input-mic${i?" on":""}`,"aria-label":U(i?"mic.stop":"mic.start"),"aria-pressed":i,disabled:s,onPointerDown:S,onPointerMove:D,onPointerUp:b,children:o.jsxDEV(s3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/MicButton.jsx",lineNumber:29,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/MicButton.jsx",lineNumber:19,columnNumber:5},this)}const JE=["jpg","jpeg","png","gif","webp","svg","bmp","heic","heif","avif","ico","tiff","mp4","m4v","mov","webm","mkv","avi","wmv","flv","3gp","ogv","mpeg","mpg","txt","md","markdown","rst","log","csv","tsv","json","yaml","yml","toml","ini","conf","xml","html","htm","css","js","mjs","cjs","ts","tsx","jsx","py","rb","go","rs","java","c","h","cpp","sh","pdf","doc","docx","xls","xlsx","ppt","pptx","odt","ods","odp","rtf"],ty=JE.map(i=>`.${i}`).join(","),PO=new Set(JE);function IO(i){const s=/\.([A-Za-z0-9]+)$/.exec(i||"");return s?PO.has(s[1].toLowerCase()):!1}function ZE(i){const l=(Array.isArray(i)?i:i&&typeof i.length=="number"?Array.from(i):[i]).filter(Boolean),m=[],S=[];for(const D of l)(IO(D.name)?m:S).push(D);return{allowed:m,rejected:S.map(D=>D.name)}}const QE={active:!1,phase:null,pct:0,label:""};let Sd=QE,vd=null;const S_=new Set,ny=()=>{for(const i of[...S_])i()};function eC(i,s=""){vd=i,Sd={active:!0,phase:"sending",pct:0,label:s},ny()}function Nf(i){Sd={...Sd,...i},ny()}function E_(){vd=null,Sd=QE,ny()}function BO(){vd==null||vd.abort()}const FO=i=>(S_.add(i),()=>S_.delete(i)),HO=()=>Sd;function zO(){return M.useSyncExternalStore(FO,HO)}function tC({cwd:i,onAuthFail:s,onPaths:l}){const[m,S]=M.useState(null),D=M.useRef(null);return M.useEffect(()=>()=>clearTimeout(D.current),[]),{upload:m,uploadFiles:async a=>{const{allowed:d,rejected:f}=ZE(a);if(!d.length){f.length&&(clearTimeout(D.current),S({label:U("dock.upload.rejected",{names:f.join("、")}),error:!0}),D.current=setTimeout(()=>S(null),3500));return}clearTimeout(D.current),S(null);const w=d.length,h=[],_=[],N=new AbortController;eC(N,U("dock.upload.progress",{name:d[0].name,tag:w>1?`(1/${w})`:""}));try{for(let C=0;C<w&&!N.signal.aborted;C++){const y=d[C],c=w>1?`(${C+1}/${w})`:"";Nf({label:U("dock.upload.progress",{name:y.name,tag:c}),phase:"sending",pct:0});try{const p=await gE(i||"",y,(v,g)=>Nf({pct:v,phase:g}),!0,{signal:N.signal});p!=null&&p.path&&h.push(p.path)}catch(p){if(p instanceof bf)break;if(p instanceof $i){s==null||s(),E_(),S(null);return}_.push({name:y.name,reason:(p==null?void 0:p.message)||U("api.uploadFailed")})}}}finally{E_()}if(h.length&&l(h),_.length||f.length){const C=_.map(y=>`${y.name}:${y.reason}`);f.length&&C.push(U("dock.upload.rejected",{names:f.join("、")})),S({label:C.join(";"),error:!0}),D.current=setTimeout(()=>S(null),5e3)}else S(null)}}}function $O(i,s){const l=s/16e3,m=Math.floor(i.length/l),S=new Int16Array(m);for(let D=0;D<m;D++){let b=i[Math.floor(D*l)];b>1?b=1:b<-1&&(b=-1),S[D]=b<0?b*32768:b*32767}return new Uint8Array(S.buffer)}function WO(i=1280){let s=new Uint8Array(0);return{push(l){const m=new Uint8Array(s.length+l.length);m.set(s),m.set(l,s.length);const S=[];let D=0;for(;m.length-D>=i;)S.push(m.slice(D,D+i)),D+=i;return s=m.slice(D),S},flush(){if(s.length===0)return null;const l=s;return s=new Uint8Array(0),l}}}function J1(i){let s="";for(let l=0;l<i.length;l++)s+=String.fromCharCode(i[l]);return btoa(s)}const GO="data:text/javascript;base64,Ly8gd2ViL3NyYy92b2ljZS9wY20td29ya2xldC5qcwovLyBNaW5pbWFsIEF1ZGlvV29ya2xldDogZm9yd2FyZCBlYWNoIHJlbmRlciBxdWFudHVtJ3MgbW9ubyBzYW1wbGVzIHRvIHRoZSBtYWluIHRocmVhZCwgd2hpY2ggZG9lcyB0aGUKLy8gKHVuaXQtdGVzdGVkKSBkb3duc2FtcGxlL2ZyYW1lL2VuY29kZS4gS2VwdCB0cml2aWFsIG9uIHB1cnBvc2Ug4oCUIHdvcmtsZXQgY29kZSBjYW4ndCBiZSB1bml0LXRlc3RlZC4KY2xhc3MgUGNtRm9yd2FyZGVyIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBwcm9jZXNzKGlucHV0cykgewogICAgY29uc3QgY2ggPSBpbnB1dHNbMF0gJiYgaW5wdXRzWzBdWzBdOwogICAgaWYgKGNoICYmIGNoLmxlbmd0aCkgdGhpcy5wb3J0LnBvc3RNZXNzYWdlKGNoLnNsaWNlKDApKTsgLy8gY29weTogdGhlIGJ1ZmZlciBpcyByZXVzZWQgYWZ0ZXIgcHJvY2VzcygpCiAgICByZXR1cm4gdHJ1ZTsKICB9Cn0KcmVnaXN0ZXJQcm9jZXNzb3IoJ3BjbS1mb3J3YXJkZXInLCBQY21Gb3J3YXJkZXIpOwo=";function qO({getUserMedia:i=l=>navigator.mediaDevices.getUserMedia(l),AudioCtor:s=window.AudioContext||window.webkitAudioContext}={}){let l=null,m=null,S=null,D=null;const b=WO(1280);async function a(f){m=await i({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}}),l=new s,await l.resume(),await l.audioWorklet.addModule(GO),D=l.createMediaStreamSource(m),S=new AudioWorkletNode(l,"pcm-forwarder"),S.port.onmessage=w=>{const h=$O(w.data,l.sampleRate);for(const _ of b.push(h))f(J1(_))},D.connect(S),S.connect(l.destination)}async function d(){try{S&&(S.port.onmessage=null)}catch{}try{D&&D.disconnect(),S&&S.disconnect()}catch{}try{m&&m.getTracks().forEach(w=>w.stop())}catch{}try{l&&await l.close()}catch{}const f=b.flush();return l=m=S=D=null,f?J1(f):null}return{start:a,stop:d}}const YO={language:"zh_cn",domain:"iat",accent:"mandarin",vad_eos:1e4,dwa:"wpgs",ptt:1,nunum:1},iy="audio/L16;rate=16000";function KO(i,s){return{common:{app_id:i},business:{...YO},data:{status:0,format:iy,encoding:"raw",audio:s}}}function XO(i){return{data:{status:1,format:iy,encoding:"raw",audio:i}}}function JO(){return{data:{status:2,format:iy,encoding:"raw",audio:""}}}function Z1(){return{sentences:new Map}}function ZO(i,s){var D;const l=(D=s==null?void 0:s.data)==null?void 0:D.result;if(!l||!Array.isArray(l.ws))return i;const m=l.ws.map(b=>(b.cw||[]).map(a=>a.w).join("")).join(""),S=new Map(i.sentences);if(l.pgs==="rpl"&&Array.isArray(l.rg))for(let b=l.rg[0];b<=l.rg[1];b++)S.delete(b);return S.set(l.sn,m),{sentences:S}}function Q1(i){return[...i.sentences.keys()].sort((s,l)=>s-l).map(s=>i.sentences.get(s)).join("")}const QO=55e3,e4=4e3;function ry({onText:i,deps:s={}}){const l=s.signAsr||TU,m=s.WebSocketCtor||window.WebSocket,S=s.makeRecorder||(()=>qO()),[D,b]=M.useState("idle"),[a,d]=M.useState(""),f=M.useRef("idle"),w=M.useCallback(L=>{f.current=L,b(L)},[]),h=M.useRef(null),_=M.useRef(null),N=M.useRef(Z1()),C=M.useRef(""),y=M.useRef(!1),c=M.useRef(null),p=M.useRef(null),v=M.useRef(null),g=M.useRef(i);g.current=i;const E=M.useCallback(()=>{clearTimeout(c.current),clearTimeout(p.current);try{h.current&&h.current.close()}catch{}h.current=null,_.current=null,y.current=!1},[]),R=M.useCallback(()=>{var L;f.current!=="idle"&&((L=g.current)==null||L.call(g,Q1(N.current)),d(""),w("idle"),E())},[E,w]),j=M.useCallback(L=>{const O=h.current;!O||O.readyState!==1||(O.send(JSON.stringify(y.current?XO(L):KO(C.current,L))),y.current=!0)},[]),A=M.useCallback(async()=>{if(f.current==="recording"){w("finalizing"),clearTimeout(c.current);try{const L=_.current?await _.current.stop():null;L&&j(L);const O=h.current;O&&O.readyState===1?(O.send(JSON.stringify(JO())),p.current=setTimeout(()=>R(),e4)):R()}catch{w("error"),E()}}},[j,E,w,R]);v.current=A;const k=M.useCallback(async()=>{if(!(f.current!=="idle"&&f.current!=="error")){w("requesting"),d(""),N.current=Z1(),y.current=!1;try{const{url:L,appId:O}=await l();C.current=O;const H=new m(L);h.current=H,H.onmessage=B=>{var ne;const q=JSON.parse(B.data);N.current=ZO(N.current,q),d(Q1(N.current)),((ne=q==null?void 0:q.data)==null?void 0:ne.status)===2&&R()},H.onerror=()=>{w("error"),E()},H.onclose=()=>{(f.current==="recording"||f.current==="finalizing")&&R()};const V=S();_.current=V,await V.start(j),w("recording"),c.current=setTimeout(()=>{var B;(B=v.current)==null||B.call(v)},QO)}catch{w("error"),E()}}},[l,m,S,j,E,w,R]);return M.useEffect(()=>E,[E]),{state:D,partial:a,start:k,stop:A}}function Of(i){M.useEffect(()=>{if(!i||!("wakeLock"in navigator))return;let s=null,l=!1;const m=async()=>{try{const D=await navigator.wakeLock.request("screen");if(l){try{D.release()}catch{}return}s=D}catch{}},S=()=>{document.visibilityState==="visible"&&!l&&m()};return m(),document.addEventListener("visibilitychange",S),()=>{l=!0,document.removeEventListener("visibilitychange",S);try{s&&s.release()}catch{}s=null}},[i])}function Ss(i,s){const l=M.useRef(s);l.current=s,M.useEffect(()=>{if(!i)return;window.history.pushState({overlay:!0},"");const m=()=>{var S;return(S=l.current)==null?void 0:S.call(l)};return window.addEventListener("popstate",m),()=>{var S;window.removeEventListener("popstate",m),(S=window.history.state)!=null&&S.overlay&&window.history.back()}},[i])}function eS(){const i=window.visualViewport;return i?window.innerHeight-i.height>120:!1}function t4(){const[i,s]=M.useState(0);return M.useEffect(()=>{const l=window.visualViewport;if(!l)return;const m=()=>{const S=window.innerHeight-l.height-l.offsetTop;s(Math.max(0,Math.round(S)))};return m(),l.addEventListener("resize",m),l.addEventListener("scroll",m),()=>{l.removeEventListener("resize",m),l.removeEventListener("scroll",m)}},[]),i}const tS=i=>{i.cancelable&&i.preventDefault()},n4=i=>{var s,l;(l=(s=i.target).closest)!=null&&l.call(s,"input, textarea, [contenteditable]")||i.cancelable&&i.preventDefault()},nS=80,i4=i=>i.startsWith("/")?"cmd":"reply",r4=450;function Yb({className:i,onTap:s,onHold:l,children:m,...S}){const D=M.useRef({timer:null,long:!1,moved:!1,x:0,y:0}),b=w=>{w.cancelable&&w.preventDefault();const h=D.current;h.long=!1,h.moved=!1,h.x=w.clientX,h.y=w.clientY,l&&(h.timer=setTimeout(()=>{var _;h.long=!0,(_=navigator.vibrate)==null||_.call(navigator,12),l()},r4))},a=w=>{const h=D.current;h.moved||(Math.abs(w.clientX-h.x)>8||Math.abs(w.clientY-h.y)>8)&&(h.moved=!0,clearTimeout(h.timer))},d=()=>{const w=D.current;if(clearTimeout(w.timer),w.timer=null,w.moved){w.moved=!1;return}if(w.long){w.long=!1;return}s()},f=()=>{const w=D.current;clearTimeout(w.timer),w.timer=null,w.long=!1,w.moved=!1};return o.jsxDEV("button",{type:"button",className:i,...S,onPointerDown:b,onPointerMove:a,onPointerUp:d,onPointerCancel:f,onPointerLeave:f,children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:84,columnNumber:5},this)}function s4({pane:i,onAuthFail:s,onKey:l,onText:m,cwd:S=null,agent:D=null,windowId:b=null,recent:a=[],onSent:d,onRemoveRecent:f,inset:w=0,shortcuts:h=null,micAvailable:_=!1,desktopUnified:N=!1,terminalFocused:C=!1,onReturnToTerminal:y,onLeaveTerminal:c},p){const[v,g]=M.useState(()=>rE());M.useEffect(()=>{sE(v)},[v]);const[E,R]=M.useState(!1),[j,A]=M.useState(!1),[k,L]=M.useState(!1),O=h||Mf,[H,V]=M.useState(()=>ir("agent")),[B,q]=M.useState(()=>el("chat")),[ne,Y]=M.useState(!1),J=()=>{V(ir("agent")),q(el("chat"))};M.useEffect(()=>{!k&&!ne&&J()},[k,ne]);const[ee,P]=M.useState(()=>ir("command")),[W,Q]=M.useState(()=>b?ir(x_(b)):[]),[K,he]=M.useState(()=>el("command")),[ce,ke]=M.useState(!1),we=()=>{P(ir("command")),Q(b?ir(x_(b)):[]),he(el("command"))};M.useEffect(()=>{ce||we()},[ce,b]);const re=wc(il(O.chat,H,"chat"),B),G=wc(il(O.command,ee,"command"),K),ge=new Set(G.map(yn)),de=il([],W,"command").filter(se=>!ge.has(yn(se))),[pe,Ne]=M.useState({}),Ie=N?"agent":pe[i]||(D?"agent":"command"),Ze=se=>{var tt;const Me=eS()||document.activeElement===Tt.current||document.activeElement===ot.current;Ne(vt=>({...vt,[i]:se})),Me&&((tt=se==="command"?Tt.current:ot.current)==null||tt.focus({preventScroll:!0}))},[ut,At]=M.useState({ctrl:"off",shift:"off",alt:"off"}),[Ke,qt]=M.useState(!1),Ut=M.useRef(null),xe=M.useRef(null),Ve=M.useRef(null),Xe=Ie==="command"?0:1,Te=M.useRef(Xe);Te.current=Xe;const lt=M.useRef(Ze);lt.current=Ze;const dt=M.useRef(!1),$=M.useRef(!1),at=()=>{var se;return((se=Ut.current)==null?void 0:se.clientWidth)||0},De=se=>{const Me=xe.current;Me&&(Me.style.transition="none",Me.style.transform=`translate3d(${se}px, 0, 0)`)},We=()=>{const se=xe.current;!se||!se.style.transform||(se.style.transition="",se.style.transform="")},be=M.useRef(null),Pe=50,He=12,Ot=38,Le=se=>{const Me=be.current;Me&&(Me.classList.add("dragging"),Me.style.setProperty("--drag",`${b2(se)}px`),Me.style.setProperty("--morph",`${Math.min(1,Math.max(0,(Math.abs(se)-He)/Ot))}`),Me.classList.toggle("armed",Math.abs(se)>=Pe))},ve=()=>{const se=be.current;se&&(se.classList.remove("dragging","armed"),se.style.removeProperty("--drag"),se.style.removeProperty("--morph"))};M.useLayoutEffect(()=>{dt.current||We()});const xt=()=>{const se=Ut.current;if(!se)return;const Me=se.querySelector(Ie==="command"?".dock-page.command":".dock-page.chat");Me&&(se.style.height=`${Me.offsetHeight}px`)};M.useLayoutEffect(()=>{Ie==="agent"&&jt(ot.current),xt()});const Kt=M.useRef(xt);Kt.current=xt,M.useEffect(()=>{const se=Ut.current;if(!se||typeof ResizeObserver>"u")return;const Me=new ResizeObserver(()=>{dt.current||Kt.current()});return se.querySelectorAll(".dock-page").forEach(tt=>Me.observe(tt)),()=>Me.disconnect()},[]),M.useEffect(()=>{if(Ie!=="agent")return;const se=requestAnimationFrame(()=>{jt(ot.current),xt()});return()=>cancelAnimationFrame(se)},[Ie]),M.useEffect(()=>{var Me;if(Ie==="agent")return;document.activeElement===ot.current&&((Me=ot.current)==null||Me.blur());const se=Ut.current;se&&(se.scrollLeft=0,se.scrollTop=0)},[Ie]),M.useEffect(()=>{if(N)return;const se=Ve.current,Me=Ut.current;if(!se||!Me)return;let tt=null;const vt=ft=>{var hi,ii,cn,un;We(),se.classList.remove("dock-swiping");const ui=((ii=(hi=ft.target)==null?void 0:hi.closest)==null?void 0:ii.call(hi,".quick-scroll"))||null,An=((un=(cn=ft.target)==null?void 0:cn.closest)==null?void 0:un.call(cn,".input-text"))||null,di=eS()||document.activeElement===Tt.current||document.activeElement===ot.current;tt=ft.touches.length===1?{x:ft.touches[0].clientX,y:ft.touches[0].clientY,dx:0,dy:0,decided:!1,horiz:!1,vert:!1,strip:ui,cmp:An,kbUp:di}:null},Dt=ft=>{if(!tt||ft.touches.length!==1||$.current&&!tt.horiz)return;const ui=ft.touches[0].clientX-tt.x,An=ft.touches[0].clientY-tt.y;if(!tt.decided){if(Math.abs(ui)<16&&Math.abs(An)<16)return;if(tt.decided=!0,tt.horiz=Math.abs(ui)>Math.abs(An)*1.4,!tt.kbUp&&(document.activeElement===Tt.current||document.activeElement===ot.current)&&document.activeElement.blur(),tt.horiz&&!tt.kbUp&&se.classList.add("dock-swiping"),tt.horiz&&tt.strip){const ii=tt.strip,cn=Te.current,un=ii.scrollLeft<=0,sr=ii.scrollLeft>=ii.scrollWidth-ii.clientWidth-1,Kn=ui>0&&un&&cn===1,Vn=ui<0&&sr&&cn===0;Kn||Vn||(tt.horiz=!1)}!tt.horiz&&Math.abs(An)>Math.abs(ui)*1.4&&!g2(tt.cmp,An)&&(tt.vert=!0)}if(tt.vert){tt.dx=ui,tt.dy=An,Le(An),ft.cancelable&&ft.preventDefault();return}if(!tt.horiz)return;ft.preventDefault(),dt.current=!0,tt.dx=ui;const di=at()||1;let hi=ui;Te.current===0?hi=Math.min(0,Math.max(-di,hi)):hi=Math.max(0,Math.min(di,hi)),De(-Te.current*di+hi)},Vi=()=>{var hi,ii,cn,un;if(dt.current=!1,se.classList.remove("dock-swiping"),tt&&tt.vert){const sr=v2(tt.dx,tt.dy,Pe),Kn=Te.current;tt=null,We(),ve(),sr==="show"?(hi=gi(Kn))==null||hi.focus({preventScroll:!0}):sr==="hide"&&((ii=gi(Kn))==null||ii.blur());return}if(!tt||!tt.horiz){tt=null,We();return}const ft=Te.current,ui=tt.dx,An=tt.kbUp;tt=null;let di=ft;ft===0&&ui<-nS?di=1:ft===1&&ui>nS&&(di=0),An||((cn=Tt.current)==null||cn.blur(),(un=ot.current)==null||un.blur()),We(),di!==ft&<.current(di===1?"agent":"command")},Ii=()=>{(Me.scrollLeft||Me.scrollTop)&&(Me.scrollLeft=0,Me.scrollTop=0)};return Me.addEventListener("scroll",Ii,{passive:!0}),se.addEventListener("touchstart",vt,{passive:!0}),se.addEventListener("touchmove",Dt,{passive:!1}),se.addEventListener("touchend",Vi,{passive:!0}),se.addEventListener("touchcancel",Vi,{passive:!0}),()=>{Me.removeEventListener("scroll",Ii),se.removeEventListener("touchstart",vt),se.removeEventListener("touchmove",Dt),se.removeEventListener("touchend",Vi),se.removeEventListener("touchcancel",Vi)}},[N]);const ot=M.useRef(null),Tt=M.useRef(null),Qt=M.useRef(null),Vt=M.useRef(null),Fn=M.useRef(!1),mn=M.useRef(null),xi=()=>{var se;N&&(Vt.current=C?"terminal":document.activeElement===ot.current?"composer":null,c==null||c(),document.activeElement===ot.current&&((se=ot.current)==null||se.blur()))},ci=se=>{xi(),se(!0)},Hn=(se,Me=!0)=>{se(!1);const tt=Vt.current;Vt.current=null,N&&Me&&tt&&queueMicrotask(()=>{var vt;tt==="terminal"?y==null||y():(vt=ot.current)==null||vt.focus({preventScroll:!0})})},vi=(se=!1)=>{const Me=mn.current;Me&&(Fn.current=!1,se&&(mn.current=null),!(!N||!Me.owner||Me.focusRestored)&&(Me.focusRestored=!0,queueMicrotask(()=>{var tt;Me.owner==="terminal"?y==null||y():(tt=ot.current)==null||tt.focus({preventScroll:!0})})))};M.useEffect(()=>{if(!N)return;const se=Qt.current;let Me=!1,tt=null;const vt=()=>vi(!0),Dt=()=>{Fn.current&&(Me=!0)},Vi=()=>{!Fn.current||!Me||(clearTimeout(tt),tt=setTimeout(vi,0))};return se==null||se.addEventListener("cancel",vt),window.addEventListener("blur",Dt),window.addEventListener("focus",Vi),()=>{clearTimeout(tt),se==null||se.removeEventListener("cancel",vt),window.removeEventListener("blur",Dt),window.removeEventListener("focus",Vi)}},[N,y]),Ss(k,()=>Hn(L));const Yn=M.useRef(!1);M.useEffect(()=>{const se=window.visualViewport;if(!se)return;const Me=()=>{if(window.innerHeight-se.height>120){Yn.current=!0;return}if(!Yn.current)return;Yn.current=!1;const vt=document.activeElement;(vt===Tt.current||vt===ot.current)&&vt.blur(),qt(!1)};return Me(),se.addEventListener("resize",Me),()=>se.removeEventListener("resize",Me)},[]);const st=M.useRef({head:"",tail:""}),tn=M.useRef(null),Pt=M.useRef(!1),Sn=ry({onText:se=>{if(Pt.current){Pt.current=!1;return}const{head:Me,tail:tt}=st.current;g(Me+se+tt),tn.current=Me.length+se.length}}),zn=Sn.state==="recording"||Sn.state==="finalizing";Of(zn),M.useEffect(()=>{if(Sn.state!=="recording"&&Sn.state!=="finalizing"||Pt.current)return;const{head:se,tail:Me}=st.current;g(se+Sn.partial+Me),tn.current=se.length+Sn.partial.length},[Sn.partial,Sn.state]),M.useLayoutEffect(()=>{const se=ot.current;if(!se)return;let Me=!1;if(tn.current!=null){const tt=tn.current;if(tn.current=null,document.activeElement===se)try{se.setSelectionRange(tt,tt)}catch{}Me=tt>=v.length}jt(se),Me&&(se.scrollTop=se.scrollHeight)},[v]);const ae=()=>{if(zn){Sn.stop();return}const se=ot.current,Me=se?se.selectionStart:v.length;st.current={head:v.slice(0,Me),tail:v.slice(Me)},Sn.start()},Be=40,et=M.useRef(null),Ct=(se,Me)=>{const tt=et.current;if(!tt)return null;tt.style.width=`${Me}px`,tt.textContent=se;const vt=document.createElement("span");return tt.appendChild(vt),{h:tt.offsetHeight,endX:vt.offsetLeft}},jt=se=>{if(!se)return;se.style.height="auto";const Me=_?76:38,tt=_?86:48,vt=se.parentElement.clientWidth-11,Dt=se.value?Ct(se.value,vt-Me):null,Vi=Dt?Dt.h>Be:!1;R(Vi);const Ii=Vi?Ct(se.value,vt):null;A(!!Ii&&vt-Ii.endX<tt),se.style.height=`${se.scrollHeight+2}px`},Rt=()=>{zn&&(Pt.current=!0,Sn.stop())},Lt=async()=>{if(i){Rt();try{await tl(i,v,!0),d==null||d(v),g(""),requestAnimationFrame(()=>{var se;jt(ot.current),N&&((se=ot.current)==null||se.focus({preventScroll:!0}))})}catch(se){se instanceof $i&&(s==null||s())}}},Nt=M.useRef(!1),$n=se=>{const Me=se.value;if(se.value="",!Me)return;const tt=xd.some(vt=>Va(ut[vt]));if(tt&&Me.length===1){const vt=$E({kind:"text",ch:Me},ut);if(vt.kind==="key"){l(vt.name),At(w_);return}}m(Me),tt&&At(w_)},Bt=se=>{var Me;(Me=se.nativeEvent)!=null&&Me.isComposing||Nt.current||$n(se.target)},fn=()=>{Ie==="command"&&(Nt.current=!0)},ni=se=>{Ie==="command"&&(Nt.current=!1,$n(se.target))},Xn=se=>{var Me;if(!(Ie!=="command"||(Me=se.nativeEvent)!=null&&Me.isComposing)){if(se.key==="Enter"&&!se.shiftKey){se.preventDefault(),l("Enter");return}se.key==="Backspace"&&(se.preventDefault(),l("BSpace"))}},Ui=se=>{var Me,tt;if(!(!N||(Me=se.nativeEvent)!=null&&Me.isComposing)){if(se.key==="Escape"){se.preventDefault(),(tt=ot.current)==null||tt.blur(),y==null||y();return}se.key==="Enter"&&!se.shiftKey&&(se.preventDefault(),v&&Lt())}},wn=()=>{const se=Tt.current;se&&(document.activeElement===se?se.blur():se.focus({preventScroll:!0}))},gi=se=>se===0?Tt.current:ot.current,Ni=se=>{Vt.current=null,g(se),L(!1),requestAnimationFrame(()=>{var Me;(Me=ot.current)==null||Me.focus(),jt(ot.current)})},Ht=async se=>{if(i)try{await tl(i,se,!0),d==null||d(se)}catch(Me){Me instanceof $i&&(s==null||s())}},Gi=se=>Ni(se),Si=se=>{if(se.kind==="key"){l(se.text);return}if(se.enter){Ht(se.text);return}m(se.text)},pt=se=>se.kind==="key"&&se.label||se.text,ie=se=>se.kind==="key"||!se.enter?void 0:()=>m(se.text);M.useImperativeHandle(p,()=>({fill:Ni,hideKeyboard:()=>{const se=document.activeElement;(se===Tt.current||se===ot.current)&&se.blur()},composerFocused:()=>document.activeElement===ot.current,focusComposer:()=>{var se;return(se=ot.current)==null?void 0:se.focus({preventScroll:!0})}}),[]);const Re=(se,{focusComposer:Me=!0}={})=>{if(!se.length)return;let tt;if(se.length===1)tt=se[0];else{const vt=se[0].slice(0,se[0].lastIndexOf("/")+1);tt=se.every(Dt=>Dt.startsWith(vt))?`${vt}{${se.map(Dt=>Dt.slice(vt.length)).join(",")}}`:se.join(" ")}g(vt=>vt&&!/\s$/.test(vt)?`${vt} ${tt}`:vt+tt),requestAnimationFrame(()=>{var vt;Me&&((vt=ot.current)==null||vt.focus()),jt(ot.current)})},{upload:nt,uploadFiles:hn}=tC({cwd:S,onAuthFail:s,onPaths:se=>{var Me;return Re(se,{focusComposer:!N||((Me=mn.current)==null?void 0:Me.owner)==="composer"})}}),Ft=async()=>{if(!(!i||!v)){Rt();try{await tl(i,v,!1),d==null||d(v),g(""),requestAnimationFrame(()=>jt(ot.current))}catch(se){se instanceof $i&&(s==null||s())}}},$t=M.useRef(null),vn=M.useRef(!1),ai=M.useRef({x:0,y:0,moved:!1}),Wn=se=>{se.cancelable&&se.preventDefault(),vn.current=!1,ai.current={x:se.clientX,y:se.clientY,moved:!1},v&&($t.current=setTimeout(()=>{var Me;vn.current=!0,(Me=navigator.vibrate)==null||Me.call(navigator,12),Ft()},450))},rr=se=>{const Me=ai.current;Me.moved||Math.hypot(se.clientX-Me.x,se.clientY-Me.y)<=10||(Me.moved=!0,clearTimeout($t.current),$t.current=null)},En=()=>{if(clearTimeout($t.current),$t.current=null,vn.current){vn.current=!1;return}ai.current.moved||Lt()},Oi=()=>{clearTimeout($t.current),$t.current=null,vn.current=!1},ji=M.useRef(null),Ar=M.useRef({x:0,y:0,moved:!1}),qi=se=>{if(!E)return null;for(const[Me,tt]of[["send",".input-send"],["mic",".input-mic"]]){const vt=se.currentTarget.querySelector(tt);if(!vt)continue;const Dt=vt.getBoundingClientRect();if(se.clientX>=Dt.left&&se.clientX<=Dt.right&&se.clientY>=Dt.top&&se.clientY<=Dt.bottom)return Me}return null},Gr=se=>{const Me=qi(se);Me&&(se.stopPropagation(),se.cancelable&&se.preventDefault(),ji.current=Me,Me==="send"?Wn(se):Ar.current={x:se.clientX,y:se.clientY,moved:!1})},ms=se=>{const Me=ji.current;if(!Me)return;if(Me==="send"){rr(se);return}const tt=Ar.current;!tt.moved&&Math.hypot(se.clientX-tt.x,se.clientY-tt.y)>10&&(tt.moved=!0)},fs=()=>{const se=ji.current;if(ji.current=null,!!se){if(se==="send"){v?En():Oi();return}!Ar.current.moved&&Sn.state!=="requesting"&&ae()}},wi=()=>{const se=ji.current;ji.current=null,se==="send"&&Oi()};return o.jsxDEV("div",{className:`bottom-dock${N?" desktop-unified":""}`,children:[o.jsxDEV("div",{className:"dock-left",ref:Ve,onPointerDown:n4,children:[!N&&o.jsxDEV("button",{type:"button",className:"dock-handle",ref:be,"aria-label":U("dock.mode.toggle"),onClick:()=>Ze(Ie==="command"?"agent":"command"),children:[o.jsxDEV("span",{className:"dock-mode-label",children:U(Ie==="command"?"dock.mode.command":"dock.mode.chat")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:920,columnNumber:13},this),o.jsxDEV("span",{className:"dock-dots",children:[o.jsxDEV("i",{className:`dock-dot${Ie==="command"?" on":""}`,"data-page":"command","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:922,columnNumber:15},this),o.jsxDEV("i",{className:`dock-dot${Ie==="agent"?" on":""}`,"data-page":"agent","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:923,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:921,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:918,columnNumber:11},this),o.jsxDEV("div",{className:"dock-pager",ref:Ut,children:o.jsxDEV("div",{className:`dock-track${Xe===1?" at-chat":""}`,ref:xe,children:[!N&&o.jsxDEV("div",{className:`dock-page command${Ie==="command"?" on":""}`,children:[o.jsxDEV("input",{ref:Tt,className:"cmd-capture",type:"text",onInput:Bt,onKeyDown:Xn,onCompositionStart:fn,onCompositionEnd:ni,onFocus:()=>qt(!0),onBlur:()=>qt(!1),enterKeyHint:"send","aria-label":U("dock.command.placeholder"),autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:933,columnNumber:15},this),o.jsxDEV("div",{className:"quick-bar",children:[o.jsxDEV("div",{className:"quick-fixed",children:o.jsxDEV("button",{type:"button",className:"quick-fix quick-fix-kbd","aria-pressed":Ke,"aria-label":U(Ke?"dock.kbdHide":"dock.kbdShow"),onPointerDown:tS,onClick:wn,children:[o.jsxDEV(u3,{down:Ke},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:957,columnNumber:21},this),o.jsxDEV("span",{children:U(Ke?"dock.kbdHide":"dock.kbdShow")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:957,columnNumber:55},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:954,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:953,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[G.map((se,Me)=>o.jsxDEV(Yb,{className:"quick-cmd quick-cmd-plain",onTap:()=>Si(se),onHold:ie(se),children:[pt(se),se.kind!=="key"&&se.enter&&o.jsxDEV("span",{className:"qc-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:966,columnNumber:68},this)]},`g:${yn(se)}:${Me}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:964,columnNumber:21},this)),de.map((se,Me)=>o.jsxDEV(Yb,{className:"quick-cmd quick-cmd-win",onTap:()=>Si(se),onHold:ie(se),children:[pt(se),se.kind!=="key"&&se.enter&&o.jsxDEV("span",{className:"qc-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:971,columnNumber:68},this)]},`w:${yn(se)}:${Me}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:969,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":U("cmd.editTitle"),onPointerDown:tS,onClick:()=>ci(ke),children:o.jsxDEV(_f,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:974,columnNumber:91},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:973,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:959,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:952,columnNumber:15},this),o.jsxDEV(mO,{onKey:l,onText:m,mods:ut,setMods:At,keyHeldRef:$},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:977,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:929,columnNumber:33},this),o.jsxDEV("div",{className:`dock-page chat${Ie==="agent"?" on":""}`,children:[nt&&o.jsxDEV("div",{className:"dock-upload error",children:o.jsxDEV("span",{className:"dock-upload-label",children:nt.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:984,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:983,columnNumber:17},this),o.jsxDEV("div",{className:"quick-bar",children:[o.jsxDEV("div",{className:"quick-fixed",children:o.jsxDEV("button",{type:"button",className:"quick-fix","aria-label":U("dock.attach"),disabled:!!nt&&!nt.error,onClick:()=>{var se;xi(),Fn.current=N,mn.current=N?{owner:Vt.current,focusRestored:!1,phase:"open"}:null,Vt.current=null,(se=Qt.current)==null||se.click()},children:[o.jsxDEV(yE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1002,columnNumber:21},this),o.jsxDEV("span",{children:U("dock.attach")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1002,columnNumber:35},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:991,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:990,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[re.map((se,Me)=>o.jsxDEV(Yb,{className:`quick-cmd qc-${se.kind==="key"?"esc":i4(se.text)}`,onTap:()=>Si(se),onHold:ie(se),children:pt(se)},`${yn(se)}:${Me}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1010,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":U("chat.editTitle"),onClick:()=>ci(Y),children:o.jsxDEV(_f,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1016,columnNumber:66},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1015,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1004,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:989,columnNumber:15},this),o.jsxDEV("input",{ref:Qt,className:"browse-file-input",type:"file",multiple:!0,accept:ty,onChange:async se=>{const Me=mn.current,tt=se.target.files;se.target.value="",Fn.current=!1,Vt.current=null,(Me==null?void 0:Me.phase)==="open"&&(Me.phase="uploading",Me.focusRestored&&(c==null||c(),document.activeElement===ot.current&&ot.current.blur(),Me.focusRestored=!1)),await hn(tt),mn.current===Me&&vi(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1020,columnNumber:15},this),o.jsxDEV("div",{className:`input-wrap${zn?" recording":""}${E?" multi":""}${j?" crowd":""}`,onPointerDownCapture:Gr,onPointerMoveCapture:ms,onPointerUpCapture:fs,onPointerCancelCapture:wi,children:[o.jsxDEV("textarea",{ref:ot,className:"input-text",rows:1,value:v,onPointerDown:se=>{zn&&(Rt(),se.currentTarget.focus())},onChange:se=>{g(se.target.value),jt(se.target)},onKeyDown:Ui,onFocus:()=>qt(!0),onBlur:()=>qt(!1),placeholder:U(N?Ke?"dock.input.exitDraft":"dock.input.enterDraft":"dock.input.placeholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1047,columnNumber:17},this),o.jsxDEV("div",{ref:et,className:"input-mirror","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1073,columnNumber:17},this),!v&&o.jsxDEV("button",{type:"button",className:"input-history","aria-label":U("dock.history"),title:U("dock.history"),onClick:()=>k?Hn(L):ci(L),children:o.jsxDEV(_E,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1079,columnNumber:53},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1076,columnNumber:19},this),_&&o.jsxDEV(ey,{active:zn,disabled:Sn.state==="requesting",onToggle:ae},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1081,columnNumber:34},this),o.jsxDEV("button",{type:"button",className:"input-send","aria-label":U("dock.send"),title:U("dock.send.hint"),disabled:!v,onPointerDown:Wn,onPointerMove:rr,onPointerUp:En,onPointerCancel:Oi,onPointerLeave:Oi,children:o.jsxDEV(q_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1086,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1083,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1044,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:979,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:928,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:927,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:911,columnNumber:7},this),o.jsxDEV(CO,{open:k,mode:Ie,recent:a,historyOnly:!0,onDelete:f,onSend:se=>{Hn(L),Ht(se)},onFill:se=>{L(!1),Gi(se)},onClose:()=>Hn(L)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1093,columnNumber:7},this),ce&&o.jsxDEV(N_,{windowId:b,inset:w,presets:O.command,onChange:we,onClose:()=>Hn(ke)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1100,columnNumber:23},this),ne&&o.jsxDEV(N_,{variant:"chat",inset:w,presets:O.chat,onChange:J,onClose:()=>Hn(Y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1104,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:910,columnNumber:5},this)}const a4=M.forwardRef(s4),o4=new Set(["clear","compact","cost","status","usage","context","help","init","exit","quit","vim","terminal-setup","release-notes"]);function C_(i){const s=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof i=="string"?i:"");return!s||s[2].trim()?!1:!o4.has(s[1].toLowerCase())}function l4(i){const s=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof i=="string"?i:"");if(!s||C_(i))return null;const l={name:"/"+s[1]},m=s[2].trim();return m&&(l.args=m),l}const c4=15e3;function u4(i){const[s,l]=M.useState({model:null,usedPercent:null}),m=M.useRef(i);return m.current=i,M.useEffect(()=>{if(!i){l({model:null,usedPercent:null});return}let S=!0,D=null;const b=async()=>{try{const a=await pU(i);S&&m.current===i&&a&&l({model:a.model??null,usedPercent:typeof a.usedPercent=="number"?a.usedPercent:null})}catch{}S&&(D=setTimeout(b,c4))};return b(),()=>{S=!1,D&&clearTimeout(D)}},[i]),s}const d4=i=>{var s,l;(l=(s=i.target).closest)!=null&&l.call(s,"input, textarea, [contenteditable]")||i.cancelable&&i.preventDefault()},h4=i=>i.startsWith("/")?"cmd":"reply";function m4({pane:i,kind:s,cwd:l=null,onKey:m=()=>{},onAuthFail:S,onSent:D,onInteractiveSlash:b,shortcuts:a=null,micAvailable:d=!1,desktop:f=!1}){const[w,h]=M.useState(()=>rE());M.useEffect(()=>{sE(w)},[w]);const _=M.useRef(null),N=M.useRef(null),C=M.useRef({x:0,y:0,moved:!1});M.useEffect(()=>{var pe;f&&((pe=_.current)==null||pe.focus({preventScroll:!0}))},[f,i]);const y=a||Mf,[c,p]=M.useState(()=>ir("agent")),[v,g]=M.useState(()=>el("chat")),[E,R]=M.useState(!1),j=()=>{p(ir("agent")),g(el("chat"))};M.useEffect(()=>{E||j()},[E]);const A=wc(il(y.chat,c,"chat"),v),k=s==="working",L=u4(i),O=L.model?L.model.replace(/\s*\(.*\)\s*$/,"").trim():null,H=L.usedPercent,V=typeof H=="number",B=V&&H>=80,q=pe=>{pe&&(pe.style.height="auto",pe.style.height=`${pe.scrollHeight+2}px`)};M.useLayoutEffect(()=>{q(_.current)},[w]);const ne=M.useRef({head:"",tail:""}),Y=M.useRef(!1),ee=ry({onText:pe=>{if(Y.current){Y.current=!1;return}const{head:Ne,tail:Ie}=ne.current;h(Ne+pe+Ie)}}),P=ee.state==="recording"||ee.state==="finalizing";Of(P),M.useEffect(()=>{if(ee.state!=="recording"&&ee.state!=="finalizing"||Y.current)return;const{head:pe,tail:Ne}=ne.current;h(pe+ee.partial+Ne)},[ee.partial,ee.state]);const W=()=>{if(P){ee.stop();return}const pe=_.current,Ne=pe?pe.selectionStart:w.length;ne.current={head:w.slice(0,Ne),tail:w.slice(Ne)},ee.start()},Q=()=>{P&&(Y.current=!0,ee.stop())},K=async()=>{if(!(!i||!w.trim())){Q();try{await tl(i,w,!0),D==null||D(w),C_(w)&&(b==null||b(w.trim())),h(""),requestAnimationFrame(()=>q(_.current))}catch(pe){pe instanceof $i&&(S==null||S())}}},he=()=>m("Escape"),ce=pe=>{var Ne;if(!(!f||(Ne=pe.nativeEvent)!=null&&Ne.isComposing)){if(pe.key==="Escape"&&k){pe.preventDefault(),he();return}pe.key==="Enter"&&!pe.shiftKey&&(pe.preventDefault(),!k&&w.trim()&&K())}},ke=pe=>{C.current={x:pe.clientX,y:pe.clientY,moved:!1}},we=pe=>{const Ne=C.current;!Ne.moved&&Math.hypot(pe.clientX-Ne.x,pe.clientY-Ne.y)>10&&(Ne.moved=!0)},re=pe=>{var Ie,Ze,ut;const Ne=C.current;Ne.moved||Math.hypot(pe.clientX-Ne.x,pe.clientY-Ne.y)>10||(Ze=(Ie=pe.target).closest)!=null&&Ze.call(Ie,"button, a, input, textarea, [contenteditable]")||(ut=_.current)==null||ut.focus()},G=async pe=>{if(pe.kind==="key"){m(pe.text);return}if(i)try{if(await tl(i,pe.text,!!pe.enter),!pe.enter)return;D==null||D(pe.text),C_(pe.text)&&(b==null||b(pe.text.trim()))}catch(Ne){Ne instanceof $i&&(S==null||S())}},ge=pe=>{if(!pe.length)return;let Ne;if(pe.length===1)Ne=pe[0];else{const Ie=pe[0].slice(0,pe[0].lastIndexOf("/")+1);Ne=pe.every(Ze=>Ze.startsWith(Ie))?`${Ie}{${pe.map(Ze=>Ze.slice(Ie.length)).join(",")}}`:pe.join(" ")}h(Ie=>Ie&&!/\s$/.test(Ie)?`${Ie} ${Ne}`:Ie+Ne),requestAnimationFrame(()=>{var Ie;(Ie=_.current)==null||Ie.focus(),q(_.current)})},{uploadFiles:de}=tC({cwd:l,onAuthFail:S,onPaths:ge});return o.jsxDEV("div",{className:"chat-composer",onPointerDown:d4,children:[o.jsxDEV("div",{className:"cc-quick quick-scroll",children:[A.map((pe,Ne)=>o.jsxDEV("button",{type:"button",className:`quick-cmd qc-${pe.kind==="key"?"esc":h4(pe.text)}`,onClick:()=>G(pe),children:pe.kind==="key"&&pe.label||pe.text},`${yn(pe)}:${Ne}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:205,columnNumber:11},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":U("chat.editTitle"),onClick:()=>R(!0),children:o.jsxDEV(_f,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:211,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:210,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:203,columnNumber:7},this),o.jsxDEV("input",{ref:N,className:"browse-file-input",type:"file",multiple:!0,accept:ty,onChange:pe=>{de(pe.target.files),pe.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:214,columnNumber:7},this),o.jsxDEV("div",{className:`cc-card${P?" recording":""}`,onPointerDown:ke,onPointerMove:we,onPointerUp:re,children:[o.jsxDEV("textarea",{ref:_,className:"cc-text",rows:1,value:w,onChange:pe=>{h(pe.target.value),q(pe.target)},onKeyDown:ce,placeholder:U("chat.composer.placeholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:218,columnNumber:9},this),o.jsxDEV("div",{className:"cc-actions",children:[o.jsxDEV("button",{type:"button",className:"cc-attach","aria-label":U("dock.attach"),onClick:()=>{var pe;return(pe=N.current)==null?void 0:pe.click()},children:o.jsxDEV(Y_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:232,columnNumber:56},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:231,columnNumber:11},this),o.jsxDEV("div",{className:"cc-actions-right",children:[V&&o.jsxDEV("div",{className:`cc-ctx${B?" warn":""}`,"aria-hidden":"true",children:[O&&o.jsxDEV("span",{className:"cc-ctx-model",children:O},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:239,columnNumber:30},this),o.jsxDEV("span",{className:"cc-ctx-pct",children:[Math.round(H),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:240,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:238,columnNumber:15},this),d&&o.jsxDEV(ey,{active:P,disabled:ee.state==="requesting",onToggle:W},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:243,columnNumber:30},this),k?o.jsxDEV("button",{type:"button",className:"cc-send cc-stop","aria-label":U("chat.stop"),onClick:he,children:o.jsxDEV(xE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:246,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:245,columnNumber:15},this):o.jsxDEV("button",{type:"button",className:"cc-send","aria-label":U("dock.send"),disabled:!w.trim(),onClick:K,children:o.jsxDEV(q_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:249,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:248,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:233,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:230,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:216,columnNumber:7},this),E&&o.jsxDEV(N_,{variant:"chat",presets:y.chat,onChange:j,onClose:()=>R(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:254,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:201,columnNumber:5},this)}function sy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let hl=sy();function nC(i){hl=i}const iC=/[&<>"']/,f4=new RegExp(iC.source,"g"),rC=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,p4=new RegExp(rC.source,"g"),v4={"&":"&","<":"<",">":">",'"':""","'":"'"},iS=i=>v4[i];function hs(i,s){if(s){if(iC.test(i))return i.replace(f4,iS)}else if(rC.test(i))return i.replace(p4,iS);return i}const g4=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b4(i){return i.replace(g4,(s,l)=>(l=l.toLowerCase(),l==="colon"?":":l.charAt(0)==="#"?l.charAt(1)==="x"?String.fromCharCode(parseInt(l.substring(2),16)):String.fromCharCode(+l.substring(1)):""))}const _4=/(^|[^\[])\^/g;function li(i,s){let l=typeof i=="string"?i:i.source;s=s||"";const m={replace:(S,D)=>{let b=typeof D=="string"?D:D.source;return b=b.replace(_4,"$1"),l=l.replace(S,b),m},getRegex:()=>new RegExp(l,s)};return m}function rS(i){try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}const gd={exec:()=>null};function sS(i,s){const l=i.replace(/\|/g,(D,b,a)=>{let d=!1,f=b;for(;--f>=0&&a[f]==="\\";)d=!d;return d?"|":" |"}),m=l.split(/ \|/);let S=0;if(m[0].trim()||m.shift(),m.length>0&&!m[m.length-1].trim()&&m.pop(),s)if(m.length>s)m.splice(s);else for(;m.length<s;)m.push("");for(;S<m.length;S++)m[S]=m[S].trim().replace(/\\\|/g,"|");return m}function tf(i,s,l){const m=i.length;if(m===0)return"";let S=0;for(;S<m&&i.charAt(m-S-1)===s;)S++;return i.slice(0,m-S)}function y4(i,s){if(i.indexOf(s[1])===-1)return-1;let l=0;for(let m=0;m<i.length;m++)if(i[m]==="\\")m++;else if(i[m]===s[0])l++;else if(i[m]===s[1]&&(l--,l<0))return m;return-1}function aS(i,s,l,m){const S=s.href,D=s.title?hs(s.title):null,b=i[1].replace(/\\([\[\]])/g,"$1");if(i[0].charAt(0)!=="!"){m.state.inLink=!0;const a={type:"link",raw:l,href:S,title:D,text:b,tokens:m.inlineTokens(b)};return m.state.inLink=!1,a}return{type:"image",raw:l,href:S,title:D,text:hs(b)}}function w4(i,s){const l=i.match(/^(\s+)(?:```)/);if(l===null)return s;const m=l[1];return s.split(`
|
|
283
|
+
`).map(S=>{const D=S.match(/^\s+/);if(D===null)return S;const[b]=D;return b.length>=m.length?S.slice(m.length):S}).join(`
|
|
284
|
+
`)}class Sf{constructor(s){yi(this,"options");yi(this,"rules");yi(this,"lexer");this.options=s||hl}space(s){const l=this.rules.block.newline.exec(s);if(l&&l[0].length>0)return{type:"space",raw:l[0]}}code(s){const l=this.rules.block.code.exec(s);if(l){const m=l[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:l[0],codeBlockStyle:"indented",text:this.options.pedantic?m:tf(m,`
|
|
285
|
+
`)}}}fences(s){const l=this.rules.block.fences.exec(s);if(l){const m=l[0],S=w4(m,l[3]||"");return{type:"code",raw:m,lang:l[2]?l[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):l[2],text:S}}}heading(s){const l=this.rules.block.heading.exec(s);if(l){let m=l[2].trim();if(/#$/.test(m)){const S=tf(m,"#");(this.options.pedantic||!S||/ $/.test(S))&&(m=S.trim())}return{type:"heading",raw:l[0],depth:l[1].length,text:m,tokens:this.lexer.inline(m)}}}hr(s){const l=this.rules.block.hr.exec(s);if(l)return{type:"hr",raw:l[0]}}blockquote(s){const l=this.rules.block.blockquote.exec(s);if(l){let m=l[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
286
|
+
$1`);m=tf(m.replace(/^ *>[ \t]?/gm,""),`
|
|
287
|
+
`);const S=this.lexer.state.top;this.lexer.state.top=!0;const D=this.lexer.blockTokens(m);return this.lexer.state.top=S,{type:"blockquote",raw:l[0],tokens:D,text:m}}}list(s){let l=this.rules.block.list.exec(s);if(l){let m=l[1].trim();const S=m.length>1,D={type:"list",raw:"",ordered:S,start:S?+m.slice(0,-1):"",loose:!1,items:[]};m=S?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=S?m:"[*+-]");const b=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",d="",f=!1;for(;s;){let w=!1;if(!(l=b.exec(s))||this.rules.block.hr.test(s))break;a=l[0],s=s.substring(a.length);let h=l[2].split(`
|
|
288
|
+
`,1)[0].replace(/^\t+/,p=>" ".repeat(3*p.length)),_=s.split(`
|
|
289
|
+
`,1)[0],N=0;this.options.pedantic?(N=2,d=h.trimStart()):(N=l[2].search(/[^ ]/),N=N>4?1:N,d=h.slice(N),N+=l[1].length);let C=!1;if(!h&&/^ *$/.test(_)&&(a+=_+`
|
|
290
|
+
`,s=s.substring(_.length+1),w=!0),!w){const p=new RegExp(`^ {0,${Math.min(3,N-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),v=new RegExp(`^ {0,${Math.min(3,N-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),g=new RegExp(`^ {0,${Math.min(3,N-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,N-1)}}#`);for(;s;){const R=s.split(`
|
|
291
|
+
`,1)[0];if(_=R,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),g.test(_)||E.test(_)||p.test(_)||v.test(s))break;if(_.search(/[^ ]/)>=N||!_.trim())d+=`
|
|
292
|
+
`+_.slice(N);else{if(C||h.search(/[^ ]/)>=4||g.test(h)||E.test(h)||v.test(h))break;d+=`
|
|
293
|
+
`+_}!C&&!_.trim()&&(C=!0),a+=R+`
|
|
294
|
+
`,s=s.substring(R.length+1),h=_.slice(N)}}D.loose||(f?D.loose=!0:/\n *\n *$/.test(a)&&(f=!0));let y=null,c;this.options.gfm&&(y=/^\[[ xX]\] /.exec(d),y&&(c=y[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),D.items.push({type:"list_item",raw:a,task:!!y,checked:c,loose:!1,text:d,tokens:[]}),D.raw+=a}D.items[D.items.length-1].raw=a.trimEnd(),D.items[D.items.length-1].text=d.trimEnd(),D.raw=D.raw.trimEnd();for(let w=0;w<D.items.length;w++)if(this.lexer.state.top=!1,D.items[w].tokens=this.lexer.blockTokens(D.items[w].text,[]),!D.loose){const h=D.items[w].tokens.filter(N=>N.type==="space"),_=h.length>0&&h.some(N=>/\n.*\n/.test(N.raw));D.loose=_}if(D.loose)for(let w=0;w<D.items.length;w++)D.items[w].loose=!0;return D}}html(s){const l=this.rules.block.html.exec(s);if(l)return{type:"html",block:!0,raw:l[0],pre:l[1]==="pre"||l[1]==="script"||l[1]==="style",text:l[0]}}def(s){const l=this.rules.block.def.exec(s);if(l){const m=l[1].toLowerCase().replace(/\s+/g," "),S=l[2]?l[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",D=l[3]?l[3].substring(1,l[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):l[3];return{type:"def",tag:m,raw:l[0],href:S,title:D}}}table(s){const l=this.rules.block.table.exec(s);if(!l||!/[:|]/.test(l[2]))return;const m=sS(l[1]),S=l[2].replace(/^\||\| *$/g,"").split("|"),D=l[3]&&l[3].trim()?l[3].replace(/\n[ \t]*$/,"").split(`
|
|
295
|
+
`):[],b={type:"table",raw:l[0],header:[],align:[],rows:[]};if(m.length===S.length){for(const a of S)/^ *-+: *$/.test(a)?b.align.push("right"):/^ *:-+: *$/.test(a)?b.align.push("center"):/^ *:-+ *$/.test(a)?b.align.push("left"):b.align.push(null);for(const a of m)b.header.push({text:a,tokens:this.lexer.inline(a)});for(const a of D)b.rows.push(sS(a,b.header.length).map(d=>({text:d,tokens:this.lexer.inline(d)})));return b}}lheading(s){const l=this.rules.block.lheading.exec(s);if(l)return{type:"heading",raw:l[0],depth:l[2].charAt(0)==="="?1:2,text:l[1],tokens:this.lexer.inline(l[1])}}paragraph(s){const l=this.rules.block.paragraph.exec(s);if(l){const m=l[1].charAt(l[1].length-1)===`
|
|
296
|
+
`?l[1].slice(0,-1):l[1];return{type:"paragraph",raw:l[0],text:m,tokens:this.lexer.inline(m)}}}text(s){const l=this.rules.block.text.exec(s);if(l)return{type:"text",raw:l[0],text:l[0],tokens:this.lexer.inline(l[0])}}escape(s){const l=this.rules.inline.escape.exec(s);if(l)return{type:"escape",raw:l[0],text:hs(l[1])}}tag(s){const l=this.rules.inline.tag.exec(s);if(l)return!this.lexer.state.inLink&&/^<a /i.test(l[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(l[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(l[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(l[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:l[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:l[0]}}link(s){const l=this.rules.inline.link.exec(s);if(l){const m=l[2].trim();if(!this.options.pedantic&&/^</.test(m)){if(!/>$/.test(m))return;const b=tf(m.slice(0,-1),"\\");if((m.length-b.length)%2===0)return}else{const b=y4(l[2],"()");if(b>-1){const d=(l[0].indexOf("!")===0?5:4)+l[1].length+b;l[2]=l[2].substring(0,b),l[0]=l[0].substring(0,d).trim(),l[3]=""}}let S=l[2],D="";if(this.options.pedantic){const b=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(S);b&&(S=b[1],D=b[3])}else D=l[3]?l[3].slice(1,-1):"";return S=S.trim(),/^</.test(S)&&(this.options.pedantic&&!/>$/.test(m)?S=S.slice(1):S=S.slice(1,-1)),aS(l,{href:S&&S.replace(this.rules.inline.anyPunctuation,"$1"),title:D&&D.replace(this.rules.inline.anyPunctuation,"$1")},l[0],this.lexer)}}reflink(s,l){let m;if((m=this.rules.inline.reflink.exec(s))||(m=this.rules.inline.nolink.exec(s))){const S=(m[2]||m[1]).replace(/\s+/g," "),D=l[S.toLowerCase()];if(!D){const b=m[0].charAt(0);return{type:"text",raw:b,text:b}}return aS(m,D,m[0],this.lexer)}}emStrong(s,l,m=""){let S=this.rules.inline.emStrongLDelim.exec(s);if(!S||S[3]&&m.match(/[\p{L}\p{N}]/u))return;if(!(S[1]||S[2]||"")||!m||this.rules.inline.punctuation.exec(m)){const b=[...S[0]].length-1;let a,d,f=b,w=0;const h=S[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,l=l.slice(-1*s.length+b);(S=h.exec(l))!=null;){if(a=S[1]||S[2]||S[3]||S[4]||S[5]||S[6],!a)continue;if(d=[...a].length,S[3]||S[4]){f+=d;continue}else if((S[5]||S[6])&&b%3&&!((b+d)%3)){w+=d;continue}if(f-=d,f>0)continue;d=Math.min(d,d+f+w);const _=[...S[0]][0].length,N=s.slice(0,b+S.index+_+d);if(Math.min(b,d)%2){const y=N.slice(1,-1);return{type:"em",raw:N,text:y,tokens:this.lexer.inlineTokens(y)}}const C=N.slice(2,-2);return{type:"strong",raw:N,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(s){const l=this.rules.inline.code.exec(s);if(l){let m=l[2].replace(/\n/g," ");const S=/[^ ]/.test(m),D=/^ /.test(m)&&/ $/.test(m);return S&&D&&(m=m.substring(1,m.length-1)),m=hs(m,!0),{type:"codespan",raw:l[0],text:m}}}br(s){const l=this.rules.inline.br.exec(s);if(l)return{type:"br",raw:l[0]}}del(s){const l=this.rules.inline.del.exec(s);if(l)return{type:"del",raw:l[0],text:l[2],tokens:this.lexer.inlineTokens(l[2])}}autolink(s){const l=this.rules.inline.autolink.exec(s);if(l){let m,S;return l[2]==="@"?(m=hs(l[1]),S="mailto:"+m):(m=hs(l[1]),S=m),{type:"link",raw:l[0],text:m,href:S,tokens:[{type:"text",raw:m,text:m}]}}}url(s){var m;let l;if(l=this.rules.inline.url.exec(s)){let S,D;if(l[2]==="@")S=hs(l[0]),D="mailto:"+S;else{let b;do b=l[0],l[0]=((m=this.rules.inline._backpedal.exec(l[0]))==null?void 0:m[0])??"";while(b!==l[0]);S=hs(l[0]),l[1]==="www."?D="http://"+l[0]:D=l[0]}return{type:"link",raw:l[0],text:S,href:D,tokens:[{type:"text",raw:S,text:S}]}}}inlineText(s){const l=this.rules.inline.text.exec(s);if(l){let m;return this.lexer.state.inRawBlock?m=l[0]:m=hs(l[0]),{type:"text",raw:l[0],text:m}}}}const x4=/^(?: *(?:\n|$))+/,N4=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,S4=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,E4=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,sC=/(?:[*+-]|\d{1,9}[.)])/,aC=li(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,sC).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ay=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,C4=/^[^\n]+/,oy=/(?!\s*\])(?:\\.|[^\[\]\\])+/,j4=li(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",oy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),D4=li(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,sC).getRegex(),Vf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ly=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k4=li("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",ly).replace("tag",Vf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oC=li(ay).replace("hr",Dd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vf).getRegex(),R4=li(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",oC).getRegex(),cy={blockquote:R4,code:N4,def:j4,fences:S4,heading:E4,hr:Dd,html:k4,lheading:aC,list:D4,newline:x4,paragraph:oC,table:gd,text:C4},oS=li("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vf).getRegex(),T4={...cy,table:oS,paragraph:li(ay).replace("hr",Dd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",oS).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vf).getRegex()},L4={...cy,html:li(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ly).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:li(ay).replace("hr",Dd).replace("heading",` *#{1,6} *[^
|
|
297
|
+
]`).replace("lheading",aC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,A4=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cC=/^( {2,}|\\)\n(?!\s*$)/,M4=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,kd="\\p{P}\\p{S}",U4=li(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,kd).getRegex(),O4=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,V4=li(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,kd).getRegex(),P4=li("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,kd).getRegex(),I4=li("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,kd).getRegex(),B4=li(/\\([punct])/,"gu").replace(/punct/g,kd).getRegex(),F4=li(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),H4=li(ly).replace("(?:-->|$)","-->").getRegex(),z4=li("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",H4).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ef=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$4=li(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ef).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uC=li(/^!?\[(label)\]\[(ref)\]/).replace("label",Ef).replace("ref",oy).getRegex(),dC=li(/^!?\[(ref)\](?:\[\])?/).replace("ref",oy).getRegex(),W4=li("reflink|nolink(?!\\()","g").replace("reflink",uC).replace("nolink",dC).getRegex(),uy={_backpedal:gd,anyPunctuation:B4,autolink:F4,blockSkip:O4,br:cC,code:A4,del:gd,emStrongLDelim:V4,emStrongRDelimAst:P4,emStrongRDelimUnd:I4,escape:lC,link:$4,nolink:dC,punctuation:U4,reflink:uC,reflinkSearch:W4,tag:z4,text:M4,url:gd},G4={...uy,link:li(/^!?\[(label)\]\((.*?)\)/).replace("label",Ef).getRegex(),reflink:li(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ef).getRegex()},j_={...uy,escape:li(lC).replace("])","~|])").getRegex(),url:li(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},q4={...j_,br:li(cC).replace("{2,}","*").getRegex(),text:li(j_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},nf={normal:cy,gfm:T4,pedantic:L4},ad={normal:uy,gfm:j_,breaks:q4,pedantic:G4};class da{constructor(s){yi(this,"tokens");yi(this,"options");yi(this,"state");yi(this,"tokenizer");yi(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=s||hl,this.options.tokenizer=this.options.tokenizer||new Sf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const l={block:nf.normal,inline:ad.normal};this.options.pedantic?(l.block=nf.pedantic,l.inline=ad.pedantic):this.options.gfm&&(l.block=nf.gfm,this.options.breaks?l.inline=ad.breaks:l.inline=ad.gfm),this.tokenizer.rules=l}static get rules(){return{block:nf,inline:ad}}static lex(s,l){return new da(l).lex(s)}static lexInline(s,l){return new da(l).inlineTokens(s)}lex(s){s=s.replace(/\r\n|\r/g,`
|
|
298
|
+
`),this.blockTokens(s,this.tokens);for(let l=0;l<this.inlineQueue.length;l++){const m=this.inlineQueue[l];this.inlineTokens(m.src,m.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(s,l=[]){this.options.pedantic?s=s.replace(/\t/g," ").replace(/^ +$/gm,""):s=s.replace(/^( *)(\t+)/gm,(a,d,f)=>d+" ".repeat(f.length));let m,S,D,b;for(;s;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(m=a.call({lexer:this},s,l))?(s=s.substring(m.raw.length),l.push(m),!0):!1))){if(m=this.tokenizer.space(s)){s=s.substring(m.raw.length),m.raw.length===1&&l.length>0?l[l.length-1].raw+=`
|
|
299
|
+
`:l.push(m);continue}if(m=this.tokenizer.code(s)){s=s.substring(m.raw.length),S=l[l.length-1],S&&(S.type==="paragraph"||S.type==="text")?(S.raw+=`
|
|
300
|
+
`+m.raw,S.text+=`
|
|
301
|
+
`+m.text,this.inlineQueue[this.inlineQueue.length-1].src=S.text):l.push(m);continue}if(m=this.tokenizer.fences(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.heading(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.hr(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.blockquote(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.list(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.html(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.def(s)){s=s.substring(m.raw.length),S=l[l.length-1],S&&(S.type==="paragraph"||S.type==="text")?(S.raw+=`
|
|
302
|
+
`+m.raw,S.text+=`
|
|
303
|
+
`+m.raw,this.inlineQueue[this.inlineQueue.length-1].src=S.text):this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title});continue}if(m=this.tokenizer.table(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.lheading(s)){s=s.substring(m.raw.length),l.push(m);continue}if(D=s,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const d=s.slice(1);let f;this.options.extensions.startBlock.forEach(w=>{f=w.call({lexer:this},d),typeof f=="number"&&f>=0&&(a=Math.min(a,f))}),a<1/0&&a>=0&&(D=s.substring(0,a+1))}if(this.state.top&&(m=this.tokenizer.paragraph(D))){S=l[l.length-1],b&&S.type==="paragraph"?(S.raw+=`
|
|
304
|
+
`+m.raw,S.text+=`
|
|
305
|
+
`+m.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=S.text):l.push(m),b=D.length!==s.length,s=s.substring(m.raw.length);continue}if(m=this.tokenizer.text(s)){s=s.substring(m.raw.length),S=l[l.length-1],S&&S.type==="text"?(S.raw+=`
|
|
306
|
+
`+m.raw,S.text+=`
|
|
307
|
+
`+m.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=S.text):l.push(m);continue}if(s){const a="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,l}inline(s,l=[]){return this.inlineQueue.push({src:s,tokens:l}),l}inlineTokens(s,l=[]){let m,S,D,b=s,a,d,f;if(this.tokens.links){const w=Object.keys(this.tokens.links);if(w.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(b))!=null;)w.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(b=b.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+b.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(b))!=null;)b=b.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+b.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(b))!=null;)b=b.slice(0,a.index)+"++"+b.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;s;)if(d||(f=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(w=>(m=w.call({lexer:this},s,l))?(s=s.substring(m.raw.length),l.push(m),!0):!1))){if(m=this.tokenizer.escape(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.tag(s)){s=s.substring(m.raw.length),S=l[l.length-1],S&&m.type==="text"&&S.type==="text"?(S.raw+=m.raw,S.text+=m.text):l.push(m);continue}if(m=this.tokenizer.link(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(m.raw.length),S=l[l.length-1],S&&m.type==="text"&&S.type==="text"?(S.raw+=m.raw,S.text+=m.text):l.push(m);continue}if(m=this.tokenizer.emStrong(s,b,f)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.codespan(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.br(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.del(s)){s=s.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.autolink(s)){s=s.substring(m.raw.length),l.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(s))){s=s.substring(m.raw.length),l.push(m);continue}if(D=s,this.options.extensions&&this.options.extensions.startInline){let w=1/0;const h=s.slice(1);let _;this.options.extensions.startInline.forEach(N=>{_=N.call({lexer:this},h),typeof _=="number"&&_>=0&&(w=Math.min(w,_))}),w<1/0&&w>=0&&(D=s.substring(0,w+1))}if(m=this.tokenizer.inlineText(D)){s=s.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(f=m.raw.slice(-1)),d=!0,S=l[l.length-1],S&&S.type==="text"?(S.raw+=m.raw,S.text+=m.text):l.push(m);continue}if(s){const w="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return l}}class Cf{constructor(s){yi(this,"options");this.options=s||hl}code(s,l,m){var D;const S=(D=(l||"").match(/^\S*/))==null?void 0:D[0];return s=s.replace(/\n$/,"")+`
|
|
308
|
+
`,S?'<pre><code class="language-'+hs(S)+'">'+(m?s:hs(s,!0))+`</code></pre>
|
|
309
|
+
`:"<pre><code>"+(m?s:hs(s,!0))+`</code></pre>
|
|
310
|
+
`}blockquote(s){return`<blockquote>
|
|
311
|
+
${s}</blockquote>
|
|
312
|
+
`}html(s,l){return s}heading(s,l,m){return`<h${l}>${s}</h${l}>
|
|
313
|
+
`}hr(){return`<hr>
|
|
314
|
+
`}list(s,l,m){const S=l?"ol":"ul",D=l&&m!==1?' start="'+m+'"':"";return"<"+S+D+`>
|
|
315
|
+
`+s+"</"+S+`>
|
|
316
|
+
`}listitem(s,l,m){return`<li>${s}</li>
|
|
317
|
+
`}checkbox(s){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(s){return`<p>${s}</p>
|
|
318
|
+
`}table(s,l){return l&&(l=`<tbody>${l}</tbody>`),`<table>
|
|
319
|
+
<thead>
|
|
320
|
+
`+s+`</thead>
|
|
321
|
+
`+l+`</table>
|
|
322
|
+
`}tablerow(s){return`<tr>
|
|
323
|
+
${s}</tr>
|
|
324
|
+
`}tablecell(s,l){const m=l.header?"th":"td";return(l.align?`<${m} align="${l.align}">`:`<${m}>`)+s+`</${m}>
|
|
325
|
+
`}strong(s){return`<strong>${s}</strong>`}em(s){return`<em>${s}</em>`}codespan(s){return`<code>${s}</code>`}br(){return"<br>"}del(s){return`<del>${s}</del>`}link(s,l,m){const S=rS(s);if(S===null)return m;s=S;let D='<a href="'+s+'"';return l&&(D+=' title="'+l+'"'),D+=">"+m+"</a>",D}image(s,l,m){const S=rS(s);if(S===null)return m;s=S;let D=`<img src="${s}" alt="${m}"`;return l&&(D+=` title="${l}"`),D+=">",D}text(s){return s}}class dy{strong(s){return s}em(s){return s}codespan(s){return s}del(s){return s}html(s){return s}text(s){return s}link(s,l,m){return""+m}image(s,l,m){return""+m}br(){return""}}class ha{constructor(s){yi(this,"options");yi(this,"renderer");yi(this,"textRenderer");this.options=s||hl,this.options.renderer=this.options.renderer||new Cf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new dy}static parse(s,l){return new ha(l).parse(s)}static parseInline(s,l){return new ha(l).parseInline(s)}parse(s,l=!0){let m="";for(let S=0;S<s.length;S++){const D=s[S];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[D.type]){const b=D,a=this.options.extensions.renderers[b.type].call({parser:this},b);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(b.type)){m+=a||"";continue}}switch(D.type){case"space":continue;case"hr":{m+=this.renderer.hr();continue}case"heading":{const b=D;m+=this.renderer.heading(this.parseInline(b.tokens),b.depth,b4(this.parseInline(b.tokens,this.textRenderer)));continue}case"code":{const b=D;m+=this.renderer.code(b.text,b.lang,!!b.escaped);continue}case"table":{const b=D;let a="",d="";for(let w=0;w<b.header.length;w++)d+=this.renderer.tablecell(this.parseInline(b.header[w].tokens),{header:!0,align:b.align[w]});a+=this.renderer.tablerow(d);let f="";for(let w=0;w<b.rows.length;w++){const h=b.rows[w];d="";for(let _=0;_<h.length;_++)d+=this.renderer.tablecell(this.parseInline(h[_].tokens),{header:!1,align:b.align[_]});f+=this.renderer.tablerow(d)}m+=this.renderer.table(a,f);continue}case"blockquote":{const b=D,a=this.parse(b.tokens);m+=this.renderer.blockquote(a);continue}case"list":{const b=D,a=b.ordered,d=b.start,f=b.loose;let w="";for(let h=0;h<b.items.length;h++){const _=b.items[h],N=_.checked,C=_.task;let y="";if(_.task){const c=this.renderer.checkbox(!!N);f?_.tokens.length>0&&_.tokens[0].type==="paragraph"?(_.tokens[0].text=c+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type==="text"&&(_.tokens[0].tokens[0].text=c+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:c+" "}):y+=c+" "}y+=this.parse(_.tokens,f),w+=this.renderer.listitem(y,C,!!N)}m+=this.renderer.list(w,a,d);continue}case"html":{const b=D;m+=this.renderer.html(b.text,b.block);continue}case"paragraph":{const b=D;m+=this.renderer.paragraph(this.parseInline(b.tokens));continue}case"text":{let b=D,a=b.tokens?this.parseInline(b.tokens):b.text;for(;S+1<s.length&&s[S+1].type==="text";)b=s[++S],a+=`
|
|
326
|
+
`+(b.tokens?this.parseInline(b.tokens):b.text);m+=l?this.renderer.paragraph(a):a;continue}default:{const b='Token with "'+D.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return m}parseInline(s,l){l=l||this.renderer;let m="";for(let S=0;S<s.length;S++){const D=s[S];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[D.type]){const b=this.options.extensions.renderers[D.type].call({parser:this},D);if(b!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(D.type)){m+=b||"";continue}}switch(D.type){case"escape":{const b=D;m+=l.text(b.text);break}case"html":{const b=D;m+=l.html(b.text);break}case"link":{const b=D;m+=l.link(b.href,b.title,this.parseInline(b.tokens,l));break}case"image":{const b=D;m+=l.image(b.href,b.title,b.text);break}case"strong":{const b=D;m+=l.strong(this.parseInline(b.tokens,l));break}case"em":{const b=D;m+=l.em(this.parseInline(b.tokens,l));break}case"codespan":{const b=D;m+=l.codespan(b.text);break}case"br":{m+=l.br();break}case"del":{const b=D;m+=l.del(this.parseInline(b.tokens,l));break}case"text":{const b=D;m+=l.text(b.text);break}default:{const b='Token with "'+D.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return m}}class bd{constructor(s){yi(this,"options");this.options=s||hl}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}}yi(bd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var cl,D_,hC;class Y4{constructor(...s){JN(this,cl);yi(this,"defaults",sy());yi(this,"options",this.setOptions);yi(this,"parse",Km(this,cl,D_).call(this,da.lex,ha.parse));yi(this,"parseInline",Km(this,cl,D_).call(this,da.lexInline,ha.parseInline));yi(this,"Parser",ha);yi(this,"Renderer",Cf);yi(this,"TextRenderer",dy);yi(this,"Lexer",da);yi(this,"Tokenizer",Sf);yi(this,"Hooks",bd);this.use(...s)}walkTokens(s,l){var S,D;let m=[];for(const b of s)switch(m=m.concat(l.call(this,b)),b.type){case"table":{const a=b;for(const d of a.header)m=m.concat(this.walkTokens(d.tokens,l));for(const d of a.rows)for(const f of d)m=m.concat(this.walkTokens(f.tokens,l));break}case"list":{const a=b;m=m.concat(this.walkTokens(a.items,l));break}default:{const a=b;(D=(S=this.defaults.extensions)==null?void 0:S.childTokens)!=null&&D[a.type]?this.defaults.extensions.childTokens[a.type].forEach(d=>{const f=a[d].flat(1/0);m=m.concat(this.walkTokens(f,l))}):a.tokens&&(m=m.concat(this.walkTokens(a.tokens,l)))}}return m}use(...s){const l=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(m=>{const S={...m};if(S.async=this.defaults.async||S.async||!1,m.extensions&&(m.extensions.forEach(D=>{if(!D.name)throw new Error("extension name required");if("renderer"in D){const b=l.renderers[D.name];b?l.renderers[D.name]=function(...a){let d=D.renderer.apply(this,a);return d===!1&&(d=b.apply(this,a)),d}:l.renderers[D.name]=D.renderer}if("tokenizer"in D){if(!D.level||D.level!=="block"&&D.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const b=l[D.level];b?b.unshift(D.tokenizer):l[D.level]=[D.tokenizer],D.start&&(D.level==="block"?l.startBlock?l.startBlock.push(D.start):l.startBlock=[D.start]:D.level==="inline"&&(l.startInline?l.startInline.push(D.start):l.startInline=[D.start]))}"childTokens"in D&&D.childTokens&&(l.childTokens[D.name]=D.childTokens)}),S.extensions=l),m.renderer){const D=this.defaults.renderer||new Cf(this.defaults);for(const b in m.renderer){if(!(b in D))throw new Error(`renderer '${b}' does not exist`);if(b==="options")continue;const a=b,d=m.renderer[a],f=D[a];D[a]=(...w)=>{let h=d.apply(D,w);return h===!1&&(h=f.apply(D,w)),h||""}}S.renderer=D}if(m.tokenizer){const D=this.defaults.tokenizer||new Sf(this.defaults);for(const b in m.tokenizer){if(!(b in D))throw new Error(`tokenizer '${b}' does not exist`);if(["options","rules","lexer"].includes(b))continue;const a=b,d=m.tokenizer[a],f=D[a];D[a]=(...w)=>{let h=d.apply(D,w);return h===!1&&(h=f.apply(D,w)),h}}S.tokenizer=D}if(m.hooks){const D=this.defaults.hooks||new bd;for(const b in m.hooks){if(!(b in D))throw new Error(`hook '${b}' does not exist`);if(b==="options")continue;const a=b,d=m.hooks[a],f=D[a];bd.passThroughHooks.has(b)?D[a]=w=>{if(this.defaults.async)return Promise.resolve(d.call(D,w)).then(_=>f.call(D,_));const h=d.call(D,w);return f.call(D,h)}:D[a]=(...w)=>{let h=d.apply(D,w);return h===!1&&(h=f.apply(D,w)),h}}S.hooks=D}if(m.walkTokens){const D=this.defaults.walkTokens,b=m.walkTokens;S.walkTokens=function(a){let d=[];return d.push(b.call(this,a)),D&&(d=d.concat(D.call(this,a))),d}}this.defaults={...this.defaults,...S}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,l){return da.lex(s,l??this.defaults)}parser(s,l){return ha.parse(s,l??this.defaults)}}cl=new WeakSet,D_=function(s,l){return(m,S)=>{const D={...S},b={...this.defaults,...D};this.defaults.async===!0&&D.async===!1&&(b.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),b.async=!0);const a=Km(this,cl,hC).call(this,!!b.silent,!!b.async);if(typeof m>"u"||m===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof m!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(m)+", string expected"));if(b.hooks&&(b.hooks.options=b),b.async)return Promise.resolve(b.hooks?b.hooks.preprocess(m):m).then(d=>s(d,b)).then(d=>b.hooks?b.hooks.processAllTokens(d):d).then(d=>b.walkTokens?Promise.all(this.walkTokens(d,b.walkTokens)).then(()=>d):d).then(d=>l(d,b)).then(d=>b.hooks?b.hooks.postprocess(d):d).catch(a);try{b.hooks&&(m=b.hooks.preprocess(m));let d=s(m,b);b.hooks&&(d=b.hooks.processAllTokens(d)),b.walkTokens&&this.walkTokens(d,b.walkTokens);let f=l(d,b);return b.hooks&&(f=b.hooks.postprocess(f)),f}catch(d){return a(d)}}},hC=function(s,l){return m=>{if(m.message+=`
|
|
327
|
+
Please report this to https://github.com/markedjs/marked.`,s){const S="<p>An error occurred:</p><pre>"+hs(m.message+"",!0)+"</pre>";return l?Promise.resolve(S):S}if(l)return Promise.reject(m);throw m}};const ll=new Y4;function ti(i,s){return ll.parse(i,s)}ti.options=ti.setOptions=function(i){return ll.setOptions(i),ti.defaults=ll.defaults,nC(ti.defaults),ti};ti.getDefaults=sy;ti.defaults=hl;ti.use=function(...i){return ll.use(...i),ti.defaults=ll.defaults,nC(ti.defaults),ti};ti.walkTokens=function(i,s){return ll.walkTokens(i,s)};ti.parseInline=ll.parseInline;ti.Parser=ha;ti.parser=ha.parse;ti.Renderer=Cf;ti.TextRenderer=dy;ti.Lexer=da;ti.lexer=da.lex;ti.Tokenizer=Sf;ti.Hooks=bd;ti.parse=ti;ti.options;ti.setOptions;ti.use;ti.walkTokens;ti.parseInline;ha.parse;da.lex;/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function lS(i,s){(s==null||s>i.length)&&(s=i.length);for(var l=0,m=Array(s);l<s;l++)m[l]=i[l];return m}function K4(i){if(Array.isArray(i))return i}function X4(i,s){var l=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(l!=null){var m,S,D,b,a=[],d=!0,f=!1;try{if(D=(l=l.call(i)).next,s!==0)for(;!(d=(m=D.call(l)).done)&&(a.push(m.value),a.length!==s);d=!0);}catch(w){f=!0,S=w}finally{try{if(!d&&l.return!=null&&(b=l.return(),Object(b)!==b))return}finally{if(f)throw S}}return a}}function J4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
328
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z4(i,s){return K4(i)||X4(i,s)||Q4(i,s)||J4()}function Q4(i,s){if(i){if(typeof i=="string")return lS(i,s);var l={}.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?lS(i,s):void 0}}const mC=Object.entries,cS=Object.setPrototypeOf,eV=Object.isFrozen,tV=Object.getPrototypeOf,nV=Object.getOwnPropertyDescriptor;let Wr=Object.freeze,Es=Object.seal,gc=Object.create,fC=typeof Reflect<"u"&&Reflect,k_=fC.apply,R_=fC.construct;Wr||(Wr=function(s){return s});Es||(Es=function(s){return s});k_||(k_=function(s,l){for(var m=arguments.length,S=new Array(m>2?m-2:0),D=2;D<m;D++)S[D-2]=arguments[D];return s.apply(l,S)});R_||(R_=function(s){for(var l=arguments.length,m=new Array(l>1?l-1:0),S=1;S<l;S++)m[S-1]=arguments[S];return new s(...m)});const Xo=Wi(Array.prototype.forEach),iV=Wi(Array.prototype.lastIndexOf),uS=Wi(Array.prototype.pop),mc=Wi(Array.prototype.push),rV=Wi(Array.prototype.splice),zr=Array.isArray,dd=Wi(String.prototype.toLowerCase),Kb=Wi(String.prototype.toString),dS=Wi(String.prototype.match),fc=Wi(String.prototype.replace),hS=Wi(String.prototype.indexOf),sV=Wi(String.prototype.trim),aV=Wi(Number.prototype.toString),oV=Wi(Boolean.prototype.toString),mS=typeof BigInt>"u"?null:Wi(BigInt.prototype.toString),fS=typeof Symbol>"u"?null:Wi(Symbol.prototype.toString),Mi=Wi(Object.prototype.hasOwnProperty),od=Wi(Object.prototype.toString),Nr=Wi(RegExp.prototype.test),pc=lV(TypeError);function Wi(i){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var l=arguments.length,m=new Array(l>1?l-1:0),S=1;S<l;S++)m[S-1]=arguments[S];return k_(i,s,m)}}function lV(i){return function(){for(var s=arguments.length,l=new Array(s),m=0;m<s;m++)l[m]=arguments[m];return R_(i,l)}}function _n(i,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:dd;if(cS&&cS(i,null),!zr(s))return i;let m=s.length;for(;m--;){let S=s[m];if(typeof S=="string"){const D=l(S);D!==S&&(eV(s)||(s[m]=D),S=D)}i[S]=!0}return i}function cV(i){for(let s=0;s<i.length;s++)Mi(i,s)||(i[s]=null);return i}function Lr(i){const s=gc(null);for(const m of mC(i)){var l=Z4(m,2);const S=l[0],D=l[1];Mi(i,S)&&(zr(D)?s[S]=cV(D):D&&typeof D=="object"&&D.constructor===Object?s[S]=Lr(D):s[S]=D)}return s}function uV(i){switch(typeof i){case"string":return i;case"number":return aV(i);case"boolean":return oV(i);case"bigint":return mS?mS(i):"0";case"symbol":return fS?fS(i):"Symbol()";case"undefined":return od(i);case"function":case"object":{if(i===null)return od(i);const s=i,l=ua(s,"toString");if(typeof l=="function"){const m=l(s);return typeof m=="string"?m:od(m)}return od(i)}default:return od(i)}}function ua(i,s){for(;i!==null;){const m=nV(i,s);if(m){if(m.get)return Wi(m.get);if(typeof m.value=="function")return Wi(m.value)}i=tV(i)}function l(){return null}return l}function dV(i){try{return Nr(i,""),!0}catch{return!1}}const pS=Wr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Xb=Wr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Jb=Wr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hV=Wr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Zb=Wr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mV=Wr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vS=Wr(["#text"]),gS=Wr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Qb=Wr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),bS=Wr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),rf=Wr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fV=Es(/{{[\w\W]*|^[\w\W]*}}/g),pV=Es(/<%[\w\W]*|^[\w\W]*%>/g),vV=Es(/\${[\w\W]*/g),gV=Es(/^data-[\-\w.\u00B7-\uFFFF]+$/),bV=Es(/^aria-[\-\w]+$/),_S=Es(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_V=Es(/^(?:\w+script|data):/i),yV=Es(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wV=Es(/^html$/i),xV=Es(/^[a-z][.\w]*(-[.\w]+)+$/i),ca={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},NV=function(){return typeof window>"u"?null:window},SV=function(s,l){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let m=null;const S="data-tt-policy-suffix";l&&l.hasAttribute(S)&&(m=l.getAttribute(S));const D="dompurify"+(m?"#"+m:"");try{return s.createPolicy(D,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+D+" could not be created."),null}},yS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pC(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NV();const s=pt=>pC(pt);if(s.version="3.4.8",s.removed=[],!i||!i.document||i.document.nodeType!==ca.document||!i.Element)return s.isSupported=!1,s;let l=i.document;const m=l,S=m.currentScript;i.DocumentFragment;const D=i.HTMLTemplateElement,b=i.Node,a=i.Element,d=i.NodeFilter,f=i.NamedNodeMap;f===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const w=i.DOMParser,h=i.trustedTypes,_=a.prototype,N=ua(_,"cloneNode"),C=ua(_,"remove"),y=ua(_,"nextSibling"),c=ua(_,"childNodes"),p=ua(_,"parentNode"),v=ua(_,"shadowRoot"),g=ua(_,"attributes"),E=b&&b.prototype?ua(b.prototype,"nodeType"):null,R=b&&b.prototype?ua(b.prototype,"nodeName"):null;if(typeof D=="function"){const pt=l.createElement("template");pt.content&&pt.content.ownerDocument&&(l=pt.content.ownerDocument)}let j,A="",k=0;const L=function(ie){if(k>0)throw pc('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');k++;try{return j.createHTML(ie)}finally{k--}},O=l,H=O.implementation,V=O.createNodeIterator,B=O.createDocumentFragment,q=O.getElementsByTagName,ne=m.importNode;let Y=yS();s.isSupported=typeof mC=="function"&&typeof p=="function"&&H&&H.createHTMLDocument!==void 0;const J=fV,ee=pV,P=vV,W=gV,Q=bV,K=_V,he=yV,ce=xV;let ke=_S,we=null;const re=_n({},[...pS,...Xb,...Jb,...Zb,...vS]);let G=null;const ge=_n({},[...gS,...Qb,...bS,...rf]);let de=Object.seal(gc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pe=null,Ne=null;const Ie=Object.seal(gc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ze=!0,ut=!0,At=!1,Ke=!0,qt=!1,Ut=!0,xe=!1,Ve=!1,Xe=!1,Te=!1,lt=!1,dt=!1,$=!0,at=!1;const De="user-content-";let We=!0,be=!1,Pe={},He=null;const Ot=_n({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Le=null;const ve=_n({},["audio","video","img","source","image","track"]);let xt=null;const Kt=_n({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ot="http://www.w3.org/1998/Math/MathML",Tt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Vt=Qt,Fn=!1,mn=null;const xi=_n({},[ot,Tt,Qt],Kb);let ci=_n({},["mi","mo","mn","ms","mtext"]),Hn=_n({},["annotation-xml"]);const vi=_n({},["title","style","font","a","script"]);let Yn=null;const st=["application/xhtml+xml","text/html"],tn="text/html";let Pt=null,Tn=null;const Sn=l.createElement("form"),zn=function(ie){return ie instanceof RegExp||ie instanceof Function},ae=function(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Tn&&Tn===ie)return;(!ie||typeof ie!="object")&&(ie={}),ie=Lr(ie),Yn=st.indexOf(ie.PARSER_MEDIA_TYPE)===-1?tn:ie.PARSER_MEDIA_TYPE,Pt=Yn==="application/xhtml+xml"?Kb:dd,we=Mi(ie,"ALLOWED_TAGS")&&zr(ie.ALLOWED_TAGS)?_n({},ie.ALLOWED_TAGS,Pt):re,G=Mi(ie,"ALLOWED_ATTR")&&zr(ie.ALLOWED_ATTR)?_n({},ie.ALLOWED_ATTR,Pt):ge,mn=Mi(ie,"ALLOWED_NAMESPACES")&&zr(ie.ALLOWED_NAMESPACES)?_n({},ie.ALLOWED_NAMESPACES,Kb):xi,xt=Mi(ie,"ADD_URI_SAFE_ATTR")&&zr(ie.ADD_URI_SAFE_ATTR)?_n(Lr(Kt),ie.ADD_URI_SAFE_ATTR,Pt):Kt,Le=Mi(ie,"ADD_DATA_URI_TAGS")&&zr(ie.ADD_DATA_URI_TAGS)?_n(Lr(ve),ie.ADD_DATA_URI_TAGS,Pt):ve,He=Mi(ie,"FORBID_CONTENTS")&&zr(ie.FORBID_CONTENTS)?_n({},ie.FORBID_CONTENTS,Pt):Ot,pe=Mi(ie,"FORBID_TAGS")&&zr(ie.FORBID_TAGS)?_n({},ie.FORBID_TAGS,Pt):Lr({}),Ne=Mi(ie,"FORBID_ATTR")&&zr(ie.FORBID_ATTR)?_n({},ie.FORBID_ATTR,Pt):Lr({}),Pe=Mi(ie,"USE_PROFILES")?ie.USE_PROFILES&&typeof ie.USE_PROFILES=="object"?Lr(ie.USE_PROFILES):ie.USE_PROFILES:!1,Ze=ie.ALLOW_ARIA_ATTR!==!1,ut=ie.ALLOW_DATA_ATTR!==!1,At=ie.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=ie.SAFE_FOR_TEMPLATES||!1,Ut=ie.SAFE_FOR_XML!==!1,xe=ie.WHOLE_DOCUMENT||!1,Te=ie.RETURN_DOM||!1,lt=ie.RETURN_DOM_FRAGMENT||!1,dt=ie.RETURN_TRUSTED_TYPE||!1,Xe=ie.FORCE_BODY||!1,$=ie.SANITIZE_DOM!==!1,at=ie.SANITIZE_NAMED_PROPS||!1,We=ie.KEEP_CONTENT!==!1,be=ie.IN_PLACE||!1,ke=dV(ie.ALLOWED_URI_REGEXP)?ie.ALLOWED_URI_REGEXP:_S,Vt=typeof ie.NAMESPACE=="string"?ie.NAMESPACE:Qt,ci=Mi(ie,"MATHML_TEXT_INTEGRATION_POINTS")&&ie.MATHML_TEXT_INTEGRATION_POINTS&&typeof ie.MATHML_TEXT_INTEGRATION_POINTS=="object"?Lr(ie.MATHML_TEXT_INTEGRATION_POINTS):_n({},["mi","mo","mn","ms","mtext"]),Hn=Mi(ie,"HTML_INTEGRATION_POINTS")&&ie.HTML_INTEGRATION_POINTS&&typeof ie.HTML_INTEGRATION_POINTS=="object"?Lr(ie.HTML_INTEGRATION_POINTS):_n({},["annotation-xml"]);const Re=Mi(ie,"CUSTOM_ELEMENT_HANDLING")&&ie.CUSTOM_ELEMENT_HANDLING&&typeof ie.CUSTOM_ELEMENT_HANDLING=="object"?Lr(ie.CUSTOM_ELEMENT_HANDLING):gc(null);if(de=gc(null),Mi(Re,"tagNameCheck")&&zn(Re.tagNameCheck)&&(de.tagNameCheck=Re.tagNameCheck),Mi(Re,"attributeNameCheck")&&zn(Re.attributeNameCheck)&&(de.attributeNameCheck=Re.attributeNameCheck),Mi(Re,"allowCustomizedBuiltInElements")&&typeof Re.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=Re.allowCustomizedBuiltInElements),qt&&(ut=!1),lt&&(Te=!0),Pe&&(we=_n({},vS),G=gc(null),Pe.html===!0&&(_n(we,pS),_n(G,gS)),Pe.svg===!0&&(_n(we,Xb),_n(G,Qb),_n(G,rf)),Pe.svgFilters===!0&&(_n(we,Jb),_n(G,Qb),_n(G,rf)),Pe.mathMl===!0&&(_n(we,Zb),_n(G,bS),_n(G,rf))),Ie.tagCheck=null,Ie.attributeCheck=null,Mi(ie,"ADD_TAGS")&&(typeof ie.ADD_TAGS=="function"?Ie.tagCheck=ie.ADD_TAGS:zr(ie.ADD_TAGS)&&(we===re&&(we=Lr(we)),_n(we,ie.ADD_TAGS,Pt))),Mi(ie,"ADD_ATTR")&&(typeof ie.ADD_ATTR=="function"?Ie.attributeCheck=ie.ADD_ATTR:zr(ie.ADD_ATTR)&&(G===ge&&(G=Lr(G)),_n(G,ie.ADD_ATTR,Pt))),Mi(ie,"ADD_URI_SAFE_ATTR")&&zr(ie.ADD_URI_SAFE_ATTR)&&_n(xt,ie.ADD_URI_SAFE_ATTR,Pt),Mi(ie,"FORBID_CONTENTS")&&zr(ie.FORBID_CONTENTS)&&(He===Ot&&(He=Lr(He)),_n(He,ie.FORBID_CONTENTS,Pt)),Mi(ie,"ADD_FORBID_CONTENTS")&&zr(ie.ADD_FORBID_CONTENTS)&&(He===Ot&&(He=Lr(He)),_n(He,ie.ADD_FORBID_CONTENTS,Pt)),We&&(we["#text"]=!0),xe&&_n(we,["html","head","body"]),we.table&&(_n(we,["tbody"]),delete pe.tbody),ie.TRUSTED_TYPES_POLICY){if(typeof ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw pc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const nt=j;j=ie.TRUSTED_TYPES_POLICY;try{A=L("")}catch(hn){throw j=nt,hn}}else j===void 0&&ie.TRUSTED_TYPES_POLICY!==null&&(j=SV(h,S)),j&&typeof A=="string"&&(A=L(""));(Y.uponSanitizeElement.length>0||Y.uponSanitizeAttribute.length>0)&&we===re&&(we=Lr(we)),Y.uponSanitizeAttribute.length>0&&G===ge&&(G=Lr(G)),Wr&&Wr(ie),Tn=ie},Be=_n({},[...Xb,...Jb,...hV]),et=_n({},[...Zb,...mV]),Ct=function(ie){let Re=p(ie);(!Re||!Re.tagName)&&(Re={namespaceURI:Vt,tagName:"template"});const nt=dd(ie.tagName),hn=dd(Re.tagName);return mn[ie.namespaceURI]?ie.namespaceURI===Tt?Re.namespaceURI===Qt?nt==="svg":Re.namespaceURI===ot?nt==="svg"&&(hn==="annotation-xml"||ci[hn]):!!Be[nt]:ie.namespaceURI===ot?Re.namespaceURI===Qt?nt==="math":Re.namespaceURI===Tt?nt==="math"&&Hn[hn]:!!et[nt]:ie.namespaceURI===Qt?Re.namespaceURI===Tt&&!Hn[hn]||Re.namespaceURI===ot&&!ci[hn]?!1:!et[nt]&&(vi[nt]||!Be[nt]):!!(Yn==="application/xhtml+xml"&&mn[ie.namespaceURI]):!1},jt=function(ie){mc(s.removed,{element:ie});try{p(ie).removeChild(ie)}catch{C(ie)}},Rt=function(ie,Re){try{mc(s.removed,{attribute:Re.getAttributeNode(ie),from:Re})}catch{mc(s.removed,{attribute:null,from:Re})}if(Re.removeAttribute(ie),ie==="is")if(Te||lt)try{jt(Re)}catch{}else try{Re.setAttribute(ie,"")}catch{}},Lt=function(ie){let Re=null,nt=null;if(Xe)ie="<remove></remove>"+ie;else{const $t=dS(ie,/^[\r\n\t ]+/);nt=$t&&$t[0]}Yn==="application/xhtml+xml"&&Vt===Qt&&(ie='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ie+"</body></html>");const hn=j?L(ie):ie;if(Vt===Qt)try{Re=new w().parseFromString(hn,Yn)}catch{}if(!Re||!Re.documentElement){Re=H.createDocument(Vt,"template",null);try{Re.documentElement.innerHTML=Fn?A:hn}catch{}}const Ft=Re.body||Re.documentElement;return ie&&nt&&Ft.insertBefore(l.createTextNode(nt),Ft.childNodes[0]||null),Vt===Qt?q.call(Re,xe?"html":"body")[0]:xe?Re.documentElement:Ft},Nt=function(ie){return V.call(ie.ownerDocument||ie,ie,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},$n=function(ie){var Re,nt;ie.normalize();const hn=V.call(ie.ownerDocument||ie,ie,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let Ft=hn.nextNode();for(;Ft;){let vn=Ft.data;Xo([J,ee,P],ai=>{vn=fc(vn,ai," ")}),Ft.data=vn,Ft=hn.nextNode()}const $t=(Re=(nt=ie.querySelectorAll)===null||nt===void 0?void 0:nt.call(ie,"template"))!==null&&Re!==void 0?Re:[];Xo(Array.from($t),vn=>{fn(vn.content)&&$n(vn.content)})},Bt=function(ie){const Re=R?R(ie):null;return typeof Re!="string"||Pt(Re)!=="form"?!1:typeof ie.nodeName!="string"||typeof ie.textContent!="string"||typeof ie.removeChild!="function"||ie.attributes!==g(ie)||typeof ie.removeAttribute!="function"||typeof ie.setAttribute!="function"||typeof ie.namespaceURI!="string"||typeof ie.insertBefore!="function"||typeof ie.hasChildNodes!="function"||ie.nodeType!==E(ie)||ie.childNodes!==c(ie)},fn=function(ie){if(!E||typeof ie!="object"||ie===null)return!1;try{return E(ie)===ca.documentFragment}catch{return!1}},ni=function(ie){if(!E||typeof ie!="object"||ie===null)return!1;try{return typeof E(ie)=="number"}catch{return!1}};function Xn(pt,ie,Re){Xo(pt,nt=>{nt.call(s,ie,Re,Tn)})}const Ui=function(ie){let Re=null;if(Xn(Y.beforeSanitizeElements,ie,null),Bt(ie))return jt(ie),!0;const nt=Pt(R?R(ie):ie.nodeName);if(Xn(Y.uponSanitizeElement,ie,{tagName:nt,allowedTags:we}),Ut&&ie.hasChildNodes()&&!ni(ie.firstElementChild)&&Nr(/<[/\w!]/g,ie.innerHTML)&&Nr(/<[/\w!]/g,ie.textContent)||Ut&&ie.namespaceURI===Qt&&nt==="style"&&ni(ie.firstElementChild)||ie.nodeType===ca.progressingInstruction||Ut&&ie.nodeType===ca.comment&&Nr(/<[/\w]/g,ie.data))return jt(ie),!0;if(pe[nt]||!(Ie.tagCheck instanceof Function&&Ie.tagCheck(nt))&&!we[nt]){if(!pe[nt]&&Ni(nt)&&(de.tagNameCheck instanceof RegExp&&Nr(de.tagNameCheck,nt)||de.tagNameCheck instanceof Function&&de.tagNameCheck(nt)))return!1;if(We&&!He[nt]){const Ft=p(ie),$t=c(ie);if($t&&Ft){const vn=$t.length;for(let ai=vn-1;ai>=0;--ai){const Wn=N($t[ai],!0);Ft.insertBefore(Wn,y(ie))}}}return jt(ie),!0}return(E?E(ie):ie.nodeType)===ca.element&&!Ct(ie)||(nt==="noscript"||nt==="noembed"||nt==="noframes")&&Nr(/<\/no(script|embed|frames)/i,ie.innerHTML)?(jt(ie),!0):(qt&&ie.nodeType===ca.text&&(Re=ie.textContent,Xo([J,ee,P],Ft=>{Re=fc(Re,Ft," ")}),ie.textContent!==Re&&(mc(s.removed,{element:ie.cloneNode()}),ie.textContent=Re)),Xn(Y.afterSanitizeElements,ie,null),!1)},wn=function(ie,Re,nt){if(Ne[Re]||$&&(Re==="id"||Re==="name")&&(nt in l||nt in Sn))return!1;const hn=G[Re]||Ie.attributeCheck instanceof Function&&Ie.attributeCheck(Re,ie);if(!(ut&&!Ne[Re]&&Nr(W,Re))){if(!(Ze&&Nr(Q,Re))){if(!hn||Ne[Re]){if(!(Ni(ie)&&(de.tagNameCheck instanceof RegExp&&Nr(de.tagNameCheck,ie)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ie))&&(de.attributeNameCheck instanceof RegExp&&Nr(de.attributeNameCheck,Re)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(Re,ie))||Re==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&Nr(de.tagNameCheck,nt)||de.tagNameCheck instanceof Function&&de.tagNameCheck(nt))))return!1}else if(!xt[Re]){if(!Nr(ke,fc(nt,he,""))){if(!((Re==="src"||Re==="xlink:href"||Re==="href")&&ie!=="script"&&hS(nt,"data:")===0&&Le[ie])){if(!(At&&!Nr(K,fc(nt,he,"")))){if(nt)return!1}}}}}}return!0},gi=_n({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ni=function(ie){return!gi[dd(ie)]&&Nr(ce,ie)},Ht=function(ie){Xn(Y.beforeSanitizeAttributes,ie,null);const Re=ie.attributes;if(!Re||Bt(ie))return;const nt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let hn=Re.length;for(;hn--;){const Ft=Re[hn],$t=Ft.name,vn=Ft.namespaceURI,ai=Ft.value,Wn=Pt($t),rr=ai;let En=$t==="value"?rr:sV(rr);if(nt.attrName=Wn,nt.attrValue=En,nt.keepAttr=!0,nt.forceKeepAttr=void 0,Xn(Y.uponSanitizeAttribute,ie,nt),En=nt.attrValue,at&&(Wn==="id"||Wn==="name")&&hS(En,De)!==0&&(Rt($t,ie),En=De+En),Ut&&Nr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,En)){Rt($t,ie);continue}if(Wn==="attributename"&&dS(En,"href")){Rt($t,ie);continue}if(nt.forceKeepAttr)continue;if(!nt.keepAttr){Rt($t,ie);continue}if(!Ke&&Nr(/\/>/i,En)){Rt($t,ie);continue}qt&&Xo([J,ee,P],ji=>{En=fc(En,ji," ")});const Oi=Pt(ie.nodeName);if(!wn(Oi,Wn,En)){Rt($t,ie);continue}if(j&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!vn)switch(h.getAttributeType(Oi,Wn)){case"TrustedHTML":{En=L(En);break}case"TrustedScriptURL":{En=j.createScriptURL(En);break}}if(En!==rr)try{vn?ie.setAttributeNS(vn,$t,En):ie.setAttribute($t,En),Bt(ie)?jt(ie):uS(s.removed)}catch{Rt($t,ie)}}Xn(Y.afterSanitizeAttributes,ie,null)},Gi=function(ie){let Re=null;const nt=Nt(ie);for(Xn(Y.beforeSanitizeShadowDOM,ie,null);Re=nt.nextNode();)if(Xn(Y.uponSanitizeShadowNode,Re,null),Ui(Re),Ht(Re),fn(Re.content)&&Gi(Re.content),(E?E(Re):Re.nodeType)===ca.element){const Ft=v?v(Re):Re.shadowRoot;fn(Ft)&&(Si(Ft),Gi(Ft))}Xn(Y.afterSanitizeShadowDOM,ie,null)},Si=function(ie){const Re=E?E(ie):ie.nodeType;if(Re===ca.element){const Ft=v?v(ie):ie.shadowRoot;fn(Ft)&&(Si(Ft),Gi(Ft))}const nt=c?c(ie):ie.childNodes;if(!nt)return;const hn=[];Xo(nt,Ft=>{mc(hn,Ft)});for(const Ft of hn)Si(Ft);if(Re===ca.element){const Ft=R?R(ie):null;if(typeof Ft=="string"&&Pt(Ft)==="template"){const $t=ie.content;fn($t)&&Si($t)}}};return s.sanitize=function(pt){let ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Re=null,nt=null,hn=null,Ft=null;if(Fn=!pt,Fn&&(pt="<!-->"),typeof pt!="string"&&!ni(pt)&&(pt=uV(pt),typeof pt!="string"))throw pc("dirty is not a string, aborting");if(!s.isSupported)return pt;if(Ve||ae(ie),s.removed=[],typeof pt=="string"&&(be=!1),be){const ai=R?R(pt):pt.nodeName;if(typeof ai=="string"){const Wn=Pt(ai);if(!we[Wn]||pe[Wn])throw pc("root node is forbidden and cannot be sanitized in-place")}if(Bt(pt))throw pc("root node is clobbered and cannot be sanitized in-place");Si(pt)}else if(ni(pt))Re=Lt("<!---->"),nt=Re.ownerDocument.importNode(pt,!0),nt.nodeType===ca.element&&nt.nodeName==="BODY"||nt.nodeName==="HTML"?Re=nt:Re.appendChild(nt),Si(nt);else{if(!Te&&!qt&&!xe&&pt.indexOf("<")===-1)return j&&dt?L(pt):pt;if(Re=Lt(pt),!Re)return Te?null:dt?A:""}Re&&Xe&&jt(Re.firstChild);const $t=Nt(be?pt:Re);for(;hn=$t.nextNode();)Ui(hn),Ht(hn),fn(hn.content)&&Gi(hn.content);if(be)return qt&&$n(pt),pt;if(Te){if(qt&&$n(Re),lt)for(Ft=B.call(Re.ownerDocument);Re.firstChild;)Ft.appendChild(Re.firstChild);else Ft=Re;return(G.shadowroot||G.shadowrootmode)&&(Ft=ne.call(m,Ft,!0)),Ft}let vn=xe?Re.outerHTML:Re.innerHTML;return xe&&we["!doctype"]&&Re.ownerDocument&&Re.ownerDocument.doctype&&Re.ownerDocument.doctype.name&&Nr(wV,Re.ownerDocument.doctype.name)&&(vn="<!DOCTYPE "+Re.ownerDocument.doctype.name+`>
|
|
329
|
+
`+vn),qt&&Xo([J,ee,P],ai=>{vn=fc(vn,ai," ")}),j&&dt?L(vn):vn},s.setConfig=function(){let pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(pt),Ve=!0},s.clearConfig=function(){Tn=null,Ve=!1},s.isValidAttribute=function(pt,ie,Re){Tn||ae({});const nt=Pt(pt),hn=Pt(ie);return wn(nt,hn,Re)},s.addHook=function(pt,ie){typeof ie=="function"&&mc(Y[pt],ie)},s.removeHook=function(pt,ie){if(ie!==void 0){const Re=iV(Y[pt],ie);return Re===-1?void 0:rV(Y[pt],Re,1)[0]}return uS(Y[pt])},s.removeHooks=function(pt){Y[pt]=[]},s.removeAllHooks=function(){Y=yS()},s}var vC=pC();const Qo=500,wS=20;function xS(i,s){const l=new Map(i.map(S=>[S.k,S]));for(const S of s)l.set(S.k,S);const m=Array.from(l.values()).sort((S,D)=>S.k-D.k);return m.length>Qo?m.slice(-Qo):m}function EV(i,s){const[l,m]=M.useState([]),[S,D]=M.useState(!1),[b,a]=M.useState(!1),[d,f]=M.useState(null),[w,h]=M.useState(!1),_=M.useRef(""),N=M.useRef(null),C=M.useRef(!1),y=M.useRef(!1),c=M.useRef(null),p=M.useRef([]);M.useEffect(()=>{_.current="",N.current=null,C.current=!1,y.current=!1,c.current=null,p.current=[],m([]),D(!1),a(!1),f(null),h(!1)},[i]);const v=M.useCallback(()=>m1(i,{since:_.current,limit:wS}),[i]),g=M.useCallback(R=>{if(!R)return;h(!0),_.current=R.hash||"";const j=Array.isArray(R.messages)?R.messages:[];R.session&&c.current&&R.session!==c.current?(p.current=j.slice(-Qo),m(p.current),N.current=R.firstSeq??null,D(!!R.hasMore),C.current=!0):(p.current=xS(p.current,j),m(p.current),!C.current&&!y.current&&(C.current=!0,N.current=R.firstSeq??null,D(!!R.hasMore)),p.current.length>=Qo&&D(!1)),R.session&&(c.current=R.session,f(R.session))},[]);lf({fetch:v,apply:g,intervalMs:1500,enabled:!!i,deps:[i]});const E=M.useCallback(async()=>{if(!(y.current||!S||N.current==null)){if(p.current.length>=Qo){D(!1);return}y.current=!0,a(!0);try{const R=Math.min(wS,Qo-p.current.length),j=await m1(i,{before:N.current,limit:R});if(!j)return;const A=Array.isArray(j.messages)?j.messages:[];p.current=xS(p.current,A),m(p.current),N.current=j.firstSeq??N.current,D(!!j.hasMore&&p.current.length<Qo)}finally{y.current=!1,a(!1)}}},[i,S]);return{messages:l,hasMoreOlder:S,loadOlder:E,loadingOlder:b,session:d,loaded:w}}const CV=1200,jV=450;function DV(i,s){const[l,m]=M.useState(null),S=M.useRef(!0),D=M.useCallback(async()=>{if(!i||!s){m(null);return}try{const a=await vU(i);S.current&&m(a)}catch{}},[i,s]),b=M.useCallback(()=>{setTimeout(()=>{D()},jV)},[D]);return M.useEffect(()=>{if(S.current=!0,!s)return m(null),()=>{S.current=!1};D();const a=setInterval(D,CV);return()=>{S.current=!1,clearInterval(a)}},[i,s,D]),{prompt:l,refetch:b}}function kV(){return{prompt:"需要你确认",options:[{label:"允许",keys:["Enter"]},{label:"拒绝",keys:["Escape"]}]}}function RV({pane:i,prompt:s,onAuthFail:l,onAct:m}){var c;const S=s.cursor??((c=s.options[0])==null?void 0:c.n)??null,[D,b]=M.useState(S),[a,d]=M.useState(null),f=`${s.title}|${s.options.map(p=>`${p.n}:${p.label}`).join(",")}`,w=a===f;M.useEffect(()=>{var p;b(s.cursor??((p=s.options[0])==null?void 0:p.n)??null)},[f]),M.useEffect(()=>{if(!w)return;const p=setTimeout(()=>d(null),2e3);return()=>clearTimeout(p)},[w]);const h=async p=>{try{await p(),m==null||m()}catch(v){v instanceof $i&&(l==null||l())}},_=p=>h(()=>tl(i,String(p),!1)),N=()=>h(()=>_d(i,["Escape"])),C=(p=N)=>{if(!w){d(f);return}d(null),p()},y=w?"再点一次取消":"取消";if(s.submit){const p=(s.options.find(g=>/submit/i.test(g.label))||s.options[0]).n,v=s.options.find(g=>/cancel/i.test(g.label));return o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:"复核并提交你的回答?"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:52,columnNumber:9},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>C(()=>v?_(v.n):N()),children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:54,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",onClick:()=>{d(null),_(p)},children:"提交"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:55,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:53,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:51,columnNumber:7},this)}return o.jsxDEV("div",{className:"chat-gate",children:[s.leadIn&&o.jsxDEV("div",{className:"chat-gate-leadin",children:s.leadIn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:63,columnNumber:25},this),s.multi&&o.jsxDEV("div",{className:"chat-gate-step",children:["第 ",s.step,"/",s.total," 题"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:64,columnNumber:24},this),o.jsxDEV("div",{className:"chat-gate-prompt",children:s.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:65,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-options",role:"radiogroup",children:s.options.map(p=>o.jsxDEV("button",{type:"button",role:"radio","aria-checked":D===p.n,className:`chat-gate-opt${D===p.n?" on":""}`,onClick:()=>{d(null),b(p.n)},children:[o.jsxDEV("span",{className:"chat-gate-opt-label",children:p.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:70,columnNumber:13},this),p.description&&o.jsxDEV("span",{className:"chat-gate-opt-desc",children:p.description},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:71,columnNumber:31},this)]},p.n,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:68,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:66,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>C(),children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:76,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",disabled:D==null,onClick:()=>{d(null),_(D)},children:"确认"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:77,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:75,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:62,columnNumber:5},this)}function TV(i){const s=i.name||"工具",l=i.input||{};return s==="Bash"?`运行 ${l.command||""}`.trim():s==="Edit"||s==="MultiEdit"||s==="Write"?`${s==="Write"?"写入":"编辑"} ${l.file_path||""}`.trim():s==="Read"?`读取 ${l.file_path||l.notebook_path||""}`.trim():s==="NotebookEdit"?`编辑 ${l.notebook_path||""}`.trim():s==="Grep"?`搜索 ${l.pattern||""}`.trim():s==="Glob"?`查找文件 ${l.pattern||""}`.trim():s==="WebSearch"?`联网搜索 ${l.query||""}`.trim():s==="WebFetch"?`读取网页 ${l.url||""}`.trim():s==="TodoWrite"?"更新待办":s==="Skill"?`激活技能 ${l.command||l.skill||""}`.trim():s==="Task"||s==="Agent"?`调用 Agent${l.subagent_type?`(${l.subagent_type})`:""}: ${l.description||""}`.trim():`调用工具 ${s}`}function gC(i){return i==="Bash"?o.jsxDEV(c3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:46,columnNumber:31},this):i==="Edit"||i==="MultiEdit"||i==="Write"||i==="NotebookEdit"?o.jsxDEV(SE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:47,columnNumber:102},this):i==="Read"?o.jsxDEV(bE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:48,columnNumber:31},this):i==="Grep"||i==="Glob"?o.jsxDEV(h3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:49,columnNumber:50},this):i==="WebSearch"||i==="WebFetch"?o.jsxDEV(m3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:50,columnNumber:59},this):i==="TodoWrite"?o.jsxDEV(f3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:51,columnNumber:36},this):i==="Skill"?o.jsxDEV(p3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:52,columnNumber:32},this):i==="Task"||i==="Agent"?o.jsxDEV(v3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:53,columnNumber:51},this):o.jsxDEV(g3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:54,columnNumber:10},this)}function T_(){return o.jsxDEV("span",{className:"chat-typing-dots",children:[o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:61,columnNumber:7},this),o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:62,columnNumber:7},this),o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:63,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:60,columnNumber:5},this)}function bC({diff:i}){return!i||!i.added&&!i.removed?null:o.jsxDEV("span",{className:"chat-tool-stat","aria-label":`增 ${i.added} 行,删 ${i.removed} 行`,children:[i.added>0&&o.jsxDEV("span",{className:"cts-add",children:["+",i.added]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:74,columnNumber:26},this),i.removed>0&&o.jsxDEV("span",{className:"cts-del",children:["−",i.removed]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:75,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:73,columnNumber:5},this)}function LV({tool:i}){return i.diff&&i.diff.hunks&&i.diff.hunks.length?o.jsxDEV("div",{className:"chat-diff",children:i.diff.hunks.map((s,l)=>o.jsxDEV("div",{className:"chat-diff-hunk",children:s.lines.map((m,S)=>{const D=m[0]==="+"?"add":m[0]==="-"?"del":"ctx";return o.jsxDEV("div",{className:"chat-diff-line cd-"+D,children:m||" "},S,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:90,columnNumber:22},this)})},l,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:87,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:85,columnNumber:7},this):i.result!=null?o.jsxDEV("pre",{className:"chat-tool-body",children:i.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:97,columnNumber:35},this):null}function AV({tool:i}){if(i.isError)return o.jsxDEV("span",{className:"chat-tool-status err","aria-label":"失败",children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:105,columnNumber:83},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:105,columnNumber:28},this);const s=i.diff&&(i.diff.added||i.diff.removed);return i.result!=null&&!s?o.jsxDEV("span",{className:"chat-tool-status ok","aria-label":"成功",children:o.jsxDEV(K_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:107,columnNumber:105},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:107,columnNumber:51},this):null}function MV({tool:i,running:s,onOpen:l}){return o.jsxDEV("div",{className:"chat-tool"+(i.isError?" chat-tool-err":"")+(s?" chat-tool-running":""),children:o.jsxDEV("button",{type:"button",className:"chat-tool-head",onClick:l,children:[o.jsxDEV("span",{className:"chat-tool-ic",children:gC(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:117,columnNumber:9},this),o.jsxDEV("span",{className:"chat-tool-head-text",children:TV(i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:118,columnNumber:9},this),o.jsxDEV(bC,{diff:i.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:119,columnNumber:9},this),s?o.jsxDEV("span",{className:"chat-tool-head-running",children:o.jsxDEV(T_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:20},this):o.jsxDEV(AV,{tool:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:85},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:116,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:115,columnNumber:5},this)}function _C(i){return{Bash:"运行命令",Edit:"编辑文件",MultiEdit:"编辑文件",Write:"写入文件",Read:"读取文件",NotebookEdit:"编辑笔记本",Grep:"搜索",Glob:"查找文件",WebSearch:"联网搜索",WebFetch:"读取网页",TodoWrite:"更新待办",Skill:"激活技能",Task:"调用 Agent",Agent:"调用 Agent"}[i]||"调用工具"}function UV(i){const s=i.name,l=i.input||{};return s==="Bash"?l.command||"":s==="Read"||s==="Edit"||s==="MultiEdit"||s==="Write"?l.file_path||"":s==="NotebookEdit"?l.notebook_path||"":s==="Grep"||s==="Glob"?l.pattern||"":s==="WebSearch"?l.query||"":s==="WebFetch"?l.url||"":s==="Skill"?l.command||l.skill||"":s==="Task"||s==="Agent"?l.prompt||l.description||"":Object.keys(l).length?JSON.stringify(l,null,2):""}function OV(i){if(!i)return{dir:"",name:""};const s=i.lastIndexOf("/");return s>=0?{dir:i.slice(0,s+1),name:i.slice(s+1)}:{dir:"",name:i}}function VV({hunks:i}){return o.jsxDEV("div",{className:"dv",children:i.map((s,l)=>{let m=s.oldStart||0,S=s.newStart||0;return o.jsxDEV("div",{className:"dv-hunk",children:[l>0&&o.jsxDEV("div",{className:"dv-gap",children:o.jsxDEV("span",{children:"⋯"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:48},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:24},this),(s.lines||[]).map((D,b)=>{const a=typeof D=="string"?D[0]:" ",d=typeof D=="string"?D.slice(1):"";let f,w;return a==="+"?(f=S++,w="add"):a==="-"?(f=m++,w="del"):(f=S++,m++,w="ctx"),o.jsxDEV("div",{className:"dv-row dv-"+w,children:[o.jsxDEV("span",{className:"dv-ln",children:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:186,columnNumber:19},this),o.jsxDEV("span",{className:"dv-sign",children:a==="+"?"+":a==="-"?"−":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:187,columnNumber:19},this),o.jsxDEV("span",{className:"dv-code",children:d||" "},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:188,columnNumber:19},this)]},b,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:185,columnNumber:17},this)})]},l,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:174,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:169,columnNumber:5},this)}function yC(i,s){return s?{txt:"执行中",cls:"run"}:i.isError?{txt:"失败",cls:"err"}:i.result!=null?{txt:"成功",cls:"ok"}:{txt:"未返回",cls:"idle"}}function PV({tool:i,running:s}){const{dir:l,name:m}=OV(i.input&&i.input.file_path||""),S=yC(i,s),D=i.diff&&i.diff.created,b=i.diff&&i.diff.hunks;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-head es-head",children:[o.jsxDEV("span",{className:"tool-sheet-ic",children:o.jsxDEV(SE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,columnNumber:9},this),o.jsxDEV("div",{className:"es-file",children:[o.jsxDEV("span",{className:"es-name",children:m||i.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:220,columnNumber:11},this),l&&o.jsxDEV("span",{className:"es-dir",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:221,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:219,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:217,columnNumber:7},this),o.jsxDEV("div",{className:"tool-sheet-body es-body",children:[o.jsxDEV("div",{className:"es-meta",children:[o.jsxDEV("span",{className:"tool-sheet-mode-val",children:_C(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:226,columnNumber:11},this),o.jsxDEV("span",{className:"tool-sheet-state "+S.cls,children:S.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:227,columnNumber:11},this),o.jsxDEV(bC,{diff:i.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:228,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:225,columnNumber:9},this),b&&b.length?o.jsxDEV("div",{className:"es-diff",children:o.jsxDEV(VV,{hunks:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:231,columnNumber:38},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:231,columnNumber:13},this):D?o.jsxDEV("div",{className:"es-note",children:["新建文件",i.diff.added?` · 新增 ${i.diff.added} 行`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:233,columnNumber:15},this):s?o.jsxDEV("div",{className:"tool-sheet-empty",children:"执行中…"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:235,columnNumber:17},this):o.jsxDEV("div",{className:"tool-sheet-empty",children:"没有可显示的改动"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:236,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:224,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:216,columnNumber:5},this)}function IV({tool:i,running:s,onClose:l}){if(M.useEffect(()=>{const a=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[l]),!i)return null;const m=!!(i.diff&&(i.diff.hunks&&i.diff.hunks.length||i.diff.created)),S=UV(i),D=i.result!=null,b=yC(i,s);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-backdrop",onClick:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:258,columnNumber:7},this),o.jsxDEV("div",{className:"tool-sheet"+(m?" tool-sheet-edit":""),role:"dialog","aria-modal":"true",children:[o.jsxDEV("div",{className:"tool-sheet-grip"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:260,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"cmd-close tool-sheet-x","aria-label":"关闭",onClick:l,children:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:100},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:9},this),m?o.jsxDEV(PV,{tool:i,running:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:263,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-head",children:[o.jsxDEV("span",{className:"tool-sheet-ic",children:gC(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:267,columnNumber:15},this),o.jsxDEV("span",{className:"tool-sheet-title",children:i.name||"工具"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:268,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:266,columnNumber:13},this),o.jsxDEV("div",{className:"tool-sheet-body",children:[o.jsxDEV("section",{className:"tool-sheet-sec",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:"执行模式"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:272,columnNumber:17},this),o.jsxDEV("div",{className:"tool-sheet-mode-row",children:[o.jsxDEV("span",{className:"tool-sheet-mode-val",children:_C(i.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:274,columnNumber:19},this),o.jsxDEV("span",{className:"tool-sheet-state "+b.cls,children:b.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:275,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:273,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:271,columnNumber:15},this),S&&o.jsxDEV("section",{className:"tool-sheet-sec",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:"执行的命令"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:280,columnNumber:19},this),o.jsxDEV("pre",{className:"tool-sheet-cmd",children:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:281,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:279,columnNumber:17},this),o.jsxDEV("section",{className:"tool-sheet-sec tool-sheet-out",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:o.jsxDEV("span",{children:"输出结果"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:285,columnNumber:51},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:285,columnNumber:17},this),D?o.jsxDEV(LV,{tool:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:287,columnNumber:21},this):o.jsxDEV("div",{className:"tool-sheet-empty",children:s?"执行中…":"无输出"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:288,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:284,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:270,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:265,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:259,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:257,columnNumber:5},this)}function BV({m:i,running:s,onOpenTool:l}){if(i.type==="tool")return o.jsxDEV(MV,{tool:i.tool,running:s,onOpen:()=>l(i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:299,columnNumber:33},this);if(i.type==="interrupt")return o.jsxDEV("div",{className:"chat-interrupt",children:U("chat.interrupted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:302,columnNumber:38},this);if(i.type==="compact")return o.jsxDEV("div",{className:"chat-compact-divider",children:U("chat.compacted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:304,columnNumber:36},this);if(i.type==="slash")return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"chat-slash-cmd",children:[i.name,i.args?" "+i.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:312,columnNumber:9},this),i.result&&o.jsxDEV("div",{className:"chat-slash-result",children:i.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:313,columnNumber:22},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:311,columnNumber:7},this);if(i.type==="thinking")return null;if(i.role!=="user"){const m=vC.sanitize(ti.parse(i.text||""));return o.jsxDEV("div",{className:"chat-bubble chat-them chat-md",dangerouslySetInnerHTML:{__html:m}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:324,columnNumber:12},this)}return o.jsxDEV("div",{className:"chat-bubble chat-me",children:i.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:326,columnNumber:10},this)}const FV=40,HV=80;function zV(i){const s=new Set;let l=-1;return i.forEach((m,S)=>{m.type==="text"&&m.role==="user"?(s.add(S),l>=0&&(s.add(l),l=-1)):m.type==="text"&&(l=S)}),l>=0&&s.add(l),s}function $V(i){if(!i)return null;const s=new Date(i);if(Number.isNaN(s.getTime()))return null;const l=`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`,m=new Date;return s.getFullYear()===m.getFullYear()&&s.getMonth()===m.getMonth()&&s.getDate()===m.getDate()?l:`${s.getMonth()+1}月${s.getDate()}日 ${l}`}function WV(i){var D,b,a,d;const s=(D=i.closest)==null?void 0:D.call(i,".chat-md pre");if(s)return{el:s,text:s.innerText};const l=(b=i.closest)==null?void 0:b.call(i,".chat-tool-body, .chat-diff");if(l)return{el:l,text:l.innerText};const m=(a=i.closest)==null?void 0:a.call(i,".chat-bubble");if(m)return{el:m,text:m.innerText};const S=(d=i.closest)==null?void 0:d.call(i,".chat-tool");return S?{el:S,text:S.innerText}:null}const NS=72;function GV({pane:i,kind:s,msg:l,onAuthFail:m,slashEcho:S,onSlashEchoDone:D}){const{messages:b,hasMoreOlder:a,loadOlder:d,loadingOlder:f,session:w,loaded:h}=EV(i),_=M.useMemo(()=>zV(b),[b]),N=s==="permission",{prompt:C,refetch:y}=DV(i,N),c=M.useRef(!1);M.useEffect(()=>{C&&(c.current=!0)},[C]),M.useEffect(()=>{N||(c.current=!1)},[N]);const p=!C&&N&&!c.current?kV():null,v=b.length?b[b.length-1]:null,g=(v==null?void 0:v.type)==="tool"&&v.tool.result===null&&s==="working",E=g,R=s==="compacting",j=s==="error",A=M.useRef(null);S&&!A.current&&(A.current={k:b.reduce((xe,Ve)=>Math.max(xe,Ve.k??-1),-1),session:w}),!S&&A.current&&(A.current=null);const k=!!(S&&A.current&&(A.current.session&&w&&A.current.session!==w||b.some(xe=>xe.type==="slash"&&xe.name===S.name&&(xe.k??-1)>A.current.k)));M.useEffect(()=>{k&&(D==null||D())},[k,D]);const L=!g&&!R&&!j&&((v==null?void 0:v.role)==="user"?s!=="permission":s==="working"),O=M.useRef(null),H=M.useRef(null),V=M.useRef(!0),B=M.useRef(null),q=M.useRef(!1),ne=M.useRef(null),[Y,J]=M.useState(!0),[ee,P]=M.useState(null),W=M.useRef(null),Q=M.useRef({timer:null,x:0,y:0,fired:!1}),[K,he]=M.useState(null),ce=K!=null?b.find(xe=>xe.type==="tool"&&(xe.k??xe.i)===K):null;M.useEffect(()=>{K!=null&&!ce&&he(null)},[K,ce]);const ke=ce!=null,we=M.useRef(0);M.useEffect(()=>{if(!ke)return;window.history.pushState({chatToolSheet:!0},""),we.current=1;const xe=()=>{we.current=0,he(null)};return window.addEventListener("popstate",xe),()=>{window.removeEventListener("popstate",xe),we.current>0&&(window.history.go(-we.current),we.current=0)}},[ke]);const re=()=>{W.current&&(W.current.classList.remove("chat-copy-hl"),W.current=null)},G=()=>{re(),P(null)},ge=()=>{const xe=Q.current;xe.timer&&(clearTimeout(xe.timer),xe.timer=null)},de=(xe,Ve,Xe)=>{var be;Q.current.timer=null;const Te=WV(Xe),lt=H.current;if(!Te||!Te.text.trim()||!lt)return;Q.current.fired=!0,(be=navigator.vibrate)==null||be.call(navigator,12),Te.el.classList.add("chat-copy-hl"),W.current=Te.el;const dt=lt.getBoundingClientRect(),$=Te.el.getBoundingClientRect(),at=Math.max(8,Math.min(xe-dt.left-NS/2,dt.width-NS-8)),De=$.top-dt.top-44,We=De<4?Math.min($.bottom-dt.top+8,dt.height-52):De;P({top:We,left:at,text:Te.text})},pe=xe=>{if(G(),Q.current.fired=!1,xe.pointerType==="mouse")return;const Ve=Q.current;Ve.x=xe.clientX,Ve.y=xe.clientY;const{target:Xe}=xe;ge(),Ve.timer=setTimeout(()=>de(Ve.x,Ve.y,Xe),480)},Ne=xe=>{Q.current.fired&&(Q.current.fired=!1,xe.stopPropagation(),xe.preventDefault())},Ie=xe=>{const Ve=Q.current;Ve.timer&&Math.hypot(xe.clientX-Ve.x,xe.clientY-Ve.y)>10&&ge()},Ze=async xe=>{var Ve;try{await navigator.clipboard.writeText(xe),(Ve=navigator.vibrate)==null||Ve.call(navigator,8)}catch{}G()};M.useEffect(()=>ge,[]),M.useEffect(()=>{G(),he(null)},[i]);const[ut,At]=M.useState(null),Ke=!!(C||p);M.useEffect(()=>{var Ve;if(!Ke){At(null);return}const xe=()=>{const Xe=H.current,Te=Xe==null?void 0:Xe.closest(".app");if(!Xe||!Te)return;const lt=Xe.getBoundingClientRect(),dt=Te.getBoundingClientRect(),$=dt.bottom-lt.top;At($>0?{top:lt.top-dt.top,height:$}:null)};return xe(),window.addEventListener("resize",xe),(Ve=window.visualViewport)==null||Ve.addEventListener("resize",xe),()=>{var Xe;window.removeEventListener("resize",xe),(Xe=window.visualViewport)==null||Xe.removeEventListener("resize",xe)}},[Ke]);const qt=()=>{const xe=O.current;if(!xe)return;ge(),ee&&G();const Ve=xe.scrollHeight-xe.scrollTop-xe.clientHeight<FV;V.current=Ve,J(Ve),xe.scrollTop<HV&&a&&!f&&(B.current=xe.scrollHeight,q.current=!0,d())},Ut=()=>{const xe=O.current;xe&&(xe.scrollTop=xe.scrollHeight,V.current=!0,J(!0))};return M.useEffect(()=>{const xe=O.current,Ve=b.length?b[b.length-1]:null,Xe=Ve?Ve.k??Ve.i:null,Te=Ve&&Ve.role==="user"&&ne.current!=null&&Xe!=null&&Xe>ne.current;if(xe){if(q.current){xe.scrollTop+=xe.scrollHeight-B.current,B.current=null,q.current=!1;return}if(Xe!=null&&(ne.current=ne.current==null?Xe:Math.max(ne.current,Xe)),Te){xe.scrollTop=xe.scrollHeight,V.current=!0,J(!0);return}V.current&&(xe.scrollTop=xe.scrollHeight)}},[b,L]),M.useEffect(()=>{const xe=O.current;if(!xe)return;const Ve=()=>{f||!a||b.length===0||xe.clientHeight>0&&xe.scrollHeight<=xe.clientHeight&&(B.current=xe.scrollHeight,q.current=!0,d())};if(Ve(),typeof ResizeObserver>"u")return;const Xe=new ResizeObserver(Ve);return Xe.observe(xe),()=>Xe.disconnect()},[b,a,f,d]),M.useEffect(()=>{const xe=O.current;xe&&(xe.scrollTop=xe.scrollHeight),V.current=!0,J(!0),ne.current=null},[i]),o.jsxDEV("div",{className:"chat-view",ref:H,children:[o.jsxDEV("div",{className:"chat-scroll",ref:O,onScroll:qt,onPointerDown:pe,onPointerMove:Ie,onPointerUp:ge,onPointerCancel:ge,onClickCapture:Ne,children:[b.length===0&&(h?o.jsxDEV("div",{className:"chat-new",children:U("boot.chat_empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:652,columnNumber:13},this):o.jsxDEV(PE,{hint:U("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:653,columnNumber:13},this)),b.map((xe,Ve)=>{if(xe.type==="thinking")return null;const Xe=_.has(Ve)?$V(xe.ts):null;return o.jsxDEV(M.Fragment,{children:[o.jsxDEV(BV,{m:xe,running:E&&Ve===b.length-1,onOpenTool:Te=>he(Te.k??Te.i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:659,columnNumber:15},this),Xe&&o.jsxDEV("div",{className:"chat-ts "+(xe.role==="user"?"ts-me":"ts-them"),children:Xe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:661,columnNumber:25},this)]},(xe.k??xe.i)+":"+Ve,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:658,columnNumber:13},this)}),S&&!k&&o.jsxDEV("div",{className:"chat-slash-cmd",children:[S.name,S.args?" "+S.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:666,columnNumber:11},this),R&&o.jsxDEV("div",{className:"chat-compacting","aria-live":"polite",children:[o.jsxDEV("span",{className:"chat-compacting-label",children:"正在压缩上下文"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:670,columnNumber:13},this),o.jsxDEV(T_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:671,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:669,columnNumber:11},this),j&&o.jsxDEV("div",{className:"chat-turn-error",role:"status",children:["本轮出错",l?`:${l}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:675,columnNumber:11},this),L&&o.jsxDEV("div",{className:"chat-typing","aria-hidden":"true",children:o.jsxDEV(T_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:681,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:680,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:645,columnNumber:7},this),ee&&o.jsxDEV("div",{className:"sel-callout chat-copy-callout",style:{top:ee.top,left:ee.left},onPointerDown:xe=>xe.preventDefault(),children:o.jsxDEV("button",{type:"button",onClick:()=>Ze(ee.text),children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:689,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:687,columnNumber:9},this),!Y&&o.jsxDEV("button",{type:"button",className:"new-output","aria-label":"回到最新",onClick:Ut,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:694,columnNumber:9},this),ce&&o.jsxDEV(IV,{tool:ce.tool,running:E&&ce===b[b.length-1],onClose:()=>he(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:700,columnNumber:9},this),Ke&&o.jsxDEV("div",{className:"chat-gate-backdrop",style:ut?{top:ut.top+"px",height:ut.height+"px",bottom:"auto"}:void 0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:711,columnNumber:18},this),C&&o.jsxDEV(RV,{pane:i,prompt:C,onAuthFail:m,onAct:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:713,columnNumber:18},this),p&&o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:p.prompt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:716,columnNumber:11},this),o.jsxDEV("div",{className:"chat-gate-actions",children:p.options.map((xe,Ve)=>o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>_d(i,xe.keys),children:xe.label},Ve,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:719,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:717,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:715,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:644,columnNumber:5},this)}function qV({onSaved:i}){const[s,l]=M.useState(""),m=S=>{S.preventDefault();const D=s.trim();D&&(vM(D),i())};return o.jsxDEV("form",{className:"token-prompt",onSubmit:m,children:[o.jsxDEV("h2",{children:U("token.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:16,columnNumber:7},this),o.jsxDEV("input",{value:s,onChange:S=>l(S.target.value),placeholder:U("token.placeholder")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:17,columnNumber:7},this),o.jsxDEV("button",{type:"submit",children:U("common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:18,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:15,columnNumber:5},this)}function jf({open:i,title:s,subtitle:l="",actions:m=[],onClose:S}){const[D,b]=M.useState(null);if(M.useEffect(()=>{i||b(null)},[i]),!i)return null;const a=f=>{var w;if(!f.disabled){if(f.confirm&&D!==f.key){b(f.key);return}b(null),(w=f.onClick)==null||w.call(f)}},d=f=>o.jsxDEV("button",{className:`sheet-action ${f.danger?"danger":""} ${D===f.key?"armed":""}`,disabled:f.disabled,onClick:()=>a(f),children:[f.icon&&D!==f.key&&o.jsxDEV("span",{className:"sheet-action-icon","aria-hidden":"true",children:f.icon},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:30,columnNumber:37},this),f.confirm&&D===f.key?f.confirmLabel||U("actionsheet.confirmAgain"):f.label]},f.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:24,columnNumber:5},this);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":l?`${s},${l}`:s,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-heading",children:[o.jsxDEV("span",{className:"settings-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:41,columnNumber:13},this),l&&o.jsxDEV("span",{className:"settings-subtitle",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:42,columnNumber:26},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:40,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:S,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:39,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section sheet-actions",children:[m.map((f,w)=>Array.isArray(f)?o.jsxDEV("div",{className:"sheet-row",children:f.map(d)},`row-${w}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:48,columnNumber:15},this):d(f)),o.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:S,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:46,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:36,columnNumber:5},this)}const YV=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,SS=300;function ES(i){const s=i.lastIndexOf("/");return s<0?{dir:"",frag:i}:{dir:i.slice(0,s+1),frag:i.slice(s+1)}}const KV=i=>i.replace(/\/+$/,"")||"/",e_=(i,s)=>i===s?"":i.startsWith(`${s}/`)?i.slice(s.length+1):i,sf=(i,s,l)=>{let m=null;for(const S of s||[])(i===S||i!=null&&i.startsWith(`${S}/`))&&(!m||S.length>m.length)&&(m=S);return m||l},XV=i=>i==null?"":i<1024?`${i} B`:i<1024*1024?`${Math.round(i/1024)} KB`:`${(i/1024/1024).toFixed(1)} MB`;function wC({path:i,onNavigate:s,onOpenDoc:l,onJumpToCwd:m,pendingFile:S,onPendingConsumed:D,pickMode:b=!1,allowMkdir:a=!b,onPick:d,refreshKey:f=0}){const[w,h]=M.useState(""),[_,N]=M.useState(null),[C,y]=M.useState(!1),[c,p]=M.useState(""),[v,g]=M.useState(""),[E,R]=M.useState(""),[j,A]=M.useState(null),[k,L]=M.useState(!1),[O,H]=M.useState(!1),[V,B]=M.useState(""),[q,ne]=M.useState(null),Y=M.useRef(null),J=M.useRef(!1),ee=M.useRef(f),P=M.useRef(null),W=M.useRef(null),Q=M.useRef(null),K=async($,{sync:at=!1,notify:De=!1,fallbackHome:We=!1}={})=>{p("");try{const be=await vE($??void 0);if(J.current=be.path,N(be),at){const Pe=e_(be.path,sf(be.path,be.roots,be.home));h(Pe?`${Pe}/`:"")}De&&(s==null||s(be.path),H(!1),B(""))}catch{if(We&&$!=null){K(null,{sync:!0});return}p(U("filebrowser.openDirFailed"))}};M.useEffect(()=>{const $=f!==ee.current;ee.current=f,!(i===J.current&&!$)&&K(i,{sync:!0,fallbackHome:b})},[i,f]),M.useEffect(()=>()=>{clearTimeout(P.current),clearTimeout(W.current)},[]),M.useEffect(()=>{if(!C)return;const $=at=>{var De;(De=Q.current)!=null&&De.contains(at.target)||y(!1)};return document.addEventListener("pointerdown",$,!0),()=>document.removeEventListener("pointerdown",$,!0)},[C]);const he=$=>{g($),clearTimeout(W.current),W.current=setTimeout(()=>g(""),2500)},ce=$=>{const at=_==null?void 0:_.home;if(!at){h($);return}const De=(_==null?void 0:_.roots)||[at];let We=$;(We==="~"||We.startsWith("~/"))&&(We=at+We.slice(1));let be=sf(_==null?void 0:_.path,De,at);We.startsWith("/")&&(be=sf(We,De,at),We=We===be?"":We.startsWith(`${be}/`)?We.slice(be.length+1):We.replace(/^\/+/,"")),h(We);const Pe=KV(`${be}/${ES(We).dir}`);Pe!==J.current&&(clearTimeout(P.current),P.current=setTimeout(()=>{Pe!==J.current&&K(Pe,{notify:!0})},250))},ke=async $=>{const at=Zo(_.path,$);try{await navigator.clipboard.writeText(at),he(U("filebrowser.copiedPath",{abs:at}))}catch{he(at)}},we=$=>l(Zo(_.path,$)),re=$=>K(Zo(_.path,$),{sync:!0,notify:!0}),G=()=>(_==null?void 0:_.parent)&&K(_.parent,{sync:!0,notify:!0}),ge=async()=>{const $=V.trim();if(!(!$||!_)){p("");try{await RU(_.path,$),await K(_.path,{}),H(!1),B("")}catch{p(U("filebrowser.mkdirFailed"))}}},de=async $=>{p(""),ne({label:U("filebrowser.downloading",{name:$}),pct:0});try{await $U(Zo(_.path,$),at=>ne({label:U("filebrowser.downloading",{name:$}),pct:at})),R($)}catch{p(U("filebrowser.downloadFailed"))}finally{ne(null)}},pe=()=>{const $=j;A(null),$&&de($)},Ne=_==null?void 0:_.home,Ie=(_==null?void 0:_.roots)||(Ne?[Ne]:[]),Ze=sf(_==null?void 0:_.path,Ie,Ne),ut=$=>$===Ne?"~":/\/tmp$/.test($)?"tmp":$.includes("/var/folders/")?"TMPDIR":$.split("/").filter(Boolean).pop()||"/",At=$=>{y(!1),$!==Ze&&K($,{sync:!0,notify:!0})},Ke=($,at)=>!$||!at||$===at?!1:($.startsWith(`${at}/`)?$.slice(at.length+1):$).split("/").some(We=>We.startsWith(".")),qt=!!_&&_.path!==Ne&&!Ke(_.path,Ze),Ut=async $=>{const{allowed:at,rejected:De}=ZE($);if(!at.length)return De.length&&p(U("filebrowser.uploadRejected",{names:De.join("、")})),De;L(!0),p("");const We=at.length,be=[],Pe=new AbortController;eC(Pe,U("filebrowser.uploading",{name:at[0].name,tag:We>1?`(1/${We})`:""}));try{for(let He=0;He<We&&!Pe.signal.aborted;He++){const Ot=at[He],Le=We>1?`(${He+1}/${We})`:"";Nf({label:U("filebrowser.uploading",{name:Ot.name,tag:Le}),phase:"sending",pct:0});try{await gE(_.path,Ot,(ve,xt)=>Nf({pct:ve,phase:xt}),!1,{signal:Pe.signal})}catch(ve){if(ve instanceof bf)break;be.push({name:Ot.name,reason:(ve==null?void 0:ve.message)||U("filebrowser.uploadFailed")})}}}finally{E_()}return await K(_.path,{}),L(!1),be.length?p(be.map(He=>`${He.name}:${He.reason}`).join(";")):De.length&&p(U("filebrowser.uploadRejected",{names:De.join("、")})),[...be.map(He=>He.name),...De]},xe=async()=>{S&&(await Ut(S)).length===0&&(D==null||D())},Ve=$=>{if(b||$.key!=="Enter")return;const at=w.trim();at&&YV.test(at)&&(_!=null&&_.home)&&l(Zo(_.home,at))},Xe=ES(w).frag.toLowerCase(),Te=((_==null?void 0:_.entries)||[]).filter($=>(!b||$.type==="dir")&&(!Xe||$.name.toLowerCase().includes(Xe))),lt=Te.length>SS?Te.slice(0,SS):Te,dt=Te.length-lt.length;return o.jsxDEV("div",{className:"browse-view",children:[o.jsxDEV("div",{className:"browse-bar",children:[m&&o.jsxDEV("button",{className:"browse-cwd","aria-label":U("filebrowser.sessionDir"),title:U("filebrowser.jumpToSessionDir"),onClick:m,children:o.jsxDEV(QU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:274,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:273,columnNumber:11},this),o.jsxDEV("button",{className:"browse-up","aria-label":U("filebrowser.parentDir"),disabled:!(_!=null&&_.parent),onClick:G,children:o.jsxDEV(q_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:278,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:277,columnNumber:9},this),o.jsxDEV("div",{className:"browse-path",children:[Ie.length>1?o.jsxDEV("div",{className:"dd browse-root-dd",ref:Q,children:[o.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":C,"aria-label":U("filebrowser.rootSelect"),onClick:()=>y($=>!$),children:[o.jsxDEV("span",{children:[ut(Ze),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:289,columnNumber:17},this),o.jsxDEV("span",{className:`dd-caret${C?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:290,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:285,columnNumber:15},this),C&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:Ie.map($=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":$===Ze,title:$,className:`dd-option${$===Ze?" is-selected":""}`,onClick:()=>At($),children:[o.jsxDEV("span",{className:"dd-option-label",children:[ut($),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:23},this),$===Ze&&o.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:300,columnNumber:41},this)]},$,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:295,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:293,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:284,columnNumber:13},this):o.jsxDEV("span",{className:"browse-home","aria-hidden":"true",children:"~/"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:307,columnNumber:13},this),o.jsxDEV("input",{className:"browse-input",value:w,placeholder:U("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:$=>ce($.target.value),onKeyDown:Ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:309,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:280,columnNumber:9},this),a&&o.jsxDEV("button",{className:"browse-mkdir","aria-label":U("filebrowser.newFolder"),title:U("filebrowser.newFolder"),disabled:!_,onClick:()=>{H($=>!$),B("")},children:o.jsxDEV(JU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:321,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:316,columnNumber:11},this),!b&&o.jsxDEV("button",{className:"browse-upload","aria-label":U("filebrowser.uploadFile"),title:U(qt?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!qt||k,onClick:()=>{var $;return($=Y.current)==null?void 0:$.click()},children:o.jsxDEV(yE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:332,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:325,columnNumber:11},this),!b&&o.jsxDEV("input",{ref:Y,className:"browse-file-input",type:"file",multiple:!0,accept:ty,onChange:$=>{Ut(Array.from($.target.files||[])),$.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:338,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:271,columnNumber:7},this),O&&o.jsxDEV("div",{className:"browse-newfolder",children:[o.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:V,placeholder:U("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:$=>B($.target.value),onKeyDown:$=>{$.key==="Enter"&&ge()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:350,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-ok",onClick:ge,children:U("filebrowser.createBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:356,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-x","aria-label":U("common.cancel"),onClick:()=>{H(!1),B("")},children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:357,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:349,columnNumber:9},this),!b&&S&&o.jsxDEV("div",{className:"browse-pending",children:[o.jsxDEV("span",{className:"browse-pending-text",children:[U("filebrowser.uploadPendingTo",{name:S.name}),!qt&&o.jsxDEV("em",{className:"browse-pending-hint",children:U("filebrowser.enterSubdirFirst")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:364,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:362,columnNumber:11},this),o.jsxDEV("button",{className:"browse-pending-btn",disabled:!qt||k,onClick:xe,children:U("filebrowser.upload")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:366,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:361,columnNumber:9},this),c&&o.jsxDEV("div",{className:"bind-error browse-err",children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:369,columnNumber:15},this),v&&o.jsxDEV("div",{className:"browse-notice",children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:370,columnNumber:18},this),!b&&E&&o.jsxDEV("div",{className:"browse-saved",children:[o.jsxDEV("span",{className:"browse-saved-text",children:U("filebrowser.savedToDownloads",{name:E})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:373,columnNumber:11},this),o.jsxDEV("button",{className:"browse-saved-close","aria-label":U("common.close"),onClick:()=>R(""),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:374,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:372,columnNumber:9},this),!b&&q&&o.jsxDEV("div",{className:"browse-progress",children:[o.jsxDEV("span",{className:"browse-progress-label",children:[q.label," ",Math.round(q.pct*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:379,columnNumber:11},this),o.jsxDEV("span",{className:"browse-progress-track",children:o.jsxDEV("span",{className:"browse-progress-fill",style:{width:`${Math.round(q.pct*100)}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:381,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:380,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:378,columnNumber:9},this),o.jsxDEV("div",{className:"browse-list",children:[lt.length===0&&!c&&o.jsxDEV("div",{className:"browse-empty",children:U("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:386,columnNumber:42},this),lt.map($=>o.jsxDEV("div",{className:"browse-entry-row",children:[o.jsxDEV("button",{className:"browse-entry",onClick:()=>$.type==="dir"?re($.name):$.type==="doc"||$.type==="image"?we($.name):he(U("filebrowser.previewUnsupported")),children:[o.jsxDEV("span",{className:"browse-entry-icon",children:$.type==="dir"?o.jsxDEV(yd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:71},this):$.type==="image"?o.jsxDEV(ZU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:109},this):o.jsxDEV(bE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:125},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:15},this),o.jsxDEV("span",{className:"browse-entry-name",children:$.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:398,columnNumber:15},this),$.type!=="dir"&&o.jsxDEV("span",{className:"browse-entry-size",children:XV($.size)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:399,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:389,columnNumber:13},this),$.type!=="dir"&&o.jsxDEV("button",{className:"browse-copy","aria-label":U("filebrowser.copyAbsPath"),title:U("filebrowser.copyAbsPath"),onClick:()=>ke($.name),children:o.jsxDEV(wE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:403,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:402,columnNumber:15},this),$.type!=="dir"&&o.jsxDEV("button",{className:"browse-dl","aria-label":U("filebrowser.download"),onClick:()=>A($.name),children:o.jsxDEV(n3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:408,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:407,columnNumber:15},this)]},$.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:388,columnNumber:11},this)),dt>0&&o.jsxDEV("div",{className:"browse-overflow",children:U("filebrowser.tooMany",{shown:lt.length,total:Te.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:414,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:385,columnNumber:7},this),b&&_&&o.jsxDEV("div",{className:"browse-pick-bar",children:o.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>d==null?void 0:d(_.path),children:U("filebrowser.pickThisDir",{path:e_(_.path,_.home)?`~/${e_(_.path,_.home)}`:"~"})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:419,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:418,columnNumber:9},this),o.jsxDEV(jf,{open:!!j,title:j?U("filebrowser.downloadConfirm",{name:j}):"",actions:[{key:"dl",label:U("filebrowser.download"),onClick:pe}],onClose:()=>A(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:424,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:270,columnNumber:5},this)}const JV=()=>{};function Rd({open:i,seedCwd:s=null,hint:l=null,pane:m=null,allowMkdir:S=!1,onPick:D,onClose:b,inset:a=0}){const[d,f]=M.useState(s),w=M.useRef(!1);i&&!w.current?(w.current=!0,d!==s&&f(s)):!i&&w.current&&(w.current=!1);const h=m?async()=>{try{const{cwd:_}=await rl(m);_&&f(_)}catch{}}:null;return i?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop dirpick-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:31,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card dirpick-card",style:{transform:`translate(-50%, calc(-50% + ${a/2}px))`,"--kb-inset":`${a}px`},role:"dialog","aria-label":U("dirpicker.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("dirpicker.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:38,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:b,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:37,columnNumber:9},this),l&&o.jsxDEV("div",{className:"dirpick-hint",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:41,columnNumber:18},this),o.jsxDEV(wC,{path:d,onNavigate:f,onOpenDoc:JV,onJumpToCwd:h,pickMode:!0,allowMkdir:S,onPick:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:32,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:30,columnNumber:5},this):null}function ZV({open:i,pushKey:s,notifyOn:l,onClose:m}){const[S,D]=M.useState("");if(!i)return null;const b='handmux push "构建完成" "耗时 3m12s"',a=!!(l&&s),d=b,f=`${b} --session ${U("scriptPush.session_placeholder")}`,w=`${b} --device ${a?s:U("scriptPush.device_placeholder")}`,h=async(C,y)=>{try{await navigator.clipboard.writeText(C),D(y),setTimeout(()=>D(""),1500)}catch{}},_=C=>U(S===C?"scriptPush.copied":"common.copy"),N=(C,y,c,p)=>o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:7},this),o.jsxDEV("pre",{className:"push-script-cmd",children:o.jsxDEV("code",{children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:7},this),p&&o.jsxDEV("div",{className:"push-script-hint",children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:27,columnNumber:16},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>h(c,C),children:_(C)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:28,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:24,columnNumber:5},this);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop push-script-backdrop",onClick:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:34,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card push-script-sheet",role:"dialog","aria-label":U("scriptPush.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("scriptPush.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:37,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:m,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:36,columnNumber:9},this),o.jsxDEV("p",{className:"push-script-intro",children:U("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),N("all",U("scriptPush.scope_all"),d),N("session",U("scriptPush.scope_session"),f),N("device",U("scriptPush.scope_device"),w,U(a?"scriptPush.device_key_note":"scriptPush.device_need_enable")),o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:U("scriptPush.opts_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:49,columnNumber:11},this),o.jsxDEV("ul",{className:"push-script-fields",children:[o.jsxDEV("li",{children:U("scriptPush.opt_tag")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:51,columnNumber:13},this),o.jsxDEV("li",{children:U("scriptPush.opt_url")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:52,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:48,columnNumber:9},this),o.jsxDEV("div",{className:"push-script-note",children:U("scriptPush.reliability")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:56,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:35,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:33,columnNumber:5},this)}function QV({open:i,onClose:s,termRef:l,onColAdjust:m,onColRestore:S,onOpenChangelog:D,changelogUnread:b,chatTone:a="ink",onChatTone:d=()=>{},chatLensEnabled:f=!1,onChatLensEnabled:w=()=>{},keyboardMode:h="auto",onKeyboardMode:_=()=>{},hooksStatus:N=null,onEnableHooks:C=null,notifUnread:y=!1,onOpenInbox:c,updateInfo:p=null,windowId:v=null,workspaceProtection:g=null,activePreview:E=null,pane:R=null,lastPreviewDir:j=null,dynamicEnabled:A=!1,getColCount:k=null,onStartPreview:L,onStartDynamicPreview:O,onOpenPreview:H,onRenew:V,onStop:B}){var Hn,vi,Yn;const[q,ne]=M.useState(null),[Y,J]=M.useState(uE()),[ee,P]=M.useState(null),W=M.useRef(0),[Q,K]=M.useState(!1),[he,ce]=M.useState(u_()),[ke,we]=M.useState(!1),[re,G]=M.useState(""),ge=N==="absent"||N==="no-claude",[de,pe]=M.useState(!1),[Ne,Ie]=M.useState(!1),Ze=async()=>{pe(!0),Ie(!1);try{const st=await(C==null?void 0:C());(!st||st.status!=="installed")&&Ie(!0)}catch{Ie(!0)}finally{pe(!1)}},[ut,At]=M.useState(!1),[Ke,qt]=M.useState(null),[Ut,xe]=M.useState(!1),[Ve,Xe]=M.useState(null),[Te,lt]=M.useState("off"),[dt,$]=M.useState(""),[at,De]=M.useState(!1),[We,be]=M.useState(""),[Pe,He]=M.useState(!1),Ot=CE(E==null?void 0:E.expiresAt,!!E&&i);M.useEffect(()=>{De(!1),be("")},[E==null?void 0:E.name,i]);const Le=async()=>{const st=Number(dt);if(st){be(""),He(!0);try{await(O==null?void 0:O(st))}catch(tn){be(LE(tn,{port:st}))}finally{He(!1)}}},ve=async()=>{qt(u_()?await D3():null),At(!0)},xt=async()=>{let st=j;if(!st&&R)try{st=(await rl(R)).cwd||null}catch{}Xe(st),xe(!0)};M.useEffect(()=>{var Pt,Tn;let st=!0;const tn=++W.current;if(i){ne(((Tn=(Pt=l.current)==null?void 0:Pt.getFontSize)==null?void 0:Tn.call(Pt))??null);const Sn=(k==null?void 0:k())??null;v&&R?(P(null),zs(v).then(zn=>{var Be;const ae=(Be=zn.find(et=>et.id===R))==null?void 0:Be.width;st&&tn===W.current&&P(Number.isFinite(ae)?ae:null)}).catch(()=>{st&&tn===W.current&&P(null)})):P(Sn)}return()=>{st=!1}},[i,l,k,v,R]);const Kt=async()=>{we(!0),G("");try{he?(await j3(),ce(!1),G(U("settings.notify_disabled"))):(await C3(),ce(!0),G(U("settings.notify_enabled")))}catch(st){G(st.message||U("settings.notify_failed"))}finally{we(!1)}};if(!i)return null;const ot=st=>{var Tn,Sn,zn,ae;const tn=(Sn=(Tn=l.current)==null?void 0:Tn.getFontSize)==null?void 0:Sn.call(Tn),Pt=(ae=(zn=l.current)==null?void 0:zn.setFontSize)==null?void 0:ae.call(zn,((tn==null?void 0:tn.size)??14)+st);Pt!=null&&ne({size:Pt,auto:!1})},Tt=()=>{var st,tn;(tn=(st=l.current)==null?void 0:st.autoFont)==null||tn.call(st),ne({size:null,auto:!0})},Qt=st=>{var tn,Pt;J(st),GM(st),(Pt=(tn=l.current)==null?void 0:tn.setDocHighlight)==null||Pt.call(tn,st)},Vt=q!=null&&q.auto?U("settings.font_auto"):q!=null&&q.size?`${q.size}px`:"—",Fn=ee!=null?`${ee} 列`:"—",mn=st=>{ee!=null&&(m==null||m(st,ee),P((k==null?void 0:k())??null))},xi=()=>{W.current+=1,S==null||S(),P(null)},ci=["live-corrupt","live-unavailable"].includes(g==null?void 0:g.errorCode)?g.errorCode:"unknown";return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:140,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":U("settings.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("settings.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:143,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:144,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:142,columnNumber:9},this),o.jsxDEV("div",{className:"settings-body",children:[o.jsxDEV("div",{className:"settings-group",children:U("settings.group_global")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:148,columnNumber:9},this),(g==null?void 0:g.status)==="degraded"&&o.jsxDEV("div",{className:"settings-section settings-protection-warning",role:"status",children:[o.jsxDEV("div",{className:"settings-protection-title",children:U("workspace.protectionTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:152,columnNumber:13},this),o.jsxDEV("div",{className:"settings-hint",children:U(`workspace.protection.${ci}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:153,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:151,columnNumber:11},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:158,columnNumber:11},this),o.jsxDEV("div",{className:"lang-drop",children:[Q&&o.jsxDEV("div",{className:"lang-drop-backdrop",onClick:()=>K(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:160,columnNumber:26},this),o.jsxDEV("button",{className:"lang-trigger",onClick:()=>K(st=>!st),children:[o.jsxDEV("span",{children:(Hn=e1.find(st=>st.code===vo()))==null?void 0:Hn.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:162,columnNumber:15},this),o.jsxDEV("span",{className:"lang-chevron",children:Q?"▴":"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:163,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:161,columnNumber:13},this),Q&&o.jsxDEV("div",{className:"lang-menu",children:e1.map(st=>o.jsxDEV("button",{className:`lang-option${st.code===vo()?" active":""}`,onClick:()=>uM(st.code),children:st.label},st.code,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:168,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:166,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:157,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.font_size")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:177,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>ot(-1),"aria-label":U("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:179,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:Vt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:180,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>ot(1),"aria-label":U("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:181,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:Tt,title:U("settings.font_auto_title"),children:U("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:182,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:178,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:176,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.keyboard_mode")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:187,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",role:"group","aria-label":U("settings.keyboard_mode"),children:["auto","mobile","desktop"].map(st=>o.jsxDEV("button",{type:"button",className:"fontbtn","aria-pressed":h===st,onClick:()=>_(st),children:U(`settings.keyboard_mode_${st}`)},st,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:190,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:188,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.keyboard_mode_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:197,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:186,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:U("settings.chat_lens")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:206,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:f,disabled:ge&&!f,onChange:st=>w(st.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:208,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:211,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:212,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:207,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:205,columnNumber:11},this),ge?o.jsxDEV("div",{className:"settings-hint",children:[U(N==="no-claude"?"settings.chat_lens_no_claude":"settings.chat_lens_need_hooks"),N==="absent"&&o.jsxDEV("button",{type:"button",className:"fontbtn settings-hint-btn",disabled:de,onClick:Ze,children:U(de?"settings.chat_lens_installing":"settings.chat_lens_install_hooks")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:219,columnNumber:17},this),Ne&&o.jsxDEV("div",{className:"settings-hint settings-hint-err",children:U("settings.chat_lens_hooks_err")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:224,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:216,columnNumber:13},this):o.jsxDEV("div",{className:"settings-hint",children:U("settings.chat_lens_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:227,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:200,columnNumber:9},this),f&&o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.chat_tone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:234,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:["dusk","ink","light"].map(st=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===st,onClick:()=>d(st),children:U(`settings.chat_tone_${st}`)},st,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:237,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:235,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.chat_tone_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:247,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:233,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:U("settings.path_highlight")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:253,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:Y,onChange:st=>Qt(st.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:255,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:256,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:257,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:254,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:252,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.path_highlight_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:260,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:251,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.version")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:264,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("span",{className:"settings-value",children:p!=null&&p.current?`v${p.current}`:"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:266,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:D,children:[U("settings.view_changelog"),b&&o.jsxDEV("span",{className:"settings-dot","aria-label":U("settings.has_update")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:268,columnNumber:65},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:267,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:265,columnNumber:11},this),(p==null?void 0:p.updateAvailable)&&o.jsxDEV("div",{className:"settings-update",children:[o.jsxDEV("div",{className:"settings-update-title",children:U("settings.update_available",{v:p.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:277,columnNumber:15},this),((vi=p.whatsNew)==null?void 0:vi.length)>0&&o.jsxDEV("ul",{className:"settings-update-new",children:p.whatsNew.slice(0,1).map(st=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",st.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:282,columnNumber:23},this),(vo().startsWith("zh")?st.zh:st.en)||st.en]},st.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:281,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:279,columnNumber:17},this),((Yn=p.whatsNew)==null?void 0:Yn.length)>1&&o.jsxDEV("details",{className:"settings-update-more",children:[o.jsxDEV("summary",{children:U("settings.update_more",{n:p.whatsNew.length-1})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:290,columnNumber:19},this),o.jsxDEV("ul",{className:"settings-update-new",children:p.whatsNew.slice(1).map(st=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",st.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:294,columnNumber:25},this),(vo().startsWith("zh")?st.zh:st.en)||st.en]},st.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:293,columnNumber:23},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:291,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:289,columnNumber:17},this),o.jsxDEV("div",{className:"settings-update-how",children:[U("settings.update_how")," ",o.jsxDEV("code",{children:"handmux update"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:301,columnNumber:79},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:301,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:276,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:263,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:311,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://github.com/handmux/handmux/issues",target:"_blank",rel:"noreferrer",children:U("settings.feedback_issues")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:313,columnNumber:13},this),vo().startsWith("zh")&&o.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://handmux.com/#community",target:"_blank",rel:"noreferrer",children:U("settings.feedback_group")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:315,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:312,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:318,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:310,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.push_notifications")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:322,columnNumber:11},this),yc()?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:Kt,disabled:ke,"aria-pressed":he,children:U(he?"settings.notify_on":"settings.notify_enable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:326,columnNumber:17},this),ke&&o.jsxDEV("span",{className:"spinner",role:"status","aria-label":U("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:329,columnNumber:32},this),!ke&&re&&o.jsxDEV("span",{className:"settings-note",children:re},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:330,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:325,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:332,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:324,columnNumber:13},this):o.jsxDEV("div",{className:"settings-value",style:{display:"block"},children:U("settings.push_unsupported")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:335,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:321,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.script_push")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:340,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:ve,disabled:!yc(),children:U("settings.script_push_open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:342,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn push-inbox-entry",onClick:c,children:[U("pushInbox.title"),y&&o.jsxDEV("span",{className:"push-inbox-entry-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:345,columnNumber:31},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:343,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:341,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.script_push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:348,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:339,columnNumber:9},this),o.jsxDEV("div",{className:"settings-group",children:U("settings.group_session")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:351,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.screen_cols")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:354,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns cols-btns",children:[o.jsxDEV("button",{className:"fontbtn col-step",disabled:ee==null,onClick:()=>mn(-10),children:"−10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:356,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",disabled:ee==null,onClick:()=>mn(-1),children:"−1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:357,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:Fn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:358,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",disabled:ee==null,onClick:()=>mn(1),children:"+1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:359,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step",disabled:ee==null,onClick:()=>mn(10),children:"+10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:360,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:xi,children:["↺ ",U("settings.cols_restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:361,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:355,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:353,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U(A?"settings.preview_site":"settings.preview_static_site")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:366,columnNumber:11},this),E?o.jsxDEV("div",{className:"preview-active",children:[o.jsxDEV("div",{className:"preview-active-head",children:[o.jsxDEV("span",{className:"preview-running",children:[o.jsxDEV("span",{className:"live-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:370,columnNumber:51},this),E.kind==="dynamic"?U("settings.preview_running_dynamic"):U("settings.preview_running_static")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:370,columnNumber:17},this),o.jsxDEV("span",{className:"preview-remain-s",title:U("settings.preview_remain_title"),children:U("settings.preview_remain",{time:EE(Ot)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:371,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:369,columnNumber:15},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>{H==null||H(),s==null||s()},children:U("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:374,columnNumber:17},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>V==null?void 0:V(),children:U("settings.preview_renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:375,columnNumber:17},this),at?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"fontbtn preview-confirm-danger",onClick:()=>{De(!1),B==null||B()},children:U("settings.preview_confirm_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:378,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>De(!1),children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:379,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:377,columnNumber:19},this):o.jsxDEV("button",{className:"fontbtn",onClick:()=>De(!0),children:U("settings.preview_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:382,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:373,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:[U("settings.preview_name",{name:E.name}),E.kind==="dynamic"?U("settings.preview_port",{port:E.port}):E.dir?`(${E.dir})`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:385,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:368,columnNumber:13},this):o.jsxDEV("div",{className:"preview-start",children:[o.jsxDEV("div",{className:"preview-seg",role:"tablist","aria-label":U("settings.preview_type"),children:[o.jsxDEV("button",{role:"tab",className:Te==="off"?"on":"","aria-selected":Te==="off",onClick:()=>lt("off"),children:U("settings.preview_off")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:394,columnNumber:17},this),o.jsxDEV("button",{role:"tab",className:Te==="static"?"on":"","aria-selected":Te==="static",onClick:()=>lt("static"),children:U("settings.preview_static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:395,columnNumber:17},this),A&&o.jsxDEV("button",{role:"tab",className:Te==="dynamic"?"on":"","aria-selected":Te==="dynamic",onClick:()=>{be(""),lt("dynamic")},children:U("settings.preview_dynamic")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:397,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:393,columnNumber:15},this),Te==="off"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-hint",children:U(A?"settings.preview_off_hint_both":"settings.preview_off_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:402,columnNumber:19},this),!A&&o.jsxDEV("div",{className:"settings-hint preview-dynamic-disabled",children:U("settings.preview_dynamic_disabled")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:404,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:401,columnNumber:17},this),Te==="static"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:o.jsxDEV("button",{className:"fontbtn",onClick:xt,children:U("settings.preview_pick_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:411,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:410,columnNumber:19},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.preview_static_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:413,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:409,columnNumber:17},this),Te==="dynamic"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("input",{className:"preview-port",type:"number",inputMode:"numeric",min:"1",max:"65535",placeholder:U("settings.preview_port_placeholder"),value:dt,onChange:st=>{$(st.target.value),be("")},"aria-label":U("settings.preview_port_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:419,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",disabled:!dt||Pe,onClick:Le,children:U(Pe?"settings.preview_starting":"settings.preview_start")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:421,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:418,columnNumber:19},this),We?o.jsxDEV("div",{className:"settings-hint settings-err",children:We},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:424,columnNumber:23},this):o.jsxDEV("div",{className:"settings-hint",children:U("settings.preview_dynamic_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:425,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:417,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:392,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:365,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:147,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:141,columnNumber:7},this),o.jsxDEV(Rd,{open:Ut,seedCwd:Ve,pane:R,hint:U("settings.dir_picker_hint"),onPick:st=>{xe(!1),L==null||L(st),s==null||s()},onClose:()=>xe(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:433,columnNumber:7},this),o.jsxDEV(ZV,{open:ut,pushKey:Ke,notifyOn:he,onClose:()=>At(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:441,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:139,columnNumber:5},this)}const eP=new Set(["succeeded","partial","failed","interrupted"]),tP=new Set(["restore-interrupted","checkpoint-not-found","storage-full","permission-denied","plan-failed","agent-unavailable","tmux-unavailable","restore-failed","operation-not-found"]),L_=new Set(["cwd-fallback","layout-fallback","agent-warning","live-reconcile-failed","workspace-unavailable","restore-warning"]);function CS(i){return U(`workspace.error.${tP.has(i)?i:"restore-failed"}`)}function jS(i){return U(`workspace.warning.${L_.has(i)?i:"restore-warning"}`)}function nP({open:i,plan:s,operation:l=null,submitting:m=!1,returnFocusRef:S=null,onRestore:D,onIgnore:b,onClose:a,onRebind:d}){var H,V,B,q,ne,Y;const f=M.useRef(!1),w=M.useRef(null),h=M.useRef(null),_=M.useRef(null),N=m||(l==null?void 0:l.status)==="pending"||(l==null?void 0:l.status)==="running",C=l&&eP.has(l.status),y=l&&["succeeded","partial"].includes(l.status);if(M.useEffect(()=>{(!N||C)&&(f.current=!1)},[N,C,s==null?void 0:s.checkpointId]),M.useEffect(()=>{var J;if(i)return _.current=(S==null?void 0:S.current)||(document.activeElement instanceof HTMLElement?document.activeElement:null),(J=h.current)==null||J.focus(),()=>{var ee;(ee=_.current)!=null&&ee.isConnected&&_.current.focus(),_.current=null}},[i,S]),!i||!s)return null;const c=(((H=s.planSummary)==null?void 0:H.create)||0)+(((V=s.planSummary)==null?void 0:V.renamed)||0),p=((B=s.planSummary)==null?void 0:B.alreadyPresent)||0,v=(s.sessions||[]).filter(J=>J.action==="create-renamed"),g=(l==null?void 0:l.progress)||{completed:0,total:c},E=((l==null?void 0:l.results)||[]).filter(J=>J.status==="restored").length,R=(l==null?void 0:l.summary)||{sessions:E,windows:0,panes:0},j=((l==null?void 0:l.results)||[]).filter(J=>J.status==="failed"),A=((l==null?void 0:l.warningCodes)||[]).filter(J=>L_.has(J)),k=((l==null?void 0:l.results)||[]).flatMap(J=>(J.warningCodes||[]).filter(ee=>L_.has(ee)).map(ee=>({row:J,code:ee}))),L=()=>{N||f.current||(f.current=!0,D==null||D())},O=J=>{var Q,K,he,ce;if(J.key!=="Tab")return;const ee=[...((Q=w.current)==null?void 0:Q.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))||[]];if(ee.length===0){J.preventDefault(),(K=w.current)==null||K.focus();return}const P=ee[0],W=ee[ee.length-1];J.shiftKey&&(document.activeElement===P||!((he=w.current)!=null&&he.contains(document.activeElement)))?(J.preventDefault(),W.focus()):!J.shiftKey&&(document.activeElement===W||!((ce=w.current)!=null&&ce.contains(document.activeElement)))&&(J.preventDefault(),P.focus())};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop workspace-restore-backdrop",onClick:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:93,columnNumber:7},this),o.jsxDEV("div",{ref:w,className:"settings-card workspace-restore-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"workspace-restore-title",tabIndex:-1,onKeyDown:O,children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{id:"workspace-restore-title",className:"settings-title",children:U("workspace.restoreLast")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:97,columnNumber:11},this),o.jsxDEV("button",{ref:h,type:"button",className:"settings-close workspace-restore-close",onClick:a,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:96,columnNumber:9},this),o.jsxDEV("div",{className:"workspace-restore-body",children:[o.jsxDEV("div",{className:"workspace-restore-reason",children:U(AE(s))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:102,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-time",children:U("workspace.savedAt",{time:ME(s.capturedAt)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:103,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-summary",children:U("workspace.topologySummary",{sessions:((q=s.summary)==null?void 0:q.sessions)??0,windows:((ne=s.summary)==null?void 0:ne.windows)??0,panes:((Y=s.summary)==null?void 0:Y.panes)??0})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:106,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-plan",children:U("workspace.planSummary",{restore:c,already:p})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:113,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-note",children:U("workspace.renameRule")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:116,columnNumber:11},this),v.length>0&&o.jsxDEV("ul",{className:"workspace-restore-renames",children:v.map(J=>o.jsxDEV("li",{children:[J.sourceName," → ",J.targetName]},J.logicalId||J.sourceName,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:119,columnNumber:37},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:118,columnNumber:13},this),o.jsxDEV("div",{className:"workspace-restore-note",children:U("workspace.nonDestructive")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:122,columnNumber:11},this),(l==null?void 0:l.status)==="partial"&&o.jsxDEV("div",{className:"workspace-restore-progress partial",role:"status",children:U("workspace.progressDone",{completed:E,total:g.total||c})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:125,columnNumber:13},this),(l==null?void 0:l.status)==="succeeded"&&o.jsxDEV("div",{className:"workspace-restore-success",children:U("workspace.complete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:129,columnNumber:49},this),y&&o.jsxDEV("div",{className:"workspace-restore-summary workspace-restore-completed-summary",children:U("workspace.completedSummary",R)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:131,columnNumber:13},this),y&&R.sessions>0&&o.jsxDEV("div",{className:"workspace-restore-note",children:U("workspace.rebindHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:136,columnNumber:13},this),(l==null?void 0:l.errorCode)&&j.length===0&&o.jsxDEV("div",{className:"workspace-restore-errors",role:"alert",children:CS(l.errorCode)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:139,columnNumber:13},this),j.length>0&&o.jsxDEV("ul",{className:"workspace-restore-errors",role:"alert",children:j.map((J,ee)=>o.jsxDEV("li",{children:U("workspace.sessionFailure",{session:J.sourceName||U("workspace.unknownSession"),reason:CS(J.errorCode)})},J.logicalId||`${J.sourceName}-${ee}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:144,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:142,columnNumber:13},this),(A.length>0||k.length>0)&&o.jsxDEV("ul",{className:"workspace-restore-warnings",role:"status",children:[A.map(J=>o.jsxDEV("li",{children:jS(J)},`operation-${J}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:155,columnNumber:42},this)),k.map(({row:J,code:ee},P)=>o.jsxDEV("li",{children:U("workspace.sessionWarning",{session:J.sourceName||U("workspace.unknownSession"),reason:jS(ee)})},`${J.logicalId||J.sourceName||P}-${ee}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:157,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:154,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:101,columnNumber:9},this),o.jsxDEV("div",{className:"workspace-restore-actions",children:y?o.jsxDEV(o.Fragment,{children:[R.sessions>0&&o.jsxDEV("button",{type:"button",className:"workspace-restore-primary",onClick:d,children:U("workspace.rebind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:171,columnNumber:17},this),o.jsxDEV("button",{type:"button",className:"workspace-restore-ignore",onClick:a,children:U("common.done")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:175,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:169,columnNumber:13},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{type:"button",className:"workspace-restore-primary",disabled:N,onClick:L,children:N?U("workspace.progress",{completed:g.completed||0,total:g.total||c}):U("workspace.restore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:181,columnNumber:15},this),o.jsxDEV("button",{type:"button",className:"workspace-restore-ignore",disabled:N,onClick:b,children:U("workspace.ignore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:186,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:167,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:94,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:92,columnNumber:5},this)}function DS(i){return i===300?U("usage.win5h"):i===10080?U("usage.winWeekly"):i===43200?U("usage.winMonthly"):i>0?U("usage.winGeneric",{h:Math.round(i/60)}):""}function Df(i,s){if(!i)return"";const l=i-Math.floor(s/1e3);if(l<=0)return U("usage.resetSoon");const m=Math.floor(l/86400),S=Math.floor(l%86400/3600),D=Math.floor(l%3600/60),b=m>0?`${m}d ${S}h`:S>0?`${S}h ${D}m`:`${D}m`;return U("usage.resetIn",{t:b})}function xC({at:i,now:s}){if(!i)return null;const l=Math.max(0,Math.floor((s-i)/1e3)),m=l<60?U("usage.updatedNow"):l<3600?U("usage.updatedMin",{n:Math.floor(l/60)}):l<86400?U("usage.updatedHr",{n:Math.floor(l/3600)}):U("usage.updatedDay",{n:Math.floor(l/86400)});return o.jsxDEV("div",{className:"usage-updated",children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function bc(i,s,l){if(!i||!s)return null;const m=i-Math.floor(l/1e3);return Math.max(0,Math.min(100,(1-m/(s*60))*100))}function iP({pct:i,timePct:s}){const l=Math.max(0,Math.min(100,i??0)),m=l>=80?"hi":l>=50?"mid":"lo";return o.jsxDEV("div",{className:"usage-bar",children:[o.jsxDEV("div",{className:`usage-bar-fill lvl-${m}`,style:{width:`${l}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:54,columnNumber:7},this),s!=null&&o.jsxDEV("div",{className:"usage-bar-time",style:{left:`${s}%`},title:U("usage.timeMark")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:55,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:53,columnNumber:5},this)}function _c({label:i,pct:s,reset:l,sub:m,timePct:S}){return o.jsxDEV("div",{className:"usage-row",children:[o.jsxDEV("div",{className:"usage-row-head",children:[o.jsxDEV("span",{className:"usage-row-label",children:[i,m&&o.jsxDEV("span",{className:"usage-row-sub",children:[" · ",m]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:9},this),o.jsxDEV("span",{className:"usage-row-pct",children:[Math.round(s),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:65,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:63,columnNumber:7},this),o.jsxDEV(iP,{pct:s,timePct:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),l&&o.jsxDEV("div",{className:"usage-row-reset",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:68,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:62,columnNumber:5},this)}function rP({claude:i,now:s}){var l,m;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(sl,{agent:"claude"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:41},this),o.jsxDEV("span",{children:"Claude Code"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:69},this),o.jsxDEV(xC,{at:i==null?void 0:i.updatedAt,now:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:93},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:7},this),i?!((l=i.rateLimits)!=null&&l.fiveHour)&&!((m=i.rateLimits)!=null&&m.sevenDay)?o.jsxDEV("div",{className:"usage-empty",children:U("usage.claudePending")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:83,columnNumber:9},this):o.jsxDEV(o.Fragment,{children:[i.rateLimits.fiveHour&&o.jsxDEV(_c,{label:U("usage.win5h"),pct:i.rateLimits.fiveHour.usedPercent,reset:Df(i.rateLimits.fiveHour.resetsAt,s),timePct:bc(i.rateLimits.fiveHour.resetsAt,300,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:87,columnNumber:13},this),i.rateLimits.sevenDay&&o.jsxDEV(_c,{label:U("usage.winWeekly"),pct:i.rateLimits.sevenDay.usedPercent,reset:Df(i.rateLimits.sevenDay.resetsAt,s),timePct:bc(i.rateLimits.sevenDay.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:92,columnNumber:13},this),i.rateLimits.sevenDayOpus&&o.jsxDEV(_c,{label:U("usage.winWeekly"),sub:"Opus",pct:i.rateLimits.sevenDayOpus.usedPercent,timePct:bc(i.rateLimits.sevenDayOpus.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:97,columnNumber:13},this),i.rateLimits.sevenDaySonnet&&o.jsxDEV(_c,{label:U("usage.winWeekly"),sub:"Sonnet",pct:i.rateLimits.sevenDaySonnet.usedPercent,timePct:bc(i.rateLimits.sevenDaySonnet.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:85,columnNumber:9},this):o.jsxDEV("div",{className:"usage-empty",children:[o.jsxDEV("div",{children:U("usage.claudeOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:79,columnNumber:11},this),o.jsxDEV("code",{className:"usage-code",children:"handmux hooks install"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:80,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:75,columnNumber:5},this)}function sP({codex:i,now:s}){const l=i==null?void 0:i.rateLimits;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(sl,{agent:"codex"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:41},this),o.jsxDEV("span",{children:"Codex CLI"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:68},this),o.jsxDEV(xC,{at:i==null?void 0:i.updatedAt,now:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:90},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:7},this),i?o.jsxDEV(o.Fragment,{children:[(l==null?void 0:l.primary)&&o.jsxDEV(_c,{label:DS(l.primary.windowMinutes)||U("usage.winPrimary"),pct:l.primary.usedPercent,reset:Df(l.primary.resetsAt,s),timePct:bc(l.primary.resetsAt,l.primary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:120,columnNumber:13},this),(l==null?void 0:l.secondary)&&o.jsxDEV(_c,{label:DS(l.secondary.windowMinutes)||U("usage.winSecondary"),pct:l.secondary.usedPercent,reset:Df(l.secondary.resetsAt,s),timePct:bc(l.secondary.resetsAt,l.secondary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:125,columnNumber:13},this),!(l!=null&&l.primary)&&!(l!=null&&l.secondary)&&o.jsxDEV("div",{className:"usage-empty",children:U("usage.codexNoQuota")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:129,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:118,columnNumber:9},this):o.jsxDEV("div",{className:"usage-empty",children:U("usage.codexOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:116,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:113,columnNumber:5},this)}function aP({open:i,onClose:s,onAuthFail:l}){const[m,S]=M.useState(null),[D,b]=M.useState(""),[a,d]=M.useState(!1),f=Date.now();return M.useEffect(()=>{if(!i)return;let w=!1;return d(!0),b(""),mU().then(h=>{w||(S(h),d(!1))}).catch(h=>{w||(h instanceof $i?l==null||l():b(U("usage.loadFailed")),d(!1))}),()=>{w=!0}},[i]),i?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:161,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card usage-card",role:"dialog","aria-label":U("usage.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("usage.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:164,columnNumber:11},this),o.jsxDEV("span",{className:"usage-head-note",children:U("usage.activityNote")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:165,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:163,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:a&&!m?o.jsxDEV("div",{className:"usage-empty",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):D?o.jsxDEV("div",{className:"bind-error",children:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):m?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(sP,{codex:m.codex,now:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:15},this),o.jsxDEV(rP,{claude:m.claude,now:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:176,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:174,columnNumber:13},this):null},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:162,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:160,columnNumber:5},this):null}function oP({rows:i,top:s,open:l,onToggle:m,onClose:S,onSelectRow:D,onMarkAllRead:b,hooksStatus:a,onEnableHooks:d}){const f=[];for(const g of i){const E=f[f.length-1];E&&E.session===g.session?E.items.push(g):f.push({session:g.session,items:[g]})}const w=Date.now(),h=i.some(g=>g.view==="done"),_=x3(i),[N,C]=M.useState(!1),[y,c]=M.useState(!1),p=f.length===0&&a==="absent",v=async()=>{C(!0),c(!1);try{const g=await(d==null?void 0:d());(!g||g.status!=="installed")&&c(!0)}catch{c(!0)}finally{C(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:m,"aria-label":U("inbox.title"),title:U("inbox.title"),children:[o.jsxDEV(t3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:36,columnNumber:9},this),s&&o.jsxDEV("span",{className:`inbox-dot ${s}`,"aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:37,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:35,columnNumber:7},this),l&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"inbox-backdrop",onClick:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:41,columnNumber:11},this),o.jsxDEV("div",{className:"inbox-panel",role:"dialog","aria-label":U("inbox.title"),children:[o.jsxDEV("div",{className:"inbox-head",children:[o.jsxDEV("span",{children:U("inbox.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:44,columnNumber:15},this),o.jsxDEV("div",{className:"inbox-summary",children:[o.jsxDEV("span",{className:"inbox-chip working",children:[U("inbox.working")," ",_.working]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:47,columnNumber:17},this),o.jsxDEV("span",{className:"inbox-chip done",children:[U("inbox.done")," ",_.done]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:48,columnNumber:17},this),o.jsxDEV("span",{className:"inbox-chip needs",children:[U("inbox.needs")," ",_.needs]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:49,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:46,columnNumber:15},this),h&&o.jsxDEV("button",{className:"inbox-readall",onClick:b,children:U("inbox.clearDone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:51,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:43,columnNumber:13},this),f.length===0?p?o.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[o.jsxDEV("div",{className:"inbox-enable-title",children:U("inbox.enableTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:56,columnNumber:19},this),o.jsxDEV("div",{className:"inbox-enable-hint",children:U("inbox.enableHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:57,columnNumber:19},this),o.jsxDEV("button",{className:"inbox-enable-btn",onClick:v,disabled:N,children:U(N?"inbox.enabling":"inbox.enableBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:58,columnNumber:19},this),y&&o.jsxDEV("div",{className:"inbox-enable-err",children:U("inbox.enableFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:61,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:55,columnNumber:17},this):o.jsxDEV("div",{className:"inbox-empty",children:U("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):f.map(g=>o.jsxDEV("div",{className:"inbox-group",children:[o.jsxDEV("div",{className:"inbox-group-title",children:g.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),g.items.map(E=>o.jsxDEV("button",{className:"inbox-row",onClick:()=>D(E),children:[o.jsxDEV("div",{className:"inbox-row-head",children:[o.jsxDEV("span",{className:`inbox-chip ${E.view}`,children:y3[E.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),o.jsxDEV(sl,{agent:E.agent},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:73,columnNumber:23},this),o.jsxDEV("span",{className:"inbox-loc",children:E.windowName||E.window},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:74,columnNumber:23},this),o.jsxDEV("span",{className:"inbox-time",children:jE(E.ts,w)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:75,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:71,columnNumber:21},this),E.msg&&o.jsxDEV("div",{className:"inbox-msg",children:E.msg},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:77,columnNumber:31},this)]},E.pane,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:70,columnNumber:19},this))]},g.session,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:67,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:42,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:40,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:34,columnNumber:5},this)}function lP({open:i,orphan:s,onConfirm:l,onClose:m,inset:S=0}){var g;const[D,b]=M.useState([]),[a,d]=M.useState("new"),[f,w]=M.useState(""),[h,_]=M.useState(!0),[N,C]=M.useState(!1),[y,c]=M.useState("");if(M.useEffect(()=>{i&&(d("new"),w((s==null?void 0:s.suggestedName)||""),_($M()),C(!1),c(""),Jo().then(E=>b(Array.isArray(E)?E:[])).catch(()=>b([])))},[i,s]),!i||!s)return null;const p=a==="new"?f.trim()||s.suggestedName||"":((g=D.find(E=>E.id===a))==null?void 0:g.name)||"",v=async()=>{if(N)return;C(!0),c(""),WM(h);const E=a==="new"?{mode:"new"}:{mode:"window",session:a};try{await l({target:E,kill:h,name:a==="new"?f.trim():void 0})}catch{C(!1),c(U("inbox.orphans.failed"))}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:44,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${S/2}px))`},role:"dialog","aria-label":U("inbox.orphans.takeover"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:51,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:m,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:52,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:50,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:s.cwdLabel||s.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:56,columnNumber:13},this),s.snippet&&o.jsxDEV("div",{className:"inbox-msg",children:s.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:57,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:55,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("inbox.orphans.targetLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:60,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-targets",children:[o.jsxDEV("button",{className:"fontbtn","aria-pressed":a==="new",onClick:()=>d("new"),children:U("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),D.map(E=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===E.id,onClick:()=>d(E.id),children:E.name},E.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:66,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:59,columnNumber:11},this),a==="new"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("inbox.orphans.nameLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:74,columnNumber:15},this),o.jsxDEV("input",{className:"bind-input",value:f,placeholder:U("bind.invalidName"),onChange:E=>{w(E.target.value),c("")}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:75,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:73,columnNumber:13},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("inbox.orphans.killTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:84,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-targets orphan-kill",children:[o.jsxDEV("button",{className:"fontbtn","aria-pressed":h,onClick:()=>_(!0),children:[U("inbox.orphans.killEnd"),o.jsxDEV("span",{className:"orphan-reco",children:U("inbox.orphans.recommended")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:87,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:86,columnNumber:15},this),o.jsxDEV("button",{className:"fontbtn","aria-pressed":!h,onClick:()=>_(!1),children:U("inbox.orphans.killKeep")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:89,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:85,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-help",children:U("inbox.orphans.killWhy")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:93,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-help",children:[U("inbox.orphans.reopenPre")," ",o.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",p||U("inbox.orphans.namePlaceholder")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:96,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:94,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:83,columnNumber:11},this),y&&o.jsxDEV("div",{className:"bind-error",children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:99,columnNumber:21},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:m,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:101,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:v,disabled:N,children:U(N?"inbox.orphans.working":"inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:102,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:100,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:54,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:45,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:43,columnNumber:5},this)}const kS="tw_a2hs_dismissed",Ed=()=>typeof navigator<"u"&&navigator.userAgent||"",cf=()=>/iP(hone|ad|od)/.test(Ed())||/Macintosh/.test(Ed())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,cP=()=>/Android/.test(Ed()),uP=()=>cf()&&/Safari/.test(Ed())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(Ed());function dP(){const[i,s]=M.useState(!1),[l,m]=M.useState(null);if(M.useEffect(()=>{if(kE()||!cf()&&!cP())return;try{if(localStorage.getItem(kS)==="1")return}catch{}const f=w=>{w.preventDefault(),m(w)};return window.addEventListener("beforeinstallprompt",f),s(!0),()=>window.removeEventListener("beforeinstallprompt",f)},[]),!i)return null;const S=()=>{try{localStorage.setItem(kS,"1")}catch{}s(!1)},D=async()=>{if(l){l.prompt();try{await l.userChoice}catch{}S()}};let b,a,d=null;return l?(b="install",a=U("a2hs.lead"),d=o.jsxDEV("button",{className:"a2hs-banner-cta",onClick:D,children:U("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):cf()&&!uP()?(b="ios-other",a=U("a2hs.iosOpenSafari")):cf()?(b="ios",a=U("a2hs.iosHint")):(b="android",a=U("a2hs.androidManual")),o.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":U("a2hs.title"),"data-mode":b,children:[o.jsxDEV("span",{className:"a2hs-banner-icon","aria-hidden":"true",children:"⊕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:65,columnNumber:7},this),o.jsxDEV("div",{className:"a2hs-banner-txt",children:[o.jsxDEV("span",{className:"a2hs-banner-title",children:U("a2hs.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:67,columnNumber:9},this),o.jsxDEV("span",{className:"a2hs-banner-sub",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:66,columnNumber:7},this),d,o.jsxDEV("button",{className:"a2hs-banner-x",onClick:S,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:71,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:64,columnNumber:5},this)}const A_="tw_claude_hooks";function hP(){try{return localStorage.getItem(A_)||null}catch{return null}}function mP(i=null){const[s,l]=M.useState(hP);M.useEffect(()=>{if(!i)return;const S=i.claudeHooks||"installed";l(S);try{localStorage.setItem(A_,S)}catch{}},[i]);const m=M.useCallback(async()=>{const S=await OU();if(S!=null&&S.status){l(S.status);try{localStorage.setItem(A_,S.status)}catch{}}return S},[]);return{status:s,enable:m}}function fP({value:i,options:s,onChange:l,ariaLabel:m}){const[S,D]=M.useState(!1),b=M.useRef(null),a=s.find(d=>d.value===i)||s[0];return M.useEffect(()=>{if(!S)return;const d=f=>{var w;(w=b.current)!=null&&w.contains(f.target)||D(!1)};return document.addEventListener("pointerdown",d,!0),()=>document.removeEventListener("pointerdown",d,!0)},[S]),o.jsxDEV("div",{className:"dd",ref:b,children:[o.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":S,"aria-label":m,onClick:()=>D(d=>!d),children:[o.jsxDEV("span",{className:"dd-value",children:a==null?void 0:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:30,columnNumber:9},this),o.jsxDEV("span",{className:`dd-caret${S?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:31,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:22,columnNumber:7},this),S&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:s.map(d=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":d.value===i,className:`dd-option${d.value===i?" is-selected":""}`,onClick:()=>{l==null||l(d.value),D(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:d.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:44,columnNumber:15},this),d.value===i&&o.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:45,columnNumber:37},this)]},d.value||"__none__",!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:36,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:34,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:21,columnNumber:5},this)}const NC=[{value:"",label:U("startup.preset_shell")},{value:"claude",label:U("startup.preset_claude")},{value:"claude --continue",label:U("startup.preset_claude_continue")},{value:"codex",label:U("startup.preset_codex")}],uf="__custom__",pP=[...NC,{value:uf,label:U("startup.custom")}];function SC({value:i="",onChange:s}){const l=NC.some(f=>f.value===i),[m,S]=M.useState(l?i:uf),[D,b]=M.useState(l?"":i),a=f=>{S(f),s==null||s(f===uf?D:f)},d=f=>{const w=f.target.value;b(w),s==null||s(w)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-label",children:U("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),o.jsxDEV(fP,{value:m,options:pP,onChange:a,ariaLabel:U("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),m===uf&&o.jsxDEV("input",{className:"bind-input startup-custom",value:D,placeholder:U("startup.custom_placeholder"),onChange:d,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:32,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:28,columnNumber:5},this)}const vP=/^[A-Za-z0-9-]{1,16}$/;function gP({open:i,onClose:s,onBound:l,bound:m,onAuthFail:S,inset:D=0}){const[b,a]=M.useState([]),[d,f]=M.useState("new"),[w,h]=M.useState(null),[_,N]=M.useState(""),[C,y]=M.useState(""),[c,p]=M.useState(!1),[v,g]=M.useState(null),[E,R]=M.useState(aE()),[j,A]=M.useState(!1),k=M.useRef(null);if(M.useEffect(()=>{i&&(N(""),y(""),p(!1),g(null),A(!1),f("new"),h("new"),Jo().then(V=>{const B=Array.isArray(V)?V:[];a(B),B.some(q=>!m.includes(q.name))&&(f("existing"),h(null))}).catch(V=>{V instanceof $i?S==null||S():y(U("bind.checkFailed"))}))},[i]),M.useEffect(()=>{w==="new"&&setTimeout(()=>{var V;return(V=k.current)==null?void 0:V.focus()},0)},[w]),!i)return null;const L=b.filter(V=>!m.includes(V.name)),O=async()=>{if(c||!w)return;if(w!=="new"){l(w);return}const V=_.trim();if(V){if(m.includes(V)||b.some(B=>B.name===V)){y(U("bind.alreadyExists"));return}if(!vP.test(V)){y(U("bind.invalidName"));return}p(!0),y(""),oE(E);try{await NU(V,v||void 0,E||void 0),l(V)}catch(B){B instanceof $i?S==null||S():y(U("bind.createFailed")),p(!1)}}},H=U(w==="new"?c?"bind.creating":"bind.createAndOpen":c?"bind.checking":"bind.bind");return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:79,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${D/2}px))`},role:"dialog","aria-label":U("bind.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("bind.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:89,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:90,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:88,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:o.jsxDEV("div",{className:"bind-mode",role:"tablist","aria-label":U("bind.pickSession"),children:[o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":d==="new",onClick:()=>{f("new"),h("new"),y("")},children:U("bind.modeNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:97,columnNumber:15},this),o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":d==="existing",disabled:!L.length,onClick:()=>{f("existing"),h(null),y("")},children:U("bind.modeExisting")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:103,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:96,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:93,columnNumber:11},this),d==="existing"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("bind.pickSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:113,columnNumber:15},this),o.jsxDEV("div",{className:"orphan-targets",children:L.map(V=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":w===V.name,onClick:()=>{h(V.name),y("")},children:V.name},V.id||V.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:116,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:114,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:112,columnNumber:13},this),d==="new"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("bind.sessionName")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:131,columnNumber:17},this),o.jsxDEV("input",{ref:k,className:"bind-input",value:_,placeholder:U("bind.invalidName"),onChange:V=>{N(V.target.value),y("")},onKeyDown:V=>{V.key==="Enter"&&O()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:132,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:130,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("bind.startDir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:142,columnNumber:17},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>A(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:v||U("bind.homeDirDefault")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:144,columnNumber:19},this),o.jsxDEV("span",{className:"cwd-action",children:U("bind.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:145,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:143,columnNumber:17},this),v&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>g(null),children:U("bind.reset")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:147,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:141,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(SC,{value:E,onChange:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:150,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:149,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:129,columnNumber:13},this),C&&o.jsxDEV("div",{className:"bind-error",children:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:154,columnNumber:21},this),o.jsxDEV("div",{className:"settings-hint",children:U("bind.desktopHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:157,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:s,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:159,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:O,disabled:c||!w,children:H},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:158,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:83,columnNumber:7},this),o.jsxDEV(Rd,{open:j,seedCwd:v,allowMkdir:!0,onPick:V=>{g(V),A(!1)},onClose:()=>A(!1),inset:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:166,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:78,columnNumber:5},this)}const bP=/^[A-Za-z0-9-]{1,16}$/;function _P({open:i,onClose:s,onCreate:l,paneId:m,inset:S=0}){const[D,b]=M.useState(""),[a,d]=M.useState(""),[f,w]=M.useState(!1),[h,_]=M.useState(null),[N,C]=M.useState(""),[y,c]=M.useState(aE()),[p,v]=M.useState(!1),g=M.useRef(null);if(M.useEffect(()=>{i&&(b(""),d(""),w(!1),_(null),C(""),v(!1),setTimeout(()=>{var R;return(R=g.current)==null?void 0:R.focus()},0),m&&rl(m).then(({cwd:R})=>C(R||"")).catch(()=>{}))},[i,m]),!i)return null;const E=async()=>{if(f)return;const R=D.trim();if(R&&!bP.test(R)){d(U("newwindow.name_rule"));return}w(!0),d(""),oE(y);try{await l(R,h||void 0,y||void 0)}catch{w(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:49,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${S/2}px))`},role:"dialog","aria-label":U("newwindow.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("newwindow.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:56,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:55,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("newwindow.window_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:61,columnNumber:13},this),o.jsxDEV("input",{ref:g,className:"bind-input",value:D,placeholder:U("newwindow.name_placeholder"),onChange:R=>{b(R.target.value),d("")},onKeyDown:R=>{R.key==="Enter"&&E()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:62,columnNumber:13},this),a&&o.jsxDEV("div",{className:"bind-error",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:70,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:60,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("newwindow.start_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:73,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>v(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:h||(N?U("newwindow.session_dir_named",{dir:N}):U("newwindow.session_dir_default"))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:75,columnNumber:15},this),o.jsxDEV("span",{className:"cwd-action",children:U("newwindow.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:76,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:74,columnNumber:13},this),h&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>_(null),children:U("newwindow.reset_to_session_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:78,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:72,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(SC,{value:y,onChange:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:81,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:80,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:s,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:84,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:E,disabled:f,children:U(f?"newwindow.creating":"common.create")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:85,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:83,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:59,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:50,columnNumber:7},this),o.jsxDEV(Rd,{open:p,seedCwd:h||N||null,pane:m,allowMkdir:!0,onPick:R=>{_(R),v(!1)},onClose:()=>v(!1),inset:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:91,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:48,columnNumber:5},this)}const yP=/^[A-Za-z0-9-]{1,16}$/;function wP({open:i,title:s,currentName:l="",onClose:m,onSubmit:S,inset:D=0}){const[b,a]=M.useState(l),[d,f]=M.useState(""),[w,h]=M.useState(!1),_=M.useRef(null);if(M.useEffect(()=>{i&&(a(l),f(""),h(!1),setTimeout(()=>{var C;return(C=_.current)==null?void 0:C.focus()},0))},[i,l]),!i)return null;const N=async()=>{if(w)return;const C=b.trim();if(!yP.test(C)){f(U("rename.name_rule"));return}h(!0),f("");try{await S(C)}catch(y){f((y==null?void 0:y.message)||U("rename.failed")),h(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:36,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${D/2}px))`},role:"dialog","aria-label":s,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:43,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:m,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:42,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("rename.new_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:47,columnNumber:11},this),o.jsxDEV("input",{ref:_,className:"bind-input",value:b,placeholder:U("rename.name_rule"),onChange:C=>{a(C.target.value),f("")},onKeyDown:C=>{C.key==="Enter"&&N()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:48,columnNumber:11},this),d&&o.jsxDEV("div",{className:"bind-error",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:56,columnNumber:21},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:m,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:58,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:N,disabled:w,children:U(w?"rename.saving":"common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:59,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:46,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:37,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:35,columnNumber:5},this)}function xP({onOpenDoc:i,refreshKey:s=0}){const[l,m]=M.useState(()=>fd()),S=b=>{XM(b),m(fd())},D=M.useRef(!0);return M.useEffect(()=>{if(D.current){D.current=!1;return}m(fd())},[s]),l.length===0?o.jsxDEV("div",{className:"home-view",children:o.jsxDEV("div",{className:"home-empty",children:[U("home.empty"),o.jsxDEV("span",{children:U("home.emptyHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:54},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:22,columnNumber:7},this):o.jsxDEV("div",{className:"home-view",children:l.map(b=>o.jsxDEV("div",{className:"home-recent-row",children:[o.jsxDEV("button",{className:"home-recent",onClick:()=>i(b.path),title:b.path,children:[o.jsxDEV("span",{className:"home-name",children:b.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:32,columnNumber:13},this),o.jsxDEV("span",{className:"home-path",children:b.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:33,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:31,columnNumber:11},this),o.jsxDEV("button",{className:"home-x","aria-label":U("home.remove"),onClick:()=>S(b.path),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:35,columnNumber:11},this)]},b.path,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:30,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:28,columnNumber:5},this)}const NP=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,SP=/[。!?…]$|[.!?]$/;function EP(i,s){for(let l=i.parentNode;l&&l!==s;l=l.parentNode){const m=l.nodeName;if(m==="PRE"||m==="SCRIPT"||m==="STYLE"||m==="CODE")return!0}return!1}function CP(i){if(!i)return[];if(i.querySelector("span.tts-sent"))return jP(i);const s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.nodeValue&&a.nodeValue.trim()&&!EP(a,i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),l=[];for(;s.nextNode();)l.push(s.currentNode);const m=[],S=[];let D=0;for(const a of l){const d=a.ownerDocument.createDocumentFragment();for(const f of a.nodeValue.matchAll(NP)){const w=f[0];if(w==="")continue;const h=a.ownerDocument.createElement("span");h.className="tts-sent",h.textContent=w,d.appendChild(h),(S[D]||(S[D]=[])).push(h),m[D]=(m[D]||"")+w,SP.test(w)&&D++}a.parentNode.replaceChild(d,a)}const b=[];return m.forEach((a,d)=>{const f=(a||"").replace(/\s+/g," ").trim();if(!f)return;const w=b.length;b.push(f);for(const h of S[d]||[])h.dataset.tts=String(w)}),b}function jP(i){const s=[];return i.querySelectorAll("span.tts-sent[data-tts]").forEach(l=>{const m=Number(l.dataset.tts);s[m]=(s[m]||"")+l.textContent}),s.map(l=>(l||"").replace(/\s+/g," ").trim())}const EC="tw_doc_rate",df=[1,1.25,1.5],RS=()=>{const i=Number(localStorage.getItem(EC));return df.includes(i)?i:1};function DP(){const i=typeof window<"u"&&window.speechSynthesis||null,[s,l]=M.useState({playing:!1,paused:!1,idx:-1}),[m,S]=M.useState(RS),D=M.useRef({sentences:[],idx:-1,playing:!1,rate:RS()});D.current.rate=m;const b=()=>((i==null?void 0:i.getVoices())||[]).find(N=>/^zh/i.test(N.lang))||null,a=N=>{const C=D.current;if(!i)return;if(N<0||N>=C.sentences.length){d();return}C.idx=N,l({playing:!0,paused:!1,idx:N});const y=new SpeechSynthesisUtterance(C.sentences[N]);y.rate=C.rate;const c=b();c?(y.voice=c,y.lang=c.lang):y.lang="zh-CN";const p=()=>{C.playing&&C.idx===N&&a(N+1)};y.onend=p,y.onerror=p,i.speak(y)},d=()=>{const N=D.current;N.playing=!1,N.idx=-1,i&&i.cancel(),l({playing:!1,paused:!1,idx:-1})},f=N=>{if(!i||!N||!N.length)return;i.cancel();const C=D.current;if(C.sentences=N,C.playing=!0,C.idx=-1,l({playing:!0,paused:!1,idx:-1}),i.getVoices().length){a(0);return}const y=()=>{i.removeEventListener("voiceschanged",y),C.playing&&C.idx===-1&&a(0)};i.addEventListener("voiceschanged",y),setTimeout(y,300)},w=()=>{i&&D.current.playing&&(i.pause(),l(N=>({...N,paused:!0})))},h=()=>{i&&D.current.playing&&(i.resume(),l(N=>({...N,paused:!1})))},_=()=>{const N=df[(df.indexOf(m)+1)%df.length]||1;localStorage.setItem(EC,String(N)),D.current.rate=N,S(N);const C=D.current;i&&C.playing&&C.idx>=0&&(i.cancel(),a(C.idx))};return M.useEffect(()=>()=>{D.current.playing=!1,i&&i.cancel()},[i]),{supported:!!i,playing:s.playing,paused:s.paused,idx:s.idx,rate:m,play:f,pause:w,resume:h,stop:d,cycleRate:_}}const TS=6,kP=500,LS=10,RP=300,AS=(i,s)=>Math.hypot(i.x-s.x,i.y-s.y);function TP({url:i,name:s}){const[l,m]=M.useState({s:1,x:0,y:0}),[S,D]=M.useState(""),[b,a]=M.useState(!1),d=M.useRef(l);d.current=l;const f=M.useRef(null),w=M.useRef(null),h=M.useRef(null),_=M.useRef(new Map),N=M.useRef(null),C=M.useRef(null),y=M.useRef(null),c=M.useRef({moved:!1,lpFired:!1,pinched:!1}),p=M.useRef(0);if(!i)return o.jsxDEV("div",{className:"doc-image-msg",children:U("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:39,columnNumber:20},this);const v=(V,B,q)=>{const ne=w.current,Y=h.current;if(!ne||!Y)return{x:B,y:q};const J=Math.max(0,(Y.offsetWidth*V-ne.clientWidth)/2),ee=Math.max(0,(Y.offsetHeight*V-ne.clientHeight)/2);return{x:Math.min(J,Math.max(-J,B)),y:Math.min(ee,Math.max(-ee,q))}},g=(V,B,q)=>{if(V=Math.min(TS,Math.max(1,V)),V<=1){m({s:1,x:0,y:0});return}const ne=v(V,B,q);m({s:V,x:ne.x,y:ne.y})},E=V=>g(d.current.s*V,d.current.x,d.current.y),R=()=>{y.current&&(clearTimeout(y.current),y.current=null)},j=V=>{D(V),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>D(""),2500)},A=()=>{a(!1);const V=document.createElement("a");V.href=i,V.download=s||"image",document.body.appendChild(V),V.click(),V.remove(),j(U("imageviewer.saved"))},k=async()=>{var V;a(!1);try{const B=await(await fetch(i)).blob(),q=new File([B],s||"image",{type:Lf(s)||B.type||"application/octet-stream"});if((V=navigator.canShare)!=null&&V.call(navigator,{files:[q]})){await navigator.share({files:[q]});return}}catch{return}j(U("imageviewer.shareUnsupported"))},L=V=>{var q,ne;(ne=(q=V.currentTarget).setPointerCapture)==null||ne.call(q,V.pointerId),_.current.set(V.pointerId,{x:V.clientX,y:V.clientY});const B=_.current.size;if(B===2){R(),c.current.pinched=!0;const[Y,J]=[..._.current.values()];N.current={dist:AS(Y,J)||1,s:d.current.s}}else B===1&&(c.current.moved=!1,c.current.lpFired=!1,c.current.pinched=!1,C.current={x:V.clientX,y:V.clientY},R(),y.current=setTimeout(()=>{y.current=null,_.current.size===1&&!c.current.moved&&(c.current.lpFired=!0,a(!0))},kP))},O=V=>{if(_.current.has(V.pointerId)){if(_.current.set(V.pointerId,{x:V.clientX,y:V.clientY}),_.current.size>=2&&N.current){const[B,q]=[..._.current.values()];g(N.current.s*(AS(B,q)/N.current.dist),d.current.x,d.current.y);return}if(C.current){const B=V.clientX-C.current.x,q=V.clientY-C.current.y;(Math.abs(B)>LS||Math.abs(q)>LS)&&(c.current.moved=!0,R()),d.current.s>1&&(C.current={x:V.clientX,y:V.clientY},g(d.current.s,d.current.x+B,d.current.y+q))}}},H=V=>{if(R(),_.current.delete(V.pointerId),_.current.size===1){N.current=null;const[B]=[..._.current.values()];C.current={x:B.x,y:B.y}}else if(_.current.size===0){if(!c.current.moved&&!c.current.lpFired&&!c.current.pinched){const q=V.timeStamp||0;q-p.current<RP?(p.current=0,d.current.s>1?g(1,0,0):g(2,0,0)):p.current=q}N.current=null,C.current=null,c.current={moved:!1,lpFired:!1,pinched:!1}}};return o.jsxDEV("div",{ref:w,className:"doc-image-wrap",onPointerDown:L,onPointerMove:O,onPointerUp:H,onPointerCancel:H,onContextMenu:V=>V.preventDefault(),children:[o.jsxDEV("img",{ref:h,className:"doc-image",src:i,alt:s,draggable:!1,style:{transform:`translate(${l.x}px, ${l.y}px) scale(${l.s})`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:159,columnNumber:7},this),o.jsxDEV("div",{className:"doc-image-zoom",onPointerDown:V=>V.stopPropagation(),children:[o.jsxDEV("button",{onClick:()=>E(1/1.5),disabled:l.s<=1,"aria-label":U("imageviewer.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:168,columnNumber:9},this),o.jsxDEV("span",{className:"doc-image-zoom-val","aria-hidden":"true",children:[Math.round(l.s*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:169,columnNumber:9},this),o.jsxDEV("button",{onClick:()=>E(1.5),disabled:l.s>=TS,"aria-label":U("imageviewer.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:170,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:167,columnNumber:7},this),S&&o.jsxDEV("div",{className:"doc-image-note",role:"status",children:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:16},this),o.jsxDEV(jf,{open:b,title:s||U("imageviewer.imageTitle"),actions:[{key:"save",label:U("imageviewer.saveImage"),onClick:A},{key:"share",label:U("imageviewer.shareImage"),onClick:k}],onClose:()=>a(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:173,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:150,columnNumber:5},this)}const t_=Pa.length-1;function LP({type:i,name:s,content:l}){const[m,S]=M.useState(()=>QM()),D=M.useRef(null),b=DP();Of(b.playing&&!b.paused);const a=M.useMemo(()=>i==="markdown"?vC.sanitize(ti.parse(l||"")):"",[i,l]);if(M.useEffect(()=>{b.stop()},[a]),M.useEffect(()=>{var N;const h=D.current;if(!h||(h.querySelectorAll(".tts-active").forEach(C=>C.classList.remove("tts-active")),b.idx<0))return;const _=h.querySelectorAll(`.tts-sent[data-tts="${b.idx}"]`);_.forEach(C=>C.classList.add("tts-active")),(N=_[0])==null||N.scrollIntoView({block:"center",behavior:"smooth"})},[b.idx]),i==="image")return o.jsxDEV(TP,{url:l,name:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:50,columnNumber:12},this);if(i==="html")return o.jsxDEV("iframe",{className:"doc-iframe",sandbox:"allow-scripts",srcDoc:l||"",title:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:54,columnNumber:12},this);const d=h=>{const _=Math.min(t_,Math.max(0,m+h));S(_),eU(_)};if(i==="text")return o.jsxDEV("div",{className:"doc-md-wrap",children:[o.jsxDEV("div",{className:"doc-zoom",children:o.jsxDEV("div",{className:"doc-fonts",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(-1),disabled:m<=0,"aria-label":U("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:65,columnNumber:13},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(1),disabled:m>=t_,"aria-label":U("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:66,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:64,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:63,columnNumber:9},this),o.jsxDEV("pre",{className:"doc-text",style:{fontSize:`${Pa[m]}px`},children:l||""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:62,columnNumber:7},this);const f=()=>{if(b.playing){b.paused?b.resume():b.pause();return}const h=CP(D.current);h.length&&b.play(h)},w=b.playing&&!b.paused;return o.jsxDEV("div",{className:"doc-md-wrap",children:[o.jsxDEV("div",{className:"doc-zoom",children:[b.supported&&o.jsxDEV("div",{className:"doc-tts",children:[o.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:f,"aria-label":w?U("doc.pauseRead"):b.paused?U("doc.resumeRead"):U("doc.read"),children:w?o.jsxDEV(r3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):o.jsxDEV(i3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:86,columnNumber:13},this),o.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:b.stop,disabled:!b.playing,"aria-label":U("doc.stopRead"),children:o.jsxDEV(xE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:91,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:90,columnNumber:13},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:b.cycleRate,"aria-label":U("doc.rate"),children:[b.rate,"×"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:93,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:85,columnNumber:11},this),o.jsxDEV("div",{className:"doc-fonts",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(-1),disabled:m<=0,"aria-label":U("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:97,columnNumber:11},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(1),disabled:m>=t_,"aria-label":U("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:96,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:83,columnNumber:7},this),o.jsxDEV("div",{ref:D,className:"doc-md",style:{fontSize:`${Pa[m]}px`},dangerouslySetInnerHTML:{__html:a}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:101,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:82,columnNumber:5},this)}function AP({open:i,pane:s,windowId:l,tabs:m,active:S,onActivate:D,onCloseTab:b,onMinimize:a,onOpenDoc:d,pendingShare:f,onPendingConsumed:w}){const h=m.find(Y=>Y.key===S)||m[0],[_,N]=M.useState("recent"),[C,y]=M.useState(null),[c,p]=M.useState(0),v=h.type==="home",g=M.useRef(null),E=M.useRef(C);E.current=C;const R=M.useRef(S);R.current=S;const j=M.useRef(l);j.current=l;const A=M.useRef(a);A.current=a;const k=M.useRef(D);k.current=D;const L=M.useRef(S),O=M.useRef(0),H=M.useRef([]),V=()=>{window.history.pushState({fileOverlay:!0},""),O.current+=1},B=Y=>{i&&Y!==E.current&&(H.current.push({type:"nav",prev:E.current}),V()),y(Y),l1(l,Y)},q=M.useRef(i);M.useEffect(()=>{const Y=L.current;L.current=S;const J=q.current;q.current=i,i&&J&&Y==="home"&&S!=="home"&&(H.current.push({type:"doc"}),V())},[S,i]),M.useEffect(()=>{if(!i)return;H.current=[],O.current=0,V();const Y=()=>{var ee,P;O.current=Math.max(0,O.current-1);const J=H.current.pop();if((J==null?void 0:J.type)==="doc"){(ee=k.current)==null||ee.call(k,"home");return}if((J==null?void 0:J.type)==="nav"){y(J.prev),J.prev&&l1(j.current,J.prev);return}(P=A.current)==null||P.call(A)};return window.addEventListener("popstate",Y),()=>{window.removeEventListener("popstate",Y),O.current>0&&(window.history.go(-O.current),O.current=0)}},[i]);const ne=async()=>{try{const{cwd:Y}=await rl(s);Y&&y(Y)}catch{}};return M.useEffect(()=>{f&&N("browse")},[f]),M.useEffect(()=>{i&&p(Y=>Y+1)},[i]),M.useEffect(()=>{if(!i){g.current=null;return}if(g.current===l)return;g.current=l,H.current=[],N("browse");let Y=!1;return(async()=>{const J=TM(l);let ee=null;if(J)try{await vE(J),ee=J}catch{}if(!ee&&s)try{const{cwd:P}=await rl(s);ee=P}catch{}!Y&&ee&&y(ee)})(),()=>{Y=!0}},[i,l,s]),ul.createPortal(o.jsxDEV("div",{className:`file-sheet ${i?"open":""}`,"aria-hidden":!i,children:[o.jsxDEV("div",{className:"file-tabs",children:[o.jsxDEV("div",{className:"file-tabs-scroll",children:m.map(Y=>o.jsxDEV("div",{className:`file-tab ${Y.key===S?"active":""}`,children:[o.jsxDEV("button",{className:"file-tab-label",onClick:()=>D(Y.key),children:Y.key==="home"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(yd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:39},this),U("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:37},this):Y.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:15},this),Y.key!=="home"&&o.jsxDEV("button",{className:"file-tab-x","aria-label":U("filemanager.closeTab"),onClick:()=>b(Y.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:149,columnNumber:17},this)]},Y.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:144,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:142,columnNumber:9},this),o.jsxDEV("button",{className:"file-min","aria-label":U("filemanager.minimize"),title:U("filemanager.minimize"),onClick:a,children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:154,columnNumber:134},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:154,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:141,columnNumber:7},this),o.jsxDEV("div",{className:"file-body",children:v?o.jsxDEV("div",{className:"home-pane",children:[o.jsxDEV("div",{className:"file-seg",role:"tablist",children:[o.jsxDEV("button",{className:`file-seg-btn ${_==="recent"?"on":""}`,role:"tab","aria-selected":_==="recent",onClick:()=>N("recent"),children:[o.jsxDEV(_E,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:162,columnNumber:17},this),U("filemanager.recent")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:160,columnNumber:15},this),o.jsxDEV("button",{className:`file-seg-btn ${_==="browse"?"on":""}`,role:"tab","aria-selected":_==="browse",onClick:()=>N("browse"),children:[o.jsxDEV(yd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:166,columnNumber:17},this),U("filemanager.directory")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:164,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:159,columnNumber:13},this),_==="recent"?o.jsxDEV(xP,{onOpenDoc:d,refreshKey:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this):o.jsxDEV(wC,{path:C,onNavigate:B,onOpenDoc:d,onJumpToCwd:s?ne:null,refreshKey:c,pendingFile:f,onPendingConsumed:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:171,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:158,columnNumber:11},this):o.jsxDEV(LP,{type:h.type,name:h.name,content:h.content},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:175,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:156,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:140,columnNumber:5},this),document.body)}function MP(i){if(!i)return[];const s=[];let l=null,m=null;for(const S of i.split(`
|
|
330
|
+
`)){if(S.startsWith("diff --git")){const b=S.match(/ b\/(.*)$/);l={path:b?b[1]:S.slice(11),hunks:[]},s.push(l),m=null;continue}if(!l)continue;if(S.startsWith("@@")){m={header:S,lines:[]},l.hunks.push(m);continue}if(!m)continue;const D=S[0];D==="+"?m.lines.push({type:"add",text:S.slice(1)}):D==="-"?m.lines.push({type:"del",text:S.slice(1)}):D===" "&&m.lines.push({type:"ctx",text:S.slice(1)})}return s}const UP=i=>String(i||"").replace(/\/+$/,"").split("/").pop()||i;function kf(i,s){const l=(i&&i!==" "?i:s)||"?";return l==="?"?"?":l}function OP({open:i,pane:s,windowId:l,inset:m=0,onClose:S}){const D=M.useRef(!0);M.useEffect(()=>()=>{D.current=!1},[]);const[b,a]=M.useState([]),[d,f]=M.useState(null),[w,h]=M.useState([]),_=w.length?w[w.length-1]:null,[N,C]=M.useState(!1),[y,c]=M.useState(null),p=M.useRef(l);M.useEffect(()=>{p.current=l},[l]);const[v,g]=M.useState(null),[E,R]=M.useState(null),[j,A]=M.useState(null),[k,L]=M.useState(null),[O,H]=M.useState(20),[V,B]=M.useState(!1),[q,ne]=M.useState({changes:!0,commits:!0}),[Y,J]=M.useState(!1),ee=M.useRef(null),[P,W]=M.useState(null),[Q,K]=M.useState(null),[he,ce]=M.useState(null),ke=M.useRef(w);ke.current=w;const we=M.useRef(N);we.current=N;const re=M.useRef(S);re.current=S;const G=M.useRef(0),ge=()=>{window.history.pushState({gitOverlay:!0},""),G.current+=1},de=De=>{ge(),h(We=>[...We,De])},pe=()=>{ge(),C(!0)};M.useEffect(()=>{if(!i)return;ge();const De=()=>{var We;if(G.current=Math.max(0,G.current-1),we.current){C(!1);return}if(ke.current.length){h(be=>be.slice(0,-1));return}(We=re.current)==null||We.call(re)};return window.addEventListener("popstate",De),()=>{window.removeEventListener("popstate",De),G.current>0&&(window.history.go(-G.current),G.current=0)}},[i]),M.useEffect(()=>{if(!i)return;let De=!1;h([]),L(null),K(null),ce(null);const We=G_(l);return We.length?(a(We),f(be=>be&&We.includes(be)?be:We[0]),()=>{De=!0}):(a([]),f(null),(async()=>{try{if(!s)return;const{cwd:be}=await rl(s);if(!be)return;const{repos:Pe=[]}=await _1(be);if(De||!Pe.length)return;const He=h1(l,Pe.map(Ot=>Ot.path));if(De)return;a(He),f(He[0]??null)}catch(be){if(De)return;(be==null?void 0:be.message)==="outside home"?ce(U("git.outsideRoots")):K(U("git.errReadRepo"))}})(),()=>{De=!0})},[i,s,l]),M.useEffect(()=>{if(!i||!s)return;let De=!1;return rl(s).then(({cwd:We})=>{!De&&We&&c(We)}).catch(()=>{}),()=>{De=!0}},[i,s]),M.useEffect(()=>{if(!i||!d){g(null),R(null);return}let De=!1;return g(null),R(null),A(null),L(null),H(20),K(null),ce(null),(async()=>{try{const[We,be]=await Promise.all([IU(d),FU(d)]);if(De)return;g(We.changes??[]),R(be.branches??[])}catch{De||K(U("git.errLoad"))}})(),()=>{De=!0}},[i,d]),M.useEffect(()=>{if(!i||!d){A(null);return}let De=!1;return(async()=>{try{const{commits:We=[]}=await BU(d,{ref:k||void 0,limit:O});De||A(We)}catch{De||A([])}finally{De||B(!1)}})(),()=>{De=!0}},[i,d,k,O]);const Ne=!d||!_?"":_.kind==="diff"?`${d}|diff|${_.path}|${_.commit||""}|${_.staged?1:0}`:`${d}|commit|${_.hash}`;M.useEffect(()=>{if(!i||!d||!_){W(null);return}let De=!1;return K(null),W(null),(async()=>{try{let We;if(_.kind==="diff"){const{diff:be,truncated:Pe}=await HU(d,{path:_.path,commit:_.commit,staged:_.staged});We={files:MP(be),truncated:Pe}}else We=await zU(d,_.hash);De||W({key:Ne,payload:We})}catch{De||K(U("git.errLoad"))}})(),()=>{De=!0}},[i,Ne]);const Ie=M.useCallback(()=>{window.history.back()},[]),Ze=De=>{f(De),h([]),L(null)},ut=async De=>{window.history.back(),ce(null);try{const{repos:We=[]}=await _1(De);if(!D.current)return;if(!We.length){ce(U("git.noRepoInDir"));return}const be=We.map(Le=>Le.path),Pe=p.current,He=Pe?h1(Pe,be):be;a(Le=>{const ve=[...Le];for(const xt of He)ve.includes(xt)||ve.push(xt);return ve});const Ot=be.find(Le=>!b.includes(Le))||be[0];Ze(Ot)}catch(We){if(!D.current)return;(We==null?void 0:We.message)==="outside home"?ce(U("git.outsideRoots")):K(U("git.errReadDir"))}},At=De=>{const We=cU(l,De);a(We),d===De&&(f(We[0]??null),h([]),L(null))},Ke=(E||[]).find(De=>De.current)||null,qt=De=>{const We=De===(Ke==null?void 0:Ke.name)?null:De;We!==k&&(L(We),A(null),H(20))},Ut=De=>ne(We=>({...We,[De]:!We[De]})),xe=j!=null&&j.length>=O,Ve=De=>{if(!xe||V)return;const We=De.currentTarget;We.scrollHeight-We.scrollTop-We.clientHeight<80&&(B(!0),H(be=>be+20))},Xe=k||(Ke==null?void 0:Ke.name)||null,Te=!!k&&k!==(Ke==null?void 0:Ke.name),lt=k?(E||[]).find(De=>De.name===k):Ke,dt=P&&P.key===Ne?P.payload:null,$=!!_,at=(_==null?void 0:_.kind)==="commit"?U("git.commitDetail"):(_==null?void 0:_.kind)==="diff"?_.path||U("git.diff"):"";return ul.createPortal(o.jsxDEV("div",{className:`file-sheet git-sheet ${i?"open":""}`,"aria-hidden":!i,style:{"--kb-inset":`${m}px`},children:[o.jsxDEV("div",{className:"file-tabs git-head",children:[$?o.jsxDEV("div",{className:"git-drill-head",children:[o.jsxDEV("button",{className:"git-back","aria-label":U("common.back"),title:U("common.back"),onClick:Ie,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:291,columnNumber:13},this),o.jsxDEV("span",{className:"git-drill-title",children:[o.jsxDEV(NE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:47},this),o.jsxDEV("span",{className:"git-title-text",children:at},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:290,columnNumber:11},this):o.jsxDEV("div",{className:"git-tabs-scroll",children:[o.jsxDEV("button",{className:"git-tab-add","aria-label":U("git.bindRepo"),title:U("git.bindRepo"),onClick:pe,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),b.map(De=>o.jsxDEV("div",{className:`git-tab ${De===d?"active":""}`,children:[o.jsxDEV("button",{className:"git-tab-label",onClick:()=>Ze(De),children:UP(De)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:299,columnNumber:17},this),o.jsxDEV("button",{className:"git-tab-x","aria-label":U("common.close"),title:U("common.close"),onClick:()=>At(De),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},De,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:298,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:295,columnNumber:11},this),o.jsxDEV("button",{className:"file-min","aria-label":U("git.collapse"),title:U("git.collapse"),onClick:()=>S==null?void 0:S(),children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:123},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:288,columnNumber:7},this),!$&&d&&o.jsxDEV("div",{className:"git-branch-bar",children:[o.jsxDEV("span",{className:"git-branch-bar-name",children:[o.jsxDEV("span",{className:"git-branch-glyph",children:"⎇"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:316,columnNumber:13},this)," ",Xe||"—",!Te&&Xe&&o.jsxDEV("span",{className:"git-branch-cur-tag",children:U("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),lt&&(lt.ahead||lt.behind)?o.jsxDEV("span",{className:"git-branch-bar-track",children:[lt.ahead?o.jsxDEV("span",{className:"git-ahead",children:["↑",lt.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,lt.behind?o.jsxDEV("span",{className:"git-behind",children:["↓",lt.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:321,columnNumber:43},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:319,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:315,columnNumber:11},this),o.jsxDEV("div",{className:"git-branch-dd",children:[o.jsxDEV("button",{className:`git-branch-trigger ${Te?"other":""}`,onClick:()=>J(De=>!De),"aria-haspopup":"listbox","aria-expanded":Y,title:U("git.switchViewedBranch"),children:[o.jsxDEV("span",{className:"git-branch-trigger-name",children:U("git.switchBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:328,columnNumber:15},this),o.jsxDEV("span",{className:"git-branch-caret",children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:50},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:326,columnNumber:13},this),Y&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>J(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:333,columnNumber:17},this),o.jsxDEV("div",{className:"git-dd-menu",role:"listbox",children:[(E||[]).length===0&&o.jsxDEV("div",{className:"git-empty",children:U("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(E||[]).map(De=>{const We=k?De.name===k:De.current;return o.jsxDEV("button",{role:"option","aria-selected":We,className:`git-dd-item ${De.current?"current":""} ${We?"viewing":""}`,onClick:()=>{qt(De.name),J(!1)},children:[o.jsxDEV("span",{className:"git-branch-dot",children:De.current?"●":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:342,columnNumber:25},this),o.jsxDEV("span",{className:"git-row-path",children:De.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),De.upstream&&o.jsxDEV("span",{className:"git-branch-up",children:[De.upstream,De.ahead?o.jsxDEV("span",{className:"git-ahead",children:[" ↑",De.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,De.behind?o.jsxDEV("span",{className:"git-behind",children:[" ↓",De.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:347,columnNumber:41},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:345,columnNumber:27},this)]},De.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:339,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:334,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:332,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:325,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:312,columnNumber:9},this),o.jsxDEV("div",{className:"git-body",children:[Q&&o.jsxDEV("div",{className:"git-error",children:Q},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),he&&!Q&&!$&&o.jsxDEV("div",{className:"git-notice",children:he},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!d&&!Q&&!he&&o.jsxDEV("div",{className:"git-empty",children:U("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),$&&d&&!Q&&o.jsxDEV("div",{className:"git-scroll",children:dt?_.kind==="diff"?o.jsxDEV(BP,{data:dt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):o.jsxDEV(IP,{data:dt,onOpenFile:De=>de({kind:"diff",path:De,commit:_.hash})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:371,columnNumber:17},this):o.jsxDEV("div",{className:"git-loading",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:369,columnNumber:23},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:368,columnNumber:11},this),!$&&d&&!Q&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV(MS,{variant:"top",title:U("git.changes"),count:v==null?void 0:v.length,expanded:q.changes,onToggle:()=>Ut("changes"),children:v==null?o.jsxDEV("div",{className:"git-loading",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):o.jsxDEV(VP,{data:{changes:v},onOpenFile:(De,We)=>de({kind:"diff",path:De,staged:We})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:381,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:379,columnNumber:13},this),o.jsxDEV(MS,{variant:"mid",title:U("git.commits"),subtitle:Te?Xe:null,expanded:q.commits,onToggle:()=>Ut("commits"),bodyRef:ee,onScroll:Ve,children:j==null?o.jsxDEV("div",{className:"git-loading",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:385,columnNumber:34},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV(PP,{data:{commits:j},onOpen:De=>de({kind:"commit",hash:De})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),xe&&o.jsxDEV("div",{className:"git-more",children:U(V?"common.loading":"git.pullToLoadMore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:389,columnNumber:40},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:387,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:383,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:378,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:360,columnNumber:7},this),o.jsxDEV(Rd,{open:N,seedCwd:y,pane:s,inset:m,hint:U("git.pickerHint"),onPick:ut,onClose:()=>window.history.back()},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:397,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:285,columnNumber:5},this),document.body)}function MS({variant:i,title:s,subtitle:l,count:m,expanded:S,onToggle:D,onScroll:b,bodyRef:a,children:d}){return o.jsxDEV("div",{className:`git-section git-section--${i} ${S?"open":""}`,children:[o.jsxDEV("button",{className:"git-section-head",onClick:D,"aria-expanded":S,children:[o.jsxDEV("span",{className:"git-section-caret",children:o.jsxDEV(Ia,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:9},this),o.jsxDEV("span",{className:"git-section-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:419,columnNumber:9},this),l&&o.jsxDEV("span",{className:"git-section-sub",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),m!=null&&o.jsxDEV("span",{className:"git-section-count",children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:421,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:417,columnNumber:7},this),S&&o.jsxDEV("div",{className:"git-section-body",ref:a,onScroll:b,children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:423,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:416,columnNumber:5},this)}function VP({data:i,onOpenFile:s}){const l=(i==null?void 0:i.changes)??[];return l.length?o.jsxDEV("div",{className:"git-list",children:l.map((m,S)=>{const D=!!(m.x&&m.x!==" "&&m.x!=="?");return o.jsxDEV("button",{className:"git-row",onClick:()=>s(m.path,D),children:[o.jsxDEV("span",{className:`git-badge git-badge-${kf(m.x,m.y).toLowerCase().replace("?","q")}`,children:kf(m.x,m.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:437,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:m.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${m.path}-${S}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:436,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:432,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:U("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function PP({data:i,onOpen:s}){const l=(i==null?void 0:i.commits)??[];return l.length?o.jsxDEV("div",{className:"git-list",children:l.map(m=>o.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>s(m.hash),children:[o.jsxDEV("span",{className:"git-hash",children:m.short},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:453,columnNumber:11},this),o.jsxDEV("span",{className:"git-commit-main",children:[o.jsxDEV("span",{className:"git-row-path",children:m.subject},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:455,columnNumber:13},this),o.jsxDEV("span",{className:"git-commit-meta",children:[m.author," · ",m.relDate]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:456,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:454,columnNumber:11},this)]},m.hash,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:452,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:450,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:U("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function IP({data:i,onOpenFile:s}){if(!i)return null;const l=i.files??[];return o.jsxDEV("div",{className:"git-commit-detail",children:[i.message&&o.jsxDEV("pre",{className:"git-commit-msg",children:i.message},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:469,columnNumber:24},this),o.jsxDEV("div",{className:"git-list",children:l.map((m,S)=>o.jsxDEV("button",{className:"git-row",onClick:()=>s(m.path),children:[o.jsxDEV("span",{className:`git-badge git-badge-${kf(m.x,m.y).toLowerCase().replace("?","q")}`,children:kf(m.x,m.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:473,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:m.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${m.path}-${S}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:472,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:470,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:468,columnNumber:5},this)}const US=Pa.length-1;function BP({data:i}){const[s,l]=M.useState(()=>nU()),m=D=>{const b=Math.min(US,Math.max(0,s+D));l(b),iU(b)};if(!i)return null;const S=i.files??[];return S.length?o.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${Pa[s]}px`},children:[o.jsxDEV("div",{className:"git-diff-zoom",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>m(-1),disabled:s<=0,"aria-label":U("git.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:493,columnNumber:9},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>m(1),disabled:s>=US,"aria-label":U("git.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:494,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:492,columnNumber:7},this),i.truncated&&o.jsxDEV("div",{className:"git-diff-trunc",children:U("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),S.map((D,b)=>o.jsxDEV("div",{className:"git-diff-file",children:[S.length>1&&o.jsxDEV("div",{className:"git-diff-fname",children:D.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:499,columnNumber:32},this),o.jsxDEV("div",{className:"git-diff",children:D.hunks.map((a,d)=>o.jsxDEV("div",{className:"git-diff-hunk-block",children:[o.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:a.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),a.lines.map((f,w)=>o.jsxDEV("div",{className:`git-diff-line git-diff-${f.type}`,children:[f.type==="add"?"+":f.type==="del"?"-":" ",f.text]},w,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},d,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:502,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:500,columnNumber:11},this)]},`${D.path}-${b}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:498,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:491,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:U("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function FP(){const i=zO();if(!i.active)return null;const s=i.phase==="sending",l=Math.round((i.pct||0)*100);return ul.createPortal(o.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":U("upload.title"),children:o.jsxDEV("div",{className:"upload-card",children:[i.label&&o.jsxDEV("div",{className:"upload-card-label",children:i.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:23},this),s?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-bar",children:o.jsxDEV("div",{className:"upload-bar-fill",style:{width:`${l}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:[l,"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:22,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:20,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-spinner","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:26,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:U("upload.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:27,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:25,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:BO,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:30,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:17,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:16,columnNumber:5},this),document.body)}const af=8,OS=12;function VS({path:i,x:s,y:l,onOpen:m,onClose:S,icon:D,name:b,openLabel:a,note:d,disabled:f=!1}){const w=b??(i.split("/").filter(Boolean).pop()||i),h=M.useRef(null),[_,N]=M.useState(null);return M.useLayoutEffect(()=>{const C=h.current;if(!C)return;const y=C.offsetWidth,c=C.offsetHeight,p=window.innerWidth,v=window.innerHeight,g=Math.min(Math.max(s-y/2,af),p-y-af);let E=l+OS;E+c>v-af&&(E=Math.max(af,l-OS-c)),N({left:g,top:E})},[s,l,i]),o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"doclink-backdrop",onClick:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{ref:h,className:"doclink-pop",style:_?{left:_.left,top:_.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":U("doclink.title"),children:[o.jsxDEV("div",{className:"doclink-name",children:[D??o.jsxDEV(yd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:48},this),w]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:9},this),o.jsxDEV("div",{className:"doclink-path",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:45,columnNumber:9},this),d&&o.jsxDEV("div",{className:"doclink-note",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:46,columnNumber:18},this),o.jsxDEV("div",{className:"doclink-actions",children:[o.jsxDEV("button",{className:"doclink-cancel",onClick:S,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:48,columnNumber:11},this),!f&&o.jsxDEV("button",{className:"doclink-open",onClick:()=>m(i),children:a??U("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:49,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:36,columnNumber:5},this)}const HP=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function zP(i){const s=(i??"").trim();return s?{id:HP(),text:s}:null}function $P(i,s,l){const m=[...i];if(s<0||s>=m.length||l<0||l>=m.length||s===l)return m;const[S]=m.splice(s,1);return m.splice(l,0,S),m}function WP({open:i,session:s,window:l,onClose:m,onSend:S,onCountChange:D,micAvailable:b=!1}){const[a,d]=M.useState([]),[f,w]=M.useState(""),[h,_]=M.useState(null),[N,C]=M.useState(null),y=M.useRef(null),c=M.useRef({head:"",tail:""}),p=M.useRef(null),v=M.useRef(!1),g=M.useRef({active:!1}),E=P=>{d1(s,l,P),d(P),D==null||D(P.length)},R=P=>{P&&(P.style.height="auto",P.style.height=`${P.scrollHeight+2}px`)};M.useEffect(()=>{if(!i)return;const P=fE(s,l);d(P),D==null||D(P.length),w(""),_(null)},[i,s,l]);const A=ry({onText:P=>{if(v.current){v.current=!1;return}const{head:W,tail:Q}=c.current;w(W+P+Q),p.current=W.length+P.length}}),k=A.state==="recording"||A.state==="finalizing";Of(k),M.useEffect(()=>{if(A.state!=="recording"&&A.state!=="finalizing"||v.current)return;const{head:P,tail:W}=c.current;w(P+A.partial+W),p.current=P.length+A.partial.length},[A.partial,A.state]),M.useLayoutEffect(()=>{const P=y.current;if(!P||(R(P),p.current==null))return;const W=p.current;if(p.current=null,document.activeElement===P)try{P.setSelectionRange(W,W)}catch{}},[f]);const L=()=>{if(k){A.stop();return}const P=y.current,W=P?P.selectionStart:f.length;c.current={head:f.slice(0,W),tail:f.slice(W)},A.start()},O=()=>{k&&(v.current=!0,A.stop())},H=()=>{O();const P=f.trim();if(P){if(h)E(a.map(W=>W.id===h?{...W,text:P}:W));else{const W=zP(P);W&&E([...a,W])}w(""),_(null)}},V=P=>{_(P.id),w(P.text),requestAnimationFrame(()=>{var W;return(W=y.current)==null?void 0:W.focus()})},B=()=>{_(null),w("")},q=P=>{E(a.filter(W=>W.id!==P)),P===h&&B()},ne=(P,W)=>{var Q,K;P.cancelable&&P.preventDefault(),(K=(Q=P.currentTarget).setPointerCapture)==null||K.call(Q,P.pointerId),g.current={active:!0,pointerId:P.pointerId,id:W},C(W)},Y=P=>{var ce;const W=g.current;if(!W.active||P.pointerId!==W.pointerId)return;const Q=(ce=P.currentTarget.closest(".idea-list"))==null?void 0:ce.querySelectorAll("[data-idea]");if(!Q||!Q.length)return;const K=P.clientY;let he=Q.length-1;for(let ke=0;ke<Q.length;ke++){const we=Q[ke].getBoundingClientRect();if(K<we.top+we.height/2){he=ke;break}}d(ke=>{const we=ke.findIndex(re=>re.id===W.id);return we<0||we===he?ke:$P(ke,we,he)})},J=P=>{const W=g.current;!W.active||P.pointerId!==W.pointerId||(g.current={active:!1},C(null),d(Q=>(d1(s,l,Q),Q)))};if(!i)return null;const ee=h!=null;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:147,columnNumber:7},this),o.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":U("idea.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:[U("idea.title"),l?` · ${l}`:"",a.length>0&&o.jsxDEV("span",{className:"idea-head-count",children:a.length},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:100},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:m,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:151,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:9},this),o.jsxDEV("div",{className:`idea-compose${k?" recording":""}`,children:[o.jsxDEV("textarea",{ref:y,className:"idea-input",rows:1,placeholder:U(ee?"idea.editPlaceholder":"idea.addPlaceholder"),value:f,readOnly:k,onChange:P=>w(P.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:155,columnNumber:11},this),ee&&o.jsxDEV("button",{className:"idea-cancel",onClick:B,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:164,columnNumber:23},this),b&&o.jsxDEV(ey,{active:k,disabled:A.state==="requesting",onToggle:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:165,columnNumber:28},this),o.jsxDEV("button",{className:"idea-act",onClick:H,disabled:!f.trim(),"aria-label":U(ee?"common.save":"idea.add"),children:ee?o.jsxDEV(K_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:24},this):o.jsxDEV(Y_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:154,columnNumber:9},this),o.jsxDEV("div",{className:"idea-list",children:a.length===0?o.jsxDEV("div",{className:"cmd-empty",children:U("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:173,columnNumber:13},this):a.map(P=>o.jsxDEV("div",{"data-idea":P.id,className:`idea-row${P.id===N?" dragging":""}${P.id===h?" editing":""}`,children:[o.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":U("idea.dragSort"),onPointerDown:W=>ne(W,P.id),onPointerMove:Y,onPointerUp:J,onPointerCancel:J,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:180,columnNumber:15},this),o.jsxDEV("span",{className:"idea-text",onClick:()=>V(P),children:P.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:189,columnNumber:15},this),o.jsxDEV("button",{className:"idea-send",onClick:()=>S==null?void 0:S(P.text),"aria-label":U("idea.fillInput"),children:U("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:190,columnNumber:15},this),o.jsxDEV("button",{className:"idea-del",onClick:()=>q(P.id),"aria-label":U("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this)]},P.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:171,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:148,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:146,columnNumber:5},this)}function GP({open:i,onClose:s}){return i?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this),o.jsxDEV("div",{className:"changelog-panel",role:"dialog","aria-label":U("changelog.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:U("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:15,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:9},this),o.jsxDEV("div",{className:"changelog-list",children:l_.map(l=>{var D,b;const m=l.items[vo()]||l.items.en||l.items.zh||[],S=l.version?`v${l.version}`:((D=l.label)==null?void 0:D[vo()])||((b=l.label)==null?void 0:b.en);return o.jsxDEV("div",{className:"rel",children:[o.jsxDEV("div",{className:"rel-date",children:[S&&o.jsxDEV("span",{className:"rel-ver",children:S},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:29},this),o.jsxDEV("span",{className:"rel-day",children:l.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:28,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:17},this),o.jsxDEV("ul",{className:"rel-items",children:m.map((a,d)=>o.jsxDEV("li",{children:a},d,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:31,columnNumber:41},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:30,columnNumber:17},this)]},l.version||l.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:25,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:17,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:5},this):null}const CC="tw_asr";function qP(){try{const i=localStorage.getItem(CC);return i==null?null:i==="1"}catch{return null}}function YP(i=null){const[s,l]=M.useState(qP);return M.useEffect(()=>{if(!i)return;const m=!!i.asr;l(m);try{localStorage.setItem(CC,m?"1":"0")}catch{}},[i]),s}function KP(i){let s=!1,l=!1;for(let m=i;m&&m!==document.body&&m!==document.documentElement;m=m.parentElement){const S=getComputedStyle(m);if(!l&&(S.overflowY==="auto"||S.overflowY==="scroll")&&m.scrollHeight>m.clientHeight&&(l=!0),!s&&(S.overflowX==="auto"||S.overflowX==="scroll")&&m.scrollWidth>m.clientWidth&&(s=!0),s&&l)break}return{x:s,y:l}}function XP(){M.useEffect(()=>{let i="block",s=0,l=0;const m=D=>{const b=D.touches[0];if(s=b?b.clientX:0,l=b?b.clientY:0,!(D.target instanceof Element)){i="block";return}const{x:a,y:d}=KP(D.target);i=d?"free":a?"xonly":"block"},S=D=>{if(!(i==="free"||!D.cancelable)){if(i==="xonly"){const b=D.touches[0];if(b&&Math.abs(b.clientX-s)>=Math.abs(b.clientY-l))return}D.preventDefault()}};return document.addEventListener("touchstart",m,{passive:!0,capture:!0}),document.addEventListener("touchmove",S,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",m,{capture:!0}),document.removeEventListener("touchmove",S,{capture:!0})}},[])}function JP(i,s,l=2e3){const m=M.useRef(s);m.current=s,M.useEffect(()=>{if(!i)return;let S=!1,D=null,b=!1;const a=()=>{var h;(h=window.history.state)!=null&&h.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},d=()=>{var h;b||(h=window.history.state)!=null&&h.exitGuard||(window.history.pushState({exitGuard:!0},""),b=!0)},f=()=>{var h;D&&(clearTimeout(D),D=null),S&&(S=!1,(h=m.current)==null||h.call(m,!1))};a(),d();const w=()=>{var h,_,N;if((h=window.history.state)!=null&&h.exitGuard){b=!0,f();return}(_=window.history.state)!=null&&_.exitRoot&&(b=!1,!S&&(S=!0,(N=m.current)==null||N.call(m,!0),D=setTimeout(()=>{var C;S=!1,D=null,(C=m.current)==null||C.call(m,!1),d()},l)))};return window.addEventListener("popstate",w),()=>{var h,_;window.removeEventListener("popstate",w),D&&clearTimeout(D),S&&((h=m.current)==null||h.call(m,!1)),b&&((_=window.history.state)!=null&&_.exitGuard)&&window.history.back()}},[i,l])}function PS(i){history.replaceState(history.state,"",`#${encodeURIComponent(i)}`)}const ld=i=>{try{return decodeURIComponent(i)}catch{return i}};function n_(){const i=location.hash.replace(/^#/,""),s=i.match(/^\/inbox(?:\/(.*))?$/);if(s)return{session:null,window:null,pane:null,inbox:!0,inboxId:s[1]?ld(s[1]):null};const l=i.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return l?{session:ld(l[1]),window:ld(l[2]),pane:ld(l[3]),inbox:!1,inboxId:null}:{session:ld(i)||null,window:null,pane:null,inbox:!1,inboxId:null}}const ZP="tmw-share-v1",QP="/__share__/";function eI(i=typeof location<"u"?location.search:""){try{return new URLSearchParams(i).has("share")}catch{return!1}}function tI(){if(typeof location>"u"||typeof history>"u")return;const i=new URL(location.href);i.searchParams.delete("share"),history.replaceState(history.state,"",i.pathname+i.search+i.hash)}async function nI(){if(typeof caches>"u")return null;let i;try{i=await caches.open(ZP)}catch{return null}const s=await i.keys();if(!s.length)return null;const l=s[s.length-1],m=await i.match(l);if(await i.delete(l),!m)return null;const S=await m.blob();let D="shared";try{D=decodeURIComponent(new URL(l.url).pathname.slice(QP.length))||"shared"}catch{}return new File([S],D,{type:S.type||m.headers.get("Content-Type")||""})}const IS="①②③④⑤⑥⑦⑧⑨",iI=i=>Number.isFinite(i==null?void 0:i.width)&&Number.isFinite(i==null?void 0:i.height)?`${i.width}×${i.height}`:"",jC=(i,s)=>{const l=iI(s);return l?`${i} · ${l}`:i};function rI(i){return i?jC(i.name||i.id||"",i):""}function sI(i,s){const l=(i||[]).findIndex(D=>D.id===s);if(l<0)return"";const m=i[l],S=l<IS.length?IS[l]:String(l+1);return jC(`${S} ${m.command||m.id}`,m)}const DC="tw_keyboard_mode",kC=new Set(["auto","mobile","desktop"]);function aI({ua:i="",platform:s="",maxTouchPoints:l=0,mobileHint:m=null,finePointer:S=!1,hover:D=!1}={}){const b=/Android|iPhone|iPad|iPod/i.test(i)||s==="MacIntel"&&l>1||m===!0,a=/Mac|Win|Linux/i.test(s)||/Macintosh|Windows NT|X11; Linux/i.test(i);return!b&&a&&S&&D}function oI(i=window){var l,m,S;const s=i.navigator;return aI({ua:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints,mobileHint:((l=s.userAgentData)==null?void 0:l.mobile)??null,finePointer:((m=i.matchMedia)==null?void 0:m.call(i,"(pointer: fine)").matches)===!0,hover:((S=i.matchMedia)==null?void 0:S.call(i,"(hover: hover)").matches)===!0})}function lI(i=window.localStorage){try{const s=i.getItem(DC);return kC.has(s)?s:"auto"}catch{return"auto"}}function cI(i,s=window.localStorage){if(kC.has(i))try{s.setItem(DC,i)}catch{}}function uI(i,s){return i==="desktop"?!0:i==="mobile"?!1:!!s}const dI=i=>[...i].map(s=>s.toString(16).padStart(2,"0")).join(""),of=16384*2;function hI({send:i,onDelivered:s=()=>{},onError:l=()=>{},encoder:m=new TextEncoder}){let S=[],D=[],b=!1,a=!1,d=!1;const f=(_,...N)=>{try{_(...N)}catch{}},w=async()=>{if(!(a||d||D.length===0)){a=!0;try{for(;!d&&D.length;){const _=D.shift();try{await i(_.pane,_.hex)}catch(N){D=D.filter(C=>C.pane!==_.pane),S=S.filter(C=>C.pane!==_.pane),f(l,N,_.pane);continue}f(s,_.pane)}}finally{a=!1}}},h=()=>{b=!1;const _=S;S=[];for(const N of _){let C=N.hex;for(;C;){const y=D.at(-1);if((y==null?void 0:y.pane)===N.pane&&y.hex.length<of){const c=of-y.hex.length;y.hex+=C.slice(0,c),C=C.slice(c)}else D.push({pane:N.pane,hex:C.slice(0,of)}),C=C.slice(of)}}w()};return{enqueue(_,N){d||!_||!N||(S.push({pane:_,hex:dI(m.encode(N))}),b||(b=!0,queueMicrotask(h)))},drop(_){S=S.filter(N=>N.pane!==_),D=D.filter(N=>N.pane!==_)},dispose(){d=!0,S=[],D=[]}}}function mI({enabled:i,currentPane:s,terminalRef:l,onAuthFail:m,send:S=gU}){const D=M.useRef(null),b=M.useRef(s),a=M.useRef(m);return b.current=s,a.current=m,M.useEffect(()=>{if(!i)return;let d=!1;const f=hI({send:S,onDelivered:w=>{var h,_;!d&&w===b.current&&((_=(h=l.current)==null?void 0:h.wake)==null||_.call(h))},onError:(w,h)=>{var _,N,C;d||(w instanceof $i?(_=a.current)==null||_.call(a):h===b.current&&((C=(N=l.current)==null?void 0:N.inputFailed)==null||C.call(N,w)))}});return D.current=f,()=>{d=!0,D.current=null,f.dispose()}},[i,S,l]),M.useCallback((d,f)=>{var w;(w=D.current)==null||w.enqueue(d,f)},[])}const vc=(i,s)=>s&&i.some(l=>l.id===s)?s:i[0].id;function fI(){var Hd,kc,zd,Rc,or,Tc,$d,Wd,Gd,qd,Yd,Lc,bl,za,Kd,$a,Xd,Jd,Zd,_l,yl,va,ga,Ac,Qd,Mc;const i=M.useMemo(()=>oI(),[]),[s,l]=M.useState(lI),m=uI(s,i),[S,D]=M.useState(!go()),b=Y3({enabled:!S}),a=(b==null?void 0:b.shortcuts)||Mf,d=YP(b),[f,w]=M.useState(!1),[h,_]=M.useState(!1),[N,C]=M.useState(PM),y=Z=>{IM(Z),C(Z)},[c,p]=M.useState(BM),v=Z=>{FM(Z),p(Z)},[g,E]=M.useState(!1),[R,j]=M.useState(!1),[A,k]=M.useState(!1),[L,O]=M.useState(null),[H,V]=M.useState(null),[B,q]=M.useState(null),[ne,Y]=M.useState(null),[J,ee]=M.useState(!1),[P,W]=M.useState(!1),[Q,K]=M.useState(!1),[he,ce]=M.useState(null),[ke,we]=M.useState(null),[re,G]=M.useState(null),[ge,de]=M.useState(null),[pe,Ne]=M.useState(null),[Ie,Ze]=M.useState(!1),[ut,At]=M.useState(null),[Ke,qt]=M.useState(null),Ut=z3(),[xe,Ve]=M.useState(ma),[Xe,Te]=M.useState(vf),[lt,dt]=M.useState([]),[$,at]=M.useState(null),De=M.useRef(0),[We,be]=M.useState(!0),[Pe,He]=M.useState(null),[Ot,Le]=M.useState(!1),[ve,xt]=M.useState(null),[Kt,ot]=M.useState(!1),[Tt,Qt]=M.useState(null),[Vt,Fn]=M.useState({}),[mn,xi]=M.useState("terminal");M.useEffect(()=>{xi(localStorage.getItem("tw_lens_"+($==null?void 0:$.paneId))||"terminal")},[$==null?void 0:$.paneId]);const[ci,Hn]=M.useState([]),[vi,Yn]=M.useState(null),[st,tn]=M.useState(!1),{status:Pt,enable:Tn}=mP(b),[Sn,zn]=M.useState(!1),[ae,Be]=M.useState(0),[et,Ct]=M.useState(!1),[jt,Rt]=M.useState(rU),[Lt,Nt]=M.useState(null),[$n,Bt]=M.useState(aU),[fn,ni]=M.useState(r1),[Xn,Ui]=M.useState(jM),[wn,gi]=M.useState([]),[Ni,Ht]=M.useState(""),[Gi,Si]=M.useState(0),[pt,ie]=M.useState(null),Re=M.useRef(!1),nt=M.useRef(0),[hn,Ft]=M.useState(md),[$t,vn]=M.useState(!1),[ai,Wn]=M.useState(null),[rr,En]=M.useState(null),[Oi,ji]=M.useState(DM),Ar=()=>{let Z=!1;const le=()=>{Z||(Z=!0,window.removeEventListener("popstate",Ce),clearTimeout(ze),vn(!0))},Ce=()=>le();window.addEventListener("popstate",Ce);const ze=setTimeout(le,300);_(!1)},qi=M.useRef(0),Gr=M.useRef(null);Gr.current=ai;const ms=()=>{window.history.pushState({overlay:!0},""),qi.current+=1},fs=Z=>{ms(),Wn(Z),o1(Z),Ft(md())},wi=()=>window.history.back(),se=()=>{Wn(null),vn(!1)},Me=()=>{wn.forEach(Z=>o1(Z.id)),Ft(md())},tt=async Z=>{if(Re.current)return!1;Re.current=!0,nt.current+=1,ie(Z),Ht("");try{return await T3(Z),gi(le=>le.filter(Ce=>Ce.id!==Z)),!0}catch(le){return rn(le)||Ht(U("pushInbox.deleteFailed")),!1}finally{nt.current+=1,Re.current=!1,ie(null)}},vt=M.useRef(null),Dt=M.useRef(null),[Vi,Ii]=M.useState(!1),ft=M.useRef(!1);ft.current=Vi;const ui=M.useCallback(()=>{var Z,le;return(le=(Z=vt.current)==null?void 0:Z.focusInput)==null?void 0:le.call(Z)},[]),An=M.useCallback(()=>{var Z,le,Ce,ze;(le=(Z=vt.current)==null?void 0:Z.blurInput)==null||le.call(Z),(ze=(Ce=Dt.current)==null?void 0:Ce.focusComposer)==null||ze.call(Ce)},[]),di=M.useRef({owner:null,at:0}),hi=M.useCallback(()=>{var Z,le;m&&(di.current={owner:ft.current?"terminal":(le=(Z=Dt.current)==null?void 0:Z.composerFocused)!=null&&le.call(Z)?"composer":null,at:Date.now()})},[m]),ii=M.useRef(null),cn=M.useRef(null),un=M.useRef(null);un.current=Pe;const sr=M.useRef(null);sr.current=ve;const Kn=M.useRef(!1),Vn=M.useRef(null),Di=M.useRef(null),ps=M.useRef(0),Mr=M.useRef(null),fa=M.useRef(null),jn=M.useCallback(()=>D(!0),[]),vs=mI({enabled:m,currentPane:$==null?void 0:$.paneId,terminalRef:vt,onAuthFail:jn}),rn=M.useCallback(Z=>K3(Z,jn),[jn]),ki=M.useCallback(()=>{ps.current+=1,Mr.current=null,Kn.current=!1,ot(!1),xt(null)},[]),Sr=M.useCallback(()=>{var le,Ce;const Z=(le=un.current)==null?void 0:le.checkpointId;Z&&i1(Z),!Kn.current&&["succeeded","partial"].includes((Ce=sr.current)==null?void 0:Ce.status)&&(ki(),He(null)),Le(!1)},[ki]),$s=M.useCallback(()=>{let Z=!1;const le=()=>{Z||(Z=!0,window.removeEventListener("popstate",Ce),clearTimeout(ze),j(!0))},Ce=()=>le();window.addEventListener("popstate",Ce);const ze=setTimeout(le,300);Sr()},[Sr]),qr=M.useCallback(()=>{w(!1),Le(!0)},[]),Cs=M.useCallback(()=>{var le;const Z=(le=un.current)==null?void 0:le.checkpointId;Z&&(wM(Z),Di.current=Z),ki(),Le(!1),He(null)},[ki]),{previewDomain:js,dynamicEnabled:ns,previewSheetOpen:Ei,setPreviewSheetOpen:Er,activePreview:Ur,shownPreview:Ri,tabs:z,activeName:oe,openPreviewSheet:Se,startPreview:Ae,startDynamicPreview:it,startUrlPreview:It,switchTab:_t,closeTab:Xt,stopPreview:pn,renewPreview:Ln}=W3($,{settingsOpen:h,setSettingsOpen:_}),xn=!!(f||h||g||R||A||L||H||B||P||Q||ke||ut||Ke||Ot||vi||st||Sn||et||$t||J||Ei&&Ri),Pn=M.useRef(!1),nn=M.useRef(null),oi=M.useCallback(Z=>{cI(Z),Z==="desktop"&&xn&&(nn.current="terminal"),l(Z)},[xn]);M.useEffect(()=>{var le,Ce,ze,Ge,qe,Et;const Z=Pn.current;if(m&&xn){if(!Z){const St=di.current,Mn=ft.current?"terminal":(Ce=(le=Dt.current)==null?void 0:le.composerFocused)!=null&&Ce.call(le)?"composer":null;nn.current=Mn||(Date.now()-St.at<1e3?St.owner:null),di.current={owner:null,at:0}}(Ge=(ze=vt.current)==null?void 0:ze.blurInput)==null||Ge.call(ze),(Et=(qe=Dt.current)==null?void 0:qe.hideKeyboard)==null||Et.call(qe)}else if(m&&Z&&nn.current){const St=nn.current;nn.current=null;const Mn=requestAnimationFrame(()=>{var bn,Fi;mn==="terminal"&&(St==="terminal"?ui():(Fi=(bn=Dt.current)==null?void 0:bn.focusComposer)==null||Fi.call(bn))});return Pn.current=xn,()=>cancelAnimationFrame(Mn)}Pn.current=xn},[m,xn,$==null?void 0:$.paneId,mn,ui]);const bi=M.useCallback(async Z=>{try{await it(Z)}catch(le){if(!rn(le))throw le}},[it,rn]);M.useEffect(()=>{S||AU().then(Nt).catch(()=>{})},[S]);const Ds=M.useCallback(()=>{gM(),ki(),_(!1),j(!1),w(!1),at(null),be(!0),D(!0)},[ki]);XP();const mi=t4();Ss(Ei,()=>Er(!1)),Ss(f||Ot,()=>{Ot?Sr():w(!1)}),Ss(st,()=>tn(!1)),Ss(g,()=>E(!1)),Ss(R,()=>j(!1)),Ss(A,()=>k(!1)),Ss(Sn,()=>zn(!1)),Ss(!!ke,()=>we(null)),Ss(h||et,()=>{et?Ct(!1):_(!1)}),Ss(!!H||!!L,()=>{L?O(null):V(null)}),Ss(!!B,()=>q(null)),M.useEffect(()=>{if(!$t)return;ms();const Z=()=>{if(qi.current=Math.max(0,qi.current-1),Gr.current){Wn(null);return}vn(!1)};return window.addEventListener("popstate",Z),()=>{window.removeEventListener("popstate",Z),qi.current>0&&(window.history.go(-qi.current),qi.current=0)}},[$t]),M.useEffect(()=>{$t&&rr&&(fs(rr),En(null))},[$t,rr]),M.useEffect(()=>{$t&&wn.length&&wn[0].ts>Oi&&(kM(wn[0].ts),ji(wn[0].ts))},[$t,wn,Oi]),JP(!!$,Ze);const Or=M.useCallback(async Z=>{var Ce,ze;const le=$==null?void 0:$.paneId;if(le)try{await _d(le,[Z]),(ze=(Ce=vt.current)==null?void 0:Ce.wake)==null||ze.call(Ce)}catch(Ge){rn(Ge)}},[$,jn]),Ws=M.useCallback(async Z=>{var Ce,ze;const le=$==null?void 0:$.paneId;if(le)try{await tl(le,Z,!1),(ze=(Ce=vt.current)==null?void 0:Ce.wake)==null||ze.call(Ce)}catch(Ge){rn(Ge)}},[$,jn]),Gs=M.useCallback(()=>{var Z,le;return ii.current??((le=(Z=vt.current)==null?void 0:Z.getSize())==null?void 0:le.cols)},[]),ue=M.useCallback(async(Z,le=null)=>{var qe,Et,St,Mn,bn;const Ce=(qe=$==null?void 0:$.window)==null?void 0:qe.id,ze=Number.isFinite(le)?le:ii.current??((St=(Et=vt.current)==null?void 0:Et.getSize())==null?void 0:St.cols);if(!Ce||!ze)return;const Ge=Math.max(20,Math.min(500,ze+Z));ii.current=Ge,(bn=(Mn=vt.current)==null?void 0:Mn.flash)==null||bn.call(Mn);try{cn.current==null&&(cn.current=await wU(Ce).then(Fi=>Fi.layout||"").catch(()=>"")),$.panes&&$.panes.length>1?await yU($.paneId,Ge):await _U(Ce,Ge)}catch(Fi){rn(Fi)}},[$,jn]),$e=M.useCallback(async()=>{var Ce;const Z=(Ce=$==null?void 0:$.window)==null?void 0:Ce.id;if(!Z)return;const le=cn.current;ii.current=null,cn.current=null;try{await xU(Z,le)}catch(ze){rn(ze)}},[$,jn]),Je=M.useCallback(async(Z,le=null,{isCancelled:Ce=()=>!1}={})=>{var Mn;const ze=++De.current;if(Ce())return!1;const Ge=await dc(Z.id);if(Ce()||ze!==De.current||!Ge.length)return!1;const qe=(le==null?void 0:le.window)&&Ge.find(bn=>bn.id===le.window)||Ge.find(bn=>bn.id===vc(Ge,UM(Z.id))),Et=await zs(qe.id);if(Ce()||ze!==De.current||!Et.length)return!1;const St=le!=null&&le.pane&&Et.some(bn=>bn.id===le.pane)?le.pane:vc(Et,rd(qe.id));return at({session:Z,windows:Ge,window:qe,panes:Et,paneId:St}),Ko({sessionId:Z.id,windowId:qe.id,paneId:St}),PS(Z.name),ii.current=((Mn=Et.find(bn=>bn.id===St))==null?void 0:Mn.width)??null,cn.current=null,!0},[]),rt=M.useCallback(Z=>{Z&&(CM(Z),Ve(ma()))},[]),ht=M.useCallback((Z,le)=>{var St;if(Kn.current)return;Z!=null&&Z.mapping&&rt(Z.mapping);const Ce=(Z==null?void 0:Z.checkpointId)||null;if(Ce&&Ce===Di.current&&["succeeded","partial"].includes((St=sr.current)==null?void 0:St.status))return;const Ge=!!(Ce&&Di.current&&Di.current!==Ce);Ge&&ki(),Ce&&(Di.current=Ce);const qe=yM(Z==null?void 0:Z.checkpointId),Et=X3(Z,{...qe,liveSessionCount:le});if(Et==="none"){ki(),He(null),Le(!1);return}He(Z),Et==="auto-dialog"?(i1(Z.checkpointId),w(!1),Le(!0)):Ge&&Le(!1)},[rt,ki]),Wt=M.useCallback(async()=>{var ze,Ge;const Z=un.current;if(!Z||Kn.current)return;const le={generation:ps.current+1,checkpointId:Z.checkpointId,operationId:null};ps.current=le.generation,Mr.current=le,Kn.current=!0,ot(!0);const Ce=()=>{var qe;return Mr.current===le&&ps.current===le.generation&&((qe=un.current)==null?void 0:qe.checkpointId)===le.checkpointId};try{const qe=await MU({checkpointId:Z.checkpointId});if(!Ce())return;if(!(qe!=null&&qe.operationId))throw new Error("restore operation id missing");le.operationId=qe.operationId,xt({id:qe.operationId,status:qe.status||"pending",progress:{completed:0,total:(((ze=Z.planSummary)==null?void 0:ze.create)||0)+(((Ge=Z.planSummary)==null?void 0:Ge.renamed)||0)},results:[]})}catch(qe){if(!Ce())return;Kn.current=!1,ot(!1),rn(qe)||xt({status:"failed",errorCode:"restore-failed",progress:{completed:0,total:0},results:[]})}},[rn]),Gt=ve==null?void 0:ve.id;M.useEffect(()=>{if(!Gt||S)return;const Z=Mr.current;if(!Z||Z.operationId!==Gt)return;let le=!1,Ce=null;const ze=()=>!le&&Mr.current===Z&&ps.current===Z.generation&&Z.operationId===Gt,Ge=()=>{ze()&&(Ce=setTimeout(Et,1e3))},qe=async St=>{if(!ze())return!0;const Mn=un.current,bn=Mn==null?void 0:Mn.checkpointId;if(xt(St),rt(St.mapping),(St.results||[]).filter(Xr=>Xr.status==="restored").length>0&&(Ve(bM(St.results)),hc()),Kn.current=!1,ot(!1),!ze())return!0;const[mr,Kr]=await Promise.allSettled([g1(),v1()]);if(!ze())return!0;if(Kr.status==="fulfilled"?Qt(Kr.value):rn(Kr.reason),mr.status==="fulfilled"&&Vn.current!==null){const Xr=mr.value;St.status==="succeeded"&&(Xr==null?void 0:Xr.checkpointId)===bn?rt(Xr.mapping):ht(Xr,Vn.current)}else mr.status==="rejected"&&rn(mr.reason);return!0},Et=async()=>{if(ze()){try{const St=await UU(Gt);if(!ze())return;if(xt(St),["succeeded","partial","failed","interrupted"].includes(St.status)){const Mn=await qe(St);if(!ze())return;Mn||Ge();return}}catch(St){if(!ze()||rn(St))return;if(St instanceof pE&&St.status>=400&&St.status<500){Kn.current=!1,ot(!1),xt({id:Gt,status:"failed",errorCode:St.status===404?"operation-not-found":"restore-failed",progress:{completed:0,total:0},results:[]});return}}Ge()}};return Et(),()=>{le=!0,clearTimeout(Ce)}},[Gt,S,rt,ht,rn]);const dn=M.useCallback(async Z=>{var Ge;const le=++De.current,ze=rd(Z.id)||Z.activePaneId||null;at(qe=>qe&&{...qe,window:Z,panes:[],paneId:ze}),Ko({sessionId:$.session.id,windowId:Z.id,paneId:ze}),ii.current=Z.width??null,cn.current=null;try{const qe=await zs(Z.id);if(le!==De.current)return null;if(!qe.length)return;const Et=vc(qe,rd(Z.id));return at(St=>St&&St.window.id===Z.id?{...St,window:Z,panes:qe,paneId:Et}:St),Ko({sessionId:$.session.id,windowId:Z.id,paneId:Et}),ii.current=((Ge=qe.find(St=>St.id===Et))==null?void 0:Ge.width)??null,cn.current=null,Et}catch(qe){return rn(qe),null}},[$,jn]),ri=M.useCallback(async(Z,le,Ce)=>{var qe,Et,St,Mn;const ze=(qe=$==null?void 0:$.session)==null?void 0:qe.id,Ge=$==null?void 0:$.paneId;if(!(!ze||!Ge))try{const{id:bn}=await SU(ze,Ge,Z||void 0,le,Ce),Fi=await dc(ze),mr=Fi.find(Ks=>Ks.id===bn)||Fi[Fi.length-1],Kr=await zs(mr.id);if(!Kr.length)return;const Xr=vc(Kr,rd(mr.id));at(Ks=>Ks&&{...Ks,windows:Fi,window:mr,panes:Kr,paneId:Xr}),Ko({sessionId:ze,windowId:mr.id,paneId:Xr}),ii.current=((Et=Kr.find(Ks=>Ks.id===Xr))==null?void 0:Et.width)??null,cn.current=null,k(!1),(Mn=(St=vt.current)==null?void 0:St.wake)==null||Mn.call(St)}catch(bn){if(rn(bn))return;throw bn}},[$,jn]),Jt=M.useCallback(async Z=>{var ze,Ge;const le=L;if(!le)return;const Ce=(ze=$==null?void 0:$.session)==null?void 0:ze.id;if(le.kind==="session"){try{await EU(le.id,Z)}catch(qe){throw rn(qe)?qe:qe.status===409?new Error(le("app.nameExists")):new Error(le("app.renameFailed"))}Ve(_M(le.name,Z)),hc(),PS(Z),at(qe=>qe&&qe.session.id===le.id?{...qe,session:{...qe.session,name:Z}}:qe)}else{try{await CU(le.id,Z)}catch(Et){throw rn(Et)?Et:new Error(le("app.renameFailed"))}lU((Ge=$==null?void 0:$.session)==null?void 0:Ge.name,le.name||le.id,Z);const qe=await dc(Ce);at(Et=>Et&&{...Et,windows:qe,window:qe.find(St=>St.id===Et.window.id)||Et.window})}O(null)},[L,$,jn]),Jn=M.useCallback(async()=>{var qe;const Z=H,le=$==null?void 0:$.session;if(!Z||!le)return;const Ce=le.id,ze=$.windows.length<=1;try{await jU(Z.id)}catch(Et){if(rn(Et))return;window.alert(U("app.deleteFailed")),V(null);return}if(V(null),ze){Ve(n1(le.name)),hc(),at(null);return}const Ge=await dc(Ce);if(Z.id===$.window.id&&Ge.length){const Et=Ge.find(bn=>bn.active)||Ge[0],St=await zs(Et.id);if(!St.length)return;const Mn=vc(St,rd(Et.id));at(bn=>bn&&{...bn,windows:Ge,window:Et,panes:St,paneId:Mn}),Ko({sessionId:Ce,windowId:Et.id,paneId:Mn}),ii.current=((qe=St.find(bn=>bn.id===Mn))==null?void 0:qe.width)??null,cn.current=null}else at(Et=>Et&&{...Et,windows:Ge})},[H,$,jn]),Gn=M.useCallback(async Z=>{var Ge;const le=H,Ce=(Ge=$==null?void 0:$.session)==null?void 0:Ge.id;if(!le||!Ce)return;const ze=Fb($.windows,le.id,Z);if(ze)try{await DU(le.id,ze.id);const qe=await dc(Ce);at(Et=>Et&&{...Et,windows:qe,window:qe.find(St=>St.id===Et.window.id)||Et.window}),V(qe.find(Et=>Et.id===le.id)||null)}catch(qe){if(rn(qe)){V(null);return}window.alert(U("app.moveFailed")),V(null)}},[H,$,jn]),Ti=Uf(()=>{$!=null&&$.session&&O({kind:"session",id:$.session.id,name:$.session.name})}),hr=M.useCallback(async Z=>{try{const le=(await Jo()).find(Ce=>Ce.name===Z);if(!le){window.alert(U("app.sessionGone",{name:Z}));return}await Je(le)&&w(!1)}catch(le){rn(le)}},[Je,jn]),ks=M.useCallback(async Z=>{tn(!1),ni(s1(Z.pane,Z.ts));try{const le=(await Jo()).find(Ce=>Ce.name===Z.session);if(!le){window.alert(U("app.sessionGone",{name:Z.session}));return}w(!1),await Je(le,{window:Z.window,pane:Z.pane})}catch(le){rn(le)}},[Je,jn]),Yr=M.useCallback(async({target:Z,kill:le,name:Ce})=>{const ze=vi,Ge=await PU({pid:ze.pid,sessionId:ze.sessionId,target:Z,kill:le,name:Ce});Ge.name&&(Ve(o_(Ge.name)),hc()),Yn(null),tn(!1);try{Ge.name&&(w(!1),await Je({id:Ge.session,name:Ge.name},{window:Ge.window,pane:Ge.pane}))}catch(qe){rn(qe)}try{Hn(await b1())}catch{}},[vi,Je,jn]),qs=M.useCallback(()=>{const Z=C1(Vt);a1(Z),Ui(Z)},[Vt]),Bi=M.useCallback(Z=>{Ve(o_(Z)),hc(),j(!1),hr(Z)},[hr]),Yi=M.useCallback(Z=>{Ve(n1(Z)),hc(),at(le=>le&&le.session.name===Z?null:le)},[]),si=M.useCallback(Z=>{at(le=>le&&(Ko({windowId:le.window.id,paneId:Z}),{...le,paneId:Z}))},[]),ar=M.useCallback((Z,le)=>{at(Ce=>{if(!Ce)return Ce;const ze=Ce.windows.map(Ge=>Ge.id===Z?{...Ge,panes:le.length}:Ge);return Ce.window.id===Z?{...Ce,windows:ze,panes:le}:{...Ce,windows:ze}})},[]),xc=M.useCallback(async Z=>{var Ce;if(!Z)return;const le=(Ce=$==null?void 0:$.session)==null?void 0:Ce.id;if(!le){V(Z);return}try{const ze=await dc(le),Ge=ze.find(qe=>qe.id===Z.id);if(!Ge)return;at(qe=>!qe||qe.session.id!==le?qe:{...qe,windows:ze,window:ze.find(Et=>Et.id===qe.window.id)||qe.window}),V(Ge)}catch(ze){rn(ze)||V(Z)}},[(Hd=$==null?void 0:$.session)==null?void 0:Hd.id,rn]),Ba=M.useCallback(async(Z,le=(Ce=>(Ce=$==null?void 0:$.window)==null?void 0:Ce.id)())=>{if(Z){if(!le){q(Z);return}try{const ze=await zs(le);if(!ze.some(Ge=>Ge.id===Z))return;ar(le,ze),q(Z)}catch(ze){rn(ze)||q(Z)}}},[(kc=$==null?void 0:$.window)==null?void 0:kc.id,ar,rn]),Pf=M.useCallback(async(Z=(le=>(le=$==null?void 0:$.window)==null?void 0:le.id)())=>{if(Z)try{ar(Z,await zs(Z))}catch(Ce){rn(Ce)}},[(zd=$==null?void 0:$.window)==null?void 0:zd.id,ar,rn]),Fa=M.useCallback(async(Z,le)=>{var ze;const Ce=(ze=$==null?void 0:$.window)==null?void 0:ze.id;if(Ce){q(null),V(null);try{const{panes:Ge,selectPaneId:qe}=await w1({paneId:Z,dir:le,windowId:Ce,api:{splitPane:f1},getPanes:zs});ar(Ce,Ge),si(qe),cn.current=null}catch(Ge){if(rn(Ge))return;window.alert(U("pane.splitFailed"))}}},[$,ar,si,jn]),If=M.useCallback(async()=>{var ze;const Z=B,le=(ze=$==null?void 0:$.window)==null?void 0:ze.id,Ce=$==null?void 0:$.paneId;if(!(!Z||!le))try{const{panes:Ge,selectPaneId:qe}=await YU({paneId:Z,windowId:le,viewedPaneId:Ce,api:{closePane:kU},getPanes:zs,pickId:vc});q(null),ar(le,Ge),qe&&si(qe),cn.current=null}catch(Ge){if(q(null),rn(Ge))return;window.alert(U("pane.closeFailed"))}},[B,$,ar,si,jn]),Td=M.useCallback(async(Z,le)=>{var ze,Ge;const Ce=(ze=$==null?void 0:$.session)==null?void 0:ze.id;if(!(!Z||!Ce)){V(null);try{const qe=await zs(Z.id),Et=qe.find(bn=>bn.active)||qe[0];if(!Et)return;const{panes:St,selectPaneId:Mn}=await w1({paneId:Et.id,dir:le,windowId:Z.id,api:{splitPane:f1},getPanes:zs});at(bn=>{if(!bn)return bn;const Fi=bn.windows.map(mr=>mr.id===Z.id?{...mr,panes:St.length}:mr);return{...bn,windows:Fi,window:Z,panes:St,paneId:Mn}}),Ko({sessionId:Ce,windowId:Z.id,paneId:Mn}),ii.current=((Ge=St.find(bn=>bn.id===Mn))==null?void 0:Ge.width)??null,cn.current=null}catch(qe){if(rn(qe))return;window.alert(U("pane.splitFailed"))}}},[$,jn]),Nc=M.useCallback(async Z=>{var Ce;if(!Z)return;let le=$==null?void 0:$.paneId;Z.id!==((Ce=$==null?void 0:$.window)==null?void 0:Ce.id)?(V(null),le=await dn(Z)):await new Promise(ze=>{const Ge=()=>{clearTimeout(qe),window.removeEventListener("popstate",Ge),ze()},qe=setTimeout(Ge,80);window.addEventListener("popstate",Ge),V(null)}),le&&(Y(Z.id),await Ba(le,Z.id))},[$,dn,Ba]),Sc=(Rc=$==null?void 0:$.session)==null?void 0:Rc.name,Ec=(or=$==null?void 0:$.window)==null?void 0:or.id;M.useEffect(()=>{dt(Sc&&Ec?gf(Sc,Ec):[])},[Sc,Ec]);const Cc=(Tc=$==null?void 0:$.session)==null?void 0:Tc.name,ml=(($d=$==null?void 0:$.window)==null?void 0:$d.name)||((Wd=$==null?void 0:$.window)==null?void 0:Wd.id);M.useEffect(()=>{Be(Cc&&ml?fE(Cc,ml).length:0)},[Cc,ml]),M.useEffect(()=>{$!=null&&$.paneId&&k3($.paneId)},[$==null?void 0:$.paneId]),M.useEffect(()=>{var Ce;const Z=$==null?void 0:$.paneId;if(!Z)return;const le=(Ce=Vt[Z])==null?void 0:Ce.ts;le!=null&&r1()[Z]!==le&&ni(s1(Z,le))},[$==null?void 0:$.paneId,Vt]),M.useEffect(()=>{if(!eI())return;tI();let Z=!1;return(async()=>{const le=await nI();Z||!le||(ce(le),Ut.activate("home"),W(!0))})(),()=>{Z=!0}},[]),M.useEffect(()=>{if(S||typeof navigator>"u"||!("serviceWorker"in navigator))return;const Z=async({session:ze,window:Ge,pane:qe})=>{if(ze)try{const St=(await Jo()).find(Mn=>Mn.name===ze);St&&(w(!1),await Je(St,{window:Ge,pane:qe}))}catch(Et){rn(Et)}},le=ze=>{const Ge=ze.data;Ge&&(Ge.type==="navigate"?Z(Ge):Ge.type==="navigate-inbox"&&Ge.id&&(vn(!0),En(Ge.id)))},Ce=()=>{const ze=n_();ze.session&&(ze.window||ze.pane)&&Z(ze)};return navigator.serviceWorker.addEventListener("message",le),window.addEventListener("hashchange",Ce),()=>{navigator.serviceWorker.removeEventListener("message",le),window.removeEventListener("hashchange",Ce)}},[S,Je,jn]),M.useEffect(()=>{if(S)return;const Z=n_();Z.inbox&&(vn(!0),Z.inboxId&&En(Z.inboxId),history.replaceState(history.state,"","#"))},[S]),M.useEffect(()=>{if(S)return;let Z=!0;const le=async()=>{const ze=nt.current;try{const Ge=await R3();if(!Z||ze!==nt.current)return;gi(Ge),Ft(RM(Ge.map(qe=>qe.id))),Ht("")}catch(Ge){Z&&!rn(Ge)&&Ht(U("pushInbox.loadFailed"))}};le();const Ce=()=>{document.visibilityState==="visible"&&le()};return document.addEventListener("visibilitychange",Ce),()=>{Z=!1,document.removeEventListener("visibilitychange",Ce)}},[S,$t,Gi,rn]);const Ld=M.useCallback(Z=>{var Ge,qe,Et,St;(qe=(Ge=vt.current)==null?void 0:Ge.wake)==null||qe.call(Ge);const le=(Et=$==null?void 0:$.session)==null?void 0:Et.name,Ce=(St=$==null?void 0:$.window)==null?void 0:St.id;le&&Ce&&dt(qM(le,Ce,Z));const ze=l4(Z);de(ze&&($!=null&&$.paneId)?{...ze,paneId:$.paneId}:null)},[$]),Bf=M.useCallback(Z=>{Te(vf().includes(Z)?zM(Z):HM(Z))},[]),Ff=M.useCallback(Z=>{var ze,Ge;const le=(ze=$==null?void 0:$.session)==null?void 0:ze.name,Ce=(Ge=$==null?void 0:$.window)==null?void 0:Ge.id;le&&Ce&&dt(YM(le,Ce,Z))},[$]),yo=((qd=(Gd=$==null?void 0:$.panes)==null?void 0:Gd.find(Z=>Z.id===$.paneId))==null?void 0:qd.cwd)||null,pa=c&&((Yd=Vt[$==null?void 0:$.paneId])==null?void 0:Yd.agent)==="claude",fl=pa&&mn==="chat",pl=async Z=>{if(hU(Z)){const Ce=Z.split("/").pop()||Z;if(Ut.tabs.some(qe=>qe.key===Z)){Ut.activate(Z),jc(Z),W(!0);return}const{url:ze,mtimeMs:Ge}=await y1(Z);Ut.openDoc(Z,{type:"image",name:Ce,content:ze,mtime:Ge}),c1({path:Z,name:Ce,type:"image",ts:Date.now()}),W(!0);return}const le=await p1(Z);Ut.openDoc(Z,{type:le.type,name:le.name,content:le.content,mtime:le.mtimeMs}),c1({path:Z,name:le.name,type:le.type,ts:Date.now()}),W(!0)},Ad=Z=>{const le=Ut.tabs.find(Ce=>Ce.key===Z);(le==null?void 0:le.type)==="image"&&le.content&&URL.revokeObjectURL(le.content),Ut.closeTab(Z)},jc=Z=>{const le=Ut.tabs.find(Ce=>Ce.key===Z);if(!(!le||le.type==="home")){if(le.type==="image"){y1(Z,le.mtime??null).then(Ce=>{if(Ce.notModified)return;const ze=le.content;Ut.refreshDoc(Z,{content:Ce.url,mtime:Ce.mtimeMs}),ze&&URL.revokeObjectURL(ze)}).catch(()=>{});return}p1(Z,le.mtime??null).then(Ce=>{Ce.notModified||Ut.refreshDoc(Z,{type:Ce.type,name:Ce.name,content:Ce.content,mtime:Ce.mtimeMs})}).catch(()=>{})}},Hf=Z=>{Ut.activate(Z),jc(Z)},zf=()=>{W(!0),jc(Ut.active)},Md=Z=>{const le=/-> (\d+)/.exec((Z==null?void 0:Z.message)||""),Ce=le?Number(le[1]):0;return U(Ce===404?"app.docNotFound":Ce===413?"app.docTooLarge":Ce===400?"app.docUnsupported":"app.docOpenFailed")},Ud=async Z=>{if(RE(Z)){try{await pl(Z)}catch(Ce){Ne(Md(Ce))}return}const le=u1($==null?void 0:$.paneId)??yo;if(le)try{await pl(Zo(le,Z));return}catch{}we({rawPath:Z})},$f=async Z=>{try{await pl(Zo(Z,ke.rawPath))}catch(le){Ne(Md(le));return}$!=null&&$.paneId&&JM($.paneId,Z),setTimeout(()=>we(null),0)},Wf=(Z,le,Ce)=>{(Z==null?void 0:Z.kind)==="url"?qt({protocol:Z.protocol,port:Z.port,path:Z.urlPath,raw:Z.raw,x:le,y:Ce}):At({path:(Z==null?void 0:Z.path)??Z,x:le,y:Ce})},Gf=Z=>{At(null),Ud(Z)},[Od,Dc]=M.useState(null),Vd=async()=>{const Z=Ke;if(Z)try{await It({protocol:Z.protocol,port:Z.port,path:Z.path}),qt(null),Dc(null)}catch(le){if(rn(le))return;Dc(LE(le,{port:Z.port}))}},qf=()=>{qt(null),Dc(null)};if(M.useEffect(()=>{if(!pe)return;const Z=setTimeout(()=>Ne(null),4e3);return()=>clearTimeout(Z)},[pe]),M.useEffect(()=>{if(!re)return;const Z=setTimeout(()=>G(null),3500);return()=>clearTimeout(Z)},[re]),lf({fetch:async()=>{const[Z,le,Ce]=await Promise.allSettled([Jo(),g1(),v1()]);for(const ze of[Z,le,Ce])ze.status==="rejected"&&rn(ze.reason);return{sessions:Z.status==="fulfilled"?Z.value:void 0,plan:le.status==="fulfilled"?le.value:void 0,protection:Ce.status==="fulfilled"?Ce.value:void 0}},apply:({sessions:Z,plan:le,protection:Ce})=>{Ce!==void 0&&Qt(Ce),Array.isArray(Z)&&(Vn.current=Z.length),le!=null&&le.mapping&&Vn.current===null&&rt(le.mapping),le!==void 0&&Vn.current!==null&&ht(le,Vn.current)},intervalMs:15e3,enabled:!S}),M.useEffect(()=>{if(S)return;const Z=ma();if(!Z.length){be(!1);return}let le=!1;return(async()=>{try{const Ce=await Jo();if(le||!Ce.length)return;const ze=Ce.filter(St=>Z.includes(St.name));if(!ze.length)return;const Ge=n_();let qe=Ge.session?ze.find(St=>St.name===Ge.session):null;const Et=qe?{window:Ge.window,pane:Ge.pane}:null;if(!qe){const St=MM();St&&(qe=ze.find(Mn=>Mn.id===St))}qe||(qe=ze[0]),le||await Je(qe,Et)}catch(Ce){rn(Ce)}finally{le||be(!1)}})(),()=>{le=!0}},[S,Je]),lf({fetch:()=>VU(xe),apply:Z=>Fn(Z||{}),intervalMs:5e3,enabled:!S,deps:[xe]}),M.useEffect(()=>{if(Xn!=null)return;const Z=C1(Vt);Z>0&&(a1(Z),Ui(Z))},[Vt,Xn]),lf({fetch:b1,apply:Z=>Hn(Array.isArray(Z)?Z:[]),intervalMs:15e3,enabled:!S}),S)return o.jsxDEV(qV,{onSaved:()=>{D(!1),be(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1492,columnNumber:12},this);const Pd=w3(Vt,fn,Xn??1/0),Yf=N3(Pd),Id={};for(const Z of Object.values(Vt))Z.window&&Z.agent&&(Id[Z.window]=Z.agent);const vl={};for(const[Z,le]of Object.entries(Vt))le.agent&&(vl[Z]=le.agent);const Ys=!!Jm&&jt!==Jm,gl=!!(Lt!=null&&Lt.updateAvailable)&&Lt.latest!==$n,Bd=new Set(hn),Ha=wn.filter(Z=>!Bd.has(Z.id)).length,Fd=wn.length>0&&wn[0].ts>Oi,Kf=Ys||gl||Fd,Xf=()=>{_(!0),Lt!=null&&Lt.latest&&(oU(Lt.latest),Bt(Lt.latest))},Jf=()=>{_(!1),Ct(!0),sU(Jm),Rt(Jm)};return o.jsxDEV("div",{className:"app","data-chat-tone":N,onPointerDownCapture:hi,style:mi?{transform:`translateY(-${mi}px)`}:void 0,children:[o.jsxDEV("header",{className:"topbar",children:[o.jsxDEV("button",{ref:fa,className:"hamburger",onClick:()=>w(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1537,columnNumber:9},this),o.jsxDEV("span",{className:"session-name",...Ti,children:((Lc=$==null?void 0:$.session)==null?void 0:Lc.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1538,columnNumber:9},this),Ri&&o.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>Er(!0),"aria-label":U("app.preview"),title:U("app.openPreview"),children:o.jsxDEV(yf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1543,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1542,columnNumber:11},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>zn(!0),"aria-label":U("app.ideas"),title:U("app.ideas"),disabled:!$,children:[o.jsxDEV(e3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1548,columnNumber:11},this),ae>0&&o.jsxDEV("span",{className:"idea-badge",children:ae},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1549,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1546,columnNumber:9},this),o.jsxDEV(oP,{rows:Pd,top:Yf,open:st,onToggle:()=>tn(Z=>!Z),onClose:()=>tn(!1),onSelectRow:ks,onMarkAllRead:qs,hooksStatus:Pt,onEnableHooks:Tn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1551,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>E(!0),"aria-label":U("usage.title"),title:U("usage.title"),children:o.jsxDEV(a3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1562,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1562,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:zf,"aria-label":U("app.files"),title:U("app.files"),children:o.jsxDEV(yd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1563,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1563,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>K(!0),"aria-label":"Git",title:"Git",children:o.jsxDEV(NE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1564,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1564,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:Xf,"aria-label":U("app.settings"),title:U("app.settings"),children:[o.jsxDEV(_f,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1566,columnNumber:11},this),Kf&&o.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1567,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1565,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1536,columnNumber:7},this),o.jsxDEV(aP,{open:g,onClose:()=>E(!1),onAuthFail:jn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1570,columnNumber:7},this),o.jsxDEV(QV,{open:h,onClose:()=>_(!1),workspaceProtection:Tt,chatTone:N,onChatTone:y,chatLensEnabled:c,onChatLensEnabled:v,keyboardMode:s,onKeyboardMode:oi,hooksStatus:Pt,onEnableHooks:Tn,termRef:vt,windowId:(bl=$==null?void 0:$.window)==null?void 0:bl.id,getColCount:Gs,onColAdjust:ue,onColRestore:$e,onOpenChangelog:Jf,changelogUnread:Ys,notifUnread:Fd,onOpenInbox:Ar,updateInfo:Lt,activePreview:Ur,pane:$==null?void 0:$.paneId,lastPreviewDir:LM((za=$==null?void 0:$.window)==null?void 0:za.id),dynamicEnabled:ns,onStartPreview:Ae,onStartDynamicPreview:bi,onOpenPreview:Se,onRenew:Ln,onStop:pn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1575,columnNumber:7},this),o.jsxDEV(GP,{open:et,onClose:()=>Ct(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1607,columnNumber:7},this),o.jsxDEV(M3,{open:$t,detailId:ai,items:wn,readIds:hn,onOpenDetail:fs,onCloseDetail:wi,onClose:se,onDelete:tt,deletingId:pt,error:Ni,onRetry:()=>Si(Z=>Z+1),onMarkAllRead:Me,unreadCount:Ha},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1608,columnNumber:7},this),o.jsxDEV(Z3,{open:f,currentSessionName:(Kd=$==null?void 0:$.session)==null?void 0:Kd.name,bound:xe,onSelectSession:hr,onUnbind:Yi,onBind:()=>j(!0),onClose:()=>w(!1),onLogout:Ds,orphans:ci,onTakeoverRequest:Yn,recoveryPlan:Pe,recoveryOperation:ve,onOpenRecovery:qr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1623,columnNumber:7},this),o.jsxDEV(nP,{open:Ot,plan:Pe,operation:ve,submitting:Kt,returnFocusRef:fa,onRestore:Wt,onIgnore:Cs,onClose:Sr,onRebind:$s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1638,columnNumber:7},this),o.jsxDEV(gP,{open:R,bound:xe,onBound:Bi,onClose:()=>j(!1),onAuthFail:jn,inset:mi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1649,columnNumber:7},this),o.jsxDEV(_P,{open:A,onClose:()=>k(!1),onCreate:ri,paneId:$==null?void 0:$.paneId,inset:mi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1657,columnNumber:7},this),o.jsxDEV(wP,{open:!!L,title:(L==null?void 0:L.kind)==="session"?U("app.renameSession"):U("app.renameWindow"),currentName:(L==null?void 0:L.name)||"",onClose:()=>O(null),onSubmit:Jt,inset:mi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1664,columnNumber:7},this),o.jsxDEV(lP,{open:!!vi,orphan:vi,onConfirm:Yr,onClose:()=>Yn(null),inset:mi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1672,columnNumber:7},this),o.jsxDEV(jf,{open:!!H,title:U("app.manageWindow"),subtitle:rI(H),onClose:()=>V(null),actions:H?[...H.panes===1?[{key:"split-h",icon:o.jsxDEV(x1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1689,columnNumber:37},this),label:U("pane.splitH"),onClick:()=>Td(H,"h")},{key:"split-v",icon:o.jsxDEV(N1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1690,columnNumber:37},this),label:U("pane.splitV"),onClick:()=>Td(H,"v")}]:[],...H.panes>1?[{key:"manage-split",icon:o.jsxDEV(d3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1694,columnNumber:42},this),label:U("pane.manage"),onClick:()=>Nc(H)}]:[],...$&&$.windows.length>1?[[{key:"move-left",label:U("app.moveLeft"),disabled:!Fb($.windows,H.id,"left"),onClick:()=>Gn("left")},{key:"move-right",label:U("app.moveRight"),disabled:!Fb($.windows,H.id,"right"),onClick:()=>Gn("right")}]]:[],{key:"rename",label:U("common.rename"),onClick:()=>{O({kind:"window",id:H.id,name:H.name||""}),V(null)}},{key:"delete",label:U("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:$&&$.windows.length<=1?U("app.deleteLastWindowConfirm"):U("app.deleteConfirm"),onClick:Jn}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1679,columnNumber:7},this),o.jsxDEV(jf,{open:!!B,title:U("pane.manageTitle"),subtitle:sI($==null?void 0:$.panes,B),onClose:()=>q(null),actions:B?[{key:"split-h",icon:o.jsxDEV(x1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1732,columnNumber:35},this),label:U("pane.splitH"),onClick:()=>Fa(B,"h")},{key:"split-v",icon:o.jsxDEV(N1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1733,columnNumber:35},this),label:U("pane.splitV"),onClick:()=>Fa(B,"v")},{key:"close",icon:o.jsxDEV(Oa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1735,columnNumber:33},this),label:U("pane.close"),danger:!0,confirm:!0,confirmLabel:U("pane.closeConfirm"),onClick:If}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1726,columnNumber:7},this),o.jsxDEV(AP,{open:P,pane:$==null?void 0:$.paneId,windowId:($a=$==null?void 0:$.window)==null?void 0:$a.id,tabs:Ut.tabs,active:Ut.active,onActivate:Hf,onCloseTab:Ad,onMinimize:()=>W(!1),onOpenDoc:Ud,pendingShare:he,onPendingConsumed:()=>ce(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1740,columnNumber:7},this),o.jsxDEV(OP,{open:Q,pane:$==null?void 0:$.paneId,windowId:(Xd=$==null?void 0:$.window)==null?void 0:Xd.id,inset:mi,onClose:()=>K(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1753,columnNumber:7},this),o.jsxDEV(FP,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1756,columnNumber:7},this),o.jsxDEV(dP,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1758,columnNumber:7},this),o.jsxDEV(b3,{open:Ei&&!!Ri,tabs:z,activeName:oe,domain:js,onSwitchTab:_t,onCloseTab:Xt,onRenew:Ln,onStop:pn,onMinimize:()=>Er(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1760,columnNumber:7},this),pe&&o.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>Ne(null),children:pe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1772,columnNumber:9},this),Ie&&o.jsxDEV("div",{className:"exit-toast",role:"status",children:U("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1775,columnNumber:9},this),re&&o.jsxDEV("div",{className:"handoff-toast",role:"status",children:U("chat.slash.handedOff",{cmd:re})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1778,columnNumber:9},this),ut&&o.jsxDEV(VS,{path:ut.path,x:ut.x,y:ut.y,onOpen:Gf,onClose:()=>At(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1781,columnNumber:9},this),Ke&&o.jsxDEV(VS,{icon:o.jsxDEV(yf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1791,columnNumber:17},this),name:U("localurl.title"),path:Ke.raw,openLabel:U("localurl.open"),note:Od??(ns?void 0:U("localurl.disabled")),disabled:!ns,x:Ke.x,y:Ke.y,onOpen:Vd,onClose:qf},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1790,columnNumber:9},this),o.jsxDEV(WP,{open:Sn,session:(Jd=$==null?void 0:$.session)==null?void 0:Jd.name,window:((Zd=$==null?void 0:$.window)==null?void 0:Zd.name)||((_l=$==null?void 0:$.window)==null?void 0:_l.id),micAvailable:d,onClose:()=>zn(!1),onSend:Z=>{var le;(le=Dt.current)==null||le.fill(Z),zn(!1)},onCountChange:Be},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1803,columnNumber:7},this),o.jsxDEV(Rd,{open:!!ke,seedCwd:u1($==null?void 0:$.paneId)??yo??null,pane:($==null?void 0:$.paneId)??null,hint:ke?o.jsxDEV(o.Fragment,{children:[U("app.cannotLocate")," ",o.jsxDEV("code",{children:ke.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1816,columnNumber:54},this),U("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1816,columnNumber:28},this):null,onPick:$f,onClose:()=>we(null),inset:mi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1812,columnNumber:7},this),$?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(h2,{windows:$.windows,windowAgents:Id,paneAgents:vl,currentAgent:(yl=Vt[$.paneId])==null?void 0:yl.agent,currentWindowId:$.window.id,panes:$.panes,currentPaneId:$.paneId,onSelectWindow:dn,onSelectPane:si,onNewWindow:()=>k(!0),onManageWindow:xc,onManagePane:Ba,onBeforePaneMapOpen:Pf,paneSheetOpen:!!B,openMapFor:ne,onMapOpened:()=>Y(null),onPaneMapOpenChange:ee,trackWindowId:H==null?void 0:H.id,lens:mn,chatLensEnabled:pa,onLensChange:Z=>{xi(Z),localStorage.setItem("tw_lens_"+$.paneId,Z)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1823,columnNumber:11},this),$.paneId&&(fl?o.jsxDEV(GV,{pane:$.paneId,kind:(va=Vt[$.paneId])==null?void 0:va.kind,msg:(ga=Vt[$.paneId])==null?void 0:ga.msg,onAuthFail:jn,slashEcho:ge&&ge.paneId===$.paneId?ge:null,onSlashEchoDone:()=>de(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1848,columnNumber:15},this):o.jsxDEV(iO,{ref:vt,pane:$.paneId,desktop:m,autoFocusInput:!xn,inset:mi,onAuthFail:jn,onDocLinkTap:Wf,onInputFocusChange:Ii,onInputData:vs,onRequestDraft:An,onTap:()=>{var Z;m?ui():(Z=Dt.current)==null||Z.hideKeyboard()}},$.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1852,columnNumber:15},this)),fl?o.jsxDEV(m4,{pane:$.paneId,desktop:m,kind:(Ac=Vt[$.paneId])==null?void 0:Ac.kind,cwd:yo,onKey:Or,onAuthFail:jn,onSent:Ld,shortcuts:a,micAvailable:d,onInteractiveSlash:Z=>{xi("terminal"),localStorage.setItem("tw_lens_"+$.paneId,"terminal"),G(Z)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1873,columnNumber:13},this):o.jsxDEV(a4,{ref:Dt,pane:$.paneId,onAuthFail:jn,onKey:Or,onText:Ws,cwd:yo,agent:(Qd=Vt[$.paneId])==null?void 0:Qd.agent,windowId:(Mc=$.window)==null?void 0:Mc.id,recent:lt,favorites:Xe,onSent:Ld,onToggleFav:Bf,onRemoveRecent:Ff,inset:mi,shortcuts:a,micAvailable:d,desktopUnified:m,terminalFocused:Vi,onLeaveTerminal:()=>{var Z,le;return(le=(Z=vt.current)==null?void 0:Z.blurInput)==null?void 0:le.call(Z)},onReturnToTerminal:ui},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1886,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1822,columnNumber:9},this):We?o.jsxDEV("div",{className:"loading",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1911,columnNumber:9},this):xe.length===0?o.jsxDEV("button",{className:"empty-cta",onClick:()=>j(!0),children:[U("app.noBoundSession"),o.jsxDEV("span",{children:U("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1914,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1913,columnNumber:9},this):o.jsxDEV("div",{className:"loading",children:U("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1917,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1534,columnNumber:5},this)}WS(document.getElementById("root")).render(o.jsxDEV(fI,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/main.jsx",lineNumber:6,columnNumber:52},void 0));if(typeof window<"u"&&window.__hideBootSplash){const i=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(l=>l.media==="print"),s=i.length?new Promise(l=>{let m=i.length;i.forEach(S=>S.addEventListener("load",()=>{--m||l()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>s.then(()=>window.__hideBootSplash())))}
|