handmux 0.16.0 → 0.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,330 @@
1
+ var lM=Object.defineProperty;var F0=r=>{throw TypeError(r)};var cM=(r,s,d)=>s in r?lM(r,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):r[s]=d;var Kn=(r,s,d)=>cM(r,typeof s!="symbol"?s+"":s,d),uM=(r,s,d)=>s.has(r)||F0("Cannot "+d);var H0=(r,s,d)=>s.has(r)?F0("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,d);var Wh=(r,s,d)=>(uM(r,s,"access private method"),d);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const E of document.querySelectorAll('link[rel="modulepreload"]'))_(E);new MutationObserver(E=>{for(const R of E)if(R.type==="childList")for(const b of R.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&_(b)}).observe(document,{childList:!0,subtree:!0});function d(E){const R={};return E.integrity&&(R.integrity=E.integrity),E.referrerPolicy&&(R.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?R.credentials="include":E.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function _(E){if(E.ep)return;E.ep=!0;const R=d(E);fetch(E.href,R)}})();var x1={exports:{}},Vg={},w1={exports:{}},rm={exports:{}};rm.exports;(function(r,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 d="18.3.1",_=Symbol.for("react.element"),E=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),g=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),l=Symbol.iterator,v="@@iterator";function m(z){if(z===null||typeof z!="object")return null;var ce=l&&z[l]||z[v];return typeof ce=="function"?ce:null}var p={current:null},N={transition:null},k={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},j={current:null},M={},D=null;function L(z){D=z}M.setExtraStackFrame=function(z){D=z},M.getCurrentStack=null,M.getStackAddendum=function(){var z="";D&&(z+=D);var ce=M.getCurrentStack;return ce&&(z+=ce()||""),z};var A=!1,F=!1,O=!1,I=!1,G=!1,ne={ReactCurrentDispatcher:p,ReactCurrentBatchConfig:N,ReactCurrentOwner:j};ne.ReactDebugCurrentFrame=M,ne.ReactCurrentActQueue=k;function ee(z){{for(var ce=arguments.length,K=new Array(ce>1?ce-1:0),ue=1;ue<ce;ue++)K[ue-1]=arguments[ue];se("warn",z,K)}}function te(z){{for(var ce=arguments.length,K=new Array(ce>1?ce-1:0),ue=1;ue<ce;ue++)K[ue-1]=arguments[ue];se("error",z,K)}}function se(z,ce,K){{var ue=ne.ReactDebugCurrentFrame,ye=ue.getStackAddendum();ye!==""&&(ce+="%s",K=K.concat([ye]));var Le=K.map(function(Re){return String(Re)});Le.unshift("Warning: "+ce),Function.prototype.apply.call(console[z],console,Le)}}var B={};function W(z,ce){{var K=z.constructor,ue=K&&(K.displayName||K.name)||"ReactClass",ye=ue+"."+ce;if(B[ye])return;te("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.",ce,ue),B[ye]=!0}}var X={isMounted:function(z){return!1},enqueueForceUpdate:function(z,ce,K){W(z,"forceUpdate")},enqueueReplaceState:function(z,ce,K,ue){W(z,"replaceState")},enqueueSetState:function(z,ce,K,ue){W(z,"setState")}},Y=Object.assign,ve={};Object.freeze(ve);function he(z,ce,K){this.props=z,this.context=ce,this.refs=ve,this.updater=K||X}he.prototype.isReactComponent={},he.prototype.setState=function(z,ce){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,ce,"setState")},he.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};{var Me={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)."]},me=function(z,ce){Object.defineProperty(he.prototype,z,{get:function(){ee("%s(...) is deprecated in plain JavaScript React classes. %s",ce[0],ce[1])}})};for(var ie in Me)Me.hasOwnProperty(ie)&&me(ie,Me[ie])}function $(){}$.prototype=he.prototype;function _e(z,ce,K){this.props=z,this.context=ce,this.refs=ve,this.updater=K||X}var de=_e.prototype=new $;de.constructor=_e,Y(de,he.prototype),de.isPureReactComponent=!0;function Ie(){var z={current:null};return Object.seal(z),z}var Ue=Array.isArray;function tt(z){return Ue(z)}function Qe(z){{var ce=typeof Symbol=="function"&&Symbol.toStringTag,K=ce&&z[Symbol.toStringTag]||z.constructor.name||"Object";return K}}function st(z){try{return Nt(z),!1}catch{return!0}}function Nt(z){return""+z}function J(z){if(st(z))return te("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(z)),Nt(z)}function bt(z,ce,K){var ue=z.displayName;if(ue)return ue;var ye=ce.displayName||ce.name||"";return ye!==""?K+"("+ye+")":K}function Gt(z){return z.displayName||"Context"}function Ee(z){if(z==null)return null;if(typeof z.tag=="number"&&te("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 R:return"Fragment";case E:return"Portal";case a:return"Profiler";case b:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if(typeof z=="object")switch(z.$$typeof){case g:var ce=z;return Gt(ce)+".Consumer";case u:var K=z;return Gt(K._context)+".Provider";case x:return bt(z,z.render,"ForwardRef");case S:var ue=z.displayName||null;return ue!==null?ue:Ee(z.type)||"Memo";case C:{var ye=z,Le=ye._payload,Re=ye._init;try{return Ee(Re(Le))}catch{return null}}}return null}var Te=Object.prototype.hasOwnProperty,Ge={key:!0,ref:!0,__self:!0,__source:!0},re,We,Ye;Ye={};function ge(z){if(Te.call(z,"ref")){var ce=Object.getOwnPropertyDescriptor(z,"ref").get;if(ce&&ce.isReactWarning)return!1}return z.ref!==void 0}function Ze(z){if(Te.call(z,"key")){var ce=Object.getOwnPropertyDescriptor(z,"key").get;if(ce&&ce.isReactWarning)return!1}return z.key!==void 0}function je(z,ce){var K=function(){re||(re=!0,te("%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)",ce))};K.isReactWarning=!0,Object.defineProperty(z,"key",{get:K,configurable:!0})}function Pe(z,ce){var K=function(){We||(We=!0,te("%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)",ce))};K.isReactWarning=!0,Object.defineProperty(z,"ref",{get:K,configurable:!0})}function be(z){if(typeof z.ref=="string"&&j.current&&z.__self&&j.current.stateNode!==z.__self){var ce=Ee(j.current.type);Ye[ce]||(te('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',ce,z.ref),Ye[ce]=!0)}}var Ae=function(z,ce,K,ue,ye,Le,Re){var Xe={$$typeof:_,type:z,key:ce,ref:K,props:Re,_owner:Le};return Xe._store={},Object.defineProperty(Xe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Xe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.defineProperty(Xe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ye}),Object.freeze&&(Object.freeze(Xe.props),Object.freeze(Xe)),Xe};function He(z,ce,K){var ue,ye={},Le=null,Re=null,Xe=null,at=null;if(ce!=null){ge(ce)&&(Re=ce.ref,be(ce)),Ze(ce)&&(J(ce.key),Le=""+ce.key),Xe=ce.__self===void 0?null:ce.__self,at=ce.__source===void 0?null:ce.__source;for(ue in ce)Te.call(ce,ue)&&!Ge.hasOwnProperty(ue)&&(ye[ue]=ce[ue])}var vt=arguments.length-2;if(vt===1)ye.children=K;else if(vt>1){for(var ct=Array(vt),Kt=0;Kt<vt;Kt++)ct[Kt]=arguments[Kt+2];Object.freeze&&Object.freeze(ct),ye.children=ct}if(z&&z.defaultProps){var Ct=z.defaultProps;for(ue in Ct)ye[ue]===void 0&&(ye[ue]=Ct[ue])}if(Le||Re){var At=typeof z=="function"?z.displayName||z.name||"Unknown":z;Le&&je(ye,At),Re&&Pe(ye,At)}return Ae(z,Le,Re,Xe,at,j.current,ye)}function wt(z,ce){var K=Ae(z.type,ce,z.ref,z._self,z._source,z._owner,z.props);return K}function kt(z,ce,K){if(z==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ue,ye=Y({},z.props),Le=z.key,Re=z.ref,Xe=z._self,at=z._source,vt=z._owner;if(ce!=null){ge(ce)&&(Re=ce.ref,vt=j.current),Ze(ce)&&(J(ce.key),Le=""+ce.key);var ct;z.type&&z.type.defaultProps&&(ct=z.type.defaultProps);for(ue in ce)Te.call(ce,ue)&&!Ge.hasOwnProperty(ue)&&(ce[ue]===void 0&&ct!==void 0?ye[ue]=ct[ue]:ye[ue]=ce[ue])}var Kt=arguments.length-2;if(Kt===1)ye.children=K;else if(Kt>1){for(var Ct=Array(Kt),At=0;At<Kt;At++)Ct[At]=arguments[At+2];ye.children=Ct}return Ae(z.type,Le,Re,Xe,at,vt,ye)}function Ot(z){return typeof z=="object"&&z!==null&&z.$$typeof===_}var Pt=".",dn=":";function Qt(z){var ce=/[=:]/g,K={"=":"=0",":":"=2"},ue=z.replace(ce,function(ye){return K[ye]});return"$"+ue}var Mt=!1,Ft=/\/+/g;function sn(z){return z.replace(Ft,"$&/")}function Dn(z,ce){return typeof z=="object"&&z!==null&&z.key!=null?(J(z.key),Qt(""+z.key)):ce.toString(36)}function it(z,ce,K,ue,ye){var Le=typeof z;(Le==="undefined"||Le==="boolean")&&(z=null);var Re=!1;if(z===null)Re=!0;else switch(Le){case"string":case"number":Re=!0;break;case"object":switch(z.$$typeof){case _:case E:Re=!0}}if(Re){var Xe=z,at=ye(Xe),vt=ue===""?Pt+Dn(Xe,0):ue;if(tt(at)){var ct="";vt!=null&&(ct=sn(vt)+"/"),it(at,ce,ct,"",function(Ao){return Ao})}else at!=null&&(Ot(at)&&(at.key&&(!Xe||Xe.key!==at.key)&&J(at.key),at=wt(at,K+(at.key&&(!Xe||Xe.key!==at.key)?sn(""+at.key)+"/":"")+vt)),ce.push(at));return 1}var Kt,Ct,At=0,_n=ue===""?Pt:ue+dn;if(tt(z))for(var Mi=0;Mi<z.length;Mi++)Kt=z[Mi],Ct=_n+Dn(Kt,Mi),At+=it(Kt,ce,K,Ct,ye);else{var rs=m(z);if(typeof rs=="function"){var rr=z;rs===rr.entries&&(Mt||ee("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Mt=!0);for(var ss=rs.call(rr),sr,pa=0;!(sr=ss.next()).done;)Kt=sr.value,Ct=_n+Dn(Kt,pa++),At+=it(Kt,ce,K,Ct,ye)}else if(Le==="object"){var za=String(z);throw new Error("Objects are not valid as a React child (found: "+(za==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":za)+"). If you meant to render a collection of children, use an array instead.")}}return At}function cn(z,ce,K){if(z==null)return z;var ue=[],ye=0;return it(z,ue,"","",function(Le){return ce.call(K,Le,ye++)}),ue}function zn(z){var ce=0;return cn(z,function(){ce++}),ce}function $n(z,ce,K){cn(z,function(){ce.apply(this,arguments)},K)}function en(z){return cn(z,function(ce){return ce})||[]}function kn(z){if(!Ot(z))throw new Error("React.Children.only expected to receive a single React element child.");return z}function On(z){var ce={$$typeof:g,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};ce.Provider={$$typeof:u,_context:ce};var K=!1,ue=!1,ye=!1;{var Le={$$typeof:g,_context:ce};Object.defineProperties(Le,{Provider:{get:function(){return ue||(ue=!0,te("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),ce.Provider},set:function(Re){ce.Provider=Re}},_currentValue:{get:function(){return ce._currentValue},set:function(Re){ce._currentValue=Re}},_currentValue2:{get:function(){return ce._currentValue2},set:function(Re){ce._currentValue2=Re}},_threadCount:{get:function(){return ce._threadCount},set:function(Re){ce._threadCount=Re}},Consumer:{get:function(){return K||(K=!0,te("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),ce.Consumer}},displayName:{get:function(){return ce.displayName},set:function(Re){ye||(ee("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Re),ye=!0)}}}),ce.Consumer=Le}return ce._currentRenderer=null,ce._currentRenderer2=null,ce}var ni=-1,nn=0,En=1,vn=2;function Xn(z){if(z._status===ni){var ce=z._result,K=ce();if(K.then(function(Le){if(z._status===nn||z._status===ni){var Re=z;Re._status=En,Re._result=Le}},function(Le){if(z._status===nn||z._status===ni){var Re=z;Re._status=vn,Re._result=Le}}),z._status===ni){var ue=z;ue._status=nn,ue._result=K}}if(z._status===En){var ye=z._result;return ye===void 0&&te(`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?`,ye),"default"in ye||te(`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'))`,ye),ye.default}else throw z._result}function oe(z){var ce={_status:ni,_result:z},K={$$typeof:C,_payload:ce,_init:Xn};{var ue,ye;Object.defineProperties(K,{defaultProps:{configurable:!0,get:function(){return ue},set:function(Le){te("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."),ue=Le,Object.defineProperty(K,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ye},set:function(Le){te("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."),ye=Le,Object.defineProperty(K,"propTypes",{enumerable:!0})}}})}return K}function $e(z){z!=null&&z.$$typeof===S?te("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof z!="function"?te("forwardRef requires a render function but was given %s.",z===null?"null":typeof z):z.length!==0&&z.length!==2&&te("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)&&te("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var ce={$$typeof:x,render:z};{var K;Object.defineProperty(ce,"displayName",{enumerable:!1,configurable:!0,get:function(){return K},set:function(ue){K=ue,!z.name&&!z.displayName&&(z.displayName=ue)}})}return ce}var et;et=Symbol.for("react.module.reference");function yt(z){return!!(typeof z=="string"||typeof z=="function"||z===R||z===a||G||z===b||z===h||z===f||I||z===y||A||F||O||typeof z=="object"&&z!==null&&(z.$$typeof===C||z.$$typeof===S||z.$$typeof===u||z.$$typeof===g||z.$$typeof===x||z.$$typeof===et||z.getModuleId!==void 0))}function gt(z,ce){yt(z)||te("memo: The first argument must be a component. Instead received: %s",z===null?"null":typeof z);var K={$$typeof:S,type:z,compare:ce===void 0?null:ce};{var ue;Object.defineProperty(K,"displayName",{enumerable:!1,configurable:!0,get:function(){return ue},set:function(ye){ue=ye,!z.name&&!z.displayName&&(z.displayName=ye)}})}return K}function ft(){var z=p.current;return z===null&&te(`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 Rt(z){var ce=ft();if(z._context!==void 0){var K=z._context;K.Consumer===z?te("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?"):K.Provider===z&&te("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return ce.useContext(z)}function pt(z){var ce=ft();return ce.useState(z)}function gn(z,ce,K){var ue=ft();return ue.useReducer(z,ce,K)}function an(z){var ce=ft();return ce.useRef(z)}function qt(z,ce){var K=ft();return K.useEffect(z,ce)}function bn(z,ce){var K=ft();return K.useInsertionEffect(z,ce)}function Nn(z,ce){var K=ft();return K.useLayoutEffect(z,ce)}function ui(z,ce){var K=ft();return K.useCallback(z,ce)}function Vn(z,ce){var K=ft();return K.useMemo(z,ce)}function Jn(z,ce,K){var ue=ft();return ue.useImperativeHandle(z,ce,K)}function ii(z,ce){{var K=ft();return K.useDebugValue(z,ce)}}function Dt(){var z=ft();return z.useTransition()}function ae(z){var ce=ft();return ce.useDeferredValue(z)}function Be(){var z=ft();return z.useId()}function xe(z,ce,K){var ue=ft();return ue.useSyncExternalStore(z,ce,K)}var Q=0,Ce,Je,Vt,_t,St,Jt,yn;function hn(){}hn.__reactDisabledLog=!0;function An(){{if(Q===0){Ce=console.log,Je=console.info,Vt=console.warn,_t=console.error,St=console.group,Jt=console.groupCollapsed,yn=console.groupEnd;var z={configurable:!0,enumerable:!0,value:hn,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}Q++}}function Yt(){{if(Q--,Q===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},z,{value:Ce}),info:Y({},z,{value:Je}),warn:Y({},z,{value:Vt}),error:Y({},z,{value:_t}),group:Y({},z,{value:St}),groupCollapsed:Y({},z,{value:Jt}),groupEnd:Y({},z,{value:yn})})}Q<0&&te("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Wn=ne.ReactCurrentDispatcher,Zn;function Wi(z,ce,K){{if(Zn===void 0)try{throw Error()}catch(ye){var ue=ye.stack.trim().match(/\n( *(at )?)/);Zn=ue&&ue[1]||""}return`
22
+ `+Zn+z}}var Gi=!1,Cr;{var pr=typeof WeakMap=="function"?WeakMap:Map;Cr=new pr}function di(z,ce){if(!z||Gi)return"";{var K=Cr.get(z);if(K!==void 0)return K}var ue;Gi=!0;var ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Le;Le=Wn.current,Wn.current=null,An();try{if(ce){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(_n){ue=_n}Reflect.construct(z,[],Re)}else{try{Re.call()}catch(_n){ue=_n}z.call(Re.prototype)}}else{try{throw Error()}catch(_n){ue=_n}z()}}catch(_n){if(_n&&ue&&typeof _n.stack=="string"){for(var Xe=_n.stack.split(`
23
+ `),at=ue.stack.split(`
24
+ `),vt=Xe.length-1,ct=at.length-1;vt>=1&&ct>=0&&Xe[vt]!==at[ct];)ct--;for(;vt>=1&&ct>=0;vt--,ct--)if(Xe[vt]!==at[ct]){if(vt!==1||ct!==1)do if(vt--,ct--,ct<0||Xe[vt]!==at[ct]){var Kt=`
25
+ `+Xe[vt].replace(" at new "," at ");return z.displayName&&Kt.includes("<anonymous>")&&(Kt=Kt.replace("<anonymous>",z.displayName)),typeof z=="function"&&Cr.set(z,Kt),Kt}while(vt>=1&&ct>=0);break}}}finally{Gi=!1,Wn.current=Le,Yt(),Error.prepareStackTrace=ye}var Ct=z?z.displayName||z.name:"",At=Ct?Wi(Ct):"";return typeof z=="function"&&Cr.set(z,At),At}function Er(z,ce,K){return di(z,!1)}function vr(z){var ce=z.prototype;return!!(ce&&ce.isReactComponent)}function gr(z,ce,K){if(z==null)return"";if(typeof z=="function")return di(z,vr(z));if(typeof z=="string")return Wi(z);switch(z){case h:return Wi("Suspense");case f:return Wi("SuspenseList")}if(typeof z=="object")switch(z.$$typeof){case x:return Er(z.render);case S:return gr(z.type,ce,K);case C:{var ue=z,ye=ue._payload,Le=ue._init;try{return gr(Le(ye),ce,K)}catch{}}}return""}var Fs={},hi=ne.ReactDebugCurrentFrame;function on(z){if(z){var ce=z._owner,K=gr(z.type,z._source,ce?ce.type:null);hi.setExtraStackFrame(K)}else hi.setExtraStackFrame(null)}function ns(z,ce,K,ue,ye){{var Le=Function.call.bind(Te);for(var Re in z)if(Le(z,Re)){var Xe=void 0;try{if(typeof z[Re]!="function"){var at=Error((ue||"React class")+": "+K+" type `"+Re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[Re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw at.name="Invariant Violation",at}Xe=z[Re](ce,Re,ue,K,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(vt){Xe=vt}Xe&&!(Xe instanceof Error)&&(on(ye),te("%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).",ue||"React class",K,Re,typeof Xe),on(null)),Xe instanceof Error&&!(Xe.message in Fs)&&(Fs[Xe.message]=!0,on(ye),te("Failed %s type: %s",K,Xe.message),on(null))}}}function nr(z){if(z){var ce=z._owner,K=gr(z.type,z._source,ce?ce.type:null);L(K)}else L(null)}var Tt;Tt=!1;function Fr(){if(j.current){var z=Ee(j.current.type);if(z)return`
26
+
27
+ Check the render method of \``+z+"`."}return""}function oi(z){if(z!==void 0){var ce=z.fileName.replace(/^.*[\\\/]/,""),K=z.lineNumber;return`
28
+
29
+ Check your code at `+ce+":"+K+"."}return""}function _r(z){return z!=null?oi(z.__source):""}var jr={};function ma(z){var ce=Fr();if(!ce){var K=typeof z=="string"?z:z.displayName||z.name;K&&(ce=`
30
+
31
+ Check the top-level render call using <`+K+">.")}return ce}function Qn(z,ce){if(!(!z._store||z._store.validated||z.key!=null)){z._store.validated=!0;var K=ma(ce);if(!jr[K]){jr[K]=!0;var ue="";z&&z._owner&&z._owner!==j.current&&(ue=" It was passed a child from "+Ee(z._owner.type)+"."),nr(z),te('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K,ue),nr(null)}}}function Un(z,ce){if(typeof z=="object"){if(tt(z))for(var K=0;K<z.length;K++){var ue=z[K];Ot(ue)&&Qn(ue,ce)}else if(Ot(z))z._store&&(z._store.validated=!0);else if(z){var ye=m(z);if(typeof ye=="function"&&ye!==z.entries)for(var Le=ye.call(z),Re;!(Re=Le.next()).done;)Ot(Re.value)&&Qn(Re.value,ce)}}}function li(z){{var ce=z.type;if(ce==null||typeof ce=="string")return;var K;if(typeof ce=="function")K=ce.propTypes;else if(typeof ce=="object"&&(ce.$$typeof===x||ce.$$typeof===S))K=ce.propTypes;else return;if(K){var ue=Ee(ce);ns(K,z.props,"prop",ue,z)}else if(ce.PropTypes!==void 0&&!Tt){Tt=!0;var ye=Ee(ce);te("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ye||"Unknown")}typeof ce.getDefaultProps=="function"&&!ce.getDefaultProps.isReactClassApproved&&te("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Gn(z){{for(var ce=Object.keys(z.props),K=0;K<ce.length;K++){var ue=ce[K];if(ue!=="children"&&ue!=="key"){nr(z),te("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ue),nr(null);break}}z.ref!==null&&(nr(z),te("Invalid attribute `ref` supplied to `React.Fragment`."),nr(null))}}function Pn(z,ce,K){var ue=yt(z);if(!ue){var ye="";(z===void 0||typeof z=="object"&&z!==null&&Object.keys(z).length===0)&&(ye+=" 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 Le=_r(ce);Le?ye+=Le:ye+=Fr();var Re;z===null?Re="null":tt(z)?Re="array":z!==void 0&&z.$$typeof===_?(Re="<"+(Ee(z.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Re=typeof z,te("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Re,ye)}var Xe=He.apply(this,arguments);if(Xe==null)return Xe;if(ue)for(var at=2;at<arguments.length;at++)Un(arguments[at],z);return z===R?Gn(Xe):li(Xe),Xe}var Bn=!1;function Hs(z){var ce=Pn.bind(null,z);return ce.type=z,Bn||(Bn=!0,ee("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(ce,"type",{enumerable:!1,get:function(){return ee("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:z}),z}}),ce}function ki(z,ce,K){for(var ue=kt.apply(this,arguments),ye=2;ye<arguments.length;ye++)Un(arguments[ye],ue.type);return li(ue),ue}function zs(z,ce){var K=N.transition;N.transition={};var ue=N.transition;N.transition._updatedFibers=new Set;try{z()}finally{if(N.transition=K,K===null&&ue._updatedFibers){var ye=ue._updatedFibers.size;ye>10&&ee("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."),ue._updatedFibers.clear()}}}var Hr=!1,Dr=null;function ys(z){if(Dr===null)try{var ce=("require"+Math.random()).slice(0,7),K=r&&r[ce];Dr=K.call(r,"timers").setImmediate}catch{Dr=function(ye){Hr===!1&&(Hr=!0,typeof MessageChannel>"u"&&te("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 Le=new MessageChannel;Le.port1.onmessage=ye,Le.port2.postMessage(void 0)}}return Dr(z)}var Ri=0,br=!1;function xs(z){{var ce=Ri;Ri++,k.current===null&&(k.current=[]);var K=k.isBatchingLegacy,ue;try{if(k.isBatchingLegacy=!0,ue=z(),!K&&k.didScheduleLegacyUpdate){var ye=k.current;ye!==null&&(k.didScheduleLegacyUpdate=!1,ir(ye))}}catch(Ct){throw kr(ce),Ct}finally{k.isBatchingLegacy=K}if(ue!==null&&typeof ue=="object"&&typeof ue.then=="function"){var Le=ue,Re=!1,Xe={then:function(Ct,At){Re=!0,Le.then(function(_n){kr(ce),Ri===0?Ti(_n,Ct,At):Ct(_n)},function(_n){kr(ce),At(_n)})}};return!br&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Re||(br=!0,te("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 () => ...);"))}),Xe}else{var at=ue;if(kr(ce),Ri===0){var vt=k.current;vt!==null&&(ir(vt),k.current=null);var ct={then:function(Ct,At){k.current===null?(k.current=[],Ti(at,Ct,At)):Ct(at)}};return ct}else{var Kt={then:function(Ct,At){Ct(at)}};return Kt}}}}function kr(z){z!==Ri-1&&te("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Ri=z}function Ti(z,ce,K){{var ue=k.current;if(ue!==null)try{ir(ue),ys(function(){ue.length===0?(k.current=null,ce(z)):Ti(z,ce,K)})}catch(ye){K(ye)}else ce(z)}}var zr=!1;function ir(z){if(!zr){zr=!0;var ce=0;try{for(;ce<z.length;ce++){var K=z[ce];do K=K(!0);while(K!==null)}z.length=0}catch(ue){throw z=z.slice(ce+1),ue}finally{zr=!1}}}var fa=Pn,is=ki,$s=Hs,Li={map:cn,forEach:$n,count:zn,toArray:en,only:kn};s.Children=Li,s.Component=he,s.Fragment=R,s.Profiler=a,s.PureComponent=_e,s.StrictMode=b,s.Suspense=h,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,s.act=xs,s.cloneElement=is,s.createContext=On,s.createElement=fa,s.createFactory=$s,s.createRef=Ie,s.forwardRef=$e,s.isValidElement=Ot,s.lazy=oe,s.memo=gt,s.startTransition=zs,s.unstable_act=xs,s.useCallback=ui,s.useContext=Rt,s.useDebugValue=ii,s.useDeferredValue=ae,s.useEffect=qt,s.useId=Be,s.useImperativeHandle=Jn,s.useInsertionEffect=bn,s.useLayoutEffect=Nn,s.useMemo=Vn,s.useReducer=gn,s.useRef=an,s.useState=pt,s.useSyncExternalStore=xe,s.useTransition=Dt,s.version=d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(rm,rm.exports);var dM=rm.exports;w1.exports=dM;var U=w1.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 r=U,s=Symbol.for("react.element"),d=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),C=Symbol.iterator,y="@@iterator";function l(oe){if(oe===null||typeof oe!="object")return null;var $e=C&&oe[C]||oe[y];return typeof $e=="function"?$e:null}var v=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(oe){{for(var $e=arguments.length,et=new Array($e>1?$e-1:0),yt=1;yt<$e;yt++)et[yt-1]=arguments[yt];p("error",oe,et)}}function p(oe,$e,et){{var yt=v.ReactDebugCurrentFrame,gt=yt.getStackAddendum();gt!==""&&($e+="%s",et=et.concat([gt]));var ft=et.map(function(Rt){return String(Rt)});ft.unshift("Warning: "+$e),Function.prototype.apply.call(console[oe],console,ft)}}var N=!1,k=!1,j=!1,M=!1,D=!1,L;L=Symbol.for("react.module.reference");function A(oe){return!!(typeof oe=="string"||typeof oe=="function"||oe===_||oe===R||D||oe===E||oe===g||oe===x||M||oe===S||N||k||j||typeof oe=="object"&&oe!==null&&(oe.$$typeof===f||oe.$$typeof===h||oe.$$typeof===b||oe.$$typeof===a||oe.$$typeof===u||oe.$$typeof===L||oe.getModuleId!==void 0))}function F(oe,$e,et){var yt=oe.displayName;if(yt)return yt;var gt=$e.displayName||$e.name||"";return gt!==""?et+"("+gt+")":et}function O(oe){return oe.displayName||"Context"}function I(oe){if(oe==null)return null;if(typeof oe.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof oe=="function")return oe.displayName||oe.name||null;if(typeof oe=="string")return oe;switch(oe){case _:return"Fragment";case d:return"Portal";case R:return"Profiler";case E:return"StrictMode";case g:return"Suspense";case x:return"SuspenseList"}if(typeof oe=="object")switch(oe.$$typeof){case a:var $e=oe;return O($e)+".Consumer";case b:var et=oe;return O(et._context)+".Provider";case u:return F(oe,oe.render,"ForwardRef");case h:var yt=oe.displayName||null;return yt!==null?yt:I(oe.type)||"Memo";case f:{var gt=oe,ft=gt._payload,Rt=gt._init;try{return I(Rt(ft))}catch{return null}}}return null}var G=Object.assign,ne=0,ee,te,se,B,W,X,Y;function ve(){}ve.__reactDisabledLog=!0;function he(){{if(ne===0){ee=console.log,te=console.info,se=console.warn,B=console.error,W=console.group,X=console.groupCollapsed,Y=console.groupEnd;var oe={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:oe,log:oe,warn:oe,error:oe,group:oe,groupCollapsed:oe,groupEnd:oe})}ne++}}function Me(){{if(ne--,ne===0){var oe={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},oe,{value:ee}),info:G({},oe,{value:te}),warn:G({},oe,{value:se}),error:G({},oe,{value:B}),group:G({},oe,{value:W}),groupCollapsed:G({},oe,{value:X}),groupEnd:G({},oe,{value:Y})})}ne<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var me=v.ReactCurrentDispatcher,ie;function $(oe,$e,et){{if(ie===void 0)try{throw Error()}catch(gt){var yt=gt.stack.trim().match(/\n( *(at )?)/);ie=yt&&yt[1]||""}return`
40
+ `+ie+oe}}var _e=!1,de;{var Ie=typeof WeakMap=="function"?WeakMap:Map;de=new Ie}function Ue(oe,$e){if(!oe||_e)return"";{var et=de.get(oe);if(et!==void 0)return et}var yt;_e=!0;var gt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ft;ft=me.current,me.current=null,he();try{if($e){var Rt=function(){throw Error()};if(Object.defineProperty(Rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Rt,[])}catch(Vn){yt=Vn}Reflect.construct(oe,[],Rt)}else{try{Rt.call()}catch(Vn){yt=Vn}oe.call(Rt.prototype)}}else{try{throw Error()}catch(Vn){yt=Vn}oe()}}catch(Vn){if(Vn&&yt&&typeof Vn.stack=="string"){for(var pt=Vn.stack.split(`
41
+ `),gn=yt.stack.split(`
42
+ `),an=pt.length-1,qt=gn.length-1;an>=1&&qt>=0&&pt[an]!==gn[qt];)qt--;for(;an>=1&&qt>=0;an--,qt--)if(pt[an]!==gn[qt]){if(an!==1||qt!==1)do if(an--,qt--,qt<0||pt[an]!==gn[qt]){var bn=`
43
+ `+pt[an].replace(" at new "," at ");return oe.displayName&&bn.includes("<anonymous>")&&(bn=bn.replace("<anonymous>",oe.displayName)),typeof oe=="function"&&de.set(oe,bn),bn}while(an>=1&&qt>=0);break}}}finally{_e=!1,me.current=ft,Me(),Error.prepareStackTrace=gt}var Nn=oe?oe.displayName||oe.name:"",ui=Nn?$(Nn):"";return typeof oe=="function"&&de.set(oe,ui),ui}function tt(oe,$e,et){return Ue(oe,!1)}function Qe(oe){var $e=oe.prototype;return!!($e&&$e.isReactComponent)}function st(oe,$e,et){if(oe==null)return"";if(typeof oe=="function")return Ue(oe,Qe(oe));if(typeof oe=="string")return $(oe);switch(oe){case g:return $("Suspense");case x:return $("SuspenseList")}if(typeof oe=="object")switch(oe.$$typeof){case u:return tt(oe.render);case h:return st(oe.type,$e,et);case f:{var yt=oe,gt=yt._payload,ft=yt._init;try{return st(ft(gt),$e,et)}catch{}}}return""}var Nt=Object.prototype.hasOwnProperty,J={},bt=v.ReactDebugCurrentFrame;function Gt(oe){if(oe){var $e=oe._owner,et=st(oe.type,oe._source,$e?$e.type:null);bt.setExtraStackFrame(et)}else bt.setExtraStackFrame(null)}function Ee(oe,$e,et,yt,gt){{var ft=Function.call.bind(Nt);for(var Rt in oe)if(ft(oe,Rt)){var pt=void 0;try{if(typeof oe[Rt]!="function"){var gn=Error((yt||"React class")+": "+et+" type `"+Rt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof oe[Rt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw gn.name="Invariant Violation",gn}pt=oe[Rt]($e,Rt,yt,et,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(an){pt=an}pt&&!(pt instanceof Error)&&(Gt(gt),m("%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).",yt||"React class",et,Rt,typeof pt),Gt(null)),pt instanceof Error&&!(pt.message in J)&&(J[pt.message]=!0,Gt(gt),m("Failed %s type: %s",et,pt.message),Gt(null))}}}var Te=Array.isArray;function Ge(oe){return Te(oe)}function re(oe){{var $e=typeof Symbol=="function"&&Symbol.toStringTag,et=$e&&oe[Symbol.toStringTag]||oe.constructor.name||"Object";return et}}function We(oe){try{return Ye(oe),!1}catch{return!0}}function Ye(oe){return""+oe}function ge(oe){if(We(oe))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",re(oe)),Ye(oe)}var Ze=v.ReactCurrentOwner,je={key:!0,ref:!0,__self:!0,__source:!0},Pe,be,Ae;Ae={};function He(oe){if(Nt.call(oe,"ref")){var $e=Object.getOwnPropertyDescriptor(oe,"ref").get;if($e&&$e.isReactWarning)return!1}return oe.ref!==void 0}function wt(oe){if(Nt.call(oe,"key")){var $e=Object.getOwnPropertyDescriptor(oe,"key").get;if($e&&$e.isReactWarning)return!1}return oe.key!==void 0}function kt(oe,$e){if(typeof oe.ref=="string"&&Ze.current&&$e&&Ze.current.stateNode!==$e){var et=I(Ze.current.type);Ae[et]||(m('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',I(Ze.current.type),oe.ref),Ae[et]=!0)}}function Ot(oe,$e){{var et=function(){Pe||(Pe=!0,m("%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)",$e))};et.isReactWarning=!0,Object.defineProperty(oe,"key",{get:et,configurable:!0})}}function Pt(oe,$e){{var et=function(){be||(be=!0,m("%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)",$e))};et.isReactWarning=!0,Object.defineProperty(oe,"ref",{get:et,configurable:!0})}}var dn=function(oe,$e,et,yt,gt,ft,Rt){var pt={$$typeof:s,type:oe,key:$e,ref:et,props:Rt,_owner:ft};return pt._store={},Object.defineProperty(pt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(pt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:yt}),Object.defineProperty(pt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:gt}),Object.freeze&&(Object.freeze(pt.props),Object.freeze(pt)),pt};function Qt(oe,$e,et,yt,gt){{var ft,Rt={},pt=null,gn=null;et!==void 0&&(ge(et),pt=""+et),wt($e)&&(ge($e.key),pt=""+$e.key),He($e)&&(gn=$e.ref,kt($e,gt));for(ft in $e)Nt.call($e,ft)&&!je.hasOwnProperty(ft)&&(Rt[ft]=$e[ft]);if(oe&&oe.defaultProps){var an=oe.defaultProps;for(ft in an)Rt[ft]===void 0&&(Rt[ft]=an[ft])}if(pt||gn){var qt=typeof oe=="function"?oe.displayName||oe.name||"Unknown":oe;pt&&Ot(Rt,qt),gn&&Pt(Rt,qt)}return dn(oe,pt,gn,gt,yt,Ze.current,Rt)}}var Mt=v.ReactCurrentOwner,Ft=v.ReactDebugCurrentFrame;function sn(oe){if(oe){var $e=oe._owner,et=st(oe.type,oe._source,$e?$e.type:null);Ft.setExtraStackFrame(et)}else Ft.setExtraStackFrame(null)}var Dn;Dn=!1;function it(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===s}function cn(){{if(Mt.current){var oe=I(Mt.current.type);if(oe)return`
44
+
45
+ Check the render method of \``+oe+"`."}return""}}function zn(oe){{if(oe!==void 0){var $e=oe.fileName.replace(/^.*[\\\/]/,""),et=oe.lineNumber;return`
46
+
47
+ Check your code at `+$e+":"+et+"."}return""}}var $n={};function en(oe){{var $e=cn();if(!$e){var et=typeof oe=="string"?oe:oe.displayName||oe.name;et&&($e=`
48
+
49
+ Check the top-level render call using <`+et+">.")}return $e}}function kn(oe,$e){{if(!oe._store||oe._store.validated||oe.key!=null)return;oe._store.validated=!0;var et=en($e);if($n[et])return;$n[et]=!0;var yt="";oe&&oe._owner&&oe._owner!==Mt.current&&(yt=" It was passed a child from "+I(oe._owner.type)+"."),sn(oe),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',et,yt),sn(null)}}function On(oe,$e){{if(typeof oe!="object")return;if(Ge(oe))for(var et=0;et<oe.length;et++){var yt=oe[et];it(yt)&&kn(yt,$e)}else if(it(oe))oe._store&&(oe._store.validated=!0);else if(oe){var gt=l(oe);if(typeof gt=="function"&&gt!==oe.entries)for(var ft=gt.call(oe),Rt;!(Rt=ft.next()).done;)it(Rt.value)&&kn(Rt.value,$e)}}}function ni(oe){{var $e=oe.type;if($e==null||typeof $e=="string")return;var et;if(typeof $e=="function")et=$e.propTypes;else if(typeof $e=="object"&&($e.$$typeof===u||$e.$$typeof===h))et=$e.propTypes;else return;if(et){var yt=I($e);Ee(et,oe.props,"prop",yt,oe)}else if($e.PropTypes!==void 0&&!Dn){Dn=!0;var gt=I($e);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",gt||"Unknown")}typeof $e.getDefaultProps=="function"&&!$e.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nn(oe){{for(var $e=Object.keys(oe.props),et=0;et<$e.length;et++){var yt=$e[et];if(yt!=="children"&&yt!=="key"){sn(oe),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",yt),sn(null);break}}oe.ref!==null&&(sn(oe),m("Invalid attribute `ref` supplied to `React.Fragment`."),sn(null))}}var En={};function vn(oe,$e,et,yt,gt,ft){{var Rt=A(oe);if(!Rt){var pt="";(oe===void 0||typeof oe=="object"&&oe!==null&&Object.keys(oe).length===0)&&(pt+=" 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 gn=zn(gt);gn?pt+=gn:pt+=cn();var an;oe===null?an="null":Ge(oe)?an="array":oe!==void 0&&oe.$$typeof===s?(an="<"+(I(oe.type)||"Unknown")+" />",pt=" Did you accidentally export a JSX literal instead of a component?"):an=typeof oe,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",an,pt)}var qt=Qt(oe,$e,et,gt,ft);if(qt==null)return qt;if(Rt){var bn=$e.children;if(bn!==void 0)if(yt)if(Ge(bn)){for(var Nn=0;Nn<bn.length;Nn++)On(bn[Nn],oe);Object.freeze&&Object.freeze(bn)}else m("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 On(bn,oe)}if(Nt.call($e,"key")){var ui=I(oe),Vn=Object.keys($e).filter(function(Dt){return Dt!=="key"}),Jn=Vn.length>0?"{key: someKey, "+Vn.join(": ..., ")+": ...}":"{key: someKey}";if(!En[ui+Jn]){var ii=Vn.length>0?"{"+Vn.join(": ..., ")+": ...}":"{}";m(`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} />`,Jn,ui,ii,ui),En[ui+Jn]=!0}}return oe===_?nn(qt):ni(qt),qt}}var Xn=vn;Vg.Fragment=_,Vg.jsxDEV=Xn})();x1.exports=Vg;var o=x1.exports,N1={exports:{}},Pr={},S1={exports:{}},C1={};(function(r){/**
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,d=5;function _(be,Ae){var He=be.length;be.push(Ae),b(be,Ae,He)}function E(be){return be.length===0?null:be[0]}function R(be){if(be.length===0)return null;var Ae=be[0],He=be.pop();return He!==Ae&&(be[0]=He,a(be,He,0)),Ae}function b(be,Ae,He){for(var wt=He;wt>0;){var kt=wt-1>>>1,Ot=be[kt];if(u(Ot,Ae)>0)be[kt]=Ae,be[wt]=Ot,wt=kt;else return}}function a(be,Ae,He){for(var wt=He,kt=be.length,Ot=kt>>>1;wt<Ot;){var Pt=(wt+1)*2-1,dn=be[Pt],Qt=Pt+1,Mt=be[Qt];if(u(dn,Ae)<0)Qt<kt&&u(Mt,dn)<0?(be[wt]=Mt,be[Qt]=Ae,wt=Qt):(be[wt]=dn,be[Pt]=Ae,wt=Pt);else if(Qt<kt&&u(Mt,Ae)<0)be[wt]=Mt,be[Qt]=Ae,wt=Qt;else return}}function u(be,Ae){var He=be.sortIndex-Ae.sortIndex;return He!==0?He:be.id-Ae.id}var g=1,x=2,h=3,f=4,S=5;function C(be,Ae){}var y=typeof performance=="object"&&typeof performance.now=="function";if(y){var l=performance;r.unstable_now=function(){return l.now()}}else{var v=Date,m=v.now();r.unstable_now=function(){return v.now()-m}}var p=1073741823,N=-1,k=250,j=5e3,M=1e4,D=p,L=[],A=[],F=1,O=null,I=h,G=!1,ne=!1,ee=!1,te=typeof setTimeout=="function"?setTimeout:null,se=typeof clearTimeout=="function"?clearTimeout:null,B=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 Ae=E(A);Ae!==null;){if(Ae.callback===null)R(A);else if(Ae.startTime<=be)R(A),Ae.sortIndex=Ae.expirationTime,_(L,Ae);else return;Ae=E(A)}}function X(be){if(ee=!1,W(be),!ne)if(E(L)!==null)ne=!0,Ye(Y);else{var Ae=E(A);Ae!==null&&ge(X,Ae.startTime-be)}}function Y(be,Ae){ne=!1,ee&&(ee=!1,Ze()),G=!0;var He=I;try{var wt;if(!s)return ve(be,Ae)}finally{O=null,I=He,G=!1}}function ve(be,Ae){var He=Ae;for(W(He),O=E(L);O!==null&&!(O.expirationTime>He&&(!be||bt()));){var wt=O.callback;if(typeof wt=="function"){O.callback=null,I=O.priorityLevel;var kt=O.expirationTime<=He,Ot=wt(kt);He=r.unstable_now(),typeof Ot=="function"?O.callback=Ot:O===E(L)&&R(L),W(He)}else R(L);O=E(L)}if(O!==null)return!0;var Pt=E(A);return Pt!==null&&ge(X,Pt.startTime-He),!1}function he(be,Ae){switch(be){case g:case x:case h:case f:case S:break;default:be=h}var He=I;I=be;try{return Ae()}finally{I=He}}function Me(be){var Ae;switch(I){case g:case x:case h:Ae=h;break;default:Ae=I;break}var He=I;I=Ae;try{return be()}finally{I=He}}function me(be){var Ae=I;return function(){var He=I;I=Ae;try{return be.apply(this,arguments)}finally{I=He}}}function ie(be,Ae,He){var wt=r.unstable_now(),kt;if(typeof He=="object"&&He!==null){var Ot=He.delay;typeof Ot=="number"&&Ot>0?kt=wt+Ot:kt=wt}else kt=wt;var Pt;switch(be){case g:Pt=N;break;case x:Pt=k;break;case S:Pt=D;break;case f:Pt=M;break;case h:default:Pt=j;break}var dn=kt+Pt,Qt={id:F++,callback:Ae,priorityLevel:be,startTime:kt,expirationTime:dn,sortIndex:-1};return kt>wt?(Qt.sortIndex=kt,_(A,Qt),E(L)===null&&Qt===E(A)&&(ee?Ze():ee=!0,ge(X,kt-wt))):(Qt.sortIndex=dn,_(L,Qt),!ne&&!G&&(ne=!0,Ye(Y))),Qt}function $(){}function _e(){!ne&&!G&&(ne=!0,Ye(Y))}function de(){return E(L)}function Ie(be){be.callback=null}function Ue(){return I}var tt=!1,Qe=null,st=-1,Nt=d,J=-1;function bt(){var be=r.unstable_now()-J;return!(be<Nt)}function Gt(){}function Ee(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?Nt=Math.floor(1e3/be):Nt=d}var Te=function(){if(Qe!==null){var be=r.unstable_now();J=be;var Ae=!0,He=!0;try{He=Qe(Ae,be)}finally{He?Ge():(tt=!1,Qe=null)}}else tt=!1},Ge;if(typeof B=="function")Ge=function(){B(Te)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,We=re.port2;re.port1.onmessage=Te,Ge=function(){We.postMessage(null)}}else Ge=function(){te(Te,0)};function Ye(be){Qe=be,tt||(tt=!0,Ge())}function ge(be,Ae){st=te(function(){be(r.unstable_now())},Ae)}function Ze(){se(st),st=-1}var je=Gt,Pe=null;r.unstable_IdlePriority=S,r.unstable_ImmediatePriority=g,r.unstable_LowPriority=f,r.unstable_NormalPriority=h,r.unstable_Profiling=Pe,r.unstable_UserBlockingPriority=x,r.unstable_cancelCallback=Ie,r.unstable_continueExecution=_e,r.unstable_forceFrameRate=Ee,r.unstable_getCurrentPriorityLevel=Ue,r.unstable_getFirstCallbackNode=de,r.unstable_next=Me,r.unstable_pauseExecution=$,r.unstable_requestPaint=je,r.unstable_runWithPriority=he,r.unstable_scheduleCallback=ie,r.unstable_shouldYield=bt,r.unstable_wrapCallback=me,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(C1);S1.exports=C1;var hM=S1.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 r=U,s=hM,d=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=!1;function E(e){_=e}function R(e){if(!_){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a("warn",e,n)}}function b(e){if(!_){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a("error",e,n)}}function a(e,t,n){{var i=d.ReactDebugCurrentFrame,c=i.getStackAddendum();c!==""&&(t+="%s",n=n.concat([c]));var w=n.map(function(T){return String(T)});w.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,w)}}var u=0,g=1,x=2,h=3,f=4,S=5,C=6,y=7,l=8,v=9,m=10,p=11,N=12,k=13,j=14,M=15,D=16,L=17,A=18,F=19,O=21,I=22,G=23,ne=24,ee=25,te=!0,se=!1,B=!1,W=!1,X=!1,Y=!0,ve=!0,he=!0,Me=!0,me=new Set,ie={},$={};function _e(e,t){de(e,t),de(e+"Capture",t)}function de(e,t){ie[e]&&b("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),ie[e]=t;{var n=e.toLowerCase();$[n]=e,e==="onDoubleClick"&&($.ondblclick=e)}for(var i=0;i<t.length;i++)me.add(t[i])}var Ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ue=Object.prototype.hasOwnProperty;function tt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Qe(e){try{return st(e),!1}catch{return!0}}function st(e){return""+e}function Nt(e,t){if(Qe(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,tt(e)),st(e)}function J(e){if(Qe(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tt(e)),st(e)}function bt(e,t){if(Qe(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,tt(e)),st(e)}function Gt(e,t){if(Qe(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,tt(e)),st(e)}function Ee(e){if(Qe(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.",tt(e)),st(e)}function Te(e){if(Qe(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.",tt(e)),st(e)}var Ge=0,re=1,We=2,Ye=3,ge=4,Ze=5,je=6,Pe=":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=Pe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ae=new RegExp("^["+Pe+"]["+be+"]*$"),He={},wt={};function kt(e){return Ue.call(wt,e)?!0:Ue.call(He,e)?!1:Ae.test(e)?(wt[e]=!0,!0):(He[e]=!0,b("Invalid attribute name: `%s`",e),!1)}function Ot(e,t,n){return t!==null?t.type===Ge:n?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function Pt(e,t,n,i){if(n!==null&&n.type===Ge)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(i)return!1;if(n!==null)return!n.acceptsBooleans;var c=e.toLowerCase().slice(0,5);return c!=="data-"&&c!=="aria-"}default:return!1}}function dn(e,t,n,i){if(t===null||typeof t>"u"||Pt(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case Ye:return!t;case ge:return t===!1;case Ze:return isNaN(t);case je:return isNaN(t)||t<1}return!1}function Qt(e){return Ft.hasOwnProperty(e)?Ft[e]:null}function Mt(e,t,n,i,c,w,T){this.acceptsBooleans=t===We||t===Ye||t===ge,this.attributeName=i,this.attributeNamespace=c,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=w,this.removeEmptyString=T}var Ft={},sn=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];sn.forEach(function(e){Ft[e]=new Mt(e,Ge,!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];Ft[t]=new Mt(t,re,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new Mt(e,We,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ft[e]=new Mt(e,We,!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){Ft[e]=new Mt(e,Ye,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new Mt(e,Ye,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Ft[e]=new Mt(e,ge,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Ft[e]=new Mt(e,je,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Ft[e]=new Mt(e,Ze,!1,e.toLowerCase(),null,!1,!1)});var Dn=/[\-\:]([a-z])/g,it=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(Dn,it);Ft[t]=new Mt(t,re,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(Dn,it);Ft[t]=new Mt(t,re,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Dn,it);Ft[t]=new Mt(t,re,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Ft[e]=new Mt(e,re,!1,e.toLowerCase(),null,!1,!1)});var cn="xlinkHref";Ft[cn]=new Mt("xlinkHref",re,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Ft[e]=new Mt(e,re,!1,e.toLowerCase(),null,!0,!0)});var zn=/^[\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,$n=!1;function en(e){!$n&&zn.test(e)&&($n=!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 kn(e,t,n,i){if(i.mustUseProperty){var c=i.propertyName;return e[c]}else{Nt(n,t),i.sanitizeURL&&en(""+n);var w=i.attributeName,T=null;if(i.type===ge){if(e.hasAttribute(w)){var P=e.getAttribute(w);return P===""?!0:dn(t,n,i,!1)?P:P===""+n?n:P}}else if(e.hasAttribute(w)){if(dn(t,n,i,!1))return e.getAttribute(w);if(i.type===Ye)return n;T=e.getAttribute(w)}return dn(t,n,i,!1)?T===null?n:T:T===""+n?n:T}}function On(e,t,n,i){{if(!kt(t))return;if(!e.hasAttribute(t))return n===void 0?void 0:null;var c=e.getAttribute(t);return Nt(n,t),c===""+n?n:c}}function ni(e,t,n,i){var c=Qt(t);if(!Ot(t,c,i)){if(dn(t,n,c,i)&&(n=null),i||c===null){if(kt(t)){var w=t;n===null?e.removeAttribute(w):(Nt(n,t),e.setAttribute(w,""+n))}return}var T=c.mustUseProperty;if(T){var P=c.propertyName;if(n===null){var H=c.type;e[P]=H===Ye?!1:""}else e[P]=n;return}var q=c.attributeName,Z=c.attributeNamespace;if(n===null)e.removeAttribute(q);else{var pe=c.type,fe;pe===Ye||pe===ge&&n===!0?fe="":(Nt(n,q),fe=""+n,c.sanitizeURL&&en(fe.toString())),Z?e.setAttributeNS(Z,q,fe):e.setAttribute(q,fe)}}}var nn=Symbol.for("react.element"),En=Symbol.for("react.portal"),vn=Symbol.for("react.fragment"),Xn=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),$e=Symbol.for("react.provider"),et=Symbol.for("react.context"),yt=Symbol.for("react.forward_ref"),gt=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),Rt=Symbol.for("react.memo"),pt=Symbol.for("react.lazy"),gn=Symbol.for("react.scope"),an=Symbol.for("react.debug_trace_mode"),qt=Symbol.for("react.offscreen"),bn=Symbol.for("react.legacy_hidden"),Nn=Symbol.for("react.cache"),ui=Symbol.for("react.tracing_marker"),Vn=Symbol.iterator,Jn="@@iterator";function ii(e){if(e===null||typeof e!="object")return null;var t=Vn&&e[Vn]||e[Jn];return typeof t=="function"?t:null}var Dt=Object.assign,ae=0,Be,xe,Q,Ce,Je,Vt,_t;function St(){}St.__reactDisabledLog=!0;function Jt(){{if(ae===0){Be=console.log,xe=console.info,Q=console.warn,Ce=console.error,Je=console.group,Vt=console.groupCollapsed,_t=console.groupEnd;var e={configurable:!0,enumerable:!0,value:St,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}ae++}}function yn(){{if(ae--,ae===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Dt({},e,{value:Be}),info:Dt({},e,{value:xe}),warn:Dt({},e,{value:Q}),error:Dt({},e,{value:Ce}),group:Dt({},e,{value:Je}),groupCollapsed:Dt({},e,{value:Vt}),groupEnd:Dt({},e,{value:_t})})}ae<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var hn=d.ReactCurrentDispatcher,An;function Yt(e,t,n){{if(An===void 0)try{throw Error()}catch(c){var i=c.stack.trim().match(/\n( *(at )?)/);An=i&&i[1]||""}return`
71
+ `+An+e}}var Wn=!1,Zn;{var Wi=typeof WeakMap=="function"?WeakMap:Map;Zn=new Wi}function Gi(e,t){if(!e||Wn)return"";{var n=Zn.get(e);if(n!==void 0)return n}var i;Wn=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=hn.current,hn.current=null,Jt();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(ke){i=ke}Reflect.construct(e,[],T)}else{try{T.call()}catch(ke){i=ke}e.call(T.prototype)}}else{try{throw Error()}catch(ke){i=ke}e()}}catch(ke){if(ke&&i&&typeof ke.stack=="string"){for(var P=ke.stack.split(`
72
+ `),H=i.stack.split(`
73
+ `),q=P.length-1,Z=H.length-1;q>=1&&Z>=0&&P[q]!==H[Z];)Z--;for(;q>=1&&Z>=0;q--,Z--)if(P[q]!==H[Z]){if(q!==1||Z!==1)do if(q--,Z--,Z<0||P[q]!==H[Z]){var pe=`
74
+ `+P[q].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),typeof e=="function"&&Zn.set(e,pe),pe}while(q>=1&&Z>=0);break}}}finally{Wn=!1,hn.current=w,yn(),Error.prepareStackTrace=c}var fe=e?e.displayName||e.name:"",De=fe?Yt(fe):"";return typeof e=="function"&&Zn.set(e,De),De}function Cr(e,t,n){return Gi(e,!0)}function pr(e,t,n){return Gi(e,!1)}function di(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Er(e,t,n){if(e==null)return"";if(typeof e=="function")return Gi(e,di(e));if(typeof e=="string")return Yt(e);switch(e){case gt:return Yt("Suspense");case ft:return Yt("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case yt:return pr(e.render);case Rt:return Er(e.type,t,n);case pt:{var i=e,c=i._payload,w=i._init;try{return Er(w(c),t,n)}catch{}}}return""}function vr(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case S:return Yt(e.type);case D:return Yt("Lazy");case k:return Yt("Suspense");case F:return Yt("SuspenseList");case u:case x:case M:return pr(e.type);case p:return pr(e.type.render);case g:return Cr(e.type);default:return""}}function gr(e){try{var t="",n=e;do t+=vr(n),n=n.return;while(n);return t}catch(i){return`
75
+ Error generating stack: `+i.message+`
76
+ `+i.stack}}function Fs(e,t,n){var i=e.displayName;if(i)return i;var c=t.displayName||t.name||"";return c!==""?n+"("+c+")":n}function hi(e){return e.displayName||"Context"}function on(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 vn:return"Fragment";case En:return"Portal";case oe:return"Profiler";case Xn:return"StrictMode";case gt:return"Suspense";case ft:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case et:var t=e;return hi(t)+".Consumer";case $e:var n=e;return hi(n._context)+".Provider";case yt:return Fs(e,e.render,"ForwardRef");case Rt:var i=e.displayName||null;return i!==null?i:on(e.type)||"Memo";case pt:{var c=e,w=c._payload,T=c._init;try{return on(T(w))}catch{return null}}}return null}function ns(e,t,n){var i=t.displayName||t.name||"";return e.displayName||(i!==""?n+"("+i+")":n)}function nr(e){return e.displayName||"Context"}function Tt(e){var t=e.tag,n=e.type;switch(t){case ne:return"Cache";case v:var i=n;return nr(i)+".Consumer";case m:var c=n;return nr(c._context)+".Provider";case A:return"DehydratedFragment";case p:return ns(n,n.render,"ForwardRef");case y:return"Fragment";case S:return n;case f:return"Portal";case h:return"Root";case C:return"Text";case D:return on(n);case l:return n===Xn?"StrictMode":"Mode";case I:return"Offscreen";case N:return"Profiler";case O:return"Scope";case k:return"Suspense";case F:return"SuspenseList";case ee:return"TracingMarker";case g:case u:case L:case x:case j:case M:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break}return null}var Fr=d.ReactDebugCurrentFrame,oi=null,_r=!1;function jr(){{if(oi===null)return null;var e=oi._debugOwner;if(e!==null&&typeof e<"u")return Tt(e)}return null}function ma(){return oi===null?"":gr(oi)}function Qn(){Fr.getCurrentStack=null,oi=null,_r=!1}function Un(e){Fr.getCurrentStack=e===null?null:ma,oi=e,_r=!1}function li(){return oi}function Gn(e){_r=e}function Pn(e){return""+e}function Bn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Te(e),e;default:return""}}var Hs={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function ki(e,t){Hs[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 zs(e){var t=e.type,n=e.nodeName;return n&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hr(e){return e._valueTracker}function Dr(e){e._valueTracker=null}function ys(e){var t="";return e&&(zs(e)?t=e.checked?"true":"false":t=e.value),t}function Ri(e){var t=zs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Te(e[t]);var i=""+e[t];if(!(e.hasOwnProperty(t)||typeof n>"u"||typeof n.get!="function"||typeof n.set!="function")){var c=n.get,w=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(P){Te(P),i=""+P,w.call(this,P)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var T={getValue:function(){return i},setValue:function(P){Te(P),i=""+P},stopTracking:function(){Dr(e),delete e[t]}};return T}}function br(e){Hr(e)||(e._valueTracker=Ri(e))}function xs(e){if(!e)return!1;var t=Hr(e);if(!t)return!0;var n=t.getValue(),i=ys(e);return i!==n?(t.setValue(i),!0):!1}function kr(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 Ti=!1,zr=!1,ir=!1,fa=!1;function is(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function $s(e,t){var n=e,i=t.checked,c=Dt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??n._wrapperState.initialChecked});return c}function Li(e,t){ki("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!zr&&(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",jr()||"A component",t.type),zr=!0),t.value!==void 0&&t.defaultValue!==void 0&&!Ti&&(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",jr()||"A component",t.type),Ti=!0);var n=e,i=t.defaultValue==null?"":t.defaultValue;n._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:Bn(t.value!=null?t.value:i),controlled:is(t)}}function z(e,t){var n=e,i=t.checked;i!=null&&ni(n,"checked",i,!1)}function ce(e,t){var n=e;{var i=is(t);!n._wrapperState.controlled&&i&&!fa&&(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"),fa=!0),n._wrapperState.controlled&&!i&&!ir&&(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"),ir=!0)}z(e,t);var c=Bn(t.value),w=t.type;if(c!=null)w==="number"?(c===0&&n.value===""||n.value!=c)&&(n.value=Pn(c)):n.value!==Pn(c)&&(n.value=Pn(c));else if(w==="submit"||w==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?Le(n,t.type,c):t.hasOwnProperty("defaultValue")&&Le(n,t.type,Bn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function K(e,t,n){var i=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var c=t.type,w=c==="submit"||c==="reset";if(w&&(t.value===void 0||t.value===null))return;var T=Pn(i._wrapperState.initialValue);n||T!==i.value&&(i.value=T),i.defaultValue=T}var P=i.name;P!==""&&(i.name=""),i.defaultChecked=!i.defaultChecked,i.defaultChecked=!!i._wrapperState.initialChecked,P!==""&&(i.name=P)}function ue(e,t){var n=e;ce(n,t),ye(n,t)}function ye(e,t){var n=t.name;if(t.type==="radio"&&n!=null){for(var i=e;i.parentNode;)i=i.parentNode;Nt(n,"name");for(var c=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),w=0;w<c.length;w++){var T=c[w];if(!(T===e||T.form!==e.form)){var P=Td(T);if(!P)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");xs(T),ce(T,P)}}}}function Le(e,t,n){(t!=="number"||kr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=Pn(e._wrapperState.initialValue):e.defaultValue!==Pn(n)&&(e.defaultValue=Pn(n)))}var Re=!1,Xe=!1,at=!1;function vt(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?r.Children.forEach(t.children,function(n){n!=null&&(typeof n=="string"||typeof n=="number"||Xe||(Xe=!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&&(at||(at=!0,b("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!Re&&(b("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Re=!0)}function ct(e,t){t.value!=null&&e.setAttribute("value",Pn(Bn(t.value)))}var Kt=Array.isArray;function Ct(e){return Kt(e)}var At;At=!1;function _n(){var e=jr();return e?`
77
+
78
+ Check the render method of \``+e+"`.":""}var Mi=["value","defaultValue"];function rs(e){{ki("select",e);for(var t=0;t<Mi.length;t++){var n=Mi[t];if(e[n]!=null){var i=Ct(e[n]);e.multiple&&!i?b("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,_n()):!e.multiple&&i&&b("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,_n())}}}}function rr(e,t,n,i){var c=e.options;if(t){for(var w=n,T={},P=0;P<w.length;P++)T["$"+w[P]]=!0;for(var H=0;H<c.length;H++){var q=T.hasOwnProperty("$"+c[H].value);c[H].selected!==q&&(c[H].selected=q),q&&i&&(c[H].defaultSelected=!0)}}else{for(var Z=Pn(Bn(n)),pe=null,fe=0;fe<c.length;fe++){if(c[fe].value===Z){c[fe].selected=!0,i&&(c[fe].defaultSelected=!0);return}pe===null&&!c[fe].disabled&&(pe=c[fe])}pe!==null&&(pe.selected=!0)}}function ss(e,t){return Dt({},t,{value:void 0})}function sr(e,t){var n=e;rs(t),n._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!At&&(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"),At=!0)}function pa(e,t){var n=e;n.multiple=!!t.multiple;var i=t.value;i!=null?rr(n,!!t.multiple,i,!1):t.defaultValue!=null&&rr(n,!!t.multiple,t.defaultValue,!0)}function za(e,t){var n=e,i=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var c=t.value;c!=null?rr(n,!!t.multiple,c,!1):i!==!!t.multiple&&(t.defaultValue!=null?rr(n,!!t.multiple,t.defaultValue,!0):rr(n,!!t.multiple,t.multiple?[]:"",!1))}function Ao(e,t){var n=e,i=t.value;i!=null&&rr(n,!!t.multiple,i,!1)}var Gl=!1;function Uo(e,t){var n=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var i=Dt({},t,{value:void 0,defaultValue:void 0,children:Pn(n._wrapperState.initialValue)});return i}function ql(e,t){var n=e;ki("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!Gl&&(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",jr()||"A component"),Gl=!0);var i=t.value;if(i==null){var c=t.children,w=t.defaultValue;if(c!=null){b("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(w!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ct(c)){if(c.length>1)throw new Error("<textarea> can only have at most one child.");c=c[0]}w=c}}w==null&&(w=""),i=w}n._wrapperState={initialValue:Bn(i)}}function Yl(e,t){var n=e,i=Bn(t.value),c=Bn(t.defaultValue);if(i!=null){var w=Pn(i);w!==n.value&&(n.value=w),t.defaultValue==null&&n.defaultValue!==w&&(n.defaultValue=w)}c!=null&&(n.defaultValue=Pn(c))}function Kl(e,t){var n=e,i=n.textContent;i===n._wrapperState.initialValue&&i!==""&&i!==null&&(n.value=i)}function Gu(e,t){Yl(e,t)}var $r="http://www.w3.org/1999/xhtml",qu="http://www.w3.org/1998/Math/MathML",Oo="http://www.w3.org/2000/svg";function Vo(e){switch(e){case"svg":return Oo;case"math":return qu;default:return $r}}function Po(e,t){return e==null||e===$r?Vo(t):e===Oo&&t==="foreignObject"?$r:e}var Yu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,c){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,c)})}:e},$a,Xl=Yu(function(e,t){if(e.namespaceURI===Oo&&!("innerHTML"in e)){$a=$a||document.createElement("div"),$a.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=$a.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild);return}e.innerHTML=t}),Ai=1,Wr=3,ei=8,Gr=9,Bo=11,Wa=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===Wr){n.nodeValue=t;return}}e.textContent=t},le={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"]},Se={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 ze(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var rt=["Webkit","ms","Moz","O"];Object.keys(Se).forEach(function(e){rt.forEach(function(t){Se[ze(t,e)]=Se[e]})});function nt(e,t,n){var i=t==null||typeof t=="boolean"||t==="";return i?"":!n&&typeof t=="number"&&t!==0&&!(Se.hasOwnProperty(e)&&Se[e])?t+"px":(Gt(t,e),(""+t).trim())}var Et=/([A-Z])/g,Ht=/^ms-/;function Xt(e){return e.replace(Et,"-$1").toLowerCase().replace(Ht,"-ms-")}var mi=function(){};{var Fn=/^(?:webkit|moz|o)[A-Z]/,va=/^-ms-/,ws=/-(.)/g,Ga=/;\s*$/,Ns={},as={},I_=!1,F_=!1,oC=function(e){return e.replace(ws,function(t,n){return n.toUpperCase()})},lC=function(e){Ns.hasOwnProperty(e)&&Ns[e]||(Ns[e]=!0,b("Unsupported style property %s. Did you mean %s?",e,oC(e.replace(va,"ms-"))))},cC=function(e){Ns.hasOwnProperty(e)&&Ns[e]||(Ns[e]=!0,b("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},uC=function(e,t){as.hasOwnProperty(t)&&as[t]||(as[t]=!0,b(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(Ga,"")))},dC=function(e,t){I_||(I_=!0,b("`NaN` is an invalid value for the `%s` css style property.",e))},hC=function(e,t){F_||(F_=!0,b("`Infinity` is an invalid value for the `%s` css style property.",e))};mi=function(e,t){e.indexOf("-")>-1?lC(e):Fn.test(e)?cC(e):Ga.test(t)&&uC(e,t),typeof t=="number"&&(isNaN(t)?dC(e,t):isFinite(t)||hC(e,t))}}var mC=mi;function fC(e){{var t="",n="";for(var i in e)if(e.hasOwnProperty(i)){var c=e[i];if(c!=null){var w=i.indexOf("--")===0;t+=n+(w?i:Xt(i))+":",t+=nt(i,c,w),n=";"}}return t||null}}function H_(e,t){var n=e.style;for(var i in t)if(t.hasOwnProperty(i)){var c=i.indexOf("--")===0;c||mC(i,t[i]);var w=nt(i,t[i],c);i==="float"&&(i="cssFloat"),c?n.setProperty(i,w):n[i]=w}}function pC(e){return e==null||typeof e=="boolean"||e===""}function z_(e){var t={};for(var n in e)for(var i=le[n]||[n],c=0;c<i.length;c++)t[i[c]]=n;return t}function vC(e,t){{if(!t)return;var n=z_(e),i=z_(t),c={};for(var w in n){var T=n[w],P=i[w];if(P&&T!==P){var H=T+","+P;if(c[H])continue;c[H]=!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.",pC(e[T])?"Removing":"Updating",T,P)}}}}var gC={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},_C=Dt({menuitem:!0},gC),bC="__html";function jm(e,t){if(t){if(_C[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"||!(bC 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 qa(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 Ku={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"},$_={"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},Io={},yC=new RegExp("^(aria)-["+be+"]*$"),xC=new RegExp("^(aria)[A-Z]["+be+"]*$");function wC(e,t){{if(Ue.call(Io,t)&&Io[t])return!0;if(xC.test(t)){var n="aria-"+t.slice(4).toLowerCase(),i=$_.hasOwnProperty(n)?n:null;if(i==null)return b("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Io[t]=!0,!0;if(t!==i)return b("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,i),Io[t]=!0,!0}if(yC.test(t)){var c=t.toLowerCase(),w=$_.hasOwnProperty(c)?c:null;if(w==null)return Io[t]=!0,!1;if(t!==w)return b("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,w),Io[t]=!0,!0}}return!0}function NC(e,t){{var n=[];for(var i in t){var c=wC(e,i);c||n.push(i)}var w=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",w,e):n.length>1&&b("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",w,e)}}function SC(e,t){qa(e,t)||NC(e,t)}var W_=!1;function CC(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!W_&&(W_=!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 G_=function(){};{var ar={},q_=/^on./,EC=/^on[^A-Z]/,jC=new RegExp("^(aria)-["+be+"]*$"),DC=new RegExp("^(aria)[A-Z]["+be+"]*$");G_=function(e,t,n,i){if(Ue.call(ar,t)&&ar[t])return!0;var c=t.toLowerCase();if(c==="onfocusin"||c==="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."),ar[t]=!0,!0;if(i!=null){var w=i.registrationNameDependencies,T=i.possibleRegistrationNames;if(w.hasOwnProperty(t))return!0;var P=T.hasOwnProperty(c)?T[c]:null;if(P!=null)return b("Invalid event handler property `%s`. Did you mean `%s`?",t,P),ar[t]=!0,!0;if(q_.test(t))return b("Unknown event handler property `%s`. It will be ignored.",t),ar[t]=!0,!0}else if(q_.test(t))return EC.test(t)&&b("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),ar[t]=!0,!0;if(jC.test(t)||DC.test(t))return!0;if(c==="innerhtml")return b("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),ar[t]=!0,!0;if(c==="aria")return b("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),ar[t]=!0,!0;if(c==="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),ar[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),ar[t]=!0,!0;var H=Qt(t),q=H!==null&&H.type===Ge;if(Ku.hasOwnProperty(c)){var Z=Ku[c];if(Z!==t)return b("Invalid DOM property `%s`. Did you mean `%s`?",t,Z),ar[t]=!0,!0}else if(!q&&t!==c)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,c),ar[t]=!0,!0;return typeof n=="boolean"&&Pt(t,n,H,!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),ar[t]=!0,!0):q?!0:Pt(t,n,H,!1)?(ar[t]=!0,!1):((n==="false"||n==="true")&&H!==null&&H.type===Ye&&(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),ar[t]=!0),!0)}}var kC=function(e,t,n){{var i=[];for(var c in t){var w=G_(e,c,t[c],n);w||i.push(c)}var T=i.map(function(P){return"`"+P+"`"}).join(", ");i.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):i.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 RC(e,t,n){qa(e,t)||kC(e,t,n)}var Y_=1,Dm=2,Jl=4,TC=Y_|Dm|Jl,Zl=null;function LC(e){Zl!==null&&b("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Zl=e}function MC(){Zl===null&&b("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Zl=null}function AC(e){return e===Zl}function km(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===Wr?t.parentNode:t}var Rm=null,Fo=null,Ho=null;function K_(e){var t=Ca(e);if(t){if(typeof Rm!="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 i=Td(n);Rm(t.stateNode,t.type,i)}}}function UC(e){Rm=e}function X_(e){Fo?Ho?Ho.push(e):Ho=[e]:Fo=e}function OC(){return Fo!==null||Ho!==null}function J_(){if(Fo){var e=Fo,t=Ho;if(Fo=null,Ho=null,K_(e),t)for(var n=0;n<t.length;n++)K_(t[n])}}var Z_=function(e,t){return e(t)},Q_=function(){},Tm=!1;function VC(){var e=OC();e&&(Q_(),J_())}function eb(e,t,n){if(Tm)return e(t,n);Tm=!0;try{return Z_(e,t,n)}finally{Tm=!1,VC()}}function PC(e,t,n){Z_=e,Q_=n}function BC(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function IC(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&&BC(t));default:return!1}}function Ql(e,t){var n=e.stateNode;if(n===null)return null;var i=Td(n);if(i===null)return null;var c=i[t];if(IC(t,e.type,i))return null;if(c&&typeof c!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof c+"` type.");return c}var Lm=!1;if(Ie)try{var ec={};Object.defineProperty(ec,"passive",{get:function(){Lm=!0}}),window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch{Lm=!1}function tb(e,t,n,i,c,w,T,P,H){var q=Array.prototype.slice.call(arguments,3);try{t.apply(n,q)}catch(Z){this.onError(Z)}}var nb=tb;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Mm=document.createElement("react");nb=function(t,n,i,c,w,T,P,H,q){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 Z=document.createEvent("Event"),pe=!1,fe=!0,De=window.event,ke=Object.getOwnPropertyDescriptor(window,"event");function Oe(){Mm.removeEventListener(Ve,Lt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=De)}var lt=Array.prototype.slice.call(arguments,3);function Lt(){pe=!0,Oe(),n.apply(i,lt),fe=!1}var jt,pn=!1,ln=!1;function we(Ne){if(jt=Ne.error,pn=!0,jt===null&&Ne.colno===0&&Ne.lineno===0&&(ln=!0),Ne.defaultPrevented&&jt!=null&&typeof jt=="object")try{jt._suppressLogging=!0}catch{}}var Ve="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",we),Mm.addEventListener(Ve,Lt,!1),Z.initEvent(Ve,!1,!1),Mm.dispatchEvent(Z),ke&&Object.defineProperty(window,"event",ke),pe&&fe&&(pn?ln&&(jt=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.")):jt=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(jt)),window.removeEventListener("error",we),!pe)return Oe(),tb.apply(this,arguments)}}var FC=nb,zo=!1,Xu=null,Ju=!1,Am=null,HC={onError:function(e){zo=!0,Xu=e}};function Um(e,t,n,i,c,w,T,P,H){zo=!1,Xu=null,FC.apply(HC,arguments)}function zC(e,t,n,i,c,w,T,P,H){if(Um.apply(this,arguments),zo){var q=Om();Ju||(Ju=!0,Am=q)}}function $C(){if(Ju){var e=Am;throw Ju=!1,Am=null,e}}function WC(){return zo}function Om(){if(zo){var e=Xu;return zo=!1,Xu=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 $o(e){return e._reactInternals}function GC(e){return e._reactInternals!==void 0}function qC(e,t){e._reactInternals=t}var Bt=0,Wo=1,fi=2,Sn=4,Ya=16,tc=32,ib=64,Cn=128,Ws=256,Ka=512,Go=1024,ga=2048,Gs=4096,Xa=8192,Vm=16384,YC=32767,Zu=32768,or=65536,Pm=131072,rb=1048576,Bm=2097152,Ja=4194304,Im=8388608,_a=16777216,Fm=33554432,Hm=Sn|Go|0,zm=fi|Sn|Ya|tc|Ka|Gs|Xa,nc=Sn|ib|Ka|Xa,qo=ga|Ya,qs=Ja|Im|Bm,KC=d.ReactCurrentOwner;function Za(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var i=t;do t=i,(t.flags&(fi|Gs))!==Bt&&(n=t.return),i=t.return;while(i)}return t.tag===h?n:null}function sb(e){if(e.tag===k){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 ab(e){return e.tag===h?e.stateNode.containerInfo:null}function XC(e){return Za(e)===e}function JC(e){{var t=KC.current;if(t!==null&&t.tag===g){var n=t,i=n.stateNode;i._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.",Tt(n)||"A component"),i._warnedAboutRefsInRender=!0}}var c=$o(e);return c?Za(c)===c:!1}function ob(e){if(Za(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function lb(e){var t=e.alternate;if(!t){var n=Za(e);if(n===null)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var i=e,c=t;;){var w=i.return;if(w===null)break;var T=w.alternate;if(T===null){var P=w.return;if(P!==null){i=c=P;continue}break}if(w.child===T.child){for(var H=w.child;H;){if(H===i)return ob(w),e;if(H===c)return ob(w),t;H=H.sibling}throw new Error("Unable to find node on an unmounted component.")}if(i.return!==c.return)i=w,c=T;else{for(var q=!1,Z=w.child;Z;){if(Z===i){q=!0,i=w,c=T;break}if(Z===c){q=!0,c=w,i=T;break}Z=Z.sibling}if(!q){for(Z=T.child;Z;){if(Z===i){q=!0,i=T,c=w;break}if(Z===c){q=!0,c=T,i=w;break}Z=Z.sibling}if(!q)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(i.alternate!==c)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(i.tag!==h)throw new Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:t}function cb(e){var t=lb(e);return t!==null?ub(t):null}function ub(e){if(e.tag===S||e.tag===C)return e;for(var t=e.child;t!==null;){var n=ub(t);if(n!==null)return n;t=t.sibling}return null}function ZC(e){var t=lb(e);return t!==null?db(t):null}function db(e){if(e.tag===S||e.tag===C)return e;for(var t=e.child;t!==null;){if(t.tag!==f){var n=db(t);if(n!==null)return n}t=t.sibling}return null}var hb=s.unstable_scheduleCallback,QC=s.unstable_cancelCallback,eE=s.unstable_shouldYield,tE=s.unstable_requestPaint,Ci=s.unstable_now,nE=s.unstable_getCurrentPriorityLevel,Qu=s.unstable_ImmediatePriority,$m=s.unstable_UserBlockingPriority,Qa=s.unstable_NormalPriority,iE=s.unstable_LowPriority,Wm=s.unstable_IdlePriority,rE=s.unstable_yieldValue,sE=s.unstable_setDisableYieldValue,Yo=null,qi=null,dt=null,Ss=!1,os=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function aE(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{ve&&(e=Dt({},e,{getLaneLabelMap:hE,injectProfilingHooks:dE})),Yo=t.inject(e),qi=t}catch(n){b("React instrumentation encountered an error: %s.",n)}return!!t.checkDCE}function oE(e,t){if(qi&&typeof qi.onScheduleFiberRoot=="function")try{qi.onScheduleFiberRoot(Yo,e,t)}catch(n){Ss||(Ss=!0,b("React instrumentation encountered an error: %s",n))}}function lE(e,t){if(qi&&typeof qi.onCommitFiberRoot=="function")try{var n=(e.current.flags&Cn)===Cn;if(he){var i;switch(t){case Lr:i=Qu;break;case Ks:i=$m;break;case Xs:i=Qa;break;case ad:i=Wm;break;default:i=Qa;break}qi.onCommitFiberRoot(Yo,e,i,n)}}catch(c){Ss||(Ss=!0,b("React instrumentation encountered an error: %s",c))}}function cE(e){if(qi&&typeof qi.onPostCommitFiberRoot=="function")try{qi.onPostCommitFiberRoot(Yo,e)}catch(t){Ss||(Ss=!0,b("React instrumentation encountered an error: %s",t))}}function uE(e){if(qi&&typeof qi.onCommitFiberUnmount=="function")try{qi.onCommitFiberUnmount(Yo,e)}catch(t){Ss||(Ss=!0,b("React instrumentation encountered an error: %s",t))}}function Ei(e){if(typeof rE=="function"&&(sE(e),E(e)),qi&&typeof qi.setStrictMode=="function")try{qi.setStrictMode(Yo,e)}catch(t){Ss||(Ss=!0,b("React instrumentation encountered an error: %s",t))}}function dE(e){dt=e}function hE(){{for(var e=new Map,t=1,n=0;n<qm;n++){var i=LE(t);e.set(t,i),t*=2}return e}}function mE(e){dt!==null&&typeof dt.markCommitStarted=="function"&&dt.markCommitStarted(e)}function mb(){dt!==null&&typeof dt.markCommitStopped=="function"&&dt.markCommitStopped()}function ic(e){dt!==null&&typeof dt.markComponentRenderStarted=="function"&&dt.markComponentRenderStarted(e)}function Ko(){dt!==null&&typeof dt.markComponentRenderStopped=="function"&&dt.markComponentRenderStopped()}function fE(e){dt!==null&&typeof dt.markComponentPassiveEffectMountStarted=="function"&&dt.markComponentPassiveEffectMountStarted(e)}function pE(){dt!==null&&typeof dt.markComponentPassiveEffectMountStopped=="function"&&dt.markComponentPassiveEffectMountStopped()}function vE(e){dt!==null&&typeof dt.markComponentPassiveEffectUnmountStarted=="function"&&dt.markComponentPassiveEffectUnmountStarted(e)}function gE(){dt!==null&&typeof dt.markComponentPassiveEffectUnmountStopped=="function"&&dt.markComponentPassiveEffectUnmountStopped()}function _E(e){dt!==null&&typeof dt.markComponentLayoutEffectMountStarted=="function"&&dt.markComponentLayoutEffectMountStarted(e)}function bE(){dt!==null&&typeof dt.markComponentLayoutEffectMountStopped=="function"&&dt.markComponentLayoutEffectMountStopped()}function fb(e){dt!==null&&typeof dt.markComponentLayoutEffectUnmountStarted=="function"&&dt.markComponentLayoutEffectUnmountStarted(e)}function pb(){dt!==null&&typeof dt.markComponentLayoutEffectUnmountStopped=="function"&&dt.markComponentLayoutEffectUnmountStopped()}function yE(e,t,n){dt!==null&&typeof dt.markComponentErrored=="function"&&dt.markComponentErrored(e,t,n)}function xE(e,t,n){dt!==null&&typeof dt.markComponentSuspended=="function"&&dt.markComponentSuspended(e,t,n)}function wE(e){dt!==null&&typeof dt.markLayoutEffectsStarted=="function"&&dt.markLayoutEffectsStarted(e)}function NE(){dt!==null&&typeof dt.markLayoutEffectsStopped=="function"&&dt.markLayoutEffectsStopped()}function SE(e){dt!==null&&typeof dt.markPassiveEffectsStarted=="function"&&dt.markPassiveEffectsStarted(e)}function CE(){dt!==null&&typeof dt.markPassiveEffectsStopped=="function"&&dt.markPassiveEffectsStopped()}function vb(e){dt!==null&&typeof dt.markRenderStarted=="function"&&dt.markRenderStarted(e)}function EE(){dt!==null&&typeof dt.markRenderYielded=="function"&&dt.markRenderYielded()}function gb(){dt!==null&&typeof dt.markRenderStopped=="function"&&dt.markRenderStopped()}function jE(e){dt!==null&&typeof dt.markRenderScheduled=="function"&&dt.markRenderScheduled(e)}function DE(e,t){dt!==null&&typeof dt.markForceUpdateScheduled=="function"&&dt.markForceUpdateScheduled(e,t)}function Gm(e,t){dt!==null&&typeof dt.markStateUpdateScheduled=="function"&&dt.markStateUpdateScheduled(e,t)}var Ut=0,mn=1,Rn=2,ri=8,Cs=16,_b=Math.clz32?Math.clz32:TE,kE=Math.log,RE=Math.LN2;function TE(e){var t=e>>>0;return t===0?32:31-(kE(t)/RE|0)|0}var qm=31,qe=0,ji=0,zt=1,Xo=2,Ys=4,eo=8,Es=16,rc=32,Jo=4194240,sc=64,Ym=128,Km=256,Xm=512,Jm=1024,Zm=2048,Qm=4096,ef=8192,tf=16384,nf=32768,rf=65536,sf=131072,af=262144,of=524288,lf=1048576,cf=2097152,ed=130023424,Zo=4194304,uf=8388608,df=16777216,hf=33554432,mf=67108864,bb=Zo,ac=134217728,yb=268435455,oc=268435456,to=536870912,Rr=1073741824;function LE(e){{if(e&zt)return"Sync";if(e&Xo)return"InputContinuousHydration";if(e&Ys)return"InputContinuous";if(e&eo)return"DefaultHydration";if(e&Es)return"Default";if(e&rc)return"TransitionHydration";if(e&Jo)return"Transition";if(e&ed)return"Retry";if(e&ac)return"SelectiveHydration";if(e&oc)return"IdleHydration";if(e&to)return"Idle";if(e&Rr)return"Offscreen"}}var qn=-1,td=sc,nd=Zo;function lc(e){switch(no(e)){case zt:return zt;case Xo:return Xo;case Ys:return Ys;case eo:return eo;case Es:return Es;case rc:return rc;case sc:case Ym:case Km:case Xm:case Jm:case Zm:case Qm:case ef:case tf:case nf:case rf:case sf:case af:case of:case lf:case cf:return e&Jo;case Zo:case uf:case df:case hf:case mf:return e&ed;case ac:return ac;case oc:return oc;case to:return to;case Rr:return Rr;default:return b("Should have found matching lanes. This is a bug in React."),e}}function id(e,t){var n=e.pendingLanes;if(n===qe)return qe;var i=qe,c=e.suspendedLanes,w=e.pingedLanes,T=n&yb;if(T!==qe){var P=T&~c;if(P!==qe)i=lc(P);else{var H=T&w;H!==qe&&(i=lc(H))}}else{var q=n&~c;q!==qe?i=lc(q):w!==qe&&(i=lc(w))}if(i===qe)return qe;if(t!==qe&&t!==i&&(t&c)===qe){var Z=no(i),pe=no(t);if(Z>=pe||Z===Es&&(pe&Jo)!==qe)return t}(i&Ys)!==qe&&(i|=n&Es);var fe=e.entangledLanes;if(fe!==qe)for(var De=e.entanglements,ke=i&fe;ke>0;){var Oe=io(ke),lt=1<<Oe;i|=De[Oe],ke&=~lt}return i}function ME(e,t){for(var n=e.eventTimes,i=qn;t>0;){var c=io(t),w=1<<c,T=n[c];T>i&&(i=T),t&=~w}return i}function AE(e,t){switch(e){case zt:case Xo:case Ys:return t+250;case eo:case Es:case rc:case sc:case Ym:case Km:case Xm:case Jm:case Zm:case Qm:case ef:case tf:case nf:case rf:case sf:case af:case of:case lf:case cf:return t+5e3;case Zo:case uf:case df:case hf:case mf:return qn;case ac:case oc:case to:case Rr:return qn;default:return b("Should have found matching lanes. This is a bug in React."),qn}}function UE(e,t){for(var n=e.pendingLanes,i=e.suspendedLanes,c=e.pingedLanes,w=e.expirationTimes,T=n;T>0;){var P=io(T),H=1<<P,q=w[P];q===qn?((H&i)===qe||(H&c)!==qe)&&(w[P]=AE(H,t)):q<=t&&(e.expiredLanes|=H),T&=~H}}function OE(e){return lc(e.pendingLanes)}function ff(e){var t=e.pendingLanes&~Rr;return t!==qe?t:t&Rr?Rr:qe}function VE(e){return(e&zt)!==qe}function pf(e){return(e&yb)!==qe}function xb(e){return(e&ed)===e}function PE(e){var t=zt|Ys|Es;return(e&t)===qe}function BE(e){return(e&Jo)===e}function rd(e,t){var n=Xo|Ys|eo|Es;return(t&n)!==qe}function IE(e,t){return(t&e.expiredLanes)!==qe}function wb(e){return(e&Jo)!==qe}function Nb(){var e=td;return td<<=1,(td&Jo)===qe&&(td=sc),e}function FE(){var e=nd;return nd<<=1,(nd&ed)===qe&&(nd=Zo),e}function no(e){return e&-e}function cc(e){return no(e)}function io(e){return 31-_b(e)}function vf(e){return io(e)}function Tr(e,t){return(e&t)!==qe}function Qo(e,t){return(e&t)===t}function tn(e,t){return e|t}function sd(e,t){return e&~t}function Sb(e,t){return e&t}function LV(e){return e}function HE(e,t){return e!==ji&&e<t?e:t}function gf(e){for(var t=[],n=0;n<qm;n++)t.push(e);return t}function uc(e,t,n){e.pendingLanes|=t,t!==to&&(e.suspendedLanes=qe,e.pingedLanes=qe);var i=e.eventTimes,c=vf(t);i[c]=n}function zE(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,i=t;i>0;){var c=io(i),w=1<<c;n[c]=qn,i&=~w}}function Cb(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function $E(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=qe,e.pingedLanes=qe,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var i=e.entanglements,c=e.eventTimes,w=e.expirationTimes,T=n;T>0;){var P=io(T),H=1<<P;i[P]=qe,c[P]=qn,w[P]=qn,T&=~H}}function _f(e,t){for(var n=e.entangledLanes|=t,i=e.entanglements,c=n;c;){var w=io(c),T=1<<w;T&t|i[w]&t&&(i[w]|=t),c&=~T}}function WE(e,t){var n=no(t),i;switch(n){case Ys:i=Xo;break;case Es:i=eo;break;case sc:case Ym:case Km:case Xm:case Jm:case Zm:case Qm:case ef:case tf:case nf:case rf:case sf:case af:case of:case lf:case cf:case Zo:case uf:case df:case hf:case mf:i=rc;break;case to:i=oc;break;default:i=ji;break}return(i&(e.suspendedLanes|t))!==ji?ji:i}function Eb(e,t,n){if(os)for(var i=e.pendingUpdatersLaneMap;n>0;){var c=vf(n),w=1<<c,T=i[c];T.add(t),n&=~w}}function jb(e,t){if(os)for(var n=e.pendingUpdatersLaneMap,i=e.memoizedUpdaters;t>0;){var c=vf(t),w=1<<c,T=n[c];T.size>0&&(T.forEach(function(P){var H=P.alternate;(H===null||!i.has(H))&&i.add(P)}),T.clear()),t&=~w}}function Db(e,t){return null}var Lr=zt,Ks=Ys,Xs=Es,ad=to,dc=ji;function ls(){return dc}function Di(e){dc=e}function GE(e,t){var n=dc;try{return dc=e,t()}finally{dc=n}}function qE(e,t){return e!==0&&e<t?e:t}function YE(e,t){return e>t?e:t}function bf(e,t){return e!==0&&e<t}function kb(e){var t=no(e);return bf(Lr,t)?bf(Ks,t)?pf(t)?Xs:ad:Ks:Lr}function od(e){var t=e.current.memoizedState;return t.isDehydrated}var Rb;function KE(e){Rb=e}function XE(e){Rb(e)}var yf;function JE(e){yf=e}var Tb;function ZE(e){Tb=e}var Lb;function QE(e){Lb=e}var Mb;function ej(e){Mb=e}var xf=!1,ld=[],ba=null,ya=null,xa=null,hc=new Map,mc=new Map,wa=[],tj=["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 nj(e){return tj.indexOf(e)>-1}function ij(e,t,n,i,c){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]}}function Ab(e,t){switch(e){case"focusin":case"focusout":ba=null;break;case"dragenter":case"dragleave":ya=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":{var n=t.pointerId;hc.delete(n);break}case"gotpointercapture":case"lostpointercapture":{var i=t.pointerId;mc.delete(i);break}}}function fc(e,t,n,i,c,w){if(e===null||e.nativeEvent!==w){var T=ij(t,n,i,c,w);if(t!==null){var P=Ca(t);P!==null&&yf(P)}return T}e.eventSystemFlags|=i;var H=e.targetContainers;return c!==null&&H.indexOf(c)===-1&&H.push(c),e}function rj(e,t,n,i,c){switch(t){case"focusin":{var w=c;return ba=fc(ba,e,t,n,i,w),!0}case"dragenter":{var T=c;return ya=fc(ya,e,t,n,i,T),!0}case"mouseover":{var P=c;return xa=fc(xa,e,t,n,i,P),!0}case"pointerover":{var H=c,q=H.pointerId;return hc.set(q,fc(hc.get(q)||null,e,t,n,i,H)),!0}case"gotpointercapture":{var Z=c,pe=Z.pointerId;return mc.set(pe,fc(mc.get(pe)||null,e,t,n,i,Z)),!0}}return!1}function Ub(e){var t=ao(e.target);if(t!==null){var n=Za(t);if(n!==null){var i=n.tag;if(i===k){var c=sb(n);if(c!==null){e.blockedOn=c,Mb(e.priority,function(){Tb(n)});return}}else if(i===h){var w=n.stateNode;if(od(w)){e.blockedOn=ab(n);return}}}}e.blockedOn=null}function sj(e){for(var t=Lb(),n={blockedOn:null,target:e,priority:t},i=0;i<wa.length&&bf(t,wa[i].priority);i++);wa.splice(i,0,n),i===0&&Ub(n)}function cd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var n=t[0],i=Sf(e.domEventName,e.eventSystemFlags,n,e.nativeEvent);if(i===null){var c=e.nativeEvent,w=new c.constructor(c.type,c);LC(w),c.target.dispatchEvent(w),MC()}else{var T=Ca(i);return T!==null&&yf(T),e.blockedOn=i,!1}t.shift()}return!0}function Ob(e,t,n){cd(e)&&n.delete(t)}function aj(){xf=!1,ba!==null&&cd(ba)&&(ba=null),ya!==null&&cd(ya)&&(ya=null),xa!==null&&cd(xa)&&(xa=null),hc.forEach(Ob),mc.forEach(Ob)}function pc(e,t){e.blockedOn===t&&(e.blockedOn=null,xf||(xf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,aj)))}function vc(e){if(ld.length>0){pc(ld[0],e);for(var t=1;t<ld.length;t++){var n=ld[t];n.blockedOn===e&&(n.blockedOn=null)}}ba!==null&&pc(ba,e),ya!==null&&pc(ya,e),xa!==null&&pc(xa,e);var i=function(P){return pc(P,e)};hc.forEach(i),mc.forEach(i);for(var c=0;c<wa.length;c++){var w=wa[c];w.blockedOn===e&&(w.blockedOn=null)}for(;wa.length>0;){var T=wa[0];if(T.blockedOn!==null)break;Ub(T),T.blockedOn===null&&wa.shift()}}var el=d.ReactCurrentBatchConfig,wf=!0;function Vb(e){wf=!!e}function oj(){return wf}function lj(e,t,n){var i=Pb(t),c;switch(i){case Lr:c=cj;break;case Ks:c=uj;break;case Xs:default:c=Nf;break}return c.bind(null,t,n,e)}function cj(e,t,n,i){var c=ls(),w=el.transition;el.transition=null;try{Di(Lr),Nf(e,t,n,i)}finally{Di(c),el.transition=w}}function uj(e,t,n,i){var c=ls(),w=el.transition;el.transition=null;try{Di(Ks),Nf(e,t,n,i)}finally{Di(c),el.transition=w}}function Nf(e,t,n,i){wf&&dj(e,t,n,i)}function dj(e,t,n,i){var c=Sf(e,t,n,i);if(c===null){Pf(e,t,i,ud,n),Ab(e,i);return}if(rj(c,e,t,n,i)){i.stopPropagation();return}if(Ab(e,i),t&Jl&&nj(e)){for(;c!==null;){var w=Ca(c);w!==null&&XE(w);var T=Sf(e,t,n,i);if(T===null&&Pf(e,t,i,ud,n),T===c)break;c=T}c!==null&&i.stopPropagation();return}Pf(e,t,i,null,n)}var ud=null;function Sf(e,t,n,i){ud=null;var c=km(i),w=ao(c);if(w!==null){var T=Za(w);if(T===null)w=null;else{var P=T.tag;if(P===k){var H=sb(T);if(H!==null)return H;w=null}else if(P===h){var q=T.stateNode;if(od(q))return ab(T);w=null}else T!==w&&(w=null)}}return ud=w,null}function Pb(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 Lr;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 Ks;case"message":{var t=nE();switch(t){case Qu:return Lr;case $m:return Ks;case Qa:case iE:return Xs;case Wm:return ad;default:return Xs}}default:return Xs}}function hj(e,t,n){return e.addEventListener(t,n,!1),n}function mj(e,t,n){return e.addEventListener(t,n,!0),n}function fj(e,t,n,i){return e.addEventListener(t,n,{capture:!0,passive:i}),n}function pj(e,t,n,i){return e.addEventListener(t,n,{passive:i}),n}var gc=null,Cf=null,_c=null;function vj(e){return gc=e,Cf=Ib(),!0}function gj(){gc=null,Cf=null,_c=null}function Bb(){if(_c)return _c;var e,t=Cf,n=t.length,i,c=Ib(),w=c.length;for(e=0;e<n&&t[e]===c[e];e++);var T=n-e;for(i=1;i<=T&&t[n-i]===c[w-i];i++);var P=i>1?1-i:void 0;return _c=c.slice(e,P),_c}function Ib(){return"value"in gc?gc.value:gc.textContent}function dd(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 hd(){return!0}function Fb(){return!1}function Mr(e){function t(n,i,c,w,T){this._reactName=n,this._targetInst=c,this.type=i,this.nativeEvent=w,this.target=T,this.currentTarget=null;for(var P in e)if(e.hasOwnProperty(P)){var H=e[P];H?this[P]=H(w):this[P]=w[P]}var q=w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1;return q?this.isDefaultPrevented=hd:this.isDefaultPrevented=Fb,this.isPropagationStopped=Fb,this}return Dt(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=hd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hd)},persist:function(){},isPersistent:hd}),t}var tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ef=Mr(tl),bc=Dt({},tl,{view:0,detail:0}),_j=Mr(bc),jf,Df,yc;function bj(e){e!==yc&&(yc&&e.type==="mousemove"?(jf=e.screenX-yc.screenX,Df=e.screenY-yc.screenY):(jf=0,Df=0),yc=e)}var md=Dt({},bc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rf,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:(bj(e),jf)},movementY:function(e){return"movementY"in e?e.movementY:Df}}),Hb=Mr(md),yj=Dt({},md,{dataTransfer:0}),xj=Mr(yj),wj=Dt({},bc,{relatedTarget:0}),kf=Mr(wj),Nj=Dt({},tl,{animationName:0,elapsedTime:0,pseudoElement:0}),Sj=Mr(Nj),Cj=Dt({},tl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ej=Mr(Cj),jj=Dt({},tl,{data:0}),zb=Mr(jj),Dj=zb,kj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rj={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 Tj(e){if(e.key){var t=kj[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var n=dd(e);return n===13?"Enter":String.fromCharCode(n)}return e.type==="keydown"||e.type==="keyup"?Rj[e.keyCode]||"Unidentified":""}var Lj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mj(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var i=Lj[e];return i?!!n[i]:!1}function Rf(e){return Mj}var Aj=Dt({},bc,{key:Tj,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rf,charCode:function(e){return e.type==="keypress"?dd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uj=Mr(Aj),Oj=Dt({},md,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$b=Mr(Oj),Vj=Dt({},bc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rf}),Pj=Mr(Vj),Bj=Dt({},tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ij=Mr(Bj),Fj=Dt({},md,{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}),Hj=Mr(Fj),zj=[9,13,27,32],Wb=229,Tf=Ie&&"CompositionEvent"in window,xc=null;Ie&&"documentMode"in document&&(xc=document.documentMode);var $j=Ie&&"TextEvent"in window&&!xc,Gb=Ie&&(!Tf||xc&&xc>8&&xc<=11),qb=32,Yb=String.fromCharCode(qb);function Wj(){_e("onBeforeInput",["compositionend","keypress","textInput","paste"]),_e("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),_e("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),_e("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var Kb=!1;function Gj(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function qj(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function Yj(e,t){return e==="keydown"&&t.keyCode===Wb}function Xb(e,t){switch(e){case"keyup":return zj.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==Wb;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jb(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function Zb(e){return e.locale==="ko"}var nl=!1;function Kj(e,t,n,i,c){var w,T;if(Tf?w=qj(t):nl?Xb(t,i)&&(w="onCompositionEnd"):Yj(t,i)&&(w="onCompositionStart"),!w)return null;Gb&&!Zb(i)&&(!nl&&w==="onCompositionStart"?nl=vj(c):w==="onCompositionEnd"&&nl&&(T=Bb()));var P=_d(n,w);if(P.length>0){var H=new zb(w,t,null,i,c);if(e.push({event:H,listeners:P}),T)H.data=T;else{var q=Jb(i);q!==null&&(H.data=q)}}}function Xj(e,t){switch(e){case"compositionend":return Jb(t);case"keypress":var n=t.which;return n!==qb?null:(Kb=!0,Yb);case"textInput":var i=t.data;return i===Yb&&Kb?null:i;default:return null}}function Jj(e,t){if(nl){if(e==="compositionend"||!Tf&&Xb(e,t)){var n=Bb();return gj(),nl=!1,n}return null}switch(e){case"paste":return null;case"keypress":if(!Gj(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Gb&&!Zb(t)?null:t.data;default:return null}}function Zj(e,t,n,i,c){var w;if($j?w=Xj(t,i):w=Jj(t,i),!w)return null;var T=_d(n,"onBeforeInput");if(T.length>0){var P=new Dj("onBeforeInput","beforeinput",null,i,c);e.push({event:P,listeners:T}),P.data=w}}function Qj(e,t,n,i,c,w,T){Kj(e,t,n,i,c),Zj(e,t,n,i,c)}var eD={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 Qb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eD[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 tD(e){if(!Ie)return!1;var t="on"+e,n=t in document;if(!n){var i=document.createElement("div");i.setAttribute(t,"return;"),n=typeof i[t]=="function"}return n}function nD(){_e("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function ey(e,t,n,i){X_(i);var c=_d(t,"onChange");if(c.length>0){var w=new Ef("onChange","change",null,n,i);e.push({event:w,listeners:c})}}var wc=null,Nc=null;function iD(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function rD(e){var t=[];ey(t,Nc,e,km(e)),eb(sD,t)}function sD(e){_y(e,0)}function fd(e){var t=ll(e);if(xs(t))return e}function aD(e,t){if(e==="change")return t}var ty=!1;Ie&&(ty=tD("input")&&(!document.documentMode||document.documentMode>9));function oD(e,t){wc=e,Nc=t,wc.attachEvent("onpropertychange",iy)}function ny(){wc&&(wc.detachEvent("onpropertychange",iy),wc=null,Nc=null)}function iy(e){e.propertyName==="value"&&fd(Nc)&&rD(e)}function lD(e,t,n){e==="focusin"?(ny(),oD(t,n)):e==="focusout"&&ny()}function cD(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fd(Nc)}function uD(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function dD(e,t){if(e==="click")return fd(t)}function hD(e,t){if(e==="input"||e==="change")return fd(t)}function mD(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||Le(e,"number",e.value)}function fD(e,t,n,i,c,w,T){var P=n?ll(n):window,H,q;if(iD(P)?H=aD:Qb(P)?ty?H=hD:(H=cD,q=lD):uD(P)&&(H=dD),H){var Z=H(t,n);if(Z){ey(e,Z,i,c);return}}q&&q(t,P,n),t==="focusout"&&mD(P)}function pD(){de("onMouseEnter",["mouseout","mouseover"]),de("onMouseLeave",["mouseout","mouseover"]),de("onPointerEnter",["pointerout","pointerover"]),de("onPointerLeave",["pointerout","pointerover"])}function vD(e,t,n,i,c,w,T){var P=t==="mouseover"||t==="pointerover",H=t==="mouseout"||t==="pointerout";if(P&&!AC(i)){var q=i.relatedTarget||i.fromElement;if(q&&(ao(q)||Pc(q)))return}if(!(!H&&!P)){var Z;if(c.window===c)Z=c;else{var pe=c.ownerDocument;pe?Z=pe.defaultView||pe.parentWindow:Z=window}var fe,De;if(H){var ke=i.relatedTarget||i.toElement;if(fe=n,De=ke?ao(ke):null,De!==null){var Oe=Za(De);(De!==Oe||De.tag!==S&&De.tag!==C)&&(De=null)}}else fe=null,De=n;if(fe!==De){var lt=Hb,Lt="onMouseLeave",jt="onMouseEnter",pn="mouse";(t==="pointerout"||t==="pointerover")&&(lt=$b,Lt="onPointerLeave",jt="onPointerEnter",pn="pointer");var ln=fe==null?Z:ll(fe),we=De==null?Z:ll(De),Ve=new lt(Lt,pn+"leave",fe,i,c);Ve.target=ln,Ve.relatedTarget=we;var Ne=null,Ke=ao(c);if(Ke===n){var mt=new lt(jt,pn+"enter",De,i,c);mt.target=we,mt.relatedTarget=ln,Ne=mt}ID(e,Ve,Ne,fe,De)}}}function gD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ar=typeof Object.is=="function"?Object.is:gD;function Sc(e,t){if(Ar(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var c=0;c<n.length;c++){var w=n[c];if(!Ue.call(t,w)||!Ar(e[w],t[w]))return!1}return!0}function ry(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _D(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function sy(e,t){for(var n=ry(e),i=0,c=0;n;){if(n.nodeType===Wr){if(c=i+n.textContent.length,i<=t&&c>=t)return{node:n,offset:t-i};i=c}n=ry(_D(n))}}function bD(e){var t=e.ownerDocument,n=t&&t.defaultView||window,i=n.getSelection&&n.getSelection();if(!i||i.rangeCount===0)return null;var c=i.anchorNode,w=i.anchorOffset,T=i.focusNode,P=i.focusOffset;try{c.nodeType,T.nodeType}catch{return null}return yD(e,c,w,T,P)}function yD(e,t,n,i,c){var w=0,T=-1,P=-1,H=0,q=0,Z=e,pe=null;e:for(;;){for(var fe=null;Z===t&&(n===0||Z.nodeType===Wr)&&(T=w+n),Z===i&&(c===0||Z.nodeType===Wr)&&(P=w+c),Z.nodeType===Wr&&(w+=Z.nodeValue.length),(fe=Z.firstChild)!==null;)pe=Z,Z=fe;for(;;){if(Z===e)break e;if(pe===t&&++H===n&&(T=w),pe===i&&++q===c&&(P=w),(fe=Z.nextSibling)!==null)break;Z=pe,pe=Z.parentNode}Z=fe}return T===-1||P===-1?null:{start:T,end:P}}function xD(e,t){var n=e.ownerDocument||document,i=n&&n.defaultView||window;if(i.getSelection){var c=i.getSelection(),w=e.textContent.length,T=Math.min(t.start,w),P=t.end===void 0?T:Math.min(t.end,w);if(!c.extend&&T>P){var H=P;P=T,T=H}var q=sy(e,T),Z=sy(e,P);if(q&&Z){if(c.rangeCount===1&&c.anchorNode===q.node&&c.anchorOffset===q.offset&&c.focusNode===Z.node&&c.focusOffset===Z.offset)return;var pe=n.createRange();pe.setStart(q.node,q.offset),c.removeAllRanges(),T>P?(c.addRange(pe),c.extend(Z.node,Z.offset)):(pe.setEnd(Z.node,Z.offset),c.addRange(pe))}}}function ay(e){return e&&e.nodeType===Wr}function oy(e,t){return!e||!t?!1:e===t?!0:ay(e)?!1:ay(t)?oy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function wD(e){return e&&e.ownerDocument&&oy(e.ownerDocument.documentElement,e)}function ND(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function ly(){for(var e=window,t=kr();t instanceof e.HTMLIFrameElement;){if(ND(t))e=t.contentWindow;else return t;t=kr(e.document)}return t}function Lf(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 SD(){var e=ly();return{focusedElem:e,selectionRange:Lf(e)?ED(e):null}}function CD(e){var t=ly(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&wD(n)){i!==null&&Lf(n)&&jD(n,i);for(var c=[],w=n;w=w.parentNode;)w.nodeType===Ai&&c.push({element:w,left:w.scrollLeft,top:w.scrollTop});typeof n.focus=="function"&&n.focus();for(var T=0;T<c.length;T++){var P=c[T];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}}function ED(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=bD(e),t||{start:0,end:0}}function jD(e,t){var n=t.start,i=t.end;i===void 0&&(i=n),"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(i,e.value.length)):xD(e,t)}var DD=Ie&&"documentMode"in document&&document.documentMode<=11;function kD(){_e("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var il=null,Mf=null,Cc=null,Af=!1;function RD(e){if("selectionStart"in e&&Lf(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 TD(e){return e.window===e?e.document:e.nodeType===Gr?e:e.ownerDocument}function cy(e,t,n){var i=TD(n);if(!(Af||il==null||il!==kr(i))){var c=RD(il);if(!Cc||!Sc(Cc,c)){Cc=c;var w=_d(Mf,"onSelect");if(w.length>0){var T=new Ef("onSelect","select",null,t,n);e.push({event:T,listeners:w}),T.target=il}}}}function LD(e,t,n,i,c,w,T){var P=n?ll(n):window;switch(t){case"focusin":(Qb(P)||P.contentEditable==="true")&&(il=P,Mf=n,Cc=null);break;case"focusout":il=null,Mf=null,Cc=null;break;case"mousedown":Af=!0;break;case"contextmenu":case"mouseup":case"dragend":Af=!1,cy(e,i,c);break;case"selectionchange":if(DD)break;case"keydown":case"keyup":cy(e,i,c)}}function pd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var rl={animationend:pd("Animation","AnimationEnd"),animationiteration:pd("Animation","AnimationIteration"),animationstart:pd("Animation","AnimationStart"),transitionend:pd("Transition","TransitionEnd")},Uf={},uy={};Ie&&(uy=document.createElement("div").style,"AnimationEvent"in window||(delete rl.animationend.animation,delete rl.animationiteration.animation,delete rl.animationstart.animation),"TransitionEvent"in window||delete rl.transitionend.transition);function vd(e){if(Uf[e])return Uf[e];if(!rl[e])return e;var t=rl[e];for(var n in t)if(t.hasOwnProperty(n)&&n in uy)return Uf[e]=t[n];return e}var dy=vd("animationend"),hy=vd("animationiteration"),my=vd("animationstart"),fy=vd("transitionend"),py=new Map,vy=["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 Na(e,t){py.set(e,t),_e(t,[e])}function MD(){for(var e=0;e<vy.length;e++){var t=vy[e],n=t.toLowerCase(),i=t[0].toUpperCase()+t.slice(1);Na(n,"on"+i)}Na(dy,"onAnimationEnd"),Na(hy,"onAnimationIteration"),Na(my,"onAnimationStart"),Na("dblclick","onDoubleClick"),Na("focusin","onFocus"),Na("focusout","onBlur"),Na(fy,"onTransitionEnd")}function AD(e,t,n,i,c,w,T){var P=py.get(t);if(P!==void 0){var H=Ef,q=t;switch(t){case"keypress":if(dd(i)===0)return;case"keydown":case"keyup":H=Uj;break;case"focusin":q="focus",H=kf;break;case"focusout":q="blur",H=kf;break;case"beforeblur":case"afterblur":H=kf;break;case"click":if(i.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Hb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=xj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=Pj;break;case dy:case hy:case my:H=Sj;break;case fy:H=Ij;break;case"scroll":H=_j;break;case"wheel":H=Hj;break;case"copy":case"cut":case"paste":H=Ej;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=$b;break}var Z=(w&Jl)!==0;{var pe=!Z&&t==="scroll",fe=PD(n,P,i.type,Z,pe);if(fe.length>0){var De=new H(P,q,null,i,c);e.push({event:De,listeners:fe})}}}}MD(),pD(),nD(),kD(),Wj();function UD(e,t,n,i,c,w,T){AD(e,t,n,i,c,w);var P=(w&TC)===0;P&&(vD(e,t,n,i,c),fD(e,t,n,i,c),LD(e,t,n,i,c),Qj(e,t,n,i,c))}var Ec=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Of=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Ec));function gy(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,zC(i,t,void 0,e),e.currentTarget=null}function OD(e,t,n){var i;if(n)for(var c=t.length-1;c>=0;c--){var w=t[c],T=w.instance,P=w.currentTarget,H=w.listener;if(T!==i&&e.isPropagationStopped())return;gy(e,H,P),i=T}else for(var q=0;q<t.length;q++){var Z=t[q],pe=Z.instance,fe=Z.currentTarget,De=Z.listener;if(pe!==i&&e.isPropagationStopped())return;gy(e,De,fe),i=pe}}function _y(e,t){for(var n=(t&Jl)!==0,i=0;i<e.length;i++){var c=e[i],w=c.event,T=c.listeners;OD(w,T,n)}$C()}function VD(e,t,n,i,c){var w=km(n),T=[];UD(T,e,i,n,w,t),_y(T,t)}function Yn(e,t){Of.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,i=mR(t),c=FD(e);i.has(c)||(by(t,e,Dm,n),i.add(c))}function Vf(e,t,n){Of.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 i=0;t&&(i|=Jl),by(n,e,i,t)}var gd="_reactListening"+Math.random().toString(36).slice(2);function jc(e){if(!e[gd]){e[gd]=!0,me.forEach(function(n){n!=="selectionchange"&&(Of.has(n)||Vf(n,!1,e),Vf(n,!0,e))});var t=e.nodeType===Gr?e:e.ownerDocument;t!==null&&(t[gd]||(t[gd]=!0,Vf("selectionchange",!1,t)))}}function by(e,t,n,i,c){var w=lj(e,t,n),T=void 0;Lm&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(T=!0),e=e,i?T!==void 0?fj(e,t,w,T):mj(e,t,w):T!==void 0?pj(e,t,w,T):hj(e,t,w)}function yy(e,t){return e===t||e.nodeType===ei&&e.parentNode===t}function Pf(e,t,n,i,c){var w=i;if(!(t&Y_)&&!(t&Dm)){var T=c;if(i!==null){var P=i;e:for(;;){if(P===null)return;var H=P.tag;if(H===h||H===f){var q=P.stateNode.containerInfo;if(yy(q,T))break;if(H===f)for(var Z=P.return;Z!==null;){var pe=Z.tag;if(pe===h||pe===f){var fe=Z.stateNode.containerInfo;if(yy(fe,T))return}Z=Z.return}for(;q!==null;){var De=ao(q);if(De===null)return;var ke=De.tag;if(ke===S||ke===C){P=w=De;continue e}q=q.parentNode}}P=P.return}}}eb(function(){return VD(e,t,n,w)})}function Dc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function PD(e,t,n,i,c,w){for(var T=t!==null?t+"Capture":null,P=i?T:t,H=[],q=e,Z=null;q!==null;){var pe=q,fe=pe.stateNode,De=pe.tag;if(De===S&&fe!==null&&(Z=fe,P!==null)){var ke=Ql(q,P);ke!=null&&H.push(Dc(q,ke,Z))}if(c)break;q=q.return}return H}function _d(e,t){for(var n=t+"Capture",i=[],c=e;c!==null;){var w=c,T=w.stateNode,P=w.tag;if(P===S&&T!==null){var H=T,q=Ql(c,n);q!=null&&i.unshift(Dc(c,q,H));var Z=Ql(c,t);Z!=null&&i.push(Dc(c,Z,H))}c=c.return}return i}function sl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==S);return e||null}function BD(e,t){for(var n=e,i=t,c=0,w=n;w;w=sl(w))c++;for(var T=0,P=i;P;P=sl(P))T++;for(;c-T>0;)n=sl(n),c--;for(;T-c>0;)i=sl(i),T--;for(var H=c;H--;){if(n===i||i!==null&&n===i.alternate)return n;n=sl(n),i=sl(i)}return null}function xy(e,t,n,i,c){for(var w=t._reactName,T=[],P=n;P!==null&&P!==i;){var H=P,q=H.alternate,Z=H.stateNode,pe=H.tag;if(q!==null&&q===i)break;if(pe===S&&Z!==null){var fe=Z;if(c){var De=Ql(P,w);De!=null&&T.unshift(Dc(P,De,fe))}else if(!c){var ke=Ql(P,w);ke!=null&&T.push(Dc(P,ke,fe))}}P=P.return}T.length!==0&&e.push({event:t,listeners:T})}function ID(e,t,n,i,c){var w=i&&c?BD(i,c):null;i!==null&&xy(e,t,i,w,!1),c!==null&&n!==null&&xy(e,n,c,w,!0)}function FD(e,t){return e+"__bubble"}var yr=!1,kc="dangerouslySetInnerHTML",bd="suppressContentEditableWarning",Sa="suppressHydrationWarning",wy="autoFocus",ro="children",so="style",yd="__html",Bf,xd,Rc,Ny,wd,Sy,Cy;Bf={dialog:!0,webview:!0},xd=function(e,t){SC(e,t),CC(e,t),RC(e,t,{registrationNameDependencies:ie,possibleRegistrationNames:$})},Sy=Ie&&!document.documentMode,Rc=function(e,t,n){if(!yr){var i=Nd(n),c=Nd(t);c!==i&&(yr=!0,b("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(c),JSON.stringify(i)))}},Ny=function(e){if(!yr){yr=!0;var t=[];e.forEach(function(n){t.push(n)}),b("Extra attributes from the server: %s",t)}},wd=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)},Cy=function(e,t){var n=e.namespaceURI===$r?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var HD=/\r\n?/g,zD=/\u0000|\uFFFD/g;function Nd(e){Ee(e);var t=typeof e=="string"?e:""+e;return t.replace(HD,`
91
+ `).replace(zD,"")}function Sd(e,t,n,i){var c=Nd(t),w=Nd(e);if(w!==c&&(i&&(yr||(yr=!0,b('Text content did not match. Server: "%s" Client: "%s"',w,c))),n&&te))throw new Error("Text content does not match server-rendered HTML.")}function Ey(e){return e.nodeType===Gr?e:e.ownerDocument}function $D(){}function Cd(e){e.onclick=$D}function WD(e,t,n,i,c){for(var w in i)if(i.hasOwnProperty(w)){var T=i[w];if(w===so)T&&Object.freeze(T),H_(t,T);else if(w===kc){var P=T?T[yd]:void 0;P!=null&&Xl(t,P)}else if(w===ro)if(typeof T=="string"){var H=e!=="textarea"||T!=="";H&&Wa(t,T)}else typeof T=="number"&&Wa(t,""+T);else w===bd||w===Sa||w===wy||(ie.hasOwnProperty(w)?T!=null&&(typeof T!="function"&&wd(w,T),w==="onScroll"&&Yn("scroll",t)):T!=null&&ni(t,w,T,c))}}function GD(e,t,n,i){for(var c=0;c<t.length;c+=2){var w=t[c],T=t[c+1];w===so?H_(e,T):w===kc?Xl(e,T):w===ro?Wa(e,T):ni(e,w,T,i)}}function qD(e,t,n,i){var c,w=Ey(n),T,P=i;if(P===$r&&(P=Vo(e)),P===$r){if(c=qa(e,t),!c&&e!==e.toLowerCase()&&b("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var H=w.createElement("div");H.innerHTML="<script><\/script>";var q=H.firstChild;T=H.removeChild(q)}else if(typeof t.is=="string")T=w.createElement(e,{is:t.is});else if(T=w.createElement(e),e==="select"){var Z=T;t.multiple?Z.multiple=!0:t.size&&(Z.size=t.size)}}else T=w.createElementNS(P,e);return P===$r&&!c&&Object.prototype.toString.call(T)==="[object HTMLUnknownElement]"&&!Ue.call(Bf,e)&&(Bf[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 YD(e,t){return Ey(t).createTextNode(e)}function KD(e,t,n,i){var c=qa(t,n);xd(t,n);var w;switch(t){case"dialog":Yn("cancel",e),Yn("close",e),w=n;break;case"iframe":case"object":case"embed":Yn("load",e),w=n;break;case"video":case"audio":for(var T=0;T<Ec.length;T++)Yn(Ec[T],e);w=n;break;case"source":Yn("error",e),w=n;break;case"img":case"image":case"link":Yn("error",e),Yn("load",e),w=n;break;case"details":Yn("toggle",e),w=n;break;case"input":Li(e,n),w=$s(e,n),Yn("invalid",e);break;case"option":vt(e,n),w=n;break;case"select":sr(e,n),w=ss(e,n),Yn("invalid",e);break;case"textarea":ql(e,n),w=Uo(e,n),Yn("invalid",e);break;default:w=n}switch(jm(t,w),WD(t,e,i,w,c),t){case"input":br(e),K(e,n,!1);break;case"textarea":br(e),Kl(e);break;case"option":ct(e,n);break;case"select":pa(e,n);break;default:typeof w.onClick=="function"&&Cd(e);break}}function XD(e,t,n,i,c){xd(t,i);var w=null,T,P;switch(t){case"input":T=$s(e,n),P=$s(e,i),w=[];break;case"select":T=ss(e,n),P=ss(e,i),w=[];break;case"textarea":T=Uo(e,n),P=Uo(e,i),w=[];break;default:T=n,P=i,typeof T.onClick!="function"&&typeof P.onClick=="function"&&Cd(e);break}jm(t,P);var H,q,Z=null;for(H in T)if(!(P.hasOwnProperty(H)||!T.hasOwnProperty(H)||T[H]==null))if(H===so){var pe=T[H];for(q in pe)pe.hasOwnProperty(q)&&(Z||(Z={}),Z[q]="")}else H===kc||H===ro||H===bd||H===Sa||H===wy||(ie.hasOwnProperty(H)?w||(w=[]):(w=w||[]).push(H,null));for(H in P){var fe=P[H],De=T!=null?T[H]:void 0;if(!(!P.hasOwnProperty(H)||fe===De||fe==null&&De==null))if(H===so)if(fe&&Object.freeze(fe),De){for(q in De)De.hasOwnProperty(q)&&(!fe||!fe.hasOwnProperty(q))&&(Z||(Z={}),Z[q]="");for(q in fe)fe.hasOwnProperty(q)&&De[q]!==fe[q]&&(Z||(Z={}),Z[q]=fe[q])}else Z||(w||(w=[]),w.push(H,Z)),Z=fe;else if(H===kc){var ke=fe?fe[yd]:void 0,Oe=De?De[yd]:void 0;ke!=null&&Oe!==ke&&(w=w||[]).push(H,ke)}else H===ro?(typeof fe=="string"||typeof fe=="number")&&(w=w||[]).push(H,""+fe):H===bd||H===Sa||(ie.hasOwnProperty(H)?(fe!=null&&(typeof fe!="function"&&wd(H,fe),H==="onScroll"&&Yn("scroll",e)),!w&&De!==fe&&(w=[])):(w=w||[]).push(H,fe))}return Z&&(vC(Z,P[so]),(w=w||[]).push(so,Z)),w}function JD(e,t,n,i,c){n==="input"&&c.type==="radio"&&c.name!=null&&z(e,c);var w=qa(n,i),T=qa(n,c);switch(GD(e,t,w,T),n){case"input":ce(e,c);break;case"textarea":Yl(e,c);break;case"select":za(e,c);break}}function ZD(e){{var t=e.toLowerCase();return Ku.hasOwnProperty(t)&&Ku[t]||null}}function QD(e,t,n,i,c,w,T){var P,H;switch(P=qa(t,n),xd(t,n),t){case"dialog":Yn("cancel",e),Yn("close",e);break;case"iframe":case"object":case"embed":Yn("load",e);break;case"video":case"audio":for(var q=0;q<Ec.length;q++)Yn(Ec[q],e);break;case"source":Yn("error",e);break;case"img":case"image":case"link":Yn("error",e),Yn("load",e);break;case"details":Yn("toggle",e);break;case"input":Li(e,n),Yn("invalid",e);break;case"option":vt(e,n);break;case"select":sr(e,n),Yn("invalid",e);break;case"textarea":ql(e,n),Yn("invalid",e);break}jm(t,n);{H=new Set;for(var Z=e.attributes,pe=0;pe<Z.length;pe++){var fe=Z[pe].name.toLowerCase();switch(fe){case"value":break;case"checked":break;case"selected":break;default:H.add(Z[pe].name)}}}var De=null;for(var ke in n)if(n.hasOwnProperty(ke)){var Oe=n[ke];if(ke===ro)typeof Oe=="string"?e.textContent!==Oe&&(n[Sa]!==!0&&Sd(e.textContent,Oe,w,T),De=[ro,Oe]):typeof Oe=="number"&&e.textContent!==""+Oe&&(n[Sa]!==!0&&Sd(e.textContent,Oe,w,T),De=[ro,""+Oe]);else if(ie.hasOwnProperty(ke))Oe!=null&&(typeof Oe!="function"&&wd(ke,Oe),ke==="onScroll"&&Yn("scroll",e));else if(T&&typeof P=="boolean"){var lt=void 0,Lt=Qt(ke);if(n[Sa]!==!0){if(!(ke===bd||ke===Sa||ke==="value"||ke==="checked"||ke==="selected")){if(ke===kc){var jt=e.innerHTML,pn=Oe?Oe[yd]:void 0;if(pn!=null){var ln=Cy(e,pn);ln!==jt&&Rc(ke,jt,ln)}}else if(ke===so){if(H.delete(ke),Sy){var we=fC(Oe);lt=e.getAttribute("style"),we!==lt&&Rc(ke,lt,we)}}else if(P&&!X)H.delete(ke.toLowerCase()),lt=On(e,ke,Oe),Oe!==lt&&Rc(ke,lt,Oe);else if(!Ot(ke,Lt,P)&&!dn(ke,Oe,Lt,P)){var Ve=!1;if(Lt!==null)H.delete(Lt.attributeName),lt=kn(e,ke,Oe,Lt);else{var Ne=i;if(Ne===$r&&(Ne=Vo(t)),Ne===$r)H.delete(ke.toLowerCase());else{var Ke=ZD(ke);Ke!==null&&Ke!==ke&&(Ve=!0,H.delete(Ke)),H.delete(ke)}lt=On(e,ke,Oe)}var mt=X;!mt&&Oe!==lt&&!Ve&&Rc(ke,lt,Oe)}}}}}switch(T&&H.size>0&&n[Sa]!==!0&&Ny(H),t){case"input":br(e),K(e,n,!0);break;case"textarea":br(e),Kl(e);break;case"select":case"option":break;default:typeof n.onClick=="function"&&Cd(e);break}return De}function ek(e,t,n){var i=e.nodeValue!==t;return i}function If(e,t){{if(yr)return;yr=!0,b("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function Ff(e,t){{if(yr)return;yr=!0,b('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function Hf(e,t,n){{if(yr)return;yr=!0,b("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function zf(e,t){{if(t===""||yr)return;yr=!0,b('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function tk(e,t,n){switch(t){case"input":ue(e,n);return;case"textarea":Gu(e,n);return;case"select":Ao(e,n);return}}var Tc=function(){},Lc=function(){};{var nk=["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"],jy=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],ik=jy.concat(["button"]),rk=["dd","dt","li","option","optgroup","p","rp","rt"],Dy={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Lc=function(e,t){var n=Dt({},e||Dy),i={tag:t};return jy.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),ik.indexOf(t)!==-1&&(n.pTagInButtonScope=null),nk.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=i,t==="form"&&(n.formTag=i),t==="a"&&(n.aTagInScope=i),t==="button"&&(n.buttonTagInScope=i),t==="nobr"&&(n.nobrTagInScope=i),t==="p"&&(n.pTagInButtonScope=i),t==="li"&&(n.listItemTagAutoclosing=i),(t==="dd"||t==="dt")&&(n.dlItemTagAutoclosing=i),n};var sk=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 rk.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},ak=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},ky={};Tc=function(e,t,n){n=n||Dy;var i=n.current,c=i&&i.tag;t!=null&&(e!=null&&b("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var w=sk(e,c)?null:i,T=w?null:ak(e,n),P=w||T;if(P){var H=P.tag,q=!!w+"|"+e+"|"+H;if(!ky[q]){ky[q]=!0;var Z=e,pe="";if(e==="#text"?/\S/.test(t)?Z="Text nodes":(Z="Whitespace text nodes",pe=" Make sure you don't have any extra whitespace between tags on each line of your source code."):Z="<"+e+">",w){var fe="";H==="table"&&e==="tr"&&(fe+=" 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",Z,H,pe,fe)}else b("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",Z,H)}}}}var Ed="suppressHydrationWarning",jd="$",Dd="/$",Mc="$?",Ac="$!",ok="style",$f=null,Wf=null;function lk(e){var t,n,i=e.nodeType;switch(i){case Gr:case Bo:{t=i===Gr?"#document":"#fragment";var c=e.documentElement;n=c?c.namespaceURI:Po(null,"");break}default:{var w=i===ei?e.parentNode:e,T=w.namespaceURI||null;t=w.tagName,n=Po(T,t);break}}{var P=t.toLowerCase(),H=Lc(null,P);return{namespace:n,ancestorInfo:H}}}function ck(e,t,n){{var i=e,c=Po(i.namespace,t),w=Lc(i.ancestorInfo,t);return{namespace:c,ancestorInfo:w}}}function MV(e){return e}function uk(e){$f=oj(),Wf=SD();var t=null;return Vb(!1),t}function dk(e){CD(Wf),Vb($f),$f=null,Wf=null}function hk(e,t,n,i,c){var w;{var T=i;if(Tc(e,null,T.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var P=""+t.children,H=Lc(T.ancestorInfo,e);Tc(null,P,H)}w=T.namespace}var q=qD(e,t,n,w);return Vc(c,q),Qf(q,t),q}function mk(e,t){e.appendChild(t)}function fk(e,t,n,i,c){switch(KD(e,t,n,i),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}function pk(e,t,n,i,c,w){{var T=w;if(typeof i.children!=typeof n.children&&(typeof i.children=="string"||typeof i.children=="number")){var P=""+i.children,H=Lc(T.ancestorInfo,t);Tc(null,P,H)}}return XD(e,t,n,i)}function Gf(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 vk(e,t,n,i){{var c=n;Tc(null,e,c.ancestorInfo)}var w=YD(e,t);return Vc(i,w),w}function gk(){var e=window.event;return e===void 0?Xs:Pb(e.type)}var qf=typeof setTimeout=="function"?setTimeout:void 0,_k=typeof clearTimeout=="function"?clearTimeout:void 0,Yf=-1,Ry=typeof Promise=="function"?Promise:void 0,bk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ry<"u"?function(e){return Ry.resolve(null).then(e).catch(yk)}:qf;function yk(e){setTimeout(function(){throw e})}function xk(e,t,n,i){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 wk(e,t,n,i,c,w){JD(e,t,n,i,c),Qf(e,c)}function Ty(e){Wa(e,"")}function Nk(e,t,n){e.nodeValue=n}function Sk(e,t){e.appendChild(t)}function Ck(e,t){var n;e.nodeType===ei?(n=e.parentNode,n.insertBefore(t,e)):(n=e,n.appendChild(t));var i=e._reactRootContainer;i==null&&n.onclick===null&&Cd(n)}function Ek(e,t,n){e.insertBefore(t,n)}function jk(e,t,n){e.nodeType===ei?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}function Dk(e,t){e.removeChild(t)}function kk(e,t){e.nodeType===ei?e.parentNode.removeChild(t):e.removeChild(t)}function Kf(e,t){var n=t,i=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===ei){var w=c.data;if(w===Dd)if(i===0){e.removeChild(c),vc(t);return}else i--;else(w===jd||w===Mc||w===Ac)&&i++}n=c}while(n);vc(t)}function Rk(e,t){e.nodeType===ei?Kf(e.parentNode,t):e.nodeType===Ai&&Kf(e,t),vc(e)}function Tk(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function Lk(e){e.nodeValue=""}function Mk(e,t){e=e;var n=t[ok],i=n!=null&&n.hasOwnProperty("display")?n.display:null;e.style.display=nt("display",i)}function Ak(e,t){e.nodeValue=t}function Uk(e){e.nodeType===Ai?e.textContent="":e.nodeType===Gr&&e.documentElement&&e.removeChild(e.documentElement)}function Ok(e,t,n){return e.nodeType!==Ai||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function Vk(e,t){return t===""||e.nodeType!==Wr?null:e}function Pk(e){return e.nodeType!==ei?null:e}function Ly(e){return e.data===Mc}function Xf(e){return e.data===Ac}function Bk(e){var t=e.nextSibling&&e.nextSibling.dataset,n,i,c;return t&&(n=t.dgst,i=t.msg,c=t.stck),{message:i,digest:n,stack:c}}function Ik(e,t){e._reactRetry=t}function kd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===Ai||t===Wr)break;if(t===ei){var n=e.data;if(n===jd||n===Ac||n===Mc)break;if(n===Dd)return null}}return e}function Uc(e){return kd(e.nextSibling)}function Fk(e){return kd(e.firstChild)}function Hk(e){return kd(e.firstChild)}function zk(e){return kd(e.nextSibling)}function $k(e,t,n,i,c,w,T){Vc(w,e),Qf(e,n);var P;{var H=c;P=H.namespace}var q=(w.mode&mn)!==Ut;return QD(e,t,n,P,i,q,T)}function Wk(e,t,n,i){return Vc(n,e),n.mode&mn,ek(e,t)}function Gk(e,t){Vc(t,e)}function qk(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===ei){var i=t.data;if(i===Dd){if(n===0)return Uc(t);n--}else(i===jd||i===Ac||i===Mc)&&n++}t=t.nextSibling}return null}function My(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===ei){var i=t.data;if(i===jd||i===Ac||i===Mc){if(n===0)return t;n--}else i===Dd&&n++}t=t.previousSibling}return null}function Yk(e){vc(e)}function Kk(e){vc(e)}function Xk(e){return e!=="head"&&e!=="body"}function Jk(e,t,n,i){var c=!0;Sd(t.nodeValue,n,i,c)}function Zk(e,t,n,i,c,w){if(t[Ed]!==!0){var T=!0;Sd(i.nodeValue,c,w,T)}}function Qk(e,t){t.nodeType===Ai?If(e,t):t.nodeType===ei||Ff(e,t)}function eR(e,t){{var n=e.parentNode;n!==null&&(t.nodeType===Ai?If(n,t):t.nodeType===ei||Ff(n,t))}}function tR(e,t,n,i,c){(c||t[Ed]!==!0)&&(i.nodeType===Ai?If(n,i):i.nodeType===ei||Ff(n,i))}function nR(e,t,n){Hf(e,t)}function iR(e,t){zf(e,t)}function rR(e,t,n){{var i=e.parentNode;i!==null&&Hf(i,t)}}function sR(e,t){{var n=e.parentNode;n!==null&&zf(n,t)}}function aR(e,t,n,i,c,w){(w||t[Ed]!==!0)&&Hf(n,i)}function oR(e,t,n,i,c){(c||t[Ed]!==!0)&&zf(n,i)}function lR(e){b("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function cR(e){jc(e)}var al=Math.random().toString(36).slice(2),ol="__reactFiber$"+al,Jf="__reactProps$"+al,Oc="__reactContainer$"+al,Zf="__reactEvents$"+al,uR="__reactListeners$"+al,dR="__reactHandles$"+al;function hR(e){delete e[ol],delete e[Jf],delete e[Zf],delete e[uR],delete e[dR]}function Vc(e,t){t[ol]=e}function Rd(e,t){t[Oc]=e}function Ay(e){e[Oc]=null}function Pc(e){return!!e[Oc]}function ao(e){var t=e[ol];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Oc]||n[ol],t){var i=t.alternate;if(t.child!==null||i!==null&&i.child!==null)for(var c=My(e);c!==null;){var w=c[ol];if(w)return w;c=My(c)}return t}e=n,n=e.parentNode}return null}function Ca(e){var t=e[ol]||e[Oc];return t&&(t.tag===S||t.tag===C||t.tag===k||t.tag===h)?t:null}function ll(e){if(e.tag===S||e.tag===C)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Td(e){return e[Jf]||null}function Qf(e,t){e[Jf]=t}function mR(e){var t=e[Zf];return t===void 0&&(t=e[Zf]=new Set),t}var Uy={},Oy=d.ReactDebugCurrentFrame;function Ld(e){if(e){var t=e._owner,n=Er(e.type,e._source,t?t.type:null);Oy.setExtraStackFrame(n)}else Oy.setExtraStackFrame(null)}function cs(e,t,n,i,c){{var w=Function.call.bind(Ue);for(var T in e)if(w(e,T)){var P=void 0;try{if(typeof e[T]!="function"){var H=Error((i||"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 H.name="Invariant Violation",H}P=e[T](t,T,i,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){P=q}P&&!(P instanceof Error)&&(Ld(c),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).",i||"React class",n,T,typeof P),Ld(null)),P instanceof Error&&!(P.message in Uy)&&(Uy[P.message]=!0,Ld(c),b("Failed %s type: %s",n,P.message),Ld(null))}}}var ep=[],Md;Md=[];var Js=-1;function Ea(e){return{current:e}}function Yi(e,t){if(Js<0){b("Unexpected pop.");return}t!==Md[Js]&&b("Unexpected Fiber popped."),e.current=ep[Js],ep[Js]=null,Md[Js]=null,Js--}function Ki(e,t,n){Js++,ep[Js]=e.current,Md[Js]=n,e.current=t}var tp;tp={};var Ur={};Object.freeze(Ur);var Zs=Ea(Ur),js=Ea(!1),np=Ur;function cl(e,t,n){return n&&Ds(t)?np:Zs.current}function Vy(e,t,n){{var i=e.stateNode;i.__reactInternalMemoizedUnmaskedChildContext=t,i.__reactInternalMemoizedMaskedChildContext=n}}function ul(e,t){{var n=e.type,i=n.contextTypes;if(!i)return Ur;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===t)return c.__reactInternalMemoizedMaskedChildContext;var w={};for(var T in i)w[T]=t[T];{var P=Tt(e)||"Unknown";cs(i,w,"context",P)}return c&&Vy(e,t,w),w}}function Ad(){return js.current}function Ds(e){{var t=e.childContextTypes;return t!=null}}function Ud(e){Yi(js,e),Yi(Zs,e)}function ip(e){Yi(js,e),Yi(Zs,e)}function Py(e,t,n){{if(Zs.current!==Ur)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Ki(Zs,t,e),Ki(js,n,e)}}function By(e,t,n){{var i=e.stateNode,c=t.childContextTypes;if(typeof i.getChildContext!="function"){{var w=Tt(e)||"Unknown";tp[w]||(tp[w]=!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.",w,w))}return n}var T=i.getChildContext();for(var P in T)if(!(P in c))throw new Error((Tt(e)||"Unknown")+'.getChildContext(): key "'+P+'" is not defined in childContextTypes.');{var H=Tt(e)||"Unknown";cs(c,T,"child context",H)}return Dt({},n,T)}}function Od(e){{var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||Ur;return np=Zs.current,Ki(Zs,n,e),Ki(js,js.current,e),!0}}function Iy(e,t,n){{var i=e.stateNode;if(!i)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 c=By(e,t,np);i.__reactInternalMemoizedMergedChildContext=c,Yi(js,e),Yi(Zs,e),Ki(Zs,c,e),Ki(js,n,e)}else Yi(js,e),Ki(js,n,e)}}function fR(e){{if(!XC(e)||e.tag!==g)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 g:{var n=t.type;if(Ds(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 ja=0,Vd=1,Qs=null,rp=!1,sp=!1;function Fy(e){Qs===null?Qs=[e]:Qs.push(e)}function pR(e){rp=!0,Fy(e)}function Hy(){rp&&Da()}function Da(){if(!sp&&Qs!==null){sp=!0;var e=0,t=ls();try{var n=!0,i=Qs;for(Di(Lr);e<i.length;e++){var c=i[e];do c=c(n);while(c!==null)}Qs=null,rp=!1}catch(w){throw Qs!==null&&(Qs=Qs.slice(e+1)),hb(Qu,Da),w}finally{Di(t),sp=!1}}return null}var dl=[],hl=0,Pd=null,Bd=0,qr=[],Yr=0,oo=null,ea=1,ta="";function vR(e){return co(),(e.flags&rb)!==Bt}function gR(e){return co(),Bd}function _R(){var e=ta,t=ea,n=t&~bR(t);return n.toString(32)+e}function lo(e,t){co(),dl[hl++]=Bd,dl[hl++]=Pd,Pd=e,Bd=t}function zy(e,t,n){co(),qr[Yr++]=ea,qr[Yr++]=ta,qr[Yr++]=oo,oo=e;var i=ea,c=ta,w=Id(i)-1,T=i&~(1<<w),P=n+1,H=Id(t)+w;if(H>30){var q=w-w%5,Z=(1<<q)-1,pe=(T&Z).toString(32),fe=T>>q,De=w-q,ke=Id(t)+De,Oe=P<<De,lt=Oe|fe,Lt=pe+c;ea=1<<ke|lt,ta=Lt}else{var jt=P<<w,pn=jt|T,ln=c;ea=1<<H|pn,ta=ln}}function ap(e){co();var t=e.return;if(t!==null){var n=1,i=0;lo(e,n),zy(e,n,i)}}function Id(e){return 32-_b(e)}function bR(e){return 1<<Id(e)-1}function op(e){for(;e===Pd;)Pd=dl[--hl],dl[hl]=null,Bd=dl[--hl],dl[hl]=null;for(;e===oo;)oo=qr[--Yr],qr[Yr]=null,ta=qr[--Yr],qr[Yr]=null,ea=qr[--Yr],qr[Yr]=null}function yR(){return co(),oo!==null?{id:ea,overflow:ta}:null}function xR(e,t){co(),qr[Yr++]=ea,qr[Yr++]=ta,qr[Yr++]=oo,ea=t.id,ta=t.overflow,oo=e}function co(){Oi()||b("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Ui=null,Kr=null,us=!1,uo=!1,ka=null;function wR(){us&&b("We should not be hydrating here. This is a bug in React. Please file a bug.")}function $y(){uo=!0}function NR(){return uo}function SR(e){var t=e.stateNode.containerInfo;return Kr=Hk(t),Ui=e,us=!0,ka=null,uo=!1,!0}function CR(e,t,n){return Kr=zk(t),Ui=e,us=!0,ka=null,uo=!1,n!==null&&xR(e,n),!0}function Wy(e,t){switch(e.tag){case h:{Qk(e.stateNode.containerInfo,t);break}case S:{var n=(e.mode&mn)!==Ut;tR(e.type,e.memoizedProps,e.stateNode,t,n);break}case k:{var i=e.memoizedState;i.dehydrated!==null&&eR(i.dehydrated,t);break}}}function Gy(e,t){Wy(e,t);var n=kL();n.stateNode=t,n.return=e;var i=e.deletions;i===null?(e.deletions=[n],e.flags|=Ya):i.push(n)}function lp(e,t){{if(uo)return;switch(e.tag){case h:{var n=e.stateNode.containerInfo;switch(t.tag){case S:var i=t.type;t.pendingProps,nR(n,i);break;case C:var c=t.pendingProps;iR(n,c);break}break}case S:{var w=e.type,T=e.memoizedProps,P=e.stateNode;switch(t.tag){case S:{var H=t.type,q=t.pendingProps,Z=(e.mode&mn)!==Ut;aR(w,T,P,H,q,Z);break}case C:{var pe=t.pendingProps,fe=(e.mode&mn)!==Ut;oR(w,T,P,pe,fe);break}}break}case k:{var De=e.memoizedState,ke=De.dehydrated;if(ke!==null)switch(t.tag){case S:var Oe=t.type;t.pendingProps,rR(ke,Oe);break;case C:var lt=t.pendingProps;sR(ke,lt);break}break}default:return}}}function qy(e,t){t.flags=t.flags&~Gs|fi,lp(e,t)}function Yy(e,t){switch(e.tag){case S:{var n=e.type;e.pendingProps;var i=Ok(t,n);return i!==null?(e.stateNode=i,Ui=e,Kr=Fk(i),!0):!1}case C:{var c=e.pendingProps,w=Vk(t,c);return w!==null?(e.stateNode=w,Ui=e,Kr=null,!0):!1}case k:{var T=Pk(t);if(T!==null){var P={dehydrated:T,treeContext:yR(),retryLane:Rr};e.memoizedState=P;var H=RL(T);return H.return=e,e.child=H,Ui=e,Kr=null,!0}return!1}default:return!1}}function cp(e){return(e.mode&mn)!==Ut&&(e.flags&Cn)===Bt}function up(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function dp(e){if(us){var t=Kr;if(!t){cp(e)&&(lp(Ui,e),up()),qy(Ui,e),us=!1,Ui=e;return}var n=t;if(!Yy(e,t)){cp(e)&&(lp(Ui,e),up()),t=Uc(n);var i=Ui;if(!t||!Yy(e,t)){qy(Ui,e),us=!1,Ui=e;return}Gy(i,n)}}}function ER(e,t,n){var i=e.stateNode,c=!uo,w=$k(i,e.type,e.memoizedProps,t,n,e,c);return e.updateQueue=w,w!==null}function jR(e){var t=e.stateNode,n=e.memoizedProps,i=Wk(t,n,e);if(i){var c=Ui;if(c!==null)switch(c.tag){case h:{var w=c.stateNode.containerInfo,T=(c.mode&mn)!==Ut;Jk(w,t,n,T);break}case S:{var P=c.type,H=c.memoizedProps,q=c.stateNode,Z=(c.mode&mn)!==Ut;Zk(P,H,q,t,n,Z);break}}}return i}function DR(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.");Gk(n,e)}function kR(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 qk(n)}function Ky(e){for(var t=e.return;t!==null&&t.tag!==S&&t.tag!==h&&t.tag!==k;)t=t.return;Ui=t}function Fd(e){if(e!==Ui)return!1;if(!us)return Ky(e),us=!0,!1;if(e.tag!==h&&(e.tag!==S||Xk(e.type)&&!Gf(e.type,e.memoizedProps))){var t=Kr;if(t)if(cp(e))Xy(e),up();else for(;t;)Gy(e,t),t=Uc(t)}return Ky(e),e.tag===k?Kr=kR(e):Kr=Ui?Uc(e.stateNode):null,!0}function RR(){return us&&Kr!==null}function Xy(e){for(var t=Kr;t;)Wy(e,t),t=Uc(t)}function ml(){Ui=null,Kr=null,us=!1,uo=!1}function Jy(){ka!==null&&($w(ka),ka=null)}function Oi(){return us}function hp(e){ka===null?ka=[e]:ka.push(e)}var TR=d.ReactCurrentBatchConfig,LR=null;function MR(){return TR.transition}var ds={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var AR=function(e){for(var t=null,n=e;n!==null;)n.mode&ri&&(t=n),n=n.return;return t},ho=function(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")},Bc=[],Ic=[],Fc=[],Hc=[],zc=[],$c=[],mo=new Set;ds.recordUnsafeLifecycleWarnings=function(e,t){mo.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Bc.push(e),e.mode&ri&&typeof t.UNSAFE_componentWillMount=="function"&&Ic.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Fc.push(e),e.mode&ri&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Hc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&zc.push(e),e.mode&ri&&typeof t.UNSAFE_componentWillUpdate=="function"&&$c.push(e))},ds.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;Bc.length>0&&(Bc.forEach(function(fe){e.add(Tt(fe)||"Component"),mo.add(fe.type)}),Bc=[]);var t=new Set;Ic.length>0&&(Ic.forEach(function(fe){t.add(Tt(fe)||"Component"),mo.add(fe.type)}),Ic=[]);var n=new Set;Fc.length>0&&(Fc.forEach(function(fe){n.add(Tt(fe)||"Component"),mo.add(fe.type)}),Fc=[]);var i=new Set;Hc.length>0&&(Hc.forEach(function(fe){i.add(Tt(fe)||"Component"),mo.add(fe.type)}),Hc=[]);var c=new Set;zc.length>0&&(zc.forEach(function(fe){c.add(Tt(fe)||"Component"),mo.add(fe.type)}),zc=[]);var w=new Set;if($c.length>0&&($c.forEach(function(fe){w.add(Tt(fe)||"Component"),mo.add(fe.type)}),$c=[]),t.size>0){var T=ho(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(i.size>0){var P=ho(i);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`,P)}if(w.size>0){var H=ho(w);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`,H)}if(e.size>0){var q=ho(e);R(`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`,q)}if(n.size>0){var Z=ho(n);R(`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`,Z)}if(c.size>0){var pe=ho(c);R(`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`,pe)}};var Hd=new Map,Zy=new Set;ds.recordLegacyContextWarning=function(e,t){var n=AR(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(!Zy.has(e.type)){var i=Hd.get(n);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(i===void 0&&(i=[],Hd.set(n,i)),i.push(e))}},ds.flushLegacyContextWarning=function(){Hd.forEach(function(e,t){if(e.length!==0){var n=e[0],i=new Set;e.forEach(function(w){i.add(Tt(w)||"Component"),Zy.add(w.type)});var c=ho(i);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`,c)}finally{Qn()}}})},ds.discardPendingWarnings=function(){Bc=[],Ic=[],Fc=[],Hc=[],zc=[],$c=[],Hd=new Map}}var mp,fp,pp,vp,gp,Qy=function(e,t){};mp=!1,fp=!1,pp={},vp={},gp={},Qy=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=Tt(t)||"Component";vp[n]||(vp[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 UR(e){return e.prototype&&e.prototype.isReactComponent}function Wc(e,t,n){var i=n.ref;if(i!==null&&typeof i!="function"&&typeof i!="object"){if((e.mode&ri||Y)&&!(n._owner&&n._self&&n._owner.stateNode!==n._self)&&!(n._owner&&n._owner.tag!==g)&&!(typeof n.type=="function"&&!UR(n.type))&&n._owner){var c=Tt(e)||"Component";pp[c]||(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',c,i),pp[c]=!0)}if(n._owner){var w=n._owner,T;if(w){var P=w;if(P.tag!==g)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=P.stateNode}if(!T)throw new Error("Missing owner for string ref "+i+". This error is likely caused by a bug in React. Please file an issue.");var H=T;bt(i,"ref");var q=""+i;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===q)return t.ref;var Z=function(pe){var fe=H.refs;pe===null?delete fe[q]:fe[q]=pe};return Z._stringRef=q,Z}else{if(typeof i!="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 ("+i+`) 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 i}function zd(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 $d(e){{var t=Tt(e)||"Component";if(gp[t])return;gp[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 ex(e){var t=e._payload,n=e._init;return n(t)}function tx(e){function t(we,Ve){if(e){var Ne=we.deletions;Ne===null?(we.deletions=[Ve],we.flags|=Ya):Ne.push(Ve)}}function n(we,Ve){if(!e)return null;for(var Ne=Ve;Ne!==null;)t(we,Ne),Ne=Ne.sibling;return null}function i(we,Ve){for(var Ne=new Map,Ke=Ve;Ke!==null;)Ke.key!==null?Ne.set(Ke.key,Ke):Ne.set(Ke.index,Ke),Ke=Ke.sibling;return Ne}function c(we,Ve){var Ne=wo(we,Ve);return Ne.index=0,Ne.sibling=null,Ne}function w(we,Ve,Ne){if(we.index=Ne,!e)return we.flags|=rb,Ve;var Ke=we.alternate;if(Ke!==null){var mt=Ke.index;return mt<Ve?(we.flags|=fi,Ve):mt}else return we.flags|=fi,Ve}function T(we){return e&&we.alternate===null&&(we.flags|=fi),we}function P(we,Ve,Ne,Ke){if(Ve===null||Ve.tag!==C){var mt=hg(Ne,we.mode,Ke);return mt.return=we,mt}else{var ut=c(Ve,Ne);return ut.return=we,ut}}function H(we,Ve,Ne,Ke){var mt=Ne.type;if(mt===vn)return Z(we,Ve,Ne.props.children,Ke,Ne.key);if(Ve!==null&&(Ve.elementType===mt||a0(Ve,Ne)||typeof mt=="object"&&mt!==null&&mt.$$typeof===pt&&ex(mt)===Ve.type)){var ut=c(Ve,Ne.props);return ut.ref=Wc(we,Ve,Ne),ut.return=we,ut._debugSource=Ne._source,ut._debugOwner=Ne._owner,ut}var It=dg(Ne,we.mode,Ke);return It.ref=Wc(we,Ve,Ne),It.return=we,It}function q(we,Ve,Ne,Ke){if(Ve===null||Ve.tag!==f||Ve.stateNode.containerInfo!==Ne.containerInfo||Ve.stateNode.implementation!==Ne.implementation){var mt=mg(Ne,we.mode,Ke);return mt.return=we,mt}else{var ut=c(Ve,Ne.children||[]);return ut.return=we,ut}}function Z(we,Ve,Ne,Ke,mt){if(Ve===null||Ve.tag!==y){var ut=Ia(Ne,we.mode,Ke,mt);return ut.return=we,ut}else{var It=c(Ve,Ne);return It.return=we,It}}function pe(we,Ve,Ne){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number"){var Ke=hg(""+Ve,we.mode,Ne);return Ke.return=we,Ke}if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case nn:{var mt=dg(Ve,we.mode,Ne);return mt.ref=Wc(we,null,Ve),mt.return=we,mt}case En:{var ut=mg(Ve,we.mode,Ne);return ut.return=we,ut}case pt:{var It=Ve._payload,Wt=Ve._init;return pe(we,Wt(It),Ne)}}if(Ct(Ve)||ii(Ve)){var Ln=Ia(Ve,we.mode,Ne,null);return Ln.return=we,Ln}zd(we,Ve)}return typeof Ve=="function"&&$d(we),null}function fe(we,Ve,Ne,Ke){var mt=Ve!==null?Ve.key:null;if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number")return mt!==null?null:P(we,Ve,""+Ne,Ke);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case nn:return Ne.key===mt?H(we,Ve,Ne,Ke):null;case En:return Ne.key===mt?q(we,Ve,Ne,Ke):null;case pt:{var ut=Ne._payload,It=Ne._init;return fe(we,Ve,It(ut),Ke)}}if(Ct(Ne)||ii(Ne))return mt!==null?null:Z(we,Ve,Ne,Ke,null);zd(we,Ne)}return typeof Ne=="function"&&$d(we),null}function De(we,Ve,Ne,Ke,mt){if(typeof Ke=="string"&&Ke!==""||typeof Ke=="number"){var ut=we.get(Ne)||null;return P(Ve,ut,""+Ke,mt)}if(typeof Ke=="object"&&Ke!==null){switch(Ke.$$typeof){case nn:{var It=we.get(Ke.key===null?Ne:Ke.key)||null;return H(Ve,It,Ke,mt)}case En:{var Wt=we.get(Ke.key===null?Ne:Ke.key)||null;return q(Ve,Wt,Ke,mt)}case pt:var Ln=Ke._payload,xn=Ke._init;return De(we,Ve,Ne,xn(Ln),mt)}if(Ct(Ke)||ii(Ke)){var ci=we.get(Ne)||null;return Z(Ve,ci,Ke,mt,null)}zd(Ve,Ke)}return typeof Ke=="function"&&$d(Ve),null}function ke(we,Ve,Ne){{if(typeof we!="object"||we===null)return Ve;switch(we.$$typeof){case nn:case En:Qy(we,Ne);var Ke=we.key;if(typeof Ke!="string")break;if(Ve===null){Ve=new Set,Ve.add(Ke);break}if(!Ve.has(Ke)){Ve.add(Ke);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.",Ke);break;case pt:var mt=we._payload,ut=we._init;ke(ut(mt),Ve,Ne);break}}return Ve}function Oe(we,Ve,Ne,Ke){for(var mt=null,ut=0;ut<Ne.length;ut++){var It=Ne[ut];mt=ke(It,mt,we)}for(var Wt=null,Ln=null,xn=Ve,ci=0,wn=0,si=null;xn!==null&&wn<Ne.length;wn++){xn.index>wn?(si=xn,xn=null):si=xn.sibling;var Ji=fe(we,xn,Ne[wn],Ke);if(Ji===null){xn===null&&(xn=si);break}e&&xn&&Ji.alternate===null&&t(we,xn),ci=w(Ji,ci,wn),Ln===null?Wt=Ji:Ln.sibling=Ji,Ln=Ji,xn=si}if(wn===Ne.length){if(n(we,xn),Oi()){var zi=wn;lo(we,zi)}return Wt}if(xn===null){for(;wn<Ne.length;wn++){var Vr=pe(we,Ne[wn],Ke);Vr!==null&&(ci=w(Vr,ci,wn),Ln===null?Wt=Vr:Ln.sibling=Vr,Ln=Vr)}if(Oi()){var dr=wn;lo(we,dr)}return Wt}for(var hr=i(we,xn);wn<Ne.length;wn++){var Zi=De(hr,we,wn,Ne[wn],Ke);Zi!==null&&(e&&Zi.alternate!==null&&hr.delete(Zi.key===null?wn:Zi.key),ci=w(Zi,ci,wn),Ln===null?Wt=Zi:Ln.sibling=Zi,Ln=Zi)}if(e&&hr.forEach(function(Ll){return t(we,Ll)}),Oi()){var la=wn;lo(we,la)}return Wt}function lt(we,Ve,Ne,Ke){var mt=ii(Ne);if(typeof mt!="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"&&Ne[Symbol.toStringTag]==="Generator"&&(fp||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."),fp=!0),Ne.entries===mt&&(mp||b("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),mp=!0);var ut=mt.call(Ne);if(ut)for(var It=null,Wt=ut.next();!Wt.done;Wt=ut.next()){var Ln=Wt.value;It=ke(Ln,It,we)}}var xn=mt.call(Ne);if(xn==null)throw new Error("An iterable object provided no iterator.");for(var ci=null,wn=null,si=Ve,Ji=0,zi=0,Vr=null,dr=xn.next();si!==null&&!dr.done;zi++,dr=xn.next()){si.index>zi?(Vr=si,si=null):Vr=si.sibling;var hr=fe(we,si,dr.value,Ke);if(hr===null){si===null&&(si=Vr);break}e&&si&&hr.alternate===null&&t(we,si),Ji=w(hr,Ji,zi),wn===null?ci=hr:wn.sibling=hr,wn=hr,si=Vr}if(dr.done){if(n(we,si),Oi()){var Zi=zi;lo(we,Zi)}return ci}if(si===null){for(;!dr.done;zi++,dr=xn.next()){var la=pe(we,dr.value,Ke);la!==null&&(Ji=w(la,Ji,zi),wn===null?ci=la:wn.sibling=la,wn=la)}if(Oi()){var Ll=zi;lo(we,Ll)}return ci}for(var Nu=i(we,si);!dr.done;zi++,dr=xn.next()){var Os=De(Nu,we,zi,dr.value,Ke);Os!==null&&(e&&Os.alternate!==null&&Nu.delete(Os.key===null?zi:Os.key),Ji=w(Os,Ji,zi),wn===null?ci=Os:wn.sibling=Os,wn=Os)}if(e&&Nu.forEach(function(oM){return t(we,oM)}),Oi()){var aM=zi;lo(we,aM)}return ci}function Lt(we,Ve,Ne,Ke){if(Ve!==null&&Ve.tag===C){n(we,Ve.sibling);var mt=c(Ve,Ne);return mt.return=we,mt}n(we,Ve);var ut=hg(Ne,we.mode,Ke);return ut.return=we,ut}function jt(we,Ve,Ne,Ke){for(var mt=Ne.key,ut=Ve;ut!==null;){if(ut.key===mt){var It=Ne.type;if(It===vn){if(ut.tag===y){n(we,ut.sibling);var Wt=c(ut,Ne.props.children);return Wt.return=we,Wt._debugSource=Ne._source,Wt._debugOwner=Ne._owner,Wt}}else if(ut.elementType===It||a0(ut,Ne)||typeof It=="object"&&It!==null&&It.$$typeof===pt&&ex(It)===ut.type){n(we,ut.sibling);var Ln=c(ut,Ne.props);return Ln.ref=Wc(we,ut,Ne),Ln.return=we,Ln._debugSource=Ne._source,Ln._debugOwner=Ne._owner,Ln}n(we,ut);break}else t(we,ut);ut=ut.sibling}if(Ne.type===vn){var xn=Ia(Ne.props.children,we.mode,Ke,Ne.key);return xn.return=we,xn}else{var ci=dg(Ne,we.mode,Ke);return ci.ref=Wc(we,Ve,Ne),ci.return=we,ci}}function pn(we,Ve,Ne,Ke){for(var mt=Ne.key,ut=Ve;ut!==null;){if(ut.key===mt)if(ut.tag===f&&ut.stateNode.containerInfo===Ne.containerInfo&&ut.stateNode.implementation===Ne.implementation){n(we,ut.sibling);var It=c(ut,Ne.children||[]);return It.return=we,It}else{n(we,ut);break}else t(we,ut);ut=ut.sibling}var Wt=mg(Ne,we.mode,Ke);return Wt.return=we,Wt}function ln(we,Ve,Ne,Ke){var mt=typeof Ne=="object"&&Ne!==null&&Ne.type===vn&&Ne.key===null;if(mt&&(Ne=Ne.props.children),typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case nn:return T(jt(we,Ve,Ne,Ke));case En:return T(pn(we,Ve,Ne,Ke));case pt:var ut=Ne._payload,It=Ne._init;return ln(we,Ve,It(ut),Ke)}if(Ct(Ne))return Oe(we,Ve,Ne,Ke);if(ii(Ne))return lt(we,Ve,Ne,Ke);zd(we,Ne)}return typeof Ne=="string"&&Ne!==""||typeof Ne=="number"?T(Lt(we,Ve,""+Ne,Ke)):(typeof Ne=="function"&&$d(we),n(we,Ve))}return ln}var fl=tx(!0),nx=tx(!1);function OR(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,i=wo(n,n.pendingProps);for(t.child=i,i.return=t;n.sibling!==null;)n=n.sibling,i=i.sibling=wo(n,n.pendingProps),i.return=t;i.sibling=null}}function VR(e,t){for(var n=e.child;n!==null;)SL(n,t),n=n.sibling}var _p=Ea(null),bp;bp={};var Wd=null,pl=null,yp=null,Gd=!1;function qd(){Wd=null,pl=null,yp=null,Gd=!1}function ix(){Gd=!0}function rx(){Gd=!1}function sx(e,t,n){Ki(_p,t._currentValue,e),t._currentValue=n,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==bp&&b("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=bp}function xp(e,t){var n=_p.current;Yi(_p,t),e._currentValue=n}function wp(e,t,n){for(var i=e;i!==null;){var c=i.alternate;if(Qo(i.childLanes,t)?c!==null&&!Qo(c.childLanes,t)&&(c.childLanes=tn(c.childLanes,t)):(i.childLanes=tn(i.childLanes,t),c!==null&&(c.childLanes=tn(c.childLanes,t))),i===n)break;i=i.return}i!==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 PR(e,t,n){BR(e,t,n)}function BR(e,t,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=void 0,w=i.dependencies;if(w!==null){c=i.child;for(var T=w.firstContext;T!==null;){if(T.context===t){if(i.tag===g){var P=cc(n),H=na(qn,P);H.tag=Kd;var q=i.updateQueue;if(q!==null){var Z=q.shared,pe=Z.pending;pe===null?H.next=H:(H.next=pe.next,pe.next=H),Z.pending=H}}i.lanes=tn(i.lanes,n);var fe=i.alternate;fe!==null&&(fe.lanes=tn(fe.lanes,n)),wp(i.return,n,e),w.lanes=tn(w.lanes,n);break}T=T.next}}else if(i.tag===m)c=i.type===e.type?null:i.child;else if(i.tag===A){var De=i.return;if(De===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");De.lanes=tn(De.lanes,n);var ke=De.alternate;ke!==null&&(ke.lanes=tn(ke.lanes,n)),wp(De,n,e),c=i.sibling}else c=i.child;if(c!==null)c.return=i;else for(c=i;c!==null;){if(c===e){c=null;break}var Oe=c.sibling;if(Oe!==null){Oe.return=c.return,c=Oe;break}c=c.return}i=c}}function vl(e,t){Wd=e,pl=null,yp=null;var n=e.dependencies;if(n!==null){var i=n.firstContext;i!==null&&(Tr(n.lanes,t)&&au(),n.firstContext=null)}}function pi(e){Gd&&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(yp!==e){var n={context:e,memoizedValue:t,next:null};if(pl===null){if(Wd===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().");pl=n,Wd.dependencies={lanes:qe,firstContext:n}}else pl=pl.next=n}return t}var fo=null;function Np(e){fo===null?fo=[e]:fo.push(e)}function IR(){if(fo!==null){for(var e=0;e<fo.length;e++){var t=fo[e],n=t.interleaved;if(n!==null){t.interleaved=null;var i=n.next,c=t.pending;if(c!==null){var w=c.next;c.next=i,n.next=w}t.pending=n}}fo=null}}function ax(e,t,n,i){var c=t.interleaved;return c===null?(n.next=n,Np(t)):(n.next=c.next,c.next=n),t.interleaved=n,Yd(e,i)}function FR(e,t,n,i){var c=t.interleaved;c===null?(n.next=n,Np(t)):(n.next=c.next,c.next=n),t.interleaved=n}function HR(e,t,n,i){var c=t.interleaved;return c===null?(n.next=n,Np(t)):(n.next=c.next,c.next=n),t.interleaved=n,Yd(e,i)}function xr(e,t){return Yd(e,t)}var zR=Yd;function Yd(e,t){e.lanes=tn(e.lanes,t);var n=e.alternate;n!==null&&(n.lanes=tn(n.lanes,t)),n===null&&(e.flags&(fi|Gs))!==Bt&&n0(e);for(var i=e,c=e.return;c!==null;)c.childLanes=tn(c.childLanes,t),n=c.alternate,n!==null?n.childLanes=tn(n.childLanes,t):(c.flags&(fi|Gs))!==Bt&&n0(e),i=c,c=c.return;if(i.tag===h){var w=i.stateNode;return w}else return null}var ox=0,lx=1,Kd=2,Sp=3,Xd=!1,Cp,Jd;Cp=!1,Jd=null;function Ep(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:qe},effects:null};e.updateQueue=t}function cx(e,t){var n=t.updateQueue,i=e.updateQueue;if(n===i){var c={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects};t.updateQueue=c}}function na(e,t){var n={eventTime:e,lane:t,tag:ox,payload:null,callback:null,next:null};return n}function Ra(e,t,n){var i=e.updateQueue;if(i===null)return null;var c=i.shared;if(Jd===c&&!Cp&&(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."),Cp=!0),F5()){var w=c.pending;return w===null?t.next=t:(t.next=w.next,w.next=t),c.pending=t,zR(e,n)}else return HR(e,c,t,n)}function Zd(e,t,n){var i=t.updateQueue;if(i!==null){var c=i.shared;if(wb(n)){var w=c.lanes;w=Sb(w,e.pendingLanes);var T=tn(w,n);c.lanes=T,_f(e,T)}}}function jp(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null){var c=i.updateQueue;if(n===c){var w=null,T=null,P=n.firstBaseUpdate;if(P!==null){var H=P;do{var q={eventTime:H.eventTime,lane:H.lane,tag:H.tag,payload:H.payload,callback:H.callback,next:null};T===null?w=T=q:(T.next=q,T=q),H=H.next}while(H!==null);T===null?w=T=t:(T.next=t,T=t)}else w=T=t;n={baseState:c.baseState,firstBaseUpdate:w,lastBaseUpdate:T,shared:c.shared,effects:c.effects},e.updateQueue=n;return}}var Z=n.lastBaseUpdate;Z===null?n.firstBaseUpdate=t:Z.next=t,n.lastBaseUpdate=t}function $R(e,t,n,i,c,w){switch(n.tag){case lx:{var T=n.payload;if(typeof T=="function"){ix();var P=T.call(w,i,c);{if(e.mode&ri){Ei(!0);try{T.call(w,i,c)}finally{Ei(!1)}}rx()}return P}return T}case Sp:e.flags=e.flags&~or|Cn;case ox:{var H=n.payload,q;if(typeof H=="function"){ix(),q=H.call(w,i,c);{if(e.mode&ri){Ei(!0);try{H.call(w,i,c)}finally{Ei(!1)}}rx()}}else q=H;return q==null?i:Dt({},i,q)}case Kd:return Xd=!0,i}return i}function Qd(e,t,n,i){var c=e.updateQueue;Xd=!1,Jd=c.shared;var w=c.firstBaseUpdate,T=c.lastBaseUpdate,P=c.shared.pending;if(P!==null){c.shared.pending=null;var H=P,q=H.next;H.next=null,T===null?w=q:T.next=q,T=H;var Z=e.alternate;if(Z!==null){var pe=Z.updateQueue,fe=pe.lastBaseUpdate;fe!==T&&(fe===null?pe.firstBaseUpdate=q:fe.next=q,pe.lastBaseUpdate=H)}}if(w!==null){var De=c.baseState,ke=qe,Oe=null,lt=null,Lt=null,jt=w;do{var pn=jt.lane,ln=jt.eventTime;if(Qo(i,pn)){if(Lt!==null){var Ve={eventTime:ln,lane:ji,tag:jt.tag,payload:jt.payload,callback:jt.callback,next:null};Lt=Lt.next=Ve}De=$R(e,c,jt,De,t,n);var Ne=jt.callback;if(Ne!==null&&jt.lane!==ji){e.flags|=ib;var Ke=c.effects;Ke===null?c.effects=[jt]:Ke.push(jt)}}else{var we={eventTime:ln,lane:pn,tag:jt.tag,payload:jt.payload,callback:jt.callback,next:null};Lt===null?(lt=Lt=we,Oe=De):Lt=Lt.next=we,ke=tn(ke,pn)}if(jt=jt.next,jt===null){if(P=c.shared.pending,P===null)break;var mt=P,ut=mt.next;mt.next=null,jt=ut,c.lastBaseUpdate=mt,c.shared.pending=null}}while(!0);Lt===null&&(Oe=De),c.baseState=Oe,c.firstBaseUpdate=lt,c.lastBaseUpdate=Lt;var It=c.shared.interleaved;if(It!==null){var Wt=It;do ke=tn(ke,Wt.lane),Wt=Wt.next;while(Wt!==It)}else w===null&&(c.shared.lanes=qe);_u(ke),e.lanes=ke,e.memoizedState=De}Jd=null}function WR(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function ux(){Xd=!1}function eh(){return Xd}function dx(e,t,n){var i=t.effects;if(t.effects=null,i!==null)for(var c=0;c<i.length;c++){var w=i[c],T=w.callback;T!==null&&(w.callback=null,WR(T,n))}}var Gc={},Ta=Ea(Gc),qc=Ea(Gc),th=Ea(Gc);function nh(e){if(e===Gc)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 hx(){var e=nh(th.current);return e}function Dp(e,t){Ki(th,t,e),Ki(qc,e,e),Ki(Ta,Gc,e);var n=lk(t);Yi(Ta,e),Ki(Ta,n,e)}function gl(e){Yi(Ta,e),Yi(qc,e),Yi(th,e)}function kp(){var e=nh(Ta.current);return e}function mx(e){nh(th.current);var t=nh(Ta.current),n=ck(t,e.type);t!==n&&(Ki(qc,e,e),Ki(Ta,n,e))}function Rp(e){qc.current===e&&(Yi(Ta,e),Yi(qc,e))}var GR=0,fx=1,px=1,Yc=2,hs=Ea(GR);function Tp(e,t){return(e&t)!==0}function _l(e){return e&fx}function Lp(e,t){return e&fx|t}function qR(e,t){return e|t}function La(e,t){Ki(hs,t,e)}function bl(e){Yi(hs,e)}function YR(e,t){var n=e.memoizedState;return n!==null?n.dehydrated!==null:(e.memoizedProps,!0)}function ih(e){for(var t=e;t!==null;){if(t.tag===k){var n=t.memoizedState;if(n!==null){var i=n.dehydrated;if(i===null||Ly(i)||Xf(i))return t}}else if(t.tag===F&&t.memoizedProps.revealOrder!==void 0){var c=(t.flags&Cn)!==Bt;if(c)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 wr=0,gi=1,ks=2,_i=4,Vi=8,Mp=[];function Ap(){for(var e=0;e<Mp.length;e++){var t=Mp[e];t._workInProgressVersionPrimary=null}Mp.length=0}function KR(e,t){var n=t._getVersion,i=n(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i)}var ht=d.ReactCurrentDispatcher,Kc=d.ReactCurrentBatchConfig,Up,yl;Up=new Set;var po=qe,Tn=null,bi=null,yi=null,rh=!1,Xc=!1,Jc=0,XR=0,JR=25,Fe=null,Xr=null,Ma=-1,Op=!1;function jn(){{var e=Fe;Xr===null?Xr=[e]:Xr.push(e)}}function ot(){{var e=Fe;Xr!==null&&(Ma++,Xr[Ma]!==e&&ZR(e))}}function xl(e){e!=null&&!Ct(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 ZR(e){{var t=Tt(Tn);if(!Up.has(t)&&(Up.add(t),Xr!==null)){for(var n="",i=30,c=0;c<=Ma;c++){for(var w=Xr[c],T=c===Ma?e:w,P=c+1+". "+w;P.length<i;)P+=" ";P+=T+`
131
+ `,n+=P}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 Xi(){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 Vp(e,t){if(Op)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(!Ar(e[n],t[n]))return!1;return!0}function wl(e,t,n,i,c,w){po=w,Tn=t,Xr=e!==null?e._debugHookTypes:null,Ma=-1,Op=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=qe,e!==null&&e.memoizedState!==null?ht.current=Vx:Xr!==null?ht.current=Ox:ht.current=Ux;var T=n(i,c);if(Xc){var P=0;do{if(Xc=!1,Jc=0,P>=JR)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");P+=1,Op=!1,bi=null,yi=null,t.updateQueue=null,Ma=-1,ht.current=Px,T=n(i,c)}while(Xc)}ht.current=gh,t._debugHookTypes=Xr;var H=bi!==null&&bi.next!==null;if(po=qe,Tn=null,bi=null,yi=null,Fe=null,Xr=null,Ma=-1,e!==null&&(e.flags&qs)!==(t.flags&qs)&&(e.mode&mn)!==Ut&&b("Internal React error: Expected static flag was missing. Please notify the React team."),rh=!1,H)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return T}function Nl(){var e=Jc!==0;return Jc=0,e}function vx(e,t,n){t.updateQueue=e.updateQueue,(t.mode&Cs)!==Ut?t.flags&=-50333701:t.flags&=-2053,e.lanes=sd(e.lanes,n)}function gx(){if(ht.current=gh,rh){for(var e=Tn.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rh=!1}po=qe,Tn=null,bi=null,yi=null,Xr=null,Ma=-1,Fe=null,Rx=!1,Xc=!1,Jc=0}function Rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yi===null?Tn.memoizedState=yi=e:yi=yi.next=e,yi}function Jr(){var e;if(bi===null){var t=Tn.alternate;t!==null?e=t.memoizedState:e=null}else e=bi.next;var n;if(yi===null?n=Tn.memoizedState:n=yi.next,n!==null)yi=n,n=yi.next,bi=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");bi=e;var i={memoizedState:bi.memoizedState,baseState:bi.baseState,baseQueue:bi.baseQueue,queue:bi.queue,next:null};yi===null?Tn.memoizedState=yi=i:yi=yi.next=i}return yi}function _x(){return{lastEffect:null,stores:null}}function Pp(e,t){return typeof t=="function"?t(e):t}function Bp(e,t,n){var i=Rs(),c;n!==void 0?c=n(t):c=t,i.memoizedState=i.baseState=c;var w={pending:null,interleaved:null,lanes:qe,dispatch:null,lastRenderedReducer:e,lastRenderedState:c};i.queue=w;var T=w.dispatch=nT.bind(null,Tn,w);return[i.memoizedState,T]}function Ip(e,t,n){var i=Jr(),c=i.queue;if(c===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");c.lastRenderedReducer=e;var w=bi,T=w.baseQueue,P=c.pending;if(P!==null){if(T!==null){var H=T.next,q=P.next;T.next=q,P.next=H}w.baseQueue!==T&&b("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),w.baseQueue=T=P,c.pending=null}if(T!==null){var Z=T.next,pe=w.baseState,fe=null,De=null,ke=null,Oe=Z;do{var lt=Oe.lane;if(Qo(po,lt)){if(ke!==null){var jt={lane:ji,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null};ke=ke.next=jt}if(Oe.hasEagerState)pe=Oe.eagerState;else{var pn=Oe.action;pe=e(pe,pn)}}else{var Lt={lane:lt,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null};ke===null?(De=ke=Lt,fe=pe):ke=ke.next=Lt,Tn.lanes=tn(Tn.lanes,lt),_u(lt)}Oe=Oe.next}while(Oe!==null&&Oe!==Z);ke===null?fe=pe:ke.next=De,Ar(pe,i.memoizedState)||au(),i.memoizedState=pe,i.baseState=fe,i.baseQueue=ke,c.lastRenderedState=pe}var ln=c.interleaved;if(ln!==null){var we=ln;do{var Ve=we.lane;Tn.lanes=tn(Tn.lanes,Ve),_u(Ve),we=we.next}while(we!==ln)}else T===null&&(c.lanes=qe);var Ne=c.dispatch;return[i.memoizedState,Ne]}function Fp(e,t,n){var i=Jr(),c=i.queue;if(c===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");c.lastRenderedReducer=e;var w=c.dispatch,T=c.pending,P=i.memoizedState;if(T!==null){c.pending=null;var H=T.next,q=H;do{var Z=q.action;P=e(P,Z),q=q.next}while(q!==H);Ar(P,i.memoizedState)||au(),i.memoizedState=P,i.baseQueue===null&&(i.baseState=P),c.lastRenderedState=P}return[P,w]}function AV(e,t,n){}function UV(e,t,n){}function Hp(e,t,n){var i=Tn,c=Rs(),w,T=Oi();if(T){if(n===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");w=n(),yl||w!==n()&&(b("The result of getServerSnapshot should be cached to avoid an infinite loop"),yl=!0)}else{if(w=t(),!yl){var P=t();Ar(w,P)||(b("The result of getSnapshot should be cached to avoid an infinite loop"),yl=!0)}var H=Oh();if(H===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");rd(H,po)||bx(i,t,w)}c.memoizedState=w;var q={value:w,getSnapshot:t};return c.queue=q,ch(xx.bind(null,i,q,e),[e]),i.flags|=ga,Zc(gi|Vi,yx.bind(null,i,q,w,t),void 0,null),w}function sh(e,t,n){var i=Tn,c=Jr(),w=t();if(!yl){var T=t();Ar(w,T)||(b("The result of getSnapshot should be cached to avoid an infinite loop"),yl=!0)}var P=c.memoizedState,H=!Ar(P,w);H&&(c.memoizedState=w,au());var q=c.queue;if(eu(xx.bind(null,i,q,e),[e]),q.getSnapshot!==t||H||yi!==null&&yi.memoizedState.tag&gi){i.flags|=ga,Zc(gi|Vi,yx.bind(null,i,q,w,t),void 0,null);var Z=Oh();if(Z===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");rd(Z,po)||bx(i,t,w)}return w}function bx(e,t,n){e.flags|=Vm;var i={getSnapshot:t,value:n},c=Tn.updateQueue;if(c===null)c=_x(),Tn.updateQueue=c,c.stores=[i];else{var w=c.stores;w===null?c.stores=[i]:w.push(i)}}function yx(e,t,n,i){t.value=n,t.getSnapshot=i,wx(t)&&Nx(e)}function xx(e,t,n){var i=function(){wx(t)&&Nx(e)};return n(i)}function wx(e){var t=e.getSnapshot,n=e.value;try{var i=t();return!Ar(n,i)}catch{return!0}}function Nx(e){var t=xr(e,zt);t!==null&&Si(t,e,zt,qn)}function ah(e){var t=Rs();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:qe,dispatch:null,lastRenderedReducer:Pp,lastRenderedState:e};t.queue=n;var i=n.dispatch=iT.bind(null,Tn,n);return[t.memoizedState,i]}function zp(e){return Ip(Pp)}function $p(e){return Fp(Pp)}function Zc(e,t,n,i){var c={tag:e,create:t,destroy:n,deps:i,next:null},w=Tn.updateQueue;if(w===null)w=_x(),Tn.updateQueue=w,w.lastEffect=c.next=c;else{var T=w.lastEffect;if(T===null)w.lastEffect=c.next=c;else{var P=T.next;T.next=c,c.next=P,w.lastEffect=c}}return c}function Wp(e){var t=Rs();{var n={current:e};return t.memoizedState=n,n}}function oh(e){var t=Jr();return t.memoizedState}function Qc(e,t,n,i){var c=Rs(),w=i===void 0?null:i;Tn.flags|=e,c.memoizedState=Zc(gi|t,n,void 0,w)}function lh(e,t,n,i){var c=Jr(),w=i===void 0?null:i,T=void 0;if(bi!==null){var P=bi.memoizedState;if(T=P.destroy,w!==null){var H=P.deps;if(Vp(w,H)){c.memoizedState=Zc(t,n,T,w);return}}}Tn.flags|=e,c.memoizedState=Zc(gi|t,n,T,w)}function ch(e,t){return(Tn.mode&Cs)!==Ut?Qc(Fm|ga|Im,Vi,e,t):Qc(ga|Im,Vi,e,t)}function eu(e,t){return lh(ga,Vi,e,t)}function Gp(e,t){return Qc(Sn,ks,e,t)}function uh(e,t){return lh(Sn,ks,e,t)}function qp(e,t){var n=Sn;return n|=Ja,(Tn.mode&Cs)!==Ut&&(n|=_a),Qc(n,_i,e,t)}function dh(e,t){return lh(Sn,_i,e,t)}function Sx(e,t){if(typeof t=="function"){var n=t,i=e();return n(i),function(){n(null)}}else if(t!=null){var c=t;c.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(c).join(", ")+"}");var w=e();return c.current=w,function(){c.current=null}}}function Yp(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 i=n!=null?n.concat([e]):null,c=Sn;return c|=Ja,(Tn.mode&Cs)!==Ut&&(c|=_a),Qc(c,_i,Sx.bind(null,t,e),i)}function hh(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 i=n!=null?n.concat([e]):null;return lh(Sn,_i,Sx.bind(null,t,e),i)}function QR(e,t){}var mh=QR;function Kp(e,t){var n=Rs(),i=t===void 0?null:t;return n.memoizedState=[e,i],e}function fh(e,t){var n=Jr(),i=t===void 0?null:t,c=n.memoizedState;if(c!==null&&i!==null){var w=c[1];if(Vp(i,w))return c[0]}return n.memoizedState=[e,i],e}function Xp(e,t){var n=Rs(),i=t===void 0?null:t,c=e();return n.memoizedState=[c,i],c}function ph(e,t){var n=Jr(),i=t===void 0?null:t,c=n.memoizedState;if(c!==null&&i!==null){var w=c[1];if(Vp(i,w))return c[0]}var T=e();return n.memoizedState=[T,i],T}function Jp(e){var t=Rs();return t.memoizedState=e,e}function Cx(e){var t=Jr(),n=bi,i=n.memoizedState;return jx(t,i,e)}function Ex(e){var t=Jr();if(bi===null)return t.memoizedState=e,e;var n=bi.memoizedState;return jx(t,n,e)}function jx(e,t,n){var i=!PE(po);if(i){if(!Ar(n,t)){var c=Nb();Tn.lanes=tn(Tn.lanes,c),_u(c),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,au()),e.memoizedState=n,n}function eT(e,t,n){var i=ls();Di(qE(i,Ks)),e(!0);var c=Kc.transition;Kc.transition={};var w=Kc.transition;Kc.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(Di(i),Kc.transition=c,c===null&&w._updatedFibers){var T=w._updatedFibers.size;T>10&&R("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."),w._updatedFibers.clear()}}}function Zp(){var e=ah(!1),t=e[0],n=e[1],i=eT.bind(null,n),c=Rs();return c.memoizedState=i,[t,i]}function Dx(){var e=zp(),t=e[0],n=Jr(),i=n.memoizedState;return[t,i]}function kx(){var e=$p(),t=e[0],n=Jr(),i=n.memoizedState;return[t,i]}var Rx=!1;function tT(){return Rx}function Qp(){var e=Rs(),t=Oh(),n=t.identifierPrefix,i;if(Oi()){var c=_R();i=":"+n+"R"+c;var w=Jc++;w>0&&(i+="H"+w.toString(32)),i+=":"}else{var T=XR++;i=":"+n+"r"+T.toString(32)+":"}return e.memoizedState=i,i}function vh(){var e=Jr(),t=e.memoizedState;return t}function nT(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 i=Pa(e),c={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tx(e))Lx(t,c);else{var w=ax(e,t,c,i);if(w!==null){var T=ur();Si(w,e,i,T),Mx(w,t,i)}}Ax(e,i)}function iT(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 i=Pa(e),c={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tx(e))Lx(t,c);else{var w=e.alternate;if(e.lanes===qe&&(w===null||w.lanes===qe)){var T=t.lastRenderedReducer;if(T!==null){var P;P=ht.current,ht.current=ms;try{var H=t.lastRenderedState,q=T(H,n);if(c.hasEagerState=!0,c.eagerState=q,Ar(q,H)){FR(e,t,c,i);return}}catch{}finally{ht.current=P}}}var Z=ax(e,t,c,i);if(Z!==null){var pe=ur();Si(Z,e,i,pe),Mx(Z,t,i)}}Ax(e,i)}function Tx(e){var t=e.alternate;return e===Tn||t!==null&&t===Tn}function Lx(e,t){Xc=rh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Mx(e,t,n){if(wb(n)){var i=t.lanes;i=Sb(i,e.pendingLanes);var c=tn(i,n);t.lanes=c,_f(e,c)}}function Ax(e,t,n){Gm(e,t)}var gh={readContext:pi,useCallback:Xi,useContext:Xi,useEffect:Xi,useImperativeHandle:Xi,useInsertionEffect:Xi,useLayoutEffect:Xi,useMemo:Xi,useReducer:Xi,useRef:Xi,useState:Xi,useDebugValue:Xi,useDeferredValue:Xi,useTransition:Xi,useMutableSource:Xi,useSyncExternalStore:Xi,useId:Xi,unstable_isNewReconciler:se},Ux=null,Ox=null,Vx=null,Px=null,Ts=null,ms=null,_h=null;{var ev=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().")},$t=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")};Ux={readContext:function(e){return pi(e)},useCallback:function(e,t){return Fe="useCallback",jn(),xl(t),Kp(e,t)},useContext:function(e){return Fe="useContext",jn(),pi(e)},useEffect:function(e,t){return Fe="useEffect",jn(),xl(t),ch(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",jn(),xl(n),Yp(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",jn(),xl(t),Gp(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",jn(),xl(t),qp(e,t)},useMemo:function(e,t){Fe="useMemo",jn(),xl(t);var n=ht.current;ht.current=Ts;try{return Xp(e,t)}finally{ht.current=n}},useReducer:function(e,t,n){Fe="useReducer",jn();var i=ht.current;ht.current=Ts;try{return Bp(e,t,n)}finally{ht.current=i}},useRef:function(e){return Fe="useRef",jn(),Wp(e)},useState:function(e){Fe="useState",jn();var t=ht.current;ht.current=Ts;try{return ah(e)}finally{ht.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",jn(),void 0},useDeferredValue:function(e){return Fe="useDeferredValue",jn(),Jp(e)},useTransition:function(){return Fe="useTransition",jn(),Zp()},useMutableSource:function(e,t,n){return Fe="useMutableSource",jn(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",jn(),Hp(e,t,n)},useId:function(){return Fe="useId",jn(),Qp()},unstable_isNewReconciler:se},Ox={readContext:function(e){return pi(e)},useCallback:function(e,t){return Fe="useCallback",ot(),Kp(e,t)},useContext:function(e){return Fe="useContext",ot(),pi(e)},useEffect:function(e,t){return Fe="useEffect",ot(),ch(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",ot(),Yp(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",ot(),Gp(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",ot(),qp(e,t)},useMemo:function(e,t){Fe="useMemo",ot();var n=ht.current;ht.current=Ts;try{return Xp(e,t)}finally{ht.current=n}},useReducer:function(e,t,n){Fe="useReducer",ot();var i=ht.current;ht.current=Ts;try{return Bp(e,t,n)}finally{ht.current=i}},useRef:function(e){return Fe="useRef",ot(),Wp(e)},useState:function(e){Fe="useState",ot();var t=ht.current;ht.current=Ts;try{return ah(e)}finally{ht.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",ot(),void 0},useDeferredValue:function(e){return Fe="useDeferredValue",ot(),Jp(e)},useTransition:function(){return Fe="useTransition",ot(),Zp()},useMutableSource:function(e,t,n){return Fe="useMutableSource",ot(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",ot(),Hp(e,t,n)},useId:function(){return Fe="useId",ot(),Qp()},unstable_isNewReconciler:se},Vx={readContext:function(e){return pi(e)},useCallback:function(e,t){return Fe="useCallback",ot(),fh(e,t)},useContext:function(e){return Fe="useContext",ot(),pi(e)},useEffect:function(e,t){return Fe="useEffect",ot(),eu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",ot(),hh(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",ot(),uh(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",ot(),dh(e,t)},useMemo:function(e,t){Fe="useMemo",ot();var n=ht.current;ht.current=ms;try{return ph(e,t)}finally{ht.current=n}},useReducer:function(e,t,n){Fe="useReducer",ot();var i=ht.current;ht.current=ms;try{return Ip(e,t,n)}finally{ht.current=i}},useRef:function(e){return Fe="useRef",ot(),oh()},useState:function(e){Fe="useState",ot();var t=ht.current;ht.current=ms;try{return zp(e)}finally{ht.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",ot(),mh()},useDeferredValue:function(e){return Fe="useDeferredValue",ot(),Cx(e)},useTransition:function(){return Fe="useTransition",ot(),Dx()},useMutableSource:function(e,t,n){return Fe="useMutableSource",ot(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",ot(),sh(e,t)},useId:function(){return Fe="useId",ot(),vh()},unstable_isNewReconciler:se},Px={readContext:function(e){return pi(e)},useCallback:function(e,t){return Fe="useCallback",ot(),fh(e,t)},useContext:function(e){return Fe="useContext",ot(),pi(e)},useEffect:function(e,t){return Fe="useEffect",ot(),eu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",ot(),hh(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",ot(),uh(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",ot(),dh(e,t)},useMemo:function(e,t){Fe="useMemo",ot();var n=ht.current;ht.current=_h;try{return ph(e,t)}finally{ht.current=n}},useReducer:function(e,t,n){Fe="useReducer",ot();var i=ht.current;ht.current=_h;try{return Fp(e,t,n)}finally{ht.current=i}},useRef:function(e){return Fe="useRef",ot(),oh()},useState:function(e){Fe="useState",ot();var t=ht.current;ht.current=_h;try{return $p(e)}finally{ht.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",ot(),mh()},useDeferredValue:function(e){return Fe="useDeferredValue",ot(),Ex(e)},useTransition:function(){return Fe="useTransition",ot(),kx()},useMutableSource:function(e,t,n){return Fe="useMutableSource",ot(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",ot(),sh(e,t)},useId:function(){return Fe="useId",ot(),vh()},unstable_isNewReconciler:se},Ts={readContext:function(e){return ev(),pi(e)},useCallback:function(e,t){return Fe="useCallback",$t(),jn(),Kp(e,t)},useContext:function(e){return Fe="useContext",$t(),jn(),pi(e)},useEffect:function(e,t){return Fe="useEffect",$t(),jn(),ch(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",$t(),jn(),Yp(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",$t(),jn(),Gp(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",$t(),jn(),qp(e,t)},useMemo:function(e,t){Fe="useMemo",$t(),jn();var n=ht.current;ht.current=Ts;try{return Xp(e,t)}finally{ht.current=n}},useReducer:function(e,t,n){Fe="useReducer",$t(),jn();var i=ht.current;ht.current=Ts;try{return Bp(e,t,n)}finally{ht.current=i}},useRef:function(e){return Fe="useRef",$t(),jn(),Wp(e)},useState:function(e){Fe="useState",$t(),jn();var t=ht.current;ht.current=Ts;try{return ah(e)}finally{ht.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",$t(),jn(),void 0},useDeferredValue:function(e){return Fe="useDeferredValue",$t(),jn(),Jp(e)},useTransition:function(){return Fe="useTransition",$t(),jn(),Zp()},useMutableSource:function(e,t,n){return Fe="useMutableSource",$t(),jn(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",$t(),jn(),Hp(e,t,n)},useId:function(){return Fe="useId",$t(),jn(),Qp()},unstable_isNewReconciler:se},ms={readContext:function(e){return ev(),pi(e)},useCallback:function(e,t){return Fe="useCallback",$t(),ot(),fh(e,t)},useContext:function(e){return Fe="useContext",$t(),ot(),pi(e)},useEffect:function(e,t){return Fe="useEffect",$t(),ot(),eu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",$t(),ot(),hh(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",$t(),ot(),uh(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",$t(),ot(),dh(e,t)},useMemo:function(e,t){Fe="useMemo",$t(),ot();var n=ht.current;ht.current=ms;try{return ph(e,t)}finally{ht.current=n}},useReducer:function(e,t,n){Fe="useReducer",$t(),ot();var i=ht.current;ht.current=ms;try{return Ip(e,t,n)}finally{ht.current=i}},useRef:function(e){return Fe="useRef",$t(),ot(),oh()},useState:function(e){Fe="useState",$t(),ot();var t=ht.current;ht.current=ms;try{return zp(e)}finally{ht.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",$t(),ot(),mh()},useDeferredValue:function(e){return Fe="useDeferredValue",$t(),ot(),Cx(e)},useTransition:function(){return Fe="useTransition",$t(),ot(),Dx()},useMutableSource:function(e,t,n){return Fe="useMutableSource",$t(),ot(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",$t(),ot(),sh(e,t)},useId:function(){return Fe="useId",$t(),ot(),vh()},unstable_isNewReconciler:se},_h={readContext:function(e){return ev(),pi(e)},useCallback:function(e,t){return Fe="useCallback",$t(),ot(),fh(e,t)},useContext:function(e){return Fe="useContext",$t(),ot(),pi(e)},useEffect:function(e,t){return Fe="useEffect",$t(),ot(),eu(e,t)},useImperativeHandle:function(e,t,n){return Fe="useImperativeHandle",$t(),ot(),hh(e,t,n)},useInsertionEffect:function(e,t){return Fe="useInsertionEffect",$t(),ot(),uh(e,t)},useLayoutEffect:function(e,t){return Fe="useLayoutEffect",$t(),ot(),dh(e,t)},useMemo:function(e,t){Fe="useMemo",$t(),ot();var n=ht.current;ht.current=ms;try{return ph(e,t)}finally{ht.current=n}},useReducer:function(e,t,n){Fe="useReducer",$t(),ot();var i=ht.current;ht.current=ms;try{return Fp(e,t,n)}finally{ht.current=i}},useRef:function(e){return Fe="useRef",$t(),ot(),oh()},useState:function(e){Fe="useState",$t(),ot();var t=ht.current;ht.current=ms;try{return $p(e)}finally{ht.current=t}},useDebugValue:function(e,t){return Fe="useDebugValue",$t(),ot(),mh()},useDeferredValue:function(e){return Fe="useDeferredValue",$t(),ot(),Ex(e)},useTransition:function(){return Fe="useTransition",$t(),ot(),kx()},useMutableSource:function(e,t,n){return Fe="useMutableSource",$t(),ot(),void 0},useSyncExternalStore:function(e,t,n){return Fe="useSyncExternalStore",$t(),ot(),sh(e,t)},useId:function(){return Fe="useId",$t(),ot(),vh()},unstable_isNewReconciler:se}}var Aa=s.unstable_now,Bx=0,bh=-1,tu=-1,yh=-1,tv=!1,xh=!1;function Ix(){return tv}function rT(){xh=!0}function sT(){tv=!1,xh=!1}function aT(){tv=xh,xh=!1}function Fx(){return Bx}function Hx(){Bx=Aa()}function nv(e){tu=Aa(),e.actualStartTime<0&&(e.actualStartTime=Aa())}function zx(e){tu=-1}function wh(e,t){if(tu>=0){var n=Aa()-tu;e.actualDuration+=n,t&&(e.selfBaseDuration=n),tu=-1}}function Ls(e){if(bh>=0){var t=Aa()-bh;bh=-1;for(var n=e.return;n!==null;){switch(n.tag){case h:var i=n.stateNode;i.effectDuration+=t;return;case N:var c=n.stateNode;c.effectDuration+=t;return}n=n.return}}}function iv(e){if(yh>=0){var t=Aa()-yh;yh=-1;for(var n=e.return;n!==null;){switch(n.tag){case h:var i=n.stateNode;i!==null&&(i.passiveEffectDuration+=t);return;case N:var c=n.stateNode;c!==null&&(c.passiveEffectDuration+=t);return}n=n.return}}}function Ms(){bh=Aa()}function rv(){yh=Aa()}function sv(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function fs(e,t){if(e&&e.defaultProps){var n=Dt({},t),i=e.defaultProps;for(var c in i)n[c]===void 0&&(n[c]=i[c]);return n}return t}var av={},ov,lv,cv,uv,dv,$x,Nh,hv,mv,fv,nu;{ov=new Set,lv=new Set,cv=new Set,uv=new Set,hv=new Set,dv=new Set,mv=new Set,fv=new Set,nu=new Set;var Wx=new Set;Nh=function(e,t){if(!(e===null||typeof e=="function")){var n=t+"_"+e;Wx.has(n)||(Wx.add(n),b("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},$x=function(e,t){if(t===void 0){var n=on(e)||"Component";dv.has(n)||(dv.add(n),b("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(av,"_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(av)}function pv(e,t,n,i){var c=e.memoizedState,w=n(i,c);{if(e.mode&ri){Ei(!0);try{w=n(i,c)}finally{Ei(!1)}}$x(t,w)}var T=w==null?c:Dt({},c,w);if(e.memoizedState=T,e.lanes===qe){var P=e.updateQueue;P.baseState=T}}var vv={isMounted:JC,enqueueSetState:function(e,t,n){var i=$o(e),c=ur(),w=Pa(i),T=na(c,w);T.payload=t,n!=null&&(Nh(n,"setState"),T.callback=n);var P=Ra(i,T,w);P!==null&&(Si(P,i,w,c),Zd(P,i,w)),Gm(i,w)},enqueueReplaceState:function(e,t,n){var i=$o(e),c=ur(),w=Pa(i),T=na(c,w);T.tag=lx,T.payload=t,n!=null&&(Nh(n,"replaceState"),T.callback=n);var P=Ra(i,T,w);P!==null&&(Si(P,i,w,c),Zd(P,i,w)),Gm(i,w)},enqueueForceUpdate:function(e,t){var n=$o(e),i=ur(),c=Pa(n),w=na(i,c);w.tag=Kd,t!=null&&(Nh(t,"forceUpdate"),w.callback=t);var T=Ra(n,w,c);T!==null&&(Si(T,n,c,i),Zd(T,n,c)),DE(n,c)}};function Gx(e,t,n,i,c,w,T){var P=e.stateNode;if(typeof P.shouldComponentUpdate=="function"){var H=P.shouldComponentUpdate(i,w,T);{if(e.mode&ri){Ei(!0);try{H=P.shouldComponentUpdate(i,w,T)}finally{Ei(!1)}}H===void 0&&b("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",on(t)||"Component")}return H}return t.prototype&&t.prototype.isPureReactComponent?!Sc(n,i)||!Sc(c,w):!0}function oT(e,t,n){var i=e.stateNode;{var c=on(t)||"Component",w=i.render;w||(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?",c):b("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",c)),i.getInitialState&&!i.getInitialState.isReactClassApproved&&!i.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?",c),i.getDefaultProps&&!i.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.",c),i.propTypes&&b("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",c),i.contextType&&b("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",c),t.childContextTypes&&!nu.has(t)&&(e.mode&ri)===Ut&&(nu.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`,c)),t.contextTypes&&!nu.has(t)&&(e.mode&ri)===Ut&&(nu.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`,c)),i.contextTypes&&b("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",c),t.contextType&&t.contextTypes&&!mv.has(t)&&(mv.add(t),b("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",c)),typeof i.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.",c),t.prototype&&t.prototype.isPureReactComponent&&typeof i.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.",on(t)||"A pure component"),typeof i.componentDidUnmount=="function"&&b("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",c),typeof i.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().",c),typeof i.componentWillRecieveProps=="function"&&b("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",c),typeof i.UNSAFE_componentWillRecieveProps=="function"&&b("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",c);var T=i.props!==n;i.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.",c,c),i.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.",c,c),typeof i.getSnapshotBeforeUpdate=="function"&&typeof i.componentDidUpdate!="function"&&!cv.has(t)&&(cv.add(t),b("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",on(t))),typeof i.getDerivedStateFromProps=="function"&&b("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",c),typeof i.getDerivedStateFromError=="function"&&b("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",c),typeof t.getSnapshotBeforeUpdate=="function"&&b("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",c);var P=i.state;P&&(typeof P!="object"||Ct(P))&&b("%s.state: must be set to an object or null",c),typeof i.getChildContext=="function"&&typeof t.childContextTypes!="object"&&b("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",c)}}function qx(e,t){t.updater=vv,e.stateNode=t,qC(t,e),t._reactInternalInstance=av}function Yx(e,t,n){var i=!1,c=Ur,w=Ur,T=t.contextType;if("contextType"in t){var P=T===null||T!==void 0&&T.$$typeof===et&&T._context===void 0;if(!P&&!fv.has(t)){fv.add(t);var H="";T===void 0?H=" 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"?H=" However, it is set to a "+typeof T+".":T.$$typeof===$e?H=" Did you accidentally pass the Context.Provider instead?":T._context!==void 0?H=" Did you accidentally pass the Context.Consumer instead?":H=" 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",on(t)||"Component",H)}}if(typeof T=="object"&&T!==null)w=pi(T);else{c=cl(e,t,!0);var q=t.contextTypes;i=q!=null,w=i?ul(e,c):Ur}var Z=new t(n,w);if(e.mode&ri){Ei(!0);try{Z=new t(n,w)}finally{Ei(!1)}}var pe=e.memoizedState=Z.state!==null&&Z.state!==void 0?Z.state:null;qx(e,Z);{if(typeof t.getDerivedStateFromProps=="function"&&pe===null){var fe=on(t)||"Component";lv.has(fe)||(lv.add(fe),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.",fe,Z.state===null?"null":"undefined",fe))}if(typeof t.getDerivedStateFromProps=="function"||typeof Z.getSnapshotBeforeUpdate=="function"){var De=null,ke=null,Oe=null;if(typeof Z.componentWillMount=="function"&&Z.componentWillMount.__suppressDeprecationWarning!==!0?De="componentWillMount":typeof Z.UNSAFE_componentWillMount=="function"&&(De="UNSAFE_componentWillMount"),typeof Z.componentWillReceiveProps=="function"&&Z.componentWillReceiveProps.__suppressDeprecationWarning!==!0?ke="componentWillReceiveProps":typeof Z.UNSAFE_componentWillReceiveProps=="function"&&(ke="UNSAFE_componentWillReceiveProps"),typeof Z.componentWillUpdate=="function"&&Z.componentWillUpdate.__suppressDeprecationWarning!==!0?Oe="componentWillUpdate":typeof Z.UNSAFE_componentWillUpdate=="function"&&(Oe="UNSAFE_componentWillUpdate"),De!==null||ke!==null||Oe!==null){var lt=on(t)||"Component",Lt=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";uv.has(lt)||(uv.add(lt),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`,lt,Lt,De!==null?`
153
+ `+De:"",ke!==null?`
154
+ `+ke:"",Oe!==null?`
155
+ `+Oe:""))}}}return i&&Vy(e,c,w),Z}function lT(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.",Tt(e)||"Component"),vv.enqueueReplaceState(t,t.state,null))}function Kx(e,t,n,i){var c=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==c){{var w=Tt(e)||"Component";ov.has(w)||(ov.add(w),b("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",w))}vv.enqueueReplaceState(t,t.state,null)}}function gv(e,t,n,i){oT(e,t,n);var c=e.stateNode;c.props=n,c.state=e.memoizedState,c.refs={},Ep(e);var w=t.contextType;if(typeof w=="object"&&w!==null)c.context=pi(w);else{var T=cl(e,t,!0);c.context=ul(e,T)}{if(c.state===n){var P=on(t)||"Component";hv.has(P)||(hv.add(P),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.",P))}e.mode&ri&&ds.recordLegacyContextWarning(e,c),ds.recordUnsafeLifecycleWarnings(e,c)}c.state=e.memoizedState;var H=t.getDerivedStateFromProps;if(typeof H=="function"&&(pv(e,t,H,n),c.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof c.getSnapshotBeforeUpdate!="function"&&(typeof c.UNSAFE_componentWillMount=="function"||typeof c.componentWillMount=="function")&&(lT(e,c),Qd(e,n,c,i),c.state=e.memoizedState),typeof c.componentDidMount=="function"){var q=Sn;q|=Ja,(e.mode&Cs)!==Ut&&(q|=_a),e.flags|=q}}function cT(e,t,n,i){var c=e.stateNode,w=e.memoizedProps;c.props=w;var T=c.context,P=t.contextType,H=Ur;if(typeof P=="object"&&P!==null)H=pi(P);else{var q=cl(e,t,!0);H=ul(e,q)}var Z=t.getDerivedStateFromProps,pe=typeof Z=="function"||typeof c.getSnapshotBeforeUpdate=="function";!pe&&(typeof c.UNSAFE_componentWillReceiveProps=="function"||typeof c.componentWillReceiveProps=="function")&&(w!==n||T!==H)&&Kx(e,c,n,H),ux();var fe=e.memoizedState,De=c.state=fe;if(Qd(e,n,c,i),De=e.memoizedState,w===n&&fe===De&&!Ad()&&!eh()){if(typeof c.componentDidMount=="function"){var ke=Sn;ke|=Ja,(e.mode&Cs)!==Ut&&(ke|=_a),e.flags|=ke}return!1}typeof Z=="function"&&(pv(e,t,Z,n),De=e.memoizedState);var Oe=eh()||Gx(e,t,w,n,fe,De,H);if(Oe){if(!pe&&(typeof c.UNSAFE_componentWillMount=="function"||typeof c.componentWillMount=="function")&&(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"){var lt=Sn;lt|=Ja,(e.mode&Cs)!==Ut&&(lt|=_a),e.flags|=lt}}else{if(typeof c.componentDidMount=="function"){var Lt=Sn;Lt|=Ja,(e.mode&Cs)!==Ut&&(Lt|=_a),e.flags|=Lt}e.memoizedProps=n,e.memoizedState=De}return c.props=n,c.state=De,c.context=H,Oe}function uT(e,t,n,i,c){var w=t.stateNode;cx(e,t);var T=t.memoizedProps,P=t.type===t.elementType?T:fs(t.type,T);w.props=P;var H=t.pendingProps,q=w.context,Z=n.contextType,pe=Ur;if(typeof Z=="object"&&Z!==null)pe=pi(Z);else{var fe=cl(t,n,!0);pe=ul(t,fe)}var De=n.getDerivedStateFromProps,ke=typeof De=="function"||typeof w.getSnapshotBeforeUpdate=="function";!ke&&(typeof w.UNSAFE_componentWillReceiveProps=="function"||typeof w.componentWillReceiveProps=="function")&&(T!==H||q!==pe)&&Kx(t,w,i,pe),ux();var Oe=t.memoizedState,lt=w.state=Oe;if(Qd(t,i,w,c),lt=t.memoizedState,T===H&&Oe===lt&&!Ad()&&!eh()&&!B)return typeof w.componentDidUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Sn),typeof w.getSnapshotBeforeUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Go),!1;typeof De=="function"&&(pv(t,n,De,i),lt=t.memoizedState);var Lt=eh()||Gx(t,n,P,i,Oe,lt,pe)||B;return Lt?(!ke&&(typeof w.UNSAFE_componentWillUpdate=="function"||typeof w.componentWillUpdate=="function")&&(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(i,lt,pe),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(i,lt,pe)),typeof w.componentDidUpdate=="function"&&(t.flags|=Sn),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=Go)):(typeof w.componentDidUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Sn),typeof w.getSnapshotBeforeUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Go),t.memoizedProps=i,t.memoizedState=lt),w.props=i,w.state=lt,w.context=pe,Lt}function vo(e,t){return{value:e,source:t,stack:gr(t),digest:null}}function _v(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function dT(e,t){return!0}function bv(e,t){try{var n=dT(e,t);if(n===!1)return;var i=t.value,c=t.source,w=t.stack,T=w!==null?w:"";if(i!=null&&i._suppressLogging){if(e.tag===g)return;console.error(i)}var P=c?Tt(c):null,H=P?"The above error occurred in the <"+P+"> component:":"The above error occurred in one of your React components:",q;if(e.tag===h)q=`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 Z=Tt(e)||"Anonymous";q="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+Z+".")}var pe=H+`
157
+ `+T+`
158
+
159
+ `+(""+q);console.error(pe)}catch(fe){setTimeout(function(){throw fe})}}var hT=typeof WeakMap=="function"?WeakMap:Map;function Xx(e,t,n){var i=na(qn,n);i.tag=Sp,i.payload={element:null};var c=t.value;return i.callback=function(){rL(c),bv(e,t)},i}function yv(e,t,n){var i=na(qn,n);i.tag=Sp;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var w=t.value;i.payload=function(){return c(w)},i.callback=function(){o0(e),bv(e,t)}}var T=e.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(i.callback=function(){o0(e),bv(e,t),typeof c!="function"&&nL(this);var H=t.value,q=t.stack;this.componentDidCatch(H,{componentStack:q!==null?q:""}),typeof c!="function"&&(Tr(e.lanes,zt)||b("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Tt(e)||"Unknown"))}),i}function Jx(e,t,n){var i=e.pingCache,c;if(i===null?(i=e.pingCache=new hT,c=new Set,i.set(t,c)):(c=i.get(t),c===void 0&&(c=new Set,i.set(t,c))),!c.has(n)){c.add(n);var w=sL.bind(null,e,t,n);os&&bu(e,n),t.then(w,w)}}function mT(e,t,n,i){var c=e.updateQueue;if(c===null){var w=new Set;w.add(n),e.updateQueue=w}else c.add(n)}function fT(e,t){var n=e.tag;if((e.mode&mn)===Ut&&(n===u||n===p||n===M)){var i=e.alternate;i?(e.updateQueue=i.updateQueue,e.memoizedState=i.memoizedState,e.lanes=i.lanes):(e.updateQueue=null,e.memoizedState=null)}}function Zx(e){var t=e;do{if(t.tag===k&&YR(t))return t;t=t.return}while(t!==null);return null}function Qx(e,t,n,i,c){if((e.mode&mn)===Ut){if(e===t)e.flags|=or;else{if(e.flags|=Cn,n.flags|=Pm,n.flags&=-52805,n.tag===g){var w=n.alternate;if(w===null)n.tag=L;else{var T=na(qn,zt);T.tag=Kd,Ra(n,T,zt)}}n.lanes=tn(n.lanes,zt)}return e}return e.flags|=or,e.lanes=c,e}function pT(e,t,n,i,c){if(n.flags|=Zu,os&&bu(e,c),i!==null&&typeof i=="object"&&typeof i.then=="function"){var w=i;fT(n),Oi()&&n.mode&mn&&$y();var T=Zx(t);if(T!==null){T.flags&=~Ws,Qx(T,t,n,e,c),T.mode&mn&&Jx(e,w,c),mT(T,e,w);return}else{if(!VE(c)){Jx(e,w,c),Qv();return}var P=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.");i=P}}else if(Oi()&&n.mode&mn){$y();var H=Zx(t);if(H!==null){(H.flags&or)===Bt&&(H.flags|=Ws),Qx(H,t,n,e,c),hp(vo(i,n));return}}i=vo(i,n),Y5(i);var q=t;do{switch(q.tag){case h:{var Z=i;q.flags|=or;var pe=cc(c);q.lanes=tn(q.lanes,pe);var fe=Xx(q,Z,pe);jp(q,fe);return}case g:var De=i,ke=q.type,Oe=q.stateNode;if((q.flags&Cn)===Bt&&(typeof ke.getDerivedStateFromError=="function"||Oe!==null&&typeof Oe.componentDidCatch=="function"&&!Zw(Oe))){q.flags|=or;var lt=cc(c);q.lanes=tn(q.lanes,lt);var Lt=yv(q,De,lt);jp(q,Lt);return}break}q=q.return}while(q!==null)}function vT(){return null}var iu=d.ReactCurrentOwner,ps=!1,xv,ru,wv,Nv,Sv,go,Cv,Sh,su;xv={},ru={},wv={},Nv={},Sv={},go=!1,Cv={},Sh={},su={};function lr(e,t,n,i){e===null?t.child=nx(t,null,n,i):t.child=fl(t,e.child,n,i)}function gT(e,t,n,i){t.child=fl(t,e.child,null,i),t.child=fl(t,null,n,i)}function ew(e,t,n,i,c){if(t.type!==t.elementType){var w=n.propTypes;w&&cs(w,i,"prop",on(n))}var T=n.render,P=t.ref,H,q;vl(t,c),ic(t);{if(iu.current=t,Gn(!0),H=wl(e,t,T,i,P,c),q=Nl(),t.mode&ri){Ei(!0);try{H=wl(e,t,T,i,P,c),q=Nl()}finally{Ei(!1)}}Gn(!1)}return Ko(),e!==null&&!ps?(vx(e,t,c),ia(e,t,c)):(Oi()&&q&&ap(t),t.flags|=Wo,lr(e,t,H,c),t.child)}function tw(e,t,n,i,c){if(e===null){var w=n.type;if(wL(w)&&n.compare===null&&n.defaultProps===void 0){var T=w;return T=Tl(w),t.tag=M,t.type=T,Dv(t,w),nw(e,t,T,i,c)}{var P=w.propTypes;if(P&&cs(P,i,"prop",on(w)),n.defaultProps!==void 0){var H=on(w)||"Unknown";su[H]||(b("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",H),su[H]=!0)}}var q=ug(n.type,null,i,t,t.mode,c);return q.ref=t.ref,q.return=t,t.child=q,q}{var Z=n.type,pe=Z.propTypes;pe&&cs(pe,i,"prop",on(Z))}var fe=e.child,De=Av(e,c);if(!De){var ke=fe.memoizedProps,Oe=n.compare;if(Oe=Oe!==null?Oe:Sc,Oe(ke,i)&&e.ref===t.ref)return ia(e,t,c)}t.flags|=Wo;var lt=wo(fe,i);return lt.ref=t.ref,lt.return=t,t.child=lt,lt}function nw(e,t,n,i,c){if(t.type!==t.elementType){var w=t.elementType;if(w.$$typeof===pt){var T=w,P=T._payload,H=T._init;try{w=H(P)}catch{w=null}var q=w&&w.propTypes;q&&cs(q,i,"prop",on(w))}}if(e!==null){var Z=e.memoizedProps;if(Sc(Z,i)&&e.ref===t.ref&&t.type===e.type)if(ps=!1,t.pendingProps=i=Z,Av(e,c))(e.flags&Pm)!==Bt&&(ps=!0);else return t.lanes=e.lanes,ia(e,t,c)}return Ev(e,t,n,i,c)}function iw(e,t,n){var i=t.pendingProps,c=i.children,w=e!==null?e.memoizedState:null;if(i.mode==="hidden"||W)if((t.mode&mn)===Ut){var T={baseLanes:qe,cachePool:null,transitions:null};t.memoizedState=T,Vh(t,n)}else if(Tr(n,Rr)){var pe={baseLanes:qe,cachePool:null,transitions:null};t.memoizedState=pe;var fe=w!==null?w.baseLanes:n;Vh(t,fe)}else{var P=null,H;if(w!==null){var q=w.baseLanes;H=tn(q,n)}else H=n;t.lanes=t.childLanes=Rr;var Z={baseLanes:H,cachePool:P,transitions:null};return t.memoizedState=Z,t.updateQueue=null,Vh(t,H),null}else{var De;w!==null?(De=tn(w.baseLanes,n),t.memoizedState=null):De=n,Vh(t,De)}return lr(e,t,c,n),t.child}function _T(e,t,n){var i=t.pendingProps;return lr(e,t,i,n),t.child}function bT(e,t,n){var i=t.pendingProps.children;return lr(e,t,i,n),t.child}function yT(e,t,n){{t.flags|=Sn;{var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0}}var c=t.pendingProps,w=c.children;return lr(e,t,w,n),t.child}function rw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=Ka,t.flags|=Bm)}function Ev(e,t,n,i,c){if(t.type!==t.elementType){var w=n.propTypes;w&&cs(w,i,"prop",on(n))}var T;{var P=cl(t,n,!0);T=ul(t,P)}var H,q;vl(t,c),ic(t);{if(iu.current=t,Gn(!0),H=wl(e,t,n,i,T,c),q=Nl(),t.mode&ri){Ei(!0);try{H=wl(e,t,n,i,T,c),q=Nl()}finally{Ei(!1)}}Gn(!1)}return Ko(),e!==null&&!ps?(vx(e,t,c),ia(e,t,c)):(Oi()&&q&&ap(t),t.flags|=Wo,lr(e,t,H,c),t.child)}function sw(e,t,n,i,c){{switch(VL(t)){case!1:{var w=t.stateNode,T=t.type,P=new T(t.memoizedProps,w.context),H=P.state;w.updater.enqueueSetState(w,H,null);break}case!0:{t.flags|=Cn,t.flags|=or;var q=new Error("Simulated error coming from DevTools"),Z=cc(c);t.lanes=tn(t.lanes,Z);var pe=yv(t,vo(q,t),Z);jp(t,pe);break}}if(t.type!==t.elementType){var fe=n.propTypes;fe&&cs(fe,i,"prop",on(n))}}var De;Ds(n)?(De=!0,Od(t)):De=!1,vl(t,c);var ke=t.stateNode,Oe;ke===null?(Eh(e,t),Yx(t,n,i),gv(t,n,i,c),Oe=!0):e===null?Oe=cT(t,n,i,c):Oe=uT(e,t,n,i,c);var lt=jv(e,t,n,Oe,De,c);{var Lt=t.stateNode;Oe&&Lt.props!==i&&(go||b("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Tt(t)||"a component"),go=!0)}return lt}function jv(e,t,n,i,c,w){rw(e,t);var T=(t.flags&Cn)!==Bt;if(!i&&!T)return c&&Iy(t,n,!1),ia(e,t,w);var P=t.stateNode;iu.current=t;var H;if(T&&typeof n.getDerivedStateFromError!="function")H=null,zx();else{ic(t);{if(Gn(!0),H=P.render(),t.mode&ri){Ei(!0);try{P.render()}finally{Ei(!1)}}Gn(!1)}Ko()}return t.flags|=Wo,e!==null&&T?gT(e,t,H,w):lr(e,t,H,w),t.memoizedState=P.state,c&&Iy(t,n,!0),t.child}function aw(e){var t=e.stateNode;t.pendingContext?Py(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Py(e,t.context,!1),Dp(e,t.containerInfo)}function xT(e,t,n){if(aw(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var i=t.pendingProps,c=t.memoizedState,w=c.element;cx(e,t),Qd(t,i,null,n);var T=t.memoizedState;t.stateNode;var P=T.element;if(c.isDehydrated){var H={element:P,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},q=t.updateQueue;if(q.baseState=H,t.memoizedState=H,t.flags&Ws){var Z=vo(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 ow(e,t,P,n,Z)}else if(P!==w){var pe=vo(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return ow(e,t,P,n,pe)}else{SR(t);var fe=nx(t,null,P,n);t.child=fe;for(var De=fe;De;)De.flags=De.flags&~fi|Gs,De=De.sibling}}else{if(ml(),P===w)return ia(e,t,n);lr(e,t,P,n)}return t.child}function ow(e,t,n,i,c){return ml(),hp(c),t.flags|=Ws,lr(e,t,n,i),t.child}function wT(e,t,n){mx(t),e===null&&dp(t);var i=t.type,c=t.pendingProps,w=e!==null?e.memoizedProps:null,T=c.children,P=Gf(i,c);return P?T=null:w!==null&&Gf(i,w)&&(t.flags|=tc),rw(e,t),lr(e,t,T,n),t.child}function NT(e,t){return e===null&&dp(t),null}function ST(e,t,n,i){Eh(e,t);var c=t.pendingProps,w=n,T=w._payload,P=w._init,H=P(T);t.type=H;var q=t.tag=NL(H),Z=fs(H,c),pe;switch(q){case u:return Dv(t,H),t.type=H=Tl(H),pe=Ev(null,t,H,Z,i),pe;case g:return t.type=H=rg(H),pe=sw(null,t,H,Z,i),pe;case p:return t.type=H=sg(H),pe=ew(null,t,H,Z,i),pe;case j:{if(t.type!==t.elementType){var fe=H.propTypes;fe&&cs(fe,Z,"prop",on(H))}return pe=tw(null,t,H,fs(H.type,Z),i),pe}}var De="";throw H!==null&&typeof H=="object"&&H.$$typeof===pt&&(De=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+H+". "+("Lazy element type must resolve to a class or function."+De))}function CT(e,t,n,i,c){Eh(e,t),t.tag=g;var w;return Ds(n)?(w=!0,Od(t)):w=!1,vl(t,c),Yx(t,n,i),gv(t,n,i,c),jv(null,t,n,!0,w,c)}function ET(e,t,n,i){Eh(e,t);var c=t.pendingProps,w;{var T=cl(t,n,!1);w=ul(t,T)}vl(t,i);var P,H;ic(t);{if(n.prototype&&typeof n.prototype.render=="function"){var q=on(n)||"Unknown";xv[q]||(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.",q,q),xv[q]=!0)}t.mode&ri&&ds.recordLegacyContextWarning(t,null),Gn(!0),iu.current=t,P=wl(null,t,n,c,w,i),H=Nl(),Gn(!1)}if(Ko(),t.flags|=Wo,typeof P=="object"&&P!==null&&typeof P.render=="function"&&P.$$typeof===void 0){var Z=on(n)||"Unknown";ru[Z]||(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.",Z,Z,Z),ru[Z]=!0)}if(typeof P=="object"&&P!==null&&typeof P.render=="function"&&P.$$typeof===void 0){{var pe=on(n)||"Unknown";ru[pe]||(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.",pe,pe,pe),ru[pe]=!0)}t.tag=g,t.memoizedState=null,t.updateQueue=null;var fe=!1;return Ds(n)?(fe=!0,Od(t)):fe=!1,t.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,Ep(t),qx(t,P),gv(t,n,c,i),jv(null,t,n,!0,fe,i)}else{if(t.tag=u,t.mode&ri){Ei(!0);try{P=wl(null,t,n,c,w,i),H=Nl()}finally{Ei(!1)}}return Oi()&&H&&ap(t),lr(null,t,P,i),Dv(t,n),t.child}}function Dv(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="",i=jr();i&&(n+=`
160
+
161
+ Check the render method of \``+i+"`.");var c=i||"",w=e._debugSource;w&&(c=w.fileName+":"+w.lineNumber),Sv[c]||(Sv[c]=!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=on(t)||"Unknown";su[T]||(b("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",T),su[T]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var P=on(t)||"Unknown";Nv[P]||(b("%s: Function components do not support getDerivedStateFromProps.",P),Nv[P]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var H=on(t)||"Unknown";wv[H]||(b("%s: Function components do not support contextType.",H),wv[H]=!0)}}}var kv={dehydrated:null,treeContext:null,retryLane:ji};function Rv(e){return{baseLanes:e,cachePool:vT(),transitions:null}}function jT(e,t){var n=null;return{baseLanes:tn(e.baseLanes,t),cachePool:n,transitions:e.transitions}}function DT(e,t,n,i){if(t!==null){var c=t.memoizedState;if(c===null)return!1}return Tp(e,Yc)}function kT(e,t){return sd(e.childLanes,t)}function lw(e,t,n){var i=t.pendingProps;PL(t)&&(t.flags|=Cn);var c=hs.current,w=!1,T=(t.flags&Cn)!==Bt;if(T||DT(c,e)?(w=!0,t.flags&=~Cn):(e===null||e.memoizedState!==null)&&(c=qR(c,px)),c=_l(c),La(t,c),e===null){dp(t);var P=t.memoizedState;if(P!==null){var H=P.dehydrated;if(H!==null)return AT(t,H)}var q=i.children,Z=i.fallback;if(w){var pe=RT(t,q,Z,n),fe=t.child;return fe.memoizedState=Rv(n),t.memoizedState=kv,pe}else return Tv(t,q)}else{var De=e.memoizedState;if(De!==null){var ke=De.dehydrated;if(ke!==null)return UT(e,t,T,i,ke,De,n)}if(w){var Oe=i.fallback,lt=i.children,Lt=LT(e,t,lt,Oe,n),jt=t.child,pn=e.child.memoizedState;return jt.memoizedState=pn===null?Rv(n):jT(pn,n),jt.childLanes=kT(e,n),t.memoizedState=kv,Lt}else{var ln=i.children,we=TT(e,t,ln,n);return t.memoizedState=null,we}}}function Tv(e,t,n){var i=e.mode,c={mode:"visible",children:t},w=Lv(c,i);return w.return=e,e.child=w,w}function RT(e,t,n,i){var c=e.mode,w=e.child,T={mode:"hidden",children:t},P,H;return(c&mn)===Ut&&w!==null?(P=w,P.childLanes=qe,P.pendingProps=T,e.mode&Rn&&(P.actualDuration=0,P.actualStartTime=-1,P.selfBaseDuration=0,P.treeBaseDuration=0),H=Ia(n,c,i,null)):(P=Lv(T,c),H=Ia(n,c,i,null)),P.return=e,H.return=e,P.sibling=H,e.child=P,H}function Lv(e,t,n){return c0(e,t,qe,null)}function cw(e,t){return wo(e,t)}function TT(e,t,n,i){var c=e.child,w=c.sibling,T=cw(c,{mode:"visible",children:n});if((t.mode&mn)===Ut&&(T.lanes=i),T.return=t,T.sibling=null,w!==null){var P=t.deletions;P===null?(t.deletions=[w],t.flags|=Ya):P.push(w)}return t.child=T,T}function LT(e,t,n,i,c){var w=t.mode,T=e.child,P=T.sibling,H={mode:"hidden",children:n},q;if((w&mn)===Ut&&t.child!==T){var Z=t.child;q=Z,q.childLanes=qe,q.pendingProps=H,t.mode&Rn&&(q.actualDuration=0,q.actualStartTime=-1,q.selfBaseDuration=T.selfBaseDuration,q.treeBaseDuration=T.treeBaseDuration),t.deletions=null}else q=cw(T,H),q.subtreeFlags=T.subtreeFlags&qs;var pe;return P!==null?pe=wo(P,i):(pe=Ia(i,w,c,null),pe.flags|=fi),pe.return=t,q.return=t,q.sibling=pe,t.child=q,pe}function Ch(e,t,n,i){i!==null&&hp(i),fl(t,e.child,null,n);var c=t.pendingProps,w=c.children,T=Tv(t,w);return T.flags|=fi,t.memoizedState=null,T}function MT(e,t,n,i,c){var w=t.mode,T={mode:"visible",children:n},P=Lv(T,w),H=Ia(i,w,c,null);return H.flags|=fi,P.return=t,H.return=t,P.sibling=H,t.child=P,(t.mode&mn)!==Ut&&fl(t,e.child,null,c),H}function AT(e,t,n){return(e.mode&mn)===Ut?(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=zt):Xf(t)?e.lanes=eo:e.lanes=Rr,null}function UT(e,t,n,i,c,w,T){if(n)if(t.flags&Ws){t.flags&=~Ws;var we=_v(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Ch(e,t,T,we)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Cn,null;var Ve=i.children,Ne=i.fallback,Ke=MT(e,t,Ve,Ne,T),mt=t.child;return mt.memoizedState=Rv(T),t.memoizedState=kv,Ke}else{if(wR(),(t.mode&mn)===Ut)return Ch(e,t,T,null);if(Xf(c)){var P,H,q;{var Z=Bk(c);P=Z.digest,H=Z.message,q=Z.stack}var pe;H?pe=new Error(H):pe=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var fe=_v(pe,P,q);return Ch(e,t,T,fe)}var De=Tr(T,e.childLanes);if(ps||De){var ke=Oh();if(ke!==null){var Oe=WE(ke,T);if(Oe!==ji&&Oe!==w.retryLane){w.retryLane=Oe;var lt=qn;xr(e,Oe),Si(ke,e,Oe,lt)}}Qv();var Lt=_v(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 Ch(e,t,T,Lt)}else if(Ly(c)){t.flags|=Cn,t.child=e.child;var jt=aL.bind(null,e);return Ik(c,jt),null}else{CR(t,c,w.treeContext);var pn=i.children,ln=Tv(t,pn);return ln.flags|=Gs,ln}}}function uw(e,t,n){e.lanes=tn(e.lanes,t);var i=e.alternate;i!==null&&(i.lanes=tn(i.lanes,t)),wp(e.return,t,n)}function OT(e,t,n){for(var i=t;i!==null;){if(i.tag===k){var c=i.memoizedState;c!==null&&uw(i,n,e)}else if(i.tag===F)uw(i,n,e);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)return;for(;i.sibling===null;){if(i.return===null||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function VT(e){for(var t=e,n=null;t!==null;){var i=t.alternate;i!==null&&ih(i)===null&&(n=t),t=t.sibling}return n}function PT(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!Cv[e])if(Cv[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 BT(e,t){e!==void 0&&!Sh[e]&&(e!=="collapsed"&&e!=="hidden"?(Sh[e]=!0,b('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Sh[e]=!0,b('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function dw(e,t){{var n=Ct(e),i=!n&&typeof ii(e)=="function";if(n||i){var c=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>",c,t,c),!1}}return!0}function IT(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(Ct(e)){for(var n=0;n<e.length;n++)if(!dw(e[n],n))return}else{var i=ii(e);if(typeof i=="function"){var c=i.call(e);if(c)for(var w=c.next(),T=0;!w.done;w=c.next()){if(!dw(w.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 Mv(e,t,n,i,c){var w=e.memoizedState;w===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:c}:(w.isBackwards=t,w.rendering=null,w.renderingStartTime=0,w.last=i,w.tail=n,w.tailMode=c)}function hw(e,t,n){var i=t.pendingProps,c=i.revealOrder,w=i.tail,T=i.children;PT(c),BT(w,c),IT(T,c),lr(e,t,T,n);var P=hs.current,H=Tp(P,Yc);if(H)P=Lp(P,Yc),t.flags|=Cn;else{var q=e!==null&&(e.flags&Cn)!==Bt;q&&OT(t,t.child,n),P=_l(P)}if(La(t,P),(t.mode&mn)===Ut)t.memoizedState=null;else switch(c){case"forwards":{var Z=VT(t.child),pe;Z===null?(pe=t.child,t.child=null):(pe=Z.sibling,Z.sibling=null),Mv(t,!1,pe,Z,w);break}case"backwards":{var fe=null,De=t.child;for(t.child=null;De!==null;){var ke=De.alternate;if(ke!==null&&ih(ke)===null){t.child=De;break}var Oe=De.sibling;De.sibling=fe,fe=De,De=Oe}Mv(t,!0,fe,null,w);break}case"together":{Mv(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function FT(e,t,n){Dp(t,t.stateNode.containerInfo);var i=t.pendingProps;return e===null?t.child=fl(t,null,i,n):lr(e,t,i,n),t.child}var mw=!1;function HT(e,t,n){var i=t.type,c=i._context,w=t.pendingProps,T=t.memoizedProps,P=w.value;{"value"in w||mw||(mw=!0,b("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var H=t.type.propTypes;H&&cs(H,w,"prop","Context.Provider")}if(sx(t,c,P),T!==null){var q=T.value;if(Ar(q,P)){if(T.children===w.children&&!Ad())return ia(e,t,n)}else PR(t,c,n)}var Z=w.children;return lr(e,t,Z,n),t.child}var fw=!1;function zT(e,t,n){var i=t.type;i._context===void 0?i!==i.Consumer&&(fw||(fw=!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?"))):i=i._context;var c=t.pendingProps,w=c.children;typeof w!="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."),vl(t,n);var T=pi(i);ic(t);var P;return iu.current=t,Gn(!0),P=w(T),Gn(!1),Ko(),t.flags|=Wo,lr(e,t,P,n),t.child}function au(){ps=!0}function Eh(e,t){(t.mode&mn)===Ut&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=fi)}function ia(e,t,n){return e!==null&&(t.dependencies=e.dependencies),zx(),_u(t.lanes),Tr(n,t.childLanes)?(OR(e,t),t.child):null}function $T(e,t,n){{var i=t.return;if(i===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===i.child)i.child=n;else{var c=i.child;if(c===null)throw new Error("Expected parent to have a child.");for(;c.sibling!==t;)if(c=c.sibling,c===null)throw new Error("Expected to find the previous sibling.");c.sibling=n}var w=i.deletions;return w===null?(i.deletions=[e],i.flags|=Ya):w.push(e),n.flags|=fi,n}}function Av(e,t){var n=e.lanes;return!!Tr(n,t)}function WT(e,t,n){switch(t.tag){case h:aw(t),t.stateNode,ml();break;case S:mx(t);break;case g:{var i=t.type;Ds(i)&&Od(t);break}case f:Dp(t,t.stateNode.containerInfo);break;case m:{var c=t.memoizedProps.value,w=t.type._context;sx(t,w,c);break}case N:{var T=Tr(n,t.childLanes);T&&(t.flags|=Sn);{var P=t.stateNode;P.effectDuration=0,P.passiveEffectDuration=0}}break;case k:{var H=t.memoizedState;if(H!==null){if(H.dehydrated!==null)return La(t,_l(hs.current)),t.flags|=Cn,null;var q=t.child,Z=q.childLanes;if(Tr(n,Z))return lw(e,t,n);La(t,_l(hs.current));var pe=ia(e,t,n);return pe!==null?pe.sibling:null}else La(t,_l(hs.current));break}case F:{var fe=(e.flags&Cn)!==Bt,De=Tr(n,t.childLanes);if(fe){if(De)return hw(e,t,n);t.flags|=Cn}var ke=t.memoizedState;if(ke!==null&&(ke.rendering=null,ke.tail=null,ke.lastEffect=null),La(t,hs.current),De)break;return null}case I:case G:return t.lanes=qe,iw(e,t,n)}return ia(e,t,n)}function pw(e,t,n){if(t._debugNeedsRemount&&e!==null)return $T(e,t,ug(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var i=e.memoizedProps,c=t.pendingProps;if(i!==c||Ad()||t.type!==e.type)ps=!0;else{var w=Av(e,n);if(!w&&(t.flags&Cn)===Bt)return ps=!1,WT(e,t,n);(e.flags&Pm)!==Bt?ps=!0:ps=!1}}else if(ps=!1,Oi()&&vR(t)){var T=t.index,P=gR();zy(t,P,T)}switch(t.lanes=qe,t.tag){case x:return ET(e,t,t.type,n);case D:{var H=t.elementType;return ST(e,t,H,n)}case u:{var q=t.type,Z=t.pendingProps,pe=t.elementType===q?Z:fs(q,Z);return Ev(e,t,q,pe,n)}case g:{var fe=t.type,De=t.pendingProps,ke=t.elementType===fe?De:fs(fe,De);return sw(e,t,fe,ke,n)}case h:return xT(e,t,n);case S:return wT(e,t,n);case C:return NT(e,t);case k:return lw(e,t,n);case f:return FT(e,t,n);case p:{var Oe=t.type,lt=t.pendingProps,Lt=t.elementType===Oe?lt:fs(Oe,lt);return ew(e,t,Oe,Lt,n)}case y:return _T(e,t,n);case l:return bT(e,t,n);case N:return yT(e,t,n);case m:return HT(e,t,n);case v:return zT(e,t,n);case j:{var jt=t.type,pn=t.pendingProps,ln=fs(jt,pn);if(t.type!==t.elementType){var we=jt.propTypes;we&&cs(we,ln,"prop",on(jt))}return ln=fs(jt.type,ln),tw(e,t,jt,ln,n)}case M:return nw(e,t,t.type,t.pendingProps,n);case L:{var Ve=t.type,Ne=t.pendingProps,Ke=t.elementType===Ve?Ne:fs(Ve,Ne);return CT(e,t,Ve,Ke,n)}case F:return hw(e,t,n);case O:break;case I:return iw(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 Sl(e){e.flags|=Sn}function vw(e){e.flags|=Ka,e.flags|=Bm}var gw,Uv,_w,bw;gw=function(e,t,n,i){for(var c=t.child;c!==null;){if(c.tag===S||c.tag===C)mk(e,c.stateNode);else if(c.tag!==f){if(c.child!==null){c.child.return=c,c=c.child;continue}}if(c===t)return;for(;c.sibling===null;){if(c.return===null||c.return===t)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Uv=function(e,t){},_w=function(e,t,n,i,c){var w=e.memoizedProps;if(w!==i){var T=t.stateNode,P=kp(),H=pk(T,n,w,i,c,P);t.updateQueue=H,H&&Sl(t)}},bw=function(e,t,n,i){n!==i&&Sl(t)};function ou(e,t){if(!Oi())switch(e.tailMode){case"hidden":{for(var n=e.tail,i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break}case"collapsed":{for(var c=e.tail,w=null;c!==null;)c.alternate!==null&&(w=c),c=c.sibling;w===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:w.sibling=null;break}}}function Pi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=qe,i=Bt;if(t){if((e.mode&Rn)!==Ut){for(var H=e.selfBaseDuration,q=e.child;q!==null;)n=tn(n,tn(q.lanes,q.childLanes)),i|=q.subtreeFlags&qs,i|=q.flags&qs,H+=q.treeBaseDuration,q=q.sibling;e.treeBaseDuration=H}else for(var Z=e.child;Z!==null;)n=tn(n,tn(Z.lanes,Z.childLanes)),i|=Z.subtreeFlags&qs,i|=Z.flags&qs,Z.return=e,Z=Z.sibling;e.subtreeFlags|=i}else{if((e.mode&Rn)!==Ut){for(var c=e.actualDuration,w=e.selfBaseDuration,T=e.child;T!==null;)n=tn(n,tn(T.lanes,T.childLanes)),i|=T.subtreeFlags,i|=T.flags,c+=T.actualDuration,w+=T.treeBaseDuration,T=T.sibling;e.actualDuration=c,e.treeBaseDuration=w}else for(var P=e.child;P!==null;)n=tn(n,tn(P.lanes,P.childLanes)),i|=P.subtreeFlags,i|=P.flags,P.return=e,P=P.sibling;e.subtreeFlags|=i}return e.childLanes=n,t}function GT(e,t,n){if(RR()&&(t.mode&mn)!==Ut&&(t.flags&Cn)===Bt)return Xy(t),ml(),t.flags|=Ws|Zu|or,!1;var i=Fd(t);if(n!==null&&n.dehydrated!==null)if(e===null){if(!i)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(DR(t),Pi(t),(t.mode&Rn)!==Ut){var c=n!==null;if(c){var w=t.child;w!==null&&(t.treeBaseDuration-=w.treeBaseDuration)}}return!1}else{if(ml(),(t.flags&Cn)===Bt&&(t.memoizedState=null),t.flags|=Sn,Pi(t),(t.mode&Rn)!==Ut){var T=n!==null;if(T){var P=t.child;P!==null&&(t.treeBaseDuration-=P.treeBaseDuration)}}return!1}else return Jy(),!0}function yw(e,t,n){var i=t.pendingProps;switch(op(t),t.tag){case x:case D:case M:case u:case p:case y:case l:case N:case v:case j:return Pi(t),null;case g:{var c=t.type;return Ds(c)&&Ud(t),Pi(t),null}case h:{var w=t.stateNode;if(gl(t),ip(t),Ap(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),e===null||e.child===null){var T=Fd(t);if(T)Sl(t);else if(e!==null){var P=e.memoizedState;(!P.isDehydrated||(t.flags&Ws)!==Bt)&&(t.flags|=Go,Jy())}}return Uv(e,t),Pi(t),null}case S:{Rp(t);var H=hx(),q=t.type;if(e!==null&&t.stateNode!=null)_w(e,t,q,i,H),e.ref!==t.ref&&vw(t);else{if(!i){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 Pi(t),null}var Z=kp(),pe=Fd(t);if(pe)ER(t,H,Z)&&Sl(t);else{var fe=hk(q,i,H,Z,t);gw(fe,t,!1,!1),t.stateNode=fe,fk(fe,q,i,H)&&Sl(t)}t.ref!==null&&vw(t)}return Pi(t),null}case C:{var De=i;if(e&&t.stateNode!=null){var ke=e.memoizedProps;bw(e,t,ke,De)}else{if(typeof De!="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 Oe=hx(),lt=kp(),Lt=Fd(t);Lt?jR(t)&&Sl(t):t.stateNode=vk(De,Oe,lt,t)}return Pi(t),null}case k:{bl(t);var jt=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var pn=GT(e,t,jt);if(!pn)return t.flags&or?t:null}if((t.flags&Cn)!==Bt)return t.lanes=n,(t.mode&Rn)!==Ut&&sv(t),t;var ln=jt!==null,we=e!==null&&e.memoizedState!==null;if(ln!==we&&ln){var Ve=t.child;if(Ve.flags|=Xa,(t.mode&mn)!==Ut){var Ne=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);Ne||Tp(hs.current,px)?q5():Qv()}}var Ke=t.updateQueue;if(Ke!==null&&(t.flags|=Sn),Pi(t),(t.mode&Rn)!==Ut&&ln){var mt=t.child;mt!==null&&(t.treeBaseDuration-=mt.treeBaseDuration)}return null}case f:return gl(t),Uv(e,t),e===null&&cR(t.stateNode.containerInfo),Pi(t),null;case m:var ut=t.type._context;return xp(ut,t),Pi(t),null;case L:{var It=t.type;return Ds(It)&&Ud(t),Pi(t),null}case F:{bl(t);var Wt=t.memoizedState;if(Wt===null)return Pi(t),null;var Ln=(t.flags&Cn)!==Bt,xn=Wt.rendering;if(xn===null)if(Ln)ou(Wt,!1);else{var ci=K5()&&(e===null||(e.flags&Cn)===Bt);if(!ci)for(var wn=t.child;wn!==null;){var si=ih(wn);if(si!==null){Ln=!0,t.flags|=Cn,ou(Wt,!1);var Ji=si.updateQueue;return Ji!==null&&(t.updateQueue=Ji,t.flags|=Sn),t.subtreeFlags=Bt,VR(t,n),La(t,Lp(hs.current,Yc)),t.child}wn=wn.sibling}Wt.tail!==null&&Ci()>Fw()&&(t.flags|=Cn,Ln=!0,ou(Wt,!1),t.lanes=bb)}else{if(!Ln){var zi=ih(xn);if(zi!==null){t.flags|=Cn,Ln=!0;var Vr=zi.updateQueue;if(Vr!==null&&(t.updateQueue=Vr,t.flags|=Sn),ou(Wt,!0),Wt.tail===null&&Wt.tailMode==="hidden"&&!xn.alternate&&!Oi())return Pi(t),null}else Ci()*2-Wt.renderingStartTime>Fw()&&n!==Rr&&(t.flags|=Cn,Ln=!0,ou(Wt,!1),t.lanes=bb)}if(Wt.isBackwards)xn.sibling=t.child,t.child=xn;else{var dr=Wt.last;dr!==null?dr.sibling=xn:t.child=xn,Wt.last=xn}}if(Wt.tail!==null){var hr=Wt.tail;Wt.rendering=hr,Wt.tail=hr.sibling,Wt.renderingStartTime=Ci(),hr.sibling=null;var Zi=hs.current;return Ln?Zi=Lp(Zi,Yc):Zi=_l(Zi),La(t,Zi),hr}return Pi(t),null}case O:break;case I:case G:{Zv(t);var la=t.memoizedState,Ll=la!==null;if(e!==null){var Nu=e.memoizedState,Os=Nu!==null;Os!==Ll&&!W&&(t.flags|=Xa)}return!Ll||(t.mode&mn)===Ut?Pi(t):Tr(Us,Rr)&&(Pi(t),t.subtreeFlags&(fi|Sn)&&(t.flags|=Xa)),null}case ne:return null;case ee: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 qT(e,t,n){switch(op(t),t.tag){case g:{var i=t.type;Ds(i)&&Ud(t);var c=t.flags;return c&or?(t.flags=c&~or|Cn,(t.mode&Rn)!==Ut&&sv(t),t):null}case h:{t.stateNode,gl(t),ip(t),Ap();var w=t.flags;return(w&or)!==Bt&&(w&Cn)===Bt?(t.flags=w&~or|Cn,t):null}case S:return Rp(t),null;case k:{bl(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.");ml()}var P=t.flags;return P&or?(t.flags=P&~or|Cn,(t.mode&Rn)!==Ut&&sv(t),t):null}case F:return bl(t),null;case f:return gl(t),null;case m:var H=t.type._context;return xp(H,t),null;case I:case G:return Zv(t),null;case ne:return null;default:return null}}function xw(e,t,n){switch(op(t),t.tag){case g:{var i=t.type.childContextTypes;i!=null&&Ud(t);break}case h:{t.stateNode,gl(t),ip(t),Ap();break}case S:{Rp(t);break}case f:gl(t);break;case k:bl(t);break;case F:bl(t);break;case m:var c=t.type._context;xp(c,t);break;case I:case G:Zv(t);break}}var ww=null;ww=new Set;var jh=!1,Bi=!1,YT=typeof WeakSet=="function"?WeakSet:Set,xt=null,Cl=null,El=null;function KT(e){Um(null,function(){throw e}),Om()}var XT=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&Rn)try{Ms(),t.componentWillUnmount()}finally{Ls(e)}else t.componentWillUnmount()};function Nw(e,t){try{Ua(_i,e)}catch(n){Hn(e,t,n)}}function Ov(e,t,n){try{XT(e,n)}catch(i){Hn(e,t,i)}}function JT(e,t,n){try{n.componentDidMount()}catch(i){Hn(e,t,i)}}function Sw(e,t){try{Ew(e)}catch(n){Hn(e,t,n)}}function jl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function"){var i;try{if(he&&Me&&e.mode&Rn)try{Ms(),i=n(null)}finally{Ls(e)}else i=n(null)}catch(c){Hn(e,t,c)}typeof i=="function"&&b("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Tt(e))}else n.current=null}function Dh(e,t,n){try{n()}catch(i){Hn(e,t,i)}}var Cw=!1;function ZT(e,t){uk(e.containerInfo),xt=t,QT();var n=Cw;return Cw=!1,n}function QT(){for(;xt!==null;){var e=xt,t=e.child;(e.subtreeFlags&Hm)!==Bt&&t!==null?(t.return=e,xt=t):e5()}}function e5(){for(;xt!==null;){var e=xt;Un(e);try{t5(e)}catch(n){Hn(e,e.return,n)}Qn();var t=e.sibling;if(t!==null){t.return=e.return,xt=t;return}xt=e.return}}function t5(e){var t=e.alternate,n=e.flags;if((n&Go)!==Bt){switch(Un(e),e.tag){case u:case p:case M:break;case g:{if(t!==null){var i=t.memoizedProps,c=t.memoizedState,w=e.stateNode;e.type===e.elementType&&!go&&(w.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.",Tt(e)||"instance"),w.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.",Tt(e)||"instance"));var T=w.getSnapshotBeforeUpdate(e.elementType===e.type?i:fs(e.type,i),c);{var P=ww;T===void 0&&!P.has(e.type)&&(P.add(e.type),b("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Tt(e)))}w.__reactInternalSnapshotBeforeUpdate=T}break}case h:{{var H=e.stateNode;Uk(H.containerInfo)}break}case S:case C:case f: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.")}Qn()}}function vs(e,t,n){var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var w=c.next,T=w;do{if((T.tag&e)===e){var P=T.destroy;T.destroy=void 0,P!==void 0&&((e&Vi)!==wr?vE(t):(e&_i)!==wr&&fb(t),(e&ks)!==wr&&yu(!0),Dh(t,n,P),(e&ks)!==wr&&yu(!1),(e&Vi)!==wr?gE():(e&_i)!==wr&&pb())}T=T.next}while(T!==w)}}function Ua(e,t){var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next,w=c;do{if((w.tag&e)===e){(e&Vi)!==wr?fE(t):(e&_i)!==wr&&_E(t);var T=w.create;(e&ks)!==wr&&yu(!0),w.destroy=T(),(e&ks)!==wr&&yu(!1),(e&Vi)!==wr?pE():(e&_i)!==wr&&bE();{var P=w.destroy;if(P!==void 0&&typeof P!="function"){var H=void 0;(w.tag&_i)!==Bt?H="useLayoutEffect":(w.tag&ks)!==Bt?H="useInsertionEffect":H="useEffect";var q=void 0;P===null?q=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof P.then=="function"?q=`
162
+
163
+ It looks like you wrote `+H+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
164
+
165
+ `+H+`(() => {
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`:q=" You returned: "+P,b("%s must not return anything besides a function, which is used for clean-up.%s",H,q)}}}w=w.next}while(w!==c)}}function n5(e,t){if((t.flags&Sn)!==Bt)switch(t.tag){case N:{var n=t.stateNode.passiveEffectDuration,i=t.memoizedProps,c=i.id,w=i.onPostCommit,T=Fx(),P=t.alternate===null?"mount":"update";Ix()&&(P="nested-update"),typeof w=="function"&&w(c,P,n,T);var H=t.return;e:for(;H!==null;){switch(H.tag){case h:var q=H.stateNode;q.passiveEffectDuration+=n;break e;case N:var Z=H.stateNode;Z.passiveEffectDuration+=n;break e}H=H.return}break}}}function i5(e,t,n,i){if((n.flags&nc)!==Bt)switch(n.tag){case u:case p:case M:{if(!Bi)if(n.mode&Rn)try{Ms(),Ua(_i|gi,n)}finally{Ls(n)}else Ua(_i|gi,n);break}case g:{var c=n.stateNode;if(n.flags&Sn&&!Bi)if(t===null)if(n.type===n.elementType&&!go&&(c.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.",Tt(n)||"instance"),c.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.",Tt(n)||"instance")),n.mode&Rn)try{Ms(),c.componentDidMount()}finally{Ls(n)}else c.componentDidMount();else{var w=n.elementType===n.type?t.memoizedProps:fs(n.type,t.memoizedProps),T=t.memoizedState;if(n.type===n.elementType&&!go&&(c.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.",Tt(n)||"instance"),c.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.",Tt(n)||"instance")),n.mode&Rn)try{Ms(),c.componentDidUpdate(w,T,c.__reactInternalSnapshotBeforeUpdate)}finally{Ls(n)}else c.componentDidUpdate(w,T,c.__reactInternalSnapshotBeforeUpdate)}var P=n.updateQueue;P!==null&&(n.type===n.elementType&&!go&&(c.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.",Tt(n)||"instance"),c.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.",Tt(n)||"instance")),dx(n,P,c));break}case h:{var H=n.updateQueue;if(H!==null){var q=null;if(n.child!==null)switch(n.child.tag){case S:q=n.child.stateNode;break;case g:q=n.child.stateNode;break}dx(n,H,q)}break}case S:{var Z=n.stateNode;if(t===null&&n.flags&Sn){var pe=n.type,fe=n.memoizedProps;xk(Z,pe,fe)}break}case C:break;case f:break;case N:{{var De=n.memoizedProps,ke=De.onCommit,Oe=De.onRender,lt=n.stateNode.effectDuration,Lt=Fx(),jt=t===null?"mount":"update";Ix()&&(jt="nested-update"),typeof Oe=="function"&&Oe(n.memoizedProps.id,jt,n.actualDuration,n.treeBaseDuration,n.actualStartTime,Lt);{typeof ke=="function"&&ke(n.memoizedProps.id,jt,lt,Lt),eL(n);var pn=n.return;e:for(;pn!==null;){switch(pn.tag){case h:var ln=pn.stateNode;ln.effectDuration+=lt;break e;case N:var we=pn.stateNode;we.effectDuration+=lt;break e}pn=pn.return}}}break}case k:{d5(e,n);break}case F:case L:case O:case I:case G:case ee: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.")}Bi||n.flags&Ka&&Ew(n)}function r5(e){switch(e.tag){case u:case p:case M:{if(e.mode&Rn)try{Ms(),Nw(e,e.return)}finally{Ls(e)}else Nw(e,e.return);break}case g:{var t=e.stateNode;typeof t.componentDidMount=="function"&&JT(e,e.return,t),Sw(e,e.return);break}case S:{Sw(e,e.return);break}}}function s5(e,t){for(var n=null,i=e;;){if(i.tag===S){if(n===null){n=i;try{var c=i.stateNode;t?Tk(c):Mk(i.stateNode,i.memoizedProps)}catch(T){Hn(e,e.return,T)}}}else if(i.tag===C){if(n===null)try{var w=i.stateNode;t?Lk(w):Ak(w,i.memoizedProps)}catch(T){Hn(e,e.return,T)}}else if(!((i.tag===I||i.tag===G)&&i.memoizedState!==null&&i!==e)){if(i.child!==null){i.child.return=i,i=i.child;continue}}if(i===e)return;for(;i.sibling===null;){if(i.return===null||i.return===e)return;n===i&&(n=null),i=i.return}n===i&&(n=null),i.sibling.return=i.return,i=i.sibling}}function Ew(e){var t=e.ref;if(t!==null){var n=e.stateNode,i;switch(e.tag){case S:i=n;break;default:i=n}if(typeof t=="function"){var c;if(e.mode&Rn)try{Ms(),c=t(i)}finally{Ls(e)}else c=t(i);typeof c=="function"&&b("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Tt(e))}else t.hasOwnProperty("current")||b("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Tt(e)),t.current=i}}function a5(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function jw(e){var t=e.alternate;t!==null&&(e.alternate=null,jw(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===S){var n=e.stateNode;n!==null&&hR(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 o5(e){for(var t=e.return;t!==null;){if(Dw(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 Dw(e){return e.tag===S||e.tag===h||e.tag===f}function kw(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||Dw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==S&&t.tag!==C&&t.tag!==A;){if(t.flags&fi||t.child===null||t.tag===f)continue e;t.child.return=t,t=t.child}if(!(t.flags&fi))return t.stateNode}}function l5(e){var t=o5(e);switch(t.tag){case S:{var n=t.stateNode;t.flags&tc&&(Ty(n),t.flags&=~tc);var i=kw(e);Pv(e,i,n);break}case h:case f:{var c=t.stateNode.containerInfo,w=kw(e);Vv(e,w,c);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function Vv(e,t,n){var i=e.tag,c=i===S||i===C;if(c){var w=e.stateNode;t?jk(n,w,t):Ck(n,w)}else if(i!==f){var T=e.child;if(T!==null){Vv(T,t,n);for(var P=T.sibling;P!==null;)Vv(P,t,n),P=P.sibling}}}function Pv(e,t,n){var i=e.tag,c=i===S||i===C;if(c){var w=e.stateNode;t?Ek(n,w,t):Sk(n,w)}else if(i!==f){var T=e.child;if(T!==null){Pv(T,t,n);for(var P=T.sibling;P!==null;)Pv(P,t,n),P=P.sibling}}}var Ii=null,gs=!1;function c5(e,t,n){{var i=t;e:for(;i!==null;){switch(i.tag){case S:{Ii=i.stateNode,gs=!1;break e}case h:{Ii=i.stateNode.containerInfo,gs=!0;break e}case f:{Ii=i.stateNode.containerInfo,gs=!0;break e}}i=i.return}if(Ii===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Rw(e,t,n),Ii=null,gs=!1}a5(n)}function Oa(e,t,n){for(var i=n.child;i!==null;)Rw(e,t,i),i=i.sibling}function Rw(e,t,n){switch(uE(n),n.tag){case S:Bi||jl(n,t);case C:{{var i=Ii,c=gs;Ii=null,Oa(e,t,n),Ii=i,gs=c,Ii!==null&&(gs?kk(Ii,n.stateNode):Dk(Ii,n.stateNode))}return}case A:{Ii!==null&&(gs?Rk(Ii,n.stateNode):Kf(Ii,n.stateNode));return}case f:{{var w=Ii,T=gs;Ii=n.stateNode.containerInfo,gs=!0,Oa(e,t,n),Ii=w,gs=T}return}case u:case p:case j:case M:{if(!Bi){var P=n.updateQueue;if(P!==null){var H=P.lastEffect;if(H!==null){var q=H.next,Z=q;do{var pe=Z,fe=pe.destroy,De=pe.tag;fe!==void 0&&((De&ks)!==wr?Dh(n,t,fe):(De&_i)!==wr&&(fb(n),n.mode&Rn?(Ms(),Dh(n,t,fe),Ls(n)):Dh(n,t,fe),pb())),Z=Z.next}while(Z!==q)}}}Oa(e,t,n);return}case g:{if(!Bi){jl(n,t);var ke=n.stateNode;typeof ke.componentWillUnmount=="function"&&Ov(n,t,ke)}Oa(e,t,n);return}case O:{Oa(e,t,n);return}case I:{if(n.mode&mn){var Oe=Bi;Bi=Oe||n.memoizedState!==null,Oa(e,t,n),Bi=Oe}else Oa(e,t,n);break}default:{Oa(e,t,n);return}}}function u5(e){e.memoizedState}function d5(e,t){var n=t.memoizedState;if(n===null){var i=t.alternate;if(i!==null){var c=i.memoizedState;if(c!==null){var w=c.dehydrated;w!==null&&Kk(w)}}}}function Tw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YT),t.forEach(function(i){var c=oL.bind(null,e,i);if(!n.has(i)){if(n.add(i),os)if(Cl!==null&&El!==null)bu(El,Cl);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");i.then(c,c)}})}}function h5(e,t,n){Cl=n,El=e,Un(t),Lw(t,e),Un(t),Cl=null,El=null}function _s(e,t,n){var i=t.deletions;if(i!==null)for(var c=0;c<i.length;c++){var w=i[c];try{c5(e,t,w)}catch(H){Hn(w,t,H)}}var T=li();if(t.subtreeFlags&zm)for(var P=t.child;P!==null;)Un(P),Lw(P,e),P=P.sibling;Un(T)}function Lw(e,t,n){var i=e.alternate,c=e.flags;switch(e.tag){case u:case p:case j:case M:{if(_s(t,e),As(e),c&Sn){try{vs(ks|gi,e,e.return),Ua(ks|gi,e)}catch(It){Hn(e,e.return,It)}if(e.mode&Rn){try{Ms(),vs(_i|gi,e,e.return)}catch(It){Hn(e,e.return,It)}Ls(e)}else try{vs(_i|gi,e,e.return)}catch(It){Hn(e,e.return,It)}}return}case g:{_s(t,e),As(e),c&Ka&&i!==null&&jl(i,i.return);return}case S:{_s(t,e),As(e),c&Ka&&i!==null&&jl(i,i.return);{if(e.flags&tc){var w=e.stateNode;try{Ty(w)}catch(It){Hn(e,e.return,It)}}if(c&Sn){var T=e.stateNode;if(T!=null){var P=e.memoizedProps,H=i!==null?i.memoizedProps:P,q=e.type,Z=e.updateQueue;if(e.updateQueue=null,Z!==null)try{wk(T,Z,q,H,P,e)}catch(It){Hn(e,e.return,It)}}}}return}case C:{if(_s(t,e),As(e),c&Sn){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 pe=e.stateNode,fe=e.memoizedProps,De=i!==null?i.memoizedProps:fe;try{Nk(pe,De,fe)}catch(It){Hn(e,e.return,It)}}return}case h:{if(_s(t,e),As(e),c&Sn&&i!==null){var ke=i.memoizedState;if(ke.isDehydrated)try{Yk(t.containerInfo)}catch(It){Hn(e,e.return,It)}}return}case f:{_s(t,e),As(e);return}case k:{_s(t,e),As(e);var Oe=e.child;if(Oe.flags&Xa){var lt=Oe.stateNode,Lt=Oe.memoizedState,jt=Lt!==null;if(lt.isHidden=jt,jt){var pn=Oe.alternate!==null&&Oe.alternate.memoizedState!==null;pn||G5()}}if(c&Sn){try{u5(e)}catch(It){Hn(e,e.return,It)}Tw(e)}return}case I:{var ln=i!==null&&i.memoizedState!==null;if(e.mode&mn){var we=Bi;Bi=we||ln,_s(t,e),Bi=we}else _s(t,e);if(As(e),c&Xa){var Ve=e.stateNode,Ne=e.memoizedState,Ke=Ne!==null,mt=e;if(Ve.isHidden=Ke,Ke&&!ln&&(mt.mode&mn)!==Ut){xt=mt;for(var ut=mt.child;ut!==null;)xt=ut,f5(ut),ut=ut.sibling}s5(mt,Ke)}return}case F:{_s(t,e),As(e),c&Sn&&Tw(e);return}case O:return;default:{_s(t,e),As(e);return}}}function As(e){var t=e.flags;if(t&fi){try{l5(e)}catch(n){Hn(e,e.return,n)}e.flags&=~fi}t&Gs&&(e.flags&=~Gs)}function m5(e,t,n){Cl=n,El=t,xt=e,Mw(e,t,n),Cl=null,El=null}function Mw(e,t,n){for(var i=(e.mode&mn)!==Ut;xt!==null;){var c=xt,w=c.child;if(c.tag===I&&i){var T=c.memoizedState!==null,P=T||jh;if(P){Bv(e,t,n);continue}else{var H=c.alternate,q=H!==null&&H.memoizedState!==null,Z=q||Bi,pe=jh,fe=Bi;jh=P,Bi=Z,Bi&&!fe&&(xt=c,p5(c));for(var De=w;De!==null;)xt=De,Mw(De,t,n),De=De.sibling;xt=c,jh=pe,Bi=fe,Bv(e,t,n);continue}}(c.subtreeFlags&nc)!==Bt&&w!==null?(w.return=c,xt=w):Bv(e,t,n)}}function Bv(e,t,n){for(;xt!==null;){var i=xt;if((i.flags&nc)!==Bt){var c=i.alternate;Un(i);try{i5(t,c,i,n)}catch(T){Hn(i,i.return,T)}Qn()}if(i===e){xt=null;return}var w=i.sibling;if(w!==null){w.return=i.return,xt=w;return}xt=i.return}}function f5(e){for(;xt!==null;){var t=xt,n=t.child;switch(t.tag){case u:case p:case j:case M:{if(t.mode&Rn)try{Ms(),vs(_i,t,t.return)}finally{Ls(t)}else vs(_i,t,t.return);break}case g:{jl(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Ov(t,t.return,i);break}case S:{jl(t,t.return);break}case I:{var c=t.memoizedState!==null;if(c){Aw(e);continue}break}}n!==null?(n.return=t,xt=n):Aw(e)}}function Aw(e){for(;xt!==null;){var t=xt;if(t===e){xt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,xt=n;return}xt=t.return}}function p5(e){for(;xt!==null;){var t=xt,n=t.child;if(t.tag===I){var i=t.memoizedState!==null;if(i){Uw(e);continue}}n!==null?(n.return=t,xt=n):Uw(e)}}function Uw(e){for(;xt!==null;){var t=xt;Un(t);try{r5(t)}catch(i){Hn(t,t.return,i)}if(Qn(),t===e){xt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,xt=n;return}xt=t.return}}function v5(e,t,n,i){xt=t,g5(t,e,n,i)}function g5(e,t,n,i){for(;xt!==null;){var c=xt,w=c.child;(c.subtreeFlags&qo)!==Bt&&w!==null?(w.return=c,xt=w):_5(e,t,n,i)}}function _5(e,t,n,i){for(;xt!==null;){var c=xt;if((c.flags&ga)!==Bt){Un(c);try{b5(t,c,n,i)}catch(T){Hn(c,c.return,T)}Qn()}if(c===e){xt=null;return}var w=c.sibling;if(w!==null){w.return=c.return,xt=w;return}xt=c.return}}function b5(e,t,n,i){switch(t.tag){case u:case p:case M:{if(t.mode&Rn){rv();try{Ua(Vi|gi,t)}finally{iv(t)}}else Ua(Vi|gi,t);break}}}function y5(e){xt=e,x5()}function x5(){for(;xt!==null;){var e=xt,t=e.child;if((xt.flags&Ya)!==Bt){var n=e.deletions;if(n!==null){for(var i=0;i<n.length;i++){var c=n[i];xt=c,S5(c,e)}{var w=e.alternate;if(w!==null){var T=w.child;if(T!==null){w.child=null;do{var P=T.sibling;T.sibling=null,T=P}while(T!==null)}}}xt=e}}(e.subtreeFlags&qo)!==Bt&&t!==null?(t.return=e,xt=t):w5()}}function w5(){for(;xt!==null;){var e=xt;(e.flags&ga)!==Bt&&(Un(e),N5(e),Qn());var t=e.sibling;if(t!==null){t.return=e.return,xt=t;return}xt=e.return}}function N5(e){switch(e.tag){case u:case p:case M:{e.mode&Rn?(rv(),vs(Vi|gi,e,e.return),iv(e)):vs(Vi|gi,e,e.return);break}}}function S5(e,t){for(;xt!==null;){var n=xt;Un(n),E5(n,t),Qn();var i=n.child;i!==null?(i.return=n,xt=i):C5(e)}}function C5(e){for(;xt!==null;){var t=xt,n=t.sibling,i=t.return;if(jw(t),t===e){xt=null;return}if(n!==null){n.return=i,xt=n;return}xt=i}}function E5(e,t){switch(e.tag){case u:case p:case M:{e.mode&Rn?(rv(),vs(Vi,e,t),iv(e)):vs(Vi,e,t);break}}}function j5(e){switch(e.tag){case u:case p:case M:{try{Ua(_i|gi,e)}catch(n){Hn(e,e.return,n)}break}case g:{var t=e.stateNode;try{t.componentDidMount()}catch(n){Hn(e,e.return,n)}break}}}function D5(e){switch(e.tag){case u:case p:case M:{try{Ua(Vi|gi,e)}catch(t){Hn(e,e.return,t)}break}}}function k5(e){switch(e.tag){case u:case p:case M:{try{vs(_i|gi,e,e.return)}catch(n){Hn(e,e.return,n)}break}case g:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&Ov(e,e.return,t);break}}}function R5(e){switch(e.tag){case u:case p:case M:try{vs(Vi|gi,e,e.return)}catch(t){Hn(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var lu=Symbol.for;lu("selector.component"),lu("selector.has_pseudo_class"),lu("selector.role"),lu("selector.test_id"),lu("selector.text")}var T5=[];function L5(){T5.forEach(function(e){return e()})}var M5=d.ReactCurrentActQueue;function A5(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,n=typeof jest<"u";return n&&t!==!1}}function Ow(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&M5.current!==null&&b("The current testing environment is not configured to support act(...)"),e}}var U5=Math.ceil,Iv=d.ReactCurrentDispatcher,Fv=d.ReactCurrentOwner,Fi=d.ReactCurrentBatchConfig,bs=d.ReactCurrentActQueue,xi=0,Vw=1,Hi=2,Zr=4,ra=0,cu=1,_o=2,kh=3,uu=4,Pw=5,Hv=6,fn=xi,cr=null,ti=null,wi=qe,Us=qe,zv=Ea(qe),Ni=ra,du=null,Rh=qe,hu=qe,Th=qe,mu=null,Nr=null,$v=0,Bw=500,Iw=1/0,O5=500,sa=null;function fu(){Iw=Ci()+O5}function Fw(){return Iw}var Lh=!1,Wv=null,Dl=null,bo=!1,Va=null,pu=qe,Gv=[],qv=null,V5=50,vu=0,Yv=null,Kv=!1,Mh=!1,P5=50,kl=0,Ah=null,gu=qn,Uh=qe,Hw=!1;function Oh(){return cr}function ur(){return(fn&(Hi|Zr))!==xi?Ci():(gu!==qn||(gu=Ci()),gu)}function Pa(e){var t=e.mode;if((t&mn)===Ut)return zt;if((fn&Hi)!==xi&&wi!==qe)return cc(wi);var n=MR()!==LR;if(n){if(Fi.transition!==null){var i=Fi.transition;i._updatedFibers||(i._updatedFibers=new Set),i._updatedFibers.add(e)}return Uh===ji&&(Uh=Nb()),Uh}var c=ls();if(c!==ji)return c;var w=gk();return w}function B5(e){var t=e.mode;return(t&mn)===Ut?zt:FE()}function Si(e,t,n,i){cL(),Hw&&b("useInsertionEffect must not schedule updates."),Kv&&(Mh=!0),uc(e,n,i),(fn&Hi)!==qe&&e===cr?hL(t):(os&&Eb(e,t,n),mL(t),e===cr&&((fn&Hi)===xi&&(hu=tn(hu,n)),Ni===uu&&Ba(e,wi)),Sr(e,i),n===zt&&fn===xi&&(t.mode&mn)===Ut&&!bs.isBatchingLegacy&&(fu(),Hy()))}function I5(e,t,n){var i=e.current;i.lanes=t,uc(e,t,n),Sr(e,n)}function F5(e){return(fn&Hi)!==xi}function Sr(e,t){var n=e.callbackNode;UE(e,t);var i=id(e,e===cr?wi:qe);if(i===qe){n!==null&&r0(n),e.callbackNode=null,e.callbackPriority=ji;return}var c=no(i),w=e.callbackPriority;if(w===c&&!(bs.current!==null&&n!==ng)){n==null&&w!==zt&&b("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}n!=null&&r0(n);var T;if(c===zt)e.tag===ja?(bs.isBatchingLegacy!==null&&(bs.didScheduleLegacyUpdate=!0),pR(Ww.bind(null,e))):Fy(Ww.bind(null,e)),bs.current!==null?bs.current.push(Da):bk(function(){(fn&(Hi|Zr))===xi&&Da()}),T=null;else{var P;switch(kb(i)){case Lr:P=Qu;break;case Ks:P=$m;break;case Xs:P=Qa;break;case ad:P=Wm;break;default:P=Qa;break}T=ig(P,zw.bind(null,e))}e.callbackPriority=c,e.callbackNode=T}function zw(e,t){if(sT(),gu=qn,Uh=qe,(fn&(Hi|Zr))!==xi)throw new Error("Should not already be working.");var n=e.callbackNode,i=oa();if(i&&e.callbackNode!==n)return null;var c=id(e,e===cr?wi:qe);if(c===qe)return null;var w=!rd(e,c)&&!IE(e,c)&&!t,T=w?J5(e,c):Ph(e,c);if(T!==ra){if(T===_o){var P=ff(e);P!==qe&&(c=P,T=Xv(e,P))}if(T===cu){var H=du;throw yo(e,qe),Ba(e,c),Sr(e,Ci()),H}if(T===Hv)Ba(e,c);else{var q=!rd(e,c),Z=e.current.alternate;if(q&&!z5(Z)){if(T=Ph(e,c),T===_o){var pe=ff(e);pe!==qe&&(c=pe,T=Xv(e,pe))}if(T===cu){var fe=du;throw yo(e,qe),Ba(e,c),Sr(e,Ci()),fe}}e.finishedWork=Z,e.finishedLanes=c,H5(e,T,c)}}return Sr(e,Ci()),e.callbackNode===n?zw.bind(null,e):null}function Xv(e,t){var n=mu;if(od(e)){var i=yo(e,t);i.flags|=Ws,lR(e.containerInfo)}var c=Ph(e,t);if(c!==_o){var w=Nr;Nr=n,w!==null&&$w(w)}return c}function $w(e){Nr===null?Nr=e:Nr.push.apply(Nr,e)}function H5(e,t,n){switch(t){case ra:case cu:throw new Error("Root did not complete. This is a bug in React.");case _o:{xo(e,Nr,sa);break}case kh:{if(Ba(e,n),xb(n)&&!s0()){var i=$v+Bw-Ci();if(i>10){var c=id(e,qe);if(c!==qe)break;var w=e.suspendedLanes;if(!Qo(w,n)){ur(),Cb(e,w);break}e.timeoutHandle=qf(xo.bind(null,e,Nr,sa),i);break}}xo(e,Nr,sa);break}case uu:{if(Ba(e,n),BE(n))break;if(!s0()){var T=ME(e,n),P=T,H=Ci()-P,q=lL(H)-H;if(q>10){e.timeoutHandle=qf(xo.bind(null,e,Nr,sa),q);break}}xo(e,Nr,sa);break}case Pw:{xo(e,Nr,sa);break}default:throw new Error("Unknown root exit status.")}}function z5(e){for(var t=e;;){if(t.flags&Vm){var n=t.updateQueue;if(n!==null){var i=n.stores;if(i!==null)for(var c=0;c<i.length;c++){var w=i[c],T=w.getSnapshot,P=w.value;try{if(!Ar(T(),P))return!1}catch{return!1}}}}var H=t.child;if(t.subtreeFlags&Vm&&H!==null){H.return=t,t=H;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 Ba(e,t){t=sd(t,Th),t=sd(t,hu),zE(e,t)}function Ww(e){if(aT(),(fn&(Hi|Zr))!==xi)throw new Error("Should not already be working.");oa();var t=id(e,qe);if(!Tr(t,zt))return Sr(e,Ci()),null;var n=Ph(e,t);if(e.tag!==ja&&n===_o){var i=ff(e);i!==qe&&(t=i,n=Xv(e,i))}if(n===cu){var c=du;throw yo(e,qe),Ba(e,t),Sr(e,Ci()),c}if(n===Hv)throw new Error("Root did not complete. This is a bug in React.");var w=e.current.alternate;return e.finishedWork=w,e.finishedLanes=t,xo(e,Nr,sa),Sr(e,Ci()),null}function $5(e,t){t!==qe&&(_f(e,tn(t,zt)),Sr(e,Ci()),(fn&(Hi|Zr))===xi&&(fu(),Da()))}function Jv(e,t){var n=fn;fn|=Vw;try{return e(t)}finally{fn=n,fn===xi&&!bs.isBatchingLegacy&&(fu(),Hy())}}function W5(e,t,n,i,c){var w=ls(),T=Fi.transition;try{return Fi.transition=null,Di(Lr),e(t,n,i,c)}finally{Di(w),Fi.transition=T,fn===xi&&fu()}}function aa(e){Va!==null&&Va.tag===ja&&(fn&(Hi|Zr))===xi&&oa();var t=fn;fn|=Vw;var n=Fi.transition,i=ls();try{return Fi.transition=null,Di(Lr),e?e():void 0}finally{Di(i),Fi.transition=n,fn=t,(fn&(Hi|Zr))===xi&&Da()}}function Gw(){return(fn&(Hi|Zr))!==xi}function Vh(e,t){Ki(zv,Us,e),Us=tn(Us,t)}function Zv(e){Us=zv.current,Yi(zv,e)}function yo(e,t){e.finishedWork=null,e.finishedLanes=qe;var n=e.timeoutHandle;if(n!==Yf&&(e.timeoutHandle=Yf,_k(n)),ti!==null)for(var i=ti.return;i!==null;){var c=i.alternate;xw(c,i),i=i.return}cr=e;var w=wo(e.current,null);return ti=w,wi=Us=t,Ni=ra,du=null,Rh=qe,hu=qe,Th=qe,mu=null,Nr=null,IR(),ds.discardPendingWarnings(),w}function qw(e,t){do{var n=ti;try{if(qd(),gx(),Qn(),Fv.current=null,n===null||n.return===null){Ni=cu,du=t,ti=null;return}if(he&&n.mode&Rn&&wh(n,!0),ve)if(Ko(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var i=t;xE(n,i,wi)}else yE(n,t,wi);pT(e,n.return,n,t,wi),Jw(n)}catch(c){t=c,ti===n&&n!==null?(n=n.return,ti=n):n=ti;continue}return}while(!0)}function Yw(){var e=Iv.current;return Iv.current=gh,e===null?gh:e}function Kw(e){Iv.current=e}function G5(){$v=Ci()}function _u(e){Rh=tn(e,Rh)}function q5(){Ni===ra&&(Ni=kh)}function Qv(){(Ni===ra||Ni===kh||Ni===_o)&&(Ni=uu),cr!==null&&(pf(Rh)||pf(hu))&&Ba(cr,wi)}function Y5(e){Ni!==uu&&(Ni=_o),mu===null?mu=[e]:mu.push(e)}function K5(){return Ni===ra}function Ph(e,t){var n=fn;fn|=Hi;var i=Yw();if(cr!==e||wi!==t){if(os){var c=e.memoizedUpdaters;c.size>0&&(bu(e,wi),c.clear()),jb(e,t)}sa=Db(),yo(e,t)}vb(t);do try{X5();break}catch(w){qw(e,w)}while(!0);if(qd(),fn=n,Kw(i),ti!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return gb(),cr=null,wi=qe,Ni}function X5(){for(;ti!==null;)Xw(ti)}function J5(e,t){var n=fn;fn|=Hi;var i=Yw();if(cr!==e||wi!==t){if(os){var c=e.memoizedUpdaters;c.size>0&&(bu(e,wi),c.clear()),jb(e,t)}sa=Db(),fu(),yo(e,t)}vb(t);do try{Z5();break}catch(w){qw(e,w)}while(!0);return qd(),Kw(i),fn=n,ti!==null?(EE(),ra):(gb(),cr=null,wi=qe,Ni)}function Z5(){for(;ti!==null&&!eE();)Xw(ti)}function Xw(e){var t=e.alternate;Un(e);var n;(e.mode&Rn)!==Ut?(nv(e),n=eg(t,e,Us),wh(e,!0)):n=eg(t,e,Us),Qn(),e.memoizedProps=e.pendingProps,n===null?Jw(e):ti=n,Fv.current=null}function Jw(e){var t=e;do{var n=t.alternate,i=t.return;if((t.flags&Zu)===Bt){Un(t);var c=void 0;if((t.mode&Rn)===Ut?c=yw(n,t,Us):(nv(t),c=yw(n,t,Us),wh(t,!1)),Qn(),c!==null){ti=c;return}}else{var w=qT(n,t);if(w!==null){w.flags&=YC,ti=w;return}if((t.mode&Rn)!==Ut){wh(t,!1);for(var T=t.actualDuration,P=t.child;P!==null;)T+=P.actualDuration,P=P.sibling;t.actualDuration=T}if(i!==null)i.flags|=Zu,i.subtreeFlags=Bt,i.deletions=null;else{Ni=Hv,ti=null;return}}var H=t.sibling;if(H!==null){ti=H;return}t=i,ti=t}while(t!==null);Ni===ra&&(Ni=Pw)}function xo(e,t,n){var i=ls(),c=Fi.transition;try{Fi.transition=null,Di(Lr),Q5(e,t,n,i)}finally{Fi.transition=c,Di(i)}return null}function Q5(e,t,n,i){do oa();while(Va!==null);if(uL(),(fn&(Hi|Zr))!==xi)throw new Error("Should not already be working.");var c=e.finishedWork,w=e.finishedLanes;if(mE(w),c===null)return mb(),null;if(w===qe&&b("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=qe,c===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=ji;var T=tn(c.lanes,c.childLanes);$E(e,T),e===cr&&(cr=null,ti=null,wi=qe),((c.subtreeFlags&qo)!==Bt||(c.flags&qo)!==Bt)&&(bo||(bo=!0,qv=n,ig(Qa,function(){return oa(),null})));var P=(c.subtreeFlags&(Hm|zm|nc|qo))!==Bt,H=(c.flags&(Hm|zm|nc|qo))!==Bt;if(P||H){var q=Fi.transition;Fi.transition=null;var Z=ls();Di(Lr);var pe=fn;fn|=Zr,Fv.current=null,ZT(e,c),Hx(),h5(e,c,w),dk(e.containerInfo),e.current=c,wE(w),m5(c,e,w),NE(),tE(),fn=pe,Di(Z),Fi.transition=q}else e.current=c,Hx();var fe=bo;if(bo?(bo=!1,Va=e,pu=w):(kl=0,Ah=null),T=e.pendingLanes,T===qe&&(Dl=null),fe||t0(e.current,!1),lE(c.stateNode,i),os&&e.memoizedUpdaters.clear(),L5(),Sr(e,Ci()),t!==null)for(var De=e.onRecoverableError,ke=0;ke<t.length;ke++){var Oe=t[ke],lt=Oe.stack,Lt=Oe.digest;De(Oe.value,{componentStack:lt,digest:Lt})}if(Lh){Lh=!1;var jt=Wv;throw Wv=null,jt}return Tr(pu,zt)&&e.tag!==ja&&oa(),T=e.pendingLanes,Tr(T,zt)?(rT(),e===Yv?vu++:(vu=0,Yv=e)):vu=0,Da(),mb(),null}function oa(){if(Va!==null){var e=kb(pu),t=YE(Xs,e),n=Fi.transition,i=ls();try{return Fi.transition=null,Di(t),tL()}finally{Di(i),Fi.transition=n}}return!1}function eL(e){Gv.push(e),bo||(bo=!0,ig(Qa,function(){return oa(),null}))}function tL(){if(Va===null)return!1;var e=qv;qv=null;var t=Va,n=pu;if(Va=null,pu=qe,(fn&(Hi|Zr))!==xi)throw new Error("Cannot flush passive effects while already rendering.");Kv=!0,Mh=!1,SE(n);var i=fn;fn|=Zr,y5(t.current),v5(t,t.current,n,e);{var c=Gv;Gv=[];for(var w=0;w<c.length;w++){var T=c[w];n5(t,T)}}CE(),t0(t.current,!0),fn=i,Da(),Mh?t===Ah?kl++:(kl=0,Ah=t):kl=0,Kv=!1,Mh=!1,cE(t);{var P=t.current.stateNode;P.effectDuration=0,P.passiveEffectDuration=0}return!0}function Zw(e){return Dl!==null&&Dl.has(e)}function nL(e){Dl===null?Dl=new Set([e]):Dl.add(e)}function iL(e){Lh||(Lh=!0,Wv=e)}var rL=iL;function Qw(e,t,n){var i=vo(n,t),c=Xx(e,i,zt),w=Ra(e,c,zt),T=ur();w!==null&&(uc(w,zt,T),Sr(w,T))}function Hn(e,t,n){if(KT(n),yu(!1),e.tag===h){Qw(e,e,n);return}var i=null;for(i=t;i!==null;){if(i.tag===h){Qw(i,e,n);return}else if(i.tag===g){var c=i.type,w=i.stateNode;if(typeof c.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&!Zw(w)){var T=vo(n,e),P=yv(i,T,zt),H=Ra(i,P,zt),q=ur();H!==null&&(uc(H,zt,q),Sr(H,q));return}}i=i.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 sL(e,t,n){var i=e.pingCache;i!==null&&i.delete(t);var c=ur();Cb(e,n),fL(e),cr===e&&Qo(wi,n)&&(Ni===uu||Ni===kh&&xb(wi)&&Ci()-$v<Bw?yo(e,qe):Th=tn(Th,n)),Sr(e,c)}function e0(e,t){t===ji&&(t=B5(e));var n=ur(),i=xr(e,t);i!==null&&(uc(i,t,n),Sr(i,n))}function aL(e){var t=e.memoizedState,n=ji;t!==null&&(n=t.retryLane),e0(e,n)}function oL(e,t){var n=ji,i;switch(e.tag){case k:i=e.stateNode;var c=e.memoizedState;c!==null&&(n=c.retryLane);break;case F:i=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}i!==null&&i.delete(t),e0(e,n)}function lL(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:U5(e/1960)*1960}function cL(){if(vu>V5)throw vu=0,Yv=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.");kl>P5&&(kl=0,Ah=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 uL(){ds.flushLegacyContextWarning(),ds.flushPendingUnsafeLifecycleWarnings()}function t0(e,t){Un(e),Bh(e,_a,k5),t&&Bh(e,Fm,R5),Bh(e,_a,j5),t&&Bh(e,Fm,D5),Qn()}function Bh(e,t,n){for(var i=e,c=null;i!==null;){var w=i.subtreeFlags&t;i!==c&&i.child!==null&&w!==Bt?i=i.child:((i.flags&t)!==Bt&&n(i),i.sibling!==null?i=i.sibling:i=c=i.return)}}var Ih=null;function n0(e){{if((fn&Hi)!==xi||!(e.mode&mn))return;var t=e.tag;if(t!==x&&t!==h&&t!==g&&t!==u&&t!==p&&t!==j&&t!==M)return;var n=Tt(e)||"ReactComponent";if(Ih!==null){if(Ih.has(n))return;Ih.add(n)}else Ih=new Set([n]);var i=oi;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{i?Un(e):Qn()}}}var eg;{var dL=null;eg=function(e,t,n){var i=u0(dL,t);try{return pw(e,t,n)}catch(w){if(NR()||w!==null&&typeof w=="object"&&typeof w.then=="function")throw w;if(qd(),gx(),xw(e,t),u0(t,i),t.mode&Rn&&nv(t),Um(null,pw,null,e,t,n),WC()){var c=Om();typeof c=="object"&&c!==null&&c._suppressLogging&&typeof w=="object"&&w!==null&&!w._suppressLogging&&(w._suppressLogging=!0)}throw w}}}var i0=!1,tg;tg=new Set;function hL(e){if(_r&&!tT())switch(e.tag){case u:case p:case M:{var t=ti&&Tt(ti)||"Unknown",n=t;if(!tg.has(n)){tg.add(n);var i=Tt(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",i,t,t)}break}case g:{i0||(b("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),i0=!0);break}}}function bu(e,t){if(os){var n=e.memoizedUpdaters;n.forEach(function(i){Eb(e,i,t)})}}var ng={};function ig(e,t){{var n=bs.current;return n!==null?(n.push(t),ng):hb(e,t)}}function r0(e){if(e!==ng)return QC(e)}function s0(){return bs.current!==null}function mL(e){{if(e.mode&mn){if(!Ow())return}else if(!A5()||fn!==xi||e.tag!==u&&e.tag!==p&&e.tag!==M)return;if(bs.current===null){var t=oi;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`,Tt(e))}finally{t?Un(e):Qn()}}}}function fL(e){e.tag!==ja&&Ow()&&bs.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 yu(e){Hw=e}var Qr=null,Rl=null,pL=function(e){Qr=e};function Tl(e){{if(Qr===null)return e;var t=Qr(e);return t===void 0?e:t.current}}function rg(e){return Tl(e)}function sg(e){{if(Qr===null)return e;var t=Qr(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var n=Tl(e.render);if(e.render!==n){var i={$$typeof:yt,render:n};return e.displayName!==void 0&&(i.displayName=e.displayName),i}}return e}return t.current}}function a0(e,t){{if(Qr===null)return!1;var n=e.elementType,i=t.type,c=!1,w=typeof i=="object"&&i!==null?i.$$typeof:null;switch(e.tag){case g:{typeof i=="function"&&(c=!0);break}case u:{(typeof i=="function"||w===pt)&&(c=!0);break}case p:{(w===yt||w===pt)&&(c=!0);break}case j:case M:{(w===Rt||w===pt)&&(c=!0);break}default:return!1}if(c){var T=Qr(n);if(T!==void 0&&T===Qr(i))return!0}return!1}}function o0(e){{if(Qr===null||typeof WeakSet!="function")return;Rl===null&&(Rl=new WeakSet),Rl.add(e)}}var vL=function(e,t){{if(Qr===null)return;var n=t.staleFamilies,i=t.updatedFamilies;oa(),aa(function(){ag(e.current,i,n)})}},gL=function(e,t){{if(e.context!==Ur)return;oa(),aa(function(){xu(t,e,null,null)})}};function ag(e,t,n){{var i=e.alternate,c=e.child,w=e.sibling,T=e.tag,P=e.type,H=null;switch(T){case u:case M:case g:H=P;break;case p:H=P.render;break}if(Qr===null)throw new Error("Expected resolveFamily to be set during hot reload.");var q=!1,Z=!1;if(H!==null){var pe=Qr(H);pe!==void 0&&(n.has(pe)?Z=!0:t.has(pe)&&(T===g?Z=!0:q=!0))}if(Rl!==null&&(Rl.has(e)||i!==null&&Rl.has(i))&&(Z=!0),Z&&(e._debugNeedsRemount=!0),Z||q){var fe=xr(e,zt);fe!==null&&Si(fe,e,zt,qn)}c!==null&&!Z&&ag(c,t,n),w!==null&&ag(w,t,n)}}var _L=function(e,t){{var n=new Set,i=new Set(t.map(function(c){return c.current}));return og(e.current,i,n),n}};function og(e,t,n){{var i=e.child,c=e.sibling,w=e.tag,T=e.type,P=null;switch(w){case u:case M:case g:P=T;break;case p:P=T.render;break}var H=!1;P!==null&&t.has(P)&&(H=!0),H?bL(e,n):i!==null&&og(i,t,n),c!==null&&og(c,t,n)}}function bL(e,t){{var n=yL(e,t);if(n)return;for(var i=e;;){switch(i.tag){case S:t.add(i.stateNode);return;case f:t.add(i.stateNode.containerInfo);return;case h:t.add(i.stateNode.containerInfo);return}if(i.return===null)throw new Error("Expected to reach root first.");i=i.return}}}function yL(e,t){for(var n=e,i=!1;;){if(n.tag===S)i=!0,t.add(n.stateNode);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)return i;for(;n.sibling===null;){if(n.return===null||n.return===e)return i;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}var lg;{lg=!1;try{var l0=Object.preventExtensions({})}catch{lg=!0}}function xL(e,t,n,i){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=i,this.flags=Bt,this.subtreeFlags=Bt,this.deletions=null,this.lanes=qe,this.childLanes=qe,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,!lg&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Or=function(e,t,n,i){return new xL(e,t,n,i)};function cg(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function wL(e){return typeof e=="function"&&!cg(e)&&e.defaultProps===void 0}function NL(e){if(typeof e=="function")return cg(e)?g:u;if(e!=null){var t=e.$$typeof;if(t===yt)return p;if(t===Rt)return j}return x}function wo(e,t){var n=e.alternate;n===null?(n=Or(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=Bt,n.subtreeFlags=Bt,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&qs,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 i=e.dependencies;switch(n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.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 x:case u:case M:n.type=Tl(e.type);break;case g:n.type=rg(e.type);break;case p:n.type=sg(e.type);break}return n}function SL(e,t){e.flags&=qs|fi;var n=e.alternate;if(n===null)e.childLanes=qe,e.lanes=t,e.child=null,e.subtreeFlags=Bt,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=Bt,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var i=n.dependencies;e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function CL(e,t,n){var i;return e===Vd?(i=mn,t===!0&&(i|=ri,i|=Cs)):i=Ut,os&&(i|=Rn),Or(h,null,null,i)}function ug(e,t,n,i,c,w){var T=x,P=e;if(typeof e=="function")cg(e)?(T=g,P=rg(P)):P=Tl(P);else if(typeof e=="string")T=S;else e:switch(e){case vn:return Ia(n.children,c,w,t);case Xn:T=l,c|=ri,(c&mn)!==Ut&&(c|=Cs);break;case oe:return EL(n,c,w,t);case gt:return jL(n,c,w,t);case ft:return DL(n,c,w,t);case qt:return c0(n,c,w,t);case bn:case gn:case Nn:case ui:case an:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $e:T=m;break e;case et:T=v;break e;case yt:T=p,P=sg(P);break e;case Rt:T=j;break e;case pt:T=D,P=null;break e}var H="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(H+=" 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 q=i?Tt(i):null;q&&(H+=`
197
+
198
+ Check the render method of \``+q+"`.")}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)+"."+H))}}var Z=Or(T,n,t,c);return Z.elementType=e,Z.type=P,Z.lanes=w,Z._debugOwner=i,Z}function dg(e,t,n){var i=null;i=e._owner;var c=e.type,w=e.key,T=e.props,P=ug(c,w,T,i,t,n);return P._debugSource=e._source,P._debugOwner=e._owner,P}function Ia(e,t,n,i){var c=Or(y,e,i,t);return c.lanes=n,c}function EL(e,t,n,i){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 c=Or(N,e,i,t|Rn);return c.elementType=oe,c.lanes=n,c.stateNode={effectDuration:0,passiveEffectDuration:0},c}function jL(e,t,n,i){var c=Or(k,e,i,t);return c.elementType=gt,c.lanes=n,c}function DL(e,t,n,i){var c=Or(F,e,i,t);return c.elementType=ft,c.lanes=n,c}function c0(e,t,n,i){var c=Or(I,e,i,t);c.elementType=qt,c.lanes=n;var w={isHidden:!1};return c.stateNode=w,c}function hg(e,t,n){var i=Or(C,e,null,t);return i.lanes=n,i}function kL(){var e=Or(S,null,null,Ut);return e.elementType="DELETED",e}function RL(e){var t=Or(A,null,null,Ut);return t.stateNode=e,t}function mg(e,t,n){var i=e.children!==null?e.children:[],c=Or(f,i,e.key,t);return c.lanes=n,c.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},c}function u0(e,t){return e===null&&(e=Or(x,null,null,Ut)),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 TL(e,t,n,i,c){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Yf,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=ji,this.eventTimes=gf(qe),this.expirationTimes=gf(qn),this.pendingLanes=qe,this.suspendedLanes=qe,this.pingedLanes=qe,this.expiredLanes=qe,this.mutableReadLanes=qe,this.finishedLanes=qe,this.entangledLanes=qe,this.entanglements=gf(qe),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var w=this.pendingUpdatersLaneMap=[],T=0;T<qm;T++)w.push(new Set)}switch(t){case Vd:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case ja:this._debugRootType=n?"hydrate()":"render()";break}}function d0(e,t,n,i,c,w,T,P,H,q){var Z=new TL(e,t,n,P,H),pe=CL(t,w);Z.current=pe,pe.stateNode=Z;{var fe={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};pe.memoizedState=fe}return Ep(pe),Z}var fg="18.3.1";function LL(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return J(i),{$$typeof:En,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var pg,vg;pg=!1,vg={};function h0(e){if(!e)return Ur;var t=$o(e),n=fR(t);if(t.tag===g){var i=t.type;if(Ds(i))return By(t,i,n)}return n}function ML(e,t){{var n=$o(e);if(n===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var i=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+i)}var c=cb(n);if(c===null)return null;if(c.mode&ri){var w=Tt(n)||"Component";if(!vg[w]){vg[w]=!0;var T=oi;try{Un(c),n.mode&ri?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,w):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,w)}finally{T?Un(T):Qn()}}}return c.stateNode}}function m0(e,t,n,i,c,w,T,P){var H=!1,q=null;return d0(e,t,H,q,n,i,c,w,T)}function f0(e,t,n,i,c,w,T,P,H,q){var Z=!0,pe=d0(n,i,Z,e,c,w,T,P,H);pe.context=h0(null);var fe=pe.current,De=ur(),ke=Pa(fe),Oe=na(De,ke);return Oe.callback=t??null,Ra(fe,Oe,ke),I5(pe,ke,De),pe}function xu(e,t,n,i){oE(t,e);var c=t.current,w=ur(),T=Pa(c);jE(T);var P=h0(n);t.context===null?t.context=P:t.pendingContext=P,_r&&oi!==null&&!pg&&(pg=!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.`,Tt(oi)||"Unknown"));var H=na(w,T);H.payload={element:e},i=i===void 0?null:i,i!==null&&(typeof i!="function"&&b("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i),H.callback=i);var q=Ra(c,H,T);return q!==null&&(Si(q,c,T,w),Zd(q,c,T)),T}function Fh(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case S:return t.child.stateNode;default:return t.child.stateNode}}function AL(e){switch(e.tag){case h:{var t=e.stateNode;if(od(t)){var n=OE(t);$5(t,n)}break}case k:{aa(function(){var c=xr(e,zt);if(c!==null){var w=ur();Si(c,e,zt,w)}});var i=zt;gg(e,i);break}}}function p0(e,t){var n=e.memoizedState;n!==null&&n.dehydrated!==null&&(n.retryLane=HE(n.retryLane,t))}function gg(e,t){p0(e,t);var n=e.alternate;n&&p0(n,t)}function UL(e){if(e.tag===k){var t=ac,n=xr(e,t);if(n!==null){var i=ur();Si(n,e,t,i)}gg(e,t)}}function OL(e){if(e.tag===k){var t=Pa(e),n=xr(e,t);if(n!==null){var i=ur();Si(n,e,t,i)}gg(e,t)}}function v0(e){var t=ZC(e);return t===null?null:t.stateNode}var g0=function(e){return null};function VL(e){return g0(e)}var _0=function(e){return!1};function PL(e){return _0(e)}var b0=null,y0=null,x0=null,w0=null,N0=null,S0=null,C0=null,E0=null,j0=null;{var D0=function(e,t,n){var i=t[n],c=Ct(e)?e.slice():Dt({},e);return n+1===t.length?(Ct(c)?c.splice(i,1):delete c[i],c):(c[i]=D0(e[i],t,n+1),c)},k0=function(e,t){return D0(e,t,0)},R0=function(e,t,n,i){var c=t[i],w=Ct(e)?e.slice():Dt({},e);if(i+1===t.length){var T=n[i];w[T]=w[c],Ct(w)?w.splice(c,1):delete w[c]}else w[c]=R0(e[c],t,n,i+1);return w},T0=function(e,t,n){if(t.length!==n.length){R("copyWithRename() expects paths of the same length");return}else for(var i=0;i<n.length-1;i++)if(t[i]!==n[i]){R("copyWithRename() expects paths to be the same except for the deepest key");return}return R0(e,t,n,0)},L0=function(e,t,n,i){if(n>=t.length)return i;var c=t[n],w=Ct(e)?e.slice():Dt({},e);return w[c]=L0(e[c],t,n+1,i),w},M0=function(e,t,n){return L0(e,t,0,n)},_g=function(e,t){for(var n=e.memoizedState;n!==null&&t>0;)n=n.next,t--;return n};b0=function(e,t,n,i){var c=_g(e,t);if(c!==null){var w=M0(c.memoizedState,n,i);c.memoizedState=w,c.baseState=w,e.memoizedProps=Dt({},e.memoizedProps);var T=xr(e,zt);T!==null&&Si(T,e,zt,qn)}},y0=function(e,t,n){var i=_g(e,t);if(i!==null){var c=k0(i.memoizedState,n);i.memoizedState=c,i.baseState=c,e.memoizedProps=Dt({},e.memoizedProps);var w=xr(e,zt);w!==null&&Si(w,e,zt,qn)}},x0=function(e,t,n,i){var c=_g(e,t);if(c!==null){var w=T0(c.memoizedState,n,i);c.memoizedState=w,c.baseState=w,e.memoizedProps=Dt({},e.memoizedProps);var T=xr(e,zt);T!==null&&Si(T,e,zt,qn)}},w0=function(e,t,n){e.pendingProps=M0(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=xr(e,zt);i!==null&&Si(i,e,zt,qn)},N0=function(e,t){e.pendingProps=k0(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=xr(e,zt);n!==null&&Si(n,e,zt,qn)},S0=function(e,t,n){e.pendingProps=T0(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=xr(e,zt);i!==null&&Si(i,e,zt,qn)},C0=function(e){var t=xr(e,zt);t!==null&&Si(t,e,zt,qn)},E0=function(e){g0=e},j0=function(e){_0=e}}function BL(e){var t=cb(e);return t===null?null:t.stateNode}function IL(e){return null}function FL(){return oi}function HL(e){var t=e.findFiberByHostInstance,n=d.ReactCurrentDispatcher;return aE({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:b0,overrideHookStateDeletePath:y0,overrideHookStateRenamePath:x0,overrideProps:w0,overridePropsDeletePath:N0,overridePropsRenamePath:S0,setErrorHandler:E0,setSuspenseHandler:j0,scheduleUpdate:C0,currentDispatcherRef:n,findHostInstanceByFiber:BL,findFiberByHostInstance:t||IL,findHostInstancesForRefresh:_L,scheduleRefresh:vL,scheduleRoot:gL,setRefreshHandler:pL,getCurrentFiber:FL,reconcilerVersion:fg})}var A0=typeof reportError=="function"?reportError:function(e){console.error(e)};function bg(e){this._internalRoot=e}Hh.prototype.render=bg.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()."):zh(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!==ei){var i=v0(t.current);i&&i.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.")}}xu(e,t,null,null)},Hh.prototype.unmount=bg.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;Gw()&&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(){xu(null,e,null,null)}),Ay(t)}};function zL(e,t){if(!zh(e))throw new Error("createRoot(...): Target container is not a DOM element.");U0(e);var n=!1,i=!1,c="",w=A0;t!=null&&(t.hydrate?R("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===nn&&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&&(c=t.identifierPrefix),t.onRecoverableError!==void 0&&(w=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var T=m0(e,Vd,null,n,i,c,w);Rd(T.current,e);var P=e.nodeType===ei?e.parentNode:e;return jc(P),new bg(T)}function Hh(e){this._internalRoot=e}function $L(e){e&&sj(e)}Hh.prototype.unstable_scheduleHydration=$L;function WL(e,t,n){if(!zh(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");U0(e),t===void 0&&b("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=n??null,c=n!=null&&n.hydratedSources||null,w=!1,T=!1,P="",H=A0;n!=null&&(n.unstable_strictMode===!0&&(w=!0),n.identifierPrefix!==void 0&&(P=n.identifierPrefix),n.onRecoverableError!==void 0&&(H=n.onRecoverableError));var q=f0(t,null,e,Vd,i,w,T,P,H);if(Rd(q.current,e),jc(e),c)for(var Z=0;Z<c.length;Z++){var pe=c[Z];KR(q,pe)}return new Hh(q)}function zh(e){return!!(e&&(e.nodeType===Ai||e.nodeType===Gr||e.nodeType===Bo))}function wu(e){return!!(e&&(e.nodeType===Ai||e.nodeType===Gr||e.nodeType===Bo||e.nodeType===ei&&e.nodeValue===" react-mount-point-unstable "))}function U0(e){e.nodeType===Ai&&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."),Pc(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 GL=d.ReactCurrentOwner,O0;O0=function(e){if(e._reactRootContainer&&e.nodeType!==ei){var t=v0(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,i=yg(e),c=!!(i&&Ca(i));c&&!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===Ai&&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 yg(e){return e?e.nodeType===Gr?e.documentElement:e.firstChild:null}function V0(){}function qL(e,t,n,i,c){if(c){if(typeof i=="function"){var w=i;i=function(){var fe=Fh(T);w.call(fe)}}var T=f0(t,i,e,ja,null,!1,!1,"",V0);e._reactRootContainer=T,Rd(T.current,e);var P=e.nodeType===ei?e.parentNode:e;return jc(P),aa(),T}else{for(var H;H=e.lastChild;)e.removeChild(H);if(typeof i=="function"){var q=i;i=function(){var fe=Fh(Z);q.call(fe)}}var Z=m0(e,ja,null,!1,!1,"",V0);e._reactRootContainer=Z,Rd(Z.current,e);var pe=e.nodeType===ei?e.parentNode:e;return jc(pe),aa(function(){xu(t,Z,n,i)}),Z}}function YL(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 $h(e,t,n,i,c){O0(n),YL(c===void 0?null:c,"render");var w=n._reactRootContainer,T;if(!w)T=qL(n,t,e,c,i);else{if(T=w,typeof c=="function"){var P=c;c=function(){var H=Fh(T);P.call(H)}}xu(t,T,e,c)}return Fh(T)}var P0=!1;function KL(e){{P0||(P0=!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=GL.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.",on(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Ai?e:ML(e,"findDOMNode")}function XL(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"),!wu(t))throw new Error("Target container is not a DOM element.");{var i=Pc(t)&&t._reactRootContainer===void 0;i&&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 $h(null,e,t,!0,n)}function JL(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"),!wu(t))throw new Error("Target container is not a DOM element.");{var i=Pc(t)&&t._reactRootContainer===void 0;i&&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 $h(null,e,t,!1,n)}function ZL(e,t,n,i){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"),!wu(n))throw new Error("Target container is not a DOM element.");if(e==null||!GC(e))throw new Error("parentComponent must be a valid React Component");return $h(e,t,n,!1,i)}var B0=!1;function QL(e){if(B0||(B0=!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")),!wu(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=Pc(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=yg(e),i=n&&!Ca(n);i&&b("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return aa(function(){$h(null,null,e,!1,function(){e._reactRootContainer=null,Ay(e)})}),!0}else{{var c=yg(e),w=!!(c&&Ca(c)),T=e.nodeType===Ai&&wu(e.parentNode)&&!!e.parentNode._reactRootContainer;w&&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}}KE(AL),JE(UL),ZE(OL),QE(ls),ej(GE),(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"),UC(tk),PC(Jv,W5,aa);function eM(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!zh(t))throw new Error("Target container is not a DOM element.");return LL(e,t,null,n)}function tM(e,t,n,i){return ZL(e,t,n,i)}var xg={usingClientEntryPoint:!1,Events:[Ca,ll,Td,X_,J_,Jv]};function nM(e,t){return xg.usingClientEntryPoint||b('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),zL(e,t)}function iM(e,t,n){return xg.usingClientEntryPoint||b('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),WL(e,t,n)}function rM(e){return Gw()&&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 sM=HL({findFiberByHostInstance:ao,bundleType:1,version:fg,rendererPackageName:"react-dom"});if(!sM&&Ie&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var I0=window.location.protocol;/^(https?|file):$/.test(I0)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(I0==="file:"?`
204
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xg,Pr.createPortal=eM,Pr.createRoot=nM,Pr.findDOMNode=KL,Pr.flushSync=rM,Pr.hydrate=XL,Pr.hydrateRoot=iM,Pr.render=JL,Pr.unmountComponentAtNode=QL,Pr.unstable_batchedUpdates=Jv,Pr.unstable_renderSubtreeIntoContainer=tM,Pr.version=fg,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();N1.exports=Pr;var Wl=N1.exports,E1,z0=Wl;{var $0=z0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;E1=function(r,s){$0.usingClientEntryPoint=!0;try{return z0.createRoot(r,s)}finally{$0.usingClientEntryPoint=!1}}}const j1={"common.save":"Save","common.cancel":"Cancel","common.confirm":"Confirm","common.ok":"OK","common.close":"Close","common.delete":"Delete","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}.","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":"Say something…","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.addPlaceholder":"Add a command…","cmd.tabCmd":"Command","cmd.tabKey":"Key","cmd.addTo":"Add to","cmd.addTitle":"Add","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":"No quota data in the latest session 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":"Updates on new messages","usage.timeMark":"Time elapsed in this window","app.renameSession":"Rename session","app.renameWindow":"Rename window","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.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.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_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.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.permissionDenied":"Notification permission denied","push.noVapid":"Push is not configured on the server (VAPID)","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"},mM={"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":"开启失败 —— 看看服务端日志。","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} 没有服务在监听。","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.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.addPlaceholder":"加一条命令…","cmd.tabCmd":"命令","cmd.tabKey":"按键","cmd.addTo":"添加到","cmd.addTitle":"添加","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":"最近的会话里还没有额度数据。","usage.loadFailed":"加载用量失败。","usage.updatedNow":"刚刚更新","usage.updatedMin":"{n} 分钟前更新","usage.updatedHr":"{n} 小时前更新","usage.updatedDay":"{n} 天前更新","usage.activityNote":"在有新消息时更新","usage.timeMark":"本窗口已过去的时间","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.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_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.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.permissionDenied":"通知权限被拒绝","push.noVapid":"服务端未配置推送(VAPID)","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} 未读"},fM={"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.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.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_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.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.permissionDenied":"通知權限被拒絕","push.noVapid":"伺服器未設定推播(VAPID)","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} 未讀"},pM={"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.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.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_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":"起動に失敗しました","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.permissionDenied":"通知の権限が拒否されました","push.noVapid":"サーバーにプッシュ通知(VAPID)が設定されていません","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} 分"},vM={"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.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.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_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":"시작에 실패했습니다","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.permissionDenied":"알림 권한이 거부되었습니다","push.noVapid":"서버에 푸시 알림(VAPID)이 설정되지 않았습니다","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}분"},m_={zh:mM,"zh-TW":fM,en:j1,ja:pM,ko:vM},W0=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],D1="tw_lang";function gM(r,s,d=m_){if(r&&d[r])return r;for(const _ of s&&s.length?s:["en"]){const E=String(_).toLowerCase();if(d[E])return E;const R=E.split("-")[0];if(d[R])return R}return"en"}function _M(r,s,d,_){let E=r&&r[d]!=null?r[d]:s&&s[d]!=null?s[d]:d;return _&&(E=E.replace(/\{(\w+)\}/g,(R,b)=>_[b]!=null?_[b]:`{${b}}`)),E}const bM=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,yM=()=>{try{return localStorage.getItem(D1)}catch{return null}};let sm=gM(yM(),bM());function V(r,s){return _M(m_[sm],j1,r,s)}function Il(){return sm}function xM(r){if(!(!m_[r]||r===sm)){try{localStorage.setItem(D1,r)}catch{}sm=r,typeof location<"u"&&location.reload()}}const f_="tw_token",p_="tw_font",ym="tw_bound",k1="tw_last_session",R1="tw_win",T1="tw_pane",v_="tw_favs",wM="tw_recent",NM=30,Pg="tw_inbox_seen",L1="tw_inbox_read_ts",M1="tw_browse_dir",A1="tw_preview_dir",U1="tw_startup_cmd",Bg="tw_chat_draft",O1="tw_chat_tone",Ig="tw_chat_lens",SM="tw_ideas",V1="tw_changelog_seen",P1="tw_version_seen",g_="tw_git_repos",Lo=()=>localStorage.getItem(f_),CM=r=>localStorage.setItem(f_,r),EM=()=>localStorage.removeItem(f_);function Eo(){try{return JSON.parse(localStorage.getItem(ym))||[]}catch{return[]}}function G0(r){const s=Eo();return s.includes(r)||s.push(r),localStorage.setItem(ym,JSON.stringify(s)),s}function q0(r){const s=Eo().filter(d=>d!==r);return localStorage.setItem(ym,JSON.stringify(s)),s}function jM(r,s){const d=Eo().map(_=>_===r?s:_);return localStorage.setItem(ym,JSON.stringify(d)),__.renameSession(r,s),xm.renameSession(r,s),d}function Ir(r){try{const s=JSON.parse(localStorage.getItem(r));return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}catch{return{}}}function Ha(r,s,d){const _=Ir(r);_[s]=d,localStorage.setItem(r,JSON.stringify(_))}function B1(r){const s=d=>d&&typeof d=="object"&&!Array.isArray(d)?d:{};return{get(d,_){return!d||!_?[]:s(Ir(r)[d])[_]??[]},set(d,_,E){const R=Ir(r),b=s(R[d]);return E&&E.length?b[_]=E:delete b[_],Object.keys(b).length?R[d]=b:delete R[d],localStorage.setItem(r,JSON.stringify(R)),E??[]},renameWindow(d,_,E){if(!d||!_||!E||_===E)return;const R=Ir(r),b=s(R[d]);b[_]!=null&&(b[E]=b[_],delete b[_],R[d]=b,localStorage.setItem(r,JSON.stringify(R)))},renameSession(d,_){const E=Ir(r);E[d]!=null&&(E[_]=E[d],delete E[d],localStorage.setItem(r,JSON.stringify(E)))}}}const __=B1(wM),xm=B1(SM),Y0=()=>Ir(Pg);function K0(r,s){return Ha(Pg,r,s),Ir(Pg)}const DM=()=>{const r=localStorage.getItem(L1);return r==null?null:Number(r)},X0=r=>localStorage.setItem(L1,String(r)),I1="tw_notif_seen_ts",kM=()=>{const r=localStorage.getItem(I1);return r==null?0:Number(r)},RM=r=>localStorage.setItem(I1,String(r)),b_="tw_notif_read_ids",Lu=()=>{try{const r=JSON.parse(localStorage.getItem(b_)||"[]");return Array.isArray(r)?r:[]}catch{return[]}},J0=r=>{const s=Lu();s.includes(r)||localStorage.setItem(b_,JSON.stringify([...s,r]))},TM=r=>{const s=Lu().filter(d=>r.includes(d));return localStorage.setItem(b_,JSON.stringify(s)),s},LM=r=>r?Ir(M1)[r]??null:null,Z0=(r,s)=>{r&&s&&Ha(M1,r,s)},MM=r=>r?Ir(A1)[r]??null:null,AM=(r,s)=>{r&&s&&Ha(A1,r,s)},UM=()=>localStorage.getItem(k1),OM=r=>Ir(R1)[r]??null,Gh=r=>Ir(T1)[r]??null;function Ml({sessionId:r,windowId:s,paneId:d}={}){r&&localStorage.setItem(k1,r),r&&s&&Ha(R1,r,s),s&&d&&Ha(T1,s,d)}function VM(){const r=Number(localStorage.getItem(p_));return Number.isFinite(r)&&r>0?r:null}const Su=r=>localStorage.setItem(p_,String(r)),PM=()=>localStorage.removeItem(p_),F1=["dusk","ink","light"],BM=()=>{const r=localStorage.getItem(O1);return F1.includes(r)?r:"dusk"},IM=r=>{F1.includes(r)&&localStorage.setItem(O1,r)},FM=()=>localStorage.getItem(Ig)==="1",HM=r=>{r?localStorage.setItem(Ig,"1"):localStorage.removeItem(Ig)},H1=()=>localStorage.getItem(Bg)||"",z1=r=>{r?localStorage.setItem(Bg,r):localStorage.removeItem(Bg)};function am(){try{return JSON.parse(localStorage.getItem(v_))||[]}catch{return[]}}function zM(r){const s=r.trim(),d=am();return s&&!d.includes(s)&&d.push(s),localStorage.setItem(v_,JSON.stringify(d)),d}function $M(r){const s=am().filter(d=>d!==r);return localStorage.setItem(v_,JSON.stringify(s)),s}const $1=()=>localStorage.getItem(U1)||"",W1=r=>localStorage.setItem(U1,r||""),G1="tw_orphan_kill",WM=()=>localStorage.getItem(G1)!=="0",GM=r=>localStorage.setItem(G1,r?"1":"0"),q1="tw_doc_highlight",Y1=()=>localStorage.getItem(q1)==="1",qM=r=>localStorage.setItem(q1,r?"1":"0"),om=(r,s)=>__.get(r,s),K1=(r,s,d)=>__.set(r,s,d);function YM(r,s,d){const _=(d||"").trim(),E=om(r,s);return!_||!r||!s?E:K1(r,s,[_,...E.filter(R=>R!==_)].slice(0,NM))}function KM(r,s,d){return!r||!s?om(r,s):K1(r,s,om(r,s).filter(_=>_!==d))}const y_="tw_recent_docs",X1="tw_pane_base",XM=30;function Mu(){try{return JSON.parse(localStorage.getItem(y_))||[]}catch{return[]}}function Q0({path:r,name:s,type:d,ts:_=Date.now()}){const E=[{path:r,name:s,type:d,ts:_},...Mu().filter(R=>R.path!==r)].slice(0,XM);return localStorage.setItem(y_,JSON.stringify(E)),E}function JM(r){const s=Mu().filter(d=>d.path!==r);return localStorage.setItem(y_,JSON.stringify(s)),s}const eN=r=>Ir(X1)[r]??null,ZM=(r,s)=>Ha(X1,r,s),da=[10,11,12,13,14,16,18,20,22],QM=4,J1="tw_doc_font";function eA(){const r=localStorage.getItem(J1),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:QM}const tA=r=>localStorage.setItem(J1,String(Math.min(da.length-1,Math.max(0,r)))),nA=2,Z1="tw_diff_font";function iA(){const r=localStorage.getItem(Z1),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:nA}const rA=r=>localStorage.setItem(Z1,String(Math.min(da.length-1,Math.max(0,r)))),Q1=(r,s)=>xm.get(r,s);function tN(r,s,d){return!r||!s?[]:xm.set(r,s,d)}const sA=()=>localStorage.getItem(V1),aA=r=>{r&&localStorage.setItem(V1,r)},oA=()=>localStorage.getItem(P1),lA=r=>{r&&localStorage.setItem(P1,r)};function cA(r,s,d){xm.renameWindow(r,s,d)}function x_(r){if(!r)return[];const s=Ir(g_)[r];return Array.isArray(s)?s:[]}function nN(r,s){if(!r)return[];const d=[...x_(r)];for(const _ of s)_&&!d.includes(_)&&d.push(_);return Ha(g_,r,d),d}function uA(r,s){if(!r)return[];const d=x_(r).filter(_=>_!==s);return Ha(g_,r,d),d}const Fg=[{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 等)自动变成可点的:点一下就能起代理在手机上预览(带路径),多个端口还能并行切换、自动续期。","修复了对话视图 /clear 后残留旧会话内容、问题卡确认后偶发闪现多余卡片、长输出在工具卡里滑不到、消息不足一屏时无法加载更早消息的问题。"],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.","Fixed chat-view issues: stale content after /clear, a stray fallback card flashing after answering a question, long tool output unreachable in the sheet, and older messages unloadable when the window was shorter than a screen."]}},{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)."]}}],dA=r=>r.version||r.date,qh=Fg[0]?dA(Fg[0]):null,hA={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 wm(r){const s=(r||"").lastIndexOf(".");return s<0?"":hA[r.slice(s+1).toLowerCase()]||""}function mA(r){return wm(r).startsWith("image/")}class tr extends Error{}class fA extends Error{constructor(s,d,_){super(s),this.status=d,this.serverError=_??null}}async function Zt(r,s={}){const d=Lo(),{timeoutMs:_,...E}=s,R={Authorization:`Bearer ${d??""}`,...E.headers||{}};E.body&&(R["Content-Type"]="application/json");let b=null,a=null;_&&(b=new AbortController,a=setTimeout(()=>b.abort(),_));try{const u=await fetch(r,{cache:"no-store",...E,headers:R,signal:b==null?void 0:b.signal});if(u.status===401)throw new tr;if(!u.ok){let g=null;try{const x=await u.json();x!=null&&x.error&&(g=x.error)}catch{}throw new fA(g||`${r} -> ${u.status}`,u.status,g)}return u.status===204?{unchanged:!0}:await u.json()}catch(u){throw b!=null&&b.signal.aborted?new Error(`${r} -> timeout`):u}finally{a&&clearTimeout(a)}}const Fl=()=>Zt("/api/sessions"),pA=()=>Zt("/api/usage"),Cu=r=>Zt(`/api/windows?session=${encodeURIComponent(r)}`),Fa=r=>Zt(`/api/panes?window=${encodeURIComponent(r)}`),vA=(r,s=1500,d)=>Zt(`/api/history?pane=${encodeURIComponent(r)}&lines=${s}${d?`&since=${d}`:""}`,{timeoutMs:8e3}),iN=(r,{since:s,before:d,limit:_=10}={})=>{let E=`/api/transcript?pane=${encodeURIComponent(r)}&limit=${encodeURIComponent(_)}`;return s&&(E+=`&since=${encodeURIComponent(s)}`),d!=null&&(E+=`&before=${encodeURIComponent(d)}`),Zt(E,{timeoutMs:8e3}).then(R=>R.unchanged?null:R)},gA=r=>Zt(`/api/context?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}),_A=r=>Zt(`/api/pending-prompt?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}).then(s=>s.prompt||null),Co=(r,s,d=!0)=>Zt("/api/send",{method:"POST",body:JSON.stringify({pane:r,text:s,enter:d})}),Pu=(r,s)=>Zt("/api/keys",{method:"POST",body:JSON.stringify({pane:r,keys:s})}),bA=(r,s,d=1)=>Zt("/api/scroll",{method:"POST",body:JSON.stringify({pane:r,dir:s,lines:d})}),yA=(r,s,d)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({window:r,cols:s,rows:d})}),xA=(r,s)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({pane:r,cols:s})}),wA=r=>Zt(`/api/layout?window=${encodeURIComponent(r)}`),NA=(r,s)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({window:r,auto:!0,layout:s})}),SA=(r,s,d)=>Zt("/api/sessions",{method:"POST",body:JSON.stringify({name:r,cwd:s,cmd:d})}),CA=(r,s,d,_,E)=>Zt("/api/windows",{method:"POST",body:JSON.stringify({session:r,pane:s,name:d,cwd:_,cmd:E})}),EA=(r,s)=>Zt("/api/sessions",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),jA=(r,s)=>Zt("/api/windows",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),DA=r=>Zt(`/api/windows?window=${encodeURIComponent(r)}`,{method:"DELETE"}),kA=(r,s)=>Zt("/api/windows/swap",{method:"POST",body:JSON.stringify({a:r,b:s})}),rN=(r,s)=>Zt("/api/panes/split",{method:"POST",body:JSON.stringify({pane:r,dir:s})}),RA=r=>Zt(`/api/panes?pane=${encodeURIComponent(r)}`,{method:"DELETE"}),TA=(r,s)=>Zt("/api/dir",{method:"POST",body:JSON.stringify({dir:r,name:s})}),sN=(r,s=null)=>Zt(`/api/file?path=${encodeURIComponent(r)}${s!=null?`&mtime=${encodeURIComponent(s)}`:""}`,{timeoutMs:8e3}),eS=r=>Zt(`/api/dir${r?`?path=${encodeURIComponent(r)}`:""}`,{timeoutMs:8e3}),jo=r=>Zt(`/api/pane-cwd?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}),LA=()=>Zt("/api/asr/sign",{timeoutMs:8e3}),tS=()=>Zt("/api/config",{timeoutMs:8e3}),MA=()=>Zt("/api/version",{timeoutMs:8e3}),AA=()=>Zt("/api/hooks/install",{method:"POST",timeoutMs:15e3}),UA=(r=[])=>Zt(`/api/states?sessions=${encodeURIComponent(r.join(","))}`,{timeoutMs:4e3}),aN=()=>Zt("/api/orphans",{timeoutMs:8e3}),OA=r=>Zt("/api/orphans/takeover",{method:"POST",body:JSON.stringify(r),timeoutMs:15e3}),oN=r=>Zt(`/api/git/repos?dir=${encodeURIComponent(r)}`,{timeoutMs:8e3}),VA=r=>Zt(`/api/git/status?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),PA=(r,{limit:s=50,ref:d}={})=>{let _=`/api/git/log?repo=${encodeURIComponent(r)}&limit=${s}`;return d&&(_+=`&ref=${encodeURIComponent(d)}`),Zt(_,{timeoutMs:8e3})},BA=r=>Zt(`/api/git/branches?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),IA=(r,{path:s,commit:d,staged:_}={})=>{let E=`/api/git/diff?repo=${encodeURIComponent(r)}&path=${encodeURIComponent(s??"")}`;return d&&(E+=`&commit=${encodeURIComponent(d)}`),_&&(E+="&staged=1"),Zt(E,{timeoutMs:8e3})},FA=(r,s)=>Zt(`/api/git/commit?repo=${encodeURIComponent(r)}&hash=${encodeURIComponent(s)}`,{timeoutMs:8e3});function HA(r,s){return new Promise((d,_)=>{const E=Lo(),R=new XMLHttpRequest;R.open("GET",`/api/download?path=${encodeURIComponent(r)}`),R.setRequestHeader("Authorization",`Bearer ${E??""}`),R.responseType="blob",R.onprogress=b=>{s&&b.lengthComputable&&s(b.loaded/b.total)},R.onerror=()=>_(new Error("download failed")),R.onload=()=>{if(R.status===401)return _(new tr);if(R.status<200||R.status>=300)return _(new Error(`download -> ${R.status}`));const b=r.split("/").pop()||"download";let a=R.response;const u=wm(b);u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const g=URL.createObjectURL(a),x=document.createElement("a");x.href=g,x.download=b,document.body.appendChild(x),x.click(),x.remove(),setTimeout(()=>URL.revokeObjectURL(g),1e3),d()},R.send()})}function lN(r,s=null){return new Promise((d,_)=>{const E=Lo(),R=new XMLHttpRequest,b=s!=null?`&mtime=${encodeURIComponent(s)}`:"";R.open("GET",`/api/download?path=${encodeURIComponent(r)}${b}`),R.setRequestHeader("Authorization",`Bearer ${E??""}`),R.responseType="blob",R.onerror=()=>_(new Error(V("api.loadFailed"))),R.onload=()=>{if(R.status===304)return d({notModified:!0});if(R.status===401)return _(new tr);if(R.status<200||R.status>=300)return _(new Error(`image -> ${R.status}`));let a=R.response;const u=wm(r.split("/").pop()||"");u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const g=Number(R.getResponseHeader("X-Mtime"));d({url:URL.createObjectURL(a),mtimeMs:Number.isFinite(g)?g:null})},R.send()})}const zA=(r,s,d="/")=>{const _=encodeURIComponent(Lo()??"");if((r==null?void 0:r.kind)==="dynamic"){const E=d&&d.startsWith("/")?d:"/",R=E.includes("?")?"&":"?";return`https://${encodeURIComponent(r.name)}.${s}${E}${R}token=${_}`}return`/preview/${encodeURIComponent(r==null?void 0:r.name)}/?token=${_}`},Eu=(r,s={})=>Zt("/api/previews",{method:"POST",body:JSON.stringify(s.port!=null?{name:r,port:s.port}:{name:r,dir:s.dir})}),$A=()=>Zt("/api/previews"),WA=r=>Zt(`/api/previews/${encodeURIComponent(r)}`,{method:"DELETE"});class lm extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function nS(r,s,d,_=!1,{signal:E}={}){return new Promise((R,b)=>{if(E!=null&&E.aborted)return b(new lm);const a=Lo(),u=new FormData;u.append("dir",r),_&&u.append("stash","1"),u.append("file",s,s.name);const g=new XMLHttpRequest;g.open("POST","/api/upload"),g.setRequestHeader("Authorization",`Bearer ${a??""}`),g.upload.onprogress=f=>{d&&f.lengthComputable&&d(f.loaded/f.total,"sending")},g.upload.onload=()=>{d==null||d(1,"processing")};const x=()=>g.abort();E&&E.addEventListener("abort",x,{once:!0});const h=()=>{E&&E.removeEventListener("abort",x)};g.onabort=()=>{h(),b(new lm)},g.onerror=()=>{h(),b(new Error(V("api.uploadFailed")))},g.onload=()=>{if(h(),g.status===401)return b(new tr);if(g.status>=200&&g.status<300)try{return R(JSON.parse(g.responseText))}catch{return R({})}const f={400:V("api.uploadBadDir"),409:V("api.uploadDuplicate"),413:V("api.uploadTooLarge"),415:V("api.uploadBadType")}[g.status]||V("api.uploadFailed");b(new Error(f))},g.send(u)})}async function cN({paneId:r,dir:s,windowId:d,api:_,getPanes:E}){const{id:R}=await _.splitPane(r,s);return{panes:await E(d),selectPaneId:R}}async function GA({paneId:r,windowId:s,viewedPaneId:d,api:_,getPanes:E,pickId:R}){await _.closePane(r);const b=await E(s),a=r===d&&b.length?R(b,null):null;return{panes:b,selectPaneId:a}}const qA=`<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
+ `,YA=`<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
+ `,un={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function Bu(){return o.jsxDEV("svg",{...un,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 KA(){return o.jsxDEV("svg",{...un,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 cm(){return o.jsxDEV("svg",{...un,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 iS(){return o.jsxDEV("svg",{...un,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 XA(){return o.jsxDEV("svg",{...un,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 w_(){return o.jsxDEV("svg",{...un,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 JA(){return o.jsxDEV("svg",{...un,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 ha(){return o.jsxDEV("svg",{...un,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 N_(){return o.jsxDEV("svg",{...un,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 S_(){return o.jsxDEV("svg",{...un,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 rS(){return o.jsxDEV("svg",{...un,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 ZA(){return o.jsxDEV("svg",{...un,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 QA(){return o.jsxDEV("svg",{...un,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 e3(){return o.jsxDEV("svg",{...un,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 sS(){return o.jsxDEV("svg",{...un,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 aS(){return o.jsxDEV("svg",{...un,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 t3(){return o.jsxDEV("svg",{...un,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 n3(){return o.jsxDEV("svg",{...un,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 oS(){return o.jsxDEV("svg",{...un,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 i3(){return o.jsxDEV("svg",{...un,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 um(){return o.jsxDEV("svg",{...un,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 r3(){return o.jsxDEV("svg",{...un,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 s3(){return o.jsxDEV("svg",{...un,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 a3(){return o.jsxDEV("svg",{...un,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 lS(){return o.jsxDEV("svg",{...un,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 ca(){return o.jsxDEV("svg",{...un,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 o3(){return o.jsxDEV("svg",{...un,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 l3({down:r=!1}){return o.jsxDEV("svg",{...un,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),r?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 uN(){return o.jsxDEV("svg",{...un,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 dN(){return o.jsxDEV("svg",{...un,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 c3(){return o.jsxDEV("svg",{...un,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 cS(){return o.jsxDEV("svg",{...un,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 u3(){return o.jsxDEV("svg",{...un,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 d3(){return o.jsxDEV("svg",{...un,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 h3(){return o.jsxDEV("svg",{...un,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 m3(){return o.jsxDEV("svg",{...un,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 f3(){return o.jsxDEV("svg",{...un,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 p3(){return o.jsxDEV("svg",{...un,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 hN={claude:qA,codex:YA};function Do({agent:r}){const s=hN[r]?r:"claude";return o.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":s,dangerouslySetInnerHTML:{__html:hN[s]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:440,columnNumber:10},this)}const uS=r=>{if(r<=0)return V("time.expired");const s=Math.max(1,Math.round(r/6e4));return V("time.minutes",{n:s})};function dS(r,s=!0){const[d,_]=U.useState(()=>Date.now());return U.useEffect(()=>{if(!s||r==null)return;_(Date.now());const E=setInterval(()=>_(Date.now()),1e3);return()=>clearInterval(E)},[s,r]),r!=null?Math.max(0,r-d):0}const wg=1280,mN=6;function v3({open:r,tabs:s,activeName:d,name:_,kind:E="static",domain:R=null,port:b,dir:a,expiresAt:u,initialPath:g="/",onSwitchTab:x,onCloseTab:h,onRenew:f,onStop:S,onMinimize:C}){const y=s&&s.length?s:_?[{name:_,kind:E,port:b,dir:a,expiresAt:u,path:g}]:[],l=y.find(Y=>Y.name===d)||y[0]||null,[v,m]=U.useState(!1),[p,N]=U.useState("mobile"),[k,j]=U.useState(1),[M,D]=U.useState({w:0,h:0}),L=U.useRef(null),A=U.useRef(null);U.useEffect(()=>{r||m(!1)},[r]),U.useEffect(()=>{p==="mobile"&&j(1)},[p]),U.useEffect(()=>{const Y=A.current;if(!r||!Y)return;const ve=()=>D({w:Y.clientWidth,h:Y.clientHeight});if(ve(),typeof ResizeObserver>"u")return;const he=new ResizeObserver(ve);return he.observe(Y),()=>he.disconnect()},[r]);const F=dS(l==null?void 0:l.expiresAt,r),O=(l==null?void 0:l.kind)==="dynamic"?l.port!=null?`:${l.port}`:"":(l==null?void 0:l.dir)||"",I=Y=>Y.kind==="dynamic"?Y.port!=null?`:${Y.port}`:Y.name:Y.dir?Y.dir.split("/").filter(Boolean).pop():V("preview.static"),G=p==="pc"&&M.w>0,ne=M.w>0?M.w/wg:1,ee=M.h>0?M.h/ne:0,te=ne*k,se=G?{width:`${wg*te}px`,height:`${ee*te}px`}:void 0,B=G?{width:`${wg}px`,height:`${ee}px`,transform:`scale(${te})`,transformOrigin:"0 0"}:void 0,W=Y=>j(ve=>Math.min(mN,Math.max(1,+(ve+Y).toFixed(2)))),X=()=>{const Y=L.current;if(Y)try{Y.contentWindow.location.reload()}catch{Y.src=Y.src}};return Wl.createPortal(o.jsxDEV("div",{className:`file-sheet ${r?"open":""}`,"aria-hidden":!r,children:[o.jsxDEV("div",{className:"file-tabs preview-head",children:[o.jsxDEV("span",{className:"preview-status",children:[o.jsxDEV(um,{},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:(l==null?void 0:l.kind)==="dynamic"?V("preview.dynamic"):V("preview.static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:80,columnNumber:11},this),(l==null?void 0:l.name)&&o.jsxDEV("span",{className:"preview-name",title:`${l.name}${O?" "+O:""}`,children:[l.name,O&&o.jsxDEV("span",{className:"preview-detail",children:O},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:V("preview.remainTitle"),"aria-haspopup":"dialog","aria-expanded":v,onClick:()=>m(Y=>!Y),children:uS(F)},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:()=>N(Y=>Y==="mobile"?"pc":"mobile"),"aria-label":V(p==="mobile"?"preview.toPcView":"preview.toMobileView"),title:V(p==="mobile"?"preview.pcView":"preview.mobileView"),"aria-pressed":p==="pc",children:p==="mobile"?o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:34},this):o.jsxDEV(s3,{},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:X,"aria-label":V("preview.refresh"),title:V("preview.refresh"),children:o.jsxDEV(a3,{},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":V("preview.minimize"),title:V("preview.minimize"),onClick:C,children:o.jsxDEV(ha,{},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),v&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"preview-pop-backdrop",onClick:()=>m(!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":V("preview.ttlDialog"),children:[o.jsxDEV("button",{className:"preview-pop-item",onClick:()=>{m(!1),f==null||f()},children:V("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:()=>{m(!1),S==null||S()},children:V("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":V("preview.tabs"),children:y.map(Y=>{const ve=l&&Y.name===l.name;return o.jsxDEV("span",{className:`preview-tab ${ve?"active":""}`,children:[o.jsxDEV("button",{className:"preview-tab-btn",role:"tab","aria-selected":ve,title:Y.name,onClick:()=>x==null?void 0:x(Y.name),children:I(Y)},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":V("preview.stop"),title:V("preview.stop"),onClick:()=>h==null?void 0:h(Y.name),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:114,columnNumber:17},this)]},Y.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 ${G?"pc":""}`,ref:A,children:y.map(Y=>{const ve=l&&Y.name===l.name,he=me=>{ve&&(L.current=me)},Me=zA({name:Y.name,kind:Y.kind},R,Y.path||"/");return o.jsxDEV("div",{className:"preview-pane",style:ve?void 0:{display:"none"},children:ve&&G?o.jsxDEV("div",{className:"preview-scaler",style:se,children:o.jsxDEV("iframe",{ref:he,className:"preview-frame",title:V("preview.iframeTitle"),style:B,src:Me},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:he,className:"preview-frame",title:V("preview.iframeTitle"),src:Me},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:135,columnNumber:17},this)},Y.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),G&&o.jsxDEV("div",{className:"preview-zoom",children:[o.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>W(-.5),disabled:k<=1,"aria-label":V("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(k*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:k>=mN,"aria-label":V("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 g3={working:"working",compacting:"working",done:"done",idle:"done",permission:"needs"},Hg={needs:3,done:2,working:1},_3={working:V("inbox.view.working"),done:V("inbox.view.done"),needs:V("inbox.view.needs")};function b3(r,s={},d=0){const _=[];for(const[E,R]of Object.entries(r)){const b=g3[R.kind];if(!b)continue;const a=R.ts||0;b==="done"&&!(a>Math.max(d||0,s[E]||0))||_.push({pane:E,session:R.session,window:R.window,windowName:R.windowName,view:b,msg:R.msg||"",ts:a,agent:R.agent||"claude"})}return _.sort((E,R)=>E.session<R.session?-1:E.session>R.session?1:Hg[R.view]-Hg[E.view]||R.ts-E.ts),_}function y3(r){const s={working:0,done:0,needs:0};for(const d of r)s[d.view]!=null&&(s[d.view]+=1);return s}function x3(r){let s=null,d=0;for(const _ of r){const E=Hg[_.view]||0;E>d&&(d=E,s=_.view)}return s}function fN(r){let s=0;for(const d of Object.values(r))(d.ts||0)>s&&(s=d.ts);return s}function hS(r,s){if(!r)return"";const d=Math.max(0,Math.round((s-r)/1e3));if(d<60)return V("time.secAgo",{n:d});const _=Math.round(d/60);if(_<60)return V("time.minAgo",{n:_});const E=Math.round(_/60);return E<24?V("time.hourAgo",{n:E}):V("time.dayAgo",{n:Math.round(E/24)})}function Ng(r,s,d){const _=r.findIndex(E=>E.id===s);return _<0?null:r[d==="left"?_-1:_+1]??null}const mS="tw_notify",zg=()=>localStorage.getItem(mS)==="1",fS=r=>localStorage.setItem(mS,r?"1":"0");function $l(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function pS(){var r;return typeof window<"u"&&(((r=window.matchMedia)==null?void 0:r.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const w3=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function ko(r={}){return{Authorization:`Bearer ${Lo()??""}`,...r}}function N3(r){const s="=".repeat((4-r.length%4)%4),d=(r+s).replace(/-/g,"+").replace(/_/g,"/"),_=atob(d),E=new Uint8Array(_.length);for(let R=0;R<_.length;R+=1)E[R]=_.charCodeAt(R);return E}async function S3(){if(!$l())throw new Error(V("push.unsupported"));if(w3()&&!pS())throw new Error(V("push.iosAddToHome"));if(await Notification.requestPermission()!=="granted")throw new Error(V("push.permissionDenied"));const s=await navigator.serviceWorker.ready,d=await fetch("/api/push/vapid",{headers:ko(),cache:"no-store"});if(!d.ok)throw new Error(V("push.noVapid"));const{key:_}=await d.json();let E=await s.pushManager.getSubscription();if(E||(E=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:N3(_)})),!(await fetch("/api/push/subscribe",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({subscription:E,boundSessions:Eo()})})).ok)throw new Error(V("push.subscribeFailed"));return fS(!0),!0}async function C3(){try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();s&&(await fetch("/api/push/unsubscribe",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})}),await s.unsubscribe())}catch{}fS(!1)}async function ju(){if(!(!zg()||!$l()))try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!s)return;await fetch("/api/push/bound",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint,boundSessions:Eo()})})}catch{}}async function C_(){if(!$l())return null;try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!s)return null;const d=await fetch("/api/push/key",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})});return d.ok&&(await d.json()).pushKey||null}catch{return null}}async function E3(r){if($l())try{(await(await navigator.serviceWorker.ready).getNotifications({tag:`pane-${r}`})).forEach(_=>_.close())}catch{}}async function j3(){const r=await C_();if(!r)return[];try{const s=await fetch(`/api/notifications?device=${encodeURIComponent(r)}`,{headers:ko(),cache:"no-store"});return s.ok?(await s.json()).items||[]:[]}catch{return[]}}async function D3(r){const s=await C_();if(!s)return!1;try{const d=await fetch(`/api/notifications/${encodeURIComponent(r)}?device=${encodeURIComponent(s)}`,{method:"DELETE",headers:ko()});return d.ok?(await d.json()).ok===!0:!1}catch{return!1}}function pN(r){const s=Math.max(0,Date.now()-r),d=Math.floor(s/6e4);if(d<1)return V("pushInbox.justNow");if(d<60)return V("pushInbox.minutesAgo").replace("{n}",d);const _=Math.floor(d/60);return _<24?V("pushInbox.hoursAgo").replace("{n}",_):new Date(r).toLocaleDateString()}function k3({open:r,detailId:s,items:d,readIds:_=[],onOpenDetail:E,onCloseDetail:R,onClose:b,onDelete:a,onMarkAllRead:u,unreadCount:g=0}){const x=new Set(_),h=s!=null,f=h?d.find(C=>C.id===s):null,S=d.some(C=>!x.has(C.id));return Wl.createPortal(o.jsxDEV("div",{className:`file-sheet push-inbox-sheet ${r?"open":""}`,"aria-hidden":!r,role:"dialog","aria-label":V("pushInbox.title"),children:[o.jsxDEV("div",{className:"file-tabs push-inbox-head",children:[h?o.jsxDEV("div",{className:"push-inbox-drill-head",children:[o.jsxDEV("button",{className:"push-inbox-back","aria-label":V("pushInbox.back"),title:V("pushInbox.back"),onClick:R,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:33,columnNumber:13},this),o.jsxDEV("span",{className:"push-inbox-head-title",children:V("pushInbox.detailTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:34,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:32,columnNumber:11},this):o.jsxDEV("span",{className:"push-inbox-head-title push-inbox-list-title",children:[V("pushInbox.title"),g>0&&o.jsxDEV("span",{className:"push-inbox-unread-count",children:V("pushInbox.unreadCount").replace("{n}",g)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:39,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:37,columnNumber:11},this),!h&&S&&o.jsxDEV("button",{className:"push-inbox-markall",onClick:u,children:V("pushInbox.markAllRead")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:43,columnNumber:11},this),o.jsxDEV("button",{className:"file-min","aria-label":V("common.close"),title:V("common.close"),onClick:b,children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:45,columnNumber:113},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:45,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:30,columnNumber:7},this),o.jsxDEV("div",{className:"push-inbox-body",children:h?f?o.jsxDEV("div",{className:"push-inbox-detail",children:[o.jsxDEV("div",{className:"push-inbox-detail-title",children:f.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:52,columnNumber:15},this),o.jsxDEV("div",{className:"push-inbox-detail-time",children:pN(f.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:53,columnNumber:15},this),o.jsxDEV("div",{className:"push-inbox-detail-text",children:f.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:54,columnNumber:15},this),f.url&&o.jsxDEV("a",{className:"fontbtn push-inbox-openurl",href:f.url,children:V("pushInbox.openUrl")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:55,columnNumber:30},this),o.jsxDEV("button",{className:"fontbtn push-inbox-detail-del",onClick:()=>{a(f.id),R()},children:V("pushInbox.delete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:56,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:51,columnNumber:13},this):o.jsxDEV("p",{className:"push-inbox-empty",children:V("pushInbox.expired")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:59,columnNumber:13},this):d.length===0?o.jsxDEV("p",{className:"push-inbox-empty",children:V("pushInbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:62,columnNumber:11},this):o.jsxDEV("ul",{className:"push-inbox-list",children:d.map(C=>o.jsxDEV("li",{className:`push-inbox-row${x.has(C.id)?"":" push-inbox-unread"}`,children:[o.jsxDEV("button",{className:"push-inbox-main",onClick:()=>E(C.id),children:[o.jsxDEV("div",{className:"push-inbox-row-top",children:[o.jsxDEV("span",{className:"push-inbox-row-title",children:C.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:21},this),o.jsxDEV("span",{className:"push-inbox-row-time",children:pN(C.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:70,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:68,columnNumber:19},this),o.jsxDEV("div",{className:"push-inbox-row-body",children:C.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:72,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:67,columnNumber:17},this),o.jsxDEV("button",{className:"push-inbox-del",onClick:()=>a(C.id),"aria-label":V("pushInbox.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:74,columnNumber:17},this)]},C.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:66,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:64,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:48,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:28,columnNumber:5},this),document.body)}const $g="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",R3=["md","markdown","html","htm","txt","log","sh"],T3=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],L3=[...R3,...T3].join("|"),vN=new RegExp(`[^${$g}]+\\.(?:${L3})(?=$|[${$g}.])`,"gi");function M3(r){const s=[];if(!r)return s;vN.lastIndex=0;let d;for(;(d=vN.exec(r))!==null;){let _=d.index,E=d[0];const R=/^@+/.exec(E);R&&(_+=R[0].length,E=E.slice(R[0].length)),E&&s.push({start:_,end:_+E.length,path:E})}return s}const vS=r=>typeof r=="string"&&r.startsWith("/");function So(r,s){const d=vS(s)?s:`${r.replace(/\/+$/,"")}/${s}`,_=d.startsWith("/"),E=[];for(const R of d.split("/"))if(!(!R||R===".")){if(R===".."){E.pop();continue}E.push(R)}return(_?"/":"")+E.join("/")}const A3={key:"home",type:"home",name:V("doc.home")},gS=(r,s)=>({...r,type:s.type??r.type,name:s.name??r.name,content:s.content!==void 0?s.content:r.content,mtime:s.mtime!==void 0?s.mtime:r.mtime});function U3(r,s,d){if(r.tabs.some(E=>E.key===s))return{tabs:r.tabs.map(E=>E.key===s?gS(E,d):E),active:s};const _={key:s,type:d.type,name:d.name,content:d.content,mtime:d.mtime,path:s};return{tabs:[...r.tabs,_],active:s}}function O3(r,s,d){return r.tabs.some(_=>_.key===s)?{...r,tabs:r.tabs.map(_=>_.key===s?gS(_,d):_)}:r}function V3(r,s){const d=r.tabs.findIndex(R=>R.key===s);if(d<=0)return r;const _=r.tabs.filter(R=>R.key!==s),E=r.active===s?r.tabs[d-1].key:r.active;return{tabs:_,active:E}}function P3(){const[r,s]=U.useState({tabs:[A3],active:"home"}),d=U.useCallback((b,a)=>s(u=>U3(u,b,a)),[]),_=U.useCallback((b,a)=>s(u=>O3(u,b,a)),[]),E=U.useCallback(b=>s(a=>V3(a,b)),[]),R=U.useCallback(b=>s(a=>({...a,active:b})),[]);return{tabs:r.tabs,active:r.active,openDoc:d,refreshDoc:_,closeTab:E,activate:R}}function gN(r){return String(r||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function B3({session:r,windowName:s,windowId:d}){const _=[r,s].map(gN).filter(Boolean);return _.push(gN(d)||"w"),_.join("-")}function I3(r,{settingsOpen:s,setSettingsOpen:d}){var W,X,Y,ve,he,Me;const[_,E]=U.useState([]),[R,b]=U.useState(null),[a,u]=U.useState(!1),[g,x]=U.useState(!1),[h,f]=U.useState(null),[S,C]=U.useState({}),y=U.useCallback(async()=>{try{const me=await $A();E(me.previews||[]),b(me.domain??null),u(!!me.dynamicEnabled)}catch{}},[]);U.useEffect(()=>{y()},[y]);const l=r?B3({session:(W=r.session)==null?void 0:W.name,windowName:(X=r.window)==null?void 0:X.name,windowId:(Y=r.window)==null?void 0:Y.id}):null,v=_.find(me=>me.name===l&&me.expiresAt>Date.now())||null,m=(v==null?void 0:v.expiresAt)??null,p=me=>!!l&&(me===l||me.startsWith(`${l}-`)),N=Date.now(),k=_.filter(me=>me&&me.expiresAt>N&&p(me.name)).map(me=>({name:me.name,kind:me.kind,port:me.port,dir:me.dir,expiresAt:me.expiresAt,path:S[me.name]||"/"})).sort((me,ie)=>me.name===l?-1:ie.name===l?1:(me.port||0)-(ie.port||0)),j=((ve=k.find(me=>me.name===h))==null?void 0:ve.name)??((he=k[0])==null?void 0:he.name)??null,M=k.find(me=>me.name===j)??null,D=(M==null?void 0:M.path)||"/";U.useEffect(()=>{f(null)},[l]);const L=k.length>0;U.useEffect(()=>{L||x(!1)},[L]),U.useEffect(()=>{if(m==null)return;const me=setTimeout(y,Math.max(0,m-Date.now())+500);return()=>clearTimeout(me)},[m,y]);const A=U.useCallback(()=>{f(l),s?(d(!1),requestAnimationFrame(()=>x(!0))):x(!0)},[s,d,l]),F=U.useCallback(async me=>{var ie;if(l)try{await Eu(l,{dir:me}),AM((ie=r==null?void 0:r.window)==null?void 0:ie.id,me),C($=>({...$,[l]:"/"})),await y(),A()}catch{}},[l,(Me=r==null?void 0:r.window)==null?void 0:Me.id,y,A]),O=U.useCallback(async me=>{if(!l)return;await Eu(l,{port:me}),C(Ie=>({...Ie,[l]:"/"})),f(l),await y();let ie=!1;const $=()=>{ie||(ie=!0,window.removeEventListener("popstate",_e),clearTimeout(de),x(!0))},_e=()=>$();window.addEventListener("popstate",_e);const de=setTimeout($,300);d(!1)},[l,y,d]),I=U.useCallback(async({port:me,path:ie})=>{if(!l)return;const $=`${l}-${me}`;await Eu($,{port:me}),C(_e=>({..._e,[$]:ie||"/"})),f($),await y(),x(!0)},[l,y]),G=U.useCallback(me=>f(me),[]),ne=U.useCallback(async me=>{if(me)try{await WA(me),C(ie=>{const $={...ie};return delete $[me],$}),h===me&&f(null),await y()}catch{}},[h,y]),ee=U.useCallback(()=>ne(j),[ne,j]),te=U.useCallback(async()=>{const me=k.find($=>$.name===j);if(!me)return;const ie=me.kind==="dynamic"?{port:me.port}:{dir:me.dir};try{await Eu(me.name,ie),await y()}catch{}},[k,j,y]),se=k.map(me=>me.name).join("|"),B=k.length?Math.min(...k.map(me=>me.expiresAt)):null;return U.useEffect(()=>{if(!g||B==null||!se)return;const me=se.split("|"),ie=Math.max(0,B-Date.now()-6e4),$=setTimeout(async()=>{try{await Promise.all(me.map(_e=>{const de=_.find(Ie=>Ie&&Ie.name===_e);return de?Eu(_e,de.kind==="dynamic"?{port:de.port}:{dir:de.dir}):null})),await y()}catch{}},ie);return()=>clearTimeout($)},[g,B,se,_,y]),{previews:_,previewDomain:R,dynamicEnabled:a,previewSheetOpen:g,setPreviewSheetOpen:x,activePreview:v,curPreviewName:l,tabs:k,activeName:j,shownPreview:M,shownPath:D,refreshPreviews:y,openPreviewSheet:A,startPreview:F,startDynamicPreview:O,startUrlPreview:I,switchTab:G,closeTab:ne,stopPreview:ee,renewPreview:te}}function Wg({fetch:r,apply:s,intervalMs:d,enabled:_=!0,deps:E=[]}){const R=U.useRef(r),b=U.useRef(s);R.current=r,b.current=s,U.useEffect(()=>{if(!_)return;let a=!1,u=null;const g=async()=>{if(!document.hidden)try{const f=await R.current();a||b.current(f)}catch{}},x=()=>{g(),u=setTimeout(x,d)};x();const h=()=>{document.hidden||(clearTimeout(u),x())};return document.addEventListener("visibilitychange",h),()=>{a=!0,clearTimeout(u),document.removeEventListener("visibilitychange",h)}},[_,d,...E])}function F3(r,s){return r instanceof tr?(s==null||s(),!0):!1}function H3({open:r,currentSessionName:s,bound:d,onSelectSession:_,onUnbind:E,onBind:R,onClose:b,onLogout:a,orphans:u=[],onTakeoverRequest:g}){const[x,h]=U.useState(!1);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:`drawer ${r?"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:19,columnNumber:11},this),d.length===0&&o.jsxDEV("div",{className:"drawer-empty",children:V("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:34},this),d.map(f=>o.jsxDEV("div",{className:`drawer-row drawer-session ${f===s?"active":""}`,children:[o.jsxDEV("span",{className:"drawer-name",onClick:()=>_(f),children:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:26,columnNumber:15},this),o.jsxDEV("button",{className:"drawer-unbind",onClick:S=>{S.stopPropagation(),E(f)},"aria-label":V("drawer.unbind"),title:V("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:27,columnNumber:15},this)]},f,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:13},this)),o.jsxDEV("button",{className:"drawer-bind",onClick:R,children:["+ ",V("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:35,columnNumber:11},this),u.length>0&&o.jsxDEV("div",{className:"drawer-orphans",children:[o.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>h(f=>!f),children:[o.jsxDEV("span",{children:V("drawer.orphans.title",{n:u.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:17},this),o.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:x?"▾":"▸"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:41,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:39,columnNumber:15},this),x&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"drawer-orphans-hint",children:V("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:45,columnNumber:19},this),u.map(f=>{const S=!f.sessionId,C=f.state==="busy"||S;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:f.cwd,children:f.cwdLabel||f.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:27},this),o.jsxDEV("button",{className:"drawer-orphan-btn",disabled:C,title:S?V("inbox.orphans.noSession"):void 0,onClick:()=>g==null?void 0:g(f),children:V("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:53,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:51,columnNumber:25},this),o.jsxDEV("div",{className:"drawer-orphan-meta",children:[f.agentLabel&&o.jsxDEV("span",{className:"drawer-orphan-agent",children:f.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:63,columnNumber:44},this),o.jsxDEV("span",{className:`drawer-orphan-state ${f.state==="busy"?"busy":"idle"}`,children:f.state==="busy"?V("inbox.orphans.busy"):V("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:27},this),o.jsxDEV("span",{className:"drawer-orphan-time",children:hS(f.startedAt||f.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:67,columnNumber:27},this),f.snippet&&o.jsxDEV("span",{className:"drawer-orphan-msg",children:f.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:68,columnNumber:41},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:62,columnNumber:25},this)]},f.pid,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:50,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:44,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:38,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:18,columnNumber:9},this),o.jsxDEV("button",{className:"drawer-logout",onClick:a,children:V("drawer.logout")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:17,columnNumber:7},this),r&&o.jsxDEV("div",{className:"drawer-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:80,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:16,columnNumber:5},this)}const z3=500,_N=10;function Nm(r,{onClick:s}={}){const d=U.useRef(null),_=U.useRef(null),E=U.useRef(!1),R=()=>{d.current&&(clearTimeout(d.current),d.current=null)};return{onPointerDown:b=>{E.current=!1,_.current={x:b.clientX,y:b.clientY},R(),d.current=setTimeout(()=>{d.current=null,E.current=!0,r==null||r()},z3)},onPointerMove:b=>{!d.current||!_.current||(Math.abs(b.clientX-_.current.x)>_N||Math.abs(b.clientY-_.current.y)>_N)&&R()},onPointerUp:R,onPointerLeave:R,onPointerCancel:R,onClick:b=>{var a,u;if(E.current){E.current=!1,(a=b.preventDefault)==null||a.call(b),(u=b.stopPropagation)==null||u.call(b);return}s==null||s(b)}}}const Gg=248,qg=158,dm=6,bN=2,$3=52,W3=34,Yh=r=>typeof r=="number"&&Number.isFinite(r);function Yg(r){return Array.isArray(r)&&r.length>0&&r.every(s=>Yh(s.left)&&Yh(s.top)&&Yh(s.width)&&Yh(s.height))}const yN=r=>[...new Set(r)].sort((s,d)=>s-d);function xN(r,s,d){const _=[];for(let u=0;u<r.length-1;u+=1){const g=r[u],x=r[u+1],h=s.some(([f,S])=>f===g&&S===x);_.push(x-g<=1&&!h)}const E=_.filter(u=>!u).length,R=E>0?(d-_.filter(Boolean).length*bN)/E:d,b=[{at:0}];let a=0;for(let u=0;u<_.length;u+=1)a+=_[u]?bN:R,b.push({at:a});return b}function G3(r){if(!Yg(r))return null;const s=Math.max(...r.map(x=>x.left+x.width)),d=Math.max(...r.map(x=>x.top+x.height));if(s<=0||d<=0)return null;const _=yN(r.flatMap(x=>[x.left,x.left+x.width])),E=yN(r.flatMap(x=>[x.top,x.top+x.height])),R=r.map(x=>[x.left,x.left+x.width]),b=r.map(x=>[x.top,x.top+x.height]),a=xN(_,R,Gg-dm*2),u=xN(E,b,qg-dm*2),g=r.map((x,h)=>{const f=a[_.indexOf(x.left)].at,S=a[_.indexOf(x.left+x.width)].at,C=u[E.indexOf(x.top)].at,y=u[E.indexOf(x.top+x.height)].at;return{id:x.id,active:!!x.active,command:x.command,seq:h,left:f,top:C,width:S-f,height:y-C}});return{w:Gg,h:qg,cells:g}}function q3(r){const s=r.width<$3,d=r.height<W3;return s&&d?"tiny":s?"narrow":d?"flat":""}const Sg={terminal:"终端",chat:"对话"};function Y3(){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 K3({value:r,onChange:s}){const d=r==="chat"?"terminal":"chat";return o.jsxDEV("button",{type:"button",className:"lens-toggle",onClick:()=>s(d),"aria-label":`切换到${Sg[d]}视图`,title:`切换到${Sg[d]}视图`,children:[o.jsxDEV(Y3,{},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:Sg[r]},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 wN="①②③④⑤⑥⑦⑧⑨",Au=r=>r<wN.length?wN[r]:String(r+1),X3=(r,s)=>`${Au(s)} ${r.command||r.id}`;function J3({window:r,active:s,agent:d,onSelect:_,onManage:E}){const R=Nm(()=>E(r),{onClick:()=>_(r)});return o.jsxDEV("button",{"data-win":r.id,className:`win-tab ${s?"active":""}`,...R,children:[d&&o.jsxDEV(Do,{agent:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:24,columnNumber:17},this),r.name||r.id,r.panes>1&&o.jsxDEV("span",{className:"win-panes",children:r.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:26,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:23,columnNumber:5},this)}const Z3=200;function Q3({cell:r,cur:s,releasing:d,picking:_,agent:E,onChoose:R,onManage:b}){const a=q3(r),u=r.command||r.id,g=Nm(()=>b(r.id),{onClick:()=>R(r.id)});return o.jsxDEV("button",{type:"button",role:"option","aria-selected":s,"aria-label":u,className:`pane-map-cell${s?" is-current":""}${d?" is-releasing":""}${a?` is-${a}`:""}${_?" is-picking":""}`,style:{left:`${r.left+dm}px`,top:`${r.top+dm}px`,width:`${r.width}px`,height:`${r.height}px`},...g,children:o.jsxDEV("span",{className:"pmc-surf",children:a==="narrow"||a==="tiny"?o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Au(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:56,columnNumber:11},this):a==="flat"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Au(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:59,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:60,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:58,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:Au(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:65,columnNumber:15},this),E&&o.jsxDEV(Do,{agent:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:66,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:64,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:68,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:63,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:54,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:45,columnNumber:5},this)}function eU({window:r,panes:s,paneAgents:d={},currentPaneId:_,agent:E,onManage:R,onManagePane:b,onSelectPane:a,paneSheetOpen:u=!1,openMapFor:g=null,onMapOpened:x}){const[h,f]=U.useState(!1),[S,C]=U.useState(null),y=U.useRef(null);U.useEffect(()=>()=>clearTimeout(y.current),[]);const l=F=>{var I;try{(I=navigator.vibrate)==null||I.call(navigator,10)}catch{}if(u&&(b==null||b(F)),typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(F);return}C(F),clearTimeout(y.current),y.current=setTimeout(()=>{C(null),a(F)},Z3)},[v,m]=U.useState(null),p=U.useRef(null),N=Yg(s)?G3(s):null,k=N?N.w:Gg,j=N?N.h:qg,M=()=>{var te;const F=(te=p.current)==null?void 0:te.getBoundingClientRect();if(!F)return;const O=8,I=window.innerWidth,G=window.innerHeight,ne=Math.max(O,Math.min(F.left,I-k-O));let ee=F.bottom+6;if(ee+j+O>G){const se=F.top-6-j;ee=se>=O?se:Math.max(O,G-j-O)}m({top:ee,left:ne})},D=Nm(()=>R(r),{onClick:()=>{h||M(),f(F=>!F)}});U.useEffect(()=>{g&&g===r.id&&(M(),f(!0),x==null||x())},[g,r.id]),U.useEffect(()=>{if(!h)return;const F=I=>{var G;u||(G=p.current)!=null&&G.contains(I.target)||f(!1)},O=()=>M();return document.addEventListener("pointerdown",F,!0),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O),()=>{document.removeEventListener("pointerdown",F,!0),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[h,u]);const L=Math.max(0,s.findIndex(F=>F.id===_)),A=s[L];return o.jsxDEV("div",{className:"wt-dd active","data-win":r.id,ref:p,children:[o.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":h,...D,children:[E&&o.jsxDEV(Do,{agent:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:177,columnNumber:19},this),o.jsxDEV("span",{className:"wt-name",children:r.name||r.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:178,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:179,columnNumber:9},this),o.jsxDEV("span",{className:"wt-pane",children:X3(A,L)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:180,columnNumber:9},this),o.jsxDEV("span",{className:`wt-caret${h?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:181,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:171,columnNumber:7},this),h&&v&&(Yg(s)?o.jsxDEV("div",{className:"pane-map",role:"listbox",style:{top:v.top,left:v.left,width:k,height:j},children:N.cells.map(F=>{const O=F.id===_;return o.jsxDEV(Q3,{cell:F,cur:O,releasing:O&&!!S&&S!==_,picking:S===F.id,agent:d[F.id],onChoose:l,onManage:b},F.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:189,columnNumber:17},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:185,columnNumber:11},this):o.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:v.top,left:v.left},children:s.map((F,O)=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":F.id===_,className:`dd-option${F.id===_?" is-selected":""}`,onClick:()=>{a(F.id),f(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:[o.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:Au(O)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:214,columnNumber:19},this),d[F.id]&&o.jsxDEV(Do,{agent:d[F.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:215,columnNumber:40},this),o.jsxDEV("span",{className:"dd-pane-cmd",children:F.command||F.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:216,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:213,columnNumber:17},this),F.id===_&&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:218,columnNumber:44},this)]},F.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:205,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:203,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:170,columnNumber:5},this)}function tU({windows:r,windowAgents:s={},paneAgents:d={},currentAgent:_,currentWindowId:E,panes:R,currentPaneId:b,onSelectWindow:a,onSelectPane:u,onNewWindow:g,onManageWindow:x,onManagePane:h,paneSheetOpen:f=!1,openMapFor:S=null,onMapOpened:C,trackWindowId:y,lens:l="terminal",onLensChange:v=()=>{},chatLensEnabled:m=!1}){const p=U.useRef(null);return U.useLayoutEffect(()=>{var N,k;y&&((k=(N=p.current)==null?void 0:N.querySelector(`[data-win="${y}"]`))==null||k.scrollIntoView({block:"nearest",inline:"nearest"}))},[r,y]),o.jsxDEV("div",{className:"windowbar",children:[o.jsxDEV("div",{className:"windowbar-scroll",ref:p,children:[r.map(N=>{const k=N.id===E;return k&&R.length>1?o.jsxDEV(eU,{window:N,panes:R,paneAgents:d,currentPaneId:b,agent:_,onManage:x,onManagePane:h,onSelectPane:u,paneSheetOpen:f,openMapFor:S,onMapOpened:C},N.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:250,columnNumber:15},this):o.jsxDEV(J3,{window:N,active:k,agent:s[N.id],onSelect:a,onManage:x},N.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:267,columnNumber:13},this)}),o.jsxDEV("button",{className:"win-tab win-new",onClick:g,"aria-label":V("windowbar.newWindow"),title:V("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:277,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:245,columnNumber:7},this),_&&m&&o.jsxDEV(K3,{value:l,onChange:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:280,columnNumber:43},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:244,columnNumber:5},this)}var _S={exports:{}};(function(r,s){(function(d,_){r.exports=_()})(globalThis,()=>(()=>{var d={4567:function(b,a,u){var g=this&&this.__decorate||function(m,p,N,k){var j,M=arguments.length,D=M<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,N):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,p,N,k);else for(var L=m.length-1;L>=0;L--)(j=m[L])&&(D=(M<3?j(D):M>3?j(p,N,D):j(p,N))||D);return M>3&&D&&Object.defineProperty(p,N,D),D},x=this&&this.__param||function(m,p){return function(N,k){p(N,k,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=u(9042),f=u(9924),S=u(844),C=u(4725),y=u(2585),l=u(3656);let v=a.AccessibilityManager=class extends S.Disposable{constructor(m,p,N,k){super(),this._terminal=m,this._coreBrowserService=N,this._renderService=k,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 f.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,l.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,S.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(m){for(let p=0;p<m;p++)this._handleChar(" ")}_handleChar(m){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==m&&(this._charsToAnnounce+=m):this._charsToAnnounce+=m,m===`
208
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(m){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(m)||this._charsToConsume.push(m)}_refreshRows(m,p){this._liveRegionDebouncer.refresh(m,p,this._terminal.rows)}_renderRows(m,p){const N=this._terminal.buffer,k=N.lines.length.toString();for(let j=m;j<=p;j++){const M=N.lines.get(N.ydisp+j),D=[],L=(M==null?void 0:M.translateToString(!0,void 0,void 0,D))||"",A=(N.ydisp+j+1).toString(),F=this._rowElements[j];F&&(L.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=L,this._rowColumns.set(F,D)),F.setAttribute("aria-posinset",A),F.setAttribute("aria-setsize",k))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(m,p){const N=m.target,k=this._rowElements[p===0?1:this._rowElements.length-2];if(N.getAttribute("aria-posinset")===(p===0?"1":`${this._terminal.buffer.lines.length}`)||m.relatedTarget!==k)return;let j,M;if(p===0?(j=N,M=this._rowElements.pop(),this._rowContainer.removeChild(M)):(j=this._rowElements.shift(),M=N,this._rowContainer.removeChild(j)),j.removeEventListener("focus",this._topBoundaryFocusListener),M.removeEventListener("focus",this._bottomBoundaryFocusListener),p===0){const D=this._createAccessibilityTreeNode();this._rowElements.unshift(D),this._rowContainer.insertAdjacentElement("afterbegin",D)}else{const D=this._createAccessibilityTreeNode();this._rowElements.push(D),this._rowContainer.appendChild(D)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(p===0?-1:1),this._rowElements[p===0?1:this._rowElements.length-2].focus(),m.preventDefault(),m.stopImmediatePropagation()}_handleSelectionChange(){var L;if(this._rowElements.length===0)return;const m=document.getSelection();if(!m)return;if(m.isCollapsed)return void(this._rowContainer.contains(m.anchorNode)&&this._terminal.clearSelection());if(!m.anchorNode||!m.focusNode)return void console.error("anchorNode and/or focusNode are null");let p={node:m.anchorNode,offset:m.anchorOffset},N={node:m.focusNode,offset:m.focusOffset};if((p.node.compareDocumentPosition(N.node)&Node.DOCUMENT_POSITION_PRECEDING||p.node===N.node&&p.offset>N.offset)&&([p,N]=[N,p]),p.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(p={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(p.node))return;const k=this._rowElements.slice(-1)[0];if(N.node.compareDocumentPosition(k)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(N={node:k,offset:((L=k.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(N.node))return;const j=({node:A,offset:F})=>{const O=A instanceof Text?A.parentNode:A;let I=parseInt(O==null?void 0:O.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const G=this._rowColumns.get(O);if(!G)return console.warn("columns is null. Race condition?"),null;let ne=F<G.length?G[F]:G.slice(-1)[0]+1;return ne>=this._terminal.cols&&(++I,ne=0),{row:I,column:ne}},M=j(p),D=j(N);if(M&&D){if(M.row>D.row||M.row===D.row&&M.column>=D.column)throw new Error("invalid range");this._terminal.select(M.column,M.row,(D.row-M.row)*this._terminal.cols-M.column+D.column)}}_handleResize(m){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let p=this._rowContainer.children.length;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);for(;this._rowElements.length>m;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const m=this._coreBrowserService.mainDocument.createElement("div");return m.setAttribute("role","listitem"),m.tabIndex=-1,this._refreshRowDimensions(m),m}_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 m=0;m<this._terminal.rows;m++)this._refreshRowDimensions(this._rowElements[m])}}_refreshRowDimensions(m){m.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=v=g([x(1,y.IInstantiationService),x(2,C.ICoreBrowserService),x(3,C.IRenderService)],v)},3614:(b,a)=>{function u(f){return f.replace(/\r?\n/g,"\r")}function g(f,S){return S?"\x1B[200~"+f+"\x1B[201~":f}function x(f,S,C,y){f=g(f=u(f),C.decPrivateModes.bracketedPasteMode&&y.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(f,!0),S.value=""}function h(f,S,C){const y=C.getBoundingClientRect(),l=f.clientX-y.left-10,v=f.clientY-y.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${l}px`,S.style.top=`${v}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=u,a.bracketTextForPaste=g,a.copyHandler=function(f,S){f.clipboardData&&f.clipboardData.setData("text/plain",S.selectionText),f.preventDefault()},a.handlePasteEvent=function(f,S,C,y){f.stopPropagation(),f.clipboardData&&x(f.clipboardData.getData("text/plain"),S,C,y)},a.paste=x,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(f,S,C,y,l){h(f,S,C),l&&y.rightClickSelect(f),S.value=y.selectionText,S.select()}},7239:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const g=u(1505);a.ColorContrastCache=class{constructor(){this._color=new g.TwoKeyMap,this._css=new g.TwoKeyMap}setCss(x,h,f){this._css.set(x,h,f)}getCss(x,h){return this._css.get(x,h)}setColor(x,h,f){this._color.set(x,h,f)}getColor(x,h){return this._color.get(x,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,g,x,h){u.addEventListener(g,x,h);let f=!1;return{dispose:()=>{f||(f=!0,u.removeEventListener(g,x,h))}}}},3551:function(b,a,u){var g=this&&this.__decorate||function(v,m,p,N){var k,j=arguments.length,M=j<3?m:N===null?N=Object.getOwnPropertyDescriptor(m,p):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(v,m,p,N);else for(var D=v.length-1;D>=0;D--)(k=v[D])&&(M=(j<3?k(M):j>3?k(m,p,M):k(m,p))||M);return j>3&&M&&Object.defineProperty(m,p,M),M},x=this&&this.__param||function(v,m){return function(p,N){m(p,N,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const h=u(3656),f=u(8460),S=u(844),C=u(2585),y=u(4725);let l=a.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(v,m,p,N,k){super(),this._element=v,this._mouseService=m,this._renderService=p,this._bufferService=N,this._linkProviderService=k,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new f.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new f.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.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(v){this._lastMouseEvent=v;const m=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!m)return;this._isMouseOut=!1;const p=v.composedPath();for(let N=0;N<p.length;N++){const k=p[N];if(k.classList.contains("xterm"))break;if(k.classList.contains("xterm-hover"))return}this._lastBufferCell&&m.x===this._lastBufferCell.x&&m.y===this._lastBufferCell.y||(this._handleHover(m),this._lastBufferCell=m)}_handleHover(v){if(this._activeLine!==v.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(v,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,v)||(this._clearCurrentLink(),this._askForLink(v,!0))}_askForLink(v,m){var N,k;this._activeProviderReplies&&m||((N=this._activeProviderReplies)==null||N.forEach(j=>{j==null||j.forEach(M=>{M.link.dispose&&M.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=v.y);let p=!1;for(const[j,M]of this._linkProviderService.linkProviders.entries())m?(k=this._activeProviderReplies)!=null&&k.get(j)&&(p=this._checkLinkProviderResult(j,v,p)):M.provideLinks(v.y,D=>{var A,F;if(this._isMouseOut)return;const L=D==null?void 0:D.map(O=>({link:O}));(A=this._activeProviderReplies)==null||A.set(j,L),p=this._checkLinkProviderResult(j,v,p),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)})}_removeIntersectingLinks(v,m){const p=new Set;for(let N=0;N<m.size;N++){const k=m.get(N);if(k)for(let j=0;j<k.length;j++){const M=k[j],D=M.link.range.start.y<v?0:M.link.range.start.x,L=M.link.range.end.y>v?this._bufferService.cols:M.link.range.end.x;for(let A=D;A<=L;A++){if(p.has(A)){k.splice(j--,1);break}p.add(A)}}}}_checkLinkProviderResult(v,m,p){var j;if(!this._activeProviderReplies)return p;const N=this._activeProviderReplies.get(v);let k=!1;for(let M=0;M<v;M++)this._activeProviderReplies.has(M)&&!this._activeProviderReplies.get(M)||(k=!0);if(!k&&N){const M=N.find(D=>this._linkAtPosition(D.link,m));M&&(p=!0,this._handleNewLink(M))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!p)for(let M=0;M<this._activeProviderReplies.size;M++){const D=(j=this._activeProviderReplies.get(M))==null?void 0:j.find(L=>this._linkAtPosition(L.link,m));if(D){p=!0,this._handleNewLink(D);break}}return p}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const m=this._positionFromMouseEvent(v,this._element,this._mouseService);m&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,m)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,m){this._currentLink&&this._lastMouseEvent&&(!v||!m||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=m)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const m=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);m&&this._linkAtPosition(v.link,m)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var p,N;return(N=(p=this._currentLink)==null?void 0:p.state)==null?void 0:N.decorations.pointerCursor},set:p=>{var N;(N=this._currentLink)!=null&&N.state&&this._currentLink.state.decorations.pointerCursor!==p&&(this._currentLink.state.decorations.pointerCursor=p,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",p))}},underline:{get:()=>{var p,N;return(N=(p=this._currentLink)==null?void 0:p.state)==null?void 0:N.decorations.underline},set:p=>{var N,k,j;(N=this._currentLink)!=null&&N.state&&((j=(k=this._currentLink)==null?void 0:k.state)==null?void 0:j.decorations.underline)!==p&&(this._currentLink.state.decorations.underline=p,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,p))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(p=>{if(!this._currentLink)return;const N=p.start===0?0:p.start+1+this._bufferService.buffer.ydisp,k=this._bufferService.buffer.ydisp+1+p.end;if(this._currentLink.link.range.start.y>=N&&this._currentLink.link.range.end.y<=k&&(this._clearCurrentLink(N,k),this._lastMouseEvent)){const j=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);j&&this._askForLink(j,!1)}})))}_linkHover(v,m,p){var N;(N=this._currentLink)!=null&&N.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(m,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),m.hover&&m.hover(p,m.text)}_fireUnderlineEvent(v,m){const p=v.range,N=this._bufferService.buffer.ydisp,k=this._createLinkUnderlineEvent(p.start.x-1,p.start.y-N-1,p.end.x,p.end.y-N-1,void 0);(m?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(k)}_linkLeave(v,m,p){var N;(N=this._currentLink)!=null&&N.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(m,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),m.leave&&m.leave(p,m.text)}_linkAtPosition(v,m){const p=v.range.start.y*this._bufferService.cols+v.range.start.x,N=v.range.end.y*this._bufferService.cols+v.range.end.x,k=m.y*this._bufferService.cols+m.x;return p<=k&&k<=N}_positionFromMouseEvent(v,m,p){const N=p.getCoords(v,m,this._bufferService.cols,this._bufferService.rows);if(N)return{x:N[0],y:N[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,m,p,N,k){return{x1:v,y1:m,x2:p,y2:N,cols:this._bufferService.cols,fg:k}}};a.Linkifier=l=g([x(1,y.IMouseService),x(2,y.IRenderService),x(3,C.IBufferService),x(4,y.ILinkProviderService)],l)},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,u){var g=this&&this.__decorate||function(y,l,v,m){var p,N=arguments.length,k=N<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(y,l,v,m);else for(var j=y.length-1;j>=0;j--)(p=y[j])&&(k=(N<3?p(k):N>3?p(l,v,k):p(l,v))||k);return N>3&&k&&Object.defineProperty(l,v,k),k},x=this&&this.__param||function(y,l){return function(v,m){l(v,m,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=u(511),f=u(2585);let S=a.OscLinkProvider=class{constructor(y,l,v){this._bufferService=y,this._optionsService=l,this._oscLinkService=v}provideLinks(y,l){var L;const v=this._bufferService.buffer.lines.get(y-1);if(!v)return void l(void 0);const m=[],p=this._optionsService.rawOptions.linkHandler,N=new h.CellData,k=v.getTrimmedLength();let j=-1,M=-1,D=!1;for(let A=0;A<k;A++)if(M!==-1||v.hasContent(A)){if(v.loadCell(A,N),N.hasExtendedAttrs()&&N.extended.urlId){if(M===-1){M=A,j=N.extended.urlId;continue}D=N.extended.urlId!==j}else M!==-1&&(D=!0);if(D||M!==-1&&A===k-1){const F=(L=this._oscLinkService.getLinkData(j))==null?void 0:L.uri;if(F){const O={start:{x:M+1,y},end:{x:A+(D||A!==k-1?0:1),y}};let I=!1;if(!(p!=null&&p.allowNonHttpProtocols))try{const G=new URL(F);["http:","https:"].includes(G.protocol)||(I=!0)}catch{I=!0}I||m.push({text:F,range:O,activate:(G,ne)=>p?p.activate(G,ne,O):C(0,ne),hover:(G,ne)=>{var ee;return(ee=p==null?void 0:p.hover)==null?void 0:ee.call(p,G,ne,O)},leave:(G,ne)=>{var ee;return(ee=p==null?void 0:p.leave)==null?void 0:ee.call(p,G,ne,O)}})}D=!1,N.hasExtendedAttrs()&&N.extended.urlId?(M=A,j=N.extended.urlId):(M=-1,j=-1)}}l(m)}};function C(y,l){if(confirm(`Do you want to navigate to ${l}?
209
+
210
+ WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=S=g([x(0,f.IBufferService),x(1,f.IOptionsService),x(2,f.IOscLinkService)],S)},6193:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,g){this._renderCallback=u,this._coreBrowserService=g,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(u,g,x){this._rowCount=x,u=u!==void 0?u:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,g),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const g=u(3614),x=u(3656),h=u(3551),f=u(9042),S=u(3730),C=u(1680),y=u(3107),l=u(5744),v=u(2950),m=u(1296),p=u(428),N=u(4269),k=u(5114),j=u(8934),M=u(3230),D=u(9312),L=u(4725),A=u(6731),F=u(8055),O=u(8969),I=u(8460),G=u(844),ne=u(6114),ee=u(8437),te=u(2584),se=u(7399),B=u(5941),W=u(9074),X=u(2585),Y=u(5435),ve=u(4567),he=u(779);class Me extends O.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(ie={}){super(ie),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new G.MutableDisposable),this._onCursorMove=this.register(new I.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new I.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new I.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new I.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new I.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new I.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new I.EventEmitter),this._onBlur=this.register(new I.EventEmitter),this._onA11yCharEmitter=this.register(new I.EventEmitter),this._onA11yTabEmitter=this.register(new I.EventEmitter),this._onWillOpen=this.register(new I.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(W.DecorationService),this._instantiationService.setService(X.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(he.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows(($,_e)=>this.refresh($,_e))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport($=>this._reportWindowsOptions($))),this.register(this._inputHandler.onColor($=>this._handleColorEvent($))),this.register((0,I.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,I.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize($=>this._afterResize($.cols,$.rows))),this.register((0,G.toDisposable)(()=>{var $,_e;this._customKeyEventHandler=void 0,(_e=($=this.element)==null?void 0:$.parentNode)==null||_e.removeChild(this.element)}))}_handleColorEvent(ie){if(this._themeService)for(const $ of ie){let _e,de="";switch($.index){case 256:_e="foreground",de="10";break;case 257:_e="background",de="11";break;case 258:_e="cursor",de="12";break;default:_e="ansi",de="4;"+$.index}switch($.type){case 0:const Ie=F.color.toColorRGB(_e==="ansi"?this._themeService.colors.ansi[$.index]:this._themeService.colors[_e]);this.coreService.triggerDataEvent(`${te.C0.ESC}]${de};${(0,B.toRgbString)(Ie)}${te.C1_ESCAPED.ST}`);break;case 1:if(_e==="ansi")this._themeService.modifyColors(Ue=>Ue.ansi[$.index]=F.channels.toColor(...$.color));else{const Ue=_e;this._themeService.modifyColors(tt=>tt[Ue]=F.channels.toColor(...$.color))}break;case 2:this._themeService.restoreColor($.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ie){ie?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ve.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ie){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ie;return(ie=this.textarea)==null?void 0:ie.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.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 ie=this.buffer.ybase+this.buffer.y,$=this.buffer.lines.get(ie);if(!$)return;const _e=Math.min(this.buffer.x,this.cols-1),de=this._renderService.dimensions.css.cell.height,Ie=$.getWidth(_e),Ue=this._renderService.dimensions.css.cell.width*Ie,tt=this.buffer.y*this._renderService.dimensions.css.cell.height,Qe=_e*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Qe+"px",this.textarea.style.top=tt+"px",this.textarea.style.width=Ue+"px",this.textarea.style.height=de+"px",this.textarea.style.lineHeight=de+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,x.addDisposableDomListener)(this.element,"copy",$=>{this.hasSelection()&&(0,g.copyHandler)($,this._selectionService)}));const ie=$=>(0,g.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,x.addDisposableDomListener)(this.textarea,"paste",ie)),this.register((0,x.addDisposableDomListener)(this.element,"paste",ie)),ne.isFirefox?this.register((0,x.addDisposableDomListener)(this.element,"mousedown",$=>{$.button===2&&(0,g.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,x.addDisposableDomListener)(this.element,"contextmenu",$=>{(0,g.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),ne.isLinux&&this.register((0,x.addDisposableDomListener)(this.element,"auxclick",$=>{$.button===1&&(0,g.moveTextAreaUnderMouseCursor)($,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,x.addDisposableDomListener)(this.textarea,"keyup",ie=>this._keyUp(ie),!0)),this.register((0,x.addDisposableDomListener)(this.textarea,"keydown",ie=>this._keyDown(ie),!0)),this.register((0,x.addDisposableDomListener)(this.textarea,"keypress",ie=>this._keyPress(ie),!0)),this.register((0,x.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,x.addDisposableDomListener)(this.textarea,"compositionupdate",ie=>this._compositionHelper.compositionupdate(ie))),this.register((0,x.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,x.addDisposableDomListener)(this.textarea,"input",ie=>this._inputEvent(ie),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(ie){var _e;if(!ie)throw new Error("Terminal requires a parent element.");if(ie.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((_e=this.element)==null?void 0:_e.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ie.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"),ie.appendChild(this.element);const $=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,x.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),$.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",f.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(k.CoreBrowserService,this.textarea,ie.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,x.addDisposableDomListener)(this.textarea,"focus",de=>this._handleTextAreaFocus(de))),this.register((0,x.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(p.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(A.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(N.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(M.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(v.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($);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(D.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,x.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(y.BufferDecorationRenderer,this.screenElement)),this.register((0,x.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(ve.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",de=>this._handleScreenReaderModeOptionChange(de))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",de=>{!this._overviewRulerRenderer&&de&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(m.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ie=this,$=this.element;function _e(Ue){const tt=ie._mouseService.getMouseReportCoords(Ue,ie.screenElement);if(!tt)return!1;let Qe,st;switch(Ue.overrideType||Ue.type){case"mousemove":st=32,Ue.buttons===void 0?(Qe=3,Ue.button!==void 0&&(Qe=Ue.button<3?Ue.button:3)):Qe=1&Ue.buttons?0:4&Ue.buttons?1:2&Ue.buttons?2:3;break;case"mouseup":st=0,Qe=Ue.button<3?Ue.button:3;break;case"mousedown":st=1,Qe=Ue.button<3?Ue.button:3;break;case"wheel":if(ie._customWheelEventHandler&&ie._customWheelEventHandler(Ue)===!1||ie.viewport.getLinesScrolled(Ue)===0)return!1;st=Ue.deltaY<0?0:1,Qe=4;break;default:return!1}return!(st===void 0||Qe===void 0||Qe>4)&&ie.coreMouseService.triggerMouseEvent({col:tt.col,row:tt.row,x:tt.x,y:tt.y,button:Qe,action:st,ctrl:Ue.ctrlKey,alt:Ue.altKey,shift:Ue.shiftKey})}const de={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ie={mouseup:Ue=>(_e(Ue),Ue.buttons||(this._document.removeEventListener("mouseup",de.mouseup),de.mousedrag&&this._document.removeEventListener("mousemove",de.mousedrag)),this.cancel(Ue)),wheel:Ue=>(_e(Ue),this.cancel(Ue,!0)),mousedrag:Ue=>{Ue.buttons&&_e(Ue)},mousemove:Ue=>{Ue.buttons||_e(Ue)}};this.register(this.coreMouseService.onProtocolChange(Ue=>{Ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Ue)),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&Ue?de.mousemove||($.addEventListener("mousemove",Ie.mousemove),de.mousemove=Ie.mousemove):($.removeEventListener("mousemove",de.mousemove),de.mousemove=null),16&Ue?de.wheel||($.addEventListener("wheel",Ie.wheel,{passive:!1}),de.wheel=Ie.wheel):($.removeEventListener("wheel",de.wheel),de.wheel=null),2&Ue?de.mouseup||(de.mouseup=Ie.mouseup):(this._document.removeEventListener("mouseup",de.mouseup),de.mouseup=null),4&Ue?de.mousedrag||(de.mousedrag=Ie.mousedrag):(this._document.removeEventListener("mousemove",de.mousedrag),de.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,x.addDisposableDomListener)($,"mousedown",Ue=>{if(Ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Ue))return _e(Ue),de.mouseup&&this._document.addEventListener("mouseup",de.mouseup),de.mousedrag&&this._document.addEventListener("mousemove",de.mousedrag),this.cancel(Ue)})),this.register((0,x.addDisposableDomListener)($,"wheel",Ue=>{if(!de.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Ue)===!1)return!1;if(!this.buffer.hasScrollback){const tt=this.viewport.getLinesScrolled(Ue);if(tt===0)return;const Qe=te.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ue.deltaY<0?"A":"B");let st="";for(let Nt=0;Nt<Math.abs(tt);Nt++)st+=Qe;return this.coreService.triggerDataEvent(st,!0),this.cancel(Ue,!0)}return this.viewport.handleWheel(Ue)?this.cancel(Ue):void 0}},{passive:!1})),this.register((0,x.addDisposableDomListener)($,"touchstart",Ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Ue),this.cancel(Ue)},{passive:!0})),this.register((0,x.addDisposableDomListener)($,"touchmove",Ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Ue)?void 0:this.cancel(Ue)},{passive:!1}))}refresh(ie,$){var _e;(_e=this._renderService)==null||_e.refreshRows(ie,$)}updateCursorStyle(ie){var $;($=this._selectionService)!=null&&$.shouldColumnSelect(ie)?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(ie,$,_e=0){var de;_e===1?(super.scrollLines(ie,$,_e),this.refresh(0,this.rows-1)):(de=this.viewport)==null||de.scrollLines(ie)}paste(ie){(0,g.paste)(ie,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ie){this._customKeyEventHandler=ie}attachCustomWheelEventHandler(ie){this._customWheelEventHandler=ie}registerLinkProvider(ie){return this._linkProviderService.registerLinkProvider(ie)}registerCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const $=this._characterJoinerService.register(ie);return this.refresh(0,this.rows-1),$}deregisterCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ie)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ie){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ie)}registerDecoration(ie){return this._decorationService.registerDecoration(ie)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ie,$,_e){this._selectionService.setSelection(ie,$,_e)}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 ie;(ie=this._selectionService)==null||ie.clearSelection()}selectAll(){var ie;(ie=this._selectionService)==null||ie.selectAll()}selectLines(ie,$){var _e;(_e=this._selectionService)==null||_e.selectLines(ie,$)}_keyDown(ie){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&ie.altKey;if(!$&&!this._compositionHelper.keydown(ie))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||ie.key!=="Dead"&&ie.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const _e=(0,se.evaluateKeyboardEvent)(ie,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ie),_e.type===3||_e.type===2){const de=this.rows-1;return this.scrollLines(_e.type===2?-de:de),this.cancel(ie,!0)}return _e.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ie)||(_e.cancel&&this.cancel(ie,!0),!_e.key||!!(ie.key&&!ie.ctrlKey&&!ie.altKey&&!ie.metaKey&&ie.key.length===1&&ie.key.charCodeAt(0)>=65&&ie.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(_e.key!==te.C0.ETX&&_e.key!==te.C0.CR||(this.textarea.value=""),this._onKey.fire({key:_e.key,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(_e.key,!0),!this.optionsService.rawOptions.screenReaderMode||ie.altKey||ie.ctrlKey?this.cancel(ie,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ie,$){const _e=ie.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||ie.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||ie.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?_e:_e&&(!$.keyCode||$.keyCode>47)}_keyUp(ie){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1||(function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18}(ie)||this.focus(),this.updateCursorStyle(ie),this._keyPressHandled=!1)}_keyPress(ie){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;if(this.cancel(ie),ie.charCode)$=ie.charCode;else if(ie.which===null||ie.which===void 0)$=ie.keyCode;else{if(ie.which===0||ie.charCode===0)return!1;$=ie.which}return!(!$||(ie.altKey||ie.ctrlKey||ie.metaKey)&&!this._isThirdLevelShift(this.browser,ie)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent($,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ie){if(ie.data&&ie.inputType==="insertText"&&(!ie.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const $=ie.data;return this.coreService.triggerDataEvent($,!0),this.cancel(ie),!0}return!1}resize(ie,$){ie!==this.cols||$!==this.rows?super.resize(ie,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ie,$){var _e,de;(_e=this._charSizeService)==null||_e.measure(),(de=this.viewport)==null||de.syncScrollArea(!0)}clear(){var ie;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let $=1;$<this.rows;$++)this.buffer.lines.push(this.buffer.getBlankLine(ee.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(ie=this.viewport)==null||ie.reset(),this.refresh(0,this.rows-1)}}reset(){var $,_e;this.options.rows=this.rows,this.options.cols=this.cols;const ie=this._customKeyEventHandler;this._setup(),super.reset(),($=this._selectionService)==null||$.reset(),this._decorationService.reset(),(_e=this.viewport)==null||_e.reset(),this._customKeyEventHandler=ie,this.refresh(0,this.rows-1)}clearTextureAtlas(){var ie;(ie=this._renderService)==null||ie.clearTextureAtlas()}_reportFocus(){var ie;(ie=this.element)!=null&&ie.classList.contains("focus")?this.coreService.triggerDataEvent(te.C0.ESC+"[I"):this.coreService.triggerDataEvent(te.C0.ESC+"[O")}_reportWindowsOptions(ie){if(this._renderService)switch(ie){case Y.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const $=this._renderService.dimensions.css.canvas.width.toFixed(0),_e=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${te.C0.ESC}[4;${_e};${$}t`);break;case Y.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const de=this._renderService.dimensions.css.cell.width.toFixed(0),Ie=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${te.C0.ESC}[6;${Ie};${de}t`)}}cancel(ie,$){if(this.options.cancelEvents||$)return ie.preventDefault(),ie.stopPropagation(),!1}}a.Terminal=Me},9924:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,g=1e3){this._renderCallback=u,this._debounceThresholdMS=g,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,g,x){this._rowCount=x,u=u!==void 0?u:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const f=h-this._lastRefreshMs,S=this._debounceThresholdMS-f;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,g)}}},1680:function(b,a,u){var g=this&&this.__decorate||function(v,m,p,N){var k,j=arguments.length,M=j<3?m:N===null?N=Object.getOwnPropertyDescriptor(m,p):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(v,m,p,N);else for(var D=v.length-1;D>=0;D--)(k=v[D])&&(M=(j<3?k(M):j>3?k(m,p,M):k(m,p))||M);return j>3&&M&&Object.defineProperty(m,p,M),M},x=this&&this.__param||function(v,m){return function(p,N){m(p,N,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const h=u(3656),f=u(4725),S=u(8460),C=u(844),y=u(2585);let l=a.Viewport=class extends C.Disposable{constructor(v,m,p,N,k,j,M,D){super(),this._viewportElement=v,this._scrollArea=m,this._bufferService=p,this._optionsService=N,this._charSizeService=k,this._renderService=j,this._coreBrowserService=M,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(L=>this._renderDimensions=L)),this._handleThemeChange(D.colors),this.register(D.onChangeColors(L=>this._handleThemeChange(L))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.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(v){if(v)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 m=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==m&&(this._lastRecordedBufferHeight=m,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){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 m=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:m,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<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(v,m){const p=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(m<0&&this._viewportElement.scrollTop!==0||m>0&&p<this._lastRecordedBufferHeight)||(v.cancelable&&v.preventDefault(),!1)}handleWheel(v){const m=this._getPixelsScrolled(v);return m!==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+m:this._smoothScrollState.target+=m,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=m,this._bubbleScroll(v,m))}scrollLines(v){if(v!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const m=v*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+m,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:v,suppressScrollEvent:!1})}_getPixelsScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let m=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_LINE?m*=this._currentRowHeight:v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(m*=this._currentRowHeight*this._bufferService.rows),m}getBufferElements(v,m){var D;let p,N="";const k=[],j=m??this._bufferService.buffer.lines.length,M=this._bufferService.buffer.lines;for(let L=v;L<j;L++){const A=M.get(L);if(!A)continue;const F=(D=M.get(L+1))==null?void 0:D.isWrapped;if(N+=A.translateToString(!F),!F||L===M.length-1){const O=document.createElement("div");O.textContent=N,k.push(O),N.length>0&&(p=O),N=""}}return{bufferElements:k,cursorElement:p}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let m=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(m/=this._currentRowHeight+0,this._wheelPartialScroll+=m,m=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(m*=this._bufferService.rows),m}_applyScrollModifier(v,m){const p=this._optionsService.rawOptions.fastScrollModifier;return p==="alt"&&m.altKey||p==="ctrl"&&m.ctrlKey||p==="shift"&&m.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const m=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,m!==0&&(this._viewportElement.scrollTop+=m,this._bubbleScroll(v,m))}};a.Viewport=l=g([x(2,y.IBufferService),x(3,y.IOptionsService),x(4,f.ICharSizeService),x(5,f.IRenderService),x(6,f.ICoreBrowserService),x(7,f.IThemeService)],l)},3107:function(b,a,u){var g=this&&this.__decorate||function(y,l,v,m){var p,N=arguments.length,k=N<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(y,l,v,m);else for(var j=y.length-1;j>=0;j--)(p=y[j])&&(k=(N<3?p(k):N>3?p(l,v,k):p(l,v))||k);return N>3&&k&&Object.defineProperty(l,v,k),k},x=this&&this.__param||function(y,l){return function(v,m){l(v,m,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=u(4725),f=u(844),S=u(2585);let C=a.BufferDecorationRenderer=class extends f.Disposable{constructor(y,l,v,m,p){super(),this._screenElement=y,this._bufferService=l,this._coreBrowserService=v,this._decorationService=m,this._renderService=p,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(N=>this._removeDecoration(N))),this.register((0,f.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 m;const l=this._coreBrowserService.mainDocument.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((m=y==null?void 0:y.options)==null?void 0:m.layer)==="top"),l.style.width=`${Math.round((y.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(y.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(y.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=y.options.x??0;return v&&v>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(y,l),l}_refreshStyle(y){const l=y.marker.line-this._bufferService.buffers.active.ydisp;if(l<0||l>=this._bufferService.rows)y.element&&(y.element.style.display="none",y.onRenderEmitter.fire(y.element));else{let v=this._decorationElements.get(y);v||(v=this._createElement(y),y.element=v,this._decorationElements.set(y,v),this._container.appendChild(v),y.onDispose(()=>{this._decorationElements.delete(y),v.remove()})),v.style.top=l*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",y.onRenderEmitter.fire(v)}}_refreshXPosition(y,l=y.element){if(!l)return;const v=y.options.x??0;(y.options.anchor||"left")==="right"?l.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":l.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(y){var l;(l=this._decorationElements.get(y))==null||l.remove(),this._decorationElements.delete(y),y.dispose()}};a.BufferDecorationRenderer=C=g([x(1,S.IBufferService),x(2,h.ICoreBrowserService),x(3,S.IDecorationService),x(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(u){if(u.options.overviewRulerOptions){for(const g of this._zones)if(g.color===u.options.overviewRulerOptions.color&&g.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(g,u.marker.line))return;if(this._lineAdjacentToZone(g,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(g,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,g){return g>=u.startBufferLine&&g<=u.endBufferLine}_lineAdjacentToZone(u,g,x){return g>=u.startBufferLine-this._linePadding[x||"full"]&&g<=u.endBufferLine+this._linePadding[x||"full"]}_addLineToZone(u,g){u.startBufferLine=Math.min(u.startBufferLine,g),u.endBufferLine=Math.max(u.endBufferLine,g)}}},5744:function(b,a,u){var g=this&&this.__decorate||function(p,N,k,j){var M,D=arguments.length,L=D<3?N:j===null?j=Object.getOwnPropertyDescriptor(N,k):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(p,N,k,j);else for(var A=p.length-1;A>=0;A--)(M=p[A])&&(L=(D<3?M(L):D>3?M(N,k,L):M(N,k))||L);return D>3&&L&&Object.defineProperty(N,k,L),L},x=this&&this.__param||function(p,N){return function(k,j){N(k,j,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const h=u(5871),f=u(4725),S=u(844),C=u(2585),y={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let m=a.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(p,N,k,j,M,D,L){var F;super(),this._viewportElement=p,this._screenElement=N,this._bufferService=k,this._decorationService=j,this._renderService=M,this._optionsService=D,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(),(F=this._viewportElement.parentElement)==null||F.insertBefore(this._canvas,this._viewportElement);const A=this._canvas.getContext("2d");if(!A)throw new Error("Ctx cannot be null");this._ctx=A,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)(()=>{var O;(O=this._canvas)==null||O.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 p=Math.floor(this._canvas.width/3),N=Math.ceil(this._canvas.width/3);l.full=this._canvas.width,l.left=p,l.center=N,l.right=p,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=l.left,v.right=l.left+l.center}_refreshDrawHeightConstants(){y.full=Math.round(2*this._coreBrowserService.dpr);const p=this._canvas.height/this._bufferService.buffer.lines.length,N=Math.round(Math.max(Math.min(p,12),6)*this._coreBrowserService.dpr);y.left=N,y.center=N,y.right=N}_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 N of this._decorationService.decorations)this._colorZoneStore.addDecoration(N);this._ctx.lineWidth=1;const p=this._colorZoneStore.zones;for(const N of p)N.position!=="full"&&this._renderColorZone(N);for(const N of p)N.position==="full"&&this._renderColorZone(N);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(p){this._ctx.fillStyle=p.color,this._ctx.fillRect(v[p.position||"full"],Math.round((this._canvas.height-1)*(p.startBufferLine/this._bufferService.buffers.active.lines.length)-y[p.position||"full"]/2),l[p.position||"full"],Math.round((this._canvas.height-1)*((p.endBufferLine-p.startBufferLine)/this._bufferService.buffers.active.lines.length)+y[p.position||"full"]))}_queueRefresh(p,N){this._shouldUpdateDimensions=p||this._shouldUpdateDimensions,this._shouldUpdateAnchor=N||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};a.OverviewRulerRenderer=m=g([x(2,C.IBufferService),x(3,C.IDecorationService),x(4,f.IRenderService),x(5,C.IOptionsService),x(6,f.ICoreBrowserService)],m)},2950:function(b,a,u){var g=this&&this.__decorate||function(y,l,v,m){var p,N=arguments.length,k=N<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(y,l,v,m);else for(var j=y.length-1;j>=0;j--)(p=y[j])&&(k=(N<3?p(k):N>3?p(l,v,k):p(l,v))||k);return N>3&&k&&Object.defineProperty(l,v,k),k},x=this&&this.__param||function(y,l){return function(v,m){l(v,m,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=u(4725),f=u(2585),S=u(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(y,l,v,m,p,N){this._textarea=y,this._compositionView=l,this._bufferService=v,this._optionsService=m,this._coreService=p,this._renderService=N,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 l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}},0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const y=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const l=this._textarea.value,v=l.replace(y,"");this._dataAlreadySent=v,l.length>y.length?this._coreService.triggerDataEvent(v,!0):l.length<y.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):l.length===y.length&&l!==y&&this._coreService.triggerDataEvent(l,!0)}},0)}updateCompositionElements(y){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),v=this._renderService.dimensions.css.cell.height,m=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,p=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=p+"px",this._compositionView.style.top=m+"px",this._compositionView.style.height=v+"px",this._compositionView.style.lineHeight=v+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const N=this._compositionView.getBoundingClientRect();this._textarea.style.left=p+"px",this._textarea.style.top=m+"px",this._textarea.style.width=Math.max(N.width,1)+"px",this._textarea.style.height=Math.max(N.height,1)+"px",this._textarea.style.lineHeight=N.height+"px"}y||setTimeout(()=>this.updateCompositionElements(!0),0)}}};a.CompositionHelper=C=g([x(2,f.IBufferService),x(3,f.IOptionsService),x(4,f.ICoreService),x(5,h.IRenderService)],C)},9806:(b,a)=>{function u(g,x,h){const f=h.getBoundingClientRect(),S=g.getComputedStyle(h),C=parseInt(S.getPropertyValue("padding-left")),y=parseInt(S.getPropertyValue("padding-top"));return[x.clientX-f.left-C,x.clientY-f.top-y]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(g,x,h,f,S,C,y,l,v){if(!C)return;const m=u(g,x,h);return m?(m[0]=Math.ceil((m[0]+(v?y/2:0))/y),m[1]=Math.ceil(m[1]/l),m[0]=Math.min(Math.max(m[0],1),f+(v?1:0)),m[1]=Math.min(Math.max(m[1],1),S),m):void 0}},9504:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const g=u(2584);function x(l,v,m,p){const N=l-h(l,m),k=v-h(v,m),j=Math.abs(N-k)-function(M,D,L){let A=0;const F=M-h(M,L),O=D-h(D,L);for(let I=0;I<Math.abs(F-O);I++){const G=f(M,D)==="A"?-1:1,ne=L.buffer.lines.get(F+G*I);ne!=null&&ne.isWrapped&&A++}return A}(l,v,m);return y(j,C(f(l,v),p))}function h(l,v){let m=0,p=v.buffer.lines.get(l),N=p==null?void 0:p.isWrapped;for(;N&&l>=0&&l<v.rows;)m++,p=v.buffer.lines.get(--l),N=p==null?void 0:p.isWrapped;return m}function f(l,v){return l>v?"A":"B"}function S(l,v,m,p,N,k){let j=l,M=v,D="";for(;j!==m||M!==p;)j+=N?1:-1,N&&j>k.cols-1?(D+=k.buffer.translateBufferLineToString(M,!1,l,j),j=0,l=0,M++):!N&&j<0&&(D+=k.buffer.translateBufferLineToString(M,!1,0,l+1),j=k.cols-1,l=j,M--);return D+k.buffer.translateBufferLineToString(M,!1,l,j)}function C(l,v){const m=v?"O":"[";return g.C0.ESC+m+l}function y(l,v){l=Math.floor(l);let m="";for(let p=0;p<l;p++)m+=v;return m}a.moveToCellSequence=function(l,v,m,p){const N=m.buffer.x,k=m.buffer.y;if(!m.buffer.hasScrollback)return function(D,L,A,F,O,I){return x(L,F,O,I).length===0?"":y(S(D,L,D,L-h(L,O),!1,O).length,C("D",I))}(N,k,0,v,m,p)+x(k,v,m,p)+function(D,L,A,F,O,I){let G;G=x(L,F,O,I).length>0?F-h(F,O):L;const ne=F,ee=function(te,se,B,W,X,Y){let ve;return ve=x(B,W,X,Y).length>0?W-h(W,X):se,te<B&&ve<=W||te>=B&&ve<W?"C":"D"}(D,L,A,F,O,I);return y(S(D,G,A,ne,ee==="C",O).length,C(ee,I))}(N,k,l,v,m,p);let j;if(k===v)return j=N>l?"D":"C",y(Math.abs(N-l),C(j,p));j=k>v?"D":"C";const M=Math.abs(k-v);return y(function(D,L){return L.cols-D}(k>v?l:N,m)+(M-1)*m.cols+1+((k>v?N:l)-1),C(j,p))}},1296:function(b,a,u){var g=this&&this.__decorate||function(I,G,ne,ee){var te,se=arguments.length,B=se<3?G:ee===null?ee=Object.getOwnPropertyDescriptor(G,ne):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(I,G,ne,ee);else for(var W=I.length-1;W>=0;W--)(te=I[W])&&(B=(se<3?te(B):se>3?te(G,ne,B):te(G,ne))||B);return se>3&&B&&Object.defineProperty(G,ne,B),B},x=this&&this.__param||function(I,G){return function(ne,ee){G(ne,ee,I)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const h=u(3787),f=u(2550),S=u(2223),C=u(6171),y=u(6052),l=u(4725),v=u(8055),m=u(8460),p=u(844),N=u(2585),k="xterm-dom-renderer-owner-",j="xterm-rows",M="xterm-fg-",D="xterm-bg-",L="xterm-focus",A="xterm-selection";let F=1,O=a.DomRenderer=class extends p.Disposable{constructor(I,G,ne,ee,te,se,B,W,X,Y,ve,he,Me){super(),this._terminal=I,this._document=G,this._element=ne,this._screenElement=ee,this._viewportElement=te,this._helperContainer=se,this._linkifier2=B,this._charSizeService=X,this._optionsService=Y,this._bufferService=ve,this._coreBrowserService=he,this._themeService=Me,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,y.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new m.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(A),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(me=>this._injectCss(me))),this._injectCss(this._themeService.colors),this._rowFactory=W.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(k+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(me=>this._handleLinkHover(me))),this.register(this._linkifier2.onHideLinkUnderline(me=>this._handleLinkLeave(me))),this.register((0,p.toDisposable)(()=>{this._element.classList.remove(k+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new f.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 I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),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/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),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 G=`${this._terminalSelector} .${j} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=G,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(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let G=`${this._terminalSelector} .${j} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;G+=`${this._terminalSelector} .${j} .xterm-dim { color: ${v.color.multiplyOpacity(I.foreground,.5).css};}`,G+=`${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}`,ee=`blink_bar_${this._terminalClass}`,te=`blink_block_${this._terminalClass}`;G+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,G+=`@keyframes ${ee} { 50% { box-shadow: none; }}`,G+=`@keyframes ${te} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,G+=`${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: ${ee} 1s step-end infinite;}${this._terminalSelector} .${j}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${te} 1s step-end infinite;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,G+=`${this._terminalSelector} .${A} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${A} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${A} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[se,B]of I.ansi.entries())G+=`${this._terminalSelector} .${M}${se} { color: ${B.css}; }${this._terminalSelector} .${M}${se}.xterm-dim { color: ${v.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${D}${se} { background-color: ${B.css}; }`;G+=`${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(I.background).css}; }${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${D}${S.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=G}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,G){for(let ne=this._rowElements.length;ne<=G;ne++){const ee=this._document.createElement("div");this._rowContainer.appendChild(ee),this._rowElements.push(ee)}for(;this._rowElements.length>G;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,G){this._refreshRowElements(I,G),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(I,G,ne){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,G,ne),this.renderRows(0,this._bufferService.rows-1),!I||!G)return;this._selectionRenderModel.update(this._terminal,I,G,ne);const ee=this._selectionRenderModel.viewportStartRow,te=this._selectionRenderModel.viewportEndRow,se=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(se>=this._bufferService.rows||B<0)return;const W=this._document.createDocumentFragment();if(ne){const X=I[0]>G[0];W.appendChild(this._createSelectionElement(se,X?G[0]:I[0],X?I[0]:G[0],B-se+1))}else{const X=ee===se?I[0]:0,Y=se===te?G[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(se,X,Y));const ve=B-se-1;if(W.appendChild(this._createSelectionElement(se+1,0,this._bufferService.cols,ve)),se!==B){const he=te===B?G[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(B,0,he))}}this._selectionContainer.appendChild(W)}_createSelectionElement(I,G,ne,ee=1){const te=this._document.createElement("div"),se=G*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(ne-G);return se+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-se),te.style.height=ee*this.dimensions.css.cell.height+"px",te.style.top=I*this.dimensions.css.cell.height+"px",te.style.left=`${se}px`,te.style.width=`${B}px`,te}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 I of this._rowElements)I.replaceChildren()}renderRows(I,G){const ne=this._bufferService.buffer,ee=ne.ybase+ne.y,te=Math.min(ne.x,this._bufferService.cols-1),se=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,W=this._optionsService.rawOptions.cursorInactiveStyle;for(let X=I;X<=G;X++){const Y=X+ne.ydisp,ve=this._rowElements[X],he=ne.lines.get(Y);if(!ve||!he)break;ve.replaceChildren(...this._rowFactory.createRow(he,Y,Y===ee,B,W,te,se,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${k}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,G,ne,ee,te,se){ne<0&&(I=0),ee<0&&(G=0);const B=this._bufferService.rows-1;ne=Math.max(Math.min(ne,B),0),ee=Math.max(Math.min(ee,B),0),te=Math.min(te,this._bufferService.cols);const W=this._bufferService.buffer,X=W.ybase+W.y,Y=Math.min(W.x,te-1),ve=this._optionsService.rawOptions.cursorBlink,he=this._optionsService.rawOptions.cursorStyle,Me=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=ne;me<=ee;++me){const ie=me+W.ydisp,$=this._rowElements[me],_e=W.lines.get(ie);if(!$||!_e)break;$.replaceChildren(...this._rowFactory.createRow(_e,ie,ie===X,he,Me,Y,ve,this.dimensions.css.cell.width,this._widthCache,se?me===ne?I:0:-1,se?(me===ee?G:te)-1:-1))}}};a.DomRenderer=O=g([x(7,N.IInstantiationService),x(8,l.ICharSizeService),x(9,N.IOptionsService),x(10,N.IBufferService),x(11,l.ICoreBrowserService),x(12,l.IThemeService)],O)},3787:function(b,a,u){var g=this&&this.__decorate||function(j,M,D,L){var A,F=arguments.length,O=F<3?M:L===null?L=Object.getOwnPropertyDescriptor(M,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(j,M,D,L);else for(var I=j.length-1;I>=0;I--)(A=j[I])&&(O=(F<3?A(O):F>3?A(M,D,O):A(M,D))||O);return F>3&&O&&Object.defineProperty(M,D,O),O},x=this&&this.__param||function(j,M){return function(D,L){M(D,L,j)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const h=u(2223),f=u(643),S=u(511),C=u(2585),y=u(8055),l=u(4725),v=u(4269),m=u(6171),p=u(3734);let N=a.DomRendererRowFactory=class{constructor(j,M,D,L,A,F,O){this._document=j,this._characterJoinerService=M,this._optionsService=D,this._coreBrowserService=L,this._coreService=A,this._decorationService=F,this._themeService=O,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(j,M,D){this._selectionStart=j,this._selectionEnd=M,this._columnSelectMode=D}createRow(j,M,D,L,A,F,O,I,G,ne,ee){const te=[],se=this._characterJoinerService.getJoinedCharacters(M),B=this._themeService.colors;let W,X=j.getNoBgTrimmedLength();D&&X<F+1&&(X=F+1);let Y=0,ve="",he=0,Me=0,me=0,ie=!1,$=0,_e=!1,de=0;const Ie=[],Ue=ne!==-1&&ee!==-1;for(let tt=0;tt<X;tt++){j.loadCell(tt,this._workCell);let Qe=this._workCell.getWidth();if(Qe===0)continue;let st=!1,Nt=tt,J=this._workCell;if(se.length>0&&tt===se[0][0]){st=!0;const He=se.shift();J=new v.JoinedCellData(this._workCell,j.translateToString(!0,He[0],He[1]),He[1]-He[0]),Nt=He[1]-1,Qe=J.getWidth()}const bt=this._isCellInSelection(tt,M),Gt=D&&tt===F,Ee=Ue&&tt>=ne&&tt<=ee;let Te=!1;this._decorationService.forEachDecorationAtCell(tt,M,void 0,He=>{Te=!0});let Ge=J.getChars()||f.WHITESPACE_CELL_CHAR;if(Ge===" "&&(J.isUnderline()||J.isOverline())&&(Ge=" "),de=Qe*I-G.get(Ge,J.isBold(),J.isItalic()),W){if(Y&&(bt&&_e||!bt&&!_e&&J.bg===he)&&(bt&&_e&&B.selectionForeground||J.fg===Me)&&J.extended.ext===me&&Ee===ie&&de===$&&!Gt&&!st&&!Te){J.isInvisible()?ve+=f.WHITESPACE_CELL_CHAR:ve+=Ge,Y++;continue}Y&&(W.textContent=ve),W=this._document.createElement("span"),Y=0,ve=""}else W=this._document.createElement("span");if(he=J.bg,Me=J.fg,me=J.extended.ext,ie=Ee,$=de,_e=bt,st&&F>=tt&&F<=Nt&&(F=tt),!this._coreService.isCursorHidden&&Gt&&this._coreService.isCursorInitialized){if(Ie.push("xterm-cursor"),this._coreBrowserService.isFocused)O&&Ie.push("xterm-cursor-blink"),Ie.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(A)switch(A){case"outline":Ie.push("xterm-cursor-outline");break;case"block":Ie.push("xterm-cursor-block");break;case"bar":Ie.push("xterm-cursor-bar");break;case"underline":Ie.push("xterm-cursor-underline")}}if(J.isBold()&&Ie.push("xterm-bold"),J.isItalic()&&Ie.push("xterm-italic"),J.isDim()&&Ie.push("xterm-dim"),ve=J.isInvisible()?f.WHITESPACE_CELL_CHAR:J.getChars()||f.WHITESPACE_CELL_CHAR,J.isUnderline()&&(Ie.push(`xterm-underline-${J.extended.underlineStyle}`),ve===" "&&(ve=" "),!J.isUnderlineColorDefault()))if(J.isUnderlineColorRGB())W.style.textDecorationColor=`rgb(${p.AttributeData.toColorRGB(J.getUnderlineColor()).join(",")})`;else{let He=J.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&J.isBold()&&He<8&&(He+=8),W.style.textDecorationColor=B.ansi[He].css}J.isOverline()&&(Ie.push("xterm-overline"),ve===" "&&(ve=" ")),J.isStrikethrough()&&Ie.push("xterm-strikethrough"),Ee&&(W.style.textDecoration="underline");let re=J.getFgColor(),We=J.getFgColorMode(),Ye=J.getBgColor(),ge=J.getBgColorMode();const Ze=!!J.isInverse();if(Ze){const He=re;re=Ye,Ye=He;const wt=We;We=ge,ge=wt}let je,Pe,be,Ae=!1;switch(this._decorationService.forEachDecorationAtCell(tt,M,void 0,He=>{He.options.layer!=="top"&&Ae||(He.backgroundColorRGB&&(ge=50331648,Ye=He.backgroundColorRGB.rgba>>8&16777215,je=He.backgroundColorRGB),He.foregroundColorRGB&&(We=50331648,re=He.foregroundColorRGB.rgba>>8&16777215,Pe=He.foregroundColorRGB),Ae=He.options.layer==="top")}),!Ae&&bt&&(je=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,Ye=je.rgba>>8&16777215,ge=50331648,Ae=!0,B.selectionForeground&&(We=50331648,re=B.selectionForeground.rgba>>8&16777215,Pe=B.selectionForeground)),Ae&&Ie.push("xterm-decoration-top"),ge){case 16777216:case 33554432:be=B.ansi[Ye],Ie.push(`xterm-bg-${Ye}`);break;case 50331648:be=y.channels.toColor(Ye>>16,Ye>>8&255,255&Ye),this._addStyle(W,`background-color:#${k((Ye>>>0).toString(16),"0",6)}`);break;default:Ze?(be=B.foreground,Ie.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):be=B.background}switch(je||J.isDim()&&(je=y.color.multiplyOpacity(be,.5)),We){case 16777216:case 33554432:J.isBold()&&re<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(re+=8),this._applyMinimumContrast(W,be,B.ansi[re],J,je,void 0)||Ie.push(`xterm-fg-${re}`);break;case 50331648:const He=y.channels.toColor(re>>16&255,re>>8&255,255&re);this._applyMinimumContrast(W,be,He,J,je,Pe)||this._addStyle(W,`color:#${k(re.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(W,be,B.foreground,J,je,Pe)||Ze&&Ie.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}Ie.length&&(W.className=Ie.join(" "),Ie.length=0),Gt||st||Te?W.textContent=ve:Y++,de!==this.defaultSpacing&&(W.style.letterSpacing=`${de}px`),te.push(W),tt=Nt}return W&&Y&&(W.textContent=ve),te}_applyMinimumContrast(j,M,D,L,A,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,m.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const O=this._getContrastCache(L);let I;if(A||F||(I=O.getColor(M.rgba,D.rgba)),I===void 0){const G=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);I=y.color.ensureContrastRatio(A||M,F||D,G),O.setColor((A||M).rgba,(F||D).rgba,I??null)}return!!I&&(this._addStyle(j,`color:${I.css}`),!0)}_getContrastCache(j){return j.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(j,M){j.setAttribute("style",`${j.getAttribute("style")||""}${M};`)}_isCellInSelection(j,M){const D=this._selectionStart,L=this._selectionEnd;return!(!D||!L)&&(this._columnSelectMode?D[0]<=L[0]?j>=D[0]&&M>=D[1]&&j<L[0]&&M<=L[1]:j<D[0]&&M>=D[1]&&j>=L[0]&&M<=L[1]:M>D[1]&&M<L[1]||D[1]===L[1]&&M===D[1]&&j>=D[0]&&j<L[0]||D[1]<L[1]&&M===L[1]&&j<L[0]||D[1]<L[1]&&M===D[1]&&j>=D[0])}};function k(j,M,D){for(;j.length<D;)j=M+j;return j}a.DomRendererRowFactory=N=g([x(1,l.ICharacterJoinerService),x(2,C.IOptionsService),x(3,l.ICoreBrowserService),x(4,C.ICoreService),x(5,C.IDecorationService),x(6,l.IThemeService)],N)},2550:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,g){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const x=u.createElement("span");x.classList.add("xterm-char-measure-element");const h=u.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const f=u.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontStyle="italic";const S=u.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[x,h,f,S],this._container.appendChild(x),this._container.appendChild(h),this._container.appendChild(f),this._container.appendChild(S),g.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,g,x,h){u===this._font&&g===this._fontSize&&x===this._weight&&h===this._weightBold||(this._font=u,this._fontSize=g,this._weight=x,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${x}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${x}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(u,g,x){let h=0;if(!g&&!x&&u.length===1&&(h=u.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const C=this._measure(u,0);return C>0&&(this._flat[h]=C),C}let f=u;g&&(f+="B"),x&&(f+="I");let S=this._holey.get(f);if(S===void 0){let C=0;g&&(C|=1),x&&(C|=2),S=this._measure(u,C),S>0&&this._holey.set(f,S)}return S}_measure(u,g){const x=this._measureElements[g];return x.textContent=u.repeat(32),x.offsetWidth/32}}},2223:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const g=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},6171:(b,a)=>{function u(x){return 57508<=x&&x<=57558}function g(x){return x>=128512&&x<=128591||x>=127744&&x<=128511||x>=128640&&x<=128767||x>=9728&&x<=9983||x>=9984&&x<=10175||x>=65024&&x<=65039||x>=129280&&x<=129535||x>=127462&&x<=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(x){if(!x)throw new Error("value must not be falsy");return x},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(x){return 57520<=x&&x<=57527},a.isEmoji=g,a.allowRescaling=function(x,h,f,S){return h===1&&f>Math.ceil(1.5*S)&&x!==void 0&&x>255&&!g(x)&&!u(x)&&!function(C){return 57344<=C&&C<=63743}(x)},a.treatGlyphAsBackgroundColor=function(x){return u(x)||function(h){return 9472<=h&&h<=9631}(x)},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(x,h,f=0){return(x-(2*Math.round(h)-f))%(2*Math.round(h))}},6052:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(x,h,f,S=!1){if(this.selectionStart=h,this.selectionEnd=f,!h||!f||h[0]===f[0]&&h[1]===f[1])return void this.clear();const C=x.buffers.active.ydisp,y=h[1]-C,l=f[1]-C,v=Math.max(y,0),m=Math.min(l,x.rows-1);v>=x.rows||m<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=y,this.viewportEndRow=l,this.viewportCappedStartRow=v,this.viewportCappedEndRow=m,this.startCol=h[0],this.endCol=f[0])}isCellSelected(x,h,f){return!!this.hasSelection&&(f-=x.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&f>=this.viewportCappedStartRow&&h<this.endCol&&f<=this.viewportCappedEndRow:h<this.startCol&&f>=this.viewportCappedStartRow&&h>=this.endCol&&f<=this.viewportCappedEndRow:f>this.viewportStartRow&&f<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&f===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&f===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&f===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,g=this.selectionEnd;return!(!u||!g)&&(u[1]>g[1]||u[1]===g[1]&&u[0]>g[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(b,a,u){var g=this&&this.__decorate||function(m,p,N,k){var j,M=arguments.length,D=M<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,N):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,p,N,k);else for(var L=m.length-1;L>=0;L--)(j=m[L])&&(D=(M<3?j(D):M>3?j(p,N,D):j(p,N))||D);return M>3&&D&&Object.defineProperty(p,N,D),D},x=this&&this.__param||function(m,p){return function(N,k){p(N,k,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const h=u(2585),f=u(8460),S=u(844);let C=a.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(m,p,N){super(),this._optionsService=N,this.width=0,this.height=0,this._onCharSizeChange=this.register(new f.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new l(m,p,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const m=this._measureStrategy.measure();m.width===this.width&&m.height===this.height||(this.width=m.width,this.height=m.height,this._onCharSizeChange.fire())}};a.CharSizeService=C=g([x(2,h.IOptionsService)],C);class y extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(p,N){p!==void 0&&p>0&&N!==void 0&&N>0&&(this._result.width=p,this._result.height=N)}}class l extends y{constructor(p,N,k){super(),this._document=p,this._parentElement=N,this._optionsService=k,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 v extends y{constructor(p){super(),this._optionsService=p,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const N=this._ctx.measureText("W");if(!("width"in N&&"fontBoundingBoxAscent"in N&&"fontBoundingBoxDescent"in N))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const p=this._ctx.measureText("W");return this._validateAndSet(p.width,p.fontBoundingBoxAscent+p.fontBoundingBoxDescent),this._result}}},4269:function(b,a,u){var g=this&&this.__decorate||function(v,m,p,N){var k,j=arguments.length,M=j<3?m:N===null?N=Object.getOwnPropertyDescriptor(m,p):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(v,m,p,N);else for(var D=v.length-1;D>=0;D--)(k=v[D])&&(M=(j<3?k(M):j>3?k(m,p,M):k(m,p))||M);return j>3&&M&&Object.defineProperty(m,p,M),M},x=this&&this.__param||function(v,m){return function(p,N){m(p,N,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const h=u(3734),f=u(643),S=u(511),C=u(2585);class y extends h.AttributeData{constructor(m,p,N){super(),this.content=0,this.combinedData="",this.fg=m.fg,this.bg=m.bg,this.combinedData=p,this._width=N}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(m){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=y;let l=a.CharacterJoinerService=class bS{constructor(m){this._bufferService=m,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(m){const p={id:this._nextCharacterJoinerId++,handler:m};return this._characterJoiners.push(p),p.id}deregister(m){for(let p=0;p<this._characterJoiners.length;p++)if(this._characterJoiners[p].id===m)return this._characterJoiners.splice(p,1),!0;return!1}getJoinedCharacters(m){if(this._characterJoiners.length===0)return[];const p=this._bufferService.buffer.lines.get(m);if(!p||p.length===0)return[];const N=[],k=p.translateToString(!0);let j=0,M=0,D=0,L=p.getFg(0),A=p.getBg(0);for(let F=0;F<p.getTrimmedLength();F++)if(p.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==A){if(F-j>1){const O=this._getJoinedRanges(k,D,M,p,j);for(let I=0;I<O.length;I++)N.push(O[I])}j=F,D=M,L=this._workCell.fg,A=this._workCell.bg}M+=this._workCell.getChars().length||f.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-j>1){const F=this._getJoinedRanges(k,D,M,p,j);for(let O=0;O<F.length;O++)N.push(F[O])}return N}_getJoinedRanges(m,p,N,k,j){const M=m.substring(p,N);let D=[];try{D=this._characterJoiners[0].handler(M)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const A=this._characterJoiners[L].handler(M);for(let F=0;F<A.length;F++)bS._mergeRanges(D,A[F])}catch(A){console.error(A)}return this._stringRangesToCellRanges(D,k,j),D}_stringRangesToCellRanges(m,p,N){let k=0,j=!1,M=0,D=m[k];if(D){for(let L=N;L<this._bufferService.cols;L++){const A=p.getWidth(L),F=p.getString(L).length||f.WHITESPACE_CELL_CHAR.length;if(A!==0){if(!j&&D[0]<=M&&(D[0]=L,j=!0),D[1]<=M){if(D[1]=L,D=m[++k],!D)break;D[0]<=M?(D[0]=L,j=!0):j=!1}M+=F}}D&&(D[1]=this._bufferService.cols)}}static _mergeRanges(m,p){let N=!1;for(let k=0;k<m.length;k++){const j=m[k];if(N){if(p[1]<=j[0])return m[k-1][1]=p[1],m;if(p[1]<=j[1])return m[k-1][1]=Math.max(p[1],j[1]),m.splice(k,1),m;m.splice(k,1),k--}else{if(p[1]<=j[0])return m.splice(k,0,p),m;if(p[1]<=j[1])return j[0]=Math.min(p[0],j[0]),m;p[0]<j[1]&&(j[0]=Math.min(p[0],j[0]),N=!0)}}return N?m[m.length-1][1]=p[1]:m.push(p),m}};a.CharacterJoinerService=l=g([x(0,C.IBufferService)],l)},5114:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const g=u(844),x=u(8460),h=u(3656);class f extends g.Disposable{constructor(y,l,v){super(),this._textarea=y,this._window=l,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new x.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new x.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(m=>this._screenDprMonitor.setWindow(m))),this.register((0,x.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=f;class S extends g.Disposable{constructor(y){super(),this._parentWindow=y,this._windowResizeListener=this.register(new g.MutableDisposable),this._onDprChange=this.register(new x.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,g.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,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const g=u(844);class x extends g.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,g.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(f){return this.linkProviders.push(f),{dispose:()=>{const S=this.linkProviders.indexOf(f);S!==-1&&this.linkProviders.splice(S,1)}}}}a.LinkProviderService=x},8934:function(b,a,u){var g=this&&this.__decorate||function(C,y,l,v){var m,p=arguments.length,N=p<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(C,y,l,v);else for(var k=C.length-1;k>=0;k--)(m=C[k])&&(N=(p<3?m(N):p>3?m(y,l,N):m(y,l))||N);return p>3&&N&&Object.defineProperty(y,l,N),N},x=this&&this.__param||function(C,y){return function(l,v){y(l,v,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const h=u(4725),f=u(9806);let S=a.MouseService=class{constructor(C,y){this._renderService=C,this._charSizeService=y}getCoords(C,y,l,v,m){return(0,f.getCoords)(window,C,y,l,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,m)}getMouseReportCoords(C,y){const l=(0,f.getCoordsRelativeToElement)(window,C,y);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};a.MouseService=S=g([x(0,h.IRenderService),x(1,h.ICharSizeService)],S)},3230:function(b,a,u){var g=this&&this.__decorate||function(m,p,N,k){var j,M=arguments.length,D=M<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,N):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,p,N,k);else for(var L=m.length-1;L>=0;L--)(j=m[L])&&(D=(M<3?j(D):M>3?j(p,N,D):j(p,N))||D);return M>3&&D&&Object.defineProperty(p,N,D),D},x=this&&this.__param||function(m,p){return function(N,k){p(N,k,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const h=u(6193),f=u(4725),S=u(8460),C=u(844),y=u(7226),l=u(2585);let v=a.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(m,p,N,k,j,M,D,L){super(),this._rowCount=m,this._charSizeService=k,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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer((A,F)=>this._renderRows(A,F),D),this.register(this._renderDebouncer),this.register(D.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(M.onResize(()=>this._fullRefresh())),this.register(M.buffers.onBufferActivate(()=>{var A;return(A=this._renderer.value)==null?void 0:A.clear()})),this.register(N.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(j.onDecorationRegistered(()=>this._fullRefresh())),this.register(j.onDecorationRemoved(()=>this._fullRefresh())),this.register(N.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(M.cols,M.rows),this._fullRefresh()})),this.register(N.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(M.buffer.y,M.buffer.y,!0))),this.register(L.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(D.window,p),this.register(D.onWindowChange(A=>this._registerIntersectionObserver(A,p)))}_registerIntersectionObserver(m,p){if("IntersectionObserver"in m){const N=new m.IntersectionObserver(k=>this._handleIntersectionChange(k[k.length-1]),{threshold:0});N.observe(p),this._observerDisposable.value=(0,C.toDisposable)(()=>N.disconnect())}}_handleIntersectionChange(m){this._isPaused=m.isIntersecting===void 0?m.intersectionRatio===0:!m.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(m,p,N=!1){this._isPaused?this._needsFullRefresh=!0:(N||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(m,p,this._rowCount))}_renderRows(m,p){this._renderer.value&&(m=Math.min(m,this._rowCount-1),p=Math.min(p,this._rowCount-1),this._renderer.value.renderRows(m,p),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:m,end:p}),this._onRender.fire({start:m,end:p}),this._isNextRenderRedrawOnly=!0)}resize(m,p){this._rowCount=p,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(m){this._renderer.value=m,this._renderer.value&&(this._renderer.value.onRequestRedraw(p=>this.refreshRows(p.start,p.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(m){return this._renderDebouncer.addRefreshCallback(m)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var m,p;this._renderer.value&&((p=(m=this._renderer.value).clearTextureAtlas)==null||p.call(m),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(m,p){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var N;return(N=this._renderer.value)==null?void 0:N.handleResize(m,p)}):this._renderer.value.handleResize(m,p),this._fullRefresh())}handleCharSizeChanged(){var m;(m=this._renderer.value)==null||m.handleCharSizeChanged()}handleBlur(){var m;(m=this._renderer.value)==null||m.handleBlur()}handleFocus(){var m;(m=this._renderer.value)==null||m.handleFocus()}handleSelectionChanged(m,p,N){var k;this._selectionState.start=m,this._selectionState.end=p,this._selectionState.columnSelectMode=N,(k=this._renderer.value)==null||k.handleSelectionChanged(m,p,N)}handleCursorMove(){var m;(m=this._renderer.value)==null||m.handleCursorMove()}clear(){var m;(m=this._renderer.value)==null||m.clear()}};a.RenderService=v=g([x(2,l.IOptionsService),x(3,f.ICharSizeService),x(4,l.IDecorationService),x(5,l.IBufferService),x(6,f.ICoreBrowserService),x(7,f.IThemeService)],v)},9312:function(b,a,u){var g=this&&this.__decorate||function(D,L,A,F){var O,I=arguments.length,G=I<3?L:F===null?F=Object.getOwnPropertyDescriptor(L,A):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(D,L,A,F);else for(var ne=D.length-1;ne>=0;ne--)(O=D[ne])&&(G=(I<3?O(G):I>3?O(L,A,G):O(L,A))||G);return I>3&&G&&Object.defineProperty(L,A,G),G},x=this&&this.__param||function(D,L){return function(A,F){L(A,F,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=u(9806),f=u(9504),S=u(456),C=u(4725),y=u(8460),l=u(844),v=u(6114),m=u(4841),p=u(511),N=u(2585),k=" ",j=new RegExp(k,"g");let M=a.SelectionService=class extends l.Disposable{constructor(D,L,A,F,O,I,G,ne,ee){super(),this._element=D,this._screenElement=L,this._linkifier=A,this._bufferService=F,this._coreService=O,this._mouseService=I,this._optionsService=G,this._renderService=ne,this._coreBrowserService=ee,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new p.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=te=>this._handleMouseMove(te),this._mouseUpListener=te=>this._handleMouseUp(te),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(te=>this._handleTrim(te)),this.register(this._bufferService.buffers.onBufferActivate(te=>this._handleBufferActivate(te))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.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 D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!D||!L||D[0]===L[0]&&D[1]===L[1])}get selectionText(){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!D||!L)return"";const A=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(D[0]===L[0])return"";const O=D[0]<L[0]?D[0]:L[0],I=D[0]<L[0]?L[0]:D[0];for(let G=D[1];G<=L[1];G++){const ne=A.translateBufferLineToString(G,!0,O,I);F.push(ne)}}else{const O=D[1]===L[1]?L[0]:void 0;F.push(A.translateBufferLineToString(D[1],!0,D[0],O));for(let I=D[1]+1;I<=L[1]-1;I++){const G=A.lines.get(I),ne=A.translateBufferLineToString(I,!0);G!=null&&G.isWrapped?F[F.length-1]+=ne:F.push(ne)}if(D[1]!==L[1]){const I=A.lines.get(L[1]),G=A.translateBufferLineToString(L[1],!0,0,L[0]);I&&I.isWrapped?F[F.length-1]+=G:F.push(G)}}return F.map(O=>O.replace(j," ")).join(v.isWindows?`\r
211
+ `:`
212
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(D){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),v.isLinux&&D&&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(D){const L=this._getMouseBufferCoords(D),A=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(A&&F&&L)&&this._areCoordsInSelection(L,A,F)}isCellInSelection(D,L){const A=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!A||!F)&&this._areCoordsInSelection([D,L],A,F)}_areCoordsInSelection(D,L,A){return D[1]>L[1]&&D[1]<A[1]||L[1]===A[1]&&D[1]===L[1]&&D[0]>=L[0]&&D[0]<A[0]||L[1]<A[1]&&D[1]===A[1]&&D[0]<A[0]||L[1]<A[1]&&D[1]===L[1]&&D[0]>=L[0]}_selectWordAtCursor(D,L){var O,I;const A=(I=(O=this._linkifier.currentLink)==null?void 0:O.link)==null?void 0:I.range;if(A)return this._model.selectionStart=[A.start.x-1,A.start.y-1],this._model.selectionStartLength=(0,m.getRangeLength)(A,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(D);return!!F&&(this._selectWordAt(F,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(D,L){this._model.clearSelection(),D=Math.max(D,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,D],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(D){this._model.handleTrim(D)&&this.refresh()}_getMouseBufferCoords(D){const L=this._mouseService.getCoords(D,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(D){let L=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,D,this._screenElement)[1];const A=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=A?0:(L>A&&(L-=A),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(D){return v.isMac?D.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:D.shiftKey}handleMouseDown(D){if(this._mouseDownTimeStamp=D.timeStamp,(D.button!==2||!this.hasSelection)&&D.button===0){if(!this._enabled){if(!this.shouldForceSelection(D))return;D.stopPropagation()}D.preventDefault(),this._dragScrollAmount=0,this._enabled&&D.shiftKey?this._handleIncrementalClick(D):D.detail===1?this._handleSingleClick(D):D.detail===2?this._handleDoubleClick(D):D.detail===3&&this._handleTripleClick(D),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(D){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(D))}_handleSingleClick(D){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(D)?3:0,this._model.selectionStart=this._getMouseBufferCoords(D),!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(D){this._selectWordAtCursor(D,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(D){const L=this._getMouseBufferCoords(D);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(D){return D.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(D){if(D.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(D),!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(D),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const A=this._bufferService.buffer;if(this._model.selectionEnd[1]<A.lines.length){const F=A.lines.get(this._model.selectionEnd[1]);F&&F.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 D=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(D.ydisp+this._bufferService.rows,D.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=D.ydisp),this.refresh()}}_handleMouseUp(D){const L=D.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&D.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const A=this._mouseService.getCoords(D,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(A&&A[0]!==void 0&&A[1]!==void 0){const F=(0,f.moveToCellSequence)(A[0]-1,A[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,A=!(!D||!L||D[0]===L[0]&&D[1]===L[1]);A?D&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&D[0]===this._oldSelectionStart[0]&&D[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(D,L,A)):this._oldHasSelection&&this._fireOnSelectionChange(D,L,A)}_fireOnSelectionChange(D,L,A){this._oldSelectionStart=D,this._oldSelectionEnd=L,this._oldHasSelection=A,this._onSelectionChange.fire()}_handleBufferActivate(D){this.clearSelection(),this._trimListener.dispose(),this._trimListener=D.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(D,L){let A=L;for(let F=0;L>=F;F++){const O=D.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?A--:O>1&&L!==F&&(A+=O-1)}return A}setSelection(D,L,A){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[D,L],this._model.selectionStartLength=A,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(D){this._isClickInSelection(D)||(this._selectWordAtCursor(D,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(D,L,A=!0,F=!0){if(D[0]>=this._bufferService.cols)return;const O=this._bufferService.buffer,I=O.lines.get(D[1]);if(!I)return;const G=O.translateBufferLineToString(D[1],!1);let ne=this._convertViewportColToCharacterIndex(I,D[0]),ee=ne;const te=D[0]-ne;let se=0,B=0,W=0,X=0;if(G.charAt(ne)===" "){for(;ne>0&&G.charAt(ne-1)===" ";)ne--;for(;ee<G.length&&G.charAt(ee+1)===" ";)ee++}else{let he=D[0],Me=D[0];I.getWidth(he)===0&&(se++,he--),I.getWidth(Me)===2&&(B++,Me++);const me=I.getString(Me).length;for(me>1&&(X+=me-1,ee+=me-1);he>0&&ne>0&&!this._isCharWordSeparator(I.loadCell(he-1,this._workCell));){I.loadCell(he-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(se++,he--):ie>1&&(W+=ie-1,ne-=ie-1),ne--,he--}for(;Me<I.length&&ee+1<G.length&&!this._isCharWordSeparator(I.loadCell(Me+1,this._workCell));){I.loadCell(Me+1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===2?(B++,Me++):ie>1&&(X+=ie-1,ee+=ie-1),ee++,Me++}}ee++;let Y=ne+te-se+W,ve=Math.min(this._bufferService.cols,ee-ne+se+B-W-X);if(L||G.slice(ne,ee).trim()!==""){if(A&&Y===0&&I.getCodePoint(0)!==32){const he=O.lines.get(D[1]-1);if(he&&I.isWrapped&&he.getCodePoint(this._bufferService.cols-1)!==32){const Me=this._getWordAt([this._bufferService.cols-1,D[1]-1],!1,!0,!1);if(Me){const me=this._bufferService.cols-Me.start;Y-=me,ve+=me}}}if(F&&Y+ve===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const he=O.lines.get(D[1]+1);if(he!=null&&he.isWrapped&&he.getCodePoint(0)!==32){const Me=this._getWordAt([0,D[1]+1],!1,!1,!0);Me&&(ve+=Me.length)}}return{start:Y,length:ve}}}_selectWordAt(D,L){const A=this._getWordAt(D,L);if(A){for(;A.start<0;)A.start+=this._bufferService.cols,D[1]--;this._model.selectionStart=[A.start,D[1]],this._model.selectionStartLength=A.length}}_selectToWordAt(D){const L=this._getWordAt(D,!0);if(L){let A=D[1];for(;L.start<0;)L.start+=this._bufferService.cols,A--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,A++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,A]}}_isCharWordSeparator(D){return D.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(D.getChars())>=0}_selectLineAt(D){const L=this._bufferService.buffer.getWrappedRangeForLine(D),A={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,m.getRangeLength)(A,this._bufferService.cols)}};a.SelectionService=M=g([x(3,N.IBufferService),x(4,N.ICoreService),x(5,C.IMouseService),x(6,N.IOptionsService),x(7,C.IRenderService),x(8,C.ICoreBrowserService)],M)},4725:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const g=u(8343);a.ICharSizeService=(0,g.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,g.createDecorator)("CoreBrowserService"),a.IMouseService=(0,g.createDecorator)("MouseService"),a.IRenderService=(0,g.createDecorator)("RenderService"),a.ISelectionService=(0,g.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,g.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,g.createDecorator)("ThemeService"),a.ILinkProviderService=(0,g.createDecorator)("LinkProviderService")},6731:function(b,a,u){var g=this&&this.__decorate||function(M,D,L,A){var F,O=arguments.length,I=O<3?D:A===null?A=Object.getOwnPropertyDescriptor(D,L):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(M,D,L,A);else for(var G=M.length-1;G>=0;G--)(F=M[G])&&(I=(O<3?F(I):O>3?F(D,L,I):F(D,L))||I);return O>3&&I&&Object.defineProperty(D,L,I),I},x=this&&this.__param||function(M,D){return function(L,A){D(L,A,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const h=u(7239),f=u(8055),S=u(8460),C=u(844),y=u(2585),l=f.css.toColor("#ffffff"),v=f.css.toColor("#000000"),m=f.css.toColor("#ffffff"),p=f.css.toColor("#000000"),N={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const M=[f.css.toColor("#2e3436"),f.css.toColor("#cc0000"),f.css.toColor("#4e9a06"),f.css.toColor("#c4a000"),f.css.toColor("#3465a4"),f.css.toColor("#75507b"),f.css.toColor("#06989a"),f.css.toColor("#d3d7cf"),f.css.toColor("#555753"),f.css.toColor("#ef2929"),f.css.toColor("#8ae234"),f.css.toColor("#fce94f"),f.css.toColor("#729fcf"),f.css.toColor("#ad7fa8"),f.css.toColor("#34e2e2"),f.css.toColor("#eeeeec")],D=[0,95,135,175,215,255];for(let L=0;L<216;L++){const A=D[L/36%6|0],F=D[L/6%6|0],O=D[L%6];M.push({css:f.channels.toCss(A,F,O),rgba:f.channels.toRgba(A,F,O)})}for(let L=0;L<24;L++){const A=8+10*L;M.push({css:f.channels.toCss(A,A,A),rgba:f.channels.toRgba(A,A,A)})}return M})());let k=a.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(M){super(),this._optionsService=M,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:v,cursor:m,cursorAccent:p,selectionForeground:void 0,selectionBackgroundTransparent:N,selectionBackgroundOpaque:f.color.blend(v,N),selectionInactiveBackgroundTransparent:N,selectionInactiveBackgroundOpaque:f.color.blend(v,N),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(M={}){const D=this._colors;if(D.foreground=j(M.foreground,l),D.background=j(M.background,v),D.cursor=j(M.cursor,m),D.cursorAccent=j(M.cursorAccent,p),D.selectionBackgroundTransparent=j(M.selectionBackground,N),D.selectionBackgroundOpaque=f.color.blend(D.background,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundTransparent=j(M.selectionInactiveBackground,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundOpaque=f.color.blend(D.background,D.selectionInactiveBackgroundTransparent),D.selectionForeground=M.selectionForeground?j(M.selectionForeground,f.NULL_COLOR):void 0,D.selectionForeground===f.NULL_COLOR&&(D.selectionForeground=void 0),f.color.isOpaque(D.selectionBackgroundTransparent)&&(D.selectionBackgroundTransparent=f.color.opacity(D.selectionBackgroundTransparent,.3)),f.color.isOpaque(D.selectionInactiveBackgroundTransparent)&&(D.selectionInactiveBackgroundTransparent=f.color.opacity(D.selectionInactiveBackgroundTransparent,.3)),D.ansi=a.DEFAULT_ANSI_COLORS.slice(),D.ansi[0]=j(M.black,a.DEFAULT_ANSI_COLORS[0]),D.ansi[1]=j(M.red,a.DEFAULT_ANSI_COLORS[1]),D.ansi[2]=j(M.green,a.DEFAULT_ANSI_COLORS[2]),D.ansi[3]=j(M.yellow,a.DEFAULT_ANSI_COLORS[3]),D.ansi[4]=j(M.blue,a.DEFAULT_ANSI_COLORS[4]),D.ansi[5]=j(M.magenta,a.DEFAULT_ANSI_COLORS[5]),D.ansi[6]=j(M.cyan,a.DEFAULT_ANSI_COLORS[6]),D.ansi[7]=j(M.white,a.DEFAULT_ANSI_COLORS[7]),D.ansi[8]=j(M.brightBlack,a.DEFAULT_ANSI_COLORS[8]),D.ansi[9]=j(M.brightRed,a.DEFAULT_ANSI_COLORS[9]),D.ansi[10]=j(M.brightGreen,a.DEFAULT_ANSI_COLORS[10]),D.ansi[11]=j(M.brightYellow,a.DEFAULT_ANSI_COLORS[11]),D.ansi[12]=j(M.brightBlue,a.DEFAULT_ANSI_COLORS[12]),D.ansi[13]=j(M.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),D.ansi[14]=j(M.brightCyan,a.DEFAULT_ANSI_COLORS[14]),D.ansi[15]=j(M.brightWhite,a.DEFAULT_ANSI_COLORS[15]),M.extendedAnsi){const L=Math.min(D.ansi.length-16,M.extendedAnsi.length);for(let A=0;A<L;A++)D.ansi[A+16]=j(M.extendedAnsi[A],a.DEFAULT_ANSI_COLORS[A+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(M){this._restoreColor(M),this._onChangeColors.fire(this.colors)}_restoreColor(M){if(M!==void 0)switch(M){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[M]=this._restoreColors.ansi[M]}else for(let D=0;D<this._restoreColors.ansi.length;++D)this._colors.ansi[D]=this._restoreColors.ansi[D]}modifyColors(M){M(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function j(M,D){if(M!==void 0)try{return f.css.toColor(M)}catch{}return D}a.ThemeService=k=g([x(0,y.IOptionsService)],k)},6349:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const g=u(8460),x=u(844);class h extends x.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new g.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new g.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new g.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(S){if(this._maxLength===S)return;const C=new Array(S);for(let y=0;y<Math.min(S,this.length);y++)C[y]=this._array[this._getCyclicIndex(y)];this._array=C,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let C=this._length;C<S;C++)this._array[C]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,C){this._array[this._getCyclicIndex(S)]=C}push(S){this._array[this._getCyclicIndex(this._length)]=S,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(S,C,...y){if(C){for(let l=S;l<this._length-C;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+C)];this._length-=C,this.onDeleteEmitter.fire({index:S,amount:C})}for(let l=this._length-1;l>=S;l--)this._array[this._getCyclicIndex(l+y.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<y.length;l++)this._array[this._getCyclicIndex(S+l)]=y[l];if(y.length&&this.onInsertEmitter.fire({index:S,amount:y.length}),this._length+y.length>this._maxLength){const l=this._length+y.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=y.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,C,y){if(!(C<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+y<0)throw new Error("Cannot shift elements in list beyond index 0");if(y>0){for(let v=C-1;v>=0;v--)this.set(S+v+y,this.get(S+v));const l=S+C+y-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<C;l++)this.set(S+l+y,this.get(S+l))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}a.CircularList=h},1439:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(g,x=5){if(typeof g!="object")return g;const h=Array.isArray(g)?[]:{};for(const f in g)h[f]=x<=1?g[f]:g[f]&&u(g[f],x-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 u=0,g=0,x=0,h=0;var f,S,C,y,l;function v(p){const N=p.toString(16);return N.length<2?"0"+N:N}function m(p,N){return p<N?(N+.05)/(p+.05):(p+.05)/(N+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(p){p.toCss=function(N,k,j,M){return M!==void 0?`#${v(N)}${v(k)}${v(j)}${v(M)}`:`#${v(N)}${v(k)}${v(j)}`},p.toRgba=function(N,k,j,M=255){return(N<<24|k<<16|j<<8|M)>>>0},p.toColor=function(N,k,j,M){return{css:p.toCss(N,k,j,M),rgba:p.toRgba(N,k,j,M)}}}(f||(a.channels=f={})),function(p){function N(k,j){return h=Math.round(255*j),[u,g,x]=l.toChannels(k.rgba),{css:f.toCss(u,g,x,h),rgba:f.toRgba(u,g,x,h)}}p.blend=function(k,j){if(h=(255&j.rgba)/255,h===1)return{css:j.css,rgba:j.rgba};const M=j.rgba>>24&255,D=j.rgba>>16&255,L=j.rgba>>8&255,A=k.rgba>>24&255,F=k.rgba>>16&255,O=k.rgba>>8&255;return u=A+Math.round((M-A)*h),g=F+Math.round((D-F)*h),x=O+Math.round((L-O)*h),{css:f.toCss(u,g,x),rgba:f.toRgba(u,g,x)}},p.isOpaque=function(k){return(255&k.rgba)==255},p.ensureContrastRatio=function(k,j,M){const D=l.ensureContrastRatio(k.rgba,j.rgba,M);if(D)return f.toColor(D>>24&255,D>>16&255,D>>8&255)},p.opaque=function(k){const j=(255|k.rgba)>>>0;return[u,g,x]=l.toChannels(j),{css:f.toCss(u,g,x),rgba:j}},p.opacity=N,p.multiplyOpacity=function(k,j){return h=255&k.rgba,N(k,h*j/255)},p.toColorRGB=function(k){return[k.rgba>>24&255,k.rgba>>16&255,k.rgba>>8&255]}}(S||(a.color=S={})),function(p){let N,k;try{const j=document.createElement("canvas");j.width=1,j.height=1;const M=j.getContext("2d",{willReadFrequently:!0});M&&(N=M,N.globalCompositeOperation="copy",k=N.createLinearGradient(0,0,1,1))}catch{}p.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return u=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),f.toColor(u,g,x);case 5:return u=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),h=parseInt(j.slice(4,5).repeat(2),16),f.toColor(u,g,x,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 M=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(M)return u=parseInt(M[1]),g=parseInt(M[2]),x=parseInt(M[3]),h=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),f.toColor(u,g,x,h);if(!N||!k)throw new Error("css.toColor: Unsupported css format");if(N.fillStyle=k,N.fillStyle=j,typeof N.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(N.fillRect(0,0,1,1),[u,g,x,h]=N.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:f.toRgba(u,g,x,h),css:j}}}(C||(a.css=C={})),function(p){function N(k,j,M){const D=k/255,L=j/255,A=M/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))}p.relativeLuminance=function(k){return N(k>>16&255,k>>8&255,255&k)},p.relativeLuminance2=N}(y||(a.rgb=y={})),function(p){function N(j,M,D){const L=j>>24&255,A=j>>16&255,F=j>>8&255;let O=M>>24&255,I=M>>16&255,G=M>>8&255,ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));for(;ne<D&&(O>0||I>0||G>0);)O-=Math.max(0,Math.ceil(.1*O)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));return(O<<24|I<<16|G<<8|255)>>>0}function k(j,M,D){const L=j>>24&255,A=j>>16&255,F=j>>8&255;let O=M>>24&255,I=M>>16&255,G=M>>8&255,ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));for(;ne<D&&(O<255||I<255||G<255);)O=Math.min(255,O+Math.ceil(.1*(255-O))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));return(O<<24|I<<16|G<<8|255)>>>0}p.blend=function(j,M){if(h=(255&M)/255,h===1)return M;const D=M>>24&255,L=M>>16&255,A=M>>8&255,F=j>>24&255,O=j>>16&255,I=j>>8&255;return u=F+Math.round((D-F)*h),g=O+Math.round((L-O)*h),x=I+Math.round((A-I)*h),f.toRgba(u,g,x)},p.ensureContrastRatio=function(j,M,D){const L=y.relativeLuminance(j>>8),A=y.relativeLuminance(M>>8);if(m(L,A)<D){if(A<L){const I=N(j,M,D),G=m(L,y.relativeLuminance(I>>8));if(G<D){const ne=k(j,M,D);return G>m(L,y.relativeLuminance(ne>>8))?I:ne}return I}const F=k(j,M,D),O=m(L,y.relativeLuminance(F>>8));if(O<D){const I=N(j,M,D);return O>m(L,y.relativeLuminance(I>>8))?F:I}return F}},p.reduceLuminance=N,p.increaseLuminance=k,p.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}}(l||(a.rgba=l={})),a.toPaddedHex=v,a.contrastRatio=m},8969:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const g=u(844),x=u(2585),h=u(4348),f=u(7866),S=u(744),C=u(7302),y=u(6975),l=u(8460),v=u(1753),m=u(1480),p=u(7994),N=u(9282),k=u(5435),j=u(5981),M=u(2660);let D=!1;class L extends g.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event(F=>{var O;(O=this._onScrollApi)==null||O.fire(F.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(F){for(const O in F)this.optionsService.options[O]=F[O]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new g.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new C.OptionsService(F)),this._instantiationService.setService(x.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(x.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(f.LogService)),this._instantiationService.setService(x.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(y.CoreService)),this._instantiationService.setService(x.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(x.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(m.UnicodeService)),this._instantiationService.setService(x.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(p.CharsetService),this._instantiationService.setService(x.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(M.OscLinkService),this._instantiationService.setService(x.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new k.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.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(O=>{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(O=>{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((O,I)=>this._inputHandler.parse(O,I))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,O){this._writeBuffer.write(F,O)}writeSync(F,O){this._logService.logLevel<=x.LogLevelEnum.WARN&&!D&&(this._logService.warn("writeSync is unreliable and will be removed soon."),D=!0),this._writeBuffer.writeSync(F,O)}input(F,O=!0){this.coreService.triggerDataEvent(F,O)}resize(F,O){isNaN(F)||isNaN(O)||(F=Math.max(F,S.MINIMUM_COLS),O=Math.max(O,S.MINIMUM_ROWS),this._bufferService.resize(F,O))}scroll(F,O=!1){this._bufferService.scroll(F,O)}scrollLines(F,O,I){this._bufferService.scrollLines(F,O,I)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const O=F-this._bufferService.buffer.ydisp;O!==0&&this.scrollLines(O)}registerEscHandler(F,O){return this._inputHandler.registerEscHandler(F,O)}registerDcsHandler(F,O){return this._inputHandler.registerDcsHandler(F,O)}registerCsiHandler(F,O){return this._inputHandler.registerCsiHandler(F,O)}registerOscHandler(F,O){return this._inputHandler.registerOscHandler(F,O)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const O=this.optionsService.rawOptions.windowsPty;O&&O.buildNumber!==void 0&&O.buildNumber!==void 0?F=O.backend==="conpty"&&O.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(N.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},()=>((0,N.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,g.toDisposable)(()=>{for(const O of F)O.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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===u)return void this._listeners.splice(g,1)}}})),this._event}fire(u,g){const x=[];for(let h=0;h<this._listeners.length;h++)x.push(this._listeners[h]);for(let h=0;h<x.length;h++)x[h].call(void 0,u,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,g){return u(x=>g.fire(x))},a.runAndSubscribe=function(u,g){return g(void 0),u(x=>g(x))}},5435:function(b,a,u){var g=this&&this.__decorate||function(se,B,W,X){var Y,ve=arguments.length,he=ve<3?B:X===null?X=Object.getOwnPropertyDescriptor(B,W):X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(se,B,W,X);else for(var Me=se.length-1;Me>=0;Me--)(Y=se[Me])&&(he=(ve<3?Y(he):ve>3?Y(B,W,he):Y(B,W))||he);return ve>3&&he&&Object.defineProperty(B,W,he),he},x=this&&this.__param||function(se,B){return function(W,X){B(W,X,se)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const h=u(2584),f=u(7116),S=u(2015),C=u(844),y=u(482),l=u(8437),v=u(8460),m=u(643),p=u(511),N=u(3734),k=u(2585),j=u(1480),M=u(6242),D=u(6351),L=u(5941),A={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function O(se,B){if(se>24)return B.setWinLines||!1;switch(se){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var I;(function(se){se[se.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",se[se.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(a.WindowsOptionsReportType=I={}));let G=0;class ne extends C.Disposable{getAttrData(){return this._curAttrData}constructor(B,W,X,Y,ve,he,Me,me,ie=new S.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=W,this._coreService=X,this._logService=Y,this._optionsService=ve,this._oscLinkService=he,this._coreMouseService=Me,this._unicodeService=me,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new y.StringToUtf32,this._utf8Decoder=new y.Utf8ToUtf32,this._workCell=new p.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.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 ee(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate($=>this._activeBuffer=$.activeBuffer)),this._parser.setCsiHandlerFallback(($,_e)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString($),params:_e.toArray()})}),this._parser.setEscHandlerFallback($=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString($)})}),this._parser.setExecuteHandlerFallback($=>{this._logService.debug("Unknown EXECUTE code: ",{code:$})}),this._parser.setOscHandlerFallback(($,_e,de)=>{this._logService.debug("Unknown OSC code: ",{identifier:$,action:_e,data:de})}),this._parser.setDcsHandlerFallback(($,_e,de)=>{_e==="HOOK"&&(de=de.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString($),action:_e,payload:de})}),this._parser.setPrintHandler(($,_e,de)=>this.print($,_e,de)),this._parser.registerCsiHandler({final:"@"},$=>this.insertChars($)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},$=>this.scrollLeft($)),this._parser.registerCsiHandler({final:"A"},$=>this.cursorUp($)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},$=>this.scrollRight($)),this._parser.registerCsiHandler({final:"B"},$=>this.cursorDown($)),this._parser.registerCsiHandler({final:"C"},$=>this.cursorForward($)),this._parser.registerCsiHandler({final:"D"},$=>this.cursorBackward($)),this._parser.registerCsiHandler({final:"E"},$=>this.cursorNextLine($)),this._parser.registerCsiHandler({final:"F"},$=>this.cursorPrecedingLine($)),this._parser.registerCsiHandler({final:"G"},$=>this.cursorCharAbsolute($)),this._parser.registerCsiHandler({final:"H"},$=>this.cursorPosition($)),this._parser.registerCsiHandler({final:"I"},$=>this.cursorForwardTab($)),this._parser.registerCsiHandler({final:"J"},$=>this.eraseInDisplay($,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},$=>this.eraseInDisplay($,!0)),this._parser.registerCsiHandler({final:"K"},$=>this.eraseInLine($,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},$=>this.eraseInLine($,!0)),this._parser.registerCsiHandler({final:"L"},$=>this.insertLines($)),this._parser.registerCsiHandler({final:"M"},$=>this.deleteLines($)),this._parser.registerCsiHandler({final:"P"},$=>this.deleteChars($)),this._parser.registerCsiHandler({final:"S"},$=>this.scrollUp($)),this._parser.registerCsiHandler({final:"T"},$=>this.scrollDown($)),this._parser.registerCsiHandler({final:"X"},$=>this.eraseChars($)),this._parser.registerCsiHandler({final:"Z"},$=>this.cursorBackwardTab($)),this._parser.registerCsiHandler({final:"`"},$=>this.charPosAbsolute($)),this._parser.registerCsiHandler({final:"a"},$=>this.hPositionRelative($)),this._parser.registerCsiHandler({final:"b"},$=>this.repeatPrecedingCharacter($)),this._parser.registerCsiHandler({final:"c"},$=>this.sendDeviceAttributesPrimary($)),this._parser.registerCsiHandler({prefix:">",final:"c"},$=>this.sendDeviceAttributesSecondary($)),this._parser.registerCsiHandler({final:"d"},$=>this.linePosAbsolute($)),this._parser.registerCsiHandler({final:"e"},$=>this.vPositionRelative($)),this._parser.registerCsiHandler({final:"f"},$=>this.hVPosition($)),this._parser.registerCsiHandler({final:"g"},$=>this.tabClear($)),this._parser.registerCsiHandler({final:"h"},$=>this.setMode($)),this._parser.registerCsiHandler({prefix:"?",final:"h"},$=>this.setModePrivate($)),this._parser.registerCsiHandler({final:"l"},$=>this.resetMode($)),this._parser.registerCsiHandler({prefix:"?",final:"l"},$=>this.resetModePrivate($)),this._parser.registerCsiHandler({final:"m"},$=>this.charAttributes($)),this._parser.registerCsiHandler({final:"n"},$=>this.deviceStatus($)),this._parser.registerCsiHandler({prefix:"?",final:"n"},$=>this.deviceStatusPrivate($)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},$=>this.softReset($)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},$=>this.setCursorStyle($)),this._parser.registerCsiHandler({final:"r"},$=>this.setScrollRegion($)),this._parser.registerCsiHandler({final:"s"},$=>this.saveCursor($)),this._parser.registerCsiHandler({final:"t"},$=>this.windowOptions($)),this._parser.registerCsiHandler({final:"u"},$=>this.restoreCursor($)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},$=>this.insertColumns($)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},$=>this.deleteColumns($)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},$=>this.selectProtected($)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},$=>this.requestMode($,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},$=>this.requestMode($,!1)),this._parser.setExecuteHandler(h.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(h.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(h.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(h.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(h.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(h.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(h.C1.IND,()=>this.index()),this._parser.setExecuteHandler(h.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(h.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new M.OscHandler($=>(this.setTitle($),this.setIconName($),!0))),this._parser.registerOscHandler(1,new M.OscHandler($=>this.setIconName($))),this._parser.registerOscHandler(2,new M.OscHandler($=>this.setTitle($))),this._parser.registerOscHandler(4,new M.OscHandler($=>this.setOrReportIndexedColor($))),this._parser.registerOscHandler(8,new M.OscHandler($=>this.setHyperlink($))),this._parser.registerOscHandler(10,new M.OscHandler($=>this.setOrReportFgColor($))),this._parser.registerOscHandler(11,new M.OscHandler($=>this.setOrReportBgColor($))),this._parser.registerOscHandler(12,new M.OscHandler($=>this.setOrReportCursorColor($))),this._parser.registerOscHandler(104,new M.OscHandler($=>this.restoreIndexedColor($))),this._parser.registerOscHandler(110,new M.OscHandler($=>this.restoreFgColor($))),this._parser.registerOscHandler(111,new M.OscHandler($=>this.restoreBgColor($))),this._parser.registerOscHandler(112,new M.OscHandler($=>this.restoreCursorColor($))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const $ in f.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:$},()=>this.selectCharset("("+$)),this._parser.registerEscHandler({intermediates:")",final:$},()=>this.selectCharset(")"+$)),this._parser.registerEscHandler({intermediates:"*",final:$},()=>this.selectCharset("*"+$)),this._parser.registerEscHandler({intermediates:"+",final:$},()=>this.selectCharset("+"+$)),this._parser.registerEscHandler({intermediates:"-",final:$},()=>this.selectCharset("-"+$)),this._parser.registerEscHandler({intermediates:".",final:$},()=>this.selectCharset("."+$)),this._parser.registerEscHandler({intermediates:"/",final:$},()=>this.selectCharset("/"+$));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler($=>(this._logService.error("Parsing error: ",$),$)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler(($,_e)=>this.requestStatusString($,_e)))}_preserveStack(B,W,X,Y){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=W,this._parseStack.decodedLength=X,this._parseStack.position=Y}_logSlowResolvingAsync(B){this._logService.logLevel<=k.LogLevelEnum.WARN&&Promise.race([B,new Promise((W,X)=>setTimeout(()=>X("#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(B,W){let X,Y=this._activeBuffer.x,ve=this._activeBuffer.y,he=0;const Me=this._parseStack.paused;if(Me){if(X=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,W))return this._logSlowResolvingAsync(X),X;Y=this._parseStack.cursorStartX,ve=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>F&&(he=this._parseStack.position+F)}if(this._logService.logLevel<=k.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,$=>String.fromCharCode($)).join("")}"`),typeof B=="string"?B.split("").map($=>$.charCodeAt(0)):B),this._parseBuffer.length<B.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(B.length,F))),Me||this._dirtyRowTracker.clearRange(),B.length>F)for(let $=he;$<B.length;$+=F){const _e=$+F<B.length?$+F:B.length,de=typeof B=="string"?this._stringDecoder.decode(B.substring($,_e),this._parseBuffer):this._utf8Decoder.decode(B.subarray($,_e),this._parseBuffer);if(X=this._parser.parse(this._parseBuffer,de))return this._preserveStack(Y,ve,de,$),this._logSlowResolvingAsync(X),X}else if(!Me){const $=typeof B=="string"?this._stringDecoder.decode(B,this._parseBuffer):this._utf8Decoder.decode(B,this._parseBuffer);if(X=this._parser.parse(this._parseBuffer,$))return this._preserveStack(Y,ve,$,0),this._logSlowResolvingAsync(X),X}this._activeBuffer.x===Y&&this._activeBuffer.y===ve||this._onCursorMove.fire();const me=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),ie=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);ie<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(ie,this._bufferService.rows-1),Math.min(me,this._bufferService.rows-1))}print(B,W,X){let Y,ve;const he=this._charsetService.charset,Me=this._optionsService.rawOptions.screenReaderMode,me=this._bufferService.cols,ie=this._coreService.decPrivateModes.wraparound,$=this._coreService.modes.insertMode,_e=this._curAttrData;let de=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&X-W>0&&de.getWidth(this._activeBuffer.x-1)===2&&de.setCellFromCodepoint(this._activeBuffer.x-1,0,1,_e);let Ie=this._parser.precedingJoinState;for(let Ue=W;Ue<X;++Ue){if(Y=B[Ue],Y<127&&he){const Nt=he[String.fromCharCode(Y)];Nt&&(Y=Nt.charCodeAt(0))}const tt=this._unicodeService.charProperties(Y,Ie);ve=j.UnicodeService.extractWidth(tt);const Qe=j.UnicodeService.extractShouldJoin(tt),st=Qe?j.UnicodeService.extractWidth(Ie):0;if(Ie=tt,Me&&this._onA11yChar.fire((0,y.stringFromCodePoint)(Y)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+ve-st>me){if(ie){const Nt=de;let J=this._activeBuffer.x-st;for(this._activeBuffer.x=st,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),st>0&&de instanceof l.BufferLine&&de.copyCellsFrom(Nt,J,0,st,!1);J<me;)Nt.setCellFromCodepoint(J++,0,1,_e)}else if(this._activeBuffer.x=me-1,ve===2)continue}if(Qe&&this._activeBuffer.x){const Nt=de.getWidth(this._activeBuffer.x-1)?1:2;de.addCodepointToCell(this._activeBuffer.x-Nt,Y,ve);for(let J=ve-st;--J>=0;)de.setCellFromCodepoint(this._activeBuffer.x++,0,0,_e)}else if($&&(de.insertCells(this._activeBuffer.x,ve-st,this._activeBuffer.getNullCell(_e)),de.getWidth(me-1)===2&&de.setCellFromCodepoint(me-1,m.NULL_CELL_CODE,m.NULL_CELL_WIDTH,_e)),de.setCellFromCodepoint(this._activeBuffer.x++,Y,ve,_e),ve>0)for(;--ve;)de.setCellFromCodepoint(this._activeBuffer.x++,0,0,_e)}this._parser.precedingJoinState=Ie,this._activeBuffer.x<me&&X-W>0&&de.getWidth(this._activeBuffer.x)===0&&!de.hasContent(this._activeBuffer.x)&&de.setCellFromCodepoint(this._activeBuffer.x,0,1,_e),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,W){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,W):this._parser.registerCsiHandler(B,X=>!O(X.params[0],this._optionsService.rawOptions.windowOptions)||W(X))}registerDcsHandler(B,W){return this._parser.registerDcsHandler(B,new D.DcsHandler(W))}registerEscHandler(B,W){return this._parser.registerEscHandler(B,W)}registerOscHandler(B,W){return this._parser.registerOscHandler(B,new M.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 B;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const 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 B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(B,W){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+W):(this._activeBuffer.x=B,this._activeBuffer.y=W),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,W){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+W)}cursorUp(B){const W=this._activeBuffer.y-this._activeBuffer.scrollTop;return W>=0?this._moveCursor(0,-Math.min(W,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const W=this._activeBuffer.scrollBottom-this._activeBuffer.y;return W>=0?this._moveCursor(0,Math.min(W,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const W=B.params[0];return W===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:W===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=B.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=B.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const W=B.params[0];return W===1&&(this._curAttrData.bg|=536870912),W!==2&&W!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,W,X,Y=!1,ve=!1){const he=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);he.replaceCells(W,X,this._activeBuffer.getNullCell(this._eraseAttrData()),ve),Y&&(he.isWrapped=!1)}_resetBufferLine(B,W=!1){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);X&&(X.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),W),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),X.isWrapped=!1)}eraseInDisplay(B,W=!1){let X;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(X=this._activeBuffer.y,this._dirtyRowTracker.markDirty(X),this._eraseInBufferLine(X++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);X<this._bufferService.rows;X++)this._resetBufferLine(X,W);this._dirtyRowTracker.markDirty(X);break;case 1:for(X=this._activeBuffer.y,this._dirtyRowTracker.markDirty(X),this._eraseInBufferLine(X,0,this._activeBuffer.x+1,!0,W),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(X+1).isWrapped=!1);X--;)this._resetBufferLine(X,W);this._dirtyRowTracker.markDirty(0);break;case 2:for(X=this._bufferService.rows,this._dirtyRowTracker.markDirty(X-1);X--;)this._resetBufferLine(X,W);this._dirtyRowTracker.markDirty(0);break;case 3:const Y=this._activeBuffer.lines.length-this._bufferService.rows;Y>0&&(this._activeBuffer.lines.trimStart(Y),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Y,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Y,0),this._onScroll.fire(0))}return!0}eraseInLine(B,W=!1){switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,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(B){this._restrictCursor();let W=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const X=this._activeBuffer.ybase+this._activeBuffer.y,Y=this._bufferService.rows-1-this._activeBuffer.scrollBottom,ve=this._bufferService.rows-1+this._activeBuffer.ybase-Y+1;for(;W--;)this._activeBuffer.lines.splice(ve-1,1),this._activeBuffer.lines.splice(X,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(B){this._restrictCursor();let W=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const X=this._activeBuffer.ybase+this._activeBuffer.y;let Y;for(Y=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Y=this._bufferService.rows-1+this._activeBuffer.ybase-Y;W--;)this._activeBuffer.lines.splice(X,1),this._activeBuffer.lines.splice(Y,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(B){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.insertCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(B){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.deleteCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(B){let W=B.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(B){let W=B.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(l.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=B.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);Y.deleteCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=B.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);Y.insertCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=B.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);Y.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=B.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);Y.deleteCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(B){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(B.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(B){const W=this._parser.precedingJoinState;if(!W)return!0;const X=B.params[0]||1,Y=j.UnicodeService.extractWidth(W),ve=this._activeBuffer.x-Y,he=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(ve),Me=new Uint32Array(he.length*X);let me=0;for(let $=0;$<he.length;){const _e=he.codePointAt($)||0;Me[me++]=_e,$+=_e>65535?2:1}let ie=me;for(let $=1;$<X;++$)Me.copyWithin(ie,0,me),ie+=me;return this.print(Me,0,ie),!0}sendDeviceAttributesPrimary(B){return B.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let W=0;W<B.length;W++)switch(B.params[W]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(B){for(let W=0;W<B.length;W++)switch(B.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,f.DEFAULT_CHARSET),this._charsetService.setgCharset(1,f.DEFAULT_CHARSET),this._charsetService.setgCharset(2,f.DEFAULT_CHARSET),this._charsetService.setgCharset(3,f.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(B){for(let W=0;W<B.length;W++)switch(B.params[W]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(B){for(let W=0;W<B.length;W++)switch(B.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(),B.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(B,W){const X=this._coreService.decPrivateModes,{activeProtocol:Y,activeEncoding:ve}=this._coreMouseService,he=this._coreService,{buffers:Me,cols:me}=this._bufferService,{active:ie,alt:$}=Me,_e=this._optionsService.rawOptions,de=Qe=>Qe?1:2,Ie=B.params[0];return Ue=Ie,tt=W?Ie===2?4:Ie===4?de(he.modes.insertMode):Ie===12?3:Ie===20?de(_e.convertEol):0:Ie===1?de(X.applicationCursorKeys):Ie===3?_e.windowOptions.setWinLines?me===80?2:me===132?1:0:0:Ie===6?de(X.origin):Ie===7?de(X.wraparound):Ie===8?3:Ie===9?de(Y==="X10"):Ie===12?de(_e.cursorBlink):Ie===25?de(!he.isCursorHidden):Ie===45?de(X.reverseWraparound):Ie===66?de(X.applicationKeypad):Ie===67?4:Ie===1e3?de(Y==="VT200"):Ie===1002?de(Y==="DRAG"):Ie===1003?de(Y==="ANY"):Ie===1004?de(X.sendFocus):Ie===1005?4:Ie===1006?de(ve==="SGR"):Ie===1015?4:Ie===1016?de(ve==="SGR_PIXELS"):Ie===1048?1:Ie===47||Ie===1047||Ie===1049?de(ie===$):Ie===2004?de(X.bracketedPasteMode):0,he.triggerDataEvent(`${h.C0.ESC}[${W?"":"?"}${Ue};${tt}$y`),!0;var Ue,tt}_updateAttrColor(B,W,X,Y,ve){return W===2?(B|=50331648,B&=-16777216,B|=N.AttributeData.fromColorRGB([X,Y,ve])):W===5&&(B&=-50331904,B|=33554432|255&X),B}_extractColor(B,W,X){const Y=[0,0,-1,0,0,0];let ve=0,he=0;do{if(Y[he+ve]=B.params[W+he],B.hasSubParams(W+he)){const Me=B.getSubParams(W+he);let me=0;do Y[1]===5&&(ve=1),Y[he+me+1+ve]=Me[me];while(++me<Me.length&&me+he+1+ve<Y.length);break}if(Y[1]===5&&he+ve>=2||Y[1]===2&&he+ve>=5)break;Y[1]&&(ve=1)}while(++he+W<B.length&&he+ve<Y.length);for(let Me=2;Me<Y.length;++Me)Y[Me]===-1&&(Y[Me]=0);switch(Y[0]){case 38:X.fg=this._updateAttrColor(X.fg,Y[1],Y[3],Y[4],Y[5]);break;case 48:X.bg=this._updateAttrColor(X.bg,Y[1],Y[3],Y[4],Y[5]);break;case 58:X.extended=X.extended.clone(),X.extended.underlineColor=this._updateAttrColor(X.extended.underlineColor,Y[1],Y[3],Y[4],Y[5])}return he}_processUnderline(B,W){W.extended=W.extended.clone(),(!~B||B>5)&&(B=1),W.extended.underlineStyle=B,W.fg|=268435456,B===0&&(W.fg&=-268435457),W.updateExtended()}_processSGR0(B){B.fg=l.DEFAULT_ATTR_DATA.fg,B.bg=l.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const W=B.length;let X;const Y=this._curAttrData;for(let ve=0;ve<W;ve++)X=B.params[ve],X>=30&&X<=37?(Y.fg&=-50331904,Y.fg|=16777216|X-30):X>=40&&X<=47?(Y.bg&=-50331904,Y.bg|=16777216|X-40):X>=90&&X<=97?(Y.fg&=-50331904,Y.fg|=16777224|X-90):X>=100&&X<=107?(Y.bg&=-50331904,Y.bg|=16777224|X-100):X===0?this._processSGR0(Y):X===1?Y.fg|=134217728:X===3?Y.bg|=67108864:X===4?(Y.fg|=268435456,this._processUnderline(B.hasSubParams(ve)?B.getSubParams(ve)[0]:1,Y)):X===5?Y.fg|=536870912:X===7?Y.fg|=67108864:X===8?Y.fg|=1073741824:X===9?Y.fg|=2147483648:X===2?Y.bg|=134217728:X===21?this._processUnderline(2,Y):X===22?(Y.fg&=-134217729,Y.bg&=-134217729):X===23?Y.bg&=-67108865:X===24?(Y.fg&=-268435457,this._processUnderline(0,Y)):X===25?Y.fg&=-536870913:X===27?Y.fg&=-67108865:X===28?Y.fg&=-1073741825:X===29?Y.fg&=2147483647:X===39?(Y.fg&=-67108864,Y.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):X===49?(Y.bg&=-67108864,Y.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):X===38||X===48||X===58?ve+=this._extractColor(B,ve,Y):X===53?Y.bg|=1073741824:X===55?Y.bg&=-1073741825:X===59?(Y.extended=Y.extended.clone(),Y.extended.underlineColor=-1,Y.updateExtended()):X===100?(Y.fg&=-67108864,Y.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,Y.bg&=-67108864,Y.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",X);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const W=this._activeBuffer.y+1,X=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${W};${X}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const W=this._activeBuffer.y+1,X=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${W};${X}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(B){const W=B.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 X=W%2==1;return this._optionsService.options.cursorBlink=X,!0}setScrollRegion(B){const W=B.params[0]||1;let X;return(B.length<2||(X=B.params[1])>this._bufferService.rows||X===0)&&(X=this._bufferService.rows),X>W&&(this._activeBuffer.scrollTop=W-1,this._activeBuffer.scrollBottom=X-1,this._setCursor(0,0)),!0}windowOptions(B){if(!O(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const W=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:W!==2&&this._onRequestWindowsOptionsReport.fire(I.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(I.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(B){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(B){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const W=[],X=B.split(";");for(;X.length>1;){const Y=X.shift(),ve=X.shift();if(/^\d+$/.exec(Y)){const he=parseInt(Y);if(te(he))if(ve==="?")W.push({type:0,index:he});else{const Me=(0,L.parseColor)(ve);Me&&W.push({type:1,index:he,color:Me})}}}return W.length&&this._onColor.fire(W),!0}setHyperlink(B){const W=B.split(";");return!(W.length<2)&&(W[1]?this._createHyperlink(W[0],W[1]):!W[0]&&this._finishHyperlink())}_createHyperlink(B,W){this._getCurrentLinkId()&&this._finishHyperlink();const X=B.split(":");let Y;const ve=X.findIndex(he=>he.startsWith("id="));return ve!==-1&&(Y=X[ve].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Y,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(B,W){const X=B.split(";");for(let Y=0;Y<X.length&&!(W>=this._specialColors.length);++Y,++W)if(X[Y]==="?")this._onColor.fire([{type:0,index:this._specialColors[W]}]);else{const ve=(0,L.parseColor)(X[Y]);ve&&this._onColor.fire([{type:1,index:this._specialColors[W],color:ve}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const W=[],X=B.split(";");for(let Y=0;Y<X.length;++Y)if(/^\d+$/.exec(X[Y])){const ve=parseInt(X[Y]);te(ve)&&W.push({type:2,index:ve})}return W.length&&this._onColor.fire(W),!0}restoreFgColor(B){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(B){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(B){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,f.DEFAULT_CHARSET),!0}selectCharset(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(A[B[0]],f.CHARSETS[B[1]]||f.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new p.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let W=0;W<this._bufferService.rows;++W){const X=this._activeBuffer.ybase+this._activeBuffer.y+W,Y=this._activeBuffer.lines.get(X);Y&&(Y.fill(B),Y.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(B,W){const X=this._bufferService.buffer,Y=this._optionsService.rawOptions;return(ve=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${ve}${h.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${X.scrollTop+1};${X.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[Y.cursorStyle]-(Y.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,W){this._dirtyRowTracker.markRangeDirty(B,W)}}a.InputHandler=ne;let ee=class{constructor(se){this._bufferService=se,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(se){se<this.start?this.start=se:se>this.end&&(this.end=se)}markRangeDirty(se,B){se>B&&(G=se,se=B,B=G),se<this.start&&(this.start=se),B>this.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function te(se){return 0<=se&&se<256}ee=g([x(0,k.IBufferService)],ee)},844:(b,a)=>{function u(g){for(const x of g)x.dispose();g.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 g of this._disposables)g.dispose();this._disposables.length=0}register(g){return this._disposables.push(g),g}unregister(g){const x=this._disposables.indexOf(g);x!==-1&&this._disposables.splice(x,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var x;this._isDisposed||g===this._value||((x=this._value)==null||x.dispose(),this._value=g)}clear(){this.value=void 0}dispose(){var g;this._isDisposed=!0,(g=this._value)==null||g.dispose(),this._value=void 0}},a.toDisposable=function(g){return{dispose:g}},a.disposeArray=u,a.getDisposeArrayDisposable=function(g){return{dispose:()=>u(g)}}},1505:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(x,h,f){this._data[x]||(this._data[x]={}),this._data[x][h]=f}get(x,h){return this._data[x]?this._data[x][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(g,x,h,f,S){this._data.get(g,x)||this._data.set(g,x,new u),this._data.get(g,x).set(h,f,S)}get(g,x,h,f){var S;return(S=this._data.get(g,x))==null?void 0:S.get(h,f)}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 u=a.isNode?"node":navigator.userAgent,g=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const x=u.match(/Version\/(\d+)/);return x===null||x.length<2?0:parseInt(x[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),a.isIpad=g==="iPad",a.isIphone=g==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),a.isLinux=g.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},6106:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(g){this._getKey=g,this._array=[]}clear(){this._array.length=0}insert(g){this._array.length!==0?(u=this._search(this._getKey(g)),this._array.splice(u,0,g)):this._array.push(g)}delete(g){if(this._array.length===0)return!1;const x=this._getKey(g);if(x===void 0||(u=this._search(x),u===-1)||this._getKey(this._array[u])!==x)return!1;do if(this._array[u]===g)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===x);return!1}*getKeyIterator(g){if(this._array.length!==0&&(u=this._search(g),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===g))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===g)}forEachByKey(g,x){if(this._array.length!==0&&(u=this._search(g),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===g))do x(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===g)}values(){return[...this._array].values()}_search(g){let x=0,h=this._array.length-1;for(;h>=x;){let f=x+h>>1;const S=this._getKey(this._array[f]);if(S>g)h=f-1;else{if(!(S<g)){for(;f>0&&this._getKey(this._array[f-1])===g;)f--;return f}x=f+1}}return x}}},7226:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const g=u(6114);class x{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(S){this._idleCallback=void 0;let C=0,y=0,l=S.timeRemaining(),v=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),v=S.timeRemaining(),1.5*y>v)return l-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-C))}ms`),void this._start();l=v}this.clear()}}class h extends x{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const C=Date.now()+S;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends x{_requestCallback(f){return requestIdleCallback(f)}_cancelCallback(f){cancelIdleCallback(f)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(f){this._queue.clear(),this._queue.enqueue(f)}flush(){this._queue.flush()}}},9282:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const g=u(643);a.updateWindowsModeWrappedState=function(x){const h=x.buffer.lines.get(x.buffer.ybase+x.buffer.y-1),f=h==null?void 0:h.get(x.cols-1),S=x.buffer.lines.get(x.buffer.ybase+x.buffer.y);S&&f&&(S.isWrapped=f[g.CHAR_DATA_CODE_INDEX]!==g.NULL_CELL_CODE&&f[g.CHAR_DATA_CODE_INDEX]!==g.WHITESPACE_CELL_CODE)}},3734:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new u;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class g{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,f=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=f}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=g},9092:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const g=u(6349),x=u(7226),h=u(3734),f=u(8437),S=u(4634),C=u(511),y=u(643),l=u(4863),v=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(m,p,N){this._hasScrollback=m,this._optionsService=p,this._bufferService=N,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=f.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.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 x.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new g.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(m){return m?(this._nullCell.fg=m.fg,this._nullCell.bg=m.bg,this._nullCell.extended=m.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(m){return m?(this._whitespaceCell.fg=m.fg,this._whitespaceCell.bg=m.bg,this._whitespaceCell.extended=m.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(m,p){return new f.BufferLine(this._bufferService.cols,this.getNullCell(m),p)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const m=this.ybase+this.y-this.ydisp;return m>=0&&m<this._rows}_getCorrectBufferLength(m){if(!this._hasScrollback)return m;const p=m+this._optionsService.rawOptions.scrollback;return p>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:p}fillViewportRows(m){if(this.lines.length===0){m===void 0&&(m=f.DEFAULT_ATTR_DATA);let p=this._rows;for(;p--;)this.lines.push(this.getBlankLine(m))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new g.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(m,p){const N=this.getNullCell(f.DEFAULT_ATTR_DATA);let k=0;const j=this._getCorrectBufferLength(p);if(j>this.lines.maxLength&&(this.lines.maxLength=j),this.lines.length>0){if(this._cols<m)for(let D=0;D<this.lines.length;D++)k+=+this.lines.get(D).resize(m,N);let M=0;if(this._rows<p)for(let D=this._rows;D<p;D++)this.lines.length<p+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new f.BufferLine(m,N)):this.ybase>0&&this.lines.length<=this.ybase+this.y+M+1?(this.ybase--,M++,this.ydisp>0&&this.ydisp--):this.lines.push(new f.BufferLine(m,N)));else for(let D=this._rows;D>p;D--)this.lines.length>p+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(j<this.lines.maxLength){const D=this.lines.length-j;D>0&&(this.lines.trimStart(D),this.ybase=Math.max(this.ybase-D,0),this.ydisp=Math.max(this.ydisp-D,0),this.savedY=Math.max(this.savedY-D,0)),this.lines.maxLength=j}this.x=Math.min(this.x,m-1),this.y=Math.min(this.y,p-1),M&&(this.y+=M),this.savedX=Math.min(this.savedX,m-1),this.scrollTop=0}if(this.scrollBottom=p-1,this._isReflowEnabled&&(this._reflow(m,p),this._cols>m))for(let M=0;M<this.lines.length;M++)k+=+this.lines.get(M).resize(m,N);this._cols=m,this._rows=p,this._memoryCleanupQueue.clear(),k>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let m=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,m=!1);let p=0;for(;this._memoryCleanupPosition<this.lines.length;)if(p+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),p>100)return!0;return m}get _isReflowEnabled(){const m=this._optionsService.rawOptions.windowsPty;return m&&m.buildNumber?this._hasScrollback&&m.backend==="conpty"&&m.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(m,p){this._cols!==m&&(m>this._cols?this._reflowLarger(m,p):this._reflowSmaller(m,p))}_reflowLarger(m,p){const N=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,m,this.ybase+this.y,this.getNullCell(f.DEFAULT_ATTR_DATA));if(N.length>0){const k=(0,S.reflowLargerCreateNewLayout)(this.lines,N);(0,S.reflowLargerApplyNewLayout)(this.lines,k.layout),this._reflowLargerAdjustViewport(m,p,k.countRemoved)}}_reflowLargerAdjustViewport(m,p,N){const k=this.getNullCell(f.DEFAULT_ATTR_DATA);let j=N;for(;j-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<p&&this.lines.push(new f.BufferLine(m,k))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-N,0)}_reflowSmaller(m,p){const N=this.getNullCell(f.DEFAULT_ATTR_DATA),k=[];let j=0;for(let M=this.lines.length-1;M>=0;M--){let D=this.lines.get(M);if(!D||!D.isWrapped&&D.getTrimmedLength()<=m)continue;const L=[D];for(;D.isWrapped&&M>0;)D=this.lines.get(--M),L.unshift(D);const A=this.ybase+this.y;if(A>=M&&A<M+L.length)continue;const F=L[L.length-1].getTrimmedLength(),O=(0,S.reflowSmallerGetNewLineLengths)(L,this._cols,m),I=O.length-L.length;let G;G=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+I):Math.max(0,this.lines.length-this.lines.maxLength+I);const ne=[];for(let X=0;X<I;X++){const Y=this.getBlankLine(f.DEFAULT_ATTR_DATA,!0);ne.push(Y)}ne.length>0&&(k.push({start:M+L.length+j,newLines:ne}),j+=ne.length),L.push(...ne);let ee=O.length-1,te=O[ee];te===0&&(ee--,te=O[ee]);let se=L.length-I-1,B=F;for(;se>=0;){const X=Math.min(B,te);if(L[ee]===void 0)break;if(L[ee].copyCellsFrom(L[se],B-X,te-X,X,!0),te-=X,te===0&&(ee--,te=O[ee]),B-=X,B===0){se--;const Y=Math.max(se,0);B=(0,S.getWrappedLineTrimmedLength)(L,Y,this._cols)}}for(let X=0;X<L.length;X++)O[X]<m&&L[X].setCell(O[X],N);let W=I-G;for(;W-- >0;)this.ybase===0?this.y<p-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+j)-p&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+p-1)}if(k.length>0){const M=[],D=[];for(let ee=0;ee<this.lines.length;ee++)D.push(this.lines.get(ee));const L=this.lines.length;let A=L-1,F=0,O=k[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+j);let I=0;for(let ee=Math.min(this.lines.maxLength-1,L+j-1);ee>=0;ee--)if(O&&O.start>A+I){for(let te=O.newLines.length-1;te>=0;te--)this.lines.set(ee--,O.newLines[te]);ee++,M.push({index:A+1,amount:O.newLines.length}),I+=O.newLines.length,O=k[++F]}else this.lines.set(ee,D[A--]);let G=0;for(let ee=M.length-1;ee>=0;ee--)M[ee].index+=G,this.lines.onInsertEmitter.fire(M[ee]),G+=M[ee].amount;const ne=Math.max(0,L+j-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(m,p,N=0,k){const j=this.lines.get(m);return j?j.translateToString(p,N,k):""}getWrappedRangeForLine(m){let p=m,N=m;for(;p>0&&this.lines.get(p).isWrapped;)p--;for(;N+1<this.lines.length&&this.lines.get(N+1).isWrapped;)N++;return{first:p,last:N}}setupTabStops(m){for(m!=null?this.tabs[m]||(m=this.prevStop(m)):(this.tabs={},m=0);m<this._cols;m+=this._optionsService.rawOptions.tabStopWidth)this.tabs[m]=!0}prevStop(m){for(m==null&&(m=this.x);!this.tabs[--m]&&m>0;);return m>=this._cols?this._cols-1:m<0?0:m}nextStop(m){for(m==null&&(m=this.x);!this.tabs[++m]&&m<this._cols;);return m>=this._cols?this._cols-1:m<0?0:m}clearMarkers(m){this._isClearing=!0;for(let p=0;p<this.markers.length;p++)this.markers[p].line===m&&(this.markers[p].dispose(),this.markers.splice(p--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let m=0;m<this.markers.length;m++)this.markers[m].dispose(),this.markers.splice(m--,1);this._isClearing=!1}addMarker(m){const p=new l.Marker(m);return this.markers.push(p),p.register(this.lines.onTrim(N=>{p.line-=N,p.line<0&&p.dispose()})),p.register(this.lines.onInsert(N=>{p.line>=N.index&&(p.line+=N.amount)})),p.register(this.lines.onDelete(N=>{p.line>=N.index&&p.line<N.index+N.amount&&p.dispose(),p.line>N.index&&(p.line-=N.amount)})),p.register(p.onDispose(()=>this._removeMarker(p))),p}_removeMarker(m){this._isClearing||this.markers.splice(this.markers.indexOf(m),1)}}},8437:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const g=u(3734),x=u(511),h=u(643),f=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new g.AttributeData);let S=0;class C{constructor(l,v,m=!1){this.isWrapped=m,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const p=v||x.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let N=0;N<l;++N)this.setCell(N,p);this.length=l}get(l){const v=this._data[3*l+0],m=2097151&v;return[this._data[3*l+1],2097152&v?this._combined[l]:m?(0,f.stringFromCodePoint)(m):"",v>>22,2097152&v?this._combined[l].charCodeAt(this._combined[l].length-1):m]}set(l,v){this._data[3*l+1]=v[h.CHAR_DATA_ATTR_INDEX],v[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=v[1],this._data[3*l+0]=2097152|l|v[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=v[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const v=this._data[3*l+0];return 2097152&v?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&v}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const v=this._data[3*l+0];return 2097152&v?this._combined[l]:2097151&v?(0,f.stringFromCodePoint)(2097151&v):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,v){return S=3*l,v.content=this._data[S+0],v.fg=this._data[S+1],v.bg=this._data[S+2],2097152&v.content&&(v.combinedData=this._combined[l]),268435456&v.bg&&(v.extended=this._extendedAttrs[l]),v}setCell(l,v){2097152&v.content&&(this._combined[l]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[l]=v.extended),this._data[3*l+0]=v.content,this._data[3*l+1]=v.fg,this._data[3*l+2]=v.bg}setCellFromCodepoint(l,v,m,p){268435456&p.bg&&(this._extendedAttrs[l]=p.extended),this._data[3*l+0]=v|m<<22,this._data[3*l+1]=p.fg,this._data[3*l+2]=p.bg}addCodepointToCell(l,v,m){let p=this._data[3*l+0];2097152&p?this._combined[l]+=(0,f.stringFromCodePoint)(v):2097151&p?(this._combined[l]=(0,f.stringFromCodePoint)(2097151&p)+(0,f.stringFromCodePoint)(v),p&=-2097152,p|=2097152):p=v|4194304,m&&(p&=-12582913,p|=m<<22),this._data[3*l+0]=p}insertCells(l,v,m){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,m),v<this.length-l){const p=new x.CellData;for(let N=this.length-l-v-1;N>=0;--N)this.setCell(l+v+N,this.loadCell(l+N,p));for(let N=0;N<v;++N)this.setCell(l+N,m)}else for(let p=l;p<this.length;++p)this.setCell(p,m);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,m)}deleteCells(l,v,m){if(l%=this.length,v<this.length-l){const p=new x.CellData;for(let N=0;N<this.length-l-v;++N)this.setCell(l+N,this.loadCell(l+v+N,p));for(let N=this.length-v;N<this.length;++N)this.setCell(N,m)}else for(let p=l;p<this.length;++p)this.setCell(p,m);l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,m),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodepoint(l,0,1,m)}replaceCells(l,v,m,p=!1){if(p)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodepoint(l-1,0,1,m),v<this.length&&this.getWidth(v-1)===2&&!this.isProtected(v)&&this.setCellFromCodepoint(v,0,1,m);l<v&&l<this.length;)this.isProtected(l)||this.setCell(l,m),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,m),v<this.length&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v,0,1,m);l<v&&l<this.length;)this.setCell(l++,m)}resize(l,v){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const m=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*m)this._data=new Uint32Array(this._data.buffer,0,m);else{const p=new Uint32Array(m);p.set(this._data),this._data=p}for(let p=this.length;p<l;++p)this.setCell(p,v)}else{this._data=this._data.subarray(0,m);const p=Object.keys(this._combined);for(let k=0;k<p.length;k++){const j=parseInt(p[k],10);j>=l&&delete this._combined[j]}const N=Object.keys(this._extendedAttrs);for(let k=0;k<N.length;k++){const j=parseInt(N[k],10);j>=l&&delete this._extendedAttrs[j]}}return this.length=l,4*m*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,v=!1){if(v)for(let m=0;m<this.length;++m)this.isProtected(m)||this.setCell(m,l);else{this._combined={},this._extendedAttrs={};for(let m=0;m<this.length;++m)this.setCell(m,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const v in l._combined)this._combined[v]=l._combined[v];this._extendedAttrs={};for(const v in l._extendedAttrs)this._extendedAttrs[v]=l._extendedAttrs[v];this.isWrapped=l.isWrapped}clone(){const l=new C(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const v in this._combined)l._combined[v]=this._combined[v];for(const v in this._extendedAttrs)l._extendedAttrs[v]=this._extendedAttrs[v];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,v,m,p,N){const k=l._data;if(N)for(let M=p-1;M>=0;M--){for(let D=0;D<3;D++)this._data[3*(m+M)+D]=k[3*(v+M)+D];268435456&k[3*(v+M)+2]&&(this._extendedAttrs[m+M]=l._extendedAttrs[v+M])}else for(let M=0;M<p;M++){for(let D=0;D<3;D++)this._data[3*(m+M)+D]=k[3*(v+M)+D];268435456&k[3*(v+M)+2]&&(this._extendedAttrs[m+M]=l._extendedAttrs[v+M])}const j=Object.keys(l._combined);for(let M=0;M<j.length;M++){const D=parseInt(j[M],10);D>=v&&(this._combined[D-v+m]=l._combined[D])}}translateToString(l,v,m,p){v=v??0,m=m??this.length,l&&(m=Math.min(m,this.getTrimmedLength())),p&&(p.length=0);let N="";for(;v<m;){const k=this._data[3*v+0],j=2097151&k,M=2097152&k?this._combined[v]:j?(0,f.stringFromCodePoint)(j):h.WHITESPACE_CELL_CHAR;if(N+=M,p)for(let D=0;D<M.length;++D)p.push(v);v+=k>>22||1}return p&&p.push(v),N}}a.BufferLine=C},4841:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,g){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return g*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(b,a)=>{function u(g,x,h){if(x===g.length-1)return g[x].getTrimmedLength();const f=!g[x].hasContent(h-1)&&g[x].getWidth(h-1)===1,S=g[x+1].getWidth(0)===2;return f&&S?h-1:h}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(g,x,h,f,S){const C=[];for(let y=0;y<g.length-1;y++){let l=y,v=g.get(++l);if(!v.isWrapped)continue;const m=[g.get(y)];for(;l<g.length&&v.isWrapped;)m.push(v),v=g.get(++l);if(f>=y&&f<l){y+=m.length-1;continue}let p=0,N=u(m,p,x),k=1,j=0;for(;k<m.length;){const D=u(m,k,x),L=D-j,A=h-N,F=Math.min(L,A);m[p].copyCellsFrom(m[k],j,N,F,!1),N+=F,N===h&&(p++,N=0),j+=F,j===D&&(k++,j=0),N===0&&p!==0&&m[p-1].getWidth(h-1)===2&&(m[p].copyCellsFrom(m[p-1],h-1,N++,1,!1),m[p-1].setCell(h-1,S))}m[p].replaceCells(N,h,S);let M=0;for(let D=m.length-1;D>0&&(D>p||m[D].getTrimmedLength()===0);D--)M++;M>0&&(C.push(y+m.length-M),C.push(M)),y+=m.length-1}return C},a.reflowLargerCreateNewLayout=function(g,x){const h=[];let f=0,S=x[f],C=0;for(let y=0;y<g.length;y++)if(S===y){const l=x[++f];g.onDeleteEmitter.fire({index:y-C,amount:l}),y+=l-1,C+=l,S=x[++f]}else h.push(y);return{layout:h,countRemoved:C}},a.reflowLargerApplyNewLayout=function(g,x){const h=[];for(let f=0;f<x.length;f++)h.push(g.get(x[f]));for(let f=0;f<h.length;f++)g.set(f,h[f]);g.length=x.length},a.reflowSmallerGetNewLineLengths=function(g,x,h){const f=[],S=g.map((v,m)=>u(g,m,x)).reduce((v,m)=>v+m);let C=0,y=0,l=0;for(;l<S;){if(S-l<h){f.push(S-l);break}C+=h;const v=u(g,y,x);C>v&&(C-=v,y++);const m=g[y].getWidth(C-1)===2;m&&C--;const p=m?h-1:h;f.push(p),l+=p}return f},a.getWrappedLineTrimmedLength=u},5295:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const g=u(8460),x=u(844),h=u(9092);class f extends x.Disposable{constructor(C,y){super(),this._optionsService=C,this._bufferService=y,this._onBufferActivate=this.register(new g.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=f},511:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const g=u(482),x=u(643),h=u(3734);class f 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 f;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,g.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[x.CHAR_DATA_ATTR_INDEX],this.bg=0;let y=!1;if(C[x.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(C[x.CHAR_DATA_CHAR_INDEX].length===2){const l=C[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const v=C[x.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(l-55296)+v-56320+65536|C[x.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=C[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[x.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=C[x.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[x.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=f},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,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const g=u(8460),x=u(844);class h{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new g.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,x.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}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 u,g,x;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=""}(u||(a.C0=u={})),function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"}(g||(a.C1=g={})),function(h){h.ST=`${u.ESC}\\`}(x||(a.C1_ESCAPED=x={}))},7399:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const g=u(2584),x={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,f,S,C){const y={type:0,cancel:!1,key:void 0},l=(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?g.C0.ESC+"OA":g.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?y.key=f?g.C0.ESC+"OD":g.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?y.key=f?g.C0.ESC+"OC":g.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(y.key=f?g.C0.ESC+"OB":g.C0.ESC+"[B");break;case 8:y.key=h.ctrlKey?"\b":g.C0.DEL,h.altKey&&(y.key=g.C0.ESC+y.key);break;case 9:if(h.shiftKey){y.key=g.C0.ESC+"[Z";break}y.key=g.C0.HT,y.cancel=!0;break;case 13:y.key=h.altKey?g.C0.ESC+g.C0.CR:g.C0.CR,y.cancel=!0;break;case 27:y.key=g.C0.ESC,h.altKey&&(y.key=g.C0.ESC+g.C0.ESC),y.cancel=!0;break;case 37:if(h.metaKey)break;l?(y.key=g.C0.ESC+"[1;"+(l+1)+"D",y.key===g.C0.ESC+"[1;3D"&&(y.key=g.C0.ESC+(S?"b":"[1;5D"))):y.key=f?g.C0.ESC+"OD":g.C0.ESC+"[D";break;case 39:if(h.metaKey)break;l?(y.key=g.C0.ESC+"[1;"+(l+1)+"C",y.key===g.C0.ESC+"[1;3C"&&(y.key=g.C0.ESC+(S?"f":"[1;5C"))):y.key=f?g.C0.ESC+"OC":g.C0.ESC+"[C";break;case 38:if(h.metaKey)break;l?(y.key=g.C0.ESC+"[1;"+(l+1)+"A",S||y.key!==g.C0.ESC+"[1;3A"||(y.key=g.C0.ESC+"[1;5A")):y.key=f?g.C0.ESC+"OA":g.C0.ESC+"[A";break;case 40:if(h.metaKey)break;l?(y.key=g.C0.ESC+"[1;"+(l+1)+"B",S||y.key!==g.C0.ESC+"[1;3B"||(y.key=g.C0.ESC+"[1;5B")):y.key=f?g.C0.ESC+"OB":g.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(y.key=g.C0.ESC+"[2~");break;case 46:y.key=l?g.C0.ESC+"[3;"+(l+1)+"~":g.C0.ESC+"[3~";break;case 36:y.key=l?g.C0.ESC+"[1;"+(l+1)+"H":f?g.C0.ESC+"OH":g.C0.ESC+"[H";break;case 35:y.key=l?g.C0.ESC+"[1;"+(l+1)+"F":f?g.C0.ESC+"OF":g.C0.ESC+"[F";break;case 33:h.shiftKey?y.type=2:h.ctrlKey?y.key=g.C0.ESC+"[5;"+(l+1)+"~":y.key=g.C0.ESC+"[5~";break;case 34:h.shiftKey?y.type=3:h.ctrlKey?y.key=g.C0.ESC+"[6;"+(l+1)+"~":y.key=g.C0.ESC+"[6~";break;case 112:y.key=l?g.C0.ESC+"[1;"+(l+1)+"P":g.C0.ESC+"OP";break;case 113:y.key=l?g.C0.ESC+"[1;"+(l+1)+"Q":g.C0.ESC+"OQ";break;case 114:y.key=l?g.C0.ESC+"[1;"+(l+1)+"R":g.C0.ESC+"OR";break;case 115:y.key=l?g.C0.ESC+"[1;"+(l+1)+"S":g.C0.ESC+"OS";break;case 116:y.key=l?g.C0.ESC+"[15;"+(l+1)+"~":g.C0.ESC+"[15~";break;case 117:y.key=l?g.C0.ESC+"[17;"+(l+1)+"~":g.C0.ESC+"[17~";break;case 118:y.key=l?g.C0.ESC+"[18;"+(l+1)+"~":g.C0.ESC+"[18~";break;case 119:y.key=l?g.C0.ESC+"[19;"+(l+1)+"~":g.C0.ESC+"[19~";break;case 120:y.key=l?g.C0.ESC+"[20;"+(l+1)+"~":g.C0.ESC+"[20~";break;case 121:y.key=l?g.C0.ESC+"[21;"+(l+1)+"~":g.C0.ESC+"[21~";break;case 122:y.key=l?g.C0.ESC+"[23;"+(l+1)+"~":g.C0.ESC+"[23~";break;case 123:y.key=l?g.C0.ESC+"[24;"+(l+1)+"~":g.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(S&&!C||!h.altKey||h.metaKey)!S||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?y.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(y.key=g.C0.US),h.key==="@"&&(y.key=g.C0.NUL)):h.keyCode===65&&(y.type=1);else{const v=x[h.keyCode],m=v==null?void 0:v[h.shiftKey?1:0];if(m)y.key=g.C0.ESC+m;else if(h.keyCode>=65&&h.keyCode<=90){const p=h.ctrlKey?h.keyCode-64:h.keyCode+32;let N=String.fromCharCode(p);h.shiftKey&&(N=N.toUpperCase()),y.key=g.C0.ESC+N}else if(h.keyCode===32)y.key=g.C0.ESC+(h.ctrlKey?g.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let p=h.code.slice(3,4);h.shiftKey||(p=p.toLowerCase()),y.key=g.C0.ESC+p,y.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?y.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?y.key=g.C0.NUL:h.keyCode>=51&&h.keyCode<=55?y.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?y.key=g.C0.DEL:h.keyCode===219?y.key=g.C0.ESC:h.keyCode===220?y.key=g.C0.FS:h.keyCode===221&&(y.key=g.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(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,g=0,x=u.length){let h="";for(let f=g;f<x;++f){let S=u[f];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,g){const x=u.length;if(!x)return 0;let h=0,f=0;if(this._interim){const S=u.charCodeAt(f++);56320<=S&&S<=57343?g[h++]=1024*(this._interim-55296)+S-56320+65536:(g[h++]=this._interim,g[h++]=S),this._interim=0}for(let S=f;S<x;++S){const C=u.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=x)return this._interim=C,h;const y=u.charCodeAt(S);56320<=y&&y<=57343?g[h++]=1024*(C-55296)+y-56320+65536:(g[h++]=C,g[h++]=y)}else C!==65279&&(g[h++]=C)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,g){const x=u.length;if(!x)return 0;let h,f,S,C,y=0,l=0,v=0;if(this.interim[0]){let N=!1,k=this.interim[0];k&=(224&k)==192?31:(240&k)==224?15:7;let j,M=0;for(;(j=63&this.interim[++M])&&M<4;)k<<=6,k|=j;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=D-M;for(;v<L;){if(v>=x)return 0;if(j=u[v++],(192&j)!=128){v--,N=!0;break}this.interim[M++]=j,k<<=6,k|=63&j}N||(D===2?k<128?v--:g[y++]=k:D===3?k<2048||k>=55296&&k<=57343||k===65279||(g[y++]=k):k<65536||k>1114111||(g[y++]=k)),this.interim.fill(0)}const m=x-4;let p=v;for(;p<x;){for(;!(!(p<m)||128&(h=u[p])||128&(f=u[p+1])||128&(S=u[p+2])||128&(C=u[p+3]));)g[y++]=h,g[y++]=f,g[y++]=S,g[y++]=C,p+=4;if(h=u[p++],h<128)g[y++]=h;else if((224&h)==192){if(p>=x)return this.interim[0]=h,y;if(f=u[p++],(192&f)!=128){p--;continue}if(l=(31&h)<<6|63&f,l<128){p--;continue}g[y++]=l}else if((240&h)==224){if(p>=x)return this.interim[0]=h,y;if(f=u[p++],(192&f)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=f,y;if(S=u[p++],(192&S)!=128){p--;continue}if(l=(15&h)<<12|(63&f)<<6|63&S,l<2048||l>=55296&&l<=57343||l===65279)continue;g[y++]=l}else if((248&h)==240){if(p>=x)return this.interim[0]=h,y;if(f=u[p++],(192&f)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=f,y;if(S=u[p++],(192&S)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=f,this.interim[2]=S,y;if(C=u[p++],(192&C)!=128){p--;continue}if(l=(7&h)<<18|(63&f)<<12|(63&S)<<6|63&C,l<65536||l>1114111)continue;g[y++]=l}}return y}}},225:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const g=u(1480),x=[[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 f;a.UnicodeV6=class{constructor(){if(this.version="6",!f){f=new Uint8Array(65536),f.fill(1),f[0]=0,f.fill(0,1,32),f.fill(0,127,160),f.fill(2,4352,4448),f[9001]=2,f[9002]=2,f.fill(2,11904,42192),f[12351]=1,f.fill(2,44032,55204),f.fill(2,63744,64256),f.fill(2,65040,65050),f.fill(2,65072,65136),f.fill(2,65280,65377),f.fill(2,65504,65511);for(let S=0;S<x.length;++S)f.fill(0,x[S][0],x[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?f[S]:function(C,y){let l,v=0,m=y.length-1;if(C<y[0][0]||C>y[m][1])return!1;for(;m>=v;)if(l=v+m>>1,C>y[l][1])v=l+1;else{if(!(C<y[l][0]))return!0;m=l-1}return!1}(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,C){let y=this.wcwidth(S),l=y===0&&C!==0;if(l){const v=g.UnicodeService.extractWidth(C);v===0?l=!1:v>y&&(y=v)}return g.UnicodeService.createPropertyValue(0,y,l)}}},5981:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const g=u(8460),x=u(844);class h extends x.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new g.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let y;for(this._isSyncWriting=!0;y=this._writeBuffer.shift();){this._action(y);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,C){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C)}_innerWrite(S=0,C=!0){const y=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],v=this._action(l,C);if(v){const p=N=>Date.now()-y>=12?setTimeout(()=>this._innerWrite(0,N)):this._innerWrite(y,N);return void v.catch(N=>(queueMicrotask(()=>{throw N}),Promise.resolve(!1))).then(p)}const m=this._callbacks[this._bufferOffset];if(m&&m(),this._bufferOffset++,this._pendingData-=l.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 u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,g=/^[\da-f]+$/;function x(h,f){const S=h.toString(16),C=S.length<2?"0"+S:S;switch(f){case 4:return S[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}a.parseColor=function(h){if(!h)return;let f=h.toLowerCase();if(f.indexOf("rgb:")===0){f=f.slice(4);const S=u.exec(f);if(S){const C=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/C*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/C*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/C*255)]}}else if(f.indexOf("#")===0&&(f=f.slice(1),g.exec(f)&&[3,6,9,12].includes(f.length))){const S=f.length/3,C=[0,0,0];for(let y=0;y<3;++y){const l=parseInt(f.slice(S*y,S*y+S),16);C[y]=S===1?l<<4:S===2?l:S===3?l>>4:l>>8}return C}},a.toRgbString=function(h,f=16){const[S,C,y]=h;return`rgb:${x(S,f)}/${x(C,f)}/${x(y,f)}`}},5770:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const g=u(482),x=u(8742),h=u(5770),f=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=f,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}registerHandler(C,y){this._handlers[C]===void 0&&(this._handlers[C]=[]);const l=this._handlers[C];return l.push(y),{dispose:()=>{const v=l.indexOf(y);v!==-1&&l.splice(v,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=f,this._ident=0}hook(C,y){if(this.reset(),this._ident=C,this._active=this._handlers[C]||f,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(y);else this._handlerFb(this._ident,"HOOK",y)}put(C,y,l){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(C,y,l);else this._handlerFb(this._ident,"PUT",(0,g.utf32ToString)(C,y,l))}unhook(C,y=!0){if(this._active.length){let l=!1,v=this._active.length-1,m=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,l=y,m=this._stack.fallThrough,this._stack.paused=!1),!m&&l===!1){for(;v>=0&&(l=this._active[v].unhook(C),l!==!0);v--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,l;v--}for(;v>=0;v--)if(l=this._active[v].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",C);this._active=f,this._ident=0}};const S=new x.Params;S.addParam(0),a.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=S,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():S,this._data="",this._hitLimit=!1}put(C,y,l){this._hitLimit||(this._data+=(0,g.utf32ToString)(C,y,l),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(l=>(this._params=S,this._data="",this._hitLimit=!1,l));return this._params=S,this._data="",this._hitLimit=!1,y}}},2015:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const g=u(844),x=u(8742),h=u(6242),f=u(6351);class S{constructor(v){this.table=new Uint8Array(v)}setDefault(v,m){this.table.fill(v<<4|m)}add(v,m,p,N){this.table[m<<8|v]=p<<4|N}addMany(v,m,p,N){for(let k=0;k<v.length;k++)this.table[m<<8|v[k]]=p<<4|N}}a.TransitionTable=S;const C=160;a.VT500_TRANSITION_TABLE=function(){const l=new S(4095),v=Array.apply(null,Array(256)).map((M,D)=>D),m=(M,D)=>v.slice(M,D),p=m(32,127),N=m(0,24);N.push(25),N.push.apply(N,m(28,32));const k=m(0,14);let j;for(j in l.setDefault(1,0),l.addMany(p,0,2,0),k)l.addMany([24,26,153,154],j,3,0),l.addMany(m(128,144),j,3,0),l.addMany(m(144,152),j,3,0),l.add(156,j,0,0),l.add(27,j,11,1),l.add(157,j,4,8),l.addMany([152,158,159],j,0,7),l.add(155,j,11,3),l.add(144,j,11,9);return l.addMany(N,0,3,0),l.addMany(N,1,3,1),l.add(127,1,0,1),l.addMany(N,8,0,8),l.addMany(N,3,3,3),l.add(127,3,0,3),l.addMany(N,4,3,4),l.add(127,4,0,4),l.addMany(N,6,3,6),l.addMany(N,5,3,5),l.add(127,5,0,5),l.addMany(N,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(p,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(m(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(p,7,0,7),l.addMany(N,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(m(64,127),3,7,0),l.addMany(m(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(m(48,60),4,8,4),l.addMany(m(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(m(32,64),6,0,6),l.add(127,6,0,6),l.addMany(m(64,127),6,0,0),l.addMany(m(32,48),3,9,5),l.addMany(m(32,48),5,9,5),l.addMany(m(48,64),5,0,6),l.addMany(m(64,127),5,7,0),l.addMany(m(32,48),4,9,5),l.addMany(m(32,48),1,9,2),l.addMany(m(32,48),2,9,2),l.addMany(m(48,127),2,10,0),l.addMany(m(48,80),1,10,0),l.addMany(m(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(m(96,127),1,10,0),l.add(80,1,11,9),l.addMany(N,9,0,9),l.add(127,9,0,9),l.addMany(m(28,32),9,0,9),l.addMany(m(32,48),9,9,12),l.addMany(m(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(N,11,0,11),l.addMany(m(32,128),11,0,11),l.addMany(m(28,32),11,0,11),l.addMany(N,10,0,10),l.add(127,10,0,10),l.addMany(m(28,32),10,0,10),l.addMany(m(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(m(32,48),10,9,12),l.addMany(N,12,0,12),l.add(127,12,0,12),l.addMany(m(28,32),12,0,12),l.addMany(m(32,48),12,9,12),l.addMany(m(48,64),12,0,11),l.addMany(m(64,127),12,12,13),l.addMany(m(64,127),10,12,13),l.addMany(m(64,127),9,12,13),l.addMany(N,13,13,13),l.addMany(p,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(C,0,2,0),l.add(C,8,5,8),l.add(C,6,0,6),l.add(C,11,0,11),l.add(C,13,13,13),l}();class y extends g.Disposable{constructor(v=a.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new x.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(m,p,N)=>{},this._executeHandlerFb=m=>{},this._csiHandlerFb=(m,p)=>{},this._escHandlerFb=m=>{},this._errorHandlerFb=m=>m,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,g.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 f.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(v,m=[64,126]){let p=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(p=v.prefix.charCodeAt(0),p&&60>p||p>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let k=0;k<v.intermediates.length;++k){const j=v.intermediates.charCodeAt(k);if(32>j||j>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");p<<=8,p|=j}}if(v.final.length!==1)throw new Error("final must be a single byte");const N=v.final.charCodeAt(0);if(m[0]>N||N>m[1])throw new Error(`final must be in range ${m[0]} .. ${m[1]}`);return p<<=8,p|=N,p}identToString(v){const m=[];for(;v;)m.push(String.fromCharCode(255&v)),v>>=8;return m.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,m){const p=this._identifier(v,[48,126]);this._escHandlers[p]===void 0&&(this._escHandlers[p]=[]);const N=this._escHandlers[p];return N.push(m),{dispose:()=>{const k=N.indexOf(m);k!==-1&&N.splice(k,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,m){this._executeHandlers[v.charCodeAt(0)]=m}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,m){const p=this._identifier(v);this._csiHandlers[p]===void 0&&(this._csiHandlers[p]=[]);const N=this._csiHandlers[p];return N.push(m),{dispose:()=>{const k=N.indexOf(m);k!==-1&&N.splice(k,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,m){return this._dcsParser.registerHandler(this._identifier(v),m)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,m){return this._oscParser.registerHandler(v,m)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}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(v,m,p,N,k){this._parseStack.state=v,this._parseStack.handlers=m,this._parseStack.handlerPos=p,this._parseStack.transition=N,this._parseStack.chunkPos=k}parse(v,m,p){let N,k=0,j=0,M=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,M=this._parseStack.chunkPos+1;else{if(p===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const D=this._parseStack.handlers;let L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(p===!1&&L>-1){for(;L>=0&&(N=D[L](this._params),N!==!0);L--)if(N instanceof Promise)return this._parseStack.handlerPos=L,N}this._parseStack.handlers=[];break;case 4:if(p===!1&&L>-1){for(;L>=0&&(N=D[L](),N!==!0);L--)if(N instanceof Promise)return this._parseStack.handlerPos=L,N}this._parseStack.handlers=[];break;case 6:if(k=v[this._parseStack.chunkPos],N=this._dcsParser.unhook(k!==24&&k!==26,p),N)return N;k===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(k=v[this._parseStack.chunkPos],N=this._oscParser.end(k!==24&&k!==26,p),N)return N;k===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,M=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let D=M;D<m;++D){switch(k=v[D],j=this._transitions.table[this.currentState<<8|(k<160?k:C)],j>>4){case 2:for(let I=D+1;;++I){if(I>=m||(k=v[I])<32||k>126&&k<C){this._printHandler(v,D,I),D=I-1;break}if(++I>=m||(k=v[I])<32||k>126&&k<C){this._printHandler(v,D,I),D=I-1;break}if(++I>=m||(k=v[I])<32||k>126&&k<C){this._printHandler(v,D,I),D=I-1;break}if(++I>=m||(k=v[I])<32||k>126&&k<C){this._printHandler(v,D,I),D=I-1;break}}break;case 3:this._executeHandlers[k]?this._executeHandlers[k]():this._executeHandlerFb(k),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:D,code:k,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|k];let A=L?L.length-1:-1;for(;A>=0&&(N=L[A](this._params),N!==!0);A--)if(N instanceof Promise)return this._preserveStack(3,L,A,j,D),N;A<0&&this._csiHandlerFb(this._collect<<8|k,this._params),this.precedingJoinState=0;break;case 8:do switch(k){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(k-48)}while(++D<m&&(k=v[D])>47&&k<60);D--;break;case 9:this._collect<<=8,this._collect|=k;break;case 10:const F=this._escHandlers[this._collect<<8|k];let O=F?F.length-1:-1;for(;O>=0&&(N=F[O](),N!==!0);O--)if(N instanceof Promise)return this._preserveStack(4,F,O,j,D),N;O<0&&this._escHandlerFb(this._collect<<8|k),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|k,this._params);break;case 13:for(let I=D+1;;++I)if(I>=m||(k=v[I])===24||k===26||k===27||k>127&&k<C){this._dcsParser.put(v,D,I),D=I-1;break}break;case 14:if(N=this._dcsParser.unhook(k!==24&&k!==26),N)return this._preserveStack(6,[],0,j,D),N;k===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 I=D+1;;I++)if(I>=m||(k=v[I])<32||k>127&&k<C){this._oscParser.put(v,D,I),D=I-1;break}break;case 6:if(N=this._oscParser.end(k!==24&&k!==26),N)return this._preserveStack(5,[],0,j,D),N;k===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,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const g=u(5770),x=u(482),h=[];a.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(f,S){this._handlers[f]===void 0&&(this._handlers[f]=[]);const C=this._handlers[f];return C.push(S),{dispose:()=>{const y=C.indexOf(S);y!==-1&&C.splice(y,1)}}}clearHandler(f){this._handlers[f]&&delete this._handlers[f]}setHandlerFallback(f){this._handlerFb=f}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let f=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;f>=0;--f)this._active[f].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 f=this._active.length-1;f>=0;f--)this._active[f].start();else this._handlerFb(this._id,"START")}_put(f,S,C){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(f,S,C);else this._handlerFb(this._id,"PUT",(0,x.utf32ToString)(f,S,C))}start(){this.reset(),this._state=1}put(f,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const y=f[S++];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-S>0&&this._put(f,S,C)}}end(f,S=!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,l=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,C=S,l=this._stack.fallThrough,this._stack.paused=!1),!l&&C===!1){for(;y>=0&&(C=this._active[y].end(f),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",f);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(f){this._handler=f,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(f,S,C){this._hitLimit||(this._data+=(0,x.utf32ToString)(f,S,C),this._data.length>g.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(f){let S=!1;if(this._hitLimit)S=!1;else if(f&&(S=this._handler(this._data),S instanceof Promise))return S.then(C=>(this._data="",this._hitLimit=!1,C));return this._data="",this._hitLimit=!1,S}}},8742:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class g{static fromArray(h){const f=new g;if(!h.length)return f;for(let S=Array.isArray(h[0])?1:0;S<h.length;++S){const C=h[S];if(Array.isArray(C))for(let y=0;y<C.length;++y)f.addSubParam(C[y]);else f.addParam(C)}return f}constructor(h=32,f=32){if(this.maxLength=h,this.maxSubParamsLength=f,f>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(f),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new g(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 f=0;f<this.length;++f){h.push(this.params[f]);const S=this._subParamsIdx[f]>>8,C=255&this._subParamsIdx[f];C-S>0&&h.push(Array.prototype.slice.call(this._subParams,S,C))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>u?u:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>u?u:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const f=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-f>0?this._subParams.subarray(f,S):null}getSubParamsAll(){const h={};for(let f=0;f<this.length;++f){const S=this._subParamsIdx[f]>>8,C=255&this._subParamsIdx[f];C-S>0&&(h[f]=this._subParams.slice(S,C))}return h}addDigit(h){let f;if(this._rejectDigits||!(f=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[f-1];S[f-1]=~C?Math.min(10*C+h,u):h}}a.Params=g},5741:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,g){const x={instance:g,dispose:g.dispose,isDisposed:!1};this._addons.push(x),g.dispose=()=>this._wrappedAddonDispose(x),g.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let g=-1;for(let x=0;x<this._addons.length;x++)if(this._addons[x]===u){g=x;break}if(g===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(g,1)}}},8771:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const g=u(3785),x=u(511);a.BufferApiView=class{constructor(h,f){this._buffer=h,this.type=f}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 f=this._buffer.lines.get(h);if(f)return new g.BufferLineApiView(f)}getNullCell(){return new x.CellData}}},3785:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const g=u(511);a.BufferLineApiView=class{constructor(x){this._line=x}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(x,h){if(!(x<0||x>=this._line.length))return h?(this._line.loadCell(x,h),h):this._line.loadCell(x,new g.CellData)}translateToString(x,h,f){return this._line.translateToString(x,h,f)}}},8285:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const g=u(8771),x=u(8460),h=u(844);class f extends h.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new x.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new g.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new g.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=f},7975:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,g){return this._core.registerCsiHandler(u,x=>g(x.toArray()))}addCsiHandler(u,g){return this.registerCsiHandler(u,g)}registerDcsHandler(u,g){return this._core.registerDcsHandler(u,(x,h)=>g(x,h.toArray()))}addDcsHandler(u,g){return this.registerDcsHandler(u,g)}registerEscHandler(u,g){return this._core.registerEscHandler(u,g)}addEscHandler(u,g){return this.registerEscHandler(u,g)}registerOscHandler(u,g){return this._core.registerOscHandler(u,g)}addOscHandler(u,g){return this.registerOscHandler(u,g)}}},7090:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(b,a,u){var g=this&&this.__decorate||function(l,v,m,p){var N,k=arguments.length,j=k<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(l,v,m,p);else for(var M=l.length-1;M>=0;M--)(N=l[M])&&(j=(k<3?N(j):k>3?N(v,m,j):N(v,m))||j);return k>3&&j&&Object.defineProperty(v,m,j),j},x=this&&this.__param||function(l,v){return function(m,p){v(m,p,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=u(8460),f=u(844),S=u(5295),C=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let y=a.BufferService=class extends f.Disposable{get buffer(){return this.buffers.active}constructor(l){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(l.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(l,this))}resize(l,v){this.cols=l,this.rows=v,this.buffers.resize(l,v),this._onResize.fire({cols:l,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,v=!1){const m=this.buffer;let p;p=this._cachedBlankLine,p&&p.length===this.cols&&p.getFg(0)===l.fg&&p.getBg(0)===l.bg||(p=m.getBlankLine(l,v),this._cachedBlankLine=p),p.isWrapped=v;const N=m.ybase+m.scrollTop,k=m.ybase+m.scrollBottom;if(m.scrollTop===0){const j=m.lines.isFull;k===m.lines.length-1?j?m.lines.recycle().copyFrom(p):m.lines.push(p.clone()):m.lines.splice(k+1,0,p.clone()),j?this.isUserScrolling&&(m.ydisp=Math.max(m.ydisp-1,0)):(m.ybase++,this.isUserScrolling||m.ydisp++)}else{const j=k-N+1;m.lines.shiftElements(N+1,j-1,-1),m.lines.set(k,p.clone())}this.isUserScrolling||(m.ydisp=m.ybase),this._onScroll.fire(m.ydisp)}scrollLines(l,v,m){const p=this.buffer;if(l<0){if(p.ydisp===0)return;this.isUserScrolling=!0}else l+p.ydisp>=p.ybase&&(this.isUserScrolling=!1);const N=p.ydisp;p.ydisp=Math.max(Math.min(p.ydisp+l,p.ybase),0),N!==p.ydisp&&(v||this._onScroll.fire(p.ydisp))}};a.BufferService=y=g([x(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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,g){this._charsets[u]=g,this.glevel===u&&(this.charset=g)}}},1753:function(b,a,u){var g=this&&this.__decorate||function(p,N,k,j){var M,D=arguments.length,L=D<3?N:j===null?j=Object.getOwnPropertyDescriptor(N,k):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(p,N,k,j);else for(var A=p.length-1;A>=0;A--)(M=p[A])&&(L=(D<3?M(L):D>3?M(N,k,L):M(N,k))||L);return D>3&&L&&Object.defineProperty(N,k,L),L},x=this&&this.__param||function(p,N){return function(k,j){N(k,j,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const h=u(2585),f=u(8460),S=u(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:p=>p.button!==4&&p.action===1&&(p.ctrl=!1,p.alt=!1,p.shift=!1,!0)},VT200:{events:19,restrict:p=>p.action!==32},DRAG:{events:23,restrict:p=>p.action!==32||p.button!==3},ANY:{events:31,restrict:p=>!0}};function y(p,N){let k=(p.ctrl?16:0)|(p.shift?4:0)|(p.alt?8:0);return p.button===4?(k|=64,k|=p.action):(k|=3&p.button,4&p.button&&(k|=64),8&p.button&&(k|=128),p.action===32?k|=32:p.action!==0||N||(k|=3)),k}const l=String.fromCharCode,v={DEFAULT:p=>{const N=[y(p,!1)+32,p.col+32,p.row+32];return N[0]>255||N[1]>255||N[2]>255?"":`\x1B[M${l(N[0])}${l(N[1])}${l(N[2])}`},SGR:p=>{const N=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${y(p,!0)};${p.col};${p.row}${N}`},SGR_PIXELS:p=>{const N=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${y(p,!0)};${p.x};${p.y}${N}`}};let m=a.CoreMouseService=class extends S.Disposable{constructor(p,N){super(),this._bufferService=p,this._coreService=N,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new f.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const k of Object.keys(C))this.addProtocol(k,C[k]);for(const k of Object.keys(v))this.addEncoding(k,v[k]);this.reset()}addProtocol(p,N){this._protocols[p]=N}addEncoding(p,N){this._encodings[p]=N}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(p){if(!this._protocols[p])throw new Error(`unknown protocol "${p}"`);this._activeProtocol=p,this._onProtocolChange.fire(this._protocols[p].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(p){if(!this._encodings[p])throw new Error(`unknown encoding "${p}"`);this._activeEncoding=p}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(p){if(p.col<0||p.col>=this._bufferService.cols||p.row<0||p.row>=this._bufferService.rows||p.button===4&&p.action===32||p.button===3&&p.action!==32||p.button!==4&&(p.action===2||p.action===3)||(p.col++,p.row++,p.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,p,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(p))return!1;const N=this._encodings[this._activeEncoding](p);return N&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(N):this._coreService.triggerDataEvent(N,!0)),this._lastEvent=p,!0}explainEvents(p){return{down:!!(1&p),up:!!(2&p),drag:!!(4&p),move:!!(8&p),wheel:!!(16&p)}}_equalEvents(p,N,k){if(k){if(p.x!==N.x||p.y!==N.y)return!1}else if(p.col!==N.col||p.row!==N.row)return!1;return p.button===N.button&&p.action===N.action&&p.ctrl===N.ctrl&&p.alt===N.alt&&p.shift===N.shift}};a.CoreMouseService=m=g([x(0,h.IBufferService),x(1,h.ICoreService)],m)},6975:function(b,a,u){var g=this&&this.__decorate||function(m,p,N,k){var j,M=arguments.length,D=M<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,N):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,p,N,k);else for(var L=m.length-1;L>=0;L--)(j=m[L])&&(D=(M<3?j(D):M>3?j(p,N,D):j(p,N))||D);return M>3&&D&&Object.defineProperty(p,N,D),D},x=this&&this.__param||function(m,p){return function(N,k){p(N,k,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const h=u(1439),f=u(8460),S=u(844),C=u(2585),y=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=a.CoreService=class extends S.Disposable{constructor(m,p,N){super(),this._bufferService=m,this._logService=p,this._optionsService=N,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new f.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new f.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new f.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new f.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(y),this.decPrivateModes=(0,h.clone)(l)}reset(){this.modes=(0,h.clone)(y),this.decPrivateModes=(0,h.clone)(l)}triggerDataEvent(m,p=!1){if(this._optionsService.rawOptions.disableStdin)return;const N=this._bufferService.buffer;p&&this._optionsService.rawOptions.scrollOnUserInput&&N.ybase!==N.ydisp&&this._onRequestScrollToBottom.fire(),p&&this._onUserInput.fire(),this._logService.debug(`sending data "${m}"`,()=>m.split("").map(k=>k.charCodeAt(0))),this._onData.fire(m)}triggerBinaryEvent(m){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${m}"`,()=>m.split("").map(p=>p.charCodeAt(0))),this._onBinary.fire(m))}};a.CoreService=v=g([x(0,C.IBufferService),x(1,C.ILogService),x(2,C.IOptionsService)],v)},9074:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const g=u(8055),x=u(8460),h=u(844),f=u(6106);let S=0,C=0;class y extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new f.SortedList(m=>m==null?void 0:m.marker.line),this._onDecorationRegistered=this.register(new x.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new x.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)(()=>this.reset()))}registerDecoration(m){if(m.marker.isDisposed)return;const p=new l(m);if(p){const N=p.marker.onDispose(()=>p.dispose());p.onDispose(()=>{p&&(this._decorations.delete(p)&&this._onDecorationRemoved.fire(p),N.dispose())}),this._decorations.insert(p),this._onDecorationRegistered.fire(p)}return p}reset(){for(const m of this._decorations.values())m.dispose();this._decorations.clear()}*getDecorationsAtCell(m,p,N){let k=0,j=0;for(const M of this._decorations.getKeyIterator(p))k=M.options.x??0,j=k+(M.options.width??1),m>=k&&m<j&&(!N||(M.options.layer??"bottom")===N)&&(yield M)}forEachDecorationAtCell(m,p,N,k){this._decorations.forEachByKey(p,j=>{S=j.options.x??0,C=S+(j.options.width??1),m>=S&&m<C&&(!N||(j.options.layer??"bottom")===N)&&k(j)})}}a.DecorationService=y;class l extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=g.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=g.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(m){super(),this.options=m,this.onRenderEmitter=this.register(new x.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new x.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=m.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const g=u(2585),x=u(8343);class h{constructor(...S){this._entries=new Map;for(const[C,y]of S)this.set(C,y)}set(S,C){const y=this._entries.get(S);return this._entries.set(S,C),y}forEach(S){for(const[C,y]of this._entries.entries())S(C,y)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}a.ServiceCollection=h,a.InstantiationService=class{constructor(){this._services=new h,this._services.set(g.IInstantiationService,this)}setService(f,S){this._services.set(f,S)}getService(f){return this._services.get(f)}createInstance(f,...S){const C=(0,x.getServiceDependencies)(f).sort((v,m)=>v.index-m.index),y=[];for(const v of C){const m=this._services.get(v.id);if(!m)throw new Error(`[createInstance] ${f.name} depends on UNKNOWN service ${v.id}.`);y.push(m)}const l=C.length>0?C[0].index:S.length;if(S.length!==l)throw new Error(`[createInstance] First service dependency of ${f.name} at position ${l+1} conflicts with ${S.length} static arguments`);return new f(...S,...y)}}},7866:function(b,a,u){var g=this&&this.__decorate||function(l,v,m,p){var N,k=arguments.length,j=k<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(l,v,m,p);else for(var M=l.length-1;M>=0;M--)(N=l[M])&&(j=(k<3?N(j):k>3?N(v,m,j):N(v,m))||j);return k>3&&j&&Object.defineProperty(v,m,j),j},x=this&&this.__param||function(l,v){return function(m,p){v(m,p,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=u(844),f=u(2585),S={trace:f.LogLevelEnum.TRACE,debug:f.LogLevelEnum.DEBUG,info:f.LogLevelEnum.INFO,warn:f.LogLevelEnum.WARN,error:f.LogLevelEnum.ERROR,off:f.LogLevelEnum.OFF};let C,y=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=f.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let v=0;v<l.length;v++)typeof l[v]=="function"&&(l[v]=l[v]())}_log(l,v,m){this._evalLazyOptionalParams(m),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+v,...m)}trace(l,...v){var m;this._logLevel<=f.LogLevelEnum.TRACE&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.trace.bind(this._optionsService.options.logger))??console.log,l,v)}debug(l,...v){var m;this._logLevel<=f.LogLevelEnum.DEBUG&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.debug.bind(this._optionsService.options.logger))??console.log,l,v)}info(l,...v){var m;this._logLevel<=f.LogLevelEnum.INFO&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.info.bind(this._optionsService.options.logger))??console.info,l,v)}warn(l,...v){var m;this._logLevel<=f.LogLevelEnum.WARN&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.warn.bind(this._optionsService.options.logger))??console.warn,l,v)}error(l,...v){var m;this._logLevel<=f.LogLevelEnum.ERROR&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.error.bind(this._optionsService.options.logger))??console.error,l,v)}};a.LogService=y=g([x(0,f.IOptionsService)],y),a.setTraceLogger=function(l){C=l},a.traceCall=function(l,v,m){if(typeof m.value!="function")throw new Error("not supported");const p=m.value;m.value=function(...N){if(C.logLevel!==f.LogLevelEnum.TRACE)return p.apply(this,N);C.trace(`GlyphRenderer#${p.name}(${N.map(j=>JSON.stringify(j)).join(", ")})`);const k=p.apply(this,N);return C.trace(`GlyphRenderer#${p.name} return`,k),k}}},7302:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const g=u(8460),x=u(844),h=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const f=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends x.Disposable{constructor(y){super(),this._onOptionChange=this.register(new g.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l={...a.DEFAULT_OPTIONS};for(const v in y)if(v in l)try{const m=y[v];l[v]=this._sanitizeAndValidateOption(v,m)}catch(m){console.error(m)}this.rawOptions=l,this.options={...l},this._setupOptions(),this.register((0,x.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(y,l){return this.onOptionChange(v=>{v===y&&l(this.rawOptions[y])})}onMultipleOptionChange(y,l){return this.onOptionChange(v=>{y.indexOf(v)!==-1&&l()})}_setupOptions(){const y=v=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},l=(v,m)=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);m=this._sanitizeAndValidateOption(v,m),this.rawOptions[v]!==m&&(this.rawOptions[v]=m,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const m={get:y.bind(this,v),set:l.bind(this,v)};Object.defineProperty(this.options,v,m)}}_sanitizeAndValidateOption(y,l){switch(y){case"cursorStyle":if(l||(l=a.DEFAULT_OPTIONS[y]),!function(v){return v==="block"||v==="underline"||v==="bar"}(l))throw new Error(`"${l}" is not a valid value for ${y}`);break;case"wordSeparator":l||(l=a.DEFAULT_OPTIONS[y]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=f.includes(l)?l:a.DEFAULT_OPTIONS[y];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${y} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${y} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${y} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${y} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}a.OptionsService=S},2660:function(b,a,u){var g=this&&this.__decorate||function(S,C,y,l){var v,m=arguments.length,p=m<3?C:l===null?l=Object.getOwnPropertyDescriptor(C,y):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(S,C,y,l);else for(var N=S.length-1;N>=0;N--)(v=S[N])&&(p=(m<3?v(p):m>3?v(C,y,p):v(C,y))||p);return m>3&&p&&Object.defineProperty(C,y,p),p},x=this&&this.__param||function(S,C){return function(y,l){C(y,l,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const h=u(2585);let f=a.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const C=this._bufferService.buffer;if(S.id===void 0){const N=C.addMarker(C.ybase+C.y),k={data:S,id:this._nextId++,lines:[N]};return N.onDispose(()=>this._removeMarkerFromLink(k,N)),this._dataByLinkId.set(k.id,k),k.id}const y=S,l=this._getEntryIdKey(y),v=this._entriesWithId.get(l);if(v)return this.addLineToLink(v.id,C.ybase+C.y),v.id;const m=C.addMarker(C.ybase+C.y),p={id:this._nextId++,key:this._getEntryIdKey(y),data:y,lines:[m]};return m.onDispose(()=>this._removeMarkerFromLink(p,m)),this._entriesWithId.set(p.key,p),this._dataByLinkId.set(p.id,p),p.id}addLineToLink(S,C){const y=this._dataByLinkId.get(S);if(y&&y.lines.every(l=>l.line!==C)){const l=this._bufferService.buffer.addMarker(C);y.lines.push(l),l.onDispose(()=>this._removeMarkerFromLink(y,l))}}getLinkData(S){var C;return(C=this._dataByLinkId.get(S))==null?void 0:C.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,C){const y=S.lines.indexOf(C);y!==-1&&(S.lines.splice(y,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};a.OscLinkService=f=g([x(0,h.IBufferService)],f)},8343:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",g="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(x){return x[g]||[]},a.createDecorator=function(x){if(a.serviceRegistry.has(x))return a.serviceRegistry.get(x);const h=function(f,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(y,l,v){l[u]===l?l[g].push({id:y,index:v}):(l[g]=[{id:y,index:v}],l[u]=l)})(h,f,C)};return h.toString=()=>x,a.serviceRegistry.set(x,h),h}},2585:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const g=u(8343);var x;a.IBufferService=(0,g.createDecorator)("BufferService"),a.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),a.ICoreService=(0,g.createDecorator)("CoreService"),a.ICharsetService=(0,g.createDecorator)("CharsetService"),a.IInstantiationService=(0,g.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"}(x||(a.LogLevelEnum=x={})),a.ILogService=(0,g.createDecorator)("LogService"),a.IOptionsService=(0,g.createDecorator)("OptionsService"),a.IOscLinkService=(0,g.createDecorator)("OscLinkService"),a.IUnicodeService=(0,g.createDecorator)("UnicodeService"),a.IDecorationService=(0,g.createDecorator)("DecorationService")},1480:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const g=u(8460),x=u(225);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,C,y=!1){return(16777215&S)<<3|(3&C)<<1|(y?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new g.EventEmitter,this.onChange=this._onChange.event;const S=new x.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let C=0,y=0;const l=S.length;for(let v=0;v<l;++v){let m=S.charCodeAt(v);if(55296<=m&&m<=56319){if(++v>=l)return C+this.wcwidth(m);const k=S.charCodeAt(v);56320<=k&&k<=57343?m=1024*(m-55296)+k-56320+65536:C+=this.wcwidth(k)}const p=this.charProperties(m,y);let N=h.extractWidth(p);h.extractShouldJoin(p)&&(N-=h.extractWidth(y)),C+=N,y=p}return C}charProperties(S,C){return this._activeProvider.charProperties(S,C)}}a.UnicodeService=h}},_={};function E(b){var a=_[b];if(a!==void 0)return a.exports;var u=_[b]={exports:{}};return d[b].call(u.exports,u,u.exports,E),u.exports}var R={};return(()=>{var b=R;Object.defineProperty(b,"__esModule",{value:!0}),b.Terminal=void 0;const a=E(9042),u=E(3236),g=E(844),x=E(5741),h=E(8285),f=E(7975),S=E(7090),C=["cols","rows"];class y extends g.Disposable{constructor(v){super(),this._core=this.register(new u.Terminal(v)),this._addonManager=this.register(new x.AddonManager),this._publicOptions={...this._core.options};const m=N=>this._core.options[N],p=(N,k)=>{this._checkReadonlyOptions(N),this._core.options[N]=k};for(const N in this._core.options){const k={get:m.bind(this,N),set:p.bind(this,N)};Object.defineProperty(this._publicOptions,N,k)}}_checkReadonlyOptions(v){if(C.includes(v))throw new Error(`Option "${v}" 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 f.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let m="none";switch(this._core.coreMouseService.activeProtocol){case"X10":m="x10";break;case"VT200":m="vt200";break;case"DRAG":m="drag";break;case"ANY":m="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:m,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const m in v)this._publicOptions[m]=v[m]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,m=!0){this._core.input(v,m)}resize(v,m){this._verifyIntegers(v,m),this._core.resize(v,m)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,m,p){this._verifyIntegers(v,m,p),this._core.select(v,m,p)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,m){this._verifyIntegers(v,m),this._core.selectLines(v,m)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,m){this._core.write(v,m)}writeln(v,m){this._core.write(v),this._core.write(`\r
214
+ `,m)}paste(v){this._core.paste(v)}refresh(v,m){this._verifyIntegers(v,m),this._core.refresh(v,m)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return a}_verifyIntegers(...v){for(const m of v)if(m===1/0||isNaN(m)||m%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const m of v)if(m&&(m===1/0||isNaN(m)||m%1!=0||m<0))throw new Error("This API only accepts positive integers")}}b.Terminal=y})(),R})())})(_S);var nU=_S.exports,yS={exports:{}};(function(r,s){(function(d,_){r.exports=_()})(self,()=>(()=>{var d={965:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const g=u(374),x=u(509),h=u(855),f=u(859),S=u(381),C=11,y=C*Float32Array.BYTES_PER_ELEMENT;let l,v=0,m=0,p=0;class N extends f.Disposable{constructor(j,M,D,L){super(),this._terminal=j,this._gl=M,this._dimensions=D,this._optionsService=L,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const A=this._gl;x.TextureAtlas.maxAtlasPages===void 0&&(x.TextureAtlas.maxAtlasPages=Math.min(32,(0,g.throwIfFalsy)(A.getParameter(A.MAX_TEXTURE_IMAGE_UNITS))),x.TextureAtlas.maxTextureSize=(0,g.throwIfFalsy)(A.getParameter(A.MAX_TEXTURE_SIZE))),this._program=(0,g.throwIfFalsy)((0,S.createProgram)(A,`#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(ee){let te="";for(let se=1;se<ee;se++)te+=` else if (v_texpage == ${se}) { outColor = texture(u_texture[${se}], 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[${ee}];
241
+
242
+ out vec4 outColor;
243
+
244
+ void main() {
245
+ if (v_texpage == 0) {
246
+ outColor = texture(u_texture[0], v_texcoord);
247
+ } ${te}
248
+ }`}(x.TextureAtlas.maxAtlasPages))),this.register((0,f.toDisposable)(()=>A.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(A.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,g.throwIfFalsy)(A.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,g.throwIfFalsy)(A.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=A.createVertexArray(),A.bindVertexArray(this._vertexArrayObject);const F=new Float32Array([0,0,1,0,0,1,1,1]),O=A.createBuffer();this.register((0,f.toDisposable)(()=>A.deleteBuffer(O))),A.bindBuffer(A.ARRAY_BUFFER,O),A.bufferData(A.ARRAY_BUFFER,F,A.STATIC_DRAW),A.enableVertexAttribArray(0),A.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const I=new Uint8Array([0,1,2,3]),G=A.createBuffer();this.register((0,f.toDisposable)(()=>A.deleteBuffer(G))),A.bindBuffer(A.ELEMENT_ARRAY_BUFFER,G),A.bufferData(A.ELEMENT_ARRAY_BUFFER,I,A.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(A.createBuffer()),this.register((0,f.toDisposable)(()=>A.deleteBuffer(this._attributesBuffer))),A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.enableVertexAttribArray(2),A.vertexAttribPointer(2,2,A.FLOAT,!1,y,0),A.vertexAttribDivisor(2,1),A.enableVertexAttribArray(3),A.vertexAttribPointer(3,2,A.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(3,1),A.enableVertexAttribArray(4),A.vertexAttribPointer(4,1,A.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(4,1),A.enableVertexAttribArray(5),A.vertexAttribPointer(5,2,A.FLOAT,!1,y,5*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(5,1),A.enableVertexAttribArray(6),A.vertexAttribPointer(6,2,A.FLOAT,!1,y,7*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(6,1),A.enableVertexAttribArray(1),A.vertexAttribPointer(1,2,A.FLOAT,!1,y,9*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(1,1),A.useProgram(this._program);const ne=new Int32Array(x.TextureAtlas.maxAtlasPages);for(let ee=0;ee<x.TextureAtlas.maxAtlasPages;ee++)ne[ee]=ee;A.uniform1iv(this._textureLocation,ne),A.uniformMatrix4fv(this._projectionLocation,!1,S.PROJECTION_MATRIX),this._atlasTextures=[];for(let ee=0;ee<x.TextureAtlas.maxAtlasPages;ee++){const te=new S.GLTexture((0,g.throwIfFalsy)(A.createTexture()));this.register((0,f.toDisposable)(()=>A.deleteTexture(te.texture))),A.activeTexture(A.TEXTURE0+ee),A.bindTexture(A.TEXTURE_2D,te.texture),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),A.texImage2D(A.TEXTURE_2D,0,A.RGBA,1,1,0,A.RGBA,A.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[ee]=te}A.enable(A.BLEND),A.blendFunc(A.SRC_ALPHA,A.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(j,M,D,L,A,F,O,I,G){this._updateCell(this._vertices.attributes,j,M,D,L,A,F,O,I,G)}_updateCell(j,M,D,L,A,F,O,I,G,ne){v=(D*this._terminal.cols+M)*C,L!==h.NULL_CELL_CODE&&L!==void 0?this._atlas&&(l=I&&I.length>1?this._atlas.getRasterizedGlyphCombinedChar(I,A,F,O,!1):this._atlas.getRasterizedGlyph(L,A,F,O,!1),m=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),A!==ne&&l.offset.x>m?(p=l.offset.x-m,j[v]=-(l.offset.x-p)+this._dimensions.device.char.left,j[v+1]=-l.offset.y+this._dimensions.device.char.top,j[v+2]=(l.size.x-p)/this._dimensions.device.canvas.width,j[v+3]=l.size.y/this._dimensions.device.canvas.height,j[v+4]=l.texturePage,j[v+5]=l.texturePositionClipSpace.x+p/this._atlas.pages[l.texturePage].canvas.width,j[v+6]=l.texturePositionClipSpace.y,j[v+7]=l.sizeClipSpace.x-p/this._atlas.pages[l.texturePage].canvas.width,j[v+8]=l.sizeClipSpace.y):(j[v]=-l.offset.x+this._dimensions.device.char.left,j[v+1]=-l.offset.y+this._dimensions.device.char.top,j[v+2]=l.size.x/this._dimensions.device.canvas.width,j[v+3]=l.size.y/this._dimensions.device.canvas.height,j[v+4]=l.texturePage,j[v+5]=l.texturePositionClipSpace.x,j[v+6]=l.texturePositionClipSpace.y,j[v+7]=l.sizeClipSpace.x,j[v+8]=l.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,g.allowRescaling)(L,G,l.size.x,this._dimensions.device.cell.width)&&(j[v+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):j.fill(0,v,v+C-1-2)}clear(){const j=this._terminal,M=j.cols*j.rows*C;this._vertices.count!==M?this._vertices.attributes=new Float32Array(M):this._vertices.attributes.fill(0);let D=0;for(;D<this._vertices.attributesBuffers.length;D++)this._vertices.count!==M?this._vertices.attributesBuffers[D]=new Float32Array(M):this._vertices.attributesBuffers[D].fill(0);this._vertices.count=M,D=0;for(let L=0;L<j.rows;L++)for(let A=0;A<j.cols;A++)this._vertices.attributes[D+9]=A/j.cols,this._vertices.attributes[D+10]=L/j.rows,D+=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 M=this._gl;M.useProgram(this._program),M.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const D=this._vertices.attributesBuffers[this._activeBuffer];let L=0;for(let A=0;A<j.lineLengths.length;A++){const F=A*this._terminal.cols*C,O=this._vertices.attributes.subarray(F,F+j.lineLengths[A]*C);D.set(O,L),L+=O.length}M.bindBuffer(M.ARRAY_BUFFER,this._attributesBuffer),M.bufferData(M.ARRAY_BUFFER,D.subarray(0,L),M.STREAM_DRAW);for(let A=0;A<this._atlas.pages.length;A++)this._atlas.pages[A].version!==this._atlasTextures[A].version&&this._bindAtlasPageTexture(M,this._atlas,A);M.drawElementsInstanced(M.TRIANGLE_STRIP,4,M.UNSIGNED_BYTE,0,L/C)}setAtlas(j){this._atlas=j;for(const M of this._atlasTextures)M.version=-1}_bindAtlasPageTexture(j,M,D){j.activeTexture(j.TEXTURE0+D),j.bindTexture(j.TEXTURE_2D,this._atlasTextures[D].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,M.pages[D].canvas),j.generateMipmap(j.TEXTURE_2D),this._atlasTextures[D].version=M.pages[D].version}setDimensions(j){this._dimensions=j}}a.GlyphRenderer=N},742:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const g=u(374),x=u(859),h=u(310),f=u(381),S=8*Float32Array.BYTES_PER_ELEMENT;class C{constructor(){this.attributes=new Float32Array(160),this.count=0}}let y=0,l=0,v=0,m=0,p=0,N=0,k=0;class j extends x.Disposable{constructor(D,L,A,F){super(),this._terminal=D,this._gl=L,this._dimensions=A,this._themeService=F,this._vertices=new C,this._verticesCursor=new C;const O=this._gl;this._program=(0,g.throwIfFalsy)((0,f.createProgram)(O,`#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,x.toDisposable)(()=>O.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(O.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=O.createVertexArray(),O.bindVertexArray(this._vertexArrayObject);const I=new Float32Array([0,0,1,0,0,1,1,1]),G=O.createBuffer();this.register((0,x.toDisposable)(()=>O.deleteBuffer(G))),O.bindBuffer(O.ARRAY_BUFFER,G),O.bufferData(O.ARRAY_BUFFER,I,O.STATIC_DRAW),O.enableVertexAttribArray(3),O.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const ne=new Uint8Array([0,1,2,3]),ee=O.createBuffer();this.register((0,x.toDisposable)(()=>O.deleteBuffer(ee))),O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,ee),O.bufferData(O.ELEMENT_ARRAY_BUFFER,ne,O.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(O.createBuffer()),this.register((0,x.toDisposable)(()=>O.deleteBuffer(this._attributesBuffer))),O.bindBuffer(O.ARRAY_BUFFER,this._attributesBuffer),O.enableVertexAttribArray(0),O.vertexAttribPointer(0,2,O.FLOAT,!1,S,0),O.vertexAttribDivisor(0,1),O.enableVertexAttribArray(1),O.vertexAttribPointer(1,2,O.FLOAT,!1,S,2*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(1,1),O.enableVertexAttribArray(2),O.vertexAttribPointer(2,4,O.FLOAT,!1,S,4*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(2,1),this._updateCachedColors(F.colors),this.register(this._themeService.onChangeColors(te=>{this._updateCachedColors(te),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(D){const L=this._gl;L.useProgram(this._program),L.bindVertexArray(this._vertexArrayObject),L.uniformMatrix4fv(this._projectionLocation,!1,f.PROJECTION_MATRIX),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.bufferData(L.ARRAY_BUFFER,D.attributes,L.DYNAMIC_DRAW),L.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,L.UNSIGNED_BYTE,0,D.count)}handleResize(){this._updateViewportRectangle()}setDimensions(D){this._dimensions=D}_updateCachedColors(D){this._bgFloat=this._colorToFloat32Array(D.background),this._cursorFloat=this._colorToFloat32Array(D.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(D){const L=this._terminal,A=this._vertices;let F,O,I,G,ne,ee,te,se,B,W,X,Y=1;for(F=0;F<L.rows;F++){for(I=-1,G=0,ne=0,ee=!1,O=0;O<L.cols;O++)te=(F*L.cols+O)*h.RENDER_MODEL_INDICIES_PER_CELL,se=D.cells[te+h.RENDER_MODEL_BG_OFFSET],B=D.cells[te+h.RENDER_MODEL_FG_OFFSET],W=!!(67108864&B),(se!==G||B!==ne&&(ee||W))&&((G!==0||ee&&ne!==0)&&(X=8*Y++,this._updateRectangle(A,X,ne,G,I,O,F)),I=O,G=se,ne=B,ee=W);(G!==0||ee&&ne!==0)&&(X=8*Y++,this._updateRectangle(A,X,ne,G,I,L.cols,F))}A.count=Y}updateCursor(D){const L=this._verticesCursor,A=D.cursor;if(!A||A.style==="block")return void(L.count=0);let F,O=0;A.style!=="bar"&&A.style!=="outline"||(F=8*O++,this._addRectangleFloat(L.attributes,F,A.x*this._dimensions.device.cell.width,A.y*this._dimensions.device.cell.height,A.style==="bar"?A.dpr*A.cursorWidth:A.dpr,this._dimensions.device.cell.height,this._cursorFloat)),A.style!=="underline"&&A.style!=="outline"||(F=8*O++,this._addRectangleFloat(L.attributes,F,A.x*this._dimensions.device.cell.width,(A.y+1)*this._dimensions.device.cell.height-A.dpr,A.width*this._dimensions.device.cell.width,A.dpr,this._cursorFloat)),A.style==="outline"&&(F=8*O++,this._addRectangleFloat(L.attributes,F,A.x*this._dimensions.device.cell.width,A.y*this._dimensions.device.cell.height,A.width*this._dimensions.device.cell.width,A.dpr,this._cursorFloat),F=8*O++,this._addRectangleFloat(L.attributes,F,(A.x+A.width)*this._dimensions.device.cell.width-A.dpr,A.y*this._dimensions.device.cell.height,A.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.count=O}_updateRectangle(D,L,A,F,O,I,G){if(67108864&A)switch(50331648&A){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&A].rgba;break;case 50331648:y=(16777215&A)<<8;break;default:y=this._themeService.colors.foreground.rgba}else switch(50331648&F){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&F].rgba;break;case 50331648:y=(16777215&F)<<8;break;default:y=this._themeService.colors.background.rgba}D.attributes.length<L+4&&(D.attributes=(0,f.expandFloat32Array)(D.attributes,this._terminal.rows*this._terminal.cols*8)),l=O*this._dimensions.device.cell.width,v=G*this._dimensions.device.cell.height,m=(y>>24&255)/255,p=(y>>16&255)/255,N=(y>>8&255)/255,k=1,this._addRectangle(D.attributes,L,l,v,(I-O)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,m,p,N,k)}_addRectangle(D,L,A,F,O,I,G,ne,ee,te){D[L]=A/this._dimensions.device.canvas.width,D[L+1]=F/this._dimensions.device.canvas.height,D[L+2]=O/this._dimensions.device.canvas.width,D[L+3]=I/this._dimensions.device.canvas.height,D[L+4]=G,D[L+5]=ne,D[L+6]=ee,D[L+7]=te}_addRectangleFloat(D,L,A,F,O,I,G){D[L]=A/this._dimensions.device.canvas.width,D[L+1]=F/this._dimensions.device.canvas.height,D[L+2]=O/this._dimensions.device.canvas.width,D[L+3]=I/this._dimensions.device.canvas.height,D[L+4]=G[0],D[L+5]=G[1],D[L+6]=G[2],D[L+7]=G[3]}_colorToFloat32Array(D){return new Float32Array([(D.rgba>>24&255)/255,(D.rgba>>16&255)/255,(D.rgba>>8&255)/255,(255&D.rgba)/255])}}a.RectangleRenderer=j},310:(b,a,u)=>{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 g=u(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,g.createSelectionRenderModel)()}resize(x,h){const f=x*h*a.RENDER_MODEL_INDICIES_PER_CELL;f!==this.cells.length&&(this.cells=new Uint32Array(f),this.lineLengths=new Uint32Array(h))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const g=u(820),x=u(274),h=u(627),f=u(457),S=u(56),C=u(374),y=u(345),l=u(859),v=u(147),m=u(782),p=u(855),N=u(965),k=u(742),j=u(310),M=u(733);class D extends l.Disposable{constructor(O,I,G,ne,ee,te,se,B,W){super(),this._terminal=O,this._characterJoinerService=I,this._charSizeService=G,this._coreBrowserService=ne,this._coreService=ee,this._decorationService=te,this._optionsService=se,this._themeService=B,this._cursorBlinkStateManager=new l.MutableDisposable,this._charAtlasDisposable=this.register(new l.MutableDisposable),this._observerDisposable=this.register(new l.MutableDisposable),this._model=new j.RenderModel,this._workCell=new m.CellData,this._workCell2=new m.CellData,this._rectangleRenderer=this.register(new l.MutableDisposable),this._glyphRenderer=this.register(new l.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 x.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new M.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,se,this._themeService)],this.dimensions=(0,C.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(se.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const X={antialias:!1,depth:!1,preserveDrawingBuffer:W};if(this._gl=this._canvas.getContext("webgl2",X),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextlost",Y=>{console.log("webglcontextlost event received"),Y.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(Y)},3e3)})),this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextrestored",Y=>{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,S.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(Y,ve)=>this._setCanvasDevicePixelDimensions(Y,ve)),this.register(this._coreBrowserService.onWindowChange(Y=>{this._observerDisposable.value=(0,S.observeDevicePixelDimensions)(this._canvas,Y,(ve,he)=>this._setCanvasDevicePixelDimensions(ve,he))})),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,l.toDisposable)(()=>{var Y;for(const ve of this._renderLayers)ve.dispose();(Y=this._canvas.parentElement)==null||Y.removeChild(this._canvas),(0,h.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var O;return(O=this._charAtlas)==null?void 0:O.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(O,I){var G,ne,ee,te;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const se of this._renderLayers)se.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`,(G=this._rectangleRenderer.value)==null||G.setDimensions(this.dimensions),(ne=this._rectangleRenderer.value)==null||ne.handleResize(),(ee=this._glyphRenderer.value)==null||ee.setDimensions(this.dimensions),(te=this._glyphRenderer.value)==null||te.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var O;for(const I of this._renderLayers)I.handleBlur(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.pause(),this._requestRedrawViewport()}handleFocus(){var O;for(const I of this._renderLayers)I.handleFocus(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.resume(),this._requestRedrawViewport()}handleSelectionChanged(O,I,G){for(const ne of this._renderLayers)ne.handleSelectionChanged(this._terminal,O,I,G);this._model.selection.update(this._core,O,I,G),this._requestRedrawViewport()}handleCursorMove(){var O;for(const I of this._renderLayers)I.handleCursorMove(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new k.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new N.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var I;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const O=(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!==O&&(this._onChangeTextureAtlas.fire(O.pages[0].canvas),this._charAtlasDisposable.value=(0,l.getDisposeArrayDisposable)([(0,y.forwardEvent)(O.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,y.forwardEvent)(O.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=O,this._charAtlas.warmUp(),(I=this._glyphRenderer.value)==null||I.setAtlas(this._charAtlas)}_clearModel(O){var I;this._model.clear(),O&&((I=this._glyphRenderer.value)==null||I.clear())}clearTextureAtlas(){var O;(O=this._charAtlas)==null||O.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var O;this._clearModel(!0);for(const I of this._renderLayers)I.reset(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(O){return-1}deregisterCharacterJoiner(O){return!1}renderRows(O,I){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 G of this._renderLayers)G.handleGridChanged(this._terminal,O,I);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(O,I),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 f.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(O,I){const G=this._core;let ne,ee,te,se,B,W,X,Y,ve,he,Me,me,ie,$,_e=this._workCell;O=A(O,G.rows-1,0),I=A(I,G.rows-1,0);const de=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,Ie=de-G.buffer.ydisp,Ue=Math.min(this._terminal.buffer.active.cursorX,G.cols-1);let tt=-1;const Qe=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let st=!1;for(ee=O;ee<=I;ee++)for(te=ee+G.buffer.ydisp,se=G.buffer.lines.get(te),this._model.lineLengths[ee]=0,B=this._characterJoinerService.getJoinedCharacters(te),ie=0;ie<G.cols;ie++)if(ne=this._cellColorResolver.result.bg,se.loadCell(ie,_e),ie===0&&(ne=this._cellColorResolver.result.bg),W=!1,X=ie,B.length>0&&ie===B[0][0]&&(W=!0,Y=B.shift(),_e=new L(_e,se.translateToString(!0,Y[0],Y[1]),Y[1]-Y[0]),X=Y[1]-1),ve=_e.getChars(),he=_e.getCode(),me=(ee*G.cols+ie)*j.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(_e,ie,te,this.dimensions.device.cell.width),Qe&&te===de&&(ie===Ue&&(this._model.cursor={x:Ue,y:Ie,width:_e.getWidth(),style:this._coreBrowserService.isFocused?G.options.cursorStyle||"block":G.options.cursorInactiveStyle,cursorWidth:G.options.cursorWidth,dpr:this._devicePixelRatio},tt=Ue+_e.getWidth()-1),ie>=Ue&&ie<=tt&&(this._coreBrowserService.isFocused&&(G.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&G.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)),he!==p.NULL_CELL_CODE&&(this._model.lineLengths[ee]=ie+1),(this._model.cells[me]!==he||this._model.cells[me+j.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[me+j.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[me+j.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(st=!0,ve.length>1&&(he|=j.COMBINED_CHAR_BIT_MASK),this._model.cells[me]=he,this._model.cells[me+j.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[me+j.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[me+j.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,Me=_e.getWidth(),this._glyphRenderer.value.updateCell(ie,ee,he,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,ve,Me,ne),W))for(_e=this._workCell,ie++;ie<X;ie++)$=(ee*G.cols+ie)*j.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(ie,ee,p.NULL_CELL_CODE,0,0,0,p.NULL_CELL_CHAR,0,0),this._model.cells[$]=p.NULL_CELL_CODE,this._model.cells[$+j.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[$+j.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[$+j.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;st&&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(O,I){this._canvas.width===O&&this._canvas.height===I||(this._canvas.width=O,this._canvas.height=I,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const O=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:O,end:O})}}a.WebglRenderer=D;class L extends v.AttributeData{constructor(O,I,G){super(),this.content=0,this.combinedData="",this.fg=O.fg,this.bg=O.bg,this.combinedData=I,this._width=G}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(O){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function A(F,O,I=0){return Math.max(Math.min(F,O),I)}a.JoinedCellData=L},381:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const g=u(374);function x(h,f,S){const C=(0,g.throwIfFalsy)(h.createShader(f));if(h.shaderSource(C,S),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,f,S){const C=(0,g.throwIfFalsy)(h.createProgram());if(h.attachShader(C,(0,g.throwIfFalsy)(x(h,h.VERTEX_SHADER,f))),h.attachShader(C,(0,g.throwIfFalsy)(x(h,h.FRAGMENT_SHADER,S))),h.linkProgram(C),h.getProgramParameter(C,h.LINK_STATUS))return C;console.error(h.getProgramInfoLog(C)),h.deleteProgram(C)},a.createShader=x,a.expandFloat32Array=function(h,f){const S=Math.min(2*h.length,f),C=new Float32Array(S);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,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const g=u(627),x=u(237),h=u(374),f=u(859);class S extends f.Disposable{constructor(y,l,v,m,p,N,k,j){super(),this._container=l,this._alpha=p,this._coreBrowserService=N,this._optionsService=k,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-${v}-layer`),this._canvas.style.zIndex=m.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(M=>{this._refreshCharAtlas(y,M),this.reset(y)})),this.register((0,f.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,l,v){}handleSelectionChanged(y,l,v,m=!1){}_setTransparency(y,l){if(l===this._alpha)return;const v=this._canvas;this._alpha=l,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,v),this._refreshCharAtlas(y,this._themeService.colors),this.handleGridChanged(y,0,y.rows-1)}_refreshCharAtlas(y,l){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,g.acquireTextureAtlas)(y,this._optionsService.rawOptions,l,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(y,l){this._deviceCellWidth=l.device.cell.width,this._deviceCellHeight=l.device.cell.height,this._deviceCharWidth=l.device.char.width,this._deviceCharHeight=l.device.char.height,this._deviceCharLeft=l.device.char.left,this._deviceCharTop=l.device.char.top,this._canvas.width=l.device.canvas.width,this._canvas.height=l.device.canvas.height,this._canvas.style.width=`${l.css.canvas.width}px`,this._canvas.style.height=`${l.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(y,this._themeService.colors)}_fillBottomLineAtCells(y,l,v=1){this._ctx.fillRect(y*this._deviceCellWidth,(l+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,v*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,l,v,m){this._alpha?this._ctx.clearRect(y*this._deviceCellWidth,l*this._deviceCellHeight,v*this._deviceCellWidth,m*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(y*this._deviceCellWidth,l*this._deviceCellHeight,v*this._deviceCellWidth,m*this._deviceCellHeight))}_fillCharTrueColor(y,l,v,m){this._ctx.font=this._getFont(y,!1,!1),this._ctx.textBaseline=x.TEXT_BASELINE,this._clipCell(v,m,l.getWidth()),this._ctx.fillText(l.getChars(),v*this._deviceCellWidth+this._deviceCharLeft,m*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(y,l,v){this._ctx.beginPath(),this._ctx.rect(y*this._deviceCellWidth,l*this._deviceCellHeight,v*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(y,l,v){return`${v?"italic":""} ${l?y.options.fontWeightBold:y.options.fontWeight} ${y.options.fontSize*this._coreBrowserService.dpr}px ${y.options.fontFamily}`}}a.BaseRenderLayer=S},733:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const g=u(197),x=u(237),h=u(592);class f extends h.BaseRenderLayer{constructor(C,y,l,v,m,p,N){super(l,C,"link",y,!0,m,p,N),this.register(v.onShowLinkUnderline(k=>this._handleShowLinkUnderline(k))),this.register(v.onHideLinkUnderline(k=>this._handleHideLinkUnderline(k)))}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===x.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:C.fg!==void 0&&(0,g.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=f},820:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,g,x,h){u.addEventListener(g,x,h);let f=!1;return{dispose:()=>{f||(f=!0,u.removeEventListener(g,x,h))}}}},274:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const g=u(855),x=u(160),h=u(374);let f,S=0,C=0,y=!1,l=!1,v=!1,m=0;a.CellColorResolver=class{constructor(p,N,k,j,M,D){this._terminal=p,this._optionService=N,this._selectionRenderModel=k,this._decorationService=j,this._coreBrowserService=M,this._themeService=D,this.result={fg:0,bg:0,ext:0}}resolve(p,N,k,j){if(this.result.bg=p.bg,this.result.fg=p.fg,this.result.ext=268435456&p.bg?p.extended.ext:0,C=0,S=0,l=!1,y=!1,v=!1,f=this._themeService.colors,m=0,p.getCode()!==g.NULL_CELL_CODE&&p.extended.underlineStyle===4){const M=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));m=N*j%(2*Math.round(M))}if(this._decorationService.forEachDecorationAtCell(N,k,"bottom",M=>{M.backgroundColorRGB&&(C=M.backgroundColorRGB.rgba>>8&16777215,l=!0),M.foregroundColorRGB&&(S=M.foregroundColorRGB.rgba>>8&16777215,y=!0)}),v=this._selectionRenderModel.isCellSelected(this._terminal,N,k),v){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=x.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(l=!0,f.selectionForeground&&(S=f.selectionForeground.rgba>>8&16777215,y=!0),(0,h.treatGlyphAsBackgroundColor)(p.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))S=(this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:S=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:S=(16777215&this.result.fg)<<8|255;break;default:S=this._themeService.colors.foreground.rgba}S=x.rgba.blend(S,4294967040&(this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}y=!0}}this._decorationService.forEachDecorationAtCell(N,k,"top",M=>{M.backgroundColorRGB&&(C=M.backgroundColorRGB.rgba>>8&16777215,l=!0),M.foregroundColorRGB&&(S=M.foregroundColorRGB.rgba>>8&16777215,y=!0)}),l&&(C=v?-16777216&p.bg&-134217729|C|50331648:-16777216&p.bg|C|50331648),y&&(S=-16777216&p.fg&-67108865|S|50331648),67108864&this.result.fg&&(l&&!y&&(S=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&f.background.rgba>>8|50331648,y=!0),!l&&y&&(C=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&f.foreground.rgba>>8|50331648,l=!0)),f=void 0,this.result.bg=l?C:this.result.bg,this.result.fg=y?S:this.result.fg,this.result.ext&=536870911,this.result.ext|=m<<29&3758096384}}},627:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const g=u(509),x=u(197),h=[];a.acquireTextureAtlas=function(f,S,C,y,l,v,m,p){const N=(0,x.generateConfig)(y,l,v,m,S,C,p);for(let M=0;M<h.length;M++){const D=h[M],L=D.ownedBy.indexOf(f);if(L>=0){if((0,x.configEquals)(D.config,N))return D.atlas;D.ownedBy.length===1?(D.atlas.dispose(),h.splice(M,1)):D.ownedBy.splice(L,1);break}}for(let M=0;M<h.length;M++){const D=h[M];if((0,x.configEquals)(D.config,N))return D.ownedBy.push(f),D.atlas}const k=f._core,j={atlas:new g.TextureAtlas(document,N,k.unicodeService),config:N,ownedBy:[f]};return h.push(j),j.atlas},a.removeTerminalFromCache=function(f){for(let S=0;S<h.length;S++){const C=h[S].ownedBy.indexOf(f);if(C!==-1){h[S].ownedBy.length===1?(h[S].atlas.dispose(),h.splice(S,1)):h[S].ownedBy.splice(C,1);break}}}},197:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const g=u(160);a.generateConfig=function(x,h,f,S,C,y,l){const v={foreground:y.foreground,background:y.background,cursor:g.NULL_COLOR,cursorAccent:g.NULL_COLOR,selectionForeground:g.NULL_COLOR,selectionBackgroundTransparent:g.NULL_COLOR,selectionBackgroundOpaque:g.NULL_COLOR,selectionInactiveBackgroundTransparent:g.NULL_COLOR,selectionInactiveBackgroundOpaque:g.NULL_COLOR,ansi:y.ansi.slice(),contrastCache:y.contrastCache,halfContrastCache:y.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:l,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:x,deviceCellHeight:h,deviceCharWidth:f,deviceCharHeight:S,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:v}},a.configEquals=function(x,h){for(let f=0;f<x.colors.ansi.length;f++)if(x.colors.ansi[f].rgba!==h.colors.ansi[f].rgba)return!1;return x.devicePixelRatio===h.devicePixelRatio&&x.customGlyphs===h.customGlyphs&&x.lineHeight===h.lineHeight&&x.letterSpacing===h.letterSpacing&&x.fontFamily===h.fontFamily&&x.fontSize===h.fontSize&&x.fontWeight===h.fontWeight&&x.fontWeightBold===h.fontWeightBold&&x.allowTransparency===h.allowTransparency&&x.deviceCharWidth===h.deviceCharWidth&&x.deviceCharHeight===h.deviceCharHeight&&x.drawBoldTextInBrightColors===h.drawBoldTextInBrightColors&&x.minimumContrastRatio===h.minimumContrastRatio&&x.colors.foreground.rgba===h.colors.foreground.rgba&&x.colors.background.rgba===h.colors.background.rgba},a.is256Color=function(x){return(50331648&x)==16777216||(50331648&x)==33554432}},237:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const g=u(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},457:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(u,g){this._renderCallback=u,this._coreBrowserService=g,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const g=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,g>0)return void this._restartInterval(g)}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 g=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(g)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},u)}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,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const g=u(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 x={"░":[[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,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"║":{1:(y,l)=>`M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1`},"╒":{1:(y,l)=>`M.5,1 L.5,${.5-l} L1,${.5-l} M.5,${.5+l} L1,${.5+l}`},"╓":{1:(y,l)=>`M${.5-y},1 L${.5-y},.5 L1,.5 M${.5+y},.5 L${.5+y},1`},"╔":{1:(y,l)=>`M1,${.5-l} L${.5-y},${.5-l} L${.5-y},1 M1,${.5+l} L${.5+y},${.5+l} L${.5+y},1`},"╕":{1:(y,l)=>`M0,${.5-l} L.5,${.5-l} L.5,1 M0,${.5+l} L.5,${.5+l}`},"╖":{1:(y,l)=>`M${.5+y},1 L${.5+y},.5 L0,.5 M${.5-y},.5 L${.5-y},1`},"╗":{1:(y,l)=>`M0,${.5+l} L${.5-y},${.5+l} L${.5-y},1 M0,${.5-l} L${.5+y},${.5-l} L${.5+y},1`},"╘":{1:(y,l)=>`M.5,0 L.5,${.5+l} L1,${.5+l} M.5,${.5-l} L1,${.5-l}`},"╙":{1:(y,l)=>`M1,.5 L${.5-y},.5 L${.5-y},0 M${.5+y},.5 L${.5+y},0`},"╚":{1:(y,l)=>`M1,${.5-l} L${.5+y},${.5-l} L${.5+y},0 M1,${.5+l} L${.5-y},${.5+l} L${.5-y},0`},"╛":{1:(y,l)=>`M0,${.5+l} L.5,${.5+l} L.5,0 M0,${.5-l} L.5,${.5-l}`},"╜":{1:(y,l)=>`M0,.5 L${.5+y},.5 L${.5+y},0 M${.5-y},.5 L${.5-y},0`},"╝":{1:(y,l)=>`M0,${.5-l} L${.5-y},${.5-l} L${.5-y},0 M0,${.5+l} L${.5+y},${.5+l} L${.5+y},0`},"╞":{1:(y,l)=>`M.5,0 L.5,1 M.5,${.5-l} L1,${.5-l} M.5,${.5+l} L1,${.5+l}`},"╟":{1:(y,l)=>`M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1 M${.5+y},.5 L1,.5`},"╠":{1:(y,l)=>`M${.5-y},0 L${.5-y},1 M1,${.5+l} L${.5+y},${.5+l} L${.5+y},1 M1,${.5-l} L${.5+y},${.5-l} L${.5+y},0`},"╡":{1:(y,l)=>`M.5,0 L.5,1 M0,${.5-l} L.5,${.5-l} M0,${.5+l} L.5,${.5+l}`},"╢":{1:(y,l)=>`M0,.5 L${.5-y},.5 M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1`},"╣":{1:(y,l)=>`M${.5+y},0 L${.5+y},1 M0,${.5+l} L${.5-y},${.5+l} L${.5-y},1 M0,${.5-l} L${.5-y},${.5-l} L${.5-y},0`},"╤":{1:(y,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l} M.5,${.5+l} L.5,1`},"╥":{1:(y,l)=>`M0,.5 L1,.5 M${.5-y},.5 L${.5-y},1 M${.5+y},.5 L${.5+y},1`},"╦":{1:(y,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L${.5-y},${.5+l} L${.5-y},1 M1,${.5+l} L${.5+y},${.5+l} L${.5+y},1`},"╧":{1:(y,l)=>`M.5,0 L.5,${.5-l} M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"╨":{1:(y,l)=>`M0,.5 L1,.5 M${.5-y},.5 L${.5-y},0 M${.5+y},.5 L${.5+y},0`},"╩":{1:(y,l)=>`M0,${.5+l} L1,${.5+l} M0,${.5-l} L${.5-y},${.5-l} L${.5-y},0 M1,${.5-l} L${.5+y},${.5-l} L${.5+y},0`},"╪":{1:(y,l)=>`M.5,0 L.5,1 M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"╫":{1:(y,l)=>`M0,.5 L1,.5 M${.5-y},0 L${.5-y},1 M${.5+y},0 L${.5+y},1`},"╬":{1:(y,l)=>`M0,${.5+l} L${.5-y},${.5+l} L${.5-y},1 M1,${.5+l} L${.5+y},${.5+l} L${.5+y},1 M0,${.5-l} L${.5-y},${.5-l} L${.5-y},0 M1,${.5-l} L${.5+y},${.5-l} 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,l)=>`M.5,1 L.5,${.5+l/.15*.5} C.5,${.5+l/.15*.5},.5,.5,1,.5`},"╮":{1:(y,l)=>`M.5,1 L.5,${.5+l/.15*.5} C.5,${.5+l/.15*.5},.5,.5,0,.5`},"╯":{1:(y,l)=>`M.5,0 L.5,${.5-l/.15*.5} C.5,${.5-l/.15*.5},.5,.5,0,.5`},"╰":{1:(y,l)=>`M.5,0 L.5,${.5-l/.15*.5} C.5,${.5-l/.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,l,v,m,p,N,k,j){const M=a.blockElementDefinitions[l];if(M)return function(F,O,I,G,ne,ee){for(let te=0;te<O.length;te++){const se=O[te],B=ne/8,W=ee/8;F.fillRect(I+se.x*B,G+se.y*W,se.w*B,se.h*W)}}(y,M,v,m,p,N),!0;const D=x[l];if(D)return function(F,O,I,G,ne,ee){let te=h.get(O);te||(te=new Map,h.set(O,te));const se=F.fillStyle;if(typeof se!="string")throw new Error(`Unexpected fillStyle type "${se}"`);let B=te.get(se);if(!B){const W=O[0].length,X=O.length,Y=F.canvas.ownerDocument.createElement("canvas");Y.width=W,Y.height=X;const ve=(0,g.throwIfFalsy)(Y.getContext("2d")),he=new ImageData(W,X);let Me,me,ie,$;if(se.startsWith("#"))Me=parseInt(se.slice(1,3),16),me=parseInt(se.slice(3,5),16),ie=parseInt(se.slice(5,7),16),$=se.length>7&&parseInt(se.slice(7,9),16)||1;else{if(!se.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${se}" when drawing pattern glyph`);[Me,me,ie,$]=se.substring(5,se.length-1).split(",").map(_e=>parseFloat(_e))}for(let _e=0;_e<X;_e++)for(let de=0;de<W;de++)he.data[4*(_e*W+de)]=Me,he.data[4*(_e*W+de)+1]=me,he.data[4*(_e*W+de)+2]=ie,he.data[4*(_e*W+de)+3]=O[_e][de]*(255*$);ve.putImageData(he,0,0),B=(0,g.throwIfFalsy)(F.createPattern(Y,null)),te.set(se,B)}F.fillStyle=B,F.fillRect(I,G,ne,ee)}(y,D,v,m,p,N),!0;const L=a.boxDrawingDefinitions[l];if(L)return function(F,O,I,G,ne,ee,te){F.strokeStyle=F.fillStyle;for(const[se,B]of Object.entries(O)){let W;F.beginPath(),F.lineWidth=te*Number.parseInt(se),W=typeof B=="function"?B(.15,.15/ee*ne):B;for(const X of W.split(" ")){const Y=X[0],ve=S[Y];if(!ve){console.error(`Could not find drawing instructions for "${Y}"`);continue}const he=X.substring(1).split(",");he[0]&&he[1]&&ve(F,C(he,ne,ee,I,G,!0,te))}F.stroke(),F.closePath()}}(y,L,v,m,p,N,j),!0;const A=a.powerlineDefinitions[l];return!!A&&(function(F,O,I,G,ne,ee,te,se){const B=new Path2D;B.rect(I,G,ne,ee),F.clip(B),F.beginPath();const W=te/12;F.lineWidth=se*W;for(const X of O.d.split(" ")){const Y=X[0],ve=S[Y];if(!ve){console.error(`Could not find drawing instructions for "${Y}"`);continue}const he=X.substring(1).split(",");he[0]&&he[1]&&ve(F,C(he,ne,ee,I,G,!1,se,(O.leftPadding??0)*(W/2),(O.rightPadding??0)*(W/2)))}O.type===1?(F.strokeStyle=F.fillStyle,F.stroke()):F.fill(),F.closePath()}(y,A,v,m,p,N,k,j),!0)};const h=new Map;function f(y,l,v=0){return Math.max(Math.min(y,l),v)}const S={C:(y,l)=>y.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]),L:(y,l)=>y.lineTo(l[0],l[1]),M:(y,l)=>y.moveTo(l[0],l[1])};function C(y,l,v,m,p,N,k,j=0,M=0){const D=y.map(L=>parseFloat(L)||parseInt(L));if(D.length<2)throw new Error("Too few arguments for instruction");for(let L=0;L<D.length;L+=2)D[L]*=l-j*k-M*k,N&&D[L]!==0&&(D[L]=f(Math.round(D[L]+.5)-.5,l,0)),D[L]+=m+j*k;for(let L=1;L<D.length;L+=2)D[L]*=v,N&&D[L]!==0&&(D[L]=f(Math.round(D[L]+.5)-.5,v,0)),D[L]+=p;return D}},56:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const g=u(859);a.observeDevicePixelDimensions=function(x,h,f){let S=new h.ResizeObserver(C=>{const y=C.find(m=>m.target===x);if(!y)return;if(!("devicePixelContentBoxSize"in y))return S==null||S.disconnect(),void(S=void 0);const l=y.devicePixelContentBoxSize[0].inlineSize,v=y.devicePixelContentBoxSize[0].blockSize;l>0&&v>0&&f(l,v)});try{S.observe(x,{box:["device-pixel-content-box"]})}catch{S.disconnect(),S=void 0}return(0,g.toDisposable)(()=>S==null?void 0:S.disconnect())}},374:(b,a)=>{function u(x){return 57508<=x&&x<=57558}function g(x){return x>=128512&&x<=128591||x>=127744&&x<=128511||x>=128640&&x<=128767||x>=9728&&x<=9983||x>=9984&&x<=10175||x>=65024&&x<=65039||x>=129280&&x<=129535||x>=127462&&x<=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(x){if(!x)throw new Error("value must not be falsy");return x},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(x){return 57520<=x&&x<=57527},a.isEmoji=g,a.allowRescaling=function(x,h,f,S){return h===1&&f>Math.ceil(1.5*S)&&x!==void 0&&x>255&&!g(x)&&!u(x)&&!function(C){return 57344<=C&&C<=63743}(x)},a.treatGlyphAsBackgroundColor=function(x){return u(x)||function(h){return 9472<=h&&h<=9631}(x)},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(x,h,f=0){return(x-(2*Math.round(h)-f))%(2*Math.round(h))}},296:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(x,h,f,S=!1){if(this.selectionStart=h,this.selectionEnd=f,!h||!f||h[0]===f[0]&&h[1]===f[1])return void this.clear();const C=x.buffers.active.ydisp,y=h[1]-C,l=f[1]-C,v=Math.max(y,0),m=Math.min(l,x.rows-1);v>=x.rows||m<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=y,this.viewportEndRow=l,this.viewportCappedStartRow=v,this.viewportCappedEndRow=m,this.startCol=h[0],this.endCol=f[0])}isCellSelected(x,h,f){return!!this.hasSelection&&(f-=x.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&f>=this.viewportCappedStartRow&&h<this.endCol&&f<=this.viewportCappedEndRow:h<this.startCol&&f>=this.viewportCappedStartRow&&h>=this.endCol&&f<=this.viewportCappedEndRow:f>this.viewportStartRow&&f<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&f===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&f===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&f===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},509:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const g=u(237),x=u(860),h=u(374),f=u(160),S=u(345),C=u(485),y=u(385),l=u(147),v=u(855),m={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 p;class N{get pages(){return this._pages}constructor(L,A,F){this._document=L,this._config=A,this._unicodeService=F,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 l.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new S.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new S.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=M(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 A=33;A<126;A++)L.enqueue(()=>{if(!this._cacheMap.get(A,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT)){const F=this._drawToCache(A,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT);this._cacheMap.set(A,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT,F)}})}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(N.maxAtlasPages&&this._pages.length>=Math.max(4,N.maxAtlasPages)){const A=this._pages.filter(te=>2*te.canvas.width<=(N.maxTextureSize||4096)).sort((te,se)=>se.canvas.width!==te.canvas.width?se.canvas.width-te.canvas.width:se.percentageUsed-te.percentageUsed);let F=-1,O=0;for(let te=0;te<A.length;te++)if(A[te].canvas.width!==O)F=te,O=A[te].canvas.width;else if(te-F==3)break;const I=A.slice(F,F+4),G=I.map(te=>te.glyphs[0].texturePage).sort((te,se)=>te>se?1:-1),ne=this.pages.length-I.length,ee=this._mergePages(I,ne);ee.version++;for(let te=G.length-1;te>=0;te--)this._deletePage(G[te]);this.pages.push(ee),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(ee.canvas)}const L=new k(this._document,this._textureSize);return this._pages.push(L),this._activePages.push(L),this._onAddTextureAtlasCanvas.fire(L.canvas),L}_mergePages(L,A){const F=2*L[0].canvas.width,O=new k(this._document,F,L);for(const[I,G]of L.entries()){const ne=I*G.canvas.width%F,ee=Math.floor(I/2)*G.canvas.height;O.ctx.drawImage(G.canvas,ne,ee);for(const se of G.glyphs)se.texturePage=A,se.sizeClipSpace.x=se.size.x/F,se.sizeClipSpace.y=se.size.y/F,se.texturePosition.x+=ne,se.texturePosition.y+=ee,se.texturePositionClipSpace.x=se.texturePosition.x/F,se.texturePositionClipSpace.y=se.texturePosition.y/F;this._onRemoveTextureAtlasCanvas.fire(G.canvas);const te=this._activePages.indexOf(G);te!==-1&&this._activePages.splice(te,1)}return O}_deletePage(L){this._pages.splice(L,1);for(let A=L;A<this._pages.length;A++){const F=this._pages[A];for(const O of F.glyphs)O.texturePage--;F.version++}}getRasterizedGlyphCombinedChar(L,A,F,O,I){return this._getFromCacheMap(this._cacheMapCombined,L,A,F,O,I)}getRasterizedGlyph(L,A,F,O,I){return this._getFromCacheMap(this._cacheMap,L,A,F,O,I)}_getFromCacheMap(L,A,F,O,I,G=!1){return p=L.get(A,F,O,I),p||(p=this._drawToCache(A,F,O,I,G),L.set(A,F,O,I,p)),p}_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,A,F,O){if(this._config.allowTransparency)return f.NULL_COLOR;let I;switch(L){case 16777216:case 33554432:I=this._getColorFromAnsiIndex(A);break;case 50331648:const G=l.AttributeData.toColorRGB(A);I=f.channels.toColor(G[0],G[1],G[2]);break;default:I=F?f.color.opaque(this._config.colors.foreground):this._config.colors.background}return I}_getForegroundColor(L,A,F,O,I,G,ne,ee,te,se){const B=this._getMinimumContrastColor(L,A,F,O,I,G,ne,te,ee,se);if(B)return B;let W;switch(I){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&te&&G<8&&(G+=8),W=this._getColorFromAnsiIndex(G);break;case 50331648:const X=l.AttributeData.toColorRGB(G);W=f.channels.toColor(X[0],X[1],X[2]);break;default:W=ne?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(W=f.color.opaque(W)),ee&&(W=f.color.multiplyOpacity(W,g.DIM_OPACITY)),W}_resolveBackgroundRgba(L,A,F){switch(L){case 16777216:case 33554432:return this._getColorFromAnsiIndex(A).rgba;case 50331648:return A<<8;default:return F?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(L,A,F,O){switch(L){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&O&&A<8&&(A+=8),this._getColorFromAnsiIndex(A).rgba;case 50331648:return A<<8;default:return F?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(L,A,F,O,I,G,ne,ee,te,se){if(this._config.minimumContrastRatio===1||se)return;const B=this._getContrastCache(te),W=B.getColor(L,O);if(W!==void 0)return W||void 0;const X=this._resolveBackgroundRgba(A,F,ne),Y=this._resolveForegroundRgba(I,G,ne,ee),ve=f.rgba.ensureContrastRatio(X,Y,this._config.minimumContrastRatio/(te?2:1));if(!ve)return void B.setColor(L,O,null);const he=f.channels.toColor(ve>>24&255,ve>>16&255,ve>>8&255);return B.setColor(L,O,he),he}_getContrastCache(L){return L?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(L,A,F,O,I=!1){const G=typeof L=="number"?String.fromCharCode(L):L,ne=Math.min(this._config.deviceCellWidth*Math.max(G.length,2)+4,this._textureSize);this._tmpCanvas.width<ne&&(this._tmpCanvas.width=ne);const ee=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<ee&&(this._tmpCanvas.height=ee),this._tmpCtx.save(),this._workAttributeData.fg=F,this._workAttributeData.bg=A,this._workAttributeData.extended.ext=O,this._workAttributeData.isInvisible())return m;const te=!!this._workAttributeData.isBold(),se=!!this._workAttributeData.isInverse(),B=!!this._workAttributeData.isDim(),W=!!this._workAttributeData.isItalic(),X=!!this._workAttributeData.isUnderline(),Y=!!this._workAttributeData.isStrikethrough(),ve=!!this._workAttributeData.isOverline();let he=this._workAttributeData.getFgColor(),Me=this._workAttributeData.getFgColorMode(),me=this._workAttributeData.getBgColor(),ie=this._workAttributeData.getBgColorMode();if(se){const re=he;he=me,me=re;const We=Me;Me=ie,ie=We}const $=this._getBackgroundColor(ie,me,se,B);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const _e=te?this._config.fontWeightBold:this._config.fontWeight,de=W?"italic":"";this._tmpCtx.font=`${de} ${_e} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=g.TEXT_BASELINE;const Ie=G.length===1&&(0,h.isPowerlineGlyph)(G.charCodeAt(0)),Ue=G.length===1&&(0,h.isRestrictedPowerlineGlyph)(G.charCodeAt(0)),tt=this._getForegroundColor(A,ie,me,F,Me,he,se,B,te,(0,h.treatGlyphAsBackgroundColor)(G.charCodeAt(0)));this._tmpCtx.fillStyle=tt.css;const Qe=Ue?0:4;let st=!1;this._config.customGlyphs!==!1&&(st=(0,x.tryDrawCustomChar)(this._tmpCtx,G,Qe,Qe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Nt,J=!Ie;if(Nt=typeof L=="number"?this._unicodeService.wcwidth(L):this._unicodeService.getStringCellWidth(L),X){this._tmpCtx.save();const re=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),We=re%2==1?.5:0;if(this._tmpCtx.lineWidth=re,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())J=!1,this._tmpCtx.strokeStyle=`rgb(${l.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{J=!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 Ye=Qe,ge=Math.ceil(Qe+this._config.deviceCharHeight)-We-(I?2*re:0),Ze=ge+re,je=ge+2*re;let Pe=this._workAttributeData.getUnderlineVariantOffset();for(let be=0;be<Nt;be++){this._tmpCtx.save();const Ae=Ye+be*this._config.deviceCellWidth,He=Ye+(be+1)*this._config.deviceCellWidth,wt=Ae+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ae,ge),this._tmpCtx.lineTo(He,ge),this._tmpCtx.moveTo(Ae,je),this._tmpCtx.lineTo(He,je);break;case 3:const kt=re<=1?je:Math.ceil(Qe+this._config.deviceCharHeight-re/2)-We,Ot=re<=1?ge:Math.ceil(Qe+this._config.deviceCharHeight+re/2)-We,Pt=new Path2D;Pt.rect(Ae,ge,this._config.deviceCellWidth,je-ge),this._tmpCtx.clip(Pt),this._tmpCtx.moveTo(Ae-this._config.deviceCellWidth/2,Ze),this._tmpCtx.bezierCurveTo(Ae-this._config.deviceCellWidth/2,Ot,Ae,Ot,Ae,Ze),this._tmpCtx.bezierCurveTo(Ae,kt,wt,kt,wt,Ze),this._tmpCtx.bezierCurveTo(wt,Ot,He,Ot,He,Ze),this._tmpCtx.bezierCurveTo(He,kt,He+this._config.deviceCellWidth/2,kt,He+this._config.deviceCellWidth/2,Ze);break;case 4:const dn=Pe===0?0:Pe>=re?2*re-Pe:re-Pe;Pe>=re||dn===0?(this._tmpCtx.setLineDash([Math.round(re),Math.round(re)]),this._tmpCtx.moveTo(Ae+dn,ge),this._tmpCtx.lineTo(He,ge)):(this._tmpCtx.setLineDash([Math.round(re),Math.round(re)]),this._tmpCtx.moveTo(Ae,ge),this._tmpCtx.lineTo(Ae+dn,ge),this._tmpCtx.moveTo(Ae+dn+re,ge),this._tmpCtx.lineTo(He,ge)),Pe=(0,h.computeNextVariantOffset)(He-Ae,re,Pe);break;case 5:const Qt=.6,Mt=.3,Ft=He-Ae,sn=Math.floor(Qt*Ft),Dn=Math.floor(Mt*Ft),it=Ft-sn-Dn;this._tmpCtx.setLineDash([sn,Dn,it]),this._tmpCtx.moveTo(Ae,ge),this._tmpCtx.lineTo(He,ge);break;default:this._tmpCtx.moveTo(Ae,ge),this._tmpCtx.lineTo(He,ge)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!st&&this._config.fontSize>=12&&!this._config.allowTransparency&&G!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const be=this._tmpCtx.measureText(G);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in be&&be.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(Ye,ge-Math.ceil(re/2),this._config.deviceCellWidth*Nt,je-ge+Math.ceil(re/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=$.css,this._tmpCtx.strokeText(G,Qe,Qe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(ve){const re=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),We=re%2==1?.5:0;this._tmpCtx.lineWidth=re,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Qe,Qe+We),this._tmpCtx.lineTo(Qe+this._config.deviceCharWidth*Nt,Qe+We),this._tmpCtx.stroke()}if(st||this._tmpCtx.fillText(G,Qe,Qe+this._config.deviceCharHeight),G==="_"&&!this._config.allowTransparency){let re=j(this._tmpCtx.getImageData(Qe,Qe,this._config.deviceCellWidth,this._config.deviceCellHeight),$,tt,J);if(re)for(let We=1;We<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(G,Qe,Qe+this._config.deviceCharHeight-We),re=j(this._tmpCtx.getImageData(Qe,Qe,this._config.deviceCellWidth,this._config.deviceCellHeight),$,tt,J),re);We++);}if(Y){const re=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),We=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=re,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Qe,Qe+Math.floor(this._config.deviceCharHeight/2)-We),this._tmpCtx.lineTo(Qe+this._config.deviceCharWidth*Nt,Qe+Math.floor(this._config.deviceCharHeight/2)-We),this._tmpCtx.stroke()}this._tmpCtx.restore();const bt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Gt;if(Gt=this._config.allowTransparency?function(re){for(let We=0;We<re.data.length;We+=4)if(re.data[We+3]>0)return!1;return!0}(bt):j(bt,$,tt,J),Gt)return m;const Ee=this._findGlyphBoundingBox(bt,this._workBoundingBox,ne,Ue,st,Qe);let Te,Ge;for(;;){if(this._activePages.length===0){const re=this._createNewPage();Te=re,Ge=re.currentRow,Ge.height=Ee.size.y;break}Te=this._activePages[this._activePages.length-1],Ge=Te.currentRow;for(const re of this._activePages)Ee.size.y<=re.currentRow.height&&(Te=re,Ge=re.currentRow);for(let re=this._activePages.length-1;re>=0;re--)for(const We of this._activePages[re].fixedRows)We.height<=Ge.height&&Ee.size.y<=We.height&&(Te=this._activePages[re],Ge=We);if(Ge.y+Ee.size.y>=Te.canvas.height||Ge.height>Ee.size.y+2){let re=!1;if(Te.currentRow.y+Te.currentRow.height+Ee.size.y>=Te.canvas.height){let We;for(const Ye of this._activePages)if(Ye.currentRow.y+Ye.currentRow.height+Ee.size.y<Ye.canvas.height){We=Ye;break}if(We)Te=We;else if(N.maxAtlasPages&&this._pages.length>=N.maxAtlasPages&&Ge.y+Ee.size.y<=Te.canvas.height&&Ge.height>=Ee.size.y&&Ge.x+Ee.size.x<=Te.canvas.width)re=!0;else{const Ye=this._createNewPage();Te=Ye,Ge=Ye.currentRow,Ge.height=Ee.size.y,re=!0}}re||(Te.currentRow.height>0&&Te.fixedRows.push(Te.currentRow),Ge={x:0,y:Te.currentRow.y+Te.currentRow.height,height:Ee.size.y},Te.fixedRows.push(Ge),Te.currentRow={x:0,y:Ge.y+Ge.height,height:0})}if(Ge.x+Ee.size.x<=Te.canvas.width)break;Ge===Te.currentRow?(Ge.x=0,Ge.y+=Ge.height,Ge.height=0):Te.fixedRows.splice(Te.fixedRows.indexOf(Ge),1)}return Ee.texturePage=this._pages.indexOf(Te),Ee.texturePosition.x=Ge.x,Ee.texturePosition.y=Ge.y,Ee.texturePositionClipSpace.x=Ge.x/Te.canvas.width,Ee.texturePositionClipSpace.y=Ge.y/Te.canvas.height,Ee.sizeClipSpace.x/=Te.canvas.width,Ee.sizeClipSpace.y/=Te.canvas.height,Ge.height=Math.max(Ge.height,Ee.size.y),Ge.x+=Ee.size.x,Te.ctx.putImageData(bt,Ee.texturePosition.x-this._workBoundingBox.left,Ee.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Ee.size.x,Ee.size.y),Te.addGlyph(Ee),Te.version++,Ee}_findGlyphBoundingBox(L,A,F,O,I,G){A.top=0;const ne=O?this._config.deviceCellHeight:this._tmpCanvas.height,ee=O?this._config.deviceCellWidth:F;let te=!1;for(let se=0;se<ne;se++){for(let B=0;B<ee;B++){const W=se*this._tmpCanvas.width*4+4*B+3;if(L.data[W]!==0){A.top=se,te=!0;break}}if(te)break}A.left=0,te=!1;for(let se=0;se<G+ee;se++){for(let B=0;B<ne;B++){const W=B*this._tmpCanvas.width*4+4*se+3;if(L.data[W]!==0){A.left=se,te=!0;break}}if(te)break}A.right=ee,te=!1;for(let se=G+ee-1;se>=G;se--){for(let B=0;B<ne;B++){const W=B*this._tmpCanvas.width*4+4*se+3;if(L.data[W]!==0){A.right=se,te=!0;break}}if(te)break}A.bottom=ne,te=!1;for(let se=ne-1;se>=0;se--){for(let B=0;B<ee;B++){const W=se*this._tmpCanvas.width*4+4*B+3;if(L.data[W]!==0){A.bottom=se,te=!0;break}}if(te)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:A.right-A.left+1,y:A.bottom-A.top+1},sizeClipSpace:{x:A.right-A.left+1,y:A.bottom-A.top+1},offset:{x:-A.left+G+(O||I?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-A.top+G+(O||I?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=N;class k{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,A,F){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],F)for(const O of F)this._glyphs.push(...O.glyphs),this._usedPixels+=O._usedPixels;this.canvas=M(L,A,A),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(D,L,A,F){const O=L.rgba>>>24,I=L.rgba>>>16&255,G=L.rgba>>>8&255,ne=A.rgba>>>24,ee=A.rgba>>>16&255,te=A.rgba>>>8&255,se=Math.floor((Math.abs(O-ne)+Math.abs(I-ee)+Math.abs(G-te))/12);let B=!0;for(let W=0;W<D.data.length;W+=4)D.data[W]===O&&D.data[W+1]===I&&D.data[W+2]===G||F&&Math.abs(D.data[W]-O)+Math.abs(D.data[W+1]-I)+Math.abs(D.data[W+2]-G)<se?D.data[W+3]=0:B=!1;return B}function M(D,L,A){const F=D.createElement("canvas");return F.width=L,F.height=A,F}},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 u=0,g=0,x=0,h=0;var f,S,C,y,l;function v(p){const N=p.toString(16);return N.length<2?"0"+N:N}function m(p,N){return p<N?(N+.05)/(p+.05):(p+.05)/(N+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(p){p.toCss=function(N,k,j,M){return M!==void 0?`#${v(N)}${v(k)}${v(j)}${v(M)}`:`#${v(N)}${v(k)}${v(j)}`},p.toRgba=function(N,k,j,M=255){return(N<<24|k<<16|j<<8|M)>>>0},p.toColor=function(N,k,j,M){return{css:p.toCss(N,k,j,M),rgba:p.toRgba(N,k,j,M)}}}(f||(a.channels=f={})),function(p){function N(k,j){return h=Math.round(255*j),[u,g,x]=l.toChannels(k.rgba),{css:f.toCss(u,g,x,h),rgba:f.toRgba(u,g,x,h)}}p.blend=function(k,j){if(h=(255&j.rgba)/255,h===1)return{css:j.css,rgba:j.rgba};const M=j.rgba>>24&255,D=j.rgba>>16&255,L=j.rgba>>8&255,A=k.rgba>>24&255,F=k.rgba>>16&255,O=k.rgba>>8&255;return u=A+Math.round((M-A)*h),g=F+Math.round((D-F)*h),x=O+Math.round((L-O)*h),{css:f.toCss(u,g,x),rgba:f.toRgba(u,g,x)}},p.isOpaque=function(k){return(255&k.rgba)==255},p.ensureContrastRatio=function(k,j,M){const D=l.ensureContrastRatio(k.rgba,j.rgba,M);if(D)return f.toColor(D>>24&255,D>>16&255,D>>8&255)},p.opaque=function(k){const j=(255|k.rgba)>>>0;return[u,g,x]=l.toChannels(j),{css:f.toCss(u,g,x),rgba:j}},p.opacity=N,p.multiplyOpacity=function(k,j){return h=255&k.rgba,N(k,h*j/255)},p.toColorRGB=function(k){return[k.rgba>>24&255,k.rgba>>16&255,k.rgba>>8&255]}}(S||(a.color=S={})),function(p){let N,k;try{const j=document.createElement("canvas");j.width=1,j.height=1;const M=j.getContext("2d",{willReadFrequently:!0});M&&(N=M,N.globalCompositeOperation="copy",k=N.createLinearGradient(0,0,1,1))}catch{}p.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return u=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),f.toColor(u,g,x);case 5:return u=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),h=parseInt(j.slice(4,5).repeat(2),16),f.toColor(u,g,x,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 M=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(M)return u=parseInt(M[1]),g=parseInt(M[2]),x=parseInt(M[3]),h=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),f.toColor(u,g,x,h);if(!N||!k)throw new Error("css.toColor: Unsupported css format");if(N.fillStyle=k,N.fillStyle=j,typeof N.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(N.fillRect(0,0,1,1),[u,g,x,h]=N.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:f.toRgba(u,g,x,h),css:j}}}(C||(a.css=C={})),function(p){function N(k,j,M){const D=k/255,L=j/255,A=M/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))}p.relativeLuminance=function(k){return N(k>>16&255,k>>8&255,255&k)},p.relativeLuminance2=N}(y||(a.rgb=y={})),function(p){function N(j,M,D){const L=j>>24&255,A=j>>16&255,F=j>>8&255;let O=M>>24&255,I=M>>16&255,G=M>>8&255,ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));for(;ne<D&&(O>0||I>0||G>0);)O-=Math.max(0,Math.ceil(.1*O)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));return(O<<24|I<<16|G<<8|255)>>>0}function k(j,M,D){const L=j>>24&255,A=j>>16&255,F=j>>8&255;let O=M>>24&255,I=M>>16&255,G=M>>8&255,ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));for(;ne<D&&(O<255||I<255||G<255);)O=Math.min(255,O+Math.ceil(.1*(255-O))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ne=m(y.relativeLuminance2(O,I,G),y.relativeLuminance2(L,A,F));return(O<<24|I<<16|G<<8|255)>>>0}p.blend=function(j,M){if(h=(255&M)/255,h===1)return M;const D=M>>24&255,L=M>>16&255,A=M>>8&255,F=j>>24&255,O=j>>16&255,I=j>>8&255;return u=F+Math.round((D-F)*h),g=O+Math.round((L-O)*h),x=I+Math.round((A-I)*h),f.toRgba(u,g,x)},p.ensureContrastRatio=function(j,M,D){const L=y.relativeLuminance(j>>8),A=y.relativeLuminance(M>>8);if(m(L,A)<D){if(A<L){const I=N(j,M,D),G=m(L,y.relativeLuminance(I>>8));if(G<D){const ne=k(j,M,D);return G>m(L,y.relativeLuminance(ne>>8))?I:ne}return I}const F=k(j,M,D),O=m(L,y.relativeLuminance(F>>8));if(O<D){const I=N(j,M,D);return O>m(L,y.relativeLuminance(I>>8))?F:I}return F}},p.reduceLuminance=N,p.increaseLuminance=k,p.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}}(l||(a.rgba=l={})),a.toPaddedHex=v,a.contrastRatio=m},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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===u)return void this._listeners.splice(g,1)}}})),this._event}fire(u,g){const x=[];for(let h=0;h<this._listeners.length;h++)x.push(this._listeners[h]);for(let h=0;h<x.length;h++)x[h].call(void 0,u,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,g){return u(x=>g.fire(x))},a.runAndSubscribe=function(u,g){return g(void 0),u(x=>g(x))}},859:(b,a)=>{function u(g){for(const x of g)x.dispose();g.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 g of this._disposables)g.dispose();this._disposables.length=0}register(g){return this._disposables.push(g),g}unregister(g){const x=this._disposables.indexOf(g);x!==-1&&this._disposables.splice(x,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var x;this._isDisposed||g===this._value||((x=this._value)==null||x.dispose(),this._value=g)}clear(){this.value=void 0}dispose(){var g;this._isDisposed=!0,(g=this._value)==null||g.dispose(),this._value=void 0}},a.toDisposable=function(g){return{dispose:g}},a.disposeArray=u,a.getDisposeArrayDisposable=function(g){return{dispose:()=>u(g)}}},485:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(x,h,f){this._data[x]||(this._data[x]={}),this._data[x][h]=f}get(x,h){return this._data[x]?this._data[x][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(g,x,h,f,S){this._data.get(g,x)||this._data.set(g,x,new u),this._data.get(g,x).set(h,f,S)}get(g,x,h,f){var S;return(S=this._data.get(g,x))==null?void 0:S.get(h,f)}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 u=a.isNode?"node":navigator.userAgent,g=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const x=u.match(/Version\/(\d+)/);return x===null||x.length<2?0:parseInt(x[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),a.isIpad=g==="iPad",a.isIphone=g==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),a.isLinux=g.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},385:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const g=u(399);class x{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(S){this._idleCallback=void 0;let C=0,y=0,l=S.timeRemaining(),v=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),v=S.timeRemaining(),1.5*y>v)return l-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-C))}ms`),void this._start();l=v}this.clear()}}class h extends x{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const C=Date.now()+S;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends x{_requestCallback(f){return requestIdleCallback(f)}_cancelCallback(f){cancelIdleCallback(f)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(f){this._queue.clear(),this._queue.enqueue(f)}flush(){this._queue.flush()}}},147:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new u;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class g{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,f=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=f}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=g},782:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const g=u(133),x=u(855),h=u(147);class f 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 f;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,g.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[x.CHAR_DATA_ATTR_INDEX],this.bg=0;let y=!1;if(C[x.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(C[x.CHAR_DATA_CHAR_INDEX].length===2){const l=C[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const v=C[x.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(l-55296)+v-56320+65536|C[x.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=C[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[x.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=C[x.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[x.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=f},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(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,g=0,x=u.length){let h="";for(let f=g;f<x;++f){let S=u[f];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,g){const x=u.length;if(!x)return 0;let h=0,f=0;if(this._interim){const S=u.charCodeAt(f++);56320<=S&&S<=57343?g[h++]=1024*(this._interim-55296)+S-56320+65536:(g[h++]=this._interim,g[h++]=S),this._interim=0}for(let S=f;S<x;++S){const C=u.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=x)return this._interim=C,h;const y=u.charCodeAt(S);56320<=y&&y<=57343?g[h++]=1024*(C-55296)+y-56320+65536:(g[h++]=C,g[h++]=y)}else C!==65279&&(g[h++]=C)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,g){const x=u.length;if(!x)return 0;let h,f,S,C,y=0,l=0,v=0;if(this.interim[0]){let N=!1,k=this.interim[0];k&=(224&k)==192?31:(240&k)==224?15:7;let j,M=0;for(;(j=63&this.interim[++M])&&M<4;)k<<=6,k|=j;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=D-M;for(;v<L;){if(v>=x)return 0;if(j=u[v++],(192&j)!=128){v--,N=!0;break}this.interim[M++]=j,k<<=6,k|=63&j}N||(D===2?k<128?v--:g[y++]=k:D===3?k<2048||k>=55296&&k<=57343||k===65279||(g[y++]=k):k<65536||k>1114111||(g[y++]=k)),this.interim.fill(0)}const m=x-4;let p=v;for(;p<x;){for(;!(!(p<m)||128&(h=u[p])||128&(f=u[p+1])||128&(S=u[p+2])||128&(C=u[p+3]));)g[y++]=h,g[y++]=f,g[y++]=S,g[y++]=C,p+=4;if(h=u[p++],h<128)g[y++]=h;else if((224&h)==192){if(p>=x)return this.interim[0]=h,y;if(f=u[p++],(192&f)!=128){p--;continue}if(l=(31&h)<<6|63&f,l<128){p--;continue}g[y++]=l}else if((240&h)==224){if(p>=x)return this.interim[0]=h,y;if(f=u[p++],(192&f)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=f,y;if(S=u[p++],(192&S)!=128){p--;continue}if(l=(15&h)<<12|(63&f)<<6|63&S,l<2048||l>=55296&&l<=57343||l===65279)continue;g[y++]=l}else if((248&h)==240){if(p>=x)return this.interim[0]=h,y;if(f=u[p++],(192&f)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=f,y;if(S=u[p++],(192&S)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=f,this.interim[2]=S,y;if(C=u[p++],(192&C)!=128){p--;continue}if(l=(7&h)<<18|(63&f)<<12|(63&S)<<6|63&C,l<65536||l>1114111)continue;g[y++]=l}}return y}}},776:function(b,a,u){var g=this&&this.__decorate||function(l,v,m,p){var N,k=arguments.length,j=k<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(l,v,m,p);else for(var M=l.length-1;M>=0;M--)(N=l[M])&&(j=(k<3?N(j):k>3?N(v,m,j):N(v,m))||j);return k>3&&j&&Object.defineProperty(v,m,j),j},x=this&&this.__param||function(l,v){return function(m,p){v(m,p,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=u(859),f=u(97),S={trace:f.LogLevelEnum.TRACE,debug:f.LogLevelEnum.DEBUG,info:f.LogLevelEnum.INFO,warn:f.LogLevelEnum.WARN,error:f.LogLevelEnum.ERROR,off:f.LogLevelEnum.OFF};let C,y=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=f.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let v=0;v<l.length;v++)typeof l[v]=="function"&&(l[v]=l[v]())}_log(l,v,m){this._evalLazyOptionalParams(m),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+v,...m)}trace(l,...v){var m;this._logLevel<=f.LogLevelEnum.TRACE&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.trace.bind(this._optionsService.options.logger))??console.log,l,v)}debug(l,...v){var m;this._logLevel<=f.LogLevelEnum.DEBUG&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.debug.bind(this._optionsService.options.logger))??console.log,l,v)}info(l,...v){var m;this._logLevel<=f.LogLevelEnum.INFO&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.info.bind(this._optionsService.options.logger))??console.info,l,v)}warn(l,...v){var m;this._logLevel<=f.LogLevelEnum.WARN&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.warn.bind(this._optionsService.options.logger))??console.warn,l,v)}error(l,...v){var m;this._logLevel<=f.LogLevelEnum.ERROR&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.error.bind(this._optionsService.options.logger))??console.error,l,v)}};a.LogService=y=g([x(0,f.IOptionsService)],y),a.setTraceLogger=function(l){C=l},a.traceCall=function(l,v,m){if(typeof m.value!="function")throw new Error("not supported");const p=m.value;m.value=function(...N){if(C.logLevel!==f.LogLevelEnum.TRACE)return p.apply(this,N);C.trace(`GlyphRenderer#${p.name}(${N.map(j=>JSON.stringify(j)).join(", ")})`);const k=p.apply(this,N);return C.trace(`GlyphRenderer#${p.name} return`,k),k}}},726:(b,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",g="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(x){return x[g]||[]},a.createDecorator=function(x){if(a.serviceRegistry.has(x))return a.serviceRegistry.get(x);const h=function(f,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(y,l,v){l[u]===l?l[g].push({id:y,index:v}):(l[g]=[{id:y,index:v}],l[u]=l)})(h,f,C)};return h.toString=()=>x,a.serviceRegistry.set(x,h),h}},97:(b,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const g=u(726);var x;a.IBufferService=(0,g.createDecorator)("BufferService"),a.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),a.ICoreService=(0,g.createDecorator)("CoreService"),a.ICharsetService=(0,g.createDecorator)("CharsetService"),a.IInstantiationService=(0,g.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"}(x||(a.LogLevelEnum=x={})),a.ILogService=(0,g.createDecorator)("LogService"),a.IOptionsService=(0,g.createDecorator)("OptionsService"),a.IOscLinkService=(0,g.createDecorator)("OscLinkService"),a.IUnicodeService=(0,g.createDecorator)("UnicodeService"),a.IDecorationService=(0,g.createDecorator)("DecorationService")}},_={};function E(b){var a=_[b];if(a!==void 0)return a.exports;var u=_[b]={exports:{}};return d[b].call(u.exports,u,u.exports,E),u.exports}var R={};return(()=>{var b=R;Object.defineProperty(b,"__esModule",{value:!0}),b.WebglAddon=void 0;const a=E(345),u=E(859),g=E(399),x=E(666),h=E(776);class f extends u.Disposable{constructor(C){if(g.isSafari&&(0,g.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 l=y.coreService,v=y.optionsService,m=y,p=m._renderService,N=m._characterJoinerService,k=m._charSizeService,j=m._coreBrowserService,M=m._decorationService,D=m._logService,L=m._themeService;(0,h.setTraceLogger)(D),this._renderer=this.register(new x.WebglRenderer(C,N,k,j,l,M,v,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)),p.setRenderer(this._renderer),this.register((0,u.toDisposable)(()=>{const A=this._terminal._core._renderService;A.setRenderer(this._terminal._core._createRenderer()),A.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=f})(),R})())})(yS);var iU=yS.exports;function NN(r,s){let d=0,_=r;for(;Math.abs(_)>=s;)_>0?(d+=1,_-=s):(d-=1,_+=s);return{notches:d,rem:_}}const rU=r=>r>0?"up":"down";function sU(r,s,d=24){return Math.abs(s)<=Math.abs(r)?null:s<=-d?"show":s>=d?"hide":null}function aU(r,s){if(!r)return!1;const d=r.scrollHeight-r.clientHeight;return d<=1?!1:s<0?r.scrollTop<d-1:s>0?r.scrollTop>1:!1}function oU(r,s=44,d=.5){return r*s*d/(s+d*Math.abs(r))}function SN(r){if(!r)return!1;const s=r.tagName;return!(s!=="INPUT"&&s!=="TEXTAREA"||r.closest&&r.closest(".xterm"))}function lU(r){return r.replace(/\r?\n/g,`\r
272
+ `)}function cU(r,s){let d=s,_=!1,E=!1,R=!1;const b=x=>{/\S/.test(x)&&(_=!0,d&&(E=!0)),d&&x.length&&(R=!0)},a=/\x1b\[([0-9;]*)m/g;let u=0,g=a.exec(r);for(;g;){b(r.slice(u,g.index)),u=a.lastIndex;const x=g[1]===""?[0]:g[1].split(";").map(Number);for(let h=0;h<x.length;h+=1){const f=x[h];if(f===0||f===49)d=!1;else if(f>=40&&f<=47||f>=100&&f<=107)d=!0;else if(f===38||f===48){const S=f===48;x[h+1]===5?(h+=2,S&&(d=!0)):x[h+1]===2&&(h+=4,S&&(d=!0))}}g=a.exec(r)}return b(r.slice(u)),{bgEnd:d,hasText:_,hasShadeText:E,hasShadeBlank:R}}function uU(r){const s=[];let d=!1,_=[],E=-1,R=!1;const b=()=>{E>=0&&R&&(s[E]+="\x1B[49m"),E=-1,R=!1},a=()=>{if(_.length){s.push("\x1B[0m");for(let u=1;u<_.length;u+=1)s.push("");_=[]}};for(const u of r){const g=cU(u,d);g.hasShadeText?(s.push(..._),_=[],s.push(u),E=s.length-1,R=g.bgEnd):!g.hasText&&(d||g.bgEnd||g.hasShadeBlank)?_.push(u):(b(),a(),s.push(u)),d=g.bgEnd}return b(),a(),s}function dU(r){const s=lU(r.replace(/\n$/,""));return uU(s.split(`\r
273
+ `)).join(`\r
274
+ `)}function hU(r,s,d=0,_=!1){if(!r||!r.vis&&!_)return"\x1B[?25l";const E=d?Math.min(s|0,d|0):s|0,R=Math.max(1,E-Math.max(0,r.row|0)),b=Math.max(0,r.col|0)+1;return`\x1B[${R};${b}H\x1B[?25h`}function xS({hint:r}){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),r&&o.jsxDEV("div",{className:"lens-boot-hint",children:r},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 mU(r,{base:s=1e3,max:d=1e4,factor:_=2,jitter:E=.2,rng:R=Math.random}={}){if(r<=0)return 0;const b=Math.min(d,s*_**(r-1));return Math.round(b*(1+E*(R()*2-1)))}const fU=1e3;function pU(r){return r<8e3?fU:r<6e4?5e3:1e4}const vU=.95,gU=.015,_U=.1,bU=50;function yU(r,s,d=vU,_=gU){const E=r*s,R=r*d**(s/16);return{delta:E,v:R,done:Math.abs(R)<_}}function xU(r,s,d=_U,_=bU){return s<=_&&Math.abs(r)>=d}const wU={failCount:0,connected:!0};function Cg(r,s,{threshold:d=2}={}){switch(s){case"ok":case"reset":return{failCount:0,connected:!0};case"fail":{const _=r.failCount+1;return{failCount:_,connected:_<d}}default:return r}}const NU="(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|\\[::1\\])",CN=new RegExp(`https?://${NU}(?::(\\d{1,5}))?(/[^${$g}]*)?`,"gi");function wS(r){const s=[];if(!r)return s;CN.lastIndex=0;let d;for(;(d=CN.exec(r))!==null;){const _=/^https:/i.test(d[0]),E=d[1]?Number(d[1]):_?443:80;if(!Number.isInteger(E)||E<1||E>65535)continue;const R=d[2]||"",b=R.replace(/\.+$/,""),a=d.index+d[0].length-(R.length-b.length);s.push({start:d.index,end:a,port:E,path:b||"/",raw:r.slice(d.index,a)})}return s}function NS(r){const s=wS(r),d=s.map(_=>({start:_.start,end:_.end,kind:"url",port:_.port,urlPath:_.path,raw:_.raw}));for(const _ of M3(r))s.some(E=>_.start<E.end&&_.end>E.start)||d.push({start:_.start,end:_.end,kind:"doc"});return d.sort((_,E)=>_.start-E.start),d}function SU(r,s){const d=r.getCell(s-1);if(!d)return!1;if(d.getWidth()===0)return!0;const _=d.getChars();if(_&&_!==" ")return!0;const E=r.getCell(s-2);return!!E&&E.getWidth()===0}function Kg(r,s,d){var b;const _=r.getLine(s+1);if(!_)return!1;if(_.isWrapped)return!0;const E=r.getLine(s);if(!E||!SU(E,d))return!1;const R=(b=_.getCell(0))==null?void 0:b.getChars();return!!R&&R!==" "}function SS(r,s,d){let _=s;for(;_>0&&Kg(r,_-1,d);)_--;let E="";const R=[];let b=_;for(;;){const a=r.getLine(b);if(!a)break;const u=b+1<r.length&&Kg(r,b,d),g=[],x=[];for(let f=0;f<d;f++){const S=a.getCell(f);if(!S)continue;const C=S.getWidth();C!==0&&(g.push(S.getChars()),x.push({row:b,col:f,w:C}))}let h=g.length;if(u)for(;h>0&&(g[h-1]===""||g[h-1]===" ");)h--;for(let f=0;f<h;f++)E+=g[f]||" ",R.push(x[f]);if(u){b++;continue}break}return{text:E,cells:R}}function CU(r){const s=r.buffer.active,d=r.cols,_=0,E=s.length,R=[];let b=_;for(;b>0&&Kg(s,b-1,d);)b--;for(;b<E;){if(!s.getLine(b)){b++;continue}const{text:a,cells:u}=SS(s,b,d);for(const{start:g,end:x,kind:h}of NS(a)){let f=g;for(;f<x;){const S=u[f].row;let C=f;for(;C<x&&u[C].row===S;)C++;const y=u[f].col,l=u[C-1],v=l.col+l.w;S>=_&&S<E&&R.push({y:S,x:y,width:v-y,kind:h,path:a.slice(g,x)}),f=C}}b=u.length?u[u.length-1].row+1:b+1}return R}function EU(r,s){const d=r.buffer.active,_=r.cols,E=s-1;if(E<0||E>=d.length)return[];const{text:R,cells:b}=SS(d,E,_),a=[];for(const{start:u,end:g,kind:x,port:h,urlPath:f,raw:S}of NS(R)){const C=b[u],y=b[g-1];E<C.row||E>y.row||a.push({range:{start:{x:C.col+1,y:C.row+1},end:{x:y.col+y.w,y:y.row+1}},kind:x,path:R.slice(u,g),port:h,urlPath:f,raw:S})}return a}const CS=(r,s,d)=>Math.max(s,Math.min(d,r));function jU(r,s){return!s||s<=0?1:Math.max(1,Math.floor(r/s))}function EN(r,s,d){return d<0?r>0?"internal":"forward":r<s?"internal":"forward"}function DU(r,s){return CS(r,0,s)}function kU(r,s,d){return CS(r-s+1,0,d)}function jN(r,s){return!r||!r.vis?null:Math.max(0,s-1-Math.max(0,r.row|0))}function DN(r,s){return Math.max(0,s-r)}function kN({cursorLine:r,viewportY:s,visibleRows:d,baseY:_,armed:E}){return E?r<s?DU(r,_):r>=s+d?kU(r,d,_):null:null}const RU=[{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"}],TU=4,LU=1500,MU=r=>{for(const s of document.fonts)if(s.family.replace(/["']/g,"")===r)return s;return null},AU=async({family:r,url:s,probe:d,unicodeRange:_},E)=>{var R;for(let b=0;b<TU;b++){try{await document.fonts.load(`${E}px "${r}"`,d)}catch{}if(((R=MU(r))==null?void 0:R.status)==="loaded")return!0;try{const a=new FontFace(r,`url(${s}) format('woff2')`,_?{unicodeRange:_}:{});return await a.load(),document.fonts.add(a),!0}catch{}await new Promise(a=>setTimeout(a,LU*2**b))}return!1};let Eg=null;function UU(r=14){var s;return Eg||(Eg=typeof document<"u"&&((s=document.fonts)!=null&&s.load)?Promise.all(RU.map(d=>AU(d,r))):Promise.resolve([!1,!1])),Eg}function ES(r){const s=r.split(`
275
+ `).map(E=>E.trim());let d=0,_=s.length;for(;d<_&&s[d]==="";)d++;for(;_>d&&s[_-1]==="";)_--;return s.slice(d,_).join(`
276
+ `)}function OU(r){return r?{lines:r.split(`
277
+ `).length,chars:ES(r).replace(/\n/g,"").length}:{lines:0,chars:0}}function VU(r,s){return{start:{col:0,row:r.start.row},end:{col:s-1,row:r.end.row}}}function PU(r,s,d,_,E){let R=r.start.row,b=r.end.row;for(;R>_&&d(R-1).trim()!=="";)R--;for(;b<E&&d(b+1).trim()!=="";)b++;return{start:{col:0,row:R},end:{col:s-1,row:b}}}function RN(r,s,d,_,E){return{x:r*_,y:(s-d)*E}}function BU(r){const[s,d]=U.useState(""),[_,E]=U.useState(!1),R=U.useRef(null),b=U.useRef(null);return U.useEffect(()=>()=>{clearTimeout(R.current),clearInterval(b.current)},[]),{dbg:s,dbgVisible:_,flash:()=>{const u=()=>{const g=r.current;g&&d(`${g.cols}×${g.rows} · ${g.options.fontSize}px`)};u(),E(!0),clearTimeout(R.current),clearInterval(b.current),b.current=setInterval(u,400),R.current=setTimeout(()=>{E(!1),clearInterval(b.current)},3e3)}}}const IU=200,FU=20,jg=100,Kh=5e3,HU=15;function zU(r,s){const d=s==null?void 0:s.querySelector(".xterm-helper-textarea");d&&(d.readOnly=!0,d.tabIndex=-1,d.setAttribute("inputmode","none"),d.setAttribute("aria-hidden","true"));const _=document.activeElement;r.focus(),r.blur(),_&&_!==document.body&&typeof _.focus=="function"&&_.focus()}const $U=U.forwardRef(function({pane:s,inset:d=0,onAuthFail:_,onDocLinkTap:E,onTap:R},b){const a=U.useRef(null),u=U.useRef(null),g=U.useRef(0),x=U.useRef(!1),h=U.useRef(!1),f=U.useRef(""),S=U.useRef(R);S.current=R;const C=U.useRef([]),y=U.useRef(null),l=U.useRef(null),v=U.useRef(!1),m=U.useRef(null),p=U.useRef(E);p.current=E;const N=U.useRef(Y1()),k=U.useRef(null),j=U.useRef(VM()),M=U.useRef(null),[D,L]=U.useState(!1),[A,F]=U.useState(!0),O=U.useRef(!1),[I,G]=U.useState(""),[ne,ee]=U.useState(null),te=U.useRef(!1),se=U.useRef(!1),[B,W]=U.useState(!1),[X,Y]=U.useState(!1),{dbg:ve,dbgVisible:he,flash:Me}=BU(u),[me,ie]=U.useState(""),[$,_e]=U.useState(!1),de=U.useRef(null),Ie=U.useRef(!1),Ue=U.useRef(!1),tt=U.useRef(!1),Qe=U.useRef(0),st=U.useRef(null),Nt=U.useRef(!1),J=U.useRef(null);U.useImperativeHandle(b,()=>({getSize:()=>{const re=u.current;return re?{cols:re.cols,rows:re.rows}:null},flash:Me,getFontSize:()=>{const re=u.current;return re?{size:re.options.fontSize,auto:j.current==null}:null},setFontSize:re=>{var ge;const We=u.current;if(!We)return null;const Ye=Math.max(8,Math.min(40,Math.round(re)));return We.options.fontSize=Ye,j.current=Ye,Su(Ye),(ge=de.current)==null||ge.call(de),Ye},autoFont:()=>{var We;const re=u.current;re&&(re.options.fontSize=14,j.current=null,PM(),(We=de.current)==null||We.call(de))},wake:()=>{var re;return(re=st.current)==null?void 0:re.call(st)},setDocHighlight:re=>{var We;N.current=!!re,(We=k.current)==null||We.call(k)}}),[]),U.useEffect(()=>{var We;const re=g.current;g.current=d,d>0&&re===0&&(h.current=!0),d===0&&re>0&&(tt.current=!0),(We=de.current)==null||We.call(de),d===0&&(h.current=!1)},[d]),U.useEffect(()=>{var ce;const re=new nU.Terminal({disableStdin:!0,allowProposedApi:!0,scrollback:Kh+100,convertEol:!1,fontSize:j.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:(K,ue)=>{const ye=wS(ue)[0];if(ye&&p.current){p.current({kind:"url",port:ye.port,urlPath:ye.path,raw:ye.raw,path:ye.raw},(K==null?void 0:K.clientX)??0,(K==null?void 0:K.clientY)??0);return}try{window.open(ue,"_blank","noopener,noreferrer")}catch{}}}});re.open(a.current),u.current=re,zU(re,a.current);const We=re.registerLinkProvider({provideLinks(K,ue){if(!p.current){ue(void 0);return}const ye=EU(re,K).map(Le=>({range:Le.range,text:Le.raw??Le.path,decorations:{pointerCursor:!0,underline:!1},activate:Re=>{var Xe;return(Xe=p.current)==null?void 0:Xe.call(p,Le,(Re==null?void 0:Re.clientX)??0,(Re==null?void 0:Re.clientY)??0)}}));ue(ye.length?ye:void 0)}});let Ye=null;const ge=()=>{try{Ye=new iU.WebglAddon,Ye.onContextLoss(()=>Ye.dispose()),re.loadAddon(Ye)}catch{Ye=null}};ge();let Ze=null,je=!1,Pe=!1,be=!1,Ae=!1;te.current=!1,se.current=!1,W(!1),O.current=!1,ee(null),G("");const He=()=>Math.min(Kh,Math.max(24,re.rows+FU));let wt=He(),kt=!0,Ot=0,Pt=null,dn="",Qt=null,Mt=0,Ft=null,sn=null,Dn=Date.now();L(!1),_e(!1);let it=!1;const cn=()=>{je||it||(it=!0,requestAnimationFrame(()=>{je||_e(!0)}))};let zn=wU;const $n=K=>{zn=K,F(K.connected)};UU(j.current??14).then(()=>{if(!(je||!Ye)){try{Ye.dispose()}catch{}ge(),re.refresh(0,re.rows-1)}});const en=()=>re.buffer.active,kn=(K="")=>{const ue=en();ie(Ae&&!ni()&&!te.current?`历史模式 · 距底 ${ue.baseY-ue.viewportY}/${ue.baseY} 行${Pe?" · 拉取中":""}${K}`:"")},On=()=>en().viewportY>=en().baseY,ni=()=>en().baseY-en().viewportY<=HU,nn=()=>en().viewportY<=3,En=()=>{!Ae||Pe||!kt||wt>=Kh||!nn()||(kt=!1,gr(),wt=Math.min(Math.floor(wt/jg)*jg+jg,Kh),kn(" · 拉取↑"),xs(wt,!0,!0))};let vn=0;const Xn=()=>{y.current&&(y.current.deco.dispose(),y.current.marker.dispose(),y.current=null)},oe=()=>{if(je)return;const K=Qt,ue=re.buffer.active;if(!(K&&(K.vis||Nt.current)&&te.current&&ue.viewportY<ue.baseY)){Xn(),re.write(hU(K,re.rows,Mt,Nt.current)),et();return}re.write("\x1B[?25l"),Xn();const Le=Mt-1-(K.row|0),Re=re.registerMarker(Le-(ue.baseY+ue.cursorY));if(!Re){et();return}const Xe=re.registerDecoration({marker:Re,x:Math.max(0,K.col|0),width:1});if(!Xe){Re.dispose(),et();return}Xe.onRender(at=>{at.classList.add("cursor-deco")}),y.current={deco:Xe,marker:Re},et()},$e=()=>{l.current&&(l.current.deco.dispose(),l.current.marker.dispose(),l.current=null)},et=()=>{$e();const K=Qt;if(je||!v.current||!te.current||!K)return;const ue=re.buffer.active,ye=Mt-1-(K.row|0),Le=re.registerMarker(ye-(ue.baseY+ue.cursorY));if(!Le)return;const Re=re.registerDecoration({marker:Le,x:0,width:re.cols});if(!Re){Le.dispose();return}Re.onRender(Xe=>{Xe.classList.add("locate-deco")}),l.current={deco:Re,marker:Le}};m.current=et;const yt=()=>{if(je||!Ft||Ft.alt)return Promise.resolve();const{seed:K,contentRows:ue}=Ft,ye=ue<re.rows?DN(ue,re.rows):0;if(ue+ye===Mt)return Promise.resolve();const Le=ye?`
278
+ `.repeat(ye)+K:K;return Mt=Le.split(`
279
+ `).length,new Promise(Re=>re.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Le,()=>{if(!je){re.scrollToBottom();try{br(re)}catch{}}Re()}))},gt=(K=0)=>{var Kt;if(je||!a.current||!re.rows)return;const ue=a.current.getBoundingClientRect(),ye=Math.min(ue.bottom,window.innerHeight-(g.current||0)),Le=Math.max(ue.top,0),Re=Math.max(0,ye-Le),Xe=a.current.querySelector(".xterm-screen"),at=Xe?Xe.getBoundingClientRect().height:0;if(!Re||!at)return;(Kt=a.current.parentElement)==null||Kt.style.setProperty("--vis-h",`${Re}px`),g.current===0&&(Qe.current=Re);const vt=at/re.rows;if(Ie.current&&vn){Ie.current=!1;const Ct=re.options.fontSize||14,At=Math.max(8,Math.min(40,Math.round(Ct*(Qe.current||Re)/(vn*vt))));if(Ue.current=!0,j.current=At,Su(At),At!==Ct){re.options.fontSize=At,requestAnimationFrame(()=>gt(K));return}}if(Ue.current&&vn){const Ct=Math.floor((Qe.current||Re)/vt),At=re.options.fontSize||14;if(Ct<vn&&At>8){j.current=At-1,Su(At-1),re.options.fontSize=At-1,requestAnimationFrame(()=>gt(K));return}Ue.current=!1,j.current=At,Su(At)}if(g.current===0&&j.current==null&&vn&&K<4){const Ct=vn*vt;if(Ct>Re+4){const At=re.options.fontSize||14,_n=Math.max(6,Math.round(At*(Re/Ct)));if(_n<At){re.options.fontSize=_n,requestAnimationFrame(()=>gt(K+1));return}}}const ct=jU(Re,vt);if(ct!==re.rows){re.write(`\x1B[?25l\x1B[${re.rows};1H`,()=>{if(!je){if(re.resize(re.cols,ct),te.current){const Ct=jN(Qt,Mt),At=()=>{const _n=Ct==null?null:kN({cursorLine:Ct,viewportY:en().viewportY,visibleRows:re.rows,baseY:en().baseY,armed:!0});_n!=null&&re.scrollToLine(_n)};g.current>0?(re.scrollToTop(),At()):tt.current?(tt.current=!1,At()):re.scrollToTop()}else re.scrollToBottom();K<4?requestAnimationFrame(()=>gt(K+1)):yt().then(()=>{je||(oe(),cn())})}});return}yt().then(()=>{je||(oe(),cn())})},ft=()=>requestAnimationFrame(()=>gt(0));de.current=ft;const Rt=()=>ft();window.addEventListener("resize",Rt),window.addEventListener("orientationchange",Rt);let pt=((ce=a.current)==null?void 0:ce.clientHeight)||0;const gn=typeof ResizeObserver<"u"?new ResizeObserver(()=>{var ye;const K=((ye=a.current)==null?void 0:ye.clientHeight)||0;if(!K)return;const ue=K>pt;pt=K,ue&&ft()}):null;gn&&a.current&&gn.observe(a.current);const an=(K,ue)=>{var ct;const ye=(ct=a.current)==null?void 0:ct.querySelector(".xterm-screen");if(!ye||!re.cols||!re.rows)return null;const Le=ye.getBoundingClientRect(),Re=Le.width/re.cols,Xe=Le.height/re.rows;if(!Re||!Xe)return null;const at=Math.max(0,Math.min(re.cols-1,Math.floor((K-Le.left)/Re))),vt=Math.max(0,Math.min(re.rows-1,Math.floor((ue-Le.top)/Xe)));return{col:at,row:en().viewportY+vt}};let qt=null;const bn=()=>{var Le;const K=(Le=re.getSelectionPosition)==null?void 0:Le.call(re);if(!K)return null;let ue=K.end.x-1,ye=K.end.y;return ue<0&&(ye-=1,ue=re.cols-1),{start:{col:K.start.x,row:K.start.y},end:{col:ue,row:ye}}},Nn=()=>{var At;const K=bn(),ue=(At=a.current)==null?void 0:At.querySelector(".xterm-screen");if(!K||!ue){ee(null),G("");return}const ye=ue.getBoundingClientRect(),Le=a.current.parentElement.getBoundingClientRect(),Re=ye.width/re.cols,Xe=ye.height/re.rows,at=en().viewportY,vt={x:ye.left-Le.left,y:ye.top-Le.top},ct=RN(K.start.col,K.start.row,at,Re,Xe),Kt=RN(K.end.col+1,K.end.row,at,Re,Xe);ee({start:{x:ct.x+vt.x,y:ct.y+vt.y,ch:Xe},end:{x:Kt.x+vt.x,y:Kt.y+vt.y,ch:Xe},wrapW:Le.width});const Ct=re.getSelection();if(Ct){const{lines:_n,chars:Mi}=OU(Ct);G(`复制模式 · ${_n} 行 · ${Mi} 字`)}else G("")},ui=()=>bn(),Vn=K=>{var ue;return((ue=en().getLine(K))==null?void 0:ue.translateToString(!0))??""},Jn=K=>{if(!K)return;const ue=re.cols,ye=K.end.row*ue+K.end.col-(K.start.row*ue+K.start.col)+1;re.select(K.start.col,K.start.row,ye),Nn()};J.current={currentRange:ui,paraLineText:Vn,selectRange:Jn};const ii=(K,ue)=>{var at,vt;const ye=an(K,ue);if(!ye)return;const Le=((at=en().getLine(ye.row))==null?void 0:at.translateToString(!1))??"";let Re=ye.col,Xe=ye.col;if(/\S/.test(Le[ye.col]||"")){for(;Re>0&&/\S/.test(Le[Re-1]);)Re--;for(;Xe<re.cols-1&&/\S/.test(Le[Xe+1]);)Xe++}qt={col:Re,row:ye.row},O.current=!0,ee(null),re.select(Re,ye.row,Xe-Re+1),Nn(),(vt=navigator.vibrate)==null||vt.call(navigator,12)},Dt=(K,ue)=>{var ye,Le;return((Le=(ye=en().getLine(Math.floor(K/ue)))==null?void 0:ye.getCell(K%ue))==null?void 0:Le.getWidth())??1},ae=(K,ue)=>K>0&&Dt(K,ue)===0?K-1:K,Be=(K,ue)=>Dt(K,ue)===2?K+1:K,xe=(K,ue)=>{const ye=an(K,ue);if(!ye||!qt)return;const Le=re.cols,Re=qt.row*Le+qt.col,Xe=ye.row*Le+ye.col,at=ae(Math.min(Re,Xe),Le),vt=Be(Math.max(Re,Xe),Le);re.select(at%Le,Math.floor(at/Le),vt-at+1),Nn()},Q=()=>{qt=null,O.current=!1,ee(null),G(""),re.clearSelection()},Ce=a.current;let Je=0,Vt=0,_t=0,St=0,Jt=!1,yn=0,hn=0,An=!1,Yt=!1,Wn=null;const Zn=()=>{Wn&&(clearTimeout(Wn),Wn=null)},Wi=K=>Math.hypot(K[0].clientX-K[1].clientX,K[0].clientY-K[1].clientY);let Gi=0,Cr=0,pr=0,di=0,Er=0,vr=null;const gr=()=>{vr!=null&&(cancelAnimationFrame(vr),vr=null)};M.current=gr;const Fs=(K,ue,ye)=>{if(!K)return;let Le=ye,Re=null;const Xe=at=>{if(Re==null){Re=at,vr=requestAnimationFrame(Xe);return}const vt=at-Re;Re=at;const ct=yU(Le,vt);Le=ct.v;const Kt=K[ue];K[ue]=Kt+ct.delta;const Ct=Math.abs(ct.delta)>=1&&K[ue]===Kt;if(ue==="scrollTop"&&(kn(),En()),ct.done||Ct||vr==null){vr=null;return}vr=requestAnimationFrame(Xe)};vr=requestAnimationFrame(Xe)},hi=22,on=12;let ns=0,nr=0,Tt=0,Fr=!1;const oi=async()=>{var ye;if(Fr||Tt===0)return;Fr=!0;const K=rU(Tt),ue=Math.min(Math.abs(Tt),40);Tt=0;try{se.current?await bA(s,K,ue):await Pu(s,Array(ue).fill(K==="up"?"Up":"Down")),(ye=st.current)==null||ye.call(st)}catch{}finally{Fr=!1,Tt!==0&&oi()}},_r=K=>{if(Dn=Date.now(),Zn(),gr(),kt=!0,Yt=O.current,An=!1,K.touches.length===2){Jt=!0,St=-1,yn=Wi(K.touches),hn=re.options.fontSize||14;return}if(Jt=!1,K.touches.length!==1){St=-1;return}Je=K.touches[0].clientX,Vt=K.touches[0].clientY,_t=Ce.scrollLeft,St=0,Gi=Je,Cr=Vt,pr=K.timeStamp,di=0,Er=0,nr=Vt,ns=0,Wn=setTimeout(()=>{Wn=null,An=!0,St=-1,ii(Je,Vt)},500)},jr=K=>{if(Jt&&K.touches.length===2){if(yn>0){const Le=Math.max(8,Math.min(40,Math.round(hn*(Wi(K.touches)/yn))));Le!==(re.options.fontSize||14)&&(re.options.fontSize=Le,j.current=Le)}K.preventDefault(),K.stopPropagation();return}if(An&&K.touches.length===1){xe(K.touches[0].clientX,K.touches[0].clientY),K.preventDefault(),K.stopPropagation();return}if(K.touches.length===1&&(kn(),En()),K.touches.length!==1)return;const ue=K.touches[0].clientX-Je,ye=K.touches[0].clientY-Vt;if((Math.abs(ue)>6||Math.abs(ye)>6)&&Zn(),St===0){if(Math.abs(ue)<6&&Math.abs(ye)<6)return;St=Math.abs(ue)>Math.abs(ye)?1:-1}if(St===1){Ce.scrollLeft=_t-ue;const Le=K.touches[0].clientX,Re=K.timeStamp-pr;Re>0&&(di=(Gi-Le)/Re),Gi=Le,pr=K.timeStamp,K.preventDefault(),K.stopPropagation()}else{if(te.current){K.preventDefault(),K.stopPropagation();const Xe=K.touches[0].clientY,at=Xe-nr;nr=Xe;const vt=a.current.querySelector(".xterm-viewport"),ct=at>0?-1:1;if(vt&&EN(en().viewportY,en().baseY,ct)==="internal"){vt.scrollTop-=at,x.current=!0;return}const{notches:Kt,rem:Ct}=NN(ns+at,on);ns=Ct,Kt&&(Tt+=Kt,oi());return}const Le=K.touches[0].clientY,Re=K.timeStamp-pr;Re>0&&(Er=(Cr-Le)/Re),Cr=Le,pr=K.timeStamp}},ma=K=>{var ue;if(Zn(),An&&K.touches.length===0){An=!1;const ye=re.getSelection();ye&&ye.trim()?Nn():Q();return}if(Jt&&K.touches.length<2){Jt=!1,Su(re.options.fontSize||14),ft();return}K.touches.length===0&&xU(St===1?di:Er,K.timeStamp-pr)&&(St===1?Fs(Ce,"scrollLeft",di):St===-1&&Fs(Ce.querySelector(".xterm-viewport"),"scrollTop",Er)),K.touches.length===0&&!An&&!Jt&&St===0&&(Yt?Q():(ue=S.current)==null||ue.call(S))},Qn=K=>{if(K.deltaY){if(te.current){K.preventDefault(),K.stopPropagation();const ue=K.deltaMode===1?K.deltaY*hi:K.deltaMode===2?K.deltaY*re.rows*hi:K.deltaY,{notches:ye,rem:Le}=NN(ns-ue,hi);ns=Le,ye&&(Tt+=ye,oi());return}K.timeStamp-Ot>200&&(kt=!0),Ot=K.timeStamp,kn(),En()}},Un=K=>{SN(document.activeElement)&&K.cancelable&&K.preventDefault()};Ce.addEventListener("pointerdown",Un,{capture:!0}),Ce.addEventListener("wheel",Qn,{capture:!0,passive:!1}),Ce.addEventListener("touchstart",_r,{capture:!0,passive:!0}),Ce.addEventListener("touchmove",jr,{capture:!0,passive:!1}),Ce.addEventListener("touchend",ma,{capture:!0,passive:!0});const li=a.current.parentElement;let Gn=null,Pn=null,Bn=null,Hs=null,ki=0,zs=0;const Hr=(K,ue)=>{const ye=an(K,ue);if(!ye||Pn==null)return;const Le=re.cols,Re=ye.row*Le+ye.col,Xe=Gn==="start"?Re:Re+1;let at=Math.min(Pn,Xe),vt=Math.max(Pn,Xe);vt<=at&&(vt=at+1),at=ae(at,Le),vt=Be(vt-1,Le)+1,re.select(at%Le,Math.floor(at/Le),vt-at),Nn()},Dr=K=>{var Le,Re,Xe;const ue=(Re=(Le=K.target).closest)==null?void 0:Re.call(Le,".sel-handle");if(!ue)return;Gn=ue.dataset.end;const ye=bn();if(ye){const at=re.cols,vt=ye.start.row*at+ye.start.col,ct=ye.end.row*at+ye.end.col;Pn=Gn==="start"?ct+1:vt}else Pn=null;K.preventDefault(),K.stopPropagation(),(Xe=li.setPointerCapture)==null||Xe.call(li,K.pointerId)},ys=K=>{if(!Gn||Pn==null)return;Hr(K.clientX,K.clientY);const ue=28;Hs={x:K.clientX,y:K.clientY};const ye=Li.getBoundingClientRect();let Le=0;if(K.clientY<ye.top+ue?(ki=-1,Le=ye.top+ue-K.clientY):K.clientY>ye.bottom-ue?(ki=1,Le=K.clientY-(ye.bottom-ue)):ki=0,zs=Math.min(14,2+Le*.28),ki!==0&&Bn==null){const Re=()=>{if(!Gn||ki===0){Bn=null;return}const Xe=Li.scrollTop;if(Li.scrollTop=Xe+ki*zs,Hr(Hs.x,Hs.y),Li.scrollTop===Xe){Bn=null;return}Bn=requestAnimationFrame(Re)};Bn=requestAnimationFrame(Re)}else ki===0&&Bn!=null&&(cancelAnimationFrame(Bn),Bn=null);K.preventDefault()},Ri=K=>{var ue;Gn&&(Gn=null,Pn=null,ki=0,Bn!=null&&(cancelAnimationFrame(Bn),Bn=null),(ue=li.releasePointerCapture)==null||ue.call(li,K.pointerId))};li.addEventListener("pointerdown",Dr,{capture:!0}),li.addEventListener("pointermove",ys,{capture:!0}),li.addEventListener("pointerup",Ri,{capture:!0}),li.addEventListener("pointercancel",Ri,{capture:!0});const br=K=>{for(const{deco:Le,marker:Re}of C.current)Le.dispose(),Re.dispose();if(C.current=[],!p.current||!N.current)return;const ue=K.buffer.active,ye=ue.baseY+ue.cursorY;for(const{y:Le,x:Re,width:Xe}of CU(K)){const at=K.registerMarker(Le-ye);if(!at)continue;const vt=K.registerDecoration({marker:at,x:Re,width:Xe});if(!vt){at.dispose();continue}vt.onRender(ct=>{ct.classList.add("doc-deco")}),C.current.push({deco:vt,marker:at})}};k.current=()=>{!je&&Ae&&br(re)};const xs=async(K,ue,ye=!1)=>{var vt;if(Pe||je)return;Pe=!0;const Le=ue&&ye?(vt=a.current)==null?void 0:vt.querySelector(".xterm-viewport"):null,Re=Le&&en().length?Le.scrollHeight/en().length:0,Xe=Re?Math.floor(Le.scrollTop/Re):en().viewportY,at=ue?en().length-Xe:0;try{const ct=await vA(s,K,sn);if(je)return;if($n(Cg(zn,"ok")),ct.unchanged){L(ue);return}sn=ct.hash,te.current=!!ct.alt,se.current=!!ct.mouseAware,W(sr=>sr===!!ct.alt?sr:!!ct.alt),Dn=Date.now();let Kt=!1;ct.width&&ct.width!==re.cols&&(re.resize(ct.width,re.rows),Kt=!0);const Ct=vn;ct.height&&(vn=ct.height);const At=!Ae,_n=ct.cur?`${ct.cur.row},${ct.cur.col},${ct.cur.vis?1:0}`:"";if(!Kt&&!At&&ct.ansi===Pt&&_n===dn){L(ue);return}const Mi=dU(ct.ansi),rs=Mi?Mi.split(`
280
+ `).length:0;Ft={seed:Mi,contentRows:rs,alt:ct.alt};const rr=!ct.alt&&rs<re.rows?DN(rs,re.rows):0,ss=rr?`
281
+ `.repeat(rr)+Mi:Mi;if(Mt=ss?ss.split(`
282
+ `).length:0,await new Promise(sr=>re.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+ss,sr)),je)return;if(Pt=ct.ansi,dn=_n,Qt=ct.cur,ct.cur&&ct.cur.vis&&(Nt.current=!1),ue?re.scrollToLine(Math.max(0,en().length-at)):te.current&&At?re.scrollToTop():re.scrollToBottom(),te.current&&g.current>0){_n!==f.current&&(At||(h.current=!0),f.current=_n);const sr=jN(ct.cur,Mt);if(sr!=null){const pa=kN({cursorLine:sr,viewportY:en().viewportY,visibleRows:re.rows,baseY:en().baseY,armed:h.current});pa!=null&&re.scrollToLine(pa)}}Ae=!0;try{br(re)}catch{}L(ue),oe(),(Kt||At||vn!==Ct)&&ft(),At&&setTimeout(cn,400)}catch(ct){ct instanceof tr?_==null||_():je||$n(Cg(zn,"fail"))}finally{Pe=!1,!je&&Ae&&kn(),be&&!je&&(be=!1,ir())}},kr=async()=>{if(!(Pe||je)&&!O.current){if(Ae&&!ni()&&!te.current){L(!0);return}wt=He(),await xs(wt,!On())}};let Ti=0;async function zr(K){if(!je&&K===Ti&&await kr(),je||document.hidden||K!==Ti)return;const ue=zn.failCount>0?mU(zn.failCount):pU(Date.now()-Dn);Ze=setTimeout(()=>zr(K),ue)}const ir=()=>{Ti+=1,Ze&&(clearTimeout(Ze),Ze=null),zr(Ti)};ir();const fa=()=>{if(Dn=Date.now(),Nt.current=!0,oe(),Pe){be=!0;return}ir()};st.current=fa;const is=()=>{document.hidden?(Ti+=1,Ze&&(clearTimeout(Ze),Ze=null)):($n(Cg(zn,"reset")),wt=He(),Dn=Date.now(),ir())};document.addEventListener("visibilitychange",is);const $s=re.onScroll(()=>{if(!je){if(On()){L(!1),ie("");return}L(!0),kn(),En()}}),Li=a.current.querySelector(".xterm-viewport"),z=()=>{O.current&&Nn()};return Li==null||Li.addEventListener("scroll",z,{passive:!0}),()=>{je=!0,Bn!=null&&cancelAnimationFrame(Bn),de.current=null,st.current=null,M.current=null,k.current=null,J.current=null,Zn(),gr(),Ze&&clearTimeout(Ze),document.removeEventListener("visibilitychange",is),window.removeEventListener("resize",Rt),window.removeEventListener("orientationchange",Rt),gn==null||gn.disconnect(),Ce.removeEventListener("pointerdown",Un,{capture:!0}),Ce.removeEventListener("wheel",Qn,{capture:!0}),Ce.removeEventListener("touchstart",_r,{capture:!0}),Ce.removeEventListener("touchmove",jr,{capture:!0}),Ce.removeEventListener("touchend",ma,{capture:!0}),li.removeEventListener("pointerdown",Dr,{capture:!0}),li.removeEventListener("pointermove",ys,{capture:!0}),li.removeEventListener("pointerup",Ri,{capture:!0}),li.removeEventListener("pointercancel",Ri,{capture:!0}),Li==null||Li.removeEventListener("scroll",z),$s.dispose(),We.dispose();for(const{deco:K,marker:ue}of C.current)K.dispose(),ue.dispose();C.current=[],Xn(),$e(),m.current=null,re.dispose(),u.current=null}},[s]);const bt=()=>{var We,Ye,ge,Ze;(We=M.current)==null||We.call(M);const re=(Ye=a.current)==null?void 0:Ye.querySelector(".xterm-viewport");re&&(re.scrollTop=re.scrollHeight),(ge=u.current)==null||ge.scrollToBottom(),L(!1),ie(""),(Ze=st.current)==null||Ze.call(st)},Gt=async re=>{var Ze;const We=u.current,Ye=We==null?void 0:We.buffer.active,ge=re==="up"?-1:1;if(We&&Ye&&EN(Ye.viewportY,Ye.baseY,ge)==="internal"){We.scrollLines(ge*Math.max(1,We.rows-1)),x.current=!0;return}try{await Pu(s,[re==="up"?"PageUp":"PageDown"]),(Ze=st.current)==null||Ze.call(st)}catch{}},Ee=()=>{var We;const re=!X;Y(re),v.current=re,(We=m.current)==null||We.call(m)},Te=()=>{var re;Ie.current=!0,(re=de.current)==null||re.call(de)},Ge=async()=>{const re=u.current,We=ES((re==null?void 0:re.getSelection())??"");if(We){let Ye=!1;if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText(We),Ye=!0}catch{}if(!Ye){const ge=document.createElement("textarea");ge.value=We,ge.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(ge),ge.focus(),ge.select();try{document.execCommand("copy")}catch{}document.body.removeChild(ge)}}re==null||re.clearSelection(),O.current=!1,ee(null),G("")};return o.jsxDEV("div",{className:"terminal-wrap",children:[o.jsxDEV("div",{ref:a,className:$?"terminal":"terminal terminal--loading"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1415,columnNumber:7},this),!$&&o.jsxDEV(xS,{hint:V("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1416,columnNumber:18},this),!A&&o.jsxDEV("div",{className:"term-banner term-banner--err",children:"⚠ 连接断开,重连中…"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1417,columnNumber:22},this),he&&o.jsxDEV("div",{className:"dbg",children:ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1418,columnNumber:22},this),A&&me&&!I&&o.jsxDEV("div",{className:"term-banner term-banner--hist",children:me},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1419,columnNumber:47},this),I&&o.jsxDEV("div",{className:"term-banner term-banner--sel",children:I},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1420,columnNumber:19},this),me&&o.jsxDEV("button",{className:"new-output",onClick:bt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1421,columnNumber:22},this),B&&o.jsxDEV("div",{className:"term-pager",role:"group","aria-label":"翻页",onPointerDown:re=>{SN(document.activeElement)&&re.cancelable&&re.preventDefault()},children:[o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"上翻页",onClick:()=>Gt("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:1434,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1433,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1432,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:1437,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"下翻页",onClick:()=>Gt("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:1440,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1439,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1438,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1431,columnNumber:11},this),o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"适配高度",title:"适配高度",onClick:Te,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:1447,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:1448,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1446,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1445,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:1451,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"定位光标行",title:"定位光标行","aria-pressed":X,onClick:Ee,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:1454,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:1455,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1453,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1452,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1444,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1423,columnNumber:9},this),ne&&(()=>{const re=Math.min(ne.start.x,ne.end.x),We=Math.min(ne.start.y,ne.end.y),Ye=Math.max(ne.start.y,ne.end.y),ge=Math.max(8,Math.min(re,(ne.wrapW??0)-IU-8)),Ze=We-44,je=Ye+(ne.start.ch||0)+8,Pe=Ze<4?je:Ze;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"sel-handle sel-handle--start",style:{left:ne.start.x,top:ne.start.y,"--h":`${ne.start.ch}px`},"data-end":"start"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1473,columnNumber:11},this),o.jsxDEV("div",{className:"sel-handle sel-handle--end",style:{left:ne.end.x,top:ne.end.y,"--h":`${ne.end.ch}px`},"data-end":"end"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1476,columnNumber:11},this),o.jsxDEV("div",{className:"sel-callout",style:{left:ge,top:Pe},children:[o.jsxDEV("button",{type:"button",onClick:Ge,children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1481,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:()=>{const be=J.current;be&&be.selectRange(VU(be.currentRange(),u.current.cols))},children:"整行"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1482,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:()=>{const be=J.current;if(!be)return;const Ae=u.current.buffer.active;be.selectRange(PU(be.currentRange(),u.current.cols,be.paraLineText,0,Ae.length-1))},children:"整段"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1486,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1479,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1472,columnNumber:9},this)})()]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1414,columnNumber:5},this)}),WU=[["esc","tab","tilde","slash","up","at","del"],["ctrl","shift","alt","left","down","right","enter"]],Iu=["ctrl","shift","alt"],Xg={kbd:"⌨",esc:"Esc",up:"▲",tab:"Tab",ctrl:"Ctrl",shift:"Shift",del:"⌫",left:"◀",down:"▼",right:"▶",alt:"Alt",slash:"/",tilde:"~",at:"@",enter:"Enter"},GU=new Set(["up","down","left","right","del"]),TN={esc:"Escape",tab:"Tab",del:"BSpace",enter:"Enter",up:"Up",down:"Down",left:"Left",right:"Right"},LN={slash:"/",tilde:"~",at:"@"};function qU(r){return r in TN?{kind:"key",name:TN[r]}:r in LN?{kind:"text",ch:LN[r]}:null}const Jg="off",E_="armed",Zg="locked",ua=r=>r===E_||r===Zg,YU=r=>Iu.some(s=>ua(r[s]));function Qg(r){const s={};for(const d of Iu)s[d]=r[d]===E_?Jg:r[d]??Jg;return s}function jS(r,s){if(!r||!YU(s))return r;const d=ua(s.ctrl),_=ua(s.shift),E=ua(s.alt);if(_&&r.kind==="key"){if(r.name==="Tab")return{kind:"key",name:"BTab"};if(["Up","Down","Left","Right"].includes(r.name))return{kind:"key",name:`S-${r.name}`}}return(d||E)&&r.kind==="text"&&/^[a-z0-9]$/i.test(r.ch)?{kind:"key",name:`${d?"C":"M"}-${r.ch.toLowerCase()}`}:r}const KU={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"},XU={Escape:"Esc",BSpace:"⌫",Space:"Space",PageUp:"PgUp",PageDown:"PgDn"};function JU(r,s){const d=!!r.ctrl,_=!!r.shift,E=!!r.alt,R=(s||"").trim();if(!R)return null;const b=[];d&&b.push("Ctrl"),_&&b.push("Shift"),E&&b.push("Alt");const a=g=>[...b,g].join("+"),u=KU[R.toLowerCase()];return u?{name:u==="Tab"&&_&&!d&&!E?"BTab":(d?"C-":"")+(E?"M-":"")+(_?"S-":"")+u,label:a(XU[u]||u)}:R.length!==1||!d&&!E&&!_?null:d||E?{name:(d?"C-":"")+(E?"M-":"")+R.toLowerCase(),label:a(R.toUpperCase())}:{name:R.toUpperCase(),label:a(R.toUpperCase())}}function ZU(r,{delay:s=400,interval:d=120}={}){let _=null,E=null;const R=()=>{_&&clearTimeout(_),E&&clearInterval(E),_=null,E=null};return{start:()=>{R(),r(),_=setTimeout(()=>{E=setInterval(r,d)},s)},stop:R}}const MN={up:"Up",down:"Down",left:"Left",right:"Right",tilde:"Tilde",slash:"Slash",at:"At",del:"Backspace"},DS=r=>{r.cancelable&&r.preventDefault()},QU=500;function e2({onKey:r,onText:s,mods:d,setMods:_,keyHeldRef:E}){const R=U.useRef(d);R.current=d;const b=u=>{const g=qU(u);if(!g)return;const x=Iu.some(f=>ua(R.current[f])),h=x?jS(g,R.current):g;h.kind==="key"?r(h.name):s(h.ch),x&&_(Qg)},a=u=>Iu.includes(u)?o.jsxDEV(n2,{id:u,state:d[u],setMods:_},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:43,columnNumber:40},this):o.jsxDEV(i2,{id:u,dispatch:b,keyHeldRef:E},u,!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:WU.flat().map(a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:49,columnNumber:10},this)}const t2=300;function n2({id:r,state:s,setMods:d}){const _=U.useRef(-1/0),E=b=>{const a=b.timeStamp||0;if(a-_.current<t2){_.current=-1/0,d(u=>({...u,[r]:Zg}));return}_.current=a,d(u=>({...u,[r]:ua(u[r])?Jg:E_}))},R=s===Zg?" locked":ua(s)?" armed":"";return o.jsxDEV("button",{type:"button",className:`keybar-key keybar-mod${R}`,"data-key":r,"data-state":s,"aria-pressed":ua(s),"aria-label":Xg[r],onPointerDown:DS,onClick:E,children:Xg[r]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:75,columnNumber:5},this)}function i2({id:r,dispatch:s,keyHeldRef:d}){const _=U.useRef(null),E=U.useRef(s);E.current=s;const R=U.useRef(null),b=S=>{d&&(d.current=S)},a=Xg[r];if(!GU.has(r))return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":r,"aria-label":MN[r]||a,onPointerDown:DS,onClick:()=>s(r),children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:94,columnNumber:12},this);const u=()=>{const S=R.current;S!=null&&S.guard&&(clearTimeout(S.guard),S.guard=null)},g=S=>{S.cancelable&&S.preventDefault(),_.current||(_.current=ZU(()=>E.current(r)));const C={x:S.clientX,y:S.clientY,held:!1,moved:!1,guard:null};C.guard=setTimeout(()=>{C.held=!0,C.guard=null,_.current.start()},QU),R.current=C,b(!0)},x=S=>{const C=R.current;!C||C.held||(Math.abs(S.clientX-C.x)>8||Math.abs(S.clientY-C.y)>8)&&(C.moved=!0,u(),b(!1))},h=()=>{const S=R.current;b(!1),S&&(u(),S.held?_.current.stop():S.moved||E.current(r),R.current=null)},f=()=>{var S;b(!1),u(),(S=R.current)!=null&&S.held&&_.current.stop(),R.current=null};return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":r,"aria-label":MN[r]||a,onPointerDown:g,onPointerMove:x,onPointerUp:h,onPointerCancel:f,onPointerLeave:f,children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:130,columnNumber:5},this)}const kS=r=>`hm_favs6_${r}`,RS="command",e_=r=>r?`command@${r}`:RS,r2={command:[],agent:[{kind:"key",text:"Escape",label:"Esc"},{kind:"key",text:"Tab",label:"Tab"},{kind:"key",text:"BSpace",label:"⌫"},{kind:"reply",text:"ok"},{kind:"reply",text:"go on"},{kind:"reply",text:"1"},{kind:"reply",text:"2"},{kind:"reply",text:"3"},{kind:"cmd",text:"/compact"},{kind:"cmd",text:"/clear"},{kind:"cmd",text:"/model"}]};function er(r){try{const s=localStorage.getItem(kS(r));if(s)return JSON.parse(s)}catch{}return(r2[r]||[]).map(s=>({...s}))}function Sm(r,s){try{localStorage.setItem(kS(r),JSON.stringify(s))}catch{}return s}function t_(r,s){const d=er(r);if(d.some(E=>E.text===s.text))return d;const _=s.kind==="key"?{kind:"key",text:s.text,label:s.label}:{kind:s.kind,text:s.text,enter:!!s.enter};return Sm(r,[...d,_])}function n_(r,s){return Sm(r,er(r).filter(d=>d.text!==s))}function s2(r,s,d){const _=er(r),E=_.findIndex(b=>b.text===s);if(E<0||_.some((b,a)=>a!==E&&b.text===d.text))return _;const R=_.slice();return R[E]=d.kind==="key"?{kind:"key",text:d.text,label:d.label}:{kind:d.kind,text:d.text,enter:!!d.enter},Sm(r,R)}function a2(r,s,d){const _=er(r),E=_.findIndex(a=>a.text===s),R=E+(d<0?-1:1);if(E<0||R<0||R>=_.length)return _;const b=_.slice();return[b[E],b[R]]=[b[R],b[E]],Sm(r,b)}const o2=r=>{var s;try{(s=navigator.clipboard)==null||s.writeText(r)}catch{}};function l2({open:r,mode:s,recent:d=[],onSend:_,onFill:E,onClose:R,onDelete:b,historyOnly:a=!1}){const[u,g]=U.useState(()=>er(s)),x=U.useRef(null),[h,f]=U.useState(s);if(h!==s&&(f(s),g(er(s))),!r)return null;const S=a?[]:u.filter(v=>v.kind==="reply"),C=a?[]:u.filter(v=>v.kind==="cmd"),y=()=>{var p;const v=(((p=x.current)==null?void 0:p.value)||"").trim();if(!v)return;const m=s==="agent"&&!v.startsWith("/")?"reply":"cmd";g(t_(s,{kind:m,text:v})),x.current&&(x.current.value="")},l=v=>g(n_(s,v));return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:R},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":V("fav.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:V(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:R,"aria-label":V("common.close"),children:o.jsxDEV(ca,{},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:V("history.scope")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:42,columnNumber:27},this),S.length>0&&o.jsxDEV("div",{className:"fav-chips",children:S.map(v=>o.jsxDEV("span",{className:"fav-chip",onClick:()=>_(v.text),onContextMenu:m=>{m.preventDefault(),l(v.text)},children:v.text},v.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(v=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>_(v.text),onDoubleClick:()=>E(v.text),children:v.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:()=>l(v.text),"aria-label":V("common.delete"),children:o.jsxDEV(ca,{},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)]},v.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:52,columnNumber:13},this)),d.map(v=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>_(v),onDoubleClick:()=>E(v),children:v},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:()=>o2(v),"aria-label":V("common.copy"),children:o.jsxDEV(aS,{},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(v),"aria-label":V("common.delete"),children:o.jsxDEV(ca,{},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:${v}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:58,columnNumber:13},this)),a&&d.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:V("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:x,className:"fav-add-input",placeholder:V("fav.addPlaceholder"),onKeyDown:v=>{v.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:V("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 hm=[{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}}],c2=r=>hm.find(s=>s.key===r)||hm[0],u2=[["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"]],d2=[...u2.map(([r,s])=>({value:r,label:s})),..."abcdefghijklmnopqrstuvwxyz".split("").map(r=>({value:r,label:r.toUpperCase()})),..."0123456789".split("").map(r=>({value:r,label:r}))];function h2(r){let s=r.text||"";if(s==="BTab")return{sticky:"shift",base:"Tab"};let d=!1,_=!1,E=!1;s.startsWith("C-")&&(d=!0,s=s.slice(2)),s.startsWith("M-")&&(_=!0,s=s.slice(2)),s.startsWith("S-")&&(E=!0,s=s.slice(2)),!d&&!_&&!E&&s.length===1&&s>="A"&&s<="Z"&&(E=!0);const R=hm.find(b=>!!b.mods.ctrl===d&&!!b.mods.shift===E&&!!b.mods.alt===_);return{sticky:R?R.key:"none",base:s.length===1?s.toLowerCase():s}}function AN({value:r,options:s,onChange:d,placeholder:_}){const[E,R]=U.useState(!1),b=s.find(a=>a.value===r);return o.jsxDEV("div",{className:"cmd-dd",children:[o.jsxDEV("button",{type:"button",className:`cmd-dd-btn${E?" open":""}`,onClick:()=>R(a=>!a),"aria-haspopup":"listbox","aria-expanded":E,children:[o.jsxDEV("span",{className:b?void 0:"cmd-dd-ph",children:b?b.label:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:61,columnNumber:9},this),o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:61,columnNumber:95},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:59,columnNumber:7},this),E&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-dd-scrim",onClick:()=>R(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:65,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===r,className:`cmd-dd-opt${a.value===r?" on":""}`,onClick:()=>{d(a.value),R(!1)},children:[o.jsxDEV("span",{children:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:71,columnNumber:17},this),a.value===r&&o.jsxDEV(S_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:39},this)]},a.value,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:68,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:66,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:64,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:58,columnNumber:5},this)}function m2({title:r,accent:s,items:d,showTitle:_=!0,onMove:E,onDel:R,onEdit:b}){return o.jsxDEV("div",{className:`cmd-esection ${s}`,children:[_&&o.jsxDEV("div",{className:`cmd-section ${s}`,children:o.jsxDEV("span",{className:"cmd-section-name",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:87,columnNumber:62},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:87,columnNumber:21},this),d.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:V("cmd.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:88,columnNumber:30},this),d.map((a,u)=>o.jsxDEV("div",{className:"cmd-row",children:[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:94,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:92,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-move up",disabled:u===0,onClick:()=>E(a.text,-1),"aria-label":V("cmd.moveUp"),children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:97,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:96,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-move",disabled:u===d.length-1,onClick:()=>E(a.text,1),"aria-label":V("cmd.moveDown"),children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:99,columnNumber:44},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:98,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-del",onClick:()=>R(a.text),"aria-label":V("common.delete"),children:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:100,columnNumber:101},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:100,columnNumber:11},this)]},a.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:90,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:86,columnNumber:5},this)}function f2({scopes:r,cfg:s,edit:d,inset:_,onAdd:E,onUpdate:R,onClose:b}){const a=d&&d.fav.kind==="key"?h2(d.fav):null,[u,g]=U.useState(d&&d.fav.kind==="key"?"key":"msg"),[x,h]=U.useState(d?d.scope:r[0].key),[f,S]=U.useState(d?a?a.base:d.fav.text:""),[C,y]=U.useState(d&&d.fav.kind!=="key"?!!d.fav.enter:!1),[l,v]=U.useState(a?a.sticky:"none"),m=U.useRef(null),p=L=>{L!==u&&(g(L),S(""))},N=hm.map(L=>({value:L.key,label:L.label??V("cmd.stickyNone")})),k=u==="key"?JU(c2(l).mods,f):null,j=r.some(L=>L.key===x)?x:r[0].key,M=u==="key"?!!k:!!f.trim(),D=()=>{var A;if(!M)return;const L=u==="key"?{kind:"key",text:k.name,label:k.label}:{kind:s.msgKind(f.trim()),text:f.trim(),enter:C};if(d){R(d.scope,d.fav.text,j,L);return}E(j,L),S(""),(A=m.current)==null||A.focus()};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:144,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-addcard",role:"dialog","aria-label":V(d?"cmd.editItem":"cmd.addTitle"),style:{transform:`translate(-50%, calc(-50% + ${_/2}px))`},children:[o.jsxDEV("div",{className:"cmd-addcard-head",children:[o.jsxDEV("span",{className:"cmd-title",children:V(d?"cmd.editItem":"cmd.addTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:148,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:b,"aria-label":V("common.close"),children:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:149,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:149,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:147,columnNumber:9},this),o.jsxDEV("div",{className:"cmd-modetabs",role:"tablist",children:[o.jsxDEV("button",{type:"button",role:"tab","aria-selected":u==="msg",className:`cmd-modetab${u==="msg"?" on":""}`,onClick:()=>p("msg"),children:s.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:155,columnNumber:11},this),o.jsxDEV("button",{type:"button",role:"tab","aria-selected":u==="key",className:`cmd-modetab${u==="key"?" on":""}`,onClick:()=>p("key"),children:V("cmd.tabKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:157,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:154,columnNumber:9},this),r.length>1&&o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:V("cmd.addTo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:164,columnNumber:13},this),o.jsxDEV("div",{className:"cmd-seg",role:"group",children:r.map(L=>o.jsxDEV("button",{type:"button","aria-pressed":j===L.key,className:`cmd-seg-btn${L.accent==="win"?" win":""}${j===L.key?" on":""}`,onClick:()=>h(L.key),children:L.title},L.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:167,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:165,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:163,columnNumber:11},this),u==="key"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:V("cmd.sticky")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:179,columnNumber:15},this),o.jsxDEV(AN,{value:l,options:N,onChange:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:180,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:178,columnNumber:13},this),o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:V("cmd.baseKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:183,columnNumber:15},this),o.jsxDEV(AN,{value:f,options:d2,onChange:S,placeholder:V("cmd.pickKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:184,columnNumber:15},this),k&&o.jsxDEV("span",{className:"cmd-chord-preview",children:k.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:185,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:182,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:176,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:191,columnNumber:15},this),o.jsxDEV("input",{ref:m,className:"cmd-add-input",value:f,placeholder:s.placeholder,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:L=>S(L.target.value),onKeyDown:L=>{L.key==="Enter"&&D()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:192,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:190,columnNumber:13},this),s.hasEnter&&o.jsxDEV("label",{className:"cmd-toggle-row",children:[o.jsxDEV("span",{children:V("cmd.withEnter")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:200,columnNumber:17},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:C,onChange:L=>y(L.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:202,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:203,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:204,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:201,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:199,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:189,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"cmd-submit",disabled:!M,onClick:D,children:V(d?"common.save":"fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:211,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:145,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:143,columnNumber:5},this)}function p2(r,s){if(r==="chat")return{title:V("chat.editTitle"),scopes:[{key:"agent",title:V("chat.favs"),accent:"global"}],card:{msgLabel:V("chat.tabMsg"),placeholder:V("chat.addPlaceholder"),hasEnter:!1,msgKind:_=>_.startsWith("/")?"cmd":"reply"}};const d=s?e_(s):null;return{title:V("cmd.editTitle"),scopes:[{key:RS,title:V("cmd.global"),accent:"global"},...d?[{key:d,title:V("cmd.window"),accent:"win"}]:[]],card:{msgLabel:V("cmd.tabCmd"),placeholder:V("cmd.addPlaceholder"),hasEnter:!0,msgKind:()=>"cmd"}}}function i_({windowId:r,inset:s=0,variant:d="command",onClose:_}){const{title:E,scopes:R,card:b}=p2(d,r),[a,u]=U.useState(()=>Object.fromEntries(R.map(l=>[l.key,er(l.key)]))),[g,x]=U.useState(null),h=()=>u(Object.fromEntries(R.map(l=>[l.key,er(l.key)]))),f=(l,v,m)=>{a2(l,v,m),h()},S=(l,v)=>{n_(l,v),h()},C=(l,v)=>{t_(l,v),h()},y=(l,v,m,p)=>{l===m?s2(l,v,p):(n_(l,v),t_(m,p)),h(),x(null)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:271,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-panel cmd-editor",role:"dialog","aria-label":E,children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:274,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-add-open",onClick:()=>x({edit:null}),"aria-label":V("cmd.addTitle"),children:o.jsxDEV(N_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:275,columnNumber:115},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:275,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:_,"aria-label":V("common.close"),children:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:276,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:276,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:273,columnNumber:9},this),o.jsxDEV("div",{className:"cmd-list",children:R.map(l=>o.jsxDEV(m2,{title:l.title,accent:l.accent,items:a[l.key]||[],showTitle:R.length>1,onMove:(v,m)=>f(l.key,v,m),onDel:v=>S(l.key,v),onEdit:v=>x({edit:{fav:v,scope:l.key}})},l.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:280,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:278,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:272,columnNumber:7},this),g&&o.jsxDEV(f2,{scopes:R,cfg:b,edit:g.edit,inset:s,onAdd:C,onUpdate:y,onClose:()=>x(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:287,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:270,columnNumber:5},this)}function j_({active:r,disabled:s,onToggle:d}){const _=U.useRef({x:0,y:0,moved:!1}),E=a=>{_.current={x:a.clientX,y:a.clientY,moved:!1}},R=a=>{const u=_.current;!u.moved&&Math.hypot(a.clientX-u.x,a.clientY-u.y)>10&&(u.moved=!0)},b=()=>{_.current.moved||d()};return o.jsxDEV("button",{type:"button",className:`input-mic${r?" on":""}`,"aria-label":V(r?"mic.stop":"mic.start"),"aria-pressed":r,disabled:s,onPointerDown:E,onPointerMove:R,onPointerUp:b,children:o.jsxDEV(i3,{},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 TS=["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"],D_=TS.map(r=>`.${r}`).join(","),v2=new Set(TS);function g2(r){const s=/\.([A-Za-z0-9]+)$/.exec(r||"");return s?v2.has(s[1].toLowerCase()):!1}function LS(r){const d=(Array.isArray(r)?r:r&&typeof r.length=="number"?Array.from(r):[r]).filter(Boolean),_=[],E=[];for(const R of d)(g2(R.name)?_:E).push(R);return{allowed:_,rejected:E.map(R=>R.name)}}const MS={active:!1,phase:null,pct:0,label:""};let Fu=MS,Uu=null;const r_=new Set,k_=()=>{for(const r of[...r_])r()};function AS(r,s=""){Uu=r,Fu={active:!0,phase:"sending",pct:0,label:s},k_()}function mm(r){Fu={...Fu,...r},k_()}function s_(){Uu=null,Fu=MS,k_()}function _2(){Uu==null||Uu.abort()}const b2=r=>(r_.add(r),()=>r_.delete(r)),y2=()=>Fu;function x2(){return U.useSyncExternalStore(b2,y2)}function US({cwd:r,onAuthFail:s,onPaths:d}){const[_,E]=U.useState(null),R=U.useRef(null);return U.useEffect(()=>()=>clearTimeout(R.current),[]),{upload:_,uploadFiles:async a=>{const{allowed:u,rejected:g}=LS(a);if(!u.length){g.length&&(clearTimeout(R.current),E({label:V("dock.upload.rejected",{names:g.join("、")}),error:!0}),R.current=setTimeout(()=>E(null),3500));return}clearTimeout(R.current),E(null);const x=u.length,h=[],f=[],S=new AbortController;AS(S,V("dock.upload.progress",{name:u[0].name,tag:x>1?`(1/${x})`:""}));try{for(let C=0;C<x&&!S.signal.aborted;C++){const y=u[C],l=x>1?`(${C+1}/${x})`:"";mm({label:V("dock.upload.progress",{name:y.name,tag:l}),phase:"sending",pct:0});try{const v=await nS(r||"",y,(m,p)=>mm({pct:m,phase:p}),!0,{signal:S.signal});v!=null&&v.path&&h.push(v.path)}catch(v){if(v instanceof lm)break;if(v instanceof tr){s==null||s(),s_(),E(null);return}f.push({name:y.name,reason:(v==null?void 0:v.message)||V("api.uploadFailed")})}}}finally{s_()}if(h.length&&d(h),f.length||g.length){const C=f.map(y=>`${y.name}:${y.reason}`);g.length&&C.push(V("dock.upload.rejected",{names:g.join("、")})),E({label:C.join(";"),error:!0}),R.current=setTimeout(()=>E(null),5e3)}else E(null)}}}function w2(r,s){const d=s/16e3,_=Math.floor(r.length/d),E=new Int16Array(_);for(let R=0;R<_;R++){let b=r[Math.floor(R*d)];b>1?b=1:b<-1&&(b=-1),E[R]=b<0?b*32768:b*32767}return new Uint8Array(E.buffer)}function N2(r=1280){let s=new Uint8Array(0);return{push(d){const _=new Uint8Array(s.length+d.length);_.set(s),_.set(d,s.length);const E=[];let R=0;for(;_.length-R>=r;)E.push(_.slice(R,R+r)),R+=r;return s=_.slice(R),E},flush(){if(s.length===0)return null;const d=s;return s=new Uint8Array(0),d}}}function UN(r){let s="";for(let d=0;d<r.length;d++)s+=String.fromCharCode(r[d]);return btoa(s)}const S2="data:text/javascript;base64,Ly8gd2ViL3NyYy92b2ljZS9wY20td29ya2xldC5qcwovLyBNaW5pbWFsIEF1ZGlvV29ya2xldDogZm9yd2FyZCBlYWNoIHJlbmRlciBxdWFudHVtJ3MgbW9ubyBzYW1wbGVzIHRvIHRoZSBtYWluIHRocmVhZCwgd2hpY2ggZG9lcyB0aGUKLy8gKHVuaXQtdGVzdGVkKSBkb3duc2FtcGxlL2ZyYW1lL2VuY29kZS4gS2VwdCB0cml2aWFsIG9uIHB1cnBvc2Ug4oCUIHdvcmtsZXQgY29kZSBjYW4ndCBiZSB1bml0LXRlc3RlZC4KY2xhc3MgUGNtRm9yd2FyZGVyIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBwcm9jZXNzKGlucHV0cykgewogICAgY29uc3QgY2ggPSBpbnB1dHNbMF0gJiYgaW5wdXRzWzBdWzBdOwogICAgaWYgKGNoICYmIGNoLmxlbmd0aCkgdGhpcy5wb3J0LnBvc3RNZXNzYWdlKGNoLnNsaWNlKDApKTsgLy8gY29weTogdGhlIGJ1ZmZlciBpcyByZXVzZWQgYWZ0ZXIgcHJvY2VzcygpCiAgICByZXR1cm4gdHJ1ZTsKICB9Cn0KcmVnaXN0ZXJQcm9jZXNzb3IoJ3BjbS1mb3J3YXJkZXInLCBQY21Gb3J3YXJkZXIpOwo=";function C2({getUserMedia:r=d=>navigator.mediaDevices.getUserMedia(d),AudioCtor:s=window.AudioContext||window.webkitAudioContext}={}){let d=null,_=null,E=null,R=null;const b=N2(1280);async function a(g){_=await r({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}}),d=new s,await d.resume(),await d.audioWorklet.addModule(S2),R=d.createMediaStreamSource(_),E=new AudioWorkletNode(d,"pcm-forwarder"),E.port.onmessage=x=>{const h=w2(x.data,d.sampleRate);for(const f of b.push(h))g(UN(f))},R.connect(E),E.connect(d.destination)}async function u(){try{E&&(E.port.onmessage=null)}catch{}try{R&&R.disconnect(),E&&E.disconnect()}catch{}try{_&&_.getTracks().forEach(x=>x.stop())}catch{}try{d&&await d.close()}catch{}const g=b.flush();return d=_=E=R=null,g?UN(g):null}return{start:a,stop:u}}const E2={language:"zh_cn",domain:"iat",accent:"mandarin",vad_eos:1e4,dwa:"wpgs",ptt:1,nunum:1},R_="audio/L16;rate=16000";function j2(r,s){return{common:{app_id:r},business:{...E2},data:{status:0,format:R_,encoding:"raw",audio:s}}}function D2(r){return{data:{status:1,format:R_,encoding:"raw",audio:r}}}function k2(){return{data:{status:2,format:R_,encoding:"raw",audio:""}}}function ON(){return{sentences:new Map}}function R2(r,s){var R;const d=(R=s==null?void 0:s.data)==null?void 0:R.result;if(!d||!Array.isArray(d.ws))return r;const _=d.ws.map(b=>(b.cw||[]).map(a=>a.w).join("")).join(""),E=new Map(r.sentences);if(d.pgs==="rpl"&&Array.isArray(d.rg))for(let b=d.rg[0];b<=d.rg[1];b++)E.delete(b);return E.set(d.sn,_),{sentences:E}}function VN(r){return[...r.sentences.keys()].sort((s,d)=>s-d).map(s=>r.sentences.get(s)).join("")}const T2=55e3,L2=4e3;function T_({onText:r,deps:s={}}){const d=s.signAsr||LA,_=s.WebSocketCtor||window.WebSocket,E=s.makeRecorder||(()=>C2()),[R,b]=U.useState("idle"),[a,u]=U.useState(""),g=U.useRef("idle"),x=U.useCallback(L=>{g.current=L,b(L)},[]),h=U.useRef(null),f=U.useRef(null),S=U.useRef(ON()),C=U.useRef(""),y=U.useRef(!1),l=U.useRef(null),v=U.useRef(null),m=U.useRef(null),p=U.useRef(r);p.current=r;const N=U.useCallback(()=>{clearTimeout(l.current),clearTimeout(v.current);try{h.current&&h.current.close()}catch{}h.current=null,f.current=null,y.current=!1},[]),k=U.useCallback(()=>{var L;g.current!=="idle"&&((L=p.current)==null||L.call(p,VN(S.current)),u(""),x("idle"),N())},[N,x]),j=U.useCallback(L=>{const A=h.current;!A||A.readyState!==1||(A.send(JSON.stringify(y.current?D2(L):j2(C.current,L))),y.current=!0)},[]),M=U.useCallback(async()=>{if(g.current==="recording"){x("finalizing"),clearTimeout(l.current);try{const L=f.current?await f.current.stop():null;L&&j(L);const A=h.current;A&&A.readyState===1?(A.send(JSON.stringify(k2())),v.current=setTimeout(()=>k(),L2)):k()}catch{x("error"),N()}}},[j,N,x,k]);m.current=M;const D=U.useCallback(async()=>{if(!(g.current!=="idle"&&g.current!=="error")){x("requesting"),u(""),S.current=ON(),y.current=!1;try{const{url:L,appId:A}=await d();C.current=A;const F=new _(L);h.current=F,F.onmessage=I=>{var ne;const G=JSON.parse(I.data);S.current=R2(S.current,G),u(VN(S.current)),((ne=G==null?void 0:G.data)==null?void 0:ne.status)===2&&k()},F.onerror=()=>{x("error"),N()},F.onclose=()=>{(g.current==="recording"||g.current==="finalizing")&&k()};const O=E();f.current=O,await O.start(j),x("recording"),l.current=setTimeout(()=>{var I;(I=m.current)==null||I.call(m)},T2)}catch{x("error"),N()}}},[d,_,E,j,N,x,k]);return U.useEffect(()=>N,[N]),{state:R,partial:a,start:D,stop:M}}const OS="tw_asr";function M2(){try{const r=localStorage.getItem(OS);return r==null?null:r==="1"}catch{return null}}function L_(){const[r,s]=U.useState(M2);return U.useEffect(()=>{let d=!0;return Promise.resolve().then(tS).then(_=>{if(!d)return;const E=!!(_!=null&&_.asr);s(E);try{localStorage.setItem(OS,E?"1":"0")}catch{}}).catch(()=>{}),()=>{d=!1}},[]),r}function Cm(r){U.useEffect(()=>{if(!r||!("wakeLock"in navigator))return;let s=null,d=!1;const _=async()=>{try{const R=await navigator.wakeLock.request("screen");if(d){try{R.release()}catch{}return}s=R}catch{}},E=()=>{document.visibilityState==="visible"&&!d&&_()};return _(),document.addEventListener("visibilitychange",E),()=>{d=!0,document.removeEventListener("visibilitychange",E);try{s&&s.release()}catch{}s=null}},[r])}function es(r,s){const d=U.useRef(s);d.current=s,U.useEffect(()=>{if(!r)return;window.history.pushState({overlay:!0},"");const _=()=>{var E;return(E=d.current)==null?void 0:E.call(d)};return window.addEventListener("popstate",_),()=>{var E;window.removeEventListener("popstate",_),(E=window.history.state)!=null&&E.overlay&&window.history.back()}},[r])}function PN(){const r=window.visualViewport;return r?window.innerHeight-r.height>120:!1}function A2(){const[r,s]=U.useState(0);return U.useEffect(()=>{const d=window.visualViewport;if(!d)return;const _=()=>{const E=window.innerHeight-d.height-d.offsetTop;s(Math.max(0,Math.round(E)))};return _(),d.addEventListener("resize",_),d.addEventListener("scroll",_),()=>{d.removeEventListener("resize",_),d.removeEventListener("scroll",_)}},[]),r}const Pl={ESC:"Escape",Esc:"Escape",Tab:"Tab","⌫":"BSpace"},BN=r=>{r.cancelable&&r.preventDefault()},U2=r=>{var s,d;(d=(s=r.target).closest)!=null&&d.call(s,"input, textarea, [contenteditable]")||r.cancelable&&r.preventDefault()},IN=80,O2=r=>Pl[r]?"esc":r.startsWith("/")?"cmd":"reply",V2=450;function Dg({className:r,onTap:s,onHold:d,children:_,...E}){const R=U.useRef({timer:null,long:!1,moved:!1,x:0,y:0}),b=x=>{x.cancelable&&x.preventDefault();const h=R.current;h.long=!1,h.moved=!1,h.x=x.clientX,h.y=x.clientY,d&&(h.timer=setTimeout(()=>{var f;h.long=!0,(f=navigator.vibrate)==null||f.call(navigator,12),d()},V2))},a=x=>{const h=R.current;h.moved||(Math.abs(x.clientX-h.x)>8||Math.abs(x.clientY-h.y)>8)&&(h.moved=!0,clearTimeout(h.timer))},u=()=>{const x=R.current;if(clearTimeout(x.timer),x.timer=null,x.moved){x.moved=!1;return}if(x.long){x.long=!1;return}s()},g=()=>{const x=R.current;clearTimeout(x.timer),x.timer=null,x.long=!1,x.moved=!1};return o.jsxDEV("button",{type:"button",className:r,...E,onPointerDown:b,onPointerMove:a,onPointerUp:u,onPointerCancel:g,onPointerLeave:g,children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:90,columnNumber:5},this)}function P2({pane:r,onAuthFail:s,onKey:d,onText:_,cwd:E=null,agent:R=null,windowId:b=null,recent:a=[],onSent:u,onRemoveRecent:g,inset:x=0},h){const[f,S]=U.useState(()=>H1());U.useEffect(()=>{z1(f)},[f]);const[C,y]=U.useState(!1),[l,v]=U.useState(!1),[m,p]=U.useState(!1),[N,k]=U.useState(()=>er("agent")),[j,M]=U.useState(!1);U.useEffect(()=>{!m&&!j&&k(er("agent"))},[m,j]);const[D,L]=U.useState(()=>er("command")),[A,F]=U.useState(()=>b?er(e_(b)):[]),[O,I]=U.useState(!1);U.useEffect(()=>{O||(L(er("command")),F(b?er(e_(b)):[]))},[O,b]);const[G,ne]=U.useState({}),ee=G[r]||(R?"agent":"command"),te=ae=>{var xe;const Be=PN()||document.activeElement===Ge.current||document.activeElement===Te.current;ne(Q=>({...Q,[r]:ae})),Be&&((xe=ae==="command"?Ge.current:Te.current)==null||xe.focus({preventScroll:!0}))},[se,B]=U.useState({ctrl:"off",shift:"off",alt:"off"}),[W,X]=U.useState(!1),Y=U.useRef(null),ve=U.useRef(null),he=U.useRef(null),Me=ee==="command"?0:1,me=U.useRef(Me);me.current=Me;const ie=U.useRef(te);ie.current=te;const $=U.useRef(!1),_e=U.useRef(!1),de=()=>{var ae;return((ae=Y.current)==null?void 0:ae.clientWidth)||0},Ie=ae=>{const Be=ve.current;Be&&(Be.style.transition="none",Be.style.transform=`translate3d(${ae}px, 0, 0)`)},Ue=()=>{const ae=ve.current;!ae||!ae.style.transform||(ae.style.transition="",ae.style.transform="")},tt=U.useRef(null),Qe=50,st=12,Nt=38,J=ae=>{const Be=tt.current;Be&&(Be.classList.add("dragging"),Be.style.setProperty("--drag",`${oU(ae)}px`),Be.style.setProperty("--morph",`${Math.min(1,Math.max(0,(Math.abs(ae)-st)/Nt))}`),Be.classList.toggle("armed",Math.abs(ae)>=Qe))},bt=()=>{const ae=tt.current;ae&&(ae.classList.remove("dragging","armed"),ae.style.removeProperty("--drag"),ae.style.removeProperty("--morph"))};U.useLayoutEffect(()=>{$.current||Ue()});const Gt=()=>{const ae=Y.current;if(!ae)return;const Be=ae.querySelector(ee==="command"?".dock-page.command":".dock-page.chat");Be&&(ae.style.height=`${Be.offsetHeight}px`)};U.useLayoutEffect(()=>{ee==="agent"&&Pt(Te.current),Gt()});const Ee=U.useRef(Gt);Ee.current=Gt,U.useEffect(()=>{const ae=Y.current;if(!ae||typeof ResizeObserver>"u")return;const Be=new ResizeObserver(()=>{$.current||Ee.current()});return ae.querySelectorAll(".dock-page").forEach(xe=>Be.observe(xe)),()=>Be.disconnect()},[]),U.useEffect(()=>{if(ee!=="agent")return;const ae=requestAnimationFrame(()=>{Pt(Te.current),Gt()});return()=>cancelAnimationFrame(ae)},[ee]),U.useEffect(()=>{var Be;if(ee==="agent")return;document.activeElement===Te.current&&((Be=Te.current)==null||Be.blur());const ae=Y.current;ae&&(ae.scrollLeft=0,ae.scrollTop=0)},[ee]),U.useEffect(()=>{const ae=he.current,Be=Y.current;if(!ae||!Be)return;let xe=null;const Q=_t=>{var hn,An,Yt,Wn;Ue(),ae.classList.remove("dock-swiping");const St=((An=(hn=_t.target)==null?void 0:hn.closest)==null?void 0:An.call(hn,".quick-scroll"))||null,Jt=((Wn=(Yt=_t.target)==null?void 0:Yt.closest)==null?void 0:Wn.call(Yt,".input-text"))||null,yn=PN()||document.activeElement===Ge.current||document.activeElement===Te.current;xe=_t.touches.length===1?{x:_t.touches[0].clientX,y:_t.touches[0].clientY,dx:0,dy:0,decided:!1,horiz:!1,vert:!1,strip:St,cmp:Jt,kbUp:yn}:null},Ce=_t=>{if(!xe||_t.touches.length!==1||_e.current&&!xe.horiz)return;const St=_t.touches[0].clientX-xe.x,Jt=_t.touches[0].clientY-xe.y;if(!xe.decided){if(Math.abs(St)<16&&Math.abs(Jt)<16)return;if(xe.decided=!0,xe.horiz=Math.abs(St)>Math.abs(Jt)*1.4,!xe.kbUp&&(document.activeElement===Ge.current||document.activeElement===Te.current)&&document.activeElement.blur(),xe.horiz&&!xe.kbUp&&ae.classList.add("dock-swiping"),xe.horiz&&xe.strip){const An=xe.strip,Yt=me.current,Wn=An.scrollLeft<=0,Zn=An.scrollLeft>=An.scrollWidth-An.clientWidth-1,Wi=St>0&&Wn&&Yt===1,Gi=St<0&&Zn&&Yt===0;Wi||Gi||(xe.horiz=!1)}!xe.horiz&&Math.abs(Jt)>Math.abs(St)*1.4&&!aU(xe.cmp,Jt)&&(xe.vert=!0)}if(xe.vert){xe.dx=St,xe.dy=Jt,J(Jt),_t.cancelable&&_t.preventDefault();return}if(!xe.horiz)return;_t.preventDefault(),$.current=!0,xe.dx=St;const yn=de()||1;let hn=St;me.current===0?hn=Math.min(0,Math.max(-yn,hn)):hn=Math.max(0,Math.min(yn,hn)),Ie(-me.current*yn+hn)},Je=()=>{var hn,An,Yt,Wn;if($.current=!1,ae.classList.remove("dock-swiping"),xe&&xe.vert){const Zn=sU(xe.dx,xe.dy,Qe),Wi=me.current;xe=null,Ue(),bt(),Zn==="show"?(hn=$n(Wi))==null||hn.focus({preventScroll:!0}):Zn==="hide"&&((An=$n(Wi))==null||An.blur());return}if(!xe||!xe.horiz){xe=null,Ue();return}const _t=me.current,St=xe.dx,Jt=xe.kbUp;xe=null;let yn=_t;_t===0&&St<-IN?yn=1:_t===1&&St>IN&&(yn=0),Jt||((Yt=Ge.current)==null||Yt.blur(),(Wn=Te.current)==null||Wn.blur()),Ue(),yn!==_t&&ie.current(yn===1?"agent":"command")},Vt=()=>{(Be.scrollLeft||Be.scrollTop)&&(Be.scrollLeft=0,Be.scrollTop=0)};return Be.addEventListener("scroll",Vt,{passive:!0}),ae.addEventListener("touchstart",Q,{passive:!0}),ae.addEventListener("touchmove",Ce,{passive:!1}),ae.addEventListener("touchend",Je,{passive:!0}),ae.addEventListener("touchcancel",Je,{passive:!0}),()=>{Be.removeEventListener("scroll",Vt),ae.removeEventListener("touchstart",Q),ae.removeEventListener("touchmove",Ce),ae.removeEventListener("touchend",Je),ae.removeEventListener("touchcancel",Je)}},[]),es(m,()=>p(!1));const Te=U.useRef(null),Ge=U.useRef(null),re=U.useRef(null),We=U.useRef(!1);U.useEffect(()=>{const ae=window.visualViewport;if(!ae)return;const Be=()=>{if(window.innerHeight-ae.height>120){We.current=!0;return}if(!We.current)return;We.current=!1;const Q=document.activeElement;(Q===Ge.current||Q===Te.current)&&Q.blur(),X(!1)};return Be(),ae.addEventListener("resize",Be),()=>ae.removeEventListener("resize",Be)},[]);const Ye=U.useRef({head:"",tail:""}),ge=U.useRef(null),Ze=U.useRef(!1),Pe=T_({onText:ae=>{if(Ze.current){Ze.current=!1;return}const{head:Be,tail:xe}=Ye.current;S(Be+ae+xe),ge.current=Be.length+ae.length}}),be=L_(),Ae=Pe.state==="recording"||Pe.state==="finalizing";Cm(Ae),U.useEffect(()=>{if(Pe.state!=="recording"&&Pe.state!=="finalizing"||Ze.current)return;const{head:ae,tail:Be}=Ye.current;S(ae+Pe.partial+Be),ge.current=ae.length+Pe.partial.length},[Pe.partial,Pe.state]),U.useLayoutEffect(()=>{const ae=Te.current;if(!ae)return;let Be=!1;if(ge.current!=null){const xe=ge.current;if(ge.current=null,document.activeElement===ae)try{ae.setSelectionRange(xe,xe)}catch{}Be=xe>=f.length}Pt(ae),Be&&(ae.scrollTop=ae.scrollHeight)},[f]);const He=()=>{if(Ae){Pe.stop();return}const ae=Te.current,Be=ae?ae.selectionStart:f.length;Ye.current={head:f.slice(0,Be),tail:f.slice(Be)},Pe.start()},wt=40,kt=U.useRef(null),Ot=(ae,Be)=>{const xe=kt.current;if(!xe)return null;xe.style.width=`${Be}px`,xe.textContent=ae;const Q=document.createElement("span");return xe.appendChild(Q),{h:xe.offsetHeight,endX:Q.offsetLeft}},Pt=ae=>{if(!ae)return;ae.style.height="auto";const Be=be?76:38,xe=be?86:48,Q=ae.parentElement.clientWidth-11,Ce=ae.value?Ot(ae.value,Q-Be):null,Je=Ce?Ce.h>wt:!1;y(Je);const Vt=Je?Ot(ae.value,Q):null;v(!!Vt&&Q-Vt.endX<xe),ae.style.height=`${ae.scrollHeight+2}px`},dn=()=>{Ae&&(Ze.current=!0,Pe.stop())},Qt=async()=>{if(r){dn();try{await Co(r,f,!0),u==null||u(f),S(""),requestAnimationFrame(()=>Pt(Te.current))}catch(ae){ae instanceof tr&&(s==null||s())}}},Mt=U.useRef(!1),Ft=ae=>{const Be=ae.value;if(ae.value="",!Be)return;const xe=Iu.some(Q=>ua(se[Q]));if(xe&&Be.length===1){const Q=jS({kind:"text",ch:Be},se);if(Q.kind==="key"){d(Q.name),B(Qg);return}}_(Be),xe&&B(Qg)},sn=ae=>{var Be;(Be=ae.nativeEvent)!=null&&Be.isComposing||Mt.current||Ft(ae.target)},Dn=()=>{ee==="command"&&(Mt.current=!0)},it=ae=>{ee==="command"&&(Mt.current=!1,Ft(ae.target))},cn=ae=>{var Be;if(!(ee!=="command"||(Be=ae.nativeEvent)!=null&&Be.isComposing)){if(ae.key==="Enter"&&!ae.shiftKey){ae.preventDefault(),d("Enter");return}ae.key==="Backspace"&&(ae.preventDefault(),d("BSpace"))}},zn=()=>{const ae=Ge.current;ae&&(document.activeElement===ae?ae.blur():ae.focus({preventScroll:!0}))},$n=ae=>ae===0?Ge.current:Te.current,en=ae=>{S(ae),p(!1),requestAnimationFrame(()=>{var Be;(Be=Te.current)==null||Be.focus(),Pt(Te.current)})},kn=async ae=>{if(r)try{await Co(r,ae,!0),u==null||u(ae)}catch(Be){Be instanceof tr&&(s==null||s())}},On=ae=>en(ae),ni=ae=>{if(Pl[ae]){d(Pl[ae]);return}kn(ae)},nn=ae=>{if(ae.kind==="key"){d(ae.text);return}ni(ae.text)},En=ae=>{if(ae.kind==="key"){d(ae.text);return}if(Pl[ae.text]){d(Pl[ae.text]);return}if(ae.enter){kn(ae.text);return}_(ae.text)},vn=ae=>ae.kind==="key"&&ae.label||ae.text,Xn=ae=>ae.kind==="key"||Pl[ae.text]||!ae.enter?void 0:()=>_(ae.text);U.useImperativeHandle(h,()=>({fill:en,hideKeyboard:()=>{const ae=document.activeElement;(ae===Ge.current||ae===Te.current)&&ae.blur()}}),[]);const oe=ae=>{if(!ae.length)return;let Be;if(ae.length===1)Be=ae[0];else{const xe=ae[0].slice(0,ae[0].lastIndexOf("/")+1);Be=ae.every(Q=>Q.startsWith(xe))?`${xe}{${ae.map(Q=>Q.slice(xe.length)).join(",")}}`:ae.join(" ")}S(xe=>xe&&!/\s$/.test(xe)?`${xe} ${Be}`:xe+Be),requestAnimationFrame(()=>{var xe;(xe=Te.current)==null||xe.focus(),Pt(Te.current)})},{upload:$e,uploadFiles:et}=US({cwd:E,onAuthFail:s,onPaths:oe}),yt=async()=>{if(!(!r||!f)){dn();try{await Co(r,f,!1),u==null||u(f),S(""),requestAnimationFrame(()=>Pt(Te.current))}catch(ae){ae instanceof tr&&(s==null||s())}}},gt=U.useRef(null),ft=U.useRef(!1),Rt=U.useRef({x:0,y:0,moved:!1}),pt=ae=>{ae.cancelable&&ae.preventDefault(),ft.current=!1,Rt.current={x:ae.clientX,y:ae.clientY,moved:!1},f&&(gt.current=setTimeout(()=>{var Be;ft.current=!0,(Be=navigator.vibrate)==null||Be.call(navigator,12),yt()},450))},gn=ae=>{const Be=Rt.current;Be.moved||Math.hypot(ae.clientX-Be.x,ae.clientY-Be.y)<=10||(Be.moved=!0,clearTimeout(gt.current),gt.current=null)},an=()=>{if(clearTimeout(gt.current),gt.current=null,ft.current){ft.current=!1;return}Rt.current.moved||Qt()},qt=()=>{clearTimeout(gt.current),gt.current=null,ft.current=!1},bn=U.useRef(null),Nn=U.useRef({x:0,y:0,moved:!1}),ui=ae=>{if(!C)return null;for(const[Be,xe]of[["send",".input-send"],["mic",".input-mic"]]){const Q=ae.currentTarget.querySelector(xe);if(!Q)continue;const Ce=Q.getBoundingClientRect();if(ae.clientX>=Ce.left&&ae.clientX<=Ce.right&&ae.clientY>=Ce.top&&ae.clientY<=Ce.bottom)return Be}return null},Vn=ae=>{const Be=ui(ae);Be&&(ae.stopPropagation(),ae.cancelable&&ae.preventDefault(),bn.current=Be,Be==="send"?pt(ae):Nn.current={x:ae.clientX,y:ae.clientY,moved:!1})},Jn=ae=>{const Be=bn.current;if(!Be)return;if(Be==="send"){gn(ae);return}const xe=Nn.current;!xe.moved&&Math.hypot(ae.clientX-xe.x,ae.clientY-xe.y)>10&&(xe.moved=!0)},ii=()=>{const ae=bn.current;if(bn.current=null,!!ae){if(ae==="send"){f?an():qt();return}!Nn.current.moved&&Pe.state!=="requesting"&&He()}},Dt=()=>{const ae=bn.current;bn.current=null,ae==="send"&&qt()};return o.jsxDEV("div",{className:"bottom-dock",children:[o.jsxDEV("div",{className:"dock-left",ref:he,onPointerDown:U2,children:[o.jsxDEV("button",{type:"button",className:"dock-handle",ref:tt,"aria-label":V("dock.mode.toggle"),onClick:()=>te(ee==="command"?"agent":"command"),children:[o.jsxDEV("span",{className:"dock-mode-label",children:V(ee==="command"?"dock.mode.command":"dock.mode.chat")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:822,columnNumber:11},this),o.jsxDEV("span",{className:"dock-dots",children:[o.jsxDEV("i",{className:`dock-dot${ee==="command"?" on":""}`,"data-page":"command","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:824,columnNumber:13},this),o.jsxDEV("i",{className:`dock-dot${ee==="agent"?" on":""}`,"data-page":"agent","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:825,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:823,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:820,columnNumber:9},this),o.jsxDEV("div",{className:"dock-pager",ref:Y,children:o.jsxDEV("div",{className:`dock-track${Me===1?" at-chat":""}`,ref:ve,children:[o.jsxDEV("div",{className:`dock-page command${ee==="command"?" on":""}`,children:[o.jsxDEV("input",{ref:Ge,className:"cmd-capture",type:"text",onInput:sn,onKeyDown:cn,onCompositionStart:Dn,onCompositionEnd:it,onFocus:()=>X(!0),onBlur:()=>X(!1),enterKeyHint:"send","aria-label":V("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:834,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":W,"aria-label":V(W?"dock.kbdHide":"dock.kbdShow"),onPointerDown:BN,onClick:zn,children:[o.jsxDEV(l3,{down:W},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:858,columnNumber:21},this),o.jsxDEV("span",{children:V(W?"dock.kbdHide":"dock.kbdShow")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:858,columnNumber:55},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:855,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:854,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[D.map(ae=>o.jsxDEV(Dg,{className:"quick-cmd quick-cmd-plain",onTap:()=>En(ae),onHold:Xn(ae),children:[vn(ae),ae.kind!=="key"&&ae.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:867,columnNumber:68},this)]},`g:${ae.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:865,columnNumber:21},this)),A.map(ae=>o.jsxDEV(Dg,{className:"quick-cmd quick-cmd-win",onTap:()=>En(ae),onHold:Xn(ae),children:[vn(ae),ae.kind!=="key"&&ae.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:872,columnNumber:68},this)]},`w:${ae.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:870,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":V("cmd.editTitle"),onPointerDown:BN,onClick:()=>I(!0),children:o.jsxDEV(cm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:875,columnNumber:84},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:874,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:860,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:853,columnNumber:15},this),o.jsxDEV(e2,{onKey:d,onText:_,mods:se,setMods:B,keyHeldRef:_e},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:878,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:830,columnNumber:13},this),o.jsxDEV("div",{className:`dock-page chat${ee==="agent"?" on":""}`,children:[$e&&o.jsxDEV("div",{className:"dock-upload error",children:o.jsxDEV("span",{className:"dock-upload-label",children:$e.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:885,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:884,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":V("dock.attach"),disabled:!!$e&&!$e.error,onClick:()=>{var ae;return(ae=re.current)==null?void 0:ae.click()},children:[o.jsxDEV(sS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:894,columnNumber:21},this),o.jsxDEV("span",{children:V("dock.attach")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:894,columnNumber:35},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:892,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:891,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[N.map(ae=>o.jsxDEV(Dg,{className:`quick-cmd qc-${ae.kind==="key"?"esc":O2(ae.text)}`,onTap:()=>nn(ae),onHold:ae.kind==="key"?void 0:()=>_(ae.text),children:vn(ae)},ae.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:902,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":V("chat.editTitle"),onClick:()=>M(!0),children:o.jsxDEV(cm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:908,columnNumber:59},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:907,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:896,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:890,columnNumber:15},this),o.jsxDEV("input",{ref:re,className:"browse-file-input",type:"file",multiple:!0,accept:D_,onChange:ae=>{et(ae.target.files),ae.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:912,columnNumber:15},this),o.jsxDEV("div",{className:`input-wrap${Ae?" recording":""}${C?" multi":""}${l?" crowd":""}`,onPointerDownCapture:Vn,onPointerMoveCapture:Jn,onPointerUpCapture:ii,onPointerCancelCapture:Dt,children:[o.jsxDEV("textarea",{ref:Te,className:"input-text",rows:1,value:f,onPointerDown:ae=>{Ae&&(dn(),ae.currentTarget.focus())},onChange:ae=>{S(ae.target.value),Pt(ae.target)},onFocus:()=>X(!0),onBlur:()=>X(!1),placeholder:V("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:920,columnNumber:17},this),o.jsxDEV("div",{ref:kt,className:"input-mirror","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:943,columnNumber:17},this),!f&&o.jsxDEV("button",{type:"button",className:"input-history","aria-label":V("dock.history"),title:V("dock.history"),onClick:()=>p(ae=>!ae),children:o.jsxDEV(rS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:947,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:946,columnNumber:19},this),be&&o.jsxDEV(j_,{active:Ae,disabled:Pe.state==="requesting",onToggle:He},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:949,columnNumber:34},this),o.jsxDEV("button",{type:"button",className:"input-send","aria-label":V("dock.send"),title:V("dock.send.hint"),disabled:!f,onPointerDown:pt,onPointerMove:gn,onPointerUp:an,onPointerCancel:qt,onPointerLeave:qt,children:o.jsxDEV(w_,{},void 0,!1,{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:951,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:917,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:880,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:829,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:828,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:814,columnNumber:7},this),o.jsxDEV(l2,{open:m,mode:ee,recent:a,historyOnly:!0,onDelete:g,onSend:ae=>{p(!1),ni(ae)},onFill:ae=>{p(!1),On(ae)},onClose:()=>p(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:961,columnNumber:7},this),O&&o.jsxDEV(i_,{windowId:b,inset:x,onClose:()=>I(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:968,columnNumber:23},this),j&&o.jsxDEV(i_,{variant:"chat",inset:x,onClose:()=>M(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:971,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:813,columnNumber:5},this)}const B2=U.forwardRef(P2),I2=new Set(["clear","compact","cost","status","usage","context","help","init","exit","quit","vim","terminal-setup","release-notes"]);function a_(r){const s=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof r=="string"?r:"");return!s||s[2].trim()?!1:!I2.has(s[1].toLowerCase())}function F2(r){const s=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof r=="string"?r:"");if(!s||a_(r))return null;const d={name:"/"+s[1]},_=s[2].trim();return _&&(d.args=_),d}const H2=15e3;function z2(r){const[s,d]=U.useState({model:null,usedPercent:null}),_=U.useRef(r);return _.current=r,U.useEffect(()=>{if(!r){d({model:null,usedPercent:null});return}let E=!0,R=null;const b=async()=>{try{const a=await gA(r);E&&_.current===r&&a&&d({model:a.model??null,usedPercent:typeof a.usedPercent=="number"?a.usedPercent:null})}catch{}E&&(R=setTimeout(b,H2))};return b(),()=>{E=!1,R&&clearTimeout(R)}},[r]),s}const $2=r=>{var s,d;(d=(s=r.target).closest)!=null&&d.call(s,"input, textarea, [contenteditable]")||r.cancelable&&r.preventDefault()},W2=r=>r.startsWith("/")?"cmd":"reply";function G2({pane:r,kind:s,cwd:d=null,onKey:_=()=>{},onAuthFail:E,onSent:R,onInteractiveSlash:b}){const[a,u]=U.useState(()=>H1());U.useEffect(()=>{z1(a)},[a]);const g=U.useRef(null),x=U.useRef(null),h=U.useRef({x:0,y:0,moved:!1}),[f,S]=U.useState(()=>er("agent")),[C,y]=U.useState(!1);U.useEffect(()=>{C||S(er("agent"))},[C]);const l=f.filter(he=>he.kind!=="key"),v=s==="working",m=z2(r),p=m.model?m.model.replace(/\s*\(.*\)\s*$/,"").trim():null,N=m.usedPercent,k=typeof N=="number",j=k&&N>=80,M=he=>{he&&(he.style.height="auto",he.style.height=`${he.scrollHeight+2}px`)};U.useLayoutEffect(()=>{M(g.current)},[a]);const D=U.useRef({head:"",tail:""}),L=U.useRef(!1),F=T_({onText:he=>{if(L.current){L.current=!1;return}const{head:Me,tail:me}=D.current;u(Me+he+me)}}),O=L_(),I=F.state==="recording"||F.state==="finalizing";Cm(I),U.useEffect(()=>{if(F.state!=="recording"&&F.state!=="finalizing"||L.current)return;const{head:he,tail:Me}=D.current;u(he+F.partial+Me)},[F.partial,F.state]);const G=()=>{if(I){F.stop();return}const he=g.current,Me=he?he.selectionStart:a.length;D.current={head:a.slice(0,Me),tail:a.slice(Me)},F.start()},ne=()=>{I&&(L.current=!0,F.stop())},ee=async()=>{if(!(!r||!a.trim())){ne();try{await Co(r,a,!0),R==null||R(a),a_(a)&&(b==null||b(a.trim())),u(""),requestAnimationFrame(()=>M(g.current))}catch(he){he instanceof tr&&(E==null||E())}}},te=()=>_("Escape"),se=he=>{h.current={x:he.clientX,y:he.clientY,moved:!1}},B=he=>{const Me=h.current;!Me.moved&&Math.hypot(he.clientX-Me.x,he.clientY-Me.y)>10&&(Me.moved=!0)},W=he=>{var me,ie,$;const Me=h.current;Me.moved||Math.hypot(he.clientX-Me.x,he.clientY-Me.y)>10||(ie=(me=he.target).closest)!=null&&ie.call(me,"button, a, input, textarea, [contenteditable]")||($=g.current)==null||$.focus()},X=async he=>{if(r)try{await Co(r,he,!0),R==null||R(he),a_(he)&&(b==null||b(he.trim()))}catch(Me){Me instanceof tr&&(E==null||E())}},Y=he=>{if(!he.length)return;let Me;if(he.length===1)Me=he[0];else{const me=he[0].slice(0,he[0].lastIndexOf("/")+1);Me=he.every(ie=>ie.startsWith(me))?`${me}{${he.map(ie=>ie.slice(me.length)).join(",")}}`:he.join(" ")}u(me=>me&&!/\s$/.test(me)?`${me} ${Me}`:me+Me),requestAnimationFrame(()=>{var me;(me=g.current)==null||me.focus(),M(g.current)})},{uploadFiles:ve}=US({cwd:d,onAuthFail:E,onPaths:Y});return o.jsxDEV("div",{className:"chat-composer",onPointerDown:$2,children:[o.jsxDEV("div",{className:"cc-quick quick-scroll",children:[l.map(he=>o.jsxDEV("button",{type:"button",className:`quick-cmd qc-${W2(he.text)}`,onClick:()=>X(he.text),children:he.text},he.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:179,columnNumber:11},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":V("chat.editTitle"),onClick:()=>y(!0),children:o.jsxDEV(cm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:184,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:183,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:177,columnNumber:7},this),o.jsxDEV("input",{ref:x,className:"browse-file-input",type:"file",multiple:!0,accept:D_,onChange:he=>{ve(he.target.files),he.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:187,columnNumber:7},this),o.jsxDEV("div",{className:`cc-card${I?" recording":""}`,onPointerDown:se,onPointerMove:B,onPointerUp:W,children:[o.jsxDEV("textarea",{ref:g,className:"cc-text",rows:1,value:a,onChange:he=>{u(he.target.value),M(he.target)},placeholder:V("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:191,columnNumber:9},this),o.jsxDEV("div",{className:"cc-actions",children:[o.jsxDEV("button",{type:"button",className:"cc-attach","aria-label":V("dock.attach"),onClick:()=>{var he;return(he=x.current)==null?void 0:he.click()},children:o.jsxDEV(N_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:204,columnNumber:56},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:203,columnNumber:11},this),o.jsxDEV("div",{className:"cc-actions-right",children:[k&&o.jsxDEV("div",{className:`cc-ctx${j?" warn":""}`,"aria-hidden":"true",children:[p&&o.jsxDEV("span",{className:"cc-ctx-model",children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:211,columnNumber:30},this),o.jsxDEV("span",{className:"cc-ctx-pct",children:[Math.round(N),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:212,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:210,columnNumber:15},this),O&&o.jsxDEV(j_,{active:I,disabled:F.state==="requesting",onToggle:G},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:215,columnNumber:30},this),v?o.jsxDEV("button",{type:"button",className:"cc-send cc-stop","aria-label":V("chat.stop"),onClick:te,children:o.jsxDEV(oS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:218,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:217,columnNumber:15},this):o.jsxDEV("button",{type:"button",className:"cc-send","aria-label":V("dock.send"),disabled:!a.trim(),onClick:ee,children:o.jsxDEV(w_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:221,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:220,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:205,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:202,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:189,columnNumber:7},this),C&&o.jsxDEV(i_,{variant:"chat",onClose:()=>y(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:226,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:175,columnNumber:5},this)}function M_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Mo=M_();function VS(r){Mo=r}const PS=/[&<>"']/,q2=new RegExp(PS.source,"g"),BS=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Y2=new RegExp(BS.source,"g"),K2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},FN=r=>K2[r];function Br(r,s){if(s){if(PS.test(r))return r.replace(q2,FN)}else if(BS.test(r))return r.replace(Y2,FN);return r}const X2=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function J2(r){return r.replace(X2,(s,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const Z2=/(^|[^\[])\^/g;function In(r,s){let d=typeof r=="string"?r:r.source;s=s||"";const _={replace:(E,R)=>{let b=typeof R=="string"?R:R.source;return b=b.replace(Z2,"$1"),d=d.replace(E,b),_},getRegex:()=>new RegExp(d,s)};return _}function HN(r){try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const Ou={exec:()=>null};function zN(r,s){const d=r.replace(/\|/g,(R,b,a)=>{let u=!1,g=b;for(;--g>=0&&a[g]==="\\";)u=!u;return u?"|":" |"}),_=d.split(/ \|/);let E=0;if(_[0].trim()||_.shift(),_.length>0&&!_[_.length-1].trim()&&_.pop(),s)if(_.length>s)_.splice(s);else for(;_.length<s;)_.push("");for(;E<_.length;E++)_[E]=_[E].trim().replace(/\\\|/g,"|");return _}function Xh(r,s,d){const _=r.length;if(_===0)return"";let E=0;for(;E<_&&r.charAt(_-E-1)===s;)E++;return r.slice(0,_-E)}function Q2(r,s){if(r.indexOf(s[1])===-1)return-1;let d=0;for(let _=0;_<r.length;_++)if(r[_]==="\\")_++;else if(r[_]===s[0])d++;else if(r[_]===s[1]&&(d--,d<0))return _;return-1}function $N(r,s,d,_){const E=s.href,R=s.title?Br(s.title):null,b=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){_.state.inLink=!0;const a={type:"link",raw:d,href:E,title:R,text:b,tokens:_.inlineTokens(b)};return _.state.inLink=!1,a}return{type:"image",raw:d,href:E,title:R,text:Br(b)}}function eO(r,s){const d=r.match(/^(\s+)(?:```)/);if(d===null)return s;const _=d[1];return s.split(`
283
+ `).map(E=>{const R=E.match(/^\s+/);if(R===null)return E;const[b]=R;return b.length>=_.length?E.slice(_.length):E}).join(`
284
+ `)}class fm{constructor(s){Kn(this,"options");Kn(this,"rules");Kn(this,"lexer");this.options=s||Mo}space(s){const d=this.rules.block.newline.exec(s);if(d&&d[0].length>0)return{type:"space",raw:d[0]}}code(s){const d=this.rules.block.code.exec(s);if(d){const _=d[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:d[0],codeBlockStyle:"indented",text:this.options.pedantic?_:Xh(_,`
285
+ `)}}}fences(s){const d=this.rules.block.fences.exec(s);if(d){const _=d[0],E=eO(_,d[3]||"");return{type:"code",raw:_,lang:d[2]?d[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):d[2],text:E}}}heading(s){const d=this.rules.block.heading.exec(s);if(d){let _=d[2].trim();if(/#$/.test(_)){const E=Xh(_,"#");(this.options.pedantic||!E||/ $/.test(E))&&(_=E.trim())}return{type:"heading",raw:d[0],depth:d[1].length,text:_,tokens:this.lexer.inline(_)}}}hr(s){const d=this.rules.block.hr.exec(s);if(d)return{type:"hr",raw:d[0]}}blockquote(s){const d=this.rules.block.blockquote.exec(s);if(d){let _=d[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
286
+ $1`);_=Xh(_.replace(/^ *>[ \t]?/gm,""),`
287
+ `);const E=this.lexer.state.top;this.lexer.state.top=!0;const R=this.lexer.blockTokens(_);return this.lexer.state.top=E,{type:"blockquote",raw:d[0],tokens:R,text:_}}}list(s){let d=this.rules.block.list.exec(s);if(d){let _=d[1].trim();const E=_.length>1,R={type:"list",raw:"",ordered:E,start:E?+_.slice(0,-1):"",loose:!1,items:[]};_=E?`\\d{1,9}\\${_.slice(-1)}`:`\\${_}`,this.options.pedantic&&(_=E?_:"[*+-]");const b=new RegExp(`^( {0,3}${_})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",u="",g=!1;for(;s;){let x=!1;if(!(d=b.exec(s))||this.rules.block.hr.test(s))break;a=d[0],s=s.substring(a.length);let h=d[2].split(`
288
+ `,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=s.split(`
289
+ `,1)[0],S=0;this.options.pedantic?(S=2,u=h.trimStart()):(S=d[2].search(/[^ ]/),S=S>4?1:S,u=h.slice(S),S+=d[1].length);let C=!1;if(!h&&/^ *$/.test(f)&&(a+=f+`
290
+ `,s=s.substring(f.length+1),x=!0),!x){const v=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),m=new RegExp(`^ {0,${Math.min(3,S-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),p=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:\`\`\`|~~~)`),N=new RegExp(`^ {0,${Math.min(3,S-1)}}#`);for(;s;){const k=s.split(`
291
+ `,1)[0];if(f=k,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),p.test(f)||N.test(f)||v.test(f)||m.test(s))break;if(f.search(/[^ ]/)>=S||!f.trim())u+=`
292
+ `+f.slice(S);else{if(C||h.search(/[^ ]/)>=4||p.test(h)||N.test(h)||m.test(h))break;u+=`
293
+ `+f}!C&&!f.trim()&&(C=!0),a+=k+`
294
+ `,s=s.substring(k.length+1),h=f.slice(S)}}R.loose||(g?R.loose=!0:/\n *\n *$/.test(a)&&(g=!0));let y=null,l;this.options.gfm&&(y=/^\[[ xX]\] /.exec(u),y&&(l=y[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),R.items.push({type:"list_item",raw:a,task:!!y,checked:l,loose:!1,text:u,tokens:[]}),R.raw+=a}R.items[R.items.length-1].raw=a.trimEnd(),R.items[R.items.length-1].text=u.trimEnd(),R.raw=R.raw.trimEnd();for(let x=0;x<R.items.length;x++)if(this.lexer.state.top=!1,R.items[x].tokens=this.lexer.blockTokens(R.items[x].text,[]),!R.loose){const h=R.items[x].tokens.filter(S=>S.type==="space"),f=h.length>0&&h.some(S=>/\n.*\n/.test(S.raw));R.loose=f}if(R.loose)for(let x=0;x<R.items.length;x++)R.items[x].loose=!0;return R}}html(s){const d=this.rules.block.html.exec(s);if(d)return{type:"html",block:!0,raw:d[0],pre:d[1]==="pre"||d[1]==="script"||d[1]==="style",text:d[0]}}def(s){const d=this.rules.block.def.exec(s);if(d){const _=d[1].toLowerCase().replace(/\s+/g," "),E=d[2]?d[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",R=d[3]?d[3].substring(1,d[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):d[3];return{type:"def",tag:_,raw:d[0],href:E,title:R}}}table(s){const d=this.rules.block.table.exec(s);if(!d||!/[:|]/.test(d[2]))return;const _=zN(d[1]),E=d[2].replace(/^\||\| *$/g,"").split("|"),R=d[3]&&d[3].trim()?d[3].replace(/\n[ \t]*$/,"").split(`
295
+ `):[],b={type:"table",raw:d[0],header:[],align:[],rows:[]};if(_.length===E.length){for(const a of E)/^ *-+: *$/.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 _)b.header.push({text:a,tokens:this.lexer.inline(a)});for(const a of R)b.rows.push(zN(a,b.header.length).map(u=>({text:u,tokens:this.lexer.inline(u)})));return b}}lheading(s){const d=this.rules.block.lheading.exec(s);if(d)return{type:"heading",raw:d[0],depth:d[2].charAt(0)==="="?1:2,text:d[1],tokens:this.lexer.inline(d[1])}}paragraph(s){const d=this.rules.block.paragraph.exec(s);if(d){const _=d[1].charAt(d[1].length-1)===`
296
+ `?d[1].slice(0,-1):d[1];return{type:"paragraph",raw:d[0],text:_,tokens:this.lexer.inline(_)}}}text(s){const d=this.rules.block.text.exec(s);if(d)return{type:"text",raw:d[0],text:d[0],tokens:this.lexer.inline(d[0])}}escape(s){const d=this.rules.inline.escape.exec(s);if(d)return{type:"escape",raw:d[0],text:Br(d[1])}}tag(s){const d=this.rules.inline.tag.exec(s);if(d)return!this.lexer.state.inLink&&/^<a /i.test(d[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(d[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(d[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(d[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:d[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:d[0]}}link(s){const d=this.rules.inline.link.exec(s);if(d){const _=d[2].trim();if(!this.options.pedantic&&/^</.test(_)){if(!/>$/.test(_))return;const b=Xh(_.slice(0,-1),"\\");if((_.length-b.length)%2===0)return}else{const b=Q2(d[2],"()");if(b>-1){const u=(d[0].indexOf("!")===0?5:4)+d[1].length+b;d[2]=d[2].substring(0,b),d[0]=d[0].substring(0,u).trim(),d[3]=""}}let E=d[2],R="";if(this.options.pedantic){const b=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(E);b&&(E=b[1],R=b[3])}else R=d[3]?d[3].slice(1,-1):"";return E=E.trim(),/^</.test(E)&&(this.options.pedantic&&!/>$/.test(_)?E=E.slice(1):E=E.slice(1,-1)),$N(d,{href:E&&E.replace(this.rules.inline.anyPunctuation,"$1"),title:R&&R.replace(this.rules.inline.anyPunctuation,"$1")},d[0],this.lexer)}}reflink(s,d){let _;if((_=this.rules.inline.reflink.exec(s))||(_=this.rules.inline.nolink.exec(s))){const E=(_[2]||_[1]).replace(/\s+/g," "),R=d[E.toLowerCase()];if(!R){const b=_[0].charAt(0);return{type:"text",raw:b,text:b}}return $N(_,R,_[0],this.lexer)}}emStrong(s,d,_=""){let E=this.rules.inline.emStrongLDelim.exec(s);if(!E||E[3]&&_.match(/[\p{L}\p{N}]/u))return;if(!(E[1]||E[2]||"")||!_||this.rules.inline.punctuation.exec(_)){const b=[...E[0]].length-1;let a,u,g=b,x=0;const h=E[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,d=d.slice(-1*s.length+b);(E=h.exec(d))!=null;){if(a=E[1]||E[2]||E[3]||E[4]||E[5]||E[6],!a)continue;if(u=[...a].length,E[3]||E[4]){g+=u;continue}else if((E[5]||E[6])&&b%3&&!((b+u)%3)){x+=u;continue}if(g-=u,g>0)continue;u=Math.min(u,u+g+x);const f=[...E[0]][0].length,S=s.slice(0,b+E.index+f+u);if(Math.min(b,u)%2){const y=S.slice(1,-1);return{type:"em",raw:S,text:y,tokens:this.lexer.inlineTokens(y)}}const C=S.slice(2,-2);return{type:"strong",raw:S,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(s){const d=this.rules.inline.code.exec(s);if(d){let _=d[2].replace(/\n/g," ");const E=/[^ ]/.test(_),R=/^ /.test(_)&&/ $/.test(_);return E&&R&&(_=_.substring(1,_.length-1)),_=Br(_,!0),{type:"codespan",raw:d[0],text:_}}}br(s){const d=this.rules.inline.br.exec(s);if(d)return{type:"br",raw:d[0]}}del(s){const d=this.rules.inline.del.exec(s);if(d)return{type:"del",raw:d[0],text:d[2],tokens:this.lexer.inlineTokens(d[2])}}autolink(s){const d=this.rules.inline.autolink.exec(s);if(d){let _,E;return d[2]==="@"?(_=Br(d[1]),E="mailto:"+_):(_=Br(d[1]),E=_),{type:"link",raw:d[0],text:_,href:E,tokens:[{type:"text",raw:_,text:_}]}}}url(s){var _;let d;if(d=this.rules.inline.url.exec(s)){let E,R;if(d[2]==="@")E=Br(d[0]),R="mailto:"+E;else{let b;do b=d[0],d[0]=((_=this.rules.inline._backpedal.exec(d[0]))==null?void 0:_[0])??"";while(b!==d[0]);E=Br(d[0]),d[1]==="www."?R="http://"+d[0]:R=d[0]}return{type:"link",raw:d[0],text:E,href:R,tokens:[{type:"text",raw:E,text:E}]}}}inlineText(s){const d=this.rules.inline.text.exec(s);if(d){let _;return this.lexer.state.inRawBlock?_=d[0]:_=Br(d[0]),{type:"text",raw:d[0],text:_}}}}const tO=/^(?: *(?:\n|$))+/,nO=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,iO=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,IS=/(?:[*+-]|\d{1,9}[.)])/,FS=In(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,IS).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(),A_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sO=/^[^\n]+/,U_=/(?!\s*\])(?:\\.|[^\[\]\\])+/,aO=In(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",U_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),oO=In(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,IS).getRegex(),Em="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",O_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,lO=In("^ {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",O_).replace("tag",Em).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),HS=In(A_).replace("hr",zu).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",Em).getRegex(),cO=In(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",HS).getRegex(),V_={blockquote:cO,code:nO,def:aO,fences:iO,heading:rO,hr:zu,html:lO,lheading:FS,list:oO,newline:tO,paragraph:HS,table:Ou,text:sO},WN=In("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zu).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",Em).getRegex(),uO={...V_,table:WN,paragraph:In(A_).replace("hr",zu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",WN).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",Em).getRegex()},dO={...V_,html:In(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",O_).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:Ou,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:In(A_).replace("hr",zu).replace("heading",` *#{1,6} *[^
297
+ ]`).replace("lheading",FS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hO=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$S=/^( {2,}|\\)\n(?!\s*$)/,mO=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$u="\\p{P}\\p{S}",fO=In(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,$u).getRegex(),pO=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,vO=In(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,$u).getRegex(),gO=In("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,$u).getRegex(),_O=In("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,$u).getRegex(),bO=In(/\\([punct])/,"gu").replace(/punct/g,$u).getRegex(),yO=In(/^<(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(),xO=In(O_).replace("(?:-->|$)","-->").getRegex(),wO=In("^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",xO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pm=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,NO=In(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",pm).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),WS=In(/^!?\[(label)\]\[(ref)\]/).replace("label",pm).replace("ref",U_).getRegex(),GS=In(/^!?\[(ref)\](?:\[\])?/).replace("ref",U_).getRegex(),SO=In("reflink|nolink(?!\\()","g").replace("reflink",WS).replace("nolink",GS).getRegex(),P_={_backpedal:Ou,anyPunctuation:bO,autolink:yO,blockSkip:pO,br:$S,code:hO,del:Ou,emStrongLDelim:vO,emStrongRDelimAst:gO,emStrongRDelimUnd:_O,escape:zS,link:NO,nolink:GS,punctuation:fO,reflink:WS,reflinkSearch:SO,tag:wO,text:mO,url:Ou},CO={...P_,link:In(/^!?\[(label)\]\((.*?)\)/).replace("label",pm).getRegex(),reflink:In(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pm).getRegex()},o_={...P_,escape:In(zS).replace("])","~|])").getRegex(),url:In(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},EO={...o_,br:In($S).replace("{2,}","*").getRegex(),text:In(o_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Jh={normal:V_,gfm:uO,pedantic:dO},Du={normal:P_,gfm:o_,breaks:EO,pedantic:CO};class Bs{constructor(s){Kn(this,"tokens");Kn(this,"options");Kn(this,"state");Kn(this,"tokenizer");Kn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=s||Mo,this.options.tokenizer=this.options.tokenizer||new fm,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 d={block:Jh.normal,inline:Du.normal};this.options.pedantic?(d.block=Jh.pedantic,d.inline=Du.pedantic):this.options.gfm&&(d.block=Jh.gfm,this.options.breaks?d.inline=Du.breaks:d.inline=Du.gfm),this.tokenizer.rules=d}static get rules(){return{block:Jh,inline:Du}}static lex(s,d){return new Bs(d).lex(s)}static lexInline(s,d){return new Bs(d).inlineTokens(s)}lex(s){s=s.replace(/\r\n|\r/g,`
298
+ `),this.blockTokens(s,this.tokens);for(let d=0;d<this.inlineQueue.length;d++){const _=this.inlineQueue[d];this.inlineTokens(_.src,_.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(s,d=[]){this.options.pedantic?s=s.replace(/\t/g," ").replace(/^ +$/gm,""):s=s.replace(/^( *)(\t+)/gm,(a,u,g)=>u+" ".repeat(g.length));let _,E,R,b;for(;s;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(_=a.call({lexer:this},s,d))?(s=s.substring(_.raw.length),d.push(_),!0):!1))){if(_=this.tokenizer.space(s)){s=s.substring(_.raw.length),_.raw.length===1&&d.length>0?d[d.length-1].raw+=`
299
+ `:d.push(_);continue}if(_=this.tokenizer.code(s)){s=s.substring(_.raw.length),E=d[d.length-1],E&&(E.type==="paragraph"||E.type==="text")?(E.raw+=`
300
+ `+_.raw,E.text+=`
301
+ `+_.text,this.inlineQueue[this.inlineQueue.length-1].src=E.text):d.push(_);continue}if(_=this.tokenizer.fences(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.heading(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.hr(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.blockquote(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.list(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.html(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.def(s)){s=s.substring(_.raw.length),E=d[d.length-1],E&&(E.type==="paragraph"||E.type==="text")?(E.raw+=`
302
+ `+_.raw,E.text+=`
303
+ `+_.raw,this.inlineQueue[this.inlineQueue.length-1].src=E.text):this.tokens.links[_.tag]||(this.tokens.links[_.tag]={href:_.href,title:_.title});continue}if(_=this.tokenizer.table(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.lheading(s)){s=s.substring(_.raw.length),d.push(_);continue}if(R=s,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const u=s.slice(1);let g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},u),typeof g=="number"&&g>=0&&(a=Math.min(a,g))}),a<1/0&&a>=0&&(R=s.substring(0,a+1))}if(this.state.top&&(_=this.tokenizer.paragraph(R))){E=d[d.length-1],b&&E.type==="paragraph"?(E.raw+=`
304
+ `+_.raw,E.text+=`
305
+ `+_.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=E.text):d.push(_),b=R.length!==s.length,s=s.substring(_.raw.length);continue}if(_=this.tokenizer.text(s)){s=s.substring(_.raw.length),E=d[d.length-1],E&&E.type==="text"?(E.raw+=`
306
+ `+_.raw,E.text+=`
307
+ `+_.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=E.text):d.push(_);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,d}inline(s,d=[]){return this.inlineQueue.push({src:s,tokens:d}),d}inlineTokens(s,d=[]){let _,E,R,b=s,a,u,g;if(this.tokens.links){const x=Object.keys(this.tokens.links);if(x.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(b))!=null;)x.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(u||(g=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(x=>(_=x.call({lexer:this},s,d))?(s=s.substring(_.raw.length),d.push(_),!0):!1))){if(_=this.tokenizer.escape(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.tag(s)){s=s.substring(_.raw.length),E=d[d.length-1],E&&_.type==="text"&&E.type==="text"?(E.raw+=_.raw,E.text+=_.text):d.push(_);continue}if(_=this.tokenizer.link(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(_.raw.length),E=d[d.length-1],E&&_.type==="text"&&E.type==="text"?(E.raw+=_.raw,E.text+=_.text):d.push(_);continue}if(_=this.tokenizer.emStrong(s,b,g)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.codespan(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.br(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.del(s)){s=s.substring(_.raw.length),d.push(_);continue}if(_=this.tokenizer.autolink(s)){s=s.substring(_.raw.length),d.push(_);continue}if(!this.state.inLink&&(_=this.tokenizer.url(s))){s=s.substring(_.raw.length),d.push(_);continue}if(R=s,this.options.extensions&&this.options.extensions.startInline){let x=1/0;const h=s.slice(1);let f;this.options.extensions.startInline.forEach(S=>{f=S.call({lexer:this},h),typeof f=="number"&&f>=0&&(x=Math.min(x,f))}),x<1/0&&x>=0&&(R=s.substring(0,x+1))}if(_=this.tokenizer.inlineText(R)){s=s.substring(_.raw.length),_.raw.slice(-1)!=="_"&&(g=_.raw.slice(-1)),u=!0,E=d[d.length-1],E&&E.type==="text"?(E.raw+=_.raw,E.text+=_.text):d.push(_);continue}if(s){const x="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return d}}class vm{constructor(s){Kn(this,"options");this.options=s||Mo}code(s,d,_){var R;const E=(R=(d||"").match(/^\S*/))==null?void 0:R[0];return s=s.replace(/\n$/,"")+`
308
+ `,E?'<pre><code class="language-'+Br(E)+'">'+(_?s:Br(s,!0))+`</code></pre>
309
+ `:"<pre><code>"+(_?s:Br(s,!0))+`</code></pre>
310
+ `}blockquote(s){return`<blockquote>
311
+ ${s}</blockquote>
312
+ `}html(s,d){return s}heading(s,d,_){return`<h${d}>${s}</h${d}>
313
+ `}hr(){return`<hr>
314
+ `}list(s,d,_){const E=d?"ol":"ul",R=d&&_!==1?' start="'+_+'"':"";return"<"+E+R+`>
315
+ `+s+"</"+E+`>
316
+ `}listitem(s,d,_){return`<li>${s}</li>
317
+ `}checkbox(s){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(s){return`<p>${s}</p>
318
+ `}table(s,d){return d&&(d=`<tbody>${d}</tbody>`),`<table>
319
+ <thead>
320
+ `+s+`</thead>
321
+ `+d+`</table>
322
+ `}tablerow(s){return`<tr>
323
+ ${s}</tr>
324
+ `}tablecell(s,d){const _=d.header?"th":"td";return(d.align?`<${_} align="${d.align}">`:`<${_}>`)+s+`</${_}>
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,d,_){const E=HN(s);if(E===null)return _;s=E;let R='<a href="'+s+'"';return d&&(R+=' title="'+d+'"'),R+=">"+_+"</a>",R}image(s,d,_){const E=HN(s);if(E===null)return _;s=E;let R=`<img src="${s}" alt="${_}"`;return d&&(R+=` title="${d}"`),R+=">",R}text(s){return s}}class B_{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,d,_){return""+_}image(s,d,_){return""+_}br(){return""}}class Is{constructor(s){Kn(this,"options");Kn(this,"renderer");Kn(this,"textRenderer");this.options=s||Mo,this.options.renderer=this.options.renderer||new vm,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new B_}static parse(s,d){return new Is(d).parse(s)}static parseInline(s,d){return new Is(d).parseInline(s)}parse(s,d=!0){let _="";for(let E=0;E<s.length;E++){const R=s[E];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[R.type]){const b=R,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)){_+=a||"";continue}}switch(R.type){case"space":continue;case"hr":{_+=this.renderer.hr();continue}case"heading":{const b=R;_+=this.renderer.heading(this.parseInline(b.tokens),b.depth,J2(this.parseInline(b.tokens,this.textRenderer)));continue}case"code":{const b=R;_+=this.renderer.code(b.text,b.lang,!!b.escaped);continue}case"table":{const b=R;let a="",u="";for(let x=0;x<b.header.length;x++)u+=this.renderer.tablecell(this.parseInline(b.header[x].tokens),{header:!0,align:b.align[x]});a+=this.renderer.tablerow(u);let g="";for(let x=0;x<b.rows.length;x++){const h=b.rows[x];u="";for(let f=0;f<h.length;f++)u+=this.renderer.tablecell(this.parseInline(h[f].tokens),{header:!1,align:b.align[f]});g+=this.renderer.tablerow(u)}_+=this.renderer.table(a,g);continue}case"blockquote":{const b=R,a=this.parse(b.tokens);_+=this.renderer.blockquote(a);continue}case"list":{const b=R,a=b.ordered,u=b.start,g=b.loose;let x="";for(let h=0;h<b.items.length;h++){const f=b.items[h],S=f.checked,C=f.task;let y="";if(f.task){const l=this.renderer.checkbox(!!S);g?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=l+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=l+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:l+" "}):y+=l+" "}y+=this.parse(f.tokens,g),x+=this.renderer.listitem(y,C,!!S)}_+=this.renderer.list(x,a,u);continue}case"html":{const b=R;_+=this.renderer.html(b.text,b.block);continue}case"paragraph":{const b=R;_+=this.renderer.paragraph(this.parseInline(b.tokens));continue}case"text":{let b=R,a=b.tokens?this.parseInline(b.tokens):b.text;for(;E+1<s.length&&s[E+1].type==="text";)b=s[++E],a+=`
326
+ `+(b.tokens?this.parseInline(b.tokens):b.text);_+=d?this.renderer.paragraph(a):a;continue}default:{const b='Token with "'+R.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return _}parseInline(s,d){d=d||this.renderer;let _="";for(let E=0;E<s.length;E++){const R=s[E];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[R.type]){const b=this.options.extensions.renderers[R.type].call({parser:this},R);if(b!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(R.type)){_+=b||"";continue}}switch(R.type){case"escape":{const b=R;_+=d.text(b.text);break}case"html":{const b=R;_+=d.html(b.text);break}case"link":{const b=R;_+=d.link(b.href,b.title,this.parseInline(b.tokens,d));break}case"image":{const b=R;_+=d.image(b.href,b.title,b.text);break}case"strong":{const b=R;_+=d.strong(this.parseInline(b.tokens,d));break}case"em":{const b=R;_+=d.em(this.parseInline(b.tokens,d));break}case"codespan":{const b=R;_+=d.codespan(b.text);break}case"br":{_+=d.br();break}case"del":{const b=R;_+=d.del(this.parseInline(b.tokens,d));break}case"text":{const b=R;_+=d.text(b.text);break}default:{const b='Token with "'+R.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return _}}class Vu{constructor(s){Kn(this,"options");this.options=s||Mo}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}}Kn(Vu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var To,l_,qS;class jO{constructor(...s){H0(this,To);Kn(this,"defaults",M_());Kn(this,"options",this.setOptions);Kn(this,"parse",Wh(this,To,l_).call(this,Bs.lex,Is.parse));Kn(this,"parseInline",Wh(this,To,l_).call(this,Bs.lexInline,Is.parseInline));Kn(this,"Parser",Is);Kn(this,"Renderer",vm);Kn(this,"TextRenderer",B_);Kn(this,"Lexer",Bs);Kn(this,"Tokenizer",fm);Kn(this,"Hooks",Vu);this.use(...s)}walkTokens(s,d){var E,R;let _=[];for(const b of s)switch(_=_.concat(d.call(this,b)),b.type){case"table":{const a=b;for(const u of a.header)_=_.concat(this.walkTokens(u.tokens,d));for(const u of a.rows)for(const g of u)_=_.concat(this.walkTokens(g.tokens,d));break}case"list":{const a=b;_=_.concat(this.walkTokens(a.items,d));break}default:{const a=b;(R=(E=this.defaults.extensions)==null?void 0:E.childTokens)!=null&&R[a.type]?this.defaults.extensions.childTokens[a.type].forEach(u=>{const g=a[u].flat(1/0);_=_.concat(this.walkTokens(g,d))}):a.tokens&&(_=_.concat(this.walkTokens(a.tokens,d)))}}return _}use(...s){const d=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(_=>{const E={..._};if(E.async=this.defaults.async||E.async||!1,_.extensions&&(_.extensions.forEach(R=>{if(!R.name)throw new Error("extension name required");if("renderer"in R){const b=d.renderers[R.name];b?d.renderers[R.name]=function(...a){let u=R.renderer.apply(this,a);return u===!1&&(u=b.apply(this,a)),u}:d.renderers[R.name]=R.renderer}if("tokenizer"in R){if(!R.level||R.level!=="block"&&R.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const b=d[R.level];b?b.unshift(R.tokenizer):d[R.level]=[R.tokenizer],R.start&&(R.level==="block"?d.startBlock?d.startBlock.push(R.start):d.startBlock=[R.start]:R.level==="inline"&&(d.startInline?d.startInline.push(R.start):d.startInline=[R.start]))}"childTokens"in R&&R.childTokens&&(d.childTokens[R.name]=R.childTokens)}),E.extensions=d),_.renderer){const R=this.defaults.renderer||new vm(this.defaults);for(const b in _.renderer){if(!(b in R))throw new Error(`renderer '${b}' does not exist`);if(b==="options")continue;const a=b,u=_.renderer[a],g=R[a];R[a]=(...x)=>{let h=u.apply(R,x);return h===!1&&(h=g.apply(R,x)),h||""}}E.renderer=R}if(_.tokenizer){const R=this.defaults.tokenizer||new fm(this.defaults);for(const b in _.tokenizer){if(!(b in R))throw new Error(`tokenizer '${b}' does not exist`);if(["options","rules","lexer"].includes(b))continue;const a=b,u=_.tokenizer[a],g=R[a];R[a]=(...x)=>{let h=u.apply(R,x);return h===!1&&(h=g.apply(R,x)),h}}E.tokenizer=R}if(_.hooks){const R=this.defaults.hooks||new Vu;for(const b in _.hooks){if(!(b in R))throw new Error(`hook '${b}' does not exist`);if(b==="options")continue;const a=b,u=_.hooks[a],g=R[a];Vu.passThroughHooks.has(b)?R[a]=x=>{if(this.defaults.async)return Promise.resolve(u.call(R,x)).then(f=>g.call(R,f));const h=u.call(R,x);return g.call(R,h)}:R[a]=(...x)=>{let h=u.apply(R,x);return h===!1&&(h=g.apply(R,x)),h}}E.hooks=R}if(_.walkTokens){const R=this.defaults.walkTokens,b=_.walkTokens;E.walkTokens=function(a){let u=[];return u.push(b.call(this,a)),R&&(u=u.concat(R.call(this,a))),u}}this.defaults={...this.defaults,...E}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,d){return Bs.lex(s,d??this.defaults)}parser(s,d){return Is.parse(s,d??this.defaults)}}To=new WeakSet,l_=function(s,d){return(_,E)=>{const R={...E},b={...this.defaults,...R};this.defaults.async===!0&&R.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=Wh(this,To,qS).call(this,!!b.silent,!!b.async);if(typeof _>"u"||_===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof _!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(_)+", string expected"));if(b.hooks&&(b.hooks.options=b),b.async)return Promise.resolve(b.hooks?b.hooks.preprocess(_):_).then(u=>s(u,b)).then(u=>b.hooks?b.hooks.processAllTokens(u):u).then(u=>b.walkTokens?Promise.all(this.walkTokens(u,b.walkTokens)).then(()=>u):u).then(u=>d(u,b)).then(u=>b.hooks?b.hooks.postprocess(u):u).catch(a);try{b.hooks&&(_=b.hooks.preprocess(_));let u=s(_,b);b.hooks&&(u=b.hooks.processAllTokens(u)),b.walkTokens&&this.walkTokens(u,b.walkTokens);let g=d(u,b);return b.hooks&&(g=b.hooks.postprocess(g)),g}catch(u){return a(u)}}},qS=function(s,d){return _=>{if(_.message+=`
327
+ Please report this to https://github.com/markedjs/marked.`,s){const E="<p>An error occurred:</p><pre>"+Br(_.message+"",!0)+"</pre>";return d?Promise.resolve(E):E}if(d)return Promise.reject(_);throw _}};const Ro=new jO;function Mn(r,s){return Ro.parse(r,s)}Mn.options=Mn.setOptions=function(r){return Ro.setOptions(r),Mn.defaults=Ro.defaults,VS(Mn.defaults),Mn};Mn.getDefaults=M_;Mn.defaults=Mo;Mn.use=function(...r){return Ro.use(...r),Mn.defaults=Ro.defaults,VS(Mn.defaults),Mn};Mn.walkTokens=function(r,s){return Ro.walkTokens(r,s)};Mn.parseInline=Ro.parseInline;Mn.Parser=Is;Mn.parser=Is.parse;Mn.Renderer=vm;Mn.TextRenderer=B_;Mn.Lexer=Bs;Mn.lexer=Bs.lex;Mn.Tokenizer=fm;Mn.Hooks=Vu;Mn.parse=Mn;Mn.options;Mn.setOptions;Mn.use;Mn.walkTokens;Mn.parseInline;Is.parse;Bs.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 GN(r,s){(s==null||s>r.length)&&(s=r.length);for(var d=0,_=Array(s);d<s;d++)_[d]=r[d];return _}function DO(r){if(Array.isArray(r))return r}function kO(r,s){var d=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(d!=null){var _,E,R,b,a=[],u=!0,g=!1;try{if(R=(d=d.call(r)).next,s!==0)for(;!(u=(_=R.call(d)).done)&&(a.push(_.value),a.length!==s);u=!0);}catch(x){g=!0,E=x}finally{try{if(!u&&d.return!=null&&(b=d.return(),Object(b)!==b))return}finally{if(g)throw E}}return a}}function RO(){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 TO(r,s){return DO(r)||kO(r,s)||LO(r,s)||RO()}function LO(r,s){if(r){if(typeof r=="string")return GN(r,s);var d={}.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?GN(r,s):void 0}}const YS=Object.entries,qN=Object.setPrototypeOf,MO=Object.isFrozen,AO=Object.getPrototypeOf,UO=Object.getOwnPropertyDescriptor;let fr=Object.freeze,ts=Object.seal,Bl=Object.create,KS=typeof Reflect<"u"&&Reflect,c_=KS.apply,u_=KS.construct;fr||(fr=function(s){return s});ts||(ts=function(s){return s});c_||(c_=function(s,d){for(var _=arguments.length,E=new Array(_>2?_-2:0),R=2;R<_;R++)E[R-2]=arguments[R];return s.apply(d,E)});u_||(u_=function(s){for(var d=arguments.length,_=new Array(d>1?d-1:0),E=1;E<d;E++)_[E-1]=arguments[E];return new s(..._)});const No=vi(Array.prototype.forEach),OO=vi(Array.prototype.lastIndexOf),YN=vi(Array.prototype.pop),Al=vi(Array.prototype.push),VO=vi(Array.prototype.splice),mr=Array.isArray,Tu=vi(String.prototype.toLowerCase),kg=vi(String.prototype.toString),KN=vi(String.prototype.match),Ul=vi(String.prototype.replace),XN=vi(String.prototype.indexOf),PO=vi(String.prototype.trim),BO=vi(Number.prototype.toString),IO=vi(Boolean.prototype.toString),JN=typeof BigInt>"u"?null:vi(BigInt.prototype.toString),ZN=typeof Symbol>"u"?null:vi(Symbol.prototype.toString),ai=vi(Object.prototype.hasOwnProperty),ku=vi(Object.prototype.toString),$i=vi(RegExp.prototype.test),Ol=FO(TypeError);function vi(r){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var d=arguments.length,_=new Array(d>1?d-1:0),E=1;E<d;E++)_[E-1]=arguments[E];return c_(r,s,_)}}function FO(r){return function(){for(var s=arguments.length,d=new Array(s),_=0;_<s;_++)d[_]=arguments[_];return u_(r,d)}}function rn(r,s){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tu;if(qN&&qN(r,null),!mr(s))return r;let _=s.length;for(;_--;){let E=s[_];if(typeof E=="string"){const R=d(E);R!==E&&(MO(s)||(s[_]=R),E=R)}r[E]=!0}return r}function HO(r){for(let s=0;s<r.length;s++)ai(r,s)||(r[s]=null);return r}function Qi(r){const s=Bl(null);for(const _ of YS(r)){var d=TO(_,2);const E=d[0],R=d[1];ai(r,E)&&(mr(R)?s[E]=HO(R):R&&typeof R=="object"&&R.constructor===Object?s[E]=Qi(R):s[E]=R)}return s}function zO(r){switch(typeof r){case"string":return r;case"number":return BO(r);case"boolean":return IO(r);case"bigint":return JN?JN(r):"0";case"symbol":return ZN?ZN(r):"Symbol()";case"undefined":return ku(r);case"function":case"object":{if(r===null)return ku(r);const s=r,d=Ps(s,"toString");if(typeof d=="function"){const _=d(s);return typeof _=="string"?_:ku(_)}return ku(r)}default:return ku(r)}}function Ps(r,s){for(;r!==null;){const _=UO(r,s);if(_){if(_.get)return vi(_.get);if(typeof _.value=="function")return vi(_.value)}r=AO(r)}function d(){return null}return d}function $O(r){try{return $i(r,""),!0}catch{return!1}}const QN=fr(["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"]),Rg=fr(["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"]),Tg=fr(["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"]),WO=fr(["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"]),Lg=fr(["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"]),GO=fr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),e1=fr(["#text"]),t1=fr(["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"]),Mg=fr(["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"]),n1=fr(["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"]),Zh=fr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qO=ts(/{{[\w\W]*|^[\w\W]*}}/g),YO=ts(/<%[\w\W]*|^[\w\W]*%>/g),KO=ts(/\${[\w\W]*/g),XO=ts(/^data-[\-\w.\u00B7-\uFFFF]+$/),JO=ts(/^aria-[\-\w]+$/),i1=ts(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ZO=ts(/^(?:\w+script|data):/i),QO=ts(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),e4=ts(/^html$/i),t4=ts(/^[a-z][.\w]*(-[.\w]+)+$/i),Vs={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},n4=function(){return typeof window>"u"?null:window},i4=function(s,d){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let _=null;const E="data-tt-policy-suffix";d&&d.hasAttribute(E)&&(_=d.getAttribute(E));const R="dompurify"+(_?"#"+_:"");try{return s.createPolicy(R,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+R+" could not be created."),null}},r1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function XS(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n4();const s=xe=>XS(xe);if(s.version="3.4.8",s.removed=[],!r||!r.document||r.document.nodeType!==Vs.document||!r.Element)return s.isSupported=!1,s;let d=r.document;const _=d,E=_.currentScript;r.DocumentFragment;const R=r.HTMLTemplateElement,b=r.Node,a=r.Element,u=r.NodeFilter,g=r.NamedNodeMap;g===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const x=r.DOMParser,h=r.trustedTypes,f=a.prototype,S=Ps(f,"cloneNode"),C=Ps(f,"remove"),y=Ps(f,"nextSibling"),l=Ps(f,"childNodes"),v=Ps(f,"parentNode"),m=Ps(f,"shadowRoot"),p=Ps(f,"attributes"),N=b&&b.prototype?Ps(b.prototype,"nodeType"):null,k=b&&b.prototype?Ps(b.prototype,"nodeName"):null;if(typeof R=="function"){const xe=d.createElement("template");xe.content&&xe.content.ownerDocument&&(d=xe.content.ownerDocument)}let j,M="",D=0;const L=function(Q){if(D>0)throw Ol('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.');D++;try{return j.createHTML(Q)}finally{D--}},A=d,F=A.implementation,O=A.createNodeIterator,I=A.createDocumentFragment,G=A.getElementsByTagName,ne=_.importNode;let ee=r1();s.isSupported=typeof YS=="function"&&typeof v=="function"&&F&&F.createHTMLDocument!==void 0;const te=qO,se=YO,B=KO,W=XO,X=JO,Y=ZO,ve=QO,he=t4;let Me=i1,me=null;const ie=rn({},[...QN,...Rg,...Tg,...Lg,...e1]);let $=null;const _e=rn({},[...t1,...Mg,...n1,...Zh]);let de=Object.seal(Bl(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}})),Ie=null,Ue=null;const tt=Object.seal(Bl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Qe=!0,st=!0,Nt=!1,J=!0,bt=!1,Gt=!0,Ee=!1,Te=!1,Ge=!1,re=!1,We=!1,Ye=!1,ge=!0,Ze=!1;const je="user-content-";let Pe=!0,be=!1,Ae={},He=null;const wt=rn({},["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 kt=null;const Ot=rn({},["audio","video","img","source","image","track"]);let Pt=null;const dn=rn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qt="http://www.w3.org/1998/Math/MathML",Mt="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let sn=Ft,Dn=!1,it=null;const cn=rn({},[Qt,Mt,Ft],kg);let zn=rn({},["mi","mo","mn","ms","mtext"]),$n=rn({},["annotation-xml"]);const en=rn({},["title","style","font","a","script"]);let kn=null;const On=["application/xhtml+xml","text/html"],ni="text/html";let nn=null,En=null;const vn=d.createElement("form"),Xn=function(Q){return Q instanceof RegExp||Q instanceof Function},oe=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(En&&En===Q)return;(!Q||typeof Q!="object")&&(Q={}),Q=Qi(Q),kn=On.indexOf(Q.PARSER_MEDIA_TYPE)===-1?ni:Q.PARSER_MEDIA_TYPE,nn=kn==="application/xhtml+xml"?kg:Tu,me=ai(Q,"ALLOWED_TAGS")&&mr(Q.ALLOWED_TAGS)?rn({},Q.ALLOWED_TAGS,nn):ie,$=ai(Q,"ALLOWED_ATTR")&&mr(Q.ALLOWED_ATTR)?rn({},Q.ALLOWED_ATTR,nn):_e,it=ai(Q,"ALLOWED_NAMESPACES")&&mr(Q.ALLOWED_NAMESPACES)?rn({},Q.ALLOWED_NAMESPACES,kg):cn,Pt=ai(Q,"ADD_URI_SAFE_ATTR")&&mr(Q.ADD_URI_SAFE_ATTR)?rn(Qi(dn),Q.ADD_URI_SAFE_ATTR,nn):dn,kt=ai(Q,"ADD_DATA_URI_TAGS")&&mr(Q.ADD_DATA_URI_TAGS)?rn(Qi(Ot),Q.ADD_DATA_URI_TAGS,nn):Ot,He=ai(Q,"FORBID_CONTENTS")&&mr(Q.FORBID_CONTENTS)?rn({},Q.FORBID_CONTENTS,nn):wt,Ie=ai(Q,"FORBID_TAGS")&&mr(Q.FORBID_TAGS)?rn({},Q.FORBID_TAGS,nn):Qi({}),Ue=ai(Q,"FORBID_ATTR")&&mr(Q.FORBID_ATTR)?rn({},Q.FORBID_ATTR,nn):Qi({}),Ae=ai(Q,"USE_PROFILES")?Q.USE_PROFILES&&typeof Q.USE_PROFILES=="object"?Qi(Q.USE_PROFILES):Q.USE_PROFILES:!1,Qe=Q.ALLOW_ARIA_ATTR!==!1,st=Q.ALLOW_DATA_ATTR!==!1,Nt=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,J=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,bt=Q.SAFE_FOR_TEMPLATES||!1,Gt=Q.SAFE_FOR_XML!==!1,Ee=Q.WHOLE_DOCUMENT||!1,re=Q.RETURN_DOM||!1,We=Q.RETURN_DOM_FRAGMENT||!1,Ye=Q.RETURN_TRUSTED_TYPE||!1,Ge=Q.FORCE_BODY||!1,ge=Q.SANITIZE_DOM!==!1,Ze=Q.SANITIZE_NAMED_PROPS||!1,Pe=Q.KEEP_CONTENT!==!1,be=Q.IN_PLACE||!1,Me=$O(Q.ALLOWED_URI_REGEXP)?Q.ALLOWED_URI_REGEXP:i1,sn=typeof Q.NAMESPACE=="string"?Q.NAMESPACE:Ft,zn=ai(Q,"MATHML_TEXT_INTEGRATION_POINTS")&&Q.MATHML_TEXT_INTEGRATION_POINTS&&typeof Q.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qi(Q.MATHML_TEXT_INTEGRATION_POINTS):rn({},["mi","mo","mn","ms","mtext"]),$n=ai(Q,"HTML_INTEGRATION_POINTS")&&Q.HTML_INTEGRATION_POINTS&&typeof Q.HTML_INTEGRATION_POINTS=="object"?Qi(Q.HTML_INTEGRATION_POINTS):rn({},["annotation-xml"]);const Ce=ai(Q,"CUSTOM_ELEMENT_HANDLING")&&Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING=="object"?Qi(Q.CUSTOM_ELEMENT_HANDLING):Bl(null);if(de=Bl(null),ai(Ce,"tagNameCheck")&&Xn(Ce.tagNameCheck)&&(de.tagNameCheck=Ce.tagNameCheck),ai(Ce,"attributeNameCheck")&&Xn(Ce.attributeNameCheck)&&(de.attributeNameCheck=Ce.attributeNameCheck),ai(Ce,"allowCustomizedBuiltInElements")&&typeof Ce.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=Ce.allowCustomizedBuiltInElements),bt&&(st=!1),We&&(re=!0),Ae&&(me=rn({},e1),$=Bl(null),Ae.html===!0&&(rn(me,QN),rn($,t1)),Ae.svg===!0&&(rn(me,Rg),rn($,Mg),rn($,Zh)),Ae.svgFilters===!0&&(rn(me,Tg),rn($,Mg),rn($,Zh)),Ae.mathMl===!0&&(rn(me,Lg),rn($,n1),rn($,Zh))),tt.tagCheck=null,tt.attributeCheck=null,ai(Q,"ADD_TAGS")&&(typeof Q.ADD_TAGS=="function"?tt.tagCheck=Q.ADD_TAGS:mr(Q.ADD_TAGS)&&(me===ie&&(me=Qi(me)),rn(me,Q.ADD_TAGS,nn))),ai(Q,"ADD_ATTR")&&(typeof Q.ADD_ATTR=="function"?tt.attributeCheck=Q.ADD_ATTR:mr(Q.ADD_ATTR)&&($===_e&&($=Qi($)),rn($,Q.ADD_ATTR,nn))),ai(Q,"ADD_URI_SAFE_ATTR")&&mr(Q.ADD_URI_SAFE_ATTR)&&rn(Pt,Q.ADD_URI_SAFE_ATTR,nn),ai(Q,"FORBID_CONTENTS")&&mr(Q.FORBID_CONTENTS)&&(He===wt&&(He=Qi(He)),rn(He,Q.FORBID_CONTENTS,nn)),ai(Q,"ADD_FORBID_CONTENTS")&&mr(Q.ADD_FORBID_CONTENTS)&&(He===wt&&(He=Qi(He)),rn(He,Q.ADD_FORBID_CONTENTS,nn)),Pe&&(me["#text"]=!0),Ee&&rn(me,["html","head","body"]),me.table&&(rn(me,["tbody"]),delete Ie.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ol('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ol('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Je=j;j=Q.TRUSTED_TYPES_POLICY;try{M=L("")}catch(Vt){throw j=Je,Vt}}else j===void 0&&Q.TRUSTED_TYPES_POLICY!==null&&(j=i4(h,E)),j&&typeof M=="string"&&(M=L(""));(ee.uponSanitizeElement.length>0||ee.uponSanitizeAttribute.length>0)&&me===ie&&(me=Qi(me)),ee.uponSanitizeAttribute.length>0&&$===_e&&($=Qi($)),fr&&fr(Q),En=Q},$e=rn({},[...Rg,...Tg,...WO]),et=rn({},[...Lg,...GO]),yt=function(Q){let Ce=v(Q);(!Ce||!Ce.tagName)&&(Ce={namespaceURI:sn,tagName:"template"});const Je=Tu(Q.tagName),Vt=Tu(Ce.tagName);return it[Q.namespaceURI]?Q.namespaceURI===Mt?Ce.namespaceURI===Ft?Je==="svg":Ce.namespaceURI===Qt?Je==="svg"&&(Vt==="annotation-xml"||zn[Vt]):!!$e[Je]:Q.namespaceURI===Qt?Ce.namespaceURI===Ft?Je==="math":Ce.namespaceURI===Mt?Je==="math"&&$n[Vt]:!!et[Je]:Q.namespaceURI===Ft?Ce.namespaceURI===Mt&&!$n[Vt]||Ce.namespaceURI===Qt&&!zn[Vt]?!1:!et[Je]&&(en[Je]||!$e[Je]):!!(kn==="application/xhtml+xml"&&it[Q.namespaceURI]):!1},gt=function(Q){Al(s.removed,{element:Q});try{v(Q).removeChild(Q)}catch{C(Q)}},ft=function(Q,Ce){try{Al(s.removed,{attribute:Ce.getAttributeNode(Q),from:Ce})}catch{Al(s.removed,{attribute:null,from:Ce})}if(Ce.removeAttribute(Q),Q==="is")if(re||We)try{gt(Ce)}catch{}else try{Ce.setAttribute(Q,"")}catch{}},Rt=function(Q){let Ce=null,Je=null;if(Ge)Q="<remove></remove>"+Q;else{const St=KN(Q,/^[\r\n\t ]+/);Je=St&&St[0]}kn==="application/xhtml+xml"&&sn===Ft&&(Q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Q+"</body></html>");const Vt=j?L(Q):Q;if(sn===Ft)try{Ce=new x().parseFromString(Vt,kn)}catch{}if(!Ce||!Ce.documentElement){Ce=F.createDocument(sn,"template",null);try{Ce.documentElement.innerHTML=Dn?M:Vt}catch{}}const _t=Ce.body||Ce.documentElement;return Q&&Je&&_t.insertBefore(d.createTextNode(Je),_t.childNodes[0]||null),sn===Ft?G.call(Ce,Ee?"html":"body")[0]:Ee?Ce.documentElement:_t},pt=function(Q){return O.call(Q.ownerDocument||Q,Q,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},gn=function(Q){var Ce,Je;Q.normalize();const Vt=O.call(Q.ownerDocument||Q,Q,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let _t=Vt.nextNode();for(;_t;){let Jt=_t.data;No([te,se,B],yn=>{Jt=Ul(Jt,yn," ")}),_t.data=Jt,_t=Vt.nextNode()}const St=(Ce=(Je=Q.querySelectorAll)===null||Je===void 0?void 0:Je.call(Q,"template"))!==null&&Ce!==void 0?Ce:[];No(Array.from(St),Jt=>{qt(Jt.content)&&gn(Jt.content)})},an=function(Q){const Ce=k?k(Q):null;return typeof Ce!="string"||nn(Ce)!=="form"?!1:typeof Q.nodeName!="string"||typeof Q.textContent!="string"||typeof Q.removeChild!="function"||Q.attributes!==p(Q)||typeof Q.removeAttribute!="function"||typeof Q.setAttribute!="function"||typeof Q.namespaceURI!="string"||typeof Q.insertBefore!="function"||typeof Q.hasChildNodes!="function"||Q.nodeType!==N(Q)||Q.childNodes!==l(Q)},qt=function(Q){if(!N||typeof Q!="object"||Q===null)return!1;try{return N(Q)===Vs.documentFragment}catch{return!1}},bn=function(Q){if(!N||typeof Q!="object"||Q===null)return!1;try{return typeof N(Q)=="number"}catch{return!1}};function Nn(xe,Q,Ce){No(xe,Je=>{Je.call(s,Q,Ce,En)})}const ui=function(Q){let Ce=null;if(Nn(ee.beforeSanitizeElements,Q,null),an(Q))return gt(Q),!0;const Je=nn(k?k(Q):Q.nodeName);if(Nn(ee.uponSanitizeElement,Q,{tagName:Je,allowedTags:me}),Gt&&Q.hasChildNodes()&&!bn(Q.firstElementChild)&&$i(/<[/\w!]/g,Q.innerHTML)&&$i(/<[/\w!]/g,Q.textContent)||Gt&&Q.namespaceURI===Ft&&Je==="style"&&bn(Q.firstElementChild)||Q.nodeType===Vs.progressingInstruction||Gt&&Q.nodeType===Vs.comment&&$i(/<[/\w]/g,Q.data))return gt(Q),!0;if(Ie[Je]||!(tt.tagCheck instanceof Function&&tt.tagCheck(Je))&&!me[Je]){if(!Ie[Je]&&ii(Je)&&(de.tagNameCheck instanceof RegExp&&$i(de.tagNameCheck,Je)||de.tagNameCheck instanceof Function&&de.tagNameCheck(Je)))return!1;if(Pe&&!He[Je]){const _t=v(Q),St=l(Q);if(St&&_t){const Jt=St.length;for(let yn=Jt-1;yn>=0;--yn){const hn=S(St[yn],!0);_t.insertBefore(hn,y(Q))}}}return gt(Q),!0}return(N?N(Q):Q.nodeType)===Vs.element&&!yt(Q)||(Je==="noscript"||Je==="noembed"||Je==="noframes")&&$i(/<\/no(script|embed|frames)/i,Q.innerHTML)?(gt(Q),!0):(bt&&Q.nodeType===Vs.text&&(Ce=Q.textContent,No([te,se,B],_t=>{Ce=Ul(Ce,_t," ")}),Q.textContent!==Ce&&(Al(s.removed,{element:Q.cloneNode()}),Q.textContent=Ce)),Nn(ee.afterSanitizeElements,Q,null),!1)},Vn=function(Q,Ce,Je){if(Ue[Ce]||ge&&(Ce==="id"||Ce==="name")&&(Je in d||Je in vn))return!1;const Vt=$[Ce]||tt.attributeCheck instanceof Function&&tt.attributeCheck(Ce,Q);if(!(st&&!Ue[Ce]&&$i(W,Ce))){if(!(Qe&&$i(X,Ce))){if(!Vt||Ue[Ce]){if(!(ii(Q)&&(de.tagNameCheck instanceof RegExp&&$i(de.tagNameCheck,Q)||de.tagNameCheck instanceof Function&&de.tagNameCheck(Q))&&(de.attributeNameCheck instanceof RegExp&&$i(de.attributeNameCheck,Ce)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(Ce,Q))||Ce==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&$i(de.tagNameCheck,Je)||de.tagNameCheck instanceof Function&&de.tagNameCheck(Je))))return!1}else if(!Pt[Ce]){if(!$i(Me,Ul(Je,ve,""))){if(!((Ce==="src"||Ce==="xlink:href"||Ce==="href")&&Q!=="script"&&XN(Je,"data:")===0&&kt[Q])){if(!(Nt&&!$i(Y,Ul(Je,ve,"")))){if(Je)return!1}}}}}}return!0},Jn=rn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ii=function(Q){return!Jn[Tu(Q)]&&$i(he,Q)},Dt=function(Q){Nn(ee.beforeSanitizeAttributes,Q,null);const Ce=Q.attributes;if(!Ce||an(Q))return;const Je={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let Vt=Ce.length;for(;Vt--;){const _t=Ce[Vt],St=_t.name,Jt=_t.namespaceURI,yn=_t.value,hn=nn(St),An=yn;let Yt=St==="value"?An:PO(An);if(Je.attrName=hn,Je.attrValue=Yt,Je.keepAttr=!0,Je.forceKeepAttr=void 0,Nn(ee.uponSanitizeAttribute,Q,Je),Yt=Je.attrValue,Ze&&(hn==="id"||hn==="name")&&XN(Yt,je)!==0&&(ft(St,Q),Yt=je+Yt),Gt&&$i(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Yt)){ft(St,Q);continue}if(hn==="attributename"&&KN(Yt,"href")){ft(St,Q);continue}if(Je.forceKeepAttr)continue;if(!Je.keepAttr){ft(St,Q);continue}if(!J&&$i(/\/>/i,Yt)){ft(St,Q);continue}bt&&No([te,se,B],Zn=>{Yt=Ul(Yt,Zn," ")});const Wn=nn(Q.nodeName);if(!Vn(Wn,hn,Yt)){ft(St,Q);continue}if(j&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Jt)switch(h.getAttributeType(Wn,hn)){case"TrustedHTML":{Yt=L(Yt);break}case"TrustedScriptURL":{Yt=j.createScriptURL(Yt);break}}if(Yt!==An)try{Jt?Q.setAttributeNS(Jt,St,Yt):Q.setAttribute(St,Yt),an(Q)?gt(Q):YN(s.removed)}catch{ft(St,Q)}}Nn(ee.afterSanitizeAttributes,Q,null)},ae=function(Q){let Ce=null;const Je=pt(Q);for(Nn(ee.beforeSanitizeShadowDOM,Q,null);Ce=Je.nextNode();)if(Nn(ee.uponSanitizeShadowNode,Ce,null),ui(Ce),Dt(Ce),qt(Ce.content)&&ae(Ce.content),(N?N(Ce):Ce.nodeType)===Vs.element){const _t=m?m(Ce):Ce.shadowRoot;qt(_t)&&(Be(_t),ae(_t))}Nn(ee.afterSanitizeShadowDOM,Q,null)},Be=function(Q){const Ce=N?N(Q):Q.nodeType;if(Ce===Vs.element){const _t=m?m(Q):Q.shadowRoot;qt(_t)&&(Be(_t),ae(_t))}const Je=l?l(Q):Q.childNodes;if(!Je)return;const Vt=[];No(Je,_t=>{Al(Vt,_t)});for(const _t of Vt)Be(_t);if(Ce===Vs.element){const _t=k?k(Q):null;if(typeof _t=="string"&&nn(_t)==="template"){const St=Q.content;qt(St)&&Be(St)}}};return s.sanitize=function(xe){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=null,Je=null,Vt=null,_t=null;if(Dn=!xe,Dn&&(xe="<!-->"),typeof xe!="string"&&!bn(xe)&&(xe=zO(xe),typeof xe!="string"))throw Ol("dirty is not a string, aborting");if(!s.isSupported)return xe;if(Te||oe(Q),s.removed=[],typeof xe=="string"&&(be=!1),be){const yn=k?k(xe):xe.nodeName;if(typeof yn=="string"){const hn=nn(yn);if(!me[hn]||Ie[hn])throw Ol("root node is forbidden and cannot be sanitized in-place")}if(an(xe))throw Ol("root node is clobbered and cannot be sanitized in-place");Be(xe)}else if(bn(xe))Ce=Rt("<!---->"),Je=Ce.ownerDocument.importNode(xe,!0),Je.nodeType===Vs.element&&Je.nodeName==="BODY"||Je.nodeName==="HTML"?Ce=Je:Ce.appendChild(Je),Be(Je);else{if(!re&&!bt&&!Ee&&xe.indexOf("<")===-1)return j&&Ye?L(xe):xe;if(Ce=Rt(xe),!Ce)return re?null:Ye?M:""}Ce&&Ge&&gt(Ce.firstChild);const St=pt(be?xe:Ce);for(;Vt=St.nextNode();)ui(Vt),Dt(Vt),qt(Vt.content)&&ae(Vt.content);if(be)return bt&&gn(xe),xe;if(re){if(bt&&gn(Ce),We)for(_t=I.call(Ce.ownerDocument);Ce.firstChild;)_t.appendChild(Ce.firstChild);else _t=Ce;return($.shadowroot||$.shadowrootmode)&&(_t=ne.call(_,_t,!0)),_t}let Jt=Ee?Ce.outerHTML:Ce.innerHTML;return Ee&&me["!doctype"]&&Ce.ownerDocument&&Ce.ownerDocument.doctype&&Ce.ownerDocument.doctype.name&&$i(e4,Ce.ownerDocument.doctype.name)&&(Jt="<!DOCTYPE "+Ce.ownerDocument.doctype.name+`>
329
+ `+Jt),bt&&No([te,se,B],yn=>{Jt=Ul(Jt,yn," ")}),j&&Ye?L(Jt):Jt},s.setConfig=function(){let xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(xe),Te=!0},s.clearConfig=function(){En=null,Te=!1},s.isValidAttribute=function(xe,Q,Ce){En||oe({});const Je=nn(xe),Vt=nn(Q);return Vn(Je,Vt,Ce)},s.addHook=function(xe,Q){typeof Q=="function"&&Al(ee[xe],Q)},s.removeHook=function(xe,Q){if(Q!==void 0){const Ce=OO(ee[xe],Q);return Ce===-1?void 0:VO(ee[xe],Ce,1)[0]}return YN(ee[xe])},s.removeHooks=function(xe){ee[xe]=[]},s.removeAllHooks=function(){ee=r1()},s}var JS=XS();function s1(r,s){const d=new Map(r.map(_=>[_.k,_]));for(const _ of s)d.set(_.k,_);return Array.from(d.values()).sort((_,E)=>_.k-E.k)}function r4(r,s){const[d,_]=U.useState([]),[E,R]=U.useState(!1),[b,a]=U.useState(!1),[u,g]=U.useState(null),[x,h]=U.useState(!1),f=U.useRef(""),S=U.useRef(null),C=U.useRef(!1),y=U.useRef(!1),l=U.useRef(null);U.useEffect(()=>{f.current="",S.current=null,C.current=!1,y.current=!1,l.current=null,_([]),R(!1),a(!1),g(null),h(!1)},[r]);const v=U.useCallback(()=>iN(r,{since:f.current,limit:20}),[r]),m=U.useCallback(N=>{if(!N)return;h(!0),f.current=N.hash||"";const k=Array.isArray(N.messages)?N.messages:[];N.session&&l.current&&N.session!==l.current?(_(k),S.current=N.firstSeq??null,R(!!N.hasMore),C.current=!0):(_(j=>s1(j,k)),!C.current&&!y.current&&(C.current=!0,S.current=N.firstSeq??null,R(!!N.hasMore))),N.session&&(l.current=N.session,g(N.session))},[]);Wg({fetch:v,apply:m,intervalMs:1500,enabled:!!r,deps:[r]});const p=U.useCallback(async()=>{if(!(y.current||!E||S.current==null)){y.current=!0,a(!0);try{const N=await iN(r,{before:S.current,limit:10});if(!N)return;const k=Array.isArray(N.messages)?N.messages:[];_(j=>s1(j,k)),S.current=N.firstSeq??S.current,R(!!N.hasMore)}finally{y.current=!1,a(!1)}}},[r,E]);return{messages:d,hasMoreOlder:E,loadOlder:p,loadingOlder:b,session:u,loaded:x}}const s4=1200,a4=450;function o4(r,s){const[d,_]=U.useState(null),E=U.useRef(!0),R=U.useCallback(async()=>{if(!r||!s){_(null);return}try{const a=await _A(r);E.current&&_(a)}catch{}},[r,s]),b=U.useCallback(()=>{setTimeout(()=>{R()},a4)},[R]);return U.useEffect(()=>{if(E.current=!0,!s)return _(null),()=>{E.current=!1};R();const a=setInterval(R,s4);return()=>{E.current=!1,clearInterval(a)}},[r,s,R]),{prompt:d,refetch:b}}function l4(){return{prompt:"需要你确认",options:[{label:"允许",keys:["Enter"]},{label:"拒绝",keys:["Escape"]}]}}function c4({pane:r,prompt:s,onAuthFail:d,onAct:_}){var h;const E=s.cursor??((h=s.options[0])==null?void 0:h.n)??null,[R,b]=U.useState(E),a=`${s.title}|${s.options.map(f=>`${f.n}:${f.label}`).join(",")}`;U.useEffect(()=>{var f;b(s.cursor??((f=s.options[0])==null?void 0:f.n)??null)},[a]);const u=async f=>{try{await f(),_==null||_()}catch(S){S instanceof tr&&(d==null||d())}},g=f=>u(()=>Co(r,String(f),!1)),x=()=>u(()=>Pu(r,["Escape"]));if(s.submit){const f=(s.options.find(C=>/submit/i.test(C.label))||s.options[0]).n,S=s.options.find(C=>/cancel/i.test(C.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:36,columnNumber:9},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",onClick:()=>g(f),children:"提交"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:38,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>S?g(S.n):x(),children:"取消"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:37,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:35,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:47,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:48,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:49,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-options",role:"radiogroup",children:s.options.map(f=>o.jsxDEV("button",{type:"button",role:"radio","aria-checked":R===f.n,className:`chat-gate-opt${R===f.n?" on":""}`,onClick:()=>b(f.n),children:[o.jsxDEV("span",{className:"chat-gate-opt-label",children:f.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:54,columnNumber:13},this),f.description&&o.jsxDEV("span",{className:"chat-gate-opt-desc",children:f.description},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:55,columnNumber:31},this)]},f.n,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:52,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:50,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",disabled:R==null,onClick:()=>g(R),children:"确认"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:60,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:x,children:"取消"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:61,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:59,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:46,columnNumber:5},this)}function u4(r){const s=r.name||"工具",d=r.input||{};return s==="Bash"?`运行 ${d.command||""}`.trim():s==="Edit"||s==="MultiEdit"||s==="Write"?`${s==="Write"?"写入":"编辑"} ${d.file_path||""}`.trim():s==="Read"?`读取 ${d.file_path||d.notebook_path||""}`.trim():s==="NotebookEdit"?`编辑 ${d.notebook_path||""}`.trim():s==="Grep"?`搜索 ${d.pattern||""}`.trim():s==="Glob"?`查找文件 ${d.pattern||""}`.trim():s==="WebSearch"?`联网搜索 ${d.query||""}`.trim():s==="WebFetch"?`读取网页 ${d.url||""}`.trim():s==="TodoWrite"?"更新待办":s==="Skill"?`激活技能 ${d.command||d.skill||""}`.trim():s==="Task"||s==="Agent"?`调用 Agent${d.subagent_type?`(${d.subagent_type})`:""}: ${d.description||""}`.trim():`调用工具 ${s}`}function ZS(r){return r==="Bash"?o.jsxDEV(o3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:46,columnNumber:31},this):r==="Edit"||r==="MultiEdit"||r==="Write"||r==="NotebookEdit"?o.jsxDEV(cS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:47,columnNumber:102},this):r==="Read"?o.jsxDEV(iS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:48,columnNumber:31},this):r==="Grep"||r==="Glob"?o.jsxDEV(u3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:49,columnNumber:50},this):r==="WebSearch"||r==="WebFetch"?o.jsxDEV(d3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:50,columnNumber:59},this):r==="TodoWrite"?o.jsxDEV(h3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:51,columnNumber:36},this):r==="Skill"?o.jsxDEV(m3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:52,columnNumber:32},this):r==="Task"||r==="Agent"?o.jsxDEV(f3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:53,columnNumber:51},this):o.jsxDEV(p3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:54,columnNumber:10},this)}function d_(){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 QS({diff:r}){return!r||!r.added&&!r.removed?null:o.jsxDEV("span",{className:"chat-tool-stat","aria-label":`增 ${r.added} 行,删 ${r.removed} 行`,children:[r.added>0&&o.jsxDEV("span",{className:"cts-add",children:["+",r.added]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:74,columnNumber:26},this),r.removed>0&&o.jsxDEV("span",{className:"cts-del",children:["−",r.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 d4({tool:r}){return r.diff&&r.diff.hunks&&r.diff.hunks.length?o.jsxDEV("div",{className:"chat-diff",children:r.diff.hunks.map((s,d)=>o.jsxDEV("div",{className:"chat-diff-hunk",children:s.lines.map((_,E)=>{const R=_[0]==="+"?"add":_[0]==="-"?"del":"ctx";return o.jsxDEV("div",{className:"chat-diff-line cd-"+R,children:_||" "},E,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:90,columnNumber:22},this)})},d,!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):r.result!=null?o.jsxDEV("pre",{className:"chat-tool-body",children:r.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:97,columnNumber:35},this):null}function h4({tool:r}){if(r.isError)return o.jsxDEV("span",{className:"chat-tool-status err","aria-label":"失败",children:o.jsxDEV(ca,{},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=r.diff&&(r.diff.added||r.diff.removed);return r.result!=null&&!s?o.jsxDEV("span",{className:"chat-tool-status ok","aria-label":"成功",children:o.jsxDEV(S_,{},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 m4({tool:r,running:s,onOpen:d}){return o.jsxDEV("div",{className:"chat-tool"+(r.isError?" chat-tool-err":"")+(s?" chat-tool-running":""),children:o.jsxDEV("button",{type:"button",className:"chat-tool-head",onClick:d,children:[o.jsxDEV("span",{className:"chat-tool-ic",children:ZS(r.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:u4(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:118,columnNumber:9},this),o.jsxDEV(QS,{diff:r.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(d_,{},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(h4,{tool:r},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 eC(r){return{Bash:"运行命令",Edit:"编辑文件",MultiEdit:"编辑文件",Write:"写入文件",Read:"读取文件",NotebookEdit:"编辑笔记本",Grep:"搜索",Glob:"查找文件",WebSearch:"联网搜索",WebFetch:"读取网页",TodoWrite:"更新待办",Skill:"激活技能",Task:"调用 Agent",Agent:"调用 Agent"}[r]||"调用工具"}function f4(r){const s=r.name,d=r.input||{};return s==="Bash"?d.command||"":s==="Read"||s==="Edit"||s==="MultiEdit"||s==="Write"?d.file_path||"":s==="NotebookEdit"?d.notebook_path||"":s==="Grep"||s==="Glob"?d.pattern||"":s==="WebSearch"?d.query||"":s==="WebFetch"?d.url||"":s==="Skill"?d.command||d.skill||"":s==="Task"||s==="Agent"?d.prompt||d.description||"":Object.keys(d).length?JSON.stringify(d,null,2):""}function p4(r){if(!r)return{dir:"",name:""};const s=r.lastIndexOf("/");return s>=0?{dir:r.slice(0,s+1),name:r.slice(s+1)}:{dir:"",name:r}}function v4({hunks:r}){return o.jsxDEV("div",{className:"dv",children:r.map((s,d)=>{let _=s.oldStart||0,E=s.newStart||0;return o.jsxDEV("div",{className:"dv-hunk",children:[d>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((R,b)=>{const a=typeof R=="string"?R[0]:" ",u=typeof R=="string"?R.slice(1):"";let g,x;return a==="+"?(g=E++,x="add"):a==="-"?(g=_++,x="del"):(g=E++,_++,x="ctx"),o.jsxDEV("div",{className:"dv-row dv-"+x,children:[o.jsxDEV("span",{className:"dv-ln",children:g},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:u||" "},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)})]},d,!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 tC(r,s){return s?{txt:"执行中",cls:"run"}:r.isError?{txt:"失败",cls:"err"}:r.result!=null?{txt:"成功",cls:"ok"}:{txt:"未返回",cls:"idle"}}function g4({tool:r,running:s}){const{dir:d,name:_}=p4(r.input&&r.input.file_path||""),E=tC(r,s),R=r.diff&&r.diff.created,b=r.diff&&r.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(cS,{},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:_||r.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:220,columnNumber:11},this),d&&o.jsxDEV("span",{className:"es-dir",children:d},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:eC(r.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 "+E.cls,children:E.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:227,columnNumber:11},this),o.jsxDEV(QS,{diff:r.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(v4,{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):R?o.jsxDEV("div",{className:"es-note",children:["新建文件",r.diff.added?` · 新增 ${r.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 _4({tool:r,running:s,onClose:d}){if(U.useEffect(()=>{const a=u=>{u.key==="Escape"&&d()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]),!r)return null;const _=!!(r.diff&&(r.diff.hunks&&r.diff.hunks.length||r.diff.created)),E=f4(r),R=r.result!=null,b=tC(r,s);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-backdrop",onClick:d},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"+(_?" 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:d,children:o.jsxDEV(ca,{},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),_?o.jsxDEV(g4,{tool:r,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:ZS(r.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:r.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:eC(r.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),E&&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:E},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),R?o.jsxDEV(d4,{tool:r},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 b4({m:r,running:s,onOpenTool:d}){if(r.type==="tool")return o.jsxDEV(m4,{tool:r.tool,running:s,onOpen:()=>d(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:299,columnNumber:33},this);if(r.type==="interrupt")return o.jsxDEV("div",{className:"chat-interrupt",children:V("chat.interrupted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:302,columnNumber:38},this);if(r.type==="compact")return o.jsxDEV("div",{className:"chat-compact-divider",children:V("chat.compacted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:304,columnNumber:36},this);if(r.type==="slash")return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"chat-slash-cmd",children:[r.name,r.args?" "+r.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:312,columnNumber:9},this),r.result&&o.jsxDEV("div",{className:"chat-slash-result",children:r.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(r.type==="thinking")return null;if(r.role!=="user"){const _=JS.sanitize(Mn.parse(r.text||""));return o.jsxDEV("div",{className:"chat-bubble chat-them chat-md",dangerouslySetInnerHTML:{__html:_}},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:r.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:326,columnNumber:10},this)}const y4=40,x4=80;function w4(r){const s=new Set;let d=-1;return r.forEach((_,E)=>{_.type==="text"&&_.role==="user"?(s.add(E),d>=0&&(s.add(d),d=-1)):_.type==="text"&&(d=E)}),d>=0&&s.add(d),s}function N4(r){if(!r)return null;const s=new Date(r);if(Number.isNaN(s.getTime()))return null;const d=`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`,_=new Date;return s.getFullYear()===_.getFullYear()&&s.getMonth()===_.getMonth()&&s.getDate()===_.getDate()?d:`${s.getMonth()+1}月${s.getDate()}日 ${d}`}function S4(r){var R,b,a,u;const s=(R=r.closest)==null?void 0:R.call(r,".chat-md pre");if(s)return{el:s,text:s.innerText};const d=(b=r.closest)==null?void 0:b.call(r,".chat-tool-body, .chat-diff");if(d)return{el:d,text:d.innerText};const _=(a=r.closest)==null?void 0:a.call(r,".chat-bubble");if(_)return{el:_,text:_.innerText};const E=(u=r.closest)==null?void 0:u.call(r,".chat-tool");return E?{el:E,text:E.innerText}:null}const a1=72;function C4({pane:r,kind:s,msg:d,onAuthFail:_,slashEcho:E,onSlashEchoDone:R}){const{messages:b,hasMoreOlder:a,loadOlder:u,loadingOlder:g,session:x,loaded:h}=r4(r),f=U.useMemo(()=>w4(b),[b]),S=s==="permission",{prompt:C,refetch:y}=o4(r,S),l=U.useRef(!1);U.useEffect(()=>{C&&(l.current=!0)},[C]),U.useEffect(()=>{S||(l.current=!1)},[S]);const v=!C&&S&&!l.current?l4():null,m=b.length?b[b.length-1]:null,p=(m==null?void 0:m.type)==="tool"&&m.tool.result===null&&s==="working",N=p,k=s==="compacting",j=s==="error",M=U.useRef(null);E&&!M.current&&(M.current={k:b.reduce((Ee,Te)=>Math.max(Ee,Te.k??-1),-1),session:x}),!E&&M.current&&(M.current=null);const D=!!(E&&M.current&&(M.current.session&&x&&M.current.session!==x||b.some(Ee=>Ee.type==="slash"&&Ee.name===E.name&&(Ee.k??-1)>M.current.k)));U.useEffect(()=>{D&&(R==null||R())},[D,R]);const L=!p&&!k&&!j&&((m==null?void 0:m.role)==="user"?s!=="permission":s==="working"),A=U.useRef(null),F=U.useRef(null),O=U.useRef(!0),I=U.useRef(null),G=U.useRef(!1),ne=U.useRef(null),[ee,te]=U.useState(!0),[se,B]=U.useState(null),W=U.useRef(null),X=U.useRef({timer:null,x:0,y:0,fired:!1}),[Y,ve]=U.useState(null),he=Y!=null?b.find(Ee=>Ee.type==="tool"&&(Ee.k??Ee.i)===Y):null;U.useEffect(()=>{Y!=null&&!he&&ve(null)},[Y,he]);const Me=he!=null,me=U.useRef(0);U.useEffect(()=>{if(!Me)return;window.history.pushState({chatToolSheet:!0},""),me.current=1;const Ee=()=>{me.current=0,ve(null)};return window.addEventListener("popstate",Ee),()=>{window.removeEventListener("popstate",Ee),me.current>0&&(window.history.go(-me.current),me.current=0)}},[Me]);const ie=()=>{W.current&&(W.current.classList.remove("chat-copy-hl"),W.current=null)},$=()=>{ie(),B(null)},_e=()=>{const Ee=X.current;Ee.timer&&(clearTimeout(Ee.timer),Ee.timer=null)},de=(Ee,Te,Ge)=>{var be;X.current.timer=null;const re=S4(Ge),We=F.current;if(!re||!re.text.trim()||!We)return;X.current.fired=!0,(be=navigator.vibrate)==null||be.call(navigator,12),re.el.classList.add("chat-copy-hl"),W.current=re.el;const Ye=We.getBoundingClientRect(),ge=re.el.getBoundingClientRect(),Ze=Math.max(8,Math.min(Ee-Ye.left-a1/2,Ye.width-a1-8)),je=ge.top-Ye.top-44,Pe=je<4?Math.min(ge.bottom-Ye.top+8,Ye.height-52):je;B({top:Pe,left:Ze,text:re.text})},Ie=Ee=>{if($(),X.current.fired=!1,Ee.pointerType==="mouse")return;const Te=X.current;Te.x=Ee.clientX,Te.y=Ee.clientY;const{target:Ge}=Ee;_e(),Te.timer=setTimeout(()=>de(Te.x,Te.y,Ge),480)},Ue=Ee=>{X.current.fired&&(X.current.fired=!1,Ee.stopPropagation(),Ee.preventDefault())},tt=Ee=>{const Te=X.current;Te.timer&&Math.hypot(Ee.clientX-Te.x,Ee.clientY-Te.y)>10&&_e()},Qe=async Ee=>{var Te;try{await navigator.clipboard.writeText(Ee),(Te=navigator.vibrate)==null||Te.call(navigator,8)}catch{}$()};U.useEffect(()=>_e,[]),U.useEffect(()=>{$(),ve(null)},[r]);const[st,Nt]=U.useState(null),J=!!(C||v);U.useEffect(()=>{var Te;if(!J){Nt(null);return}const Ee=()=>{const Ge=F.current,re=Ge==null?void 0:Ge.closest(".app");if(!Ge||!re)return;const We=Ge.getBoundingClientRect(),Ye=re.getBoundingClientRect(),ge=Ye.bottom-We.top;Nt(ge>0?{top:We.top-Ye.top,height:ge}:null)};return Ee(),window.addEventListener("resize",Ee),(Te=window.visualViewport)==null||Te.addEventListener("resize",Ee),()=>{var Ge;window.removeEventListener("resize",Ee),(Ge=window.visualViewport)==null||Ge.removeEventListener("resize",Ee)}},[J]);const bt=()=>{const Ee=A.current;if(!Ee)return;_e(),se&&$();const Te=Ee.scrollHeight-Ee.scrollTop-Ee.clientHeight<y4;O.current=Te,te(Te),Ee.scrollTop<x4&&a&&!g&&(I.current=Ee.scrollHeight,G.current=!0,u())},Gt=()=>{const Ee=A.current;Ee&&(Ee.scrollTop=Ee.scrollHeight,O.current=!0,te(!0))};return U.useEffect(()=>{const Ee=A.current,Te=b.length?b[b.length-1]:null,Ge=Te?Te.k??Te.i:null,re=Te&&Te.role==="user"&&ne.current!=null&&Ge!=null&&Ge>ne.current;if(Ee){if(G.current){Ee.scrollTop+=Ee.scrollHeight-I.current,I.current=null,G.current=!1;return}if(Ge!=null&&(ne.current=ne.current==null?Ge:Math.max(ne.current,Ge)),re){Ee.scrollTop=Ee.scrollHeight,O.current=!0,te(!0);return}O.current&&(Ee.scrollTop=Ee.scrollHeight)}},[b,L]),U.useEffect(()=>{const Ee=A.current;!Ee||g||!a||b.length===0||Ee.clientHeight>0&&Ee.scrollHeight<=Ee.clientHeight&&(I.current=Ee.scrollHeight,G.current=!0,u())},[b,a,g,u]),U.useEffect(()=>{const Ee=A.current;Ee&&(Ee.scrollTop=Ee.scrollHeight),O.current=!0,te(!0),ne.current=null},[r]),o.jsxDEV("div",{className:"chat-view",ref:F,children:[o.jsxDEV("div",{className:"chat-scroll",ref:A,onScroll:bt,onPointerDown:Ie,onPointerMove:tt,onPointerUp:_e,onPointerCancel:_e,onClickCapture:Ue,children:[b.length===0&&(h?o.jsxDEV("div",{className:"chat-new",children:V("boot.chat_empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:643,columnNumber:13},this):o.jsxDEV(xS,{hint:V("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:644,columnNumber:13},this)),b.map((Ee,Te)=>{if(Ee.type==="thinking")return null;const Ge=f.has(Te)?N4(Ee.ts):null;return o.jsxDEV(U.Fragment,{children:[o.jsxDEV(b4,{m:Ee,running:N&&Te===b.length-1,onOpenTool:re=>ve(re.k??re.i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:650,columnNumber:15},this),Ge&&o.jsxDEV("div",{className:"chat-ts "+(Ee.role==="user"?"ts-me":"ts-them"),children:Ge},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:652,columnNumber:25},this)]},(Ee.k??Ee.i)+":"+Te,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:649,columnNumber:13},this)}),E&&!D&&o.jsxDEV("div",{className:"chat-slash-cmd",children:[E.name,E.args?" "+E.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:657,columnNumber:11},this),k&&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:661,columnNumber:13},this),o.jsxDEV(d_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:662,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:660,columnNumber:11},this),j&&o.jsxDEV("div",{className:"chat-turn-error",role:"status",children:["本轮出错",d?`:${d}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:666,columnNumber:11},this),L&&o.jsxDEV("div",{className:"chat-typing","aria-hidden":"true",children:o.jsxDEV(d_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:672,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:671,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:636,columnNumber:7},this),se&&o.jsxDEV("div",{className:"sel-callout chat-copy-callout",style:{top:se.top,left:se.left},onPointerDown:Ee=>Ee.preventDefault(),children:o.jsxDEV("button",{type:"button",onClick:()=>Qe(se.text),children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:680,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:678,columnNumber:9},this),!ee&&o.jsxDEV("button",{type:"button",className:"new-output","aria-label":"回到最新",onClick:Gt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:685,columnNumber:9},this),he&&o.jsxDEV(_4,{tool:he.tool,running:N&&he===b[b.length-1],onClose:()=>ve(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:691,columnNumber:9},this),J&&o.jsxDEV("div",{className:"chat-gate-backdrop",style:st?{top:st.top+"px",height:st.height+"px",bottom:"auto"}:void 0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:702,columnNumber:18},this),C&&o.jsxDEV(c4,{pane:r,prompt:C,onAuthFail:_,onAct:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:704,columnNumber:18},this),v&&o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:v.prompt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:707,columnNumber:11},this),o.jsxDEV("div",{className:"chat-gate-actions",children:v.options.map((Ee,Te)=>o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>Pu(r,Ee.keys),children:Ee.label},Te,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:710,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:708,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:706,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:635,columnNumber:5},this)}function E4({onSaved:r}){const[s,d]=U.useState(""),_=E=>{E.preventDefault();const R=s.trim();R&&(CM(R),r())};return o.jsxDEV("form",{className:"token-prompt",onSubmit:_,children:[o.jsxDEV("h2",{children:V("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:E=>d(E.target.value),placeholder:V("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:V("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 gm({open:r,title:s,actions:d=[],onClose:_}){const[E,R]=U.useState(null);if(U.useEffect(()=>{r||R(null)},[r]),!r)return null;const b=u=>{var g;if(!u.disabled){if(u.confirm&&E!==u.key){R(u.key);return}R(null),(g=u.onClick)==null||g.call(u)}},a=u=>o.jsxDEV("button",{className:`sheet-action ${u.danger?"danger":""} ${E===u.key?"armed":""}`,disabled:u.disabled,onClick:()=>b(u),children:[u.icon&&E!==u.key&&o.jsxDEV("span",{className:"sheet-action-icon","aria-hidden":"true",children:u.icon},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:30,columnNumber:37},this),u.confirm&&E===u.key?u.confirmLabel||V("actionsheet.confirmAgain"):u.label]},u.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:_},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":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/ActionSheet.jsx",lineNumber:40,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:41,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:[d.map((u,g)=>Array.isArray(u)?o.jsxDEV("div",{className:"sheet-row",children:u.map(a)},`row-${g}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:45,columnNumber:15},this):a(u)),o.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:_,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:47,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:43,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 j4=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,o1=300;function l1(r){const s=r.lastIndexOf("/");return s<0?{dir:"",frag:r}:{dir:r.slice(0,s+1),frag:r.slice(s+1)}}const D4=r=>r.replace(/\/+$/,"")||"/",Ag=(r,s)=>r===s?"":r.startsWith(`${s}/`)?r.slice(s.length+1):r,Qh=(r,s,d)=>{let _=null;for(const E of s||[])(r===E||r!=null&&r.startsWith(`${E}/`))&&(!_||E.length>_.length)&&(_=E);return _||d},k4=r=>r==null?"":r<1024?`${r} B`:r<1024*1024?`${Math.round(r/1024)} KB`:`${(r/1024/1024).toFixed(1)} MB`;function nC({path:r,onNavigate:s,onOpenDoc:d,onJumpToCwd:_,pendingFile:E,onPendingConsumed:R,pickMode:b=!1,allowMkdir:a=!b,onPick:u,refreshKey:g=0}){const[x,h]=U.useState(""),[f,S]=U.useState(null),[C,y]=U.useState(!1),[l,v]=U.useState(""),[m,p]=U.useState(""),[N,k]=U.useState(""),[j,M]=U.useState(null),[D,L]=U.useState(!1),[A,F]=U.useState(!1),[O,I]=U.useState(""),[G,ne]=U.useState(null),ee=U.useRef(null),te=U.useRef(!1),se=U.useRef(g),B=U.useRef(null),W=U.useRef(null),X=U.useRef(null),Y=async(ge,{sync:Ze=!1,notify:je=!1,fallbackHome:Pe=!1}={})=>{v("");try{const be=await eS(ge??void 0);if(te.current=be.path,S(be),Ze){const Ae=Ag(be.path,Qh(be.path,be.roots,be.home));h(Ae?`${Ae}/`:"")}je&&(s==null||s(be.path),F(!1),I(""))}catch{if(Pe&&ge!=null){Y(null,{sync:!0});return}v(V("filebrowser.openDirFailed"))}};U.useEffect(()=>{const ge=g!==se.current;se.current=g,!(r===te.current&&!ge)&&Y(r,{sync:!0,fallbackHome:b})},[r,g]),U.useEffect(()=>()=>{clearTimeout(B.current),clearTimeout(W.current)},[]),U.useEffect(()=>{if(!C)return;const ge=Ze=>{var je;(je=X.current)!=null&&je.contains(Ze.target)||y(!1)};return document.addEventListener("pointerdown",ge,!0),()=>document.removeEventListener("pointerdown",ge,!0)},[C]);const ve=ge=>{p(ge),clearTimeout(W.current),W.current=setTimeout(()=>p(""),2500)},he=ge=>{const Ze=f==null?void 0:f.home;if(!Ze){h(ge);return}const je=(f==null?void 0:f.roots)||[Ze];let Pe=ge;(Pe==="~"||Pe.startsWith("~/"))&&(Pe=Ze+Pe.slice(1));let be=Qh(f==null?void 0:f.path,je,Ze);Pe.startsWith("/")&&(be=Qh(Pe,je,Ze),Pe=Pe===be?"":Pe.startsWith(`${be}/`)?Pe.slice(be.length+1):Pe.replace(/^\/+/,"")),h(Pe);const Ae=D4(`${be}/${l1(Pe).dir}`);Ae!==te.current&&(clearTimeout(B.current),B.current=setTimeout(()=>{Ae!==te.current&&Y(Ae,{notify:!0})},250))},Me=async ge=>{const Ze=So(f.path,ge);try{await navigator.clipboard.writeText(Ze),ve(V("filebrowser.copiedPath",{abs:Ze}))}catch{ve(Ze)}},me=ge=>d(So(f.path,ge)),ie=ge=>Y(So(f.path,ge),{sync:!0,notify:!0}),$=()=>(f==null?void 0:f.parent)&&Y(f.parent,{sync:!0,notify:!0}),_e=async()=>{const ge=O.trim();if(!(!ge||!f)){v("");try{await TA(f.path,ge),await Y(f.path,{}),F(!1),I("")}catch{v(V("filebrowser.mkdirFailed"))}}},de=async ge=>{v(""),ne({label:V("filebrowser.downloading",{name:ge}),pct:0});try{await HA(So(f.path,ge),Ze=>ne({label:V("filebrowser.downloading",{name:ge}),pct:Ze})),k(ge)}catch{v(V("filebrowser.downloadFailed"))}finally{ne(null)}},Ie=()=>{const ge=j;M(null),ge&&de(ge)},Ue=f==null?void 0:f.home,tt=(f==null?void 0:f.roots)||(Ue?[Ue]:[]),Qe=Qh(f==null?void 0:f.path,tt,Ue),st=ge=>ge===Ue?"~":/\/tmp$/.test(ge)?"tmp":ge.includes("/var/folders/")?"TMPDIR":ge.split("/").filter(Boolean).pop()||"/",Nt=ge=>{y(!1),ge!==Qe&&Y(ge,{sync:!0,notify:!0})},J=(ge,Ze)=>!ge||!Ze||ge===Ze?!1:(ge.startsWith(`${Ze}/`)?ge.slice(Ze.length+1):ge).split("/").some(Pe=>Pe.startsWith(".")),bt=!!f&&f.path!==Ue&&!J(f.path,Qe),Gt=async ge=>{const{allowed:Ze,rejected:je}=LS(ge);if(!Ze.length)return je.length&&v(V("filebrowser.uploadRejected",{names:je.join("、")})),je;L(!0),v("");const Pe=Ze.length,be=[],Ae=new AbortController;AS(Ae,V("filebrowser.uploading",{name:Ze[0].name,tag:Pe>1?`(1/${Pe})`:""}));try{for(let He=0;He<Pe&&!Ae.signal.aborted;He++){const wt=Ze[He],kt=Pe>1?`(${He+1}/${Pe})`:"";mm({label:V("filebrowser.uploading",{name:wt.name,tag:kt}),phase:"sending",pct:0});try{await nS(f.path,wt,(Ot,Pt)=>mm({pct:Ot,phase:Pt}),!1,{signal:Ae.signal})}catch(Ot){if(Ot instanceof lm)break;be.push({name:wt.name,reason:(Ot==null?void 0:Ot.message)||V("filebrowser.uploadFailed")})}}}finally{s_()}return await Y(f.path,{}),L(!1),be.length?v(be.map(He=>`${He.name}:${He.reason}`).join(";")):je.length&&v(V("filebrowser.uploadRejected",{names:je.join("、")})),[...be.map(He=>He.name),...je]},Ee=async()=>{E&&(await Gt(E)).length===0&&(R==null||R())},Te=ge=>{if(b||ge.key!=="Enter")return;const Ze=x.trim();Ze&&j4.test(Ze)&&(f!=null&&f.home)&&d(So(f.home,Ze))},Ge=l1(x).frag.toLowerCase(),re=((f==null?void 0:f.entries)||[]).filter(ge=>(!b||ge.type==="dir")&&(!Ge||ge.name.toLowerCase().includes(Ge))),We=re.length>o1?re.slice(0,o1):re,Ye=re.length-We.length;return o.jsxDEV("div",{className:"browse-view",children:[o.jsxDEV("div",{className:"browse-bar",children:[_&&o.jsxDEV("button",{className:"browse-cwd","aria-label":V("filebrowser.sessionDir"),title:V("filebrowser.jumpToSessionDir"),onClick:_,children:o.jsxDEV(JA,{},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":V("filebrowser.parentDir"),disabled:!(f!=null&&f.parent),onClick:$,children:o.jsxDEV(w_,{},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:[tt.length>1?o.jsxDEV("div",{className:"dd browse-root-dd",ref:X,children:[o.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":C,"aria-label":V("filebrowser.rootSelect"),onClick:()=>y(ge=>!ge),children:[o.jsxDEV("span",{children:[st(Qe),"/"]},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:tt.map(ge=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":ge===Qe,title:ge,className:`dd-option${ge===Qe?" is-selected":""}`,onClick:()=>Nt(ge),children:[o.jsxDEV("span",{className:"dd-option-label",children:[st(ge),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:23},this),ge===Qe&&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)]},ge,!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:x,placeholder:V("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ge=>he(ge.target.value),onKeyDown:Te},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":V("filebrowser.newFolder"),title:V("filebrowser.newFolder"),disabled:!f,onClick:()=>{F(ge=>!ge),I("")},children:o.jsxDEV(KA,{},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":V("filebrowser.uploadFile"),title:V(bt?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!bt||D,onClick:()=>{var ge;return(ge=ee.current)==null?void 0:ge.click()},children:o.jsxDEV(sS,{},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:ee,className:"browse-file-input",type:"file",multiple:!0,accept:D_,onChange:ge=>{Gt(Array.from(ge.target.files||[])),ge.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),A&&o.jsxDEV("div",{className:"browse-newfolder",children:[o.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:O,placeholder:V("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ge=>I(ge.target.value),onKeyDown:ge=>{ge.key==="Enter"&&_e()}},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:_e,children:V("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":V("common.cancel"),onClick:()=>{F(!1),I("")},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&&E&&o.jsxDEV("div",{className:"browse-pending",children:[o.jsxDEV("span",{className:"browse-pending-text",children:[V("filebrowser.uploadPendingTo",{name:E.name}),!bt&&o.jsxDEV("em",{className:"browse-pending-hint",children:V("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:!bt||D,onClick:Ee,children:V("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),l&&o.jsxDEV("div",{className:"bind-error browse-err",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:369,columnNumber:15},this),m&&o.jsxDEV("div",{className:"browse-notice",children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:370,columnNumber:18},this),!b&&N&&o.jsxDEV("div",{className:"browse-saved",children:[o.jsxDEV("span",{className:"browse-saved-text",children:V("filebrowser.savedToDownloads",{name:N})},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":V("common.close"),onClick:()=>k(""),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&&G&&o.jsxDEV("div",{className:"browse-progress",children:[o.jsxDEV("span",{className:"browse-progress-label",children:[G.label," ",Math.round(G.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(G.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:[We.length===0&&!l&&o.jsxDEV("div",{className:"browse-empty",children:V("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:386,columnNumber:42},this),We.map(ge=>o.jsxDEV("div",{className:"browse-entry-row",children:[o.jsxDEV("button",{className:"browse-entry",onClick:()=>ge.type==="dir"?ie(ge.name):ge.type==="doc"||ge.type==="image"?me(ge.name):ve(V("filebrowser.previewUnsupported")),children:[o.jsxDEV("span",{className:"browse-entry-icon",children:ge.type==="dir"?o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:71},this):ge.type==="image"?o.jsxDEV(XA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:109},this):o.jsxDEV(iS,{},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:ge.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:398,columnNumber:15},this),ge.type!=="dir"&&o.jsxDEV("span",{className:"browse-entry-size",children:k4(ge.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),ge.type!=="dir"&&o.jsxDEV("button",{className:"browse-copy","aria-label":V("filebrowser.copyAbsPath"),title:V("filebrowser.copyAbsPath"),onClick:()=>Me(ge.name),children:o.jsxDEV(aS,{},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),ge.type!=="dir"&&o.jsxDEV("button",{className:"browse-dl","aria-label":V("filebrowser.download"),onClick:()=>M(ge.name),children:o.jsxDEV(e3,{},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)]},ge.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:388,columnNumber:11},this)),Ye>0&&o.jsxDEV("div",{className:"browse-overflow",children:V("filebrowser.tooMany",{shown:We.length,total:re.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&&f&&o.jsxDEV("div",{className:"browse-pick-bar",children:o.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>u==null?void 0:u(f.path),children:V("filebrowser.pickThisDir",{path:Ag(f.path,f.home)?`~/${Ag(f.path,f.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(gm,{open:!!j,title:j?V("filebrowser.downloadConfirm",{name:j}):"",actions:[{key:"dl",label:V("filebrowser.download"),onClick:Ie}],onClose:()=>M(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 R4=()=>{};function Wu({open:r,seedCwd:s=null,hint:d=null,pane:_=null,allowMkdir:E=!1,onPick:R,onClose:b,inset:a=0}){const[u,g]=U.useState(s),x=U.useRef(!1);r&&!x.current?(x.current=!0,u!==s&&g(s)):!r&&x.current&&(x.current=!1);const h=_?async()=>{try{const{cwd:f}=await jo(_);f&&g(f)}catch{}}:null;return r?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":V("dirpicker.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("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":V("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),d&&o.jsxDEV("div",{className:"dirpick-hint",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:41,columnNumber:18},this),o.jsxDEV(nC,{path:u,onNavigate:g,onOpenDoc:R4,onJumpToCwd:h,pickMode:!0,allowMkdir:E,onPick:R},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 T4({open:r,pushKey:s,notifyOn:d,onClose:_}){const[E,R]=U.useState("");if(!r)return null;const b='handmux push "构建完成" "耗时 3m12s"',a=!!(d&&s),u=b,g=`${b} --session ${V("scriptPush.session_placeholder")}`,x=`${b} --device ${a?s:V("scriptPush.device_placeholder")}`,h=async(C,y)=>{try{await navigator.clipboard.writeText(C),R(y),setTimeout(()=>R(""),1500)}catch{}},f=C=>V(E===C?"scriptPush.copied":"common.copy"),S=(C,y,l,v)=>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:l},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),v&&o.jsxDEV("div",{className:"push-script-hint",children:v},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(l,C),children:f(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:_},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":V("scriptPush.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("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:_,"aria-label":V("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:V("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),S("all",V("scriptPush.scope_all"),u),S("session",V("scriptPush.scope_session"),g),S("device",V("scriptPush.scope_device"),x,V(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:V("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:V("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:V("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:V("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 L4({open:r,onClose:s,termRef:d,onColAdjust:_,onColRestore:E,onOpenChangelog:R,changelogUnread:b,chatTone:a="ink",onChatTone:u=()=>{},chatLensEnabled:g=!1,onChatLensEnabled:x=()=>{},hooksStatus:h=null,onEnableHooks:f=null,notifUnread:S=!1,onOpenInbox:C,updateInfo:y=null,activePreview:l=null,pane:v=null,lastPreviewDir:m=null,dynamicEnabled:p=!1,getColCount:N=null,onStartPreview:k,onStartDynamicPreview:j,onOpenPreview:M,onRenew:D,onStop:L}){var sn,Dn;const[A,F]=U.useState(null),[O,I]=U.useState(Y1()),[G,ne]=U.useState(null),[ee,te]=U.useState(!1),[se,B]=U.useState(zg()),[W,X]=U.useState(!1),[Y,ve]=U.useState(""),he=h==="absent"||h==="no-claude",[Me,me]=U.useState(!1),[ie,$]=U.useState(!1),_e=async()=>{me(!0),$(!1);try{const it=await(f==null?void 0:f());(!it||it.status!=="installed")&&$(!0)}catch{$(!0)}finally{me(!1)}},[de,Ie]=U.useState(!1),[Ue,tt]=U.useState(null),[Qe,st]=U.useState(!1),[Nt,J]=U.useState(null),[bt,Gt]=U.useState("off"),[Ee,Te]=U.useState(""),[Ge,re]=U.useState(!1),[We,Ye]=U.useState(""),[ge,Ze]=U.useState(!1),je=dS(l==null?void 0:l.expiresAt,!!l&&r);U.useEffect(()=>{re(!1),Ye("")},[l==null?void 0:l.name,r]);const Pe=it=>({"port not listening":V("settings.err_port_not_listening"),"bad port":V("settings.err_bad_port"),"dynamic disabled":V("settings.err_dynamic_disabled")})[it]||it||V("settings.err_start_failed"),be=async()=>{const it=Number(Ee);if(it){Ye(""),Ze(!0);try{await(j==null?void 0:j(it))}catch(cn){Ye(Pe(cn==null?void 0:cn.message))}finally{Ze(!1)}}},Ae=async()=>{tt(zg()?await C_():null),Ie(!0)},He=async()=>{let it=m;if(!it&&v)try{it=(await jo(v)).cwd||null}catch{}J(it),st(!0)};U.useEffect(()=>{var it,cn;r&&(F(((cn=(it=d.current)==null?void 0:it.getFontSize)==null?void 0:cn.call(it))??null),ne((N==null?void 0:N())??null))},[r,d,N]);const wt=async()=>{X(!0),ve("");try{se?(await C3(),B(!1),ve(V("settings.notify_disabled"))):(await S3(),B(!0),ve(V("settings.notify_enabled")))}catch(it){ve(it.message||V("settings.notify_failed"))}finally{X(!1)}};if(!r)return null;const kt=it=>{var $n,en,kn,On;const cn=(en=($n=d.current)==null?void 0:$n.getFontSize)==null?void 0:en.call($n),zn=(On=(kn=d.current)==null?void 0:kn.setFontSize)==null?void 0:On.call(kn,((cn==null?void 0:cn.size)??14)+it);zn!=null&&F({size:zn,auto:!1})},Ot=()=>{var it,cn;(cn=(it=d.current)==null?void 0:it.autoFont)==null||cn.call(it),F({size:null,auto:!0})},Pt=it=>{var cn,zn;I(it),qM(it),(zn=(cn=d.current)==null?void 0:cn.setDocHighlight)==null||zn.call(cn,it)},dn=A!=null&&A.auto?V("settings.font_auto"):A!=null&&A.size?`${A.size}px`:"—",Qt=G!=null?`${G} 列`:"—",Mt=it=>{_==null||_(it),ne((N==null?void 0:N())??null)},Ft=()=>{E==null||E(),ne(null)};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:122,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":V("settings.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("settings.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:125,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:124,columnNumber:9},this),o.jsxDEV("div",{className:"settings-body",children:[o.jsxDEV("div",{className:"settings-group",children:V("settings.group_global")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:130,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:133,columnNumber:11},this),o.jsxDEV("div",{className:"lang-drop",children:[ee&&o.jsxDEV("div",{className:"lang-drop-backdrop",onClick:()=>te(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:135,columnNumber:26},this),o.jsxDEV("button",{className:"lang-trigger",onClick:()=>te(it=>!it),children:[o.jsxDEV("span",{children:(sn=W0.find(it=>it.code===Il()))==null?void 0:sn.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:137,columnNumber:15},this),o.jsxDEV("span",{className:"lang-chevron",children:ee?"▴":"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:138,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:136,columnNumber:13},this),ee&&o.jsxDEV("div",{className:"lang-menu",children:W0.map(it=>o.jsxDEV("button",{className:`lang-option${it.code===Il()?" active":""}`,onClick:()=>xM(it.code),children:it.label},it.code,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:143,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:141,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:134,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:132,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.font_size")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:152,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>kt(-1),"aria-label":V("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:154,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:dn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:155,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>kt(1),"aria-label":V("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:156,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:Ot,title:V("settings.font_auto_title"),children:V("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:157,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:153,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:151,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:V("settings.chat_lens")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:167,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:g,disabled:he&&!g,onChange:it=>x(it.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:169,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:172,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:173,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:168,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:166,columnNumber:11},this),he?o.jsxDEV("div",{className:"settings-hint",children:[V(h==="no-claude"?"settings.chat_lens_no_claude":"settings.chat_lens_need_hooks"),h==="absent"&&o.jsxDEV("button",{type:"button",className:"fontbtn settings-hint-btn",disabled:Me,onClick:_e,children:V(Me?"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:180,columnNumber:17},this),ie&&o.jsxDEV("div",{className:"settings-hint settings-hint-err",children:V("settings.chat_lens_hooks_err")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:185,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:177,columnNumber:13},this):o.jsxDEV("div",{className:"settings-hint",children:V("settings.chat_lens_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:188,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:161,columnNumber:9},this),g&&o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.chat_tone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:195,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:["dusk","ink","light"].map(it=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===it,onClick:()=>u(it),children:V(`settings.chat_tone_${it}`)},it,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:198,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:196,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.chat_tone_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:208,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:194,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:V("settings.path_highlight")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:214,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:O,onChange:it=>Pt(it.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:216,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:217,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:218,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:215,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:213,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.path_highlight_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:221,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:212,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.version")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:225,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("span",{className:"settings-value",children:y!=null&&y.current?`v${y.current}`:"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:227,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:R,children:[V("settings.view_changelog"),b&&o.jsxDEV("span",{className:"settings-dot","aria-label":V("settings.has_update")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:229,columnNumber:65},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:228,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:226,columnNumber:11},this),(y==null?void 0:y.updateAvailable)&&o.jsxDEV("div",{className:"settings-update",children:[o.jsxDEV("div",{className:"settings-update-title",children:V("settings.update_available",{v:y.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:238,columnNumber:15},this),((Dn=y.whatsNew)==null?void 0:Dn.length)>0&&o.jsxDEV("ul",{className:"settings-update-new",children:y.whatsNew.map(it=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",it.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:243,columnNumber:23},this),(Il().startsWith("zh")?it.zh:it.en)||it.en]},it.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:242,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:240,columnNumber:17},this),o.jsxDEV("div",{className:"settings-update-how",children:[V("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:249,columnNumber:79},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:249,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:237,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:224,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:259,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:V("settings.feedback_issues")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:261,columnNumber:13},this),Il().startsWith("zh")&&o.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://handmux.com/#community",target:"_blank",rel:"noreferrer",children:V("settings.feedback_group")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:263,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:260,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:266,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:258,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.push_notifications")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:270,columnNumber:11},this),$l()?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:wt,disabled:W,"aria-pressed":se,children:V(se?"settings.notify_on":"settings.notify_enable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:274,columnNumber:17},this),W&&o.jsxDEV("span",{className:"spinner",role:"status","aria-label":V("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:277,columnNumber:32},this),!W&&Y&&o.jsxDEV("span",{className:"settings-note",children:Y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:278,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:273,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:280,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:272,columnNumber:13},this):o.jsxDEV("div",{className:"settings-value",style:{display:"block"},children:V("settings.push_unsupported")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:283,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:269,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.script_push")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:288,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:Ae,disabled:!$l(),children:V("settings.script_push_open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:290,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn push-inbox-entry",onClick:C,children:[V("pushInbox.title"),S&&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:293,columnNumber:31},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:291,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:289,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.script_push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:296,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:287,columnNumber:9},this),o.jsxDEV("div",{className:"settings-group",children:V("settings.group_session")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:299,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.screen_cols")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:302,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns cols-btns",children:[o.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>Mt(-10),children:"−10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:304,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>Mt(-1),children:"−1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:305,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:Qt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:306,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>Mt(1),children:"+1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:307,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>Mt(10),children:"+10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:308,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:Ft,children:["↺ ",V("settings.cols_restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:309,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:303,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:301,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V(p?"settings.preview_site":"settings.preview_static_site")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:314,columnNumber:11},this),l?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:318,columnNumber:51},this),l.kind==="dynamic"?V("settings.preview_running_dynamic"):V("settings.preview_running_static")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:318,columnNumber:17},this),o.jsxDEV("span",{className:"preview-remain-s",title:V("settings.preview_remain_title"),children:V("settings.preview_remain",{time:uS(je)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:319,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:317,columnNumber:15},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>{M==null||M(),s==null||s()},children:V("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:322,columnNumber:17},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>D==null?void 0:D(),children:V("settings.preview_renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:323,columnNumber:17},this),Ge?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"fontbtn preview-confirm-danger",onClick:()=>{re(!1),L==null||L()},children:V("settings.preview_confirm_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:326,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>re(!1),children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:327,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:325,columnNumber:19},this):o.jsxDEV("button",{className:"fontbtn",onClick:()=>re(!0),children:V("settings.preview_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:330,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:321,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:[V("settings.preview_name",{name:l.name}),l.kind==="dynamic"?V("settings.preview_port",{port:l.port}):l.dir?`(${l.dir})`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:333,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:316,columnNumber:13},this):o.jsxDEV("div",{className:"preview-start",children:[o.jsxDEV("div",{className:"preview-seg",role:"tablist","aria-label":V("settings.preview_type"),children:[o.jsxDEV("button",{role:"tab",className:bt==="off"?"on":"","aria-selected":bt==="off",onClick:()=>Gt("off"),children:V("settings.preview_off")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:342,columnNumber:17},this),o.jsxDEV("button",{role:"tab",className:bt==="static"?"on":"","aria-selected":bt==="static",onClick:()=>Gt("static"),children:V("settings.preview_static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:343,columnNumber:17},this),p&&o.jsxDEV("button",{role:"tab",className:bt==="dynamic"?"on":"","aria-selected":bt==="dynamic",onClick:()=>{Ye(""),Gt("dynamic")},children:V("settings.preview_dynamic")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:345,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:341,columnNumber:15},this),bt==="off"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-hint",children:V(p?"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:350,columnNumber:19},this),!p&&o.jsxDEV("div",{className:"settings-hint preview-dynamic-disabled",children:V("settings.preview_dynamic_disabled")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:352,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:349,columnNumber:17},this),bt==="static"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:o.jsxDEV("button",{className:"fontbtn",onClick:He,children:V("settings.preview_pick_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:359,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:358,columnNumber:19},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.preview_static_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:361,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:357,columnNumber:17},this),bt==="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:V("settings.preview_port_placeholder"),value:Ee,onChange:it=>{Te(it.target.value),Ye("")},"aria-label":V("settings.preview_port_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:367,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",disabled:!Ee||ge,onClick:be,children:V(ge?"settings.preview_starting":"settings.preview_start")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:369,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:366,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:372,columnNumber:23},this):o.jsxDEV("div",{className:"settings-hint",children:V("settings.preview_dynamic_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:373,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:365,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:340,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:313,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:129,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:123,columnNumber:7},this),o.jsxDEV(Wu,{open:Qe,seedCwd:Nt,pane:v,hint:V("settings.dir_picker_hint"),onPick:it=>{st(!1),k==null||k(it),s==null||s()},onClose:()=>st(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:381,columnNumber:7},this),o.jsxDEV(T4,{open:de,pushKey:Ue,notifyOn:se,onClose:()=>Ie(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:389,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:121,columnNumber:5},this)}function c1(r){return r===300?V("usage.win5h"):r===10080?V("usage.winWeekly"):r===43200?V("usage.winMonthly"):r>0?V("usage.winGeneric",{h:Math.round(r/60)}):""}function _m(r,s){if(!r)return"";const d=r-Math.floor(s/1e3);if(d<=0)return V("usage.resetSoon");const _=Math.floor(d/86400),E=Math.floor(d%86400/3600),R=Math.floor(d%3600/60),b=_>0?`${_}d ${E}h`:E>0?`${E}h ${R}m`:`${R}m`;return V("usage.resetIn",{t:b})}function iC({at:r,now:s}){if(!r)return null;const d=Math.max(0,Math.floor((s-r)/1e3)),_=d<60?V("usage.updatedNow"):d<3600?V("usage.updatedMin",{n:Math.floor(d/60)}):d<86400?V("usage.updatedHr",{n:Math.floor(d/3600)}):V("usage.updatedDay",{n:Math.floor(d/86400)});return o.jsxDEV("div",{className:"usage-updated",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function Hl(r,s,d){if(!r||!s)return null;const _=r-Math.floor(d/1e3);return Math.max(0,Math.min(100,(1-_/(s*60))*100))}function M4({pct:r,timePct:s}){const d=Math.max(0,Math.min(100,r??0)),_=d>=80?"hi":d>=50?"mid":"lo";return o.jsxDEV("div",{className:"usage-bar",children:[o.jsxDEV("div",{className:`usage-bar-fill lvl-${_}`,style:{width:`${d}%`}},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:V("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 zl({label:r,pct:s,reset:d,sub:_,timePct:E}){return o.jsxDEV("div",{className:"usage-row",children:[o.jsxDEV("div",{className:"usage-row-head",children:[o.jsxDEV("span",{className:"usage-row-label",children:[r,_&&o.jsxDEV("span",{className:"usage-row-sub",children:[" · ",_]},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(M4,{pct:s,timePct:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),d&&o.jsxDEV("div",{className:"usage-row-reset",children:d},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 A4({claude:r,now:s}){var d,_;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(Do,{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(iC,{at:r==null?void 0:r.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),r?!((d=r.rateLimits)!=null&&d.fiveHour)&&!((_=r.rateLimits)!=null&&_.sevenDay)?o.jsxDEV("div",{className:"usage-empty",children:V("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:[r.rateLimits.fiveHour&&o.jsxDEV(zl,{label:V("usage.win5h"),pct:r.rateLimits.fiveHour.usedPercent,reset:_m(r.rateLimits.fiveHour.resetsAt,s),timePct:Hl(r.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),r.rateLimits.sevenDay&&o.jsxDEV(zl,{label:V("usage.winWeekly"),pct:r.rateLimits.sevenDay.usedPercent,reset:_m(r.rateLimits.sevenDay.resetsAt,s),timePct:Hl(r.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),r.rateLimits.sevenDayOpus&&o.jsxDEV(zl,{label:V("usage.winWeekly"),sub:"Opus",pct:r.rateLimits.sevenDayOpus.usedPercent,timePct:Hl(r.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),r.rateLimits.sevenDaySonnet&&o.jsxDEV(zl,{label:V("usage.winWeekly"),sub:"Sonnet",pct:r.rateLimits.sevenDaySonnet.usedPercent,timePct:Hl(r.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:V("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 U4({codex:r,now:s}){const d=r==null?void 0:r.rateLimits;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(Do,{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(iC,{at:r==null?void 0:r.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),r?o.jsxDEV(o.Fragment,{children:[(d==null?void 0:d.primary)&&o.jsxDEV(zl,{label:c1(d.primary.windowMinutes)||V("usage.winPrimary"),pct:d.primary.usedPercent,reset:_m(d.primary.resetsAt,s),timePct:Hl(d.primary.resetsAt,d.primary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:120,columnNumber:13},this),(d==null?void 0:d.secondary)&&o.jsxDEV(zl,{label:c1(d.secondary.windowMinutes)||V("usage.winSecondary"),pct:d.secondary.usedPercent,reset:_m(d.secondary.resetsAt,s),timePct:Hl(d.secondary.resetsAt,d.secondary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:125,columnNumber:13},this),!(d!=null&&d.primary)&&!(d!=null&&d.secondary)&&o.jsxDEV("div",{className:"usage-empty",children:V("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:V("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 O4({open:r,onClose:s,onAuthFail:d}){const[_,E]=U.useState(null),[R,b]=U.useState(""),[a,u]=U.useState(!1),g=Date.now();return U.useEffect(()=>{if(!r)return;let x=!1;return u(!0),b(""),pA().then(h=>{x||(E(h),u(!1))}).catch(h=>{x||(h instanceof tr?d==null||d():b(V("usage.loadFailed")),u(!1))}),()=>{x=!0}},[r]),r?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":V("usage.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("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:V("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":V("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&&!_?o.jsxDEV("div",{className:"usage-empty",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):R?o.jsxDEV("div",{className:"bind-error",children:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):_?o.jsxDEV(o.Fragment,{children:[_.codex&&o.jsxDEV(U4,{codex:_.codex,now:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:30},this),o.jsxDEV(A4,{claude:_.claude,now:g},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 V4({rows:r,top:s,open:d,onToggle:_,onClose:E,onSelectRow:R,onMarkAllRead:b,hooksStatus:a,onEnableHooks:u}){const g=[];for(const p of r){const N=g[g.length-1];N&&N.session===p.session?N.items.push(p):g.push({session:p.session,items:[p]})}const x=Date.now(),h=r.some(p=>p.view==="done"),f=y3(r),[S,C]=U.useState(!1),[y,l]=U.useState(!1),v=g.length===0&&a==="absent",m=async()=>{C(!0),l(!1);try{const p=await(u==null?void 0:u());(!p||p.status!=="installed")&&l(!0)}catch{l(!0)}finally{C(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:_,"aria-label":V("inbox.title"),title:V("inbox.title"),children:[o.jsxDEV(QA,{},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),d&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"inbox-backdrop",onClick:E},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":V("inbox.title"),children:[o.jsxDEV("div",{className:"inbox-head",children:[o.jsxDEV("span",{children:V("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:[V("inbox.working")," ",f.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:[V("inbox.done")," ",f.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:[V("inbox.needs")," ",f.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:V("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),g.length===0?v?o.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[o.jsxDEV("div",{className:"inbox-enable-title",children:V("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:V("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:m,disabled:S,children:V(S?"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:V("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:V("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):g.map(p=>o.jsxDEV("div",{className:"inbox-group",children:[o.jsxDEV("div",{className:"inbox-group-title",children:p.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),p.items.map(N=>o.jsxDEV("button",{className:"inbox-row",onClick:()=>R(N),children:[o.jsxDEV("div",{className:"inbox-row-head",children:[o.jsxDEV("span",{className:`inbox-chip ${N.view}`,children:_3[N.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),o.jsxDEV(Do,{agent:N.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:N.windowName||N.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:hS(N.ts,x)},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),N.msg&&o.jsxDEV("div",{className:"inbox-msg",children:N.msg},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:77,columnNumber:31},this)]},N.pane,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:70,columnNumber:19},this))]},p.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 P4({open:r,orphan:s,onConfirm:d,onClose:_,inset:E=0}){var p;const[R,b]=U.useState([]),[a,u]=U.useState("new"),[g,x]=U.useState(""),[h,f]=U.useState(!0),[S,C]=U.useState(!1),[y,l]=U.useState("");if(U.useEffect(()=>{r&&(u("new"),x((s==null?void 0:s.suggestedName)||""),f(WM()),C(!1),l(""),Fl().then(N=>b(Array.isArray(N)?N:[])).catch(()=>b([])))},[r,s]),!r||!s)return null;const v=a==="new"?g.trim()||s.suggestedName||"":((p=R.find(N=>N.id===a))==null?void 0:p.name)||"",m=async()=>{if(S)return;C(!0),l(""),GM(h);const N=a==="new"?{mode:"new"}:{mode:"window",session:a};try{await d({target:N,kill:h,name:a==="new"?g.trim():void 0})}catch{C(!1),l(V("inbox.orphans.failed"))}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:_},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% + ${E/2}px))`},role:"dialog","aria-label":V("inbox.orphans.takeover"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("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:_,"aria-label":V("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:V("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:()=>u("new"),children:V("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),R.map(N=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===N.id,onClick:()=>u(N.id),children:N.name},N.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:V("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:g,placeholder:V("bind.invalidName"),onChange:N=>{x(N.target.value),l("")}},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:V("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:()=>f(!0),children:[V("inbox.orphans.killEnd"),o.jsxDEV("span",{className:"orphan-reco",children:V("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:()=>f(!1),children:V("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:V("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:[V("inbox.orphans.reopenPre")," ",o.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",v||V("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:_,children:V("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:m,disabled:S,children:V(S?"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 u1="tw_a2hs_dismissed",Hu=()=>typeof navigator<"u"&&navigator.userAgent||"",tm=()=>/iP(hone|ad|od)/.test(Hu())||/Macintosh/.test(Hu())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,B4=()=>/Android/.test(Hu()),I4=()=>tm()&&/Safari/.test(Hu())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(Hu());function F4(){const[r,s]=U.useState(!1),[d,_]=U.useState(null);if(U.useEffect(()=>{if(pS()||!tm()&&!B4())return;try{if(localStorage.getItem(u1)==="1")return}catch{}const g=x=>{x.preventDefault(),_(x)};return window.addEventListener("beforeinstallprompt",g),s(!0),()=>window.removeEventListener("beforeinstallprompt",g)},[]),!r)return null;const E=()=>{try{localStorage.setItem(u1,"1")}catch{}s(!1)},R=async()=>{if(d){d.prompt();try{await d.userChoice}catch{}E()}};let b,a,u=null;return d?(b="install",a=V("a2hs.lead"),u=o.jsxDEV("button",{className:"a2hs-banner-cta",onClick:R,children:V("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):tm()&&!I4()?(b="ios-other",a=V("a2hs.iosOpenSafari")):tm()?(b="ios",a=V("a2hs.iosHint")):(b="android",a=V("a2hs.androidManual")),o.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":V("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:V("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),u,o.jsxDEV("button",{className:"a2hs-banner-x",onClick:E,"aria-label":V("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 h_="tw_claude_hooks";function H4(){try{return localStorage.getItem(h_)||null}catch{return null}}function z4(){const[r,s]=U.useState(H4);U.useEffect(()=>{let _=!0;return Promise.resolve().then(tS).then(E=>{if(!_)return;const R=(E==null?void 0:E.claudeHooks)||"installed";s(R);try{localStorage.setItem(h_,R)}catch{}}).catch(()=>{}),()=>{_=!1}},[]);const d=U.useCallback(async()=>{const _=await AA();if(_!=null&&_.status){s(_.status);try{localStorage.setItem(h_,_.status)}catch{}}return _},[]);return{status:r,enable:d}}function $4({value:r,options:s,onChange:d,ariaLabel:_}){const[E,R]=U.useState(!1),b=U.useRef(null),a=s.find(u=>u.value===r)||s[0];return U.useEffect(()=>{if(!E)return;const u=g=>{var x;(x=b.current)!=null&&x.contains(g.target)||R(!1)};return document.addEventListener("pointerdown",u,!0),()=>document.removeEventListener("pointerdown",u,!0)},[E]),o.jsxDEV("div",{className:"dd",ref:b,children:[o.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":E,"aria-label":_,onClick:()=>R(u=>!u),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${E?" 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),E&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:s.map(u=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":u.value===r,className:`dd-option${u.value===r?" is-selected":""}`,onClick:()=>{d==null||d(u.value),R(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:u.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:44,columnNumber:15},this),u.value===r&&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)]},u.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 rC=[{value:"",label:V("startup.preset_shell")},{value:"claude",label:V("startup.preset_claude")},{value:"claude --continue",label:V("startup.preset_claude_continue")},{value:"codex",label:V("startup.preset_codex")}],nm="__custom__",W4=[...rC,{value:nm,label:V("startup.custom")}];function sC({value:r="",onChange:s}){const d=rC.some(g=>g.value===r),[_,E]=U.useState(d?r:nm),[R,b]=U.useState(d?"":r),a=g=>{E(g),s==null||s(g===nm?R:g)},u=g=>{const x=g.target.value;b(x),s==null||s(x)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-label",children:V("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),o.jsxDEV($4,{value:_,options:W4,onChange:a,ariaLabel:V("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),_===nm&&o.jsxDEV("input",{className:"bind-input startup-custom",value:R,placeholder:V("startup.custom_placeholder"),onChange:u,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 G4=/^[A-Za-z0-9-]{1,16}$/;function q4({open:r,onClose:s,onBound:d,bound:_,onAuthFail:E,inset:R=0}){const[b,a]=U.useState([]),[u,g]=U.useState("new"),[x,h]=U.useState(null),[f,S]=U.useState(""),[C,y]=U.useState(""),[l,v]=U.useState(!1),[m,p]=U.useState(null),[N,k]=U.useState($1()),[j,M]=U.useState(!1),D=U.useRef(null);if(U.useEffect(()=>{r&&(S(""),y(""),v(!1),p(null),M(!1),g("new"),h("new"),Fl().then(O=>{const I=Array.isArray(O)?O:[];a(I),I.some(G=>!_.includes(G.name))&&(g("existing"),h(null))}).catch(O=>{O instanceof tr?E==null||E():y(V("bind.checkFailed"))}))},[r]),U.useEffect(()=>{x==="new"&&setTimeout(()=>{var O;return(O=D.current)==null?void 0:O.focus()},0)},[x]),!r)return null;const L=b.filter(O=>!_.includes(O.name)),A=async()=>{if(l||!x)return;if(x!=="new"){d(x);return}const O=f.trim();if(O){if(_.includes(O)||b.some(I=>I.name===O)){y(V("bind.alreadyExists"));return}if(!G4.test(O)){y(V("bind.invalidName"));return}v(!0),y(""),W1(N);try{await SA(O,m||void 0,N||void 0),d(O)}catch(I){I instanceof tr?E==null||E():y(V("bind.createFailed")),v(!1)}}},F=V(x==="new"?l?"bind.creating":"bind.createAndOpen":l?"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% + ${R/2}px))`},role:"dialog","aria-label":V("bind.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("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":V("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":V("bind.pickSession"),children:[o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":u==="new",onClick:()=>{g("new"),h("new"),y("")},children:V("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":u==="existing",disabled:!L.length,onClick:()=>{g("existing"),h(null),y("")},children:V("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),u==="existing"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("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(O=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":x===O.name,onClick:()=>{h(O.name),y("")},children:O.name},O.id||O.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),u==="new"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("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:D,className:"bind-input",value:f,placeholder:V("bind.invalidName"),onChange:O=>{S(O.target.value),y("")},onKeyDown:O=>{O.key==="Enter"&&A()}},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:V("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:()=>M(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:m||V("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:V("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),m&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>p(null),children:V("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:N,onChange:k},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:V("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:V("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:A,disabled:l||!x,children:F},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(Wu,{open:j,seedCwd:m,allowMkdir:!0,onPick:O=>{p(O),M(!1)},onClose:()=>M(!1),inset:R},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 Y4=/^[A-Za-z0-9-]{1,16}$/;function K4({open:r,onClose:s,onCreate:d,paneId:_,inset:E=0}){const[R,b]=U.useState(""),[a,u]=U.useState(""),[g,x]=U.useState(!1),[h,f]=U.useState(null),[S,C]=U.useState(""),[y,l]=U.useState($1()),[v,m]=U.useState(!1),p=U.useRef(null);if(U.useEffect(()=>{r&&(b(""),u(""),x(!1),f(null),C(""),m(!1),setTimeout(()=>{var k;return(k=p.current)==null?void 0:k.focus()},0),_&&jo(_).then(({cwd:k})=>C(k||"")).catch(()=>{}))},[r,_]),!r)return null;const N=async()=>{if(g)return;const k=R.trim();if(k&&!Y4.test(k)){u(V("newwindow.name_rule"));return}x(!0),u(""),W1(y);try{await d(k,h||void 0,y||void 0)}catch{x(!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% + ${E/2}px))`},role:"dialog","aria-label":V("newwindow.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("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":V("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:V("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:p,className:"bind-input",value:R,placeholder:V("newwindow.name_placeholder"),onChange:k=>{b(k.target.value),u("")},onKeyDown:k=>{k.key==="Enter"&&N()}},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:V("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:()=>m(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:h||(S?V("newwindow.session_dir_named",{dir:S}):V("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:V("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:()=>f(null),children:V("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:l},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:V("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:N,disabled:g,children:V(g?"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(Wu,{open:v,seedCwd:h||S||null,pane:_,allowMkdir:!0,onPick:k=>{f(k),m(!1)},onClose:()=>m(!1),inset:E},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 X4=/^[A-Za-z0-9-]{1,16}$/;function J4({open:r,title:s,currentName:d="",onClose:_,onSubmit:E,inset:R=0}){const[b,a]=U.useState(d),[u,g]=U.useState(""),[x,h]=U.useState(!1),f=U.useRef(null);if(U.useEffect(()=>{r&&(a(d),g(""),h(!1),setTimeout(()=>{var C;return(C=f.current)==null?void 0:C.focus()},0))},[r,d]),!r)return null;const S=async()=>{if(x)return;const C=b.trim();if(!X4.test(C)){g(V("rename.name_rule"));return}h(!0),g("");try{await E(C)}catch(y){g((y==null?void 0:y.message)||V("rename.failed")),h(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:_},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% + ${R/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:_,"aria-label":V("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:V("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:f,className:"bind-input",value:b,placeholder:V("rename.name_rule"),onChange:C=>{a(C.target.value),g("")},onKeyDown:C=>{C.key==="Enter"&&S()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:48,columnNumber:11},this),u&&o.jsxDEV("div",{className:"bind-error",children:u},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:_,children:V("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:S,disabled:x,children:V(x?"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 Z4({onOpenDoc:r,refreshKey:s=0}){const[d,_]=U.useState(()=>Mu()),E=b=>{JM(b),_(Mu())},R=U.useRef(!0);return U.useEffect(()=>{if(R.current){R.current=!1;return}_(Mu())},[s]),d.length===0?o.jsxDEV("div",{className:"home-view",children:o.jsxDEV("div",{className:"home-empty",children:[V("home.empty"),o.jsxDEV("span",{children:V("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:d.map(b=>o.jsxDEV("div",{className:"home-recent-row",children:[o.jsxDEV("button",{className:"home-recent",onClick:()=>r(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":V("home.remove"),onClick:()=>E(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 Q4=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,eV=/[。!?…]$|[.!?]$/;function tV(r,s){for(let d=r.parentNode;d&&d!==s;d=d.parentNode){const _=d.nodeName;if(_==="PRE"||_==="SCRIPT"||_==="STYLE"||_==="CODE")return!0}return!1}function nV(r){if(!r)return[];if(r.querySelector("span.tts-sent"))return iV(r);const s=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.nodeValue&&a.nodeValue.trim()&&!tV(a,r)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),d=[];for(;s.nextNode();)d.push(s.currentNode);const _=[],E=[];let R=0;for(const a of d){const u=a.ownerDocument.createDocumentFragment();for(const g of a.nodeValue.matchAll(Q4)){const x=g[0];if(x==="")continue;const h=a.ownerDocument.createElement("span");h.className="tts-sent",h.textContent=x,u.appendChild(h),(E[R]||(E[R]=[])).push(h),_[R]=(_[R]||"")+x,eV.test(x)&&R++}a.parentNode.replaceChild(u,a)}const b=[];return _.forEach((a,u)=>{const g=(a||"").replace(/\s+/g," ").trim();if(!g)return;const x=b.length;b.push(g);for(const h of E[u]||[])h.dataset.tts=String(x)}),b}function iV(r){const s=[];return r.querySelectorAll("span.tts-sent[data-tts]").forEach(d=>{const _=Number(d.dataset.tts);s[_]=(s[_]||"")+d.textContent}),s.map(d=>(d||"").replace(/\s+/g," ").trim())}const aC="tw_doc_rate",im=[1,1.25,1.5],d1=()=>{const r=Number(localStorage.getItem(aC));return im.includes(r)?r:1};function rV(){const r=typeof window<"u"&&window.speechSynthesis||null,[s,d]=U.useState({playing:!1,paused:!1,idx:-1}),[_,E]=U.useState(d1),R=U.useRef({sentences:[],idx:-1,playing:!1,rate:d1()});R.current.rate=_;const b=()=>((r==null?void 0:r.getVoices())||[]).find(S=>/^zh/i.test(S.lang))||null,a=S=>{const C=R.current;if(!r)return;if(S<0||S>=C.sentences.length){u();return}C.idx=S,d({playing:!0,paused:!1,idx:S});const y=new SpeechSynthesisUtterance(C.sentences[S]);y.rate=C.rate;const l=b();l?(y.voice=l,y.lang=l.lang):y.lang="zh-CN";const v=()=>{C.playing&&C.idx===S&&a(S+1)};y.onend=v,y.onerror=v,r.speak(y)},u=()=>{const S=R.current;S.playing=!1,S.idx=-1,r&&r.cancel(),d({playing:!1,paused:!1,idx:-1})},g=S=>{if(!r||!S||!S.length)return;r.cancel();const C=R.current;if(C.sentences=S,C.playing=!0,C.idx=-1,d({playing:!0,paused:!1,idx:-1}),r.getVoices().length){a(0);return}const y=()=>{r.removeEventListener("voiceschanged",y),C.playing&&C.idx===-1&&a(0)};r.addEventListener("voiceschanged",y),setTimeout(y,300)},x=()=>{r&&R.current.playing&&(r.pause(),d(S=>({...S,paused:!0})))},h=()=>{r&&R.current.playing&&(r.resume(),d(S=>({...S,paused:!1})))},f=()=>{const S=im[(im.indexOf(_)+1)%im.length]||1;localStorage.setItem(aC,String(S)),R.current.rate=S,E(S);const C=R.current;r&&C.playing&&C.idx>=0&&(r.cancel(),a(C.idx))};return U.useEffect(()=>()=>{R.current.playing=!1,r&&r.cancel()},[r]),{supported:!!r,playing:s.playing,paused:s.paused,idx:s.idx,rate:_,play:g,pause:x,resume:h,stop:u,cycleRate:f}}const h1=6,sV=500,m1=10,aV=300,f1=(r,s)=>Math.hypot(r.x-s.x,r.y-s.y);function oV({url:r,name:s}){const[d,_]=U.useState({s:1,x:0,y:0}),[E,R]=U.useState(""),[b,a]=U.useState(!1),u=U.useRef(d);u.current=d;const g=U.useRef(null),x=U.useRef(null),h=U.useRef(null),f=U.useRef(new Map),S=U.useRef(null),C=U.useRef(null),y=U.useRef(null),l=U.useRef({moved:!1,lpFired:!1,pinched:!1}),v=U.useRef(0);if(!r)return o.jsxDEV("div",{className:"doc-image-msg",children:V("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:39,columnNumber:20},this);const m=(O,I,G)=>{const ne=x.current,ee=h.current;if(!ne||!ee)return{x:I,y:G};const te=Math.max(0,(ee.offsetWidth*O-ne.clientWidth)/2),se=Math.max(0,(ee.offsetHeight*O-ne.clientHeight)/2);return{x:Math.min(te,Math.max(-te,I)),y:Math.min(se,Math.max(-se,G))}},p=(O,I,G)=>{if(O=Math.min(h1,Math.max(1,O)),O<=1){_({s:1,x:0,y:0});return}const ne=m(O,I,G);_({s:O,x:ne.x,y:ne.y})},N=O=>p(u.current.s*O,u.current.x,u.current.y),k=()=>{y.current&&(clearTimeout(y.current),y.current=null)},j=O=>{R(O),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>R(""),2500)},M=()=>{a(!1);const O=document.createElement("a");O.href=r,O.download=s||"image",document.body.appendChild(O),O.click(),O.remove(),j(V("imageviewer.saved"))},D=async()=>{var O;a(!1);try{const I=await(await fetch(r)).blob(),G=new File([I],s||"image",{type:wm(s)||I.type||"application/octet-stream"});if((O=navigator.canShare)!=null&&O.call(navigator,{files:[G]})){await navigator.share({files:[G]});return}}catch{return}j(V("imageviewer.shareUnsupported"))},L=O=>{var G,ne;(ne=(G=O.currentTarget).setPointerCapture)==null||ne.call(G,O.pointerId),f.current.set(O.pointerId,{x:O.clientX,y:O.clientY});const I=f.current.size;if(I===2){k(),l.current.pinched=!0;const[ee,te]=[...f.current.values()];S.current={dist:f1(ee,te)||1,s:u.current.s}}else I===1&&(l.current.moved=!1,l.current.lpFired=!1,l.current.pinched=!1,C.current={x:O.clientX,y:O.clientY},k(),y.current=setTimeout(()=>{y.current=null,f.current.size===1&&!l.current.moved&&(l.current.lpFired=!0,a(!0))},sV))},A=O=>{if(f.current.has(O.pointerId)){if(f.current.set(O.pointerId,{x:O.clientX,y:O.clientY}),f.current.size>=2&&S.current){const[I,G]=[...f.current.values()];p(S.current.s*(f1(I,G)/S.current.dist),u.current.x,u.current.y);return}if(C.current){const I=O.clientX-C.current.x,G=O.clientY-C.current.y;(Math.abs(I)>m1||Math.abs(G)>m1)&&(l.current.moved=!0,k()),u.current.s>1&&(C.current={x:O.clientX,y:O.clientY},p(u.current.s,u.current.x+I,u.current.y+G))}}},F=O=>{if(k(),f.current.delete(O.pointerId),f.current.size===1){S.current=null;const[I]=[...f.current.values()];C.current={x:I.x,y:I.y}}else if(f.current.size===0){if(!l.current.moved&&!l.current.lpFired&&!l.current.pinched){const G=O.timeStamp||0;G-v.current<aV?(v.current=0,u.current.s>1?p(1,0,0):p(2,0,0)):v.current=G}S.current=null,C.current=null,l.current={moved:!1,lpFired:!1,pinched:!1}}};return o.jsxDEV("div",{ref:x,className:"doc-image-wrap",onPointerDown:L,onPointerMove:A,onPointerUp:F,onPointerCancel:F,onContextMenu:O=>O.preventDefault(),children:[o.jsxDEV("img",{ref:h,className:"doc-image",src:r,alt:s,draggable:!1,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${d.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:O=>O.stopPropagation(),children:[o.jsxDEV("button",{onClick:()=>N(1/1.5),disabled:d.s<=1,"aria-label":V("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(d.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:()=>N(1.5),disabled:d.s>=h1,"aria-label":V("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),E&&o.jsxDEV("div",{className:"doc-image-note",role:"status",children:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:16},this),o.jsxDEV(gm,{open:b,title:s||V("imageviewer.imageTitle"),actions:[{key:"save",label:V("imageviewer.saveImage"),onClick:M},{key:"share",label:V("imageviewer.shareImage"),onClick:D}],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 Ug=da.length-1;function lV({type:r,name:s,content:d}){const[_,E]=U.useState(()=>eA()),R=U.useRef(null),b=rV();Cm(b.playing&&!b.paused);const a=U.useMemo(()=>r==="markdown"?JS.sanitize(Mn.parse(d||"")):"",[r,d]);if(U.useEffect(()=>{b.stop()},[a]),U.useEffect(()=>{var S;const h=R.current;if(!h||(h.querySelectorAll(".tts-active").forEach(C=>C.classList.remove("tts-active")),b.idx<0))return;const f=h.querySelectorAll(`.tts-sent[data-tts="${b.idx}"]`);f.forEach(C=>C.classList.add("tts-active")),(S=f[0])==null||S.scrollIntoView({block:"center",behavior:"smooth"})},[b.idx]),r==="image")return o.jsxDEV(oV,{url:d,name:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:50,columnNumber:12},this);if(r==="html")return o.jsxDEV("iframe",{className:"doc-iframe",sandbox:"allow-scripts",srcDoc:d||"",title:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:54,columnNumber:12},this);const u=h=>{const f=Math.min(Ug,Math.max(0,_+h));E(f),tA(f)};if(r==="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:()=>u(-1),disabled:_<=0,"aria-label":V("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:()=>u(1),disabled:_>=Ug,"aria-label":V("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:`${da[_]}px`},children:d||""},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 g=()=>{if(b.playing){b.paused?b.resume():b.pause();return}const h=nV(R.current);h.length&&b.play(h)},x=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:g,"aria-label":x?V("doc.pauseRead"):b.paused?V("doc.resumeRead"):V("doc.read"),children:x?o.jsxDEV(n3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):o.jsxDEV(t3,{},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":V("doc.stopRead"),children:o.jsxDEV(oS,{},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":V("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:()=>u(-1),disabled:_<=0,"aria-label":V("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:()=>u(1),disabled:_>=Ug,"aria-label":V("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:R,className:"doc-md",style:{fontSize:`${da[_]}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 cV({open:r,pane:s,windowId:d,tabs:_,active:E,onActivate:R,onCloseTab:b,onMinimize:a,onOpenDoc:u,pendingShare:g,onPendingConsumed:x}){const h=_.find(ee=>ee.key===E)||_[0],[f,S]=U.useState("recent"),[C,y]=U.useState(null),[l,v]=U.useState(0),m=h.type==="home",p=U.useRef(null),N=U.useRef(C);N.current=C;const k=U.useRef(E);k.current=E;const j=U.useRef(d);j.current=d;const M=U.useRef(a);M.current=a;const D=U.useRef(R);D.current=R;const L=U.useRef(E),A=U.useRef(0),F=U.useRef([]),O=()=>{window.history.pushState({fileOverlay:!0},""),A.current+=1},I=ee=>{r&&ee!==N.current&&(F.current.push({type:"nav",prev:N.current}),O()),y(ee),Z0(d,ee)},G=U.useRef(r);U.useEffect(()=>{const ee=L.current;L.current=E;const te=G.current;G.current=r,r&&te&&ee==="home"&&E!=="home"&&(F.current.push({type:"doc"}),O())},[E,r]),U.useEffect(()=>{if(!r)return;F.current=[],A.current=0,O();const ee=()=>{var se,B;A.current=Math.max(0,A.current-1);const te=F.current.pop();if((te==null?void 0:te.type)==="doc"){(se=D.current)==null||se.call(D,"home");return}if((te==null?void 0:te.type)==="nav"){y(te.prev),te.prev&&Z0(j.current,te.prev);return}(B=M.current)==null||B.call(M)};return window.addEventListener("popstate",ee),()=>{window.removeEventListener("popstate",ee),A.current>0&&(window.history.go(-A.current),A.current=0)}},[r]);const ne=async()=>{try{const{cwd:ee}=await jo(s);ee&&y(ee)}catch{}};return U.useEffect(()=>{g&&S("browse")},[g]),U.useEffect(()=>{r&&v(ee=>ee+1)},[r]),U.useEffect(()=>{if(!r){p.current=null;return}if(p.current===d)return;p.current=d,F.current=[],S("browse");let ee=!1;return(async()=>{const te=LM(d);let se=null;if(te)try{await eS(te),se=te}catch{}if(!se&&s)try{const{cwd:B}=await jo(s);se=B}catch{}!ee&&se&&y(se)})(),()=>{ee=!0}},[r,d,s]),Wl.createPortal(o.jsxDEV("div",{className:`file-sheet ${r?"open":""}`,"aria-hidden":!r,children:[o.jsxDEV("div",{className:"file-tabs",children:[o.jsxDEV("div",{className:"file-tabs-scroll",children:_.map(ee=>o.jsxDEV("div",{className:`file-tab ${ee.key===E?"active":""}`,children:[o.jsxDEV("button",{className:"file-tab-label",onClick:()=>R(ee.key),children:ee.key==="home"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:39},this),V("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:37},this):ee.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:15},this),ee.key!=="home"&&o.jsxDEV("button",{className:"file-tab-x","aria-label":V("filemanager.closeTab"),onClick:()=>b(ee.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:149,columnNumber:17},this)]},ee.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":V("filemanager.minimize"),title:V("filemanager.minimize"),onClick:a,children:o.jsxDEV(ha,{},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:m?o.jsxDEV("div",{className:"home-pane",children:[o.jsxDEV("div",{className:"file-seg",role:"tablist",children:[o.jsxDEV("button",{className:`file-seg-btn ${f==="recent"?"on":""}`,role:"tab","aria-selected":f==="recent",onClick:()=>S("recent"),children:[o.jsxDEV(rS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:162,columnNumber:17},this),V("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 ${f==="browse"?"on":""}`,role:"tab","aria-selected":f==="browse",onClick:()=>S("browse"),children:[o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:166,columnNumber:17},this),V("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),f==="recent"?o.jsxDEV(Z4,{onOpenDoc:u,refreshKey:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this):o.jsxDEV(nC,{path:C,onNavigate:I,onOpenDoc:u,onJumpToCwd:s?ne:null,refreshKey:l,pendingFile:g,onPendingConsumed:x},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(lV,{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 uV(r){if(!r)return[];const s=[];let d=null,_=null;for(const E of r.split(`
330
+ `)){if(E.startsWith("diff --git")){const b=E.match(/ b\/(.*)$/);d={path:b?b[1]:E.slice(11),hunks:[]},s.push(d),_=null;continue}if(!d)continue;if(E.startsWith("@@")){_={header:E,lines:[]},d.hunks.push(_);continue}if(!_)continue;const R=E[0];R==="+"?_.lines.push({type:"add",text:E.slice(1)}):R==="-"?_.lines.push({type:"del",text:E.slice(1)}):R===" "&&_.lines.push({type:"ctx",text:E.slice(1)})}return s}const dV=r=>String(r||"").replace(/\/+$/,"").split("/").pop()||r;function bm(r,s){const d=(r&&r!==" "?r:s)||"?";return d==="?"?"?":d}function hV({open:r,pane:s,windowId:d,inset:_=0,onClose:E}){const R=U.useRef(!0);U.useEffect(()=>()=>{R.current=!1},[]);const[b,a]=U.useState([]),[u,g]=U.useState(null),[x,h]=U.useState([]),f=x.length?x[x.length-1]:null,[S,C]=U.useState(!1),[y,l]=U.useState(null),v=U.useRef(d);U.useEffect(()=>{v.current=d},[d]);const[m,p]=U.useState(null),[N,k]=U.useState(null),[j,M]=U.useState(null),[D,L]=U.useState(null),[A,F]=U.useState(20),[O,I]=U.useState(!1),[G,ne]=U.useState({changes:!0,commits:!0}),[ee,te]=U.useState(!1),se=U.useRef(null),[B,W]=U.useState(null),[X,Y]=U.useState(null),[ve,he]=U.useState(null),Me=U.useRef(x);Me.current=x;const me=U.useRef(S);me.current=S;const ie=U.useRef(E);ie.current=E;const $=U.useRef(0),_e=()=>{window.history.pushState({gitOverlay:!0},""),$.current+=1},de=je=>{_e(),h(Pe=>[...Pe,je])},Ie=()=>{_e(),C(!0)};U.useEffect(()=>{if(!r)return;_e();const je=()=>{var Pe;if($.current=Math.max(0,$.current-1),me.current){C(!1);return}if(Me.current.length){h(be=>be.slice(0,-1));return}(Pe=ie.current)==null||Pe.call(ie)};return window.addEventListener("popstate",je),()=>{window.removeEventListener("popstate",je),$.current>0&&(window.history.go(-$.current),$.current=0)}},[r]),U.useEffect(()=>{if(!r)return;let je=!1;h([]),L(null),Y(null),he(null);const Pe=x_(d);return Pe.length?(a(Pe),g(be=>be&&Pe.includes(be)?be:Pe[0]),()=>{je=!0}):(a([]),g(null),(async()=>{try{if(!s)return;const{cwd:be}=await jo(s);if(!be)return;const{repos:Ae=[]}=await oN(be);if(je||!Ae.length)return;const He=nN(d,Ae.map(wt=>wt.path));if(je)return;a(He),g(He[0]??null)}catch(be){if(je)return;(be==null?void 0:be.message)==="outside home"?he(V("git.outsideRoots")):Y(V("git.errReadRepo"))}})(),()=>{je=!0})},[r,s,d]),U.useEffect(()=>{if(!r||!s)return;let je=!1;return jo(s).then(({cwd:Pe})=>{!je&&Pe&&l(Pe)}).catch(()=>{}),()=>{je=!0}},[r,s]),U.useEffect(()=>{if(!r||!u){p(null),k(null);return}let je=!1;return p(null),k(null),M(null),L(null),F(20),Y(null),he(null),(async()=>{try{const[Pe,be]=await Promise.all([VA(u),BA(u)]);if(je)return;p(Pe.changes??[]),k(be.branches??[])}catch{je||Y(V("git.errLoad"))}})(),()=>{je=!0}},[r,u]),U.useEffect(()=>{if(!r||!u){M(null);return}let je=!1;return(async()=>{try{const{commits:Pe=[]}=await PA(u,{ref:D||void 0,limit:A});je||M(Pe)}catch{je||M([])}finally{je||I(!1)}})(),()=>{je=!0}},[r,u,D,A]);const Ue=!u||!f?"":f.kind==="diff"?`${u}|diff|${f.path}|${f.commit||""}|${f.staged?1:0}`:`${u}|commit|${f.hash}`;U.useEffect(()=>{if(!r||!u||!f){W(null);return}let je=!1;return Y(null),W(null),(async()=>{try{let Pe;if(f.kind==="diff"){const{diff:be,truncated:Ae}=await IA(u,{path:f.path,commit:f.commit,staged:f.staged});Pe={files:uV(be),truncated:Ae}}else Pe=await FA(u,f.hash);je||W({key:Ue,payload:Pe})}catch{je||Y(V("git.errLoad"))}})(),()=>{je=!0}},[r,Ue]);const tt=U.useCallback(()=>{window.history.back()},[]),Qe=je=>{g(je),h([]),L(null)},st=async je=>{window.history.back(),he(null);try{const{repos:Pe=[]}=await oN(je);if(!R.current)return;if(!Pe.length){he(V("git.noRepoInDir"));return}const be=Pe.map(kt=>kt.path),Ae=v.current,He=Ae?nN(Ae,be):be;a(kt=>{const Ot=[...kt];for(const Pt of He)Ot.includes(Pt)||Ot.push(Pt);return Ot});const wt=be.find(kt=>!b.includes(kt))||be[0];Qe(wt)}catch(Pe){if(!R.current)return;(Pe==null?void 0:Pe.message)==="outside home"?he(V("git.outsideRoots")):Y(V("git.errReadDir"))}},Nt=je=>{const Pe=uA(d,je);a(Pe),u===je&&(g(Pe[0]??null),h([]),L(null))},J=(N||[]).find(je=>je.current)||null,bt=je=>{const Pe=je===(J==null?void 0:J.name)?null:je;Pe!==D&&(L(Pe),M(null),F(20))},Gt=je=>ne(Pe=>({...Pe,[je]:!Pe[je]})),Ee=j!=null&&j.length>=A,Te=je=>{if(!Ee||O)return;const Pe=je.currentTarget;Pe.scrollHeight-Pe.scrollTop-Pe.clientHeight<80&&(I(!0),F(be=>be+20))},Ge=D||(J==null?void 0:J.name)||null,re=!!D&&D!==(J==null?void 0:J.name),We=D?(N||[]).find(je=>je.name===D):J,Ye=B&&B.key===Ue?B.payload:null,ge=!!f,Ze=(f==null?void 0:f.kind)==="commit"?V("git.commitDetail"):(f==null?void 0:f.kind)==="diff"?f.path||V("git.diff"):"";return Wl.createPortal(o.jsxDEV("div",{className:`file-sheet git-sheet ${r?"open":""}`,"aria-hidden":!r,style:{"--kb-inset":`${_}px`},children:[o.jsxDEV("div",{className:"file-tabs git-head",children:[ge?o.jsxDEV("div",{className:"git-drill-head",children:[o.jsxDEV("button",{className:"git-back","aria-label":V("common.back"),title:V("common.back"),onClick:tt,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(lS,{},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:Ze},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":V("git.bindRepo"),title:V("git.bindRepo"),onClick:Ie,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),b.map(je=>o.jsxDEV("div",{className:`git-tab ${je===u?"active":""}`,children:[o.jsxDEV("button",{className:"git-tab-label",onClick:()=>Qe(je),children:dV(je)},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":V("common.close"),title:V("common.close"),onClick:()=>Nt(je),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},je,!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":V("git.collapse"),title:V("git.collapse"),onClick:()=>E==null?void 0:E(),children:o.jsxDEV(ha,{},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),!ge&&u&&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)," ",Ge||"—",!re&&Ge&&o.jsxDEV("span",{className:"git-branch-cur-tag",children:V("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),We&&(We.ahead||We.behind)?o.jsxDEV("span",{className:"git-branch-bar-track",children:[We.ahead?o.jsxDEV("span",{className:"git-ahead",children:["↑",We.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,We.behind?o.jsxDEV("span",{className:"git-behind",children:["↓",We.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 ${re?"other":""}`,onClick:()=>te(je=>!je),"aria-haspopup":"listbox","aria-expanded":ee,title:V("git.switchViewedBranch"),children:[o.jsxDEV("span",{className:"git-branch-trigger-name",children:V("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(ha,{},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),ee&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>te(!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:[(N||[]).length===0&&o.jsxDEV("div",{className:"git-empty",children:V("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(N||[]).map(je=>{const Pe=D?je.name===D:je.current;return o.jsxDEV("button",{role:"option","aria-selected":Pe,className:`git-dd-item ${je.current?"current":""} ${Pe?"viewing":""}`,onClick:()=>{bt(je.name),te(!1)},children:[o.jsxDEV("span",{className:"git-branch-dot",children:je.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:je.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),je.upstream&&o.jsxDEV("span",{className:"git-branch-up",children:[je.upstream,je.ahead?o.jsxDEV("span",{className:"git-ahead",children:[" ↑",je.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,je.behind?o.jsxDEV("span",{className:"git-behind",children:[" ↓",je.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)]},je.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:[X&&o.jsxDEV("div",{className:"git-error",children:X},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),ve&&!X&&!ge&&o.jsxDEV("div",{className:"git-notice",children:ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!u&&!X&&!ve&&o.jsxDEV("div",{className:"git-empty",children:V("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),ge&&u&&!X&&o.jsxDEV("div",{className:"git-scroll",children:Ye?f.kind==="diff"?o.jsxDEV(vV,{data:Ye},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):o.jsxDEV(pV,{data:Ye,onOpenFile:je=>de({kind:"diff",path:je,commit:f.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:V("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),!ge&&u&&!X&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV(p1,{variant:"top",title:V("git.changes"),count:m==null?void 0:m.length,expanded:G.changes,onToggle:()=>Gt("changes"),children:m==null?o.jsxDEV("div",{className:"git-loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):o.jsxDEV(mV,{data:{changes:m},onOpenFile:(je,Pe)=>de({kind:"diff",path:je,staged:Pe})},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(p1,{variant:"mid",title:V("git.commits"),subtitle:re?Ge:null,expanded:G.commits,onToggle:()=>Gt("commits"),bodyRef:se,onScroll:Te,children:j==null?o.jsxDEV("div",{className:"git-loading",children:V("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(fV,{data:{commits:j},onOpen:je=>de({kind:"commit",hash:je})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),Ee&&o.jsxDEV("div",{className:"git-more",children:V(O?"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(Wu,{open:S,seedCwd:y,pane:s,inset:_,hint:V("git.pickerHint"),onPick:st,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 p1({variant:r,title:s,subtitle:d,count:_,expanded:E,onToggle:R,onScroll:b,bodyRef:a,children:u}){return o.jsxDEV("div",{className:`git-section git-section--${r} ${E?"open":""}`,children:[o.jsxDEV("button",{className:"git-section-head",onClick:R,"aria-expanded":E,children:[o.jsxDEV("span",{className:"git-section-caret",children:o.jsxDEV(ha,{},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),d&&o.jsxDEV("span",{className:"git-section-sub",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),_!=null&&o.jsxDEV("span",{className:"git-section-count",children:_},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),E&&o.jsxDEV("div",{className:"git-section-body",ref:a,onScroll:b,children:u},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 mV({data:r,onOpenFile:s}){const d=(r==null?void 0:r.changes)??[];return d.length?o.jsxDEV("div",{className:"git-list",children:d.map((_,E)=>{const R=!!(_.x&&_.x!==" "&&_.x!=="?");return o.jsxDEV("button",{className:"git-row",onClick:()=>s(_.path,R),children:[o.jsxDEV("span",{className:`git-badge git-badge-${bm(_.x,_.y).toLowerCase().replace("?","q")}`,children:bm(_.x,_.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:_.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${_.path}-${E}`,!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:V("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function fV({data:r,onOpen:s}){const d=(r==null?void 0:r.commits)??[];return d.length?o.jsxDEV("div",{className:"git-list",children:d.map(_=>o.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>s(_.hash),children:[o.jsxDEV("span",{className:"git-hash",children:_.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:_.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:[_.author," · ",_.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)]},_.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:V("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function pV({data:r,onOpenFile:s}){if(!r)return null;const d=r.files??[];return o.jsxDEV("div",{className:"git-commit-detail",children:[r.message&&o.jsxDEV("pre",{className:"git-commit-msg",children:r.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:d.map((_,E)=>o.jsxDEV("button",{className:"git-row",onClick:()=>s(_.path),children:[o.jsxDEV("span",{className:`git-badge git-badge-${bm(_.x,_.y).toLowerCase().replace("?","q")}`,children:bm(_.x,_.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:_.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${_.path}-${E}`,!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 v1=da.length-1;function vV({data:r}){const[s,d]=U.useState(()=>iA()),_=R=>{const b=Math.min(v1,Math.max(0,s+R));d(b),rA(b)};if(!r)return null;const E=r.files??[];return E.length?o.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${da[s]}px`},children:[o.jsxDEV("div",{className:"git-diff-zoom",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>_(-1),disabled:s<=0,"aria-label":V("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:()=>_(1),disabled:s>=v1,"aria-label":V("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),r.truncated&&o.jsxDEV("div",{className:"git-diff-trunc",children:V("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),E.map((R,b)=>o.jsxDEV("div",{className:"git-diff-file",children:[E.length>1&&o.jsxDEV("div",{className:"git-diff-fname",children:R.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:R.hunks.map((a,u)=>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((g,x)=>o.jsxDEV("div",{className:`git-diff-line git-diff-${g.type}`,children:[g.type==="add"?"+":g.type==="del"?"-":" ",g.text]},x,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},u,!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)]},`${R.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:V("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function gV(){const r=x2();if(!r.active)return null;const s=r.phase==="sending",d=Math.round((r.pct||0)*100);return Wl.createPortal(o.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":V("upload.title"),children:o.jsxDEV("div",{className:"upload-card",children:[r.label&&o.jsxDEV("div",{className:"upload-card-label",children:r.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:`${d}%`}},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:[d,"%"]},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:V("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:_2,children:V("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 em=8,g1=12;function _1({path:r,x:s,y:d,onOpen:_,onClose:E,icon:R,name:b,openLabel:a,note:u,disabled:g=!1}){const x=b??(r.split("/").filter(Boolean).pop()||r),h=U.useRef(null),[f,S]=U.useState(null);return U.useLayoutEffect(()=>{const C=h.current;if(!C)return;const y=C.offsetWidth,l=C.offsetHeight,v=window.innerWidth,m=window.innerHeight,p=Math.min(Math.max(s-y/2,em),v-y-em);let N=d+g1;N+l>m-em&&(N=Math.max(em,d-g1-l)),S({left:p,top:N})},[s,d,r]),o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"doclink-backdrop",onClick:E},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:f?{left:f.left,top:f.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":V("doclink.title"),children:[o.jsxDEV("div",{className:"doclink-name",children:[R??o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:48},this),x]},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:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:45,columnNumber:9},this),u&&o.jsxDEV("div",{className:"doclink-note",children:u},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:E,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:48,columnNumber:11},this),!g&&o.jsxDEV("button",{className:"doclink-open",onClick:()=>_(r),children:a??V("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 _V=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function bV(r){const s=(r??"").trim();return s?{id:_V(),text:s}:null}function yV(r,s,d){const _=[...r];if(s<0||s>=_.length||d<0||d>=_.length||s===d)return _;const[E]=_.splice(s,1);return _.splice(d,0,E),_}function xV({open:r,session:s,window:d,onClose:_,onSend:E,onCountChange:R}){const[b,a]=U.useState([]),[u,g]=U.useState(""),[x,h]=U.useState(null),[f,S]=U.useState(null),C=U.useRef(null),y=U.useRef({head:"",tail:""}),l=U.useRef(null),v=U.useRef(!1),m=U.useRef({active:!1}),p=B=>{tN(s,d,B),a(B),R==null||R(B.length)},N=B=>{B&&(B.style.height="auto",B.style.height=`${B.scrollHeight+2}px`)};U.useEffect(()=>{if(!r)return;const B=Q1(s,d);a(B),R==null||R(B.length),g(""),h(null)},[r,s,d]);const j=T_({onText:B=>{if(v.current){v.current=!1;return}const{head:W,tail:X}=y.current;g(W+B+X),l.current=W.length+B.length}}),M=L_(),D=j.state==="recording"||j.state==="finalizing";Cm(D),U.useEffect(()=>{if(j.state!=="recording"&&j.state!=="finalizing"||v.current)return;const{head:B,tail:W}=y.current;g(B+j.partial+W),l.current=B.length+j.partial.length},[j.partial,j.state]),U.useLayoutEffect(()=>{const B=C.current;if(!B||(N(B),l.current==null))return;const W=l.current;if(l.current=null,document.activeElement===B)try{B.setSelectionRange(W,W)}catch{}},[u]);const L=()=>{if(D){j.stop();return}const B=C.current,W=B?B.selectionStart:u.length;y.current={head:u.slice(0,W),tail:u.slice(W)},j.start()},A=()=>{D&&(v.current=!0,j.stop())},F=()=>{A();const B=u.trim();if(B){if(x)p(b.map(W=>W.id===x?{...W,text:B}:W));else{const W=bV(B);W&&p([...b,W])}g(""),h(null)}},O=B=>{h(B.id),g(B.text),requestAnimationFrame(()=>{var W;return(W=C.current)==null?void 0:W.focus()})},I=()=>{h(null),g("")},G=B=>{p(b.filter(W=>W.id!==B)),B===x&&I()},ne=(B,W)=>{var X,Y;B.cancelable&&B.preventDefault(),(Y=(X=B.currentTarget).setPointerCapture)==null||Y.call(X,B.pointerId),m.current={active:!0,pointerId:B.pointerId,id:W},S(W)},ee=B=>{var he;const W=m.current;if(!W.active||B.pointerId!==W.pointerId)return;const X=(he=B.currentTarget.closest(".idea-list"))==null?void 0:he.querySelectorAll("[data-idea]");if(!X||!X.length)return;const Y=B.clientY;let ve=X.length-1;for(let Me=0;Me<X.length;Me++){const me=X[Me].getBoundingClientRect();if(Y<me.top+me.height/2){ve=Me;break}}a(Me=>{const me=Me.findIndex(ie=>ie.id===W.id);return me<0||me===ve?Me:yV(Me,me,ve)})},te=B=>{const W=m.current;!W.active||B.pointerId!==W.pointerId||(m.current={active:!1},S(null),a(X=>(tN(s,d,X),X)))};if(!r)return null;const se=x!=null;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:7},this),o.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":V("idea.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:[V("idea.title"),d?` · ${d}`:"",b.length>0&&o.jsxDEV("span",{className:"idea-head-count",children:b.length},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:100},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:153,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:151,columnNumber:9},this),o.jsxDEV("div",{className:`idea-compose${D?" recording":""}`,children:[o.jsxDEV("textarea",{ref:C,className:"idea-input",rows:1,placeholder:V(se?"idea.editPlaceholder":"idea.addPlaceholder"),value:u,readOnly:D,onChange:B=>g(B.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:157,columnNumber:11},this),se&&o.jsxDEV("button",{className:"idea-cancel",onClick:I,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:23},this),M&&o.jsxDEV(j_,{active:D,disabled:j.state==="requesting",onToggle:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:28},this),o.jsxDEV("button",{className:"idea-act",onClick:F,disabled:!u.trim(),"aria-label":V(se?"common.save":"idea.add"),children:se?o.jsxDEV(S_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:24},this):o.jsxDEV(N_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:168,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:156,columnNumber:9},this),o.jsxDEV("div",{className:"idea-list",children:b.length===0?o.jsxDEV("div",{className:"cmd-empty",children:V("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this):b.map(B=>o.jsxDEV("div",{"data-idea":B.id,className:`idea-row${B.id===f?" dragging":""}${B.id===x?" editing":""}`,children:[o.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":V("idea.dragSort"),onPointerDown:W=>ne(W,B.id),onPointerMove:ee,onPointerUp:te,onPointerCancel:te,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:182,columnNumber:15},this),o.jsxDEV("span",{className:"idea-text",onClick:()=>O(B),children:B.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this),o.jsxDEV("button",{className:"idea-send",onClick:()=>E==null?void 0:E(B.text),"aria-label":V("idea.fillInput"),children:V("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:192,columnNumber:15},this),o.jsxDEV("button",{className:"idea-del",onClick:()=>G(B.id),"aria-label":V("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:193,columnNumber:15},this)]},B.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:177,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:148,columnNumber:5},this)}function wV({open:r,onClose:s}){return r?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":V("changelog.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:V("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":V("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:Fg.slice(0,1).map(d=>{var R,b;const _=d.items[Il()]||d.items.en||d.items.zh||[],E=d.version?`v${d.version}`:((R=d.label)==null?void 0:R[Il()])||((b=d.label)==null?void 0:b.en);return o.jsxDEV("div",{className:"rel",children:[o.jsxDEV("div",{className:"rel-date",children:[E&&o.jsxDEV("span",{className:"rel-ver",children:E},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:d.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:_.map((a,u)=>o.jsxDEV("li",{children:a},u,!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)]},d.version||d.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}function NV(r){let s=!1,d=!1;for(let _=r;_&&_!==document.body&&_!==document.documentElement;_=_.parentElement){const E=getComputedStyle(_);if(!d&&(E.overflowY==="auto"||E.overflowY==="scroll")&&_.scrollHeight>_.clientHeight&&(d=!0),!s&&(E.overflowX==="auto"||E.overflowX==="scroll")&&_.scrollWidth>_.clientWidth&&(s=!0),s&&d)break}return{x:s,y:d}}function SV(){U.useEffect(()=>{let r="block",s=0,d=0;const _=R=>{const b=R.touches[0];if(s=b?b.clientX:0,d=b?b.clientY:0,!(R.target instanceof Element)){r="block";return}const{x:a,y:u}=NV(R.target);r=u?"free":a?"xonly":"block"},E=R=>{if(!(r==="free"||!R.cancelable)){if(r==="xonly"){const b=R.touches[0];if(b&&Math.abs(b.clientX-s)>=Math.abs(b.clientY-d))return}R.preventDefault()}};return document.addEventListener("touchstart",_,{passive:!0,capture:!0}),document.addEventListener("touchmove",E,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",_,{capture:!0}),document.removeEventListener("touchmove",E,{capture:!0})}},[])}function CV(r,s,d=2e3){const _=U.useRef(s);_.current=s,U.useEffect(()=>{if(!r)return;let E=!1,R=null,b=!1;const a=()=>{var h;(h=window.history.state)!=null&&h.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},u=()=>{var h;b||(h=window.history.state)!=null&&h.exitGuard||(window.history.pushState({exitGuard:!0},""),b=!0)},g=()=>{var h;R&&(clearTimeout(R),R=null),E&&(E=!1,(h=_.current)==null||h.call(_,!1))};a(),u();const x=()=>{var h,f,S;if((h=window.history.state)!=null&&h.exitGuard){b=!0,g();return}(f=window.history.state)!=null&&f.exitRoot&&(b=!1,!E&&(E=!0,(S=_.current)==null||S.call(_,!0),R=setTimeout(()=>{var C;E=!1,R=null,(C=_.current)==null||C.call(_,!1),u()},d)))};return window.addEventListener("popstate",x),()=>{var h,f;window.removeEventListener("popstate",x),R&&clearTimeout(R),E&&((h=_.current)==null||h.call(_,!1)),b&&((f=window.history.state)!=null&&f.exitGuard)&&window.history.back()}},[r,d])}function b1(r){history.replaceState(history.state,"",`#${encodeURIComponent(r)}`)}const Ru=r=>{try{return decodeURIComponent(r)}catch{return r}};function Og(){const r=location.hash.replace(/^#/,""),s=r.match(/^\/inbox(?:\/(.*))?$/);if(s)return{session:null,window:null,pane:null,inbox:!0,inboxId:s[1]?Ru(s[1]):null};const d=r.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return d?{session:Ru(d[1]),window:Ru(d[2]),pane:Ru(d[3]),inbox:!1,inboxId:null}:{session:Ru(r)||null,window:null,pane:null,inbox:!1,inboxId:null}}const EV="tmw-share-v1",jV="/__share__/";function DV(r=typeof location<"u"?location.search:""){try{return new URLSearchParams(r).has("share")}catch{return!1}}function kV(){if(typeof location>"u"||typeof history>"u")return;const r=new URL(location.href);r.searchParams.delete("share"),history.replaceState(history.state,"",r.pathname+r.search+r.hash)}async function RV(){if(typeof caches>"u")return null;let r;try{r=await caches.open(EV)}catch{return null}const s=await r.keys();if(!s.length)return null;const d=s[s.length-1],_=await r.match(d);if(await r.delete(d),!_)return null;const E=await _.blob();let R="shared";try{R=decodeURIComponent(new URL(d.url).pathname.slice(jV.length))||"shared"}catch{}return new File([E],R,{type:E.type||_.headers.get("Content-Type")||""})}const y1="①②③④⑤⑥⑦⑧⑨",Vl=(r,s)=>s&&r.some(d=>d.id===s)?s:r[0].id;function TV(){var za,Ao,Gl,Uo,ql,Yl,Kl,Gu,$r,qu,Oo,Vo,Po,Yu,$a,Xl,Ai,Wr,ei,Gr,Bo,Wa;const[r,s]=U.useState(!Lo()),[d,_]=U.useState(!1),[E,R]=U.useState(!1),[b,a]=U.useState(BM),u=le=>{IM(le),a(le)},[g,x]=U.useState(FM),h=le=>{HM(le),x(le)},[f,S]=U.useState(!1),[C,y]=U.useState(!1),[l,v]=U.useState(!1),[m,p]=U.useState(null),[N,k]=U.useState(null),[j,M]=U.useState(null),[D,L]=U.useState(null),[A,F]=U.useState(!1),[O,I]=U.useState(!1),[G,ne]=U.useState(null),[ee,te]=U.useState(null),[se,B]=U.useState(null),[W,X]=U.useState(null),[Y,ve]=U.useState(null),[he,Me]=U.useState(!1),[me,ie]=U.useState(null),[$,_e]=U.useState(null),de=P3(),[Ie,Ue]=U.useState(Eo),[tt,Qe]=U.useState(am),[st,Nt]=U.useState([]),[J,bt]=U.useState(null),[Gt,Ee]=U.useState(!0),[Te,Ge]=U.useState({}),[re,We]=U.useState("terminal");U.useEffect(()=>{We(localStorage.getItem("tw_lens_"+(J==null?void 0:J.paneId))||"terminal")},[J==null?void 0:J.paneId]);const[Ye,ge]=U.useState([]),[Ze,je]=U.useState(null),[Pe,be]=U.useState(!1),{status:Ae,enable:He}=z4(),[wt,kt]=U.useState(!1),[Ot,Pt]=U.useState(0),[dn,Qt]=U.useState(!1),[Mt,Ft]=U.useState(sA),[sn,Dn]=U.useState(null),[it,cn]=U.useState(oA),[zn,$n]=U.useState(Y0),[en,kn]=U.useState(DM),[On,ni]=U.useState([]),[nn,En]=U.useState(Lu),[vn,Xn]=U.useState(!1),[oe,$e]=U.useState(null),[et,yt]=U.useState(null),[gt,ft]=U.useState(kM),Rt=()=>{let le=!1;const Se=()=>{le||(le=!0,window.removeEventListener("popstate",ze),clearTimeout(rt),Xn(!0))},ze=()=>Se();window.addEventListener("popstate",ze);const rt=setTimeout(Se,300);R(!1)},pt=U.useRef(0),gn=U.useRef(null);gn.current=oe;const an=()=>{window.history.pushState({overlay:!0},""),pt.current+=1},qt=le=>{an(),$e(le),J0(le),En(Lu())},bn=()=>window.history.back(),Nn=()=>{$e(null),Xn(!1)},ui=()=>{On.forEach(le=>J0(le.id)),En(Lu())},Vn=async le=>{ni(Se=>Se.filter(ze=>ze.id!==le)),await D3(le)},Jn=U.useRef(null),ii=U.useRef(null),Dt=U.useRef(null),ae=U.useRef(null),Be=U.useCallback(()=>s(!0),[]),xe=U.useCallback(le=>F3(le,Be),[Be]),{previewDomain:Q,dynamicEnabled:Ce,previewSheetOpen:Je,setPreviewSheetOpen:Vt,activePreview:_t,shownPreview:St,tabs:Jt,activeName:yn,openPreviewSheet:hn,startPreview:An,startDynamicPreview:Yt,startUrlPreview:Wn,switchTab:Zn,closeTab:Wi,stopPreview:Gi,renewPreview:Cr}=I3(J,{settingsOpen:E,setSettingsOpen:R});U.useEffect(()=>{r||MA().then(Dn).catch(()=>{})},[r]);const pr=U.useCallback(()=>{EM(),R(!1),y(!1),_(!1),bt(null),Ee(!0),s(!0)},[]);SV();const di=A2();es(Je,()=>Vt(!1)),es(d,()=>_(!1)),es(Pe,()=>be(!1)),es(f,()=>S(!1)),es(C,()=>y(!1)),es(l,()=>v(!1)),es(wt,()=>kt(!1)),es(!!ee,()=>te(null)),es(E||dn,()=>{dn?Qt(!1):R(!1)}),es(!!N||!!m,()=>{m?p(null):k(null)}),es(!!j,()=>M(null)),U.useEffect(()=>{if(!vn)return;an();const le=()=>{if(pt.current=Math.max(0,pt.current-1),gn.current){$e(null);return}Xn(!1)};return window.addEventListener("popstate",le),()=>{window.removeEventListener("popstate",le),pt.current>0&&(window.history.go(-pt.current),pt.current=0)}},[vn]),U.useEffect(()=>{vn&&et&&(qt(et),yt(null))},[vn,et]),U.useEffect(()=>{vn&&On.length&&On[0].ts>gt&&(RM(On[0].ts),ft(On[0].ts))},[vn,On,gt]),CV(!!J,Me);const Er=U.useCallback(async le=>{var ze,rt;const Se=J==null?void 0:J.paneId;if(Se)try{await Pu(Se,[le]),(rt=(ze=Jn.current)==null?void 0:ze.wake)==null||rt.call(ze)}catch(nt){xe(nt)}},[J,Be]),vr=U.useCallback(async le=>{var ze,rt;const Se=J==null?void 0:J.paneId;if(Se)try{await Co(Se,le,!1),(rt=(ze=Jn.current)==null?void 0:ze.wake)==null||rt.call(ze)}catch(nt){xe(nt)}},[J,Be]),gr=U.useCallback(async le=>{var nt,Et,Ht,Xt,mi;const Se=(nt=J==null?void 0:J.window)==null?void 0:nt.id,ze=Dt.current??((Ht=(Et=Jn.current)==null?void 0:Et.getSize())==null?void 0:Ht.cols);if(!Se||!ze)return;const rt=Math.max(20,Math.min(500,ze+le));Dt.current=rt,(mi=(Xt=Jn.current)==null?void 0:Xt.flash)==null||mi.call(Xt);try{ae.current==null&&(ae.current=await wA(Se).then(Fn=>Fn.layout||"").catch(()=>"")),J.panes&&J.panes.length>1?await xA(J.paneId,rt):await yA(Se,rt)}catch(Fn){xe(Fn)}},[J,Be]),Fs=U.useCallback(async()=>{var ze;const le=(ze=J==null?void 0:J.window)==null?void 0:ze.id;if(!le)return;const Se=ae.current;Dt.current=null,ae.current=null;try{await NA(le,Se)}catch(rt){xe(rt)}},[J,Be]),hi=U.useCallback(async(le,Se=null)=>{var Ht;const ze=await Cu(le.id);if(!ze.length)return!1;const rt=(Se==null?void 0:Se.window)&&ze.find(Xt=>Xt.id===Se.window)||ze.find(Xt=>Xt.id===Vl(ze,OM(le.id))),nt=await Fa(rt.id);if(!nt.length)return!1;const Et=Se!=null&&Se.pane&&nt.some(Xt=>Xt.id===Se.pane)?Se.pane:Vl(nt,Gh(rt.id));return bt({session:le,windows:ze,window:rt,panes:nt,paneId:Et}),Ml({sessionId:le.id,windowId:rt.id,paneId:Et}),b1(le.name),Dt.current=((Ht=nt.find(Xt=>Xt.id===Et))==null?void 0:Ht.width)??null,ae.current=null,!0},[]),on=U.useCallback(async le=>{var Se;try{const ze=await Fa(le.id);if(!ze.length)return;const rt=Vl(ze,Gh(le.id));return bt(nt=>nt&&{...nt,window:le,panes:ze,paneId:rt}),Ml({sessionId:J.session.id,windowId:le.id,paneId:rt}),Dt.current=((Se=ze.find(nt=>nt.id===rt))==null?void 0:Se.width)??null,ae.current=null,rt}catch(ze){return xe(ze),null}},[J,Be]),ns=U.useCallback(async(le,Se,ze)=>{var Et,Ht,Xt,mi;const rt=(Et=J==null?void 0:J.session)==null?void 0:Et.id,nt=J==null?void 0:J.paneId;if(!(!rt||!nt))try{const{id:Fn}=await CA(rt,nt,le||void 0,Se,ze),va=await Cu(rt),ws=va.find(as=>as.id===Fn)||va[va.length-1],Ga=await Fa(ws.id);if(!Ga.length)return;const Ns=Vl(Ga,Gh(ws.id));bt(as=>as&&{...as,windows:va,window:ws,panes:Ga,paneId:Ns}),Ml({sessionId:rt,windowId:ws.id,paneId:Ns}),Dt.current=((Ht=Ga.find(as=>as.id===Ns))==null?void 0:Ht.width)??null,ae.current=null,v(!1),(mi=(Xt=Jn.current)==null?void 0:Xt.wake)==null||mi.call(Xt)}catch(Fn){if(xe(Fn))return;throw Fn}},[J,Be]),nr=U.useCallback(async le=>{var rt,nt;const Se=m;if(!Se)return;const ze=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(Se.kind==="session"){try{await EA(Se.id,le)}catch(Et){throw xe(Et)?Et:Et.status===409?new Error(Se("app.nameExists")):new Error(Se("app.renameFailed"))}Ue(jM(Se.name,le)),ju(),b1(le),bt(Et=>Et&&Et.session.id===Se.id?{...Et,session:{...Et.session,name:le}}:Et)}else{try{await jA(Se.id,le)}catch(Ht){throw xe(Ht)?Ht:new Error(Se("app.renameFailed"))}cA((nt=J==null?void 0:J.session)==null?void 0:nt.name,Se.name||Se.id,le);const Et=await Cu(ze);bt(Ht=>Ht&&{...Ht,windows:Et,window:Et.find(Xt=>Xt.id===Ht.window.id)||Ht.window})}p(null)},[m,J,Be]),Tt=U.useCallback(async()=>{var Et;const le=N,Se=J==null?void 0:J.session;if(!le||!Se)return;const ze=Se.id,rt=J.windows.length<=1;try{await DA(le.id)}catch(Ht){if(xe(Ht))return;window.alert(V("app.deleteFailed")),k(null);return}if(k(null),rt){Ue(q0(Se.name)),ju(),bt(null);return}const nt=await Cu(ze);if(le.id===J.window.id&&nt.length){const Ht=nt.find(Fn=>Fn.active)||nt[0],Xt=await Fa(Ht.id);if(!Xt.length)return;const mi=Vl(Xt,Gh(Ht.id));bt(Fn=>Fn&&{...Fn,windows:nt,window:Ht,panes:Xt,paneId:mi}),Ml({sessionId:ze,windowId:Ht.id,paneId:mi}),Dt.current=((Et=Xt.find(Fn=>Fn.id===mi))==null?void 0:Et.width)??null,ae.current=null}else bt(Ht=>Ht&&{...Ht,windows:nt})},[N,J,Be]),Fr=U.useCallback(async le=>{var nt;const Se=N,ze=(nt=J==null?void 0:J.session)==null?void 0:nt.id;if(!Se||!ze)return;const rt=Ng(J.windows,Se.id,le);if(rt)try{await kA(Se.id,rt.id);const Et=await Cu(ze);bt(Ht=>Ht&&{...Ht,windows:Et,window:Et.find(Xt=>Xt.id===Ht.window.id)||Ht.window}),k(Et.find(Ht=>Ht.id===Se.id)||null)}catch(Et){if(xe(Et)){k(null);return}window.alert(V("app.moveFailed")),k(null)}},[N,J,Be]),oi=Nm(()=>{J!=null&&J.session&&p({kind:"session",id:J.session.id,name:J.session.name})}),_r=U.useCallback(async le=>{try{const Se=(await Fl()).find(ze=>ze.name===le);if(!Se){window.alert(V("app.sessionGone",{name:le}));return}await hi(Se)&&_(!1)}catch(Se){xe(Se)}},[hi,Be]),jr=U.useCallback(async le=>{be(!1),$n(K0(le.pane,le.ts));try{const Se=(await Fl()).find(ze=>ze.name===le.session);if(!Se){window.alert(V("app.sessionGone",{name:le.session}));return}_(!1),await hi(Se,{window:le.window,pane:le.pane})}catch(Se){xe(Se)}},[hi,Be]),ma=U.useCallback(async({target:le,kill:Se,name:ze})=>{const rt=Ze,nt=await OA({pid:rt.pid,sessionId:rt.sessionId,target:le,kill:Se,name:ze});nt.name&&(Ue(G0(nt.name)),ju()),je(null),be(!1);try{nt.name&&(_(!1),await hi({id:nt.session,name:nt.name},{window:nt.window,pane:nt.pane}))}catch(Et){xe(Et)}try{ge(await aN())}catch{}},[Ze,hi,Be]),Qn=U.useCallback(()=>{const le=fN(Te);X0(le),kn(le)},[Te]),Un=U.useCallback(le=>{Ue(G0(le)),ju(),y(!1),_r(le)},[_r]),li=U.useCallback(le=>{Ue(q0(le)),ju(),bt(Se=>Se&&Se.session.name===le?null:Se)},[]),Gn=U.useCallback(le=>{bt(Se=>Se&&(Ml({windowId:Se.window.id,paneId:le}),{...Se,paneId:le}))},[]),Pn=U.useCallback((le,Se)=>{bt(ze=>{if(!ze)return ze;const rt=ze.windows.map(nt=>nt.id===le?{...nt,panes:Se.length}:nt);return ze.window.id===le?{...ze,windows:rt,panes:Se}:{...ze,windows:rt}})},[]),Bn=U.useCallback(async(le,Se)=>{var rt;const ze=(rt=J==null?void 0:J.window)==null?void 0:rt.id;if(ze){M(null),k(null);try{const{panes:nt,selectPaneId:Et}=await cN({paneId:le,dir:Se,windowId:ze,api:{splitPane:rN},getPanes:Fa});Pn(ze,nt),Gn(Et),ae.current=null}catch(nt){if(xe(nt))return;window.alert(V("pane.splitFailed"))}}},[J,Pn,Gn,Be]),Hs=U.useCallback(async()=>{var rt;const le=j,Se=(rt=J==null?void 0:J.window)==null?void 0:rt.id,ze=J==null?void 0:J.paneId;if(!(!le||!Se))try{const{panes:nt,selectPaneId:Et}=await GA({paneId:le,windowId:Se,viewedPaneId:ze,api:{closePane:RA},getPanes:Fa,pickId:Vl});M(null),Pn(Se,nt),Et&&Gn(Et),ae.current=null}catch(nt){if(M(null),xe(nt))return;window.alert(V("pane.closeFailed"))}},[j,J,Pn,Gn,Be]),ki=U.useCallback(async(le,Se)=>{var rt,nt;const ze=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(!(!le||!ze)){k(null);try{const Et=await Fa(le.id),Ht=Et.find(Fn=>Fn.active)||Et[0];if(!Ht)return;const{panes:Xt,selectPaneId:mi}=await cN({paneId:Ht.id,dir:Se,windowId:le.id,api:{splitPane:rN},getPanes:Fa});bt(Fn=>{if(!Fn)return Fn;const va=Fn.windows.map(ws=>ws.id===le.id?{...ws,panes:Xt.length}:ws);return{...Fn,windows:va,window:le,panes:Xt,paneId:mi}}),Ml({sessionId:ze,windowId:le.id,paneId:mi}),Dt.current=((nt=Xt.find(Fn=>Fn.id===mi))==null?void 0:nt.width)??null,ae.current=null}catch(Et){if(xe(Et))return;window.alert(V("pane.splitFailed"))}}},[J,Be]),zs=U.useCallback(async le=>{var ze;if(!le)return;let Se=J==null?void 0:J.paneId;le.id!==((ze=J==null?void 0:J.window)==null?void 0:ze.id)?(k(null),Se=await on(le)):await new Promise(rt=>{const nt=()=>{clearTimeout(Et),window.removeEventListener("popstate",nt),rt()},Et=setTimeout(nt,80);window.addEventListener("popstate",nt),k(null)}),Se&&(L(le.id),M(Se))},[J,on]),Hr=(za=J==null?void 0:J.session)==null?void 0:za.name,Dr=(Ao=J==null?void 0:J.window)==null?void 0:Ao.id;U.useEffect(()=>{Nt(Hr&&Dr?om(Hr,Dr):[])},[Hr,Dr]);const ys=(Gl=J==null?void 0:J.session)==null?void 0:Gl.name,Ri=((Uo=J==null?void 0:J.window)==null?void 0:Uo.name)||((ql=J==null?void 0:J.window)==null?void 0:ql.id);U.useEffect(()=>{Pt(ys&&Ri?Q1(ys,Ri).length:0)},[ys,Ri]),U.useEffect(()=>{J!=null&&J.paneId&&E3(J.paneId)},[J==null?void 0:J.paneId]),U.useEffect(()=>{var ze;const le=J==null?void 0:J.paneId;if(!le)return;const Se=(ze=Te[le])==null?void 0:ze.ts;Se!=null&&Y0()[le]!==Se&&$n(K0(le,Se))},[J==null?void 0:J.paneId,Te]),U.useEffect(()=>{if(!DV())return;kV();let le=!1;return(async()=>{const Se=await RV();le||!Se||(ne(Se),de.activate("home"),F(!0))})(),()=>{le=!0}},[]),U.useEffect(()=>{if(r||typeof navigator>"u"||!("serviceWorker"in navigator))return;const le=async({session:rt,window:nt,pane:Et})=>{if(rt)try{const Xt=(await Fl()).find(mi=>mi.name===rt);Xt&&(_(!1),await hi(Xt,{window:nt,pane:Et}))}catch(Ht){xe(Ht)}},Se=rt=>{const nt=rt.data;nt&&(nt.type==="navigate"?le(nt):nt.type==="navigate-inbox"&&nt.id&&(Xn(!0),yt(nt.id)))},ze=()=>{const rt=Og();rt.session&&(rt.window||rt.pane)&&le(rt)};return navigator.serviceWorker.addEventListener("message",Se),window.addEventListener("hashchange",ze),()=>{navigator.serviceWorker.removeEventListener("message",Se),window.removeEventListener("hashchange",ze)}},[r,hi,Be]),U.useEffect(()=>{if(r)return;const le=Og();le.inbox&&(Xn(!0),le.inboxId&&yt(le.inboxId),history.replaceState(history.state,"","#"))},[r]),U.useEffect(()=>{if(r)return;let le=!0;const Se=()=>j3().then(rt=>{le&&(ni(rt),En(TM(rt.map(nt=>nt.id))))});Se();const ze=()=>{document.visibilityState==="visible"&&Se()};return document.addEventListener("visibilitychange",ze),()=>{le=!1,document.removeEventListener("visibilitychange",ze)}},[r,vn]);const br=U.useCallback(le=>{var nt,Et,Ht,Xt;(Et=(nt=Jn.current)==null?void 0:nt.wake)==null||Et.call(nt);const Se=(Ht=J==null?void 0:J.session)==null?void 0:Ht.name,ze=(Xt=J==null?void 0:J.window)==null?void 0:Xt.id;Se&&ze&&Nt(YM(Se,ze,le));const rt=F2(le);X(rt&&(J!=null&&J.paneId)?{...rt,paneId:J.paneId}:null)},[J]),xs=U.useCallback(le=>{Qe(am().includes(le)?$M(le):zM(le))},[]),kr=U.useCallback(le=>{var rt,nt;const Se=(rt=J==null?void 0:J.session)==null?void 0:rt.name,ze=(nt=J==null?void 0:J.window)==null?void 0:nt.id;Se&&ze&&Nt(KM(Se,ze,le))},[J]),Ti=((Kl=(Yl=J==null?void 0:J.panes)==null?void 0:Yl.find(le=>le.id===J.paneId))==null?void 0:Kl.cwd)||null,zr=g&&!!(J!=null&&J.paneId)&&!!((Gu=Te[J.paneId])!=null&&Gu.agent)&&re==="chat",ir=async le=>{if(mA(le)){const ze=le.split("/").pop()||le;if(de.tabs.some(Et=>Et.key===le)){de.activate(le),is(le),F(!0);return}const{url:rt,mtimeMs:nt}=await lN(le);de.openDoc(le,{type:"image",name:ze,content:rt,mtime:nt}),Q0({path:le,name:ze,type:"image",ts:Date.now()}),F(!0);return}const Se=await sN(le);de.openDoc(le,{type:Se.type,name:Se.name,content:Se.content,mtime:Se.mtimeMs}),Q0({path:le,name:Se.name,type:Se.type,ts:Date.now()}),F(!0)},fa=le=>{const Se=de.tabs.find(ze=>ze.key===le);(Se==null?void 0:Se.type)==="image"&&Se.content&&URL.revokeObjectURL(Se.content),de.closeTab(le)},is=le=>{const Se=de.tabs.find(ze=>ze.key===le);if(!(!Se||Se.type==="home")){if(Se.type==="image"){lN(le,Se.mtime??null).then(ze=>{if(ze.notModified)return;const rt=Se.content;de.refreshDoc(le,{content:ze.url,mtime:ze.mtimeMs}),rt&&URL.revokeObjectURL(rt)}).catch(()=>{});return}sN(le,Se.mtime??null).then(ze=>{ze.notModified||de.refreshDoc(le,{type:ze.type,name:ze.name,content:ze.content,mtime:ze.mtimeMs})}).catch(()=>{})}},$s=le=>{de.activate(le),is(le)},Li=()=>{F(!0),is(de.active)},z=le=>{const Se=/-> (\d+)/.exec((le==null?void 0:le.message)||""),ze=Se?Number(Se[1]):0;return V(ze===404?"app.docNotFound":ze===413?"app.docTooLarge":ze===400?"app.docUnsupported":"app.docOpenFailed")},ce=async le=>{if(vS(le)){try{await ir(le)}catch(ze){ve(z(ze))}return}const Se=eN(J==null?void 0:J.paneId)??Ti;if(Se)try{await ir(So(Se,le));return}catch{}te({rawPath:le})},K=async le=>{try{await ir(So(le,ee.rawPath))}catch(Se){ve(z(Se));return}J!=null&&J.paneId&&ZM(J.paneId,le),setTimeout(()=>te(null),0)},ue=(le,Se,ze)=>{(le==null?void 0:le.kind)==="url"?_e({port:le.port,path:le.urlPath,raw:le.raw,x:Se,y:ze}):ie({path:(le==null?void 0:le.path)??le,x:Se,y:ze})},ye=le=>{ie(null),ce(le)},[Le,Re]=U.useState(null),Xe=async()=>{const le=$;if(le)try{await Wn({port:le.port,path:le.path}),_e(null),Re(null)}catch{Re(V("localurl.notListening",{port:le.port}))}},at=()=>{_e(null),Re(null)};if(U.useEffect(()=>{if(!Y)return;const le=setTimeout(()=>ve(null),4e3);return()=>clearTimeout(le)},[Y]),U.useEffect(()=>{if(!se)return;const le=setTimeout(()=>B(null),3500);return()=>clearTimeout(le)},[se]),U.useEffect(()=>{if(r)return;const le=Eo();if(!le.length){Ee(!1);return}let Se=!1;return(async()=>{try{const ze=await Fl();if(Se||!ze.length)return;const rt=ze.filter(Xt=>le.includes(Xt.name));if(!rt.length)return;const nt=Og();let Et=nt.session?rt.find(Xt=>Xt.name===nt.session):null;const Ht=Et?{window:nt.window,pane:nt.pane}:null;if(!Et){const Xt=UM();Xt&&(Et=rt.find(mi=>mi.id===Xt))}Et||(Et=rt[0]),Se||await hi(Et,Ht)}catch(ze){xe(ze)}finally{Se||Ee(!1)}})(),()=>{Se=!0}},[r,hi]),Wg({fetch:()=>UA(Ie),apply:le=>Ge(le||{}),intervalMs:5e3,enabled:!r,deps:[Ie]}),U.useEffect(()=>{if(en!=null)return;const le=fN(Te);le>0&&(X0(le),kn(le))},[Te,en]),Wg({fetch:aN,apply:le=>ge(Array.isArray(le)?le:[]),intervalMs:15e3,enabled:!r}),r)return o.jsxDEV(E4,{onSaved:()=>{s(!1),Ee(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1046,columnNumber:12},this);const vt=b3(Te,zn,en??1/0),ct=x3(vt),Kt={};for(const le of Object.values(Te))le.window&&le.agent&&(Kt[le.window]=le.agent);const Ct={};for(const[le,Se]of Object.entries(Te))Se.agent&&(Ct[le]=Se.agent);const At=!!qh&&Mt!==qh,_n=!!(sn!=null&&sn.updateAvailable)&&sn.latest!==it,Mi=new Set(nn),rs=On.filter(le=>!Mi.has(le.id)).length,rr=On.length>0&&On[0].ts>gt,ss=At||_n||rr,sr=()=>{R(!0),sn!=null&&sn.latest&&(lA(sn.latest),cn(sn.latest))},pa=()=>{R(!1),Qt(!0),aA(qh),Ft(qh)};return o.jsxDEV("div",{className:"app","data-chat-tone":b,style:di?{transform:`translateY(-${di}px)`}:void 0,children:[o.jsxDEV("header",{className:"topbar",children:[o.jsxDEV("button",{className:"hamburger",onClick:()=>_(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1090,columnNumber:9},this),o.jsxDEV("span",{className:"session-name",...oi,children:(($r=J==null?void 0:J.session)==null?void 0:$r.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1091,columnNumber:9},this),St&&o.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>Vt(!0),"aria-label":V("app.preview"),title:V("app.openPreview"),children:o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1096,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1095,columnNumber:11},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>kt(!0),"aria-label":V("app.ideas"),title:V("app.ideas"),disabled:!J,children:[o.jsxDEV(ZA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1101,columnNumber:11},this),Ot>0&&o.jsxDEV("span",{className:"idea-badge",children:Ot},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1102,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1099,columnNumber:9},this),o.jsxDEV(V4,{rows:vt,top:ct,open:Pe,onToggle:()=>be(le=>!le),onClose:()=>be(!1),onSelectRow:jr,onMarkAllRead:Qn,hooksStatus:Ae,onEnableHooks:He},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1104,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>S(!0),"aria-label":V("usage.title"),title:V("usage.title"),children:o.jsxDEV(r3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1115,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1115,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:Li,"aria-label":V("app.files"),title:V("app.files"),children:o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1116,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1116,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>I(!0),"aria-label":"Git",title:"Git",children:o.jsxDEV(lS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1117,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1117,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:sr,"aria-label":V("app.settings"),title:V("app.settings"),children:[o.jsxDEV(cm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1119,columnNumber:11},this),ss&&o.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1120,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1118,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1089,columnNumber:7},this),o.jsxDEV(O4,{open:f,onClose:()=>S(!1),onAuthFail:Be},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1123,columnNumber:7},this),o.jsxDEV(L4,{open:E,onClose:()=>R(!1),chatTone:b,onChatTone:u,chatLensEnabled:g,onChatLensEnabled:h,hooksStatus:Ae,onEnableHooks:He,termRef:Jn,getColCount:()=>{var le,Se;return Dt.current??((Se=(le=Jn.current)==null?void 0:le.getSize())==null?void 0:Se.cols)},onColAdjust:le=>gr(le),onColRestore:Fs,onOpenChangelog:pa,changelogUnread:At,notifUnread:rr,onOpenInbox:Rt,updateInfo:sn,activePreview:_t,pane:J==null?void 0:J.paneId,lastPreviewDir:MM((qu=J==null?void 0:J.window)==null?void 0:qu.id),dynamicEnabled:Ce,onStartPreview:An,onStartDynamicPreview:Yt,onOpenPreview:hn,onRenew:Cr,onStop:Gi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1128,columnNumber:7},this),o.jsxDEV(wV,{open:dn,onClose:()=>Qt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1156,columnNumber:7},this),o.jsxDEV(k3,{open:vn,detailId:oe,items:On,readIds:nn,onOpenDetail:qt,onCloseDetail:bn,onClose:Nn,onDelete:Vn,onMarkAllRead:ui,unreadCount:rs},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1157,columnNumber:7},this),o.jsxDEV(H3,{open:d,currentSessionName:(Oo=J==null?void 0:J.session)==null?void 0:Oo.name,bound:Ie,onSelectSession:_r,onUnbind:li,onBind:()=>y(!0),onClose:()=>_(!1),onLogout:pr,orphans:Ye,onTakeoverRequest:je},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1169,columnNumber:7},this),o.jsxDEV(q4,{open:C,bound:Ie,onBound:Un,onClose:()=>y(!1),onAuthFail:Be,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1181,columnNumber:7},this),o.jsxDEV(K4,{open:l,onClose:()=>v(!1),onCreate:ns,paneId:J==null?void 0:J.paneId,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1189,columnNumber:7},this),o.jsxDEV(J4,{open:!!m,title:(m==null?void 0:m.kind)==="session"?V("app.renameSession"):V("app.renameWindow"),currentName:(m==null?void 0:m.name)||"",onClose:()=>p(null),onSubmit:nr,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1196,columnNumber:7},this),o.jsxDEV(P4,{open:!!Ze,orphan:Ze,onConfirm:ma,onClose:()=>je(null),inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1204,columnNumber:7},this),o.jsxDEV(gm,{open:!!N,title:N?N.name||N.id:"",onClose:()=>k(null),actions:N?[...N.panes===1?[{key:"split-h",icon:o.jsxDEV(uN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1220,columnNumber:37},this),label:V("pane.splitH"),onClick:()=>ki(N,"h")},{key:"split-v",icon:o.jsxDEV(dN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1221,columnNumber:37},this),label:V("pane.splitV"),onClick:()=>ki(N,"v")}]:[],...N.panes>1?[{key:"manage-split",icon:o.jsxDEV(c3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1225,columnNumber:42},this),label:V("pane.manage"),onClick:()=>zs(N)}]:[],...J&&J.windows.length>1?[[{key:"move-left",label:V("app.moveLeft"),disabled:!Ng(J.windows,N.id,"left"),onClick:()=>Fr("left")},{key:"move-right",label:V("app.moveRight"),disabled:!Ng(J.windows,N.id,"right"),onClick:()=>Fr("right")}]]:[],{key:"rename",label:V("common.rename"),onClick:()=>{p({kind:"window",id:N.id,name:N.name||""}),k(null)}},{key:"delete",label:V("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:J&&J.windows.length<=1?V("app.deleteLastWindowConfirm"):V("app.deleteConfirm"),onClick:Tt}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1211,columnNumber:7},this),o.jsxDEV(gm,{open:!!j,title:(()=>{if(!j||!J)return"";const le=J.panes.findIndex(rt=>rt.id===j),Se=J.panes[le];return Se?`${le<y1.length?y1[le]:String(le+1)} ${Se.command||Se.id}`:""})(),onClose:()=>M(null),actions:j?[{key:"split-h",icon:o.jsxDEV(uN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1269,columnNumber:35},this),label:V("pane.splitH"),onClick:()=>Bn(j,"h")},{key:"split-v",icon:o.jsxDEV(dN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1270,columnNumber:35},this),label:V("pane.splitV"),onClick:()=>Bn(j,"v")},{key:"close",icon:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1272,columnNumber:33},this),label:V("pane.close"),danger:!0,confirm:!0,confirmLabel:V("pane.closeConfirm"),onClick:Hs}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1257,columnNumber:7},this),o.jsxDEV(cV,{open:A,pane:J==null?void 0:J.paneId,windowId:(Vo=J==null?void 0:J.window)==null?void 0:Vo.id,tabs:de.tabs,active:de.active,onActivate:$s,onCloseTab:fa,onMinimize:()=>F(!1),onOpenDoc:ce,pendingShare:G,onPendingConsumed:()=>ne(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1277,columnNumber:7},this),o.jsxDEV(hV,{open:O,pane:J==null?void 0:J.paneId,windowId:(Po=J==null?void 0:J.window)==null?void 0:Po.id,inset:di,onClose:()=>I(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1290,columnNumber:7},this),o.jsxDEV(gV,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1293,columnNumber:7},this),o.jsxDEV(F4,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1295,columnNumber:7},this),o.jsxDEV(v3,{open:Je&&!!St,tabs:Jt,activeName:yn,domain:Q,onSwitchTab:Zn,onCloseTab:Wi,onRenew:Cr,onStop:Gi,onMinimize:()=>Vt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1297,columnNumber:7},this),Y&&o.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>ve(null),children:Y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1309,columnNumber:9},this),he&&o.jsxDEV("div",{className:"exit-toast",role:"status",children:V("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1312,columnNumber:9},this),se&&o.jsxDEV("div",{className:"handoff-toast",role:"status",children:V("chat.slash.handedOff",{cmd:se})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1315,columnNumber:9},this),me&&o.jsxDEV(_1,{path:me.path,x:me.x,y:me.y,onOpen:ye,onClose:()=>ie(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1318,columnNumber:9},this),$&&o.jsxDEV(_1,{icon:o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1328,columnNumber:17},this),name:V("localurl.title"),path:$.raw,openLabel:V("localurl.open"),note:Le??(Ce?void 0:V("localurl.disabled")),disabled:!Ce,x:$.x,y:$.y,onOpen:Xe,onClose:at},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1327,columnNumber:9},this),o.jsxDEV(xV,{open:wt,session:(Yu=J==null?void 0:J.session)==null?void 0:Yu.name,window:(($a=J==null?void 0:J.window)==null?void 0:$a.name)||((Xl=J==null?void 0:J.window)==null?void 0:Xl.id),onClose:()=>kt(!1),onSend:le=>{var Se;(Se=ii.current)==null||Se.fill(le),kt(!1)},onCountChange:Pt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1340,columnNumber:7},this),o.jsxDEV(Wu,{open:!!ee,seedCwd:eN(J==null?void 0:J.paneId)??Ti??null,pane:(J==null?void 0:J.paneId)??null,hint:ee?o.jsxDEV(o.Fragment,{children:[V("app.cannotLocate")," ",o.jsxDEV("code",{children:ee.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1352,columnNumber:54},this),V("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1352,columnNumber:28},this):null,onPick:K,onClose:()=>te(null),inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1348,columnNumber:7},this),J?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(tU,{windows:J.windows,windowAgents:Kt,paneAgents:Ct,currentAgent:(Ai=Te[J.paneId])==null?void 0:Ai.agent,currentWindowId:J.window.id,panes:J.panes,currentPaneId:J.paneId,onSelectWindow:on,onSelectPane:Gn,onNewWindow:()=>v(!0),onManageWindow:le=>k(le),onManagePane:le=>M(le),paneSheetOpen:!!j,openMapFor:D,onMapOpened:()=>L(null),trackWindowId:N==null?void 0:N.id,lens:re,chatLensEnabled:g,onLensChange:le=>{We(le),localStorage.setItem("tw_lens_"+J.paneId,le)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1359,columnNumber:11},this),J.paneId&&(zr?o.jsxDEV(C4,{pane:J.paneId,kind:(Wr=Te[J.paneId])==null?void 0:Wr.kind,msg:(ei=Te[J.paneId])==null?void 0:ei.msg,onAuthFail:Be,slashEcho:W&&W.paneId===J.paneId?W:null,onSlashEchoDone:()=>X(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1382,columnNumber:15},this):o.jsxDEV($U,{ref:Jn,pane:J.paneId,inset:di,onAuthFail:Be,onDocLinkTap:ue,onTap:()=>{var le;return(le=ii.current)==null?void 0:le.hideKeyboard()}},J.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1386,columnNumber:15},this)),zr?o.jsxDEV(G2,{pane:J.paneId,kind:(Gr=Te[J.paneId])==null?void 0:Gr.kind,cwd:Ti,onKey:Er,onAuthFail:Be,onSent:br,onInteractiveSlash:le=>{We("terminal"),localStorage.setItem("tw_lens_"+J.paneId,"terminal"),B(le)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1399,columnNumber:13},this):o.jsxDEV(B2,{ref:ii,pane:J.paneId,onAuthFail:Be,onKey:Er,onText:vr,cwd:Ti,agent:(Bo=Te[J.paneId])==null?void 0:Bo.agent,windowId:(Wa=J.window)==null?void 0:Wa.id,recent:st,favorites:tt,onSent:br,onToggleFav:xs,onRemoveRecent:kr,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1409,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1358,columnNumber:9},this):Gt?o.jsxDEV("div",{className:"loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1428,columnNumber:9},this):Ie.length===0?o.jsxDEV("button",{className:"empty-cta",onClick:()=>y(!0),children:[V("app.noBoundSession"),o.jsxDEV("span",{children:V("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1431,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1430,columnNumber:9},this):o.jsxDEV("div",{className:"loading",children:V("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1434,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1088,columnNumber:5},this)}E1(document.getElementById("root")).render(o.jsxDEV(TV,{},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 r=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(d=>d.media==="print"),s=r.length?new Promise(d=>{let _=r.length;r.forEach(E=>E.addEventListener("load",()=>{--_||d()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>s.then(()=>window.__hideBootSplash())))}