handmux 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,330 @@
1
+ var AL=Object.defineProperty;var dx=o=>{throw TypeError(o)};var ML=(o,s,d)=>s in o?AL(o,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):o[s]=d;var Wn=(o,s,d)=>ML(o,typeof s!="symbol"?s+"":s,d),UL=(o,s,d)=>s.has(o)||dx("Cannot "+d);var hx=(o,s,d)=>s.has(o)?dx("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(o):s.set(o,d);var fh=(o,s,d)=>(UL(o,s,"access private method"),d);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const j of document.querySelectorAll('link[rel="modulepreload"]'))w(j);new MutationObserver(j=>{for(const L of j)if(L.type==="childList")for(const y of L.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&w(y)}).observe(document,{childList:!0,subtree:!0});function d(j){const L={};return j.integrity&&(L.integrity=j.integrity),j.referrerPolicy&&(L.referrerPolicy=j.referrerPolicy),j.crossOrigin==="use-credentials"?L.credentials="include":j.crossOrigin==="anonymous"?L.credentials="omit":L.credentials="same-origin",L}function w(j){if(j.ep)return;j.ep=!0;const L=d(j);fetch(j.href,L)}})();var zS={exports:{}},dg={},$S={exports:{}},jh={exports:{}};jh.exports;(function(o,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",w=Symbol.for("react.element"),j=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),g=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),c=Symbol.iterator,m="@@iterator";function f(z){if(z===null||typeof z!="object")return null;var re=c&&z[c]||z[m];return typeof re=="function"?re:null}var v={current:null},N={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},E={current:null},A={},D=null;function R(z){D=z}A.setExtraStackFrame=function(z){D=z},A.getCurrentStack=null,A.getStackAddendum=function(){var z="";D&&(z+=D);var re=A.getCurrentStack;return re&&(z+=re()||""),z};var M=!1,H=!1,U=!1,I=!1,G=!1,ne={ReactCurrentDispatcher:v,ReactCurrentBatchConfig:N,ReactCurrentOwner:E};ne.ReactDebugCurrentFrame=A,ne.ReactCurrentActQueue=T;function Q(z){{for(var re=arguments.length,q=new Array(re>1?re-1:0),ce=1;ce<re;ce++)q[ce-1]=arguments[ce];ie("warn",z,q)}}function te(z){{for(var re=arguments.length,q=new Array(re>1?re-1:0),ce=1;ce<re;ce++)q[ce-1]=arguments[ce];ie("error",z,q)}}function ie(z,re,q){{var ce=ne.ReactDebugCurrentFrame,ge=ce.getStackAddendum();ge!==""&&(re+="%s",q=q.concat([ge]));var Le=q.map(function(Te){return String(Te)});Le.unshift("Warning: "+re),Function.prototype.apply.call(console[z],console,Le)}}var P={};function $(z,re){{var q=z.constructor,ce=q&&(q.displayName||q.name)||"ReactClass",ge=ce+"."+re;if(P[ge])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.",re,ce),P[ge]=!0}}var J={isMounted:function(z){return!1},enqueueForceUpdate:function(z,re,q){$(z,"forceUpdate")},enqueueReplaceState:function(z,re,q,ce){$(z,"replaceState")},enqueueSetState:function(z,re,q,ce){$(z,"setState")}},ee=Object.assign,we={};Object.freeze(we);function Se(z,re,q){this.props=z,this.context=re,this.refs=we,this.updater=q||J}Se.prototype.isReactComponent={},Se.prototype.setState=function(z,re){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,re,"setState")},Se.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};{var Z={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)."]},ke=function(z,re){Object.defineProperty(Se.prototype,z,{get:function(){Q("%s(...) is deprecated in plain JavaScript React classes. %s",re[0],re[1])}})};for(var se in Z)Z.hasOwnProperty(se)&&ke(se,Z[se])}function W(){}W.prototype=Se.prototype;function _e(z,re,q){this.props=z,this.context=re,this.refs=we,this.updater=q||J}var ue=_e.prototype=new W;ue.constructor=_e,ee(ue,Se.prototype),ue.isPureReactComponent=!0;function Ie(){var z={current:null};return Object.seal(z),z}var Ue=Array.isArray;function Xe(z){return Ue(z)}function Je(z){{var re=typeof Symbol=="function"&&Symbol.toStringTag,q=re&&z[Symbol.toStringTag]||z.constructor.name||"Object";return q}}function rt(z){try{return Nt(z),!1}catch{return!0}}function Nt(z){return""+z}function Ze(z){if(rt(z))return te("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(z)),Nt(z)}function qt(z,re,q){var ce=z.displayName;if(ce)return ce;var ge=re.displayName||re.name||"";return ge!==""?q+"("+ge+")":q}function Xt(z){return z.displayName||"Context"}function lt(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 L:return"Fragment";case j:return"Portal";case r:return"Profiler";case y:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList"}if(typeof z=="object")switch(z.$$typeof){case g:var re=z;return Xt(re)+".Consumer";case l:var q=z;return Xt(q._context)+".Provider";case _:return qt(z,z.render,"ForwardRef");case S:var ce=z.displayName||null;return ce!==null?ce:lt(z.type)||"Memo";case C:{var ge=z,Le=ge._payload,Te=ge._init;try{return lt(Te(Le))}catch{return null}}}return null}var Qe=Object.prototype.hasOwnProperty,nt={key:!0,ref:!0,__self:!0,__source:!0},ae,Fe,et;et={};function ve(z){if(Qe.call(z,"ref")){var re=Object.getOwnPropertyDescriptor(z,"ref").get;if(re&&re.isReactWarning)return!1}return z.ref!==void 0}function Ye(z){if(Qe.call(z,"key")){var re=Object.getOwnPropertyDescriptor(z,"key").get;if(re&&re.isReactWarning)return!1}return z.key!==void 0}function Ee(z,re){var q=function(){ae||(ae=!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)",re))};q.isReactWarning=!0,Object.defineProperty(z,"key",{get:q,configurable:!0})}function pe(z,re){var q=function(){Fe||(Fe=!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)",re))};q.isReactWarning=!0,Object.defineProperty(z,"ref",{get:q,configurable:!0})}function me(z){if(typeof z.ref=="string"&&E.current&&z.__self&&E.current.stateNode!==z.__self){var re=lt(E.current.type);et[re]||(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',re,z.ref),et[re]=!0)}}var Re=function(z,re,q,ce,ge,Le,Te){var $e={$$typeof:w,type:z,key:re,ref:q,props:Te,_owner:Le};return $e._store={},Object.defineProperty($e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty($e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty($e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ge}),Object.freeze&&(Object.freeze($e.props),Object.freeze($e)),$e};function Oe(z,re,q){var ce,ge={},Le=null,Te=null,$e=null,it=null;if(re!=null){ve(re)&&(Te=re.ref,me(re)),Ye(re)&&(Ze(re.key),Le=""+re.key),$e=re.__self===void 0?null:re.__self,it=re.__source===void 0?null:re.__source;for(ce in re)Qe.call(re,ce)&&!nt.hasOwnProperty(ce)&&(ge[ce]=re[ce])}var _t=arguments.length-2;if(_t===1)ge.children=q;else if(_t>1){for(var ct=Array(_t),Jt=0;Jt<_t;Jt++)ct[Jt]=arguments[Jt+2];Object.freeze&&Object.freeze(ct),ge.children=ct}if(z&&z.defaultProps){var jt=z.defaultProps;for(ce in jt)ge[ce]===void 0&&(ge[ce]=jt[ce])}if(Le||Te){var It=typeof z=="function"?z.displayName||z.name||"Unknown":z;Le&&Ee(ge,It),Te&&pe(ge,It)}return Re(z,Le,Te,$e,it,E.current,ge)}function bt(z,re){var q=Re(z.type,re,z.ref,z._self,z._source,z._owner,z.props);return q}function kt(z,re,q){if(z==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ce,ge=ee({},z.props),Le=z.key,Te=z.ref,$e=z._self,it=z._source,_t=z._owner;if(re!=null){ve(re)&&(Te=re.ref,_t=E.current),Ye(re)&&(Ze(re.key),Le=""+re.key);var ct;z.type&&z.type.defaultProps&&(ct=z.type.defaultProps);for(ce in re)Qe.call(re,ce)&&!nt.hasOwnProperty(ce)&&(re[ce]===void 0&&ct!==void 0?ge[ce]=ct[ce]:ge[ce]=re[ce])}var Jt=arguments.length-2;if(Jt===1)ge.children=q;else if(Jt>1){for(var jt=Array(Jt),It=0;It<Jt;It++)jt[It]=arguments[It+2];ge.children=jt}return Re(z.type,Le,Te,$e,it,_t,ge)}function Ct(z){return typeof z=="object"&&z!==null&&z.$$typeof===w}var Pt=".",Qt=":";function Ft(z){var re=/[=:]/g,q={"=":"=0",":":"=2"},ce=z.replace(re,function(ge){return q[ge]});return"$"+ce}var mt=!1,St=/\/+/g;function Ln(z){return z.replace(St,"$&/")}function An(z,re){return typeof z=="object"&&z!==null&&z.key!=null?(Ze(z.key),Ft(""+z.key)):re.toString(36)}function In(z,re,q,ce,ge){var Le=typeof z;(Le==="undefined"||Le==="boolean")&&(z=null);var Te=!1;if(z===null)Te=!0;else switch(Le){case"string":case"number":Te=!0;break;case"object":switch(z.$$typeof){case w:case j:Te=!0}}if(Te){var $e=z,it=ge($e),_t=ce===""?Pt+An($e,0):ce;if(Xe(it)){var ct="";_t!=null&&(ct=Ln(_t)+"/"),In(it,re,ct,"",function(qh){return qh})}else it!=null&&(Ct(it)&&(it.key&&(!$e||$e.key!==it.key)&&Ze(it.key),it=bt(it,q+(it.key&&(!$e||$e.key!==it.key)?Ln(""+it.key)+"/":"")+_t)),re.push(it));return 1}var Jt,jt,It=0,wn=ce===""?Pt:ce+Qt;if(Xe(z))for(var Xi=0;Xi<z.length;Xi++)Jt=z[Xi],jt=wn+An(Jt,Xi),It+=In(Jt,re,q,jt,ge);else{var ks=f(z);if(typeof ks=="function"){var Ur=z;ks===Ur.entries&&(mt||Q("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),mt=!0);for(var Rs=ks.call(Ur),_r,fo=0;!(_r=Rs.next()).done;)Jt=_r.value,jt=wn+An(Jt,fo++),It+=In(Jt,re,q,jt,ge)}else if(Le==="object"){var mu=String(z);throw new Error("Objects are not valid as a React child (found: "+(mu==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":mu)+"). If you meant to render a collection of children, use an array instead.")}}return It}function ri(z,re,q){if(z==null)return z;var ce=[],ge=0;return In(z,ce,"","",function(Le){return re.call(q,Le,ge++)}),ce}function cn(z){var re=0;return ri(z,function(){re++}),re}function ai(z,re,q){ri(z,function(){re.apply(this,arguments)},q)}function mn(z){return ri(z,function(re){return re})||[]}function Gn(z){if(!Ct(z))throw new Error("React.Children.only expected to receive a single React element child.");return z}function Ei(z){var re={$$typeof:g,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};re.Provider={$$typeof:l,_context:re};var q=!1,ce=!1,ge=!1;{var Le={$$typeof:g,_context:re};Object.defineProperties(Le,{Provider:{get:function(){return ce||(ce=!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?")),re.Provider},set:function(Te){re.Provider=Te}},_currentValue:{get:function(){return re._currentValue},set:function(Te){re._currentValue=Te}},_currentValue2:{get:function(){return re._currentValue2},set:function(Te){re._currentValue2=Te}},_threadCount:{get:function(){return re._threadCount},set:function(Te){re._threadCount=Te}},Consumer:{get:function(){return q||(q=!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?")),re.Consumer}},displayName:{get:function(){return re.displayName},set:function(Te){ge||(Q("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Te),ge=!0)}}}),re.Consumer=Le}return re._currentRenderer=null,re._currentRenderer2=null,re}var Zn=-1,rn=0,an=1,Mn=2;function hi(z){if(z._status===Zn){var re=z._result,q=re();if(q.then(function(Le){if(z._status===rn||z._status===Zn){var Te=z;Te._status=an,Te._result=Le}},function(Le){if(z._status===rn||z._status===Zn){var Te=z;Te._status=Mn,Te._result=Le}}),z._status===Zn){var ce=z;ce._status=rn,ce._result=q}}if(z._status===an){var ge=z._result;return ge===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?`,ge),"default"in ge||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'))`,ge),ge.default}else throw z._result}function le(z){var re={_status:Zn,_result:z},q={$$typeof:C,_payload:re,_init:hi};{var ce,ge;Object.defineProperties(q,{defaultProps:{configurable:!0,get:function(){return ce},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."),ce=Le,Object.defineProperty(q,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ge},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."),ge=Le,Object.defineProperty(q,"propTypes",{enumerable:!0})}}})}return q}function Ve(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 re={$$typeof:_,render:z};{var q;Object.defineProperty(re,"displayName",{enumerable:!1,configurable:!0,get:function(){return q},set:function(ce){q=ce,!z.name&&!z.displayName&&(z.displayName=ce)}})}return re}var We;We=Symbol.for("react.module.reference");function gt(z){return!!(typeof z=="string"||typeof z=="function"||z===L||z===r||G||z===y||z===u||z===p||I||z===b||M||H||U||typeof z=="object"&&z!==null&&(z.$$typeof===C||z.$$typeof===S||z.$$typeof===l||z.$$typeof===g||z.$$typeof===_||z.$$typeof===We||z.getModuleId!==void 0))}function yt(z,re){gt(z)||te("memo: The first argument must be a component. Instead received: %s",z===null?"null":typeof z);var q={$$typeof:S,type:z,compare:re===void 0?null:re};{var ce;Object.defineProperty(q,"displayName",{enumerable:!1,configurable:!0,get:function(){return ce},set:function(ge){ce=ge,!z.name&&!z.displayName&&(z.displayName=ge)}})}return q}function pt(){var z=v.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 re=pt();if(z._context!==void 0){var q=z._context;q.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?"):q.Provider===z&&te("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return re.useContext(z)}function wt(z){var re=pt();return re.useState(z)}function vn(z,re,q){var ce=pt();return ce.useReducer(z,re,q)}function en(z){var re=pt();return re.useRef(z)}function Yt(z,re){var q=pt();return q.useEffect(z,re)}function gn(z,re){var q=pt();return q.useInsertionEffect(z,re)}function yn(z,re){var q=pt();return q.useLayoutEffect(z,re)}function oi(z,re){var q=pt();return q.useCallback(z,re)}function Un(z,re){var q=pt();return q.useMemo(z,re)}function fi(z,re,q){var ce=pt();return ce.useImperativeHandle(z,re,q)}function qn(z,re){{var q=pt();return q.useDebugValue(z,re)}}function Bt(){var z=pt();return z.useTransition()}function oe(z){var re=pt();return re.useDeferredValue(z)}function ze(){var z=pt();return z.useId()}function je(z,re,q){var ce=pt();return ce.useSyncExternalStore(z,re,q)}var X=0,Ne,qe,Ut,vt,Et,Kt,pn;function on(){}on.__reactDisabledLog=!0;function Rn(){{if(X===0){Ne=console.log,qe=console.info,Ut=console.warn,vt=console.error,Et=console.group,Kt=console.groupCollapsed,pn=console.groupEnd;var z={configurable:!0,enumerable:!0,value:on,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}X++}}function Wt(){{if(X--,X===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ee({},z,{value:Ne}),info:ee({},z,{value:qe}),warn:ee({},z,{value:Ut}),error:ee({},z,{value:vt}),group:ee({},z,{value:Et}),groupCollapsed:ee({},z,{value:Kt}),groupEnd:ee({},z,{value:pn})})}X<0&&te("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Vn=ne.ReactCurrentDispatcher,Kn;function Di(z,re,q){{if(Kn===void 0)try{throw Error()}catch(ge){var ce=ge.stack.trim().match(/\n( *(at )?)/);Kn=ce&&ce[1]||""}return`
22
+ `+Kn+z}}var Ii=!1,Tr;{var ar=typeof WeakMap=="function"?WeakMap:Map;Tr=new ar}function Wr(z,re){if(!z||Ii)return"";{var q=Tr.get(z);if(q!==void 0)return q}var ce;Ii=!0;var ge=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Le;Le=Vn.current,Vn.current=null,Rn();try{if(re){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(wn){ce=wn}Reflect.construct(z,[],Te)}else{try{Te.call()}catch(wn){ce=wn}z.call(Te.prototype)}}else{try{throw Error()}catch(wn){ce=wn}z()}}catch(wn){if(wn&&ce&&typeof wn.stack=="string"){for(var $e=wn.stack.split(`
23
+ `),it=ce.stack.split(`
24
+ `),_t=$e.length-1,ct=it.length-1;_t>=1&&ct>=0&&$e[_t]!==it[ct];)ct--;for(;_t>=1&&ct>=0;_t--,ct--)if($e[_t]!==it[ct]){if(_t!==1||ct!==1)do if(_t--,ct--,ct<0||$e[_t]!==it[ct]){var Jt=`
25
+ `+$e[_t].replace(" at new "," at ");return z.displayName&&Jt.includes("<anonymous>")&&(Jt=Jt.replace("<anonymous>",z.displayName)),typeof z=="function"&&Tr.set(z,Jt),Jt}while(_t>=1&&ct>=0);break}}}finally{Ii=!1,Vn.current=Le,Wt(),Error.prepareStackTrace=ge}var jt=z?z.displayName||z.name:"",It=jt?Di(jt):"";return typeof z=="function"&&Tr.set(z,It),It}function vr(z,re,q){return Wr(z,!1)}function or(z){var re=z.prototype;return!!(re&&re.isReactComponent)}function qi(z,re,q){if(z==null)return"";if(typeof z=="function")return Wr(z,or(z));if(typeof z=="string")return Di(z);switch(z){case u:return Di("Suspense");case p:return Di("SuspenseList")}if(typeof z=="object")switch(z.$$typeof){case _:return vr(z.render);case S:return qi(z.type,re,q);case C:{var ce=z,ge=ce._payload,Le=ce._init;try{return qi(Le(ge),re,q)}catch{}}}return""}var os={},Lr=ne.ReactDebugCurrentFrame;function un(z){if(z){var re=z._owner,q=qi(z.type,z._source,re?re.type:null);Lr.setExtraStackFrame(q)}else Lr.setExtraStackFrame(null)}function Gr(z,re,q,ce,ge){{var Le=Function.call.bind(Qe);for(var Te in z)if(Le(z,Te)){var $e=void 0;try{if(typeof z[Te]!="function"){var it=Error((ce||"React class")+": "+q+" type `"+Te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[Te]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw it.name="Invariant Violation",it}$e=z[Te](re,Te,ce,q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_t){$e=_t}$e&&!($e instanceof Error)&&(un(ge),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).",ce||"React class",q,Te,typeof $e),un(null)),$e instanceof Error&&!($e.message in os)&&(os[$e.message]=!0,un(ge),te("Failed %s type: %s",q,$e.message),un(null))}}}function Ki(z){if(z){var re=z._owner,q=qi(z.type,z._source,re?re.type:null);R(q)}else R(null)}var Tt;Tt=!1;function Ar(){if(E.current){var z=lt(E.current.type);if(z)return`
26
+
27
+ Check the render method of \``+z+"`."}return""}function Qn(z){if(z!==void 0){var re=z.fileName.replace(/^.*[\\\/]/,""),q=z.lineNumber;return`
28
+
29
+ Check your code at `+re+":"+q+"."}return""}function gr(z){return z!=null?Qn(z.__source):""}var lr={};function Ds(z){var re=Ar();if(!re){var q=typeof z=="string"?z:z.displayName||z.name;q&&(re=`
30
+
31
+ Check the top-level render call using <`+q+">.")}return re}function Yn(z,re){if(!(!z._store||z._store.validated||z.key!=null)){z._store.validated=!0;var q=Ds(re);if(!lr[q]){lr[q]=!0;var ce="";z&&z._owner&&z._owner!==E.current&&(ce=" It was passed a child from "+lt(z._owner.type)+"."),Ki(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.',q,ce),Ki(null)}}}function Cn(z,re){if(typeof z=="object"){if(Xe(z))for(var q=0;q<z.length;q++){var ce=z[q];Ct(ce)&&Yn(ce,re)}else if(Ct(z))z._store&&(z._store.validated=!0);else if(z){var ge=f(z);if(typeof ge=="function"&&ge!==z.entries)for(var Le=ge.call(z),Te;!(Te=Le.next()).done;)Ct(Te.value)&&Yn(Te.value,re)}}}function ei(z){{var re=z.type;if(re==null||typeof re=="string")return;var q;if(typeof re=="function")q=re.propTypes;else if(typeof re=="object"&&(re.$$typeof===_||re.$$typeof===S))q=re.propTypes;else return;if(q){var ce=lt(re);Gr(q,z.props,"prop",ce,z)}else if(re.PropTypes!==void 0&&!Tt){Tt=!0;var ge=lt(re);te("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ge||"Unknown")}typeof re.getDefaultProps=="function"&&!re.getDefaultProps.isReactClassApproved&&te("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xn(z){{for(var re=Object.keys(z.props),q=0;q<re.length;q++){var ce=re[q];if(ce!=="children"&&ce!=="key"){Ki(z),te("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),Ki(null);break}}z.ref!==null&&(Ki(z),te("Invalid attribute `ref` supplied to `React.Fragment`."),Ki(null))}}function Fn(z,re,q){var ce=gt(z);if(!ce){var ge="";(z===void 0||typeof z=="object"&&z!==null&&Object.keys(z).length===0)&&(ge+=" 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=gr(re);Le?ge+=Le:ge+=Ar();var Te;z===null?Te="null":Xe(z)?Te="array":z!==void 0&&z.$$typeof===w?(Te="<"+(lt(z.type)||"Unknown")+" />",ge=" Did you accidentally export a JSX literal instead of a component?"):Te=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",Te,ge)}var $e=Oe.apply(this,arguments);if($e==null)return $e;if(ce)for(var it=2;it<arguments.length;it++)Cn(arguments[it],z);return z===L?Xn($e):ei($e),$e}var On=!1;function ls(z){var re=Fn.bind(null,z);return re.type=z,On||(On=!0,Q("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(re,"type",{enumerable:!1,get:function(){return Q("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:z}),z}}),re}function ji(z,re,q){for(var ce=kt.apply(this,arguments),ge=2;ge<arguments.length;ge++)Cn(arguments[ge],ce.type);return ei(ce),ce}function cs(z,re){var q=N.transition;N.transition={};var ce=N.transition;N.transition._updatedFibers=new Set;try{z()}finally{if(N.transition=q,q===null&&ce._updatedFibers){var ge=ce._updatedFibers.size;ge>10&&Q("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."),ce._updatedFibers.clear()}}}var Yr=!1,Mr=null;function js(z){if(Mr===null)try{var re=("require"+Math.random()).slice(0,7),q=o&&o[re];Mr=q.call(o,"timers").setImmediate}catch{Mr=function(ge){Yr===!1&&(Yr=!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=ge,Le.port2.postMessage(void 0)}}return Mr(z)}var Vi=0,he=!1;function xe(z){{var re=Vi;Vi++,T.current===null&&(T.current=[]);var q=T.isBatchingLegacy,ce;try{if(T.isBatchingLegacy=!0,ce=z(),!q&&T.didScheduleLegacyUpdate){var ge=T.current;ge!==null&&(T.didScheduleLegacyUpdate=!1,ht(ge))}}catch(jt){throw Be(re),jt}finally{T.isBatchingLegacy=q}if(ce!==null&&typeof ce=="object"&&typeof ce.then=="function"){var Le=ce,Te=!1,$e={then:function(jt,It){Te=!0,Le.then(function(wn){Be(re),Vi===0?Ke(wn,jt,It):jt(wn)},function(wn){Be(re),It(wn)})}};return!he&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Te||(he=!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 () => ...);"))}),$e}else{var it=ce;if(Be(re),Vi===0){var _t=T.current;_t!==null&&(ht(_t),T.current=null);var ct={then:function(jt,It){T.current===null?(T.current=[],Ke(it,jt,It)):jt(it)}};return ct}else{var Jt={then:function(jt,It){jt(it)}};return Jt}}}}function Be(z){z!==Vi-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. "),Vi=z}function Ke(z,re,q){{var ce=T.current;if(ce!==null)try{ht(ce),js(function(){ce.length===0?(T.current=null,re(z)):Ke(z,re,q)})}catch(ge){q(ge)}else re(z)}}var tt=!1;function ht(z){if(!tt){tt=!0;var re=0;try{for(;re<z.length;re++){var q=z[re];do q=q(!0);while(q!==null)}z.length=0}catch(ce){throw z=z.slice(re+1),ce}finally{tt=!1}}}var At=Fn,Ht=ji,zn=ls,tn={map:ri,forEach:ai,count:cn,toArray:mn,only:Gn};s.Children=tn,s.Component=Se,s.Fragment=L,s.Profiler=r,s.PureComponent=_e,s.StrictMode=y,s.Suspense=u,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,s.act=xe,s.cloneElement=Ht,s.createContext=Ei,s.createElement=At,s.createFactory=zn,s.createRef=Ie,s.forwardRef=Ve,s.isValidElement=Ct,s.lazy=le,s.memo=yt,s.startTransition=cs,s.unstable_act=xe,s.useCallback=oi,s.useContext=Rt,s.useDebugValue=qn,s.useDeferredValue=oe,s.useEffect=Yt,s.useId=ze,s.useImperativeHandle=fi,s.useInsertionEffect=gn,s.useLayoutEffect=yn,s.useMemo=Un,s.useReducer=vn,s.useRef=en,s.useState=wt,s.useSyncExternalStore=je,s.useTransition=Bt,s.version=d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(jh,jh.exports);var OL=jh.exports;$S.exports=OL;var V=$S.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 o=V,s=Symbol.for("react.element"),d=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),r=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),C=Symbol.iterator,b="@@iterator";function c(le){if(le===null||typeof le!="object")return null;var Ve=C&&le[C]||le[b];return typeof Ve=="function"?Ve:null}var m=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(le){{for(var Ve=arguments.length,We=new Array(Ve>1?Ve-1:0),gt=1;gt<Ve;gt++)We[gt-1]=arguments[gt];v("error",le,We)}}function v(le,Ve,We){{var gt=m.ReactDebugCurrentFrame,yt=gt.getStackAddendum();yt!==""&&(Ve+="%s",We=We.concat([yt]));var pt=We.map(function(Rt){return String(Rt)});pt.unshift("Warning: "+Ve),Function.prototype.apply.call(console[le],console,pt)}}var N=!1,T=!1,E=!1,A=!1,D=!1,R;R=Symbol.for("react.module.reference");function M(le){return!!(typeof le=="string"||typeof le=="function"||le===w||le===L||D||le===j||le===g||le===_||A||le===S||N||T||E||typeof le=="object"&&le!==null&&(le.$$typeof===p||le.$$typeof===u||le.$$typeof===y||le.$$typeof===r||le.$$typeof===l||le.$$typeof===R||le.getModuleId!==void 0))}function H(le,Ve,We){var gt=le.displayName;if(gt)return gt;var yt=Ve.displayName||Ve.name||"";return yt!==""?We+"("+yt+")":We}function U(le){return le.displayName||"Context"}function I(le){if(le==null)return null;if(typeof le.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof le=="function")return le.displayName||le.name||null;if(typeof le=="string")return le;switch(le){case w:return"Fragment";case d:return"Portal";case L:return"Profiler";case j:return"StrictMode";case g:return"Suspense";case _:return"SuspenseList"}if(typeof le=="object")switch(le.$$typeof){case r:var Ve=le;return U(Ve)+".Consumer";case y:var We=le;return U(We._context)+".Provider";case l:return H(le,le.render,"ForwardRef");case u:var gt=le.displayName||null;return gt!==null?gt:I(le.type)||"Memo";case p:{var yt=le,pt=yt._payload,Rt=yt._init;try{return I(Rt(pt))}catch{return null}}}return null}var G=Object.assign,ne=0,Q,te,ie,P,$,J,ee;function we(){}we.__reactDisabledLog=!0;function Se(){{if(ne===0){Q=console.log,te=console.info,ie=console.warn,P=console.error,$=console.group,J=console.groupCollapsed,ee=console.groupEnd;var le={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:le,log:le,warn:le,error:le,group:le,groupCollapsed:le,groupEnd:le})}ne++}}function Z(){{if(ne--,ne===0){var le={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},le,{value:Q}),info:G({},le,{value:te}),warn:G({},le,{value:ie}),error:G({},le,{value:P}),group:G({},le,{value:$}),groupCollapsed:G({},le,{value:J}),groupEnd:G({},le,{value:ee})})}ne<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ke=m.ReactCurrentDispatcher,se;function W(le,Ve,We){{if(se===void 0)try{throw Error()}catch(yt){var gt=yt.stack.trim().match(/\n( *(at )?)/);se=gt&&gt[1]||""}return`
40
+ `+se+le}}var _e=!1,ue;{var Ie=typeof WeakMap=="function"?WeakMap:Map;ue=new Ie}function Ue(le,Ve){if(!le||_e)return"";{var We=ue.get(le);if(We!==void 0)return We}var gt;_e=!0;var yt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var pt;pt=ke.current,ke.current=null,Se();try{if(Ve){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(Un){gt=Un}Reflect.construct(le,[],Rt)}else{try{Rt.call()}catch(Un){gt=Un}le.call(Rt.prototype)}}else{try{throw Error()}catch(Un){gt=Un}le()}}catch(Un){if(Un&&gt&&typeof Un.stack=="string"){for(var wt=Un.stack.split(`
41
+ `),vn=gt.stack.split(`
42
+ `),en=wt.length-1,Yt=vn.length-1;en>=1&&Yt>=0&&wt[en]!==vn[Yt];)Yt--;for(;en>=1&&Yt>=0;en--,Yt--)if(wt[en]!==vn[Yt]){if(en!==1||Yt!==1)do if(en--,Yt--,Yt<0||wt[en]!==vn[Yt]){var gn=`
43
+ `+wt[en].replace(" at new "," at ");return le.displayName&&gn.includes("<anonymous>")&&(gn=gn.replace("<anonymous>",le.displayName)),typeof le=="function"&&ue.set(le,gn),gn}while(en>=1&&Yt>=0);break}}}finally{_e=!1,ke.current=pt,Z(),Error.prepareStackTrace=yt}var yn=le?le.displayName||le.name:"",oi=yn?W(yn):"";return typeof le=="function"&&ue.set(le,oi),oi}function Xe(le,Ve,We){return Ue(le,!1)}function Je(le){var Ve=le.prototype;return!!(Ve&&Ve.isReactComponent)}function rt(le,Ve,We){if(le==null)return"";if(typeof le=="function")return Ue(le,Je(le));if(typeof le=="string")return W(le);switch(le){case g:return W("Suspense");case _:return W("SuspenseList")}if(typeof le=="object")switch(le.$$typeof){case l:return Xe(le.render);case u:return rt(le.type,Ve,We);case p:{var gt=le,yt=gt._payload,pt=gt._init;try{return rt(pt(yt),Ve,We)}catch{}}}return""}var Nt=Object.prototype.hasOwnProperty,Ze={},qt=m.ReactDebugCurrentFrame;function Xt(le){if(le){var Ve=le._owner,We=rt(le.type,le._source,Ve?Ve.type:null);qt.setExtraStackFrame(We)}else qt.setExtraStackFrame(null)}function lt(le,Ve,We,gt,yt){{var pt=Function.call.bind(Nt);for(var Rt in le)if(pt(le,Rt)){var wt=void 0;try{if(typeof le[Rt]!="function"){var vn=Error((gt||"React class")+": "+We+" type `"+Rt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof le[Rt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw vn.name="Invariant Violation",vn}wt=le[Rt](Ve,Rt,gt,We,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(en){wt=en}wt&&!(wt instanceof Error)&&(Xt(yt),f("%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).",gt||"React class",We,Rt,typeof wt),Xt(null)),wt instanceof Error&&!(wt.message in Ze)&&(Ze[wt.message]=!0,Xt(yt),f("Failed %s type: %s",We,wt.message),Xt(null))}}}var Qe=Array.isArray;function nt(le){return Qe(le)}function ae(le){{var Ve=typeof Symbol=="function"&&Symbol.toStringTag,We=Ve&&le[Symbol.toStringTag]||le.constructor.name||"Object";return We}}function Fe(le){try{return et(le),!1}catch{return!0}}function et(le){return""+le}function ve(le){if(Fe(le))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ae(le)),et(le)}var Ye=m.ReactCurrentOwner,Ee={key:!0,ref:!0,__self:!0,__source:!0},pe,me,Re;Re={};function Oe(le){if(Nt.call(le,"ref")){var Ve=Object.getOwnPropertyDescriptor(le,"ref").get;if(Ve&&Ve.isReactWarning)return!1}return le.ref!==void 0}function bt(le){if(Nt.call(le,"key")){var Ve=Object.getOwnPropertyDescriptor(le,"key").get;if(Ve&&Ve.isReactWarning)return!1}return le.key!==void 0}function kt(le,Ve){if(typeof le.ref=="string"&&Ye.current&&Ve&&Ye.current.stateNode!==Ve){var We=I(Ye.current.type);Re[We]||(f('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(Ye.current.type),le.ref),Re[We]=!0)}}function Ct(le,Ve){{var We=function(){pe||(pe=!0,f("%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)",Ve))};We.isReactWarning=!0,Object.defineProperty(le,"key",{get:We,configurable:!0})}}function Pt(le,Ve){{var We=function(){me||(me=!0,f("%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)",Ve))};We.isReactWarning=!0,Object.defineProperty(le,"ref",{get:We,configurable:!0})}}var Qt=function(le,Ve,We,gt,yt,pt,Rt){var wt={$$typeof:s,type:le,key:Ve,ref:We,props:Rt,_owner:pt};return wt._store={},Object.defineProperty(wt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(wt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:gt}),Object.defineProperty(wt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:yt}),Object.freeze&&(Object.freeze(wt.props),Object.freeze(wt)),wt};function Ft(le,Ve,We,gt,yt){{var pt,Rt={},wt=null,vn=null;We!==void 0&&(ve(We),wt=""+We),bt(Ve)&&(ve(Ve.key),wt=""+Ve.key),Oe(Ve)&&(vn=Ve.ref,kt(Ve,yt));for(pt in Ve)Nt.call(Ve,pt)&&!Ee.hasOwnProperty(pt)&&(Rt[pt]=Ve[pt]);if(le&&le.defaultProps){var en=le.defaultProps;for(pt in en)Rt[pt]===void 0&&(Rt[pt]=en[pt])}if(wt||vn){var Yt=typeof le=="function"?le.displayName||le.name||"Unknown":le;wt&&Ct(Rt,Yt),vn&&Pt(Rt,Yt)}return Qt(le,wt,vn,yt,gt,Ye.current,Rt)}}var mt=m.ReactCurrentOwner,St=m.ReactDebugCurrentFrame;function Ln(le){if(le){var Ve=le._owner,We=rt(le.type,le._source,Ve?Ve.type:null);St.setExtraStackFrame(We)}else St.setExtraStackFrame(null)}var An;An=!1;function In(le){return typeof le=="object"&&le!==null&&le.$$typeof===s}function ri(){{if(mt.current){var le=I(mt.current.type);if(le)return`
44
+
45
+ Check the render method of \``+le+"`."}return""}}function cn(le){{if(le!==void 0){var Ve=le.fileName.replace(/^.*[\\\/]/,""),We=le.lineNumber;return`
46
+
47
+ Check your code at `+Ve+":"+We+"."}return""}}var ai={};function mn(le){{var Ve=ri();if(!Ve){var We=typeof le=="string"?le:le.displayName||le.name;We&&(Ve=`
48
+
49
+ Check the top-level render call using <`+We+">.")}return Ve}}function Gn(le,Ve){{if(!le._store||le._store.validated||le.key!=null)return;le._store.validated=!0;var We=mn(Ve);if(ai[We])return;ai[We]=!0;var gt="";le&&le._owner&&le._owner!==mt.current&&(gt=" It was passed a child from "+I(le._owner.type)+"."),Ln(le),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',We,gt),Ln(null)}}function Ei(le,Ve){{if(typeof le!="object")return;if(nt(le))for(var We=0;We<le.length;We++){var gt=le[We];In(gt)&&Gn(gt,Ve)}else if(In(le))le._store&&(le._store.validated=!0);else if(le){var yt=c(le);if(typeof yt=="function"&&yt!==le.entries)for(var pt=yt.call(le),Rt;!(Rt=pt.next()).done;)In(Rt.value)&&Gn(Rt.value,Ve)}}}function Zn(le){{var Ve=le.type;if(Ve==null||typeof Ve=="string")return;var We;if(typeof Ve=="function")We=Ve.propTypes;else if(typeof Ve=="object"&&(Ve.$$typeof===l||Ve.$$typeof===u))We=Ve.propTypes;else return;if(We){var gt=I(Ve);lt(We,le.props,"prop",gt,le)}else if(Ve.PropTypes!==void 0&&!An){An=!0;var yt=I(Ve);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",yt||"Unknown")}typeof Ve.getDefaultProps=="function"&&!Ve.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function rn(le){{for(var Ve=Object.keys(le.props),We=0;We<Ve.length;We++){var gt=Ve[We];if(gt!=="children"&&gt!=="key"){Ln(le),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",gt),Ln(null);break}}le.ref!==null&&(Ln(le),f("Invalid attribute `ref` supplied to `React.Fragment`."),Ln(null))}}var an={};function Mn(le,Ve,We,gt,yt,pt){{var Rt=M(le);if(!Rt){var wt="";(le===void 0||typeof le=="object"&&le!==null&&Object.keys(le).length===0)&&(wt+=" 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 vn=cn(yt);vn?wt+=vn:wt+=ri();var en;le===null?en="null":nt(le)?en="array":le!==void 0&&le.$$typeof===s?(en="<"+(I(le.type)||"Unknown")+" />",wt=" Did you accidentally export a JSX literal instead of a component?"):en=typeof le,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",en,wt)}var Yt=Ft(le,Ve,We,yt,pt);if(Yt==null)return Yt;if(Rt){var gn=Ve.children;if(gn!==void 0)if(gt)if(nt(gn)){for(var yn=0;yn<gn.length;yn++)Ei(gn[yn],le);Object.freeze&&Object.freeze(gn)}else f("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 Ei(gn,le)}if(Nt.call(Ve,"key")){var oi=I(le),Un=Object.keys(Ve).filter(function(Bt){return Bt!=="key"}),fi=Un.length>0?"{key: someKey, "+Un.join(": ..., ")+": ...}":"{key: someKey}";if(!an[oi+fi]){var qn=Un.length>0?"{"+Un.join(": ..., ")+": ...}":"{}";f(`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} />`,fi,oi,qn,oi),an[oi+fi]=!0}}return le===w?rn(Yt):Zn(Yt),Yt}}var hi=Mn;dg.Fragment=w,dg.jsxDEV=hi})();zS.exports=dg;var h=zS.exports,WS={exports:{}},Dr={},GS={exports:{}},YS={};(function(o){/**
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 w(me,Re){var Oe=me.length;me.push(Re),y(me,Re,Oe)}function j(me){return me.length===0?null:me[0]}function L(me){if(me.length===0)return null;var Re=me[0],Oe=me.pop();return Oe!==Re&&(me[0]=Oe,r(me,Oe,0)),Re}function y(me,Re,Oe){for(var bt=Oe;bt>0;){var kt=bt-1>>>1,Ct=me[kt];if(l(Ct,Re)>0)me[kt]=Re,me[bt]=Ct,bt=kt;else return}}function r(me,Re,Oe){for(var bt=Oe,kt=me.length,Ct=kt>>>1;bt<Ct;){var Pt=(bt+1)*2-1,Qt=me[Pt],Ft=Pt+1,mt=me[Ft];if(l(Qt,Re)<0)Ft<kt&&l(mt,Qt)<0?(me[bt]=mt,me[Ft]=Re,bt=Ft):(me[bt]=Qt,me[Pt]=Re,bt=Pt);else if(Ft<kt&&l(mt,Re)<0)me[bt]=mt,me[Ft]=Re,bt=Ft;else return}}function l(me,Re){var Oe=me.sortIndex-Re.sortIndex;return Oe!==0?Oe:me.id-Re.id}var g=1,_=2,u=3,p=4,S=5;function C(me,Re){}var b=typeof performance=="object"&&typeof performance.now=="function";if(b){var c=performance;o.unstable_now=function(){return c.now()}}else{var m=Date,f=m.now();o.unstable_now=function(){return m.now()-f}}var v=1073741823,N=-1,T=250,E=5e3,A=1e4,D=v,R=[],M=[],H=1,U=null,I=u,G=!1,ne=!1,Q=!1,te=typeof setTimeout=="function"?setTimeout:null,ie=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(me){for(var Re=j(M);Re!==null;){if(Re.callback===null)L(M);else if(Re.startTime<=me)L(M),Re.sortIndex=Re.expirationTime,w(R,Re);else return;Re=j(M)}}function J(me){if(Q=!1,$(me),!ne)if(j(R)!==null)ne=!0,et(ee);else{var Re=j(M);Re!==null&&ve(J,Re.startTime-me)}}function ee(me,Re){ne=!1,Q&&(Q=!1,Ye()),G=!0;var Oe=I;try{var bt;if(!s)return we(me,Re)}finally{U=null,I=Oe,G=!1}}function we(me,Re){var Oe=Re;for($(Oe),U=j(R);U!==null&&!(U.expirationTime>Oe&&(!me||qt()));){var bt=U.callback;if(typeof bt=="function"){U.callback=null,I=U.priorityLevel;var kt=U.expirationTime<=Oe,Ct=bt(kt);Oe=o.unstable_now(),typeof Ct=="function"?U.callback=Ct:U===j(R)&&L(R),$(Oe)}else L(R);U=j(R)}if(U!==null)return!0;var Pt=j(M);return Pt!==null&&ve(J,Pt.startTime-Oe),!1}function Se(me,Re){switch(me){case g:case _:case u:case p:case S:break;default:me=u}var Oe=I;I=me;try{return Re()}finally{I=Oe}}function Z(me){var Re;switch(I){case g:case _:case u:Re=u;break;default:Re=I;break}var Oe=I;I=Re;try{return me()}finally{I=Oe}}function ke(me){var Re=I;return function(){var Oe=I;I=Re;try{return me.apply(this,arguments)}finally{I=Oe}}}function se(me,Re,Oe){var bt=o.unstable_now(),kt;if(typeof Oe=="object"&&Oe!==null){var Ct=Oe.delay;typeof Ct=="number"&&Ct>0?kt=bt+Ct:kt=bt}else kt=bt;var Pt;switch(me){case g:Pt=N;break;case _:Pt=T;break;case S:Pt=D;break;case p:Pt=A;break;case u:default:Pt=E;break}var Qt=kt+Pt,Ft={id:H++,callback:Re,priorityLevel:me,startTime:kt,expirationTime:Qt,sortIndex:-1};return kt>bt?(Ft.sortIndex=kt,w(M,Ft),j(R)===null&&Ft===j(M)&&(Q?Ye():Q=!0,ve(J,kt-bt))):(Ft.sortIndex=Qt,w(R,Ft),!ne&&!G&&(ne=!0,et(ee))),Ft}function W(){}function _e(){!ne&&!G&&(ne=!0,et(ee))}function ue(){return j(R)}function Ie(me){me.callback=null}function Ue(){return I}var Xe=!1,Je=null,rt=-1,Nt=d,Ze=-1;function qt(){var me=o.unstable_now()-Ze;return!(me<Nt)}function Xt(){}function lt(me){if(me<0||me>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}me>0?Nt=Math.floor(1e3/me):Nt=d}var Qe=function(){if(Je!==null){var me=o.unstable_now();Ze=me;var Re=!0,Oe=!0;try{Oe=Je(Re,me)}finally{Oe?nt():(Xe=!1,Je=null)}}else Xe=!1},nt;if(typeof P=="function")nt=function(){P(Qe)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,Fe=ae.port2;ae.port1.onmessage=Qe,nt=function(){Fe.postMessage(null)}}else nt=function(){te(Qe,0)};function et(me){Je=me,Xe||(Xe=!0,nt())}function ve(me,Re){rt=te(function(){me(o.unstable_now())},Re)}function Ye(){ie(rt),rt=-1}var Ee=Xt,pe=null;o.unstable_IdlePriority=S,o.unstable_ImmediatePriority=g,o.unstable_LowPriority=p,o.unstable_NormalPriority=u,o.unstable_Profiling=pe,o.unstable_UserBlockingPriority=_,o.unstable_cancelCallback=Ie,o.unstable_continueExecution=_e,o.unstable_forceFrameRate=lt,o.unstable_getCurrentPriorityLevel=Ue,o.unstable_getFirstCallbackNode=ue,o.unstable_next=Z,o.unstable_pauseExecution=W,o.unstable_requestPaint=Ee,o.unstable_runWithPriority=Se,o.unstable_scheduleCallback=se,o.unstable_shouldYield=qt,o.unstable_wrapCallback=ke,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(YS);GS.exports=YS;var PL=GS.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 o=V,s=PL,d=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=!1;function j(e){w=e}function L(e){if(!w){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r("warn",e,n)}}function y(e){if(!w){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r("error",e,n)}}function r(e,t,n){{var i=d.ReactDebugCurrentFrame,a=i.getStackAddendum();a!==""&&(t+="%s",n=n.concat([a]));var x=n.map(function(k){return String(k)});x.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,x)}}var l=0,g=1,_=2,u=3,p=4,S=5,C=6,b=7,c=8,m=9,f=10,v=11,N=12,T=13,E=14,A=15,D=16,R=17,M=18,H=19,U=21,I=22,G=23,ne=24,Q=25,te=!0,ie=!1,P=!1,$=!1,J=!1,ee=!0,we=!0,Se=!0,Z=!0,ke=new Set,se={},W={};function _e(e,t){ue(e,t),ue(e+"Capture",t)}function ue(e,t){se[e]&&y("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),se[e]=t;{var n=e.toLowerCase();W[n]=e,e==="onDoubleClick"&&(W.ondblclick=e)}for(var i=0;i<t.length;i++)ke.add(t[i])}var Ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ue=Object.prototype.hasOwnProperty;function Xe(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Je(e){try{return rt(e),!1}catch{return!0}}function rt(e){return""+e}function Nt(e,t){if(Je(e))return y("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Xe(e)),rt(e)}function Ze(e){if(Je(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),rt(e)}function qt(e,t){if(Je(e))return y("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Xe(e)),rt(e)}function Xt(e,t){if(Je(e))return y("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Xe(e)),rt(e)}function lt(e){if(Je(e))return y("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),rt(e)}function Qe(e){if(Je(e))return y("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.",Xe(e)),rt(e)}var nt=0,ae=1,Fe=2,et=3,ve=4,Ye=5,Ee=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",me=pe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Re=new RegExp("^["+pe+"]["+me+"]*$"),Oe={},bt={};function kt(e){return Ue.call(bt,e)?!0:Ue.call(Oe,e)?!1:Re.test(e)?(bt[e]=!0,!0):(Oe[e]=!0,y("Invalid attribute name: `%s`",e),!1)}function Ct(e,t,n){return t!==null?t.type===nt: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===nt)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(i)return!1;if(n!==null)return!n.acceptsBooleans;var a=e.toLowerCase().slice(0,5);return a!=="data-"&&a!=="aria-"}default:return!1}}function Qt(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 et:return!t;case ve:return t===!1;case Ye:return isNaN(t);case Ee:return isNaN(t)||t<1}return!1}function Ft(e){return St.hasOwnProperty(e)?St[e]:null}function mt(e,t,n,i,a,x,k){this.acceptsBooleans=t===Fe||t===et||t===ve,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=x,this.removeEmptyString=k}var St={},Ln=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Ln.forEach(function(e){St[e]=new mt(e,nt,!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];St[t]=new mt(t,ae,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){St[e]=new mt(e,Fe,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){St[e]=new mt(e,Fe,!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){St[e]=new mt(e,et,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){St[e]=new mt(e,et,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){St[e]=new mt(e,ve,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){St[e]=new mt(e,Ee,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){St[e]=new mt(e,Ye,!1,e.toLowerCase(),null,!1,!1)});var An=/[\-\:]([a-z])/g,In=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(An,In);St[t]=new mt(t,ae,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(An,In);St[t]=new mt(t,ae,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(An,In);St[t]=new mt(t,ae,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){St[e]=new mt(e,ae,!1,e.toLowerCase(),null,!1,!1)});var ri="xlinkHref";St[ri]=new mt("xlinkHref",ae,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){St[e]=new mt(e,ae,!1,e.toLowerCase(),null,!0,!0)});var cn=/^[\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,ai=!1;function mn(e){!ai&&cn.test(e)&&(ai=!0,y("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 Gn(e,t,n,i){if(i.mustUseProperty){var a=i.propertyName;return e[a]}else{Nt(n,t),i.sanitizeURL&&mn(""+n);var x=i.attributeName,k=null;if(i.type===ve){if(e.hasAttribute(x)){var O=e.getAttribute(x);return O===""?!0:Qt(t,n,i,!1)?O:O===""+n?n:O}}else if(e.hasAttribute(x)){if(Qt(t,n,i,!1))return e.getAttribute(x);if(i.type===et)return n;k=e.getAttribute(x)}return Qt(t,n,i,!1)?k===null?n:k:k===""+n?n:k}}function Ei(e,t,n,i){{if(!kt(t))return;if(!e.hasAttribute(t))return n===void 0?void 0:null;var a=e.getAttribute(t);return Nt(n,t),a===""+n?n:a}}function Zn(e,t,n,i){var a=Ft(t);if(!Ct(t,a,i)){if(Qt(t,n,a,i)&&(n=null),i||a===null){if(kt(t)){var x=t;n===null?e.removeAttribute(x):(Nt(n,t),e.setAttribute(x,""+n))}return}var k=a.mustUseProperty;if(k){var O=a.propertyName;if(n===null){var F=a.type;e[O]=F===et?!1:""}else e[O]=n;return}var Y=a.attributeName,K=a.attributeNamespace;if(n===null)e.removeAttribute(Y);else{var fe=a.type,de;fe===et||fe===ve&&n===!0?de="":(Nt(n,Y),de=""+n,a.sanitizeURL&&mn(de.toString())),K?e.setAttributeNS(K,Y,de):e.setAttribute(Y,de)}}}var rn=Symbol.for("react.element"),an=Symbol.for("react.portal"),Mn=Symbol.for("react.fragment"),hi=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),Ve=Symbol.for("react.provider"),We=Symbol.for("react.context"),gt=Symbol.for("react.forward_ref"),yt=Symbol.for("react.suspense"),pt=Symbol.for("react.suspense_list"),Rt=Symbol.for("react.memo"),wt=Symbol.for("react.lazy"),vn=Symbol.for("react.scope"),en=Symbol.for("react.debug_trace_mode"),Yt=Symbol.for("react.offscreen"),gn=Symbol.for("react.legacy_hidden"),yn=Symbol.for("react.cache"),oi=Symbol.for("react.tracing_marker"),Un=Symbol.iterator,fi="@@iterator";function qn(e){if(e===null||typeof e!="object")return null;var t=Un&&e[Un]||e[fi];return typeof t=="function"?t:null}var Bt=Object.assign,oe=0,ze,je,X,Ne,qe,Ut,vt;function Et(){}Et.__reactDisabledLog=!0;function Kt(){{if(oe===0){ze=console.log,je=console.info,X=console.warn,Ne=console.error,qe=console.group,Ut=console.groupCollapsed,vt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}oe++}}function pn(){{if(oe--,oe===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Bt({},e,{value:ze}),info:Bt({},e,{value:je}),warn:Bt({},e,{value:X}),error:Bt({},e,{value:Ne}),group:Bt({},e,{value:qe}),groupCollapsed:Bt({},e,{value:Ut}),groupEnd:Bt({},e,{value:vt})})}oe<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var on=d.ReactCurrentDispatcher,Rn;function Wt(e,t,n){{if(Rn===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);Rn=i&&i[1]||""}return`
71
+ `+Rn+e}}var Vn=!1,Kn;{var Di=typeof WeakMap=="function"?WeakMap:Map;Kn=new Di}function Ii(e,t){if(!e||Vn)return"";{var n=Kn.get(e);if(n!==void 0)return n}var i;Vn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=on.current,on.current=null,Kt();try{if(t){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(De){i=De}Reflect.construct(e,[],k)}else{try{k.call()}catch(De){i=De}e.call(k.prototype)}}else{try{throw Error()}catch(De){i=De}e()}}catch(De){if(De&&i&&typeof De.stack=="string"){for(var O=De.stack.split(`
72
+ `),F=i.stack.split(`
73
+ `),Y=O.length-1,K=F.length-1;Y>=1&&K>=0&&O[Y]!==F[K];)K--;for(;Y>=1&&K>=0;Y--,K--)if(O[Y]!==F[K]){if(Y!==1||K!==1)do if(Y--,K--,K<0||O[Y]!==F[K]){var fe=`
74
+ `+O[Y].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),typeof e=="function"&&Kn.set(e,fe),fe}while(Y>=1&&K>=0);break}}}finally{Vn=!1,on.current=x,pn(),Error.prepareStackTrace=a}var de=e?e.displayName||e.name:"",Ce=de?Wt(de):"";return typeof e=="function"&&Kn.set(e,Ce),Ce}function Tr(e,t,n){return Ii(e,!0)}function ar(e,t,n){return Ii(e,!1)}function Wr(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function vr(e,t,n){if(e==null)return"";if(typeof e=="function")return Ii(e,Wr(e));if(typeof e=="string")return Wt(e);switch(e){case yt:return Wt("Suspense");case pt:return Wt("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case gt:return ar(e.render);case Rt:return vr(e.type,t,n);case wt:{var i=e,a=i._payload,x=i._init;try{return vr(x(a),t,n)}catch{}}}return""}function or(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case S:return Wt(e.type);case D:return Wt("Lazy");case T:return Wt("Suspense");case H:return Wt("SuspenseList");case l:case _:case A:return ar(e.type);case v:return ar(e.type.render);case g:return Tr(e.type);default:return""}}function qi(e){try{var t="",n=e;do t+=or(n),n=n.return;while(n);return t}catch(i){return`
75
+ Error generating stack: `+i.message+`
76
+ `+i.stack}}function os(e,t,n){var i=e.displayName;if(i)return i;var a=t.displayName||t.name||"";return a!==""?n+"("+a+")":n}function Lr(e){return e.displayName||"Context"}function un(e){if(e==null)return null;if(typeof e.tag=="number"&&y("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 Mn:return"Fragment";case an:return"Portal";case le:return"Profiler";case hi:return"StrictMode";case yt:return"Suspense";case pt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case We:var t=e;return Lr(t)+".Consumer";case Ve:var n=e;return Lr(n._context)+".Provider";case gt:return os(e,e.render,"ForwardRef");case Rt:var i=e.displayName||null;return i!==null?i:un(e.type)||"Memo";case wt:{var a=e,x=a._payload,k=a._init;try{return un(k(x))}catch{return null}}}return null}function Gr(e,t,n){var i=t.displayName||t.name||"";return e.displayName||(i!==""?n+"("+i+")":n)}function Ki(e){return e.displayName||"Context"}function Tt(e){var t=e.tag,n=e.type;switch(t){case ne:return"Cache";case m:var i=n;return Ki(i)+".Consumer";case f:var a=n;return Ki(a._context)+".Provider";case M:return"DehydratedFragment";case v:return Gr(n,n.render,"ForwardRef");case b:return"Fragment";case S:return n;case p:return"Portal";case u:return"Root";case C:return"Text";case D:return un(n);case c:return n===hi?"StrictMode":"Mode";case I:return"Offscreen";case N:return"Profiler";case U:return"Scope";case T:return"Suspense";case H:return"SuspenseList";case Q:return"TracingMarker";case g:case l:case R:case _:case E:case A:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break}return null}var Ar=d.ReactDebugCurrentFrame,Qn=null,gr=!1;function lr(){{if(Qn===null)return null;var e=Qn._debugOwner;if(e!==null&&typeof e<"u")return Tt(e)}return null}function Ds(){return Qn===null?"":qi(Qn)}function Yn(){Ar.getCurrentStack=null,Qn=null,gr=!1}function Cn(e){Ar.getCurrentStack=e===null?null:Ds,Qn=e,gr=!1}function ei(){return Qn}function Xn(e){gr=e}function Fn(e){return""+e}function On(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Qe(e),e;default:return""}}var ls={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function ji(e,t){ls[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||y("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||y("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 cs(e){var t=e.type,n=e.nodeName;return n&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yr(e){return e._valueTracker}function Mr(e){e._valueTracker=null}function js(e){var t="";return e&&(cs(e)?t=e.checked?"true":"false":t=e.value),t}function Vi(e){var t=cs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Qe(e[t]);var i=""+e[t];if(!(e.hasOwnProperty(t)||typeof n>"u"||typeof n.get!="function"||typeof n.set!="function")){var a=n.get,x=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(O){Qe(O),i=""+O,x.call(this,O)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var k={getValue:function(){return i},setValue:function(O){Qe(O),i=""+O},stopTracking:function(){Mr(e),delete e[t]}};return k}}function he(e){Yr(e)||(e._valueTracker=Vi(e))}function xe(e){if(!e)return!1;var t=Yr(e);if(!t)return!0;var n=t.getValue(),i=js(e);return i!==n?(t.setValue(i),!0):!1}function Be(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 Ke=!1,tt=!1,ht=!1,At=!1;function Ht(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function zn(e,t){var n=e,i=t.checked,a=Bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??n._wrapperState.initialChecked});return a}function tn(e,t){ji("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!tt&&(y("%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",lr()||"A component",t.type),tt=!0),t.value!==void 0&&t.defaultValue!==void 0&&!Ke&&(y("%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",lr()||"A component",t.type),Ke=!0);var n=e,i=t.defaultValue==null?"":t.defaultValue;n._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:On(t.value!=null?t.value:i),controlled:Ht(t)}}function z(e,t){var n=e,i=t.checked;i!=null&&Zn(n,"checked",i,!1)}function re(e,t){var n=e;{var i=Ht(t);!n._wrapperState.controlled&&i&&!At&&(y("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"),At=!0),n._wrapperState.controlled&&!i&&!ht&&(y("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"),ht=!0)}z(e,t);var a=On(t.value),x=t.type;if(a!=null)x==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=Fn(a)):n.value!==Fn(a)&&(n.value=Fn(a));else if(x==="submit"||x==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?Le(n,t.type,a):t.hasOwnProperty("defaultValue")&&Le(n,t.type,On(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function q(e,t,n){var i=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type,x=a==="submit"||a==="reset";if(x&&(t.value===void 0||t.value===null))return;var k=Fn(i._wrapperState.initialValue);n||k!==i.value&&(i.value=k),i.defaultValue=k}var O=i.name;O!==""&&(i.name=""),i.defaultChecked=!i.defaultChecked,i.defaultChecked=!!i._wrapperState.initialChecked,O!==""&&(i.name=O)}function ce(e,t){var n=e;re(n,t),ge(n,t)}function ge(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 a=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),x=0;x<a.length;x++){var k=a[x];if(!(k===e||k.form!==e.form)){var O=Qu(k);if(!O)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");xe(k),re(k,O)}}}}function Le(e,t,n){(t!=="number"||Be(e.ownerDocument)!==e)&&(n==null?e.defaultValue=Fn(e._wrapperState.initialValue):e.defaultValue!==Fn(n)&&(e.defaultValue=Fn(n)))}var Te=!1,$e=!1,it=!1;function _t(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?o.Children.forEach(t.children,function(n){n!=null&&(typeof n=="string"||typeof n=="number"||$e||($e=!0,y("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&(it||(it=!0,y("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!Te&&(y("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Te=!0)}function ct(e,t){t.value!=null&&e.setAttribute("value",Fn(On(t.value)))}var Jt=Array.isArray;function jt(e){return Jt(e)}var It;It=!1;function wn(){var e=lr();return e?`
77
+
78
+ Check the render method of \``+e+"`.":""}var Xi=["value","defaultValue"];function ks(e){{ji("select",e);for(var t=0;t<Xi.length;t++){var n=Xi[t];if(e[n]!=null){var i=jt(e[n]);e.multiple&&!i?y("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,wn()):!e.multiple&&i&&y("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,wn())}}}}function Ur(e,t,n,i){var a=e.options;if(t){for(var x=n,k={},O=0;O<x.length;O++)k["$"+x[O]]=!0;for(var F=0;F<a.length;F++){var Y=k.hasOwnProperty("$"+a[F].value);a[F].selected!==Y&&(a[F].selected=Y),Y&&i&&(a[F].defaultSelected=!0)}}else{for(var K=Fn(On(n)),fe=null,de=0;de<a.length;de++){if(a[de].value===K){a[de].selected=!0,i&&(a[de].defaultSelected=!0);return}fe===null&&!a[de].disabled&&(fe=a[de])}fe!==null&&(fe.selected=!0)}}function Rs(e,t){return Bt({},t,{value:void 0})}function _r(e,t){var n=e;ks(t),n._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!It&&(y("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"),It=!0)}function fo(e,t){var n=e;n.multiple=!!t.multiple;var i=t.value;i!=null?Ur(n,!!t.multiple,i,!1):t.defaultValue!=null&&Ur(n,!!t.multiple,t.defaultValue,!0)}function mu(e,t){var n=e,i=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var a=t.value;a!=null?Ur(n,!!t.multiple,a,!1):i!==!!t.multiple&&(t.defaultValue!=null?Ur(n,!!t.multiple,t.defaultValue,!0):Ur(n,!!t.multiple,t.multiple?[]:"",!1))}function qh(e,t){var n=e,i=t.value;i!=null&&Ur(n,!!t.multiple,i,!1)}var i_=!1;function Kh(e,t){var n=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var i=Bt({},t,{value:void 0,defaultValue:void 0,children:Fn(n._wrapperState.initialValue)});return i}function r_(e,t){var n=e;ji("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!i_&&(y("%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",lr()||"A component"),i_=!0);var i=t.value;if(i==null){var a=t.children,x=t.defaultValue;if(a!=null){y("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(x!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(jt(a)){if(a.length>1)throw new Error("<textarea> can only have at most one child.");a=a[0]}x=a}}x==null&&(x=""),i=x}n._wrapperState={initialValue:On(i)}}function s_(e,t){var n=e,i=On(t.value),a=On(t.defaultValue);if(i!=null){var x=Fn(i);x!==n.value&&(n.value=x),t.defaultValue==null&&n.defaultValue!==x&&(n.defaultValue=x)}a!=null&&(n.defaultValue=Fn(a))}function a_(e,t){var n=e,i=n.textContent;i===n._wrapperState.initialValue&&i!==""&&i!==null&&(n.value=i)}function yN(e,t){s_(e,t)}var Ts="http://www.w3.org/1999/xhtml",wN="http://www.w3.org/1998/Math/MathML",Xh="http://www.w3.org/2000/svg";function Jh(e){switch(e){case"svg":return Xh;case"math":return wN;default:return Ts}}function Zh(e,t){return e==null||e===Ts?Jh(t):e===Xh&&t==="foreignObject"?Ts:e}var xN=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,a)})}:e},pu,o_=xN(function(e,t){if(e.namespaceURI===Xh&&!("innerHTML"in e)){pu=pu||document.createElement("div"),pu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=pu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild);return}e.innerHTML=t}),cr=1,Ls=3,li=8,As=9,Qh=11,vu=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===Ls){n.nodeValue=t;return}}e.textContent=t},SN={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"]},yl={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 NN(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var CN=["Webkit","ms","Moz","O"];Object.keys(yl).forEach(function(e){CN.forEach(function(t){yl[NN(t,e)]=yl[e]})});function ef(e,t,n){var i=t==null||typeof t=="boolean"||t==="";return i?"":!n&&typeof t=="number"&&t!==0&&!(yl.hasOwnProperty(e)&&yl[e])?t+"px":(Xt(t,e),(""+t).trim())}var EN=/([A-Z])/g,DN=/^ms-/;function jN(e){return e.replace(EN,"-$1").toLowerCase().replace(DN,"-ms-")}var l_=function(){};{var kN=/^(?:webkit|moz|o)[A-Z]/,RN=/^-ms-/,TN=/-(.)/g,c_=/;\s*$/,mo={},tf={},u_=!1,d_=!1,LN=function(e){return e.replace(TN,function(t,n){return n.toUpperCase()})},AN=function(e){mo.hasOwnProperty(e)&&mo[e]||(mo[e]=!0,y("Unsupported style property %s. Did you mean %s?",e,LN(e.replace(RN,"ms-"))))},MN=function(e){mo.hasOwnProperty(e)&&mo[e]||(mo[e]=!0,y("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},UN=function(e,t){tf.hasOwnProperty(t)&&tf[t]||(tf[t]=!0,y(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(c_,"")))},ON=function(e,t){u_||(u_=!0,y("`NaN` is an invalid value for the `%s` css style property.",e))},PN=function(e,t){d_||(d_=!0,y("`Infinity` is an invalid value for the `%s` css style property.",e))};l_=function(e,t){e.indexOf("-")>-1?AN(e):kN.test(e)?MN(e):c_.test(t)&&UN(e,t),typeof t=="number"&&(isNaN(t)?ON(e,t):isFinite(t)||PN(e,t))}}var BN=l_;function IN(e){{var t="",n="";for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];if(a!=null){var x=i.indexOf("--")===0;t+=n+(x?i:jN(i))+":",t+=ef(i,a,x),n=";"}}return t||null}}function h_(e,t){var n=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=i.indexOf("--")===0;a||BN(i,t[i]);var x=ef(i,t[i],a);i==="float"&&(i="cssFloat"),a?n.setProperty(i,x):n[i]=x}}function VN(e){return e==null||typeof e=="boolean"||e===""}function f_(e){var t={};for(var n in e)for(var i=SN[n]||[n],a=0;a<i.length;a++)t[i[a]]=n;return t}function FN(e,t){{if(!t)return;var n=f_(e),i=f_(t),a={};for(var x in n){var k=n[x],O=i[x];if(O&&k!==O){var F=k+","+O;if(a[F])continue;a[F]=!0,y("%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.",VN(e[k])?"Removing":"Updating",k,O)}}}}var HN={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},zN=Bt({menuitem:!0},HN),$N="__html";function nf(e,t){if(t){if(zN[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"||!($N 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&&y("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 Da(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 gu={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"},m_={"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},po={},WN=new RegExp("^(aria)-["+me+"]*$"),GN=new RegExp("^(aria)[A-Z]["+me+"]*$");function YN(e,t){{if(Ue.call(po,t)&&po[t])return!0;if(GN.test(t)){var n="aria-"+t.slice(4).toLowerCase(),i=m_.hasOwnProperty(n)?n:null;if(i==null)return y("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),po[t]=!0,!0;if(t!==i)return y("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,i),po[t]=!0,!0}if(WN.test(t)){var a=t.toLowerCase(),x=m_.hasOwnProperty(a)?a:null;if(x==null)return po[t]=!0,!1;if(t!==x)return y("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,x),po[t]=!0,!0}}return!0}function qN(e,t){{var n=[];for(var i in t){var a=YN(e,i);a||n.push(i)}var x=n.map(function(k){return"`"+k+"`"}).join(", ");n.length===1?y("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",x,e):n.length>1&&y("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",x,e)}}function KN(e,t){Da(e,t)||qN(e,t)}var p_=!1;function XN(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!p_&&(p_=!0,e==="select"&&t.multiple?y("`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):y("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var v_=function(){};{var Ji={},g_=/^on./,JN=/^on[^A-Z]/,ZN=new RegExp("^(aria)-["+me+"]*$"),QN=new RegExp("^(aria)[A-Z]["+me+"]*$");v_=function(e,t,n,i){if(Ue.call(Ji,t)&&Ji[t])return!0;var a=t.toLowerCase();if(a==="onfocusin"||a==="onfocusout")return y("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."),Ji[t]=!0,!0;if(i!=null){var x=i.registrationNameDependencies,k=i.possibleRegistrationNames;if(x.hasOwnProperty(t))return!0;var O=k.hasOwnProperty(a)?k[a]:null;if(O!=null)return y("Invalid event handler property `%s`. Did you mean `%s`?",t,O),Ji[t]=!0,!0;if(g_.test(t))return y("Unknown event handler property `%s`. It will be ignored.",t),Ji[t]=!0,!0}else if(g_.test(t))return JN.test(t)&&y("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Ji[t]=!0,!0;if(ZN.test(t)||QN.test(t))return!0;if(a==="innerhtml")return y("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Ji[t]=!0,!0;if(a==="aria")return y("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Ji[t]=!0,!0;if(a==="is"&&n!==null&&n!==void 0&&typeof n!="string")return y("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),Ji[t]=!0,!0;if(typeof n=="number"&&isNaN(n))return y("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Ji[t]=!0,!0;var F=Ft(t),Y=F!==null&&F.type===nt;if(gu.hasOwnProperty(a)){var K=gu[a];if(K!==t)return y("Invalid DOM property `%s`. Did you mean `%s`?",t,K),Ji[t]=!0,!0}else if(!Y&&t!==a)return y("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,a),Ji[t]=!0,!0;return typeof n=="boolean"&&Pt(t,n,F,!1)?(n?y('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):y('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),Ji[t]=!0,!0):Y?!0:Pt(t,n,F,!1)?(Ji[t]=!0,!1):((n==="false"||n==="true")&&F!==null&&F.type===et&&(y("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),Ji[t]=!0),!0)}}var eC=function(e,t,n){{var i=[];for(var a in t){var x=v_(e,a,t[a],n);x||i.push(a)}var k=i.map(function(O){return"`"+O+"`"}).join(", ");i.length===1?y("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 ",k,e):i.length>1&&y("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 ",k,e)}};function tC(e,t,n){Da(e,t)||eC(e,t,n)}var __=1,rf=2,wl=4,nC=__|rf|wl,xl=null;function iC(e){xl!==null&&y("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),xl=e}function rC(){xl===null&&y("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),xl=null}function sC(e){return e===xl}function sf(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===Ls?t.parentNode:t}var af=null,vo=null,go=null;function b_(e){var t=la(e);if(t){if(typeof af!="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=Qu(n);af(t.stateNode,t.type,i)}}}function aC(e){af=e}function y_(e){vo?go?go.push(e):go=[e]:vo=e}function oC(){return vo!==null||go!==null}function w_(){if(vo){var e=vo,t=go;if(vo=null,go=null,b_(e),t)for(var n=0;n<t.length;n++)b_(t[n])}}var x_=function(e,t){return e(t)},S_=function(){},of=!1;function lC(){var e=oC();e&&(S_(),w_())}function N_(e,t,n){if(of)return e(t,n);of=!0;try{return x_(e,t,n)}finally{of=!1,lC()}}function cC(e,t,n){x_=e,S_=n}function uC(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function dC(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&&uC(t));default:return!1}}function Sl(e,t){var n=e.stateNode;if(n===null)return null;var i=Qu(n);if(i===null)return null;var a=i[t];if(dC(t,e.type,i))return null;if(a&&typeof a!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof a+"` type.");return a}var lf=!1;if(Ie)try{var Nl={};Object.defineProperty(Nl,"passive",{get:function(){lf=!0}}),window.addEventListener("test",Nl,Nl),window.removeEventListener("test",Nl,Nl)}catch{lf=!1}function C_(e,t,n,i,a,x,k,O,F){var Y=Array.prototype.slice.call(arguments,3);try{t.apply(n,Y)}catch(K){this.onError(K)}}var E_=C_;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var cf=document.createElement("react");E_=function(t,n,i,a,x,k,O,F,Y){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 K=document.createEvent("Event"),fe=!1,de=!0,Ce=window.event,De=Object.getOwnPropertyDescriptor(window,"event");function Ae(){cf.removeEventListener(Me,Lt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Ce)}var at=Array.prototype.slice.call(arguments,3);function Lt(){fe=!0,Ae(),n.apply(i,at),de=!1}var Dt,fn=!1,ln=!1;function be(ye){if(Dt=ye.error,fn=!0,Dt===null&&ye.colno===0&&ye.lineno===0&&(ln=!0),ye.defaultPrevented&&Dt!=null&&typeof Dt=="object")try{Dt._suppressLogging=!0}catch{}}var Me="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",be),cf.addEventListener(Me,Lt,!1),K.initEvent(Me,!1,!1),cf.dispatchEvent(K),De&&Object.defineProperty(window,"event",De),fe&&de&&(fn?ln&&(Dt=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.")):Dt=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(Dt)),window.removeEventListener("error",be),!fe)return Ae(),C_.apply(this,arguments)}}var hC=E_,_o=!1,_u=null,bu=!1,uf=null,fC={onError:function(e){_o=!0,_u=e}};function df(e,t,n,i,a,x,k,O,F){_o=!1,_u=null,hC.apply(fC,arguments)}function mC(e,t,n,i,a,x,k,O,F){if(df.apply(this,arguments),_o){var Y=hf();bu||(bu=!0,uf=Y)}}function pC(){if(bu){var e=uf;throw bu=!1,uf=null,e}}function vC(){return _o}function hf(){if(_o){var e=_u;return _o=!1,_u=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 bo(e){return e._reactInternals}function gC(e){return e._reactInternals!==void 0}function _C(e,t){e._reactInternals=t}var Ot=0,yo=1,ci=2,xn=4,ja=16,Cl=32,D_=64,Sn=128,Ms=256,ka=512,wo=1024,ea=2048,Us=4096,Ra=8192,ff=16384,bC=32767,yu=32768,Zi=65536,mf=131072,j_=1048576,pf=2097152,Ta=4194304,vf=8388608,ta=16777216,gf=33554432,_f=xn|wo|0,bf=ci|xn|ja|Cl|ka|Us|Ra,El=xn|D_|ka|Ra,xo=ea|ja,Os=Ta|vf|pf,yC=d.ReactCurrentOwner;function La(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var i=t;do t=i,(t.flags&(ci|Us))!==Ot&&(n=t.return),i=t.return;while(i)}return t.tag===u?n:null}function k_(e){if(e.tag===T){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 R_(e){return e.tag===u?e.stateNode.containerInfo:null}function wC(e){return La(e)===e}function xC(e){{var t=yC.current;if(t!==null&&t.tag===g){var n=t,i=n.stateNode;i._warnedAboutRefsInRender||y("%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 a=bo(e);return a?La(a)===a:!1}function T_(e){if(La(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function L_(e){var t=e.alternate;if(!t){var n=La(e);if(n===null)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var i=e,a=t;;){var x=i.return;if(x===null)break;var k=x.alternate;if(k===null){var O=x.return;if(O!==null){i=a=O;continue}break}if(x.child===k.child){for(var F=x.child;F;){if(F===i)return T_(x),e;if(F===a)return T_(x),t;F=F.sibling}throw new Error("Unable to find node on an unmounted component.")}if(i.return!==a.return)i=x,a=k;else{for(var Y=!1,K=x.child;K;){if(K===i){Y=!0,i=x,a=k;break}if(K===a){Y=!0,a=x,i=k;break}K=K.sibling}if(!Y){for(K=k.child;K;){if(K===i){Y=!0,i=k,a=x;break}if(K===a){Y=!0,a=k,i=x;break}K=K.sibling}if(!Y)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!==a)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!==u)throw new Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:t}function A_(e){var t=L_(e);return t!==null?M_(t):null}function M_(e){if(e.tag===S||e.tag===C)return e;for(var t=e.child;t!==null;){var n=M_(t);if(n!==null)return n;t=t.sibling}return null}function SC(e){var t=L_(e);return t!==null?U_(t):null}function U_(e){if(e.tag===S||e.tag===C)return e;for(var t=e.child;t!==null;){if(t.tag!==p){var n=U_(t);if(n!==null)return n}t=t.sibling}return null}var O_=s.unstable_scheduleCallback,NC=s.unstable_cancelCallback,CC=s.unstable_shouldYield,EC=s.unstable_requestPaint,xi=s.unstable_now,DC=s.unstable_getCurrentPriorityLevel,wu=s.unstable_ImmediatePriority,yf=s.unstable_UserBlockingPriority,Aa=s.unstable_NormalPriority,jC=s.unstable_LowPriority,wf=s.unstable_IdlePriority,kC=s.unstable_yieldValue,RC=s.unstable_setDisableYieldValue,So=null,Fi=null,ut=null,us=!1,qr=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function TC(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 y("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{we&&(e=Bt({},e,{getLaneLabelMap:PC,injectProfilingHooks:OC})),So=t.inject(e),Fi=t}catch(n){y("React instrumentation encountered an error: %s.",n)}return!!t.checkDCE}function LC(e,t){if(Fi&&typeof Fi.onScheduleFiberRoot=="function")try{Fi.onScheduleFiberRoot(So,e,t)}catch(n){us||(us=!0,y("React instrumentation encountered an error: %s",n))}}function AC(e,t){if(Fi&&typeof Fi.onCommitFiberRoot=="function")try{var n=(e.current.flags&Sn)===Sn;if(Se){var i;switch(t){case wr:i=wu;break;case Bs:i=yf;break;case Is:i=Aa;break;case ju:i=wf;break;default:i=Aa;break}Fi.onCommitFiberRoot(So,e,i,n)}}catch(a){us||(us=!0,y("React instrumentation encountered an error: %s",a))}}function MC(e){if(Fi&&typeof Fi.onPostCommitFiberRoot=="function")try{Fi.onPostCommitFiberRoot(So,e)}catch(t){us||(us=!0,y("React instrumentation encountered an error: %s",t))}}function UC(e){if(Fi&&typeof Fi.onCommitFiberUnmount=="function")try{Fi.onCommitFiberUnmount(So,e)}catch(t){us||(us=!0,y("React instrumentation encountered an error: %s",t))}}function Si(e){if(typeof kC=="function"&&(RC(e),j(e)),Fi&&typeof Fi.setStrictMode=="function")try{Fi.setStrictMode(So,e)}catch(t){us||(us=!0,y("React instrumentation encountered an error: %s",t))}}function OC(e){ut=e}function PC(){{for(var e=new Map,t=1,n=0;n<Sf;n++){var i=iE(t);e.set(t,i),t*=2}return e}}function BC(e){ut!==null&&typeof ut.markCommitStarted=="function"&&ut.markCommitStarted(e)}function P_(){ut!==null&&typeof ut.markCommitStopped=="function"&&ut.markCommitStopped()}function Dl(e){ut!==null&&typeof ut.markComponentRenderStarted=="function"&&ut.markComponentRenderStarted(e)}function No(){ut!==null&&typeof ut.markComponentRenderStopped=="function"&&ut.markComponentRenderStopped()}function IC(e){ut!==null&&typeof ut.markComponentPassiveEffectMountStarted=="function"&&ut.markComponentPassiveEffectMountStarted(e)}function VC(){ut!==null&&typeof ut.markComponentPassiveEffectMountStopped=="function"&&ut.markComponentPassiveEffectMountStopped()}function FC(e){ut!==null&&typeof ut.markComponentPassiveEffectUnmountStarted=="function"&&ut.markComponentPassiveEffectUnmountStarted(e)}function HC(){ut!==null&&typeof ut.markComponentPassiveEffectUnmountStopped=="function"&&ut.markComponentPassiveEffectUnmountStopped()}function zC(e){ut!==null&&typeof ut.markComponentLayoutEffectMountStarted=="function"&&ut.markComponentLayoutEffectMountStarted(e)}function $C(){ut!==null&&typeof ut.markComponentLayoutEffectMountStopped=="function"&&ut.markComponentLayoutEffectMountStopped()}function B_(e){ut!==null&&typeof ut.markComponentLayoutEffectUnmountStarted=="function"&&ut.markComponentLayoutEffectUnmountStarted(e)}function I_(){ut!==null&&typeof ut.markComponentLayoutEffectUnmountStopped=="function"&&ut.markComponentLayoutEffectUnmountStopped()}function WC(e,t,n){ut!==null&&typeof ut.markComponentErrored=="function"&&ut.markComponentErrored(e,t,n)}function GC(e,t,n){ut!==null&&typeof ut.markComponentSuspended=="function"&&ut.markComponentSuspended(e,t,n)}function YC(e){ut!==null&&typeof ut.markLayoutEffectsStarted=="function"&&ut.markLayoutEffectsStarted(e)}function qC(){ut!==null&&typeof ut.markLayoutEffectsStopped=="function"&&ut.markLayoutEffectsStopped()}function KC(e){ut!==null&&typeof ut.markPassiveEffectsStarted=="function"&&ut.markPassiveEffectsStarted(e)}function XC(){ut!==null&&typeof ut.markPassiveEffectsStopped=="function"&&ut.markPassiveEffectsStopped()}function V_(e){ut!==null&&typeof ut.markRenderStarted=="function"&&ut.markRenderStarted(e)}function JC(){ut!==null&&typeof ut.markRenderYielded=="function"&&ut.markRenderYielded()}function F_(){ut!==null&&typeof ut.markRenderStopped=="function"&&ut.markRenderStopped()}function ZC(e){ut!==null&&typeof ut.markRenderScheduled=="function"&&ut.markRenderScheduled(e)}function QC(e,t){ut!==null&&typeof ut.markForceUpdateScheduled=="function"&&ut.markForceUpdateScheduled(e,t)}function xf(e,t){ut!==null&&typeof ut.markStateUpdateScheduled=="function"&&ut.markStateUpdateScheduled(e,t)}var Mt=0,dn=1,En=2,ti=8,ds=16,H_=Math.clz32?Math.clz32:nE,eE=Math.log,tE=Math.LN2;function nE(e){var t=e>>>0;return t===0?32:31-(eE(t)/tE|0)|0}var Sf=31,He=0,Ni=0,zt=1,Co=2,Ps=4,Ma=8,hs=16,jl=32,Eo=4194240,kl=64,Nf=128,Cf=256,Ef=512,Df=1024,jf=2048,kf=4096,Rf=8192,Tf=16384,Lf=32768,Af=65536,Mf=131072,Uf=262144,Of=524288,Pf=1048576,Bf=2097152,xu=130023424,Do=4194304,If=8388608,Vf=16777216,Ff=33554432,Hf=67108864,z_=Do,Rl=134217728,$_=268435455,Tl=268435456,Ua=536870912,br=1073741824;function iE(e){{if(e&zt)return"Sync";if(e&Co)return"InputContinuousHydration";if(e&Ps)return"InputContinuous";if(e&Ma)return"DefaultHydration";if(e&hs)return"Default";if(e&jl)return"TransitionHydration";if(e&Eo)return"Transition";if(e&xu)return"Retry";if(e&Rl)return"SelectiveHydration";if(e&Tl)return"IdleHydration";if(e&Ua)return"Idle";if(e&br)return"Offscreen"}}var Hn=-1,Su=kl,Nu=Do;function Ll(e){switch(Oa(e)){case zt:return zt;case Co:return Co;case Ps:return Ps;case Ma:return Ma;case hs:return hs;case jl:return jl;case kl:case Nf:case Cf:case Ef:case Df:case jf:case kf:case Rf:case Tf:case Lf:case Af:case Mf:case Uf:case Of:case Pf:case Bf:return e&Eo;case Do:case If:case Vf:case Ff:case Hf:return e&xu;case Rl:return Rl;case Tl:return Tl;case Ua:return Ua;case br:return br;default:return y("Should have found matching lanes. This is a bug in React."),e}}function Cu(e,t){var n=e.pendingLanes;if(n===He)return He;var i=He,a=e.suspendedLanes,x=e.pingedLanes,k=n&$_;if(k!==He){var O=k&~a;if(O!==He)i=Ll(O);else{var F=k&x;F!==He&&(i=Ll(F))}}else{var Y=n&~a;Y!==He?i=Ll(Y):x!==He&&(i=Ll(x))}if(i===He)return He;if(t!==He&&t!==i&&(t&a)===He){var K=Oa(i),fe=Oa(t);if(K>=fe||K===hs&&(fe&Eo)!==He)return t}(i&Ps)!==He&&(i|=n&hs);var de=e.entangledLanes;if(de!==He)for(var Ce=e.entanglements,De=i&de;De>0;){var Ae=Pa(De),at=1<<Ae;i|=Ce[Ae],De&=~at}return i}function rE(e,t){for(var n=e.eventTimes,i=Hn;t>0;){var a=Pa(t),x=1<<a,k=n[a];k>i&&(i=k),t&=~x}return i}function sE(e,t){switch(e){case zt:case Co:case Ps:return t+250;case Ma:case hs:case jl:case kl:case Nf:case Cf:case Ef:case Df:case jf:case kf:case Rf:case Tf:case Lf:case Af:case Mf:case Uf:case Of:case Pf:case Bf:return t+5e3;case Do:case If:case Vf:case Ff:case Hf:return Hn;case Rl:case Tl:case Ua:case br:return Hn;default:return y("Should have found matching lanes. This is a bug in React."),Hn}}function aE(e,t){for(var n=e.pendingLanes,i=e.suspendedLanes,a=e.pingedLanes,x=e.expirationTimes,k=n;k>0;){var O=Pa(k),F=1<<O,Y=x[O];Y===Hn?((F&i)===He||(F&a)!==He)&&(x[O]=sE(F,t)):Y<=t&&(e.expiredLanes|=F),k&=~F}}function oE(e){return Ll(e.pendingLanes)}function zf(e){var t=e.pendingLanes&~br;return t!==He?t:t&br?br:He}function lE(e){return(e&zt)!==He}function $f(e){return(e&$_)!==He}function W_(e){return(e&xu)===e}function cE(e){var t=zt|Ps|hs;return(e&t)===He}function uE(e){return(e&Eo)===e}function Eu(e,t){var n=Co|Ps|Ma|hs;return(t&n)!==He}function dE(e,t){return(t&e.expiredLanes)!==He}function G_(e){return(e&Eo)!==He}function Y_(){var e=Su;return Su<<=1,(Su&Eo)===He&&(Su=kl),e}function hE(){var e=Nu;return Nu<<=1,(Nu&xu)===He&&(Nu=Do),e}function Oa(e){return e&-e}function Al(e){return Oa(e)}function Pa(e){return 31-H_(e)}function Wf(e){return Pa(e)}function yr(e,t){return(e&t)!==He}function jo(e,t){return(e&t)===t}function Zt(e,t){return e|t}function Du(e,t){return e&~t}function q_(e,t){return e&t}function h4(e){return e}function fE(e,t){return e!==Ni&&e<t?e:t}function Gf(e){for(var t=[],n=0;n<Sf;n++)t.push(e);return t}function Ml(e,t,n){e.pendingLanes|=t,t!==Ua&&(e.suspendedLanes=He,e.pingedLanes=He);var i=e.eventTimes,a=Wf(t);i[a]=n}function mE(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,i=t;i>0;){var a=Pa(i),x=1<<a;n[a]=Hn,i&=~x}}function K_(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function pE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=He,e.pingedLanes=He,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var i=e.entanglements,a=e.eventTimes,x=e.expirationTimes,k=n;k>0;){var O=Pa(k),F=1<<O;i[O]=He,a[O]=Hn,x[O]=Hn,k&=~F}}function Yf(e,t){for(var n=e.entangledLanes|=t,i=e.entanglements,a=n;a;){var x=Pa(a),k=1<<x;k&t|i[x]&t&&(i[x]|=t),a&=~k}}function vE(e,t){var n=Oa(t),i;switch(n){case Ps:i=Co;break;case hs:i=Ma;break;case kl:case Nf:case Cf:case Ef:case Df:case jf:case kf:case Rf:case Tf:case Lf:case Af:case Mf:case Uf:case Of:case Pf:case Bf:case Do:case If:case Vf:case Ff:case Hf:i=jl;break;case Ua:i=Tl;break;default:i=Ni;break}return(i&(e.suspendedLanes|t))!==Ni?Ni:i}function X_(e,t,n){if(qr)for(var i=e.pendingUpdatersLaneMap;n>0;){var a=Wf(n),x=1<<a,k=i[a];k.add(t),n&=~x}}function J_(e,t){if(qr)for(var n=e.pendingUpdatersLaneMap,i=e.memoizedUpdaters;t>0;){var a=Wf(t),x=1<<a,k=n[a];k.size>0&&(k.forEach(function(O){var F=O.alternate;(F===null||!i.has(F))&&i.add(O)}),k.clear()),t&=~x}}function Z_(e,t){return null}var wr=zt,Bs=Ps,Is=hs,ju=Ua,Ul=Ni;function Kr(){return Ul}function Ci(e){Ul=e}function gE(e,t){var n=Ul;try{return Ul=e,t()}finally{Ul=n}}function _E(e,t){return e!==0&&e<t?e:t}function bE(e,t){return e>t?e:t}function qf(e,t){return e!==0&&e<t}function Q_(e){var t=Oa(e);return qf(wr,t)?qf(Bs,t)?$f(t)?Is:ju:Bs:wr}function ku(e){var t=e.current.memoizedState;return t.isDehydrated}var eb;function yE(e){eb=e}function wE(e){eb(e)}var Kf;function xE(e){Kf=e}var tb;function SE(e){tb=e}var nb;function NE(e){nb=e}var ib;function CE(e){ib=e}var Xf=!1,Ru=[],na=null,ia=null,ra=null,Ol=new Map,Pl=new Map,sa=[],EE=["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 DE(e){return EE.indexOf(e)>-1}function jE(e,t,n,i,a){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]}}function rb(e,t){switch(e){case"focusin":case"focusout":na=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":ra=null;break;case"pointerover":case"pointerout":{var n=t.pointerId;Ol.delete(n);break}case"gotpointercapture":case"lostpointercapture":{var i=t.pointerId;Pl.delete(i);break}}}function Bl(e,t,n,i,a,x){if(e===null||e.nativeEvent!==x){var k=jE(t,n,i,a,x);if(t!==null){var O=la(t);O!==null&&Kf(O)}return k}e.eventSystemFlags|=i;var F=e.targetContainers;return a!==null&&F.indexOf(a)===-1&&F.push(a),e}function kE(e,t,n,i,a){switch(t){case"focusin":{var x=a;return na=Bl(na,e,t,n,i,x),!0}case"dragenter":{var k=a;return ia=Bl(ia,e,t,n,i,k),!0}case"mouseover":{var O=a;return ra=Bl(ra,e,t,n,i,O),!0}case"pointerover":{var F=a,Y=F.pointerId;return Ol.set(Y,Bl(Ol.get(Y)||null,e,t,n,i,F)),!0}case"gotpointercapture":{var K=a,fe=K.pointerId;return Pl.set(fe,Bl(Pl.get(fe)||null,e,t,n,i,K)),!0}}return!1}function sb(e){var t=Va(e.target);if(t!==null){var n=La(t);if(n!==null){var i=n.tag;if(i===T){var a=k_(n);if(a!==null){e.blockedOn=a,ib(e.priority,function(){tb(n)});return}}else if(i===u){var x=n.stateNode;if(ku(x)){e.blockedOn=R_(n);return}}}}e.blockedOn=null}function RE(e){for(var t=nb(),n={blockedOn:null,target:e,priority:t},i=0;i<sa.length&&qf(t,sa[i].priority);i++);sa.splice(i,0,n),i===0&&sb(n)}function Tu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var n=t[0],i=Qf(e.domEventName,e.eventSystemFlags,n,e.nativeEvent);if(i===null){var a=e.nativeEvent,x=new a.constructor(a.type,a);iC(x),a.target.dispatchEvent(x),rC()}else{var k=la(i);return k!==null&&Kf(k),e.blockedOn=i,!1}t.shift()}return!0}function ab(e,t,n){Tu(e)&&n.delete(t)}function TE(){Xf=!1,na!==null&&Tu(na)&&(na=null),ia!==null&&Tu(ia)&&(ia=null),ra!==null&&Tu(ra)&&(ra=null),Ol.forEach(ab),Pl.forEach(ab)}function Il(e,t){e.blockedOn===t&&(e.blockedOn=null,Xf||(Xf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,TE)))}function Vl(e){if(Ru.length>0){Il(Ru[0],e);for(var t=1;t<Ru.length;t++){var n=Ru[t];n.blockedOn===e&&(n.blockedOn=null)}}na!==null&&Il(na,e),ia!==null&&Il(ia,e),ra!==null&&Il(ra,e);var i=function(O){return Il(O,e)};Ol.forEach(i),Pl.forEach(i);for(var a=0;a<sa.length;a++){var x=sa[a];x.blockedOn===e&&(x.blockedOn=null)}for(;sa.length>0;){var k=sa[0];if(k.blockedOn!==null)break;sb(k),k.blockedOn===null&&sa.shift()}}var ko=d.ReactCurrentBatchConfig,Jf=!0;function ob(e){Jf=!!e}function LE(){return Jf}function AE(e,t,n){var i=lb(t),a;switch(i){case wr:a=ME;break;case Bs:a=UE;break;case Is:default:a=Zf;break}return a.bind(null,t,n,e)}function ME(e,t,n,i){var a=Kr(),x=ko.transition;ko.transition=null;try{Ci(wr),Zf(e,t,n,i)}finally{Ci(a),ko.transition=x}}function UE(e,t,n,i){var a=Kr(),x=ko.transition;ko.transition=null;try{Ci(Bs),Zf(e,t,n,i)}finally{Ci(a),ko.transition=x}}function Zf(e,t,n,i){Jf&&OE(e,t,n,i)}function OE(e,t,n,i){var a=Qf(e,t,n,i);if(a===null){fm(e,t,i,Lu,n),rb(e,i);return}if(kE(a,e,t,n,i)){i.stopPropagation();return}if(rb(e,i),t&wl&&DE(e)){for(;a!==null;){var x=la(a);x!==null&&wE(x);var k=Qf(e,t,n,i);if(k===null&&fm(e,t,i,Lu,n),k===a)break;a=k}a!==null&&i.stopPropagation();return}fm(e,t,i,null,n)}var Lu=null;function Qf(e,t,n,i){Lu=null;var a=sf(i),x=Va(a);if(x!==null){var k=La(x);if(k===null)x=null;else{var O=k.tag;if(O===T){var F=k_(k);if(F!==null)return F;x=null}else if(O===u){var Y=k.stateNode;if(ku(Y))return R_(k);x=null}else k!==x&&(x=null)}}return Lu=x,null}function lb(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 wr;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 Bs;case"message":{var t=DC();switch(t){case wu:return wr;case yf:return Bs;case Aa:case jC:return Is;case wf:return ju;default:return Is}}default:return Is}}function PE(e,t,n){return e.addEventListener(t,n,!1),n}function BE(e,t,n){return e.addEventListener(t,n,!0),n}function IE(e,t,n,i){return e.addEventListener(t,n,{capture:!0,passive:i}),n}function VE(e,t,n,i){return e.addEventListener(t,n,{passive:i}),n}var Fl=null,em=null,Hl=null;function FE(e){return Fl=e,em=ub(),!0}function HE(){Fl=null,em=null,Hl=null}function cb(){if(Hl)return Hl;var e,t=em,n=t.length,i,a=ub(),x=a.length;for(e=0;e<n&&t[e]===a[e];e++);var k=n-e;for(i=1;i<=k&&t[n-i]===a[x-i];i++);var O=i>1?1-i:void 0;return Hl=a.slice(e,O),Hl}function ub(){return"value"in Fl?Fl.value:Fl.textContent}function Au(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 Mu(){return!0}function db(){return!1}function xr(e){function t(n,i,a,x,k){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=x,this.target=k,this.currentTarget=null;for(var O in e)if(e.hasOwnProperty(O)){var F=e[O];F?this[O]=F(x):this[O]=x[O]}var Y=x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1;return Y?this.isDefaultPrevented=Mu:this.isDefaultPrevented=db,this.isPropagationStopped=db,this}return Bt(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=Mu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Mu)},persist:function(){},isPersistent:Mu}),t}var Ro={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tm=xr(Ro),zl=Bt({},Ro,{view:0,detail:0}),zE=xr(zl),nm,im,$l;function $E(e){e!==$l&&($l&&e.type==="mousemove"?(nm=e.screenX-$l.screenX,im=e.screenY-$l.screenY):(nm=0,im=0),$l=e)}var Uu=Bt({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:($E(e),nm)},movementY:function(e){return"movementY"in e?e.movementY:im}}),hb=xr(Uu),WE=Bt({},Uu,{dataTransfer:0}),GE=xr(WE),YE=Bt({},zl,{relatedTarget:0}),rm=xr(YE),qE=Bt({},Ro,{animationName:0,elapsedTime:0,pseudoElement:0}),KE=xr(qE),XE=Bt({},Ro,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),JE=xr(XE),ZE=Bt({},Ro,{data:0}),fb=xr(ZE),QE=fb,eD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tD={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 nD(e){if(e.key){var t=eD[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var n=Au(e);return n===13?"Enter":String.fromCharCode(n)}return e.type==="keydown"||e.type==="keyup"?tD[e.keyCode]||"Unidentified":""}var iD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rD(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var i=iD[e];return i?!!n[i]:!1}function sm(e){return rD}var sD=Bt({},zl,{key:nD,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sm,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),aD=xr(sD),oD=Bt({},Uu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mb=xr(oD),lD=Bt({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sm}),cD=xr(lD),uD=Bt({},Ro,{propertyName:0,elapsedTime:0,pseudoElement:0}),dD=xr(uD),hD=Bt({},Uu,{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}),fD=xr(hD),mD=[9,13,27,32],pb=229,am=Ie&&"CompositionEvent"in window,Wl=null;Ie&&"documentMode"in document&&(Wl=document.documentMode);var pD=Ie&&"TextEvent"in window&&!Wl,vb=Ie&&(!am||Wl&&Wl>8&&Wl<=11),gb=32,_b=String.fromCharCode(gb);function vD(){_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 bb=!1;function gD(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function _D(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function bD(e,t){return e==="keydown"&&t.keyCode===pb}function yb(e,t){switch(e){case"keyup":return mD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==pb;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wb(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function xb(e){return e.locale==="ko"}var To=!1;function yD(e,t,n,i,a){var x,k;if(am?x=_D(t):To?yb(t,i)&&(x="onCompositionEnd"):bD(t,i)&&(x="onCompositionStart"),!x)return null;vb&&!xb(i)&&(!To&&x==="onCompositionStart"?To=FE(a):x==="onCompositionEnd"&&To&&(k=cb()));var O=Vu(n,x);if(O.length>0){var F=new fb(x,t,null,i,a);if(e.push({event:F,listeners:O}),k)F.data=k;else{var Y=wb(i);Y!==null&&(F.data=Y)}}}function wD(e,t){switch(e){case"compositionend":return wb(t);case"keypress":var n=t.which;return n!==gb?null:(bb=!0,_b);case"textInput":var i=t.data;return i===_b&&bb?null:i;default:return null}}function xD(e,t){if(To){if(e==="compositionend"||!am&&yb(e,t)){var n=cb();return HE(),To=!1,n}return null}switch(e){case"paste":return null;case"keypress":if(!gD(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return vb&&!xb(t)?null:t.data;default:return null}}function SD(e,t,n,i,a){var x;if(pD?x=wD(t,i):x=xD(t,i),!x)return null;var k=Vu(n,"onBeforeInput");if(k.length>0){var O=new QE("onBeforeInput","beforeinput",null,i,a);e.push({event:O,listeners:k}),O.data=x}}function ND(e,t,n,i,a,x,k){yD(e,t,n,i,a),SD(e,t,n,i,a)}var CD={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 Sb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!CD[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 ED(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 DD(){_e("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Nb(e,t,n,i){y_(i);var a=Vu(t,"onChange");if(a.length>0){var x=new tm("onChange","change",null,n,i);e.push({event:x,listeners:a})}}var Gl=null,Yl=null;function jD(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function kD(e){var t=[];Nb(t,Yl,e,sf(e)),N_(RD,t)}function RD(e){Hb(e,0)}function Ou(e){var t=Po(e);if(xe(t))return e}function TD(e,t){if(e==="change")return t}var Cb=!1;Ie&&(Cb=ED("input")&&(!document.documentMode||document.documentMode>9));function LD(e,t){Gl=e,Yl=t,Gl.attachEvent("onpropertychange",Db)}function Eb(){Gl&&(Gl.detachEvent("onpropertychange",Db),Gl=null,Yl=null)}function Db(e){e.propertyName==="value"&&Ou(Yl)&&kD(e)}function AD(e,t,n){e==="focusin"?(Eb(),LD(t,n)):e==="focusout"&&Eb()}function MD(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ou(Yl)}function UD(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function OD(e,t){if(e==="click")return Ou(t)}function PD(e,t){if(e==="input"||e==="change")return Ou(t)}function BD(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||Le(e,"number",e.value)}function ID(e,t,n,i,a,x,k){var O=n?Po(n):window,F,Y;if(jD(O)?F=TD:Sb(O)?Cb?F=PD:(F=MD,Y=AD):UD(O)&&(F=OD),F){var K=F(t,n);if(K){Nb(e,K,i,a);return}}Y&&Y(t,O,n),t==="focusout"&&BD(O)}function VD(){ue("onMouseEnter",["mouseout","mouseover"]),ue("onMouseLeave",["mouseout","mouseover"]),ue("onPointerEnter",["pointerout","pointerover"]),ue("onPointerLeave",["pointerout","pointerover"])}function FD(e,t,n,i,a,x,k){var O=t==="mouseover"||t==="pointerover",F=t==="mouseout"||t==="pointerout";if(O&&!sC(i)){var Y=i.relatedTarget||i.fromElement;if(Y&&(Va(Y)||lc(Y)))return}if(!(!F&&!O)){var K;if(a.window===a)K=a;else{var fe=a.ownerDocument;fe?K=fe.defaultView||fe.parentWindow:K=window}var de,Ce;if(F){var De=i.relatedTarget||i.toElement;if(de=n,Ce=De?Va(De):null,Ce!==null){var Ae=La(Ce);(Ce!==Ae||Ce.tag!==S&&Ce.tag!==C)&&(Ce=null)}}else de=null,Ce=n;if(de!==Ce){var at=hb,Lt="onMouseLeave",Dt="onMouseEnter",fn="mouse";(t==="pointerout"||t==="pointerover")&&(at=mb,Lt="onPointerLeave",Dt="onPointerEnter",fn="pointer");var ln=de==null?K:Po(de),be=Ce==null?K:Po(Ce),Me=new at(Lt,fn+"leave",de,i,a);Me.target=ln,Me.relatedTarget=be;var ye=null,Ge=Va(a);if(Ge===n){var ft=new at(Dt,fn+"enter",Ce,i,a);ft.target=be,ft.relatedTarget=ln,ye=ft}dj(e,Me,ye,de,Ce)}}}function HD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sr=typeof Object.is=="function"?Object.is:HD;function ql(e,t){if(Sr(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 a=0;a<n.length;a++){var x=n[a];if(!Ue.call(t,x)||!Sr(e[x],t[x]))return!1}return!0}function jb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zD(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function kb(e,t){for(var n=jb(e),i=0,a=0;n;){if(n.nodeType===Ls){if(a=i+n.textContent.length,i<=t&&a>=t)return{node:n,offset:t-i};i=a}n=jb(zD(n))}}function $D(e){var t=e.ownerDocument,n=t&&t.defaultView||window,i=n.getSelection&&n.getSelection();if(!i||i.rangeCount===0)return null;var a=i.anchorNode,x=i.anchorOffset,k=i.focusNode,O=i.focusOffset;try{a.nodeType,k.nodeType}catch{return null}return WD(e,a,x,k,O)}function WD(e,t,n,i,a){var x=0,k=-1,O=-1,F=0,Y=0,K=e,fe=null;e:for(;;){for(var de=null;K===t&&(n===0||K.nodeType===Ls)&&(k=x+n),K===i&&(a===0||K.nodeType===Ls)&&(O=x+a),K.nodeType===Ls&&(x+=K.nodeValue.length),(de=K.firstChild)!==null;)fe=K,K=de;for(;;){if(K===e)break e;if(fe===t&&++F===n&&(k=x),fe===i&&++Y===a&&(O=x),(de=K.nextSibling)!==null)break;K=fe,fe=K.parentNode}K=de}return k===-1||O===-1?null:{start:k,end:O}}function GD(e,t){var n=e.ownerDocument||document,i=n&&n.defaultView||window;if(i.getSelection){var a=i.getSelection(),x=e.textContent.length,k=Math.min(t.start,x),O=t.end===void 0?k:Math.min(t.end,x);if(!a.extend&&k>O){var F=O;O=k,k=F}var Y=kb(e,k),K=kb(e,O);if(Y&&K){if(a.rangeCount===1&&a.anchorNode===Y.node&&a.anchorOffset===Y.offset&&a.focusNode===K.node&&a.focusOffset===K.offset)return;var fe=n.createRange();fe.setStart(Y.node,Y.offset),a.removeAllRanges(),k>O?(a.addRange(fe),a.extend(K.node,K.offset)):(fe.setEnd(K.node,K.offset),a.addRange(fe))}}}function Rb(e){return e&&e.nodeType===Ls}function Tb(e,t){return!e||!t?!1:e===t?!0:Rb(e)?!1:Rb(t)?Tb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function YD(e){return e&&e.ownerDocument&&Tb(e.ownerDocument.documentElement,e)}function qD(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function Lb(){for(var e=window,t=Be();t instanceof e.HTMLIFrameElement;){if(qD(t))e=t.contentWindow;else return t;t=Be(e.document)}return t}function om(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 KD(){var e=Lb();return{focusedElem:e,selectionRange:om(e)?JD(e):null}}function XD(e){var t=Lb(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&YD(n)){i!==null&&om(n)&&ZD(n,i);for(var a=[],x=n;x=x.parentNode;)x.nodeType===cr&&a.push({element:x,left:x.scrollLeft,top:x.scrollTop});typeof n.focus=="function"&&n.focus();for(var k=0;k<a.length;k++){var O=a[k];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}}function JD(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=$D(e),t||{start:0,end:0}}function ZD(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)):GD(e,t)}var QD=Ie&&"documentMode"in document&&document.documentMode<=11;function ej(){_e("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var Lo=null,lm=null,Kl=null,cm=!1;function tj(e){if("selectionStart"in e&&om(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 nj(e){return e.window===e?e.document:e.nodeType===As?e:e.ownerDocument}function Ab(e,t,n){var i=nj(n);if(!(cm||Lo==null||Lo!==Be(i))){var a=tj(Lo);if(!Kl||!ql(Kl,a)){Kl=a;var x=Vu(lm,"onSelect");if(x.length>0){var k=new tm("onSelect","select",null,t,n);e.push({event:k,listeners:x}),k.target=Lo}}}}function ij(e,t,n,i,a,x,k){var O=n?Po(n):window;switch(t){case"focusin":(Sb(O)||O.contentEditable==="true")&&(Lo=O,lm=n,Kl=null);break;case"focusout":Lo=null,lm=null,Kl=null;break;case"mousedown":cm=!0;break;case"contextmenu":case"mouseup":case"dragend":cm=!1,Ab(e,i,a);break;case"selectionchange":if(QD)break;case"keydown":case"keyup":Ab(e,i,a)}}function Pu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ao={animationend:Pu("Animation","AnimationEnd"),animationiteration:Pu("Animation","AnimationIteration"),animationstart:Pu("Animation","AnimationStart"),transitionend:Pu("Transition","TransitionEnd")},um={},Mb={};Ie&&(Mb=document.createElement("div").style,"AnimationEvent"in window||(delete Ao.animationend.animation,delete Ao.animationiteration.animation,delete Ao.animationstart.animation),"TransitionEvent"in window||delete Ao.transitionend.transition);function Bu(e){if(um[e])return um[e];if(!Ao[e])return e;var t=Ao[e];for(var n in t)if(t.hasOwnProperty(n)&&n in Mb)return um[e]=t[n];return e}var Ub=Bu("animationend"),Ob=Bu("animationiteration"),Pb=Bu("animationstart"),Bb=Bu("transitionend"),Ib=new Map,Vb=["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 aa(e,t){Ib.set(e,t),_e(t,[e])}function rj(){for(var e=0;e<Vb.length;e++){var t=Vb[e],n=t.toLowerCase(),i=t[0].toUpperCase()+t.slice(1);aa(n,"on"+i)}aa(Ub,"onAnimationEnd"),aa(Ob,"onAnimationIteration"),aa(Pb,"onAnimationStart"),aa("dblclick","onDoubleClick"),aa("focusin","onFocus"),aa("focusout","onBlur"),aa(Bb,"onTransitionEnd")}function sj(e,t,n,i,a,x,k){var O=Ib.get(t);if(O!==void 0){var F=tm,Y=t;switch(t){case"keypress":if(Au(i)===0)return;case"keydown":case"keyup":F=aD;break;case"focusin":Y="focus",F=rm;break;case"focusout":Y="blur",F=rm;break;case"beforeblur":case"afterblur":F=rm;break;case"click":if(i.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=hb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=GE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=cD;break;case Ub:case Ob:case Pb:F=KE;break;case Bb:F=dD;break;case"scroll":F=zE;break;case"wheel":F=fD;break;case"copy":case"cut":case"paste":F=JE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=mb;break}var K=(x&wl)!==0;{var fe=!K&&t==="scroll",de=cj(n,O,i.type,K,fe);if(de.length>0){var Ce=new F(O,Y,null,i,a);e.push({event:Ce,listeners:de})}}}}rj(),VD(),DD(),ej(),vD();function aj(e,t,n,i,a,x,k){sj(e,t,n,i,a,x);var O=(x&nC)===0;O&&(FD(e,t,n,i,a),ID(e,t,n,i,a),ij(e,t,n,i,a),ND(e,t,n,i,a))}var Xl=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],dm=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Xl));function Fb(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,mC(i,t,void 0,e),e.currentTarget=null}function oj(e,t,n){var i;if(n)for(var a=t.length-1;a>=0;a--){var x=t[a],k=x.instance,O=x.currentTarget,F=x.listener;if(k!==i&&e.isPropagationStopped())return;Fb(e,F,O),i=k}else for(var Y=0;Y<t.length;Y++){var K=t[Y],fe=K.instance,de=K.currentTarget,Ce=K.listener;if(fe!==i&&e.isPropagationStopped())return;Fb(e,Ce,de),i=fe}}function Hb(e,t){for(var n=(t&wl)!==0,i=0;i<e.length;i++){var a=e[i],x=a.event,k=a.listeners;oj(x,k,n)}pC()}function lj(e,t,n,i,a){var x=sf(n),k=[];aj(k,e,i,n,x,t),Hb(k,t)}function $n(e,t){dm.has(e)||y('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=!1,i=Bk(t),a=hj(e);i.has(a)||(zb(t,e,rf,n),i.add(a))}function hm(e,t,n){dm.has(e)&&!t&&y('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|=wl),zb(n,e,i,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function Jl(e){if(!e[Iu]){e[Iu]=!0,ke.forEach(function(n){n!=="selectionchange"&&(dm.has(n)||hm(n,!1,e),hm(n,!0,e))});var t=e.nodeType===As?e:e.ownerDocument;t!==null&&(t[Iu]||(t[Iu]=!0,hm("selectionchange",!1,t)))}}function zb(e,t,n,i,a){var x=AE(e,t,n),k=void 0;lf&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(k=!0),e=e,i?k!==void 0?IE(e,t,x,k):BE(e,t,x):k!==void 0?VE(e,t,x,k):PE(e,t,x)}function $b(e,t){return e===t||e.nodeType===li&&e.parentNode===t}function fm(e,t,n,i,a){var x=i;if(!(t&__)&&!(t&rf)){var k=a;if(i!==null){var O=i;e:for(;;){if(O===null)return;var F=O.tag;if(F===u||F===p){var Y=O.stateNode.containerInfo;if($b(Y,k))break;if(F===p)for(var K=O.return;K!==null;){var fe=K.tag;if(fe===u||fe===p){var de=K.stateNode.containerInfo;if($b(de,k))return}K=K.return}for(;Y!==null;){var Ce=Va(Y);if(Ce===null)return;var De=Ce.tag;if(De===S||De===C){O=x=Ce;continue e}Y=Y.parentNode}}O=O.return}}}N_(function(){return lj(e,t,n,x)})}function Zl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cj(e,t,n,i,a,x){for(var k=t!==null?t+"Capture":null,O=i?k:t,F=[],Y=e,K=null;Y!==null;){var fe=Y,de=fe.stateNode,Ce=fe.tag;if(Ce===S&&de!==null&&(K=de,O!==null)){var De=Sl(Y,O);De!=null&&F.push(Zl(Y,De,K))}if(a)break;Y=Y.return}return F}function Vu(e,t){for(var n=t+"Capture",i=[],a=e;a!==null;){var x=a,k=x.stateNode,O=x.tag;if(O===S&&k!==null){var F=k,Y=Sl(a,n);Y!=null&&i.unshift(Zl(a,Y,F));var K=Sl(a,t);K!=null&&i.push(Zl(a,K,F))}a=a.return}return i}function Mo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==S);return e||null}function uj(e,t){for(var n=e,i=t,a=0,x=n;x;x=Mo(x))a++;for(var k=0,O=i;O;O=Mo(O))k++;for(;a-k>0;)n=Mo(n),a--;for(;k-a>0;)i=Mo(i),k--;for(var F=a;F--;){if(n===i||i!==null&&n===i.alternate)return n;n=Mo(n),i=Mo(i)}return null}function Wb(e,t,n,i,a){for(var x=t._reactName,k=[],O=n;O!==null&&O!==i;){var F=O,Y=F.alternate,K=F.stateNode,fe=F.tag;if(Y!==null&&Y===i)break;if(fe===S&&K!==null){var de=K;if(a){var Ce=Sl(O,x);Ce!=null&&k.unshift(Zl(O,Ce,de))}else if(!a){var De=Sl(O,x);De!=null&&k.push(Zl(O,De,de))}}O=O.return}k.length!==0&&e.push({event:t,listeners:k})}function dj(e,t,n,i,a){var x=i&&a?uj(i,a):null;i!==null&&Wb(e,t,i,x,!1),a!==null&&n!==null&&Wb(e,n,a,x,!0)}function hj(e,t){return e+"__bubble"}var ur=!1,Ql="dangerouslySetInnerHTML",Fu="suppressContentEditableWarning",oa="suppressHydrationWarning",Gb="autoFocus",Ba="children",Ia="style",Hu="__html",mm,zu,ec,Yb,$u,qb,Kb;mm={dialog:!0,webview:!0},zu=function(e,t){KN(e,t),XN(e,t),tC(e,t,{registrationNameDependencies:se,possibleRegistrationNames:W})},qb=Ie&&!document.documentMode,ec=function(e,t,n){if(!ur){var i=Wu(n),a=Wu(t);a!==i&&(ur=!0,y("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(a),JSON.stringify(i)))}},Yb=function(e){if(!ur){ur=!0;var t=[];e.forEach(function(n){t.push(n)}),y("Extra attributes from the server: %s",t)}},$u=function(e,t){t===!1?y("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):y("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},Kb=function(e,t){var n=e.namespaceURI===Ts?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var fj=/\r\n?/g,mj=/\u0000|\uFFFD/g;function Wu(e){lt(e);var t=typeof e=="string"?e:""+e;return t.replace(fj,`
91
+ `).replace(mj,"")}function Gu(e,t,n,i){var a=Wu(t),x=Wu(e);if(x!==a&&(i&&(ur||(ur=!0,y('Text content did not match. Server: "%s" Client: "%s"',x,a))),n&&te))throw new Error("Text content does not match server-rendered HTML.")}function Xb(e){return e.nodeType===As?e:e.ownerDocument}function pj(){}function Yu(e){e.onclick=pj}function vj(e,t,n,i,a){for(var x in i)if(i.hasOwnProperty(x)){var k=i[x];if(x===Ia)k&&Object.freeze(k),h_(t,k);else if(x===Ql){var O=k?k[Hu]:void 0;O!=null&&o_(t,O)}else if(x===Ba)if(typeof k=="string"){var F=e!=="textarea"||k!=="";F&&vu(t,k)}else typeof k=="number"&&vu(t,""+k);else x===Fu||x===oa||x===Gb||(se.hasOwnProperty(x)?k!=null&&(typeof k!="function"&&$u(x,k),x==="onScroll"&&$n("scroll",t)):k!=null&&Zn(t,x,k,a))}}function gj(e,t,n,i){for(var a=0;a<t.length;a+=2){var x=t[a],k=t[a+1];x===Ia?h_(e,k):x===Ql?o_(e,k):x===Ba?vu(e,k):Zn(e,x,k,i)}}function _j(e,t,n,i){var a,x=Xb(n),k,O=i;if(O===Ts&&(O=Jh(e)),O===Ts){if(a=Da(e,t),!a&&e!==e.toLowerCase()&&y("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var F=x.createElement("div");F.innerHTML="<script><\/script>";var Y=F.firstChild;k=F.removeChild(Y)}else if(typeof t.is=="string")k=x.createElement(e,{is:t.is});else if(k=x.createElement(e),e==="select"){var K=k;t.multiple?K.multiple=!0:t.size&&(K.size=t.size)}}else k=x.createElementNS(O,e);return O===Ts&&!a&&Object.prototype.toString.call(k)==="[object HTMLUnknownElement]"&&!Ue.call(mm,e)&&(mm[e]=!0,y("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),k}function bj(e,t){return Xb(t).createTextNode(e)}function yj(e,t,n,i){var a=Da(t,n);zu(t,n);var x;switch(t){case"dialog":$n("cancel",e),$n("close",e),x=n;break;case"iframe":case"object":case"embed":$n("load",e),x=n;break;case"video":case"audio":for(var k=0;k<Xl.length;k++)$n(Xl[k],e);x=n;break;case"source":$n("error",e),x=n;break;case"img":case"image":case"link":$n("error",e),$n("load",e),x=n;break;case"details":$n("toggle",e),x=n;break;case"input":tn(e,n),x=zn(e,n),$n("invalid",e);break;case"option":_t(e,n),x=n;break;case"select":_r(e,n),x=Rs(e,n),$n("invalid",e);break;case"textarea":r_(e,n),x=Kh(e,n),$n("invalid",e);break;default:x=n}switch(nf(t,x),vj(t,e,i,x,a),t){case"input":he(e),q(e,n,!1);break;case"textarea":he(e),a_(e);break;case"option":ct(e,n);break;case"select":fo(e,n);break;default:typeof x.onClick=="function"&&Yu(e);break}}function wj(e,t,n,i,a){zu(t,i);var x=null,k,O;switch(t){case"input":k=zn(e,n),O=zn(e,i),x=[];break;case"select":k=Rs(e,n),O=Rs(e,i),x=[];break;case"textarea":k=Kh(e,n),O=Kh(e,i),x=[];break;default:k=n,O=i,typeof k.onClick!="function"&&typeof O.onClick=="function"&&Yu(e);break}nf(t,O);var F,Y,K=null;for(F in k)if(!(O.hasOwnProperty(F)||!k.hasOwnProperty(F)||k[F]==null))if(F===Ia){var fe=k[F];for(Y in fe)fe.hasOwnProperty(Y)&&(K||(K={}),K[Y]="")}else F===Ql||F===Ba||F===Fu||F===oa||F===Gb||(se.hasOwnProperty(F)?x||(x=[]):(x=x||[]).push(F,null));for(F in O){var de=O[F],Ce=k!=null?k[F]:void 0;if(!(!O.hasOwnProperty(F)||de===Ce||de==null&&Ce==null))if(F===Ia)if(de&&Object.freeze(de),Ce){for(Y in Ce)Ce.hasOwnProperty(Y)&&(!de||!de.hasOwnProperty(Y))&&(K||(K={}),K[Y]="");for(Y in de)de.hasOwnProperty(Y)&&Ce[Y]!==de[Y]&&(K||(K={}),K[Y]=de[Y])}else K||(x||(x=[]),x.push(F,K)),K=de;else if(F===Ql){var De=de?de[Hu]:void 0,Ae=Ce?Ce[Hu]:void 0;De!=null&&Ae!==De&&(x=x||[]).push(F,De)}else F===Ba?(typeof de=="string"||typeof de=="number")&&(x=x||[]).push(F,""+de):F===Fu||F===oa||(se.hasOwnProperty(F)?(de!=null&&(typeof de!="function"&&$u(F,de),F==="onScroll"&&$n("scroll",e)),!x&&Ce!==de&&(x=[])):(x=x||[]).push(F,de))}return K&&(FN(K,O[Ia]),(x=x||[]).push(Ia,K)),x}function xj(e,t,n,i,a){n==="input"&&a.type==="radio"&&a.name!=null&&z(e,a);var x=Da(n,i),k=Da(n,a);switch(gj(e,t,x,k),n){case"input":re(e,a);break;case"textarea":s_(e,a);break;case"select":mu(e,a);break}}function Sj(e){{var t=e.toLowerCase();return gu.hasOwnProperty(t)&&gu[t]||null}}function Nj(e,t,n,i,a,x,k){var O,F;switch(O=Da(t,n),zu(t,n),t){case"dialog":$n("cancel",e),$n("close",e);break;case"iframe":case"object":case"embed":$n("load",e);break;case"video":case"audio":for(var Y=0;Y<Xl.length;Y++)$n(Xl[Y],e);break;case"source":$n("error",e);break;case"img":case"image":case"link":$n("error",e),$n("load",e);break;case"details":$n("toggle",e);break;case"input":tn(e,n),$n("invalid",e);break;case"option":_t(e,n);break;case"select":_r(e,n),$n("invalid",e);break;case"textarea":r_(e,n),$n("invalid",e);break}nf(t,n);{F=new Set;for(var K=e.attributes,fe=0;fe<K.length;fe++){var de=K[fe].name.toLowerCase();switch(de){case"value":break;case"checked":break;case"selected":break;default:F.add(K[fe].name)}}}var Ce=null;for(var De in n)if(n.hasOwnProperty(De)){var Ae=n[De];if(De===Ba)typeof Ae=="string"?e.textContent!==Ae&&(n[oa]!==!0&&Gu(e.textContent,Ae,x,k),Ce=[Ba,Ae]):typeof Ae=="number"&&e.textContent!==""+Ae&&(n[oa]!==!0&&Gu(e.textContent,Ae,x,k),Ce=[Ba,""+Ae]);else if(se.hasOwnProperty(De))Ae!=null&&(typeof Ae!="function"&&$u(De,Ae),De==="onScroll"&&$n("scroll",e));else if(k&&typeof O=="boolean"){var at=void 0,Lt=Ft(De);if(n[oa]!==!0){if(!(De===Fu||De===oa||De==="value"||De==="checked"||De==="selected")){if(De===Ql){var Dt=e.innerHTML,fn=Ae?Ae[Hu]:void 0;if(fn!=null){var ln=Kb(e,fn);ln!==Dt&&ec(De,Dt,ln)}}else if(De===Ia){if(F.delete(De),qb){var be=IN(Ae);at=e.getAttribute("style"),be!==at&&ec(De,at,be)}}else if(O&&!J)F.delete(De.toLowerCase()),at=Ei(e,De,Ae),Ae!==at&&ec(De,at,Ae);else if(!Ct(De,Lt,O)&&!Qt(De,Ae,Lt,O)){var Me=!1;if(Lt!==null)F.delete(Lt.attributeName),at=Gn(e,De,Ae,Lt);else{var ye=i;if(ye===Ts&&(ye=Jh(t)),ye===Ts)F.delete(De.toLowerCase());else{var Ge=Sj(De);Ge!==null&&Ge!==De&&(Me=!0,F.delete(Ge)),F.delete(De)}at=Ei(e,De,Ae)}var ft=J;!ft&&Ae!==at&&!Me&&ec(De,at,Ae)}}}}}switch(k&&F.size>0&&n[oa]!==!0&&Yb(F),t){case"input":he(e),q(e,n,!0);break;case"textarea":he(e),a_(e);break;case"select":case"option":break;default:typeof n.onClick=="function"&&Yu(e);break}return Ce}function Cj(e,t,n){var i=e.nodeValue!==t;return i}function pm(e,t){{if(ur)return;ur=!0,y("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function vm(e,t){{if(ur)return;ur=!0,y('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function gm(e,t,n){{if(ur)return;ur=!0,y("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function _m(e,t){{if(t===""||ur)return;ur=!0,y('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function Ej(e,t,n){switch(t){case"input":ce(e,n);return;case"textarea":yN(e,n);return;case"select":qh(e,n);return}}var tc=function(){},nc=function(){};{var Dj=["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"],Jb=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],jj=Jb.concat(["button"]),kj=["dd","dt","li","option","optgroup","p","rp","rt"],Zb={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};nc=function(e,t){var n=Bt({},e||Zb),i={tag:t};return Jb.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),jj.indexOf(t)!==-1&&(n.pTagInButtonScope=null),Dj.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 Rj=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 kj.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},Tj=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},Qb={};tc=function(e,t,n){n=n||Zb;var i=n.current,a=i&&i.tag;t!=null&&(e!=null&&y("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var x=Rj(e,a)?null:i,k=x?null:Tj(e,n),O=x||k;if(O){var F=O.tag,Y=!!x+"|"+e+"|"+F;if(!Qb[Y]){Qb[Y]=!0;var K=e,fe="";if(e==="#text"?/\S/.test(t)?K="Text nodes":(K="Whitespace text nodes",fe=" Make sure you don't have any extra whitespace between tags on each line of your source code."):K="<"+e+">",x){var de="";F==="table"&&e==="tr"&&(de+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),y("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",K,F,fe,de)}else y("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",K,F)}}}}var qu="suppressHydrationWarning",Ku="$",Xu="/$",ic="$?",rc="$!",Lj="style",bm=null,ym=null;function Aj(e){var t,n,i=e.nodeType;switch(i){case As:case Qh:{t=i===As?"#document":"#fragment";var a=e.documentElement;n=a?a.namespaceURI:Zh(null,"");break}default:{var x=i===li?e.parentNode:e,k=x.namespaceURI||null;t=x.tagName,n=Zh(k,t);break}}{var O=t.toLowerCase(),F=nc(null,O);return{namespace:n,ancestorInfo:F}}}function Mj(e,t,n){{var i=e,a=Zh(i.namespace,t),x=nc(i.ancestorInfo,t);return{namespace:a,ancestorInfo:x}}}function f4(e){return e}function Uj(e){bm=LE(),ym=KD();var t=null;return ob(!1),t}function Oj(e){XD(ym),ob(bm),bm=null,ym=null}function Pj(e,t,n,i,a){var x;{var k=i;if(tc(e,null,k.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var O=""+t.children,F=nc(k.ancestorInfo,e);tc(null,O,F)}x=k.namespace}var Y=_j(e,t,n,x);return oc(a,Y),jm(Y,t),Y}function Bj(e,t){e.appendChild(t)}function Ij(e,t,n,i,a){switch(yj(e,t,n,i),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}function Vj(e,t,n,i,a,x){{var k=x;if(typeof i.children!=typeof n.children&&(typeof i.children=="string"||typeof i.children=="number")){var O=""+i.children,F=nc(k.ancestorInfo,t);tc(null,O,F)}}return wj(e,t,n,i)}function wm(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 Fj(e,t,n,i){{var a=n;tc(null,e,a.ancestorInfo)}var x=bj(e,t);return oc(i,x),x}function Hj(){var e=window.event;return e===void 0?Is:lb(e.type)}var xm=typeof setTimeout=="function"?setTimeout:void 0,zj=typeof clearTimeout=="function"?clearTimeout:void 0,Sm=-1,ey=typeof Promise=="function"?Promise:void 0,$j=typeof queueMicrotask=="function"?queueMicrotask:typeof ey<"u"?function(e){return ey.resolve(null).then(e).catch(Wj)}:xm;function Wj(e){setTimeout(function(){throw e})}function Gj(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 Yj(e,t,n,i,a,x){xj(e,t,n,i,a),jm(e,a)}function ty(e){vu(e,"")}function qj(e,t,n){e.nodeValue=n}function Kj(e,t){e.appendChild(t)}function Xj(e,t){var n;e.nodeType===li?(n=e.parentNode,n.insertBefore(t,e)):(n=e,n.appendChild(t));var i=e._reactRootContainer;i==null&&n.onclick===null&&Yu(n)}function Jj(e,t,n){e.insertBefore(t,n)}function Zj(e,t,n){e.nodeType===li?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}function Qj(e,t){e.removeChild(t)}function ek(e,t){e.nodeType===li?e.parentNode.removeChild(t):e.removeChild(t)}function Nm(e,t){var n=t,i=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===li){var x=a.data;if(x===Xu)if(i===0){e.removeChild(a),Vl(t);return}else i--;else(x===Ku||x===ic||x===rc)&&i++}n=a}while(n);Vl(t)}function tk(e,t){e.nodeType===li?Nm(e.parentNode,t):e.nodeType===cr&&Nm(e,t),Vl(e)}function nk(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function ik(e){e.nodeValue=""}function rk(e,t){e=e;var n=t[Lj],i=n!=null&&n.hasOwnProperty("display")?n.display:null;e.style.display=ef("display",i)}function sk(e,t){e.nodeValue=t}function ak(e){e.nodeType===cr?e.textContent="":e.nodeType===As&&e.documentElement&&e.removeChild(e.documentElement)}function ok(e,t,n){return e.nodeType!==cr||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function lk(e,t){return t===""||e.nodeType!==Ls?null:e}function ck(e){return e.nodeType!==li?null:e}function ny(e){return e.data===ic}function Cm(e){return e.data===rc}function uk(e){var t=e.nextSibling&&e.nextSibling.dataset,n,i,a;return t&&(n=t.dgst,i=t.msg,a=t.stck),{message:i,digest:n,stack:a}}function dk(e,t){e._reactRetry=t}function Ju(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===cr||t===Ls)break;if(t===li){var n=e.data;if(n===Ku||n===rc||n===ic)break;if(n===Xu)return null}}return e}function sc(e){return Ju(e.nextSibling)}function hk(e){return Ju(e.firstChild)}function fk(e){return Ju(e.firstChild)}function mk(e){return Ju(e.nextSibling)}function pk(e,t,n,i,a,x,k){oc(x,e),jm(e,n);var O;{var F=a;O=F.namespace}var Y=(x.mode&dn)!==Mt;return Nj(e,t,n,O,i,Y,k)}function vk(e,t,n,i){return oc(n,e),n.mode&dn,Cj(e,t)}function gk(e,t){oc(t,e)}function _k(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===li){var i=t.data;if(i===Xu){if(n===0)return sc(t);n--}else(i===Ku||i===rc||i===ic)&&n++}t=t.nextSibling}return null}function iy(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===li){var i=t.data;if(i===Ku||i===rc||i===ic){if(n===0)return t;n--}else i===Xu&&n++}t=t.previousSibling}return null}function bk(e){Vl(e)}function yk(e){Vl(e)}function wk(e){return e!=="head"&&e!=="body"}function xk(e,t,n,i){var a=!0;Gu(t.nodeValue,n,i,a)}function Sk(e,t,n,i,a,x){if(t[qu]!==!0){var k=!0;Gu(i.nodeValue,a,x,k)}}function Nk(e,t){t.nodeType===cr?pm(e,t):t.nodeType===li||vm(e,t)}function Ck(e,t){{var n=e.parentNode;n!==null&&(t.nodeType===cr?pm(n,t):t.nodeType===li||vm(n,t))}}function Ek(e,t,n,i,a){(a||t[qu]!==!0)&&(i.nodeType===cr?pm(n,i):i.nodeType===li||vm(n,i))}function Dk(e,t,n){gm(e,t)}function jk(e,t){_m(e,t)}function kk(e,t,n){{var i=e.parentNode;i!==null&&gm(i,t)}}function Rk(e,t){{var n=e.parentNode;n!==null&&_m(n,t)}}function Tk(e,t,n,i,a,x){(x||t[qu]!==!0)&&gm(n,i)}function Lk(e,t,n,i,a){(a||t[qu]!==!0)&&_m(n,i)}function Ak(e){y("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function Mk(e){Jl(e)}var Uo=Math.random().toString(36).slice(2),Oo="__reactFiber$"+Uo,Em="__reactProps$"+Uo,ac="__reactContainer$"+Uo,Dm="__reactEvents$"+Uo,Uk="__reactListeners$"+Uo,Ok="__reactHandles$"+Uo;function Pk(e){delete e[Oo],delete e[Em],delete e[Dm],delete e[Uk],delete e[Ok]}function oc(e,t){t[Oo]=e}function Zu(e,t){t[ac]=e}function ry(e){e[ac]=null}function lc(e){return!!e[ac]}function Va(e){var t=e[Oo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ac]||n[Oo],t){var i=t.alternate;if(t.child!==null||i!==null&&i.child!==null)for(var a=iy(e);a!==null;){var x=a[Oo];if(x)return x;a=iy(a)}return t}e=n,n=e.parentNode}return null}function la(e){var t=e[Oo]||e[ac];return t&&(t.tag===S||t.tag===C||t.tag===T||t.tag===u)?t:null}function Po(e){if(e.tag===S||e.tag===C)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Qu(e){return e[Em]||null}function jm(e,t){e[Em]=t}function Bk(e){var t=e[Dm];return t===void 0&&(t=e[Dm]=new Set),t}var sy={},ay=d.ReactDebugCurrentFrame;function ed(e){if(e){var t=e._owner,n=vr(e.type,e._source,t?t.type:null);ay.setExtraStackFrame(n)}else ay.setExtraStackFrame(null)}function Xr(e,t,n,i,a){{var x=Function.call.bind(Ue);for(var k in e)if(x(e,k)){var O=void 0;try{if(typeof e[k]!="function"){var F=Error((i||"React class")+": "+n+" type `"+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[k]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F.name="Invariant Violation",F}O=e[k](t,k,i,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Y){O=Y}O&&!(O instanceof Error)&&(ed(a),y("%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,k,typeof O),ed(null)),O instanceof Error&&!(O.message in sy)&&(sy[O.message]=!0,ed(a),y("Failed %s type: %s",n,O.message),ed(null))}}}var km=[],td;td=[];var Vs=-1;function ca(e){return{current:e}}function Hi(e,t){if(Vs<0){y("Unexpected pop.");return}t!==td[Vs]&&y("Unexpected Fiber popped."),e.current=km[Vs],km[Vs]=null,td[Vs]=null,Vs--}function zi(e,t,n){Vs++,km[Vs]=e.current,td[Vs]=n,e.current=t}var Rm;Rm={};var Nr={};Object.freeze(Nr);var Fs=ca(Nr),fs=ca(!1),Tm=Nr;function Bo(e,t,n){return n&&ms(t)?Tm:Fs.current}function oy(e,t,n){{var i=e.stateNode;i.__reactInternalMemoizedUnmaskedChildContext=t,i.__reactInternalMemoizedMaskedChildContext=n}}function Io(e,t){{var n=e.type,i=n.contextTypes;if(!i)return Nr;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var x={};for(var k in i)x[k]=t[k];{var O=Tt(e)||"Unknown";Xr(i,x,"context",O)}return a&&oy(e,t,x),x}}function nd(){return fs.current}function ms(e){{var t=e.childContextTypes;return t!=null}}function id(e){Hi(fs,e),Hi(Fs,e)}function Lm(e){Hi(fs,e),Hi(Fs,e)}function ly(e,t,n){{if(Fs.current!==Nr)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");zi(Fs,t,e),zi(fs,n,e)}}function cy(e,t,n){{var i=e.stateNode,a=t.childContextTypes;if(typeof i.getChildContext!="function"){{var x=Tt(e)||"Unknown";Rm[x]||(Rm[x]=!0,y("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",x,x))}return n}var k=i.getChildContext();for(var O in k)if(!(O in a))throw new Error((Tt(e)||"Unknown")+'.getChildContext(): key "'+O+'" is not defined in childContextTypes.');{var F=Tt(e)||"Unknown";Xr(a,k,"child context",F)}return Bt({},n,k)}}function rd(e){{var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||Nr;return Tm=Fs.current,zi(Fs,n,e),zi(fs,fs.current,e),!0}}function uy(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 a=cy(e,t,Tm);i.__reactInternalMemoizedMergedChildContext=a,Hi(fs,e),Hi(Fs,e),zi(Fs,a,e),zi(fs,n,e)}else Hi(fs,e),zi(fs,n,e)}}function Ik(e){{if(!wC(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 u:return t.stateNode.context;case g:{var n=t.type;if(ms(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 ua=0,sd=1,Hs=null,Am=!1,Mm=!1;function dy(e){Hs===null?Hs=[e]:Hs.push(e)}function Vk(e){Am=!0,dy(e)}function hy(){Am&&da()}function da(){if(!Mm&&Hs!==null){Mm=!0;var e=0,t=Kr();try{var n=!0,i=Hs;for(Ci(wr);e<i.length;e++){var a=i[e];do a=a(n);while(a!==null)}Hs=null,Am=!1}catch(x){throw Hs!==null&&(Hs=Hs.slice(e+1)),O_(wu,da),x}finally{Ci(t),Mm=!1}}return null}var Vo=[],Fo=0,ad=null,od=0,Or=[],Pr=0,Fa=null,zs=1,$s="";function Fk(e){return za(),(e.flags&j_)!==Ot}function Hk(e){return za(),od}function zk(){var e=$s,t=zs,n=t&~$k(t);return n.toString(32)+e}function Ha(e,t){za(),Vo[Fo++]=od,Vo[Fo++]=ad,ad=e,od=t}function fy(e,t,n){za(),Or[Pr++]=zs,Or[Pr++]=$s,Or[Pr++]=Fa,Fa=e;var i=zs,a=$s,x=ld(i)-1,k=i&~(1<<x),O=n+1,F=ld(t)+x;if(F>30){var Y=x-x%5,K=(1<<Y)-1,fe=(k&K).toString(32),de=k>>Y,Ce=x-Y,De=ld(t)+Ce,Ae=O<<Ce,at=Ae|de,Lt=fe+a;zs=1<<De|at,$s=Lt}else{var Dt=O<<x,fn=Dt|k,ln=a;zs=1<<F|fn,$s=ln}}function Um(e){za();var t=e.return;if(t!==null){var n=1,i=0;Ha(e,n),fy(e,n,i)}}function ld(e){return 32-H_(e)}function $k(e){return 1<<ld(e)-1}function Om(e){for(;e===ad;)ad=Vo[--Fo],Vo[Fo]=null,od=Vo[--Fo],Vo[Fo]=null;for(;e===Fa;)Fa=Or[--Pr],Or[Pr]=null,$s=Or[--Pr],Or[Pr]=null,zs=Or[--Pr],Or[Pr]=null}function Wk(){return za(),Fa!==null?{id:zs,overflow:$s}:null}function Gk(e,t){za(),Or[Pr++]=zs,Or[Pr++]=$s,Or[Pr++]=Fa,zs=t.id,$s=t.overflow,Fa=e}function za(){Ri()||y("Expected to be hydrating. This is a bug in React. Please file an issue.")}var ki=null,Br=null,Jr=!1,$a=!1,ha=null;function Yk(){Jr&&y("We should not be hydrating here. This is a bug in React. Please file a bug.")}function my(){$a=!0}function qk(){return $a}function Kk(e){var t=e.stateNode.containerInfo;return Br=fk(t),ki=e,Jr=!0,ha=null,$a=!1,!0}function Xk(e,t,n){return Br=mk(t),ki=e,Jr=!0,ha=null,$a=!1,n!==null&&Gk(e,n),!0}function py(e,t){switch(e.tag){case u:{Nk(e.stateNode.containerInfo,t);break}case S:{var n=(e.mode&dn)!==Mt;Ek(e.type,e.memoizedProps,e.stateNode,t,n);break}case T:{var i=e.memoizedState;i.dehydrated!==null&&Ck(i.dehydrated,t);break}}}function vy(e,t){py(e,t);var n=eL();n.stateNode=t,n.return=e;var i=e.deletions;i===null?(e.deletions=[n],e.flags|=ja):i.push(n)}function Pm(e,t){{if($a)return;switch(e.tag){case u:{var n=e.stateNode.containerInfo;switch(t.tag){case S:var i=t.type;t.pendingProps,Dk(n,i);break;case C:var a=t.pendingProps;jk(n,a);break}break}case S:{var x=e.type,k=e.memoizedProps,O=e.stateNode;switch(t.tag){case S:{var F=t.type,Y=t.pendingProps,K=(e.mode&dn)!==Mt;Tk(x,k,O,F,Y,K);break}case C:{var fe=t.pendingProps,de=(e.mode&dn)!==Mt;Lk(x,k,O,fe,de);break}}break}case T:{var Ce=e.memoizedState,De=Ce.dehydrated;if(De!==null)switch(t.tag){case S:var Ae=t.type;t.pendingProps,kk(De,Ae);break;case C:var at=t.pendingProps;Rk(De,at);break}break}default:return}}}function gy(e,t){t.flags=t.flags&~Us|ci,Pm(e,t)}function _y(e,t){switch(e.tag){case S:{var n=e.type;e.pendingProps;var i=ok(t,n);return i!==null?(e.stateNode=i,ki=e,Br=hk(i),!0):!1}case C:{var a=e.pendingProps,x=lk(t,a);return x!==null?(e.stateNode=x,ki=e,Br=null,!0):!1}case T:{var k=ck(t);if(k!==null){var O={dehydrated:k,treeContext:Wk(),retryLane:br};e.memoizedState=O;var F=tL(k);return F.return=e,e.child=F,ki=e,Br=null,!0}return!1}default:return!1}}function Bm(e){return(e.mode&dn)!==Mt&&(e.flags&Sn)===Ot}function Im(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function Vm(e){if(Jr){var t=Br;if(!t){Bm(e)&&(Pm(ki,e),Im()),gy(ki,e),Jr=!1,ki=e;return}var n=t;if(!_y(e,t)){Bm(e)&&(Pm(ki,e),Im()),t=sc(n);var i=ki;if(!t||!_y(e,t)){gy(ki,e),Jr=!1,ki=e;return}vy(i,n)}}}function Jk(e,t,n){var i=e.stateNode,a=!$a,x=pk(i,e.type,e.memoizedProps,t,n,e,a);return e.updateQueue=x,x!==null}function Zk(e){var t=e.stateNode,n=e.memoizedProps,i=vk(t,n,e);if(i){var a=ki;if(a!==null)switch(a.tag){case u:{var x=a.stateNode.containerInfo,k=(a.mode&dn)!==Mt;xk(x,t,n,k);break}case S:{var O=a.type,F=a.memoizedProps,Y=a.stateNode,K=(a.mode&dn)!==Mt;Sk(O,F,Y,t,n,K);break}}}return i}function Qk(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 eR(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 _k(n)}function by(e){for(var t=e.return;t!==null&&t.tag!==S&&t.tag!==u&&t.tag!==T;)t=t.return;ki=t}function cd(e){if(e!==ki)return!1;if(!Jr)return by(e),Jr=!0,!1;if(e.tag!==u&&(e.tag!==S||wk(e.type)&&!wm(e.type,e.memoizedProps))){var t=Br;if(t)if(Bm(e))yy(e),Im();else for(;t;)vy(e,t),t=sc(t)}return by(e),e.tag===T?Br=eR(e):Br=ki?sc(e.stateNode):null,!0}function tR(){return Jr&&Br!==null}function yy(e){for(var t=Br;t;)py(e,t),t=sc(t)}function Ho(){ki=null,Br=null,Jr=!1,$a=!1}function wy(){ha!==null&&(m0(ha),ha=null)}function Ri(){return Jr}function Fm(e){ha===null?ha=[e]:ha.push(e)}var nR=d.ReactCurrentBatchConfig,iR=null;function rR(){return nR.transition}var Zr={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var sR=function(e){for(var t=null,n=e;n!==null;)n.mode&ti&&(t=n),n=n.return;return t},Wa=function(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")},cc=[],uc=[],dc=[],hc=[],fc=[],mc=[],Ga=new Set;Zr.recordUnsafeLifecycleWarnings=function(e,t){Ga.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&cc.push(e),e.mode&ti&&typeof t.UNSAFE_componentWillMount=="function"&&uc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&dc.push(e),e.mode&ti&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&hc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&fc.push(e),e.mode&ti&&typeof t.UNSAFE_componentWillUpdate=="function"&&mc.push(e))},Zr.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;cc.length>0&&(cc.forEach(function(de){e.add(Tt(de)||"Component"),Ga.add(de.type)}),cc=[]);var t=new Set;uc.length>0&&(uc.forEach(function(de){t.add(Tt(de)||"Component"),Ga.add(de.type)}),uc=[]);var n=new Set;dc.length>0&&(dc.forEach(function(de){n.add(Tt(de)||"Component"),Ga.add(de.type)}),dc=[]);var i=new Set;hc.length>0&&(hc.forEach(function(de){i.add(Tt(de)||"Component"),Ga.add(de.type)}),hc=[]);var a=new Set;fc.length>0&&(fc.forEach(function(de){a.add(Tt(de)||"Component"),Ga.add(de.type)}),fc=[]);var x=new Set;if(mc.length>0&&(mc.forEach(function(de){x.add(Tt(de)||"Component"),Ga.add(de.type)}),mc=[]),t.size>0){var k=Wa(t);y(`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`,k)}if(i.size>0){var O=Wa(i);y(`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`,O)}if(x.size>0){var F=Wa(x);y(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
101
+
102
+ * Move data fetching code or side effects to componentDidUpdate.
103
+
104
+ Please update the following components: %s`,F)}if(e.size>0){var Y=Wa(e);L(`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`,Y)}if(n.size>0){var K=Wa(n);L(`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`,K)}if(a.size>0){var fe=Wa(a);L(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
116
+
117
+ * Move data fetching code or side effects to componentDidUpdate.
118
+ * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
119
+
120
+ Please update the following components: %s`,fe)}};var ud=new Map,xy=new Set;Zr.recordLegacyContextWarning=function(e,t){var n=sR(e);if(n===null){y("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(!xy.has(e.type)){var i=ud.get(n);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(i===void 0&&(i=[],ud.set(n,i)),i.push(e))}},Zr.flushLegacyContextWarning=function(){ud.forEach(function(e,t){if(e.length!==0){var n=e[0],i=new Set;e.forEach(function(x){i.add(Tt(x)||"Component"),xy.add(x.type)});var a=Wa(i);try{Cn(n),y(`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`,a)}finally{Yn()}}})},Zr.discardPendingWarnings=function(){cc=[],uc=[],dc=[],hc=[],fc=[],mc=[],ud=new Map}}var Hm,zm,$m,Wm,Gm,Sy=function(e,t){};Hm=!1,zm=!1,$m={},Wm={},Gm={},Sy=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";Wm[n]||(Wm[n]=!0,y('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function aR(e){return e.prototype&&e.prototype.isReactComponent}function pc(e,t,n){var i=n.ref;if(i!==null&&typeof i!="function"&&typeof i!="object"){if((e.mode&ti||ee)&&!(n._owner&&n._self&&n._owner.stateNode!==n._self)&&!(n._owner&&n._owner.tag!==g)&&!(typeof n.type=="function"&&!aR(n.type))&&n._owner){var a=Tt(e)||"Component";$m[a]||(y('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',a,i),$m[a]=!0)}if(n._owner){var x=n._owner,k;if(x){var O=x;if(O.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");k=O.stateNode}if(!k)throw new Error("Missing owner for string ref "+i+". This error is likely caused by a bug in React. Please file an issue.");var F=k;qt(i,"ref");var Y=""+i;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===Y)return t.ref;var K=function(fe){var de=F.refs;fe===null?delete de[Y]:de[Y]=fe};return K._stringRef=Y,K}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 dd(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 hd(e){{var t=Tt(e)||"Component";if(Gm[t])return;Gm[t]=!0,y("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 Ny(e){var t=e._payload,n=e._init;return n(t)}function Cy(e){function t(be,Me){if(e){var ye=be.deletions;ye===null?(be.deletions=[Me],be.flags|=ja):ye.push(Me)}}function n(be,Me){if(!e)return null;for(var ye=Me;ye!==null;)t(be,ye),ye=ye.sibling;return null}function i(be,Me){for(var ye=new Map,Ge=Me;Ge!==null;)Ge.key!==null?ye.set(Ge.key,Ge):ye.set(Ge.index,Ge),Ge=Ge.sibling;return ye}function a(be,Me){var ye=to(be,Me);return ye.index=0,ye.sibling=null,ye}function x(be,Me,ye){if(be.index=ye,!e)return be.flags|=j_,Me;var Ge=be.alternate;if(Ge!==null){var ft=Ge.index;return ft<Me?(be.flags|=ci,Me):ft}else return be.flags|=ci,Me}function k(be){return e&&be.alternate===null&&(be.flags|=ci),be}function O(be,Me,ye,Ge){if(Me===null||Me.tag!==C){var ft=Fv(ye,be.mode,Ge);return ft.return=be,ft}else{var ot=a(Me,ye);return ot.return=be,ot}}function F(be,Me,ye,Ge){var ft=ye.type;if(ft===Mn)return K(be,Me,ye.props.children,Ge,ye.key);if(Me!==null&&(Me.elementType===ft||R0(Me,ye)||typeof ft=="object"&&ft!==null&&ft.$$typeof===wt&&Ny(ft)===Me.type)){var ot=a(Me,ye.props);return ot.ref=pc(be,Me,ye),ot.return=be,ot._debugSource=ye._source,ot._debugOwner=ye._owner,ot}var Vt=Vv(ye,be.mode,Ge);return Vt.ref=pc(be,Me,ye),Vt.return=be,Vt}function Y(be,Me,ye,Ge){if(Me===null||Me.tag!==p||Me.stateNode.containerInfo!==ye.containerInfo||Me.stateNode.implementation!==ye.implementation){var ft=Hv(ye,be.mode,Ge);return ft.return=be,ft}else{var ot=a(Me,ye.children||[]);return ot.return=be,ot}}function K(be,Me,ye,Ge,ft){if(Me===null||Me.tag!==b){var ot=Sa(ye,be.mode,Ge,ft);return ot.return=be,ot}else{var Vt=a(Me,ye);return Vt.return=be,Vt}}function fe(be,Me,ye){if(typeof Me=="string"&&Me!==""||typeof Me=="number"){var Ge=Fv(""+Me,be.mode,ye);return Ge.return=be,Ge}if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case rn:{var ft=Vv(Me,be.mode,ye);return ft.ref=pc(be,null,Me),ft.return=be,ft}case an:{var ot=Hv(Me,be.mode,ye);return ot.return=be,ot}case wt:{var Vt=Me._payload,Gt=Me._init;return fe(be,Gt(Vt),ye)}}if(jt(Me)||qn(Me)){var jn=Sa(Me,be.mode,ye,null);return jn.return=be,jn}dd(be,Me)}return typeof Me=="function"&&hd(be),null}function de(be,Me,ye,Ge){var ft=Me!==null?Me.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return ft!==null?null:O(be,Me,""+ye,Ge);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case rn:return ye.key===ft?F(be,Me,ye,Ge):null;case an:return ye.key===ft?Y(be,Me,ye,Ge):null;case wt:{var ot=ye._payload,Vt=ye._init;return de(be,Me,Vt(ot),Ge)}}if(jt(ye)||qn(ye))return ft!==null?null:K(be,Me,ye,Ge,null);dd(be,ye)}return typeof ye=="function"&&hd(be),null}function Ce(be,Me,ye,Ge,ft){if(typeof Ge=="string"&&Ge!==""||typeof Ge=="number"){var ot=be.get(ye)||null;return O(Me,ot,""+Ge,ft)}if(typeof Ge=="object"&&Ge!==null){switch(Ge.$$typeof){case rn:{var Vt=be.get(Ge.key===null?ye:Ge.key)||null;return F(Me,Vt,Ge,ft)}case an:{var Gt=be.get(Ge.key===null?ye:Ge.key)||null;return Y(Me,Gt,Ge,ft)}case wt:var jn=Ge._payload,_n=Ge._init;return Ce(be,Me,ye,_n(jn),ft)}if(jt(Ge)||qn(Ge)){var si=be.get(ye)||null;return K(Me,si,Ge,ft,null)}dd(Me,Ge)}return typeof Ge=="function"&&hd(Me),null}function De(be,Me,ye){{if(typeof be!="object"||be===null)return Me;switch(be.$$typeof){case rn:case an:Sy(be,ye);var Ge=be.key;if(typeof Ge!="string")break;if(Me===null){Me=new Set,Me.add(Ge);break}if(!Me.has(Ge)){Me.add(Ge);break}y("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.",Ge);break;case wt:var ft=be._payload,ot=be._init;De(ot(ft),Me,ye);break}}return Me}function Ae(be,Me,ye,Ge){for(var ft=null,ot=0;ot<ye.length;ot++){var Vt=ye[ot];ft=De(Vt,ft,be)}for(var Gt=null,jn=null,_n=Me,si=0,bn=0,ni=null;_n!==null&&bn<ye.length;bn++){_n.index>bn?(ni=_n,_n=null):ni=_n.sibling;var Wi=de(be,_n,ye[bn],Ge);if(Wi===null){_n===null&&(_n=ni);break}e&&_n&&Wi.alternate===null&&t(be,_n),si=x(Wi,si,bn),jn===null?Gt=Wi:jn.sibling=Wi,jn=Wi,_n=ni}if(bn===ye.length){if(n(be,_n),Ri()){var Pi=bn;Ha(be,Pi)}return Gt}if(_n===null){for(;bn<ye.length;bn++){var Er=fe(be,ye[bn],Ge);Er!==null&&(si=x(Er,si,bn),jn===null?Gt=Er:jn.sibling=Er,jn=Er)}if(Ri()){var nr=bn;Ha(be,nr)}return Gt}for(var ir=i(be,_n);bn<ye.length;bn++){var Gi=Ce(ir,be,bn,ye[bn],Ge);Gi!==null&&(e&&Gi.alternate!==null&&ir.delete(Gi.key===null?bn:Gi.key),si=x(Gi,si,bn),jn===null?Gt=Gi:jn.sibling=Gi,jn=Gi)}if(e&&ir.forEach(function(ol){return t(be,ol)}),Ri()){var Js=bn;Ha(be,Js)}return Gt}function at(be,Me,ye,Ge){var ft=qn(ye);if(typeof ft!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&ye[Symbol.toStringTag]==="Generator"&&(zm||y("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."),zm=!0),ye.entries===ft&&(Hm||y("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Hm=!0);var ot=ft.call(ye);if(ot)for(var Vt=null,Gt=ot.next();!Gt.done;Gt=ot.next()){var jn=Gt.value;Vt=De(jn,Vt,be)}}var _n=ft.call(ye);if(_n==null)throw new Error("An iterable object provided no iterator.");for(var si=null,bn=null,ni=Me,Wi=0,Pi=0,Er=null,nr=_n.next();ni!==null&&!nr.done;Pi++,nr=_n.next()){ni.index>Pi?(Er=ni,ni=null):Er=ni.sibling;var ir=de(be,ni,nr.value,Ge);if(ir===null){ni===null&&(ni=Er);break}e&&ni&&ir.alternate===null&&t(be,ni),Wi=x(ir,Wi,Pi),bn===null?si=ir:bn.sibling=ir,bn=ir,ni=Er}if(nr.done){if(n(be,ni),Ri()){var Gi=Pi;Ha(be,Gi)}return si}if(ni===null){for(;!nr.done;Pi++,nr=_n.next()){var Js=fe(be,nr.value,Ge);Js!==null&&(Wi=x(Js,Wi,Pi),bn===null?si=Js:bn.sibling=Js,bn=Js)}if(Ri()){var ol=Pi;Ha(be,ol)}return si}for(var Yc=i(be,ni);!nr.done;Pi++,nr=_n.next()){var xs=Ce(Yc,be,Pi,nr.value,Ge);xs!==null&&(e&&xs.alternate!==null&&Yc.delete(xs.key===null?Pi:xs.key),Wi=x(xs,Wi,Pi),bn===null?si=xs:bn.sibling=xs,bn=xs)}if(e&&Yc.forEach(function(LL){return t(be,LL)}),Ri()){var TL=Pi;Ha(be,TL)}return si}function Lt(be,Me,ye,Ge){if(Me!==null&&Me.tag===C){n(be,Me.sibling);var ft=a(Me,ye);return ft.return=be,ft}n(be,Me);var ot=Fv(ye,be.mode,Ge);return ot.return=be,ot}function Dt(be,Me,ye,Ge){for(var ft=ye.key,ot=Me;ot!==null;){if(ot.key===ft){var Vt=ye.type;if(Vt===Mn){if(ot.tag===b){n(be,ot.sibling);var Gt=a(ot,ye.props.children);return Gt.return=be,Gt._debugSource=ye._source,Gt._debugOwner=ye._owner,Gt}}else if(ot.elementType===Vt||R0(ot,ye)||typeof Vt=="object"&&Vt!==null&&Vt.$$typeof===wt&&Ny(Vt)===ot.type){n(be,ot.sibling);var jn=a(ot,ye.props);return jn.ref=pc(be,ot,ye),jn.return=be,jn._debugSource=ye._source,jn._debugOwner=ye._owner,jn}n(be,ot);break}else t(be,ot);ot=ot.sibling}if(ye.type===Mn){var _n=Sa(ye.props.children,be.mode,Ge,ye.key);return _n.return=be,_n}else{var si=Vv(ye,be.mode,Ge);return si.ref=pc(be,Me,ye),si.return=be,si}}function fn(be,Me,ye,Ge){for(var ft=ye.key,ot=Me;ot!==null;){if(ot.key===ft)if(ot.tag===p&&ot.stateNode.containerInfo===ye.containerInfo&&ot.stateNode.implementation===ye.implementation){n(be,ot.sibling);var Vt=a(ot,ye.children||[]);return Vt.return=be,Vt}else{n(be,ot);break}else t(be,ot);ot=ot.sibling}var Gt=Hv(ye,be.mode,Ge);return Gt.return=be,Gt}function ln(be,Me,ye,Ge){var ft=typeof ye=="object"&&ye!==null&&ye.type===Mn&&ye.key===null;if(ft&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case rn:return k(Dt(be,Me,ye,Ge));case an:return k(fn(be,Me,ye,Ge));case wt:var ot=ye._payload,Vt=ye._init;return ln(be,Me,Vt(ot),Ge)}if(jt(ye))return Ae(be,Me,ye,Ge);if(qn(ye))return at(be,Me,ye,Ge);dd(be,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?k(Lt(be,Me,""+ye,Ge)):(typeof ye=="function"&&hd(be),n(be,Me))}return ln}var zo=Cy(!0),Ey=Cy(!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=to(n,n.pendingProps);for(t.child=i,i.return=t;n.sibling!==null;)n=n.sibling,i=i.sibling=to(n,n.pendingProps),i.return=t;i.sibling=null}}function lR(e,t){for(var n=e.child;n!==null;)K5(n,t),n=n.sibling}var Ym=ca(null),qm;qm={};var fd=null,$o=null,Km=null,md=!1;function pd(){fd=null,$o=null,Km=null,md=!1}function Dy(){md=!0}function jy(){md=!1}function ky(e,t,n){zi(Ym,t._currentValue,e),t._currentValue=n,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==qm&&y("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=qm}function Xm(e,t){var n=Ym.current;Hi(Ym,t),e._currentValue=n}function Jm(e,t,n){for(var i=e;i!==null;){var a=i.alternate;if(jo(i.childLanes,t)?a!==null&&!jo(a.childLanes,t)&&(a.childLanes=Zt(a.childLanes,t)):(i.childLanes=Zt(i.childLanes,t),a!==null&&(a.childLanes=Zt(a.childLanes,t))),i===n)break;i=i.return}i!==n&&y("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 cR(e,t,n){uR(e,t,n)}function uR(e,t,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=void 0,x=i.dependencies;if(x!==null){a=i.child;for(var k=x.firstContext;k!==null;){if(k.context===t){if(i.tag===g){var O=Al(n),F=Ws(Hn,O);F.tag=gd;var Y=i.updateQueue;if(Y!==null){var K=Y.shared,fe=K.pending;fe===null?F.next=F:(F.next=fe.next,fe.next=F),K.pending=F}}i.lanes=Zt(i.lanes,n);var de=i.alternate;de!==null&&(de.lanes=Zt(de.lanes,n)),Jm(i.return,n,e),x.lanes=Zt(x.lanes,n);break}k=k.next}}else if(i.tag===f)a=i.type===e.type?null:i.child;else if(i.tag===M){var Ce=i.return;if(Ce===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");Ce.lanes=Zt(Ce.lanes,n);var De=Ce.alternate;De!==null&&(De.lanes=Zt(De.lanes,n)),Jm(Ce,n,e),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}var Ae=a.sibling;if(Ae!==null){Ae.return=a.return,a=Ae;break}a=a.return}i=a}}function Wo(e,t){fd=e,$o=null,Km=null;var n=e.dependencies;if(n!==null){var i=n.firstContext;i!==null&&(yr(n.lanes,t)&&Rc(),n.firstContext=null)}}function ui(e){md&&y("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(Km!==e){var n={context:e,memoizedValue:t,next:null};if($o===null){if(fd===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().");$o=n,fd.dependencies={lanes:He,firstContext:n}}else $o=$o.next=n}return t}var Ya=null;function Zm(e){Ya===null?Ya=[e]:Ya.push(e)}function dR(){if(Ya!==null){for(var e=0;e<Ya.length;e++){var t=Ya[e],n=t.interleaved;if(n!==null){t.interleaved=null;var i=n.next,a=t.pending;if(a!==null){var x=a.next;a.next=i,n.next=x}t.pending=n}}Ya=null}}function Ry(e,t,n,i){var a=t.interleaved;return a===null?(n.next=n,Zm(t)):(n.next=a.next,a.next=n),t.interleaved=n,vd(e,i)}function hR(e,t,n,i){var a=t.interleaved;a===null?(n.next=n,Zm(t)):(n.next=a.next,a.next=n),t.interleaved=n}function fR(e,t,n,i){var a=t.interleaved;return a===null?(n.next=n,Zm(t)):(n.next=a.next,a.next=n),t.interleaved=n,vd(e,i)}function dr(e,t){return vd(e,t)}var mR=vd;function vd(e,t){e.lanes=Zt(e.lanes,t);var n=e.alternate;n!==null&&(n.lanes=Zt(n.lanes,t)),n===null&&(e.flags&(ci|Us))!==Ot&&E0(e);for(var i=e,a=e.return;a!==null;)a.childLanes=Zt(a.childLanes,t),n=a.alternate,n!==null?n.childLanes=Zt(n.childLanes,t):(a.flags&(ci|Us))!==Ot&&E0(e),i=a,a=a.return;if(i.tag===u){var x=i.stateNode;return x}else return null}var Ty=0,Ly=1,gd=2,Qm=3,_d=!1,ep,bd;ep=!1,bd=null;function tp(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:He},effects:null};e.updateQueue=t}function Ay(e,t){var n=t.updateQueue,i=e.updateQueue;if(n===i){var a={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects};t.updateQueue=a}}function Ws(e,t){var n={eventTime:e,lane:t,tag:Ty,payload:null,callback:null,next:null};return n}function fa(e,t,n){var i=e.updateQueue;if(i===null)return null;var a=i.shared;if(bd===a&&!ep&&(y("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."),ep=!0),h5()){var x=a.pending;return x===null?t.next=t:(t.next=x.next,x.next=t),a.pending=t,mR(e,n)}else return fR(e,a,t,n)}function yd(e,t,n){var i=t.updateQueue;if(i!==null){var a=i.shared;if(G_(n)){var x=a.lanes;x=q_(x,e.pendingLanes);var k=Zt(x,n);a.lanes=k,Yf(e,k)}}}function np(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null){var a=i.updateQueue;if(n===a){var x=null,k=null,O=n.firstBaseUpdate;if(O!==null){var F=O;do{var Y={eventTime:F.eventTime,lane:F.lane,tag:F.tag,payload:F.payload,callback:F.callback,next:null};k===null?x=k=Y:(k.next=Y,k=Y),F=F.next}while(F!==null);k===null?x=k=t:(k.next=t,k=t)}else x=k=t;n={baseState:a.baseState,firstBaseUpdate:x,lastBaseUpdate:k,shared:a.shared,effects:a.effects},e.updateQueue=n;return}}var K=n.lastBaseUpdate;K===null?n.firstBaseUpdate=t:K.next=t,n.lastBaseUpdate=t}function pR(e,t,n,i,a,x){switch(n.tag){case Ly:{var k=n.payload;if(typeof k=="function"){Dy();var O=k.call(x,i,a);{if(e.mode&ti){Si(!0);try{k.call(x,i,a)}finally{Si(!1)}}jy()}return O}return k}case Qm:e.flags=e.flags&~Zi|Sn;case Ty:{var F=n.payload,Y;if(typeof F=="function"){Dy(),Y=F.call(x,i,a);{if(e.mode&ti){Si(!0);try{F.call(x,i,a)}finally{Si(!1)}}jy()}}else Y=F;return Y==null?i:Bt({},i,Y)}case gd:return _d=!0,i}return i}function wd(e,t,n,i){var a=e.updateQueue;_d=!1,bd=a.shared;var x=a.firstBaseUpdate,k=a.lastBaseUpdate,O=a.shared.pending;if(O!==null){a.shared.pending=null;var F=O,Y=F.next;F.next=null,k===null?x=Y:k.next=Y,k=F;var K=e.alternate;if(K!==null){var fe=K.updateQueue,de=fe.lastBaseUpdate;de!==k&&(de===null?fe.firstBaseUpdate=Y:de.next=Y,fe.lastBaseUpdate=F)}}if(x!==null){var Ce=a.baseState,De=He,Ae=null,at=null,Lt=null,Dt=x;do{var fn=Dt.lane,ln=Dt.eventTime;if(jo(i,fn)){if(Lt!==null){var Me={eventTime:ln,lane:Ni,tag:Dt.tag,payload:Dt.payload,callback:Dt.callback,next:null};Lt=Lt.next=Me}Ce=pR(e,a,Dt,Ce,t,n);var ye=Dt.callback;if(ye!==null&&Dt.lane!==Ni){e.flags|=D_;var Ge=a.effects;Ge===null?a.effects=[Dt]:Ge.push(Dt)}}else{var be={eventTime:ln,lane:fn,tag:Dt.tag,payload:Dt.payload,callback:Dt.callback,next:null};Lt===null?(at=Lt=be,Ae=Ce):Lt=Lt.next=be,De=Zt(De,fn)}if(Dt=Dt.next,Dt===null){if(O=a.shared.pending,O===null)break;var ft=O,ot=ft.next;ft.next=null,Dt=ot,a.lastBaseUpdate=ft,a.shared.pending=null}}while(!0);Lt===null&&(Ae=Ce),a.baseState=Ae,a.firstBaseUpdate=at,a.lastBaseUpdate=Lt;var Vt=a.shared.interleaved;if(Vt!==null){var Gt=Vt;do De=Zt(De,Gt.lane),Gt=Gt.next;while(Gt!==Vt)}else x===null&&(a.shared.lanes=He);Hc(De),e.lanes=De,e.memoizedState=Ce}bd=null}function vR(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function My(){_d=!1}function xd(){return _d}function Uy(e,t,n){var i=t.effects;if(t.effects=null,i!==null)for(var a=0;a<i.length;a++){var x=i[a],k=x.callback;k!==null&&(x.callback=null,vR(k,n))}}var vc={},ma=ca(vc),gc=ca(vc),Sd=ca(vc);function Nd(e){if(e===vc)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 Oy(){var e=Nd(Sd.current);return e}function ip(e,t){zi(Sd,t,e),zi(gc,e,e),zi(ma,vc,e);var n=Aj(t);Hi(ma,e),zi(ma,n,e)}function Go(e){Hi(ma,e),Hi(gc,e),Hi(Sd,e)}function rp(){var e=Nd(ma.current);return e}function Py(e){Nd(Sd.current);var t=Nd(ma.current),n=Mj(t,e.type);t!==n&&(zi(gc,e,e),zi(ma,n,e))}function sp(e){gc.current===e&&(Hi(ma,e),Hi(gc,e))}var gR=0,By=1,Iy=1,_c=2,Qr=ca(gR);function ap(e,t){return(e&t)!==0}function Yo(e){return e&By}function op(e,t){return e&By|t}function _R(e,t){return e|t}function pa(e,t){zi(Qr,t,e)}function qo(e){Hi(Qr,e)}function bR(e,t){var n=e.memoizedState;return n!==null?n.dehydrated!==null:(e.memoizedProps,!0)}function Cd(e){for(var t=e;t!==null;){if(t.tag===T){var n=t.memoizedState;if(n!==null){var i=n.dehydrated;if(i===null||ny(i)||Cm(i))return t}}else if(t.tag===H&&t.memoizedProps.revealOrder!==void 0){var a=(t.flags&Sn)!==Ot;if(a)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 hr=0,mi=1,ps=2,pi=4,Ti=8,lp=[];function cp(){for(var e=0;e<lp.length;e++){var t=lp[e];t._workInProgressVersionPrimary=null}lp.length=0}function yR(e,t){var n=t._getVersion,i=n(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i)}var dt=d.ReactCurrentDispatcher,bc=d.ReactCurrentBatchConfig,up,Ko;up=new Set;var qa=He,Dn=null,vi=null,gi=null,Ed=!1,yc=!1,wc=0,wR=0,xR=25,Pe=null,Ir=null,va=-1,dp=!1;function Nn(){{var e=Pe;Ir===null?Ir=[e]:Ir.push(e)}}function st(){{var e=Pe;Ir!==null&&(va++,Ir[va]!==e&&SR(e))}}function Xo(e){e!=null&&!jt(e)&&y("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Pe,typeof e)}function SR(e){{var t=Tt(Dn);if(!up.has(t)&&(up.add(t),Ir!==null)){for(var n="",i=30,a=0;a<=va;a++){for(var x=Ir[a],k=a===va?e:x,O=a+1+". "+x;O.length<i;)O+=" ";O+=k+`
131
+ `,n+=O}y(`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 $i(){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 hp(e,t){if(dp)return!1;if(t===null)return y("%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.",Pe),!1;e.length!==t.length&&y(`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`,Pe,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function Jo(e,t,n,i,a,x){qa=x,Dn=t,Ir=e!==null?e._debugHookTypes:null,va=-1,dp=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=He,e!==null&&e.memoizedState!==null?dt.current=ow:Ir!==null?dt.current=aw:dt.current=sw;var k=n(i,a);if(yc){var O=0;do{if(yc=!1,wc=0,O>=xR)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");O+=1,dp=!1,vi=null,gi=null,t.updateQueue=null,va=-1,dt.current=lw,k=n(i,a)}while(yc)}dt.current=Id,t._debugHookTypes=Ir;var F=vi!==null&&vi.next!==null;if(qa=He,Dn=null,vi=null,gi=null,Pe=null,Ir=null,va=-1,e!==null&&(e.flags&Os)!==(t.flags&Os)&&(e.mode&dn)!==Mt&&y("Internal React error: Expected static flag was missing. Please notify the React team."),Ed=!1,F)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return k}function Zo(){var e=wc!==0;return wc=0,e}function Vy(e,t,n){t.updateQueue=e.updateQueue,(t.mode&ds)!==Mt?t.flags&=-50333701:t.flags&=-2053,e.lanes=Du(e.lanes,n)}function Fy(){if(dt.current=Id,Ed){for(var e=Dn.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ed=!1}qa=He,Dn=null,vi=null,gi=null,Ir=null,va=-1,Pe=null,ew=!1,yc=!1,wc=0}function vs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gi===null?Dn.memoizedState=gi=e:gi=gi.next=e,gi}function Vr(){var e;if(vi===null){var t=Dn.alternate;t!==null?e=t.memoizedState:e=null}else e=vi.next;var n;if(gi===null?n=Dn.memoizedState:n=gi.next,n!==null)gi=n,n=gi.next,vi=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");vi=e;var i={memoizedState:vi.memoizedState,baseState:vi.baseState,baseQueue:vi.baseQueue,queue:vi.queue,next:null};gi===null?Dn.memoizedState=gi=i:gi=gi.next=i}return gi}function Hy(){return{lastEffect:null,stores:null}}function fp(e,t){return typeof t=="function"?t(e):t}function mp(e,t,n){var i=vs(),a;n!==void 0?a=n(t):a=t,i.memoizedState=i.baseState=a;var x={pending:null,interleaved:null,lanes:He,dispatch:null,lastRenderedReducer:e,lastRenderedState:a};i.queue=x;var k=x.dispatch=DR.bind(null,Dn,x);return[i.memoizedState,k]}function pp(e,t,n){var i=Vr(),a=i.queue;if(a===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");a.lastRenderedReducer=e;var x=vi,k=x.baseQueue,O=a.pending;if(O!==null){if(k!==null){var F=k.next,Y=O.next;k.next=Y,O.next=F}x.baseQueue!==k&&y("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),x.baseQueue=k=O,a.pending=null}if(k!==null){var K=k.next,fe=x.baseState,de=null,Ce=null,De=null,Ae=K;do{var at=Ae.lane;if(jo(qa,at)){if(De!==null){var Dt={lane:Ni,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null};De=De.next=Dt}if(Ae.hasEagerState)fe=Ae.eagerState;else{var fn=Ae.action;fe=e(fe,fn)}}else{var Lt={lane:at,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null};De===null?(Ce=De=Lt,de=fe):De=De.next=Lt,Dn.lanes=Zt(Dn.lanes,at),Hc(at)}Ae=Ae.next}while(Ae!==null&&Ae!==K);De===null?de=fe:De.next=Ce,Sr(fe,i.memoizedState)||Rc(),i.memoizedState=fe,i.baseState=de,i.baseQueue=De,a.lastRenderedState=fe}var ln=a.interleaved;if(ln!==null){var be=ln;do{var Me=be.lane;Dn.lanes=Zt(Dn.lanes,Me),Hc(Me),be=be.next}while(be!==ln)}else k===null&&(a.lanes=He);var ye=a.dispatch;return[i.memoizedState,ye]}function vp(e,t,n){var i=Vr(),a=i.queue;if(a===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");a.lastRenderedReducer=e;var x=a.dispatch,k=a.pending,O=i.memoizedState;if(k!==null){a.pending=null;var F=k.next,Y=F;do{var K=Y.action;O=e(O,K),Y=Y.next}while(Y!==F);Sr(O,i.memoizedState)||Rc(),i.memoizedState=O,i.baseQueue===null&&(i.baseState=O),a.lastRenderedState=O}return[O,x]}function m4(e,t,n){}function p4(e,t,n){}function gp(e,t,n){var i=Dn,a=vs(),x,k=Ri();if(k){if(n===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");x=n(),Ko||x!==n()&&(y("The result of getServerSnapshot should be cached to avoid an infinite loop"),Ko=!0)}else{if(x=t(),!Ko){var O=t();Sr(x,O)||(y("The result of getSnapshot should be cached to avoid an infinite loop"),Ko=!0)}var F=rh();if(F===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Eu(F,qa)||zy(i,t,x)}a.memoizedState=x;var Y={value:x,getSnapshot:t};return a.queue=Y,Td(Wy.bind(null,i,Y,e),[e]),i.flags|=ea,xc(mi|Ti,$y.bind(null,i,Y,x,t),void 0,null),x}function Dd(e,t,n){var i=Dn,a=Vr(),x=t();if(!Ko){var k=t();Sr(x,k)||(y("The result of getSnapshot should be cached to avoid an infinite loop"),Ko=!0)}var O=a.memoizedState,F=!Sr(O,x);F&&(a.memoizedState=x,Rc());var Y=a.queue;if(Nc(Wy.bind(null,i,Y,e),[e]),Y.getSnapshot!==t||F||gi!==null&&gi.memoizedState.tag&mi){i.flags|=ea,xc(mi|Ti,$y.bind(null,i,Y,x,t),void 0,null);var K=rh();if(K===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Eu(K,qa)||zy(i,t,x)}return x}function zy(e,t,n){e.flags|=ff;var i={getSnapshot:t,value:n},a=Dn.updateQueue;if(a===null)a=Hy(),Dn.updateQueue=a,a.stores=[i];else{var x=a.stores;x===null?a.stores=[i]:x.push(i)}}function $y(e,t,n,i){t.value=n,t.getSnapshot=i,Gy(t)&&Yy(e)}function Wy(e,t,n){var i=function(){Gy(t)&&Yy(e)};return n(i)}function Gy(e){var t=e.getSnapshot,n=e.value;try{var i=t();return!Sr(n,i)}catch{return!0}}function Yy(e){var t=dr(e,zt);t!==null&&wi(t,e,zt,Hn)}function jd(e){var t=vs();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:He,dispatch:null,lastRenderedReducer:fp,lastRenderedState:e};t.queue=n;var i=n.dispatch=jR.bind(null,Dn,n);return[t.memoizedState,i]}function _p(e){return pp(fp)}function bp(e){return vp(fp)}function xc(e,t,n,i){var a={tag:e,create:t,destroy:n,deps:i,next:null},x=Dn.updateQueue;if(x===null)x=Hy(),Dn.updateQueue=x,x.lastEffect=a.next=a;else{var k=x.lastEffect;if(k===null)x.lastEffect=a.next=a;else{var O=k.next;k.next=a,a.next=O,x.lastEffect=a}}return a}function yp(e){var t=vs();{var n={current:e};return t.memoizedState=n,n}}function kd(e){var t=Vr();return t.memoizedState}function Sc(e,t,n,i){var a=vs(),x=i===void 0?null:i;Dn.flags|=e,a.memoizedState=xc(mi|t,n,void 0,x)}function Rd(e,t,n,i){var a=Vr(),x=i===void 0?null:i,k=void 0;if(vi!==null){var O=vi.memoizedState;if(k=O.destroy,x!==null){var F=O.deps;if(hp(x,F)){a.memoizedState=xc(t,n,k,x);return}}}Dn.flags|=e,a.memoizedState=xc(mi|t,n,k,x)}function Td(e,t){return(Dn.mode&ds)!==Mt?Sc(gf|ea|vf,Ti,e,t):Sc(ea|vf,Ti,e,t)}function Nc(e,t){return Rd(ea,Ti,e,t)}function wp(e,t){return Sc(xn,ps,e,t)}function Ld(e,t){return Rd(xn,ps,e,t)}function xp(e,t){var n=xn;return n|=Ta,(Dn.mode&ds)!==Mt&&(n|=ta),Sc(n,pi,e,t)}function Ad(e,t){return Rd(xn,pi,e,t)}function qy(e,t){if(typeof t=="function"){var n=t,i=e();return n(i),function(){n(null)}}else if(t!=null){var a=t;a.hasOwnProperty("current")||y("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(a).join(", ")+"}");var x=e();return a.current=x,function(){a.current=null}}}function Sp(e,t,n){typeof t!="function"&&y("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,a=xn;return a|=Ta,(Dn.mode&ds)!==Mt&&(a|=ta),Sc(a,pi,qy.bind(null,t,e),i)}function Md(e,t,n){typeof t!="function"&&y("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 Rd(xn,pi,qy.bind(null,t,e),i)}function NR(e,t){}var Ud=NR;function Np(e,t){var n=vs(),i=t===void 0?null:t;return n.memoizedState=[e,i],e}function Od(e,t){var n=Vr(),i=t===void 0?null:t,a=n.memoizedState;if(a!==null&&i!==null){var x=a[1];if(hp(i,x))return a[0]}return n.memoizedState=[e,i],e}function Cp(e,t){var n=vs(),i=t===void 0?null:t,a=e();return n.memoizedState=[a,i],a}function Pd(e,t){var n=Vr(),i=t===void 0?null:t,a=n.memoizedState;if(a!==null&&i!==null){var x=a[1];if(hp(i,x))return a[0]}var k=e();return n.memoizedState=[k,i],k}function Ep(e){var t=vs();return t.memoizedState=e,e}function Ky(e){var t=Vr(),n=vi,i=n.memoizedState;return Jy(t,i,e)}function Xy(e){var t=Vr();if(vi===null)return t.memoizedState=e,e;var n=vi.memoizedState;return Jy(t,n,e)}function Jy(e,t,n){var i=!cE(qa);if(i){if(!Sr(n,t)){var a=Y_();Dn.lanes=Zt(Dn.lanes,a),Hc(a),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,Rc()),e.memoizedState=n,n}function CR(e,t,n){var i=Kr();Ci(_E(i,Bs)),e(!0);var a=bc.transition;bc.transition={};var x=bc.transition;bc.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(Ci(i),bc.transition=a,a===null&&x._updatedFibers){var k=x._updatedFibers.size;k>10&&L("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),x._updatedFibers.clear()}}}function Dp(){var e=jd(!1),t=e[0],n=e[1],i=CR.bind(null,n),a=vs();return a.memoizedState=i,[t,i]}function Zy(){var e=_p(),t=e[0],n=Vr(),i=n.memoizedState;return[t,i]}function Qy(){var e=bp(),t=e[0],n=Vr(),i=n.memoizedState;return[t,i]}var ew=!1;function ER(){return ew}function jp(){var e=vs(),t=rh(),n=t.identifierPrefix,i;if(Ri()){var a=zk();i=":"+n+"R"+a;var x=wc++;x>0&&(i+="H"+x.toString(32)),i+=":"}else{var k=wR++;i=":"+n+"r"+k.toString(32)+":"}return e.memoizedState=i,i}function Bd(){var e=Vr(),t=e.memoizedState;return t}function DR(e,t,n){typeof arguments[3]=="function"&&y("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=wa(e),a={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(tw(e))nw(t,a);else{var x=Ry(e,t,a,i);if(x!==null){var k=tr();wi(x,e,i,k),iw(x,t,i)}}rw(e,i)}function jR(e,t,n){typeof arguments[3]=="function"&&y("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=wa(e),a={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(tw(e))nw(t,a);else{var x=e.alternate;if(e.lanes===He&&(x===null||x.lanes===He)){var k=t.lastRenderedReducer;if(k!==null){var O;O=dt.current,dt.current=es;try{var F=t.lastRenderedState,Y=k(F,n);if(a.hasEagerState=!0,a.eagerState=Y,Sr(Y,F)){hR(e,t,a,i);return}}catch{}finally{dt.current=O}}}var K=Ry(e,t,a,i);if(K!==null){var fe=tr();wi(K,e,i,fe),iw(K,t,i)}}rw(e,i)}function tw(e){var t=e.alternate;return e===Dn||t!==null&&t===Dn}function nw(e,t){yc=Ed=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function iw(e,t,n){if(G_(n)){var i=t.lanes;i=q_(i,e.pendingLanes);var a=Zt(i,n);t.lanes=a,Yf(e,a)}}function rw(e,t,n){xf(e,t)}var Id={readContext:ui,useCallback:$i,useContext:$i,useEffect:$i,useImperativeHandle:$i,useInsertionEffect:$i,useLayoutEffect:$i,useMemo:$i,useReducer:$i,useRef:$i,useState:$i,useDebugValue:$i,useDeferredValue:$i,useTransition:$i,useMutableSource:$i,useSyncExternalStore:$i,useId:$i,unstable_isNewReconciler:ie},sw=null,aw=null,ow=null,lw=null,gs=null,es=null,Vd=null;{var kp=function(){y("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(){y("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")};sw={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",Nn(),Xo(t),Np(e,t)},useContext:function(e){return Pe="useContext",Nn(),ui(e)},useEffect:function(e,t){return Pe="useEffect",Nn(),Xo(t),Td(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",Nn(),Xo(n),Sp(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",Nn(),Xo(t),wp(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",Nn(),Xo(t),xp(e,t)},useMemo:function(e,t){Pe="useMemo",Nn(),Xo(t);var n=dt.current;dt.current=gs;try{return Cp(e,t)}finally{dt.current=n}},useReducer:function(e,t,n){Pe="useReducer",Nn();var i=dt.current;dt.current=gs;try{return mp(e,t,n)}finally{dt.current=i}},useRef:function(e){return Pe="useRef",Nn(),yp(e)},useState:function(e){Pe="useState",Nn();var t=dt.current;dt.current=gs;try{return jd(e)}finally{dt.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",Nn(),void 0},useDeferredValue:function(e){return Pe="useDeferredValue",Nn(),Ep(e)},useTransition:function(){return Pe="useTransition",Nn(),Dp()},useMutableSource:function(e,t,n){return Pe="useMutableSource",Nn(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",Nn(),gp(e,t,n)},useId:function(){return Pe="useId",Nn(),jp()},unstable_isNewReconciler:ie},aw={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",st(),Np(e,t)},useContext:function(e){return Pe="useContext",st(),ui(e)},useEffect:function(e,t){return Pe="useEffect",st(),Td(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",st(),Sp(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",st(),wp(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",st(),xp(e,t)},useMemo:function(e,t){Pe="useMemo",st();var n=dt.current;dt.current=gs;try{return Cp(e,t)}finally{dt.current=n}},useReducer:function(e,t,n){Pe="useReducer",st();var i=dt.current;dt.current=gs;try{return mp(e,t,n)}finally{dt.current=i}},useRef:function(e){return Pe="useRef",st(),yp(e)},useState:function(e){Pe="useState",st();var t=dt.current;dt.current=gs;try{return jd(e)}finally{dt.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",st(),void 0},useDeferredValue:function(e){return Pe="useDeferredValue",st(),Ep(e)},useTransition:function(){return Pe="useTransition",st(),Dp()},useMutableSource:function(e,t,n){return Pe="useMutableSource",st(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",st(),gp(e,t,n)},useId:function(){return Pe="useId",st(),jp()},unstable_isNewReconciler:ie},ow={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",st(),Od(e,t)},useContext:function(e){return Pe="useContext",st(),ui(e)},useEffect:function(e,t){return Pe="useEffect",st(),Nc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",st(),Md(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",st(),Ld(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",st(),Ad(e,t)},useMemo:function(e,t){Pe="useMemo",st();var n=dt.current;dt.current=es;try{return Pd(e,t)}finally{dt.current=n}},useReducer:function(e,t,n){Pe="useReducer",st();var i=dt.current;dt.current=es;try{return pp(e,t,n)}finally{dt.current=i}},useRef:function(e){return Pe="useRef",st(),kd()},useState:function(e){Pe="useState",st();var t=dt.current;dt.current=es;try{return _p(e)}finally{dt.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",st(),Ud()},useDeferredValue:function(e){return Pe="useDeferredValue",st(),Ky(e)},useTransition:function(){return Pe="useTransition",st(),Zy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",st(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",st(),Dd(e,t)},useId:function(){return Pe="useId",st(),Bd()},unstable_isNewReconciler:ie},lw={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",st(),Od(e,t)},useContext:function(e){return Pe="useContext",st(),ui(e)},useEffect:function(e,t){return Pe="useEffect",st(),Nc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",st(),Md(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",st(),Ld(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",st(),Ad(e,t)},useMemo:function(e,t){Pe="useMemo",st();var n=dt.current;dt.current=Vd;try{return Pd(e,t)}finally{dt.current=n}},useReducer:function(e,t,n){Pe="useReducer",st();var i=dt.current;dt.current=Vd;try{return vp(e,t,n)}finally{dt.current=i}},useRef:function(e){return Pe="useRef",st(),kd()},useState:function(e){Pe="useState",st();var t=dt.current;dt.current=Vd;try{return bp(e)}finally{dt.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",st(),Ud()},useDeferredValue:function(e){return Pe="useDeferredValue",st(),Xy(e)},useTransition:function(){return Pe="useTransition",st(),Qy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",st(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",st(),Dd(e,t)},useId:function(){return Pe="useId",st(),Bd()},unstable_isNewReconciler:ie},gs={readContext:function(e){return kp(),ui(e)},useCallback:function(e,t){return Pe="useCallback",$t(),Nn(),Np(e,t)},useContext:function(e){return Pe="useContext",$t(),Nn(),ui(e)},useEffect:function(e,t){return Pe="useEffect",$t(),Nn(),Td(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",$t(),Nn(),Sp(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",$t(),Nn(),wp(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",$t(),Nn(),xp(e,t)},useMemo:function(e,t){Pe="useMemo",$t(),Nn();var n=dt.current;dt.current=gs;try{return Cp(e,t)}finally{dt.current=n}},useReducer:function(e,t,n){Pe="useReducer",$t(),Nn();var i=dt.current;dt.current=gs;try{return mp(e,t,n)}finally{dt.current=i}},useRef:function(e){return Pe="useRef",$t(),Nn(),yp(e)},useState:function(e){Pe="useState",$t(),Nn();var t=dt.current;dt.current=gs;try{return jd(e)}finally{dt.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",$t(),Nn(),void 0},useDeferredValue:function(e){return Pe="useDeferredValue",$t(),Nn(),Ep(e)},useTransition:function(){return Pe="useTransition",$t(),Nn(),Dp()},useMutableSource:function(e,t,n){return Pe="useMutableSource",$t(),Nn(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",$t(),Nn(),gp(e,t,n)},useId:function(){return Pe="useId",$t(),Nn(),jp()},unstable_isNewReconciler:ie},es={readContext:function(e){return kp(),ui(e)},useCallback:function(e,t){return Pe="useCallback",$t(),st(),Od(e,t)},useContext:function(e){return Pe="useContext",$t(),st(),ui(e)},useEffect:function(e,t){return Pe="useEffect",$t(),st(),Nc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",$t(),st(),Md(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",$t(),st(),Ld(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",$t(),st(),Ad(e,t)},useMemo:function(e,t){Pe="useMemo",$t(),st();var n=dt.current;dt.current=es;try{return Pd(e,t)}finally{dt.current=n}},useReducer:function(e,t,n){Pe="useReducer",$t(),st();var i=dt.current;dt.current=es;try{return pp(e,t,n)}finally{dt.current=i}},useRef:function(e){return Pe="useRef",$t(),st(),kd()},useState:function(e){Pe="useState",$t(),st();var t=dt.current;dt.current=es;try{return _p(e)}finally{dt.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",$t(),st(),Ud()},useDeferredValue:function(e){return Pe="useDeferredValue",$t(),st(),Ky(e)},useTransition:function(){return Pe="useTransition",$t(),st(),Zy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",$t(),st(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",$t(),st(),Dd(e,t)},useId:function(){return Pe="useId",$t(),st(),Bd()},unstable_isNewReconciler:ie},Vd={readContext:function(e){return kp(),ui(e)},useCallback:function(e,t){return Pe="useCallback",$t(),st(),Od(e,t)},useContext:function(e){return Pe="useContext",$t(),st(),ui(e)},useEffect:function(e,t){return Pe="useEffect",$t(),st(),Nc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",$t(),st(),Md(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",$t(),st(),Ld(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",$t(),st(),Ad(e,t)},useMemo:function(e,t){Pe="useMemo",$t(),st();var n=dt.current;dt.current=es;try{return Pd(e,t)}finally{dt.current=n}},useReducer:function(e,t,n){Pe="useReducer",$t(),st();var i=dt.current;dt.current=es;try{return vp(e,t,n)}finally{dt.current=i}},useRef:function(e){return Pe="useRef",$t(),st(),kd()},useState:function(e){Pe="useState",$t(),st();var t=dt.current;dt.current=es;try{return bp(e)}finally{dt.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",$t(),st(),Ud()},useDeferredValue:function(e){return Pe="useDeferredValue",$t(),st(),Xy(e)},useTransition:function(){return Pe="useTransition",$t(),st(),Qy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",$t(),st(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",$t(),st(),Dd(e,t)},useId:function(){return Pe="useId",$t(),st(),Bd()},unstable_isNewReconciler:ie}}var ga=s.unstable_now,cw=0,Fd=-1,Cc=-1,Hd=-1,Rp=!1,zd=!1;function uw(){return Rp}function kR(){zd=!0}function RR(){Rp=!1,zd=!1}function TR(){Rp=zd,zd=!1}function dw(){return cw}function hw(){cw=ga()}function Tp(e){Cc=ga(),e.actualStartTime<0&&(e.actualStartTime=ga())}function fw(e){Cc=-1}function $d(e,t){if(Cc>=0){var n=ga()-Cc;e.actualDuration+=n,t&&(e.selfBaseDuration=n),Cc=-1}}function _s(e){if(Fd>=0){var t=ga()-Fd;Fd=-1;for(var n=e.return;n!==null;){switch(n.tag){case u:var i=n.stateNode;i.effectDuration+=t;return;case N:var a=n.stateNode;a.effectDuration+=t;return}n=n.return}}}function Lp(e){if(Hd>=0){var t=ga()-Hd;Hd=-1;for(var n=e.return;n!==null;){switch(n.tag){case u:var i=n.stateNode;i!==null&&(i.passiveEffectDuration+=t);return;case N:var a=n.stateNode;a!==null&&(a.passiveEffectDuration+=t);return}n=n.return}}}function bs(){Fd=ga()}function Ap(){Hd=ga()}function Mp(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function ts(e,t){if(e&&e.defaultProps){var n=Bt({},t),i=e.defaultProps;for(var a in i)n[a]===void 0&&(n[a]=i[a]);return n}return t}var Up={},Op,Pp,Bp,Ip,Vp,mw,Wd,Fp,Hp,zp,Ec;{Op=new Set,Pp=new Set,Bp=new Set,Ip=new Set,Fp=new Set,Vp=new Set,Hp=new Set,zp=new Set,Ec=new Set;var pw=new Set;Wd=function(e,t){if(!(e===null||typeof e=="function")){var n=t+"_"+e;pw.has(n)||(pw.add(n),y("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},mw=function(e,t){if(t===void 0){var n=un(e)||"Component";Vp.has(n)||(Vp.add(n),y("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Up,"_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(Up)}function $p(e,t,n,i){var a=e.memoizedState,x=n(i,a);{if(e.mode&ti){Si(!0);try{x=n(i,a)}finally{Si(!1)}}mw(t,x)}var k=x==null?a:Bt({},a,x);if(e.memoizedState=k,e.lanes===He){var O=e.updateQueue;O.baseState=k}}var Wp={isMounted:xC,enqueueSetState:function(e,t,n){var i=bo(e),a=tr(),x=wa(i),k=Ws(a,x);k.payload=t,n!=null&&(Wd(n,"setState"),k.callback=n);var O=fa(i,k,x);O!==null&&(wi(O,i,x,a),yd(O,i,x)),xf(i,x)},enqueueReplaceState:function(e,t,n){var i=bo(e),a=tr(),x=wa(i),k=Ws(a,x);k.tag=Ly,k.payload=t,n!=null&&(Wd(n,"replaceState"),k.callback=n);var O=fa(i,k,x);O!==null&&(wi(O,i,x,a),yd(O,i,x)),xf(i,x)},enqueueForceUpdate:function(e,t){var n=bo(e),i=tr(),a=wa(n),x=Ws(i,a);x.tag=gd,t!=null&&(Wd(t,"forceUpdate"),x.callback=t);var k=fa(n,x,a);k!==null&&(wi(k,n,a,i),yd(k,n,a)),QC(n,a)}};function vw(e,t,n,i,a,x,k){var O=e.stateNode;if(typeof O.shouldComponentUpdate=="function"){var F=O.shouldComponentUpdate(i,x,k);{if(e.mode&ti){Si(!0);try{F=O.shouldComponentUpdate(i,x,k)}finally{Si(!1)}}F===void 0&&y("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",un(t)||"Component")}return F}return t.prototype&&t.prototype.isPureReactComponent?!ql(n,i)||!ql(a,x):!0}function LR(e,t,n){var i=e.stateNode;{var a=un(t)||"Component",x=i.render;x||(t.prototype&&typeof t.prototype.render=="function"?y("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",a):y("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",a)),i.getInitialState&&!i.getInitialState.isReactClassApproved&&!i.state&&y("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?",a),i.getDefaultProps&&!i.getDefaultProps.isReactClassApproved&&y("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.",a),i.propTypes&&y("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",a),i.contextType&&y("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",a),t.childContextTypes&&!Ec.has(t)&&(e.mode&ti)===Mt&&(Ec.add(t),y(`%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`,a)),t.contextTypes&&!Ec.has(t)&&(e.mode&ti)===Mt&&(Ec.add(t),y(`%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`,a)),i.contextTypes&&y("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",a),t.contextType&&t.contextTypes&&!Hp.has(t)&&(Hp.add(t),y("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",a)),typeof i.componentShouldUpdate=="function"&&y("%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.",a),t.prototype&&t.prototype.isPureReactComponent&&typeof i.shouldComponentUpdate<"u"&&y("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",un(t)||"A pure component"),typeof i.componentDidUnmount=="function"&&y("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",a),typeof i.componentDidReceiveProps=="function"&&y("%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().",a),typeof i.componentWillRecieveProps=="function"&&y("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",a),typeof i.UNSAFE_componentWillRecieveProps=="function"&&y("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",a);var k=i.props!==n;i.props!==void 0&&k&&y("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",a,a),i.defaultProps&&y("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",a,a),typeof i.getSnapshotBeforeUpdate=="function"&&typeof i.componentDidUpdate!="function"&&!Bp.has(t)&&(Bp.add(t),y("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",un(t))),typeof i.getDerivedStateFromProps=="function"&&y("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",a),typeof i.getDerivedStateFromError=="function"&&y("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",a),typeof t.getSnapshotBeforeUpdate=="function"&&y("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",a);var O=i.state;O&&(typeof O!="object"||jt(O))&&y("%s.state: must be set to an object or null",a),typeof i.getChildContext=="function"&&typeof t.childContextTypes!="object"&&y("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",a)}}function gw(e,t){t.updater=Wp,e.stateNode=t,_C(t,e),t._reactInternalInstance=Up}function _w(e,t,n){var i=!1,a=Nr,x=Nr,k=t.contextType;if("contextType"in t){var O=k===null||k!==void 0&&k.$$typeof===We&&k._context===void 0;if(!O&&!zp.has(t)){zp.add(t);var F="";k===void 0?F=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof k!="object"?F=" However, it is set to a "+typeof k+".":k.$$typeof===Ve?F=" Did you accidentally pass the Context.Provider instead?":k._context!==void 0?F=" Did you accidentally pass the Context.Consumer instead?":F=" However, it is set to an object with keys {"+Object.keys(k).join(", ")+"}.",y("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",un(t)||"Component",F)}}if(typeof k=="object"&&k!==null)x=ui(k);else{a=Bo(e,t,!0);var Y=t.contextTypes;i=Y!=null,x=i?Io(e,a):Nr}var K=new t(n,x);if(e.mode&ti){Si(!0);try{K=new t(n,x)}finally{Si(!1)}}var fe=e.memoizedState=K.state!==null&&K.state!==void 0?K.state:null;gw(e,K);{if(typeof t.getDerivedStateFromProps=="function"&&fe===null){var de=un(t)||"Component";Pp.has(de)||(Pp.add(de),y("`%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.",de,K.state===null?"null":"undefined",de))}if(typeof t.getDerivedStateFromProps=="function"||typeof K.getSnapshotBeforeUpdate=="function"){var Ce=null,De=null,Ae=null;if(typeof K.componentWillMount=="function"&&K.componentWillMount.__suppressDeprecationWarning!==!0?Ce="componentWillMount":typeof K.UNSAFE_componentWillMount=="function"&&(Ce="UNSAFE_componentWillMount"),typeof K.componentWillReceiveProps=="function"&&K.componentWillReceiveProps.__suppressDeprecationWarning!==!0?De="componentWillReceiveProps":typeof K.UNSAFE_componentWillReceiveProps=="function"&&(De="UNSAFE_componentWillReceiveProps"),typeof K.componentWillUpdate=="function"&&K.componentWillUpdate.__suppressDeprecationWarning!==!0?Ae="componentWillUpdate":typeof K.UNSAFE_componentWillUpdate=="function"&&(Ae="UNSAFE_componentWillUpdate"),Ce!==null||De!==null||Ae!==null){var at=un(t)||"Component",Lt=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Ip.has(at)||(Ip.add(at),y(`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`,at,Lt,Ce!==null?`
153
+ `+Ce:"",De!==null?`
154
+ `+De:"",Ae!==null?`
155
+ `+Ae:""))}}}return i&&oy(e,a,x),K}function AR(e,t){var n=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),n!==t.state&&(y("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Tt(e)||"Component"),Wp.enqueueReplaceState(t,t.state,null))}function bw(e,t,n,i){var a=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==a){{var x=Tt(e)||"Component";Op.has(x)||(Op.add(x),y("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",x))}Wp.enqueueReplaceState(t,t.state,null)}}function Gp(e,t,n,i){LR(e,t,n);var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},tp(e);var x=t.contextType;if(typeof x=="object"&&x!==null)a.context=ui(x);else{var k=Bo(e,t,!0);a.context=Io(e,k)}{if(a.state===n){var O=un(t)||"Component";Fp.has(O)||(Fp.add(O),y("%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.",O))}e.mode&ti&&Zr.recordLegacyContextWarning(e,a),Zr.recordUnsafeLifecycleWarnings(e,a)}a.state=e.memoizedState;var F=t.getDerivedStateFromProps;if(typeof F=="function"&&($p(e,t,F,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof a.getSnapshotBeforeUpdate!="function"&&(typeof a.UNSAFE_componentWillMount=="function"||typeof a.componentWillMount=="function")&&(AR(e,a),wd(e,n,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"){var Y=xn;Y|=Ta,(e.mode&ds)!==Mt&&(Y|=ta),e.flags|=Y}}function MR(e,t,n,i){var a=e.stateNode,x=e.memoizedProps;a.props=x;var k=a.context,O=t.contextType,F=Nr;if(typeof O=="object"&&O!==null)F=ui(O);else{var Y=Bo(e,t,!0);F=Io(e,Y)}var K=t.getDerivedStateFromProps,fe=typeof K=="function"||typeof a.getSnapshotBeforeUpdate=="function";!fe&&(typeof a.UNSAFE_componentWillReceiveProps=="function"||typeof a.componentWillReceiveProps=="function")&&(x!==n||k!==F)&&bw(e,a,n,F),My();var de=e.memoizedState,Ce=a.state=de;if(wd(e,n,a,i),Ce=e.memoizedState,x===n&&de===Ce&&!nd()&&!xd()){if(typeof a.componentDidMount=="function"){var De=xn;De|=Ta,(e.mode&ds)!==Mt&&(De|=ta),e.flags|=De}return!1}typeof K=="function"&&($p(e,t,K,n),Ce=e.memoizedState);var Ae=xd()||vw(e,t,x,n,de,Ce,F);if(Ae){if(!fe&&(typeof a.UNSAFE_componentWillMount=="function"||typeof a.componentWillMount=="function")&&(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"){var at=xn;at|=Ta,(e.mode&ds)!==Mt&&(at|=ta),e.flags|=at}}else{if(typeof a.componentDidMount=="function"){var Lt=xn;Lt|=Ta,(e.mode&ds)!==Mt&&(Lt|=ta),e.flags|=Lt}e.memoizedProps=n,e.memoizedState=Ce}return a.props=n,a.state=Ce,a.context=F,Ae}function UR(e,t,n,i,a){var x=t.stateNode;Ay(e,t);var k=t.memoizedProps,O=t.type===t.elementType?k:ts(t.type,k);x.props=O;var F=t.pendingProps,Y=x.context,K=n.contextType,fe=Nr;if(typeof K=="object"&&K!==null)fe=ui(K);else{var de=Bo(t,n,!0);fe=Io(t,de)}var Ce=n.getDerivedStateFromProps,De=typeof Ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";!De&&(typeof x.UNSAFE_componentWillReceiveProps=="function"||typeof x.componentWillReceiveProps=="function")&&(k!==F||Y!==fe)&&bw(t,x,i,fe),My();var Ae=t.memoizedState,at=x.state=Ae;if(wd(t,i,x,a),at=t.memoizedState,k===F&&Ae===at&&!nd()&&!xd()&&!P)return typeof x.componentDidUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=xn),typeof x.getSnapshotBeforeUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=wo),!1;typeof Ce=="function"&&($p(t,n,Ce,i),at=t.memoizedState);var Lt=xd()||vw(t,n,O,i,Ae,at,fe)||P;return Lt?(!De&&(typeof x.UNSAFE_componentWillUpdate=="function"||typeof x.componentWillUpdate=="function")&&(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(i,at,fe),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(i,at,fe)),typeof x.componentDidUpdate=="function"&&(t.flags|=xn),typeof x.getSnapshotBeforeUpdate=="function"&&(t.flags|=wo)):(typeof x.componentDidUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=xn),typeof x.getSnapshotBeforeUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=wo),t.memoizedProps=i,t.memoizedState=at),x.props=i,x.state=at,x.context=fe,Lt}function Ka(e,t){return{value:e,source:t,stack:qi(t),digest:null}}function Yp(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function OR(e,t){return!0}function qp(e,t){try{var n=OR(e,t);if(n===!1)return;var i=t.value,a=t.source,x=t.stack,k=x!==null?x:"";if(i!=null&&i._suppressLogging){if(e.tag===g)return;console.error(i)}var O=a?Tt(a):null,F=O?"The above error occurred in the <"+O+"> component:":"The above error occurred in one of your React components:",Y;if(e.tag===u)Y=`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 K=Tt(e)||"Anonymous";Y="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+K+".")}var fe=F+`
157
+ `+k+`
158
+
159
+ `+(""+Y);console.error(fe)}catch(de){setTimeout(function(){throw de})}}var PR=typeof WeakMap=="function"?WeakMap:Map;function yw(e,t,n){var i=Ws(Hn,n);i.tag=Qm,i.payload={element:null};var a=t.value;return i.callback=function(){k5(a),qp(e,t)},i}function Kp(e,t,n){var i=Ws(Hn,n);i.tag=Qm;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var x=t.value;i.payload=function(){return a(x)},i.callback=function(){T0(e),qp(e,t)}}var k=e.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(i.callback=function(){T0(e),qp(e,t),typeof a!="function"&&D5(this);var F=t.value,Y=t.stack;this.componentDidCatch(F,{componentStack:Y!==null?Y:""}),typeof a!="function"&&(yr(e.lanes,zt)||y("%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 ww(e,t,n){var i=e.pingCache,a;if(i===null?(i=e.pingCache=new PR,a=new Set,i.set(t,a)):(a=i.get(t),a===void 0&&(a=new Set,i.set(t,a))),!a.has(n)){a.add(n);var x=R5.bind(null,e,t,n);qr&&zc(e,n),t.then(x,x)}}function BR(e,t,n,i){var a=e.updateQueue;if(a===null){var x=new Set;x.add(n),e.updateQueue=x}else a.add(n)}function IR(e,t){var n=e.tag;if((e.mode&dn)===Mt&&(n===l||n===v||n===A)){var i=e.alternate;i?(e.updateQueue=i.updateQueue,e.memoizedState=i.memoizedState,e.lanes=i.lanes):(e.updateQueue=null,e.memoizedState=null)}}function xw(e){var t=e;do{if(t.tag===T&&bR(t))return t;t=t.return}while(t!==null);return null}function Sw(e,t,n,i,a){if((e.mode&dn)===Mt){if(e===t)e.flags|=Zi;else{if(e.flags|=Sn,n.flags|=mf,n.flags&=-52805,n.tag===g){var x=n.alternate;if(x===null)n.tag=R;else{var k=Ws(Hn,zt);k.tag=gd,fa(n,k,zt)}}n.lanes=Zt(n.lanes,zt)}return e}return e.flags|=Zi,e.lanes=a,e}function VR(e,t,n,i,a){if(n.flags|=yu,qr&&zc(e,a),i!==null&&typeof i=="object"&&typeof i.then=="function"){var x=i;IR(n),Ri()&&n.mode&dn&&my();var k=xw(t);if(k!==null){k.flags&=~Ms,Sw(k,t,n,e,a),k.mode&dn&&ww(e,x,a),BR(k,e,x);return}else{if(!lE(a)){ww(e,x,a),jv();return}var O=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=O}}else if(Ri()&&n.mode&dn){my();var F=xw(t);if(F!==null){(F.flags&Zi)===Ot&&(F.flags|=Ms),Sw(F,t,n,e,a),Fm(Ka(i,n));return}}i=Ka(i,n),b5(i);var Y=t;do{switch(Y.tag){case u:{var K=i;Y.flags|=Zi;var fe=Al(a);Y.lanes=Zt(Y.lanes,fe);var de=yw(Y,K,fe);np(Y,de);return}case g:var Ce=i,De=Y.type,Ae=Y.stateNode;if((Y.flags&Sn)===Ot&&(typeof De.getDerivedStateFromError=="function"||Ae!==null&&typeof Ae.componentDidCatch=="function"&&!x0(Ae))){Y.flags|=Zi;var at=Al(a);Y.lanes=Zt(Y.lanes,at);var Lt=Kp(Y,Ce,at);np(Y,Lt);return}break}Y=Y.return}while(Y!==null)}function FR(){return null}var Dc=d.ReactCurrentOwner,ns=!1,Xp,jc,Jp,Zp,Qp,Xa,ev,Gd,kc;Xp={},jc={},Jp={},Zp={},Qp={},Xa=!1,ev={},Gd={},kc={};function Qi(e,t,n,i){e===null?t.child=Ey(t,null,n,i):t.child=zo(t,e.child,n,i)}function HR(e,t,n,i){t.child=zo(t,e.child,null,i),t.child=zo(t,null,n,i)}function Nw(e,t,n,i,a){if(t.type!==t.elementType){var x=n.propTypes;x&&Xr(x,i,"prop",un(n))}var k=n.render,O=t.ref,F,Y;Wo(t,a),Dl(t);{if(Dc.current=t,Xn(!0),F=Jo(e,t,k,i,O,a),Y=Zo(),t.mode&ti){Si(!0);try{F=Jo(e,t,k,i,O,a),Y=Zo()}finally{Si(!1)}}Xn(!1)}return No(),e!==null&&!ns?(Vy(e,t,a),Gs(e,t,a)):(Ri()&&Y&&Um(t),t.flags|=yo,Qi(e,t,F,a),t.child)}function Cw(e,t,n,i,a){if(e===null){var x=n.type;if(Y5(x)&&n.compare===null&&n.defaultProps===void 0){var k=x;return k=al(x),t.tag=A,t.type=k,iv(t,x),Ew(e,t,k,i,a)}{var O=x.propTypes;if(O&&Xr(O,i,"prop",un(x)),n.defaultProps!==void 0){var F=un(x)||"Unknown";kc[F]||(y("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",F),kc[F]=!0)}}var Y=Iv(n.type,null,i,t,t.mode,a);return Y.ref=t.ref,Y.return=t,t.child=Y,Y}{var K=n.type,fe=K.propTypes;fe&&Xr(fe,i,"prop",un(K))}var de=e.child,Ce=cv(e,a);if(!Ce){var De=de.memoizedProps,Ae=n.compare;if(Ae=Ae!==null?Ae:ql,Ae(De,i)&&e.ref===t.ref)return Gs(e,t,a)}t.flags|=yo;var at=to(de,i);return at.ref=t.ref,at.return=t,t.child=at,at}function Ew(e,t,n,i,a){if(t.type!==t.elementType){var x=t.elementType;if(x.$$typeof===wt){var k=x,O=k._payload,F=k._init;try{x=F(O)}catch{x=null}var Y=x&&x.propTypes;Y&&Xr(Y,i,"prop",un(x))}}if(e!==null){var K=e.memoizedProps;if(ql(K,i)&&e.ref===t.ref&&t.type===e.type)if(ns=!1,t.pendingProps=i=K,cv(e,a))(e.flags&mf)!==Ot&&(ns=!0);else return t.lanes=e.lanes,Gs(e,t,a)}return tv(e,t,n,i,a)}function Dw(e,t,n){var i=t.pendingProps,a=i.children,x=e!==null?e.memoizedState:null;if(i.mode==="hidden"||$)if((t.mode&dn)===Mt){var k={baseLanes:He,cachePool:null,transitions:null};t.memoizedState=k,sh(t,n)}else if(yr(n,br)){var fe={baseLanes:He,cachePool:null,transitions:null};t.memoizedState=fe;var de=x!==null?x.baseLanes:n;sh(t,de)}else{var O=null,F;if(x!==null){var Y=x.baseLanes;F=Zt(Y,n)}else F=n;t.lanes=t.childLanes=br;var K={baseLanes:F,cachePool:O,transitions:null};return t.memoizedState=K,t.updateQueue=null,sh(t,F),null}else{var Ce;x!==null?(Ce=Zt(x.baseLanes,n),t.memoizedState=null):Ce=n,sh(t,Ce)}return Qi(e,t,a,n),t.child}function zR(e,t,n){var i=t.pendingProps;return Qi(e,t,i,n),t.child}function $R(e,t,n){var i=t.pendingProps.children;return Qi(e,t,i,n),t.child}function WR(e,t,n){{t.flags|=xn;{var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0}}var a=t.pendingProps,x=a.children;return Qi(e,t,x,n),t.child}function jw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=ka,t.flags|=pf)}function tv(e,t,n,i,a){if(t.type!==t.elementType){var x=n.propTypes;x&&Xr(x,i,"prop",un(n))}var k;{var O=Bo(t,n,!0);k=Io(t,O)}var F,Y;Wo(t,a),Dl(t);{if(Dc.current=t,Xn(!0),F=Jo(e,t,n,i,k,a),Y=Zo(),t.mode&ti){Si(!0);try{F=Jo(e,t,n,i,k,a),Y=Zo()}finally{Si(!1)}}Xn(!1)}return No(),e!==null&&!ns?(Vy(e,t,a),Gs(e,t,a)):(Ri()&&Y&&Um(t),t.flags|=yo,Qi(e,t,F,a),t.child)}function kw(e,t,n,i,a){{switch(lL(t)){case!1:{var x=t.stateNode,k=t.type,O=new k(t.memoizedProps,x.context),F=O.state;x.updater.enqueueSetState(x,F,null);break}case!0:{t.flags|=Sn,t.flags|=Zi;var Y=new Error("Simulated error coming from DevTools"),K=Al(a);t.lanes=Zt(t.lanes,K);var fe=Kp(t,Ka(Y,t),K);np(t,fe);break}}if(t.type!==t.elementType){var de=n.propTypes;de&&Xr(de,i,"prop",un(n))}}var Ce;ms(n)?(Ce=!0,rd(t)):Ce=!1,Wo(t,a);var De=t.stateNode,Ae;De===null?(qd(e,t),_w(t,n,i),Gp(t,n,i,a),Ae=!0):e===null?Ae=MR(t,n,i,a):Ae=UR(e,t,n,i,a);var at=nv(e,t,n,Ae,Ce,a);{var Lt=t.stateNode;Ae&&Lt.props!==i&&(Xa||y("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"),Xa=!0)}return at}function nv(e,t,n,i,a,x){jw(e,t);var k=(t.flags&Sn)!==Ot;if(!i&&!k)return a&&uy(t,n,!1),Gs(e,t,x);var O=t.stateNode;Dc.current=t;var F;if(k&&typeof n.getDerivedStateFromError!="function")F=null,fw();else{Dl(t);{if(Xn(!0),F=O.render(),t.mode&ti){Si(!0);try{O.render()}finally{Si(!1)}}Xn(!1)}No()}return t.flags|=yo,e!==null&&k?HR(e,t,F,x):Qi(e,t,F,x),t.memoizedState=O.state,a&&uy(t,n,!0),t.child}function Rw(e){var t=e.stateNode;t.pendingContext?ly(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ly(e,t.context,!1),ip(e,t.containerInfo)}function GR(e,t,n){if(Rw(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var i=t.pendingProps,a=t.memoizedState,x=a.element;Ay(e,t),wd(t,i,null,n);var k=t.memoizedState;t.stateNode;var O=k.element;if(a.isDehydrated){var F={element:O,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},Y=t.updateQueue;if(Y.baseState=F,t.memoizedState=F,t.flags&Ms){var K=Ka(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 Tw(e,t,O,n,K)}else if(O!==x){var fe=Ka(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return Tw(e,t,O,n,fe)}else{Kk(t);var de=Ey(t,null,O,n);t.child=de;for(var Ce=de;Ce;)Ce.flags=Ce.flags&~ci|Us,Ce=Ce.sibling}}else{if(Ho(),O===x)return Gs(e,t,n);Qi(e,t,O,n)}return t.child}function Tw(e,t,n,i,a){return Ho(),Fm(a),t.flags|=Ms,Qi(e,t,n,i),t.child}function YR(e,t,n){Py(t),e===null&&Vm(t);var i=t.type,a=t.pendingProps,x=e!==null?e.memoizedProps:null,k=a.children,O=wm(i,a);return O?k=null:x!==null&&wm(i,x)&&(t.flags|=Cl),jw(e,t),Qi(e,t,k,n),t.child}function qR(e,t){return e===null&&Vm(t),null}function KR(e,t,n,i){qd(e,t);var a=t.pendingProps,x=n,k=x._payload,O=x._init,F=O(k);t.type=F;var Y=t.tag=q5(F),K=ts(F,a),fe;switch(Y){case l:return iv(t,F),t.type=F=al(F),fe=tv(null,t,F,K,i),fe;case g:return t.type=F=Av(F),fe=kw(null,t,F,K,i),fe;case v:return t.type=F=Mv(F),fe=Nw(null,t,F,K,i),fe;case E:{if(t.type!==t.elementType){var de=F.propTypes;de&&Xr(de,K,"prop",un(F))}return fe=Cw(null,t,F,ts(F.type,K),i),fe}}var Ce="";throw F!==null&&typeof F=="object"&&F.$$typeof===wt&&(Ce=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+F+". "+("Lazy element type must resolve to a class or function."+Ce))}function XR(e,t,n,i,a){qd(e,t),t.tag=g;var x;return ms(n)?(x=!0,rd(t)):x=!1,Wo(t,a),_w(t,n,i),Gp(t,n,i,a),nv(null,t,n,!0,x,a)}function JR(e,t,n,i){qd(e,t);var a=t.pendingProps,x;{var k=Bo(t,n,!1);x=Io(t,k)}Wo(t,i);var O,F;Dl(t);{if(n.prototype&&typeof n.prototype.render=="function"){var Y=un(n)||"Unknown";Xp[Y]||(y("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.",Y,Y),Xp[Y]=!0)}t.mode&ti&&Zr.recordLegacyContextWarning(t,null),Xn(!0),Dc.current=t,O=Jo(null,t,n,a,x,i),F=Zo(),Xn(!1)}if(No(),t.flags|=yo,typeof O=="object"&&O!==null&&typeof O.render=="function"&&O.$$typeof===void 0){var K=un(n)||"Unknown";jc[K]||(y("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.",K,K,K),jc[K]=!0)}if(typeof O=="object"&&O!==null&&typeof O.render=="function"&&O.$$typeof===void 0){{var fe=un(n)||"Unknown";jc[fe]||(y("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",fe,fe,fe),jc[fe]=!0)}t.tag=g,t.memoizedState=null,t.updateQueue=null;var de=!1;return ms(n)?(de=!0,rd(t)):de=!1,t.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,tp(t),gw(t,O),Gp(t,n,a,i),nv(null,t,n,!0,de,i)}else{if(t.tag=l,t.mode&ti){Si(!0);try{O=Jo(null,t,n,a,x,i),F=Zo()}finally{Si(!1)}}return Ri()&&F&&Um(t),Qi(null,t,O,i),iv(t,n),t.child}}function iv(e,t){{if(t&&t.childContextTypes&&y("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var n="",i=lr();i&&(n+=`
160
+
161
+ Check the render method of \``+i+"`.");var a=i||"",x=e._debugSource;x&&(a=x.fileName+":"+x.lineNumber),Qp[a]||(Qp[a]=!0,y("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 k=un(t)||"Unknown";kc[k]||(y("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",k),kc[k]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var O=un(t)||"Unknown";Zp[O]||(y("%s: Function components do not support getDerivedStateFromProps.",O),Zp[O]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var F=un(t)||"Unknown";Jp[F]||(y("%s: Function components do not support contextType.",F),Jp[F]=!0)}}}var rv={dehydrated:null,treeContext:null,retryLane:Ni};function sv(e){return{baseLanes:e,cachePool:FR(),transitions:null}}function ZR(e,t){var n=null;return{baseLanes:Zt(e.baseLanes,t),cachePool:n,transitions:e.transitions}}function QR(e,t,n,i){if(t!==null){var a=t.memoizedState;if(a===null)return!1}return ap(e,_c)}function eT(e,t){return Du(e.childLanes,t)}function Lw(e,t,n){var i=t.pendingProps;cL(t)&&(t.flags|=Sn);var a=Qr.current,x=!1,k=(t.flags&Sn)!==Ot;if(k||QR(a,e)?(x=!0,t.flags&=~Sn):(e===null||e.memoizedState!==null)&&(a=_R(a,Iy)),a=Yo(a),pa(t,a),e===null){Vm(t);var O=t.memoizedState;if(O!==null){var F=O.dehydrated;if(F!==null)return sT(t,F)}var Y=i.children,K=i.fallback;if(x){var fe=tT(t,Y,K,n),de=t.child;return de.memoizedState=sv(n),t.memoizedState=rv,fe}else return av(t,Y)}else{var Ce=e.memoizedState;if(Ce!==null){var De=Ce.dehydrated;if(De!==null)return aT(e,t,k,i,De,Ce,n)}if(x){var Ae=i.fallback,at=i.children,Lt=iT(e,t,at,Ae,n),Dt=t.child,fn=e.child.memoizedState;return Dt.memoizedState=fn===null?sv(n):ZR(fn,n),Dt.childLanes=eT(e,n),t.memoizedState=rv,Lt}else{var ln=i.children,be=nT(e,t,ln,n);return t.memoizedState=null,be}}}function av(e,t,n){var i=e.mode,a={mode:"visible",children:t},x=ov(a,i);return x.return=e,e.child=x,x}function tT(e,t,n,i){var a=e.mode,x=e.child,k={mode:"hidden",children:t},O,F;return(a&dn)===Mt&&x!==null?(O=x,O.childLanes=He,O.pendingProps=k,e.mode&En&&(O.actualDuration=0,O.actualStartTime=-1,O.selfBaseDuration=0,O.treeBaseDuration=0),F=Sa(n,a,i,null)):(O=ov(k,a),F=Sa(n,a,i,null)),O.return=e,F.return=e,O.sibling=F,e.child=O,F}function ov(e,t,n){return A0(e,t,He,null)}function Aw(e,t){return to(e,t)}function nT(e,t,n,i){var a=e.child,x=a.sibling,k=Aw(a,{mode:"visible",children:n});if((t.mode&dn)===Mt&&(k.lanes=i),k.return=t,k.sibling=null,x!==null){var O=t.deletions;O===null?(t.deletions=[x],t.flags|=ja):O.push(x)}return t.child=k,k}function iT(e,t,n,i,a){var x=t.mode,k=e.child,O=k.sibling,F={mode:"hidden",children:n},Y;if((x&dn)===Mt&&t.child!==k){var K=t.child;Y=K,Y.childLanes=He,Y.pendingProps=F,t.mode&En&&(Y.actualDuration=0,Y.actualStartTime=-1,Y.selfBaseDuration=k.selfBaseDuration,Y.treeBaseDuration=k.treeBaseDuration),t.deletions=null}else Y=Aw(k,F),Y.subtreeFlags=k.subtreeFlags&Os;var fe;return O!==null?fe=to(O,i):(fe=Sa(i,x,a,null),fe.flags|=ci),fe.return=t,Y.return=t,Y.sibling=fe,t.child=Y,fe}function Yd(e,t,n,i){i!==null&&Fm(i),zo(t,e.child,null,n);var a=t.pendingProps,x=a.children,k=av(t,x);return k.flags|=ci,t.memoizedState=null,k}function rT(e,t,n,i,a){var x=t.mode,k={mode:"visible",children:n},O=ov(k,x),F=Sa(i,x,a,null);return F.flags|=ci,O.return=t,F.return=t,O.sibling=F,t.child=O,(t.mode&dn)!==Mt&&zo(t,e.child,null,a),F}function sT(e,t,n){return(e.mode&dn)===Mt?(y("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):Cm(t)?e.lanes=Ma:e.lanes=br,null}function aT(e,t,n,i,a,x,k){if(n)if(t.flags&Ms){t.flags&=~Ms;var be=Yp(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Yd(e,t,k,be)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Sn,null;var Me=i.children,ye=i.fallback,Ge=rT(e,t,Me,ye,k),ft=t.child;return ft.memoizedState=sv(k),t.memoizedState=rv,Ge}else{if(Yk(),(t.mode&dn)===Mt)return Yd(e,t,k,null);if(Cm(a)){var O,F,Y;{var K=uk(a);O=K.digest,F=K.message,Y=K.stack}var fe;F?fe=new Error(F):fe=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var de=Yp(fe,O,Y);return Yd(e,t,k,de)}var Ce=yr(k,e.childLanes);if(ns||Ce){var De=rh();if(De!==null){var Ae=vE(De,k);if(Ae!==Ni&&Ae!==x.retryLane){x.retryLane=Ae;var at=Hn;dr(e,Ae),wi(De,e,Ae,at)}}jv();var Lt=Yp(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 Yd(e,t,k,Lt)}else if(ny(a)){t.flags|=Sn,t.child=e.child;var Dt=T5.bind(null,e);return dk(a,Dt),null}else{Xk(t,a,x.treeContext);var fn=i.children,ln=av(t,fn);return ln.flags|=Us,ln}}}function Mw(e,t,n){e.lanes=Zt(e.lanes,t);var i=e.alternate;i!==null&&(i.lanes=Zt(i.lanes,t)),Jm(e.return,t,n)}function oT(e,t,n){for(var i=t;i!==null;){if(i.tag===T){var a=i.memoizedState;a!==null&&Mw(i,n,e)}else if(i.tag===H)Mw(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 lT(e){for(var t=e,n=null;t!==null;){var i=t.alternate;i!==null&&Cd(i)===null&&(n=t),t=t.sibling}return n}function cT(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!ev[e])if(ev[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{y('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{y('"%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:y('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else y('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function uT(e,t){e!==void 0&&!Gd[e]&&(e!=="collapsed"&&e!=="hidden"?(Gd[e]=!0,y('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Gd[e]=!0,y('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function Uw(e,t){{var n=jt(e),i=!n&&typeof qn(e)=="function";if(n||i){var a=n?"array":"iterable";return y("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>",a,t,a),!1}}return!0}function dT(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(jt(e)){for(var n=0;n<e.length;n++)if(!Uw(e[n],n))return}else{var i=qn(e);if(typeof i=="function"){var a=i.call(e);if(a)for(var x=a.next(),k=0;!x.done;x=a.next()){if(!Uw(x.value,k))return;k++}}else y('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 lv(e,t,n,i,a){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=i,x.tail=n,x.tailMode=a)}function Ow(e,t,n){var i=t.pendingProps,a=i.revealOrder,x=i.tail,k=i.children;cT(a),uT(x,a),dT(k,a),Qi(e,t,k,n);var O=Qr.current,F=ap(O,_c);if(F)O=op(O,_c),t.flags|=Sn;else{var Y=e!==null&&(e.flags&Sn)!==Ot;Y&&oT(t,t.child,n),O=Yo(O)}if(pa(t,O),(t.mode&dn)===Mt)t.memoizedState=null;else switch(a){case"forwards":{var K=lT(t.child),fe;K===null?(fe=t.child,t.child=null):(fe=K.sibling,K.sibling=null),lv(t,!1,fe,K,x);break}case"backwards":{var de=null,Ce=t.child;for(t.child=null;Ce!==null;){var De=Ce.alternate;if(De!==null&&Cd(De)===null){t.child=Ce;break}var Ae=Ce.sibling;Ce.sibling=de,de=Ce,Ce=Ae}lv(t,!0,de,null,x);break}case"together":{lv(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function hT(e,t,n){ip(t,t.stateNode.containerInfo);var i=t.pendingProps;return e===null?t.child=zo(t,null,i,n):Qi(e,t,i,n),t.child}var Pw=!1;function fT(e,t,n){var i=t.type,a=i._context,x=t.pendingProps,k=t.memoizedProps,O=x.value;{"value"in x||Pw||(Pw=!0,y("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var F=t.type.propTypes;F&&Xr(F,x,"prop","Context.Provider")}if(ky(t,a,O),k!==null){var Y=k.value;if(Sr(Y,O)){if(k.children===x.children&&!nd())return Gs(e,t,n)}else cR(t,a,n)}var K=x.children;return Qi(e,t,K,n),t.child}var Bw=!1;function mT(e,t,n){var i=t.type;i._context===void 0?i!==i.Consumer&&(Bw||(Bw=!0,y("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 a=t.pendingProps,x=a.children;typeof x!="function"&&y("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."),Wo(t,n);var k=ui(i);Dl(t);var O;return Dc.current=t,Xn(!0),O=x(k),Xn(!1),No(),t.flags|=yo,Qi(e,t,O,n),t.child}function Rc(){ns=!0}function qd(e,t){(t.mode&dn)===Mt&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=ci)}function Gs(e,t,n){return e!==null&&(t.dependencies=e.dependencies),fw(),Hc(t.lanes),yr(n,t.childLanes)?(oR(e,t),t.child):null}function pT(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 a=i.child;if(a===null)throw new Error("Expected parent to have a child.");for(;a.sibling!==t;)if(a=a.sibling,a===null)throw new Error("Expected to find the previous sibling.");a.sibling=n}var x=i.deletions;return x===null?(i.deletions=[e],i.flags|=ja):x.push(e),n.flags|=ci,n}}function cv(e,t){var n=e.lanes;return!!yr(n,t)}function vT(e,t,n){switch(t.tag){case u:Rw(t),t.stateNode,Ho();break;case S:Py(t);break;case g:{var i=t.type;ms(i)&&rd(t);break}case p:ip(t,t.stateNode.containerInfo);break;case f:{var a=t.memoizedProps.value,x=t.type._context;ky(t,x,a);break}case N:{var k=yr(n,t.childLanes);k&&(t.flags|=xn);{var O=t.stateNode;O.effectDuration=0,O.passiveEffectDuration=0}}break;case T:{var F=t.memoizedState;if(F!==null){if(F.dehydrated!==null)return pa(t,Yo(Qr.current)),t.flags|=Sn,null;var Y=t.child,K=Y.childLanes;if(yr(n,K))return Lw(e,t,n);pa(t,Yo(Qr.current));var fe=Gs(e,t,n);return fe!==null?fe.sibling:null}else pa(t,Yo(Qr.current));break}case H:{var de=(e.flags&Sn)!==Ot,Ce=yr(n,t.childLanes);if(de){if(Ce)return Ow(e,t,n);t.flags|=Sn}var De=t.memoizedState;if(De!==null&&(De.rendering=null,De.tail=null,De.lastEffect=null),pa(t,Qr.current),Ce)break;return null}case I:case G:return t.lanes=He,Dw(e,t,n)}return Gs(e,t,n)}function Iw(e,t,n){if(t._debugNeedsRemount&&e!==null)return pT(e,t,Iv(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var i=e.memoizedProps,a=t.pendingProps;if(i!==a||nd()||t.type!==e.type)ns=!0;else{var x=cv(e,n);if(!x&&(t.flags&Sn)===Ot)return ns=!1,vT(e,t,n);(e.flags&mf)!==Ot?ns=!0:ns=!1}}else if(ns=!1,Ri()&&Fk(t)){var k=t.index,O=Hk();fy(t,O,k)}switch(t.lanes=He,t.tag){case _:return JR(e,t,t.type,n);case D:{var F=t.elementType;return KR(e,t,F,n)}case l:{var Y=t.type,K=t.pendingProps,fe=t.elementType===Y?K:ts(Y,K);return tv(e,t,Y,fe,n)}case g:{var de=t.type,Ce=t.pendingProps,De=t.elementType===de?Ce:ts(de,Ce);return kw(e,t,de,De,n)}case u:return GR(e,t,n);case S:return YR(e,t,n);case C:return qR(e,t);case T:return Lw(e,t,n);case p:return hT(e,t,n);case v:{var Ae=t.type,at=t.pendingProps,Lt=t.elementType===Ae?at:ts(Ae,at);return Nw(e,t,Ae,Lt,n)}case b:return zR(e,t,n);case c:return $R(e,t,n);case N:return WR(e,t,n);case f:return fT(e,t,n);case m:return mT(e,t,n);case E:{var Dt=t.type,fn=t.pendingProps,ln=ts(Dt,fn);if(t.type!==t.elementType){var be=Dt.propTypes;be&&Xr(be,ln,"prop",un(Dt))}return ln=ts(Dt.type,ln),Cw(e,t,Dt,ln,n)}case A:return Ew(e,t,t.type,t.pendingProps,n);case R:{var Me=t.type,ye=t.pendingProps,Ge=t.elementType===Me?ye:ts(Me,ye);return XR(e,t,Me,Ge,n)}case H:return Ow(e,t,n);case U:break;case I:return Dw(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 Qo(e){e.flags|=xn}function Vw(e){e.flags|=ka,e.flags|=pf}var Fw,uv,Hw,zw;Fw=function(e,t,n,i){for(var a=t.child;a!==null;){if(a.tag===S||a.tag===C)Bj(e,a.stateNode);else if(a.tag!==p){if(a.child!==null){a.child.return=a,a=a.child;continue}}if(a===t)return;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},uv=function(e,t){},Hw=function(e,t,n,i,a){var x=e.memoizedProps;if(x!==i){var k=t.stateNode,O=rp(),F=Vj(k,n,x,i,a,O);t.updateQueue=F,F&&Qo(t)}},zw=function(e,t,n,i){n!==i&&Qo(t)};function Tc(e,t){if(!Ri())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 a=e.tail,x=null;a!==null;)a.alternate!==null&&(x=a),a=a.sibling;x===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:x.sibling=null;break}}}function Li(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=He,i=Ot;if(t){if((e.mode&En)!==Mt){for(var F=e.selfBaseDuration,Y=e.child;Y!==null;)n=Zt(n,Zt(Y.lanes,Y.childLanes)),i|=Y.subtreeFlags&Os,i|=Y.flags&Os,F+=Y.treeBaseDuration,Y=Y.sibling;e.treeBaseDuration=F}else for(var K=e.child;K!==null;)n=Zt(n,Zt(K.lanes,K.childLanes)),i|=K.subtreeFlags&Os,i|=K.flags&Os,K.return=e,K=K.sibling;e.subtreeFlags|=i}else{if((e.mode&En)!==Mt){for(var a=e.actualDuration,x=e.selfBaseDuration,k=e.child;k!==null;)n=Zt(n,Zt(k.lanes,k.childLanes)),i|=k.subtreeFlags,i|=k.flags,a+=k.actualDuration,x+=k.treeBaseDuration,k=k.sibling;e.actualDuration=a,e.treeBaseDuration=x}else for(var O=e.child;O!==null;)n=Zt(n,Zt(O.lanes,O.childLanes)),i|=O.subtreeFlags,i|=O.flags,O.return=e,O=O.sibling;e.subtreeFlags|=i}return e.childLanes=n,t}function gT(e,t,n){if(tR()&&(t.mode&dn)!==Mt&&(t.flags&Sn)===Ot)return yy(t),Ho(),t.flags|=Ms|yu|Zi,!1;var i=cd(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(Qk(t),Li(t),(t.mode&En)!==Mt){var a=n!==null;if(a){var x=t.child;x!==null&&(t.treeBaseDuration-=x.treeBaseDuration)}}return!1}else{if(Ho(),(t.flags&Sn)===Ot&&(t.memoizedState=null),t.flags|=xn,Li(t),(t.mode&En)!==Mt){var k=n!==null;if(k){var O=t.child;O!==null&&(t.treeBaseDuration-=O.treeBaseDuration)}}return!1}else return wy(),!0}function $w(e,t,n){var i=t.pendingProps;switch(Om(t),t.tag){case _:case D:case A:case l:case v:case b:case c:case N:case m:case E:return Li(t),null;case g:{var a=t.type;return ms(a)&&id(t),Li(t),null}case u:{var x=t.stateNode;if(Go(t),Lm(t),cp(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),e===null||e.child===null){var k=cd(t);if(k)Qo(t);else if(e!==null){var O=e.memoizedState;(!O.isDehydrated||(t.flags&Ms)!==Ot)&&(t.flags|=wo,wy())}}return uv(e,t),Li(t),null}case S:{sp(t);var F=Oy(),Y=t.type;if(e!==null&&t.stateNode!=null)Hw(e,t,Y,i,F),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 Li(t),null}var K=rp(),fe=cd(t);if(fe)Jk(t,F,K)&&Qo(t);else{var de=Pj(Y,i,F,K,t);Fw(de,t,!1,!1),t.stateNode=de,Ij(de,Y,i,F)&&Qo(t)}t.ref!==null&&Vw(t)}return Li(t),null}case C:{var Ce=i;if(e&&t.stateNode!=null){var De=e.memoizedProps;zw(e,t,De,Ce)}else{if(typeof Ce!="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 Ae=Oy(),at=rp(),Lt=cd(t);Lt?Zk(t)&&Qo(t):t.stateNode=Fj(Ce,Ae,at,t)}return Li(t),null}case T:{qo(t);var Dt=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var fn=gT(e,t,Dt);if(!fn)return t.flags&Zi?t:null}if((t.flags&Sn)!==Ot)return t.lanes=n,(t.mode&En)!==Mt&&Mp(t),t;var ln=Dt!==null,be=e!==null&&e.memoizedState!==null;if(ln!==be&&ln){var Me=t.child;if(Me.flags|=Ra,(t.mode&dn)!==Mt){var ye=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);ye||ap(Qr.current,Iy)?_5():jv()}}var Ge=t.updateQueue;if(Ge!==null&&(t.flags|=xn),Li(t),(t.mode&En)!==Mt&&ln){var ft=t.child;ft!==null&&(t.treeBaseDuration-=ft.treeBaseDuration)}return null}case p:return Go(t),uv(e,t),e===null&&Mk(t.stateNode.containerInfo),Li(t),null;case f:var ot=t.type._context;return Xm(ot,t),Li(t),null;case R:{var Vt=t.type;return ms(Vt)&&id(t),Li(t),null}case H:{qo(t);var Gt=t.memoizedState;if(Gt===null)return Li(t),null;var jn=(t.flags&Sn)!==Ot,_n=Gt.rendering;if(_n===null)if(jn)Tc(Gt,!1);else{var si=y5()&&(e===null||(e.flags&Sn)===Ot);if(!si)for(var bn=t.child;bn!==null;){var ni=Cd(bn);if(ni!==null){jn=!0,t.flags|=Sn,Tc(Gt,!1);var Wi=ni.updateQueue;return Wi!==null&&(t.updateQueue=Wi,t.flags|=xn),t.subtreeFlags=Ot,lR(t,n),pa(t,op(Qr.current,_c)),t.child}bn=bn.sibling}Gt.tail!==null&&xi()>d0()&&(t.flags|=Sn,jn=!0,Tc(Gt,!1),t.lanes=z_)}else{if(!jn){var Pi=Cd(_n);if(Pi!==null){t.flags|=Sn,jn=!0;var Er=Pi.updateQueue;if(Er!==null&&(t.updateQueue=Er,t.flags|=xn),Tc(Gt,!0),Gt.tail===null&&Gt.tailMode==="hidden"&&!_n.alternate&&!Ri())return Li(t),null}else xi()*2-Gt.renderingStartTime>d0()&&n!==br&&(t.flags|=Sn,jn=!0,Tc(Gt,!1),t.lanes=z_)}if(Gt.isBackwards)_n.sibling=t.child,t.child=_n;else{var nr=Gt.last;nr!==null?nr.sibling=_n:t.child=_n,Gt.last=_n}}if(Gt.tail!==null){var ir=Gt.tail;Gt.rendering=ir,Gt.tail=ir.sibling,Gt.renderingStartTime=xi(),ir.sibling=null;var Gi=Qr.current;return jn?Gi=op(Gi,_c):Gi=Yo(Gi),pa(t,Gi),ir}return Li(t),null}case U:break;case I:case G:{Dv(t);var Js=t.memoizedState,ol=Js!==null;if(e!==null){var Yc=e.memoizedState,xs=Yc!==null;xs!==ol&&!$&&(t.flags|=Ra)}return!ol||(t.mode&dn)===Mt?Li(t):yr(ws,br)&&(Li(t),t.subtreeFlags&(ci|xn)&&(t.flags|=Ra)),null}case ne:return null;case Q: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 _T(e,t,n){switch(Om(t),t.tag){case g:{var i=t.type;ms(i)&&id(t);var a=t.flags;return a&Zi?(t.flags=a&~Zi|Sn,(t.mode&En)!==Mt&&Mp(t),t):null}case u:{t.stateNode,Go(t),Lm(t),cp();var x=t.flags;return(x&Zi)!==Ot&&(x&Sn)===Ot?(t.flags=x&~Zi|Sn,t):null}case S:return sp(t),null;case T:{qo(t);var k=t.memoizedState;if(k!==null&&k.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.");Ho()}var O=t.flags;return O&Zi?(t.flags=O&~Zi|Sn,(t.mode&En)!==Mt&&Mp(t),t):null}case H:return qo(t),null;case p:return Go(t),null;case f:var F=t.type._context;return Xm(F,t),null;case I:case G:return Dv(t),null;case ne:return null;default:return null}}function Ww(e,t,n){switch(Om(t),t.tag){case g:{var i=t.type.childContextTypes;i!=null&&id(t);break}case u:{t.stateNode,Go(t),Lm(t),cp();break}case S:{sp(t);break}case p:Go(t);break;case T:qo(t);break;case H:qo(t);break;case f:var a=t.type._context;Xm(a,t);break;case I:case G:Dv(t);break}}var Gw=null;Gw=new Set;var Kd=!1,Ai=!1,bT=typeof WeakSet=="function"?WeakSet:Set,xt=null,el=null,tl=null;function yT(e){df(null,function(){throw e}),hf()}var wT=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&En)try{bs(),t.componentWillUnmount()}finally{_s(e)}else t.componentWillUnmount()};function Yw(e,t){try{_a(pi,e)}catch(n){Bn(e,t,n)}}function dv(e,t,n){try{wT(e,n)}catch(i){Bn(e,t,i)}}function xT(e,t,n){try{n.componentDidMount()}catch(i){Bn(e,t,i)}}function qw(e,t){try{Xw(e)}catch(n){Bn(e,t,n)}}function nl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function"){var i;try{if(Se&&Z&&e.mode&En)try{bs(),i=n(null)}finally{_s(e)}else i=n(null)}catch(a){Bn(e,t,a)}typeof i=="function"&&y("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Tt(e))}else n.current=null}function Xd(e,t,n){try{n()}catch(i){Bn(e,t,i)}}var Kw=!1;function ST(e,t){Uj(e.containerInfo),xt=t,NT();var n=Kw;return Kw=!1,n}function NT(){for(;xt!==null;){var e=xt,t=e.child;(e.subtreeFlags&_f)!==Ot&&t!==null?(t.return=e,xt=t):CT()}}function CT(){for(;xt!==null;){var e=xt;Cn(e);try{ET(e)}catch(n){Bn(e,e.return,n)}Yn();var t=e.sibling;if(t!==null){t.return=e.return,xt=t;return}xt=e.return}}function ET(e){var t=e.alternate,n=e.flags;if((n&wo)!==Ot){switch(Cn(e),e.tag){case l:case v:case A:break;case g:{if(t!==null){var i=t.memoizedProps,a=t.memoizedState,x=e.stateNode;e.type===e.elementType&&!Xa&&(x.props!==e.memoizedProps&&y("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"),x.state!==e.memoizedState&&y("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 k=x.getSnapshotBeforeUpdate(e.elementType===e.type?i:ts(e.type,i),a);{var O=Gw;k===void 0&&!O.has(e.type)&&(O.add(e.type),y("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Tt(e)))}x.__reactInternalSnapshotBeforeUpdate=k}break}case u:{{var F=e.stateNode;ak(F.containerInfo)}break}case S:case C:case p:case R: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.")}Yn()}}function is(e,t,n){var i=t.updateQueue,a=i!==null?i.lastEffect:null;if(a!==null){var x=a.next,k=x;do{if((k.tag&e)===e){var O=k.destroy;k.destroy=void 0,O!==void 0&&((e&Ti)!==hr?FC(t):(e&pi)!==hr&&B_(t),(e&ps)!==hr&&$c(!0),Xd(t,n,O),(e&ps)!==hr&&$c(!1),(e&Ti)!==hr?HC():(e&pi)!==hr&&I_())}k=k.next}while(k!==x)}}function _a(e,t){var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var a=i.next,x=a;do{if((x.tag&e)===e){(e&Ti)!==hr?IC(t):(e&pi)!==hr&&zC(t);var k=x.create;(e&ps)!==hr&&$c(!0),x.destroy=k(),(e&ps)!==hr&&$c(!1),(e&Ti)!==hr?VC():(e&pi)!==hr&&$C();{var O=x.destroy;if(O!==void 0&&typeof O!="function"){var F=void 0;(x.tag&pi)!==Ot?F="useLayoutEffect":(x.tag&ps)!==Ot?F="useInsertionEffect":F="useEffect";var Y=void 0;O===null?Y=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof O.then=="function"?Y=`
162
+
163
+ It looks like you wrote `+F+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
164
+
165
+ `+F+`(() => {
166
+ async function fetchData() {
167
+ // You can await here
168
+ const response = await MyAPI.getData(someId);
169
+ // ...
170
+ }
171
+ fetchData();
172
+ }, [someId]); // Or [] if effect doesn't need props or state
173
+
174
+ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:Y=" You returned: "+O,y("%s must not return anything besides a function, which is used for clean-up.%s",F,Y)}}}x=x.next}while(x!==a)}}function DT(e,t){if((t.flags&xn)!==Ot)switch(t.tag){case N:{var n=t.stateNode.passiveEffectDuration,i=t.memoizedProps,a=i.id,x=i.onPostCommit,k=dw(),O=t.alternate===null?"mount":"update";uw()&&(O="nested-update"),typeof x=="function"&&x(a,O,n,k);var F=t.return;e:for(;F!==null;){switch(F.tag){case u:var Y=F.stateNode;Y.passiveEffectDuration+=n;break e;case N:var K=F.stateNode;K.passiveEffectDuration+=n;break e}F=F.return}break}}}function jT(e,t,n,i){if((n.flags&El)!==Ot)switch(n.tag){case l:case v:case A:{if(!Ai)if(n.mode&En)try{bs(),_a(pi|mi,n)}finally{_s(n)}else _a(pi|mi,n);break}case g:{var a=n.stateNode;if(n.flags&xn&&!Ai)if(t===null)if(n.type===n.elementType&&!Xa&&(a.props!==n.memoizedProps&&y("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"),a.state!==n.memoizedState&&y("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&En)try{bs(),a.componentDidMount()}finally{_s(n)}else a.componentDidMount();else{var x=n.elementType===n.type?t.memoizedProps:ts(n.type,t.memoizedProps),k=t.memoizedState;if(n.type===n.elementType&&!Xa&&(a.props!==n.memoizedProps&&y("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"),a.state!==n.memoizedState&&y("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&En)try{bs(),a.componentDidUpdate(x,k,a.__reactInternalSnapshotBeforeUpdate)}finally{_s(n)}else a.componentDidUpdate(x,k,a.__reactInternalSnapshotBeforeUpdate)}var O=n.updateQueue;O!==null&&(n.type===n.elementType&&!Xa&&(a.props!==n.memoizedProps&&y("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"),a.state!==n.memoizedState&&y("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")),Uy(n,O,a));break}case u:{var F=n.updateQueue;if(F!==null){var Y=null;if(n.child!==null)switch(n.child.tag){case S:Y=n.child.stateNode;break;case g:Y=n.child.stateNode;break}Uy(n,F,Y)}break}case S:{var K=n.stateNode;if(t===null&&n.flags&xn){var fe=n.type,de=n.memoizedProps;Gj(K,fe,de)}break}case C:break;case p:break;case N:{{var Ce=n.memoizedProps,De=Ce.onCommit,Ae=Ce.onRender,at=n.stateNode.effectDuration,Lt=dw(),Dt=t===null?"mount":"update";uw()&&(Dt="nested-update"),typeof Ae=="function"&&Ae(n.memoizedProps.id,Dt,n.actualDuration,n.treeBaseDuration,n.actualStartTime,Lt);{typeof De=="function"&&De(n.memoizedProps.id,Dt,at,Lt),C5(n);var fn=n.return;e:for(;fn!==null;){switch(fn.tag){case u:var ln=fn.stateNode;ln.effectDuration+=at;break e;case N:var be=fn.stateNode;be.effectDuration+=at;break e}fn=fn.return}}}break}case T:{OT(e,n);break}case H:case R:case U:case I:case G:case Q: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.")}Ai||n.flags&ka&&Xw(n)}function kT(e){switch(e.tag){case l:case v:case A:{if(e.mode&En)try{bs(),Yw(e,e.return)}finally{_s(e)}else Yw(e,e.return);break}case g:{var t=e.stateNode;typeof t.componentDidMount=="function"&&xT(e,e.return,t),qw(e,e.return);break}case S:{qw(e,e.return);break}}}function RT(e,t){for(var n=null,i=e;;){if(i.tag===S){if(n===null){n=i;try{var a=i.stateNode;t?nk(a):rk(i.stateNode,i.memoizedProps)}catch(k){Bn(e,e.return,k)}}}else if(i.tag===C){if(n===null)try{var x=i.stateNode;t?ik(x):sk(x,i.memoizedProps)}catch(k){Bn(e,e.return,k)}}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 Xw(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 a;if(e.mode&En)try{bs(),a=t(i)}finally{_s(e)}else a=t(i);typeof a=="function"&&y("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Tt(e))}else t.hasOwnProperty("current")||y("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Tt(e)),t.current=i}}function TT(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&&Pk(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 LT(e){for(var t=e.return;t!==null;){if(Zw(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 Zw(e){return e.tag===S||e.tag===u||e.tag===p}function Qw(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||Zw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==S&&t.tag!==C&&t.tag!==M;){if(t.flags&ci||t.child===null||t.tag===p)continue e;t.child.return=t,t=t.child}if(!(t.flags&ci))return t.stateNode}}function AT(e){var t=LT(e);switch(t.tag){case S:{var n=t.stateNode;t.flags&Cl&&(ty(n),t.flags&=~Cl);var i=Qw(e);fv(e,i,n);break}case u:case p:{var a=t.stateNode.containerInfo,x=Qw(e);hv(e,x,a);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function hv(e,t,n){var i=e.tag,a=i===S||i===C;if(a){var x=e.stateNode;t?Zj(n,x,t):Xj(n,x)}else if(i!==p){var k=e.child;if(k!==null){hv(k,t,n);for(var O=k.sibling;O!==null;)hv(O,t,n),O=O.sibling}}}function fv(e,t,n){var i=e.tag,a=i===S||i===C;if(a){var x=e.stateNode;t?Jj(n,x,t):Kj(n,x)}else if(i!==p){var k=e.child;if(k!==null){fv(k,t,n);for(var O=k.sibling;O!==null;)fv(O,t,n),O=O.sibling}}}var Mi=null,rs=!1;function MT(e,t,n){{var i=t;e:for(;i!==null;){switch(i.tag){case S:{Mi=i.stateNode,rs=!1;break e}case u:{Mi=i.stateNode.containerInfo,rs=!0;break e}case p:{Mi=i.stateNode.containerInfo,rs=!0;break e}}i=i.return}if(Mi===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");e0(e,t,n),Mi=null,rs=!1}TT(n)}function ba(e,t,n){for(var i=n.child;i!==null;)e0(e,t,i),i=i.sibling}function e0(e,t,n){switch(UC(n),n.tag){case S:Ai||nl(n,t);case C:{{var i=Mi,a=rs;Mi=null,ba(e,t,n),Mi=i,rs=a,Mi!==null&&(rs?ek(Mi,n.stateNode):Qj(Mi,n.stateNode))}return}case M:{Mi!==null&&(rs?tk(Mi,n.stateNode):Nm(Mi,n.stateNode));return}case p:{{var x=Mi,k=rs;Mi=n.stateNode.containerInfo,rs=!0,ba(e,t,n),Mi=x,rs=k}return}case l:case v:case E:case A:{if(!Ai){var O=n.updateQueue;if(O!==null){var F=O.lastEffect;if(F!==null){var Y=F.next,K=Y;do{var fe=K,de=fe.destroy,Ce=fe.tag;de!==void 0&&((Ce&ps)!==hr?Xd(n,t,de):(Ce&pi)!==hr&&(B_(n),n.mode&En?(bs(),Xd(n,t,de),_s(n)):Xd(n,t,de),I_())),K=K.next}while(K!==Y)}}}ba(e,t,n);return}case g:{if(!Ai){nl(n,t);var De=n.stateNode;typeof De.componentWillUnmount=="function"&&dv(n,t,De)}ba(e,t,n);return}case U:{ba(e,t,n);return}case I:{if(n.mode&dn){var Ae=Ai;Ai=Ae||n.memoizedState!==null,ba(e,t,n),Ai=Ae}else ba(e,t,n);break}default:{ba(e,t,n);return}}}function UT(e){e.memoizedState}function OT(e,t){var n=t.memoizedState;if(n===null){var i=t.alternate;if(i!==null){var a=i.memoizedState;if(a!==null){var x=a.dehydrated;x!==null&&yk(x)}}}}function t0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bT),t.forEach(function(i){var a=L5.bind(null,e,i);if(!n.has(i)){if(n.add(i),qr)if(el!==null&&tl!==null)zc(tl,el);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");i.then(a,a)}})}}function PT(e,t,n){el=n,tl=e,Cn(t),n0(t,e),Cn(t),el=null,tl=null}function ss(e,t,n){var i=t.deletions;if(i!==null)for(var a=0;a<i.length;a++){var x=i[a];try{MT(e,t,x)}catch(F){Bn(x,t,F)}}var k=ei();if(t.subtreeFlags&bf)for(var O=t.child;O!==null;)Cn(O),n0(O,e),O=O.sibling;Cn(k)}function n0(e,t,n){var i=e.alternate,a=e.flags;switch(e.tag){case l:case v:case E:case A:{if(ss(t,e),ys(e),a&xn){try{is(ps|mi,e,e.return),_a(ps|mi,e)}catch(Vt){Bn(e,e.return,Vt)}if(e.mode&En){try{bs(),is(pi|mi,e,e.return)}catch(Vt){Bn(e,e.return,Vt)}_s(e)}else try{is(pi|mi,e,e.return)}catch(Vt){Bn(e,e.return,Vt)}}return}case g:{ss(t,e),ys(e),a&ka&&i!==null&&nl(i,i.return);return}case S:{ss(t,e),ys(e),a&ka&&i!==null&&nl(i,i.return);{if(e.flags&Cl){var x=e.stateNode;try{ty(x)}catch(Vt){Bn(e,e.return,Vt)}}if(a&xn){var k=e.stateNode;if(k!=null){var O=e.memoizedProps,F=i!==null?i.memoizedProps:O,Y=e.type,K=e.updateQueue;if(e.updateQueue=null,K!==null)try{Yj(k,K,Y,F,O,e)}catch(Vt){Bn(e,e.return,Vt)}}}}return}case C:{if(ss(t,e),ys(e),a&xn){if(e.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var fe=e.stateNode,de=e.memoizedProps,Ce=i!==null?i.memoizedProps:de;try{qj(fe,Ce,de)}catch(Vt){Bn(e,e.return,Vt)}}return}case u:{if(ss(t,e),ys(e),a&xn&&i!==null){var De=i.memoizedState;if(De.isDehydrated)try{bk(t.containerInfo)}catch(Vt){Bn(e,e.return,Vt)}}return}case p:{ss(t,e),ys(e);return}case T:{ss(t,e),ys(e);var Ae=e.child;if(Ae.flags&Ra){var at=Ae.stateNode,Lt=Ae.memoizedState,Dt=Lt!==null;if(at.isHidden=Dt,Dt){var fn=Ae.alternate!==null&&Ae.alternate.memoizedState!==null;fn||g5()}}if(a&xn){try{UT(e)}catch(Vt){Bn(e,e.return,Vt)}t0(e)}return}case I:{var ln=i!==null&&i.memoizedState!==null;if(e.mode&dn){var be=Ai;Ai=be||ln,ss(t,e),Ai=be}else ss(t,e);if(ys(e),a&Ra){var Me=e.stateNode,ye=e.memoizedState,Ge=ye!==null,ft=e;if(Me.isHidden=Ge,Ge&&!ln&&(ft.mode&dn)!==Mt){xt=ft;for(var ot=ft.child;ot!==null;)xt=ot,IT(ot),ot=ot.sibling}RT(ft,Ge)}return}case H:{ss(t,e),ys(e),a&xn&&t0(e);return}case U:return;default:{ss(t,e),ys(e);return}}}function ys(e){var t=e.flags;if(t&ci){try{AT(e)}catch(n){Bn(e,e.return,n)}e.flags&=~ci}t&Us&&(e.flags&=~Us)}function BT(e,t,n){el=n,tl=t,xt=e,i0(e,t,n),el=null,tl=null}function i0(e,t,n){for(var i=(e.mode&dn)!==Mt;xt!==null;){var a=xt,x=a.child;if(a.tag===I&&i){var k=a.memoizedState!==null,O=k||Kd;if(O){mv(e,t,n);continue}else{var F=a.alternate,Y=F!==null&&F.memoizedState!==null,K=Y||Ai,fe=Kd,de=Ai;Kd=O,Ai=K,Ai&&!de&&(xt=a,VT(a));for(var Ce=x;Ce!==null;)xt=Ce,i0(Ce,t,n),Ce=Ce.sibling;xt=a,Kd=fe,Ai=de,mv(e,t,n);continue}}(a.subtreeFlags&El)!==Ot&&x!==null?(x.return=a,xt=x):mv(e,t,n)}}function mv(e,t,n){for(;xt!==null;){var i=xt;if((i.flags&El)!==Ot){var a=i.alternate;Cn(i);try{jT(t,a,i,n)}catch(k){Bn(i,i.return,k)}Yn()}if(i===e){xt=null;return}var x=i.sibling;if(x!==null){x.return=i.return,xt=x;return}xt=i.return}}function IT(e){for(;xt!==null;){var t=xt,n=t.child;switch(t.tag){case l:case v:case E:case A:{if(t.mode&En)try{bs(),is(pi,t,t.return)}finally{_s(t)}else is(pi,t,t.return);break}case g:{nl(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&dv(t,t.return,i);break}case S:{nl(t,t.return);break}case I:{var a=t.memoizedState!==null;if(a){r0(e);continue}break}}n!==null?(n.return=t,xt=n):r0(e)}}function r0(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 VT(e){for(;xt!==null;){var t=xt,n=t.child;if(t.tag===I){var i=t.memoizedState!==null;if(i){s0(e);continue}}n!==null?(n.return=t,xt=n):s0(e)}}function s0(e){for(;xt!==null;){var t=xt;Cn(t);try{kT(t)}catch(i){Bn(t,t.return,i)}if(Yn(),t===e){xt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,xt=n;return}xt=t.return}}function FT(e,t,n,i){xt=t,HT(t,e,n,i)}function HT(e,t,n,i){for(;xt!==null;){var a=xt,x=a.child;(a.subtreeFlags&xo)!==Ot&&x!==null?(x.return=a,xt=x):zT(e,t,n,i)}}function zT(e,t,n,i){for(;xt!==null;){var a=xt;if((a.flags&ea)!==Ot){Cn(a);try{$T(t,a,n,i)}catch(k){Bn(a,a.return,k)}Yn()}if(a===e){xt=null;return}var x=a.sibling;if(x!==null){x.return=a.return,xt=x;return}xt=a.return}}function $T(e,t,n,i){switch(t.tag){case l:case v:case A:{if(t.mode&En){Ap();try{_a(Ti|mi,t)}finally{Lp(t)}}else _a(Ti|mi,t);break}}}function WT(e){xt=e,GT()}function GT(){for(;xt!==null;){var e=xt,t=e.child;if((xt.flags&ja)!==Ot){var n=e.deletions;if(n!==null){for(var i=0;i<n.length;i++){var a=n[i];xt=a,KT(a,e)}{var x=e.alternate;if(x!==null){var k=x.child;if(k!==null){x.child=null;do{var O=k.sibling;k.sibling=null,k=O}while(k!==null)}}}xt=e}}(e.subtreeFlags&xo)!==Ot&&t!==null?(t.return=e,xt=t):YT()}}function YT(){for(;xt!==null;){var e=xt;(e.flags&ea)!==Ot&&(Cn(e),qT(e),Yn());var t=e.sibling;if(t!==null){t.return=e.return,xt=t;return}xt=e.return}}function qT(e){switch(e.tag){case l:case v:case A:{e.mode&En?(Ap(),is(Ti|mi,e,e.return),Lp(e)):is(Ti|mi,e,e.return);break}}}function KT(e,t){for(;xt!==null;){var n=xt;Cn(n),JT(n,t),Yn();var i=n.child;i!==null?(i.return=n,xt=i):XT(e)}}function XT(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 JT(e,t){switch(e.tag){case l:case v:case A:{e.mode&En?(Ap(),is(Ti,e,t),Lp(e)):is(Ti,e,t);break}}}function ZT(e){switch(e.tag){case l:case v:case A:{try{_a(pi|mi,e)}catch(n){Bn(e,e.return,n)}break}case g:{var t=e.stateNode;try{t.componentDidMount()}catch(n){Bn(e,e.return,n)}break}}}function QT(e){switch(e.tag){case l:case v:case A:{try{_a(Ti|mi,e)}catch(t){Bn(e,e.return,t)}break}}}function e5(e){switch(e.tag){case l:case v:case A:{try{is(pi|mi,e,e.return)}catch(n){Bn(e,e.return,n)}break}case g:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&dv(e,e.return,t);break}}}function t5(e){switch(e.tag){case l:case v:case A:try{is(Ti|mi,e,e.return)}catch(t){Bn(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var Lc=Symbol.for;Lc("selector.component"),Lc("selector.has_pseudo_class"),Lc("selector.role"),Lc("selector.test_id"),Lc("selector.text")}var n5=[];function i5(){n5.forEach(function(e){return e()})}var r5=d.ReactCurrentActQueue;function s5(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,n=typeof jest<"u";return n&&t!==!1}}function a0(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&r5.current!==null&&y("The current testing environment is not configured to support act(...)"),e}}var a5=Math.ceil,pv=d.ReactCurrentDispatcher,vv=d.ReactCurrentOwner,Ui=d.ReactCurrentBatchConfig,as=d.ReactCurrentActQueue,_i=0,o0=1,Oi=2,Fr=4,Ys=0,Ac=1,Ja=2,Jd=3,Mc=4,l0=5,gv=6,hn=_i,er=null,Jn=null,bi=He,ws=He,_v=ca(He),yi=Ys,Uc=null,Zd=He,Oc=He,Qd=He,Pc=null,fr=null,bv=0,c0=500,u0=1/0,o5=500,qs=null;function Bc(){u0=xi()+o5}function d0(){return u0}var eh=!1,yv=null,il=null,Za=!1,ya=null,Ic=He,wv=[],xv=null,l5=50,Vc=0,Sv=null,Nv=!1,th=!1,c5=50,rl=0,nh=null,Fc=Hn,ih=He,h0=!1;function rh(){return er}function tr(){return(hn&(Oi|Fr))!==_i?xi():(Fc!==Hn||(Fc=xi()),Fc)}function wa(e){var t=e.mode;if((t&dn)===Mt)return zt;if((hn&Oi)!==_i&&bi!==He)return Al(bi);var n=rR()!==iR;if(n){if(Ui.transition!==null){var i=Ui.transition;i._updatedFibers||(i._updatedFibers=new Set),i._updatedFibers.add(e)}return ih===Ni&&(ih=Y_()),ih}var a=Kr();if(a!==Ni)return a;var x=Hj();return x}function u5(e){var t=e.mode;return(t&dn)===Mt?zt:hE()}function wi(e,t,n,i){M5(),h0&&y("useInsertionEffect must not schedule updates."),Nv&&(th=!0),Ml(e,n,i),(hn&Oi)!==He&&e===er?P5(t):(qr&&X_(e,t,n),B5(t),e===er&&((hn&Oi)===_i&&(Oc=Zt(Oc,n)),yi===Mc&&xa(e,bi)),mr(e,i),n===zt&&hn===_i&&(t.mode&dn)===Mt&&!as.isBatchingLegacy&&(Bc(),hy()))}function d5(e,t,n){var i=e.current;i.lanes=t,Ml(e,t,n),mr(e,n)}function h5(e){return(hn&Oi)!==_i}function mr(e,t){var n=e.callbackNode;aE(e,t);var i=Cu(e,e===er?bi:He);if(i===He){n!==null&&j0(n),e.callbackNode=null,e.callbackPriority=Ni;return}var a=Oa(i),x=e.callbackPriority;if(x===a&&!(as.current!==null&&n!==Tv)){n==null&&x!==zt&&y("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}n!=null&&j0(n);var k;if(a===zt)e.tag===ua?(as.isBatchingLegacy!==null&&(as.didScheduleLegacyUpdate=!0),Vk(p0.bind(null,e))):dy(p0.bind(null,e)),as.current!==null?as.current.push(da):$j(function(){(hn&(Oi|Fr))===_i&&da()}),k=null;else{var O;switch(Q_(i)){case wr:O=wu;break;case Bs:O=yf;break;case Is:O=Aa;break;case ju:O=wf;break;default:O=Aa;break}k=Lv(O,f0.bind(null,e))}e.callbackPriority=a,e.callbackNode=k}function f0(e,t){if(RR(),Fc=Hn,ih=He,(hn&(Oi|Fr))!==_i)throw new Error("Should not already be working.");var n=e.callbackNode,i=Xs();if(i&&e.callbackNode!==n)return null;var a=Cu(e,e===er?bi:He);if(a===He)return null;var x=!Eu(e,a)&&!dE(e,a)&&!t,k=x?x5(e,a):ah(e,a);if(k!==Ys){if(k===Ja){var O=zf(e);O!==He&&(a=O,k=Cv(e,O))}if(k===Ac){var F=Uc;throw Qa(e,He),xa(e,a),mr(e,xi()),F}if(k===gv)xa(e,a);else{var Y=!Eu(e,a),K=e.current.alternate;if(Y&&!m5(K)){if(k=ah(e,a),k===Ja){var fe=zf(e);fe!==He&&(a=fe,k=Cv(e,fe))}if(k===Ac){var de=Uc;throw Qa(e,He),xa(e,a),mr(e,xi()),de}}e.finishedWork=K,e.finishedLanes=a,f5(e,k,a)}}return mr(e,xi()),e.callbackNode===n?f0.bind(null,e):null}function Cv(e,t){var n=Pc;if(ku(e)){var i=Qa(e,t);i.flags|=Ms,Ak(e.containerInfo)}var a=ah(e,t);if(a!==Ja){var x=fr;fr=n,x!==null&&m0(x)}return a}function m0(e){fr===null?fr=e:fr.push.apply(fr,e)}function f5(e,t,n){switch(t){case Ys:case Ac:throw new Error("Root did not complete. This is a bug in React.");case Ja:{eo(e,fr,qs);break}case Jd:{if(xa(e,n),W_(n)&&!k0()){var i=bv+c0-xi();if(i>10){var a=Cu(e,He);if(a!==He)break;var x=e.suspendedLanes;if(!jo(x,n)){tr(),K_(e,x);break}e.timeoutHandle=xm(eo.bind(null,e,fr,qs),i);break}}eo(e,fr,qs);break}case Mc:{if(xa(e,n),uE(n))break;if(!k0()){var k=rE(e,n),O=k,F=xi()-O,Y=A5(F)-F;if(Y>10){e.timeoutHandle=xm(eo.bind(null,e,fr,qs),Y);break}}eo(e,fr,qs);break}case l0:{eo(e,fr,qs);break}default:throw new Error("Unknown root exit status.")}}function m5(e){for(var t=e;;){if(t.flags&ff){var n=t.updateQueue;if(n!==null){var i=n.stores;if(i!==null)for(var a=0;a<i.length;a++){var x=i[a],k=x.getSnapshot,O=x.value;try{if(!Sr(k(),O))return!1}catch{return!1}}}}var F=t.child;if(t.subtreeFlags&ff&&F!==null){F.return=t,t=F;continue}if(t===e)return!0;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}return!0}function xa(e,t){t=Du(t,Qd),t=Du(t,Oc),mE(e,t)}function p0(e){if(TR(),(hn&(Oi|Fr))!==_i)throw new Error("Should not already be working.");Xs();var t=Cu(e,He);if(!yr(t,zt))return mr(e,xi()),null;var n=ah(e,t);if(e.tag!==ua&&n===Ja){var i=zf(e);i!==He&&(t=i,n=Cv(e,i))}if(n===Ac){var a=Uc;throw Qa(e,He),xa(e,t),mr(e,xi()),a}if(n===gv)throw new Error("Root did not complete. This is a bug in React.");var x=e.current.alternate;return e.finishedWork=x,e.finishedLanes=t,eo(e,fr,qs),mr(e,xi()),null}function p5(e,t){t!==He&&(Yf(e,Zt(t,zt)),mr(e,xi()),(hn&(Oi|Fr))===_i&&(Bc(),da()))}function Ev(e,t){var n=hn;hn|=o0;try{return e(t)}finally{hn=n,hn===_i&&!as.isBatchingLegacy&&(Bc(),hy())}}function v5(e,t,n,i,a){var x=Kr(),k=Ui.transition;try{return Ui.transition=null,Ci(wr),e(t,n,i,a)}finally{Ci(x),Ui.transition=k,hn===_i&&Bc()}}function Ks(e){ya!==null&&ya.tag===ua&&(hn&(Oi|Fr))===_i&&Xs();var t=hn;hn|=o0;var n=Ui.transition,i=Kr();try{return Ui.transition=null,Ci(wr),e?e():void 0}finally{Ci(i),Ui.transition=n,hn=t,(hn&(Oi|Fr))===_i&&da()}}function v0(){return(hn&(Oi|Fr))!==_i}function sh(e,t){zi(_v,ws,e),ws=Zt(ws,t)}function Dv(e){ws=_v.current,Hi(_v,e)}function Qa(e,t){e.finishedWork=null,e.finishedLanes=He;var n=e.timeoutHandle;if(n!==Sm&&(e.timeoutHandle=Sm,zj(n)),Jn!==null)for(var i=Jn.return;i!==null;){var a=i.alternate;Ww(a,i),i=i.return}er=e;var x=to(e.current,null);return Jn=x,bi=ws=t,yi=Ys,Uc=null,Zd=He,Oc=He,Qd=He,Pc=null,fr=null,dR(),Zr.discardPendingWarnings(),x}function g0(e,t){do{var n=Jn;try{if(pd(),Fy(),Yn(),vv.current=null,n===null||n.return===null){yi=Ac,Uc=t,Jn=null;return}if(Se&&n.mode&En&&$d(n,!0),we)if(No(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var i=t;GC(n,i,bi)}else WC(n,t,bi);VR(e,n.return,n,t,bi),w0(n)}catch(a){t=a,Jn===n&&n!==null?(n=n.return,Jn=n):n=Jn;continue}return}while(!0)}function _0(){var e=pv.current;return pv.current=Id,e===null?Id:e}function b0(e){pv.current=e}function g5(){bv=xi()}function Hc(e){Zd=Zt(e,Zd)}function _5(){yi===Ys&&(yi=Jd)}function jv(){(yi===Ys||yi===Jd||yi===Ja)&&(yi=Mc),er!==null&&($f(Zd)||$f(Oc))&&xa(er,bi)}function b5(e){yi!==Mc&&(yi=Ja),Pc===null?Pc=[e]:Pc.push(e)}function y5(){return yi===Ys}function ah(e,t){var n=hn;hn|=Oi;var i=_0();if(er!==e||bi!==t){if(qr){var a=e.memoizedUpdaters;a.size>0&&(zc(e,bi),a.clear()),J_(e,t)}qs=Z_(),Qa(e,t)}V_(t);do try{w5();break}catch(x){g0(e,x)}while(!0);if(pd(),hn=n,b0(i),Jn!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return F_(),er=null,bi=He,yi}function w5(){for(;Jn!==null;)y0(Jn)}function x5(e,t){var n=hn;hn|=Oi;var i=_0();if(er!==e||bi!==t){if(qr){var a=e.memoizedUpdaters;a.size>0&&(zc(e,bi),a.clear()),J_(e,t)}qs=Z_(),Bc(),Qa(e,t)}V_(t);do try{S5();break}catch(x){g0(e,x)}while(!0);return pd(),b0(i),hn=n,Jn!==null?(JC(),Ys):(F_(),er=null,bi=He,yi)}function S5(){for(;Jn!==null&&!CC();)y0(Jn)}function y0(e){var t=e.alternate;Cn(e);var n;(e.mode&En)!==Mt?(Tp(e),n=kv(t,e,ws),$d(e,!0)):n=kv(t,e,ws),Yn(),e.memoizedProps=e.pendingProps,n===null?w0(e):Jn=n,vv.current=null}function w0(e){var t=e;do{var n=t.alternate,i=t.return;if((t.flags&yu)===Ot){Cn(t);var a=void 0;if((t.mode&En)===Mt?a=$w(n,t,ws):(Tp(t),a=$w(n,t,ws),$d(t,!1)),Yn(),a!==null){Jn=a;return}}else{var x=_T(n,t);if(x!==null){x.flags&=bC,Jn=x;return}if((t.mode&En)!==Mt){$d(t,!1);for(var k=t.actualDuration,O=t.child;O!==null;)k+=O.actualDuration,O=O.sibling;t.actualDuration=k}if(i!==null)i.flags|=yu,i.subtreeFlags=Ot,i.deletions=null;else{yi=gv,Jn=null;return}}var F=t.sibling;if(F!==null){Jn=F;return}t=i,Jn=t}while(t!==null);yi===Ys&&(yi=l0)}function eo(e,t,n){var i=Kr(),a=Ui.transition;try{Ui.transition=null,Ci(wr),N5(e,t,n,i)}finally{Ui.transition=a,Ci(i)}return null}function N5(e,t,n,i){do Xs();while(ya!==null);if(U5(),(hn&(Oi|Fr))!==_i)throw new Error("Should not already be working.");var a=e.finishedWork,x=e.finishedLanes;if(BC(x),a===null)return P_(),null;if(x===He&&y("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=He,a===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=Ni;var k=Zt(a.lanes,a.childLanes);pE(e,k),e===er&&(er=null,Jn=null,bi=He),((a.subtreeFlags&xo)!==Ot||(a.flags&xo)!==Ot)&&(Za||(Za=!0,xv=n,Lv(Aa,function(){return Xs(),null})));var O=(a.subtreeFlags&(_f|bf|El|xo))!==Ot,F=(a.flags&(_f|bf|El|xo))!==Ot;if(O||F){var Y=Ui.transition;Ui.transition=null;var K=Kr();Ci(wr);var fe=hn;hn|=Fr,vv.current=null,ST(e,a),hw(),PT(e,a,x),Oj(e.containerInfo),e.current=a,YC(x),BT(a,e,x),qC(),EC(),hn=fe,Ci(K),Ui.transition=Y}else e.current=a,hw();var de=Za;if(Za?(Za=!1,ya=e,Ic=x):(rl=0,nh=null),k=e.pendingLanes,k===He&&(il=null),de||C0(e.current,!1),AC(a.stateNode,i),qr&&e.memoizedUpdaters.clear(),i5(),mr(e,xi()),t!==null)for(var Ce=e.onRecoverableError,De=0;De<t.length;De++){var Ae=t[De],at=Ae.stack,Lt=Ae.digest;Ce(Ae.value,{componentStack:at,digest:Lt})}if(eh){eh=!1;var Dt=yv;throw yv=null,Dt}return yr(Ic,zt)&&e.tag!==ua&&Xs(),k=e.pendingLanes,yr(k,zt)?(kR(),e===Sv?Vc++:(Vc=0,Sv=e)):Vc=0,da(),P_(),null}function Xs(){if(ya!==null){var e=Q_(Ic),t=bE(Is,e),n=Ui.transition,i=Kr();try{return Ui.transition=null,Ci(t),E5()}finally{Ci(i),Ui.transition=n}}return!1}function C5(e){wv.push(e),Za||(Za=!0,Lv(Aa,function(){return Xs(),null}))}function E5(){if(ya===null)return!1;var e=xv;xv=null;var t=ya,n=Ic;if(ya=null,Ic=He,(hn&(Oi|Fr))!==_i)throw new Error("Cannot flush passive effects while already rendering.");Nv=!0,th=!1,KC(n);var i=hn;hn|=Fr,WT(t.current),FT(t,t.current,n,e);{var a=wv;wv=[];for(var x=0;x<a.length;x++){var k=a[x];DT(t,k)}}XC(),C0(t.current,!0),hn=i,da(),th?t===nh?rl++:(rl=0,nh=t):rl=0,Nv=!1,th=!1,MC(t);{var O=t.current.stateNode;O.effectDuration=0,O.passiveEffectDuration=0}return!0}function x0(e){return il!==null&&il.has(e)}function D5(e){il===null?il=new Set([e]):il.add(e)}function j5(e){eh||(eh=!0,yv=e)}var k5=j5;function S0(e,t,n){var i=Ka(n,t),a=yw(e,i,zt),x=fa(e,a,zt),k=tr();x!==null&&(Ml(x,zt,k),mr(x,k))}function Bn(e,t,n){if(yT(n),$c(!1),e.tag===u){S0(e,e,n);return}var i=null;for(i=t;i!==null;){if(i.tag===u){S0(i,e,n);return}else if(i.tag===g){var a=i.type,x=i.stateNode;if(typeof a.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&!x0(x)){var k=Ka(n,e),O=Kp(i,k,zt),F=fa(i,O,zt),Y=tr();F!==null&&(Ml(F,zt,Y),mr(F,Y));return}}i=i.return}y(`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 R5(e,t,n){var i=e.pingCache;i!==null&&i.delete(t);var a=tr();K_(e,n),I5(e),er===e&&jo(bi,n)&&(yi===Mc||yi===Jd&&W_(bi)&&xi()-bv<c0?Qa(e,He):Qd=Zt(Qd,n)),mr(e,a)}function N0(e,t){t===Ni&&(t=u5(e));var n=tr(),i=dr(e,t);i!==null&&(Ml(i,t,n),mr(i,n))}function T5(e){var t=e.memoizedState,n=Ni;t!==null&&(n=t.retryLane),N0(e,n)}function L5(e,t){var n=Ni,i;switch(e.tag){case T:i=e.stateNode;var a=e.memoizedState;a!==null&&(n=a.retryLane);break;case H: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),N0(e,n)}function A5(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:a5(e/1960)*1960}function M5(){if(Vc>l5)throw Vc=0,Sv=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.");rl>c5&&(rl=0,nh=null,y("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 U5(){Zr.flushLegacyContextWarning(),Zr.flushPendingUnsafeLifecycleWarnings()}function C0(e,t){Cn(e),oh(e,ta,e5),t&&oh(e,gf,t5),oh(e,ta,ZT),t&&oh(e,gf,QT),Yn()}function oh(e,t,n){for(var i=e,a=null;i!==null;){var x=i.subtreeFlags&t;i!==a&&i.child!==null&&x!==Ot?i=i.child:((i.flags&t)!==Ot&&n(i),i.sibling!==null?i=i.sibling:i=a=i.return)}}var lh=null;function E0(e){{if((hn&Oi)!==_i||!(e.mode&dn))return;var t=e.tag;if(t!==_&&t!==u&&t!==g&&t!==l&&t!==v&&t!==E&&t!==A)return;var n=Tt(e)||"ReactComponent";if(lh!==null){if(lh.has(n))return;lh.add(n)}else lh=new Set([n]);var i=Qn;try{Cn(e),y("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?Cn(e):Yn()}}}var kv;{var O5=null;kv=function(e,t,n){var i=M0(O5,t);try{return Iw(e,t,n)}catch(x){if(qk()||x!==null&&typeof x=="object"&&typeof x.then=="function")throw x;if(pd(),Fy(),Ww(e,t),M0(t,i),t.mode&En&&Tp(t),df(null,Iw,null,e,t,n),vC()){var a=hf();typeof a=="object"&&a!==null&&a._suppressLogging&&typeof x=="object"&&x!==null&&!x._suppressLogging&&(x._suppressLogging=!0)}throw x}}}var D0=!1,Rv;Rv=new Set;function P5(e){if(gr&&!ER())switch(e.tag){case l:case v:case A:{var t=Jn&&Tt(Jn)||"Unknown",n=t;if(!Rv.has(n)){Rv.add(n);var i=Tt(e)||"Unknown";y("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:{D0||(y("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),D0=!0);break}}}function zc(e,t){if(qr){var n=e.memoizedUpdaters;n.forEach(function(i){X_(e,i,t)})}}var Tv={};function Lv(e,t){{var n=as.current;return n!==null?(n.push(t),Tv):O_(e,t)}}function j0(e){if(e!==Tv)return NC(e)}function k0(){return as.current!==null}function B5(e){{if(e.mode&dn){if(!a0())return}else if(!s5()||hn!==_i||e.tag!==l&&e.tag!==v&&e.tag!==A)return;if(as.current===null){var t=Qn;try{Cn(e),y(`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?Cn(e):Yn()}}}}function I5(e){e.tag!==ua&&a0()&&as.current===null&&y(`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 $c(e){h0=e}var Hr=null,sl=null,V5=function(e){Hr=e};function al(e){{if(Hr===null)return e;var t=Hr(e);return t===void 0?e:t.current}}function Av(e){return al(e)}function Mv(e){{if(Hr===null)return e;var t=Hr(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var n=al(e.render);if(e.render!==n){var i={$$typeof:gt,render:n};return e.displayName!==void 0&&(i.displayName=e.displayName),i}}return e}return t.current}}function R0(e,t){{if(Hr===null)return!1;var n=e.elementType,i=t.type,a=!1,x=typeof i=="object"&&i!==null?i.$$typeof:null;switch(e.tag){case g:{typeof i=="function"&&(a=!0);break}case l:{(typeof i=="function"||x===wt)&&(a=!0);break}case v:{(x===gt||x===wt)&&(a=!0);break}case E:case A:{(x===Rt||x===wt)&&(a=!0);break}default:return!1}if(a){var k=Hr(n);if(k!==void 0&&k===Hr(i))return!0}return!1}}function T0(e){{if(Hr===null||typeof WeakSet!="function")return;sl===null&&(sl=new WeakSet),sl.add(e)}}var F5=function(e,t){{if(Hr===null)return;var n=t.staleFamilies,i=t.updatedFamilies;Xs(),Ks(function(){Uv(e.current,i,n)})}},H5=function(e,t){{if(e.context!==Nr)return;Xs(),Ks(function(){Wc(t,e,null,null)})}};function Uv(e,t,n){{var i=e.alternate,a=e.child,x=e.sibling,k=e.tag,O=e.type,F=null;switch(k){case l:case A:case g:F=O;break;case v:F=O.render;break}if(Hr===null)throw new Error("Expected resolveFamily to be set during hot reload.");var Y=!1,K=!1;if(F!==null){var fe=Hr(F);fe!==void 0&&(n.has(fe)?K=!0:t.has(fe)&&(k===g?K=!0:Y=!0))}if(sl!==null&&(sl.has(e)||i!==null&&sl.has(i))&&(K=!0),K&&(e._debugNeedsRemount=!0),K||Y){var de=dr(e,zt);de!==null&&wi(de,e,zt,Hn)}a!==null&&!K&&Uv(a,t,n),x!==null&&Uv(x,t,n)}}var z5=function(e,t){{var n=new Set,i=new Set(t.map(function(a){return a.current}));return Ov(e.current,i,n),n}};function Ov(e,t,n){{var i=e.child,a=e.sibling,x=e.tag,k=e.type,O=null;switch(x){case l:case A:case g:O=k;break;case v:O=k.render;break}var F=!1;O!==null&&t.has(O)&&(F=!0),F?$5(e,n):i!==null&&Ov(i,t,n),a!==null&&Ov(a,t,n)}}function $5(e,t){{var n=W5(e,t);if(n)return;for(var i=e;;){switch(i.tag){case S:t.add(i.stateNode);return;case p:t.add(i.stateNode.containerInfo);return;case u:t.add(i.stateNode.containerInfo);return}if(i.return===null)throw new Error("Expected to reach root first.");i=i.return}}}function W5(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 Pv;{Pv=!1;try{var L0=Object.preventExtensions({})}catch{Pv=!0}}function G5(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=Ot,this.subtreeFlags=Ot,this.deletions=null,this.lanes=He,this.childLanes=He,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,!Pv&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Cr=function(e,t,n,i){return new G5(e,t,n,i)};function Bv(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Y5(e){return typeof e=="function"&&!Bv(e)&&e.defaultProps===void 0}function q5(e){if(typeof e=="function")return Bv(e)?g:l;if(e!=null){var t=e.$$typeof;if(t===gt)return v;if(t===Rt)return E}return _}function to(e,t){var n=e.alternate;n===null?(n=Cr(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=Ot,n.subtreeFlags=Ot,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&Os,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 _:case l:case A:n.type=al(e.type);break;case g:n.type=Av(e.type);break;case v:n.type=Mv(e.type);break}return n}function K5(e,t){e.flags&=Os|ci;var n=e.alternate;if(n===null)e.childLanes=He,e.lanes=t,e.child=null,e.subtreeFlags=Ot,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=Ot,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 X5(e,t,n){var i;return e===sd?(i=dn,t===!0&&(i|=ti,i|=ds)):i=Mt,qr&&(i|=En),Cr(u,null,null,i)}function Iv(e,t,n,i,a,x){var k=_,O=e;if(typeof e=="function")Bv(e)?(k=g,O=Av(O)):O=al(O);else if(typeof e=="string")k=S;else e:switch(e){case Mn:return Sa(n.children,a,x,t);case hi:k=c,a|=ti,(a&dn)!==Mt&&(a|=ds);break;case le:return J5(n,a,x,t);case yt:return Z5(n,a,x,t);case pt:return Q5(n,a,x,t);case Yt:return A0(n,a,x,t);case gn:case vn:case yn:case oi:case en:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ve:k=f;break e;case We:k=m;break e;case gt:k=v,O=Mv(O);break e;case Rt:k=E;break e;case wt:k=D,O=null;break e}var F="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(F+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Y=i?Tt(i):null;Y&&(F+=`
197
+
198
+ Check the render method of \``+Y+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(e==null?e:typeof e)+"."+F))}}var K=Cr(k,n,t,a);return K.elementType=e,K.type=O,K.lanes=x,K._debugOwner=i,K}function Vv(e,t,n){var i=null;i=e._owner;var a=e.type,x=e.key,k=e.props,O=Iv(a,x,k,i,t,n);return O._debugSource=e._source,O._debugOwner=e._owner,O}function Sa(e,t,n,i){var a=Cr(b,e,i,t);return a.lanes=n,a}function J5(e,t,n,i){typeof e.id!="string"&&y('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var a=Cr(N,e,i,t|En);return a.elementType=le,a.lanes=n,a.stateNode={effectDuration:0,passiveEffectDuration:0},a}function Z5(e,t,n,i){var a=Cr(T,e,i,t);return a.elementType=yt,a.lanes=n,a}function Q5(e,t,n,i){var a=Cr(H,e,i,t);return a.elementType=pt,a.lanes=n,a}function A0(e,t,n,i){var a=Cr(I,e,i,t);a.elementType=Yt,a.lanes=n;var x={isHidden:!1};return a.stateNode=x,a}function Fv(e,t,n){var i=Cr(C,e,null,t);return i.lanes=n,i}function eL(){var e=Cr(S,null,null,Mt);return e.elementType="DELETED",e}function tL(e){var t=Cr(M,null,null,Mt);return t.stateNode=e,t}function Hv(e,t,n){var i=e.children!==null?e.children:[],a=Cr(p,i,e.key,t);return a.lanes=n,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}function M0(e,t){return e===null&&(e=Cr(_,null,null,Mt)),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 nL(e,t,n,i,a){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Sm,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=Ni,this.eventTimes=Gf(He),this.expirationTimes=Gf(Hn),this.pendingLanes=He,this.suspendedLanes=He,this.pingedLanes=He,this.expiredLanes=He,this.mutableReadLanes=He,this.finishedLanes=He,this.entangledLanes=He,this.entanglements=Gf(He),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var x=this.pendingUpdatersLaneMap=[],k=0;k<Sf;k++)x.push(new Set)}switch(t){case sd:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case ua:this._debugRootType=n?"hydrate()":"render()";break}}function U0(e,t,n,i,a,x,k,O,F,Y){var K=new nL(e,t,n,O,F),fe=X5(t,x);K.current=fe,fe.stateNode=K;{var de={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};fe.memoizedState=de}return tp(fe),K}var zv="18.3.1";function iL(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Ze(i),{$$typeof:an,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var $v,Wv;$v=!1,Wv={};function O0(e){if(!e)return Nr;var t=bo(e),n=Ik(t);if(t.tag===g){var i=t.type;if(ms(i))return cy(t,i,n)}return n}function rL(e,t){{var n=bo(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 a=A_(n);if(a===null)return null;if(a.mode&ti){var x=Tt(n)||"Component";if(!Wv[x]){Wv[x]=!0;var k=Qn;try{Cn(a),n.mode&ti?y("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,x):y("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,x)}finally{k?Cn(k):Yn()}}}return a.stateNode}}function P0(e,t,n,i,a,x,k,O){var F=!1,Y=null;return U0(e,t,F,Y,n,i,a,x,k)}function B0(e,t,n,i,a,x,k,O,F,Y){var K=!0,fe=U0(n,i,K,e,a,x,k,O,F);fe.context=O0(null);var de=fe.current,Ce=tr(),De=wa(de),Ae=Ws(Ce,De);return Ae.callback=t??null,fa(de,Ae,De),d5(fe,De,Ce),fe}function Wc(e,t,n,i){LC(t,e);var a=t.current,x=tr(),k=wa(a);ZC(k);var O=O0(n);t.context===null?t.context=O:t.pendingContext=O,gr&&Qn!==null&&!$v&&($v=!0,y(`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(Qn)||"Unknown"));var F=Ws(x,k);F.payload={element:e},i=i===void 0?null:i,i!==null&&(typeof i!="function"&&y("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i),F.callback=i);var Y=fa(a,F,k);return Y!==null&&(wi(Y,a,k,x),yd(Y,a,k)),k}function ch(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 sL(e){switch(e.tag){case u:{var t=e.stateNode;if(ku(t)){var n=oE(t);p5(t,n)}break}case T:{Ks(function(){var a=dr(e,zt);if(a!==null){var x=tr();wi(a,e,zt,x)}});var i=zt;Gv(e,i);break}}}function I0(e,t){var n=e.memoizedState;n!==null&&n.dehydrated!==null&&(n.retryLane=fE(n.retryLane,t))}function Gv(e,t){I0(e,t);var n=e.alternate;n&&I0(n,t)}function aL(e){if(e.tag===T){var t=Rl,n=dr(e,t);if(n!==null){var i=tr();wi(n,e,t,i)}Gv(e,t)}}function oL(e){if(e.tag===T){var t=wa(e),n=dr(e,t);if(n!==null){var i=tr();wi(n,e,t,i)}Gv(e,t)}}function V0(e){var t=SC(e);return t===null?null:t.stateNode}var F0=function(e){return null};function lL(e){return F0(e)}var H0=function(e){return!1};function cL(e){return H0(e)}var z0=null,$0=null,W0=null,G0=null,Y0=null,q0=null,K0=null,X0=null,J0=null;{var Z0=function(e,t,n){var i=t[n],a=jt(e)?e.slice():Bt({},e);return n+1===t.length?(jt(a)?a.splice(i,1):delete a[i],a):(a[i]=Z0(e[i],t,n+1),a)},Q0=function(e,t){return Z0(e,t,0)},ex=function(e,t,n,i){var a=t[i],x=jt(e)?e.slice():Bt({},e);if(i+1===t.length){var k=n[i];x[k]=x[a],jt(x)?x.splice(a,1):delete x[a]}else x[a]=ex(e[a],t,n,i+1);return x},tx=function(e,t,n){if(t.length!==n.length){L("copyWithRename() expects paths of the same length");return}else for(var i=0;i<n.length-1;i++)if(t[i]!==n[i]){L("copyWithRename() expects paths to be the same except for the deepest key");return}return ex(e,t,n,0)},nx=function(e,t,n,i){if(n>=t.length)return i;var a=t[n],x=jt(e)?e.slice():Bt({},e);return x[a]=nx(e[a],t,n+1,i),x},ix=function(e,t,n){return nx(e,t,0,n)},Yv=function(e,t){for(var n=e.memoizedState;n!==null&&t>0;)n=n.next,t--;return n};z0=function(e,t,n,i){var a=Yv(e,t);if(a!==null){var x=ix(a.memoizedState,n,i);a.memoizedState=x,a.baseState=x,e.memoizedProps=Bt({},e.memoizedProps);var k=dr(e,zt);k!==null&&wi(k,e,zt,Hn)}},$0=function(e,t,n){var i=Yv(e,t);if(i!==null){var a=Q0(i.memoizedState,n);i.memoizedState=a,i.baseState=a,e.memoizedProps=Bt({},e.memoizedProps);var x=dr(e,zt);x!==null&&wi(x,e,zt,Hn)}},W0=function(e,t,n,i){var a=Yv(e,t);if(a!==null){var x=tx(a.memoizedState,n,i);a.memoizedState=x,a.baseState=x,e.memoizedProps=Bt({},e.memoizedProps);var k=dr(e,zt);k!==null&&wi(k,e,zt,Hn)}},G0=function(e,t,n){e.pendingProps=ix(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=dr(e,zt);i!==null&&wi(i,e,zt,Hn)},Y0=function(e,t){e.pendingProps=Q0(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=dr(e,zt);n!==null&&wi(n,e,zt,Hn)},q0=function(e,t,n){e.pendingProps=tx(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=dr(e,zt);i!==null&&wi(i,e,zt,Hn)},K0=function(e){var t=dr(e,zt);t!==null&&wi(t,e,zt,Hn)},X0=function(e){F0=e},J0=function(e){H0=e}}function uL(e){var t=A_(e);return t===null?null:t.stateNode}function dL(e){return null}function hL(){return Qn}function fL(e){var t=e.findFiberByHostInstance,n=d.ReactCurrentDispatcher;return TC({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:z0,overrideHookStateDeletePath:$0,overrideHookStateRenamePath:W0,overrideProps:G0,overridePropsDeletePath:Y0,overridePropsRenamePath:q0,setErrorHandler:X0,setSuspenseHandler:J0,scheduleUpdate:K0,currentDispatcherRef:n,findHostInstanceByFiber:uL,findFiberByHostInstance:t||dL,findHostInstancesForRefresh:z5,scheduleRefresh:F5,scheduleRoot:H5,setRefreshHandler:V5,getCurrentFiber:hL,reconcilerVersion:zv})}var rx=typeof reportError=="function"?reportError:function(e){console.error(e)};function qv(e){this._internalRoot=e}uh.prototype.render=qv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?y("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):dh(arguments[1])?y("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"&&y("You passed a second argument to root.render(...) but it only accepts one argument.");var n=t.containerInfo;if(n.nodeType!==li){var i=V0(t.current);i&&i.parentNode!==n&&y("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.")}}Wc(e,t,null,null)},uh.prototype.unmount=qv.prototype.unmount=function(){typeof arguments[0]=="function"&&y("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;v0()&&y("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."),Ks(function(){Wc(null,e,null,null)}),ry(t)}};function mL(e,t){if(!dh(e))throw new Error("createRoot(...): Target container is not a DOM element.");sx(e);var n=!1,i=!1,a="",x=rx;t!=null&&(t.hydrate?L("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===rn&&y(`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&&(a=t.identifierPrefix),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var k=P0(e,sd,null,n,i,a,x);Zu(k.current,e);var O=e.nodeType===li?e.parentNode:e;return Jl(O),new qv(k)}function uh(e){this._internalRoot=e}function pL(e){e&&RE(e)}uh.prototype.unstable_scheduleHydration=pL;function vL(e,t,n){if(!dh(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");sx(e),t===void 0&&y("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=n??null,a=n!=null&&n.hydratedSources||null,x=!1,k=!1,O="",F=rx;n!=null&&(n.unstable_strictMode===!0&&(x=!0),n.identifierPrefix!==void 0&&(O=n.identifierPrefix),n.onRecoverableError!==void 0&&(F=n.onRecoverableError));var Y=B0(t,null,e,sd,i,x,k,O,F);if(Zu(Y.current,e),Jl(e),a)for(var K=0;K<a.length;K++){var fe=a[K];yR(Y,fe)}return new uh(Y)}function dh(e){return!!(e&&(e.nodeType===cr||e.nodeType===As||e.nodeType===Qh))}function Gc(e){return!!(e&&(e.nodeType===cr||e.nodeType===As||e.nodeType===Qh||e.nodeType===li&&e.nodeValue===" react-mount-point-unstable "))}function sx(e){e.nodeType===cr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&y("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."),lc(e)&&(e._reactRootContainer?y("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):y("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,ax;ax=function(e){if(e._reactRootContainer&&e.nodeType!==li){var t=V0(e._reactRootContainer.current);t&&t.parentNode!==e&&y("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=Kv(e),a=!!(i&&la(i));a&&!n&&y("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===cr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&y("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 Kv(e){return e?e.nodeType===As?e.documentElement:e.firstChild:null}function ox(){}function _L(e,t,n,i,a){if(a){if(typeof i=="function"){var x=i;i=function(){var de=ch(k);x.call(de)}}var k=B0(t,i,e,ua,null,!1,!1,"",ox);e._reactRootContainer=k,Zu(k.current,e);var O=e.nodeType===li?e.parentNode:e;return Jl(O),Ks(),k}else{for(var F;F=e.lastChild;)e.removeChild(F);if(typeof i=="function"){var Y=i;i=function(){var de=ch(K);Y.call(de)}}var K=P0(e,ua,null,!1,!1,"",ox);e._reactRootContainer=K,Zu(K.current,e);var fe=e.nodeType===li?e.parentNode:e;return Jl(fe),Ks(function(){Wc(t,K,n,i)}),K}}function bL(e,t){e!==null&&typeof e!="function"&&y("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function hh(e,t,n,i,a){ax(n),bL(a===void 0?null:a,"render");var x=n._reactRootContainer,k;if(!x)k=_L(n,t,e,a,i);else{if(k=x,typeof a=="function"){var O=a;a=function(){var F=ch(k);O.call(F)}}Wc(t,k,e,a)}return ch(k)}var lx=!1;function yL(e){{lx||(lx=!0,y("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||y("%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.",un(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===cr?e:rL(e,"findDOMNode")}function wL(e,t,n){if(y("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"),!Gc(t))throw new Error("Target container is not a DOM element.");{var i=lc(t)&&t._reactRootContainer===void 0;i&&y("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 hh(null,e,t,!0,n)}function xL(e,t,n){if(y("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"),!Gc(t))throw new Error("Target container is not a DOM element.");{var i=lc(t)&&t._reactRootContainer===void 0;i&&y("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 hh(null,e,t,!1,n)}function SL(e,t,n,i){if(y("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"),!Gc(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 hh(e,t,n,!1,i)}var cx=!1;function NL(e){if(cx||(cx=!0,y("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")),!Gc(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=lc(e)&&e._reactRootContainer===void 0;t&&y("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=Kv(e),i=n&&!la(n);i&&y("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Ks(function(){hh(null,null,e,!1,function(){e._reactRootContainer=null,ry(e)})}),!0}else{{var a=Kv(e),x=!!(a&&la(a)),k=e.nodeType===cr&&Gc(e.parentNode)&&!!e.parentNode._reactRootContainer;x&&y("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",k?"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}}yE(sL),xE(aL),SE(oL),NE(Kr),CE(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")&&y("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"),aC(Ej),cC(Ev,v5,Ks);function CL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!dh(t))throw new Error("Target container is not a DOM element.");return iL(e,t,null,n)}function EL(e,t,n,i){return SL(e,t,n,i)}var Xv={usingClientEntryPoint:!1,Events:[la,Po,Qu,y_,w_,Ev]};function DL(e,t){return Xv.usingClientEntryPoint||y('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),mL(e,t)}function jL(e,t,n){return Xv.usingClientEntryPoint||y('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),vL(e,t,n)}function kL(e){return v0()&&y("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."),Ks(e)}var RL=fL({findFiberByHostInstance:Va,bundleType:1,version:zv,rendererPackageName:"react-dom"});if(!RL&&Ie&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var ux=window.location.protocol;/^(https?|file):$/.test(ux)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(ux==="file:"?`
204
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Dr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xv,Dr.createPortal=CL,Dr.createRoot=DL,Dr.findDOMNode=yL,Dr.flushSync=kL,Dr.hydrate=wL,Dr.hydrateRoot=jL,Dr.render=xL,Dr.unmountComponentAtNode=NL,Dr.unstable_batchedUpdates=Ev,Dr.unstable_renderSubtreeIntoContainer=EL,Dr.version=zv,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();WS.exports=Dr;var uu=WS.exports,qS,fx=uu;{var mx=fx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;qS=function(o,s){mx.usingClientEntryPoint=!0;try{return fx.createRoot(o,s)}finally{mx.usingClientEntryPoint=!1}}}const KS={"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","changelog.title":"What's new","preview.dynamic":"Dynamic preview","preview.static":"Static preview","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.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.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.)."},BL={"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":"打开文件","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":"历史","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.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.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 等)。"},IL={"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.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 等)。"},VL={"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} 分"},FL={"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}분"},Bg={zh:BL,"zh-TW":IL,en:KS,ja:VL,ko:FL},px=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],XS="tw_lang";function HL(o,s,d=Bg){if(o&&d[o])return o;for(const w of s&&s.length?s:["en"]){const j=String(w).toLowerCase();if(d[j])return j;const L=j.split("-")[0];if(d[L])return L}return"en"}function zL(o,s,d,w){let j=o&&o[d]!=null?o[d]:s&&s[d]!=null?s[d]:d;return w&&(j=j.replace(/\{(\w+)\}/g,(L,y)=>w[y]!=null?w[y]:`{${y}}`)),j}const $L=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,WL=()=>{try{return localStorage.getItem(XS)}catch{return null}};let kh=HL(WL(),$L());function B(o,s){return zL(Bg[kh],KS,o,s)}function pl(){return kh}function GL(o){if(!(!Bg[o]||o===kh)){try{localStorage.setItem(XS,o)}catch{}kh=o,typeof location<"u"&&location.reload()}}const Ig="tw_token",Vg="tw_font",Hh="tw_bound",JS="tw_last_session",ZS="tw_win",QS="tw_pane",Fg="tw_favs",YL="tw_recent",qL=30,hg="tw_inbox_seen",e1="tw_inbox_read_ts",t1="tw_browse_dir",n1="tw_preview_dir",i1="tw_startup_cmd",fg="tw_chat_draft",KL="tw_ideas",r1="tw_changelog_seen",s1="tw_version_seen",Hg="tw_git_repos",uo=()=>localStorage.getItem(Ig),XL=o=>localStorage.setItem(Ig,o),JL=()=>localStorage.removeItem(Ig);function so(){try{return JSON.parse(localStorage.getItem(Hh))||[]}catch{return[]}}function vx(o){const s=so();return s.includes(o)||s.push(o),localStorage.setItem(Hh,JSON.stringify(s)),s}function gx(o){const s=so().filter(d=>d!==o);return localStorage.setItem(Hh,JSON.stringify(s)),s}function ZL(o,s){const d=so().map(w=>w===o?s:w);return localStorage.setItem(Hh,JSON.stringify(d)),zg.renameSession(o,s),zh.renameSession(o,s),d}function kr(o){try{const s=JSON.parse(localStorage.getItem(o));return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}catch{return{}}}function Ca(o,s,d){const w=kr(o);w[s]=d,localStorage.setItem(o,JSON.stringify(w))}function a1(o){const s=d=>d&&typeof d=="object"&&!Array.isArray(d)?d:{};return{get(d,w){return!d||!w?[]:s(kr(o)[d])[w]??[]},set(d,w,j){const L=kr(o),y=s(L[d]);return j&&j.length?y[w]=j:delete y[w],Object.keys(y).length?L[d]=y:delete L[d],localStorage.setItem(o,JSON.stringify(L)),j??[]},renameWindow(d,w,j){if(!d||!w||!j||w===j)return;const L=kr(o),y=s(L[d]);y[w]!=null&&(y[j]=y[w],delete y[w],L[d]=y,localStorage.setItem(o,JSON.stringify(L)))},renameSession(d,w){const j=kr(o);j[d]!=null&&(j[w]=j[d],delete j[d],localStorage.setItem(o,JSON.stringify(j)))}}}const zg=a1(YL),zh=a1(KL),_x=()=>kr(hg);function bx(o,s){return Ca(hg,o,s),kr(hg)}const QL=()=>{const o=localStorage.getItem(e1);return o==null?null:Number(o)},yx=o=>localStorage.setItem(e1,String(o)),eA=o=>o?kr(t1)[o]??null:null,wx=(o,s)=>{o&&s&&Ca(t1,o,s)},tA=o=>o?kr(n1)[o]??null:null,nA=(o,s)=>{o&&s&&Ca(n1,o,s)},iA=()=>localStorage.getItem(JS),rA=o=>kr(ZS)[o]??null,mh=o=>kr(QS)[o]??null;function ll({sessionId:o,windowId:s,paneId:d}={}){o&&localStorage.setItem(JS,o),o&&s&&Ca(ZS,o,s),s&&d&&Ca(QS,s,d)}function sA(){const o=Number(localStorage.getItem(Vg));return Number.isFinite(o)&&o>0?o:null}const qc=o=>localStorage.setItem(Vg,String(o)),aA=()=>localStorage.removeItem(Vg),oA=()=>localStorage.getItem(fg)||"",lA=o=>{o?localStorage.setItem(fg,o):localStorage.removeItem(fg)};function Rh(){try{return JSON.parse(localStorage.getItem(Fg))||[]}catch{return[]}}function cA(o){const s=o.trim(),d=Rh();return s&&!d.includes(s)&&d.push(s),localStorage.setItem(Fg,JSON.stringify(d)),d}function uA(o){const s=Rh().filter(d=>d!==o);return localStorage.setItem(Fg,JSON.stringify(s)),s}const o1=()=>localStorage.getItem(i1)||"",l1=o=>localStorage.setItem(i1,o||""),c1="tw_orphan_kill",dA=()=>localStorage.getItem(c1)!=="0",hA=o=>localStorage.setItem(c1,o?"1":"0"),u1="tw_doc_highlight",d1=()=>localStorage.getItem(u1)==="1",fA=o=>localStorage.setItem(u1,o?"1":"0"),Th=(o,s)=>zg.get(o,s),h1=(o,s,d)=>zg.set(o,s,d);function mA(o,s,d){const w=(d||"").trim(),j=Th(o,s);return!w||!o||!s?j:h1(o,s,[w,...j.filter(L=>L!==w)].slice(0,qL))}function pA(o,s,d){return!o||!s?Th(o,s):h1(o,s,Th(o,s).filter(w=>w!==d))}const $g="tw_recent_docs",f1="tw_pane_base",vA=30;function eu(){try{return JSON.parse(localStorage.getItem($g))||[]}catch{return[]}}function xx({path:o,name:s,type:d,ts:w=Date.now()}){const j=[{path:o,name:s,type:d,ts:w},...eu().filter(L=>L.path!==o)].slice(0,vA);return localStorage.setItem($g,JSON.stringify(j)),j}function gA(o){const s=eu().filter(d=>d.path!==o);return localStorage.setItem($g,JSON.stringify(s)),s}const Sx=o=>kr(f1)[o]??null,_A=(o,s)=>Ca(f1,o,s),Qs=[10,11,12,13,14,16,18,20,22],bA=4,m1="tw_doc_font";function yA(){const o=localStorage.getItem(m1),s=Number(o);return o!==null&&Number.isInteger(s)&&s>=0&&s<Qs.length?s:bA}const wA=o=>localStorage.setItem(m1,String(Math.min(Qs.length-1,Math.max(0,o)))),xA=2,p1="tw_diff_font";function SA(){const o=localStorage.getItem(p1),s=Number(o);return o!==null&&Number.isInteger(s)&&s>=0&&s<Qs.length?s:xA}const NA=o=>localStorage.setItem(p1,String(Math.min(Qs.length-1,Math.max(0,o)))),v1=(o,s)=>zh.get(o,s);function Nx(o,s,d){return!o||!s?[]:zh.set(o,s,d)}const CA=()=>localStorage.getItem(r1),EA=o=>{o&&localStorage.setItem(r1,o)},DA=()=>localStorage.getItem(s1),jA=o=>{o&&localStorage.setItem(s1,o)};function kA(o,s,d){zh.renameWindow(o,s,d)}function Wg(o){if(!o)return[];const s=kr(Hg)[o];return Array.isArray(s)?s:[]}function Cx(o,s){if(!o)return[];const d=[...Wg(o)];for(const w of s)w&&!d.includes(w)&&d.push(w);return Ca(Hg,o,d),d}function RA(o,s){if(!o)return[];const d=Wg(o).filter(w=>w!==s);return Ca(Hg,o,d),d}const mg=[{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)."]}}],TA=o=>o.version||o.date,ph=mg[0]?TA(mg[0]):null,LA={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 $h(o){const s=(o||"").lastIndexOf(".");return s<0?"":LA[o.slice(s+1).toLowerCase()]||""}function AA(o){return $h(o).startsWith("image/")}class Rr extends Error{}class MA extends Error{constructor(s,d,w){super(s),this.status=d,this.serverError=w??null}}async function sn(o,s={}){const d=uo(),{timeoutMs:w,...j}=s,L={Authorization:`Bearer ${d??""}`,...j.headers||{}};j.body&&(L["Content-Type"]="application/json");let y=null,r=null;w&&(y=new AbortController,r=setTimeout(()=>y.abort(),w));try{const l=await fetch(o,{cache:"no-store",...j,headers:L,signal:y==null?void 0:y.signal});if(l.status===401)throw new Rr;if(!l.ok){let g=null;try{const _=await l.json();_!=null&&_.error&&(g=_.error)}catch{}throw new MA(g||`${o} -> ${l.status}`,l.status,g)}return l.status===204?{unchanged:!0}:await l.json()}catch(l){throw y!=null&&y.signal.aborted?new Error(`${o} -> timeout`):l}finally{r&&clearTimeout(r)}}const vl=()=>sn("/api/sessions"),UA=()=>sn("/api/usage"),Kc=o=>sn(`/api/windows?session=${encodeURIComponent(o)}`),Na=o=>sn(`/api/panes?window=${encodeURIComponent(o)}`),OA=(o,s=1500,d)=>sn(`/api/history?pane=${encodeURIComponent(o)}&lines=${s}${d?`&since=${d}`:""}`,{timeoutMs:8e3}),Nh=(o,s,d=!0)=>sn("/api/send",{method:"POST",body:JSON.stringify({pane:o,text:s,enter:d})}),pg=(o,s)=>sn("/api/keys",{method:"POST",body:JSON.stringify({pane:o,keys:s})}),PA=(o,s,d=1)=>sn("/api/scroll",{method:"POST",body:JSON.stringify({pane:o,dir:s,lines:d})}),BA=(o,s,d)=>sn("/api/resize",{method:"POST",body:JSON.stringify({window:o,cols:s,rows:d})}),IA=(o,s)=>sn("/api/resize",{method:"POST",body:JSON.stringify({pane:o,cols:s})}),VA=o=>sn(`/api/layout?window=${encodeURIComponent(o)}`),FA=(o,s)=>sn("/api/resize",{method:"POST",body:JSON.stringify({window:o,auto:!0,layout:s})}),HA=(o,s,d)=>sn("/api/sessions",{method:"POST",body:JSON.stringify({name:o,cwd:s,cmd:d})}),zA=(o,s,d,w,j)=>sn("/api/windows",{method:"POST",body:JSON.stringify({session:o,pane:s,name:d,cwd:w,cmd:j})}),$A=(o,s)=>sn("/api/sessions",{method:"PATCH",body:JSON.stringify({id:o,name:s})}),WA=(o,s)=>sn("/api/windows",{method:"PATCH",body:JSON.stringify({id:o,name:s})}),GA=o=>sn(`/api/windows?window=${encodeURIComponent(o)}`,{method:"DELETE"}),YA=(o,s)=>sn("/api/windows/swap",{method:"POST",body:JSON.stringify({a:o,b:s})}),Ex=(o,s)=>sn("/api/panes/split",{method:"POST",body:JSON.stringify({pane:o,dir:s})}),qA=o=>sn(`/api/panes?pane=${encodeURIComponent(o)}`,{method:"DELETE"}),KA=(o,s)=>sn("/api/dir",{method:"POST",body:JSON.stringify({dir:o,name:s})}),Dx=(o,s=null)=>sn(`/api/file?path=${encodeURIComponent(o)}${s!=null?`&mtime=${encodeURIComponent(s)}`:""}`,{timeoutMs:8e3}),g1=o=>sn(`/api/dir${o?`?path=${encodeURIComponent(o)}`:""}`,{timeoutMs:8e3}),ao=o=>sn(`/api/pane-cwd?pane=${encodeURIComponent(o)}`,{timeoutMs:8e3}),XA=()=>sn("/api/asr/sign",{timeoutMs:8e3}),_1=()=>sn("/api/config",{timeoutMs:8e3}),JA=()=>sn("/api/version",{timeoutMs:8e3}),ZA=()=>sn("/api/hooks/install",{method:"POST",timeoutMs:15e3}),QA=(o=[])=>sn(`/api/states?sessions=${encodeURIComponent(o.join(","))}`,{timeoutMs:4e3}),jx=()=>sn("/api/orphans",{timeoutMs:8e3}),eM=o=>sn("/api/orphans/takeover",{method:"POST",body:JSON.stringify(o),timeoutMs:15e3}),kx=o=>sn(`/api/git/repos?dir=${encodeURIComponent(o)}`,{timeoutMs:8e3}),tM=o=>sn(`/api/git/status?repo=${encodeURIComponent(o)}`,{timeoutMs:8e3}),nM=(o,{limit:s=50,ref:d}={})=>{let w=`/api/git/log?repo=${encodeURIComponent(o)}&limit=${s}`;return d&&(w+=`&ref=${encodeURIComponent(d)}`),sn(w,{timeoutMs:8e3})},iM=o=>sn(`/api/git/branches?repo=${encodeURIComponent(o)}`,{timeoutMs:8e3}),rM=(o,{path:s,commit:d,staged:w}={})=>{let j=`/api/git/diff?repo=${encodeURIComponent(o)}&path=${encodeURIComponent(s??"")}`;return d&&(j+=`&commit=${encodeURIComponent(d)}`),w&&(j+="&staged=1"),sn(j,{timeoutMs:8e3})},sM=(o,s)=>sn(`/api/git/commit?repo=${encodeURIComponent(o)}&hash=${encodeURIComponent(s)}`,{timeoutMs:8e3});function aM(o,s){return new Promise((d,w)=>{const j=uo(),L=new XMLHttpRequest;L.open("GET",`/api/download?path=${encodeURIComponent(o)}`),L.setRequestHeader("Authorization",`Bearer ${j??""}`),L.responseType="blob",L.onprogress=y=>{s&&y.lengthComputable&&s(y.loaded/y.total)},L.onerror=()=>w(new Error("download failed")),L.onload=()=>{if(L.status===401)return w(new Rr);if(L.status<200||L.status>=300)return w(new Error(`download -> ${L.status}`));const y=o.split("/").pop()||"download";let r=L.response;const l=$h(y);l&&r&&r.type!==l&&(r=r.slice(0,r.size,l));const g=URL.createObjectURL(r),_=document.createElement("a");_.href=g,_.download=y,document.body.appendChild(_),_.click(),_.remove(),setTimeout(()=>URL.revokeObjectURL(g),1e3),d()},L.send()})}function Rx(o,s=null){return new Promise((d,w)=>{const j=uo(),L=new XMLHttpRequest,y=s!=null?`&mtime=${encodeURIComponent(s)}`:"";L.open("GET",`/api/download?path=${encodeURIComponent(o)}${y}`),L.setRequestHeader("Authorization",`Bearer ${j??""}`),L.responseType="blob",L.onerror=()=>w(new Error(B("api.loadFailed"))),L.onload=()=>{if(L.status===304)return d({notModified:!0});if(L.status===401)return w(new Rr);if(L.status<200||L.status>=300)return w(new Error(`image -> ${L.status}`));let r=L.response;const l=$h(o.split("/").pop()||"");l&&r&&r.type!==l&&(r=r.slice(0,r.size,l));const g=Number(L.getResponseHeader("X-Mtime"));d({url:URL.createObjectURL(r),mtimeMs:Number.isFinite(g)?g:null})},L.send()})}const Tx=(o,s)=>{const d=encodeURIComponent(uo()??"");return(o==null?void 0:o.kind)==="dynamic"?`https://${encodeURIComponent(o.name)}.${s}/?token=${d}`:`/preview/${encodeURIComponent(o==null?void 0:o.name)}/?token=${d}`},Jv=(o,s={})=>sn("/api/previews",{method:"POST",body:JSON.stringify(s.port!=null?{name:o,port:s.port}:{name:o,dir:s.dir})}),oM=()=>sn("/api/previews"),lM=o=>sn(`/api/previews/${encodeURIComponent(o)}`,{method:"DELETE"});class Lh extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function b1(o,s,d,w=!1,{signal:j}={}){return new Promise((L,y)=>{if(j!=null&&j.aborted)return y(new Lh);const r=uo(),l=new FormData;l.append("dir",o),w&&l.append("stash","1"),l.append("file",s,s.name);const g=new XMLHttpRequest;g.open("POST","/api/upload"),g.setRequestHeader("Authorization",`Bearer ${r??""}`),g.upload.onprogress=p=>{d&&p.lengthComputable&&d(p.loaded/p.total,"sending")},g.upload.onload=()=>{d==null||d(1,"processing")};const _=()=>g.abort();j&&j.addEventListener("abort",_,{once:!0});const u=()=>{j&&j.removeEventListener("abort",_)};g.onabort=()=>{u(),y(new Lh)},g.onerror=()=>{u(),y(new Error(B("api.uploadFailed")))},g.onload=()=>{if(u(),g.status===401)return y(new Rr);if(g.status>=200&&g.status<300)try{return L(JSON.parse(g.responseText))}catch{return L({})}const p={400:B("api.uploadBadDir"),409:B("api.uploadDuplicate"),413:B("api.uploadTooLarge"),415:B("api.uploadBadType")}[g.status]||B("api.uploadFailed");y(new Error(p))},g.send(l)})}async function Lx({paneId:o,dir:s,windowId:d,api:w,getPanes:j}){const{id:L}=await w.splitPane(o,s);return{panes:await j(d),selectPaneId:L}}async function cM({paneId:o,windowId:s,viewedPaneId:d,api:w,getPanes:j,pickId:L}){await w.closePane(o);const y=await j(s),r=o===d&&y.length?L(y,null):null;return{panes:y,selectPaneId:r}}const uM=`<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
+ `,dM=`<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
+ `,kn={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function su(){return h.jsxDEV("svg",{...kn,children:h.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 hM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 vg(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 fM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 mM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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 y1(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 pM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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),h.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),h.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 Ea(){return h.jsxDEV("svg",{...kn,children:h.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 w1(){return h.jsxDEV("svg",{...kn,children:h.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 x1(){return h.jsxDEV("svg",{...kn,children:h.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 S1(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 vM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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 gM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 _M(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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 N1(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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),h.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 C1(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 bM(){return h.jsxDEV("svg",{...kn,children:h.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 yM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 wM(){return h.jsxDEV("svg",{...kn,children:h.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 xM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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 gg(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 SM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 NM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 CM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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),h.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 E1(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),h.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),h.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 ro(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 EM({down:o=!1}){return h.jsxDEV("svg",{...kn,children:[h.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),h.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),o?h.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):h.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 Ax(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 Mx(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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 DM(){return h.jsxDEV("svg",{...kn,children:[h.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),h.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)}const Ux={claude:uM,codex:dM};function oo({agent:o}){const s=Ux[o]?o:"claude";return h.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":s,dangerouslySetInnerHTML:{__html:Ux[s]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:373,columnNumber:10},this)}const D1=o=>{if(o<=0)return B("time.expired");const s=Math.max(1,Math.round(o/6e4));return B("time.minutes",{n:s})};function j1(o,s=!0){const[d,w]=V.useState(()=>Date.now());return V.useEffect(()=>{if(!s||o==null)return;w(Date.now());const j=setInterval(()=>w(Date.now()),1e3);return()=>clearInterval(j)},[s,o]),o!=null?Math.max(0,o-d):0}const Zv=1280,Ox=6;function jM({open:o,name:s,kind:d="static",domain:w=null,port:j,dir:L,expiresAt:y,onRenew:r,onStop:l,onMinimize:g}){const[_,u]=V.useState(!1),[p,S]=V.useState("mobile"),[C,b]=V.useState(1),[c,m]=V.useState({w:0,h:0}),f=V.useRef(null),v=V.useRef(null);V.useEffect(()=>{o||u(!1)},[o]),V.useEffect(()=>{p==="mobile"&&b(1)},[p]),V.useEffect(()=>{const G=v.current;if(!o||!G)return;const ne=()=>m({w:G.clientWidth,h:G.clientHeight});if(ne(),typeof ResizeObserver>"u")return;const Q=new ResizeObserver(ne);return Q.observe(G),()=>Q.disconnect()},[o]);const N=j1(y,o),T=d==="dynamic"?j!=null?`:${j}`:"":L||"",E=p==="pc"&&c.w>0,A=c.w>0?c.w/Zv:1,D=c.h>0?c.h/A:0,R=A*C,M=E?{width:`${Zv*R}px`,height:`${D*R}px`}:void 0,H=E?{width:`${Zv}px`,height:`${D}px`,transform:`scale(${R})`,transformOrigin:"0 0"}:void 0,U=G=>b(ne=>Math.min(Ox,Math.max(1,+(ne+G).toFixed(2)))),I=()=>{const G=f.current;if(G)try{G.contentWindow.location.reload()}catch{G.src=G.src}};return uu.createPortal(h.jsxDEV("div",{className:`file-sheet ${o?"open":""}`,"aria-hidden":!o,children:[h.jsxDEV("div",{className:"file-tabs preview-head",children:[h.jsxDEV("span",{className:"preview-status",children:[h.jsxDEV(gg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:70,columnNumber:11},this),h.jsxDEV("span",{className:"preview-state",children:B(d==="dynamic"?"preview.dynamic":"preview.static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:71,columnNumber:11},this),s&&h.jsxDEV("span",{className:"preview-name",title:`${s}${T?" "+T:""}`,children:[s,T&&h.jsxDEV("span",{className:"preview-detail",children:T},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:74,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:73,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:69,columnNumber:9},this),h.jsxDEV("button",{className:"preview-remain",title:B("preview.remainTitle"),"aria-haspopup":"dialog","aria-expanded":_,onClick:()=>u(G=>!G),children:D1(N)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:78,columnNumber:9},this),h.jsxDEV("button",{className:"preview-iconbtn",onClick:()=>S(G=>G==="mobile"?"pc":"mobile"),"aria-label":B(p==="mobile"?"preview.toPcView":"preview.toMobileView"),title:B(p==="mobile"?"preview.pcView":"preview.mobileView"),"aria-pressed":p==="pc",children:p==="mobile"?h.jsxDEV(gg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:83,columnNumber:34},this):h.jsxDEV(NM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:83,columnNumber:52},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:80,columnNumber:9},this),h.jsxDEV("button",{className:"preview-iconbtn",onClick:I,"aria-label":B("preview.refresh"),title:B("preview.refresh"),children:h.jsxDEV(CM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:85,columnNumber:126},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:85,columnNumber:9},this),h.jsxDEV("button",{className:"file-min","aria-label":B("preview.minimize"),title:B("preview.minimize"),onClick:g,children:h.jsxDEV(Ea,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:86,columnNumber:124},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:86,columnNumber:9},this),_&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"preview-pop-backdrop",onClick:()=>u(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:89,columnNumber:13},this),h.jsxDEV("div",{className:"preview-pop",role:"dialog","aria-label":B("preview.ttlDialog"),children:[h.jsxDEV("button",{className:"preview-pop-item",onClick:()=>{u(!1),r==null||r()},children:B("preview.renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:91,columnNumber:15},this),h.jsxDEV("button",{className:"preview-pop-item preview-pop-danger",onClick:()=>{u(!1),l==null||l()},children:B("preview.stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:90,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:88,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:68,columnNumber:7},this),h.jsxDEV("div",{className:`file-body preview-body ${E?"pc":""}`,ref:v,children:s&&E?h.jsxDEV("div",{className:"preview-scaler",style:M,children:h.jsxDEV("iframe",{ref:f,className:"preview-frame",title:B("preview.iframeTitle"),style:H,src:Tx({name:s,kind:d},w)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:100,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:99,columnNumber:11},this):s?h.jsxDEV("iframe",{ref:f,className:"preview-frame",title:B("preview.iframeTitle"),src:Tx({name:s,kind:d},w)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:103,columnNumber:11},this):null},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:97,columnNumber:7},this),E&&h.jsxDEV("div",{className:"preview-zoom",children:[h.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>U(-.5),disabled:C<=1,"aria-label":B("preview.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:108,columnNumber:11},this),h.jsxDEV("span",{className:"preview-zoom-val","aria-hidden":"true",children:[Math.round(C*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:109,columnNumber:11},this),h.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>U(.5),disabled:C>=Ox,"aria-label":B("preview.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:110,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:107,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:67,columnNumber:5},this),document.body)}const kM={working:"working",done:"done",idle:"done",permission:"needs"},_g={needs:3,done:2,working:1},RM={working:B("inbox.view.working"),done:B("inbox.view.done"),needs:B("inbox.view.needs")};function TM(o,s={},d=0){const w=[];for(const[j,L]of Object.entries(o)){const y=kM[L.kind];if(!y)continue;const r=L.ts||0;y==="done"&&!(r>Math.max(d||0,s[j]||0))||w.push({pane:j,session:L.session,window:L.window,windowName:L.windowName,view:y,msg:L.msg||"",ts:r,agent:L.agent||"claude"})}return w.sort((j,L)=>j.session<L.session?-1:j.session>L.session?1:_g[L.view]-_g[j.view]||L.ts-j.ts),w}function LM(o){const s={working:0,done:0,needs:0};for(const d of o)s[d.view]!=null&&(s[d.view]+=1);return s}function AM(o){let s=null,d=0;for(const w of o){const j=_g[w.view]||0;j>d&&(d=j,s=w.view)}return s}function Px(o){let s=0;for(const d of Object.values(o))(d.ts||0)>s&&(s=d.ts);return s}function k1(o,s){if(!o)return"";const d=Math.max(0,Math.round((s-o)/1e3));if(d<60)return B("time.secAgo",{n:d});const w=Math.round(d/60);if(w<60)return B("time.minAgo",{n:w});const j=Math.round(w/60);return j<24?B("time.hourAgo",{n:j}):B("time.dayAgo",{n:Math.round(j/24)})}function Qv(o,s,d){const w=o.findIndex(j=>j.id===s);return w<0?null:o[d==="left"?w-1:w+1]??null}const R1="tw_notify",bg=()=>localStorage.getItem(R1)==="1",T1=o=>localStorage.setItem(R1,o?"1":"0");function bl(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function L1(){var o;return typeof window<"u"&&(((o=window.matchMedia)==null?void 0:o.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const MM=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function au(o={}){return{Authorization:`Bearer ${uo()??""}`,...o}}function UM(o){const s="=".repeat((4-o.length%4)%4),d=(o+s).replace(/-/g,"+").replace(/_/g,"/"),w=atob(d),j=new Uint8Array(w.length);for(let L=0;L<w.length;L+=1)j[L]=w.charCodeAt(L);return j}async function OM(){if(!bl())throw new Error(B("push.unsupported"));if(MM()&&!L1())throw new Error(B("push.iosAddToHome"));if(await Notification.requestPermission()!=="granted")throw new Error(B("push.permissionDenied"));const s=await navigator.serviceWorker.ready,d=await fetch("/api/push/vapid",{headers:au(),cache:"no-store"});if(!d.ok)throw new Error(B("push.noVapid"));const{key:w}=await d.json();let j=await s.pushManager.getSubscription();if(j||(j=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:UM(w)})),!(await fetch("/api/push/subscribe",{method:"POST",headers:au({"Content-Type":"application/json"}),body:JSON.stringify({subscription:j,boundSessions:so()})})).ok)throw new Error(B("push.subscribeFailed"));return T1(!0),!0}async function PM(){try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();s&&(await fetch("/api/push/unsubscribe",{method:"POST",headers:au({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})}),await s.unsubscribe())}catch{}T1(!1)}async function Xc(){if(!(!bg()||!bl()))try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!s)return;await fetch("/api/push/bound",{method:"POST",headers:au({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint,boundSessions:so()})})}catch{}}async function BM(){if(!bl())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:au({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})});return d.ok&&(await d.json()).pushKey||null}catch{return null}}async function IM(o){if(bl())try{(await(await navigator.serviceWorker.ready).getNotifications({tag:`pane-${o}`})).forEach(w=>w.close())}catch{}}const Bx="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",VM=["md","markdown","html","htm","txt","log","sh"],FM=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],HM=[...VM,...FM].join("|"),Ix=new RegExp(`[^${Bx}]+\\.(?:${HM})(?=$|[${Bx}.])`,"gi");function A1(o){const s=[];if(!o)return s;Ix.lastIndex=0;let d;for(;(d=Ix.exec(o))!==null;){let w=d.index,j=d[0];const L=/^@+/.exec(j);L&&(w+=L[0].length,j=j.slice(L[0].length)),j&&s.push({start:w,end:w+j.length,path:j})}return s}const M1=o=>typeof o=="string"&&o.startsWith("/");function io(o,s){const d=M1(s)?s:`${o.replace(/\/+$/,"")}/${s}`,w=d.startsWith("/"),j=[];for(const L of d.split("/"))if(!(!L||L===".")){if(L===".."){j.pop();continue}j.push(L)}return(w?"/":"")+j.join("/")}const zM={key:"home",type:"home",name:B("doc.home")},U1=(o,s)=>({...o,type:s.type??o.type,name:s.name??o.name,content:s.content!==void 0?s.content:o.content,mtime:s.mtime!==void 0?s.mtime:o.mtime});function $M(o,s,d){if(o.tabs.some(j=>j.key===s))return{tabs:o.tabs.map(j=>j.key===s?U1(j,d):j),active:s};const w={key:s,type:d.type,name:d.name,content:d.content,mtime:d.mtime,path:s};return{tabs:[...o.tabs,w],active:s}}function WM(o,s,d){return o.tabs.some(w=>w.key===s)?{...o,tabs:o.tabs.map(w=>w.key===s?U1(w,d):w)}:o}function GM(o,s){const d=o.tabs.findIndex(L=>L.key===s);if(d<=0)return o;const w=o.tabs.filter(L=>L.key!==s),j=o.active===s?o.tabs[d-1].key:o.active;return{tabs:w,active:j}}function YM(){const[o,s]=V.useState({tabs:[zM],active:"home"}),d=V.useCallback((y,r)=>s(l=>$M(l,y,r)),[]),w=V.useCallback((y,r)=>s(l=>WM(l,y,r)),[]),j=V.useCallback(y=>s(r=>GM(r,y)),[]),L=V.useCallback(y=>s(r=>({...r,active:y})),[]);return{tabs:o.tabs,active:o.active,openDoc:d,refreshDoc:w,closeTab:j,activate:L}}function Vx(o){return String(o||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function qM({session:o,windowName:s,windowId:d}){const w=[o,s].map(Vx).filter(Boolean);return w.push(Vx(d)||"w"),w.join("-")}function KM(o,{settingsOpen:s,setSettingsOpen:d}){var T,E,A,D;const[w,j]=V.useState([]),[L,y]=V.useState(null),[r,l]=V.useState(!1),[g,_]=V.useState(!1),u=V.useCallback(async()=>{try{const R=await oM();j(R.previews||[]),y(R.domain??null),l(!!R.dynamicEnabled)}catch{}},[]);V.useEffect(()=>{u()},[u]);const p=o?qM({session:(T=o.session)==null?void 0:T.name,windowName:(E=o.window)==null?void 0:E.name,windowId:(A=o.window)==null?void 0:A.id}):null,S=w.find(R=>R.name===p&&R.expiresAt>Date.now())||null,C=(S==null?void 0:S.expiresAt)??null,b=!!S;V.useEffect(()=>{b||_(!1)},[b]),V.useEffect(()=>{if(C==null)return;const R=setTimeout(u,Math.max(0,C-Date.now())+500);return()=>clearTimeout(R)},[C,u]);const c=V.useCallback(()=>{s?(d(!1),requestAnimationFrame(()=>_(!0))):_(!0)},[s,d]),m=V.useCallback(async R=>{var M;if(p)try{await Jv(p,{dir:R}),nA((M=o==null?void 0:o.window)==null?void 0:M.id,R),await u(),c()}catch{}},[p,(D=o==null?void 0:o.window)==null?void 0:D.id,u,c]),f=V.useCallback(async R=>{if(!p)return;await Jv(p,{port:R}),await u();let M=!1;const H=()=>{M||(M=!0,window.removeEventListener("popstate",U),clearTimeout(I),_(!0))},U=()=>H();window.addEventListener("popstate",U);const I=setTimeout(H,300);d(!1)},[p,u,d]),v=V.useCallback(async()=>{if(p)try{await lM(p),await u()}catch{}},[p,u]),N=V.useCallback(async()=>{if(!S)return;const R=S.kind==="dynamic"?{port:S.port}:{dir:S.dir};try{await Jv(S.name,R),await u()}catch{}},[S==null?void 0:S.name,S==null?void 0:S.kind,S==null?void 0:S.dir,S==null?void 0:S.port,u]);return{previews:w,previewDomain:L,dynamicEnabled:r,previewSheetOpen:g,setPreviewSheetOpen:_,activePreview:S,curPreviewName:p,refreshPreviews:u,openPreviewSheet:c,startPreview:m,startDynamicPreview:f,stopPreview:v,renewPreview:N}}function Fx({fetch:o,apply:s,intervalMs:d,enabled:w=!0,deps:j=[]}){const L=V.useRef(o),y=V.useRef(s);L.current=o,y.current=s,V.useEffect(()=>{if(!w)return;let r=!1,l=null;const g=async()=>{if(!document.hidden)try{const p=await L.current();r||y.current(p)}catch{}},_=()=>{g(),l=setTimeout(_,d)};_();const u=()=>{document.hidden||(clearTimeout(l),_())};return document.addEventListener("visibilitychange",u),()=>{r=!0,clearTimeout(l),document.removeEventListener("visibilitychange",u)}},[w,d,...j])}function XM(o,s){return o instanceof Rr?(s==null||s(),!0):!1}function JM({open:o,currentSessionName:s,bound:d,onSelectSession:w,onUnbind:j,onBind:L,onClose:y,onLogout:r,orphans:l=[],onTakeoverRequest:g}){const[_,u]=V.useState(!1);return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:`drawer ${o?"open":""}`,children:[h.jsxDEV("div",{className:"drawer-list",children:[h.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&&h.jsxDEV("div",{className:"drawer-empty",children:B("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:34},this),d.map(p=>h.jsxDEV("div",{className:`drawer-row drawer-session ${p===s?"active":""}`,children:[h.jsxDEV("span",{className:"drawer-name",onClick:()=>w(p),children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:26,columnNumber:15},this),h.jsxDEV("button",{className:"drawer-unbind",onClick:S=>{S.stopPropagation(),j(p)},"aria-label":B("drawer.unbind"),title:B("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:27,columnNumber:15},this)]},p,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:13},this)),h.jsxDEV("button",{className:"drawer-bind",onClick:L,children:["+ ",B("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:35,columnNumber:11},this),l.length>0&&h.jsxDEV("div",{className:"drawer-orphans",children:[h.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>u(p=>!p),children:[h.jsxDEV("span",{children:B("drawer.orphans.title",{n:l.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:17},this),h.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:_?"▾":"▸"},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),_&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"drawer-orphans-hint",children:B("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:45,columnNumber:19},this),l.map(p=>{const S=!p.sessionId,C=p.state==="busy"||S;return h.jsxDEV("div",{className:"drawer-orphan-row",children:[h.jsxDEV("div",{className:"drawer-orphan-head",children:[h.jsxDEV("span",{className:"drawer-orphan-cwd",title:p.cwd,children:p.cwdLabel||p.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:27},this),h.jsxDEV("button",{className:"drawer-orphan-btn",disabled:C,title:S?B("inbox.orphans.noSession"):void 0,onClick:()=>g==null?void 0:g(p),children:B("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),h.jsxDEV("div",{className:"drawer-orphan-meta",children:[p.agentLabel&&h.jsxDEV("span",{className:"drawer-orphan-agent",children:p.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:63,columnNumber:44},this),h.jsxDEV("span",{className:`drawer-orphan-state ${p.state==="busy"?"busy":"idle"}`,children:p.state==="busy"?B("inbox.orphans.busy"):B("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:27},this),h.jsxDEV("span",{className:"drawer-orphan-time",children:k1(p.startedAt||p.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:67,columnNumber:27},this),p.snippet&&h.jsxDEV("span",{className:"drawer-orphan-msg",children:p.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)]},p.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),h.jsxDEV("button",{className:"drawer-logout",onClick:r,children:B("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),o&&h.jsxDEV("div",{className:"drawer-backdrop",onClick:y},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 ZM=500,Hx=10;function Wh(o,{onClick:s}={}){const d=V.useRef(null),w=V.useRef(null),j=V.useRef(!1),L=()=>{d.current&&(clearTimeout(d.current),d.current=null)};return{onPointerDown:y=>{j.current=!1,w.current={x:y.clientX,y:y.clientY},L(),d.current=setTimeout(()=>{d.current=null,j.current=!0,o==null||o()},ZM)},onPointerMove:y=>{!d.current||!w.current||(Math.abs(y.clientX-w.current.x)>Hx||Math.abs(y.clientY-w.current.y)>Hx)&&L()},onPointerUp:L,onPointerLeave:L,onPointerCancel:L,onClick:y=>{var r,l;if(j.current){j.current=!1,(r=y.preventDefault)==null||r.call(y),(l=y.stopPropagation)==null||l.call(y);return}s==null||s(y)}}}const yg=248,wg=158,Ah=6,zx=2,QM=52,e3=34,vh=o=>typeof o=="number"&&Number.isFinite(o);function xg(o){return Array.isArray(o)&&o.length>0&&o.every(s=>vh(s.left)&&vh(s.top)&&vh(s.width)&&vh(s.height))}const $x=o=>[...new Set(o)].sort((s,d)=>s-d);function Wx(o,s,d){const w=[];for(let l=0;l<o.length-1;l+=1){const g=o[l],_=o[l+1],u=s.some(([p,S])=>p===g&&S===_);w.push(_-g<=1&&!u)}const j=w.filter(l=>!l).length,L=j>0?(d-w.filter(Boolean).length*zx)/j:d,y=[{at:0}];let r=0;for(let l=0;l<w.length;l+=1)r+=w[l]?zx:L,y.push({at:r});return y}function t3(o){if(!xg(o))return null;const s=Math.max(...o.map(_=>_.left+_.width)),d=Math.max(...o.map(_=>_.top+_.height));if(s<=0||d<=0)return null;const w=$x(o.flatMap(_=>[_.left,_.left+_.width])),j=$x(o.flatMap(_=>[_.top,_.top+_.height])),L=o.map(_=>[_.left,_.left+_.width]),y=o.map(_=>[_.top,_.top+_.height]),r=Wx(w,L,yg-Ah*2),l=Wx(j,y,wg-Ah*2),g=o.map((_,u)=>{const p=r[w.indexOf(_.left)].at,S=r[w.indexOf(_.left+_.width)].at,C=l[j.indexOf(_.top)].at,b=l[j.indexOf(_.top+_.height)].at;return{id:_.id,active:!!_.active,command:_.command,seq:u,left:p,top:C,width:S-p,height:b-C}});return{w:yg,h:wg,cells:g}}function n3(o){const s=o.width<QM,d=o.height<e3;return s&&d?"tiny":s?"narrow":d?"flat":""}const Gx="①②③④⑤⑥⑦⑧⑨",tu=o=>o<Gx.length?Gx[o]:String(o+1),i3=(o,s)=>`${tu(s)} ${o.command||o.id}`;function r3({window:o,active:s,agent:d,onSelect:w,onManage:j}){const L=Wh(()=>j(o),{onClick:()=>w(o)});return h.jsxDEV("button",{"data-win":o.id,className:`win-tab ${s?"active":""}`,...L,children:[d&&h.jsxDEV(oo,{agent:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:23,columnNumber:17},this),o.name||o.id,o.panes>1&&h.jsxDEV("span",{className:"win-panes",children:o.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:25,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:22,columnNumber:5},this)}const s3=200;function a3({cell:o,cur:s,releasing:d,picking:w,agent:j,onChoose:L,onManage:y}){const r=n3(o),l=o.command||o.id,g=Wh(()=>y(o.id),{onClick:()=>L(o.id)});return h.jsxDEV("button",{type:"button",role:"option","aria-selected":s,"aria-label":l,className:`pane-map-cell${s?" is-current":""}${d?" is-releasing":""}${r?` is-${r}`:""}${w?" is-picking":""}`,style:{left:`${o.left+Ah}px`,top:`${o.top+Ah}px`,width:`${o.width}px`,height:`${o.height}px`},...g,children:h.jsxDEV("span",{className:"pmc-surf",children:r==="narrow"||r==="tiny"?h.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:tu(o.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:55,columnNumber:11},this):r==="flat"?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:tu(o.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:58,columnNumber:13},this),h.jsxDEV("span",{className:"pmc-cmd",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:59,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:57,columnNumber:11},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV("span",{className:"pmc-row",children:[h.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:tu(o.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:64,columnNumber:15},this),j&&h.jsxDEV(oo,{agent:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:65,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:63,columnNumber:13},this),h.jsxDEV("span",{className:"pmc-cmd",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:67,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:62,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:53,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:44,columnNumber:5},this)}function o3({window:o,panes:s,paneAgents:d={},currentPaneId:w,agent:j,onManage:L,onManagePane:y,onSelectPane:r,paneSheetOpen:l=!1,openMapFor:g=null,onMapOpened:_}){const[u,p]=V.useState(!1),[S,C]=V.useState(null),b=V.useRef(null);V.useEffect(()=>()=>clearTimeout(b.current),[]);const c=H=>{var I;try{(I=navigator.vibrate)==null||I.call(navigator,10)}catch{}if(l&&(y==null||y(H)),typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){r(H);return}C(H),clearTimeout(b.current),b.current=setTimeout(()=>{C(null),r(H)},s3)},[m,f]=V.useState(null),v=V.useRef(null),N=xg(s)?t3(s):null,T=N?N.w:yg,E=N?N.h:wg,A=()=>{var te;const H=(te=v.current)==null?void 0:te.getBoundingClientRect();if(!H)return;const U=8,I=window.innerWidth,G=window.innerHeight,ne=Math.max(U,Math.min(H.left,I-T-U));let Q=H.bottom+6;if(Q+E+U>G){const ie=H.top-6-E;Q=ie>=U?ie:Math.max(U,G-E-U)}f({top:Q,left:ne})},D=Wh(()=>L(o),{onClick:()=>{u||A(),p(H=>!H)}});V.useEffect(()=>{g&&g===o.id&&(A(),p(!0),_==null||_())},[g,o.id]),V.useEffect(()=>{if(!u)return;const H=I=>{var G;l||(G=v.current)!=null&&G.contains(I.target)||p(!1)},U=()=>A();return document.addEventListener("pointerdown",H,!0),window.addEventListener("scroll",U,!0),window.addEventListener("resize",U),()=>{document.removeEventListener("pointerdown",H,!0),window.removeEventListener("scroll",U,!0),window.removeEventListener("resize",U)}},[u,l]);const R=Math.max(0,s.findIndex(H=>H.id===w)),M=s[R];return h.jsxDEV("div",{className:"wt-dd active","data-win":o.id,ref:v,children:[h.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":u,...D,children:[j&&h.jsxDEV(oo,{agent:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:176,columnNumber:19},this),h.jsxDEV("span",{className:"wt-name",children:o.name||o.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:177,columnNumber:9},this),h.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:178,columnNumber:9},this),h.jsxDEV("span",{className:"wt-pane",children:i3(M,R)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:179,columnNumber:9},this),h.jsxDEV("span",{className:`wt-caret${u?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:180,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:170,columnNumber:7},this),u&&m&&(xg(s)?h.jsxDEV("div",{className:"pane-map",role:"listbox",style:{top:m.top,left:m.left,width:T,height:E},children:N.cells.map(H=>{const U=H.id===w;return h.jsxDEV(a3,{cell:H,cur:U,releasing:U&&!!S&&S!==w,picking:S===H.id,agent:d[H.id],onChoose:c,onManage:y},H.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:188,columnNumber:17},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:184,columnNumber:11},this):h.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:m.top,left:m.left},children:s.map((H,U)=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":H.id===w,className:`dd-option${H.id===w?" is-selected":""}`,onClick:()=>{r(H.id),p(!1)},children:[h.jsxDEV("span",{className:"dd-option-label",children:[h.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:tu(U)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:213,columnNumber:19},this),d[H.id]&&h.jsxDEV(oo,{agent:d[H.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:214,columnNumber:40},this),h.jsxDEV("span",{className:"dd-pane-cmd",children:H.command||H.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:215,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:212,columnNumber:17},this),H.id===w&&h.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:217,columnNumber:44},this)]},H.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:204,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:202,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:169,columnNumber:5},this)}function l3({windows:o,windowAgents:s={},paneAgents:d={},currentAgent:w,currentWindowId:j,panes:L,currentPaneId:y,onSelectWindow:r,onSelectPane:l,onNewWindow:g,onManageWindow:_,onManagePane:u,paneSheetOpen:p=!1,openMapFor:S=null,onMapOpened:C,trackWindowId:b}){const c=V.useRef(null);return V.useLayoutEffect(()=>{var m,f;b&&((f=(m=c.current)==null?void 0:m.querySelector(`[data-win="${b}"]`))==null||f.scrollIntoView({block:"nearest",inline:"nearest"}))},[o,b]),h.jsxDEV("div",{className:"windowbar",children:h.jsxDEV("div",{className:"windowbar-scroll",ref:c,children:[o.map(m=>{const f=m.id===j;return f&&L.length>1?h.jsxDEV(o3,{window:m,panes:L,paneAgents:d,currentPaneId:y,agent:w,onManage:_,onManagePane:u,onSelectPane:l,paneSheetOpen:p,openMapFor:S,onMapOpened:C},m.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:248,columnNumber:15},this):h.jsxDEV(r3,{window:m,active:f,agent:s[m.id],onSelect:r,onManage:_},m.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:265,columnNumber:13},this)}),h.jsxDEV("button",{className:"win-tab win-new",onClick:g,"aria-label":B("windowbar.newWindow"),title:B("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:275,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:243,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:242,columnNumber:5},this)}var O1={exports:{}};(function(o,s){(function(d,w){o.exports=w()})(globalThis,()=>(()=>{var d={4567:function(y,r,l){var g=this&&this.__decorate||function(f,v,N,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,N):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,N,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,N,D):E(v,N))||D);return A>3&&D&&Object.defineProperty(v,N,D),D},_=this&&this.__param||function(f,v){return function(N,T){v(N,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const u=l(9042),p=l(9924),S=l(844),C=l(4725),b=l(2585),c=l(3656);let m=r.AccessibilityManager=class extends S.Disposable{constructor(f,v,N,T){super(),this._terminal=f,this._coreBrowserService=N,this._renderService=T,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 E=0;E<this._terminal.rows;E++)this._rowElements[E]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[E]);if(this._topBoundaryFocusListener=E=>this._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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 p.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(E=>this._handleResize(E.rows))),this.register(this._terminal.onRender(E=>this._refreshRows(E.start,E.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(E=>this._handleChar(E))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
207
+ `))),this.register(this._terminal.onA11yTab(E=>this._handleTab(E))),this.register(this._terminal.onKey(E=>this._handleKey(E.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,c.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,S.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(f){for(let v=0;v<f;v++)this._handleChar(" ")}_handleChar(f){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==f&&(this._charsToAnnounce+=f):this._charsToAnnounce+=f,f===`
208
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(f){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(f)||this._charsToConsume.push(f)}_refreshRows(f,v){this._liveRegionDebouncer.refresh(f,v,this._terminal.rows)}_renderRows(f,v){const N=this._terminal.buffer,T=N.lines.length.toString();for(let E=f;E<=v;E++){const A=N.lines.get(N.ydisp+E),D=[],R=(A==null?void 0:A.translateToString(!0,void 0,void 0,D))||"",M=(N.ydisp+E+1).toString(),H=this._rowElements[E];H&&(R.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=R,this._rowColumns.set(H,D)),H.setAttribute("aria-posinset",M),H.setAttribute("aria-setsize",T))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(f,v){const N=f.target,T=this._rowElements[v===0?1:this._rowElements.length-2];if(N.getAttribute("aria-posinset")===(v===0?"1":`${this._terminal.buffer.lines.length}`)||f.relatedTarget!==T)return;let E,A;if(v===0?(E=N,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(E=this._rowElements.shift(),A=N,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),v===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(v===0?-1:1),this._rowElements[v===0?1:this._rowElements.length-2].focus(),f.preventDefault(),f.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const f=document.getSelection();if(!f)return;if(f.isCollapsed)return void(this._rowContainer.contains(f.anchorNode)&&this._terminal.clearSelection());if(!f.anchorNode||!f.focusNode)return void console.error("anchorNode and/or focusNode are null");let v={node:f.anchorNode,offset:f.anchorOffset},N={node:f.focusNode,offset:f.focusOffset};if((v.node.compareDocumentPosition(N.node)&Node.DOCUMENT_POSITION_PRECEDING||v.node===N.node&&v.offset>N.offset)&&([v,N]=[N,v]),v.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(v={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(v.node))return;const T=this._rowElements.slice(-1)[0];if(N.node.compareDocumentPosition(T)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(N={node:T,offset:((R=T.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(N.node))return;const E=({node:M,offset:H})=>{const U=M instanceof Text?M.parentNode:M;let I=parseInt(U==null?void 0:U.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const G=this._rowColumns.get(U);if(!G)return console.warn("columns is null. Race condition?"),null;let ne=H<G.length?G[H]:G.slice(-1)[0]+1;return ne>=this._terminal.cols&&(++I,ne=0),{row:I,column:ne}},A=E(v),D=E(N);if(A&&D){if(A.row>D.row||A.row===D.row&&A.column>=D.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(D.row-A.row)*this._terminal.cols-A.column+D.column)}}_handleResize(f){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let v=this._rowContainer.children.length;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);for(;this._rowElements.length>f;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const f=this._coreBrowserService.mainDocument.createElement("div");return f.setAttribute("role","listitem"),f.tabIndex=-1,this._refreshRowDimensions(f),f}_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 f=0;f<this._terminal.rows;f++)this._refreshRowDimensions(this._rowElements[f])}}_refreshRowDimensions(f){f.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=m=g([_(1,b.IInstantiationService),_(2,C.ICoreBrowserService),_(3,C.IRenderService)],m)},3614:(y,r)=>{function l(p){return p.replace(/\r?\n/g,"\r")}function g(p,S){return S?"\x1B[200~"+p+"\x1B[201~":p}function _(p,S,C,b){p=g(p=l(p),C.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(p,!0),S.value=""}function u(p,S,C){const b=C.getBoundingClientRect(),c=p.clientX-b.left-10,m=p.clientY-b.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${c}px`,S.style.top=`${m}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=l,r.bracketTextForPaste=g,r.copyHandler=function(p,S){p.clipboardData&&p.clipboardData.setData("text/plain",S.selectionText),p.preventDefault()},r.handlePasteEvent=function(p,S,C,b){p.stopPropagation(),p.clipboardData&&_(p.clipboardData.getData("text/plain"),S,C,b)},r.paste=_,r.moveTextAreaUnderMouseCursor=u,r.rightClickHandler=function(p,S,C,b,c){u(p,S,C),c&&b.rightClickSelect(p),S.value=b.selectionText,S.select()}},7239:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const g=l(1505);r.ColorContrastCache=class{constructor(){this._color=new g.TwoKeyMap,this._css=new g.TwoKeyMap}setCss(_,u,p){this._css.set(_,u,p)}getCss(_,u){return this._css.get(_,u)}setColor(_,u,p){this._color.set(_,u,p)}getColor(_,u){return this._color.get(_,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(l,g,_,u){l.addEventListener(g,_,u);let p=!1;return{dispose:()=>{p||(p=!0,l.removeEventListener(g,_,u))}}}},3551:function(y,r,l){var g=this&&this.__decorate||function(m,f,v,N){var T,E=arguments.length,A=E<3?f:N===null?N=Object.getOwnPropertyDescriptor(f,v):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,v,N);else for(var D=m.length-1;D>=0;D--)(T=m[D])&&(A=(E<3?T(A):E>3?T(f,v,A):T(f,v))||A);return E>3&&A&&Object.defineProperty(f,v,A),A},_=this&&this.__param||function(m,f){return function(v,N){f(v,N,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;const u=l(3656),p=l(8460),S=l(844),C=l(2585),b=l(4725);let c=r.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(m,f,v,N,T){super(),this._element=m,this._mouseService=f,this._renderService=v,this._bufferService=N,this._linkProviderService=T,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)(()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(m){this._lastMouseEvent=m;const f=this._positionFromMouseEvent(m,this._element,this._mouseService);if(!f)return;this._isMouseOut=!1;const v=m.composedPath();for(let N=0;N<v.length;N++){const T=v[N];if(T.classList.contains("xterm"))break;if(T.classList.contains("xterm-hover"))return}this._lastBufferCell&&f.x===this._lastBufferCell.x&&f.y===this._lastBufferCell.y||(this._handleHover(f),this._lastBufferCell=f)}_handleHover(m){if(this._activeLine!==m.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(m,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,m)||(this._clearCurrentLink(),this._askForLink(m,!0))}_askForLink(m,f){var N,T;this._activeProviderReplies&&f||((N=this._activeProviderReplies)==null||N.forEach(E=>{E==null||E.forEach(A=>{A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=m.y);let v=!1;for(const[E,A]of this._linkProviderService.linkProviders.entries())f?(T=this._activeProviderReplies)!=null&&T.get(E)&&(v=this._checkLinkProviderResult(E,m,v)):A.provideLinks(m.y,D=>{var M,H;if(this._isMouseOut)return;const R=D==null?void 0:D.map(U=>({link:U}));(M=this._activeProviderReplies)==null||M.set(E,R),v=this._checkLinkProviderResult(E,m,v),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(m.y,this._activeProviderReplies)})}_removeIntersectingLinks(m,f){const v=new Set;for(let N=0;N<f.size;N++){const T=f.get(N);if(T)for(let E=0;E<T.length;E++){const A=T[E],D=A.link.range.start.y<m?0:A.link.range.start.x,R=A.link.range.end.y>m?this._bufferService.cols:A.link.range.end.x;for(let M=D;M<=R;M++){if(v.has(M)){T.splice(E--,1);break}v.add(M)}}}}_checkLinkProviderResult(m,f,v){var E;if(!this._activeProviderReplies)return v;const N=this._activeProviderReplies.get(m);let T=!1;for(let A=0;A<m;A++)this._activeProviderReplies.has(A)&&!this._activeProviderReplies.get(A)||(T=!0);if(!T&&N){const A=N.find(D=>this._linkAtPosition(D.link,f));A&&(v=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!v)for(let A=0;A<this._activeProviderReplies.size;A++){const D=(E=this._activeProviderReplies.get(A))==null?void 0:E.find(R=>this._linkAtPosition(R.link,f));if(D){v=!0,this._handleNewLink(D);break}}return v}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(m){if(!this._currentLink)return;const f=this._positionFromMouseEvent(m,this._element,this._mouseService);f&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,f)&&this._currentLink.link.activate(m,this._currentLink.link.text)}_clearCurrentLink(m,f){this._currentLink&&this._lastMouseEvent&&(!m||!f||this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=f)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(m){if(!this._lastMouseEvent)return;const f=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);f&&this._linkAtPosition(m.link,f)&&(this._currentLink=m,this._currentLink.state={decorations:{underline:m.link.decorations===void 0||m.link.decorations.underline,pointerCursor:m.link.decorations===void 0||m.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,m.link,this._lastMouseEvent),m.link.decorations={},Object.defineProperties(m.link.decorations,{pointerCursor:{get:()=>{var v,N;return(N=(v=this._currentLink)==null?void 0:v.state)==null?void 0:N.decorations.pointerCursor},set:v=>{var N;(N=this._currentLink)!=null&&N.state&&this._currentLink.state.decorations.pointerCursor!==v&&(this._currentLink.state.decorations.pointerCursor=v,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",v))}},underline:{get:()=>{var v,N;return(N=(v=this._currentLink)==null?void 0:v.state)==null?void 0:N.decorations.underline},set:v=>{var N,T,E;(N=this._currentLink)!=null&&N.state&&((E=(T=this._currentLink)==null?void 0:T.state)==null?void 0:E.decorations.underline)!==v&&(this._currentLink.state.decorations.underline=v,this._currentLink.state.isHovered&&this._fireUnderlineEvent(m.link,v))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(v=>{if(!this._currentLink)return;const N=v.start===0?0:v.start+1+this._bufferService.buffer.ydisp,T=this._bufferService.buffer.ydisp+1+v.end;if(this._currentLink.link.range.start.y>=N&&this._currentLink.link.range.end.y<=T&&(this._clearCurrentLink(N,T),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}})))}_linkHover(m,f,v){var N;(N=this._currentLink)!=null&&N.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!0),this._currentLink.state.decorations.pointerCursor&&m.classList.add("xterm-cursor-pointer")),f.hover&&f.hover(v,f.text)}_fireUnderlineEvent(m,f){const v=m.range,N=this._bufferService.buffer.ydisp,T=this._createLinkUnderlineEvent(v.start.x-1,v.start.y-N-1,v.end.x,v.end.y-N-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(T)}_linkLeave(m,f,v){var N;(N=this._currentLink)!=null&&N.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!1),this._currentLink.state.decorations.pointerCursor&&m.classList.remove("xterm-cursor-pointer")),f.leave&&f.leave(v,f.text)}_linkAtPosition(m,f){const v=m.range.start.y*this._bufferService.cols+m.range.start.x,N=m.range.end.y*this._bufferService.cols+m.range.end.x,T=f.y*this._bufferService.cols+f.x;return v<=T&&T<=N}_positionFromMouseEvent(m,f,v){const N=v.getCoords(m,f,this._bufferService.cols,this._bufferService.rows);if(N)return{x:N[0],y:N[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(m,f,v,N,T){return{x1:m,y1:f,x2:v,y2:N,cols:this._bufferService.cols,fg:T}}};r.Linkifier=c=g([_(1,b.IMouseService),_(2,b.IRenderService),_(3,C.IBufferService),_(4,b.ILinkProviderService)],c)},9042:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(y,r,l){var g=this&&this.__decorate||function(b,c,m,f){var v,N=arguments.length,T=N<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,c,m,f);else for(var E=b.length-1;E>=0;E--)(v=b[E])&&(T=(N<3?v(T):N>3?v(c,m,T):v(c,m))||T);return N>3&&T&&Object.defineProperty(c,m,T),T},_=this&&this.__param||function(b,c){return function(m,f){c(m,f,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const u=l(511),p=l(2585);let S=r.OscLinkProvider=class{constructor(b,c,m){this._bufferService=b,this._optionsService=c,this._oscLinkService=m}provideLinks(b,c){var R;const m=this._bufferService.buffer.lines.get(b-1);if(!m)return void c(void 0);const f=[],v=this._optionsService.rawOptions.linkHandler,N=new u.CellData,T=m.getTrimmedLength();let E=-1,A=-1,D=!1;for(let M=0;M<T;M++)if(A!==-1||m.hasContent(M)){if(m.loadCell(M,N),N.hasExtendedAttrs()&&N.extended.urlId){if(A===-1){A=M,E=N.extended.urlId;continue}D=N.extended.urlId!==E}else A!==-1&&(D=!0);if(D||A!==-1&&M===T-1){const H=(R=this._oscLinkService.getLinkData(E))==null?void 0:R.uri;if(H){const U={start:{x:A+1,y:b},end:{x:M+(D||M!==T-1?0:1),y:b}};let I=!1;if(!(v!=null&&v.allowNonHttpProtocols))try{const G=new URL(H);["http:","https:"].includes(G.protocol)||(I=!0)}catch{I=!0}I||f.push({text:H,range:U,activate:(G,ne)=>v?v.activate(G,ne,U):C(0,ne),hover:(G,ne)=>{var Q;return(Q=v==null?void 0:v.hover)==null?void 0:Q.call(v,G,ne,U)},leave:(G,ne)=>{var Q;return(Q=v==null?void 0:v.leave)==null?void 0:Q.call(v,G,ne,U)}})}D=!1,N.hasExtendedAttrs()&&N.extended.urlId?(A=M,E=N.extended.urlId):(A=-1,E=-1)}}c(f)}};function C(b,c){if(confirm(`Do you want to navigate to ${c}?
209
+
210
+ WARNING: This link could potentially be dangerous`)){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=S=g([_(0,p.IBufferService),_(1,p.IOptionsService),_(2,p.IOscLinkService)],S)},6193:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(l,g){this._renderCallback=l,this._coreBrowserService=g,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(l,g,_){this._rowCount=_,l=l!==void 0?l:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,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 l=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,g),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;const g=l(3614),_=l(3656),u=l(3551),p=l(9042),S=l(3730),C=l(1680),b=l(3107),c=l(5744),m=l(2950),f=l(1296),v=l(428),N=l(4269),T=l(5114),E=l(8934),A=l(3230),D=l(9312),R=l(4725),M=l(6731),H=l(8055),U=l(8969),I=l(8460),G=l(844),ne=l(6114),Q=l(8437),te=l(2584),ie=l(7399),P=l(5941),$=l(9074),J=l(2585),ee=l(5435),we=l(4567),Se=l(779);class Z extends U.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(se={}){super(se),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($.DecorationService),this._instantiationService.setService(J.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Se.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((W,_e)=>this.refresh(W,_e))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(W=>this._reportWindowsOptions(W))),this.register(this._inputHandler.onColor(W=>this._handleColorEvent(W))),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(W=>this._afterResize(W.cols,W.rows))),this.register((0,G.toDisposable)(()=>{var W,_e;this._customKeyEventHandler=void 0,(_e=(W=this.element)==null?void 0:W.parentNode)==null||_e.removeChild(this.element)}))}_handleColorEvent(se){if(this._themeService)for(const W of se){let _e,ue="";switch(W.index){case 256:_e="foreground",ue="10";break;case 257:_e="background",ue="11";break;case 258:_e="cursor",ue="12";break;default:_e="ansi",ue="4;"+W.index}switch(W.type){case 0:const Ie=H.color.toColorRGB(_e==="ansi"?this._themeService.colors.ansi[W.index]:this._themeService.colors[_e]);this.coreService.triggerDataEvent(`${te.C0.ESC}]${ue};${(0,P.toRgbString)(Ie)}${te.C1_ESCAPED.ST}`);break;case 1:if(_e==="ansi")this._themeService.modifyColors(Ue=>Ue.ansi[W.index]=H.channels.toColor(...W.color));else{const Ue=_e;this._themeService.modifyColors(Xe=>Xe[Ue]=H.channels.toColor(...W.color))}break;case 2:this._themeService.restoreColor(W.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(se){se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(we.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var se;return(se=this.textarea)==null?void 0:se.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 se=this.buffer.ybase+this.buffer.y,W=this.buffer.lines.get(se);if(!W)return;const _e=Math.min(this.buffer.x,this.cols-1),ue=this._renderService.dimensions.css.cell.height,Ie=W.getWidth(_e),Ue=this._renderService.dimensions.css.cell.width*Ie,Xe=this.buffer.y*this._renderService.dimensions.css.cell.height,Je=_e*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Je+"px",this.textarea.style.top=Xe+"px",this.textarea.style.width=Ue+"px",this.textarea.style.height=ue+"px",this.textarea.style.lineHeight=ue+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",W=>{this.hasSelection()&&(0,g.copyHandler)(W,this._selectionService)}));const se=W=>(0,g.handlePasteEvent)(W,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,_.addDisposableDomListener)(this.element,"paste",se)),ne.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",W=>{W.button===2&&(0,g.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",W=>{(0,g.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),ne.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",W=>{W.button===1&&(0,g.moveTextAreaUnderMouseCursor)(W,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",se=>this._keyUp(se),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",se=>this._keyDown(se),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",se=>this._keyPress(se),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",se=>this._compositionHelper.compositionupdate(se))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,_.addDisposableDomListener)(this.textarea,"input",se=>this._inputEvent(se),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(se){var _e;if(!se)throw new Error("Terminal requires a parent element.");if(se.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=se.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"),se.appendChild(this.element);const W=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.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,_.addDisposableDomListener)(this.screenElement,"mousemove",ue=>this.updateCursorStyle(ue))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),W.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.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(T.CoreBrowserService,this.textarea,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",ue=>this._handleTextAreaFocus(ue))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(v.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(M.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(N.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(ue=>this._onRender.fire(ue))),this.onResize(ue=>this._renderService.resize(ue.cols,ue.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(m.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(W);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(ue=>this.scrollLines(ue.amount,ue.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(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(ue=>this.scrollLines(ue.amount,ue.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(ue=>this._renderService.handleSelectionChanged(ue.start,ue.end,ue.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(ue=>{this.textarea.value=ue,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(ue=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",ue=>this._selectionService.handleMouseDown(ue))),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(we.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",ue=>this._handleScreenReaderModeOptionChange(ue))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",ue=>{!this._overviewRulerRenderer&&ue&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,W=this.element;function _e(Ue){const Xe=se._mouseService.getMouseReportCoords(Ue,se.screenElement);if(!Xe)return!1;let Je,rt;switch(Ue.overrideType||Ue.type){case"mousemove":rt=32,Ue.buttons===void 0?(Je=3,Ue.button!==void 0&&(Je=Ue.button<3?Ue.button:3)):Je=1&Ue.buttons?0:4&Ue.buttons?1:2&Ue.buttons?2:3;break;case"mouseup":rt=0,Je=Ue.button<3?Ue.button:3;break;case"mousedown":rt=1,Je=Ue.button<3?Ue.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(Ue)===!1||se.viewport.getLinesScrolled(Ue)===0)return!1;rt=Ue.deltaY<0?0:1,Je=4;break;default:return!1}return!(rt===void 0||Je===void 0||Je>4)&&se.coreMouseService.triggerMouseEvent({col:Xe.col,row:Xe.row,x:Xe.x,y:Xe.y,button:Je,action:rt,ctrl:Ue.ctrlKey,alt:Ue.altKey,shift:Ue.shiftKey})}const ue={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ie={mouseup:Ue=>(_e(Ue),Ue.buttons||(this._document.removeEventListener("mouseup",ue.mouseup),ue.mousedrag&&this._document.removeEventListener("mousemove",ue.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?ue.mousemove||(W.addEventListener("mousemove",Ie.mousemove),ue.mousemove=Ie.mousemove):(W.removeEventListener("mousemove",ue.mousemove),ue.mousemove=null),16&Ue?ue.wheel||(W.addEventListener("wheel",Ie.wheel,{passive:!1}),ue.wheel=Ie.wheel):(W.removeEventListener("wheel",ue.wheel),ue.wheel=null),2&Ue?ue.mouseup||(ue.mouseup=Ie.mouseup):(this._document.removeEventListener("mouseup",ue.mouseup),ue.mouseup=null),4&Ue?ue.mousedrag||(ue.mousedrag=Ie.mousedrag):(this._document.removeEventListener("mousemove",ue.mousedrag),ue.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(W,"mousedown",Ue=>{if(Ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Ue))return _e(Ue),ue.mouseup&&this._document.addEventListener("mouseup",ue.mouseup),ue.mousedrag&&this._document.addEventListener("mousemove",ue.mousedrag),this.cancel(Ue)})),this.register((0,_.addDisposableDomListener)(W,"wheel",Ue=>{if(!ue.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Ue)===!1)return!1;if(!this.buffer.hasScrollback){const Xe=this.viewport.getLinesScrolled(Ue);if(Xe===0)return;const Je=te.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ue.deltaY<0?"A":"B");let rt="";for(let Nt=0;Nt<Math.abs(Xe);Nt++)rt+=Je;return this.coreService.triggerDataEvent(rt,!0),this.cancel(Ue,!0)}return this.viewport.handleWheel(Ue)?this.cancel(Ue):void 0}},{passive:!1})),this.register((0,_.addDisposableDomListener)(W,"touchstart",Ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Ue),this.cancel(Ue)},{passive:!0})),this.register((0,_.addDisposableDomListener)(W,"touchmove",Ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Ue)?void 0:this.cancel(Ue)},{passive:!1}))}refresh(se,W){var _e;(_e=this._renderService)==null||_e.refreshRows(se,W)}updateCursorStyle(se){var W;(W=this._selectionService)!=null&&W.shouldColumnSelect(se)?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(se,W,_e=0){var ue;_e===1?(super.scrollLines(se,W,_e),this.refresh(0,this.rows-1)):(ue=this.viewport)==null||ue.scrollLines(se)}paste(se){(0,g.paste)(se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(se){this._customKeyEventHandler=se}attachCustomWheelEventHandler(se){this._customWheelEventHandler=se}registerLinkProvider(se){return this._linkProviderService.registerLinkProvider(se)}registerCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const W=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),W}deregisterCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)}registerDecoration(se){return this._decorationService.registerDecoration(se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(se,W,_e){this._selectionService.setSelection(se,W,_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 se;(se=this._selectionService)==null||se.clearSelection()}selectAll(){var se;(se=this._selectionService)==null||se.selectAll()}selectLines(se,W){var _e;(_e=this._selectionService)==null||_e.selectLines(se,W)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const W=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!W&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;W||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const _e=(0,ie.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),_e.type===3||_e.type===2){const ue=this.rows-1;return this.scrollLines(_e.type===2?-ue:ue),this.cancel(se,!0)}return _e.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(_e.cancel&&this.cancel(se,!0),!_e.key||!!(se.key&&!se.ctrlKey&&!se.altKey&&!se.metaKey&&se.key.length===1&&se.key.charCodeAt(0)>=65&&se.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:se}),this._showCursor(),this.coreService.triggerDataEvent(_e.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,W){const _e=se.isMac&&!this.options.macOptionIsMeta&&W.altKey&&!W.ctrlKey&&!W.metaKey||se.isWindows&&W.altKey&&W.ctrlKey&&!W.metaKey||se.isWindows&&W.getModifierState("AltGraph");return W.type==="keypress"?_e:_e&&(!W.keyCode||W.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||(function(W){return W.keyCode===16||W.keyCode===17||W.keyCode===18}(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let W;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)W=se.charCode;else if(se.which===null||se.which===void 0)W=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;W=se.which}return!(!W||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(W=String.fromCharCode(W),this._onKey.fire({key:W,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(W,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(se){if(se.data&&se.inputType==="insertText"&&(!se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const W=se.data;return this.coreService.triggerDataEvent(W,!0),this.cancel(se),!0}return!1}resize(se,W){se!==this.cols||W!==this.rows?super.resize(se,W):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,W){var _e,ue;(_e=this._charSizeService)==null||_e.measure(),(ue=this.viewport)==null||ue.syncScrollArea(!0)}clear(){var se;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 W=1;W<this.rows;W++)this.buffer.lines.push(this.buffer.getBlankLine(Q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(se=this.viewport)==null||se.reset(),this.refresh(0,this.rows-1)}}reset(){var W,_e;this.options.rows=this.rows,this.options.cols=this.cols;const se=this._customKeyEventHandler;this._setup(),super.reset(),(W=this._selectionService)==null||W.reset(),this._decorationService.reset(),(_e=this.viewport)==null||_e.reset(),this._customKeyEventHandler=se,this.refresh(0,this.rows-1)}clearTextureAtlas(){var se;(se=this._renderService)==null||se.clearTextureAtlas()}_reportFocus(){var se;(se=this.element)!=null&&se.classList.contains("focus")?this.coreService.triggerDataEvent(te.C0.ESC+"[I"):this.coreService.triggerDataEvent(te.C0.ESC+"[O")}_reportWindowsOptions(se){if(this._renderService)switch(se){case ee.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const W=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};${W}t`);break;case ee.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ue=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};${ue}t`)}}cancel(se,W){if(this.options.cancelEvents||W)return se.preventDefault(),se.stopPropagation(),!1}}r.Terminal=Z},9924:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(l,g=1e3){this._renderCallback=l,this._debounceThresholdMS=g,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,g,_){this._rowCount=_,l=l!==void 0?l:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=u-this._lastRefreshMs,S=this._debounceThresholdMS-p;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 l=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,g)}}},1680:function(y,r,l){var g=this&&this.__decorate||function(m,f,v,N){var T,E=arguments.length,A=E<3?f:N===null?N=Object.getOwnPropertyDescriptor(f,v):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,v,N);else for(var D=m.length-1;D>=0;D--)(T=m[D])&&(A=(E<3?T(A):E>3?T(f,v,A):T(f,v))||A);return E>3&&A&&Object.defineProperty(f,v,A),A},_=this&&this.__param||function(m,f){return function(v,N){f(v,N,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;const u=l(3656),p=l(4725),S=l(8460),C=l(844),b=l(2585);let c=r.Viewport=class extends C.Disposable{constructor(m,f,v,N,T,E,A,D){super(),this._viewportElement=m,this._scrollArea=f,this._bufferService=v,this._optionsService=N,this._charSizeService=T,this._renderService=E,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(R=>this._activeBuffer=R.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(R=>this._renderDimensions=R)),this._handleThemeChange(D.colors),this.register(D.onChangeColors(R=>this._handleThemeChange(R))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(m){this._viewportElement.style.backgroundColor=m.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(m){if(m)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 f=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==f&&(this._lastRecordedBufferHeight=f,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const m=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==m&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=m),this._refreshAnimationFrame=null}syncScrollArea(m=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(m);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(m)}_handleScroll(m){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 f=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:f,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const m=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(m*(this._smoothScrollState.target-this._smoothScrollState.origin)),m<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(m,f){const v=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(f<0&&this._viewportElement.scrollTop!==0||f>0&&v<this._lastRecordedBufferHeight)||(m.cancelable&&m.preventDefault(),!1)}handleWheel(m){const f=this._getPixelsScrolled(m);return f!==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+f:this._smoothScrollState.target+=f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=f,this._bubbleScroll(m,f))}scrollLines(m){if(m!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const f=m*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:m,suppressScrollEvent:!1})}_getPixelsScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let f=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_LINE?f*=this._currentRowHeight:m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._currentRowHeight*this._bufferService.rows),f}getBufferElements(m,f){var D;let v,N="";const T=[],E=f??this._bufferService.buffer.lines.length,A=this._bufferService.buffer.lines;for(let R=m;R<E;R++){const M=A.get(R);if(!M)continue;const H=(D=A.get(R+1))==null?void 0:D.isWrapped;if(N+=M.translateToString(!H),!H||R===A.length-1){const U=document.createElement("div");U.textContent=N,T.push(U),N.length>0&&(v=U),N=""}}return{bufferElements:T,cursorElement:v}}getLinesScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let f=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(f/=this._currentRowHeight+0,this._wheelPartialScroll+=f,f=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._bufferService.rows),f}_applyScrollModifier(m,f){const v=this._optionsService.rawOptions.fastScrollModifier;return v==="alt"&&f.altKey||v==="ctrl"&&f.ctrlKey||v==="shift"&&f.shiftKey?m*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:m*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(m){this._lastTouchY=m.touches[0].pageY}handleTouchMove(m){const f=this._lastTouchY-m.touches[0].pageY;return this._lastTouchY=m.touches[0].pageY,f!==0&&(this._viewportElement.scrollTop+=f,this._bubbleScroll(m,f))}};r.Viewport=c=g([_(2,b.IBufferService),_(3,b.IOptionsService),_(4,p.ICharSizeService),_(5,p.IRenderService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],c)},3107:function(y,r,l){var g=this&&this.__decorate||function(b,c,m,f){var v,N=arguments.length,T=N<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,c,m,f);else for(var E=b.length-1;E>=0;E--)(v=b[E])&&(T=(N<3?v(T):N>3?v(c,m,T):v(c,m))||T);return N>3&&T&&Object.defineProperty(c,m,T),T},_=this&&this.__param||function(b,c){return function(m,f){c(m,f,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;const u=l(4725),p=l(844),S=l(2585);let C=r.BufferDecorationRenderer=class extends p.Disposable{constructor(b,c,m,f,v){super(),this._screenElement=b,this._bufferService=c,this._coreBrowserService=m,this._decorationService=f,this._renderService=v,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,p.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 b of this._decorationService.decorations)this._renderDecoration(b);this._dimensionsChanged=!1}_renderDecoration(b){this._refreshStyle(b),this._dimensionsChanged&&this._refreshXPosition(b)}_createElement(b){var f;const c=this._coreBrowserService.mainDocument.createElement("div");c.classList.add("xterm-decoration"),c.classList.toggle("xterm-decoration-top-layer",((f=b==null?void 0:b.options)==null?void 0:f.layer)==="top"),c.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,c.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",c.style.top=(b.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",c.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const m=b.options.x??0;return m&&m>this._bufferService.cols&&(c.style.display="none"),this._refreshXPosition(b,c),c}_refreshStyle(b){const c=b.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let m=this._decorationElements.get(b);m||(m=this._createElement(b),b.element=m,this._decorationElements.set(b,m),this._container.appendChild(m),b.onDispose(()=>{this._decorationElements.delete(b),m.remove()})),m.style.top=c*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(m)}}_refreshXPosition(b,c=b.element){if(!c)return;const m=b.options.x??0;(b.options.anchor||"left")==="right"?c.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":c.style.left=m?m*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(b){var c;(c=this._decorationElements.get(b))==null||c.remove(),this._decorationElements.delete(b),b.dispose()}};r.BufferDecorationRenderer=C=g([_(1,S.IBufferService),_(2,u.ICoreBrowserService),_(3,S.IDecorationService),_(4,u.IRenderService)],C)},5871:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorZoneStore=void 0,r.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(l){if(l.options.overviewRulerOptions){for(const g of this._zones)if(g.color===l.options.overviewRulerOptions.color&&g.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(g,l.marker.line))return;if(this._lineAdjacentToZone(g,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(g,l.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=l.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=l.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=l.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=l.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:l.options.overviewRulerOptions.color,position:l.options.overviewRulerOptions.position,startBufferLine:l.marker.line,endBufferLine:l.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(l){this._linePadding=l}_lineIntersectsZone(l,g){return g>=l.startBufferLine&&g<=l.endBufferLine}_lineAdjacentToZone(l,g,_){return g>=l.startBufferLine-this._linePadding[_||"full"]&&g<=l.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(l,g){l.startBufferLine=Math.min(l.startBufferLine,g),l.endBufferLine=Math.max(l.endBufferLine,g)}}},5744:function(y,r,l){var g=this&&this.__decorate||function(v,N,T,E){var A,D=arguments.length,R=D<3?N:E===null?E=Object.getOwnPropertyDescriptor(N,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(v,N,T,E);else for(var M=v.length-1;M>=0;M--)(A=v[M])&&(R=(D<3?A(R):D>3?A(N,T,R):A(N,T))||R);return D>3&&R&&Object.defineProperty(N,T,R),R},_=this&&this.__param||function(v,N){return function(T,E){N(T,E,v)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;const u=l(5871),p=l(4725),S=l(844),C=l(2585),b={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0};let f=r.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(v,N,T,E,A,D,R){var H;super(),this._viewportElement=v,this._screenElement=N,this._bufferService=T,this._decorationService=E,this._renderService=A,this._optionsService=D,this._coreBrowserService=R,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(H=this._viewportElement.parentElement)==null||H.insertBefore(this._canvas,this._viewportElement);const M=this._canvas.getContext("2d");if(!M)throw new Error("Ctx cannot be null");this._ctx=M,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)(()=>{var U;(U=this._canvas)==null||U.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 v=Math.floor(this._canvas.width/3),N=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=v,c.center=N,c.right=v,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=c.left,m.right=c.left+c.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);const v=this._canvas.height/this._bufferService.buffer.lines.length,N=Math.round(Math.max(Math.min(v,12),6)*this._coreBrowserService.dpr);b.left=N,b.center=N,b.right=N}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.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 v=this._colorZoneStore.zones;for(const N of v)N.position!=="full"&&this._renderColorZone(N);for(const N of v)N.position==="full"&&this._renderColorZone(N);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(v){this._ctx.fillStyle=v.color,this._ctx.fillRect(m[v.position||"full"],Math.round((this._canvas.height-1)*(v.startBufferLine/this._bufferService.buffers.active.lines.length)-b[v.position||"full"]/2),c[v.position||"full"],Math.round((this._canvas.height-1)*((v.endBufferLine-v.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[v.position||"full"]))}_queueRefresh(v,N){this._shouldUpdateDimensions=v||this._shouldUpdateDimensions,this._shouldUpdateAnchor=N||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};r.OverviewRulerRenderer=f=g([_(2,C.IBufferService),_(3,C.IDecorationService),_(4,p.IRenderService),_(5,C.IOptionsService),_(6,p.ICoreBrowserService)],f)},2950:function(y,r,l){var g=this&&this.__decorate||function(b,c,m,f){var v,N=arguments.length,T=N<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,c,m,f);else for(var E=b.length-1;E>=0;E--)(v=b[E])&&(T=(N<3?v(T):N>3?v(c,m,T):v(c,m))||T);return N>3&&T&&Object.defineProperty(c,m,T),T},_=this&&this.__param||function(b,c){return function(m,f){c(m,f,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;const u=l(4725),p=l(2585),S=l(2584);let C=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,c,m,f,v,N){this._textarea=b,this._compositionView=c,this._bufferService=m,this._optionsService=f,this._coreService=v,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(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){const c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let m;this._isSendingComposition=!1,c.start+=this._dataAlreadySent.length,m=this._isComposing?this._textarea.value.substring(c.start,c.end):this._textarea.value.substring(c.start),m.length>0&&this._coreService.triggerDataEvent(m,!0)}},0)}else{this._isSendingComposition=!1;const c=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(c,!0)}}_handleAnyTextareaChanges(){const b=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const c=this._textarea.value,m=c.replace(b,"");this._dataAlreadySent=m,c.length>b.length?this._coreService.triggerDataEvent(m,!0):c.length<b.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):c.length===b.length&&c!==b&&this._coreService.triggerDataEvent(c,!0)}},0)}updateCompositionElements(b){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._renderService.dimensions.css.cell.height,f=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,v=c*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=v+"px",this._compositionView.style.top=f+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"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=v+"px",this._textarea.style.top=f+"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"}b||setTimeout(()=>this.updateCompositionElements(!0),0)}}};r.CompositionHelper=C=g([_(2,p.IBufferService),_(3,p.IOptionsService),_(4,p.ICoreService),_(5,u.IRenderService)],C)},9806:(y,r)=>{function l(g,_,u){const p=u.getBoundingClientRect(),S=g.getComputedStyle(u),C=parseInt(S.getPropertyValue("padding-left")),b=parseInt(S.getPropertyValue("padding-top"));return[_.clientX-p.left-C,_.clientY-p.top-b]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=l,r.getCoords=function(g,_,u,p,S,C,b,c,m){if(!C)return;const f=l(g,_,u);return f?(f[0]=Math.ceil((f[0]+(m?b/2:0))/b),f[1]=Math.ceil(f[1]/c),f[0]=Math.min(Math.max(f[0],1),p+(m?1:0)),f[1]=Math.min(Math.max(f[1],1),S),f):void 0}},9504:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;const g=l(2584);function _(c,m,f,v){const N=c-u(c,f),T=m-u(m,f),E=Math.abs(N-T)-function(A,D,R){let M=0;const H=A-u(A,R),U=D-u(D,R);for(let I=0;I<Math.abs(H-U);I++){const G=p(A,D)==="A"?-1:1,ne=R.buffer.lines.get(H+G*I);ne!=null&&ne.isWrapped&&M++}return M}(c,m,f);return b(E,C(p(c,m),v))}function u(c,m){let f=0,v=m.buffer.lines.get(c),N=v==null?void 0:v.isWrapped;for(;N&&c>=0&&c<m.rows;)f++,v=m.buffer.lines.get(--c),N=v==null?void 0:v.isWrapped;return f}function p(c,m){return c>m?"A":"B"}function S(c,m,f,v,N,T){let E=c,A=m,D="";for(;E!==f||A!==v;)E+=N?1:-1,N&&E>T.cols-1?(D+=T.buffer.translateBufferLineToString(A,!1,c,E),E=0,c=0,A++):!N&&E<0&&(D+=T.buffer.translateBufferLineToString(A,!1,0,c+1),E=T.cols-1,c=E,A--);return D+T.buffer.translateBufferLineToString(A,!1,c,E)}function C(c,m){const f=m?"O":"[";return g.C0.ESC+f+c}function b(c,m){c=Math.floor(c);let f="";for(let v=0;v<c;v++)f+=m;return f}r.moveToCellSequence=function(c,m,f,v){const N=f.buffer.x,T=f.buffer.y;if(!f.buffer.hasScrollback)return function(D,R,M,H,U,I){return _(R,H,U,I).length===0?"":b(S(D,R,D,R-u(R,U),!1,U).length,C("D",I))}(N,T,0,m,f,v)+_(T,m,f,v)+function(D,R,M,H,U,I){let G;G=_(R,H,U,I).length>0?H-u(H,U):R;const ne=H,Q=function(te,ie,P,$,J,ee){let we;return we=_(P,$,J,ee).length>0?$-u($,J):ie,te<P&&we<=$||te>=P&&we<$?"C":"D"}(D,R,M,H,U,I);return b(S(D,G,M,ne,Q==="C",U).length,C(Q,I))}(N,T,c,m,f,v);let E;if(T===m)return E=N>c?"D":"C",b(Math.abs(N-c),C(E,v));E=T>m?"D":"C";const A=Math.abs(T-m);return b(function(D,R){return R.cols-D}(T>m?c:N,f)+(A-1)*f.cols+1+((T>m?N:c)-1),C(E,v))}},1296:function(y,r,l){var g=this&&this.__decorate||function(I,G,ne,Q){var te,ie=arguments.length,P=ie<3?G:Q===null?Q=Object.getOwnPropertyDescriptor(G,ne):Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(I,G,ne,Q);else for(var $=I.length-1;$>=0;$--)(te=I[$])&&(P=(ie<3?te(P):ie>3?te(G,ne,P):te(G,ne))||P);return ie>3&&P&&Object.defineProperty(G,ne,P),P},_=this&&this.__param||function(I,G){return function(ne,Q){G(ne,Q,I)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;const u=l(3787),p=l(2550),S=l(2223),C=l(6171),b=l(6052),c=l(4725),m=l(8055),f=l(8460),v=l(844),N=l(2585),T="xterm-dom-renderer-owner-",E="xterm-rows",A="xterm-fg-",D="xterm-bg-",R="xterm-focus",M="xterm-selection";let H=1,U=r.DomRenderer=class extends v.Disposable{constructor(I,G,ne,Q,te,ie,P,$,J,ee,we,Se,Z){super(),this._terminal=I,this._document=G,this._element=ne,this._screenElement=Q,this._viewportElement=te,this._helperContainer=ie,this._linkifier2=P,this._charSizeService=J,this._optionsService=ee,this._bufferService=we,this._coreBrowserService=Se,this._themeService=Z,this._terminalClass=H++,this._rowElements=[],this._selectionRenderModel=(0,b.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),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(M),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(ke=>this._injectCss(ke))),this._injectCss(this._themeService.colors),this._rowFactory=$.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(T+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(ke=>this._handleLinkHover(ke))),this.register(this._linkifier2.onHideLinkUnderline(ke=>this._handleLinkLeave(ke))),this.register((0,v.toDisposable)(()=>{this._element.classList.remove(T+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new p.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} .${E} 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} .${E} { 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} .${E} .xterm-dim { color: ${m.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}`,Q=`blink_bar_${this._terminalClass}`,te=`blink_block_${this._terminalClass}`;G+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,G+=`@keyframes ${Q} { 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} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${te} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,G+=`${this._terminalSelector} .${M} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${M} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${M} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[ie,P]of I.ansi.entries())G+=`${this._terminalSelector} .${A}${ie} { color: ${P.css}; }${this._terminalSelector} .${A}${ie}.xterm-dim { color: ${m.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${D}${ie} { background-color: ${P.css}; }`;G+=`${this._terminalSelector} .${A}${S.INVERTED_DEFAULT_COLOR} { color: ${m.color.opaque(I.background).css}; }${this._terminalSelector} .${A}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${m.color.multiplyOpacity(m.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 Q=this._document.createElement("div");this._rowContainer.appendChild(Q),this._rowElements.push(Q)}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(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),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 Q=this._selectionRenderModel.viewportStartRow,te=this._selectionRenderModel.viewportEndRow,ie=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(ie>=this._bufferService.rows||P<0)return;const $=this._document.createDocumentFragment();if(ne){const J=I[0]>G[0];$.appendChild(this._createSelectionElement(ie,J?G[0]:I[0],J?I[0]:G[0],P-ie+1))}else{const J=Q===ie?I[0]:0,ee=ie===te?G[0]:this._bufferService.cols;$.appendChild(this._createSelectionElement(ie,J,ee));const we=P-ie-1;if($.appendChild(this._createSelectionElement(ie+1,0,this._bufferService.cols,we)),ie!==P){const Se=te===P?G[0]:this._bufferService.cols;$.appendChild(this._createSelectionElement(P,0,Se))}}this._selectionContainer.appendChild($)}_createSelectionElement(I,G,ne,Q=1){const te=this._document.createElement("div"),ie=G*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(ne-G);return ie+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-ie),te.style.height=Q*this.dimensions.css.cell.height+"px",te.style.top=I*this.dimensions.css.cell.height+"px",te.style.left=`${ie}px`,te.style.width=`${P}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,Q=ne.ybase+ne.y,te=Math.min(ne.x,this._bufferService.cols-1),ie=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,$=this._optionsService.rawOptions.cursorInactiveStyle;for(let J=I;J<=G;J++){const ee=J+ne.ydisp,we=this._rowElements[J],Se=ne.lines.get(ee);if(!we||!Se)break;we.replaceChildren(...this._rowFactory.createRow(Se,ee,ee===Q,P,$,te,ie,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${T}${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,Q,te,ie){ne<0&&(I=0),Q<0&&(G=0);const P=this._bufferService.rows-1;ne=Math.max(Math.min(ne,P),0),Q=Math.max(Math.min(Q,P),0),te=Math.min(te,this._bufferService.cols);const $=this._bufferService.buffer,J=$.ybase+$.y,ee=Math.min($.x,te-1),we=this._optionsService.rawOptions.cursorBlink,Se=this._optionsService.rawOptions.cursorStyle,Z=this._optionsService.rawOptions.cursorInactiveStyle;for(let ke=ne;ke<=Q;++ke){const se=ke+$.ydisp,W=this._rowElements[ke],_e=$.lines.get(se);if(!W||!_e)break;W.replaceChildren(...this._rowFactory.createRow(_e,se,se===J,Se,Z,ee,we,this.dimensions.css.cell.width,this._widthCache,ie?ke===ne?I:0:-1,ie?(ke===Q?G:te)-1:-1))}}};r.DomRenderer=U=g([_(7,N.IInstantiationService),_(8,c.ICharSizeService),_(9,N.IOptionsService),_(10,N.IBufferService),_(11,c.ICoreBrowserService),_(12,c.IThemeService)],U)},3787:function(y,r,l){var g=this&&this.__decorate||function(E,A,D,R){var M,H=arguments.length,U=H<3?A:R===null?R=Object.getOwnPropertyDescriptor(A,D):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(E,A,D,R);else for(var I=E.length-1;I>=0;I--)(M=E[I])&&(U=(H<3?M(U):H>3?M(A,D,U):M(A,D))||U);return H>3&&U&&Object.defineProperty(A,D,U),U},_=this&&this.__param||function(E,A){return function(D,R){A(D,R,E)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;const u=l(2223),p=l(643),S=l(511),C=l(2585),b=l(8055),c=l(4725),m=l(4269),f=l(6171),v=l(3734);let N=r.DomRendererRowFactory=class{constructor(E,A,D,R,M,H,U){this._document=E,this._characterJoinerService=A,this._optionsService=D,this._coreBrowserService=R,this._coreService=M,this._decorationService=H,this._themeService=U,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,A,D){this._selectionStart=E,this._selectionEnd=A,this._columnSelectMode=D}createRow(E,A,D,R,M,H,U,I,G,ne,Q){const te=[],ie=this._characterJoinerService.getJoinedCharacters(A),P=this._themeService.colors;let $,J=E.getNoBgTrimmedLength();D&&J<H+1&&(J=H+1);let ee=0,we="",Se=0,Z=0,ke=0,se=!1,W=0,_e=!1,ue=0;const Ie=[],Ue=ne!==-1&&Q!==-1;for(let Xe=0;Xe<J;Xe++){E.loadCell(Xe,this._workCell);let Je=this._workCell.getWidth();if(Je===0)continue;let rt=!1,Nt=Xe,Ze=this._workCell;if(ie.length>0&&Xe===ie[0][0]){rt=!0;const Oe=ie.shift();Ze=new m.JoinedCellData(this._workCell,E.translateToString(!0,Oe[0],Oe[1]),Oe[1]-Oe[0]),Nt=Oe[1]-1,Je=Ze.getWidth()}const qt=this._isCellInSelection(Xe,A),Xt=D&&Xe===H,lt=Ue&&Xe>=ne&&Xe<=Q;let Qe=!1;this._decorationService.forEachDecorationAtCell(Xe,A,void 0,Oe=>{Qe=!0});let nt=Ze.getChars()||p.WHITESPACE_CELL_CHAR;if(nt===" "&&(Ze.isUnderline()||Ze.isOverline())&&(nt=" "),ue=Je*I-G.get(nt,Ze.isBold(),Ze.isItalic()),$){if(ee&&(qt&&_e||!qt&&!_e&&Ze.bg===Se)&&(qt&&_e&&P.selectionForeground||Ze.fg===Z)&&Ze.extended.ext===ke&&lt===se&&ue===W&&!Xt&&!rt&&!Qe){Ze.isInvisible()?we+=p.WHITESPACE_CELL_CHAR:we+=nt,ee++;continue}ee&&($.textContent=we),$=this._document.createElement("span"),ee=0,we=""}else $=this._document.createElement("span");if(Se=Ze.bg,Z=Ze.fg,ke=Ze.extended.ext,se=lt,W=ue,_e=qt,rt&&H>=Xe&&H<=Nt&&(H=Xe),!this._coreService.isCursorHidden&&Xt&&this._coreService.isCursorInitialized){if(Ie.push("xterm-cursor"),this._coreBrowserService.isFocused)U&&Ie.push("xterm-cursor-blink"),Ie.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(M)switch(M){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(Ze.isBold()&&Ie.push("xterm-bold"),Ze.isItalic()&&Ie.push("xterm-italic"),Ze.isDim()&&Ie.push("xterm-dim"),we=Ze.isInvisible()?p.WHITESPACE_CELL_CHAR:Ze.getChars()||p.WHITESPACE_CELL_CHAR,Ze.isUnderline()&&(Ie.push(`xterm-underline-${Ze.extended.underlineStyle}`),we===" "&&(we=" "),!Ze.isUnderlineColorDefault()))if(Ze.isUnderlineColorRGB())$.style.textDecorationColor=`rgb(${v.AttributeData.toColorRGB(Ze.getUnderlineColor()).join(",")})`;else{let Oe=Ze.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ze.isBold()&&Oe<8&&(Oe+=8),$.style.textDecorationColor=P.ansi[Oe].css}Ze.isOverline()&&(Ie.push("xterm-overline"),we===" "&&(we=" ")),Ze.isStrikethrough()&&Ie.push("xterm-strikethrough"),lt&&($.style.textDecoration="underline");let ae=Ze.getFgColor(),Fe=Ze.getFgColorMode(),et=Ze.getBgColor(),ve=Ze.getBgColorMode();const Ye=!!Ze.isInverse();if(Ye){const Oe=ae;ae=et,et=Oe;const bt=Fe;Fe=ve,ve=bt}let Ee,pe,me,Re=!1;switch(this._decorationService.forEachDecorationAtCell(Xe,A,void 0,Oe=>{Oe.options.layer!=="top"&&Re||(Oe.backgroundColorRGB&&(ve=50331648,et=Oe.backgroundColorRGB.rgba>>8&16777215,Ee=Oe.backgroundColorRGB),Oe.foregroundColorRGB&&(Fe=50331648,ae=Oe.foregroundColorRGB.rgba>>8&16777215,pe=Oe.foregroundColorRGB),Re=Oe.options.layer==="top")}),!Re&&qt&&(Ee=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,et=Ee.rgba>>8&16777215,ve=50331648,Re=!0,P.selectionForeground&&(Fe=50331648,ae=P.selectionForeground.rgba>>8&16777215,pe=P.selectionForeground)),Re&&Ie.push("xterm-decoration-top"),ve){case 16777216:case 33554432:me=P.ansi[et],Ie.push(`xterm-bg-${et}`);break;case 50331648:me=b.channels.toColor(et>>16,et>>8&255,255&et),this._addStyle($,`background-color:#${T((et>>>0).toString(16),"0",6)}`);break;default:Ye?(me=P.foreground,Ie.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):me=P.background}switch(Ee||Ze.isDim()&&(Ee=b.color.multiplyOpacity(me,.5)),Fe){case 16777216:case 33554432:Ze.isBold()&&ae<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ae+=8),this._applyMinimumContrast($,me,P.ansi[ae],Ze,Ee,void 0)||Ie.push(`xterm-fg-${ae}`);break;case 50331648:const Oe=b.channels.toColor(ae>>16&255,ae>>8&255,255&ae);this._applyMinimumContrast($,me,Oe,Ze,Ee,pe)||this._addStyle($,`color:#${T(ae.toString(16),"0",6)}`);break;default:this._applyMinimumContrast($,me,P.foreground,Ze,Ee,pe)||Ye&&Ie.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}Ie.length&&($.className=Ie.join(" "),Ie.length=0),Xt||rt||Qe?$.textContent=we:ee++,ue!==this.defaultSpacing&&($.style.letterSpacing=`${ue}px`),te.push($),Xe=Nt}return $&&ee&&($.textContent=we),te}_applyMinimumContrast(E,A,D,R,M,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const U=this._getContrastCache(R);let I;if(M||H||(I=U.getColor(A.rgba,D.rgba)),I===void 0){const G=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);I=b.color.ensureContrastRatio(M||A,H||D,G),U.setColor((M||A).rgba,(H||D).rgba,I??null)}return!!I&&(this._addStyle(E,`color:${I.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,A){E.setAttribute("style",`${E.getAttribute("style")||""}${A};`)}_isCellInSelection(E,A){const D=this._selectionStart,R=this._selectionEnd;return!(!D||!R)&&(this._columnSelectMode?D[0]<=R[0]?E>=D[0]&&A>=D[1]&&E<R[0]&&A<=R[1]:E<D[0]&&A>=D[1]&&E>=R[0]&&A<=R[1]:A>D[1]&&A<R[1]||D[1]===R[1]&&A===D[1]&&E>=D[0]&&E<R[0]||D[1]<R[1]&&A===R[1]&&E<R[0]||D[1]<R[1]&&A===D[1]&&E>=D[0])}};function T(E,A,D){for(;E.length<D;)E=A+E;return E}r.DomRendererRowFactory=N=g([_(1,c.ICharacterJoinerService),_(2,C.IOptionsService),_(3,c.ICoreBrowserService),_(4,C.ICoreService),_(5,C.IDecorationService),_(6,c.IThemeService)],N)},2550:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(l,g){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.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 _=l.createElement("span");_.classList.add("xterm-char-measure-element");const u=l.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const p=l.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const S=l.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[_,u,p,S],this._container.appendChild(_),this._container.appendChild(u),this._container.appendChild(p),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(l,g,_,u){l===this._font&&g===this._fontSize&&_===this._weight&&u===this._weightBold||(this._font=l,this._fontSize=g,this._weight=_,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(l,g,_){let u=0;if(!g&&!_&&l.length===1&&(u=l.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const C=this._measure(l,0);return C>0&&(this._flat[u]=C),C}let p=l;g&&(p+="B"),_&&(p+="I");let S=this._holey.get(p);if(S===void 0){let C=0;g&&(C|=1),_&&(C|=2),S=this._measure(l,C),S>0&&this._holey.set(p,S)}return S}_measure(l,g){const _=this._measureElements[g];return _.textContent=l.repeat(32),_.offsetWidth/32}}},2223:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;const g=l(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},6171:(y,r)=>{function l(_){return 57508<=_&&_<=57558}function g(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},r.isPowerlineGlyph=l,r.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},r.isEmoji=g,r.allowRescaling=function(_,u,p,S){return u===1&&p>Math.ceil(1.5*S)&&_!==void 0&&_>255&&!g(_)&&!l(_)&&!function(C){return 57344<=C&&C<=63743}(_)},r.treatGlyphAsBackgroundColor=function(_){return l(_)||function(u){return 9472<=u&&u<=9631}(_)},r.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}}}},r.computeNextVariantOffset=function(_,u,p=0){return(_-(2*Math.round(u)-p))%(2*Math.round(u))}},6052:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class l{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(_,u,p,S=!1){if(this.selectionStart=u,this.selectionEnd=p,!u||!p||u[0]===p[0]&&u[1]===p[1])return void this.clear();const C=_.buffers.active.ydisp,b=u[1]-C,c=p[1]-C,m=Math.max(b,0),f=Math.min(c,_.rows-1);m>=_.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=b,this.viewportEndRow=c,this.viewportCappedStartRow=m,this.viewportCappedEndRow=f,this.startCol=u[0],this.endCol=p[0])}isCellSelected(_,u,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&p>=this.viewportCappedStartRow&&u<this.endCol&&p<=this.viewportCappedEndRow:u<this.startCol&&p>=this.viewportCappedStartRow&&u>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol)}}r.createSelectionRenderModel=function(){return new l}},456:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.SelectionModel=class{constructor(l){this._bufferService=l,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 l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,g=this.selectionEnd;return!(!l||!g)&&(l[1]>g[1]||l[1]===g[1]&&l[0]>g[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(y,r,l){var g=this&&this.__decorate||function(f,v,N,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,N):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,N,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,N,D):E(v,N))||D);return A>3&&D&&Object.defineProperty(v,N,D),D},_=this&&this.__param||function(f,v){return function(N,T){v(N,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;const u=l(2585),p=l(8460),S=l(844);let C=r.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(f,v,N){super(),this._optionsService=N,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new m(this._optionsService))}catch{this._measureStrategy=this.register(new c(f,v,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const f=this._measureStrategy.measure();f.width===this.width&&f.height===this.height||(this.width=f.width,this.height=f.height,this._onCharSizeChange.fire())}};r.CharSizeService=C=g([_(2,u.IOptionsService)],C);class b extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(v,N){v!==void 0&&v>0&&N!==void 0&&N>0&&(this._result.width=v,this._result.height=N)}}class c extends b{constructor(v,N,T){super(),this._document=v,this._parentElement=N,this._optionsService=T,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 m extends b{constructor(v){super(),this._optionsService=v,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 v=this._ctx.measureText("W");return this._validateAndSet(v.width,v.fontBoundingBoxAscent+v.fontBoundingBoxDescent),this._result}}},4269:function(y,r,l){var g=this&&this.__decorate||function(m,f,v,N){var T,E=arguments.length,A=E<3?f:N===null?N=Object.getOwnPropertyDescriptor(f,v):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,v,N);else for(var D=m.length-1;D>=0;D--)(T=m[D])&&(A=(E<3?T(A):E>3?T(f,v,A):T(f,v))||A);return E>3&&A&&Object.defineProperty(f,v,A),A},_=this&&this.__param||function(m,f){return function(v,N){f(v,N,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;const u=l(3734),p=l(643),S=l(511),C=l(2585);class b extends u.AttributeData{constructor(f,v,N){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=v,this._width=N}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(f){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=b;let c=r.CharacterJoinerService=class P1{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(f){const v={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(v),v.id}deregister(f){for(let v=0;v<this._characterJoiners.length;v++)if(this._characterJoiners[v].id===f)return this._characterJoiners.splice(v,1),!0;return!1}getJoinedCharacters(f){if(this._characterJoiners.length===0)return[];const v=this._bufferService.buffer.lines.get(f);if(!v||v.length===0)return[];const N=[],T=v.translateToString(!0);let E=0,A=0,D=0,R=v.getFg(0),M=v.getBg(0);for(let H=0;H<v.getTrimmedLength();H++)if(v.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==M){if(H-E>1){const U=this._getJoinedRanges(T,D,A,v,E);for(let I=0;I<U.length;I++)N.push(U[I])}E=H,D=A,R=this._workCell.fg,M=this._workCell.bg}A+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-E>1){const H=this._getJoinedRanges(T,D,A,v,E);for(let U=0;U<H.length;U++)N.push(H[U])}return N}_getJoinedRanges(f,v,N,T,E){const A=f.substring(v,N);let D=[];try{D=this._characterJoiners[0].handler(A)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const M=this._characterJoiners[R].handler(A);for(let H=0;H<M.length;H++)P1._mergeRanges(D,M[H])}catch(M){console.error(M)}return this._stringRangesToCellRanges(D,T,E),D}_stringRangesToCellRanges(f,v,N){let T=0,E=!1,A=0,D=f[T];if(D){for(let R=N;R<this._bufferService.cols;R++){const M=v.getWidth(R),H=v.getString(R).length||p.WHITESPACE_CELL_CHAR.length;if(M!==0){if(!E&&D[0]<=A&&(D[0]=R,E=!0),D[1]<=A){if(D[1]=R,D=f[++T],!D)break;D[0]<=A?(D[0]=R,E=!0):E=!1}A+=H}}D&&(D[1]=this._bufferService.cols)}}static _mergeRanges(f,v){let N=!1;for(let T=0;T<f.length;T++){const E=f[T];if(N){if(v[1]<=E[0])return f[T-1][1]=v[1],f;if(v[1]<=E[1])return f[T-1][1]=Math.max(v[1],E[1]),f.splice(T,1),f;f.splice(T,1),T--}else{if(v[1]<=E[0])return f.splice(T,0,v),f;if(v[1]<=E[1])return E[0]=Math.min(v[0],E[0]),f;v[0]<E[1]&&(E[0]=Math.min(v[0],E[0]),N=!0)}}return N?f[f.length-1][1]=v[1]:f.push(v),f}};r.CharacterJoinerService=c=g([_(0,C.IBufferService)],c)},5114:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;const g=l(844),_=l(8460),u=l(3656);class p extends g.Disposable{constructor(b,c,m){super(),this._textarea=b,this._window=c,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(f=>this._screenDprMonitor.setWindow(f))),this.register((0,_.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(b){this._window!==b&&(this._window=b,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}}r.CoreBrowserService=p;class S extends g.Disposable{constructor(b){super(),this._parentWindow=b,this._windowResizeListener=this.register(new g.MutableDisposable),this._onDprChange=this.register(new _.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(b){this._parentWindow=b,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var b;this._outerListener&&((b=this._resolutionMediaMatchList)==null||b.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:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;const g=l(844);class _ extends g.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,g.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const S=this.linkProviders.indexOf(p);S!==-1&&this.linkProviders.splice(S,1)}}}}r.LinkProviderService=_},8934:function(y,r,l){var g=this&&this.__decorate||function(C,b,c,m){var f,v=arguments.length,N=v<3?b:m===null?m=Object.getOwnPropertyDescriptor(b,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(C,b,c,m);else for(var T=C.length-1;T>=0;T--)(f=C[T])&&(N=(v<3?f(N):v>3?f(b,c,N):f(b,c))||N);return v>3&&N&&Object.defineProperty(b,c,N),N},_=this&&this.__param||function(C,b){return function(c,m){b(c,m,C)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;const u=l(4725),p=l(9806);let S=r.MouseService=class{constructor(C,b){this._renderService=C,this._charSizeService=b}getCoords(C,b,c,m,f){return(0,p.getCoords)(window,C,b,c,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(C,b){const c=(0,p.getCoordsRelativeToElement)(window,C,b);if(this._charSizeService.hasValidSize)return c[0]=Math.min(Math.max(c[0],0),this._renderService.dimensions.css.canvas.width-1),c[1]=Math.min(Math.max(c[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(c[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(c[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(c[0]),y:Math.floor(c[1])}}};r.MouseService=S=g([_(0,u.IRenderService),_(1,u.ICharSizeService)],S)},3230:function(y,r,l){var g=this&&this.__decorate||function(f,v,N,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,N):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,N,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,N,D):E(v,N))||D);return A>3&&D&&Object.defineProperty(v,N,D),D},_=this&&this.__param||function(f,v){return function(N,T){v(N,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;const u=l(6193),p=l(4725),S=l(8460),C=l(844),b=l(7226),c=l(2585);let m=r.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(f,v,N,T,E,A,D,R){super(),this._rowCount=f,this._charSizeService=T,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new b.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 u.RenderDebouncer((M,H)=>this._renderRows(M,H),D),this.register(this._renderDebouncer),this.register(D.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(A.onResize(()=>this._fullRefresh())),this.register(A.buffers.onBufferActivate(()=>{var M;return(M=this._renderer.value)==null?void 0:M.clear()})),this.register(N.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(E.onDecorationRegistered(()=>this._fullRefresh())),this.register(E.onDecorationRemoved(()=>this._fullRefresh())),this.register(N.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()})),this.register(N.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(A.buffer.y,A.buffer.y,!0))),this.register(R.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(D.window,v),this.register(D.onWindowChange(M=>this._registerIntersectionObserver(M,v)))}_registerIntersectionObserver(f,v){if("IntersectionObserver"in f){const N=new f.IntersectionObserver(T=>this._handleIntersectionChange(T[T.length-1]),{threshold:0});N.observe(v),this._observerDisposable.value=(0,C.toDisposable)(()=>N.disconnect())}}_handleIntersectionChange(f){this._isPaused=f.isIntersecting===void 0?f.intersectionRatio===0:!f.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(f,v,N=!1){this._isPaused?this._needsFullRefresh=!0:(N||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,v,this._rowCount))}_renderRows(f,v){this._renderer.value&&(f=Math.min(f,this._rowCount-1),v=Math.min(v,this._rowCount-1),this._renderer.value.renderRows(f,v),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:f,end:v}),this._onRender.fire({start:f,end:v}),this._isNextRenderRedrawOnly=!0)}resize(f,v){this._rowCount=v,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(f){this._renderer.value=f,this._renderer.value&&(this._renderer.value.onRequestRedraw(v=>this.refreshRows(v.start,v.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(f){return this._renderDebouncer.addRefreshCallback(f)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var f,v;this._renderer.value&&((v=(f=this._renderer.value).clearTextureAtlas)==null||v.call(f),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(f,v){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var N;return(N=this._renderer.value)==null?void 0:N.handleResize(f,v)}):this._renderer.value.handleResize(f,v),this._fullRefresh())}handleCharSizeChanged(){var f;(f=this._renderer.value)==null||f.handleCharSizeChanged()}handleBlur(){var f;(f=this._renderer.value)==null||f.handleBlur()}handleFocus(){var f;(f=this._renderer.value)==null||f.handleFocus()}handleSelectionChanged(f,v,N){var T;this._selectionState.start=f,this._selectionState.end=v,this._selectionState.columnSelectMode=N,(T=this._renderer.value)==null||T.handleSelectionChanged(f,v,N)}handleCursorMove(){var f;(f=this._renderer.value)==null||f.handleCursorMove()}clear(){var f;(f=this._renderer.value)==null||f.clear()}};r.RenderService=m=g([_(2,c.IOptionsService),_(3,p.ICharSizeService),_(4,c.IDecorationService),_(5,c.IBufferService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],m)},9312:function(y,r,l){var g=this&&this.__decorate||function(D,R,M,H){var U,I=arguments.length,G=I<3?R:H===null?H=Object.getOwnPropertyDescriptor(R,M):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(D,R,M,H);else for(var ne=D.length-1;ne>=0;ne--)(U=D[ne])&&(G=(I<3?U(G):I>3?U(R,M,G):U(R,M))||G);return I>3&&G&&Object.defineProperty(R,M,G),G},_=this&&this.__param||function(D,R){return function(M,H){R(M,H,D)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;const u=l(9806),p=l(9504),S=l(456),C=l(4725),b=l(8460),c=l(844),m=l(6114),f=l(4841),v=l(511),N=l(2585),T=" ",E=new RegExp(T,"g");let A=r.SelectionService=class extends c.Disposable{constructor(D,R,M,H,U,I,G,ne,Q){super(),this._element=D,this._screenElement=R,this._linkifier=M,this._bufferService=H,this._coreService=U,this._mouseService=I,this._optionsService=G,this._renderService=ne,this._coreBrowserService=Q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new v.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.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,c.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!D||!R||D[0]===R[0]&&D[1]===R[1])}get selectionText(){const D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!D||!R)return"";const M=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(D[0]===R[0])return"";const U=D[0]<R[0]?D[0]:R[0],I=D[0]<R[0]?R[0]:D[0];for(let G=D[1];G<=R[1];G++){const ne=M.translateBufferLineToString(G,!0,U,I);H.push(ne)}}else{const U=D[1]===R[1]?R[0]:void 0;H.push(M.translateBufferLineToString(D[1],!0,D[0],U));for(let I=D[1]+1;I<=R[1]-1;I++){const G=M.lines.get(I),ne=M.translateBufferLineToString(I,!0);G!=null&&G.isWrapped?H[H.length-1]+=ne:H.push(ne)}if(D[1]!==R[1]){const I=M.lines.get(R[1]),G=M.translateBufferLineToString(R[1],!0,0,R[0]);I&&I.isWrapped?H[H.length-1]+=G:H.push(G)}}return H.map(U=>U.replace(E," ")).join(m.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())),m.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 R=this._getMouseBufferCoords(D),M=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(M&&H&&R)&&this._areCoordsInSelection(R,M,H)}isCellInSelection(D,R){const M=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!M||!H)&&this._areCoordsInSelection([D,R],M,H)}_areCoordsInSelection(D,R,M){return D[1]>R[1]&&D[1]<M[1]||R[1]===M[1]&&D[1]===R[1]&&D[0]>=R[0]&&D[0]<M[0]||R[1]<M[1]&&D[1]===M[1]&&D[0]<M[0]||R[1]<M[1]&&D[1]===R[1]&&D[0]>=R[0]}_selectWordAtCursor(D,R){var U,I;const M=(I=(U=this._linkifier.currentLink)==null?void 0:U.link)==null?void 0:I.range;if(M)return this._model.selectionStart=[M.start.x-1,M.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(M,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(D);return!!H&&(this._selectWordAt(H,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(D,R){this._model.clearSelection(),D=Math.max(D,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,D],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(D){this._model.handleTrim(D)&&this.refresh()}_getMouseBufferCoords(D){const R=this._mouseService.getCoords(D,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(D){let R=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,D,this._screenElement)[1];const M=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=M?0:(R>M&&(R-=M),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(D){return m.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 R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(D){this._selectWordAtCursor(D,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(D){const R=this._getMouseBufferCoords(D);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(D){return D.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(D){if(D.stopImmediatePropagation(),!this._model.selectionStart)return;const R=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 M=this._bufferService.buffer;if(this._model.selectionEnd[1]<M.lines.length){const H=M.lines.get(this._model.selectionEnd[1]);H&&H.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[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 R=D.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&D.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const M=this._mouseService.getCoords(D,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(M&&M[0]!==void 0&&M[1]!==void 0){const H=(0,p.moveToCellSequence)(M[0]-1,M[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,M=!(!D||!R||D[0]===R[0]&&D[1]===R[1]);M?D&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&D[0]===this._oldSelectionStart[0]&&D[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(D,R,M)):this._oldHasSelection&&this._fireOnSelectionChange(D,R,M)}_fireOnSelectionChange(D,R,M){this._oldSelectionStart=D,this._oldSelectionEnd=R,this._oldHasSelection=M,this._onSelectionChange.fire()}_handleBufferActivate(D){this.clearSelection(),this._trimListener.dispose(),this._trimListener=D.activeBuffer.lines.onTrim(R=>this._handleTrim(R))}_convertViewportColToCharacterIndex(D,R){let M=R;for(let H=0;R>=H;H++){const U=D.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?M--:U>1&&R!==H&&(M+=U-1)}return M}setSelection(D,R,M){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[D,R],this._model.selectionStartLength=M,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(D){this._isClickInSelection(D)||(this._selectWordAtCursor(D,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(D,R,M=!0,H=!0){if(D[0]>=this._bufferService.cols)return;const U=this._bufferService.buffer,I=U.lines.get(D[1]);if(!I)return;const G=U.translateBufferLineToString(D[1],!1);let ne=this._convertViewportColToCharacterIndex(I,D[0]),Q=ne;const te=D[0]-ne;let ie=0,P=0,$=0,J=0;if(G.charAt(ne)===" "){for(;ne>0&&G.charAt(ne-1)===" ";)ne--;for(;Q<G.length&&G.charAt(Q+1)===" ";)Q++}else{let Se=D[0],Z=D[0];I.getWidth(Se)===0&&(ie++,Se--),I.getWidth(Z)===2&&(P++,Z++);const ke=I.getString(Z).length;for(ke>1&&(J+=ke-1,Q+=ke-1);Se>0&&ne>0&&!this._isCharWordSeparator(I.loadCell(Se-1,this._workCell));){I.loadCell(Se-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(ie++,Se--):se>1&&($+=se-1,ne-=se-1),ne--,Se--}for(;Z<I.length&&Q+1<G.length&&!this._isCharWordSeparator(I.loadCell(Z+1,this._workCell));){I.loadCell(Z+1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===2?(P++,Z++):se>1&&(J+=se-1,Q+=se-1),Q++,Z++}}Q++;let ee=ne+te-ie+$,we=Math.min(this._bufferService.cols,Q-ne+ie+P-$-J);if(R||G.slice(ne,Q).trim()!==""){if(M&&ee===0&&I.getCodePoint(0)!==32){const Se=U.lines.get(D[1]-1);if(Se&&I.isWrapped&&Se.getCodePoint(this._bufferService.cols-1)!==32){const Z=this._getWordAt([this._bufferService.cols-1,D[1]-1],!1,!0,!1);if(Z){const ke=this._bufferService.cols-Z.start;ee-=ke,we+=ke}}}if(H&&ee+we===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const Se=U.lines.get(D[1]+1);if(Se!=null&&Se.isWrapped&&Se.getCodePoint(0)!==32){const Z=this._getWordAt([0,D[1]+1],!1,!1,!0);Z&&(we+=Z.length)}}return{start:ee,length:we}}}_selectWordAt(D,R){const M=this._getWordAt(D,R);if(M){for(;M.start<0;)M.start+=this._bufferService.cols,D[1]--;this._model.selectionStart=[M.start,D[1]],this._model.selectionStartLength=M.length}}_selectToWordAt(D){const R=this._getWordAt(D,!0);if(R){let M=D[1];for(;R.start<0;)R.start+=this._bufferService.cols,M--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,M++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,M]}}_isCharWordSeparator(D){return D.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(D.getChars())>=0}_selectLineAt(D){const R=this._bufferService.buffer.getWrappedRangeForLine(D),M={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(M,this._bufferService.cols)}};r.SelectionService=A=g([_(3,N.IBufferService),_(4,N.ICoreService),_(5,C.IMouseService),_(6,N.IOptionsService),_(7,C.IRenderService),_(8,C.ICoreBrowserService)],A)},4725:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;const g=l(8343);r.ICharSizeService=(0,g.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,g.createDecorator)("CoreBrowserService"),r.IMouseService=(0,g.createDecorator)("MouseService"),r.IRenderService=(0,g.createDecorator)("RenderService"),r.ISelectionService=(0,g.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,g.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,g.createDecorator)("ThemeService"),r.ILinkProviderService=(0,g.createDecorator)("LinkProviderService")},6731:function(y,r,l){var g=this&&this.__decorate||function(A,D,R,M){var H,U=arguments.length,I=U<3?D:M===null?M=Object.getOwnPropertyDescriptor(D,R):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(A,D,R,M);else for(var G=A.length-1;G>=0;G--)(H=A[G])&&(I=(U<3?H(I):U>3?H(D,R,I):H(D,R))||I);return U>3&&I&&Object.defineProperty(D,R,I),I},_=this&&this.__param||function(A,D){return function(R,M){D(R,M,A)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;const u=l(7239),p=l(8055),S=l(8460),C=l(844),b=l(2585),c=p.css.toColor("#ffffff"),m=p.css.toColor("#000000"),f=p.css.toColor("#ffffff"),v=p.css.toColor("#000000"),N={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],D=[0,95,135,175,215,255];for(let R=0;R<216;R++){const M=D[R/36%6|0],H=D[R/6%6|0],U=D[R%6];A.push({css:p.channels.toCss(M,H,U),rgba:p.channels.toRgba(M,H,U)})}for(let R=0;R<24;R++){const M=8+10*R;A.push({css:p.channels.toCss(M,M,M),rgba:p.channels.toRgba(M,M,M)})}return A})());let T=r.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:c,background:m,cursor:f,cursorAccent:v,selectionForeground:void 0,selectionBackgroundTransparent:N,selectionBackgroundOpaque:p.color.blend(m,N),selectionInactiveBackgroundTransparent:N,selectionInactiveBackgroundOpaque:p.color.blend(m,N),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(A={}){const D=this._colors;if(D.foreground=E(A.foreground,c),D.background=E(A.background,m),D.cursor=E(A.cursor,f),D.cursorAccent=E(A.cursorAccent,v),D.selectionBackgroundTransparent=E(A.selectionBackground,N),D.selectionBackgroundOpaque=p.color.blend(D.background,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundTransparent=E(A.selectionInactiveBackground,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundOpaque=p.color.blend(D.background,D.selectionInactiveBackgroundTransparent),D.selectionForeground=A.selectionForeground?E(A.selectionForeground,p.NULL_COLOR):void 0,D.selectionForeground===p.NULL_COLOR&&(D.selectionForeground=void 0),p.color.isOpaque(D.selectionBackgroundTransparent)&&(D.selectionBackgroundTransparent=p.color.opacity(D.selectionBackgroundTransparent,.3)),p.color.isOpaque(D.selectionInactiveBackgroundTransparent)&&(D.selectionInactiveBackgroundTransparent=p.color.opacity(D.selectionInactiveBackgroundTransparent,.3)),D.ansi=r.DEFAULT_ANSI_COLORS.slice(),D.ansi[0]=E(A.black,r.DEFAULT_ANSI_COLORS[0]),D.ansi[1]=E(A.red,r.DEFAULT_ANSI_COLORS[1]),D.ansi[2]=E(A.green,r.DEFAULT_ANSI_COLORS[2]),D.ansi[3]=E(A.yellow,r.DEFAULT_ANSI_COLORS[3]),D.ansi[4]=E(A.blue,r.DEFAULT_ANSI_COLORS[4]),D.ansi[5]=E(A.magenta,r.DEFAULT_ANSI_COLORS[5]),D.ansi[6]=E(A.cyan,r.DEFAULT_ANSI_COLORS[6]),D.ansi[7]=E(A.white,r.DEFAULT_ANSI_COLORS[7]),D.ansi[8]=E(A.brightBlack,r.DEFAULT_ANSI_COLORS[8]),D.ansi[9]=E(A.brightRed,r.DEFAULT_ANSI_COLORS[9]),D.ansi[10]=E(A.brightGreen,r.DEFAULT_ANSI_COLORS[10]),D.ansi[11]=E(A.brightYellow,r.DEFAULT_ANSI_COLORS[11]),D.ansi[12]=E(A.brightBlue,r.DEFAULT_ANSI_COLORS[12]),D.ansi[13]=E(A.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),D.ansi[14]=E(A.brightCyan,r.DEFAULT_ANSI_COLORS[14]),D.ansi[15]=E(A.brightWhite,r.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const R=Math.min(D.ansi.length-16,A.extendedAnsi.length);for(let M=0;M<R;M++)D.ansi[M+16]=E(A.extendedAnsi[M],r.DEFAULT_ANSI_COLORS[M+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(A){this._restoreColor(A),this._onChangeColors.fire(this.colors)}_restoreColor(A){if(A!==void 0)switch(A){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[A]=this._restoreColors.ansi[A]}else for(let D=0;D<this._restoreColors.ansi.length;++D)this._colors.ansi[D]=this._restoreColors.ansi[D]}modifyColors(A){A(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function E(A,D){if(A!==void 0)try{return p.css.toColor(A)}catch{}return D}r.ThemeService=T=g([_(0,b.IOptionsService)],T)},6349:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;const g=l(8460),_=l(844);class u extends _.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 b=0;b<Math.min(S,this.length);b++)C[b]=this._array[this._getCyclicIndex(b)];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,...b){if(C){for(let c=S;c<this._length-C;c++)this._array[this._getCyclicIndex(c)]=this._array[this._getCyclicIndex(c+C)];this._length-=C,this.onDeleteEmitter.fire({index:S,amount:C})}for(let c=this._length-1;c>=S;c--)this._array[this._getCyclicIndex(c+b.length)]=this._array[this._getCyclicIndex(c)];for(let c=0;c<b.length;c++)this._array[this._getCyclicIndex(S+c)]=b[c];if(b.length&&this.onInsertEmitter.fire({index:S,amount:b.length}),this._length+b.length>this._maxLength){const c=this._length+b.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=b.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,C,b){if(!(C<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let m=C-1;m>=0;m--)this.set(S+m+b,this.get(S+m));const c=S+C+b-this._length;if(c>0)for(this._length+=c;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let c=0;c<C;c++)this.set(S+c+b,this.get(S+c))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}r.CircularList=u},1439:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function l(g,_=5){if(typeof g!="object")return g;const u=Array.isArray(g)?[]:{};for(const p in g)u[p]=_<=1?g[p]:g[p]&&l(g[p],_-1);return u}},8055:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let l=0,g=0,_=0,u=0;var p,S,C,b,c;function m(v){const N=v.toString(16);return N.length<2?"0"+N:N}function f(v,N){return v<N?(N+.05)/(v+.05):(v+.05)/(N+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},function(v){v.toCss=function(N,T,E,A){return A!==void 0?`#${m(N)}${m(T)}${m(E)}${m(A)}`:`#${m(N)}${m(T)}${m(E)}`},v.toRgba=function(N,T,E,A=255){return(N<<24|T<<16|E<<8|A)>>>0},v.toColor=function(N,T,E,A){return{css:v.toCss(N,T,E,A),rgba:v.toRgba(N,T,E,A)}}}(p||(r.channels=p={})),function(v){function N(T,E){return u=Math.round(255*E),[l,g,_]=c.toChannels(T.rgba),{css:p.toCss(l,g,_,u),rgba:p.toRgba(l,g,_,u)}}v.blend=function(T,E){if(u=(255&E.rgba)/255,u===1)return{css:E.css,rgba:E.rgba};const A=E.rgba>>24&255,D=E.rgba>>16&255,R=E.rgba>>8&255,M=T.rgba>>24&255,H=T.rgba>>16&255,U=T.rgba>>8&255;return l=M+Math.round((A-M)*u),g=H+Math.round((D-H)*u),_=U+Math.round((R-U)*u),{css:p.toCss(l,g,_),rgba:p.toRgba(l,g,_)}},v.isOpaque=function(T){return(255&T.rgba)==255},v.ensureContrastRatio=function(T,E,A){const D=c.ensureContrastRatio(T.rgba,E.rgba,A);if(D)return p.toColor(D>>24&255,D>>16&255,D>>8&255)},v.opaque=function(T){const E=(255|T.rgba)>>>0;return[l,g,_]=c.toChannels(E),{css:p.toCss(l,g,_),rgba:E}},v.opacity=N,v.multiplyOpacity=function(T,E){return u=255&T.rgba,N(T,u*E/255)},v.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(S||(r.color=S={})),function(v){let N,T;try{const E=document.createElement("canvas");E.width=1,E.height=1;const A=E.getContext("2d",{willReadFrequently:!0});A&&(N=A,N.globalCompositeOperation="copy",T=N.createLinearGradient(0,0,1,1))}catch{}v.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return l=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),p.toColor(l,g,_);case 5:return l=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),u=parseInt(E.slice(4,5).repeat(2),16),p.toColor(l,g,_,u);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const A=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return l=parseInt(A[1]),g=parseInt(A[2]),_=parseInt(A[3]),u=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(l,g,_,u);if(!N||!T)throw new Error("css.toColor: Unsupported css format");if(N.fillStyle=T,N.fillStyle=E,typeof N.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(N.fillRect(0,0,1,1),[l,g,_,u]=N.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(l,g,_,u),css:E}}}(C||(r.css=C={})),function(v){function N(T,E,A){const D=T/255,R=E/255,M=A/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}v.relativeLuminance=function(T){return N(T>>16&255,T>>8&255,255&T)},v.relativeLuminance2=N}(b||(r.rgb=b={})),function(v){function N(E,A,D){const R=E>>24&255,M=E>>16&255,H=E>>8&255;let U=A>>24&255,I=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));for(;ne<D&&(U>0||I>0||G>0);)U-=Math.max(0,Math.ceil(.1*U)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));return(U<<24|I<<16|G<<8|255)>>>0}function T(E,A,D){const R=E>>24&255,M=E>>16&255,H=E>>8&255;let U=A>>24&255,I=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));for(;ne<D&&(U<255||I<255||G<255);)U=Math.min(255,U+Math.ceil(.1*(255-U))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));return(U<<24|I<<16|G<<8|255)>>>0}v.blend=function(E,A){if(u=(255&A)/255,u===1)return A;const D=A>>24&255,R=A>>16&255,M=A>>8&255,H=E>>24&255,U=E>>16&255,I=E>>8&255;return l=H+Math.round((D-H)*u),g=U+Math.round((R-U)*u),_=I+Math.round((M-I)*u),p.toRgba(l,g,_)},v.ensureContrastRatio=function(E,A,D){const R=b.relativeLuminance(E>>8),M=b.relativeLuminance(A>>8);if(f(R,M)<D){if(M<R){const I=N(E,A,D),G=f(R,b.relativeLuminance(I>>8));if(G<D){const ne=T(E,A,D);return G>f(R,b.relativeLuminance(ne>>8))?I:ne}return I}const H=T(E,A,D),U=f(R,b.relativeLuminance(H>>8));if(U<D){const I=N(E,A,D);return U>f(R,b.relativeLuminance(I>>8))?H:I}return H}},v.reduceLuminance=N,v.increaseLuminance=T,v.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}}(c||(r.rgba=c={})),r.toPaddedHex=m,r.contrastRatio=f},8969:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;const g=l(844),_=l(2585),u=l(4348),p=l(7866),S=l(744),C=l(7302),b=l(6975),c=l(8460),m=l(1753),f=l(1480),v=l(7994),N=l(9282),T=l(5435),E=l(5981),A=l(2660);let D=!1;class R extends g.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new c.EventEmitter),this._onScroll.event(H=>{var U;(U=this._onScrollApi)==null||U.fire(H.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(H){for(const U in H)this.optionsService.options[U]=H[U]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new g.MutableDisposable),this._onBinary=this.register(new c.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new c.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new C.OptionsService(H)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(f.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(v.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new T.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(U=>{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(U=>{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 E.WriteBuffer((U,I)=>this._inputHandler.parse(U,I))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,U){this._writeBuffer.write(H,U)}writeSync(H,U){this._logService.logLevel<=_.LogLevelEnum.WARN&&!D&&(this._logService.warn("writeSync is unreliable and will be removed soon."),D=!0),this._writeBuffer.writeSync(H,U)}input(H,U=!0){this.coreService.triggerDataEvent(H,U)}resize(H,U){isNaN(H)||isNaN(U)||(H=Math.max(H,S.MINIMUM_COLS),U=Math.max(U,S.MINIMUM_ROWS),this._bufferService.resize(H,U))}scroll(H,U=!1){this._bufferService.scroll(H,U)}scrollLines(H,U,I){this._bufferService.scrollLines(H,U,I)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const U=H-this._bufferService.buffer.ydisp;U!==0&&this.scrollLines(U)}registerEscHandler(H,U){return this._inputHandler.registerEscHandler(H,U)}registerDcsHandler(H,U){return this._inputHandler.registerDcsHandler(H,U)}registerCsiHandler(H,U){return this._inputHandler.registerCsiHandler(H,U)}registerOscHandler(H,U){return this._inputHandler.registerOscHandler(H,U)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const U=this.optionsService.rawOptions.windowsPty;U&&U.buildNumber!==void 0&&U.buildNumber!==void 0?H=U.backend==="conpty"&&U.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(N.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},()=>((0,N.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,g.toDisposable)(()=>{for(const U of H)U.dispose()})}}}r.CoreTerminal=R},8460:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===l)return void this._listeners.splice(g,1)}}})),this._event}fire(l,g){const _=[];for(let u=0;u<this._listeners.length;u++)_.push(this._listeners[u]);for(let u=0;u<_.length;u++)_[u].call(void 0,l,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(l,g){return l(_=>g.fire(_))},r.runAndSubscribe=function(l,g){return g(void 0),l(_=>g(_))}},5435:function(y,r,l){var g=this&&this.__decorate||function(ie,P,$,J){var ee,we=arguments.length,Se=we<3?P:J===null?J=Object.getOwnPropertyDescriptor(P,$):J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Se=Reflect.decorate(ie,P,$,J);else for(var Z=ie.length-1;Z>=0;Z--)(ee=ie[Z])&&(Se=(we<3?ee(Se):we>3?ee(P,$,Se):ee(P,$))||Se);return we>3&&Se&&Object.defineProperty(P,$,Se),Se},_=this&&this.__param||function(ie,P){return function($,J){P($,J,ie)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;const u=l(2584),p=l(7116),S=l(2015),C=l(844),b=l(482),c=l(8437),m=l(8460),f=l(643),v=l(511),N=l(3734),T=l(2585),E=l(1480),A=l(6242),D=l(6351),R=l(5941),M={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function U(ie,P){if(ie>24)return P.setWinLines||!1;switch(ie){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var I;(function(ie){ie[ie.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ie[ie.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(r.WindowsOptionsReportType=I={}));let G=0;class ne extends C.Disposable{getAttrData(){return this._curAttrData}constructor(P,$,J,ee,we,Se,Z,ke,se=new S.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=$,this._coreService=J,this._logService=ee,this._optionsService=we,this._oscLinkService=Se,this._coreMouseService=Z,this._unicodeService=ke,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new v.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.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 Q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(W=>this._activeBuffer=W.activeBuffer)),this._parser.setCsiHandlerFallback((W,_e)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(W),params:_e.toArray()})}),this._parser.setEscHandlerFallback(W=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(W)})}),this._parser.setExecuteHandlerFallback(W=>{this._logService.debug("Unknown EXECUTE code: ",{code:W})}),this._parser.setOscHandlerFallback((W,_e,ue)=>{this._logService.debug("Unknown OSC code: ",{identifier:W,action:_e,data:ue})}),this._parser.setDcsHandlerFallback((W,_e,ue)=>{_e==="HOOK"&&(ue=ue.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(W),action:_e,payload:ue})}),this._parser.setPrintHandler((W,_e,ue)=>this.print(W,_e,ue)),this._parser.registerCsiHandler({final:"@"},W=>this.insertChars(W)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},W=>this.scrollLeft(W)),this._parser.registerCsiHandler({final:"A"},W=>this.cursorUp(W)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},W=>this.scrollRight(W)),this._parser.registerCsiHandler({final:"B"},W=>this.cursorDown(W)),this._parser.registerCsiHandler({final:"C"},W=>this.cursorForward(W)),this._parser.registerCsiHandler({final:"D"},W=>this.cursorBackward(W)),this._parser.registerCsiHandler({final:"E"},W=>this.cursorNextLine(W)),this._parser.registerCsiHandler({final:"F"},W=>this.cursorPrecedingLine(W)),this._parser.registerCsiHandler({final:"G"},W=>this.cursorCharAbsolute(W)),this._parser.registerCsiHandler({final:"H"},W=>this.cursorPosition(W)),this._parser.registerCsiHandler({final:"I"},W=>this.cursorForwardTab(W)),this._parser.registerCsiHandler({final:"J"},W=>this.eraseInDisplay(W,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},W=>this.eraseInDisplay(W,!0)),this._parser.registerCsiHandler({final:"K"},W=>this.eraseInLine(W,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},W=>this.eraseInLine(W,!0)),this._parser.registerCsiHandler({final:"L"},W=>this.insertLines(W)),this._parser.registerCsiHandler({final:"M"},W=>this.deleteLines(W)),this._parser.registerCsiHandler({final:"P"},W=>this.deleteChars(W)),this._parser.registerCsiHandler({final:"S"},W=>this.scrollUp(W)),this._parser.registerCsiHandler({final:"T"},W=>this.scrollDown(W)),this._parser.registerCsiHandler({final:"X"},W=>this.eraseChars(W)),this._parser.registerCsiHandler({final:"Z"},W=>this.cursorBackwardTab(W)),this._parser.registerCsiHandler({final:"`"},W=>this.charPosAbsolute(W)),this._parser.registerCsiHandler({final:"a"},W=>this.hPositionRelative(W)),this._parser.registerCsiHandler({final:"b"},W=>this.repeatPrecedingCharacter(W)),this._parser.registerCsiHandler({final:"c"},W=>this.sendDeviceAttributesPrimary(W)),this._parser.registerCsiHandler({prefix:">",final:"c"},W=>this.sendDeviceAttributesSecondary(W)),this._parser.registerCsiHandler({final:"d"},W=>this.linePosAbsolute(W)),this._parser.registerCsiHandler({final:"e"},W=>this.vPositionRelative(W)),this._parser.registerCsiHandler({final:"f"},W=>this.hVPosition(W)),this._parser.registerCsiHandler({final:"g"},W=>this.tabClear(W)),this._parser.registerCsiHandler({final:"h"},W=>this.setMode(W)),this._parser.registerCsiHandler({prefix:"?",final:"h"},W=>this.setModePrivate(W)),this._parser.registerCsiHandler({final:"l"},W=>this.resetMode(W)),this._parser.registerCsiHandler({prefix:"?",final:"l"},W=>this.resetModePrivate(W)),this._parser.registerCsiHandler({final:"m"},W=>this.charAttributes(W)),this._parser.registerCsiHandler({final:"n"},W=>this.deviceStatus(W)),this._parser.registerCsiHandler({prefix:"?",final:"n"},W=>this.deviceStatusPrivate(W)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},W=>this.softReset(W)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},W=>this.setCursorStyle(W)),this._parser.registerCsiHandler({final:"r"},W=>this.setScrollRegion(W)),this._parser.registerCsiHandler({final:"s"},W=>this.saveCursor(W)),this._parser.registerCsiHandler({final:"t"},W=>this.windowOptions(W)),this._parser.registerCsiHandler({final:"u"},W=>this.restoreCursor(W)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},W=>this.insertColumns(W)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},W=>this.deleteColumns(W)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},W=>this.selectProtected(W)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},W=>this.requestMode(W,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},W=>this.requestMode(W,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new A.OscHandler(W=>(this.setTitle(W),this.setIconName(W),!0))),this._parser.registerOscHandler(1,new A.OscHandler(W=>this.setIconName(W))),this._parser.registerOscHandler(2,new A.OscHandler(W=>this.setTitle(W))),this._parser.registerOscHandler(4,new A.OscHandler(W=>this.setOrReportIndexedColor(W))),this._parser.registerOscHandler(8,new A.OscHandler(W=>this.setHyperlink(W))),this._parser.registerOscHandler(10,new A.OscHandler(W=>this.setOrReportFgColor(W))),this._parser.registerOscHandler(11,new A.OscHandler(W=>this.setOrReportBgColor(W))),this._parser.registerOscHandler(12,new A.OscHandler(W=>this.setOrReportCursorColor(W))),this._parser.registerOscHandler(104,new A.OscHandler(W=>this.restoreIndexedColor(W))),this._parser.registerOscHandler(110,new A.OscHandler(W=>this.restoreFgColor(W))),this._parser.registerOscHandler(111,new A.OscHandler(W=>this.restoreBgColor(W))),this._parser.registerOscHandler(112,new A.OscHandler(W=>this.restoreCursorColor(W))),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 W in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:W},()=>this.selectCharset("("+W)),this._parser.registerEscHandler({intermediates:")",final:W},()=>this.selectCharset(")"+W)),this._parser.registerEscHandler({intermediates:"*",final:W},()=>this.selectCharset("*"+W)),this._parser.registerEscHandler({intermediates:"+",final:W},()=>this.selectCharset("+"+W)),this._parser.registerEscHandler({intermediates:"-",final:W},()=>this.selectCharset("-"+W)),this._parser.registerEscHandler({intermediates:".",final:W},()=>this.selectCharset("."+W)),this._parser.registerEscHandler({intermediates:"/",final:W},()=>this.selectCharset("/"+W));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(W=>(this._logService.error("Parsing error: ",W),W)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler((W,_e)=>this.requestStatusString(W,_e)))}_preserveStack(P,$,J,ee){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=$,this._parseStack.decodedLength=J,this._parseStack.position=ee}_logSlowResolvingAsync(P){this._logService.logLevel<=T.LogLevelEnum.WARN&&Promise.race([P,new Promise(($,J)=>setTimeout(()=>J("#SLOW_TIMEOUT"),5e3))]).catch($=>{if($!=="#SLOW_TIMEOUT")throw $;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,$){let J,ee=this._activeBuffer.x,we=this._activeBuffer.y,Se=0;const Z=this._parseStack.paused;if(Z){if(J=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,$))return this._logSlowResolvingAsync(J),J;ee=this._parseStack.cursorStartX,we=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>H&&(Se=this._parseStack.position+H)}if(this._logService.logLevel<=T.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,W=>String.fromCharCode(W)).join("")}"`),typeof P=="string"?P.split("").map(W=>W.charCodeAt(0)):P),this._parseBuffer.length<P.length&&this._parseBuffer.length<H&&(this._parseBuffer=new Uint32Array(Math.min(P.length,H))),Z||this._dirtyRowTracker.clearRange(),P.length>H)for(let W=Se;W<P.length;W+=H){const _e=W+H<P.length?W+H:P.length,ue=typeof P=="string"?this._stringDecoder.decode(P.substring(W,_e),this._parseBuffer):this._utf8Decoder.decode(P.subarray(W,_e),this._parseBuffer);if(J=this._parser.parse(this._parseBuffer,ue))return this._preserveStack(ee,we,ue,W),this._logSlowResolvingAsync(J),J}else if(!Z){const W=typeof P=="string"?this._stringDecoder.decode(P,this._parseBuffer):this._utf8Decoder.decode(P,this._parseBuffer);if(J=this._parser.parse(this._parseBuffer,W))return this._preserveStack(ee,we,W,0),this._logSlowResolvingAsync(J),J}this._activeBuffer.x===ee&&this._activeBuffer.y===we||this._onCursorMove.fire();const ke=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),se=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);se<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(se,this._bufferService.rows-1),Math.min(ke,this._bufferService.rows-1))}print(P,$,J){let ee,we;const Se=this._charsetService.charset,Z=this._optionsService.rawOptions.screenReaderMode,ke=this._bufferService.cols,se=this._coreService.decPrivateModes.wraparound,W=this._coreService.modes.insertMode,_e=this._curAttrData;let ue=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&J-$>0&&ue.getWidth(this._activeBuffer.x-1)===2&&ue.setCellFromCodepoint(this._activeBuffer.x-1,0,1,_e);let Ie=this._parser.precedingJoinState;for(let Ue=$;Ue<J;++Ue){if(ee=P[Ue],ee<127&&Se){const Nt=Se[String.fromCharCode(ee)];Nt&&(ee=Nt.charCodeAt(0))}const Xe=this._unicodeService.charProperties(ee,Ie);we=E.UnicodeService.extractWidth(Xe);const Je=E.UnicodeService.extractShouldJoin(Xe),rt=Je?E.UnicodeService.extractWidth(Ie):0;if(Ie=Xe,Z&&this._onA11yChar.fire((0,b.stringFromCodePoint)(ee)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+we-rt>ke){if(se){const Nt=ue;let Ze=this._activeBuffer.x-rt;for(this._activeBuffer.x=rt,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),ue=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),rt>0&&ue instanceof c.BufferLine&&ue.copyCellsFrom(Nt,Ze,0,rt,!1);Ze<ke;)Nt.setCellFromCodepoint(Ze++,0,1,_e)}else if(this._activeBuffer.x=ke-1,we===2)continue}if(Je&&this._activeBuffer.x){const Nt=ue.getWidth(this._activeBuffer.x-1)?1:2;ue.addCodepointToCell(this._activeBuffer.x-Nt,ee,we);for(let Ze=we-rt;--Ze>=0;)ue.setCellFromCodepoint(this._activeBuffer.x++,0,0,_e)}else if(W&&(ue.insertCells(this._activeBuffer.x,we-rt,this._activeBuffer.getNullCell(_e)),ue.getWidth(ke-1)===2&&ue.setCellFromCodepoint(ke-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,_e)),ue.setCellFromCodepoint(this._activeBuffer.x++,ee,we,_e),we>0)for(;--we;)ue.setCellFromCodepoint(this._activeBuffer.x++,0,0,_e)}this._parser.precedingJoinState=Ie,this._activeBuffer.x<ke&&J-$>0&&ue.getWidth(this._activeBuffer.x)===0&&!ue.hasContent(this._activeBuffer.x)&&ue.setCellFromCodepoint(this._activeBuffer.x,0,1,_e),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,$){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,$):this._parser.registerCsiHandler(P,J=>!U(J.params[0],this._optionsService.rawOptions.windowOptions)||$(J))}registerDcsHandler(P,$){return this._parser.registerDcsHandler(P,new D.DcsHandler($))}registerEscHandler(P,$){return this._parser.registerEscHandler(P,$)}registerOscHandler(P,$){return this._parser.registerOscHandler(P,new A.OscHandler($))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var P;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);$.hasWidth(this._activeBuffer.x)&&!$.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(P,$){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+$):(this._activeBuffer.x=P,this._activeBuffer.y=$),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,$){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+$)}cursorUp(P){const $=this._activeBuffer.y-this._activeBuffer.scrollTop;return $>=0?this._moveCursor(0,-Math.min($,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const $=this._activeBuffer.scrollBottom-this._activeBuffer.y;return $>=0?this._moveCursor(0,Math.min($,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const $=P.params[0];return $===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:$===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let $=P.params[0]||1;for(;$--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let $=P.params[0]||1;for(;$--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const $=P.params[0];return $===1&&(this._curAttrData.bg|=536870912),$!==2&&$!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,$,J,ee=!1,we=!1){const Se=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);Se.replaceCells($,J,this._activeBuffer.getNullCell(this._eraseAttrData()),we),ee&&(Se.isWrapped=!1)}_resetBufferLine(P,$=!1){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);J&&(J.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),$),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),J.isWrapped=!1)}eraseInDisplay(P,$=!1){let J;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(J=this._activeBuffer.y,this._dirtyRowTracker.markDirty(J),this._eraseInBufferLine(J++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,$);J<this._bufferService.rows;J++)this._resetBufferLine(J,$);this._dirtyRowTracker.markDirty(J);break;case 1:for(J=this._activeBuffer.y,this._dirtyRowTracker.markDirty(J),this._eraseInBufferLine(J,0,this._activeBuffer.x+1,!0,$),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(J+1).isWrapped=!1);J--;)this._resetBufferLine(J,$);this._dirtyRowTracker.markDirty(0);break;case 2:for(J=this._bufferService.rows,this._dirtyRowTracker.markDirty(J-1);J--;)this._resetBufferLine(J,$);this._dirtyRowTracker.markDirty(0);break;case 3:const ee=this._activeBuffer.lines.length-this._bufferService.rows;ee>0&&(this._activeBuffer.lines.trimStart(ee),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-ee,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-ee,0),this._onScroll.fire(0))}return!0}eraseInLine(P,$=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,$);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,$);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,$)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let $=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const J=this._activeBuffer.ybase+this._activeBuffer.y,ee=this._bufferService.rows-1-this._activeBuffer.scrollBottom,we=this._bufferService.rows-1+this._activeBuffer.ybase-ee+1;for(;$--;)this._activeBuffer.lines.splice(we-1,1),this._activeBuffer.lines.splice(J,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(P){this._restrictCursor();let $=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const J=this._activeBuffer.ybase+this._activeBuffer.y;let ee;for(ee=this._bufferService.rows-1-this._activeBuffer.scrollBottom,ee=this._bufferService.rows-1+this._activeBuffer.ybase-ee;$--;)this._activeBuffer.lines.splice(J,1),this._activeBuffer.lines.splice(ee,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(P){this._restrictCursor();const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return $&&($.insertCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(P){this._restrictCursor();const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return $&&($.deleteCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(P){let $=P.params[0]||1;for(;$--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(P){let $=P.params[0]||1;for(;$--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(c.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=P.params[0]||1;for(let J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);ee.deleteCells(0,$,this._activeBuffer.getNullCell(this._eraseAttrData())),ee.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=P.params[0]||1;for(let J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);ee.insertCells(0,$,this._activeBuffer.getNullCell(this._eraseAttrData())),ee.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=P.params[0]||1;for(let J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);ee.insertCells(this._activeBuffer.x,$,this._activeBuffer.getNullCell(this._eraseAttrData())),ee.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=P.params[0]||1;for(let J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);ee.deleteCells(this._activeBuffer.x,$,this._activeBuffer.getNullCell(this._eraseAttrData())),ee.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(P){this._restrictCursor();const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return $&&($.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(P.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(P){const $=this._parser.precedingJoinState;if(!$)return!0;const J=P.params[0]||1,ee=E.UnicodeService.extractWidth($),we=this._activeBuffer.x-ee,Se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(we),Z=new Uint32Array(Se.length*J);let ke=0;for(let W=0;W<Se.length;){const _e=Se.codePointAt(W)||0;Z[ke++]=_e,W+=_e>65535?2:1}let se=ke;for(let W=1;W<J;++W)Z.copyWithin(se,0,ke),se+=ke;return this.print(Z,0,se),!0}sendDeviceAttributesPrimary(P){return P.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let $=0;$<P.length;$++)switch(P.params[$]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(P){for(let $=0;$<P.length;$++)switch(P.params[$]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(P){for(let $=0;$<P.length;$++)switch(P.params[$]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(P){for(let $=0;$<P.length;$++)switch(P.params[$]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),P.params[$]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(P,$){const J=this._coreService.decPrivateModes,{activeProtocol:ee,activeEncoding:we}=this._coreMouseService,Se=this._coreService,{buffers:Z,cols:ke}=this._bufferService,{active:se,alt:W}=Z,_e=this._optionsService.rawOptions,ue=Je=>Je?1:2,Ie=P.params[0];return Ue=Ie,Xe=$?Ie===2?4:Ie===4?ue(Se.modes.insertMode):Ie===12?3:Ie===20?ue(_e.convertEol):0:Ie===1?ue(J.applicationCursorKeys):Ie===3?_e.windowOptions.setWinLines?ke===80?2:ke===132?1:0:0:Ie===6?ue(J.origin):Ie===7?ue(J.wraparound):Ie===8?3:Ie===9?ue(ee==="X10"):Ie===12?ue(_e.cursorBlink):Ie===25?ue(!Se.isCursorHidden):Ie===45?ue(J.reverseWraparound):Ie===66?ue(J.applicationKeypad):Ie===67?4:Ie===1e3?ue(ee==="VT200"):Ie===1002?ue(ee==="DRAG"):Ie===1003?ue(ee==="ANY"):Ie===1004?ue(J.sendFocus):Ie===1005?4:Ie===1006?ue(we==="SGR"):Ie===1015?4:Ie===1016?ue(we==="SGR_PIXELS"):Ie===1048?1:Ie===47||Ie===1047||Ie===1049?ue(se===W):Ie===2004?ue(J.bracketedPasteMode):0,Se.triggerDataEvent(`${u.C0.ESC}[${$?"":"?"}${Ue};${Xe}$y`),!0;var Ue,Xe}_updateAttrColor(P,$,J,ee,we){return $===2?(P|=50331648,P&=-16777216,P|=N.AttributeData.fromColorRGB([J,ee,we])):$===5&&(P&=-50331904,P|=33554432|255&J),P}_extractColor(P,$,J){const ee=[0,0,-1,0,0,0];let we=0,Se=0;do{if(ee[Se+we]=P.params[$+Se],P.hasSubParams($+Se)){const Z=P.getSubParams($+Se);let ke=0;do ee[1]===5&&(we=1),ee[Se+ke+1+we]=Z[ke];while(++ke<Z.length&&ke+Se+1+we<ee.length);break}if(ee[1]===5&&Se+we>=2||ee[1]===2&&Se+we>=5)break;ee[1]&&(we=1)}while(++Se+$<P.length&&Se+we<ee.length);for(let Z=2;Z<ee.length;++Z)ee[Z]===-1&&(ee[Z]=0);switch(ee[0]){case 38:J.fg=this._updateAttrColor(J.fg,ee[1],ee[3],ee[4],ee[5]);break;case 48:J.bg=this._updateAttrColor(J.bg,ee[1],ee[3],ee[4],ee[5]);break;case 58:J.extended=J.extended.clone(),J.extended.underlineColor=this._updateAttrColor(J.extended.underlineColor,ee[1],ee[3],ee[4],ee[5])}return Se}_processUnderline(P,$){$.extended=$.extended.clone(),(!~P||P>5)&&(P=1),$.extended.underlineStyle=P,$.fg|=268435456,P===0&&($.fg&=-268435457),$.updateExtended()}_processSGR0(P){P.fg=c.DEFAULT_ATTR_DATA.fg,P.bg=c.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const $=P.length;let J;const ee=this._curAttrData;for(let we=0;we<$;we++)J=P.params[we],J>=30&&J<=37?(ee.fg&=-50331904,ee.fg|=16777216|J-30):J>=40&&J<=47?(ee.bg&=-50331904,ee.bg|=16777216|J-40):J>=90&&J<=97?(ee.fg&=-50331904,ee.fg|=16777224|J-90):J>=100&&J<=107?(ee.bg&=-50331904,ee.bg|=16777224|J-100):J===0?this._processSGR0(ee):J===1?ee.fg|=134217728:J===3?ee.bg|=67108864:J===4?(ee.fg|=268435456,this._processUnderline(P.hasSubParams(we)?P.getSubParams(we)[0]:1,ee)):J===5?ee.fg|=536870912:J===7?ee.fg|=67108864:J===8?ee.fg|=1073741824:J===9?ee.fg|=2147483648:J===2?ee.bg|=134217728:J===21?this._processUnderline(2,ee):J===22?(ee.fg&=-134217729,ee.bg&=-134217729):J===23?ee.bg&=-67108865:J===24?(ee.fg&=-268435457,this._processUnderline(0,ee)):J===25?ee.fg&=-536870913:J===27?ee.fg&=-67108865:J===28?ee.fg&=-1073741825:J===29?ee.fg&=2147483647:J===39?(ee.fg&=-67108864,ee.fg|=16777215&c.DEFAULT_ATTR_DATA.fg):J===49?(ee.bg&=-67108864,ee.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):J===38||J===48||J===58?we+=this._extractColor(P,we,ee):J===53?ee.bg|=1073741824:J===55?ee.bg&=-1073741825:J===59?(ee.extended=ee.extended.clone(),ee.extended.underlineColor=-1,ee.updateExtended()):J===100?(ee.fg&=-67108864,ee.fg|=16777215&c.DEFAULT_ATTR_DATA.fg,ee.bg&=-67108864,ee.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",J);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const $=this._activeBuffer.y+1,J=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${$};${J}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const $=this._activeBuffer.y+1,J=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${$};${J}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){const $=P.params[0]||1;switch($){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 J=$%2==1;return this._optionsService.options.cursorBlink=J,!0}setScrollRegion(P){const $=P.params[0]||1;let J;return(P.length<2||(J=P.params[1])>this._bufferService.rows||J===0)&&(J=this._bufferService.rows),J>$&&(this._activeBuffer.scrollTop=$-1,this._activeBuffer.scrollBottom=J-1,this._setCursor(0,0)),!0}windowOptions(P){if(!U(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const $=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:$!==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(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:$!==0&&$!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),$!==0&&$!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:$!==0&&$!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),$!==0&&$!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(P){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const $=[],J=P.split(";");for(;J.length>1;){const ee=J.shift(),we=J.shift();if(/^\d+$/.exec(ee)){const Se=parseInt(ee);if(te(Se))if(we==="?")$.push({type:0,index:Se});else{const Z=(0,R.parseColor)(we);Z&&$.push({type:1,index:Se,color:Z})}}}return $.length&&this._onColor.fire($),!0}setHyperlink(P){const $=P.split(";");return!($.length<2)&&($[1]?this._createHyperlink($[0],$[1]):!$[0]&&this._finishHyperlink())}_createHyperlink(P,$){this._getCurrentLinkId()&&this._finishHyperlink();const J=P.split(":");let ee;const we=J.findIndex(Se=>Se.startsWith("id="));return we!==-1&&(ee=J[we].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:ee,uri:$}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,$){const J=P.split(";");for(let ee=0;ee<J.length&&!($>=this._specialColors.length);++ee,++$)if(J[ee]==="?")this._onColor.fire([{type:0,index:this._specialColors[$]}]);else{const we=(0,R.parseColor)(J[ee]);we&&this._onColor.fire([{type:1,index:this._specialColors[$],color:we}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const $=[],J=P.split(";");for(let ee=0;ee<J.length;++ee)if(/^\d+$/.exec(J[ee])){const we=parseInt(J[ee]);te(we)&&$.push({type:2,index:we})}return $.length&&this._onColor.fire($),!0}restoreFgColor(P){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(P){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(P){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(P){return P.length!==2?(this.selectDefaultCharset(),!0):(P[0]==="/"||this._charsetService.setgCharset(M[P[0]],p.CHARSETS[P[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new v.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let $=0;$<this._bufferService.rows;++$){const J=this._activeBuffer.ybase+this._activeBuffer.y+$,ee=this._activeBuffer.lines.get(J);ee&&(ee.fill(P),ee.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(P,$){const J=this._bufferService.buffer,ee=this._optionsService.rawOptions;return(we=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${we}${u.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${J.scrollTop+1};${J.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[ee.cursorStyle]-(ee.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,$){this._dirtyRowTracker.markRangeDirty(P,$)}}r.InputHandler=ne;let Q=class{constructor(ie){this._bufferService=ie,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ie){ie<this.start?this.start=ie:ie>this.end&&(this.end=ie)}markRangeDirty(ie,P){ie>P&&(G=ie,ie=P,P=G),ie<this.start&&(this.start=ie),P>this.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function te(ie){return 0<=ie&&ie<256}Q=g([_(0,T.IBufferService)],Q)},844:(y,r)=>{function l(g){for(const _ of g)_.dispose();g.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.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 _=this._disposables.indexOf(g);_!==-1&&this._disposables.splice(_,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var _;this._isDisposed||g===this._value||((_=this._value)==null||_.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}},r.toDisposable=function(g){return{dispose:g}},r.disposeArray=l,r.getDisposeArrayDisposable=function(g){return{dispose:()=>l(g)}}},1505:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(_,u,p){this._data[_]||(this._data[_]={}),this._data[_][u]=p}get(_,u){return this._data[_]?this._data[_][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=l,r.FourKeyMap=class{constructor(){this._data=new l}set(g,_,u,p,S){this._data.get(g,_)||this._data.set(g,_,new l),this._data.get(g,_).set(u,p,S)}get(g,_,u,p){var S;return(S=this._data.get(g,_))==null?void 0:S.get(u,p)}clear(){this._data.clear()}}},6114:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;const l=r.isNode?"node":navigator.userAgent,g=r.isNode?"node":navigator.platform;r.isFirefox=l.includes("Firefox"),r.isLegacyEdge=l.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(l),r.getSafariVersion=function(){if(!r.isSafari)return 0;const _=l.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),r.isIpad=g==="iPad",r.isIphone=g==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),r.isLinux=g.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(l)},6106:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let l=0;r.SortedList=class{constructor(g){this._getKey=g,this._array=[]}clear(){this._array.length=0}insert(g){this._array.length!==0?(l=this._search(this._getKey(g)),this._array.splice(l,0,g)):this._array.push(g)}delete(g){if(this._array.length===0)return!1;const _=this._getKey(g);if(_===void 0||(l=this._search(_),l===-1)||this._getKey(this._array[l])!==_)return!1;do if(this._array[l]===g)return this._array.splice(l,1),!0;while(++l<this._array.length&&this._getKey(this._array[l])===_);return!1}*getKeyIterator(g){if(this._array.length!==0&&(l=this._search(g),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===g))do yield this._array[l];while(++l<this._array.length&&this._getKey(this._array[l])===g)}forEachByKey(g,_){if(this._array.length!==0&&(l=this._search(g),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===g))do _(this._array[l]);while(++l<this._array.length&&this._getKey(this._array[l])===g)}values(){return[...this._array].values()}_search(g){let _=0,u=this._array.length-1;for(;u>=_;){let p=_+u>>1;const S=this._getKey(this._array[p]);if(S>g)u=p-1;else{if(!(S<g)){for(;p>0&&this._getKey(this._array[p-1])===g;)p--;return p}_=p+1}}return _}}},7226:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const g=l(6114);class _{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,b=0,c=S.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),b=Math.max(C,b),m=S.timeRemaining(),1.5*b>m)return c-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-C))}ms`),void this._start();c=m}this.clear()}}class u extends _{_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())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;const g=l(643);r.updateWindowsModeWrappedState=function(_){const u=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),p=u==null?void 0:u.get(_.cols-1),S=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);S&&p&&(S.isWrapped=p[g.CHAR_DATA_CODE_INDEX]!==g.NULL_CELL_CODE&&p[g.CHAR_DATA_CODE_INDEX]!==g.WHITESPACE_CELL_CODE)}},3734:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new l;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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}}r.AttributeData=l;class g{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,p=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=p}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=g},9092:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;const g=l(6349),_=l(7226),u=l(3734),p=l(8437),S=l(4634),C=l(511),b=l(643),c=l(4863),m=l(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(f,v,N){this._hasScrollback=f,this._optionsService=v,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=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.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(f){return f?(this._nullCell.fg=f.fg,this._nullCell.bg=f.bg,this._nullCell.extended=f.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(f){return f?(this._whitespaceCell.fg=f.fg,this._whitespaceCell.bg=f.bg,this._whitespaceCell.extended=f.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(f,v){return new p.BufferLine(this._bufferService.cols,this.getNullCell(f),v)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const f=this.ybase+this.y-this.ydisp;return f>=0&&f<this._rows}_getCorrectBufferLength(f){if(!this._hasScrollback)return f;const v=f+this._optionsService.rawOptions.scrollback;return v>r.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:v}fillViewportRows(f){if(this.lines.length===0){f===void 0&&(f=p.DEFAULT_ATTR_DATA);let v=this._rows;for(;v--;)this.lines.push(this.getBlankLine(f))}}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(f,v){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let T=0;const E=this._getCorrectBufferLength(v);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols<f)for(let D=0;D<this.lines.length;D++)T+=+this.lines.get(D).resize(f,N);let A=0;if(this._rows<v)for(let D=this._rows;D<v;D++)this.lines.length<v+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(f,N)):this.ybase>0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(f,N)));else for(let D=this._rows;D>v;D--)this.lines.length>v+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E<this.lines.maxLength){const D=this.lines.length-E;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=E}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,v-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=v-1,this._isReflowEnabled&&(this._reflow(f,v),this._cols>f))for(let A=0;A<this.lines.length;A++)T+=+this.lines.get(A).resize(f,N);this._cols=f,this._rows=v,this._memoryCleanupQueue.clear(),T>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let f=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,f=!1);let v=0;for(;this._memoryCleanupPosition<this.lines.length;)if(v+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),v>100)return!0;return f}get _isReflowEnabled(){const f=this._optionsService.rawOptions.windowsPty;return f&&f.buildNumber?this._hasScrollback&&f.backend==="conpty"&&f.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(f,v){this._cols!==f&&(f>this._cols?this._reflowLarger(f,v):this._reflowSmaller(f,v))}_reflowLarger(f,v){const N=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(N.length>0){const T=(0,S.reflowLargerCreateNewLayout)(this.lines,N);(0,S.reflowLargerApplyNewLayout)(this.lines,T.layout),this._reflowLargerAdjustViewport(f,v,T.countRemoved)}}_reflowLargerAdjustViewport(f,v,N){const T=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=N;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<v&&this.lines.push(new p.BufferLine(f,T))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-N,0)}_reflowSmaller(f,v){const N=this.getNullCell(p.DEFAULT_ATTR_DATA),T=[];let E=0;for(let A=this.lines.length-1;A>=0;A--){let D=this.lines.get(A);if(!D||!D.isWrapped&&D.getTrimmedLength()<=f)continue;const R=[D];for(;D.isWrapped&&A>0;)D=this.lines.get(--A),R.unshift(D);const M=this.ybase+this.y;if(M>=A&&M<A+R.length)continue;const H=R[R.length-1].getTrimmedLength(),U=(0,S.reflowSmallerGetNewLineLengths)(R,this._cols,f),I=U.length-R.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 J=0;J<I;J++){const ee=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);ne.push(ee)}ne.length>0&&(T.push({start:A+R.length+E,newLines:ne}),E+=ne.length),R.push(...ne);let Q=U.length-1,te=U[Q];te===0&&(Q--,te=U[Q]);let ie=R.length-I-1,P=H;for(;ie>=0;){const J=Math.min(P,te);if(R[Q]===void 0)break;if(R[Q].copyCellsFrom(R[ie],P-J,te-J,J,!0),te-=J,te===0&&(Q--,te=U[Q]),P-=J,P===0){ie--;const ee=Math.max(ie,0);P=(0,S.getWrappedLineTrimmedLength)(R,ee,this._cols)}}for(let J=0;J<R.length;J++)U[J]<f&&R[J].setCell(U[J],N);let $=I-G;for(;$-- >0;)this.ybase===0?this.y<v-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-v&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+v-1)}if(T.length>0){const A=[],D=[];for(let Q=0;Q<this.lines.length;Q++)D.push(this.lines.get(Q));const R=this.lines.length;let M=R-1,H=0,U=T[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);let I=0;for(let Q=Math.min(this.lines.maxLength-1,R+E-1);Q>=0;Q--)if(U&&U.start>M+I){for(let te=U.newLines.length-1;te>=0;te--)this.lines.set(Q--,U.newLines[te]);Q++,A.push({index:M+1,amount:U.newLines.length}),I+=U.newLines.length,U=T[++H]}else this.lines.set(Q,D[M--]);let G=0;for(let Q=A.length-1;Q>=0;Q--)A[Q].index+=G,this.lines.onInsertEmitter.fire(A[Q]),G+=A[Q].amount;const ne=Math.max(0,R+E-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(f,v,N=0,T){const E=this.lines.get(f);return E?E.translateToString(v,N,T):""}getWrappedRangeForLine(f){let v=f,N=f;for(;v>0&&this.lines.get(v).isWrapped;)v--;for(;N+1<this.lines.length&&this.lines.get(N+1).isWrapped;)N++;return{first:v,last:N}}setupTabStops(f){for(f!=null?this.tabs[f]||(f=this.prevStop(f)):(this.tabs={},f=0);f<this._cols;f+=this._optionsService.rawOptions.tabStopWidth)this.tabs[f]=!0}prevStop(f){for(f==null&&(f=this.x);!this.tabs[--f]&&f>0;);return f>=this._cols?this._cols-1:f<0?0:f}nextStop(f){for(f==null&&(f=this.x);!this.tabs[++f]&&f<this._cols;);return f>=this._cols?this._cols-1:f<0?0:f}clearMarkers(f){this._isClearing=!0;for(let v=0;v<this.markers.length;v++)this.markers[v].line===f&&(this.markers[v].dispose(),this.markers.splice(v--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].dispose(),this.markers.splice(f--,1);this._isClearing=!1}addMarker(f){const v=new c.Marker(f);return this.markers.push(v),v.register(this.lines.onTrim(N=>{v.line-=N,v.line<0&&v.dispose()})),v.register(this.lines.onInsert(N=>{v.line>=N.index&&(v.line+=N.amount)})),v.register(this.lines.onDelete(N=>{v.line>=N.index&&v.line<N.index+N.amount&&v.dispose(),v.line>N.index&&(v.line-=N.amount)})),v.register(v.onDispose(()=>this._removeMarker(v))),v}_removeMarker(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)}}},8437:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;const g=l(3734),_=l(511),u=l(643),p=l(482);r.DEFAULT_ATTR_DATA=Object.freeze(new g.AttributeData);let S=0;class C{constructor(c,m,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*c);const v=m||_.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let N=0;N<c;++N)this.setCell(N,v);this.length=c}get(c){const m=this._data[3*c+0],f=2097151&m;return[this._data[3*c+1],2097152&m?this._combined[c]:f?(0,p.stringFromCodePoint)(f):"",m>>22,2097152&m?this._combined[c].charCodeAt(this._combined[c].length-1):f]}set(c,m){this._data[3*c+1]=m[u.CHAR_DATA_ATTR_INDEX],m[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[c]=m[1],this._data[3*c+0]=2097152|c|m[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*c+0]=m[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(c){return this._data[3*c+0]>>22}hasWidth(c){return 12582912&this._data[3*c+0]}getFg(c){return this._data[3*c+1]}getBg(c){return this._data[3*c+2]}hasContent(c){return 4194303&this._data[3*c+0]}getCodePoint(c){const m=this._data[3*c+0];return 2097152&m?this._combined[c].charCodeAt(this._combined[c].length-1):2097151&m}isCombined(c){return 2097152&this._data[3*c+0]}getString(c){const m=this._data[3*c+0];return 2097152&m?this._combined[c]:2097151&m?(0,p.stringFromCodePoint)(2097151&m):""}isProtected(c){return 536870912&this._data[3*c+2]}loadCell(c,m){return S=3*c,m.content=this._data[S+0],m.fg=this._data[S+1],m.bg=this._data[S+2],2097152&m.content&&(m.combinedData=this._combined[c]),268435456&m.bg&&(m.extended=this._extendedAttrs[c]),m}setCell(c,m){2097152&m.content&&(this._combined[c]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[c]=m.extended),this._data[3*c+0]=m.content,this._data[3*c+1]=m.fg,this._data[3*c+2]=m.bg}setCellFromCodepoint(c,m,f,v){268435456&v.bg&&(this._extendedAttrs[c]=v.extended),this._data[3*c+0]=m|f<<22,this._data[3*c+1]=v.fg,this._data[3*c+2]=v.bg}addCodepointToCell(c,m,f){let v=this._data[3*c+0];2097152&v?this._combined[c]+=(0,p.stringFromCodePoint)(m):2097151&v?(this._combined[c]=(0,p.stringFromCodePoint)(2097151&v)+(0,p.stringFromCodePoint)(m),v&=-2097152,v|=2097152):v=m|4194304,f&&(v&=-12582913,v|=f<<22),this._data[3*c+0]=v}insertCells(c,m,f){if((c%=this.length)&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,f),m<this.length-c){const v=new _.CellData;for(let N=this.length-c-m-1;N>=0;--N)this.setCell(c+m+N,this.loadCell(c+N,v));for(let N=0;N<m;++N)this.setCell(c+N,f)}else for(let v=c;v<this.length;++v)this.setCell(v,f);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,f)}deleteCells(c,m,f){if(c%=this.length,m<this.length-c){const v=new _.CellData;for(let N=0;N<this.length-c-m;++N)this.setCell(c+N,this.loadCell(c+m+N,v));for(let N=this.length-m;N<this.length;++N)this.setCell(N,f)}else for(let v=c;v<this.length;++v)this.setCell(v,f);c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,f),this.getWidth(c)!==0||this.hasContent(c)||this.setCellFromCodepoint(c,0,1,f)}replaceCells(c,m,f,v=!1){if(v)for(c&&this.getWidth(c-1)===2&&!this.isProtected(c-1)&&this.setCellFromCodepoint(c-1,0,1,f),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodepoint(m,0,1,f);c<m&&c<this.length;)this.isProtected(c)||this.setCell(c,f),c++;else for(c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,f),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m,0,1,f);c<m&&c<this.length;)this.setCell(c++,f)}resize(c,m){if(c===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const f=3*c;if(c>this.length){if(this._data.buffer.byteLength>=4*f)this._data=new Uint32Array(this._data.buffer,0,f);else{const v=new Uint32Array(f);v.set(this._data),this._data=v}for(let v=this.length;v<c;++v)this.setCell(v,m)}else{this._data=this._data.subarray(0,f);const v=Object.keys(this._combined);for(let T=0;T<v.length;T++){const E=parseInt(v[T],10);E>=c&&delete this._combined[E]}const N=Object.keys(this._extendedAttrs);for(let T=0;T<N.length;T++){const E=parseInt(N[T],10);E>=c&&delete this._extendedAttrs[E]}}return this.length=c,4*f*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const c=new Uint32Array(this._data.length);return c.set(this._data),this._data=c,1}return 0}fill(c,m=!1){if(m)for(let f=0;f<this.length;++f)this.isProtected(f)||this.setCell(f,c);else{this._combined={},this._extendedAttrs={};for(let f=0;f<this.length;++f)this.setCell(f,c)}}copyFrom(c){this.length!==c.length?this._data=new Uint32Array(c._data):this._data.set(c._data),this.length=c.length,this._combined={};for(const m in c._combined)this._combined[m]=c._combined[m];this._extendedAttrs={};for(const m in c._extendedAttrs)this._extendedAttrs[m]=c._extendedAttrs[m];this.isWrapped=c.isWrapped}clone(){const c=new C(0);c._data=new Uint32Array(this._data),c.length=this.length;for(const m in this._combined)c._combined[m]=this._combined[m];for(const m in this._extendedAttrs)c._extendedAttrs[m]=this._extendedAttrs[m];return c.isWrapped=this.isWrapped,c}getTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0])return c+(this._data[3*c+0]>>22);return 0}getNoBgTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0]||50331648&this._data[3*c+2])return c+(this._data[3*c+0]>>22);return 0}copyCellsFrom(c,m,f,v,N){const T=c._data;if(N)for(let A=v-1;A>=0;A--){for(let D=0;D<3;D++)this._data[3*(f+A)+D]=T[3*(m+A)+D];268435456&T[3*(m+A)+2]&&(this._extendedAttrs[f+A]=c._extendedAttrs[m+A])}else for(let A=0;A<v;A++){for(let D=0;D<3;D++)this._data[3*(f+A)+D]=T[3*(m+A)+D];268435456&T[3*(m+A)+2]&&(this._extendedAttrs[f+A]=c._extendedAttrs[m+A])}const E=Object.keys(c._combined);for(let A=0;A<E.length;A++){const D=parseInt(E[A],10);D>=m&&(this._combined[D-m+f]=c._combined[D])}}translateToString(c,m,f,v){m=m??0,f=f??this.length,c&&(f=Math.min(f,this.getTrimmedLength())),v&&(v.length=0);let N="";for(;m<f;){const T=this._data[3*m+0],E=2097151&T,A=2097152&T?this._combined[m]:E?(0,p.stringFromCodePoint)(E):u.WHITESPACE_CELL_CHAR;if(N+=A,v)for(let D=0;D<A.length;++D)v.push(m);m+=T>>22||1}return v&&v.push(m),N}}r.BufferLine=C},4841:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(l,g){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return g*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(y,r)=>{function l(g,_,u){if(_===g.length-1)return g[_].getTrimmedLength();const p=!g[_].hasContent(u-1)&&g[_].getWidth(u-1)===1,S=g[_+1].getWidth(0)===2;return p&&S?u-1:u}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(g,_,u,p,S){const C=[];for(let b=0;b<g.length-1;b++){let c=b,m=g.get(++c);if(!m.isWrapped)continue;const f=[g.get(b)];for(;c<g.length&&m.isWrapped;)f.push(m),m=g.get(++c);if(p>=b&&p<c){b+=f.length-1;continue}let v=0,N=l(f,v,_),T=1,E=0;for(;T<f.length;){const D=l(f,T,_),R=D-E,M=u-N,H=Math.min(R,M);f[v].copyCellsFrom(f[T],E,N,H,!1),N+=H,N===u&&(v++,N=0),E+=H,E===D&&(T++,E=0),N===0&&v!==0&&f[v-1].getWidth(u-1)===2&&(f[v].copyCellsFrom(f[v-1],u-1,N++,1,!1),f[v-1].setCell(u-1,S))}f[v].replaceCells(N,u,S);let A=0;for(let D=f.length-1;D>0&&(D>v||f[D].getTrimmedLength()===0);D--)A++;A>0&&(C.push(b+f.length-A),C.push(A)),b+=f.length-1}return C},r.reflowLargerCreateNewLayout=function(g,_){const u=[];let p=0,S=_[p],C=0;for(let b=0;b<g.length;b++)if(S===b){const c=_[++p];g.onDeleteEmitter.fire({index:b-C,amount:c}),b+=c-1,C+=c,S=_[++p]}else u.push(b);return{layout:u,countRemoved:C}},r.reflowLargerApplyNewLayout=function(g,_){const u=[];for(let p=0;p<_.length;p++)u.push(g.get(_[p]));for(let p=0;p<u.length;p++)g.set(p,u[p]);g.length=_.length},r.reflowSmallerGetNewLineLengths=function(g,_,u){const p=[],S=g.map((m,f)=>l(g,f,_)).reduce((m,f)=>m+f);let C=0,b=0,c=0;for(;c<S;){if(S-c<u){p.push(S-c);break}C+=u;const m=l(g,b,_);C>m&&(C-=m,b++);const f=g[b].getWidth(C-1)===2;f&&C--;const v=f?u-1:u;p.push(v),c+=v}return p},r.getWrappedLineTrimmedLength=l},5295:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;const g=l(8460),_=l(844),u=l(9092);class p extends _.Disposable{constructor(C,b){super(),this._optionsService=C,this._bufferService=b,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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.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,b){this._normal.resize(C,b),this._alt.resize(C,b),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}r.BufferSet=p},511:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const g=l(482),_=l(643),u=l(3734);class p extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const b=new p;return b.setFromCharData(C),b}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[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(C[_.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(C[_.CHAR_DATA_CHAR_INDEX].length===2){const c=C[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const m=C[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(c-55296)+m-56320+65536|C[_.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=C[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[_.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=C[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=p},643:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;const g=l(8460),_=l(844);class u{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=u._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,_.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}r.Marker=u,u._nextId=1},7116:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.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:"≥","{":"π","|":"≠","}":"£","~":"·"},r.CHARSETS.A={"#":"£"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},r.CHARSETS.C=r.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},r.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},r.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},r.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},r.CHARSETS.E=r.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},r.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},r.CHARSETS.H=r.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(y,r)=>{var l,g,_;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
213
+ `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""}(l||(r.C0=l={})),function(u){u.PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ"}(g||(r.C1=g={})),function(u){u.ST=`${l.ESC}\\`}(_||(r.C1_ESCAPED=_={}))},7399:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const g=l(2584),_={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:["'",'"']};r.evaluateKeyboardEvent=function(u,p,S,C){const b={type:0,cancel:!1,key:void 0},c=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?b.key=p?g.C0.ESC+"OA":g.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?b.key=p?g.C0.ESC+"OD":g.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?b.key=p?g.C0.ESC+"OC":g.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(b.key=p?g.C0.ESC+"OB":g.C0.ESC+"[B");break;case 8:b.key=u.ctrlKey?"\b":g.C0.DEL,u.altKey&&(b.key=g.C0.ESC+b.key);break;case 9:if(u.shiftKey){b.key=g.C0.ESC+"[Z";break}b.key=g.C0.HT,b.cancel=!0;break;case 13:b.key=u.altKey?g.C0.ESC+g.C0.CR:g.C0.CR,b.cancel=!0;break;case 27:b.key=g.C0.ESC,u.altKey&&(b.key=g.C0.ESC+g.C0.ESC),b.cancel=!0;break;case 37:if(u.metaKey)break;c?(b.key=g.C0.ESC+"[1;"+(c+1)+"D",b.key===g.C0.ESC+"[1;3D"&&(b.key=g.C0.ESC+(S?"b":"[1;5D"))):b.key=p?g.C0.ESC+"OD":g.C0.ESC+"[D";break;case 39:if(u.metaKey)break;c?(b.key=g.C0.ESC+"[1;"+(c+1)+"C",b.key===g.C0.ESC+"[1;3C"&&(b.key=g.C0.ESC+(S?"f":"[1;5C"))):b.key=p?g.C0.ESC+"OC":g.C0.ESC+"[C";break;case 38:if(u.metaKey)break;c?(b.key=g.C0.ESC+"[1;"+(c+1)+"A",S||b.key!==g.C0.ESC+"[1;3A"||(b.key=g.C0.ESC+"[1;5A")):b.key=p?g.C0.ESC+"OA":g.C0.ESC+"[A";break;case 40:if(u.metaKey)break;c?(b.key=g.C0.ESC+"[1;"+(c+1)+"B",S||b.key!==g.C0.ESC+"[1;3B"||(b.key=g.C0.ESC+"[1;5B")):b.key=p?g.C0.ESC+"OB":g.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(b.key=g.C0.ESC+"[2~");break;case 46:b.key=c?g.C0.ESC+"[3;"+(c+1)+"~":g.C0.ESC+"[3~";break;case 36:b.key=c?g.C0.ESC+"[1;"+(c+1)+"H":p?g.C0.ESC+"OH":g.C0.ESC+"[H";break;case 35:b.key=c?g.C0.ESC+"[1;"+(c+1)+"F":p?g.C0.ESC+"OF":g.C0.ESC+"[F";break;case 33:u.shiftKey?b.type=2:u.ctrlKey?b.key=g.C0.ESC+"[5;"+(c+1)+"~":b.key=g.C0.ESC+"[5~";break;case 34:u.shiftKey?b.type=3:u.ctrlKey?b.key=g.C0.ESC+"[6;"+(c+1)+"~":b.key=g.C0.ESC+"[6~";break;case 112:b.key=c?g.C0.ESC+"[1;"+(c+1)+"P":g.C0.ESC+"OP";break;case 113:b.key=c?g.C0.ESC+"[1;"+(c+1)+"Q":g.C0.ESC+"OQ";break;case 114:b.key=c?g.C0.ESC+"[1;"+(c+1)+"R":g.C0.ESC+"OR";break;case 115:b.key=c?g.C0.ESC+"[1;"+(c+1)+"S":g.C0.ESC+"OS";break;case 116:b.key=c?g.C0.ESC+"[15;"+(c+1)+"~":g.C0.ESC+"[15~";break;case 117:b.key=c?g.C0.ESC+"[17;"+(c+1)+"~":g.C0.ESC+"[17~";break;case 118:b.key=c?g.C0.ESC+"[18;"+(c+1)+"~":g.C0.ESC+"[18~";break;case 119:b.key=c?g.C0.ESC+"[19;"+(c+1)+"~":g.C0.ESC+"[19~";break;case 120:b.key=c?g.C0.ESC+"[20;"+(c+1)+"~":g.C0.ESC+"[20~";break;case 121:b.key=c?g.C0.ESC+"[21;"+(c+1)+"~":g.C0.ESC+"[21~";break;case 122:b.key=c?g.C0.ESC+"[23;"+(c+1)+"~":g.C0.ESC+"[23~";break;case 123:b.key=c?g.C0.ESC+"[24;"+(c+1)+"~":g.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(S&&!C||!u.altKey||u.metaKey)!S||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?b.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(b.key=g.C0.US),u.key==="@"&&(b.key=g.C0.NUL)):u.keyCode===65&&(b.type=1);else{const m=_[u.keyCode],f=m==null?void 0:m[u.shiftKey?1:0];if(f)b.key=g.C0.ESC+f;else if(u.keyCode>=65&&u.keyCode<=90){const v=u.ctrlKey?u.keyCode-64:u.keyCode+32;let N=String.fromCharCode(v);u.shiftKey&&(N=N.toUpperCase()),b.key=g.C0.ESC+N}else if(u.keyCode===32)b.key=g.C0.ESC+(u.ctrlKey?g.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let v=u.code.slice(3,4);u.shiftKey||(v=v.toLowerCase()),b.key=g.C0.ESC+v,b.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?b.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?b.key=g.C0.NUL:u.keyCode>=51&&u.keyCode<=55?b.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?b.key=g.C0.DEL:u.keyCode===219?b.key=g.C0.ESC:u.keyCode===220?b.key=g.C0.FS:u.keyCode===221&&(b.key=g.C0.GS)}return b}},482:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},r.utf32ToString=function(l,g=0,_=l.length){let u="";for(let p=g;p<_;++p){let S=l[p];S>65535?(S-=65536,u+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):u+=String.fromCharCode(S)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,g){const _=l.length;if(!_)return 0;let u=0,p=0;if(this._interim){const S=l.charCodeAt(p++);56320<=S&&S<=57343?g[u++]=1024*(this._interim-55296)+S-56320+65536:(g[u++]=this._interim,g[u++]=S),this._interim=0}for(let S=p;S<_;++S){const C=l.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=_)return this._interim=C,u;const b=l.charCodeAt(S);56320<=b&&b<=57343?g[u++]=1024*(C-55296)+b-56320+65536:(g[u++]=C,g[u++]=b)}else C!==65279&&(g[u++]=C)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,g){const _=l.length;if(!_)return 0;let u,p,S,C,b=0,c=0,m=0;if(this.interim[0]){let N=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let E,A=0;for(;(E=63&this.interim[++A])&&A<4;)T<<=6,T|=E;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=D-A;for(;m<R;){if(m>=_)return 0;if(E=l[m++],(192&E)!=128){m--,N=!0;break}this.interim[A++]=E,T<<=6,T|=63&E}N||(D===2?T<128?m--:g[b++]=T:D===3?T<2048||T>=55296&&T<=57343||T===65279||(g[b++]=T):T<65536||T>1114111||(g[b++]=T)),this.interim.fill(0)}const f=_-4;let v=m;for(;v<_;){for(;!(!(v<f)||128&(u=l[v])||128&(p=l[v+1])||128&(S=l[v+2])||128&(C=l[v+3]));)g[b++]=u,g[b++]=p,g[b++]=S,g[b++]=C,v+=4;if(u=l[v++],u<128)g[b++]=u;else if((224&u)==192){if(v>=_)return this.interim[0]=u,b;if(p=l[v++],(192&p)!=128){v--;continue}if(c=(31&u)<<6|63&p,c<128){v--;continue}g[b++]=c}else if((240&u)==224){if(v>=_)return this.interim[0]=u,b;if(p=l[v++],(192&p)!=128){v--;continue}if(v>=_)return this.interim[0]=u,this.interim[1]=p,b;if(S=l[v++],(192&S)!=128){v--;continue}if(c=(15&u)<<12|(63&p)<<6|63&S,c<2048||c>=55296&&c<=57343||c===65279)continue;g[b++]=c}else if((248&u)==240){if(v>=_)return this.interim[0]=u,b;if(p=l[v++],(192&p)!=128){v--;continue}if(v>=_)return this.interim[0]=u,this.interim[1]=p,b;if(S=l[v++],(192&S)!=128){v--;continue}if(v>=_)return this.interim[0]=u,this.interim[1]=p,this.interim[2]=S,b;if(C=l[v++],(192&C)!=128){v--;continue}if(c=(7&u)<<18|(63&p)<<12|(63&S)<<6|63&C,c<65536||c>1114111)continue;g[b++]=c}}return b}}},225:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const g=l(1480),_=[[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]],u=[[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 p;r.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let S=0;S<_.length;++S)p.fill(0,_[S][0],_[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?p[S]:function(C,b){let c,m=0,f=b.length-1;if(C<b[0][0]||C>b[f][1])return!1;for(;f>=m;)if(c=m+f>>1,C>b[c][1])m=c+1;else{if(!(C<b[c][0]))return!0;f=c-1}return!1}(S,u)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,C){let b=this.wcwidth(S),c=b===0&&C!==0;if(c){const m=g.UnicodeService.extractWidth(C);m===0?c=!1:m>b&&(b=m)}return g.UnicodeService.createPropertyValue(0,b,c)}}},5981:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;const g=l(8460),_=l(844);class u extends _.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 b;for(this._isSyncWriting=!0;b=this._writeBuffer.shift();){this._action(b);const c=this._callbacks.shift();c&&c()}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 b=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const c=this._writeBuffer[this._bufferOffset],m=this._action(c,C);if(m){const v=N=>Date.now()-b>=12?setTimeout(()=>this._innerWrite(0,N)):this._innerWrite(b,N);return void m.catch(N=>(queueMicrotask(()=>{throw N}),Promise.resolve(!1))).then(v)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=c.length,Date.now()-b>=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()}}r.WriteBuffer=u},5941:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;const l=/^([\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 _(u,p){const S=u.toString(16),C=S.length<2?"0"+S:S;switch(p){case 4:return S[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}r.parseColor=function(u){if(!u)return;let p=u.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const S=l.exec(p);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(p.indexOf("#")===0&&(p=p.slice(1),g.exec(p)&&[3,6,9,12].includes(p.length))){const S=p.length/3,C=[0,0,0];for(let b=0;b<3;++b){const c=parseInt(p.slice(S*b,S*b+S),16);C[b]=S===1?c<<4:S===2?c:S===3?c>>4:c>>8}return C}},r.toRgbString=function(u,p=16){const[S,C,b]=u;return`rgb:${_(S,p)}/${_(C,p)}/${_(b,p)}`}},5770:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;const g=l(482),_=l(8742),u=l(5770),p=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(C,b){this._handlers[C]===void 0&&(this._handlers[C]=[]);const c=this._handlers[C];return c.push(b),{dispose:()=>{const m=c.indexOf(b);m!==-1&&c.splice(m,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=p,this._ident=0}hook(C,b){if(this.reset(),this._ident=C,this._active=this._handlers[C]||p,this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(C,b,c){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(C,b,c);else this._handlerFb(this._ident,"PUT",(0,g.utf32ToString)(C,b,c))}unhook(C,b=!0){if(this._active.length){let c=!1,m=this._active.length-1,f=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,c=b,f=this._stack.fallThrough,this._stack.paused=!1),!f&&c===!1){for(;m>=0&&(c=this._active[m].unhook(C),c!==!0);m--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,c;m--}for(;m>=0;m--)if(c=this._active[m].unhook(!1),c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,c}else this._handlerFb(this._ident,"UNHOOK",C);this._active=p,this._ident=0}};const S=new _.Params;S.addParam(0),r.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,b,c){this._hitLimit||(this._data+=(0,g.utf32ToString)(C,b,c),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let b=!1;if(this._hitLimit)b=!1;else if(C&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then(c=>(this._params=S,this._data="",this._hitLimit=!1,c));return this._params=S,this._data="",this._hitLimit=!1,b}}},2015:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;const g=l(844),_=l(8742),u=l(6242),p=l(6351);class S{constructor(m){this.table=new Uint8Array(m)}setDefault(m,f){this.table.fill(m<<4|f)}add(m,f,v,N){this.table[f<<8|m]=v<<4|N}addMany(m,f,v,N){for(let T=0;T<m.length;T++)this.table[f<<8|m[T]]=v<<4|N}}r.TransitionTable=S;const C=160;r.VT500_TRANSITION_TABLE=function(){const c=new S(4095),m=Array.apply(null,Array(256)).map((A,D)=>D),f=(A,D)=>m.slice(A,D),v=f(32,127),N=f(0,24);N.push(25),N.push.apply(N,f(28,32));const T=f(0,14);let E;for(E in c.setDefault(1,0),c.addMany(v,0,2,0),T)c.addMany([24,26,153,154],E,3,0),c.addMany(f(128,144),E,3,0),c.addMany(f(144,152),E,3,0),c.add(156,E,0,0),c.add(27,E,11,1),c.add(157,E,4,8),c.addMany([152,158,159],E,0,7),c.add(155,E,11,3),c.add(144,E,11,9);return c.addMany(N,0,3,0),c.addMany(N,1,3,1),c.add(127,1,0,1),c.addMany(N,8,0,8),c.addMany(N,3,3,3),c.add(127,3,0,3),c.addMany(N,4,3,4),c.add(127,4,0,4),c.addMany(N,6,3,6),c.addMany(N,5,3,5),c.add(127,5,0,5),c.addMany(N,2,3,2),c.add(127,2,0,2),c.add(93,1,4,8),c.addMany(v,8,5,8),c.add(127,8,5,8),c.addMany([156,27,24,26,7],8,6,0),c.addMany(f(28,32),8,0,8),c.addMany([88,94,95],1,0,7),c.addMany(v,7,0,7),c.addMany(N,7,0,7),c.add(156,7,0,0),c.add(127,7,0,7),c.add(91,1,11,3),c.addMany(f(64,127),3,7,0),c.addMany(f(48,60),3,8,4),c.addMany([60,61,62,63],3,9,4),c.addMany(f(48,60),4,8,4),c.addMany(f(64,127),4,7,0),c.addMany([60,61,62,63],4,0,6),c.addMany(f(32,64),6,0,6),c.add(127,6,0,6),c.addMany(f(64,127),6,0,0),c.addMany(f(32,48),3,9,5),c.addMany(f(32,48),5,9,5),c.addMany(f(48,64),5,0,6),c.addMany(f(64,127),5,7,0),c.addMany(f(32,48),4,9,5),c.addMany(f(32,48),1,9,2),c.addMany(f(32,48),2,9,2),c.addMany(f(48,127),2,10,0),c.addMany(f(48,80),1,10,0),c.addMany(f(81,88),1,10,0),c.addMany([89,90,92],1,10,0),c.addMany(f(96,127),1,10,0),c.add(80,1,11,9),c.addMany(N,9,0,9),c.add(127,9,0,9),c.addMany(f(28,32),9,0,9),c.addMany(f(32,48),9,9,12),c.addMany(f(48,60),9,8,10),c.addMany([60,61,62,63],9,9,10),c.addMany(N,11,0,11),c.addMany(f(32,128),11,0,11),c.addMany(f(28,32),11,0,11),c.addMany(N,10,0,10),c.add(127,10,0,10),c.addMany(f(28,32),10,0,10),c.addMany(f(48,60),10,8,10),c.addMany([60,61,62,63],10,0,11),c.addMany(f(32,48),10,9,12),c.addMany(N,12,0,12),c.add(127,12,0,12),c.addMany(f(28,32),12,0,12),c.addMany(f(32,48),12,9,12),c.addMany(f(48,64),12,0,11),c.addMany(f(64,127),12,12,13),c.addMany(f(64,127),10,12,13),c.addMany(f(64,127),9,12,13),c.addMany(N,13,13,13),c.addMany(v,13,13,13),c.add(127,13,0,13),c.addMany([27,156,24,26],13,14,0),c.add(C,0,2,0),c.add(C,8,5,8),c.add(C,6,0,6),c.add(C,11,0,11),c.add(C,13,13,13),c}();class b extends g.Disposable{constructor(m=r.VT500_TRANSITION_TABLE){super(),this._transitions=m,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(f,v,N)=>{},this._executeHandlerFb=f=>{},this._csiHandlerFb=(f,v)=>{},this._escHandlerFb=f=>{},this._errorHandlerFb=f=>f,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 u.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(m,f=[64,126]){let v=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");if(v=m.prefix.charCodeAt(0),v&&60>v||v>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(m.intermediates){if(m.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let T=0;T<m.intermediates.length;++T){const E=m.intermediates.charCodeAt(T);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");v<<=8,v|=E}}if(m.final.length!==1)throw new Error("final must be a single byte");const N=m.final.charCodeAt(0);if(f[0]>N||N>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return v<<=8,v|=N,v}identToString(m){const f=[];for(;m;)f.push(String.fromCharCode(255&m)),m>>=8;return f.reverse().join("")}setPrintHandler(m){this._printHandler=m}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(m,f){const v=this._identifier(m,[48,126]);this._escHandlers[v]===void 0&&(this._escHandlers[v]=[]);const N=this._escHandlers[v];return N.push(f),{dispose:()=>{const T=N.indexOf(f);T!==-1&&N.splice(T,1)}}}clearEscHandler(m){this._escHandlers[this._identifier(m,[48,126])]&&delete this._escHandlers[this._identifier(m,[48,126])]}setEscHandlerFallback(m){this._escHandlerFb=m}setExecuteHandler(m,f){this._executeHandlers[m.charCodeAt(0)]=f}clearExecuteHandler(m){this._executeHandlers[m.charCodeAt(0)]&&delete this._executeHandlers[m.charCodeAt(0)]}setExecuteHandlerFallback(m){this._executeHandlerFb=m}registerCsiHandler(m,f){const v=this._identifier(m);this._csiHandlers[v]===void 0&&(this._csiHandlers[v]=[]);const N=this._csiHandlers[v];return N.push(f),{dispose:()=>{const T=N.indexOf(f);T!==-1&&N.splice(T,1)}}}clearCsiHandler(m){this._csiHandlers[this._identifier(m)]&&delete this._csiHandlers[this._identifier(m)]}setCsiHandlerFallback(m){this._csiHandlerFb=m}registerDcsHandler(m,f){return this._dcsParser.registerHandler(this._identifier(m),f)}clearDcsHandler(m){this._dcsParser.clearHandler(this._identifier(m))}setDcsHandlerFallback(m){this._dcsParser.setHandlerFallback(m)}registerOscHandler(m,f){return this._oscParser.registerHandler(m,f)}clearOscHandler(m){this._oscParser.clearHandler(m)}setOscHandlerFallback(m){this._oscParser.setHandlerFallback(m)}setErrorHandler(m){this._errorHandler=m}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(m,f,v,N,T){this._parseStack.state=m,this._parseStack.handlers=f,this._parseStack.handlerPos=v,this._parseStack.transition=N,this._parseStack.chunkPos=T}parse(m,f,v){let N,T=0,E=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(v===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 R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(v===!1&&R>-1){for(;R>=0&&(N=D[R](this._params),N!==!0);R--)if(N instanceof Promise)return this._parseStack.handlerPos=R,N}this._parseStack.handlers=[];break;case 4:if(v===!1&&R>-1){for(;R>=0&&(N=D[R](),N!==!0);R--)if(N instanceof Promise)return this._parseStack.handlerPos=R,N}this._parseStack.handlers=[];break;case 6:if(T=m[this._parseStack.chunkPos],N=this._dcsParser.unhook(T!==24&&T!==26,v),N)return N;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(T=m[this._parseStack.chunkPos],N=this._oscParser.end(T!==24&&T!==26,v),N)return N;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let D=A;D<f;++D){switch(T=m[D],E=this._transitions.table[this.currentState<<8|(T<160?T:C)],E>>4){case 2:for(let I=D+1;;++I){if(I>=f||(T=m[I])<32||T>126&&T<C){this._printHandler(m,D,I),D=I-1;break}if(++I>=f||(T=m[I])<32||T>126&&T<C){this._printHandler(m,D,I),D=I-1;break}if(++I>=f||(T=m[I])<32||T>126&&T<C){this._printHandler(m,D,I),D=I-1;break}if(++I>=f||(T=m[I])<32||T>126&&T<C){this._printHandler(m,D,I),D=I-1;break}}break;case 3:this._executeHandlers[T]?this._executeHandlers[T]():this._executeHandlerFb(T),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:D,code:T,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|T];let M=R?R.length-1:-1;for(;M>=0&&(N=R[M](this._params),N!==!0);M--)if(N instanceof Promise)return this._preserveStack(3,R,M,E,D),N;M<0&&this._csiHandlerFb(this._collect<<8|T,this._params),this.precedingJoinState=0;break;case 8:do switch(T){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(T-48)}while(++D<f&&(T=m[D])>47&&T<60);D--;break;case 9:this._collect<<=8,this._collect|=T;break;case 10:const H=this._escHandlers[this._collect<<8|T];let U=H?H.length-1:-1;for(;U>=0&&(N=H[U](),N!==!0);U--)if(N instanceof Promise)return this._preserveStack(4,H,U,E,D),N;U<0&&this._escHandlerFb(this._collect<<8|T),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|T,this._params);break;case 13:for(let I=D+1;;++I)if(I>=f||(T=m[I])===24||T===26||T===27||T>127&&T<C){this._dcsParser.put(m,D,I),D=I-1;break}break;case 14:if(N=this._dcsParser.unhook(T!==24&&T!==26),N)return this._preserveStack(6,[],0,E,D),N;T===27&&(E|=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>=f||(T=m[I])<32||T>127&&T<C){this._oscParser.put(m,D,I),D=I-1;break}break;case 6:if(N=this._oscParser.end(T!==24&&T!==26),N)return this._preserveStack(5,[],0,E,D),N;T===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&E}}}r.EscapeSequenceParser=b},6242:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;const g=l(5770),_=l(482),u=[];r.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,S){this._handlers[p]===void 0&&(this._handlers[p]=[]);const C=this._handlers[p];return C.push(S),{dispose:()=>{const b=C.indexOf(S);b!==-1&&C.splice(b,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,S,C){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(p,S,C);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(p,S,C))}start(){this.reset(),this._state=1}put(p,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const b=p[S++];if(b===59){this._state=2,this._start();break}if(b<48||57<b)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+b-48}this._state===2&&C-S>0&&this._put(p,S,C)}}end(p,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,b=this._active.length-1,c=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,C=S,c=this._stack.fallThrough,this._stack.paused=!1),!c&&C===!1){for(;b>=0&&(C=this._active[b].end(p),C!==!0);b--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,C;b--}for(;b>=0;b--)if(C=this._active[b].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",p);this._active=u,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,S,C){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,S,C),this._data.length>g.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let S=!1;if(this._hitLimit)S=!1;else if(p&&(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:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;const l=2147483647;class g{static fromArray(u){const p=new g;if(!u.length)return p;for(let S=Array.isArray(u[0])?1:0;S<u.length;++S){const C=u[S];if(Array.isArray(C))for(let b=0;b<C.length;++b)p.addSubParam(C[b]);else p.addParam(C)}return p}constructor(u=32,p=32){if(this.maxLength=u,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new g(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let p=0;p<this.length;++p){u.push(this.params[p]);const S=this._subParamsIdx[p]>>8,C=255&this._subParamsIdx[p];C-S>0&&u.push(Array.prototype.slice.call(this._subParams,S,C))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>l?l:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>l?l:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const p=this._subParamsIdx[u]>>8,S=255&this._subParamsIdx[u];return S-p>0?this._subParams.subarray(p,S):null}getSubParamsAll(){const u={};for(let p=0;p<this.length;++p){const S=this._subParamsIdx[p]>>8,C=255&this._subParamsIdx[p];C-S>0&&(u[p]=this._subParams.slice(S,C))}return u}addDigit(u){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[p-1];S[p-1]=~C?Math.min(10*C+u,l):u}}r.Params=g},5741:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,g){const _={instance:g,dispose:g.dispose,isDisposed:!1};this._addons.push(_),g.dispose=()=>this._wrappedAddonDispose(_),g.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let g=-1;for(let _=0;_<this._addons.length;_++)if(this._addons[_]===l){g=_;break}if(g===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(g,1)}}},8771:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;const g=l(3785),_=l(511);r.BufferApiView=class{constructor(u,p){this._buffer=u,this.type=p}init(u){return this._buffer=u,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(u){const p=this._buffer.lines.get(u);if(p)return new g.BufferLineApiView(p)}getNullCell(){return new _.CellData}}},3785:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;const g=l(511);r.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,u){if(!(_<0||_>=this._line.length))return u?(this._line.loadCell(_,u),u):this._line.loadCell(_,new g.CellData)}translateToString(_,u,p){return this._line.translateToString(_,u,p)}}},8285:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;const g=l(8771),_=l(8460),u=l(844);class p extends u.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new _.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)}}r.BufferNamespaceApi=p},7975:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,g){return this._core.registerCsiHandler(l,_=>g(_.toArray()))}addCsiHandler(l,g){return this.registerCsiHandler(l,g)}registerDcsHandler(l,g){return this._core.registerDcsHandler(l,(_,u)=>g(_,u.toArray()))}addDcsHandler(l,g){return this.registerDcsHandler(l,g)}registerEscHandler(l,g){return this._core.registerEscHandler(l,g)}addEscHandler(l,g){return this.registerEscHandler(l,g)}registerOscHandler(l,g){return this._core.registerOscHandler(l,g)}addOscHandler(l,g){return this.registerOscHandler(l,g)}}},7090:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(y,r,l){var g=this&&this.__decorate||function(c,m,f,v){var N,T=arguments.length,E=T<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,f):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,m,f,v);else for(var A=c.length-1;A>=0;A--)(N=c[A])&&(E=(T<3?N(E):T>3?N(m,f,E):N(m,f))||E);return T>3&&E&&Object.defineProperty(m,f,E),E},_=this&&this.__param||function(c,m){return function(f,v){m(f,v,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;const u=l(8460),p=l(844),S=l(5295),C=l(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let b=r.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(c){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(c.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(c.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(c,this))}resize(c,m){this.cols=c,this.rows=m,this.buffers.resize(c,m),this._onResize.fire({cols:c,rows:m})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(c,m=!1){const f=this.buffer;let v;v=this._cachedBlankLine,v&&v.length===this.cols&&v.getFg(0)===c.fg&&v.getBg(0)===c.bg||(v=f.getBlankLine(c,m),this._cachedBlankLine=v),v.isWrapped=m;const N=f.ybase+f.scrollTop,T=f.ybase+f.scrollBottom;if(f.scrollTop===0){const E=f.lines.isFull;T===f.lines.length-1?E?f.lines.recycle().copyFrom(v):f.lines.push(v.clone()):f.lines.splice(T+1,0,v.clone()),E?this.isUserScrolling&&(f.ydisp=Math.max(f.ydisp-1,0)):(f.ybase++,this.isUserScrolling||f.ydisp++)}else{const E=T-N+1;f.lines.shiftElements(N+1,E-1,-1),f.lines.set(T,v.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(c,m,f){const v=this.buffer;if(c<0){if(v.ydisp===0)return;this.isUserScrolling=!0}else c+v.ydisp>=v.ybase&&(this.isUserScrolling=!1);const N=v.ydisp;v.ydisp=Math.max(Math.min(v.ydisp+c,v.ybase),0),N!==v.ydisp&&(m||this._onScroll.fire(v.ydisp))}};r.BufferService=b=g([_(0,C.IOptionsService)],b)},7994:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,g){this._charsets[l]=g,this.glevel===l&&(this.charset=g)}}},1753:function(y,r,l){var g=this&&this.__decorate||function(v,N,T,E){var A,D=arguments.length,R=D<3?N:E===null?E=Object.getOwnPropertyDescriptor(N,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(v,N,T,E);else for(var M=v.length-1;M>=0;M--)(A=v[M])&&(R=(D<3?A(R):D>3?A(N,T,R):A(N,T))||R);return D>3&&R&&Object.defineProperty(N,T,R),R},_=this&&this.__param||function(v,N){return function(T,E){N(T,E,v)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;const u=l(2585),p=l(8460),S=l(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:v=>v.button!==4&&v.action===1&&(v.ctrl=!1,v.alt=!1,v.shift=!1,!0)},VT200:{events:19,restrict:v=>v.action!==32},DRAG:{events:23,restrict:v=>v.action!==32||v.button!==3},ANY:{events:31,restrict:v=>!0}};function b(v,N){let T=(v.ctrl?16:0)|(v.shift?4:0)|(v.alt?8:0);return v.button===4?(T|=64,T|=v.action):(T|=3&v.button,4&v.button&&(T|=64),8&v.button&&(T|=128),v.action===32?T|=32:v.action!==0||N||(T|=3)),T}const c=String.fromCharCode,m={DEFAULT:v=>{const N=[b(v,!1)+32,v.col+32,v.row+32];return N[0]>255||N[1]>255||N[2]>255?"":`\x1B[M${c(N[0])}${c(N[1])}${c(N[2])}`},SGR:v=>{const N=v.action===0&&v.button!==4?"m":"M";return`\x1B[<${b(v,!0)};${v.col};${v.row}${N}`},SGR_PIXELS:v=>{const N=v.action===0&&v.button!==4?"m":"M";return`\x1B[<${b(v,!0)};${v.x};${v.y}${N}`}};let f=r.CoreMouseService=class extends S.Disposable{constructor(v,N){super(),this._bufferService=v,this._coreService=N,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const T of Object.keys(C))this.addProtocol(T,C[T]);for(const T of Object.keys(m))this.addEncoding(T,m[T]);this.reset()}addProtocol(v,N){this._protocols[v]=N}addEncoding(v,N){this._encodings[v]=N}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(v){if(!this._protocols[v])throw new Error(`unknown protocol "${v}"`);this._activeProtocol=v,this._onProtocolChange.fire(this._protocols[v].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(v){if(!this._encodings[v])throw new Error(`unknown encoding "${v}"`);this._activeEncoding=v}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(v){if(v.col<0||v.col>=this._bufferService.cols||v.row<0||v.row>=this._bufferService.rows||v.button===4&&v.action===32||v.button===3&&v.action!==32||v.button!==4&&(v.action===2||v.action===3)||(v.col++,v.row++,v.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,v,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(v))return!1;const N=this._encodings[this._activeEncoding](v);return N&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(N):this._coreService.triggerDataEvent(N,!0)),this._lastEvent=v,!0}explainEvents(v){return{down:!!(1&v),up:!!(2&v),drag:!!(4&v),move:!!(8&v),wheel:!!(16&v)}}_equalEvents(v,N,T){if(T){if(v.x!==N.x||v.y!==N.y)return!1}else if(v.col!==N.col||v.row!==N.row)return!1;return v.button===N.button&&v.action===N.action&&v.ctrl===N.ctrl&&v.alt===N.alt&&v.shift===N.shift}};r.CoreMouseService=f=g([_(0,u.IBufferService),_(1,u.ICoreService)],f)},6975:function(y,r,l){var g=this&&this.__decorate||function(f,v,N,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,N):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,N,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,N,D):E(v,N))||D);return A>3&&D&&Object.defineProperty(v,N,D),D},_=this&&this.__param||function(f,v){return function(N,T){v(N,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;const u=l(1439),p=l(8460),S=l(844),C=l(2585),b=Object.freeze({insertMode:!1}),c=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let m=r.CoreService=class extends S.Disposable{constructor(f,v,N){super(),this._bufferService=f,this._logService=v,this._optionsService=N,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(b),this.decPrivateModes=(0,u.clone)(c)}reset(){this.modes=(0,u.clone)(b),this.decPrivateModes=(0,u.clone)(c)}triggerDataEvent(f,v=!1){if(this._optionsService.rawOptions.disableStdin)return;const N=this._bufferService.buffer;v&&this._optionsService.rawOptions.scrollOnUserInput&&N.ybase!==N.ydisp&&this._onRequestScrollToBottom.fire(),v&&this._onUserInput.fire(),this._logService.debug(`sending data "${f}"`,()=>f.split("").map(T=>T.charCodeAt(0))),this._onData.fire(f)}triggerBinaryEvent(f){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${f}"`,()=>f.split("").map(v=>v.charCodeAt(0))),this._onBinary.fire(f))}};r.CoreService=m=g([_(0,C.IBufferService),_(1,C.ILogService),_(2,C.IOptionsService)],m)},9074:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;const g=l(8055),_=l(8460),u=l(844),p=l(6106);let S=0,C=0;class b extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList(f=>f==null?void 0:f.marker.line),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(f){if(f.marker.isDisposed)return;const v=new c(f);if(v){const N=v.marker.onDispose(()=>v.dispose());v.onDispose(()=>{v&&(this._decorations.delete(v)&&this._onDecorationRemoved.fire(v),N.dispose())}),this._decorations.insert(v),this._onDecorationRegistered.fire(v)}return v}reset(){for(const f of this._decorations.values())f.dispose();this._decorations.clear()}*getDecorationsAtCell(f,v,N){let T=0,E=0;for(const A of this._decorations.getKeyIterator(v))T=A.options.x??0,E=T+(A.options.width??1),f>=T&&f<E&&(!N||(A.options.layer??"bottom")===N)&&(yield A)}forEachDecorationAtCell(f,v,N,T){this._decorations.forEachByKey(v,E=>{S=E.options.x??0,C=S+(E.options.width??1),f>=S&&f<C&&(!N||(E.options.layer??"bottom")===N)&&T(E)})}}r.DecorationService=b;class c extends u.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(f){super(),this.options=f,this.onRenderEmitter=this.register(new _.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=f.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;const g=l(2585),_=l(8343);class u{constructor(...S){this._entries=new Map;for(const[C,b]of S)this.set(C,b)}set(S,C){const b=this._entries.get(S);return this._entries.set(S,C),b}forEach(S){for(const[C,b]of this._entries.entries())S(C,b)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}r.ServiceCollection=u,r.InstantiationService=class{constructor(){this._services=new u,this._services.set(g.IInstantiationService,this)}setService(p,S){this._services.set(p,S)}getService(p){return this._services.get(p)}createInstance(p,...S){const C=(0,_.getServiceDependencies)(p).sort((m,f)=>m.index-f.index),b=[];for(const m of C){const f=this._services.get(m.id);if(!f)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${m.id}.`);b.push(f)}const c=C.length>0?C[0].index:S.length;if(S.length!==c)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${c+1} conflicts with ${S.length} static arguments`);return new p(...S,...b)}}},7866:function(y,r,l){var g=this&&this.__decorate||function(c,m,f,v){var N,T=arguments.length,E=T<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,f):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,m,f,v);else for(var A=c.length-1;A>=0;A--)(N=c[A])&&(E=(T<3?N(E):T>3?N(m,f,E):N(m,f))||E);return T>3&&E&&Object.defineProperty(m,f,E),E},_=this&&this.__param||function(c,m){return function(f,v){m(f,v,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const u=l(844),p=l(2585),S={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let C,b=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let m=0;m<c.length;m++)typeof c[m]=="function"&&(c[m]=c[m]())}_log(c,m,f){this._evalLazyOptionalParams(f),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...f)}trace(c,...m){var f;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,c,m)}debug(c,...m){var f;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,c,m)}info(c,...m){var f;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,c,m)}warn(c,...m){var f;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,c,m)}error(c,...m){var f;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,c,m)}};r.LogService=b=g([_(0,p.IOptionsService)],b),r.setTraceLogger=function(c){C=c},r.traceCall=function(c,m,f){if(typeof f.value!="function")throw new Error("not supported");const v=f.value;f.value=function(...N){if(C.logLevel!==p.LogLevelEnum.TRACE)return v.apply(this,N);C.trace(`GlyphRenderer#${v.name}(${N.map(E=>JSON.stringify(E)).join(", ")})`);const T=v.apply(this,N);return C.trace(`GlyphRenderer#${v.name} return`,T),T}}},7302:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;const g=l(8460),_=l(844),u=l(6114);r.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:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends _.Disposable{constructor(b){super(),this._onOptionChange=this.register(new g.EventEmitter),this.onOptionChange=this._onOptionChange.event;const c={...r.DEFAULT_OPTIONS};for(const m in b)if(m in c)try{const f=b[m];c[m]=this._sanitizeAndValidateOption(m,f)}catch(f){console.error(f)}this.rawOptions=c,this.options={...c},this._setupOptions(),this.register((0,_.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(b,c){return this.onOptionChange(m=>{m===b&&c(this.rawOptions[b])})}onMultipleOptionChange(b,c){return this.onOptionChange(m=>{b.indexOf(m)!==-1&&c()})}_setupOptions(){const b=m=>{if(!(m in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},c=(m,f)=>{if(!(m in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);f=this._sanitizeAndValidateOption(m,f),this.rawOptions[m]!==f&&(this.rawOptions[m]=f,this._onOptionChange.fire(m))};for(const m in this.rawOptions){const f={get:b.bind(this,m),set:c.bind(this,m)};Object.defineProperty(this.options,m,f)}}_sanitizeAndValidateOption(b,c){switch(b){case"cursorStyle":if(c||(c=r.DEFAULT_OPTIONS[b]),!function(m){return m==="block"||m==="underline"||m==="bar"}(c))throw new Error(`"${c}" is not a valid value for ${b}`);break;case"wordSeparator":c||(c=r.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof c=="number"&&1<=c&&c<=1e3)break;c=p.includes(c)?c:r.DEFAULT_OPTIONS[b];break;case"cursorWidth":c=Math.floor(c);case"lineHeight":case"tabStopWidth":if(c<1)throw new Error(`${b} cannot be less than 1, value: ${c}`);break;case"minimumContrastRatio":c=Math.max(1,Math.min(21,Math.round(10*c)/10));break;case"scrollback":if((c=Math.min(c,4294967295))<0)throw new Error(`${b} cannot be less than 0, value: ${c}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(c<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${c}`);break;case"rows":case"cols":if(!c&&c!==0)throw new Error(`${b} must be numeric, value: ${c}`);break;case"windowsPty":c=c??{}}return c}}r.OptionsService=S},2660:function(y,r,l){var g=this&&this.__decorate||function(S,C,b,c){var m,f=arguments.length,v=f<3?C:c===null?c=Object.getOwnPropertyDescriptor(C,b):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(S,C,b,c);else for(var N=S.length-1;N>=0;N--)(m=S[N])&&(v=(f<3?m(v):f>3?m(C,b,v):m(C,b))||v);return f>3&&v&&Object.defineProperty(C,b,v),v},_=this&&this.__param||function(S,C){return function(b,c){C(b,c,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;const u=l(2585);let p=r.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),T={data:S,id:this._nextId++,lines:[N]};return N.onDispose(()=>this._removeMarkerFromLink(T,N)),this._dataByLinkId.set(T.id,T),T.id}const b=S,c=this._getEntryIdKey(b),m=this._entriesWithId.get(c);if(m)return this.addLineToLink(m.id,C.ybase+C.y),m.id;const f=C.addMarker(C.ybase+C.y),v={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(v,f)),this._entriesWithId.set(v.key,v),this._dataByLinkId.set(v.id,v),v.id}addLineToLink(S,C){const b=this._dataByLinkId.get(S);if(b&&b.lines.every(c=>c.line!==C)){const c=this._bufferService.buffer.addMarker(C);b.lines.push(c),c.onDispose(()=>this._removeMarkerFromLink(b,c))}}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 b=S.lines.indexOf(C);b!==-1&&(S.lines.splice(b,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};r.OscLinkService=p=g([_(0,u.IBufferService)],p)},8343:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const l="di$target",g="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(_){return _[g]||[]},r.createDecorator=function(_){if(r.serviceRegistry.has(_))return r.serviceRegistry.get(_);const u=function(p,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,c,m){c[l]===c?c[g].push({id:b,index:m}):(c[g]=[{id:b,index:m}],c[l]=c)})(u,p,C)};return u.toString=()=>_,r.serviceRegistry.set(_,u),u}},2585:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const g=l(8343);var _;r.IBufferService=(0,g.createDecorator)("BufferService"),r.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),r.ICoreService=(0,g.createDecorator)("CoreService"),r.ICharsetService=(0,g.createDecorator)("CharsetService"),r.IInstantiationService=(0,g.createDecorator)("InstantiationService"),function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"}(_||(r.LogLevelEnum=_={})),r.ILogService=(0,g.createDecorator)("LogService"),r.IOptionsService=(0,g.createDecorator)("OptionsService"),r.IOscLinkService=(0,g.createDecorator)("OscLinkService"),r.IUnicodeService=(0,g.createDecorator)("UnicodeService"),r.IDecorationService=(0,g.createDecorator)("DecorationService")},1480:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const g=l(8460),_=l(225);class u{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,C,b=!1){return(16777215&S)<<3|(3&C)<<1|(b?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new g.EventEmitter,this.onChange=this._onChange.event;const S=new _.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,b=0;const c=S.length;for(let m=0;m<c;++m){let f=S.charCodeAt(m);if(55296<=f&&f<=56319){if(++m>=c)return C+this.wcwidth(f);const T=S.charCodeAt(m);56320<=T&&T<=57343?f=1024*(f-55296)+T-56320+65536:C+=this.wcwidth(T)}const v=this.charProperties(f,b);let N=u.extractWidth(v);u.extractShouldJoin(v)&&(N-=u.extractWidth(b)),C+=N,b=v}return C}charProperties(S,C){return this._activeProvider.charProperties(S,C)}}r.UnicodeService=u}},w={};function j(y){var r=w[y];if(r!==void 0)return r.exports;var l=w[y]={exports:{}};return d[y].call(l.exports,l,l.exports,j),l.exports}var L={};return(()=>{var y=L;Object.defineProperty(y,"__esModule",{value:!0}),y.Terminal=void 0;const r=j(9042),l=j(3236),g=j(844),_=j(5741),u=j(8285),p=j(7975),S=j(7090),C=["cols","rows"];class b extends g.Disposable{constructor(m){super(),this._core=this.register(new l.Terminal(m)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const f=N=>this._core.options[N],v=(N,T)=>{this._checkReadonlyOptions(N),this._core.options[N]=T};for(const N in this._core.options){const T={get:f.bind(this,N),set:v.bind(this,N)};Object.defineProperty(this._publicOptions,N,T)}}_checkReadonlyOptions(m){if(C.includes(m))throw new Error(`Option "${m}" 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 p.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 u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const m=this._core.coreService.decPrivateModes;let f="none";switch(this._core.coreMouseService.activeProtocol){case"X10":f="x10";break;case"VT200":f="vt200";break;case"DRAG":f="drag";break;case"ANY":f="any"}return{applicationCursorKeysMode:m.applicationCursorKeys,applicationKeypadMode:m.applicationKeypad,bracketedPasteMode:m.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:f,originMode:m.origin,reverseWraparoundMode:m.reverseWraparound,sendFocusMode:m.sendFocus,wraparoundMode:m.wraparound}}get options(){return this._publicOptions}set options(m){for(const f in m)this._publicOptions[f]=m[f]}blur(){this._core.blur()}focus(){this._core.focus()}input(m,f=!0){this._core.input(m,f)}resize(m,f){this._verifyIntegers(m,f),this._core.resize(m,f)}open(m){this._core.open(m)}attachCustomKeyEventHandler(m){this._core.attachCustomKeyEventHandler(m)}attachCustomWheelEventHandler(m){this._core.attachCustomWheelEventHandler(m)}registerLinkProvider(m){return this._core.registerLinkProvider(m)}registerCharacterJoiner(m){return this._checkProposedApi(),this._core.registerCharacterJoiner(m)}deregisterCharacterJoiner(m){this._checkProposedApi(),this._core.deregisterCharacterJoiner(m)}registerMarker(m=0){return this._verifyIntegers(m),this._core.registerMarker(m)}registerDecoration(m){return this._checkProposedApi(),this._verifyPositiveIntegers(m.x??0,m.width??0,m.height??0),this._core.registerDecoration(m)}hasSelection(){return this._core.hasSelection()}select(m,f,v){this._verifyIntegers(m,f,v),this._core.select(m,f,v)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(m,f){this._verifyIntegers(m,f),this._core.selectLines(m,f)}dispose(){super.dispose()}scrollLines(m){this._verifyIntegers(m),this._core.scrollLines(m)}scrollPages(m){this._verifyIntegers(m),this._core.scrollPages(m)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(m){this._verifyIntegers(m),this._core.scrollToLine(m)}clear(){this._core.clear()}write(m,f){this._core.write(m,f)}writeln(m,f){this._core.write(m),this._core.write(`\r
214
+ `,f)}paste(m){this._core.paste(m)}refresh(m,f){this._verifyIntegers(m,f),this._core.refresh(m,f)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return r}_verifyIntegers(...m){for(const f of m)if(f===1/0||isNaN(f)||f%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(const f of m)if(f&&(f===1/0||isNaN(f)||f%1!=0||f<0))throw new Error("This API only accepts positive integers")}}y.Terminal=b})(),L})())})(O1);var c3=O1.exports,B1={exports:{}};(function(o,s){(function(d,w){o.exports=w()})(self,()=>(()=>{var d={965:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.GlyphRenderer=void 0;const g=l(374),_=l(509),u=l(855),p=l(859),S=l(381),C=11,b=C*Float32Array.BYTES_PER_ELEMENT;let c,m=0,f=0,v=0;class N extends p.Disposable{constructor(E,A,D,R){super(),this._terminal=E,this._gl=A,this._dimensions=D,this._optionsService=R,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const M=this._gl;_.TextureAtlas.maxAtlasPages===void 0&&(_.TextureAtlas.maxAtlasPages=Math.min(32,(0,g.throwIfFalsy)(M.getParameter(M.MAX_TEXTURE_IMAGE_UNITS))),_.TextureAtlas.maxTextureSize=(0,g.throwIfFalsy)(M.getParameter(M.MAX_TEXTURE_SIZE))),this._program=(0,g.throwIfFalsy)((0,S.createProgram)(M,`#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(Q){let te="";for(let ie=1;ie<Q;ie++)te+=` else if (v_texpage == ${ie}) { outColor = texture(u_texture[${ie}], 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[${Q}];
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
+ }`}(_.TextureAtlas.maxAtlasPages))),this.register((0,p.toDisposable)(()=>M.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(M.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,g.throwIfFalsy)(M.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,g.throwIfFalsy)(M.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=M.createVertexArray(),M.bindVertexArray(this._vertexArrayObject);const H=new Float32Array([0,0,1,0,0,1,1,1]),U=M.createBuffer();this.register((0,p.toDisposable)(()=>M.deleteBuffer(U))),M.bindBuffer(M.ARRAY_BUFFER,U),M.bufferData(M.ARRAY_BUFFER,H,M.STATIC_DRAW),M.enableVertexAttribArray(0),M.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const I=new Uint8Array([0,1,2,3]),G=M.createBuffer();this.register((0,p.toDisposable)(()=>M.deleteBuffer(G))),M.bindBuffer(M.ELEMENT_ARRAY_BUFFER,G),M.bufferData(M.ELEMENT_ARRAY_BUFFER,I,M.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(M.createBuffer()),this.register((0,p.toDisposable)(()=>M.deleteBuffer(this._attributesBuffer))),M.bindBuffer(M.ARRAY_BUFFER,this._attributesBuffer),M.enableVertexAttribArray(2),M.vertexAttribPointer(2,2,M.FLOAT,!1,b,0),M.vertexAttribDivisor(2,1),M.enableVertexAttribArray(3),M.vertexAttribPointer(3,2,M.FLOAT,!1,b,2*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(3,1),M.enableVertexAttribArray(4),M.vertexAttribPointer(4,1,M.FLOAT,!1,b,4*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(4,1),M.enableVertexAttribArray(5),M.vertexAttribPointer(5,2,M.FLOAT,!1,b,5*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(5,1),M.enableVertexAttribArray(6),M.vertexAttribPointer(6,2,M.FLOAT,!1,b,7*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(6,1),M.enableVertexAttribArray(1),M.vertexAttribPointer(1,2,M.FLOAT,!1,b,9*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(1,1),M.useProgram(this._program);const ne=new Int32Array(_.TextureAtlas.maxAtlasPages);for(let Q=0;Q<_.TextureAtlas.maxAtlasPages;Q++)ne[Q]=Q;M.uniform1iv(this._textureLocation,ne),M.uniformMatrix4fv(this._projectionLocation,!1,S.PROJECTION_MATRIX),this._atlasTextures=[];for(let Q=0;Q<_.TextureAtlas.maxAtlasPages;Q++){const te=new S.GLTexture((0,g.throwIfFalsy)(M.createTexture()));this.register((0,p.toDisposable)(()=>M.deleteTexture(te.texture))),M.activeTexture(M.TEXTURE0+Q),M.bindTexture(M.TEXTURE_2D,te.texture),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE),M.texImage2D(M.TEXTURE_2D,0,M.RGBA,1,1,0,M.RGBA,M.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[Q]=te}M.enable(M.BLEND),M.blendFunc(M.SRC_ALPHA,M.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(E,A,D,R,M,H,U,I,G){this._updateCell(this._vertices.attributes,E,A,D,R,M,H,U,I,G)}_updateCell(E,A,D,R,M,H,U,I,G,ne){m=(D*this._terminal.cols+A)*C,R!==u.NULL_CELL_CODE&&R!==void 0?this._atlas&&(c=I&&I.length>1?this._atlas.getRasterizedGlyphCombinedChar(I,M,H,U,!1):this._atlas.getRasterizedGlyph(R,M,H,U,!1),f=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),M!==ne&&c.offset.x>f?(v=c.offset.x-f,E[m]=-(c.offset.x-v)+this._dimensions.device.char.left,E[m+1]=-c.offset.y+this._dimensions.device.char.top,E[m+2]=(c.size.x-v)/this._dimensions.device.canvas.width,E[m+3]=c.size.y/this._dimensions.device.canvas.height,E[m+4]=c.texturePage,E[m+5]=c.texturePositionClipSpace.x+v/this._atlas.pages[c.texturePage].canvas.width,E[m+6]=c.texturePositionClipSpace.y,E[m+7]=c.sizeClipSpace.x-v/this._atlas.pages[c.texturePage].canvas.width,E[m+8]=c.sizeClipSpace.y):(E[m]=-c.offset.x+this._dimensions.device.char.left,E[m+1]=-c.offset.y+this._dimensions.device.char.top,E[m+2]=c.size.x/this._dimensions.device.canvas.width,E[m+3]=c.size.y/this._dimensions.device.canvas.height,E[m+4]=c.texturePage,E[m+5]=c.texturePositionClipSpace.x,E[m+6]=c.texturePositionClipSpace.y,E[m+7]=c.sizeClipSpace.x,E[m+8]=c.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,g.allowRescaling)(R,G,c.size.x,this._dimensions.device.cell.width)&&(E[m+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):E.fill(0,m,m+C-1-2)}clear(){const E=this._terminal,A=E.cols*E.rows*C;this._vertices.count!==A?this._vertices.attributes=new Float32Array(A):this._vertices.attributes.fill(0);let D=0;for(;D<this._vertices.attributesBuffers.length;D++)this._vertices.count!==A?this._vertices.attributesBuffers[D]=new Float32Array(A):this._vertices.attributesBuffers[D].fill(0);this._vertices.count=A,D=0;for(let R=0;R<E.rows;R++)for(let M=0;M<E.cols;M++)this._vertices.attributes[D+9]=M/E.cols,this._vertices.attributes[D+10]=R/E.rows,D+=C}handleResize(){const E=this._gl;E.useProgram(this._program),E.viewport(0,0,E.canvas.width,E.canvas.height),E.uniform2f(this._resolutionLocation,E.canvas.width,E.canvas.height),this.clear()}render(E){if(!this._atlas)return;const A=this._gl;A.useProgram(this._program),A.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const D=this._vertices.attributesBuffers[this._activeBuffer];let R=0;for(let M=0;M<E.lineLengths.length;M++){const H=M*this._terminal.cols*C,U=this._vertices.attributes.subarray(H,H+E.lineLengths[M]*C);D.set(U,R),R+=U.length}A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.bufferData(A.ARRAY_BUFFER,D.subarray(0,R),A.STREAM_DRAW);for(let M=0;M<this._atlas.pages.length;M++)this._atlas.pages[M].version!==this._atlasTextures[M].version&&this._bindAtlasPageTexture(A,this._atlas,M);A.drawElementsInstanced(A.TRIANGLE_STRIP,4,A.UNSIGNED_BYTE,0,R/C)}setAtlas(E){this._atlas=E;for(const A of this._atlasTextures)A.version=-1}_bindAtlasPageTexture(E,A,D){E.activeTexture(E.TEXTURE0+D),E.bindTexture(E.TEXTURE_2D,this._atlasTextures[D].texture),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,E.RGBA,E.UNSIGNED_BYTE,A.pages[D].canvas),E.generateMipmap(E.TEXTURE_2D),this._atlasTextures[D].version=A.pages[D].version}setDimensions(E){this._dimensions=E}}r.GlyphRenderer=N},742:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RectangleRenderer=void 0;const g=l(374),_=l(859),u=l(310),p=l(381),S=8*Float32Array.BYTES_PER_ELEMENT;class C{constructor(){this.attributes=new Float32Array(160),this.count=0}}let b=0,c=0,m=0,f=0,v=0,N=0,T=0;class E extends _.Disposable{constructor(D,R,M,H){super(),this._terminal=D,this._gl=R,this._dimensions=M,this._themeService=H,this._vertices=new C,this._verticesCursor=new C;const U=this._gl;this._program=(0,g.throwIfFalsy)((0,p.createProgram)(U,`#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,_.toDisposable)(()=>U.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(U.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=U.createVertexArray(),U.bindVertexArray(this._vertexArrayObject);const I=new Float32Array([0,0,1,0,0,1,1,1]),G=U.createBuffer();this.register((0,_.toDisposable)(()=>U.deleteBuffer(G))),U.bindBuffer(U.ARRAY_BUFFER,G),U.bufferData(U.ARRAY_BUFFER,I,U.STATIC_DRAW),U.enableVertexAttribArray(3),U.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const ne=new Uint8Array([0,1,2,3]),Q=U.createBuffer();this.register((0,_.toDisposable)(()=>U.deleteBuffer(Q))),U.bindBuffer(U.ELEMENT_ARRAY_BUFFER,Q),U.bufferData(U.ELEMENT_ARRAY_BUFFER,ne,U.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(U.createBuffer()),this.register((0,_.toDisposable)(()=>U.deleteBuffer(this._attributesBuffer))),U.bindBuffer(U.ARRAY_BUFFER,this._attributesBuffer),U.enableVertexAttribArray(0),U.vertexAttribPointer(0,2,U.FLOAT,!1,S,0),U.vertexAttribDivisor(0,1),U.enableVertexAttribArray(1),U.vertexAttribPointer(1,2,U.FLOAT,!1,S,2*Float32Array.BYTES_PER_ELEMENT),U.vertexAttribDivisor(1,1),U.enableVertexAttribArray(2),U.vertexAttribPointer(2,4,U.FLOAT,!1,S,4*Float32Array.BYTES_PER_ELEMENT),U.vertexAttribDivisor(2,1),this._updateCachedColors(H.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 R=this._gl;R.useProgram(this._program),R.bindVertexArray(this._vertexArrayObject),R.uniformMatrix4fv(this._projectionLocation,!1,p.PROJECTION_MATRIX),R.bindBuffer(R.ARRAY_BUFFER,this._attributesBuffer),R.bufferData(R.ARRAY_BUFFER,D.attributes,R.DYNAMIC_DRAW),R.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,R.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 R=this._terminal,M=this._vertices;let H,U,I,G,ne,Q,te,ie,P,$,J,ee=1;for(H=0;H<R.rows;H++){for(I=-1,G=0,ne=0,Q=!1,U=0;U<R.cols;U++)te=(H*R.cols+U)*u.RENDER_MODEL_INDICIES_PER_CELL,ie=D.cells[te+u.RENDER_MODEL_BG_OFFSET],P=D.cells[te+u.RENDER_MODEL_FG_OFFSET],$=!!(67108864&P),(ie!==G||P!==ne&&(Q||$))&&((G!==0||Q&&ne!==0)&&(J=8*ee++,this._updateRectangle(M,J,ne,G,I,U,H)),I=U,G=ie,ne=P,Q=$);(G!==0||Q&&ne!==0)&&(J=8*ee++,this._updateRectangle(M,J,ne,G,I,R.cols,H))}M.count=ee}updateCursor(D){const R=this._verticesCursor,M=D.cursor;if(!M||M.style==="block")return void(R.count=0);let H,U=0;M.style!=="bar"&&M.style!=="outline"||(H=8*U++,this._addRectangleFloat(R.attributes,H,M.x*this._dimensions.device.cell.width,M.y*this._dimensions.device.cell.height,M.style==="bar"?M.dpr*M.cursorWidth:M.dpr,this._dimensions.device.cell.height,this._cursorFloat)),M.style!=="underline"&&M.style!=="outline"||(H=8*U++,this._addRectangleFloat(R.attributes,H,M.x*this._dimensions.device.cell.width,(M.y+1)*this._dimensions.device.cell.height-M.dpr,M.width*this._dimensions.device.cell.width,M.dpr,this._cursorFloat)),M.style==="outline"&&(H=8*U++,this._addRectangleFloat(R.attributes,H,M.x*this._dimensions.device.cell.width,M.y*this._dimensions.device.cell.height,M.width*this._dimensions.device.cell.width,M.dpr,this._cursorFloat),H=8*U++,this._addRectangleFloat(R.attributes,H,(M.x+M.width)*this._dimensions.device.cell.width-M.dpr,M.y*this._dimensions.device.cell.height,M.dpr,this._dimensions.device.cell.height,this._cursorFloat)),R.count=U}_updateRectangle(D,R,M,H,U,I,G){if(67108864&M)switch(50331648&M){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&M].rgba;break;case 50331648:b=(16777215&M)<<8;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&H){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&H].rgba;break;case 50331648:b=(16777215&H)<<8;break;default:b=this._themeService.colors.background.rgba}D.attributes.length<R+4&&(D.attributes=(0,p.expandFloat32Array)(D.attributes,this._terminal.rows*this._terminal.cols*8)),c=U*this._dimensions.device.cell.width,m=G*this._dimensions.device.cell.height,f=(b>>24&255)/255,v=(b>>16&255)/255,N=(b>>8&255)/255,T=1,this._addRectangle(D.attributes,R,c,m,(I-U)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,f,v,N,T)}_addRectangle(D,R,M,H,U,I,G,ne,Q,te){D[R]=M/this._dimensions.device.canvas.width,D[R+1]=H/this._dimensions.device.canvas.height,D[R+2]=U/this._dimensions.device.canvas.width,D[R+3]=I/this._dimensions.device.canvas.height,D[R+4]=G,D[R+5]=ne,D[R+6]=Q,D[R+7]=te}_addRectangleFloat(D,R,M,H,U,I,G){D[R]=M/this._dimensions.device.canvas.width,D[R+1]=H/this._dimensions.device.canvas.height,D[R+2]=U/this._dimensions.device.canvas.width,D[R+3]=I/this._dimensions.device.canvas.height,D[R+4]=G[0],D[R+5]=G[1],D[R+6]=G[2],D[R+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])}}r.RectangleRenderer=E},310:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderModel=r.COMBINED_CHAR_BIT_MASK=r.RENDER_MODEL_EXT_OFFSET=r.RENDER_MODEL_FG_OFFSET=r.RENDER_MODEL_BG_OFFSET=r.RENDER_MODEL_INDICIES_PER_CELL=void 0;const g=l(296);r.RENDER_MODEL_INDICIES_PER_CELL=4,r.RENDER_MODEL_BG_OFFSET=1,r.RENDER_MODEL_FG_OFFSET=2,r.RENDER_MODEL_EXT_OFFSET=3,r.COMBINED_CHAR_BIT_MASK=2147483648,r.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,g.createSelectionRenderModel)()}resize(_,u){const p=_*u*r.RENDER_MODEL_INDICIES_PER_CELL;p!==this.cells.length&&(this.cells=new Uint32Array(p),this.lineLengths=new Uint32Array(u))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.JoinedCellData=r.WebglRenderer=void 0;const g=l(820),_=l(274),u=l(627),p=l(457),S=l(56),C=l(374),b=l(345),c=l(859),m=l(147),f=l(782),v=l(855),N=l(965),T=l(742),E=l(310),A=l(733);class D extends c.Disposable{constructor(U,I,G,ne,Q,te,ie,P,$){super(),this._terminal=U,this._characterJoinerService=I,this._charSizeService=G,this._coreBrowserService=ne,this._coreService=Q,this._decorationService=te,this._optionsService=ie,this._themeService=P,this._cursorBlinkStateManager=new c.MutableDisposable,this._charAtlasDisposable=this.register(new c.MutableDisposable),this._observerDisposable=this.register(new c.MutableDisposable),this._model=new E.RenderModel,this._workCell=new f.CellData,this._workCell2=new f.CellData,this._rectangleRenderer=this.register(new c.MutableDisposable),this._glyphRenderer=this.register(new c.MutableDisposable),this._onChangeTextureAtlas=this.register(new b.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new b.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new b.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new b.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new _.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new A.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,ie,this._themeService)],this.dimensions=(0,C.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(ie.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const J={antialias:!1,depth:!1,preserveDrawingBuffer:$};if(this._gl=this._canvas.getContext("webgl2",J),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextlost",ee=>{console.log("webglcontextlost event received"),ee.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(ee)},3e3)})),this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextrestored",ee=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,u.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,S.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(ee,we)=>this._setCanvasDevicePixelDimensions(ee,we)),this.register(this._coreBrowserService.onWindowChange(ee=>{this._observerDisposable.value=(0,S.observeDevicePixelDimensions)(this._canvas,ee,(we,Se)=>this._setCanvasDevicePixelDimensions(we,Se))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,c.toDisposable)(()=>{var ee;for(const we of this._renderLayers)we.dispose();(ee=this._canvas.parentElement)==null||ee.removeChild(this._canvas),(0,u.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var U;return(U=this._charAtlas)==null?void 0:U.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(U,I){var G,ne,Q,te;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const ie of this._renderLayers)ie.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(),(Q=this._glyphRenderer.value)==null||Q.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 U;for(const I of this._renderLayers)I.handleBlur(this._terminal);(U=this._cursorBlinkStateManager.value)==null||U.pause(),this._requestRedrawViewport()}handleFocus(){var U;for(const I of this._renderLayers)I.handleFocus(this._terminal);(U=this._cursorBlinkStateManager.value)==null||U.resume(),this._requestRedrawViewport()}handleSelectionChanged(U,I,G){for(const ne of this._renderLayers)ne.handleSelectionChanged(this._terminal,U,I,G);this._model.selection.update(this._core,U,I,G),this._requestRedrawViewport()}handleCursorMove(){var U;for(const I of this._renderLayers)I.handleCursorMove(this._terminal);(U=this._cursorBlinkStateManager.value)==null||U.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new T.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 U=(0,u.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!==U&&(this._onChangeTextureAtlas.fire(U.pages[0].canvas),this._charAtlasDisposable.value=(0,c.getDisposeArrayDisposable)([(0,b.forwardEvent)(U.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,b.forwardEvent)(U.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=U,this._charAtlas.warmUp(),(I=this._glyphRenderer.value)==null||I.setAtlas(this._charAtlas)}_clearModel(U){var I;this._model.clear(),U&&((I=this._glyphRenderer.value)==null||I.clear())}clearTextureAtlas(){var U;(U=this._charAtlas)==null||U.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var U;this._clearModel(!0);for(const I of this._renderLayers)I.reset(this._terminal);(U=this._cursorBlinkStateManager.value)==null||U.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(U){return-1}deregisterCharacterJoiner(U){return!1}renderRows(U,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,U,I);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(U,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 p.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(U,I){const G=this._core;let ne,Q,te,ie,P,$,J,ee,we,Se,Z,ke,se,W,_e=this._workCell;U=M(U,G.rows-1,0),I=M(I,G.rows-1,0);const ue=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,Ie=ue-G.buffer.ydisp,Ue=Math.min(this._terminal.buffer.active.cursorX,G.cols-1);let Xe=-1;const Je=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let rt=!1;for(Q=U;Q<=I;Q++)for(te=Q+G.buffer.ydisp,ie=G.buffer.lines.get(te),this._model.lineLengths[Q]=0,P=this._characterJoinerService.getJoinedCharacters(te),se=0;se<G.cols;se++)if(ne=this._cellColorResolver.result.bg,ie.loadCell(se,_e),se===0&&(ne=this._cellColorResolver.result.bg),$=!1,J=se,P.length>0&&se===P[0][0]&&($=!0,ee=P.shift(),_e=new R(_e,ie.translateToString(!0,ee[0],ee[1]),ee[1]-ee[0]),J=ee[1]-1),we=_e.getChars(),Se=_e.getCode(),ke=(Q*G.cols+se)*E.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(_e,se,te,this.dimensions.device.cell.width),Je&&te===ue&&(se===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},Xe=Ue+_e.getWidth()-1),se>=Ue&&se<=Xe&&(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)),Se!==v.NULL_CELL_CODE&&(this._model.lineLengths[Q]=se+1),(this._model.cells[ke]!==Se||this._model.cells[ke+E.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ke+E.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ke+E.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(rt=!0,we.length>1&&(Se|=E.COMBINED_CHAR_BIT_MASK),this._model.cells[ke]=Se,this._model.cells[ke+E.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ke+E.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ke+E.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,Z=_e.getWidth(),this._glyphRenderer.value.updateCell(se,Q,Se,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,we,Z,ne),$))for(_e=this._workCell,se++;se<J;se++)W=(Q*G.cols+se)*E.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(se,Q,v.NULL_CELL_CODE,0,0,0,v.NULL_CELL_CHAR,0,0),this._model.cells[W]=v.NULL_CELL_CODE,this._model.cells[W+E.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[W+E.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[W+E.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;rt&&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(U,I){this._canvas.width===U&&this._canvas.height===I||(this._canvas.width=U,this._canvas.height=I,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const U=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:U,end:U})}}r.WebglRenderer=D;class R extends m.AttributeData{constructor(U,I,G){super(),this.content=0,this.combinedData="",this.fg=U.fg,this.bg=U.bg,this.combinedData=I,this._width=G}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(U){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function M(H,U,I=0){return Math.max(Math.min(H,U),I)}r.JoinedCellData=R},381:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.GLTexture=r.expandFloat32Array=r.createShader=r.createProgram=r.PROJECTION_MATRIX=void 0;const g=l(374);function _(u,p,S){const C=(0,g.throwIfFalsy)(u.createShader(p));if(u.shaderSource(C,S),u.compileShader(C),u.getShaderParameter(C,u.COMPILE_STATUS))return C;console.error(u.getShaderInfoLog(C)),u.deleteShader(C)}r.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),r.createProgram=function(u,p,S){const C=(0,g.throwIfFalsy)(u.createProgram());if(u.attachShader(C,(0,g.throwIfFalsy)(_(u,u.VERTEX_SHADER,p))),u.attachShader(C,(0,g.throwIfFalsy)(_(u,u.FRAGMENT_SHADER,S))),u.linkProgram(C),u.getProgramParameter(C,u.LINK_STATUS))return C;console.error(u.getProgramInfoLog(C)),u.deleteProgram(C)},r.createShader=_,r.expandFloat32Array=function(u,p){const S=Math.min(2*u.length,p),C=new Float32Array(S);for(let b=0;b<u.length;b++)C[b]=u[b];return C},r.GLTexture=class{constructor(u){this.texture=u,this.version=-1}}},592:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BaseRenderLayer=void 0;const g=l(627),_=l(237),u=l(374),p=l(859);class S extends p.Disposable{constructor(b,c,m,f,v,N,T,E){super(),this._container=c,this._alpha=v,this._coreBrowserService=N,this._optionsService=T,this._themeService=E,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-${m}-layer`),this._canvas.style.zIndex=f.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(A=>{this._refreshCharAtlas(b,A),this.reset(b)})),this.register((0,p.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,u.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(b){}handleFocus(b){}handleCursorMove(b){}handleGridChanged(b,c,m){}handleSelectionChanged(b,c,m,f=!1){}_setTransparency(b,c){if(c===this._alpha)return;const m=this._canvas;this._alpha=c,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,m),this._refreshCharAtlas(b,this._themeService.colors),this.handleGridChanged(b,0,b.rows-1)}_refreshCharAtlas(b,c){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,g.acquireTextureAtlas)(b,this._optionsService.rawOptions,c,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(b,c){this._deviceCellWidth=c.device.cell.width,this._deviceCellHeight=c.device.cell.height,this._deviceCharWidth=c.device.char.width,this._deviceCharHeight=c.device.char.height,this._deviceCharLeft=c.device.char.left,this._deviceCharTop=c.device.char.top,this._canvas.width=c.device.canvas.width,this._canvas.height=c.device.canvas.height,this._canvas.style.width=`${c.css.canvas.width}px`,this._canvas.style.height=`${c.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(b,this._themeService.colors)}_fillBottomLineAtCells(b,c,m=1){this._ctx.fillRect(b*this._deviceCellWidth,(c+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,m*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(b,c,m,f){this._alpha?this._ctx.clearRect(b*this._deviceCellWidth,c*this._deviceCellHeight,m*this._deviceCellWidth,f*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(b*this._deviceCellWidth,c*this._deviceCellHeight,m*this._deviceCellWidth,f*this._deviceCellHeight))}_fillCharTrueColor(b,c,m,f){this._ctx.font=this._getFont(b,!1,!1),this._ctx.textBaseline=_.TEXT_BASELINE,this._clipCell(m,f,c.getWidth()),this._ctx.fillText(c.getChars(),m*this._deviceCellWidth+this._deviceCharLeft,f*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(b,c,m){this._ctx.beginPath(),this._ctx.rect(b*this._deviceCellWidth,c*this._deviceCellHeight,m*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(b,c,m){return`${m?"italic":""} ${c?b.options.fontWeightBold:b.options.fontWeight} ${b.options.fontSize*this._coreBrowserService.dpr}px ${b.options.fontFamily}`}}r.BaseRenderLayer=S},733:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkRenderLayer=void 0;const g=l(197),_=l(237),u=l(592);class p extends u.BaseRenderLayer{constructor(C,b,c,m,f,v,N){super(c,C,"link",b,!0,f,v,N),this.register(m.onShowLinkUnderline(T=>this._handleShowLinkUnderline(T))),this.register(m.onHideLinkUnderline(T=>this._handleHideLinkUnderline(T)))}resize(C,b){super.resize(C,b),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===_.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 b=C.y1+1;b<C.y2;b++)this._fillBottomLineAtCells(0,b,C.cols);this._fillBottomLineAtCells(0,C.y2,C.x2)}this._state=C}_handleHideLinkUnderline(C){this._clearCurrentLink()}}r.LinkRenderLayer=p},820:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(l,g,_,u){l.addEventListener(g,_,u);let p=!1;return{dispose:()=>{p||(p=!0,l.removeEventListener(g,_,u))}}}},274:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellColorResolver=void 0;const g=l(855),_=l(160),u=l(374);let p,S=0,C=0,b=!1,c=!1,m=!1,f=0;r.CellColorResolver=class{constructor(v,N,T,E,A,D){this._terminal=v,this._optionService=N,this._selectionRenderModel=T,this._decorationService=E,this._coreBrowserService=A,this._themeService=D,this.result={fg:0,bg:0,ext:0}}resolve(v,N,T,E){if(this.result.bg=v.bg,this.result.fg=v.fg,this.result.ext=268435456&v.bg?v.extended.ext:0,C=0,S=0,c=!1,b=!1,m=!1,p=this._themeService.colors,f=0,v.getCode()!==g.NULL_CELL_CODE&&v.extended.underlineStyle===4){const A=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));f=N*E%(2*Math.round(A))}if(this._decorationService.forEachDecorationAtCell(N,T,"bottom",A=>{A.backgroundColorRGB&&(C=A.backgroundColorRGB.rgba>>8&16777215,c=!0),A.foregroundColorRGB&&(S=A.foregroundColorRGB.rgba>>8&16777215,b=!0)}),m=this._selectionRenderModel.isCellSelected(this._terminal,N,T),m){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=_.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(c=!0,p.selectionForeground&&(S=p.selectionForeground.rgba>>8&16777215,b=!0),(0,u.treatGlyphAsBackgroundColor)(v.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))S=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.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=_.rgba.blend(S,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}b=!0}}this._decorationService.forEachDecorationAtCell(N,T,"top",A=>{A.backgroundColorRGB&&(C=A.backgroundColorRGB.rgba>>8&16777215,c=!0),A.foregroundColorRGB&&(S=A.foregroundColorRGB.rgba>>8&16777215,b=!0)}),c&&(C=m?-16777216&v.bg&-134217729|C|50331648:-16777216&v.bg|C|50331648),b&&(S=-16777216&v.fg&-67108865|S|50331648),67108864&this.result.fg&&(c&&!b&&(S=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648,b=!0),!c&&b&&(C=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648,c=!0)),p=void 0,this.result.bg=c?C:this.result.bg,this.result.fg=b?S:this.result.fg,this.result.ext&=536870911,this.result.ext|=f<<29&3758096384}}},627:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.removeTerminalFromCache=r.acquireTextureAtlas=void 0;const g=l(509),_=l(197),u=[];r.acquireTextureAtlas=function(p,S,C,b,c,m,f,v){const N=(0,_.generateConfig)(b,c,m,f,S,C,v);for(let A=0;A<u.length;A++){const D=u[A],R=D.ownedBy.indexOf(p);if(R>=0){if((0,_.configEquals)(D.config,N))return D.atlas;D.ownedBy.length===1?(D.atlas.dispose(),u.splice(A,1)):D.ownedBy.splice(R,1);break}}for(let A=0;A<u.length;A++){const D=u[A];if((0,_.configEquals)(D.config,N))return D.ownedBy.push(p),D.atlas}const T=p._core,E={atlas:new g.TextureAtlas(document,N,T.unicodeService),config:N,ownedBy:[p]};return u.push(E),E.atlas},r.removeTerminalFromCache=function(p){for(let S=0;S<u.length;S++){const C=u[S].ownedBy.indexOf(p);if(C!==-1){u[S].ownedBy.length===1?(u[S].atlas.dispose(),u.splice(S,1)):u[S].ownedBy.splice(C,1);break}}}},197:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.is256Color=r.configEquals=r.generateConfig=void 0;const g=l(160);r.generateConfig=function(_,u,p,S,C,b,c){const m={foreground:b.foreground,background:b.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:b.ansi.slice(),contrastCache:b.contrastCache,halfContrastCache:b.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:c,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:_,deviceCellHeight:u,deviceCharWidth:p,deviceCharHeight:S,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:m}},r.configEquals=function(_,u){for(let p=0;p<_.colors.ansi.length;p++)if(_.colors.ansi[p].rgba!==u.colors.ansi[p].rgba)return!1;return _.devicePixelRatio===u.devicePixelRatio&&_.customGlyphs===u.customGlyphs&&_.lineHeight===u.lineHeight&&_.letterSpacing===u.letterSpacing&&_.fontFamily===u.fontFamily&&_.fontSize===u.fontSize&&_.fontWeight===u.fontWeight&&_.fontWeightBold===u.fontWeightBold&&_.allowTransparency===u.allowTransparency&&_.deviceCharWidth===u.deviceCharWidth&&_.deviceCharHeight===u.deviceCharHeight&&_.drawBoldTextInBrightColors===u.drawBoldTextInBrightColors&&_.minimumContrastRatio===u.minimumContrastRatio&&_.colors.foreground.rgba===u.colors.foreground.rgba&&_.colors.background.rgba===u.colors.background.rgba},r.is256Color=function(_){return(50331648&_)==16777216||(50331648&_)==33554432}},237:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;const g=l(399);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},457:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CursorBlinkStateManager=void 0,r.CursorBlinkStateManager=class{constructor(l,g){this._renderCallback=l,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(l=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)},l)}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:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tryDrawCustomChar=r.powerlineDefinitions=r.boxDrawingDefinitions=r.blockElementDefinitions=void 0;const g=l(374);r.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 _={"░":[[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]]};r.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:(b,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"║":{1:(b,c)=>`M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╒":{1:(b,c)=>`M.5,1 L.5,${.5-c} L1,${.5-c} M.5,${.5+c} L1,${.5+c}`},"╓":{1:(b,c)=>`M${.5-b},1 L${.5-b},.5 L1,.5 M${.5+b},.5 L${.5+b},1`},"╔":{1:(b,c)=>`M1,${.5-c} L${.5-b},${.5-c} L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1`},"╕":{1:(b,c)=>`M0,${.5-c} L.5,${.5-c} L.5,1 M0,${.5+c} L.5,${.5+c}`},"╖":{1:(b,c)=>`M${.5+b},1 L${.5+b},.5 L0,.5 M${.5-b},.5 L${.5-b},1`},"╗":{1:(b,c)=>`M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M0,${.5-c} L${.5+b},${.5-c} L${.5+b},1`},"╘":{1:(b,c)=>`M.5,0 L.5,${.5+c} L1,${.5+c} M.5,${.5-c} L1,${.5-c}`},"╙":{1:(b,c)=>`M1,.5 L${.5-b},.5 L${.5-b},0 M${.5+b},.5 L${.5+b},0`},"╚":{1:(b,c)=>`M1,${.5-c} L${.5+b},${.5-c} L${.5+b},0 M1,${.5+c} L${.5-b},${.5+c} L${.5-b},0`},"╛":{1:(b,c)=>`M0,${.5+c} L.5,${.5+c} L.5,0 M0,${.5-c} L.5,${.5-c}`},"╜":{1:(b,c)=>`M0,.5 L${.5+b},.5 L${.5+b},0 M${.5-b},.5 L${.5-b},0`},"╝":{1:(b,c)=>`M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0 M0,${.5+c} L${.5+b},${.5+c} L${.5+b},0`},"╞":{1:(b,c)=>`M.5,0 L.5,1 M.5,${.5-c} L1,${.5-c} M.5,${.5+c} L1,${.5+c}`},"╟":{1:(b,c)=>`M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1 M${.5+b},.5 L1,.5`},"╠":{1:(b,c)=>`M${.5-b},0 L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1 M1,${.5-c} L${.5+b},${.5-c} L${.5+b},0`},"╡":{1:(b,c)=>`M.5,0 L.5,1 M0,${.5-c} L.5,${.5-c} M0,${.5+c} L.5,${.5+c}`},"╢":{1:(b,c)=>`M0,.5 L${.5-b},.5 M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╣":{1:(b,c)=>`M${.5+b},0 L${.5+b},1 M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0`},"╤":{1:(b,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c} M.5,${.5+c} L.5,1`},"╥":{1:(b,c)=>`M0,.5 L1,.5 M${.5-b},.5 L${.5-b},1 M${.5+b},.5 L${.5+b},1`},"╦":{1:(b,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1`},"╧":{1:(b,c)=>`M.5,0 L.5,${.5-c} M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"╨":{1:(b,c)=>`M0,.5 L1,.5 M${.5-b},.5 L${.5-b},0 M${.5+b},.5 L${.5+b},0`},"╩":{1:(b,c)=>`M0,${.5+c} L1,${.5+c} M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0 M1,${.5-c} L${.5+b},${.5-c} L${.5+b},0`},"╪":{1:(b,c)=>`M.5,0 L.5,1 M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"╫":{1:(b,c)=>`M0,.5 L1,.5 M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╬":{1:(b,c)=>`M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1 M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0 M1,${.5-c} L${.5+b},${.5-c} L${.5+b},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:(b,c)=>`M.5,1 L.5,${.5+c/.15*.5} C.5,${.5+c/.15*.5},.5,.5,1,.5`},"╮":{1:(b,c)=>`M.5,1 L.5,${.5+c/.15*.5} C.5,${.5+c/.15*.5},.5,.5,0,.5`},"╯":{1:(b,c)=>`M.5,0 L.5,${.5-c/.15*.5} C.5,${.5-c/.15*.5},.5,.5,0,.5`},"╰":{1:(b,c)=>`M.5,0 L.5,${.5-c/.15*.5} C.5,${.5-c/.15*.5},.5,.5,1,.5`}},r.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}},r.powerlineDefinitions[""]=r.powerlineDefinitions[""],r.powerlineDefinitions[""]=r.powerlineDefinitions[""],r.tryDrawCustomChar=function(b,c,m,f,v,N,T,E){const A=r.blockElementDefinitions[c];if(A)return function(H,U,I,G,ne,Q){for(let te=0;te<U.length;te++){const ie=U[te],P=ne/8,$=Q/8;H.fillRect(I+ie.x*P,G+ie.y*$,ie.w*P,ie.h*$)}}(b,A,m,f,v,N),!0;const D=_[c];if(D)return function(H,U,I,G,ne,Q){let te=u.get(U);te||(te=new Map,u.set(U,te));const ie=H.fillStyle;if(typeof ie!="string")throw new Error(`Unexpected fillStyle type "${ie}"`);let P=te.get(ie);if(!P){const $=U[0].length,J=U.length,ee=H.canvas.ownerDocument.createElement("canvas");ee.width=$,ee.height=J;const we=(0,g.throwIfFalsy)(ee.getContext("2d")),Se=new ImageData($,J);let Z,ke,se,W;if(ie.startsWith("#"))Z=parseInt(ie.slice(1,3),16),ke=parseInt(ie.slice(3,5),16),se=parseInt(ie.slice(5,7),16),W=ie.length>7&&parseInt(ie.slice(7,9),16)||1;else{if(!ie.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${ie}" when drawing pattern glyph`);[Z,ke,se,W]=ie.substring(5,ie.length-1).split(",").map(_e=>parseFloat(_e))}for(let _e=0;_e<J;_e++)for(let ue=0;ue<$;ue++)Se.data[4*(_e*$+ue)]=Z,Se.data[4*(_e*$+ue)+1]=ke,Se.data[4*(_e*$+ue)+2]=se,Se.data[4*(_e*$+ue)+3]=U[_e][ue]*(255*W);we.putImageData(Se,0,0),P=(0,g.throwIfFalsy)(H.createPattern(ee,null)),te.set(ie,P)}H.fillStyle=P,H.fillRect(I,G,ne,Q)}(b,D,m,f,v,N),!0;const R=r.boxDrawingDefinitions[c];if(R)return function(H,U,I,G,ne,Q,te){H.strokeStyle=H.fillStyle;for(const[ie,P]of Object.entries(U)){let $;H.beginPath(),H.lineWidth=te*Number.parseInt(ie),$=typeof P=="function"?P(.15,.15/Q*ne):P;for(const J of $.split(" ")){const ee=J[0],we=S[ee];if(!we){console.error(`Could not find drawing instructions for "${ee}"`);continue}const Se=J.substring(1).split(",");Se[0]&&Se[1]&&we(H,C(Se,ne,Q,I,G,!0,te))}H.stroke(),H.closePath()}}(b,R,m,f,v,N,E),!0;const M=r.powerlineDefinitions[c];return!!M&&(function(H,U,I,G,ne,Q,te,ie){const P=new Path2D;P.rect(I,G,ne,Q),H.clip(P),H.beginPath();const $=te/12;H.lineWidth=ie*$;for(const J of U.d.split(" ")){const ee=J[0],we=S[ee];if(!we){console.error(`Could not find drawing instructions for "${ee}"`);continue}const Se=J.substring(1).split(",");Se[0]&&Se[1]&&we(H,C(Se,ne,Q,I,G,!1,ie,(U.leftPadding??0)*($/2),(U.rightPadding??0)*($/2)))}U.type===1?(H.strokeStyle=H.fillStyle,H.stroke()):H.fill(),H.closePath()}(b,M,m,f,v,N,T,E),!0)};const u=new Map;function p(b,c,m=0){return Math.max(Math.min(b,c),m)}const S={C:(b,c)=>b.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]),L:(b,c)=>b.lineTo(c[0],c[1]),M:(b,c)=>b.moveTo(c[0],c[1])};function C(b,c,m,f,v,N,T,E=0,A=0){const D=b.map(R=>parseFloat(R)||parseInt(R));if(D.length<2)throw new Error("Too few arguments for instruction");for(let R=0;R<D.length;R+=2)D[R]*=c-E*T-A*T,N&&D[R]!==0&&(D[R]=p(Math.round(D[R]+.5)-.5,c,0)),D[R]+=f+E*T;for(let R=1;R<D.length;R+=2)D[R]*=m,N&&D[R]!==0&&(D[R]=p(Math.round(D[R]+.5)-.5,m,0)),D[R]+=v;return D}},56:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.observeDevicePixelDimensions=void 0;const g=l(859);r.observeDevicePixelDimensions=function(_,u,p){let S=new u.ResizeObserver(C=>{const b=C.find(f=>f.target===_);if(!b)return;if(!("devicePixelContentBoxSize"in b))return S==null||S.disconnect(),void(S=void 0);const c=b.devicePixelContentBoxSize[0].inlineSize,m=b.devicePixelContentBoxSize[0].blockSize;c>0&&m>0&&p(c,m)});try{S.observe(_,{box:["device-pixel-content-box"]})}catch{S.disconnect(),S=void 0}return(0,g.toDisposable)(()=>S==null?void 0:S.disconnect())}},374:(y,r)=>{function l(_){return 57508<=_&&_<=57558}function g(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},r.isPowerlineGlyph=l,r.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},r.isEmoji=g,r.allowRescaling=function(_,u,p,S){return u===1&&p>Math.ceil(1.5*S)&&_!==void 0&&_>255&&!g(_)&&!l(_)&&!function(C){return 57344<=C&&C<=63743}(_)},r.treatGlyphAsBackgroundColor=function(_){return l(_)||function(u){return 9472<=u&&u<=9631}(_)},r.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}}}},r.computeNextVariantOffset=function(_,u,p=0){return(_-(2*Math.round(u)-p))%(2*Math.round(u))}},296:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class l{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(_,u,p,S=!1){if(this.selectionStart=u,this.selectionEnd=p,!u||!p||u[0]===p[0]&&u[1]===p[1])return void this.clear();const C=_.buffers.active.ydisp,b=u[1]-C,c=p[1]-C,m=Math.max(b,0),f=Math.min(c,_.rows-1);m>=_.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=b,this.viewportEndRow=c,this.viewportCappedStartRow=m,this.viewportCappedEndRow=f,this.startCol=u[0],this.endCol=p[0])}isCellSelected(_,u,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&p>=this.viewportCappedStartRow&&u<this.endCol&&p<=this.viewportCappedEndRow:u<this.startCol&&p>=this.viewportCappedStartRow&&u>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol)}}r.createSelectionRenderModel=function(){return new l}},509:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TextureAtlas=void 0;const g=l(237),_=l(860),u=l(374),p=l(160),S=l(345),C=l(485),b=l(385),c=l(147),m=l(855),f={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 v;class N{get pages(){return this._pages}constructor(R,M,H){this._document=R,this._config=M,this._unicodeService=H,this._didWarmUp=!1,this._cacheMap=new C.FourKeyMap,this._cacheMapCombined=new C.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new c.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new S.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new S.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=A(R,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,u.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const R of this.pages)R.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const R=new b.IdleTaskQueue;for(let M=33;M<126;M++)R.enqueue(()=>{if(!this._cacheMap.get(M,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT)){const H=this._drawToCache(M,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT);this._cacheMap.set(M,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT,H)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const R of this._pages)R.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(N.maxAtlasPages&&this._pages.length>=Math.max(4,N.maxAtlasPages)){const M=this._pages.filter(te=>2*te.canvas.width<=(N.maxTextureSize||4096)).sort((te,ie)=>ie.canvas.width!==te.canvas.width?ie.canvas.width-te.canvas.width:ie.percentageUsed-te.percentageUsed);let H=-1,U=0;for(let te=0;te<M.length;te++)if(M[te].canvas.width!==U)H=te,U=M[te].canvas.width;else if(te-H==3)break;const I=M.slice(H,H+4),G=I.map(te=>te.glyphs[0].texturePage).sort((te,ie)=>te>ie?1:-1),ne=this.pages.length-I.length,Q=this._mergePages(I,ne);Q.version++;for(let te=G.length-1;te>=0;te--)this._deletePage(G[te]);this.pages.push(Q),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(Q.canvas)}const R=new T(this._document,this._textureSize);return this._pages.push(R),this._activePages.push(R),this._onAddTextureAtlasCanvas.fire(R.canvas),R}_mergePages(R,M){const H=2*R[0].canvas.width,U=new T(this._document,H,R);for(const[I,G]of R.entries()){const ne=I*G.canvas.width%H,Q=Math.floor(I/2)*G.canvas.height;U.ctx.drawImage(G.canvas,ne,Q);for(const ie of G.glyphs)ie.texturePage=M,ie.sizeClipSpace.x=ie.size.x/H,ie.sizeClipSpace.y=ie.size.y/H,ie.texturePosition.x+=ne,ie.texturePosition.y+=Q,ie.texturePositionClipSpace.x=ie.texturePosition.x/H,ie.texturePositionClipSpace.y=ie.texturePosition.y/H;this._onRemoveTextureAtlasCanvas.fire(G.canvas);const te=this._activePages.indexOf(G);te!==-1&&this._activePages.splice(te,1)}return U}_deletePage(R){this._pages.splice(R,1);for(let M=R;M<this._pages.length;M++){const H=this._pages[M];for(const U of H.glyphs)U.texturePage--;H.version++}}getRasterizedGlyphCombinedChar(R,M,H,U,I){return this._getFromCacheMap(this._cacheMapCombined,R,M,H,U,I)}getRasterizedGlyph(R,M,H,U,I){return this._getFromCacheMap(this._cacheMap,R,M,H,U,I)}_getFromCacheMap(R,M,H,U,I,G=!1){return v=R.get(M,H,U,I),v||(v=this._drawToCache(M,H,U,I,G),R.set(M,H,U,I,v)),v}_getColorFromAnsiIndex(R){if(R>=this._config.colors.ansi.length)throw new Error("No color found for idx "+R);return this._config.colors.ansi[R]}_getBackgroundColor(R,M,H,U){if(this._config.allowTransparency)return p.NULL_COLOR;let I;switch(R){case 16777216:case 33554432:I=this._getColorFromAnsiIndex(M);break;case 50331648:const G=c.AttributeData.toColorRGB(M);I=p.channels.toColor(G[0],G[1],G[2]);break;default:I=H?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return I}_getForegroundColor(R,M,H,U,I,G,ne,Q,te,ie){const P=this._getMinimumContrastColor(R,M,H,U,I,G,ne,te,Q,ie);if(P)return P;let $;switch(I){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&te&&G<8&&(G+=8),$=this._getColorFromAnsiIndex(G);break;case 50331648:const J=c.AttributeData.toColorRGB(G);$=p.channels.toColor(J[0],J[1],J[2]);break;default:$=ne?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&($=p.color.opaque($)),Q&&($=p.color.multiplyOpacity($,g.DIM_OPACITY)),$}_resolveBackgroundRgba(R,M,H){switch(R){case 16777216:case 33554432:return this._getColorFromAnsiIndex(M).rgba;case 50331648:return M<<8;default:return H?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(R,M,H,U){switch(R){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&U&&M<8&&(M+=8),this._getColorFromAnsiIndex(M).rgba;case 50331648:return M<<8;default:return H?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(R,M,H,U,I,G,ne,Q,te,ie){if(this._config.minimumContrastRatio===1||ie)return;const P=this._getContrastCache(te),$=P.getColor(R,U);if($!==void 0)return $||void 0;const J=this._resolveBackgroundRgba(M,H,ne),ee=this._resolveForegroundRgba(I,G,ne,Q),we=p.rgba.ensureContrastRatio(J,ee,this._config.minimumContrastRatio/(te?2:1));if(!we)return void P.setColor(R,U,null);const Se=p.channels.toColor(we>>24&255,we>>16&255,we>>8&255);return P.setColor(R,U,Se),Se}_getContrastCache(R){return R?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(R,M,H,U,I=!1){const G=typeof R=="number"?String.fromCharCode(R):R,ne=Math.min(this._config.deviceCellWidth*Math.max(G.length,2)+4,this._textureSize);this._tmpCanvas.width<ne&&(this._tmpCanvas.width=ne);const Q=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<Q&&(this._tmpCanvas.height=Q),this._tmpCtx.save(),this._workAttributeData.fg=H,this._workAttributeData.bg=M,this._workAttributeData.extended.ext=U,this._workAttributeData.isInvisible())return f;const te=!!this._workAttributeData.isBold(),ie=!!this._workAttributeData.isInverse(),P=!!this._workAttributeData.isDim(),$=!!this._workAttributeData.isItalic(),J=!!this._workAttributeData.isUnderline(),ee=!!this._workAttributeData.isStrikethrough(),we=!!this._workAttributeData.isOverline();let Se=this._workAttributeData.getFgColor(),Z=this._workAttributeData.getFgColorMode(),ke=this._workAttributeData.getBgColor(),se=this._workAttributeData.getBgColorMode();if(ie){const ae=Se;Se=ke,ke=ae;const Fe=Z;Z=se,se=Fe}const W=this._getBackgroundColor(se,ke,ie,P);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=W.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,ue=$?"italic":"";this._tmpCtx.font=`${ue} ${_e} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=g.TEXT_BASELINE;const Ie=G.length===1&&(0,u.isPowerlineGlyph)(G.charCodeAt(0)),Ue=G.length===1&&(0,u.isRestrictedPowerlineGlyph)(G.charCodeAt(0)),Xe=this._getForegroundColor(M,se,ke,H,Z,Se,ie,P,te,(0,u.treatGlyphAsBackgroundColor)(G.charCodeAt(0)));this._tmpCtx.fillStyle=Xe.css;const Je=Ue?0:4;let rt=!1;this._config.customGlyphs!==!1&&(rt=(0,_.tryDrawCustomChar)(this._tmpCtx,G,Je,Je,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Nt,Ze=!Ie;if(Nt=typeof R=="number"?this._unicodeService.wcwidth(R):this._unicodeService.getStringCellWidth(R),J){this._tmpCtx.save();const ae=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Fe=ae%2==1?.5:0;if(this._tmpCtx.lineWidth=ae,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Ze=!1,this._tmpCtx.strokeStyle=`rgb(${c.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Ze=!1;let me=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&me<8&&(me+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(me).css}this._tmpCtx.beginPath();const et=Je,ve=Math.ceil(Je+this._config.deviceCharHeight)-Fe-(I?2*ae:0),Ye=ve+ae,Ee=ve+2*ae;let pe=this._workAttributeData.getUnderlineVariantOffset();for(let me=0;me<Nt;me++){this._tmpCtx.save();const Re=et+me*this._config.deviceCellWidth,Oe=et+(me+1)*this._config.deviceCellWidth,bt=Re+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Re,ve),this._tmpCtx.lineTo(Oe,ve),this._tmpCtx.moveTo(Re,Ee),this._tmpCtx.lineTo(Oe,Ee);break;case 3:const kt=ae<=1?Ee:Math.ceil(Je+this._config.deviceCharHeight-ae/2)-Fe,Ct=ae<=1?ve:Math.ceil(Je+this._config.deviceCharHeight+ae/2)-Fe,Pt=new Path2D;Pt.rect(Re,ve,this._config.deviceCellWidth,Ee-ve),this._tmpCtx.clip(Pt),this._tmpCtx.moveTo(Re-this._config.deviceCellWidth/2,Ye),this._tmpCtx.bezierCurveTo(Re-this._config.deviceCellWidth/2,Ct,Re,Ct,Re,Ye),this._tmpCtx.bezierCurveTo(Re,kt,bt,kt,bt,Ye),this._tmpCtx.bezierCurveTo(bt,Ct,Oe,Ct,Oe,Ye),this._tmpCtx.bezierCurveTo(Oe,kt,Oe+this._config.deviceCellWidth/2,kt,Oe+this._config.deviceCellWidth/2,Ye);break;case 4:const Qt=pe===0?0:pe>=ae?2*ae-pe:ae-pe;pe>=ae||Qt===0?(this._tmpCtx.setLineDash([Math.round(ae),Math.round(ae)]),this._tmpCtx.moveTo(Re+Qt,ve),this._tmpCtx.lineTo(Oe,ve)):(this._tmpCtx.setLineDash([Math.round(ae),Math.round(ae)]),this._tmpCtx.moveTo(Re,ve),this._tmpCtx.lineTo(Re+Qt,ve),this._tmpCtx.moveTo(Re+Qt+ae,ve),this._tmpCtx.lineTo(Oe,ve)),pe=(0,u.computeNextVariantOffset)(Oe-Re,ae,pe);break;case 5:const Ft=.6,mt=.3,St=Oe-Re,Ln=Math.floor(Ft*St),An=Math.floor(mt*St),In=St-Ln-An;this._tmpCtx.setLineDash([Ln,An,In]),this._tmpCtx.moveTo(Re,ve),this._tmpCtx.lineTo(Oe,ve);break;default:this._tmpCtx.moveTo(Re,ve),this._tmpCtx.lineTo(Oe,ve)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!rt&&this._config.fontSize>=12&&!this._config.allowTransparency&&G!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const me=this._tmpCtx.measureText(G);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in me&&me.actualBoundingBoxDescent>0){this._tmpCtx.save();const Re=new Path2D;Re.rect(et,ve-Math.ceil(ae/2),this._config.deviceCellWidth*Nt,Ee-ve+Math.ceil(ae/2)),this._tmpCtx.clip(Re),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=W.css,this._tmpCtx.strokeText(G,Je,Je+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(we){const ae=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Fe=ae%2==1?.5:0;this._tmpCtx.lineWidth=ae,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Je,Je+Fe),this._tmpCtx.lineTo(Je+this._config.deviceCharWidth*Nt,Je+Fe),this._tmpCtx.stroke()}if(rt||this._tmpCtx.fillText(G,Je,Je+this._config.deviceCharHeight),G==="_"&&!this._config.allowTransparency){let ae=E(this._tmpCtx.getImageData(Je,Je,this._config.deviceCellWidth,this._config.deviceCellHeight),W,Xe,Ze);if(ae)for(let Fe=1;Fe<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(G,Je,Je+this._config.deviceCharHeight-Fe),ae=E(this._tmpCtx.getImageData(Je,Je,this._config.deviceCellWidth,this._config.deviceCellHeight),W,Xe,Ze),ae);Fe++);}if(ee){const ae=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Fe=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ae,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Je,Je+Math.floor(this._config.deviceCharHeight/2)-Fe),this._tmpCtx.lineTo(Je+this._config.deviceCharWidth*Nt,Je+Math.floor(this._config.deviceCharHeight/2)-Fe),this._tmpCtx.stroke()}this._tmpCtx.restore();const qt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Xt;if(Xt=this._config.allowTransparency?function(ae){for(let Fe=0;Fe<ae.data.length;Fe+=4)if(ae.data[Fe+3]>0)return!1;return!0}(qt):E(qt,W,Xe,Ze),Xt)return f;const lt=this._findGlyphBoundingBox(qt,this._workBoundingBox,ne,Ue,rt,Je);let Qe,nt;for(;;){if(this._activePages.length===0){const ae=this._createNewPage();Qe=ae,nt=ae.currentRow,nt.height=lt.size.y;break}Qe=this._activePages[this._activePages.length-1],nt=Qe.currentRow;for(const ae of this._activePages)lt.size.y<=ae.currentRow.height&&(Qe=ae,nt=ae.currentRow);for(let ae=this._activePages.length-1;ae>=0;ae--)for(const Fe of this._activePages[ae].fixedRows)Fe.height<=nt.height&&lt.size.y<=Fe.height&&(Qe=this._activePages[ae],nt=Fe);if(nt.y+lt.size.y>=Qe.canvas.height||nt.height>lt.size.y+2){let ae=!1;if(Qe.currentRow.y+Qe.currentRow.height+lt.size.y>=Qe.canvas.height){let Fe;for(const et of this._activePages)if(et.currentRow.y+et.currentRow.height+lt.size.y<et.canvas.height){Fe=et;break}if(Fe)Qe=Fe;else if(N.maxAtlasPages&&this._pages.length>=N.maxAtlasPages&&nt.y+lt.size.y<=Qe.canvas.height&&nt.height>=lt.size.y&&nt.x+lt.size.x<=Qe.canvas.width)ae=!0;else{const et=this._createNewPage();Qe=et,nt=et.currentRow,nt.height=lt.size.y,ae=!0}}ae||(Qe.currentRow.height>0&&Qe.fixedRows.push(Qe.currentRow),nt={x:0,y:Qe.currentRow.y+Qe.currentRow.height,height:lt.size.y},Qe.fixedRows.push(nt),Qe.currentRow={x:0,y:nt.y+nt.height,height:0})}if(nt.x+lt.size.x<=Qe.canvas.width)break;nt===Qe.currentRow?(nt.x=0,nt.y+=nt.height,nt.height=0):Qe.fixedRows.splice(Qe.fixedRows.indexOf(nt),1)}return lt.texturePage=this._pages.indexOf(Qe),lt.texturePosition.x=nt.x,lt.texturePosition.y=nt.y,lt.texturePositionClipSpace.x=nt.x/Qe.canvas.width,lt.texturePositionClipSpace.y=nt.y/Qe.canvas.height,lt.sizeClipSpace.x/=Qe.canvas.width,lt.sizeClipSpace.y/=Qe.canvas.height,nt.height=Math.max(nt.height,lt.size.y),nt.x+=lt.size.x,Qe.ctx.putImageData(qt,lt.texturePosition.x-this._workBoundingBox.left,lt.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,lt.size.x,lt.size.y),Qe.addGlyph(lt),Qe.version++,lt}_findGlyphBoundingBox(R,M,H,U,I,G){M.top=0;const ne=U?this._config.deviceCellHeight:this._tmpCanvas.height,Q=U?this._config.deviceCellWidth:H;let te=!1;for(let ie=0;ie<ne;ie++){for(let P=0;P<Q;P++){const $=ie*this._tmpCanvas.width*4+4*P+3;if(R.data[$]!==0){M.top=ie,te=!0;break}}if(te)break}M.left=0,te=!1;for(let ie=0;ie<G+Q;ie++){for(let P=0;P<ne;P++){const $=P*this._tmpCanvas.width*4+4*ie+3;if(R.data[$]!==0){M.left=ie,te=!0;break}}if(te)break}M.right=Q,te=!1;for(let ie=G+Q-1;ie>=G;ie--){for(let P=0;P<ne;P++){const $=P*this._tmpCanvas.width*4+4*ie+3;if(R.data[$]!==0){M.right=ie,te=!0;break}}if(te)break}M.bottom=ne,te=!1;for(let ie=ne-1;ie>=0;ie--){for(let P=0;P<Q;P++){const $=ie*this._tmpCanvas.width*4+4*P+3;if(R.data[$]!==0){M.bottom=ie,te=!0;break}}if(te)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:M.right-M.left+1,y:M.bottom-M.top+1},sizeClipSpace:{x:M.right-M.left+1,y:M.bottom-M.top+1},offset:{x:-M.left+G+(U||I?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-M.top+G+(U||I?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}r.TextureAtlas=N;class T{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(R){this._glyphs.push(R),this._usedPixels+=R.size.x*R.size.y}constructor(R,M,H){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],H)for(const U of H)this._glyphs.push(...U.glyphs),this._usedPixels+=U._usedPixels;this.canvas=A(R,M,M),this.ctx=(0,u.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 E(D,R,M,H){const U=R.rgba>>>24,I=R.rgba>>>16&255,G=R.rgba>>>8&255,ne=M.rgba>>>24,Q=M.rgba>>>16&255,te=M.rgba>>>8&255,ie=Math.floor((Math.abs(U-ne)+Math.abs(I-Q)+Math.abs(G-te))/12);let P=!0;for(let $=0;$<D.data.length;$+=4)D.data[$]===U&&D.data[$+1]===I&&D.data[$+2]===G||H&&Math.abs(D.data[$]-U)+Math.abs(D.data[$+1]-I)+Math.abs(D.data[$+2]-G)<ie?D.data[$+3]=0:P=!1;return P}function A(D,R,M){const H=D.createElement("canvas");return H.width=R,H.height=M,H}},160:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let l=0,g=0,_=0,u=0;var p,S,C,b,c;function m(v){const N=v.toString(16);return N.length<2?"0"+N:N}function f(v,N){return v<N?(N+.05)/(v+.05):(v+.05)/(N+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},function(v){v.toCss=function(N,T,E,A){return A!==void 0?`#${m(N)}${m(T)}${m(E)}${m(A)}`:`#${m(N)}${m(T)}${m(E)}`},v.toRgba=function(N,T,E,A=255){return(N<<24|T<<16|E<<8|A)>>>0},v.toColor=function(N,T,E,A){return{css:v.toCss(N,T,E,A),rgba:v.toRgba(N,T,E,A)}}}(p||(r.channels=p={})),function(v){function N(T,E){return u=Math.round(255*E),[l,g,_]=c.toChannels(T.rgba),{css:p.toCss(l,g,_,u),rgba:p.toRgba(l,g,_,u)}}v.blend=function(T,E){if(u=(255&E.rgba)/255,u===1)return{css:E.css,rgba:E.rgba};const A=E.rgba>>24&255,D=E.rgba>>16&255,R=E.rgba>>8&255,M=T.rgba>>24&255,H=T.rgba>>16&255,U=T.rgba>>8&255;return l=M+Math.round((A-M)*u),g=H+Math.round((D-H)*u),_=U+Math.round((R-U)*u),{css:p.toCss(l,g,_),rgba:p.toRgba(l,g,_)}},v.isOpaque=function(T){return(255&T.rgba)==255},v.ensureContrastRatio=function(T,E,A){const D=c.ensureContrastRatio(T.rgba,E.rgba,A);if(D)return p.toColor(D>>24&255,D>>16&255,D>>8&255)},v.opaque=function(T){const E=(255|T.rgba)>>>0;return[l,g,_]=c.toChannels(E),{css:p.toCss(l,g,_),rgba:E}},v.opacity=N,v.multiplyOpacity=function(T,E){return u=255&T.rgba,N(T,u*E/255)},v.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(S||(r.color=S={})),function(v){let N,T;try{const E=document.createElement("canvas");E.width=1,E.height=1;const A=E.getContext("2d",{willReadFrequently:!0});A&&(N=A,N.globalCompositeOperation="copy",T=N.createLinearGradient(0,0,1,1))}catch{}v.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return l=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),p.toColor(l,g,_);case 5:return l=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),u=parseInt(E.slice(4,5).repeat(2),16),p.toColor(l,g,_,u);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const A=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return l=parseInt(A[1]),g=parseInt(A[2]),_=parseInt(A[3]),u=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(l,g,_,u);if(!N||!T)throw new Error("css.toColor: Unsupported css format");if(N.fillStyle=T,N.fillStyle=E,typeof N.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(N.fillRect(0,0,1,1),[l,g,_,u]=N.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(l,g,_,u),css:E}}}(C||(r.css=C={})),function(v){function N(T,E,A){const D=T/255,R=E/255,M=A/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}v.relativeLuminance=function(T){return N(T>>16&255,T>>8&255,255&T)},v.relativeLuminance2=N}(b||(r.rgb=b={})),function(v){function N(E,A,D){const R=E>>24&255,M=E>>16&255,H=E>>8&255;let U=A>>24&255,I=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));for(;ne<D&&(U>0||I>0||G>0);)U-=Math.max(0,Math.ceil(.1*U)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));return(U<<24|I<<16|G<<8|255)>>>0}function T(E,A,D){const R=E>>24&255,M=E>>16&255,H=E>>8&255;let U=A>>24&255,I=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));for(;ne<D&&(U<255||I<255||G<255);)U=Math.min(255,U+Math.ceil(.1*(255-U))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ne=f(b.relativeLuminance2(U,I,G),b.relativeLuminance2(R,M,H));return(U<<24|I<<16|G<<8|255)>>>0}v.blend=function(E,A){if(u=(255&A)/255,u===1)return A;const D=A>>24&255,R=A>>16&255,M=A>>8&255,H=E>>24&255,U=E>>16&255,I=E>>8&255;return l=H+Math.round((D-H)*u),g=U+Math.round((R-U)*u),_=I+Math.round((M-I)*u),p.toRgba(l,g,_)},v.ensureContrastRatio=function(E,A,D){const R=b.relativeLuminance(E>>8),M=b.relativeLuminance(A>>8);if(f(R,M)<D){if(M<R){const I=N(E,A,D),G=f(R,b.relativeLuminance(I>>8));if(G<D){const ne=T(E,A,D);return G>f(R,b.relativeLuminance(ne>>8))?I:ne}return I}const H=T(E,A,D),U=f(R,b.relativeLuminance(H>>8));if(U<D){const I=N(E,A,D);return U>f(R,b.relativeLuminance(I>>8))?H:I}return H}},v.reduceLuminance=N,v.increaseLuminance=T,v.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}}(c||(r.rgba=c={})),r.toPaddedHex=m,r.contrastRatio=f},345:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===l)return void this._listeners.splice(g,1)}}})),this._event}fire(l,g){const _=[];for(let u=0;u<this._listeners.length;u++)_.push(this._listeners[u]);for(let u=0;u<_.length;u++)_[u].call(void 0,l,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(l,g){return l(_=>g.fire(_))},r.runAndSubscribe=function(l,g){return g(void 0),l(_=>g(_))}},859:(y,r)=>{function l(g){for(const _ of g)_.dispose();g.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.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 _=this._disposables.indexOf(g);_!==-1&&this._disposables.splice(_,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var _;this._isDisposed||g===this._value||((_=this._value)==null||_.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}},r.toDisposable=function(g){return{dispose:g}},r.disposeArray=l,r.getDisposeArrayDisposable=function(g){return{dispose:()=>l(g)}}},485:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(_,u,p){this._data[_]||(this._data[_]={}),this._data[_][u]=p}get(_,u){return this._data[_]?this._data[_][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=l,r.FourKeyMap=class{constructor(){this._data=new l}set(g,_,u,p,S){this._data.get(g,_)||this._data.set(g,_,new l),this._data.get(g,_).set(u,p,S)}get(g,_,u,p){var S;return(S=this._data.get(g,_))==null?void 0:S.get(u,p)}clear(){this._data.clear()}}},399:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;const l=r.isNode?"node":navigator.userAgent,g=r.isNode?"node":navigator.platform;r.isFirefox=l.includes("Firefox"),r.isLegacyEdge=l.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(l),r.getSafariVersion=function(){if(!r.isSafari)return 0;const _=l.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),r.isIpad=g==="iPad",r.isIphone=g==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),r.isLinux=g.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(l)},385:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const g=l(399);class _{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,b=0,c=S.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),b=Math.max(C,b),m=S.timeRemaining(),1.5*b>m)return c-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-C))}ms`),void this._start();c=m}this.clear()}}class u extends _{_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())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new l;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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}}r.AttributeData=l;class g{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,p=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=p}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=g},782:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const g=l(133),_=l(855),u=l(147);class p extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const b=new p;return b.setFromCharData(C),b}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[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(C[_.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(C[_.CHAR_DATA_CHAR_INDEX].length===2){const c=C[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const m=C[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(c-55296)+m-56320+65536|C[_.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=C[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[_.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=C[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=p},855:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},133:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},r.utf32ToString=function(l,g=0,_=l.length){let u="";for(let p=g;p<_;++p){let S=l[p];S>65535?(S-=65536,u+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):u+=String.fromCharCode(S)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,g){const _=l.length;if(!_)return 0;let u=0,p=0;if(this._interim){const S=l.charCodeAt(p++);56320<=S&&S<=57343?g[u++]=1024*(this._interim-55296)+S-56320+65536:(g[u++]=this._interim,g[u++]=S),this._interim=0}for(let S=p;S<_;++S){const C=l.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=_)return this._interim=C,u;const b=l.charCodeAt(S);56320<=b&&b<=57343?g[u++]=1024*(C-55296)+b-56320+65536:(g[u++]=C,g[u++]=b)}else C!==65279&&(g[u++]=C)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,g){const _=l.length;if(!_)return 0;let u,p,S,C,b=0,c=0,m=0;if(this.interim[0]){let N=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let E,A=0;for(;(E=63&this.interim[++A])&&A<4;)T<<=6,T|=E;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=D-A;for(;m<R;){if(m>=_)return 0;if(E=l[m++],(192&E)!=128){m--,N=!0;break}this.interim[A++]=E,T<<=6,T|=63&E}N||(D===2?T<128?m--:g[b++]=T:D===3?T<2048||T>=55296&&T<=57343||T===65279||(g[b++]=T):T<65536||T>1114111||(g[b++]=T)),this.interim.fill(0)}const f=_-4;let v=m;for(;v<_;){for(;!(!(v<f)||128&(u=l[v])||128&(p=l[v+1])||128&(S=l[v+2])||128&(C=l[v+3]));)g[b++]=u,g[b++]=p,g[b++]=S,g[b++]=C,v+=4;if(u=l[v++],u<128)g[b++]=u;else if((224&u)==192){if(v>=_)return this.interim[0]=u,b;if(p=l[v++],(192&p)!=128){v--;continue}if(c=(31&u)<<6|63&p,c<128){v--;continue}g[b++]=c}else if((240&u)==224){if(v>=_)return this.interim[0]=u,b;if(p=l[v++],(192&p)!=128){v--;continue}if(v>=_)return this.interim[0]=u,this.interim[1]=p,b;if(S=l[v++],(192&S)!=128){v--;continue}if(c=(15&u)<<12|(63&p)<<6|63&S,c<2048||c>=55296&&c<=57343||c===65279)continue;g[b++]=c}else if((248&u)==240){if(v>=_)return this.interim[0]=u,b;if(p=l[v++],(192&p)!=128){v--;continue}if(v>=_)return this.interim[0]=u,this.interim[1]=p,b;if(S=l[v++],(192&S)!=128){v--;continue}if(v>=_)return this.interim[0]=u,this.interim[1]=p,this.interim[2]=S,b;if(C=l[v++],(192&C)!=128){v--;continue}if(c=(7&u)<<18|(63&p)<<12|(63&S)<<6|63&C,c<65536||c>1114111)continue;g[b++]=c}}return b}}},776:function(y,r,l){var g=this&&this.__decorate||function(c,m,f,v){var N,T=arguments.length,E=T<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,f):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,m,f,v);else for(var A=c.length-1;A>=0;A--)(N=c[A])&&(E=(T<3?N(E):T>3?N(m,f,E):N(m,f))||E);return T>3&&E&&Object.defineProperty(m,f,E),E},_=this&&this.__param||function(c,m){return function(f,v){m(f,v,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const u=l(859),p=l(97),S={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let C,b=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let m=0;m<c.length;m++)typeof c[m]=="function"&&(c[m]=c[m]())}_log(c,m,f){this._evalLazyOptionalParams(f),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...f)}trace(c,...m){var f;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,c,m)}debug(c,...m){var f;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,c,m)}info(c,...m){var f;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,c,m)}warn(c,...m){var f;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,c,m)}error(c,...m){var f;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,c,m)}};r.LogService=b=g([_(0,p.IOptionsService)],b),r.setTraceLogger=function(c){C=c},r.traceCall=function(c,m,f){if(typeof f.value!="function")throw new Error("not supported");const v=f.value;f.value=function(...N){if(C.logLevel!==p.LogLevelEnum.TRACE)return v.apply(this,N);C.trace(`GlyphRenderer#${v.name}(${N.map(E=>JSON.stringify(E)).join(", ")})`);const T=v.apply(this,N);return C.trace(`GlyphRenderer#${v.name} return`,T),T}}},726:(y,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const l="di$target",g="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(_){return _[g]||[]},r.createDecorator=function(_){if(r.serviceRegistry.has(_))return r.serviceRegistry.get(_);const u=function(p,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,c,m){c[l]===c?c[g].push({id:b,index:m}):(c[g]=[{id:b,index:m}],c[l]=c)})(u,p,C)};return u.toString=()=>_,r.serviceRegistry.set(_,u),u}},97:(y,r,l)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const g=l(726);var _;r.IBufferService=(0,g.createDecorator)("BufferService"),r.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),r.ICoreService=(0,g.createDecorator)("CoreService"),r.ICharsetService=(0,g.createDecorator)("CharsetService"),r.IInstantiationService=(0,g.createDecorator)("InstantiationService"),function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"}(_||(r.LogLevelEnum=_={})),r.ILogService=(0,g.createDecorator)("LogService"),r.IOptionsService=(0,g.createDecorator)("OptionsService"),r.IOscLinkService=(0,g.createDecorator)("OscLinkService"),r.IUnicodeService=(0,g.createDecorator)("UnicodeService"),r.IDecorationService=(0,g.createDecorator)("DecorationService")}},w={};function j(y){var r=w[y];if(r!==void 0)return r.exports;var l=w[y]={exports:{}};return d[y].call(l.exports,l,l.exports,j),l.exports}var L={};return(()=>{var y=L;Object.defineProperty(y,"__esModule",{value:!0}),y.WebglAddon=void 0;const r=j(345),l=j(859),g=j(399),_=j(666),u=j(776);class p extends l.Disposable{constructor(C){if(g.isSafari&&(0,g.getSafariVersion)()<16){const b={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",b))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=C,this._onChangeTextureAtlas=this.register(new r.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new r.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new r.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new r.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(C){const b=C._core;if(!C.element)return void this.register(b.onWillOpen(()=>this.activate(C)));this._terminal=C;const c=b.coreService,m=b.optionsService,f=b,v=f._renderService,N=f._characterJoinerService,T=f._charSizeService,E=f._coreBrowserService,A=f._decorationService,D=f._logService,R=f._themeService;(0,u.setTraceLogger)(D),this._renderer=this.register(new _.WebglRenderer(C,N,T,E,c,A,m,R,this._preserveDrawingBuffer)),this.register((0,r.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,r.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,r.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,r.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),v.setRenderer(this._renderer),this.register((0,l.toDisposable)(()=>{const M=this._terminal._core._renderService;M.setRenderer(this._terminal._core._createRenderer()),M.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()}}y.WebglAddon=p})(),L})())})(B1);var u3=B1.exports;function Yx(o,s){let d=0,w=o;for(;Math.abs(w)>=s;)w>0?(d+=1,w-=s):(d-=1,w+=s);return{notches:d,rem:w}}const d3=o=>o>0?"up":"down";function h3(o,s,d=24){return Math.abs(s)<=Math.abs(o)?null:s<=-d?"show":s>=d?"hide":null}function f3(o,s){if(!o)return!1;const d=o.scrollHeight-o.clientHeight;return d<=1?!1:s<0?o.scrollTop<d-1:s>0?o.scrollTop>1:!1}function m3(o,s=44,d=.5){return o*s*d/(s+d*Math.abs(o))}function qx(o){if(!o)return!1;const s=o.tagName;return!(s!=="INPUT"&&s!=="TEXTAREA"||o.closest&&o.closest(".xterm"))}function p3(o){return o.replace(/\r?\n/g,`\r
272
+ `)}function v3(o,s){let d=s,w=!1,j=!1,L=!1;const y=_=>{/\S/.test(_)&&(w=!0,d&&(j=!0)),d&&_.length&&(L=!0)},r=/\x1b\[([0-9;]*)m/g;let l=0,g=r.exec(o);for(;g;){y(o.slice(l,g.index)),l=r.lastIndex;const _=g[1]===""?[0]:g[1].split(";").map(Number);for(let u=0;u<_.length;u+=1){const p=_[u];if(p===0||p===49)d=!1;else if(p>=40&&p<=47||p>=100&&p<=107)d=!0;else if(p===38||p===48){const S=p===48;_[u+1]===5?(u+=2,S&&(d=!0)):_[u+1]===2&&(u+=4,S&&(d=!0))}}g=r.exec(o)}return y(o.slice(l)),{bgEnd:d,hasText:w,hasShadeText:j,hasShadeBlank:L}}function g3(o){const s=[];let d=!1,w=[],j=-1,L=!1;const y=()=>{j>=0&&L&&(s[j]+="\x1B[49m"),j=-1,L=!1},r=()=>{if(w.length){s.push("\x1B[0m");for(let l=1;l<w.length;l+=1)s.push("");w=[]}};for(const l of o){const g=v3(l,d);g.hasShadeText?(s.push(...w),w=[],s.push(l),j=s.length-1,L=g.bgEnd):!g.hasText&&(d||g.bgEnd||g.hasShadeBlank)?w.push(l):(y(),r(),s.push(l)),d=g.bgEnd}return y(),r(),s}function _3(o){const s=p3(o.replace(/\n$/,""));return g3(s.split(`\r
273
+ `)).join(`\r
274
+ `)}function b3(o,s,d=0,w=!1){if(!o||!o.vis&&!w)return"\x1B[?25l";const j=d?Math.min(s|0,d|0):s|0,L=Math.max(1,j-Math.max(0,o.row|0)),y=Math.max(0,o.col|0)+1;return`\x1B[${L};${y}H\x1B[?25h`}function y3(o,{base:s=1e3,max:d=1e4,factor:w=2,jitter:j=.2,rng:L=Math.random}={}){if(o<=0)return 0;const y=Math.min(d,s*w**(o-1));return Math.round(y*(1+j*(L()*2-1)))}const w3=1e3;function x3(o){return o<8e3?w3:o<6e4?5e3:1e4}const S3=.95,N3=.015,C3=.1,E3=50;function D3(o,s,d=S3,w=N3){const j=o*s,L=o*d**(s/16);return{delta:j,v:L,done:Math.abs(L)<w}}function j3(o,s,d=C3,w=E3){return s<=w&&Math.abs(o)>=d}const k3={failCount:0,connected:!0};function eg(o,s,{threshold:d=2}={}){switch(s){case"ok":case"reset":return{failCount:0,connected:!0};case"fail":{const w=o.failCount+1;return{failCount:w,connected:w<d}}default:return o}}function R3(o,s){const d=o.getCell(s-1);if(!d)return!1;if(d.getWidth()===0)return!0;const w=d.getChars();if(w&&w!==" ")return!0;const j=o.getCell(s-2);return!!j&&j.getWidth()===0}function Sg(o,s,d){var y;const w=o.getLine(s+1);if(!w)return!1;if(w.isWrapped)return!0;const j=o.getLine(s);if(!j||!R3(j,d))return!1;const L=(y=w.getCell(0))==null?void 0:y.getChars();return!!L&&L!==" "}function I1(o,s,d){let w=s;for(;w>0&&Sg(o,w-1,d);)w--;let j="";const L=[];let y=w;for(;;){const r=o.getLine(y);if(!r)break;const l=y+1<o.length&&Sg(o,y,d),g=[],_=[];for(let p=0;p<d;p++){const S=r.getCell(p);if(!S)continue;const C=S.getWidth();C!==0&&(g.push(S.getChars()),_.push({row:y,col:p,w:C}))}let u=g.length;if(l)for(;u>0&&(g[u-1]===""||g[u-1]===" ");)u--;for(let p=0;p<u;p++)j+=g[p]||" ",L.push(_[p]);if(l){y++;continue}break}return{text:j,cells:L}}function T3(o){const s=o.buffer.active,d=o.cols,w=0,j=s.length,L=[];let y=w;for(;y>0&&Sg(s,y-1,d);)y--;for(;y<j;){if(!s.getLine(y)){y++;continue}const{text:r,cells:l}=I1(s,y,d);for(const{start:g,end:_}of A1(r)){let u=g;for(;u<_;){const p=l[u].row;let S=u;for(;S<_&&l[S].row===p;)S++;const C=l[u].col,b=l[S-1],c=b.col+b.w;p>=w&&p<j&&L.push({y:p,x:C,width:c-C,path:r.slice(g,_)}),u=S}}y=l.length?l[l.length-1].row+1:y+1}return L}function L3(o,s){const d=o.buffer.active,w=o.cols,j=s-1;if(j<0||j>=d.length)return[];const{text:L,cells:y}=I1(d,j,w),r=[];for(const{start:l,end:g}of A1(L)){const _=y[l],u=y[g-1];j<_.row||j>u.row||r.push({range:{start:{x:_.col+1,y:_.row+1},end:{x:u.col+u.w,y:u.row+1}},path:L.slice(l,g)})}return r}const V1=(o,s,d)=>Math.max(s,Math.min(d,o));function A3(o,s){return!s||s<=0?1:Math.max(1,Math.floor(o/s))}function Kx(o,s,d){return d<0?o>0?"internal":"forward":o<s?"internal":"forward"}function M3(o,s){return V1(o,0,s)}function U3(o,s,d){return V1(o-s+1,0,d)}function Xx(o,s){return!o||!o.vis?null:Math.max(0,s-1-Math.max(0,o.row|0))}function Jx(o,s){return Math.max(0,s-o)}function Zx({cursorLine:o,viewportY:s,visibleRows:d,baseY:w,armed:j}){return j?o<s?M3(o,w):o>=s+d?U3(o,d,w):null:null}const O3=[{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"}],P3=4,B3=1500,I3=o=>{for(const s of document.fonts)if(s.family.replace(/["']/g,"")===o)return s;return null},V3=async({family:o,url:s,probe:d,unicodeRange:w},j)=>{var L;for(let y=0;y<P3;y++){try{await document.fonts.load(`${j}px "${o}"`,d)}catch{}if(((L=I3(o))==null?void 0:L.status)==="loaded")return!0;try{const r=new FontFace(o,`url(${s}) format('woff2')`,w?{unicodeRange:w}:{});return await r.load(),document.fonts.add(r),!0}catch{}await new Promise(r=>setTimeout(r,B3*2**y))}return!1};let tg=null;function F3(o=14){var s;return tg||(tg=typeof document<"u"&&((s=document.fonts)!=null&&s.load)?Promise.all(O3.map(d=>V3(d,o))):Promise.resolve([!1,!1])),tg}function F1(o){const s=o.split(`
275
+ `).map(j=>j.trim());let d=0,w=s.length;for(;d<w&&s[d]==="";)d++;for(;w>d&&s[w-1]==="";)w--;return s.slice(d,w).join(`
276
+ `)}function H3(o){return o?{lines:o.split(`
277
+ `).length,chars:F1(o).replace(/\n/g,"").length}:{lines:0,chars:0}}function z3(o,s){return{start:{col:0,row:o.start.row},end:{col:s-1,row:o.end.row}}}function $3(o,s,d,w,j){let L=o.start.row,y=o.end.row;for(;L>w&&d(L-1).trim()!=="";)L--;for(;y<j&&d(y+1).trim()!=="";)y++;return{start:{col:0,row:L},end:{col:s-1,row:y}}}function Qx(o,s,d,w,j){return{x:o*w,y:(s-d)*j}}function W3(o){const[s,d]=V.useState(""),[w,j]=V.useState(!1),L=V.useRef(null),y=V.useRef(null);return V.useEffect(()=>()=>{clearTimeout(L.current),clearInterval(y.current)},[]),{dbg:s,dbgVisible:w,flash:()=>{const l=()=>{const g=o.current;g&&d(`${g.cols}×${g.rows} · ${g.options.fontSize}px`)};l(),j(!0),clearTimeout(L.current),clearInterval(y.current),y.current=setInterval(l,400),L.current=setTimeout(()=>{j(!1),clearInterval(y.current)},3e3)}}}const G3=200,Y3=20,ng=100,gh=5e3,q3=15;function K3(o,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 w=document.activeElement;o.focus(),o.blur(),w&&w!==document.body&&typeof w.focus=="function"&&w.focus()}const X3=V.forwardRef(function({pane:s,inset:d=0,onAuthFail:w,onDocLinkTap:j,onTap:L},y){const r=V.useRef(null),l=V.useRef(null),g=V.useRef(0),_=V.useRef(!1),u=V.useRef(!1),p=V.useRef(""),S=V.useRef(L);S.current=L;const C=V.useRef([]),b=V.useRef(null),c=V.useRef(null),m=V.useRef(!1),f=V.useRef(null),v=V.useRef(j);v.current=j;const N=V.useRef(d1()),T=V.useRef(null),E=V.useRef(sA()),A=V.useRef(null),[D,R]=V.useState(!1),[M,H]=V.useState(!0),U=V.useRef(!1),[I,G]=V.useState(""),[ne,Q]=V.useState(null),te=V.useRef(!1),ie=V.useRef(!1),[P,$]=V.useState(!1),[J,ee]=V.useState(!1),{dbg:we,dbgVisible:Se,flash:Z}=W3(l),[ke,se]=V.useState(""),[W,_e]=V.useState(!1),ue=V.useRef(null),Ie=V.useRef(!1),Ue=V.useRef(!1),Xe=V.useRef(!1),Je=V.useRef(0),rt=V.useRef(null),Nt=V.useRef(!1),Ze=V.useRef(null);V.useImperativeHandle(y,()=>({getSize:()=>{const ae=l.current;return ae?{cols:ae.cols,rows:ae.rows}:null},flash:Z,getFontSize:()=>{const ae=l.current;return ae?{size:ae.options.fontSize,auto:E.current==null}:null},setFontSize:ae=>{var ve;const Fe=l.current;if(!Fe)return null;const et=Math.max(8,Math.min(40,Math.round(ae)));return Fe.options.fontSize=et,E.current=et,qc(et),(ve=ue.current)==null||ve.call(ue),et},autoFont:()=>{var Fe;const ae=l.current;ae&&(ae.options.fontSize=14,E.current=null,aA(),(Fe=ue.current)==null||Fe.call(ue))},wake:()=>{var ae;return(ae=rt.current)==null?void 0:ae.call(rt)},setDocHighlight:ae=>{var Fe;N.current=!!ae,(Fe=T.current)==null||Fe.call(T)}}),[]),V.useEffect(()=>{var Fe;const ae=g.current;g.current=d,d>0&&ae===0&&(u.current=!0),d===0&&ae>0&&(Xe.current=!0),(Fe=ue.current)==null||Fe.call(ue),d===0&&(u.current=!1)},[d]),V.useEffect(()=>{var re;const ae=new c3.Terminal({disableStdin:!0,allowProposedApi:!0,scrollback:gh+100,convertEol:!1,fontSize:E.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"});ae.open(r.current),l.current=ae,K3(ae,r.current);const Fe=ae.registerLinkProvider({provideLinks(q,ce){if(!v.current){ce(void 0);return}const ge=L3(ae,q).map(({range:Le,path:Te})=>({range:Le,text:Te,decorations:{pointerCursor:!0,underline:!1},activate:$e=>{var it;return(it=v.current)==null?void 0:it.call(v,Te,($e==null?void 0:$e.clientX)??0,($e==null?void 0:$e.clientY)??0)}}));ce(ge.length?ge:void 0)}});let et=null;const ve=()=>{try{et=new u3.WebglAddon,et.onContextLoss(()=>et.dispose()),ae.loadAddon(et)}catch{et=null}};ve();let Ye=null,Ee=!1,pe=!1,me=!1,Re=!1;te.current=!1,ie.current=!1,$(!1),U.current=!1,Q(null),G("");const Oe=()=>Math.min(gh,Math.max(24,ae.rows+Y3));let bt=Oe(),kt=!0,Ct=0,Pt=null,Qt="",Ft=null,mt=0,St=null,Ln=null,An=Date.now();R(!1),_e(!1);let In=!1;const ri=()=>{Ee||In||(In=!0,requestAnimationFrame(()=>{Ee||_e(!0)}))};let cn=k3;const ai=q=>{cn=q,H(q.connected)};F3(E.current??14).then(()=>{if(!(Ee||!et)){try{et.dispose()}catch{}ve(),ae.refresh(0,ae.rows-1)}});const mn=()=>ae.buffer.active,Gn=(q="")=>{const ce=mn();se(Re&&!Zn()&&!te.current?`历史模式 · 距底 ${ce.baseY-ce.viewportY}/${ce.baseY} 行${pe?" · 拉取中":""}${q}`:"")},Ei=()=>mn().viewportY>=mn().baseY,Zn=()=>mn().baseY-mn().viewportY<=q3,rn=()=>mn().viewportY<=3,an=()=>{!Re||pe||!kt||bt>=gh||!rn()||(kt=!1,qi(),bt=Math.min(Math.floor(bt/ng)*ng+ng,gh),Gn(" · 拉取↑"),xe(bt,!0,!0))};let Mn=0;const hi=()=>{b.current&&(b.current.deco.dispose(),b.current.marker.dispose(),b.current=null)},le=()=>{if(Ee)return;const q=Ft,ce=ae.buffer.active;if(!(q&&(q.vis||Nt.current)&&te.current&&ce.viewportY<ce.baseY)){hi(),ae.write(b3(q,ae.rows,mt,Nt.current)),We();return}ae.write("\x1B[?25l"),hi();const Le=mt-1-(q.row|0),Te=ae.registerMarker(Le-(ce.baseY+ce.cursorY));if(!Te){We();return}const $e=ae.registerDecoration({marker:Te,x:Math.max(0,q.col|0),width:1});if(!$e){Te.dispose(),We();return}$e.onRender(it=>{it.classList.add("cursor-deco")}),b.current={deco:$e,marker:Te},We()},Ve=()=>{c.current&&(c.current.deco.dispose(),c.current.marker.dispose(),c.current=null)},We=()=>{Ve();const q=Ft;if(Ee||!m.current||!te.current||!q)return;const ce=ae.buffer.active,ge=mt-1-(q.row|0),Le=ae.registerMarker(ge-(ce.baseY+ce.cursorY));if(!Le)return;const Te=ae.registerDecoration({marker:Le,x:0,width:ae.cols});if(!Te){Le.dispose();return}Te.onRender($e=>{$e.classList.add("locate-deco")}),c.current={deco:Te,marker:Le}};f.current=We;const gt=()=>{if(Ee||!St||St.alt)return Promise.resolve();const{seed:q,contentRows:ce}=St,ge=ce<ae.rows?Jx(ce,ae.rows):0;if(ce+ge===mt)return Promise.resolve();const Le=ge?`
278
+ `.repeat(ge)+q:q;return mt=Le.split(`
279
+ `).length,new Promise(Te=>ae.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Le,()=>{if(!Ee){ae.scrollToBottom();try{he(ae)}catch{}}Te()}))},yt=(q=0)=>{var Jt;if(Ee||!r.current||!ae.rows)return;const ce=r.current.getBoundingClientRect(),ge=Math.min(ce.bottom,window.innerHeight-(g.current||0)),Le=Math.max(ce.top,0),Te=Math.max(0,ge-Le),$e=r.current.querySelector(".xterm-screen"),it=$e?$e.getBoundingClientRect().height:0;if(!Te||!it)return;(Jt=r.current.parentElement)==null||Jt.style.setProperty("--vis-h",`${Te}px`),g.current===0&&(Je.current=Te);const _t=it/ae.rows;if(Ie.current&&Mn){Ie.current=!1;const jt=ae.options.fontSize||14,It=Math.max(8,Math.min(40,Math.round(jt*(Je.current||Te)/(Mn*_t))));if(Ue.current=!0,E.current=It,qc(It),It!==jt){ae.options.fontSize=It,requestAnimationFrame(()=>yt(q));return}}if(Ue.current&&Mn){const jt=Math.floor((Je.current||Te)/_t),It=ae.options.fontSize||14;if(jt<Mn&&It>8){E.current=It-1,qc(It-1),ae.options.fontSize=It-1,requestAnimationFrame(()=>yt(q));return}Ue.current=!1,E.current=It,qc(It)}if(g.current===0&&E.current==null&&Mn&&q<4){const jt=Mn*_t;if(jt>Te+4){const It=ae.options.fontSize||14,wn=Math.max(6,Math.round(It*(Te/jt)));if(wn<It){ae.options.fontSize=wn,requestAnimationFrame(()=>yt(q+1));return}}}const ct=A3(Te,_t);if(ct!==ae.rows){ae.write(`\x1B[?25l\x1B[${ae.rows};1H`,()=>{if(!Ee){if(ae.resize(ae.cols,ct),te.current){const jt=Xx(Ft,mt),It=()=>{const wn=jt==null?null:Zx({cursorLine:jt,viewportY:mn().viewportY,visibleRows:ae.rows,baseY:mn().baseY,armed:!0});wn!=null&&ae.scrollToLine(wn)};g.current>0?(ae.scrollToTop(),It()):Xe.current?(Xe.current=!1,It()):ae.scrollToTop()}else ae.scrollToBottom();q<4?requestAnimationFrame(()=>yt(q+1)):gt().then(()=>{Ee||(le(),ri())})}});return}gt().then(()=>{Ee||(le(),ri())})},pt=()=>requestAnimationFrame(()=>yt(0));ue.current=pt;const Rt=()=>pt();window.addEventListener("resize",Rt),window.addEventListener("orientationchange",Rt);let wt=((re=r.current)==null?void 0:re.clientHeight)||0;const vn=typeof ResizeObserver<"u"?new ResizeObserver(()=>{var ge;const q=((ge=r.current)==null?void 0:ge.clientHeight)||0;if(!q)return;const ce=q>wt;wt=q,ce&&pt()}):null;vn&&r.current&&vn.observe(r.current);const en=(q,ce)=>{var ct;const ge=(ct=r.current)==null?void 0:ct.querySelector(".xterm-screen");if(!ge||!ae.cols||!ae.rows)return null;const Le=ge.getBoundingClientRect(),Te=Le.width/ae.cols,$e=Le.height/ae.rows;if(!Te||!$e)return null;const it=Math.max(0,Math.min(ae.cols-1,Math.floor((q-Le.left)/Te))),_t=Math.max(0,Math.min(ae.rows-1,Math.floor((ce-Le.top)/$e)));return{col:it,row:mn().viewportY+_t}};let Yt=null;const gn=()=>{var Le;const q=(Le=ae.getSelectionPosition)==null?void 0:Le.call(ae);if(!q)return null;let ce=q.end.x-1,ge=q.end.y;return ce<0&&(ge-=1,ce=ae.cols-1),{start:{col:q.start.x,row:q.start.y},end:{col:ce,row:ge}}},yn=()=>{var It;const q=gn(),ce=(It=r.current)==null?void 0:It.querySelector(".xterm-screen");if(!q||!ce){Q(null),G("");return}const ge=ce.getBoundingClientRect(),Le=r.current.parentElement.getBoundingClientRect(),Te=ge.width/ae.cols,$e=ge.height/ae.rows,it=mn().viewportY,_t={x:ge.left-Le.left,y:ge.top-Le.top},ct=Qx(q.start.col,q.start.row,it,Te,$e),Jt=Qx(q.end.col+1,q.end.row,it,Te,$e);Q({start:{x:ct.x+_t.x,y:ct.y+_t.y,ch:$e},end:{x:Jt.x+_t.x,y:Jt.y+_t.y,ch:$e},wrapW:Le.width});const jt=ae.getSelection();if(jt){const{lines:wn,chars:Xi}=H3(jt);G(`复制模式 · ${wn} 行 · ${Xi} 字`)}else G("")},oi=()=>gn(),Un=q=>{var ce;return((ce=mn().getLine(q))==null?void 0:ce.translateToString(!0))??""},fi=q=>{if(!q)return;const ce=ae.cols,ge=q.end.row*ce+q.end.col-(q.start.row*ce+q.start.col)+1;ae.select(q.start.col,q.start.row,ge),yn()};Ze.current={currentRange:oi,paraLineText:Un,selectRange:fi};const qn=(q,ce)=>{var it,_t;const ge=en(q,ce);if(!ge)return;const Le=((it=mn().getLine(ge.row))==null?void 0:it.translateToString(!1))??"";let Te=ge.col,$e=ge.col;if(/\S/.test(Le[ge.col]||"")){for(;Te>0&&/\S/.test(Le[Te-1]);)Te--;for(;$e<ae.cols-1&&/\S/.test(Le[$e+1]);)$e++}Yt={col:Te,row:ge.row},U.current=!0,Q(null),ae.select(Te,ge.row,$e-Te+1),yn(),(_t=navigator.vibrate)==null||_t.call(navigator,12)},Bt=(q,ce)=>{var ge,Le;return((Le=(ge=mn().getLine(Math.floor(q/ce)))==null?void 0:ge.getCell(q%ce))==null?void 0:Le.getWidth())??1},oe=(q,ce)=>q>0&&Bt(q,ce)===0?q-1:q,ze=(q,ce)=>Bt(q,ce)===2?q+1:q,je=(q,ce)=>{const ge=en(q,ce);if(!ge||!Yt)return;const Le=ae.cols,Te=Yt.row*Le+Yt.col,$e=ge.row*Le+ge.col,it=oe(Math.min(Te,$e),Le),_t=ze(Math.max(Te,$e),Le);ae.select(it%Le,Math.floor(it/Le),_t-it+1),yn()},X=()=>{Yt=null,U.current=!1,Q(null),G(""),ae.clearSelection()},Ne=r.current;let qe=0,Ut=0,vt=0,Et=0,Kt=!1,pn=0,on=0,Rn=!1,Wt=!1,Vn=null;const Kn=()=>{Vn&&(clearTimeout(Vn),Vn=null)},Di=q=>Math.hypot(q[0].clientX-q[1].clientX,q[0].clientY-q[1].clientY);let Ii=0,Tr=0,ar=0,Wr=0,vr=0,or=null;const qi=()=>{or!=null&&(cancelAnimationFrame(or),or=null)};A.current=qi;const os=(q,ce,ge)=>{if(!q)return;let Le=ge,Te=null;const $e=it=>{if(Te==null){Te=it,or=requestAnimationFrame($e);return}const _t=it-Te;Te=it;const ct=D3(Le,_t);Le=ct.v;const Jt=q[ce];q[ce]=Jt+ct.delta;const jt=Math.abs(ct.delta)>=1&&q[ce]===Jt;if(ce==="scrollTop"&&(Gn(),an()),ct.done||jt||or==null){or=null;return}or=requestAnimationFrame($e)};or=requestAnimationFrame($e)},Lr=22,un=12;let Gr=0,Ki=0,Tt=0,Ar=!1;const Qn=async()=>{var ge;if(Ar||Tt===0)return;Ar=!0;const q=d3(Tt),ce=Math.min(Math.abs(Tt),40);Tt=0;try{ie.current?await PA(s,q,ce):await pg(s,Array(ce).fill(q==="up"?"Up":"Down")),(ge=rt.current)==null||ge.call(rt)}catch{}finally{Ar=!1,Tt!==0&&Qn()}},gr=q=>{if(An=Date.now(),Kn(),qi(),kt=!0,Wt=U.current,Rn=!1,q.touches.length===2){Kt=!0,Et=-1,pn=Di(q.touches),on=ae.options.fontSize||14;return}if(Kt=!1,q.touches.length!==1){Et=-1;return}qe=q.touches[0].clientX,Ut=q.touches[0].clientY,vt=Ne.scrollLeft,Et=0,Ii=qe,Tr=Ut,ar=q.timeStamp,Wr=0,vr=0,Ki=Ut,Gr=0,Vn=setTimeout(()=>{Vn=null,Rn=!0,Et=-1,qn(qe,Ut)},500)},lr=q=>{if(Kt&&q.touches.length===2){if(pn>0){const Le=Math.max(8,Math.min(40,Math.round(on*(Di(q.touches)/pn))));Le!==(ae.options.fontSize||14)&&(ae.options.fontSize=Le,E.current=Le)}q.preventDefault(),q.stopPropagation();return}if(Rn&&q.touches.length===1){je(q.touches[0].clientX,q.touches[0].clientY),q.preventDefault(),q.stopPropagation();return}if(q.touches.length===1&&(Gn(),an()),q.touches.length!==1)return;const ce=q.touches[0].clientX-qe,ge=q.touches[0].clientY-Ut;if((Math.abs(ce)>6||Math.abs(ge)>6)&&Kn(),Et===0){if(Math.abs(ce)<6&&Math.abs(ge)<6)return;Et=Math.abs(ce)>Math.abs(ge)?1:-1}if(Et===1){Ne.scrollLeft=vt-ce;const Le=q.touches[0].clientX,Te=q.timeStamp-ar;Te>0&&(Wr=(Ii-Le)/Te),Ii=Le,ar=q.timeStamp,q.preventDefault(),q.stopPropagation()}else{if(te.current){q.preventDefault(),q.stopPropagation();const $e=q.touches[0].clientY,it=$e-Ki;Ki=$e;const _t=r.current.querySelector(".xterm-viewport"),ct=it>0?-1:1;if(_t&&Kx(mn().viewportY,mn().baseY,ct)==="internal"){_t.scrollTop-=it,_.current=!0;return}const{notches:Jt,rem:jt}=Yx(Gr+it,un);Gr=jt,Jt&&(Tt+=Jt,Qn());return}const Le=q.touches[0].clientY,Te=q.timeStamp-ar;Te>0&&(vr=(Tr-Le)/Te),Tr=Le,ar=q.timeStamp}},Ds=q=>{var ce;if(Kn(),Rn&&q.touches.length===0){Rn=!1;const ge=ae.getSelection();ge&&ge.trim()?yn():X();return}if(Kt&&q.touches.length<2){Kt=!1,qc(ae.options.fontSize||14),pt();return}q.touches.length===0&&j3(Et===1?Wr:vr,q.timeStamp-ar)&&(Et===1?os(Ne,"scrollLeft",Wr):Et===-1&&os(Ne.querySelector(".xterm-viewport"),"scrollTop",vr)),q.touches.length===0&&!Rn&&!Kt&&Et===0&&(Wt?X():(ce=S.current)==null||ce.call(S))},Yn=q=>{if(q.deltaY){if(te.current){q.preventDefault(),q.stopPropagation();const ce=q.deltaMode===1?q.deltaY*Lr:q.deltaMode===2?q.deltaY*ae.rows*Lr:q.deltaY,{notches:ge,rem:Le}=Yx(Gr-ce,Lr);Gr=Le,ge&&(Tt+=ge,Qn());return}q.timeStamp-Ct>200&&(kt=!0),Ct=q.timeStamp,Gn(),an()}},Cn=q=>{qx(document.activeElement)&&q.cancelable&&q.preventDefault()};Ne.addEventListener("pointerdown",Cn,{capture:!0}),Ne.addEventListener("wheel",Yn,{capture:!0,passive:!1}),Ne.addEventListener("touchstart",gr,{capture:!0,passive:!0}),Ne.addEventListener("touchmove",lr,{capture:!0,passive:!1}),Ne.addEventListener("touchend",Ds,{capture:!0,passive:!0});const ei=r.current.parentElement;let Xn=null,Fn=null,On=null,ls=null,ji=0,cs=0;const Yr=(q,ce)=>{const ge=en(q,ce);if(!ge||Fn==null)return;const Le=ae.cols,Te=ge.row*Le+ge.col,$e=Xn==="start"?Te:Te+1;let it=Math.min(Fn,$e),_t=Math.max(Fn,$e);_t<=it&&(_t=it+1),it=oe(it,Le),_t=ze(_t-1,Le)+1,ae.select(it%Le,Math.floor(it/Le),_t-it),yn()},Mr=q=>{var Le,Te,$e;const ce=(Te=(Le=q.target).closest)==null?void 0:Te.call(Le,".sel-handle");if(!ce)return;Xn=ce.dataset.end;const ge=gn();if(ge){const it=ae.cols,_t=ge.start.row*it+ge.start.col,ct=ge.end.row*it+ge.end.col;Fn=Xn==="start"?ct+1:_t}else Fn=null;q.preventDefault(),q.stopPropagation(),($e=ei.setPointerCapture)==null||$e.call(ei,q.pointerId)},js=q=>{if(!Xn||Fn==null)return;Yr(q.clientX,q.clientY);const ce=28;ls={x:q.clientX,y:q.clientY};const ge=tn.getBoundingClientRect();let Le=0;if(q.clientY<ge.top+ce?(ji=-1,Le=ge.top+ce-q.clientY):q.clientY>ge.bottom-ce?(ji=1,Le=q.clientY-(ge.bottom-ce)):ji=0,cs=Math.min(14,2+Le*.28),ji!==0&&On==null){const Te=()=>{if(!Xn||ji===0){On=null;return}const $e=tn.scrollTop;if(tn.scrollTop=$e+ji*cs,Yr(ls.x,ls.y),tn.scrollTop===$e){On=null;return}On=requestAnimationFrame(Te)};On=requestAnimationFrame(Te)}else ji===0&&On!=null&&(cancelAnimationFrame(On),On=null);q.preventDefault()},Vi=q=>{var ce;Xn&&(Xn=null,Fn=null,ji=0,On!=null&&(cancelAnimationFrame(On),On=null),(ce=ei.releasePointerCapture)==null||ce.call(ei,q.pointerId))};ei.addEventListener("pointerdown",Mr,{capture:!0}),ei.addEventListener("pointermove",js,{capture:!0}),ei.addEventListener("pointerup",Vi,{capture:!0}),ei.addEventListener("pointercancel",Vi,{capture:!0});const he=q=>{for(const{deco:Le,marker:Te}of C.current)Le.dispose(),Te.dispose();if(C.current=[],!v.current||!N.current)return;const ce=q.buffer.active,ge=ce.baseY+ce.cursorY;for(const{y:Le,x:Te,width:$e}of T3(q)){const it=q.registerMarker(Le-ge);if(!it)continue;const _t=q.registerDecoration({marker:it,x:Te,width:$e});if(!_t){it.dispose();continue}_t.onRender(ct=>{ct.classList.add("doc-deco")}),C.current.push({deco:_t,marker:it})}};T.current=()=>{!Ee&&Re&&he(ae)};const xe=async(q,ce,ge=!1)=>{var _t;if(pe||Ee)return;pe=!0;const Le=ce&&ge?(_t=r.current)==null?void 0:_t.querySelector(".xterm-viewport"):null,Te=Le&&mn().length?Le.scrollHeight/mn().length:0,$e=Te?Math.floor(Le.scrollTop/Te):mn().viewportY,it=ce?mn().length-$e:0;try{const ct=await OA(s,q,Ln);if(Ee)return;if(ai(eg(cn,"ok")),ct.unchanged){R(ce);return}Ln=ct.hash,te.current=!!ct.alt,ie.current=!!ct.mouseAware,$(_r=>_r===!!ct.alt?_r:!!ct.alt),An=Date.now();let Jt=!1;ct.width&&ct.width!==ae.cols&&(ae.resize(ct.width,ae.rows),Jt=!0);const jt=Mn;ct.height&&(Mn=ct.height);const It=!Re,wn=ct.cur?`${ct.cur.row},${ct.cur.col},${ct.cur.vis?1:0}`:"";if(!Jt&&!It&&ct.ansi===Pt&&wn===Qt){R(ce);return}const Xi=_3(ct.ansi),ks=Xi?Xi.split(`
280
+ `).length:0;St={seed:Xi,contentRows:ks,alt:ct.alt};const Ur=!ct.alt&&ks<ae.rows?Jx(ks,ae.rows):0,Rs=Ur?`
281
+ `.repeat(Ur)+Xi:Xi;if(mt=Rs?Rs.split(`
282
+ `).length:0,await new Promise(_r=>ae.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Rs,_r)),Ee)return;if(Pt=ct.ansi,Qt=wn,Ft=ct.cur,ct.cur&&ct.cur.vis&&(Nt.current=!1),ce?ae.scrollToLine(Math.max(0,mn().length-it)):te.current&&It?ae.scrollToTop():ae.scrollToBottom(),te.current&&g.current>0){wn!==p.current&&(It||(u.current=!0),p.current=wn);const _r=Xx(ct.cur,mt);if(_r!=null){const fo=Zx({cursorLine:_r,viewportY:mn().viewportY,visibleRows:ae.rows,baseY:mn().baseY,armed:u.current});fo!=null&&ae.scrollToLine(fo)}}Re=!0;try{he(ae)}catch{}R(ce),le(),(Jt||It||Mn!==jt)&&pt(),It&&setTimeout(ri,400)}catch(ct){ct instanceof Rr?w==null||w():Ee||ai(eg(cn,"fail"))}finally{pe=!1,!Ee&&Re&&Gn(),me&&!Ee&&(me=!1,ht())}},Be=async()=>{if(!(pe||Ee)&&!U.current){if(Re&&!Zn()&&!te.current){R(!0);return}bt=Oe(),await xe(bt,!Ei())}};let Ke=0;async function tt(q){if(!Ee&&q===Ke&&await Be(),Ee||document.hidden||q!==Ke)return;const ce=cn.failCount>0?y3(cn.failCount):x3(Date.now()-An);Ye=setTimeout(()=>tt(q),ce)}const ht=()=>{Ke+=1,Ye&&(clearTimeout(Ye),Ye=null),tt(Ke)};ht();const At=()=>{if(An=Date.now(),Nt.current=!0,le(),pe){me=!0;return}ht()};rt.current=At;const Ht=()=>{document.hidden?(Ke+=1,Ye&&(clearTimeout(Ye),Ye=null)):(ai(eg(cn,"reset")),bt=Oe(),An=Date.now(),ht())};document.addEventListener("visibilitychange",Ht);const zn=ae.onScroll(()=>{if(!Ee){if(Ei()){R(!1),se("");return}R(!0),Gn(),an()}}),tn=r.current.querySelector(".xterm-viewport"),z=()=>{U.current&&yn()};return tn==null||tn.addEventListener("scroll",z,{passive:!0}),()=>{Ee=!0,On!=null&&cancelAnimationFrame(On),ue.current=null,rt.current=null,A.current=null,T.current=null,Ze.current=null,Kn(),qi(),Ye&&clearTimeout(Ye),document.removeEventListener("visibilitychange",Ht),window.removeEventListener("resize",Rt),window.removeEventListener("orientationchange",Rt),vn==null||vn.disconnect(),Ne.removeEventListener("pointerdown",Cn,{capture:!0}),Ne.removeEventListener("wheel",Yn,{capture:!0}),Ne.removeEventListener("touchstart",gr,{capture:!0}),Ne.removeEventListener("touchmove",lr,{capture:!0}),Ne.removeEventListener("touchend",Ds,{capture:!0}),ei.removeEventListener("pointerdown",Mr,{capture:!0}),ei.removeEventListener("pointermove",js,{capture:!0}),ei.removeEventListener("pointerup",Vi,{capture:!0}),ei.removeEventListener("pointercancel",Vi,{capture:!0}),tn==null||tn.removeEventListener("scroll",z),zn.dispose(),Fe.dispose();for(const{deco:q,marker:ce}of C.current)q.dispose(),ce.dispose();C.current=[],hi(),Ve(),f.current=null,ae.dispose(),l.current=null}},[s]);const qt=()=>{var Fe,et,ve,Ye;(Fe=A.current)==null||Fe.call(A);const ae=(et=r.current)==null?void 0:et.querySelector(".xterm-viewport");ae&&(ae.scrollTop=ae.scrollHeight),(ve=l.current)==null||ve.scrollToBottom(),R(!1),se(""),(Ye=rt.current)==null||Ye.call(rt)},Xt=async ae=>{var Ye;const Fe=l.current,et=Fe==null?void 0:Fe.buffer.active,ve=ae==="up"?-1:1;if(Fe&&et&&Kx(et.viewportY,et.baseY,ve)==="internal"){Fe.scrollLines(ve*Math.max(1,Fe.rows-1)),_.current=!0;return}try{await pg(s,[ae==="up"?"PageUp":"PageDown"]),(Ye=rt.current)==null||Ye.call(rt)}catch{}},lt=()=>{var Fe;const ae=!J;ee(ae),m.current=ae,(Fe=f.current)==null||Fe.call(f)},Qe=()=>{var ae;Ie.current=!0,(ae=ue.current)==null||ae.call(ue)},nt=async()=>{const ae=l.current,Fe=F1((ae==null?void 0:ae.getSelection())??"");if(Fe){let et=!1;if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText(Fe),et=!0}catch{}if(!et){const ve=document.createElement("textarea");ve.value=Fe,ve.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(ve),ve.focus(),ve.select();try{document.execCommand("copy")}catch{}document.body.removeChild(ve)}}ae==null||ae.clearSelection(),U.current=!1,Q(null),G("")};return h.jsxDEV("div",{className:"terminal-wrap",children:[h.jsxDEV("div",{ref:r,className:W?"terminal":"terminal terminal--loading"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1396,columnNumber:7},this),!M&&h.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:1397,columnNumber:22},this),Se&&h.jsxDEV("div",{className:"dbg",children:we},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1398,columnNumber:22},this),M&&ke&&!I&&h.jsxDEV("div",{className:"term-banner term-banner--hist",children:ke},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1399,columnNumber:47},this),I&&h.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:1400,columnNumber:19},this),ke&&h.jsxDEV("button",{className:"new-output",onClick:qt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1401,columnNumber:22},this),P&&h.jsxDEV("div",{className:"term-pager",role:"group","aria-label":"翻页",onPointerDown:ae=>{qx(document.activeElement)&&ae.cancelable&&ae.preventDefault()},children:[h.jsxDEV("div",{className:"term-pager-grp",children:[h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"上翻页",onClick:()=>Xt("up"),children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:h.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:1414,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1413,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1412,columnNumber:13},this),h.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:1417,columnNumber:13},this),h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"下翻页",onClick:()=>Xt("down"),children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:h.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:1420,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1419,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1418,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1411,columnNumber:11},this),h.jsxDEV("div",{className:"term-pager-grp",children:[h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"适配高度",title:"适配高度",onClick:Qe,children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[h.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:1427,columnNumber:17},this),h.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:1428,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1426,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1425,columnNumber:13},this),h.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:1431,columnNumber:13},this),h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"定位光标行",title:"定位光标行","aria-pressed":J,onClick:lt,children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[h.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:1434,columnNumber:17},this),h.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:1435,columnNumber:17},this)]},void 0,!0,{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)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1424,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1403,columnNumber:9},this),ne&&(()=>{const ae=Math.min(ne.start.x,ne.end.x),Fe=Math.min(ne.start.y,ne.end.y),et=Math.max(ne.start.y,ne.end.y),ve=Math.max(8,Math.min(ae,(ne.wrapW??0)-G3-8)),Ye=Fe-44,Ee=et+(ne.start.ch||0)+8,pe=Ye<4?Ee:Ye;return h.jsxDEV(h.Fragment,{children:[h.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:1453,columnNumber:11},this),h.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:1456,columnNumber:11},this),h.jsxDEV("div",{className:"sel-callout",style:{left:ve,top:pe},children:[h.jsxDEV("button",{type:"button",onClick:nt,children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1461,columnNumber:13},this),h.jsxDEV("button",{type:"button",onClick:()=>{const me=Ze.current;me&&me.selectRange(z3(me.currentRange(),l.current.cols))},children:"整行"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1462,columnNumber:13},this),h.jsxDEV("button",{type:"button",onClick:()=>{const me=Ze.current;if(!me)return;const Re=l.current.buffer.active;me.selectRange($3(me.currentRange(),l.current.cols,me.paraLineText,0,Re.length-1))},children:"整段"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1466,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1459,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1452,columnNumber:9},this)})()]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1395,columnNumber:5},this)}),J3=[["esc","tab","tilde","slash","up","at","del"],["ctrl","shift","alt","left","down","right","enter"]],ou=["ctrl","shift","alt"],Ng={kbd:"⌨",esc:"Esc",up:"▲",tab:"Tab",ctrl:"Ctrl",shift:"Shift",del:"⌫",left:"◀",down:"▼",right:"▶",alt:"Alt",slash:"/",tilde:"~",at:"@",enter:"Enter"},Z3=new Set(["up","down","left","right","del"]),eS={esc:"Escape",tab:"Tab",del:"BSpace",enter:"Enter",up:"Up",down:"Down",left:"Left",right:"Right"},tS={slash:"/",tilde:"~",at:"@"};function Q3(o){return o in eS?{kind:"key",name:eS[o]}:o in tS?{kind:"text",ch:tS[o]}:null}const Cg="off",Gg="armed",Eg="locked",Zs=o=>o===Gg||o===Eg,eU=o=>ou.some(s=>Zs(o[s]));function Dg(o){const s={};for(const d of ou)s[d]=o[d]===Gg?Cg:o[d]??Cg;return s}function H1(o,s){if(!o||!eU(s))return o;const d=Zs(s.ctrl),w=Zs(s.shift),j=Zs(s.alt);if(w&&o.kind==="key"){if(o.name==="Tab")return{kind:"key",name:"BTab"};if(["Up","Down","Left","Right"].includes(o.name))return{kind:"key",name:`S-${o.name}`}}return(d||j)&&o.kind==="text"&&/^[a-z0-9]$/i.test(o.ch)?{kind:"key",name:`${d?"C":"M"}-${o.ch.toLowerCase()}`}:o}const tU={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"},nU={Escape:"Esc",BSpace:"⌫",Space:"Space",PageUp:"PgUp",PageDown:"PgDn"};function iU(o,s){const d=!!o.ctrl,w=!!o.shift,j=!!o.alt,L=(s||"").trim();if(!L)return null;const y=[];d&&y.push("Ctrl"),w&&y.push("Shift"),j&&y.push("Alt");const r=g=>[...y,g].join("+"),l=tU[L.toLowerCase()];return l?{name:l==="Tab"&&w&&!d&&!j?"BTab":(d?"C-":"")+(j?"M-":"")+(w?"S-":"")+l,label:r(nU[l]||l)}:L.length!==1||!d&&!j&&!w?null:d||j?{name:(d?"C-":"")+(j?"M-":"")+L.toLowerCase(),label:r(L.toUpperCase())}:{name:L.toUpperCase(),label:r(L.toUpperCase())}}function rU(o,{delay:s=400,interval:d=120}={}){let w=null,j=null;const L=()=>{w&&clearTimeout(w),j&&clearInterval(j),w=null,j=null};return{start:()=>{L(),o(),w=setTimeout(()=>{j=setInterval(o,d)},s)},stop:L}}const nS={up:"Up",down:"Down",left:"Left",right:"Right",tilde:"Tilde",slash:"Slash",at:"At",del:"Backspace"},z1=o=>{o.cancelable&&o.preventDefault()},sU=500;function aU({onKey:o,onText:s,mods:d,setMods:w,keyHeldRef:j}){const L=V.useRef(d);L.current=d;const y=l=>{const g=Q3(l);if(!g)return;const _=ou.some(p=>Zs(L.current[p])),u=_?H1(g,L.current):g;u.kind==="key"?o(u.name):s(u.ch),_&&w(Dg)},r=l=>ou.includes(l)?h.jsxDEV(lU,{id:l,state:d[l],setMods:w},l,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:43,columnNumber:40},this):h.jsxDEV(cU,{id:l,dispatch:y,keyHeldRef:j},l,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:44,columnNumber:12},this);return h.jsxDEV("div",{className:"keybar-grid",children:J3.flat().map(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:49,columnNumber:10},this)}const oU=300;function lU({id:o,state:s,setMods:d}){const w=V.useRef(-1/0),j=y=>{const r=y.timeStamp||0;if(r-w.current<oU){w.current=-1/0,d(l=>({...l,[o]:Eg}));return}w.current=r,d(l=>({...l,[o]:Zs(l[o])?Cg:Gg}))},L=s===Eg?" locked":Zs(s)?" armed":"";return h.jsxDEV("button",{type:"button",className:`keybar-key keybar-mod${L}`,"data-key":o,"data-state":s,"aria-pressed":Zs(s),"aria-label":Ng[o],onPointerDown:z1,onClick:j,children:Ng[o]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:75,columnNumber:5},this)}function cU({id:o,dispatch:s,keyHeldRef:d}){const w=V.useRef(null),j=V.useRef(s);j.current=s;const L=V.useRef(null),y=S=>{d&&(d.current=S)},r=Ng[o];if(!Z3.has(o))return h.jsxDEV("button",{type:"button",className:"keybar-key","data-key":o,"aria-label":nS[o]||r,onPointerDown:z1,onClick:()=>s(o),children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:94,columnNumber:12},this);const l=()=>{const S=L.current;S!=null&&S.guard&&(clearTimeout(S.guard),S.guard=null)},g=S=>{S.cancelable&&S.preventDefault(),w.current||(w.current=rU(()=>j.current(o)));const C={x:S.clientX,y:S.clientY,held:!1,moved:!1,guard:null};C.guard=setTimeout(()=>{C.held=!0,C.guard=null,w.current.start()},sU),L.current=C,y(!0)},_=S=>{const C=L.current;!C||C.held||(Math.abs(S.clientX-C.x)>8||Math.abs(S.clientY-C.y)>8)&&(C.moved=!0,l(),y(!1))},u=()=>{const S=L.current;y(!1),S&&(l(),S.held?w.current.stop():S.moved||j.current(o),L.current=null)},p=()=>{var S;y(!1),l(),(S=L.current)!=null&&S.held&&w.current.stop(),L.current=null};return h.jsxDEV("button",{type:"button",className:"keybar-key","data-key":o,"aria-label":nS[o]||r,onPointerDown:g,onPointerMove:_,onPointerUp:u,onPointerCancel:p,onPointerLeave:p,children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:130,columnNumber:5},this)}const $1=o=>`hm_favs6_${o}`,W1="command",jg=o=>o?`command@${o}`:W1,uU={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 pr(o){try{const s=localStorage.getItem($1(o));if(s)return JSON.parse(s)}catch{}return(uU[o]||[]).map(s=>({...s}))}function Gh(o,s){try{localStorage.setItem($1(o),JSON.stringify(s))}catch{}return s}function kg(o,s){const d=pr(o);if(d.some(j=>j.text===s.text))return d;const w=s.kind==="key"?{kind:"key",text:s.text,label:s.label}:{kind:s.kind,text:s.text,enter:!!s.enter};return Gh(o,[...d,w])}function Rg(o,s){return Gh(o,pr(o).filter(d=>d.text!==s))}function dU(o,s,d){const w=pr(o),j=w.findIndex(y=>y.text===s);if(j<0||w.some((y,r)=>r!==j&&y.text===d.text))return w;const L=w.slice();return L[j]=d.kind==="key"?{kind:"key",text:d.text,label:d.label}:{kind:d.kind,text:d.text,enter:!!d.enter},Gh(o,L)}function hU(o,s,d){const w=pr(o),j=w.findIndex(r=>r.text===s),L=j+(d<0?-1:1);if(j<0||L<0||L>=w.length)return w;const y=w.slice();return[y[j],y[L]]=[y[L],y[j]],Gh(o,y)}const fU=o=>{var s;try{(s=navigator.clipboard)==null||s.writeText(o)}catch{}};function mU({open:o,mode:s,recent:d=[],onSend:w,onFill:j,onClose:L,onDelete:y,historyOnly:r=!1}){const[l,g]=V.useState(()=>pr(s)),_=V.useRef(null),[u,p]=V.useState(s);if(u!==s&&(p(s),g(pr(s))),!o)return null;const S=r?[]:l.filter(m=>m.kind==="reply"),C=r?[]:l.filter(m=>m.kind==="cmd"),b=()=>{var v;const m=(((v=_.current)==null?void 0:v.value)||"").trim();if(!m)return;const f=s==="agent"&&!m.startsWith("/")?"reply":"cmd";g(kg(s,{kind:f,text:m})),_.current&&(_.current.value="")},c=m=>g(Rg(s,m));return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:35,columnNumber:7},this),h.jsxDEV("div",{className:`cmd-panel${r?" history":""}`,role:"dialog","aria-label":B("fav.title"),children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:B(r?"dock.history":"fav.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:38,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-close",onClick:L,"aria-label":B("common.close"),children:h.jsxDEV(ro,{},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),h.jsxDEV("div",{className:"cmd-list",children:[r&&h.jsxDEV("div",{className:"cmd-hint",children:B("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&&h.jsxDEV("div",{className:"fav-chips",children:S.map(m=>h.jsxDEV("span",{className:"fav-chip",onClick:()=>w(m.text),onContextMenu:f=>{f.preventDefault(),c(m.text)},children:m.text},m.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(m=>h.jsxDEV("div",{className:"cmd-row",children:[h.jsxDEV("span",{className:"cmd-text",onClick:()=>w(m.text),onDoubleClick:()=>j(m.text),children:m.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:53,columnNumber:15},this),h.jsxDEV("button",{className:"cmd-del",onClick:()=>c(m.text),"aria-label":B("common.delete"),children:h.jsxDEV(ro,{},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)]},m.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:52,columnNumber:13},this)),d.map(m=>h.jsxDEV("div",{className:"cmd-row",children:[h.jsxDEV("span",{className:"cmd-text",onClick:()=>w(m),onDoubleClick:()=>j(m),children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:59,columnNumber:15},this),h.jsxDEV("button",{className:"cmd-copy",onClick:()=>fU(m),"aria-label":B("common.copy"),children:h.jsxDEV(C1,{},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),y&&h.jsxDEV("button",{className:"cmd-del",onClick:()=>y(m),"aria-label":B("common.delete"),children:h.jsxDEV(ro,{},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:${m}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:58,columnNumber:13},this)),r&&d.length===0&&h.jsxDEV("div",{className:"cmd-empty",children:B("history.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:66,columnNumber:50},this),!r&&h.jsxDEV("div",{className:"fav-add",children:[h.jsxDEV("input",{ref:_,className:"fav-add-input",placeholder:B("fav.addPlaceholder"),onKeyDown:m=>{m.key==="Enter"&&b()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:69,columnNumber:15},this),h.jsxDEV("button",{className:"fav-add-btn",onClick:b,children:B("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 Mh=[{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}}],pU=o=>Mh.find(s=>s.key===o)||Mh[0],vU=[["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"]],gU=[...vU.map(([o,s])=>({value:o,label:s})),..."abcdefghijklmnopqrstuvwxyz".split("").map(o=>({value:o,label:o.toUpperCase()})),..."0123456789".split("").map(o=>({value:o,label:o}))];function _U(o){let s=o.text||"";if(s==="BTab")return{sticky:"shift",base:"Tab"};let d=!1,w=!1,j=!1;s.startsWith("C-")&&(d=!0,s=s.slice(2)),s.startsWith("M-")&&(w=!0,s=s.slice(2)),s.startsWith("S-")&&(j=!0,s=s.slice(2)),!d&&!w&&!j&&s.length===1&&s>="A"&&s<="Z"&&(j=!0);const L=Mh.find(y=>!!y.mods.ctrl===d&&!!y.mods.shift===j&&!!y.mods.alt===w);return{sticky:L?L.key:"none",base:s.length===1?s.toLowerCase():s}}function iS({value:o,options:s,onChange:d,placeholder:w}){const[j,L]=V.useState(!1),y=s.find(r=>r.value===o);return h.jsxDEV("div",{className:"cmd-dd",children:[h.jsxDEV("button",{type:"button",className:`cmd-dd-btn${j?" open":""}`,onClick:()=>L(r=>!r),"aria-haspopup":"listbox","aria-expanded":j,children:[h.jsxDEV("span",{className:y?void 0:"cmd-dd-ph",children:y?y.label:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:61,columnNumber:9},this),h.jsxDEV(Ea,{},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),j&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-dd-scrim",onClick:()=>L(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:65,columnNumber:11},this),h.jsxDEV("div",{className:"cmd-dd-menu",role:"listbox",children:s.map(r=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":r.value===o,className:`cmd-dd-opt${r.value===o?" on":""}`,onClick:()=>{d(r.value),L(!1)},children:[h.jsxDEV("span",{children:r.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:71,columnNumber:17},this),r.value===o&&h.jsxDEV(x1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:39},this)]},r.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 bU({title:o,accent:s,items:d,showTitle:w=!0,onMove:j,onDel:L,onEdit:y}){return h.jsxDEV("div",{className:`cmd-esection ${s}`,children:[w&&h.jsxDEV("div",{className:`cmd-section ${s}`,children:h.jsxDEV("span",{className:"cmd-section-name",children:o},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&&h.jsxDEV("div",{className:"cmd-empty",children:B("cmd.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:88,columnNumber:30},this),d.map((r,l)=>h.jsxDEV("div",{className:"cmd-row",children:[h.jsxDEV("button",{type:"button",className:"cmd-text cmd-fav-text",onClick:()=>y(r),children:[r.kind==="key"&&r.label||r.text,r.kind!=="key"&&r.enter&&h.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),h.jsxDEV("button",{className:"cmd-move up",disabled:l===0,onClick:()=>j(r.text,-1),"aria-label":B("cmd.moveUp"),children:h.jsxDEV(Ea,{},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),h.jsxDEV("button",{className:"cmd-move",disabled:l===d.length-1,onClick:()=>j(r.text,1),"aria-label":B("cmd.moveDown"),children:h.jsxDEV(Ea,{},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),h.jsxDEV("button",{className:"cmd-del",onClick:()=>L(r.text),"aria-label":B("common.delete"),children:h.jsxDEV(ro,{},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)]},r.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 yU({scopes:o,cfg:s,edit:d,inset:w,onAdd:j,onUpdate:L,onClose:y}){const r=d&&d.fav.kind==="key"?_U(d.fav):null,[l,g]=V.useState(d&&d.fav.kind==="key"?"key":"msg"),[_,u]=V.useState(d?d.scope:o[0].key),[p,S]=V.useState(d?r?r.base:d.fav.text:""),[C,b]=V.useState(d&&d.fav.kind!=="key"?!!d.fav.enter:!1),[c,m]=V.useState(r?r.sticky:"none"),f=V.useRef(null),v=R=>{R!==l&&(g(R),S(""))},N=Mh.map(R=>({value:R.key,label:R.label??B("cmd.stickyNone")})),T=l==="key"?iU(pU(c).mods,p):null,E=o.some(R=>R.key===_)?_:o[0].key,A=l==="key"?!!T:!!p.trim(),D=()=>{var M;if(!A)return;const R=l==="key"?{kind:"key",text:T.name,label:T.label}:{kind:s.msgKind(p.trim()),text:p.trim(),enter:C};if(d){L(d.scope,d.fav.text,E,R);return}j(E,R),S(""),(M=f.current)==null||M.focus()};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop cmd-add-backdrop",onClick:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:144,columnNumber:7},this),h.jsxDEV("div",{className:"cmd-addcard",role:"dialog","aria-label":B(d?"cmd.editItem":"cmd.addTitle"),style:{transform:`translate(-50%, calc(-50% + ${w/2}px))`},children:[h.jsxDEV("div",{className:"cmd-addcard-head",children:[h.jsxDEV("span",{className:"cmd-title",children:B(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),h.jsxDEV("button",{className:"cmd-close",onClick:y,"aria-label":B("common.close"),children:h.jsxDEV(ro,{},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),h.jsxDEV("div",{className:"cmd-modetabs",role:"tablist",children:[h.jsxDEV("button",{type:"button",role:"tab","aria-selected":l==="msg",className:`cmd-modetab${l==="msg"?" on":""}`,onClick:()=>v("msg"),children:s.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:155,columnNumber:11},this),h.jsxDEV("button",{type:"button",role:"tab","aria-selected":l==="key",className:`cmd-modetab${l==="key"?" on":""}`,onClick:()=>v("key"),children:B("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),o.length>1&&h.jsxDEV("div",{className:"cmd-field",children:[h.jsxDEV("label",{className:"cmd-field-label",children:B("cmd.addTo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:164,columnNumber:13},this),h.jsxDEV("div",{className:"cmd-seg",role:"group",children:o.map(R=>h.jsxDEV("button",{type:"button","aria-pressed":E===R.key,className:`cmd-seg-btn${R.accent==="win"?" win":""}${E===R.key?" on":""}`,onClick:()=>u(R.key),children:R.title},R.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),l==="key"?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-field",children:[h.jsxDEV("label",{className:"cmd-field-label",children:B("cmd.sticky")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:179,columnNumber:15},this),h.jsxDEV(iS,{value:c,options:N,onChange:m},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),h.jsxDEV("div",{className:"cmd-field",children:[h.jsxDEV("label",{className:"cmd-field-label",children:B("cmd.baseKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:183,columnNumber:15},this),h.jsxDEV(iS,{value:p,options:gU,onChange:S,placeholder:B("cmd.pickKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:184,columnNumber:15},this),T&&h.jsxDEV("span",{className:"cmd-chord-preview",children:T.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):h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-field",children:[h.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),h.jsxDEV("input",{ref:f,className:"cmd-add-input",value:p,placeholder:s.placeholder,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:R=>S(R.target.value),onKeyDown:R=>{R.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&&h.jsxDEV("label",{className:"cmd-toggle-row",children:[h.jsxDEV("span",{children:B("cmd.withEnter")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:200,columnNumber:17},this),h.jsxDEV("span",{className:"cmd-switch",children:[h.jsxDEV("input",{type:"checkbox",checked:C,onChange:R=>b(R.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:202,columnNumber:19},this),h.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),h.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),h.jsxDEV("button",{type:"button",className:"cmd-submit",disabled:!A,onClick:D,children:B(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 wU(o,s){if(o==="chat")return{title:B("chat.editTitle"),scopes:[{key:"agent",title:B("chat.favs"),accent:"global"}],card:{msgLabel:B("chat.tabMsg"),placeholder:B("chat.addPlaceholder"),hasEnter:!1,msgKind:w=>w.startsWith("/")?"cmd":"reply"}};const d=s?jg(s):null;return{title:B("cmd.editTitle"),scopes:[{key:W1,title:B("cmd.global"),accent:"global"},...d?[{key:d,title:B("cmd.window"),accent:"win"}]:[]],card:{msgLabel:B("cmd.tabCmd"),placeholder:B("cmd.addPlaceholder"),hasEnter:!0,msgKind:()=>"cmd"}}}function rS({windowId:o,inset:s=0,variant:d="command",onClose:w}){const{title:j,scopes:L,card:y}=wU(d,o),[r,l]=V.useState(()=>Object.fromEntries(L.map(c=>[c.key,pr(c.key)]))),[g,_]=V.useState(null),u=()=>l(Object.fromEntries(L.map(c=>[c.key,pr(c.key)]))),p=(c,m,f)=>{hU(c,m,f),u()},S=(c,m)=>{Rg(c,m),u()},C=(c,m)=>{kg(c,m),u()},b=(c,m,f,v)=>{c===f?dU(c,m,v):(Rg(c,m),kg(f,v)),u(),_(null)};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:271,columnNumber:7},this),h.jsxDEV("div",{className:"cmd-panel cmd-editor",role:"dialog","aria-label":j,children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:274,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-add-open",onClick:()=>_({edit:null}),"aria-label":B("cmd.addTitle"),children:h.jsxDEV(w1,{},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),h.jsxDEV("button",{className:"cmd-close",onClick:w,"aria-label":B("common.close"),children:h.jsxDEV(ro,{},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),h.jsxDEV("div",{className:"cmd-list",children:L.map(c=>h.jsxDEV(bU,{title:c.title,accent:c.accent,items:r[c.key]||[],showTitle:L.length>1,onMove:(m,f)=>p(c.key,m,f),onDel:m=>S(c.key,m),onEdit:m=>_({edit:{fav:m,scope:c.key}})},c.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&&h.jsxDEV(yU,{scopes:L,cfg:y,edit:g.edit,inset:s,onAdd:C,onUpdate:b,onClose:()=>_(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 G1({active:o,disabled:s,onToggle:d}){const w=V.useRef({x:0,y:0,moved:!1}),j=r=>{w.current={x:r.clientX,y:r.clientY,moved:!1}},L=r=>{const l=w.current;!l.moved&&Math.hypot(r.clientX-l.x,r.clientY-l.y)>10&&(l.moved=!0)},y=()=>{w.current.moved||d()};return h.jsxDEV("button",{type:"button",className:`input-mic${o?" on":""}`,"aria-label":B(o?"mic.stop":"mic.start"),"aria-pressed":o,disabled:s,onPointerDown:j,onPointerMove:L,onPointerUp:y,children:h.jsxDEV(xM,{},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 Y1=["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"],q1=Y1.map(o=>`.${o}`).join(","),xU=new Set(Y1);function SU(o){const s=/\.([A-Za-z0-9]+)$/.exec(o||"");return s?xU.has(s[1].toLowerCase()):!1}function K1(o){const d=(Array.isArray(o)?o:o&&typeof o.length=="number"?Array.from(o):[o]).filter(Boolean),w=[],j=[];for(const L of d)(SU(L.name)?w:j).push(L);return{allowed:w,rejected:j.map(L=>L.name)}}const X1={active:!1,phase:null,pct:0,label:""};let lu=X1,nu=null;const Tg=new Set,Yg=()=>{for(const o of[...Tg])o()};function J1(o,s=""){nu=o,lu={active:!0,phase:"sending",pct:0,label:s},Yg()}function Uh(o){lu={...lu,...o},Yg()}function Lg(){nu=null,lu=X1,Yg()}function NU(){nu==null||nu.abort()}const CU=o=>(Tg.add(o),()=>Tg.delete(o)),EU=()=>lu;function DU(){return V.useSyncExternalStore(CU,EU)}function jU({cwd:o,onAuthFail:s,onPaths:d}){const[w,j]=V.useState(null),L=V.useRef(null);return V.useEffect(()=>()=>clearTimeout(L.current),[]),{upload:w,uploadFiles:async r=>{const{allowed:l,rejected:g}=K1(r);if(!l.length){g.length&&(clearTimeout(L.current),j({label:B("dock.upload.rejected",{names:g.join("、")}),error:!0}),L.current=setTimeout(()=>j(null),3500));return}clearTimeout(L.current),j(null);const _=l.length,u=[],p=[],S=new AbortController;J1(S,B("dock.upload.progress",{name:l[0].name,tag:_>1?`(1/${_})`:""}));try{for(let C=0;C<_&&!S.signal.aborted;C++){const b=l[C],c=_>1?`(${C+1}/${_})`:"";Uh({label:B("dock.upload.progress",{name:b.name,tag:c}),phase:"sending",pct:0});try{const m=await b1(o||"",b,(f,v)=>Uh({pct:f,phase:v}),!0,{signal:S.signal});m!=null&&m.path&&u.push(m.path)}catch(m){if(m instanceof Lh)break;if(m instanceof Rr){s==null||s(),Lg(),j(null);return}p.push({name:b.name,reason:(m==null?void 0:m.message)||B("api.uploadFailed")})}}}finally{Lg()}if(u.length&&d(u),p.length||g.length){const C=p.map(b=>`${b.name}:${b.reason}`);g.length&&C.push(B("dock.upload.rejected",{names:g.join("、")})),j({label:C.join(";"),error:!0}),L.current=setTimeout(()=>j(null),5e3)}else j(null)}}}function kU(o,s){const d=s/16e3,w=Math.floor(o.length/d),j=new Int16Array(w);for(let L=0;L<w;L++){let y=o[Math.floor(L*d)];y>1?y=1:y<-1&&(y=-1),j[L]=y<0?y*32768:y*32767}return new Uint8Array(j.buffer)}function RU(o=1280){let s=new Uint8Array(0);return{push(d){const w=new Uint8Array(s.length+d.length);w.set(s),w.set(d,s.length);const j=[];let L=0;for(;w.length-L>=o;)j.push(w.slice(L,L+o)),L+=o;return s=w.slice(L),j},flush(){if(s.length===0)return null;const d=s;return s=new Uint8Array(0),d}}}function sS(o){let s="";for(let d=0;d<o.length;d++)s+=String.fromCharCode(o[d]);return btoa(s)}const TU="data:text/javascript;base64,Ly8gd2ViL3NyYy92b2ljZS9wY20td29ya2xldC5qcwovLyBNaW5pbWFsIEF1ZGlvV29ya2xldDogZm9yd2FyZCBlYWNoIHJlbmRlciBxdWFudHVtJ3MgbW9ubyBzYW1wbGVzIHRvIHRoZSBtYWluIHRocmVhZCwgd2hpY2ggZG9lcyB0aGUKLy8gKHVuaXQtdGVzdGVkKSBkb3duc2FtcGxlL2ZyYW1lL2VuY29kZS4gS2VwdCB0cml2aWFsIG9uIHB1cnBvc2Ug4oCUIHdvcmtsZXQgY29kZSBjYW4ndCBiZSB1bml0LXRlc3RlZC4KY2xhc3MgUGNtRm9yd2FyZGVyIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBwcm9jZXNzKGlucHV0cykgewogICAgY29uc3QgY2ggPSBpbnB1dHNbMF0gJiYgaW5wdXRzWzBdWzBdOwogICAgaWYgKGNoICYmIGNoLmxlbmd0aCkgdGhpcy5wb3J0LnBvc3RNZXNzYWdlKGNoLnNsaWNlKDApKTsgLy8gY29weTogdGhlIGJ1ZmZlciBpcyByZXVzZWQgYWZ0ZXIgcHJvY2VzcygpCiAgICByZXR1cm4gdHJ1ZTsKICB9Cn0KcmVnaXN0ZXJQcm9jZXNzb3IoJ3BjbS1mb3J3YXJkZXInLCBQY21Gb3J3YXJkZXIpOwo=";function LU({getUserMedia:o=d=>navigator.mediaDevices.getUserMedia(d),AudioCtor:s=window.AudioContext||window.webkitAudioContext}={}){let d=null,w=null,j=null,L=null;const y=RU(1280);async function r(g){w=await o({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}}),d=new s,await d.resume(),await d.audioWorklet.addModule(TU),L=d.createMediaStreamSource(w),j=new AudioWorkletNode(d,"pcm-forwarder"),j.port.onmessage=_=>{const u=kU(_.data,d.sampleRate);for(const p of y.push(u))g(sS(p))},L.connect(j),j.connect(d.destination)}async function l(){try{j&&(j.port.onmessage=null)}catch{}try{L&&L.disconnect(),j&&j.disconnect()}catch{}try{w&&w.getTracks().forEach(_=>_.stop())}catch{}try{d&&await d.close()}catch{}const g=y.flush();return d=w=j=L=null,g?sS(g):null}return{start:r,stop:l}}const AU={language:"zh_cn",domain:"iat",accent:"mandarin",vad_eos:1e4,dwa:"wpgs",ptt:1,nunum:1},qg="audio/L16;rate=16000";function MU(o,s){return{common:{app_id:o},business:{...AU},data:{status:0,format:qg,encoding:"raw",audio:s}}}function UU(o){return{data:{status:1,format:qg,encoding:"raw",audio:o}}}function OU(){return{data:{status:2,format:qg,encoding:"raw",audio:""}}}function aS(){return{sentences:new Map}}function PU(o,s){var L;const d=(L=s==null?void 0:s.data)==null?void 0:L.result;if(!d||!Array.isArray(d.ws))return o;const w=d.ws.map(y=>(y.cw||[]).map(r=>r.w).join("")).join(""),j=new Map(o.sentences);if(d.pgs==="rpl"&&Array.isArray(d.rg))for(let y=d.rg[0];y<=d.rg[1];y++)j.delete(y);return j.set(d.sn,w),{sentences:j}}function oS(o){return[...o.sentences.keys()].sort((s,d)=>s-d).map(s=>o.sentences.get(s)).join("")}const BU=55e3,IU=4e3;function Z1({onText:o,deps:s={}}){const d=s.signAsr||XA,w=s.WebSocketCtor||window.WebSocket,j=s.makeRecorder||(()=>LU()),[L,y]=V.useState("idle"),[r,l]=V.useState(""),g=V.useRef("idle"),_=V.useCallback(R=>{g.current=R,y(R)},[]),u=V.useRef(null),p=V.useRef(null),S=V.useRef(aS()),C=V.useRef(""),b=V.useRef(!1),c=V.useRef(null),m=V.useRef(null),f=V.useRef(null),v=V.useRef(o);v.current=o;const N=V.useCallback(()=>{clearTimeout(c.current),clearTimeout(m.current);try{u.current&&u.current.close()}catch{}u.current=null,p.current=null,b.current=!1},[]),T=V.useCallback(()=>{var R;g.current!=="idle"&&((R=v.current)==null||R.call(v,oS(S.current)),l(""),_("idle"),N())},[N,_]),E=V.useCallback(R=>{const M=u.current;!M||M.readyState!==1||(M.send(JSON.stringify(b.current?UU(R):MU(C.current,R))),b.current=!0)},[]),A=V.useCallback(async()=>{if(g.current==="recording"){_("finalizing"),clearTimeout(c.current);try{const R=p.current?await p.current.stop():null;R&&E(R);const M=u.current;M&&M.readyState===1?(M.send(JSON.stringify(OU())),m.current=setTimeout(()=>T(),IU)):T()}catch{_("error"),N()}}},[E,N,_,T]);f.current=A;const D=V.useCallback(async()=>{if(!(g.current!=="idle"&&g.current!=="error")){_("requesting"),l(""),S.current=aS(),b.current=!1;try{const{url:R,appId:M}=await d();C.current=M;const H=new w(R);u.current=H,H.onmessage=I=>{var ne;const G=JSON.parse(I.data);S.current=PU(S.current,G),l(oS(S.current)),((ne=G==null?void 0:G.data)==null?void 0:ne.status)===2&&T()},H.onerror=()=>{_("error"),N()},H.onclose=()=>{(g.current==="recording"||g.current==="finalizing")&&T()};const U=j();p.current=U,await U.start(E),_("recording"),c.current=setTimeout(()=>{var I;(I=f.current)==null||I.call(f)},BU)}catch{_("error"),N()}}},[d,w,j,E,N,_,T]);return V.useEffect(()=>N,[N]),{state:L,partial:r,start:D,stop:A}}const Q1="tw_asr";function VU(){try{const o=localStorage.getItem(Q1);return o==null?null:o==="1"}catch{return null}}function eN(){const[o,s]=V.useState(VU);return V.useEffect(()=>{let d=!0;return Promise.resolve().then(_1).then(w=>{if(!d)return;const j=!!(w!=null&&w.asr);s(j);try{localStorage.setItem(Q1,j?"1":"0")}catch{}}).catch(()=>{}),()=>{d=!1}},[]),o}function Kg(o){V.useEffect(()=>{if(!o||!("wakeLock"in navigator))return;let s=null,d=!1;const w=async()=>{try{const L=await navigator.wakeLock.request("screen");if(d){try{L.release()}catch{}return}s=L}catch{}},j=()=>{document.visibilityState==="visible"&&!d&&w()};return w(),document.addEventListener("visibilitychange",j),()=>{d=!0,document.removeEventListener("visibilitychange",j);try{s&&s.release()}catch{}s=null}},[o])}function zr(o,s){const d=V.useRef(s);d.current=s,V.useEffect(()=>{if(!o)return;window.history.pushState({overlay:!0},"");const w=()=>{var j;return(j=d.current)==null?void 0:j.call(d)};return window.addEventListener("popstate",w),()=>{var j;window.removeEventListener("popstate",w),(j=window.history.state)!=null&&j.overlay&&window.history.back()}},[o])}function lS(){const o=window.visualViewport;return o?window.innerHeight-o.height>120:!1}function FU(){const[o,s]=V.useState(0);return V.useEffect(()=>{const d=window.visualViewport;if(!d)return;const w=()=>{const j=window.innerHeight-d.height-d.offsetTop;s(Math.max(0,Math.round(j)))};return w(),d.addEventListener("resize",w),d.addEventListener("scroll",w),()=>{d.removeEventListener("resize",w),d.removeEventListener("scroll",w)}},[]),o}const fl={ESC:"Escape",Esc:"Escape",Tab:"Tab","⌫":"BSpace"},cS=o=>{o.cancelable&&o.preventDefault()},HU=o=>{var s,d;(d=(s=o.target).closest)!=null&&d.call(s,"input, textarea, [contenteditable]")||o.cancelable&&o.preventDefault()},uS=80,zU=o=>fl[o]?"esc":o.startsWith("/")?"cmd":"reply",$U=450;function ig({className:o,onTap:s,onHold:d,children:w,...j}){const L=V.useRef({timer:null,long:!1,moved:!1,x:0,y:0}),y=_=>{_.cancelable&&_.preventDefault();const u=L.current;u.long=!1,u.moved=!1,u.x=_.clientX,u.y=_.clientY,d&&(u.timer=setTimeout(()=>{var p;u.long=!0,(p=navigator.vibrate)==null||p.call(navigator,12),d()},$U))},r=_=>{const u=L.current;u.moved||(Math.abs(_.clientX-u.x)>8||Math.abs(_.clientY-u.y)>8)&&(u.moved=!0,clearTimeout(u.timer))},l=()=>{const _=L.current;if(clearTimeout(_.timer),_.timer=null,_.moved){_.moved=!1;return}if(_.long){_.long=!1;return}s()},g=()=>{const _=L.current;clearTimeout(_.timer),_.timer=null,_.long=!1,_.moved=!1};return h.jsxDEV("button",{type:"button",className:o,...j,onPointerDown:y,onPointerMove:r,onPointerUp:l,onPointerCancel:g,onPointerLeave:g,children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:90,columnNumber:5},this)}function WU({pane:o,onAuthFail:s,onKey:d,onText:w,cwd:j=null,agent:L=null,windowId:y=null,recent:r=[],onSent:l,onRemoveRecent:g,inset:_=0},u){const[p,S]=V.useState(()=>oA());V.useEffect(()=>{lA(p)},[p]);const[C,b]=V.useState(!1),[c,m]=V.useState(!1),[f,v]=V.useState(!1),[N,T]=V.useState(()=>pr("agent")),[E,A]=V.useState(!1);V.useEffect(()=>{!f&&!E&&T(pr("agent"))},[f,E]);const[D,R]=V.useState(()=>pr("command")),[M,H]=V.useState(()=>y?pr(jg(y)):[]),[U,I]=V.useState(!1);V.useEffect(()=>{U||(R(pr("command")),H(y?pr(jg(y)):[]))},[U,y]);const[G,ne]=V.useState({}),Q=G[o]||(L?"agent":"command"),te=oe=>{var je;const ze=lS()||document.activeElement===nt.current||document.activeElement===Qe.current;ne(X=>({...X,[o]:oe})),ze&&((je=oe==="command"?nt.current:Qe.current)==null||je.focus({preventScroll:!0}))},[ie,P]=V.useState({ctrl:"off",shift:"off",alt:"off"}),[$,J]=V.useState(!1),ee=V.useRef(null),we=V.useRef(null),Se=V.useRef(null),Z=Q==="command"?0:1,ke=V.useRef(Z);ke.current=Z;const se=V.useRef(te);se.current=te;const W=V.useRef(!1),_e=V.useRef(!1),ue=()=>{var oe;return((oe=ee.current)==null?void 0:oe.clientWidth)||0},Ie=oe=>{const ze=we.current;ze&&(ze.style.transition="none",ze.style.transform=`translate3d(${oe}px, 0, 0)`)},Ue=()=>{const oe=we.current;!oe||!oe.style.transform||(oe.style.transition="",oe.style.transform="")},Xe=V.useRef(null),Je=50,rt=12,Nt=38,Ze=oe=>{const ze=Xe.current;ze&&(ze.classList.add("dragging"),ze.style.setProperty("--drag",`${m3(oe)}px`),ze.style.setProperty("--morph",`${Math.min(1,Math.max(0,(Math.abs(oe)-rt)/Nt))}`),ze.classList.toggle("armed",Math.abs(oe)>=Je))},qt=()=>{const oe=Xe.current;oe&&(oe.classList.remove("dragging","armed"),oe.style.removeProperty("--drag"),oe.style.removeProperty("--morph"))};V.useLayoutEffect(()=>{W.current||Ue()});const Xt=()=>{const oe=ee.current;if(!oe)return;const ze=oe.querySelector(Q==="command"?".dock-page.command":".dock-page.chat");ze&&(oe.style.height=`${ze.offsetHeight}px`)};V.useLayoutEffect(()=>{Q==="agent"&&Pt(Qe.current),Xt()});const lt=V.useRef(Xt);lt.current=Xt,V.useEffect(()=>{const oe=ee.current;if(!oe||typeof ResizeObserver>"u")return;const ze=new ResizeObserver(()=>{W.current||lt.current()});return oe.querySelectorAll(".dock-page").forEach(je=>ze.observe(je)),()=>ze.disconnect()},[]),V.useEffect(()=>{if(Q!=="agent")return;const oe=requestAnimationFrame(()=>{Pt(Qe.current),Xt()});return()=>cancelAnimationFrame(oe)},[Q]),V.useEffect(()=>{var ze;if(Q==="agent")return;document.activeElement===Qe.current&&((ze=Qe.current)==null||ze.blur());const oe=ee.current;oe&&(oe.scrollLeft=0,oe.scrollTop=0)},[Q]),V.useEffect(()=>{const oe=Se.current,ze=ee.current;if(!oe||!ze)return;let je=null;const X=vt=>{var on,Rn,Wt,Vn;Ue(),oe.classList.remove("dock-swiping");const Et=((Rn=(on=vt.target)==null?void 0:on.closest)==null?void 0:Rn.call(on,".quick-scroll"))||null,Kt=((Vn=(Wt=vt.target)==null?void 0:Wt.closest)==null?void 0:Vn.call(Wt,".input-text"))||null,pn=lS()||document.activeElement===nt.current||document.activeElement===Qe.current;je=vt.touches.length===1?{x:vt.touches[0].clientX,y:vt.touches[0].clientY,dx:0,dy:0,decided:!1,horiz:!1,vert:!1,strip:Et,cmp:Kt,kbUp:pn}:null},Ne=vt=>{if(!je||vt.touches.length!==1||_e.current&&!je.horiz)return;const Et=vt.touches[0].clientX-je.x,Kt=vt.touches[0].clientY-je.y;if(!je.decided){if(Math.abs(Et)<16&&Math.abs(Kt)<16)return;if(je.decided=!0,je.horiz=Math.abs(Et)>Math.abs(Kt)*1.4,!je.kbUp&&(document.activeElement===nt.current||document.activeElement===Qe.current)&&document.activeElement.blur(),je.horiz&&!je.kbUp&&oe.classList.add("dock-swiping"),je.horiz&&je.strip){const Rn=je.strip,Wt=ke.current,Vn=Rn.scrollLeft<=0,Kn=Rn.scrollLeft>=Rn.scrollWidth-Rn.clientWidth-1,Di=Et>0&&Vn&&Wt===1,Ii=Et<0&&Kn&&Wt===0;Di||Ii||(je.horiz=!1)}!je.horiz&&Math.abs(Kt)>Math.abs(Et)*1.4&&!f3(je.cmp,Kt)&&(je.vert=!0)}if(je.vert){je.dx=Et,je.dy=Kt,Ze(Kt),vt.cancelable&&vt.preventDefault();return}if(!je.horiz)return;vt.preventDefault(),W.current=!0,je.dx=Et;const pn=ue()||1;let on=Et;ke.current===0?on=Math.min(0,Math.max(-pn,on)):on=Math.max(0,Math.min(pn,on)),Ie(-ke.current*pn+on)},qe=()=>{var on,Rn,Wt,Vn;if(W.current=!1,oe.classList.remove("dock-swiping"),je&&je.vert){const Kn=h3(je.dx,je.dy,Je),Di=ke.current;je=null,Ue(),qt(),Kn==="show"?(on=ai(Di))==null||on.focus({preventScroll:!0}):Kn==="hide"&&((Rn=ai(Di))==null||Rn.blur());return}if(!je||!je.horiz){je=null,Ue();return}const vt=ke.current,Et=je.dx,Kt=je.kbUp;je=null;let pn=vt;vt===0&&Et<-uS?pn=1:vt===1&&Et>uS&&(pn=0),Kt||((Wt=nt.current)==null||Wt.blur(),(Vn=Qe.current)==null||Vn.blur()),Ue(),pn!==vt&&se.current(pn===1?"agent":"command")},Ut=()=>{(ze.scrollLeft||ze.scrollTop)&&(ze.scrollLeft=0,ze.scrollTop=0)};return ze.addEventListener("scroll",Ut,{passive:!0}),oe.addEventListener("touchstart",X,{passive:!0}),oe.addEventListener("touchmove",Ne,{passive:!1}),oe.addEventListener("touchend",qe,{passive:!0}),oe.addEventListener("touchcancel",qe,{passive:!0}),()=>{ze.removeEventListener("scroll",Ut),oe.removeEventListener("touchstart",X),oe.removeEventListener("touchmove",Ne),oe.removeEventListener("touchend",qe),oe.removeEventListener("touchcancel",qe)}},[]),zr(f,()=>v(!1));const Qe=V.useRef(null),nt=V.useRef(null),ae=V.useRef(null),Fe=V.useRef(!1);V.useEffect(()=>{const oe=window.visualViewport;if(!oe)return;const ze=()=>{if(window.innerHeight-oe.height>120){Fe.current=!0;return}if(!Fe.current)return;Fe.current=!1;const X=document.activeElement;(X===nt.current||X===Qe.current)&&X.blur(),J(!1)};return ze(),oe.addEventListener("resize",ze),()=>oe.removeEventListener("resize",ze)},[]);const et=V.useRef({head:"",tail:""}),ve=V.useRef(null),Ye=V.useRef(!1),pe=Z1({onText:oe=>{if(Ye.current){Ye.current=!1;return}const{head:ze,tail:je}=et.current;S(ze+oe+je),ve.current=ze.length+oe.length}}),me=eN(),Re=pe.state==="recording"||pe.state==="finalizing";Kg(Re),V.useEffect(()=>{if(pe.state!=="recording"&&pe.state!=="finalizing"||Ye.current)return;const{head:oe,tail:ze}=et.current;S(oe+pe.partial+ze),ve.current=oe.length+pe.partial.length},[pe.partial,pe.state]),V.useLayoutEffect(()=>{const oe=Qe.current;if(!oe)return;let ze=!1;if(ve.current!=null){const je=ve.current;if(ve.current=null,document.activeElement===oe)try{oe.setSelectionRange(je,je)}catch{}ze=je>=p.length}Pt(oe),ze&&(oe.scrollTop=oe.scrollHeight)},[p]);const Oe=()=>{if(Re){pe.stop();return}const oe=Qe.current,ze=oe?oe.selectionStart:p.length;et.current={head:p.slice(0,ze),tail:p.slice(ze)},pe.start()},bt=40,kt=V.useRef(null),Ct=(oe,ze)=>{const je=kt.current;if(!je)return null;je.style.width=`${ze}px`,je.textContent=oe;const X=document.createElement("span");return je.appendChild(X),{h:je.offsetHeight,endX:X.offsetLeft}},Pt=oe=>{if(!oe)return;oe.style.height="auto";const ze=me?76:38,je=me?86:48,X=oe.parentElement.clientWidth-11,Ne=oe.value?Ct(oe.value,X-ze):null,qe=Ne?Ne.h>bt:!1;b(qe);const Ut=qe?Ct(oe.value,X):null;m(!!Ut&&X-Ut.endX<je),oe.style.height=`${oe.scrollHeight+2}px`},Qt=()=>{Re&&(Ye.current=!0,pe.stop())},Ft=async()=>{if(o){Qt();try{await Nh(o,p,!0),l==null||l(p),S(""),requestAnimationFrame(()=>Pt(Qe.current))}catch(oe){oe instanceof Rr&&(s==null||s())}}},mt=V.useRef(!1),St=oe=>{const ze=oe.value;if(oe.value="",!ze)return;const je=ou.some(X=>Zs(ie[X]));if(je&&ze.length===1){const X=H1({kind:"text",ch:ze},ie);if(X.kind==="key"){d(X.name),P(Dg);return}}w(ze),je&&P(Dg)},Ln=oe=>{var ze;(ze=oe.nativeEvent)!=null&&ze.isComposing||mt.current||St(oe.target)},An=()=>{Q==="command"&&(mt.current=!0)},In=oe=>{Q==="command"&&(mt.current=!1,St(oe.target))},ri=oe=>{var ze;if(!(Q!=="command"||(ze=oe.nativeEvent)!=null&&ze.isComposing)){if(oe.key==="Enter"&&!oe.shiftKey){oe.preventDefault(),d("Enter");return}oe.key==="Backspace"&&(oe.preventDefault(),d("BSpace"))}},cn=()=>{const oe=nt.current;oe&&(document.activeElement===oe?oe.blur():oe.focus({preventScroll:!0}))},ai=oe=>oe===0?nt.current:Qe.current,mn=oe=>{S(oe),v(!1),requestAnimationFrame(()=>{var ze;(ze=Qe.current)==null||ze.focus(),Pt(Qe.current)})},Gn=async oe=>{if(o)try{await Nh(o,oe,!0),l==null||l(oe)}catch(ze){ze instanceof Rr&&(s==null||s())}},Ei=oe=>mn(oe),Zn=oe=>{if(fl[oe]){d(fl[oe]);return}Gn(oe)},rn=oe=>{if(oe.kind==="key"){d(oe.text);return}Zn(oe.text)},an=oe=>{if(oe.kind==="key"){d(oe.text);return}if(fl[oe.text]){d(fl[oe.text]);return}if(oe.enter){Gn(oe.text);return}w(oe.text)},Mn=oe=>oe.kind==="key"&&oe.label||oe.text,hi=oe=>oe.kind==="key"||fl[oe.text]||!oe.enter?void 0:()=>w(oe.text);V.useImperativeHandle(u,()=>({fill:mn,hideKeyboard:()=>{const oe=document.activeElement;(oe===nt.current||oe===Qe.current)&&oe.blur()}}),[]);const le=oe=>{if(!oe.length)return;let ze;if(oe.length===1)ze=oe[0];else{const je=oe[0].slice(0,oe[0].lastIndexOf("/")+1);ze=oe.every(X=>X.startsWith(je))?`${je}{${oe.map(X=>X.slice(je.length)).join(",")}}`:oe.join(" ")}S(je=>je&&!/\s$/.test(je)?`${je} ${ze}`:je+ze),requestAnimationFrame(()=>{var je;(je=Qe.current)==null||je.focus(),Pt(Qe.current)})},{upload:Ve,uploadFiles:We}=jU({cwd:j,onAuthFail:s,onPaths:le}),gt=async()=>{if(!(!o||!p)){Qt();try{await Nh(o,p,!1),l==null||l(p),S(""),requestAnimationFrame(()=>Pt(Qe.current))}catch(oe){oe instanceof Rr&&(s==null||s())}}},yt=V.useRef(null),pt=V.useRef(!1),Rt=V.useRef({x:0,y:0,moved:!1}),wt=oe=>{oe.cancelable&&oe.preventDefault(),pt.current=!1,Rt.current={x:oe.clientX,y:oe.clientY,moved:!1},p&&(yt.current=setTimeout(()=>{var ze;pt.current=!0,(ze=navigator.vibrate)==null||ze.call(navigator,12),gt()},450))},vn=oe=>{const ze=Rt.current;ze.moved||Math.hypot(oe.clientX-ze.x,oe.clientY-ze.y)<=10||(ze.moved=!0,clearTimeout(yt.current),yt.current=null)},en=()=>{if(clearTimeout(yt.current),yt.current=null,pt.current){pt.current=!1;return}Rt.current.moved||Ft()},Yt=()=>{clearTimeout(yt.current),yt.current=null,pt.current=!1},gn=V.useRef(null),yn=V.useRef({x:0,y:0,moved:!1}),oi=oe=>{if(!C)return null;for(const[ze,je]of[["send",".input-send"],["mic",".input-mic"]]){const X=oe.currentTarget.querySelector(je);if(!X)continue;const Ne=X.getBoundingClientRect();if(oe.clientX>=Ne.left&&oe.clientX<=Ne.right&&oe.clientY>=Ne.top&&oe.clientY<=Ne.bottom)return ze}return null},Un=oe=>{const ze=oi(oe);ze&&(oe.stopPropagation(),oe.cancelable&&oe.preventDefault(),gn.current=ze,ze==="send"?wt(oe):yn.current={x:oe.clientX,y:oe.clientY,moved:!1})},fi=oe=>{const ze=gn.current;if(!ze)return;if(ze==="send"){vn(oe);return}const je=yn.current;!je.moved&&Math.hypot(oe.clientX-je.x,oe.clientY-je.y)>10&&(je.moved=!0)},qn=()=>{const oe=gn.current;if(gn.current=null,!!oe){if(oe==="send"){p?en():Yt();return}!yn.current.moved&&pe.state!=="requesting"&&Oe()}},Bt=()=>{const oe=gn.current;gn.current=null,oe==="send"&&Yt()};return h.jsxDEV("div",{className:"bottom-dock",children:[h.jsxDEV("div",{className:"dock-left",ref:Se,onPointerDown:HU,children:[h.jsxDEV("button",{type:"button",className:"dock-handle",ref:Xe,"aria-label":B("dock.mode.toggle"),onClick:()=>te(Q==="command"?"agent":"command"),children:[h.jsxDEV("span",{className:"dock-mode-label",children:B(Q==="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),h.jsxDEV("span",{className:"dock-dots",children:[h.jsxDEV("i",{className:`dock-dot${Q==="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),h.jsxDEV("i",{className:`dock-dot${Q==="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),h.jsxDEV("div",{className:"dock-pager",ref:ee,children:h.jsxDEV("div",{className:`dock-track${Z===1?" at-chat":""}`,ref:we,children:[h.jsxDEV("div",{className:`dock-page command${Q==="command"?" on":""}`,children:[h.jsxDEV("input",{ref:nt,className:"cmd-capture",type:"text",onInput:Ln,onKeyDown:ri,onCompositionStart:An,onCompositionEnd:In,onFocus:()=>J(!0),onBlur:()=>J(!1),enterKeyHint:"send","aria-label":B("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),h.jsxDEV("div",{className:"quick-bar",children:[h.jsxDEV("div",{className:"quick-fixed",children:h.jsxDEV("button",{type:"button",className:"quick-fix quick-fix-kbd","aria-pressed":$,"aria-label":B($?"dock.kbdHide":"dock.kbdShow"),onPointerDown:cS,onClick:cn,children:[h.jsxDEV(EM,{down:$},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:858,columnNumber:21},this),h.jsxDEV("span",{children:B($?"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),h.jsxDEV("div",{className:"quick-scroll",children:[D.map(oe=>h.jsxDEV(ig,{className:"quick-cmd quick-cmd-plain",onTap:()=>an(oe),onHold:hi(oe),children:[Mn(oe),oe.kind!=="key"&&oe.enter&&h.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:${oe.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:865,columnNumber:21},this)),M.map(oe=>h.jsxDEV(ig,{className:"quick-cmd quick-cmd-win",onTap:()=>an(oe),onHold:hi(oe),children:[Mn(oe),oe.kind!=="key"&&oe.enter&&h.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:${oe.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:870,columnNumber:21},this)),h.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":B("cmd.editTitle"),onPointerDown:cS,onClick:()=>I(!0),children:h.jsxDEV(vg,{},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),h.jsxDEV(aU,{onKey:d,onText:w,mods:ie,setMods:P,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),h.jsxDEV("div",{className:`dock-page chat${Q==="agent"?" on":""}`,children:[Ve&&h.jsxDEV("div",{className:"dock-upload error",children:h.jsxDEV("span",{className:"dock-upload-label",children:Ve.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),h.jsxDEV("div",{className:"quick-bar",children:[h.jsxDEV("div",{className:"quick-fixed",children:h.jsxDEV("button",{type:"button",className:"quick-fix","aria-label":B("dock.attach"),disabled:!!Ve&&!Ve.error,onClick:()=>{var oe;return(oe=ae.current)==null?void 0:oe.click()},children:[h.jsxDEV(N1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:894,columnNumber:21},this),h.jsxDEV("span",{children:B("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),h.jsxDEV("div",{className:"quick-scroll",children:[N.map(oe=>h.jsxDEV(ig,{className:`quick-cmd qc-${oe.kind==="key"?"esc":zU(oe.text)}`,onTap:()=>rn(oe),onHold:oe.kind==="key"?void 0:()=>w(oe.text),children:Mn(oe)},oe.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:902,columnNumber:21},this)),h.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":B("chat.editTitle"),onClick:()=>A(!0),children:h.jsxDEV(vg,{},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),h.jsxDEV("input",{ref:ae,className:"browse-file-input",type:"file",multiple:!0,accept:q1,onChange:oe=>{We(oe.target.files),oe.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:912,columnNumber:15},this),h.jsxDEV("div",{className:`input-wrap${Re?" recording":""}${C?" multi":""}${c?" crowd":""}`,onPointerDownCapture:Un,onPointerMoveCapture:fi,onPointerUpCapture:qn,onPointerCancelCapture:Bt,children:[h.jsxDEV("textarea",{ref:Qe,className:"input-text",rows:1,value:p,onPointerDown:oe=>{Re&&(Qt(),oe.currentTarget.focus())},onChange:oe=>{S(oe.target.value),Pt(oe.target)},onFocus:()=>J(!0),onBlur:()=>J(!1),placeholder:B("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),h.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),!p&&h.jsxDEV("button",{type:"button",className:"input-history","aria-label":B("dock.history"),title:B("dock.history"),onClick:()=>v(oe=>!oe),children:h.jsxDEV(S1,{},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),me&&h.jsxDEV(G1,{active:Re,disabled:pe.state==="requesting",onToggle:Oe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:949,columnNumber:34},this),h.jsxDEV("button",{type:"button",className:"input-send","aria-label":B("dock.send"),title:B("dock.send.hint"),disabled:!p,onPointerDown:wt,onPointerMove:vn,onPointerUp:en,onPointerCancel:Yt,onPointerLeave:Yt,children:h.jsxDEV(y1,{},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),h.jsxDEV(mU,{open:f,mode:Q,recent:r,historyOnly:!0,onDelete:g,onSend:oe=>{v(!1),Zn(oe)},onFill:oe=>{v(!1),Ei(oe)},onClose:()=>v(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:961,columnNumber:7},this),U&&h.jsxDEV(rS,{windowId:y,inset:_,onClose:()=>I(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:968,columnNumber:23},this),E&&h.jsxDEV(rS,{variant:"chat",inset:_,onClose:()=>A(!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 GU=V.forwardRef(WU);function YU({onSaved:o}){const[s,d]=V.useState(""),w=j=>{j.preventDefault();const L=s.trim();L&&(XL(L),o())};return h.jsxDEV("form",{className:"token-prompt",onSubmit:w,children:[h.jsxDEV("h2",{children:B("token.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:16,columnNumber:7},this),h.jsxDEV("input",{value:s,onChange:j=>d(j.target.value),placeholder:B("token.placeholder")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:17,columnNumber:7},this),h.jsxDEV("button",{type:"submit",children:B("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 Oh({open:o,title:s,actions:d=[],onClose:w}){const[j,L]=V.useState(null);if(V.useEffect(()=>{o||L(null)},[o]),!o)return null;const y=l=>{var g;if(!l.disabled){if(l.confirm&&j!==l.key){L(l.key);return}L(null),(g=l.onClick)==null||g.call(l)}},r=l=>h.jsxDEV("button",{className:`sheet-action ${l.danger?"danger":""} ${j===l.key?"armed":""}`,disabled:l.disabled,onClick:()=>y(l),children:[l.icon&&j!==l.key&&h.jsxDEV("span",{className:"sheet-action-icon","aria-hidden":"true",children:l.icon},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:30,columnNumber:37},this),l.confirm&&j===l.key?l.confirmLabel||B("actionsheet.confirmAgain"):l.label]},l.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:24,columnNumber:5},this);return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:37,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":s,"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.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),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("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),h.jsxDEV("div",{className:"settings-section sheet-actions",children:[d.map((l,g)=>Array.isArray(l)?h.jsxDEV("div",{className:"sheet-row",children:l.map(r)},`row-${g}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:45,columnNumber:15},this):r(l)),h.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:w,children:B("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 qU=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,dS=300;function hS(o){const s=o.lastIndexOf("/");return s<0?{dir:"",frag:o}:{dir:o.slice(0,s+1),frag:o.slice(s+1)}}const KU=o=>o.replace(/\/+$/,"")||"/",rg=(o,s)=>o===s?"":o.startsWith(`${s}/`)?o.slice(s.length+1):o,_h=(o,s,d)=>{let w=null;for(const j of s||[])(o===j||o!=null&&o.startsWith(`${j}/`))&&(!w||j.length>w.length)&&(w=j);return w||d},XU=o=>o==null?"":o<1024?`${o} B`:o<1024*1024?`${Math.round(o/1024)} KB`:`${(o/1024/1024).toFixed(1)} MB`;function tN({path:o,onNavigate:s,onOpenDoc:d,onJumpToCwd:w,pendingFile:j,onPendingConsumed:L,pickMode:y=!1,allowMkdir:r=!y,onPick:l,refreshKey:g=0}){const[_,u]=V.useState(""),[p,S]=V.useState(null),[C,b]=V.useState(!1),[c,m]=V.useState(""),[f,v]=V.useState(""),[N,T]=V.useState(""),[E,A]=V.useState(null),[D,R]=V.useState(!1),[M,H]=V.useState(!1),[U,I]=V.useState(""),[G,ne]=V.useState(null),Q=V.useRef(null),te=V.useRef(!1),ie=V.useRef(g),P=V.useRef(null),$=V.useRef(null),J=V.useRef(null),ee=async(ve,{sync:Ye=!1,notify:Ee=!1,fallbackHome:pe=!1}={})=>{m("");try{const me=await g1(ve??void 0);if(te.current=me.path,S(me),Ye){const Re=rg(me.path,_h(me.path,me.roots,me.home));u(Re?`${Re}/`:"")}Ee&&(s==null||s(me.path),H(!1),I(""))}catch{if(pe&&ve!=null){ee(null,{sync:!0});return}m(B("filebrowser.openDirFailed"))}};V.useEffect(()=>{const ve=g!==ie.current;ie.current=g,!(o===te.current&&!ve)&&ee(o,{sync:!0,fallbackHome:y})},[o,g]),V.useEffect(()=>()=>{clearTimeout(P.current),clearTimeout($.current)},[]),V.useEffect(()=>{if(!C)return;const ve=Ye=>{var Ee;(Ee=J.current)!=null&&Ee.contains(Ye.target)||b(!1)};return document.addEventListener("pointerdown",ve,!0),()=>document.removeEventListener("pointerdown",ve,!0)},[C]);const we=ve=>{v(ve),clearTimeout($.current),$.current=setTimeout(()=>v(""),2500)},Se=ve=>{const Ye=p==null?void 0:p.home;if(!Ye){u(ve);return}const Ee=(p==null?void 0:p.roots)||[Ye];let pe=ve;(pe==="~"||pe.startsWith("~/"))&&(pe=Ye+pe.slice(1));let me=_h(p==null?void 0:p.path,Ee,Ye);pe.startsWith("/")&&(me=_h(pe,Ee,Ye),pe=pe===me?"":pe.startsWith(`${me}/`)?pe.slice(me.length+1):pe.replace(/^\/+/,"")),u(pe);const Re=KU(`${me}/${hS(pe).dir}`);Re!==te.current&&(clearTimeout(P.current),P.current=setTimeout(()=>{Re!==te.current&&ee(Re,{notify:!0})},250))},Z=async ve=>{const Ye=io(p.path,ve);try{await navigator.clipboard.writeText(Ye),we(B("filebrowser.copiedPath",{abs:Ye}))}catch{we(Ye)}},ke=ve=>d(io(p.path,ve)),se=ve=>ee(io(p.path,ve),{sync:!0,notify:!0}),W=()=>(p==null?void 0:p.parent)&&ee(p.parent,{sync:!0,notify:!0}),_e=async()=>{const ve=U.trim();if(!(!ve||!p)){m("");try{await KA(p.path,ve),await ee(p.path,{}),H(!1),I("")}catch{m(B("filebrowser.mkdirFailed"))}}},ue=async ve=>{m(""),ne({label:B("filebrowser.downloading",{name:ve}),pct:0});try{await aM(io(p.path,ve),Ye=>ne({label:B("filebrowser.downloading",{name:ve}),pct:Ye})),T(ve)}catch{m(B("filebrowser.downloadFailed"))}finally{ne(null)}},Ie=()=>{const ve=E;A(null),ve&&ue(ve)},Ue=p==null?void 0:p.home,Xe=(p==null?void 0:p.roots)||(Ue?[Ue]:[]),Je=_h(p==null?void 0:p.path,Xe,Ue),rt=ve=>ve===Ue?"~":/\/tmp$/.test(ve)?"tmp":ve.includes("/var/folders/")?"TMPDIR":ve.split("/").filter(Boolean).pop()||"/",Nt=ve=>{b(!1),ve!==Je&&ee(ve,{sync:!0,notify:!0})},Ze=(ve,Ye)=>!ve||!Ye||ve===Ye?!1:(ve.startsWith(`${Ye}/`)?ve.slice(Ye.length+1):ve).split("/").some(pe=>pe.startsWith(".")),qt=!!p&&p.path!==Ue&&!Ze(p.path,Je),Xt=async ve=>{const{allowed:Ye,rejected:Ee}=K1(ve);if(!Ye.length)return Ee.length&&m(B("filebrowser.uploadRejected",{names:Ee.join("、")})),Ee;R(!0),m("");const pe=Ye.length,me=[],Re=new AbortController;J1(Re,B("filebrowser.uploading",{name:Ye[0].name,tag:pe>1?`(1/${pe})`:""}));try{for(let Oe=0;Oe<pe&&!Re.signal.aborted;Oe++){const bt=Ye[Oe],kt=pe>1?`(${Oe+1}/${pe})`:"";Uh({label:B("filebrowser.uploading",{name:bt.name,tag:kt}),phase:"sending",pct:0});try{await b1(p.path,bt,(Ct,Pt)=>Uh({pct:Ct,phase:Pt}),!1,{signal:Re.signal})}catch(Ct){if(Ct instanceof Lh)break;me.push({name:bt.name,reason:(Ct==null?void 0:Ct.message)||B("filebrowser.uploadFailed")})}}}finally{Lg()}return await ee(p.path,{}),R(!1),me.length?m(me.map(Oe=>`${Oe.name}:${Oe.reason}`).join(";")):Ee.length&&m(B("filebrowser.uploadRejected",{names:Ee.join("、")})),[...me.map(Oe=>Oe.name),...Ee]},lt=async()=>{j&&(await Xt(j)).length===0&&(L==null||L())},Qe=ve=>{if(y||ve.key!=="Enter")return;const Ye=_.trim();Ye&&qU.test(Ye)&&(p!=null&&p.home)&&d(io(p.home,Ye))},nt=hS(_).frag.toLowerCase(),ae=((p==null?void 0:p.entries)||[]).filter(ve=>(!y||ve.type==="dir")&&(!nt||ve.name.toLowerCase().includes(nt))),Fe=ae.length>dS?ae.slice(0,dS):ae,et=ae.length-Fe.length;return h.jsxDEV("div",{className:"browse-view",children:[h.jsxDEV("div",{className:"browse-bar",children:[w&&h.jsxDEV("button",{className:"browse-cwd","aria-label":B("filebrowser.sessionDir"),title:B("filebrowser.jumpToSessionDir"),onClick:w,children:h.jsxDEV(pM,{},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),h.jsxDEV("button",{className:"browse-up","aria-label":B("filebrowser.parentDir"),disabled:!(p!=null&&p.parent),onClick:W,children:h.jsxDEV(y1,{},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),h.jsxDEV("div",{className:"browse-path",children:[Xe.length>1?h.jsxDEV("div",{className:"dd browse-root-dd",ref:J,children:[h.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":C,"aria-label":B("filebrowser.rootSelect"),onClick:()=>b(ve=>!ve),children:[h.jsxDEV("span",{children:[rt(Je),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:289,columnNumber:17},this),h.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&&h.jsxDEV("div",{className:"dd-menu",role:"listbox",children:Xe.map(ve=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":ve===Je,title:ve,className:`dd-option${ve===Je?" is-selected":""}`,onClick:()=>Nt(ve),children:[h.jsxDEV("span",{className:"dd-option-label",children:[rt(ve),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:23},this),ve===Je&&h.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)]},ve,!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):h.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),h.jsxDEV("input",{className:"browse-input",value:_,placeholder:B("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ve=>Se(ve.target.value),onKeyDown:Qe},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),r&&h.jsxDEV("button",{className:"browse-mkdir","aria-label":B("filebrowser.newFolder"),title:B("filebrowser.newFolder"),disabled:!p,onClick:()=>{H(ve=>!ve),I("")},children:h.jsxDEV(hM,{},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),!y&&h.jsxDEV("button",{className:"browse-upload","aria-label":B("filebrowser.uploadFile"),title:B(qt?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!qt||D,onClick:()=>{var ve;return(ve=Q.current)==null?void 0:ve.click()},children:h.jsxDEV(N1,{},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),!y&&h.jsxDEV("input",{ref:Q,className:"browse-file-input",type:"file",multiple:!0,accept:q1,onChange:ve=>{Xt(Array.from(ve.target.files||[])),ve.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),M&&h.jsxDEV("div",{className:"browse-newfolder",children:[h.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:U,placeholder:B("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ve=>I(ve.target.value),onKeyDown:ve=>{ve.key==="Enter"&&_e()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:350,columnNumber:11},this),h.jsxDEV("button",{className:"browse-newfolder-ok",onClick:_e,children:B("filebrowser.createBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:356,columnNumber:11},this),h.jsxDEV("button",{className:"browse-newfolder-x","aria-label":B("common.cancel"),onClick:()=>{H(!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),!y&&j&&h.jsxDEV("div",{className:"browse-pending",children:[h.jsxDEV("span",{className:"browse-pending-text",children:[B("filebrowser.uploadPendingTo",{name:j.name}),!qt&&h.jsxDEV("em",{className:"browse-pending-hint",children:B("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),h.jsxDEV("button",{className:"browse-pending-btn",disabled:!qt||D,onClick:lt,children:B("filebrowser.upload")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:366,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:361,columnNumber:9},this),c&&h.jsxDEV("div",{className:"bind-error browse-err",children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:369,columnNumber:15},this),f&&h.jsxDEV("div",{className:"browse-notice",children:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:370,columnNumber:18},this),!y&&N&&h.jsxDEV("div",{className:"browse-saved",children:[h.jsxDEV("span",{className:"browse-saved-text",children:B("filebrowser.savedToDownloads",{name:N})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:373,columnNumber:11},this),h.jsxDEV("button",{className:"browse-saved-close","aria-label":B("common.close"),onClick:()=>T(""),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),!y&&G&&h.jsxDEV("div",{className:"browse-progress",children:[h.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),h.jsxDEV("span",{className:"browse-progress-track",children:h.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),h.jsxDEV("div",{className:"browse-list",children:[Fe.length===0&&!c&&h.jsxDEV("div",{className:"browse-empty",children:B("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:386,columnNumber:42},this),Fe.map(ve=>h.jsxDEV("div",{className:"browse-entry-row",children:[h.jsxDEV("button",{className:"browse-entry",onClick:()=>ve.type==="dir"?se(ve.name):ve.type==="doc"||ve.type==="image"?ke(ve.name):we(B("filebrowser.previewUnsupported")),children:[h.jsxDEV("span",{className:"browse-entry-icon",children:ve.type==="dir"?h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:71},this):ve.type==="image"?h.jsxDEV(mM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:109},this):h.jsxDEV(fM,{},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),h.jsxDEV("span",{className:"browse-entry-name",children:ve.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:398,columnNumber:15},this),ve.type!=="dir"&&h.jsxDEV("span",{className:"browse-entry-size",children:XU(ve.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),ve.type!=="dir"&&h.jsxDEV("button",{className:"browse-copy","aria-label":B("filebrowser.copyAbsPath"),title:B("filebrowser.copyAbsPath"),onClick:()=>Z(ve.name),children:h.jsxDEV(C1,{},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),ve.type!=="dir"&&h.jsxDEV("button",{className:"browse-dl","aria-label":B("filebrowser.download"),onClick:()=>A(ve.name),children:h.jsxDEV(_M,{},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)]},ve.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:388,columnNumber:11},this)),et>0&&h.jsxDEV("div",{className:"browse-overflow",children:B("filebrowser.tooMany",{shown:Fe.length,total:ae.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),y&&p&&h.jsxDEV("div",{className:"browse-pick-bar",children:h.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>l==null?void 0:l(p.path),children:B("filebrowser.pickThisDir",{path:rg(p.path,p.home)?`~/${rg(p.path,p.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),h.jsxDEV(Oh,{open:!!E,title:E?B("filebrowser.downloadConfirm",{name:E}):"",actions:[{key:"dl",label:B("filebrowser.download"),onClick:Ie}],onClose:()=>A(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:424,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:270,columnNumber:5},this)}const JU=()=>{};function du({open:o,seedCwd:s=null,hint:d=null,pane:w=null,allowMkdir:j=!1,onPick:L,onClose:y,inset:r=0}){const[l,g]=V.useState(s),_=V.useRef(!1);o&&!_.current?(_.current=!0,l!==s&&g(s)):!o&&_.current&&(_.current=!1);const u=w?async()=>{try{const{cwd:p}=await ao(w);p&&g(p)}catch{}}:null;return o?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop dirpick-backdrop",onClick:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:31,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card dirpick-card",style:{transform:`translate(-50%, calc(-50% + ${r/2}px))`,"--kb-inset":`${r}px`},role:"dialog","aria-label":B("dirpicker.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("dirpicker.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:38,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:y,"aria-label":B("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&&h.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),h.jsxDEV(tN,{path:l,onNavigate:g,onOpenDoc:JU,onJumpToCwd:u,pickMode:!0,allowMkdir:j,onPick:L},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 ZU({open:o,pushKey:s,notifyOn:d,onClose:w}){const[j,L]=V.useState("");if(!o)return null;const y='handmux push "构建完成" "耗时 3m12s"',r=!!(d&&s),l=y,g=`${y} --session ${B("scriptPush.session_placeholder")}`,_=`${y} --device ${r?s:B("scriptPush.device_placeholder")}`,u=async(C,b)=>{try{await navigator.clipboard.writeText(C),L(b),setTimeout(()=>L(""),1500)}catch{}},p=C=>B(j===C?"scriptPush.copied":"common.copy"),S=(C,b,c,m)=>h.jsxDEV("div",{className:"push-script-block",children:[h.jsxDEV("div",{className:"push-script-label",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:7},this),h.jsxDEV("pre",{className:"push-script-cmd",children:h.jsxDEV("code",{children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:7},this),m&&h.jsxDEV("div",{className:"push-script-hint",children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:27,columnNumber:16},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>u(c,C),children:p(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 h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop push-script-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:34,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card push-script-sheet",role:"dialog","aria-label":B("scriptPush.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("scriptPush.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:37,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("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),h.jsxDEV("p",{className:"push-script-intro",children:B("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),S("all",B("scriptPush.scope_all"),l),S("session",B("scriptPush.scope_session"),g),S("device",B("scriptPush.scope_device"),_,B(r?"scriptPush.device_key_note":"scriptPush.device_need_enable")),h.jsxDEV("div",{className:"push-script-block",children:[h.jsxDEV("div",{className:"push-script-label",children:B("scriptPush.opts_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:49,columnNumber:11},this),h.jsxDEV("ul",{className:"push-script-fields",children:[h.jsxDEV("li",{children:B("scriptPush.opt_tag")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:51,columnNumber:13},this),h.jsxDEV("li",{children:B("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),h.jsxDEV("div",{className:"push-script-note",children:B("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 QU({open:o,onClose:s,termRef:d,onColAdjust:w,onColRestore:j,onOpenChangelog:L,changelogUnread:y,updateInfo:r=null,activePreview:l=null,pane:g=null,lastPreviewDir:_=null,dynamicEnabled:u=!1,getColCount:p=null,onStartPreview:S,onStartDynamicPreview:C,onOpenPreview:b,onRenew:c,onStop:m}){var Ye,Ee;const[f,v]=V.useState(null),[N,T]=V.useState(d1()),[E,A]=V.useState(null),[D,R]=V.useState(!1),[M,H]=V.useState(bg()),[U,I]=V.useState(!1),[G,ne]=V.useState(""),[Q,te]=V.useState(!1),[ie,P]=V.useState(null),[$,J]=V.useState(!1),[ee,we]=V.useState(null),[Se,Z]=V.useState("off"),[ke,se]=V.useState(""),[W,_e]=V.useState(!1),[ue,Ie]=V.useState(""),[Ue,Xe]=V.useState(!1),Je=j1(l==null?void 0:l.expiresAt,!!l&&o);V.useEffect(()=>{_e(!1),Ie("")},[l==null?void 0:l.name,o]);const rt=pe=>({"port not listening":B("settings.err_port_not_listening"),"bad port":B("settings.err_bad_port"),"dynamic disabled":B("settings.err_dynamic_disabled")})[pe]||pe||B("settings.err_start_failed"),Nt=async()=>{const pe=Number(ke);if(pe){Ie(""),Xe(!0);try{await(C==null?void 0:C(pe))}catch(me){Ie(rt(me==null?void 0:me.message))}finally{Xe(!1)}}},Ze=async()=>{P(bg()?await BM():null),te(!0)},qt=async()=>{let pe=_;if(!pe&&g)try{pe=(await ao(g)).cwd||null}catch{}we(pe),J(!0)};V.useEffect(()=>{var pe,me;o&&(v(((me=(pe=d.current)==null?void 0:pe.getFontSize)==null?void 0:me.call(pe))??null),A((p==null?void 0:p())??null))},[o,d,p]);const Xt=async()=>{I(!0),ne("");try{M?(await PM(),H(!1),ne(B("settings.notify_disabled"))):(await OM(),H(!0),ne(B("settings.notify_enabled")))}catch(pe){ne(pe.message||B("settings.notify_failed"))}finally{I(!1)}};if(!o)return null;const lt=pe=>{var Oe,bt,kt,Ct;const me=(bt=(Oe=d.current)==null?void 0:Oe.getFontSize)==null?void 0:bt.call(Oe),Re=(Ct=(kt=d.current)==null?void 0:kt.setFontSize)==null?void 0:Ct.call(kt,((me==null?void 0:me.size)??14)+pe);Re!=null&&v({size:Re,auto:!1})},Qe=()=>{var pe,me;(me=(pe=d.current)==null?void 0:pe.autoFont)==null||me.call(pe),v({size:null,auto:!0})},nt=pe=>{var me,Re;T(pe),fA(pe),(Re=(me=d.current)==null?void 0:me.setDocHighlight)==null||Re.call(me,pe)},ae=f!=null&&f.auto?B("settings.font_auto"):f!=null&&f.size?`${f.size}px`:"—",Fe=E!=null?`${E} 列`:"—",et=pe=>{w==null||w(pe),A((p==null?void 0:p())??null)},ve=()=>{j==null||j(),A(null)};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:107,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":B("settings.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("settings.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:110,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:111,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:109,columnNumber:9},this),h.jsxDEV("div",{className:"settings-body",children:[h.jsxDEV("div",{className:"settings-group",children:B("settings.group_global")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:115,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:118,columnNumber:11},this),h.jsxDEV("div",{className:"lang-drop",children:[D&&h.jsxDEV("div",{className:"lang-drop-backdrop",onClick:()=>R(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:120,columnNumber:26},this),h.jsxDEV("button",{className:"lang-trigger",onClick:()=>R(pe=>!pe),children:[h.jsxDEV("span",{children:(Ye=px.find(pe=>pe.code===pl()))==null?void 0:Ye.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:122,columnNumber:15},this),h.jsxDEV("span",{className:"lang-chevron",children:D?"▴":"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:123,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:121,columnNumber:13},this),D&&h.jsxDEV("div",{className:"lang-menu",children:px.map(pe=>h.jsxDEV("button",{className:`lang-option${pe.code===pl()?" active":""}`,onClick:()=>GL(pe.code),children:pe.label},pe.code,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:128,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:126,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:119,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:117,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.font_size")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:137,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("button",{className:"fontbtn",onClick:()=>lt(-1),"aria-label":B("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:139,columnNumber:13},this),h.jsxDEV("span",{className:"settings-value",children:ae},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:140,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>lt(1),"aria-label":B("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:141,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:Qe,title:B("settings.font_auto_title"),children:B("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:142,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:138,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:136,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("label",{className:"settings-toggle",children:[h.jsxDEV("span",{className:"settings-label",children:B("settings.path_highlight")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:148,columnNumber:13},this),h.jsxDEV("span",{className:"cmd-switch",children:[h.jsxDEV("input",{type:"checkbox",checked:N,onChange:pe=>nt(pe.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:150,columnNumber:15},this),h.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:151,columnNumber:15},this),h.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:152,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:149,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:147,columnNumber:11},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.path_highlight_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:155,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:146,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.version")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:159,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("span",{className:"settings-value",children:r!=null&&r.current?`v${r.current}`:"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:161,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:L,children:[B("settings.view_changelog"),y&&h.jsxDEV("span",{className:"settings-dot","aria-label":B("settings.has_update")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:163,columnNumber:65},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:162,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:160,columnNumber:11},this),(r==null?void 0:r.updateAvailable)&&h.jsxDEV("div",{className:"settings-update",children:[h.jsxDEV("div",{className:"settings-update-title",children:B("settings.update_available",{v:r.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:172,columnNumber:15},this),((Ee=r.whatsNew)==null?void 0:Ee.length)>0&&h.jsxDEV("ul",{className:"settings-update-new",children:r.whatsNew.map(pe=>h.jsxDEV("li",{children:[h.jsxDEV("span",{className:"settings-update-new-ver",children:["v",pe.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:177,columnNumber:23},this),(pl().startsWith("zh")?pe.zh:pe.en)||pe.en]},pe.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:176,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:174,columnNumber:17},this),h.jsxDEV("div",{className:"settings-update-how",children:[B("settings.update_how")," ",h.jsxDEV("code",{children:"handmux update"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:183,columnNumber:79},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:183,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:171,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:158,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:193,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://github.com/handmux/handmux/issues",target:"_blank",rel:"noreferrer",children:B("settings.feedback_issues")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:195,columnNumber:13},this),pl().startsWith("zh")&&h.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://handmux.com/#community",target:"_blank",rel:"noreferrer",children:B("settings.feedback_group")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:197,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:194,columnNumber:11},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:200,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:192,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.push_notifications")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:204,columnNumber:11},this),bl()?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("button",{className:"fontbtn",onClick:Xt,disabled:U,"aria-pressed":M,children:B(M?"settings.notify_on":"settings.notify_enable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:208,columnNumber:17},this),U&&h.jsxDEV("span",{className:"spinner",role:"status","aria-label":B("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:211,columnNumber:32},this),!U&&G&&h.jsxDEV("span",{className:"settings-note",children:G},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:212,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:207,columnNumber:15},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:214,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:206,columnNumber:13},this):h.jsxDEV("div",{className:"settings-value",style:{display:"block"},children:B("settings.push_unsupported")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:217,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:203,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.script_push")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:222,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:h.jsxDEV("button",{className:"fontbtn",onClick:Ze,disabled:!bl(),children:B("settings.script_push_open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:224,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:223,columnNumber:11},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.script_push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:226,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:221,columnNumber:9},this),h.jsxDEV("div",{className:"settings-group",children:B("settings.group_session")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:229,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.screen_cols")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:232,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns cols-btns",children:[h.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>et(-10),children:"−10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:234,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>et(-1),children:"−1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:235,columnNumber:13},this),h.jsxDEV("span",{className:"settings-value",children:Fe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:236,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>et(1),children:"+1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:237,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>et(10),children:"+10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:238,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:ve,children:["↺ ",B("settings.cols_restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:239,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:233,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:231,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B(u?"settings.preview_site":"settings.preview_static_site")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:244,columnNumber:11},this),l?h.jsxDEV("div",{className:"preview-active",children:[h.jsxDEV("div",{className:"preview-active-head",children:[h.jsxDEV("span",{className:"preview-running",children:[h.jsxDEV("span",{className:"live-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:248,columnNumber:51},this),l.kind==="dynamic"?B("settings.preview_running_dynamic"):B("settings.preview_running_static")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:248,columnNumber:17},this),h.jsxDEV("span",{className:"preview-remain-s",title:B("settings.preview_remain_title"),children:B("settings.preview_remain",{time:D1(Je)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:249,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:247,columnNumber:15},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("button",{className:"fontbtn",onClick:()=>{b==null||b(),s==null||s()},children:B("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:252,columnNumber:17},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>c==null?void 0:c(),children:B("settings.preview_renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:253,columnNumber:17},this),W?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("button",{className:"fontbtn preview-confirm-danger",onClick:()=>{_e(!1),m==null||m()},children:B("settings.preview_confirm_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:256,columnNumber:21},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>_e(!1),children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:257,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:255,columnNumber:19},this):h.jsxDEV("button",{className:"fontbtn",onClick:()=>_e(!0),children:B("settings.preview_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:260,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:251,columnNumber:15},this),h.jsxDEV("div",{className:"settings-hint",children:[B("settings.preview_name",{name:l.name}),l.kind==="dynamic"?B("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:263,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:246,columnNumber:13},this):h.jsxDEV("div",{className:"preview-start",children:[h.jsxDEV("div",{className:"preview-seg",role:"tablist","aria-label":B("settings.preview_type"),children:[h.jsxDEV("button",{role:"tab",className:Se==="off"?"on":"","aria-selected":Se==="off",onClick:()=>Z("off"),children:B("settings.preview_off")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:272,columnNumber:17},this),h.jsxDEV("button",{role:"tab",className:Se==="static"?"on":"","aria-selected":Se==="static",onClick:()=>Z("static"),children:B("settings.preview_static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:273,columnNumber:17},this),u&&h.jsxDEV("button",{role:"tab",className:Se==="dynamic"?"on":"","aria-selected":Se==="dynamic",onClick:()=>{Ie(""),Z("dynamic")},children:B("settings.preview_dynamic")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:275,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:271,columnNumber:15},this),Se==="off"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-hint",children:B(u?"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:280,columnNumber:19},this),!u&&h.jsxDEV("div",{className:"settings-hint preview-dynamic-disabled",children:B("settings.preview_dynamic_disabled")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:282,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:279,columnNumber:17},this),Se==="static"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-btns",children:h.jsxDEV("button",{className:"fontbtn",onClick:qt,children:B("settings.preview_pick_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:289,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:288,columnNumber:19},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.preview_static_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:291,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:287,columnNumber:17},this),Se==="dynamic"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("input",{className:"preview-port",type:"number",inputMode:"numeric",min:"1",max:"65535",placeholder:B("settings.preview_port_placeholder"),value:ke,onChange:pe=>{se(pe.target.value),Ie("")},"aria-label":B("settings.preview_port_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:297,columnNumber:21},this),h.jsxDEV("button",{className:"fontbtn",disabled:!ke||Ue,onClick:Nt,children:B(Ue?"settings.preview_starting":"settings.preview_start")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:299,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:296,columnNumber:19},this),ue?h.jsxDEV("div",{className:"settings-hint settings-err",children:ue},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:302,columnNumber:23},this):h.jsxDEV("div",{className:"settings-hint",children:B("settings.preview_dynamic_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:303,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:295,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:270,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:243,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:114,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:108,columnNumber:7},this),h.jsxDEV(du,{open:$,seedCwd:ee,pane:g,hint:B("settings.dir_picker_hint"),onPick:pe=>{J(!1),S==null||S(pe),s==null||s()},onClose:()=>J(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:311,columnNumber:7},this),h.jsxDEV(ZU,{open:Q,pushKey:ie,notifyOn:M,onClose:()=>te(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:319,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:106,columnNumber:5},this)}function fS(o){return o===300?B("usage.win5h"):o===10080?B("usage.winWeekly"):o===43200?B("usage.winMonthly"):o>0?B("usage.winGeneric",{h:Math.round(o/60)}):""}function Ph(o,s){if(!o)return"";const d=o-Math.floor(s/1e3);if(d<=0)return B("usage.resetSoon");const w=Math.floor(d/86400),j=Math.floor(d%86400/3600),L=Math.floor(d%3600/60),y=w>0?`${w}d ${j}h`:j>0?`${j}h ${L}m`:`${L}m`;return B("usage.resetIn",{t:y})}function nN({at:o,now:s}){if(!o)return null;const d=Math.max(0,Math.floor((s-o)/1e3)),w=d<60?B("usage.updatedNow"):d<3600?B("usage.updatedMin",{n:Math.floor(d/60)}):d<86400?B("usage.updatedHr",{n:Math.floor(d/3600)}):B("usage.updatedDay",{n:Math.floor(d/86400)});return h.jsxDEV("div",{className:"usage-updated",children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function gl(o,s,d){if(!o||!s)return null;const w=o-Math.floor(d/1e3);return Math.max(0,Math.min(100,(1-w/(s*60))*100))}function eO({pct:o,timePct:s}){const d=Math.max(0,Math.min(100,o??0)),w=d>=80?"hi":d>=50?"mid":"lo";return h.jsxDEV("div",{className:"usage-bar",children:[h.jsxDEV("div",{className:`usage-bar-fill lvl-${w}`,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&&h.jsxDEV("div",{className:"usage-bar-time",style:{left:`${s}%`},title:B("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 _l({label:o,pct:s,reset:d,sub:w,timePct:j}){return h.jsxDEV("div",{className:"usage-row",children:[h.jsxDEV("div",{className:"usage-row-head",children:[h.jsxDEV("span",{className:"usage-row-label",children:[o,w&&h.jsxDEV("span",{className:"usage-row-sub",children:[" · ",w]},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),h.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),h.jsxDEV(eO,{pct:s,timePct:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),d&&h.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 tO({claude:o,now:s}){var d,w;return h.jsxDEV("section",{className:"usage-agent",children:[h.jsxDEV("div",{className:"usage-agent-head",children:[h.jsxDEV(oo,{agent:"claude"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:41},this),h.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),h.jsxDEV(nN,{at:o==null?void 0:o.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),o?!((d=o.rateLimits)!=null&&d.fiveHour)&&!((w=o.rateLimits)!=null&&w.sevenDay)?h.jsxDEV("div",{className:"usage-empty",children:B("usage.claudePending")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:83,columnNumber:9},this):h.jsxDEV(h.Fragment,{children:[o.rateLimits.fiveHour&&h.jsxDEV(_l,{label:B("usage.win5h"),pct:o.rateLimits.fiveHour.usedPercent,reset:Ph(o.rateLimits.fiveHour.resetsAt,s),timePct:gl(o.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),o.rateLimits.sevenDay&&h.jsxDEV(_l,{label:B("usage.winWeekly"),pct:o.rateLimits.sevenDay.usedPercent,reset:Ph(o.rateLimits.sevenDay.resetsAt,s),timePct:gl(o.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),o.rateLimits.sevenDayOpus&&h.jsxDEV(_l,{label:B("usage.winWeekly"),sub:"Opus",pct:o.rateLimits.sevenDayOpus.usedPercent,timePct:gl(o.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),o.rateLimits.sevenDaySonnet&&h.jsxDEV(_l,{label:B("usage.winWeekly"),sub:"Sonnet",pct:o.rateLimits.sevenDaySonnet.usedPercent,timePct:gl(o.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):h.jsxDEV("div",{className:"usage-empty",children:[h.jsxDEV("div",{children:B("usage.claudeOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:79,columnNumber:11},this),h.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 nO({codex:o,now:s}){const d=o==null?void 0:o.rateLimits;return h.jsxDEV("section",{className:"usage-agent",children:[h.jsxDEV("div",{className:"usage-agent-head",children:[h.jsxDEV(oo,{agent:"codex"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:41},this),h.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),h.jsxDEV(nN,{at:o==null?void 0:o.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),o?h.jsxDEV(h.Fragment,{children:[(d==null?void 0:d.primary)&&h.jsxDEV(_l,{label:fS(d.primary.windowMinutes)||B("usage.winPrimary"),pct:d.primary.usedPercent,reset:Ph(d.primary.resetsAt,s),timePct:gl(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)&&h.jsxDEV(_l,{label:fS(d.secondary.windowMinutes)||B("usage.winSecondary"),pct:d.secondary.usedPercent,reset:Ph(d.secondary.resetsAt,s),timePct:gl(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)&&h.jsxDEV("div",{className:"usage-empty",children:B("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):h.jsxDEV("div",{className:"usage-empty",children:B("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 iO({open:o,onClose:s,onAuthFail:d}){const[w,j]=V.useState(null),[L,y]=V.useState(""),[r,l]=V.useState(!1),g=Date.now();return V.useEffect(()=>{if(!o)return;let _=!1;return l(!0),y(""),UA().then(u=>{_||(j(u),l(!1))}).catch(u=>{_||(u instanceof Rr?d==null||d():y(B("usage.loadFailed")),l(!1))}),()=>{_=!0}},[o]),o?h.jsxDEV(h.Fragment,{children:[h.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),h.jsxDEV("div",{className:"settings-card usage-card",role:"dialog","aria-label":B("usage.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("usage.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:164,columnNumber:11},this),h.jsxDEV("span",{className:"usage-head-note",children:B("usage.activityNote")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:165,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":B("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),h.jsxDEV("div",{className:"settings-section",children:r&&!w?h.jsxDEV("div",{className:"usage-empty",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):L?h.jsxDEV("div",{className:"bind-error",children:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):w?h.jsxDEV(h.Fragment,{children:[w.codex&&h.jsxDEV(nO,{codex:w.codex,now:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:30},this),h.jsxDEV(tO,{claude:w.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 rO({rows:o,top:s,open:d,onToggle:w,onClose:j,onSelectRow:L,onMarkAllRead:y,hooksStatus:r,onEnableHooks:l}){const g=[];for(const v of o){const N=g[g.length-1];N&&N.session===v.session?N.items.push(v):g.push({session:v.session,items:[v]})}const _=Date.now(),u=o.some(v=>v.view==="done"),p=LM(o),[S,C]=V.useState(!1),[b,c]=V.useState(!1),m=g.length===0&&r==="absent",f=async()=>{C(!0),c(!1);try{const v=await(l==null?void 0:l());(!v||v.status!=="installed")&&c(!0)}catch{c(!0)}finally{C(!1)}};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:w,"aria-label":B("inbox.title"),title:B("inbox.title"),children:[h.jsxDEV(gM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:36,columnNumber:9},this),s&&h.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&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"inbox-backdrop",onClick:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:41,columnNumber:11},this),h.jsxDEV("div",{className:"inbox-panel",role:"dialog","aria-label":B("inbox.title"),children:[h.jsxDEV("div",{className:"inbox-head",children:[h.jsxDEV("span",{children:B("inbox.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:44,columnNumber:15},this),h.jsxDEV("div",{className:"inbox-summary",children:[h.jsxDEV("span",{className:"inbox-chip working",children:[B("inbox.working")," ",p.working]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:47,columnNumber:17},this),h.jsxDEV("span",{className:"inbox-chip done",children:[B("inbox.done")," ",p.done]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:48,columnNumber:17},this),h.jsxDEV("span",{className:"inbox-chip needs",children:[B("inbox.needs")," ",p.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),u&&h.jsxDEV("button",{className:"inbox-readall",onClick:y,children:B("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?m?h.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[h.jsxDEV("div",{className:"inbox-enable-title",children:B("inbox.enableTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:56,columnNumber:19},this),h.jsxDEV("div",{className:"inbox-enable-hint",children:B("inbox.enableHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:57,columnNumber:19},this),h.jsxDEV("button",{className:"inbox-enable-btn",onClick:f,disabled:S,children:B(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),b&&h.jsxDEV("div",{className:"inbox-enable-err",children:B("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):h.jsxDEV("div",{className:"inbox-empty",children:B("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):g.map(v=>h.jsxDEV("div",{className:"inbox-group",children:[h.jsxDEV("div",{className:"inbox-group-title",children:v.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),v.items.map(N=>h.jsxDEV("button",{className:"inbox-row",onClick:()=>L(N),children:[h.jsxDEV("div",{className:"inbox-row-head",children:[h.jsxDEV("span",{className:`inbox-chip ${N.view}`,children:RM[N.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),h.jsxDEV(oo,{agent:N.agent},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:73,columnNumber:23},this),h.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),h.jsxDEV("span",{className:"inbox-time",children:k1(N.ts,_)},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&&h.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))]},v.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 sO({open:o,orphan:s,onConfirm:d,onClose:w,inset:j=0}){var v;const[L,y]=V.useState([]),[r,l]=V.useState("new"),[g,_]=V.useState(""),[u,p]=V.useState(!0),[S,C]=V.useState(!1),[b,c]=V.useState("");if(V.useEffect(()=>{o&&(l("new"),_((s==null?void 0:s.suggestedName)||""),p(dA()),C(!1),c(""),vl().then(N=>y(Array.isArray(N)?N:[])).catch(()=>y([])))},[o,s]),!o||!s)return null;const m=r==="new"?g.trim()||s.suggestedName||"":((v=L.find(N=>N.id===r))==null?void 0:v.name)||"",f=async()=>{if(S)return;C(!0),c(""),hA(u);const N=r==="new"?{mode:"new"}:{mode:"window",session:r};try{await d({target:N,kill:u,name:r==="new"?g.trim():void 0})}catch{C(!1),c(B("inbox.orphans.failed"))}};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:44,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${j/2}px))`},role:"dialog","aria-label":B("inbox.orphans.takeover"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:51,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("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),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"opt",children:[h.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&&h.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),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("inbox.orphans.targetLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:60,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-targets",children:[h.jsxDEV("button",{className:"fontbtn","aria-pressed":r==="new",onClick:()=>l("new"),children:B("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),L.map(N=>h.jsxDEV("button",{className:"fontbtn","aria-pressed":r===N.id,onClick:()=>l(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),r==="new"&&h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("inbox.orphans.nameLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:74,columnNumber:15},this),h.jsxDEV("input",{className:"bind-input",value:g,placeholder:B("bind.invalidName"),onChange:N=>{_(N.target.value),c("")}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:75,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:73,columnNumber:13},this),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("inbox.orphans.killTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:84,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-targets orphan-kill",children:[h.jsxDEV("button",{className:"fontbtn","aria-pressed":u,onClick:()=>p(!0),children:[B("inbox.orphans.killEnd"),h.jsxDEV("span",{className:"orphan-reco",children:B("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),h.jsxDEV("button",{className:"fontbtn","aria-pressed":!u,onClick:()=>p(!1),children:B("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),h.jsxDEV("div",{className:"orphan-help",children:B("inbox.orphans.killWhy")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:93,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-help",children:[B("inbox.orphans.reopenPre")," ",h.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",m||B("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),b&&h.jsxDEV("div",{className:"bind-error",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:99,columnNumber:21},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:w,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:101,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:f,disabled:S,children:B(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 mS="tw_a2hs_dismissed",cu=()=>typeof navigator<"u"&&navigator.userAgent||"",Ch=()=>/iP(hone|ad|od)/.test(cu())||/Macintosh/.test(cu())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,aO=()=>/Android/.test(cu()),oO=()=>Ch()&&/Safari/.test(cu())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(cu());function lO(){const[o,s]=V.useState(!1),[d,w]=V.useState(null);if(V.useEffect(()=>{if(L1()||!Ch()&&!aO())return;try{if(localStorage.getItem(mS)==="1")return}catch{}const g=_=>{_.preventDefault(),w(_)};return window.addEventListener("beforeinstallprompt",g),s(!0),()=>window.removeEventListener("beforeinstallprompt",g)},[]),!o)return null;const j=()=>{try{localStorage.setItem(mS,"1")}catch{}s(!1)},L=async()=>{if(d){d.prompt();try{await d.userChoice}catch{}j()}};let y,r,l=null;return d?(y="install",r=B("a2hs.lead"),l=h.jsxDEV("button",{className:"a2hs-banner-cta",onClick:L,children:B("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):Ch()&&!oO()?(y="ios-other",r=B("a2hs.iosOpenSafari")):Ch()?(y="ios",r=B("a2hs.iosHint")):(y="android",r=B("a2hs.androidManual")),h.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":B("a2hs.title"),"data-mode":y,children:[h.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),h.jsxDEV("div",{className:"a2hs-banner-txt",children:[h.jsxDEV("span",{className:"a2hs-banner-title",children:B("a2hs.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:67,columnNumber:9},this),h.jsxDEV("span",{className:"a2hs-banner-sub",children:r},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),l,h.jsxDEV("button",{className:"a2hs-banner-x",onClick:j,"aria-label":B("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 Ag="tw_claude_hooks";function cO(){try{return localStorage.getItem(Ag)||null}catch{return null}}function uO(){const[o,s]=V.useState(cO);V.useEffect(()=>{let w=!0;return Promise.resolve().then(_1).then(j=>{if(!w)return;const L=(j==null?void 0:j.claudeHooks)||"installed";s(L);try{localStorage.setItem(Ag,L)}catch{}}).catch(()=>{}),()=>{w=!1}},[]);const d=V.useCallback(async()=>{const w=await ZA();if(w!=null&&w.status){s(w.status);try{localStorage.setItem(Ag,w.status)}catch{}}return w},[]);return{status:o,enable:d}}function dO({value:o,options:s,onChange:d,ariaLabel:w}){const[j,L]=V.useState(!1),y=V.useRef(null),r=s.find(l=>l.value===o)||s[0];return V.useEffect(()=>{if(!j)return;const l=g=>{var _;(_=y.current)!=null&&_.contains(g.target)||L(!1)};return document.addEventListener("pointerdown",l,!0),()=>document.removeEventListener("pointerdown",l,!0)},[j]),h.jsxDEV("div",{className:"dd",ref:y,children:[h.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":j,"aria-label":w,onClick:()=>L(l=>!l),children:[h.jsxDEV("span",{className:"dd-value",children:r==null?void 0:r.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:30,columnNumber:9},this),h.jsxDEV("span",{className:`dd-caret${j?" 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),j&&h.jsxDEV("div",{className:"dd-menu",role:"listbox",children:s.map(l=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":l.value===o,className:`dd-option${l.value===o?" is-selected":""}`,onClick:()=>{d==null||d(l.value),L(!1)},children:[h.jsxDEV("span",{className:"dd-option-label",children:l.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:44,columnNumber:15},this),l.value===o&&h.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)]},l.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 iN=[{value:"",label:B("startup.preset_shell")},{value:"claude",label:B("startup.preset_claude")},{value:"claude --continue",label:B("startup.preset_claude_continue")},{value:"codex",label:B("startup.preset_codex")}],Eh="__custom__",hO=[...iN,{value:Eh,label:B("startup.custom")}];function rN({value:o="",onChange:s}){const d=iN.some(g=>g.value===o),[w,j]=V.useState(d?o:Eh),[L,y]=V.useState(d?"":o),r=g=>{j(g),s==null||s(g===Eh?L:g)},l=g=>{const _=g.target.value;y(_),s==null||s(_)};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-label",children:B("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),h.jsxDEV(dO,{value:w,options:hO,onChange:r,ariaLabel:B("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),w===Eh&&h.jsxDEV("input",{className:"bind-input startup-custom",value:L,placeholder:B("startup.custom_placeholder"),onChange:l,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 fO=/^[A-Za-z0-9-]{1,16}$/;function mO({open:o,onClose:s,onBound:d,bound:w,onAuthFail:j,inset:L=0}){const[y,r]=V.useState([]),[l,g]=V.useState("new"),[_,u]=V.useState(null),[p,S]=V.useState(""),[C,b]=V.useState(""),[c,m]=V.useState(!1),[f,v]=V.useState(null),[N,T]=V.useState(o1()),[E,A]=V.useState(!1),D=V.useRef(null);if(V.useEffect(()=>{o&&(S(""),b(""),m(!1),v(null),A(!1),g("new"),u("new"),vl().then(U=>{const I=Array.isArray(U)?U:[];r(I),I.some(G=>!w.includes(G.name))&&(g("existing"),u(null))}).catch(U=>{U instanceof Rr?j==null||j():b(B("bind.checkFailed"))}))},[o]),V.useEffect(()=>{_==="new"&&setTimeout(()=>{var U;return(U=D.current)==null?void 0:U.focus()},0)},[_]),!o)return null;const R=y.filter(U=>!w.includes(U.name)),M=async()=>{if(c||!_)return;if(_!=="new"){d(_);return}const U=p.trim();if(U){if(w.includes(U)||y.some(I=>I.name===U)){b(B("bind.alreadyExists"));return}if(!fO.test(U)){b(B("bind.invalidName"));return}m(!0),b(""),l1(N);try{await HA(U,f||void 0,N||void 0),d(U)}catch(I){I instanceof Rr?j==null||j():b(B("bind.createFailed")),m(!1)}}},H=B(_==="new"?c?"bind.creating":"bind.createAndOpen":c?"bind.checking":"bind.bind");return h.jsxDEV(h.Fragment,{children:[h.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),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${L/2}px))`},role:"dialog","aria-label":B("bind.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("bind.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:89,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":B("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),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"opt",children:h.jsxDEV("div",{className:"bind-mode",role:"tablist","aria-label":B("bind.pickSession"),children:[h.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":l==="new",onClick:()=>{g("new"),u("new"),b("")},children:B("bind.modeNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:97,columnNumber:15},this),h.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":l==="existing",disabled:!R.length,onClick:()=>{g("existing"),u(null),b("")},children:B("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),l==="existing"&&h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("bind.pickSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:113,columnNumber:15},this),h.jsxDEV("div",{className:"orphan-targets",children:R.map(U=>h.jsxDEV("button",{className:"fontbtn","aria-pressed":_===U.name,onClick:()=>{u(U.name),b("")},children:U.name},U.id||U.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),l==="new"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("bind.sessionName")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:131,columnNumber:17},this),h.jsxDEV("input",{ref:D,className:"bind-input",value:p,placeholder:B("bind.invalidName"),onChange:U=>{S(U.target.value),b("")},onKeyDown:U=>{U.key==="Enter"&&M()}},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),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("bind.startDir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:142,columnNumber:17},this),h.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>A(!0),children:[h.jsxDEV("span",{className:"cwd-path",children:f||B("bind.homeDirDefault")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:144,columnNumber:19},this),h.jsxDEV("span",{className:"cwd-action",children:B("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),f&&h.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>v(null),children:B("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),h.jsxDEV("div",{className:"opt",children:h.jsxDEV(rN,{value:N,onChange:T},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&&h.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),h.jsxDEV("div",{className:"settings-hint",children:B("bind.desktopHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:157,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:s,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:159,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:M,disabled:c||!_,children:H},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:158,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:83,columnNumber:7},this),h.jsxDEV(du,{open:E,seedCwd:f,allowMkdir:!0,onPick:U=>{v(U),A(!1)},onClose:()=>A(!1),inset:L},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 pO=/^[A-Za-z0-9-]{1,16}$/;function vO({open:o,onClose:s,onCreate:d,paneId:w,inset:j=0}){const[L,y]=V.useState(""),[r,l]=V.useState(""),[g,_]=V.useState(!1),[u,p]=V.useState(null),[S,C]=V.useState(""),[b,c]=V.useState(o1()),[m,f]=V.useState(!1),v=V.useRef(null);if(V.useEffect(()=>{o&&(y(""),l(""),_(!1),p(null),C(""),f(!1),setTimeout(()=>{var T;return(T=v.current)==null?void 0:T.focus()},0),w&&ao(w).then(({cwd:T})=>C(T||"")).catch(()=>{}))},[o,w]),!o)return null;const N=async()=>{if(g)return;const T=L.trim();if(T&&!pO.test(T)){l(B("newwindow.name_rule"));return}_(!0),l(""),l1(b);try{await d(T,u||void 0,b||void 0)}catch{_(!1)}};return h.jsxDEV(h.Fragment,{children:[h.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),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${j/2}px))`},role:"dialog","aria-label":B("newwindow.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("newwindow.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:56,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":B("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),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("newwindow.window_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:61,columnNumber:13},this),h.jsxDEV("input",{ref:v,className:"bind-input",value:L,placeholder:B("newwindow.name_placeholder"),onChange:T=>{y(T.target.value),l("")},onKeyDown:T=>{T.key==="Enter"&&N()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:62,columnNumber:13},this),r&&h.jsxDEV("div",{className:"bind-error",children:r},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),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("newwindow.start_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:73,columnNumber:13},this),h.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>f(!0),children:[h.jsxDEV("span",{className:"cwd-path",children:u||(S?B("newwindow.session_dir_named",{dir:S}):B("newwindow.session_dir_default"))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:75,columnNumber:15},this),h.jsxDEV("span",{className:"cwd-action",children:B("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),u&&h.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>p(null),children:B("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),h.jsxDEV("div",{className:"opt",children:h.jsxDEV(rN,{value:b,onChange:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:81,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:80,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:s,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:84,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:N,disabled:g,children:B(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),h.jsxDEV(du,{open:m,seedCwd:u||S||null,pane:w,allowMkdir:!0,onPick:T=>{p(T),f(!1)},onClose:()=>f(!1),inset:j},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 gO=/^[A-Za-z0-9-]{1,16}$/;function _O({open:o,title:s,currentName:d="",onClose:w,onSubmit:j,inset:L=0}){const[y,r]=V.useState(d),[l,g]=V.useState(""),[_,u]=V.useState(!1),p=V.useRef(null);if(V.useEffect(()=>{o&&(r(d),g(""),u(!1),setTimeout(()=>{var C;return(C=p.current)==null?void 0:C.focus()},0))},[o,d]),!o)return null;const S=async()=>{if(_)return;const C=y.trim();if(!gO.test(C)){g(B("rename.name_rule"));return}u(!0),g("");try{await j(C)}catch(b){g((b==null?void 0:b.message)||B("rename.failed")),u(!1)}};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:36,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${L/2}px))`},role:"dialog","aria-label":s,"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.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),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("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),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("rename.new_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:47,columnNumber:11},this),h.jsxDEV("input",{ref:p,className:"bind-input",value:y,placeholder:B("rename.name_rule"),onChange:C=>{r(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),l&&h.jsxDEV("div",{className:"bind-error",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:56,columnNumber:21},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:w,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:58,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:S,disabled:_,children:B(_?"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 bO({onOpenDoc:o,refreshKey:s=0}){const[d,w]=V.useState(()=>eu()),j=y=>{gA(y),w(eu())},L=V.useRef(!0);return V.useEffect(()=>{if(L.current){L.current=!1;return}w(eu())},[s]),d.length===0?h.jsxDEV("div",{className:"home-view",children:h.jsxDEV("div",{className:"home-empty",children:[B("home.empty"),h.jsxDEV("span",{children:B("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):h.jsxDEV("div",{className:"home-view",children:d.map(y=>h.jsxDEV("div",{className:"home-recent-row",children:[h.jsxDEV("button",{className:"home-recent",onClick:()=>o(y.path),title:y.path,children:[h.jsxDEV("span",{className:"home-name",children:y.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:32,columnNumber:13},this),h.jsxDEV("span",{className:"home-path",children:y.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),h.jsxDEV("button",{className:"home-x","aria-label":B("home.remove"),onClick:()=>j(y.path),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:35,columnNumber:11},this)]},y.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)}function Xg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ho=Xg();function sN(o){ho=o}const aN=/[&<>"']/,yO=new RegExp(aN.source,"g"),oN=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,wO=new RegExp(oN.source,"g"),xO={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pS=o=>xO[o];function jr(o,s){if(s){if(aN.test(o))return o.replace(yO,pS)}else if(oN.test(o))return o.replace(wO,pS);return o}const SO=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function NO(o){return o.replace(SO,(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 CO=/(^|[^\[])\^/g;function Pn(o,s){let d=typeof o=="string"?o:o.source;s=s||"";const w={replace:(j,L)=>{let y=typeof L=="string"?L:L.source;return y=y.replace(CO,"$1"),d=d.replace(j,y),w},getRegex:()=>new RegExp(d,s)};return w}function vS(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}const iu={exec:()=>null};function gS(o,s){const d=o.replace(/\|/g,(L,y,r)=>{let l=!1,g=y;for(;--g>=0&&r[g]==="\\";)l=!l;return l?"|":" |"}),w=d.split(/ \|/);let j=0;if(w[0].trim()||w.shift(),w.length>0&&!w[w.length-1].trim()&&w.pop(),s)if(w.length>s)w.splice(s);else for(;w.length<s;)w.push("");for(;j<w.length;j++)w[j]=w[j].trim().replace(/\\\|/g,"|");return w}function bh(o,s,d){const w=o.length;if(w===0)return"";let j=0;for(;j<w&&o.charAt(w-j-1)===s;)j++;return o.slice(0,w-j)}function EO(o,s){if(o.indexOf(s[1])===-1)return-1;let d=0;for(let w=0;w<o.length;w++)if(o[w]==="\\")w++;else if(o[w]===s[0])d++;else if(o[w]===s[1]&&(d--,d<0))return w;return-1}function _S(o,s,d,w){const j=s.href,L=s.title?jr(s.title):null,y=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){w.state.inLink=!0;const r={type:"link",raw:d,href:j,title:L,text:y,tokens:w.inlineTokens(y)};return w.state.inLink=!1,r}return{type:"image",raw:d,href:j,title:L,text:jr(y)}}function DO(o,s){const d=o.match(/^(\s+)(?:```)/);if(d===null)return s;const w=d[1];return s.split(`
283
+ `).map(j=>{const L=j.match(/^\s+/);if(L===null)return j;const[y]=L;return y.length>=w.length?j.slice(w.length):j}).join(`
284
+ `)}class Bh{constructor(s){Wn(this,"options");Wn(this,"rules");Wn(this,"lexer");this.options=s||ho}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 w=d[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:d[0],codeBlockStyle:"indented",text:this.options.pedantic?w:bh(w,`
285
+ `)}}}fences(s){const d=this.rules.block.fences.exec(s);if(d){const w=d[0],j=DO(w,d[3]||"");return{type:"code",raw:w,lang:d[2]?d[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):d[2],text:j}}}heading(s){const d=this.rules.block.heading.exec(s);if(d){let w=d[2].trim();if(/#$/.test(w)){const j=bh(w,"#");(this.options.pedantic||!j||/ $/.test(j))&&(w=j.trim())}return{type:"heading",raw:d[0],depth:d[1].length,text:w,tokens:this.lexer.inline(w)}}}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 w=d[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
286
+ $1`);w=bh(w.replace(/^ *>[ \t]?/gm,""),`
287
+ `);const j=this.lexer.state.top;this.lexer.state.top=!0;const L=this.lexer.blockTokens(w);return this.lexer.state.top=j,{type:"blockquote",raw:d[0],tokens:L,text:w}}}list(s){let d=this.rules.block.list.exec(s);if(d){let w=d[1].trim();const j=w.length>1,L={type:"list",raw:"",ordered:j,start:j?+w.slice(0,-1):"",loose:!1,items:[]};w=j?`\\d{1,9}\\${w.slice(-1)}`:`\\${w}`,this.options.pedantic&&(w=j?w:"[*+-]");const y=new RegExp(`^( {0,3}${w})((?:[ ][^\\n]*)?(?:\\n|$))`);let r="",l="",g=!1;for(;s;){let _=!1;if(!(d=y.exec(s))||this.rules.block.hr.test(s))break;r=d[0],s=s.substring(r.length);let u=d[2].split(`
288
+ `,1)[0].replace(/^\t+/,m=>" ".repeat(3*m.length)),p=s.split(`
289
+ `,1)[0],S=0;this.options.pedantic?(S=2,l=u.trimStart()):(S=d[2].search(/[^ ]/),S=S>4?1:S,l=u.slice(S),S+=d[1].length);let C=!1;if(!u&&/^ *$/.test(p)&&(r+=p+`
290
+ `,s=s.substring(p.length+1),_=!0),!_){const m=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,S-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),v=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:\`\`\`|~~~)`),N=new RegExp(`^ {0,${Math.min(3,S-1)}}#`);for(;s;){const T=s.split(`
291
+ `,1)[0];if(p=T,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),v.test(p)||N.test(p)||m.test(p)||f.test(s))break;if(p.search(/[^ ]/)>=S||!p.trim())l+=`
292
+ `+p.slice(S);else{if(C||u.search(/[^ ]/)>=4||v.test(u)||N.test(u)||f.test(u))break;l+=`
293
+ `+p}!C&&!p.trim()&&(C=!0),r+=T+`
294
+ `,s=s.substring(T.length+1),u=p.slice(S)}}L.loose||(g?L.loose=!0:/\n *\n *$/.test(r)&&(g=!0));let b=null,c;this.options.gfm&&(b=/^\[[ xX]\] /.exec(l),b&&(c=b[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),L.items.push({type:"list_item",raw:r,task:!!b,checked:c,loose:!1,text:l,tokens:[]}),L.raw+=r}L.items[L.items.length-1].raw=r.trimEnd(),L.items[L.items.length-1].text=l.trimEnd(),L.raw=L.raw.trimEnd();for(let _=0;_<L.items.length;_++)if(this.lexer.state.top=!1,L.items[_].tokens=this.lexer.blockTokens(L.items[_].text,[]),!L.loose){const u=L.items[_].tokens.filter(S=>S.type==="space"),p=u.length>0&&u.some(S=>/\n.*\n/.test(S.raw));L.loose=p}if(L.loose)for(let _=0;_<L.items.length;_++)L.items[_].loose=!0;return L}}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 w=d[1].toLowerCase().replace(/\s+/g," "),j=d[2]?d[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",L=d[3]?d[3].substring(1,d[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):d[3];return{type:"def",tag:w,raw:d[0],href:j,title:L}}}table(s){const d=this.rules.block.table.exec(s);if(!d||!/[:|]/.test(d[2]))return;const w=gS(d[1]),j=d[2].replace(/^\||\| *$/g,"").split("|"),L=d[3]&&d[3].trim()?d[3].replace(/\n[ \t]*$/,"").split(`
295
+ `):[],y={type:"table",raw:d[0],header:[],align:[],rows:[]};if(w.length===j.length){for(const r of j)/^ *-+: *$/.test(r)?y.align.push("right"):/^ *:-+: *$/.test(r)?y.align.push("center"):/^ *:-+ *$/.test(r)?y.align.push("left"):y.align.push(null);for(const r of w)y.header.push({text:r,tokens:this.lexer.inline(r)});for(const r of L)y.rows.push(gS(r,y.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return y}}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 w=d[1].charAt(d[1].length-1)===`
296
+ `?d[1].slice(0,-1):d[1];return{type:"paragraph",raw:d[0],text:w,tokens:this.lexer.inline(w)}}}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:jr(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 w=d[2].trim();if(!this.options.pedantic&&/^</.test(w)){if(!/>$/.test(w))return;const y=bh(w.slice(0,-1),"\\");if((w.length-y.length)%2===0)return}else{const y=EO(d[2],"()");if(y>-1){const l=(d[0].indexOf("!")===0?5:4)+d[1].length+y;d[2]=d[2].substring(0,y),d[0]=d[0].substring(0,l).trim(),d[3]=""}}let j=d[2],L="";if(this.options.pedantic){const y=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(j);y&&(j=y[1],L=y[3])}else L=d[3]?d[3].slice(1,-1):"";return j=j.trim(),/^</.test(j)&&(this.options.pedantic&&!/>$/.test(w)?j=j.slice(1):j=j.slice(1,-1)),_S(d,{href:j&&j.replace(this.rules.inline.anyPunctuation,"$1"),title:L&&L.replace(this.rules.inline.anyPunctuation,"$1")},d[0],this.lexer)}}reflink(s,d){let w;if((w=this.rules.inline.reflink.exec(s))||(w=this.rules.inline.nolink.exec(s))){const j=(w[2]||w[1]).replace(/\s+/g," "),L=d[j.toLowerCase()];if(!L){const y=w[0].charAt(0);return{type:"text",raw:y,text:y}}return _S(w,L,w[0],this.lexer)}}emStrong(s,d,w=""){let j=this.rules.inline.emStrongLDelim.exec(s);if(!j||j[3]&&w.match(/[\p{L}\p{N}]/u))return;if(!(j[1]||j[2]||"")||!w||this.rules.inline.punctuation.exec(w)){const y=[...j[0]].length-1;let r,l,g=y,_=0;const u=j[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,d=d.slice(-1*s.length+y);(j=u.exec(d))!=null;){if(r=j[1]||j[2]||j[3]||j[4]||j[5]||j[6],!r)continue;if(l=[...r].length,j[3]||j[4]){g+=l;continue}else if((j[5]||j[6])&&y%3&&!((y+l)%3)){_+=l;continue}if(g-=l,g>0)continue;l=Math.min(l,l+g+_);const p=[...j[0]][0].length,S=s.slice(0,y+j.index+p+l);if(Math.min(y,l)%2){const b=S.slice(1,-1);return{type:"em",raw:S,text:b,tokens:this.lexer.inlineTokens(b)}}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 w=d[2].replace(/\n/g," ");const j=/[^ ]/.test(w),L=/^ /.test(w)&&/ $/.test(w);return j&&L&&(w=w.substring(1,w.length-1)),w=jr(w,!0),{type:"codespan",raw:d[0],text:w}}}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 w,j;return d[2]==="@"?(w=jr(d[1]),j="mailto:"+w):(w=jr(d[1]),j=w),{type:"link",raw:d[0],text:w,href:j,tokens:[{type:"text",raw:w,text:w}]}}}url(s){var w;let d;if(d=this.rules.inline.url.exec(s)){let j,L;if(d[2]==="@")j=jr(d[0]),L="mailto:"+j;else{let y;do y=d[0],d[0]=((w=this.rules.inline._backpedal.exec(d[0]))==null?void 0:w[0])??"";while(y!==d[0]);j=jr(d[0]),d[1]==="www."?L="http://"+d[0]:L=d[0]}return{type:"link",raw:d[0],text:j,href:L,tokens:[{type:"text",raw:j,text:j}]}}}inlineText(s){const d=this.rules.inline.text.exec(s);if(d){let w;return this.lexer.state.inRawBlock?w=d[0]:w=jr(d[0]),{type:"text",raw:d[0],text:w}}}}const jO=/^(?: *(?:\n|$))+/,kO=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,RO=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,TO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,lN=/(?:[*+-]|\d{1,9}[.)])/,cN=Pn(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,lN).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(),Jg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,LO=/^[^\n]+/,Zg=/(?!\s*\])(?:\\.|[^\[\]\\])+/,AO=Pn(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Zg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),MO=Pn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,lN).getRegex(),Yh="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",Qg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,UO=Pn("^ {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",Qg).replace("tag",Yh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),uN=Pn(Jg).replace("hr",hu).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",Yh).getRegex(),OO=Pn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",uN).getRegex(),e_={blockquote:OO,code:kO,def:AO,fences:RO,heading:TO,hr:hu,html:UO,lheading:cN,list:MO,newline:jO,paragraph:uN,table:iu,text:LO},bS=Pn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hu).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",Yh).getRegex(),PO={...e_,table:bS,paragraph:Pn(Jg).replace("hr",hu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bS).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",Yh).getRegex()},BO={...e_,html:Pn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qg).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:iu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pn(Jg).replace("hr",hu).replace("heading",` *#{1,6} *[^
297
+ ]`).replace("lheading",cN).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},dN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IO=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hN=/^( {2,}|\\)\n(?!\s*$)/,VO=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fu="\\p{P}\\p{S}",FO=Pn(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,fu).getRegex(),HO=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,zO=Pn(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,fu).getRegex(),$O=Pn("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,fu).getRegex(),WO=Pn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,fu).getRegex(),GO=Pn(/\\([punct])/,"gu").replace(/punct/g,fu).getRegex(),YO=Pn(/^<(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(),qO=Pn(Qg).replace("(?:-->|$)","-->").getRegex(),KO=Pn("^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",qO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ih=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,XO=Pn(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ih).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fN=Pn(/^!?\[(label)\]\[(ref)\]/).replace("label",Ih).replace("ref",Zg).getRegex(),mN=Pn(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zg).getRegex(),JO=Pn("reflink|nolink(?!\\()","g").replace("reflink",fN).replace("nolink",mN).getRegex(),t_={_backpedal:iu,anyPunctuation:GO,autolink:YO,blockSkip:HO,br:hN,code:IO,del:iu,emStrongLDelim:zO,emStrongRDelimAst:$O,emStrongRDelimUnd:WO,escape:dN,link:XO,nolink:mN,punctuation:FO,reflink:fN,reflinkSearch:JO,tag:KO,text:VO,url:iu},ZO={...t_,link:Pn(/^!?\[(label)\]\((.*?)\)/).replace("label",Ih).getRegex(),reflink:Pn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ih).getRegex()},Mg={...t_,escape:Pn(dN).replace("])","~|])").getRegex(),url:Pn(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},QO={...Mg,br:Pn(hN).replace("{2,}","*").getRegex(),text:Pn(Mg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},yh={normal:e_,gfm:PO,pedantic:BO},Jc={normal:t_,gfm:Mg,breaks:QO,pedantic:ZO};class Cs{constructor(s){Wn(this,"tokens");Wn(this,"options");Wn(this,"state");Wn(this,"tokenizer");Wn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=s||ho,this.options.tokenizer=this.options.tokenizer||new Bh,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:yh.normal,inline:Jc.normal};this.options.pedantic?(d.block=yh.pedantic,d.inline=Jc.pedantic):this.options.gfm&&(d.block=yh.gfm,this.options.breaks?d.inline=Jc.breaks:d.inline=Jc.gfm),this.tokenizer.rules=d}static get rules(){return{block:yh,inline:Jc}}static lex(s,d){return new Cs(d).lex(s)}static lexInline(s,d){return new Cs(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 w=this.inlineQueue[d];this.inlineTokens(w.src,w.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(s,d=[]){this.options.pedantic?s=s.replace(/\t/g," ").replace(/^ +$/gm,""):s=s.replace(/^( *)(\t+)/gm,(r,l,g)=>l+" ".repeat(g.length));let w,j,L,y;for(;s;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>(w=r.call({lexer:this},s,d))?(s=s.substring(w.raw.length),d.push(w),!0):!1))){if(w=this.tokenizer.space(s)){s=s.substring(w.raw.length),w.raw.length===1&&d.length>0?d[d.length-1].raw+=`
299
+ `:d.push(w);continue}if(w=this.tokenizer.code(s)){s=s.substring(w.raw.length),j=d[d.length-1],j&&(j.type==="paragraph"||j.type==="text")?(j.raw+=`
300
+ `+w.raw,j.text+=`
301
+ `+w.text,this.inlineQueue[this.inlineQueue.length-1].src=j.text):d.push(w);continue}if(w=this.tokenizer.fences(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.heading(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.hr(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.blockquote(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.list(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.html(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.def(s)){s=s.substring(w.raw.length),j=d[d.length-1],j&&(j.type==="paragraph"||j.type==="text")?(j.raw+=`
302
+ `+w.raw,j.text+=`
303
+ `+w.raw,this.inlineQueue[this.inlineQueue.length-1].src=j.text):this.tokens.links[w.tag]||(this.tokens.links[w.tag]={href:w.href,title:w.title});continue}if(w=this.tokenizer.table(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.lheading(s)){s=s.substring(w.raw.length),d.push(w);continue}if(L=s,this.options.extensions&&this.options.extensions.startBlock){let r=1/0;const l=s.slice(1);let g;this.options.extensions.startBlock.forEach(_=>{g=_.call({lexer:this},l),typeof g=="number"&&g>=0&&(r=Math.min(r,g))}),r<1/0&&r>=0&&(L=s.substring(0,r+1))}if(this.state.top&&(w=this.tokenizer.paragraph(L))){j=d[d.length-1],y&&j.type==="paragraph"?(j.raw+=`
304
+ `+w.raw,j.text+=`
305
+ `+w.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=j.text):d.push(w),y=L.length!==s.length,s=s.substring(w.raw.length);continue}if(w=this.tokenizer.text(s)){s=s.substring(w.raw.length),j=d[d.length-1],j&&j.type==="text"?(j.raw+=`
306
+ `+w.raw,j.text+=`
307
+ `+w.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=j.text):d.push(w);continue}if(s){const r="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(r);break}else throw new Error(r)}}return this.state.top=!0,d}inline(s,d=[]){return this.inlineQueue.push({src:s,tokens:d}),d}inlineTokens(s,d=[]){let w,j,L,y=s,r,l,g;if(this.tokens.links){const _=Object.keys(this.tokens.links);if(_.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(y))!=null;)_.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(y=y.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.blockSkip.exec(y))!=null;)y=y.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(y))!=null;)y=y.slice(0,r.index)+"++"+y.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;s;)if(l||(g=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(_=>(w=_.call({lexer:this},s,d))?(s=s.substring(w.raw.length),d.push(w),!0):!1))){if(w=this.tokenizer.escape(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.tag(s)){s=s.substring(w.raw.length),j=d[d.length-1],j&&w.type==="text"&&j.type==="text"?(j.raw+=w.raw,j.text+=w.text):d.push(w);continue}if(w=this.tokenizer.link(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(w.raw.length),j=d[d.length-1],j&&w.type==="text"&&j.type==="text"?(j.raw+=w.raw,j.text+=w.text):d.push(w);continue}if(w=this.tokenizer.emStrong(s,y,g)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.codespan(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.br(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.del(s)){s=s.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.autolink(s)){s=s.substring(w.raw.length),d.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(s))){s=s.substring(w.raw.length),d.push(w);continue}if(L=s,this.options.extensions&&this.options.extensions.startInline){let _=1/0;const u=s.slice(1);let p;this.options.extensions.startInline.forEach(S=>{p=S.call({lexer:this},u),typeof p=="number"&&p>=0&&(_=Math.min(_,p))}),_<1/0&&_>=0&&(L=s.substring(0,_+1))}if(w=this.tokenizer.inlineText(L)){s=s.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(g=w.raw.slice(-1)),l=!0,j=d[d.length-1],j&&j.type==="text"?(j.raw+=w.raw,j.text+=w.text):d.push(w);continue}if(s){const _="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return d}}class Vh{constructor(s){Wn(this,"options");this.options=s||ho}code(s,d,w){var L;const j=(L=(d||"").match(/^\S*/))==null?void 0:L[0];return s=s.replace(/\n$/,"")+`
308
+ `,j?'<pre><code class="language-'+jr(j)+'">'+(w?s:jr(s,!0))+`</code></pre>
309
+ `:"<pre><code>"+(w?s:jr(s,!0))+`</code></pre>
310
+ `}blockquote(s){return`<blockquote>
311
+ ${s}</blockquote>
312
+ `}html(s,d){return s}heading(s,d,w){return`<h${d}>${s}</h${d}>
313
+ `}hr(){return`<hr>
314
+ `}list(s,d,w){const j=d?"ol":"ul",L=d&&w!==1?' start="'+w+'"':"";return"<"+j+L+`>
315
+ `+s+"</"+j+`>
316
+ `}listitem(s,d,w){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 w=d.header?"th":"td";return(d.align?`<${w} align="${d.align}">`:`<${w}>`)+s+`</${w}>
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,w){const j=vS(s);if(j===null)return w;s=j;let L='<a href="'+s+'"';return d&&(L+=' title="'+d+'"'),L+=">"+w+"</a>",L}image(s,d,w){const j=vS(s);if(j===null)return w;s=j;let L=`<img src="${s}" alt="${w}"`;return d&&(L+=` title="${d}"`),L+=">",L}text(s){return s}}class n_{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,w){return""+w}image(s,d,w){return""+w}br(){return""}}class Es{constructor(s){Wn(this,"options");Wn(this,"renderer");Wn(this,"textRenderer");this.options=s||ho,this.options.renderer=this.options.renderer||new Vh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new n_}static parse(s,d){return new Es(d).parse(s)}static parseInline(s,d){return new Es(d).parseInline(s)}parse(s,d=!0){let w="";for(let j=0;j<s.length;j++){const L=s[j];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[L.type]){const y=L,r=this.options.extensions.renderers[y.type].call({parser:this},y);if(r!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(y.type)){w+=r||"";continue}}switch(L.type){case"space":continue;case"hr":{w+=this.renderer.hr();continue}case"heading":{const y=L;w+=this.renderer.heading(this.parseInline(y.tokens),y.depth,NO(this.parseInline(y.tokens,this.textRenderer)));continue}case"code":{const y=L;w+=this.renderer.code(y.text,y.lang,!!y.escaped);continue}case"table":{const y=L;let r="",l="";for(let _=0;_<y.header.length;_++)l+=this.renderer.tablecell(this.parseInline(y.header[_].tokens),{header:!0,align:y.align[_]});r+=this.renderer.tablerow(l);let g="";for(let _=0;_<y.rows.length;_++){const u=y.rows[_];l="";for(let p=0;p<u.length;p++)l+=this.renderer.tablecell(this.parseInline(u[p].tokens),{header:!1,align:y.align[p]});g+=this.renderer.tablerow(l)}w+=this.renderer.table(r,g);continue}case"blockquote":{const y=L,r=this.parse(y.tokens);w+=this.renderer.blockquote(r);continue}case"list":{const y=L,r=y.ordered,l=y.start,g=y.loose;let _="";for(let u=0;u<y.items.length;u++){const p=y.items[u],S=p.checked,C=p.task;let b="";if(p.task){const c=this.renderer.checkbox(!!S);g?p.tokens.length>0&&p.tokens[0].type==="paragraph"?(p.tokens[0].text=c+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&p.tokens[0].tokens[0].type==="text"&&(p.tokens[0].tokens[0].text=c+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:c+" "}):b+=c+" "}b+=this.parse(p.tokens,g),_+=this.renderer.listitem(b,C,!!S)}w+=this.renderer.list(_,r,l);continue}case"html":{const y=L;w+=this.renderer.html(y.text,y.block);continue}case"paragraph":{const y=L;w+=this.renderer.paragraph(this.parseInline(y.tokens));continue}case"text":{let y=L,r=y.tokens?this.parseInline(y.tokens):y.text;for(;j+1<s.length&&s[j+1].type==="text";)y=s[++j],r+=`
326
+ `+(y.tokens?this.parseInline(y.tokens):y.text);w+=d?this.renderer.paragraph(r):r;continue}default:{const y='Token with "'+L.type+'" type was not found.';if(this.options.silent)return console.error(y),"";throw new Error(y)}}}return w}parseInline(s,d){d=d||this.renderer;let w="";for(let j=0;j<s.length;j++){const L=s[j];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[L.type]){const y=this.options.extensions.renderers[L.type].call({parser:this},L);if(y!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(L.type)){w+=y||"";continue}}switch(L.type){case"escape":{const y=L;w+=d.text(y.text);break}case"html":{const y=L;w+=d.html(y.text);break}case"link":{const y=L;w+=d.link(y.href,y.title,this.parseInline(y.tokens,d));break}case"image":{const y=L;w+=d.image(y.href,y.title,y.text);break}case"strong":{const y=L;w+=d.strong(this.parseInline(y.tokens,d));break}case"em":{const y=L;w+=d.em(this.parseInline(y.tokens,d));break}case"codespan":{const y=L;w+=d.codespan(y.text);break}case"br":{w+=d.br();break}case"del":{const y=L;w+=d.del(this.parseInline(y.tokens,d));break}case"text":{const y=L;w+=d.text(y.text);break}default:{const y='Token with "'+L.type+'" type was not found.';if(this.options.silent)return console.error(y),"";throw new Error(y)}}}return w}}class ru{constructor(s){Wn(this,"options");this.options=s||ho}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}}Wn(ru,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var co,Ug,pN;class e2{constructor(...s){hx(this,co);Wn(this,"defaults",Xg());Wn(this,"options",this.setOptions);Wn(this,"parse",fh(this,co,Ug).call(this,Cs.lex,Es.parse));Wn(this,"parseInline",fh(this,co,Ug).call(this,Cs.lexInline,Es.parseInline));Wn(this,"Parser",Es);Wn(this,"Renderer",Vh);Wn(this,"TextRenderer",n_);Wn(this,"Lexer",Cs);Wn(this,"Tokenizer",Bh);Wn(this,"Hooks",ru);this.use(...s)}walkTokens(s,d){var j,L;let w=[];for(const y of s)switch(w=w.concat(d.call(this,y)),y.type){case"table":{const r=y;for(const l of r.header)w=w.concat(this.walkTokens(l.tokens,d));for(const l of r.rows)for(const g of l)w=w.concat(this.walkTokens(g.tokens,d));break}case"list":{const r=y;w=w.concat(this.walkTokens(r.items,d));break}default:{const r=y;(L=(j=this.defaults.extensions)==null?void 0:j.childTokens)!=null&&L[r.type]?this.defaults.extensions.childTokens[r.type].forEach(l=>{const g=r[l].flat(1/0);w=w.concat(this.walkTokens(g,d))}):r.tokens&&(w=w.concat(this.walkTokens(r.tokens,d)))}}return w}use(...s){const d=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(w=>{const j={...w};if(j.async=this.defaults.async||j.async||!1,w.extensions&&(w.extensions.forEach(L=>{if(!L.name)throw new Error("extension name required");if("renderer"in L){const y=d.renderers[L.name];y?d.renderers[L.name]=function(...r){let l=L.renderer.apply(this,r);return l===!1&&(l=y.apply(this,r)),l}:d.renderers[L.name]=L.renderer}if("tokenizer"in L){if(!L.level||L.level!=="block"&&L.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const y=d[L.level];y?y.unshift(L.tokenizer):d[L.level]=[L.tokenizer],L.start&&(L.level==="block"?d.startBlock?d.startBlock.push(L.start):d.startBlock=[L.start]:L.level==="inline"&&(d.startInline?d.startInline.push(L.start):d.startInline=[L.start]))}"childTokens"in L&&L.childTokens&&(d.childTokens[L.name]=L.childTokens)}),j.extensions=d),w.renderer){const L=this.defaults.renderer||new Vh(this.defaults);for(const y in w.renderer){if(!(y in L))throw new Error(`renderer '${y}' does not exist`);if(y==="options")continue;const r=y,l=w.renderer[r],g=L[r];L[r]=(..._)=>{let u=l.apply(L,_);return u===!1&&(u=g.apply(L,_)),u||""}}j.renderer=L}if(w.tokenizer){const L=this.defaults.tokenizer||new Bh(this.defaults);for(const y in w.tokenizer){if(!(y in L))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;const r=y,l=w.tokenizer[r],g=L[r];L[r]=(..._)=>{let u=l.apply(L,_);return u===!1&&(u=g.apply(L,_)),u}}j.tokenizer=L}if(w.hooks){const L=this.defaults.hooks||new ru;for(const y in w.hooks){if(!(y in L))throw new Error(`hook '${y}' does not exist`);if(y==="options")continue;const r=y,l=w.hooks[r],g=L[r];ru.passThroughHooks.has(y)?L[r]=_=>{if(this.defaults.async)return Promise.resolve(l.call(L,_)).then(p=>g.call(L,p));const u=l.call(L,_);return g.call(L,u)}:L[r]=(..._)=>{let u=l.apply(L,_);return u===!1&&(u=g.apply(L,_)),u}}j.hooks=L}if(w.walkTokens){const L=this.defaults.walkTokens,y=w.walkTokens;j.walkTokens=function(r){let l=[];return l.push(y.call(this,r)),L&&(l=l.concat(L.call(this,r))),l}}this.defaults={...this.defaults,...j}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,d){return Cs.lex(s,d??this.defaults)}parser(s,d){return Es.parse(s,d??this.defaults)}}co=new WeakSet,Ug=function(s,d){return(w,j)=>{const L={...j},y={...this.defaults,...L};this.defaults.async===!0&&L.async===!1&&(y.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),y.async=!0);const r=fh(this,co,pN).call(this,!!y.silent,!!y.async);if(typeof w>"u"||w===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof w!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(w)+", string expected"));if(y.hooks&&(y.hooks.options=y),y.async)return Promise.resolve(y.hooks?y.hooks.preprocess(w):w).then(l=>s(l,y)).then(l=>y.hooks?y.hooks.processAllTokens(l):l).then(l=>y.walkTokens?Promise.all(this.walkTokens(l,y.walkTokens)).then(()=>l):l).then(l=>d(l,y)).then(l=>y.hooks?y.hooks.postprocess(l):l).catch(r);try{y.hooks&&(w=y.hooks.preprocess(w));let l=s(w,y);y.hooks&&(l=y.hooks.processAllTokens(l)),y.walkTokens&&this.walkTokens(l,y.walkTokens);let g=d(l,y);return y.hooks&&(g=y.hooks.postprocess(g)),g}catch(l){return r(l)}}},pN=function(s,d){return w=>{if(w.message+=`
327
+ Please report this to https://github.com/markedjs/marked.`,s){const j="<p>An error occurred:</p><pre>"+jr(w.message+"",!0)+"</pre>";return d?Promise.resolve(j):j}if(d)return Promise.reject(w);throw w}};const lo=new e2;function Tn(o,s){return lo.parse(o,s)}Tn.options=Tn.setOptions=function(o){return lo.setOptions(o),Tn.defaults=lo.defaults,sN(Tn.defaults),Tn};Tn.getDefaults=Xg;Tn.defaults=ho;Tn.use=function(...o){return lo.use(...o),Tn.defaults=lo.defaults,sN(Tn.defaults),Tn};Tn.walkTokens=function(o,s){return lo.walkTokens(o,s)};Tn.parseInline=lo.parseInline;Tn.Parser=Es;Tn.parser=Es.parse;Tn.Renderer=Vh;Tn.TextRenderer=n_;Tn.Lexer=Cs;Tn.lexer=Cs.lex;Tn.Tokenizer=Bh;Tn.Hooks=ru;Tn.parse=Tn;Tn.options;Tn.setOptions;Tn.use;Tn.walkTokens;Tn.parseInline;Es.parse;Cs.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 yS(o,s){(s==null||s>o.length)&&(s=o.length);for(var d=0,w=Array(s);d<s;d++)w[d]=o[d];return w}function t2(o){if(Array.isArray(o))return o}function n2(o,s){var d=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(d!=null){var w,j,L,y,r=[],l=!0,g=!1;try{if(L=(d=d.call(o)).next,s!==0)for(;!(l=(w=L.call(d)).done)&&(r.push(w.value),r.length!==s);l=!0);}catch(_){g=!0,j=_}finally{try{if(!l&&d.return!=null&&(y=d.return(),Object(y)!==y))return}finally{if(g)throw j}}return r}}function i2(){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 r2(o,s){return t2(o)||n2(o,s)||s2(o,s)||i2()}function s2(o,s){if(o){if(typeof o=="string")return yS(o,s);var d={}.toString.call(o).slice(8,-1);return d==="Object"&&o.constructor&&(d=o.constructor.name),d==="Map"||d==="Set"?Array.from(o):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?yS(o,s):void 0}}const vN=Object.entries,wS=Object.setPrototypeOf,a2=Object.isFrozen,o2=Object.getPrototypeOf,l2=Object.getOwnPropertyDescriptor;let sr=Object.freeze,$r=Object.seal,ml=Object.create,gN=typeof Reflect<"u"&&Reflect,Og=gN.apply,Pg=gN.construct;sr||(sr=function(s){return s});$r||($r=function(s){return s});Og||(Og=function(s,d){for(var w=arguments.length,j=new Array(w>2?w-2:0),L=2;L<w;L++)j[L-2]=arguments[L];return s.apply(d,j)});Pg||(Pg=function(s){for(var d=arguments.length,w=new Array(d>1?d-1:0),j=1;j<d;j++)w[j-1]=arguments[j];return new s(...w)});const no=di(Array.prototype.forEach),c2=di(Array.prototype.lastIndexOf),xS=di(Array.prototype.pop),cl=di(Array.prototype.push),u2=di(Array.prototype.splice),rr=Array.isArray,Qc=di(String.prototype.toLowerCase),sg=di(String.prototype.toString),SS=di(String.prototype.match),ul=di(String.prototype.replace),NS=di(String.prototype.indexOf),d2=di(String.prototype.trim),h2=di(Number.prototype.toString),f2=di(Boolean.prototype.toString),CS=typeof BigInt>"u"?null:di(BigInt.prototype.toString),ES=typeof Symbol>"u"?null:di(Symbol.prototype.toString),ii=di(Object.prototype.hasOwnProperty),Zc=di(Object.prototype.toString),Bi=di(RegExp.prototype.test),dl=m2(TypeError);function di(o){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var d=arguments.length,w=new Array(d>1?d-1:0),j=1;j<d;j++)w[j-1]=arguments[j];return Og(o,s,w)}}function m2(o){return function(){for(var s=arguments.length,d=new Array(s),w=0;w<s;w++)d[w]=arguments[w];return Pg(o,d)}}function nn(o,s){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qc;if(wS&&wS(o,null),!rr(s))return o;let w=s.length;for(;w--;){let j=s[w];if(typeof j=="string"){const L=d(j);L!==j&&(a2(s)||(s[w]=L),j=L)}o[j]=!0}return o}function p2(o){for(let s=0;s<o.length;s++)ii(o,s)||(o[s]=null);return o}function Yi(o){const s=ml(null);for(const w of vN(o)){var d=r2(w,2);const j=d[0],L=d[1];ii(o,j)&&(rr(L)?s[j]=p2(L):L&&typeof L=="object"&&L.constructor===Object?s[j]=Yi(L):s[j]=L)}return s}function v2(o){switch(typeof o){case"string":return o;case"number":return h2(o);case"boolean":return f2(o);case"bigint":return CS?CS(o):"0";case"symbol":return ES?ES(o):"Symbol()";case"undefined":return Zc(o);case"function":case"object":{if(o===null)return Zc(o);const s=o,d=Ns(s,"toString");if(typeof d=="function"){const w=d(s);return typeof w=="string"?w:Zc(w)}return Zc(o)}default:return Zc(o)}}function Ns(o,s){for(;o!==null;){const w=l2(o,s);if(w){if(w.get)return di(w.get);if(typeof w.value=="function")return di(w.value)}o=o2(o)}function d(){return null}return d}function g2(o){try{return Bi(o,""),!0}catch{return!1}}const DS=sr(["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"]),ag=sr(["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"]),og=sr(["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"]),_2=sr(["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=sr(["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"]),b2=sr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),jS=sr(["#text"]),kS=sr(["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"]),cg=sr(["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"]),RS=sr(["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"]),wh=sr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y2=$r(/{{[\w\W]*|^[\w\W]*}}/g),w2=$r(/<%[\w\W]*|^[\w\W]*%>/g),x2=$r(/\${[\w\W]*/g),S2=$r(/^data-[\-\w.\u00B7-\uFFFF]+$/),N2=$r(/^aria-[\-\w]+$/),TS=$r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),C2=$r(/^(?:\w+script|data):/i),E2=$r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),D2=$r(/^html$/i),j2=$r(/^[a-z][.\w]*(-[.\w]+)+$/i),Ss={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},k2=function(){return typeof window>"u"?null:window},R2=function(s,d){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let w=null;const j="data-tt-policy-suffix";d&&d.hasAttribute(j)&&(w=d.getAttribute(j));const L="dompurify"+(w?"#"+w:"");try{return s.createPolicy(L,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+L+" could not be created."),null}},LS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _N(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k2();const s=je=>_N(je);if(s.version="3.4.8",s.removed=[],!o||!o.document||o.document.nodeType!==Ss.document||!o.Element)return s.isSupported=!1,s;let d=o.document;const w=d,j=w.currentScript;o.DocumentFragment;const L=o.HTMLTemplateElement,y=o.Node,r=o.Element,l=o.NodeFilter,g=o.NamedNodeMap;g===void 0&&(o.NamedNodeMap||o.MozNamedAttrMap),o.HTMLFormElement;const _=o.DOMParser,u=o.trustedTypes,p=r.prototype,S=Ns(p,"cloneNode"),C=Ns(p,"remove"),b=Ns(p,"nextSibling"),c=Ns(p,"childNodes"),m=Ns(p,"parentNode"),f=Ns(p,"shadowRoot"),v=Ns(p,"attributes"),N=y&&y.prototype?Ns(y.prototype,"nodeType"):null,T=y&&y.prototype?Ns(y.prototype,"nodeName"):null;if(typeof L=="function"){const je=d.createElement("template");je.content&&je.content.ownerDocument&&(d=je.content.ownerDocument)}let E,A="",D=0;const R=function(X){if(D>0)throw dl('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 E.createHTML(X)}finally{D--}},M=d,H=M.implementation,U=M.createNodeIterator,I=M.createDocumentFragment,G=M.getElementsByTagName,ne=w.importNode;let Q=LS();s.isSupported=typeof vN=="function"&&typeof m=="function"&&H&&H.createHTMLDocument!==void 0;const te=y2,ie=w2,P=x2,$=S2,J=N2,ee=C2,we=E2,Se=j2;let Z=TS,ke=null;const se=nn({},[...DS,...ag,...og,...lg,...jS]);let W=null;const _e=nn({},[...kS,...cg,...RS,...wh]);let ue=Object.seal(ml(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 Xe=Object.seal(ml(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Je=!0,rt=!0,Nt=!1,Ze=!0,qt=!1,Xt=!0,lt=!1,Qe=!1,nt=!1,ae=!1,Fe=!1,et=!1,ve=!0,Ye=!1;const Ee="user-content-";let pe=!0,me=!1,Re={},Oe=null;const bt=nn({},["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 Ct=nn({},["audio","video","img","source","image","track"]);let Pt=null;const Qt=nn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ft="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",St="http://www.w3.org/1999/xhtml";let Ln=St,An=!1,In=null;const ri=nn({},[Ft,mt,St],sg);let cn=nn({},["mi","mo","mn","ms","mtext"]),ai=nn({},["annotation-xml"]);const mn=nn({},["title","style","font","a","script"]);let Gn=null;const Ei=["application/xhtml+xml","text/html"],Zn="text/html";let rn=null,an=null;const Mn=d.createElement("form"),hi=function(X){return X instanceof RegExp||X instanceof Function},le=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(an&&an===X)return;(!X||typeof X!="object")&&(X={}),X=Yi(X),Gn=Ei.indexOf(X.PARSER_MEDIA_TYPE)===-1?Zn:X.PARSER_MEDIA_TYPE,rn=Gn==="application/xhtml+xml"?sg:Qc,ke=ii(X,"ALLOWED_TAGS")&&rr(X.ALLOWED_TAGS)?nn({},X.ALLOWED_TAGS,rn):se,W=ii(X,"ALLOWED_ATTR")&&rr(X.ALLOWED_ATTR)?nn({},X.ALLOWED_ATTR,rn):_e,In=ii(X,"ALLOWED_NAMESPACES")&&rr(X.ALLOWED_NAMESPACES)?nn({},X.ALLOWED_NAMESPACES,sg):ri,Pt=ii(X,"ADD_URI_SAFE_ATTR")&&rr(X.ADD_URI_SAFE_ATTR)?nn(Yi(Qt),X.ADD_URI_SAFE_ATTR,rn):Qt,kt=ii(X,"ADD_DATA_URI_TAGS")&&rr(X.ADD_DATA_URI_TAGS)?nn(Yi(Ct),X.ADD_DATA_URI_TAGS,rn):Ct,Oe=ii(X,"FORBID_CONTENTS")&&rr(X.FORBID_CONTENTS)?nn({},X.FORBID_CONTENTS,rn):bt,Ie=ii(X,"FORBID_TAGS")&&rr(X.FORBID_TAGS)?nn({},X.FORBID_TAGS,rn):Yi({}),Ue=ii(X,"FORBID_ATTR")&&rr(X.FORBID_ATTR)?nn({},X.FORBID_ATTR,rn):Yi({}),Re=ii(X,"USE_PROFILES")?X.USE_PROFILES&&typeof X.USE_PROFILES=="object"?Yi(X.USE_PROFILES):X.USE_PROFILES:!1,Je=X.ALLOW_ARIA_ATTR!==!1,rt=X.ALLOW_DATA_ATTR!==!1,Nt=X.ALLOW_UNKNOWN_PROTOCOLS||!1,Ze=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=X.SAFE_FOR_TEMPLATES||!1,Xt=X.SAFE_FOR_XML!==!1,lt=X.WHOLE_DOCUMENT||!1,ae=X.RETURN_DOM||!1,Fe=X.RETURN_DOM_FRAGMENT||!1,et=X.RETURN_TRUSTED_TYPE||!1,nt=X.FORCE_BODY||!1,ve=X.SANITIZE_DOM!==!1,Ye=X.SANITIZE_NAMED_PROPS||!1,pe=X.KEEP_CONTENT!==!1,me=X.IN_PLACE||!1,Z=g2(X.ALLOWED_URI_REGEXP)?X.ALLOWED_URI_REGEXP:TS,Ln=typeof X.NAMESPACE=="string"?X.NAMESPACE:St,cn=ii(X,"MATHML_TEXT_INTEGRATION_POINTS")&&X.MATHML_TEXT_INTEGRATION_POINTS&&typeof X.MATHML_TEXT_INTEGRATION_POINTS=="object"?Yi(X.MATHML_TEXT_INTEGRATION_POINTS):nn({},["mi","mo","mn","ms","mtext"]),ai=ii(X,"HTML_INTEGRATION_POINTS")&&X.HTML_INTEGRATION_POINTS&&typeof X.HTML_INTEGRATION_POINTS=="object"?Yi(X.HTML_INTEGRATION_POINTS):nn({},["annotation-xml"]);const Ne=ii(X,"CUSTOM_ELEMENT_HANDLING")&&X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING=="object"?Yi(X.CUSTOM_ELEMENT_HANDLING):ml(null);if(ue=ml(null),ii(Ne,"tagNameCheck")&&hi(Ne.tagNameCheck)&&(ue.tagNameCheck=Ne.tagNameCheck),ii(Ne,"attributeNameCheck")&&hi(Ne.attributeNameCheck)&&(ue.attributeNameCheck=Ne.attributeNameCheck),ii(Ne,"allowCustomizedBuiltInElements")&&typeof Ne.allowCustomizedBuiltInElements=="boolean"&&(ue.allowCustomizedBuiltInElements=Ne.allowCustomizedBuiltInElements),qt&&(rt=!1),Fe&&(ae=!0),Re&&(ke=nn({},jS),W=ml(null),Re.html===!0&&(nn(ke,DS),nn(W,kS)),Re.svg===!0&&(nn(ke,ag),nn(W,cg),nn(W,wh)),Re.svgFilters===!0&&(nn(ke,og),nn(W,cg),nn(W,wh)),Re.mathMl===!0&&(nn(ke,lg),nn(W,RS),nn(W,wh))),Xe.tagCheck=null,Xe.attributeCheck=null,ii(X,"ADD_TAGS")&&(typeof X.ADD_TAGS=="function"?Xe.tagCheck=X.ADD_TAGS:rr(X.ADD_TAGS)&&(ke===se&&(ke=Yi(ke)),nn(ke,X.ADD_TAGS,rn))),ii(X,"ADD_ATTR")&&(typeof X.ADD_ATTR=="function"?Xe.attributeCheck=X.ADD_ATTR:rr(X.ADD_ATTR)&&(W===_e&&(W=Yi(W)),nn(W,X.ADD_ATTR,rn))),ii(X,"ADD_URI_SAFE_ATTR")&&rr(X.ADD_URI_SAFE_ATTR)&&nn(Pt,X.ADD_URI_SAFE_ATTR,rn),ii(X,"FORBID_CONTENTS")&&rr(X.FORBID_CONTENTS)&&(Oe===bt&&(Oe=Yi(Oe)),nn(Oe,X.FORBID_CONTENTS,rn)),ii(X,"ADD_FORBID_CONTENTS")&&rr(X.ADD_FORBID_CONTENTS)&&(Oe===bt&&(Oe=Yi(Oe)),nn(Oe,X.ADD_FORBID_CONTENTS,rn)),pe&&(ke["#text"]=!0),lt&&nn(ke,["html","head","body"]),ke.table&&(nn(ke,["tbody"]),delete Ie.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw dl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const qe=E;E=X.TRUSTED_TYPES_POLICY;try{A=R("")}catch(Ut){throw E=qe,Ut}}else E===void 0&&X.TRUSTED_TYPES_POLICY!==null&&(E=R2(u,j)),E&&typeof A=="string"&&(A=R(""));(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&ke===se&&(ke=Yi(ke)),Q.uponSanitizeAttribute.length>0&&W===_e&&(W=Yi(W)),sr&&sr(X),an=X},Ve=nn({},[...ag,...og,..._2]),We=nn({},[...lg,...b2]),gt=function(X){let Ne=m(X);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:Ln,tagName:"template"});const qe=Qc(X.tagName),Ut=Qc(Ne.tagName);return In[X.namespaceURI]?X.namespaceURI===mt?Ne.namespaceURI===St?qe==="svg":Ne.namespaceURI===Ft?qe==="svg"&&(Ut==="annotation-xml"||cn[Ut]):!!Ve[qe]:X.namespaceURI===Ft?Ne.namespaceURI===St?qe==="math":Ne.namespaceURI===mt?qe==="math"&&ai[Ut]:!!We[qe]:X.namespaceURI===St?Ne.namespaceURI===mt&&!ai[Ut]||Ne.namespaceURI===Ft&&!cn[Ut]?!1:!We[qe]&&(mn[qe]||!Ve[qe]):!!(Gn==="application/xhtml+xml"&&In[X.namespaceURI]):!1},yt=function(X){cl(s.removed,{element:X});try{m(X).removeChild(X)}catch{C(X)}},pt=function(X,Ne){try{cl(s.removed,{attribute:Ne.getAttributeNode(X),from:Ne})}catch{cl(s.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(X),X==="is")if(ae||Fe)try{yt(Ne)}catch{}else try{Ne.setAttribute(X,"")}catch{}},Rt=function(X){let Ne=null,qe=null;if(nt)X="<remove></remove>"+X;else{const Et=SS(X,/^[\r\n\t ]+/);qe=Et&&Et[0]}Gn==="application/xhtml+xml"&&Ln===St&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const Ut=E?R(X):X;if(Ln===St)try{Ne=new _().parseFromString(Ut,Gn)}catch{}if(!Ne||!Ne.documentElement){Ne=H.createDocument(Ln,"template",null);try{Ne.documentElement.innerHTML=An?A:Ut}catch{}}const vt=Ne.body||Ne.documentElement;return X&&qe&&vt.insertBefore(d.createTextNode(qe),vt.childNodes[0]||null),Ln===St?G.call(Ne,lt?"html":"body")[0]:lt?Ne.documentElement:vt},wt=function(X){return U.call(X.ownerDocument||X,X,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},vn=function(X){var Ne,qe;X.normalize();const Ut=U.call(X.ownerDocument||X,X,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let vt=Ut.nextNode();for(;vt;){let Kt=vt.data;no([te,ie,P],pn=>{Kt=ul(Kt,pn," ")}),vt.data=Kt,vt=Ut.nextNode()}const Et=(Ne=(qe=X.querySelectorAll)===null||qe===void 0?void 0:qe.call(X,"template"))!==null&&Ne!==void 0?Ne:[];no(Array.from(Et),Kt=>{Yt(Kt.content)&&vn(Kt.content)})},en=function(X){const Ne=T?T(X):null;return typeof Ne!="string"||rn(Ne)!=="form"?!1:typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||X.attributes!==v(X)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function"||X.nodeType!==N(X)||X.childNodes!==c(X)},Yt=function(X){if(!N||typeof X!="object"||X===null)return!1;try{return N(X)===Ss.documentFragment}catch{return!1}},gn=function(X){if(!N||typeof X!="object"||X===null)return!1;try{return typeof N(X)=="number"}catch{return!1}};function yn(je,X,Ne){no(je,qe=>{qe.call(s,X,Ne,an)})}const oi=function(X){let Ne=null;if(yn(Q.beforeSanitizeElements,X,null),en(X))return yt(X),!0;const qe=rn(T?T(X):X.nodeName);if(yn(Q.uponSanitizeElement,X,{tagName:qe,allowedTags:ke}),Xt&&X.hasChildNodes()&&!gn(X.firstElementChild)&&Bi(/<[/\w!]/g,X.innerHTML)&&Bi(/<[/\w!]/g,X.textContent)||Xt&&X.namespaceURI===St&&qe==="style"&&gn(X.firstElementChild)||X.nodeType===Ss.progressingInstruction||Xt&&X.nodeType===Ss.comment&&Bi(/<[/\w]/g,X.data))return yt(X),!0;if(Ie[qe]||!(Xe.tagCheck instanceof Function&&Xe.tagCheck(qe))&&!ke[qe]){if(!Ie[qe]&&qn(qe)&&(ue.tagNameCheck instanceof RegExp&&Bi(ue.tagNameCheck,qe)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(qe)))return!1;if(pe&&!Oe[qe]){const vt=m(X),Et=c(X);if(Et&&vt){const Kt=Et.length;for(let pn=Kt-1;pn>=0;--pn){const on=S(Et[pn],!0);vt.insertBefore(on,b(X))}}}return yt(X),!0}return(N?N(X):X.nodeType)===Ss.element&&!gt(X)||(qe==="noscript"||qe==="noembed"||qe==="noframes")&&Bi(/<\/no(script|embed|frames)/i,X.innerHTML)?(yt(X),!0):(qt&&X.nodeType===Ss.text&&(Ne=X.textContent,no([te,ie,P],vt=>{Ne=ul(Ne,vt," ")}),X.textContent!==Ne&&(cl(s.removed,{element:X.cloneNode()}),X.textContent=Ne)),yn(Q.afterSanitizeElements,X,null),!1)},Un=function(X,Ne,qe){if(Ue[Ne]||ve&&(Ne==="id"||Ne==="name")&&(qe in d||qe in Mn))return!1;const Ut=W[Ne]||Xe.attributeCheck instanceof Function&&Xe.attributeCheck(Ne,X);if(!(rt&&!Ue[Ne]&&Bi($,Ne))){if(!(Je&&Bi(J,Ne))){if(!Ut||Ue[Ne]){if(!(qn(X)&&(ue.tagNameCheck instanceof RegExp&&Bi(ue.tagNameCheck,X)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(X))&&(ue.attributeNameCheck instanceof RegExp&&Bi(ue.attributeNameCheck,Ne)||ue.attributeNameCheck instanceof Function&&ue.attributeNameCheck(Ne,X))||Ne==="is"&&ue.allowCustomizedBuiltInElements&&(ue.tagNameCheck instanceof RegExp&&Bi(ue.tagNameCheck,qe)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(qe))))return!1}else if(!Pt[Ne]){if(!Bi(Z,ul(qe,we,""))){if(!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&X!=="script"&&NS(qe,"data:")===0&&kt[X])){if(!(Nt&&!Bi(ee,ul(qe,we,"")))){if(qe)return!1}}}}}}return!0},fi=nn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),qn=function(X){return!fi[Qc(X)]&&Bi(Se,X)},Bt=function(X){yn(Q.beforeSanitizeAttributes,X,null);const Ne=X.attributes;if(!Ne||en(X))return;const qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let Ut=Ne.length;for(;Ut--;){const vt=Ne[Ut],Et=vt.name,Kt=vt.namespaceURI,pn=vt.value,on=rn(Et),Rn=pn;let Wt=Et==="value"?Rn:d2(Rn);if(qe.attrName=on,qe.attrValue=Wt,qe.keepAttr=!0,qe.forceKeepAttr=void 0,yn(Q.uponSanitizeAttribute,X,qe),Wt=qe.attrValue,Ye&&(on==="id"||on==="name")&&NS(Wt,Ee)!==0&&(pt(Et,X),Wt=Ee+Wt),Xt&&Bi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Wt)){pt(Et,X);continue}if(on==="attributename"&&SS(Wt,"href")){pt(Et,X);continue}if(qe.forceKeepAttr)continue;if(!qe.keepAttr){pt(Et,X);continue}if(!Ze&&Bi(/\/>/i,Wt)){pt(Et,X);continue}qt&&no([te,ie,P],Kn=>{Wt=ul(Wt,Kn," ")});const Vn=rn(X.nodeName);if(!Un(Vn,on,Wt)){pt(Et,X);continue}if(E&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!Kt)switch(u.getAttributeType(Vn,on)){case"TrustedHTML":{Wt=R(Wt);break}case"TrustedScriptURL":{Wt=E.createScriptURL(Wt);break}}if(Wt!==Rn)try{Kt?X.setAttributeNS(Kt,Et,Wt):X.setAttribute(Et,Wt),en(X)?yt(X):xS(s.removed)}catch{pt(Et,X)}}yn(Q.afterSanitizeAttributes,X,null)},oe=function(X){let Ne=null;const qe=wt(X);for(yn(Q.beforeSanitizeShadowDOM,X,null);Ne=qe.nextNode();)if(yn(Q.uponSanitizeShadowNode,Ne,null),oi(Ne),Bt(Ne),Yt(Ne.content)&&oe(Ne.content),(N?N(Ne):Ne.nodeType)===Ss.element){const vt=f?f(Ne):Ne.shadowRoot;Yt(vt)&&(ze(vt),oe(vt))}yn(Q.afterSanitizeShadowDOM,X,null)},ze=function(X){const Ne=N?N(X):X.nodeType;if(Ne===Ss.element){const vt=f?f(X):X.shadowRoot;Yt(vt)&&(ze(vt),oe(vt))}const qe=c?c(X):X.childNodes;if(!qe)return;const Ut=[];no(qe,vt=>{cl(Ut,vt)});for(const vt of Ut)ze(vt);if(Ne===Ss.element){const vt=T?T(X):null;if(typeof vt=="string"&&rn(vt)==="template"){const Et=X.content;Yt(Et)&&ze(Et)}}};return s.sanitize=function(je){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne=null,qe=null,Ut=null,vt=null;if(An=!je,An&&(je="<!-->"),typeof je!="string"&&!gn(je)&&(je=v2(je),typeof je!="string"))throw dl("dirty is not a string, aborting");if(!s.isSupported)return je;if(Qe||le(X),s.removed=[],typeof je=="string"&&(me=!1),me){const pn=T?T(je):je.nodeName;if(typeof pn=="string"){const on=rn(pn);if(!ke[on]||Ie[on])throw dl("root node is forbidden and cannot be sanitized in-place")}if(en(je))throw dl("root node is clobbered and cannot be sanitized in-place");ze(je)}else if(gn(je))Ne=Rt("<!---->"),qe=Ne.ownerDocument.importNode(je,!0),qe.nodeType===Ss.element&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?Ne=qe:Ne.appendChild(qe),ze(qe);else{if(!ae&&!qt&&!lt&&je.indexOf("<")===-1)return E&&et?R(je):je;if(Ne=Rt(je),!Ne)return ae?null:et?A:""}Ne&&nt&&yt(Ne.firstChild);const Et=wt(me?je:Ne);for(;Ut=Et.nextNode();)oi(Ut),Bt(Ut),Yt(Ut.content)&&oe(Ut.content);if(me)return qt&&vn(je),je;if(ae){if(qt&&vn(Ne),Fe)for(vt=I.call(Ne.ownerDocument);Ne.firstChild;)vt.appendChild(Ne.firstChild);else vt=Ne;return(W.shadowroot||W.shadowrootmode)&&(vt=ne.call(w,vt,!0)),vt}let Kt=lt?Ne.outerHTML:Ne.innerHTML;return lt&&ke["!doctype"]&&Ne.ownerDocument&&Ne.ownerDocument.doctype&&Ne.ownerDocument.doctype.name&&Bi(D2,Ne.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+Ne.ownerDocument.doctype.name+`>
329
+ `+Kt),qt&&no([te,ie,P],pn=>{Kt=ul(Kt,pn," ")}),E&&et?R(Kt):Kt},s.setConfig=function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(je),Qe=!0},s.clearConfig=function(){an=null,Qe=!1},s.isValidAttribute=function(je,X,Ne){an||le({});const qe=rn(je),Ut=rn(X);return Un(qe,Ut,Ne)},s.addHook=function(je,X){typeof X=="function"&&cl(Q[je],X)},s.removeHook=function(je,X){if(X!==void 0){const Ne=c2(Q[je],X);return Ne===-1?void 0:u2(Q[je],Ne,1)[0]}return xS(Q[je])},s.removeHooks=function(je){Q[je]=[]},s.removeAllHooks=function(){Q=LS()},s}var T2=_N();const L2=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,A2=/[。!?…]$|[.!?]$/;function M2(o,s){for(let d=o.parentNode;d&&d!==s;d=d.parentNode){const w=d.nodeName;if(w==="PRE"||w==="SCRIPT"||w==="STYLE"||w==="CODE")return!0}return!1}function U2(o){if(!o)return[];if(o.querySelector("span.tts-sent"))return O2(o);const s=document.createTreeWalker(o,NodeFilter.SHOW_TEXT,{acceptNode:r=>r.nodeValue&&r.nodeValue.trim()&&!M2(r,o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),d=[];for(;s.nextNode();)d.push(s.currentNode);const w=[],j=[];let L=0;for(const r of d){const l=r.ownerDocument.createDocumentFragment();for(const g of r.nodeValue.matchAll(L2)){const _=g[0];if(_==="")continue;const u=r.ownerDocument.createElement("span");u.className="tts-sent",u.textContent=_,l.appendChild(u),(j[L]||(j[L]=[])).push(u),w[L]=(w[L]||"")+_,A2.test(_)&&L++}r.parentNode.replaceChild(l,r)}const y=[];return w.forEach((r,l)=>{const g=(r||"").replace(/\s+/g," ").trim();if(!g)return;const _=y.length;y.push(g);for(const u of j[l]||[])u.dataset.tts=String(_)}),y}function O2(o){const s=[];return o.querySelectorAll("span.tts-sent[data-tts]").forEach(d=>{const w=Number(d.dataset.tts);s[w]=(s[w]||"")+d.textContent}),s.map(d=>(d||"").replace(/\s+/g," ").trim())}const bN="tw_doc_rate",Dh=[1,1.25,1.5],AS=()=>{const o=Number(localStorage.getItem(bN));return Dh.includes(o)?o:1};function P2(){const o=typeof window<"u"&&window.speechSynthesis||null,[s,d]=V.useState({playing:!1,paused:!1,idx:-1}),[w,j]=V.useState(AS),L=V.useRef({sentences:[],idx:-1,playing:!1,rate:AS()});L.current.rate=w;const y=()=>((o==null?void 0:o.getVoices())||[]).find(S=>/^zh/i.test(S.lang))||null,r=S=>{const C=L.current;if(!o)return;if(S<0||S>=C.sentences.length){l();return}C.idx=S,d({playing:!0,paused:!1,idx:S});const b=new SpeechSynthesisUtterance(C.sentences[S]);b.rate=C.rate;const c=y();c?(b.voice=c,b.lang=c.lang):b.lang="zh-CN";const m=()=>{C.playing&&C.idx===S&&r(S+1)};b.onend=m,b.onerror=m,o.speak(b)},l=()=>{const S=L.current;S.playing=!1,S.idx=-1,o&&o.cancel(),d({playing:!1,paused:!1,idx:-1})},g=S=>{if(!o||!S||!S.length)return;o.cancel();const C=L.current;if(C.sentences=S,C.playing=!0,C.idx=-1,d({playing:!0,paused:!1,idx:-1}),o.getVoices().length){r(0);return}const b=()=>{o.removeEventListener("voiceschanged",b),C.playing&&C.idx===-1&&r(0)};o.addEventListener("voiceschanged",b),setTimeout(b,300)},_=()=>{o&&L.current.playing&&(o.pause(),d(S=>({...S,paused:!0})))},u=()=>{o&&L.current.playing&&(o.resume(),d(S=>({...S,paused:!1})))},p=()=>{const S=Dh[(Dh.indexOf(w)+1)%Dh.length]||1;localStorage.setItem(bN,String(S)),L.current.rate=S,j(S);const C=L.current;o&&C.playing&&C.idx>=0&&(o.cancel(),r(C.idx))};return V.useEffect(()=>()=>{L.current.playing=!1,o&&o.cancel()},[o]),{supported:!!o,playing:s.playing,paused:s.paused,idx:s.idx,rate:w,play:g,pause:_,resume:u,stop:l,cycleRate:p}}const MS=6,B2=500,US=10,I2=300,OS=(o,s)=>Math.hypot(o.x-s.x,o.y-s.y);function V2({url:o,name:s}){const[d,w]=V.useState({s:1,x:0,y:0}),[j,L]=V.useState(""),[y,r]=V.useState(!1),l=V.useRef(d);l.current=d;const g=V.useRef(null),_=V.useRef(null),u=V.useRef(null),p=V.useRef(new Map),S=V.useRef(null),C=V.useRef(null),b=V.useRef(null),c=V.useRef({moved:!1,lpFired:!1,pinched:!1}),m=V.useRef(0);if(!o)return h.jsxDEV("div",{className:"doc-image-msg",children:B("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:39,columnNumber:20},this);const f=(U,I,G)=>{const ne=_.current,Q=u.current;if(!ne||!Q)return{x:I,y:G};const te=Math.max(0,(Q.offsetWidth*U-ne.clientWidth)/2),ie=Math.max(0,(Q.offsetHeight*U-ne.clientHeight)/2);return{x:Math.min(te,Math.max(-te,I)),y:Math.min(ie,Math.max(-ie,G))}},v=(U,I,G)=>{if(U=Math.min(MS,Math.max(1,U)),U<=1){w({s:1,x:0,y:0});return}const ne=f(U,I,G);w({s:U,x:ne.x,y:ne.y})},N=U=>v(l.current.s*U,l.current.x,l.current.y),T=()=>{b.current&&(clearTimeout(b.current),b.current=null)},E=U=>{L(U),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>L(""),2500)},A=()=>{r(!1);const U=document.createElement("a");U.href=o,U.download=s||"image",document.body.appendChild(U),U.click(),U.remove(),E(B("imageviewer.saved"))},D=async()=>{var U;r(!1);try{const I=await(await fetch(o)).blob(),G=new File([I],s||"image",{type:$h(s)||I.type||"application/octet-stream"});if((U=navigator.canShare)!=null&&U.call(navigator,{files:[G]})){await navigator.share({files:[G]});return}}catch{return}E(B("imageviewer.shareUnsupported"))},R=U=>{var G,ne;(ne=(G=U.currentTarget).setPointerCapture)==null||ne.call(G,U.pointerId),p.current.set(U.pointerId,{x:U.clientX,y:U.clientY});const I=p.current.size;if(I===2){T(),c.current.pinched=!0;const[Q,te]=[...p.current.values()];S.current={dist:OS(Q,te)||1,s:l.current.s}}else I===1&&(c.current.moved=!1,c.current.lpFired=!1,c.current.pinched=!1,C.current={x:U.clientX,y:U.clientY},T(),b.current=setTimeout(()=>{b.current=null,p.current.size===1&&!c.current.moved&&(c.current.lpFired=!0,r(!0))},B2))},M=U=>{if(p.current.has(U.pointerId)){if(p.current.set(U.pointerId,{x:U.clientX,y:U.clientY}),p.current.size>=2&&S.current){const[I,G]=[...p.current.values()];v(S.current.s*(OS(I,G)/S.current.dist),l.current.x,l.current.y);return}if(C.current){const I=U.clientX-C.current.x,G=U.clientY-C.current.y;(Math.abs(I)>US||Math.abs(G)>US)&&(c.current.moved=!0,T()),l.current.s>1&&(C.current={x:U.clientX,y:U.clientY},v(l.current.s,l.current.x+I,l.current.y+G))}}},H=U=>{if(T(),p.current.delete(U.pointerId),p.current.size===1){S.current=null;const[I]=[...p.current.values()];C.current={x:I.x,y:I.y}}else if(p.current.size===0){if(!c.current.moved&&!c.current.lpFired&&!c.current.pinched){const G=U.timeStamp||0;G-m.current<I2?(m.current=0,l.current.s>1?v(1,0,0):v(2,0,0)):m.current=G}S.current=null,C.current=null,c.current={moved:!1,lpFired:!1,pinched:!1}}};return h.jsxDEV("div",{ref:_,className:"doc-image-wrap",onPointerDown:R,onPointerMove:M,onPointerUp:H,onPointerCancel:H,onContextMenu:U=>U.preventDefault(),children:[h.jsxDEV("img",{ref:u,className:"doc-image",src:o,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),h.jsxDEV("div",{className:"doc-image-zoom",onPointerDown:U=>U.stopPropagation(),children:[h.jsxDEV("button",{onClick:()=>N(1/1.5),disabled:d.s<=1,"aria-label":B("imageviewer.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:168,columnNumber:9},this),h.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),h.jsxDEV("button",{onClick:()=>N(1.5),disabled:d.s>=MS,"aria-label":B("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),j&&h.jsxDEV("div",{className:"doc-image-note",role:"status",children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:16},this),h.jsxDEV(Oh,{open:y,title:s||B("imageviewer.imageTitle"),actions:[{key:"save",label:B("imageviewer.saveImage"),onClick:A},{key:"share",label:B("imageviewer.shareImage"),onClick:D}],onClose:()=>r(!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=Qs.length-1;function F2({type:o,name:s,content:d}){const[w,j]=V.useState(()=>yA()),L=V.useRef(null),y=P2();Kg(y.playing&&!y.paused);const r=V.useMemo(()=>o==="markdown"?T2.sanitize(Tn.parse(d||"")):"",[o,d]);if(V.useEffect(()=>{y.stop()},[r]),V.useEffect(()=>{var S;const u=L.current;if(!u||(u.querySelectorAll(".tts-active").forEach(C=>C.classList.remove("tts-active")),y.idx<0))return;const p=u.querySelectorAll(`.tts-sent[data-tts="${y.idx}"]`);p.forEach(C=>C.classList.add("tts-active")),(S=p[0])==null||S.scrollIntoView({block:"center",behavior:"smooth"})},[y.idx]),o==="image")return h.jsxDEV(V2,{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(o==="html")return h.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 l=u=>{const p=Math.min(ug,Math.max(0,w+u));j(p),wA(p)};if(o==="text")return h.jsxDEV("div",{className:"doc-md-wrap",children:[h.jsxDEV("div",{className:"doc-zoom",children:h.jsxDEV("div",{className:"doc-fonts",children:[h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>l(-1),disabled:w<=0,"aria-label":B("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:65,columnNumber:13},this),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>l(1),disabled:w>=ug,"aria-label":B("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),h.jsxDEV("pre",{className:"doc-text",style:{fontSize:`${Qs[w]}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(y.playing){y.paused?y.resume():y.pause();return}const u=U2(L.current);u.length&&y.play(u)},_=y.playing&&!y.paused;return h.jsxDEV("div",{className:"doc-md-wrap",children:[h.jsxDEV("div",{className:"doc-zoom",children:[y.supported&&h.jsxDEV("div",{className:"doc-tts",children:[h.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:g,"aria-label":_?B("doc.pauseRead"):y.paused?B("doc.resumeRead"):B("doc.read"),children:_?h.jsxDEV(yM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):h.jsxDEV(bM,{},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),h.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:y.stop,disabled:!y.playing,"aria-label":B("doc.stopRead"),children:h.jsxDEV(wM,{},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),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:y.cycleRate,"aria-label":B("doc.rate"),children:[y.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),h.jsxDEV("div",{className:"doc-fonts",children:[h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>l(-1),disabled:w<=0,"aria-label":B("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:97,columnNumber:11},this),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>l(1),disabled:w>=ug,"aria-label":B("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),h.jsxDEV("div",{ref:L,className:"doc-md",style:{fontSize:`${Qs[w]}px`},dangerouslySetInnerHTML:{__html:r}},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 H2({open:o,pane:s,windowId:d,tabs:w,active:j,onActivate:L,onCloseTab:y,onMinimize:r,onOpenDoc:l,pendingShare:g,onPendingConsumed:_}){const u=w.find(Q=>Q.key===j)||w[0],[p,S]=V.useState("recent"),[C,b]=V.useState(null),[c,m]=V.useState(0),f=u.type==="home",v=V.useRef(null),N=V.useRef(C);N.current=C;const T=V.useRef(j);T.current=j;const E=V.useRef(d);E.current=d;const A=V.useRef(r);A.current=r;const D=V.useRef(L);D.current=L;const R=V.useRef(j),M=V.useRef(0),H=V.useRef([]),U=()=>{window.history.pushState({fileOverlay:!0},""),M.current+=1},I=Q=>{o&&Q!==N.current&&(H.current.push({type:"nav",prev:N.current}),U()),b(Q),wx(d,Q)},G=V.useRef(o);V.useEffect(()=>{const Q=R.current;R.current=j;const te=G.current;G.current=o,o&&te&&Q==="home"&&j!=="home"&&(H.current.push({type:"doc"}),U())},[j,o]),V.useEffect(()=>{if(!o)return;H.current=[],M.current=0,U();const Q=()=>{var ie,P;M.current=Math.max(0,M.current-1);const te=H.current.pop();if((te==null?void 0:te.type)==="doc"){(ie=D.current)==null||ie.call(D,"home");return}if((te==null?void 0:te.type)==="nav"){b(te.prev),te.prev&&wx(E.current,te.prev);return}(P=A.current)==null||P.call(A)};return window.addEventListener("popstate",Q),()=>{window.removeEventListener("popstate",Q),M.current>0&&(window.history.go(-M.current),M.current=0)}},[o]);const ne=async()=>{try{const{cwd:Q}=await ao(s);Q&&b(Q)}catch{}};return V.useEffect(()=>{g&&S("browse")},[g]),V.useEffect(()=>{o&&m(Q=>Q+1)},[o]),V.useEffect(()=>{if(!o){v.current=null;return}if(v.current===d)return;v.current=d,H.current=[],S("browse");let Q=!1;return(async()=>{const te=eA(d);let ie=null;if(te)try{await g1(te),ie=te}catch{}if(!ie&&s)try{const{cwd:P}=await ao(s);ie=P}catch{}!Q&&ie&&b(ie)})(),()=>{Q=!0}},[o,d,s]),uu.createPortal(h.jsxDEV("div",{className:`file-sheet ${o?"open":""}`,"aria-hidden":!o,children:[h.jsxDEV("div",{className:"file-tabs",children:[h.jsxDEV("div",{className:"file-tabs-scroll",children:w.map(Q=>h.jsxDEV("div",{className:`file-tab ${Q.key===j?"active":""}`,children:[h.jsxDEV("button",{className:"file-tab-label",onClick:()=>L(Q.key),children:Q.key==="home"?h.jsxDEV(h.Fragment,{children:[h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:39},this),B("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:37},this):Q.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:15},this),Q.key!=="home"&&h.jsxDEV("button",{className:"file-tab-x","aria-label":B("filemanager.closeTab"),onClick:()=>y(Q.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:149,columnNumber:17},this)]},Q.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),h.jsxDEV("button",{className:"file-min","aria-label":B("filemanager.minimize"),title:B("filemanager.minimize"),onClick:r,children:h.jsxDEV(Ea,{},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),h.jsxDEV("div",{className:"file-body",children:f?h.jsxDEV("div",{className:"home-pane",children:[h.jsxDEV("div",{className:"file-seg",role:"tablist",children:[h.jsxDEV("button",{className:`file-seg-btn ${p==="recent"?"on":""}`,role:"tab","aria-selected":p==="recent",onClick:()=>S("recent"),children:[h.jsxDEV(S1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:162,columnNumber:17},this),B("filemanager.recent")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:160,columnNumber:15},this),h.jsxDEV("button",{className:`file-seg-btn ${p==="browse"?"on":""}`,role:"tab","aria-selected":p==="browse",onClick:()=>S("browse"),children:[h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:166,columnNumber:17},this),B("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),p==="recent"?h.jsxDEV(bO,{onOpenDoc:l,refreshKey:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this):h.jsxDEV(tN,{path:C,onNavigate:I,onOpenDoc:l,onJumpToCwd:s?ne:null,refreshKey:c,pendingFile:g,onPendingConsumed:_},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):h.jsxDEV(F2,{type:u.type,name:u.name,content:u.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 z2(o){if(!o)return[];const s=[];let d=null,w=null;for(const j of o.split(`
330
+ `)){if(j.startsWith("diff --git")){const y=j.match(/ b\/(.*)$/);d={path:y?y[1]:j.slice(11),hunks:[]},s.push(d),w=null;continue}if(!d)continue;if(j.startsWith("@@")){w={header:j,lines:[]},d.hunks.push(w);continue}if(!w)continue;const L=j[0];L==="+"?w.lines.push({type:"add",text:j.slice(1)}):L==="-"?w.lines.push({type:"del",text:j.slice(1)}):L===" "&&w.lines.push({type:"ctx",text:j.slice(1)})}return s}const $2=o=>String(o||"").replace(/\/+$/,"").split("/").pop()||o;function Fh(o,s){const d=(o&&o!==" "?o:s)||"?";return d==="?"?"?":d}function W2({open:o,pane:s,windowId:d,inset:w=0,onClose:j}){const L=V.useRef(!0);V.useEffect(()=>()=>{L.current=!1},[]);const[y,r]=V.useState([]),[l,g]=V.useState(null),[_,u]=V.useState([]),p=_.length?_[_.length-1]:null,[S,C]=V.useState(!1),[b,c]=V.useState(null),m=V.useRef(d);V.useEffect(()=>{m.current=d},[d]);const[f,v]=V.useState(null),[N,T]=V.useState(null),[E,A]=V.useState(null),[D,R]=V.useState(null),[M,H]=V.useState(20),[U,I]=V.useState(!1),[G,ne]=V.useState({changes:!0,commits:!0}),[Q,te]=V.useState(!1),ie=V.useRef(null),[P,$]=V.useState(null),[J,ee]=V.useState(null),[we,Se]=V.useState(null),Z=V.useRef(_);Z.current=_;const ke=V.useRef(S);ke.current=S;const se=V.useRef(j);se.current=j;const W=V.useRef(0),_e=()=>{window.history.pushState({gitOverlay:!0},""),W.current+=1},ue=Ee=>{_e(),u(pe=>[...pe,Ee])},Ie=()=>{_e(),C(!0)};V.useEffect(()=>{if(!o)return;_e();const Ee=()=>{var pe;if(W.current=Math.max(0,W.current-1),ke.current){C(!1);return}if(Z.current.length){u(me=>me.slice(0,-1));return}(pe=se.current)==null||pe.call(se)};return window.addEventListener("popstate",Ee),()=>{window.removeEventListener("popstate",Ee),W.current>0&&(window.history.go(-W.current),W.current=0)}},[o]),V.useEffect(()=>{if(!o)return;let Ee=!1;u([]),R(null),ee(null),Se(null);const pe=Wg(d);return pe.length?(r(pe),g(me=>me&&pe.includes(me)?me:pe[0]),()=>{Ee=!0}):(r([]),g(null),(async()=>{try{if(!s)return;const{cwd:me}=await ao(s);if(!me)return;const{repos:Re=[]}=await kx(me);if(Ee||!Re.length)return;const Oe=Cx(d,Re.map(bt=>bt.path));if(Ee)return;r(Oe),g(Oe[0]??null)}catch(me){if(Ee)return;(me==null?void 0:me.message)==="outside home"?Se(B("git.outsideRoots")):ee(B("git.errReadRepo"))}})(),()=>{Ee=!0})},[o,s,d]),V.useEffect(()=>{if(!o||!s)return;let Ee=!1;return ao(s).then(({cwd:pe})=>{!Ee&&pe&&c(pe)}).catch(()=>{}),()=>{Ee=!0}},[o,s]),V.useEffect(()=>{if(!o||!l){v(null),T(null);return}let Ee=!1;return v(null),T(null),A(null),R(null),H(20),ee(null),Se(null),(async()=>{try{const[pe,me]=await Promise.all([tM(l),iM(l)]);if(Ee)return;v(pe.changes??[]),T(me.branches??[])}catch{Ee||ee(B("git.errLoad"))}})(),()=>{Ee=!0}},[o,l]),V.useEffect(()=>{if(!o||!l){A(null);return}let Ee=!1;return(async()=>{try{const{commits:pe=[]}=await nM(l,{ref:D||void 0,limit:M});Ee||A(pe)}catch{Ee||A([])}finally{Ee||I(!1)}})(),()=>{Ee=!0}},[o,l,D,M]);const Ue=!l||!p?"":p.kind==="diff"?`${l}|diff|${p.path}|${p.commit||""}|${p.staged?1:0}`:`${l}|commit|${p.hash}`;V.useEffect(()=>{if(!o||!l||!p){$(null);return}let Ee=!1;return ee(null),$(null),(async()=>{try{let pe;if(p.kind==="diff"){const{diff:me,truncated:Re}=await rM(l,{path:p.path,commit:p.commit,staged:p.staged});pe={files:z2(me),truncated:Re}}else pe=await sM(l,p.hash);Ee||$({key:Ue,payload:pe})}catch{Ee||ee(B("git.errLoad"))}})(),()=>{Ee=!0}},[o,Ue]);const Xe=V.useCallback(()=>{window.history.back()},[]),Je=Ee=>{g(Ee),u([]),R(null)},rt=async Ee=>{window.history.back(),Se(null);try{const{repos:pe=[]}=await kx(Ee);if(!L.current)return;if(!pe.length){Se(B("git.noRepoInDir"));return}const me=pe.map(kt=>kt.path),Re=m.current,Oe=Re?Cx(Re,me):me;r(kt=>{const Ct=[...kt];for(const Pt of Oe)Ct.includes(Pt)||Ct.push(Pt);return Ct});const bt=me.find(kt=>!y.includes(kt))||me[0];Je(bt)}catch(pe){if(!L.current)return;(pe==null?void 0:pe.message)==="outside home"?Se(B("git.outsideRoots")):ee(B("git.errReadDir"))}},Nt=Ee=>{const pe=RA(d,Ee);r(pe),l===Ee&&(g(pe[0]??null),u([]),R(null))},Ze=(N||[]).find(Ee=>Ee.current)||null,qt=Ee=>{const pe=Ee===(Ze==null?void 0:Ze.name)?null:Ee;pe!==D&&(R(pe),A(null),H(20))},Xt=Ee=>ne(pe=>({...pe,[Ee]:!pe[Ee]})),lt=E!=null&&E.length>=M,Qe=Ee=>{if(!lt||U)return;const pe=Ee.currentTarget;pe.scrollHeight-pe.scrollTop-pe.clientHeight<80&&(I(!0),H(me=>me+20))},nt=D||(Ze==null?void 0:Ze.name)||null,ae=!!D&&D!==(Ze==null?void 0:Ze.name),Fe=D?(N||[]).find(Ee=>Ee.name===D):Ze,et=P&&P.key===Ue?P.payload:null,ve=!!p,Ye=(p==null?void 0:p.kind)==="commit"?B("git.commitDetail"):(p==null?void 0:p.kind)==="diff"?p.path||B("git.diff"):"";return uu.createPortal(h.jsxDEV("div",{className:`file-sheet git-sheet ${o?"open":""}`,"aria-hidden":!o,style:{"--kb-inset":`${w}px`},children:[h.jsxDEV("div",{className:"file-tabs git-head",children:[ve?h.jsxDEV("div",{className:"git-drill-head",children:[h.jsxDEV("button",{className:"git-back","aria-label":B("common.back"),title:B("common.back"),onClick:Xe,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:291,columnNumber:13},this),h.jsxDEV("span",{className:"git-drill-title",children:[h.jsxDEV(E1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:47},this),h.jsxDEV("span",{className:"git-title-text",children:Ye},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):h.jsxDEV("div",{className:"git-tabs-scroll",children:[h.jsxDEV("button",{className:"git-tab-add","aria-label":B("git.bindRepo"),title:B("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),y.map(Ee=>h.jsxDEV("div",{className:`git-tab ${Ee===l?"active":""}`,children:[h.jsxDEV("button",{className:"git-tab-label",onClick:()=>Je(Ee),children:$2(Ee)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:299,columnNumber:17},this),h.jsxDEV("button",{className:"git-tab-x","aria-label":B("common.close"),title:B("common.close"),onClick:()=>Nt(Ee),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},Ee,!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),h.jsxDEV("button",{className:"file-min","aria-label":B("git.collapse"),title:B("git.collapse"),onClick:()=>j==null?void 0:j(),children:h.jsxDEV(Ea,{},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),!ve&&l&&h.jsxDEV("div",{className:"git-branch-bar",children:[h.jsxDEV("span",{className:"git-branch-bar-name",children:[h.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)," ",nt||"—",!ae&&nt&&h.jsxDEV("span",{className:"git-branch-cur-tag",children:B("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),Fe&&(Fe.ahead||Fe.behind)?h.jsxDEV("span",{className:"git-branch-bar-track",children:[Fe.ahead?h.jsxDEV("span",{className:"git-ahead",children:["↑",Fe.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,Fe.behind?h.jsxDEV("span",{className:"git-behind",children:["↓",Fe.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),h.jsxDEV("div",{className:"git-branch-dd",children:[h.jsxDEV("button",{className:`git-branch-trigger ${ae?"other":""}`,onClick:()=>te(Ee=>!Ee),"aria-haspopup":"listbox","aria-expanded":Q,title:B("git.switchViewedBranch"),children:[h.jsxDEV("span",{className:"git-branch-trigger-name",children:B("git.switchBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:328,columnNumber:15},this),h.jsxDEV("span",{className:"git-branch-caret",children:h.jsxDEV(Ea,{},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),Q&&h.jsxDEV(h.Fragment,{children:[h.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),h.jsxDEV("div",{className:"git-dd-menu",role:"listbox",children:[(N||[]).length===0&&h.jsxDEV("div",{className:"git-empty",children:B("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(N||[]).map(Ee=>{const pe=D?Ee.name===D:Ee.current;return h.jsxDEV("button",{role:"option","aria-selected":pe,className:`git-dd-item ${Ee.current?"current":""} ${pe?"viewing":""}`,onClick:()=>{qt(Ee.name),te(!1)},children:[h.jsxDEV("span",{className:"git-branch-dot",children:Ee.current?"●":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:342,columnNumber:25},this),h.jsxDEV("span",{className:"git-row-path",children:Ee.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),Ee.upstream&&h.jsxDEV("span",{className:"git-branch-up",children:[Ee.upstream,Ee.ahead?h.jsxDEV("span",{className:"git-ahead",children:[" ↑",Ee.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,Ee.behind?h.jsxDEV("span",{className:"git-behind",children:[" ↓",Ee.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)]},Ee.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),h.jsxDEV("div",{className:"git-body",children:[J&&h.jsxDEV("div",{className:"git-error",children:J},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),we&&!J&&!ve&&h.jsxDEV("div",{className:"git-notice",children:we},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!l&&!J&&!we&&h.jsxDEV("div",{className:"git-empty",children:B("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),ve&&l&&!J&&h.jsxDEV("div",{className:"git-scroll",children:et?p.kind==="diff"?h.jsxDEV(K2,{data:et},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):h.jsxDEV(q2,{data:et,onOpenFile:Ee=>ue({kind:"diff",path:Ee,commit:p.hash})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:371,columnNumber:17},this):h.jsxDEV("div",{className:"git-loading",children:B("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),!ve&&l&&!J&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV(PS,{variant:"top",title:B("git.changes"),count:f==null?void 0:f.length,expanded:G.changes,onToggle:()=>Xt("changes"),children:f==null?h.jsxDEV("div",{className:"git-loading",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):h.jsxDEV(G2,{data:{changes:f},onOpenFile:(Ee,pe)=>ue({kind:"diff",path:Ee,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),h.jsxDEV(PS,{variant:"mid",title:B("git.commits"),subtitle:ae?nt:null,expanded:G.commits,onToggle:()=>Xt("commits"),bodyRef:ie,onScroll:Qe,children:E==null?h.jsxDEV("div",{className:"git-loading",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:385,columnNumber:34},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV(Y2,{data:{commits:E},onOpen:Ee=>ue({kind:"commit",hash:Ee})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),lt&&h.jsxDEV("div",{className:"git-more",children:B(U?"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),h.jsxDEV(du,{open:S,seedCwd:b,pane:s,inset:w,hint:B("git.pickerHint"),onPick:rt,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 PS({variant:o,title:s,subtitle:d,count:w,expanded:j,onToggle:L,onScroll:y,bodyRef:r,children:l}){return h.jsxDEV("div",{className:`git-section git-section--${o} ${j?"open":""}`,children:[h.jsxDEV("button",{className:"git-section-head",onClick:L,"aria-expanded":j,children:[h.jsxDEV("span",{className:"git-section-caret",children:h.jsxDEV(Ea,{},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),h.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&&h.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),w!=null&&h.jsxDEV("span",{className:"git-section-count",children:w},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),j&&h.jsxDEV("div",{className:"git-section-body",ref:r,onScroll:y,children:l},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 G2({data:o,onOpenFile:s}){const d=(o==null?void 0:o.changes)??[];return d.length?h.jsxDEV("div",{className:"git-list",children:d.map((w,j)=>{const L=!!(w.x&&w.x!==" "&&w.x!=="?");return h.jsxDEV("button",{className:"git-row",onClick:()=>s(w.path,L),children:[h.jsxDEV("span",{className:`git-badge git-badge-${Fh(w.x,w.y).toLowerCase().replace("?","q")}`,children:Fh(w.x,w.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:437,columnNumber:13},this),h.jsxDEV("span",{className:"git-row-path",children:w.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${w.path}-${j}`,!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):h.jsxDEV("div",{className:"git-empty",children:B("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function Y2({data:o,onOpen:s}){const d=(o==null?void 0:o.commits)??[];return d.length?h.jsxDEV("div",{className:"git-list",children:d.map(w=>h.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>s(w.hash),children:[h.jsxDEV("span",{className:"git-hash",children:w.short},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:453,columnNumber:11},this),h.jsxDEV("span",{className:"git-commit-main",children:[h.jsxDEV("span",{className:"git-row-path",children:w.subject},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:455,columnNumber:13},this),h.jsxDEV("span",{className:"git-commit-meta",children:[w.author," · ",w.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)]},w.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):h.jsxDEV("div",{className:"git-empty",children:B("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function q2({data:o,onOpenFile:s}){if(!o)return null;const d=o.files??[];return h.jsxDEV("div",{className:"git-commit-detail",children:[o.message&&h.jsxDEV("pre",{className:"git-commit-msg",children:o.message},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:469,columnNumber:24},this),h.jsxDEV("div",{className:"git-list",children:d.map((w,j)=>h.jsxDEV("button",{className:"git-row",onClick:()=>s(w.path),children:[h.jsxDEV("span",{className:`git-badge git-badge-${Fh(w.x,w.y).toLowerCase().replace("?","q")}`,children:Fh(w.x,w.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:473,columnNumber:13},this),h.jsxDEV("span",{className:"git-row-path",children:w.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${w.path}-${j}`,!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 BS=Qs.length-1;function K2({data:o}){const[s,d]=V.useState(()=>SA()),w=L=>{const y=Math.min(BS,Math.max(0,s+L));d(y),NA(y)};if(!o)return null;const j=o.files??[];return j.length?h.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${Qs[s]}px`},children:[h.jsxDEV("div",{className:"git-diff-zoom",children:[h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>w(-1),disabled:s<=0,"aria-label":B("git.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:493,columnNumber:9},this),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>w(1),disabled:s>=BS,"aria-label":B("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),o.truncated&&h.jsxDEV("div",{className:"git-diff-trunc",children:B("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),j.map((L,y)=>h.jsxDEV("div",{className:"git-diff-file",children:[j.length>1&&h.jsxDEV("div",{className:"git-diff-fname",children:L.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:499,columnNumber:32},this),h.jsxDEV("div",{className:"git-diff",children:L.hunks.map((r,l)=>h.jsxDEV("div",{className:"git-diff-hunk-block",children:[h.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:r.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),r.lines.map((g,_)=>h.jsxDEV("div",{className:`git-diff-line git-diff-${g.type}`,children:[g.type==="add"?"+":g.type==="del"?"-":" ",g.text]},_,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},l,!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)]},`${L.path}-${y}`,!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):h.jsxDEV("div",{className:"git-empty",children:B("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function X2(){const o=DU();if(!o.active)return null;const s=o.phase==="sending",d=Math.round((o.pct||0)*100);return uu.createPortal(h.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":B("upload.title"),children:h.jsxDEV("div",{className:"upload-card",children:[o.label&&h.jsxDEV("div",{className:"upload-card-label",children:o.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:23},this),s?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"upload-bar",children:h.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),h.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):h.jsxDEV(h.Fragment,{children:[h.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),h.jsxDEV("div",{className:"upload-card-sub",children:B("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),h.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:NU,children:B("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 xh=8,IS=12;function J2({path:o,x:s,y:d,onOpen:w,onClose:j}){const L=o.split("/").filter(Boolean).pop()||o,y=V.useRef(null),[r,l]=V.useState(null);return V.useLayoutEffect(()=>{const g=y.current;if(!g)return;const _=g.offsetWidth,u=g.offsetHeight,p=window.innerWidth,S=window.innerHeight,C=Math.min(Math.max(s-_/2,xh),p-_-xh);let b=d+IS;b+u>S-xh&&(b=Math.max(xh,d-IS-u)),l({left:C,top:b})},[s,d,o]),h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"doclink-backdrop",onClick:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:33,columnNumber:7},this),h.jsxDEV("div",{ref:y,className:"doclink-pop",style:r?{left:r.left,top:r.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":B("doclink.title"),children:[h.jsxDEV("div",{className:"doclink-name",children:[h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:40,columnNumber:39},this),L]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:40,columnNumber:9},this),h.jsxDEV("div",{className:"doclink-path",children:o},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:41,columnNumber:9},this),h.jsxDEV("div",{className:"doclink-actions",children:[h.jsxDEV("button",{className:"doclink-cancel",onClick:j,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:43,columnNumber:11},this),h.jsxDEV("button",{className:"doclink-open",onClick:()=>w(o),children:B("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:34,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:32,columnNumber:5},this)}const Z2=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function Q2(o){const s=(o??"").trim();return s?{id:Z2(),text:s}:null}function e4(o,s,d){const w=[...o];if(s<0||s>=w.length||d<0||d>=w.length||s===d)return w;const[j]=w.splice(s,1);return w.splice(d,0,j),w}function t4({open:o,session:s,window:d,onClose:w,onSend:j,onCountChange:L}){const[y,r]=V.useState([]),[l,g]=V.useState(""),[_,u]=V.useState(null),[p,S]=V.useState(null),C=V.useRef(null),b=V.useRef({head:"",tail:""}),c=V.useRef(null),m=V.useRef(!1),f=V.useRef({active:!1}),v=P=>{Nx(s,d,P),r(P),L==null||L(P.length)},N=P=>{P&&(P.style.height="auto",P.style.height=`${P.scrollHeight+2}px`)};V.useEffect(()=>{if(!o)return;const P=v1(s,d);r(P),L==null||L(P.length),g(""),u(null)},[o,s,d]);const E=Z1({onText:P=>{if(m.current){m.current=!1;return}const{head:$,tail:J}=b.current;g($+P+J),c.current=$.length+P.length}}),A=eN(),D=E.state==="recording"||E.state==="finalizing";Kg(D),V.useEffect(()=>{if(E.state!=="recording"&&E.state!=="finalizing"||m.current)return;const{head:P,tail:$}=b.current;g(P+E.partial+$),c.current=P.length+E.partial.length},[E.partial,E.state]),V.useLayoutEffect(()=>{const P=C.current;if(!P||(N(P),c.current==null))return;const $=c.current;if(c.current=null,document.activeElement===P)try{P.setSelectionRange($,$)}catch{}},[l]);const R=()=>{if(D){E.stop();return}const P=C.current,$=P?P.selectionStart:l.length;b.current={head:l.slice(0,$),tail:l.slice($)},E.start()},M=()=>{D&&(m.current=!0,E.stop())},H=()=>{M();const P=l.trim();if(P){if(_)v(y.map($=>$.id===_?{...$,text:P}:$));else{const $=Q2(P);$&&v([...y,$])}g(""),u(null)}},U=P=>{u(P.id),g(P.text),requestAnimationFrame(()=>{var $;return($=C.current)==null?void 0:$.focus()})},I=()=>{u(null),g("")},G=P=>{v(y.filter($=>$.id!==P)),P===_&&I()},ne=(P,$)=>{var J,ee;P.cancelable&&P.preventDefault(),(ee=(J=P.currentTarget).setPointerCapture)==null||ee.call(J,P.pointerId),f.current={active:!0,pointerId:P.pointerId,id:$},S($)},Q=P=>{var Se;const $=f.current;if(!$.active||P.pointerId!==$.pointerId)return;const J=(Se=P.currentTarget.closest(".idea-list"))==null?void 0:Se.querySelectorAll("[data-idea]");if(!J||!J.length)return;const ee=P.clientY;let we=J.length-1;for(let Z=0;Z<J.length;Z++){const ke=J[Z].getBoundingClientRect();if(ee<ke.top+ke.height/2){we=Z;break}}r(Z=>{const ke=Z.findIndex(se=>se.id===$.id);return ke<0||ke===we?Z:e4(Z,ke,we)})},te=P=>{const $=f.current;!$.active||P.pointerId!==$.pointerId||(f.current={active:!1},S(null),r(J=>(Nx(s,d,J),J)))};if(!o)return null;const ie=_!=null;return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:7},this),h.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":B("idea.title"),children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:[B("idea.title"),d?` · ${d}`:"",y.length>0&&h.jsxDEV("span",{className:"idea-head-count",children:y.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),h.jsxDEV("button",{className:"cmd-close",onClick:w,"aria-label":B("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),h.jsxDEV("div",{className:`idea-compose${D?" recording":""}`,children:[h.jsxDEV("textarea",{ref:C,className:"idea-input",rows:1,placeholder:B(ie?"idea.editPlaceholder":"idea.addPlaceholder"),value:l,readOnly:D,onChange:P=>g(P.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:157,columnNumber:11},this),ie&&h.jsxDEV("button",{className:"idea-cancel",onClick:I,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:23},this),A&&h.jsxDEV(G1,{active:D,disabled:E.state==="requesting",onToggle:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:28},this),h.jsxDEV("button",{className:"idea-act",onClick:H,disabled:!l.trim(),"aria-label":B(ie?"common.save":"idea.add"),children:ie?h.jsxDEV(x1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:24},this):h.jsxDEV(w1,{},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),h.jsxDEV("div",{className:"idea-list",children:y.length===0?h.jsxDEV("div",{className:"cmd-empty",children:B("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this):y.map(P=>h.jsxDEV("div",{"data-idea":P.id,className:`idea-row${P.id===p?" dragging":""}${P.id===_?" editing":""}`,children:[h.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":B("idea.dragSort"),onPointerDown:$=>ne($,P.id),onPointerMove:Q,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),h.jsxDEV("span",{className:"idea-text",onClick:()=>U(P),children:P.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this),h.jsxDEV("button",{className:"idea-send",onClick:()=>j==null?void 0:j(P.text),"aria-label":B("idea.fillInput"),children:B("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:192,columnNumber:15},this),h.jsxDEV("button",{className:"idea-del",onClick:()=>G(P.id),"aria-label":B("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:193,columnNumber:15},this)]},P.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 n4({open:o,onClose:s}){return o?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:7},this),h.jsxDEV("div",{className:"changelog-panel",role:"dialog","aria-label":B("changelog.title"),children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:B("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-close",onClick:s,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:9},this),h.jsxDEV("div",{className:"changelog-list",children:mg.map(d=>{var L,y;const w=d.items[pl()]||d.items.en||d.items.zh||[],j=d.version?`v${d.version}`:((L=d.label)==null?void 0:L[pl()])||((y=d.label)==null?void 0:y.en);return h.jsxDEV("div",{className:"rel",children:[h.jsxDEV("div",{className:"rel-date",children:[j&&h.jsxDEV("span",{className:"rel-ver",children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:29},this),h.jsxDEV("span",{className:"rel-day",children:d.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:25,columnNumber:17},this),h.jsxDEV("ul",{className:"rel-items",children:w.map((r,l)=>h.jsxDEV("li",{children:r},l,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:30,columnNumber:41},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:29,columnNumber:17},this)]},d.version||d.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:24,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:16,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:9,columnNumber:5},this):null}function i4(o){let s=!1,d=!1;for(let w=o;w&&w!==document.body&&w!==document.documentElement;w=w.parentElement){const j=getComputedStyle(w);if(!d&&(j.overflowY==="auto"||j.overflowY==="scroll")&&w.scrollHeight>w.clientHeight&&(d=!0),!s&&(j.overflowX==="auto"||j.overflowX==="scroll")&&w.scrollWidth>w.clientWidth&&(s=!0),s&&d)break}return{x:s,y:d}}function r4(){V.useEffect(()=>{let o="block",s=0,d=0;const w=L=>{const y=L.touches[0];if(s=y?y.clientX:0,d=y?y.clientY:0,!(L.target instanceof Element)){o="block";return}const{x:r,y:l}=i4(L.target);o=l?"free":r?"xonly":"block"},j=L=>{if(!(o==="free"||!L.cancelable)){if(o==="xonly"){const y=L.touches[0];if(y&&Math.abs(y.clientX-s)>=Math.abs(y.clientY-d))return}L.preventDefault()}};return document.addEventListener("touchstart",w,{passive:!0,capture:!0}),document.addEventListener("touchmove",j,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",w,{capture:!0}),document.removeEventListener("touchmove",j,{capture:!0})}},[])}function s4(o,s,d=2e3){const w=V.useRef(s);w.current=s,V.useEffect(()=>{if(!o)return;let j=!1,L=null,y=!1;const r=()=>{var u;(u=window.history.state)!=null&&u.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},l=()=>{var u;y||(u=window.history.state)!=null&&u.exitGuard||(window.history.pushState({exitGuard:!0},""),y=!0)},g=()=>{var u;L&&(clearTimeout(L),L=null),j&&(j=!1,(u=w.current)==null||u.call(w,!1))};r(),l();const _=()=>{var u,p,S;if((u=window.history.state)!=null&&u.exitGuard){y=!0,g();return}(p=window.history.state)!=null&&p.exitRoot&&(y=!1,!j&&(j=!0,(S=w.current)==null||S.call(w,!0),L=setTimeout(()=>{var C;j=!1,L=null,(C=w.current)==null||C.call(w,!1),l()},d)))};return window.addEventListener("popstate",_),()=>{var u,p;window.removeEventListener("popstate",_),L&&clearTimeout(L),j&&((u=w.current)==null||u.call(w,!1)),y&&((p=window.history.state)!=null&&p.exitGuard)&&window.history.back()}},[o,d])}function VS(o){history.replaceState(history.state,"",`#${encodeURIComponent(o)}`)}const Sh=o=>{try{return decodeURIComponent(o)}catch{return o}};function FS(){const o=location.hash.replace(/^#/,""),s=o.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return s?{session:Sh(s[1]),window:Sh(s[2]),pane:Sh(s[3])}:{session:Sh(o)||null,window:null,pane:null}}const a4="tmw-share-v1",o4="/__share__/";function l4(o=typeof location<"u"?location.search:""){try{return new URLSearchParams(o).has("share")}catch{return!1}}function c4(){if(typeof location>"u"||typeof history>"u")return;const o=new URL(location.href);o.searchParams.delete("share"),history.replaceState(history.state,"",o.pathname+o.search+o.hash)}async function u4(){if(typeof caches>"u")return null;let o;try{o=await caches.open(a4)}catch{return null}const s=await o.keys();if(!s.length)return null;const d=s[s.length-1],w=await o.match(d);if(await o.delete(d),!w)return null;const j=await w.blob();let L="shared";try{L=decodeURIComponent(new URL(d.url).pathname.slice(o4.length))||"shared"}catch{}return new File([j],L,{type:j.type||w.headers.get("Content-Type")||""})}const HS="①②③④⑤⑥⑦⑧⑨",hl=(o,s)=>s&&o.some(d=>d.id===s)?s:o[0].id;function d4(){var Ar,Qn,gr,lr,Ds,Yn,Cn,ei,Xn,Fn,On,ls,ji,cs,Yr,Mr,js,Vi;const[o,s]=V.useState(!uo()),[d,w]=V.useState(!1),[j,L]=V.useState(!1),[y,r]=V.useState(!1),[l,g]=V.useState(!1),[_,u]=V.useState(!1),[p,S]=V.useState(null),[C,b]=V.useState(null),[c,m]=V.useState(null),[f,v]=V.useState(null),[N,T]=V.useState(!1),[E,A]=V.useState(!1),[D,R]=V.useState(null),[M,H]=V.useState(null),[U,I]=V.useState(null),[G,ne]=V.useState(!1),[Q,te]=V.useState(null),ie=YM(),[P,$]=V.useState(so),[J,ee]=V.useState(Rh),[we,Se]=V.useState([]),[Z,ke]=V.useState(null),[se,W]=V.useState(!0),[_e,ue]=V.useState({}),[Ie,Ue]=V.useState([]),[Xe,Je]=V.useState(null),[rt,Nt]=V.useState(!1),{status:Ze,enable:qt}=uO(),[Xt,lt]=V.useState(!1),[Qe,nt]=V.useState(0),[ae,Fe]=V.useState(!1),[et,ve]=V.useState(CA),[Ye,Ee]=V.useState(null),[pe,me]=V.useState(DA),[Re,Oe]=V.useState(_x),[bt,kt]=V.useState(QL),Ct=V.useRef(null),Pt=V.useRef(null),Qt=V.useRef(null),Ft=V.useRef(null),mt=V.useCallback(()=>s(!0),[]),St=V.useCallback(he=>XM(he,mt),[mt]),{previewDomain:Ln,dynamicEnabled:An,previewSheetOpen:In,setPreviewSheetOpen:ri,activePreview:cn,openPreviewSheet:ai,startPreview:mn,startDynamicPreview:Gn,stopPreview:Ei,renewPreview:Zn}=KM(Z,{settingsOpen:j,setSettingsOpen:L});V.useEffect(()=>{o||JA().then(Ee).catch(()=>{})},[o]);const rn=V.useCallback(()=>{JL(),L(!1),g(!1),w(!1),ke(null),W(!0),s(!0)},[]);r4();const an=FU();zr(In,()=>ri(!1)),zr(d,()=>w(!1)),zr(rt,()=>Nt(!1)),zr(y,()=>r(!1)),zr(l,()=>g(!1)),zr(_,()=>u(!1)),zr(Xt,()=>lt(!1)),zr(!!M,()=>H(null)),zr(j||ae,()=>{ae?Fe(!1):L(!1)}),zr(!!C||!!p,()=>{p?S(null):b(null)}),zr(!!c,()=>m(null)),s4(!!Z,ne);const Mn=V.useCallback(async he=>{var Be,Ke;const xe=Z==null?void 0:Z.paneId;if(xe)try{await pg(xe,[he]),(Ke=(Be=Ct.current)==null?void 0:Be.wake)==null||Ke.call(Be)}catch(tt){St(tt)}},[Z,mt]),hi=V.useCallback(async he=>{var Be,Ke;const xe=Z==null?void 0:Z.paneId;if(xe)try{await Nh(xe,he,!1),(Ke=(Be=Ct.current)==null?void 0:Be.wake)==null||Ke.call(Be)}catch(tt){St(tt)}},[Z,mt]),le=V.useCallback(async he=>{var tt,ht,At,Ht,zn;const xe=(tt=Z==null?void 0:Z.window)==null?void 0:tt.id,Be=Qt.current??((At=(ht=Ct.current)==null?void 0:ht.getSize())==null?void 0:At.cols);if(!xe||!Be)return;const Ke=Math.max(20,Math.min(500,Be+he));Qt.current=Ke,(zn=(Ht=Ct.current)==null?void 0:Ht.flash)==null||zn.call(Ht);try{Ft.current==null&&(Ft.current=await VA(xe).then(tn=>tn.layout||"").catch(()=>"")),Z.panes&&Z.panes.length>1?await IA(Z.paneId,Ke):await BA(xe,Ke)}catch(tn){St(tn)}},[Z,mt]),Ve=V.useCallback(async()=>{var Be;const he=(Be=Z==null?void 0:Z.window)==null?void 0:Be.id;if(!he)return;const xe=Ft.current;Qt.current=null,Ft.current=null;try{await FA(he,xe)}catch(Ke){St(Ke)}},[Z,mt]),We=V.useCallback(async(he,xe=null)=>{var At;const Be=await Kc(he.id);if(!Be.length)return!1;const Ke=(xe==null?void 0:xe.window)&&Be.find(Ht=>Ht.id===xe.window)||Be.find(Ht=>Ht.id===hl(Be,rA(he.id))),tt=await Na(Ke.id);if(!tt.length)return!1;const ht=xe!=null&&xe.pane&&tt.some(Ht=>Ht.id===xe.pane)?xe.pane:hl(tt,mh(Ke.id));return ke({session:he,windows:Be,window:Ke,panes:tt,paneId:ht}),ll({sessionId:he.id,windowId:Ke.id,paneId:ht}),VS(he.name),Qt.current=((At=tt.find(Ht=>Ht.id===ht))==null?void 0:At.width)??null,Ft.current=null,!0},[]),gt=V.useCallback(async he=>{var xe;try{const Be=await Na(he.id);if(!Be.length)return;const Ke=hl(Be,mh(he.id));return ke(tt=>tt&&{...tt,window:he,panes:Be,paneId:Ke}),ll({sessionId:Z.session.id,windowId:he.id,paneId:Ke}),Qt.current=((xe=Be.find(tt=>tt.id===Ke))==null?void 0:xe.width)??null,Ft.current=null,Ke}catch(Be){return St(Be),null}},[Z,mt]),yt=V.useCallback(async(he,xe,Be)=>{var ht,At,Ht,zn;const Ke=(ht=Z==null?void 0:Z.session)==null?void 0:ht.id,tt=Z==null?void 0:Z.paneId;if(!(!Ke||!tt))try{const{id:tn}=await zA(Ke,tt,he||void 0,xe,Be),z=await Kc(Ke),re=z.find(ge=>ge.id===tn)||z[z.length-1],q=await Na(re.id);if(!q.length)return;const ce=hl(q,mh(re.id));ke(ge=>ge&&{...ge,windows:z,window:re,panes:q,paneId:ce}),ll({sessionId:Ke,windowId:re.id,paneId:ce}),Qt.current=((At=q.find(ge=>ge.id===ce))==null?void 0:At.width)??null,Ft.current=null,u(!1),(zn=(Ht=Ct.current)==null?void 0:Ht.wake)==null||zn.call(Ht)}catch(tn){if(St(tn))return;throw tn}},[Z,mt]),pt=V.useCallback(async he=>{var Ke,tt;const xe=p;if(!xe)return;const Be=(Ke=Z==null?void 0:Z.session)==null?void 0:Ke.id;if(xe.kind==="session"){try{await $A(xe.id,he)}catch(ht){throw St(ht)?ht:ht.status===409?new Error(xe("app.nameExists")):new Error(xe("app.renameFailed"))}$(ZL(xe.name,he)),Xc(),VS(he),ke(ht=>ht&&ht.session.id===xe.id?{...ht,session:{...ht.session,name:he}}:ht)}else{try{await WA(xe.id,he)}catch(At){throw St(At)?At:new Error(xe("app.renameFailed"))}kA((tt=Z==null?void 0:Z.session)==null?void 0:tt.name,xe.name||xe.id,he);const ht=await Kc(Be);ke(At=>At&&{...At,windows:ht,window:ht.find(Ht=>Ht.id===At.window.id)||At.window})}S(null)},[p,Z,mt]),Rt=V.useCallback(async()=>{var ht;const he=C,xe=Z==null?void 0:Z.session;if(!he||!xe)return;const Be=xe.id,Ke=Z.windows.length<=1;try{await GA(he.id)}catch(At){if(St(At))return;window.alert(B("app.deleteFailed")),b(null);return}if(b(null),Ke){$(gx(xe.name)),Xc(),ke(null);return}const tt=await Kc(Be);if(he.id===Z.window.id&&tt.length){const At=tt.find(tn=>tn.active)||tt[0],Ht=await Na(At.id);if(!Ht.length)return;const zn=hl(Ht,mh(At.id));ke(tn=>tn&&{...tn,windows:tt,window:At,panes:Ht,paneId:zn}),ll({sessionId:Be,windowId:At.id,paneId:zn}),Qt.current=((ht=Ht.find(tn=>tn.id===zn))==null?void 0:ht.width)??null,Ft.current=null}else ke(At=>At&&{...At,windows:tt})},[C,Z,mt]),wt=V.useCallback(async he=>{var tt;const xe=C,Be=(tt=Z==null?void 0:Z.session)==null?void 0:tt.id;if(!xe||!Be)return;const Ke=Qv(Z.windows,xe.id,he);if(Ke)try{await YA(xe.id,Ke.id);const ht=await Kc(Be);ke(At=>At&&{...At,windows:ht,window:ht.find(Ht=>Ht.id===At.window.id)||At.window}),b(ht.find(At=>At.id===xe.id)||null)}catch(ht){if(St(ht)){b(null);return}window.alert(B("app.moveFailed")),b(null)}},[C,Z,mt]),vn=Wh(()=>{Z!=null&&Z.session&&S({kind:"session",id:Z.session.id,name:Z.session.name})}),en=V.useCallback(async he=>{try{const xe=(await vl()).find(Be=>Be.name===he);if(!xe){window.alert(B("app.sessionGone",{name:he}));return}await We(xe)&&w(!1)}catch(xe){St(xe)}},[We,mt]),Yt=V.useCallback(async he=>{Nt(!1),Oe(bx(he.pane,he.ts));try{const xe=(await vl()).find(Be=>Be.name===he.session);if(!xe){window.alert(B("app.sessionGone",{name:he.session}));return}w(!1),await We(xe,{window:he.window,pane:he.pane})}catch(xe){St(xe)}},[We,mt]),gn=V.useCallback(async({target:he,kill:xe,name:Be})=>{const Ke=Xe,tt=await eM({pid:Ke.pid,sessionId:Ke.sessionId,target:he,kill:xe,name:Be});tt.name&&($(vx(tt.name)),Xc()),Je(null),Nt(!1);try{tt.name&&(w(!1),await We({id:tt.session,name:tt.name},{window:tt.window,pane:tt.pane}))}catch(ht){St(ht)}try{Ue(await jx())}catch{}},[Xe,We,mt]),yn=V.useCallback(()=>{const he=Px(_e);yx(he),kt(he)},[_e]),oi=V.useCallback(he=>{$(vx(he)),Xc(),g(!1),en(he)},[en]),Un=V.useCallback(he=>{$(gx(he)),Xc(),ke(xe=>xe&&xe.session.name===he?null:xe)},[]),fi=V.useCallback(he=>{ke(xe=>xe&&(ll({windowId:xe.window.id,paneId:he}),{...xe,paneId:he}))},[]),qn=V.useCallback((he,xe)=>{ke(Be=>{if(!Be)return Be;const Ke=Be.windows.map(tt=>tt.id===he?{...tt,panes:xe.length}:tt);return Be.window.id===he?{...Be,windows:Ke,panes:xe}:{...Be,windows:Ke}})},[]),Bt=V.useCallback(async(he,xe)=>{var Ke;const Be=(Ke=Z==null?void 0:Z.window)==null?void 0:Ke.id;if(Be){m(null),b(null);try{const{panes:tt,selectPaneId:ht}=await Lx({paneId:he,dir:xe,windowId:Be,api:{splitPane:Ex},getPanes:Na});qn(Be,tt),fi(ht),Ft.current=null}catch(tt){if(St(tt))return;window.alert(B("pane.splitFailed"))}}},[Z,qn,fi,mt]),oe=V.useCallback(async()=>{var Ke;const he=c,xe=(Ke=Z==null?void 0:Z.window)==null?void 0:Ke.id,Be=Z==null?void 0:Z.paneId;if(!(!he||!xe))try{const{panes:tt,selectPaneId:ht}=await cM({paneId:he,windowId:xe,viewedPaneId:Be,api:{closePane:qA},getPanes:Na,pickId:hl});m(null),qn(xe,tt),ht&&fi(ht),Ft.current=null}catch(tt){if(m(null),St(tt))return;window.alert(B("pane.closeFailed"))}},[c,Z,qn,fi,mt]),ze=V.useCallback(async(he,xe)=>{var Ke,tt;const Be=(Ke=Z==null?void 0:Z.session)==null?void 0:Ke.id;if(!(!he||!Be)){b(null);try{const ht=await Na(he.id),At=ht.find(tn=>tn.active)||ht[0];if(!At)return;const{panes:Ht,selectPaneId:zn}=await Lx({paneId:At.id,dir:xe,windowId:he.id,api:{splitPane:Ex},getPanes:Na});ke(tn=>{if(!tn)return tn;const z=tn.windows.map(re=>re.id===he.id?{...re,panes:Ht.length}:re);return{...tn,windows:z,window:he,panes:Ht,paneId:zn}}),ll({sessionId:Be,windowId:he.id,paneId:zn}),Qt.current=((tt=Ht.find(tn=>tn.id===zn))==null?void 0:tt.width)??null,Ft.current=null}catch(ht){if(St(ht))return;window.alert(B("pane.splitFailed"))}}},[Z,mt]),je=V.useCallback(async he=>{var Be;if(!he)return;let xe=Z==null?void 0:Z.paneId;he.id!==((Be=Z==null?void 0:Z.window)==null?void 0:Be.id)?(b(null),xe=await gt(he)):await new Promise(Ke=>{const tt=()=>{clearTimeout(ht),window.removeEventListener("popstate",tt),Ke()},ht=setTimeout(tt,80);window.addEventListener("popstate",tt),b(null)}),xe&&(v(he.id),m(xe))},[Z,gt]),X=(Ar=Z==null?void 0:Z.session)==null?void 0:Ar.name,Ne=(Qn=Z==null?void 0:Z.window)==null?void 0:Qn.id;V.useEffect(()=>{Se(X&&Ne?Th(X,Ne):[])},[X,Ne]);const qe=(gr=Z==null?void 0:Z.session)==null?void 0:gr.name,Ut=((lr=Z==null?void 0:Z.window)==null?void 0:lr.name)||((Ds=Z==null?void 0:Z.window)==null?void 0:Ds.id);V.useEffect(()=>{nt(qe&&Ut?v1(qe,Ut).length:0)},[qe,Ut]),V.useEffect(()=>{Z!=null&&Z.paneId&&IM(Z.paneId)},[Z==null?void 0:Z.paneId]),V.useEffect(()=>{var Be;const he=Z==null?void 0:Z.paneId;if(!he)return;const xe=(Be=_e[he])==null?void 0:Be.ts;xe!=null&&_x()[he]!==xe&&Oe(bx(he,xe))},[Z==null?void 0:Z.paneId,_e]),V.useEffect(()=>{if(!l4())return;c4();let he=!1;return(async()=>{const xe=await u4();he||!xe||(R(xe),ie.activate("home"),T(!0))})(),()=>{he=!0}},[]),V.useEffect(()=>{if(o||typeof navigator>"u"||!("serviceWorker"in navigator))return;const he=async({session:Ke,window:tt,pane:ht})=>{if(Ke)try{const Ht=(await vl()).find(zn=>zn.name===Ke);Ht&&(w(!1),await We(Ht,{window:tt,pane:ht}))}catch(At){St(At)}},xe=Ke=>{const tt=Ke.data;tt&&tt.type==="navigate"&&he(tt)},Be=()=>{const Ke=FS();Ke.session&&(Ke.window||Ke.pane)&&he(Ke)};return navigator.serviceWorker.addEventListener("message",xe),window.addEventListener("hashchange",Be),()=>{navigator.serviceWorker.removeEventListener("message",xe),window.removeEventListener("hashchange",Be)}},[o,We,mt]);const vt=V.useCallback(he=>{var Ke,tt,ht,At;(tt=(Ke=Ct.current)==null?void 0:Ke.wake)==null||tt.call(Ke);const xe=(ht=Z==null?void 0:Z.session)==null?void 0:ht.name,Be=(At=Z==null?void 0:Z.window)==null?void 0:At.id;xe&&Be&&Se(mA(xe,Be,he))},[Z]),Et=V.useCallback(he=>{ee(Rh().includes(he)?uA(he):cA(he))},[]),Kt=V.useCallback(he=>{var Ke,tt;const xe=(Ke=Z==null?void 0:Z.session)==null?void 0:Ke.name,Be=(tt=Z==null?void 0:Z.window)==null?void 0:tt.id;xe&&Be&&Se(pA(xe,Be,he))},[Z]),pn=((Cn=(Yn=Z==null?void 0:Z.panes)==null?void 0:Yn.find(he=>he.id===Z.paneId))==null?void 0:Cn.cwd)||null,on=async he=>{if(AA(he)){const Be=he.split("/").pop()||he;if(ie.tabs.some(ht=>ht.key===he)){ie.activate(he),Wt(he),T(!0);return}const{url:Ke,mtimeMs:tt}=await Rx(he);ie.openDoc(he,{type:"image",name:Be,content:Ke,mtime:tt}),xx({path:he,name:Be,type:"image",ts:Date.now()}),T(!0);return}const xe=await Dx(he);ie.openDoc(he,{type:xe.type,name:xe.name,content:xe.content,mtime:xe.mtimeMs}),xx({path:he,name:xe.name,type:xe.type,ts:Date.now()}),T(!0)},Rn=he=>{const xe=ie.tabs.find(Be=>Be.key===he);(xe==null?void 0:xe.type)==="image"&&xe.content&&URL.revokeObjectURL(xe.content),ie.closeTab(he)},Wt=he=>{const xe=ie.tabs.find(Be=>Be.key===he);if(!(!xe||xe.type==="home")){if(xe.type==="image"){Rx(he,xe.mtime??null).then(Be=>{if(Be.notModified)return;const Ke=xe.content;ie.refreshDoc(he,{content:Be.url,mtime:Be.mtimeMs}),Ke&&URL.revokeObjectURL(Ke)}).catch(()=>{});return}Dx(he,xe.mtime??null).then(Be=>{Be.notModified||ie.refreshDoc(he,{type:Be.type,name:Be.name,content:Be.content,mtime:Be.mtimeMs})}).catch(()=>{})}},Vn=he=>{ie.activate(he),Wt(he)},Kn=()=>{T(!0),Wt(ie.active)},Di=he=>{const xe=/-> (\d+)/.exec((he==null?void 0:he.message)||""),Be=xe?Number(xe[1]):0;return B(Be===404?"app.docNotFound":Be===413?"app.docTooLarge":Be===400?"app.docUnsupported":"app.docOpenFailed")},Ii=async he=>{if(M1(he)){try{await on(he)}catch(Be){I(Di(Be))}return}const xe=Sx(Z==null?void 0:Z.paneId)??pn;if(xe)try{await on(io(xe,he));return}catch{}H({rawPath:he})},Tr=async he=>{try{await on(io(he,M.rawPath))}catch(xe){I(Di(xe));return}Z!=null&&Z.paneId&&_A(Z.paneId,he),setTimeout(()=>H(null),0)},ar=(he,xe,Be)=>te({path:he,x:xe,y:Be}),Wr=he=>{te(null),Ii(he)};if(V.useEffect(()=>{if(!U)return;const he=setTimeout(()=>I(null),4e3);return()=>clearTimeout(he)},[U]),V.useEffect(()=>{if(o)return;const he=so();if(!he.length){W(!1);return}let xe=!1;return(async()=>{try{const Be=await vl();if(xe||!Be.length)return;const Ke=Be.filter(Ht=>he.includes(Ht.name));if(!Ke.length)return;const tt=FS();let ht=tt.session?Ke.find(Ht=>Ht.name===tt.session):null;const At=ht?{window:tt.window,pane:tt.pane}:null;if(!ht){const Ht=iA();Ht&&(ht=Ke.find(zn=>zn.id===Ht))}ht||(ht=Ke[0]),xe||await We(ht,At)}catch(Be){St(Be)}finally{xe||W(!1)}})(),()=>{xe=!0}},[o,We]),Fx({fetch:()=>QA(P),apply:he=>ue(he||{}),intervalMs:5e3,enabled:!o,deps:[P]}),V.useEffect(()=>{if(bt!=null)return;const he=Px(_e);he>0&&(yx(he),kt(he))},[_e,bt]),Fx({fetch:jx,apply:he=>Ue(Array.isArray(he)?he:[]),intervalMs:15e3,enabled:!o}),o)return h.jsxDEV(YU,{onSaved:()=>{s(!1),W(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:873,columnNumber:12},this);const vr=TM(_e,Re,bt??1/0),or=AM(vr),qi={};for(const he of Object.values(_e))he.window&&he.agent&&(qi[he.window]=he.agent);const os={};for(const[he,xe]of Object.entries(_e))xe.agent&&(os[he]=xe.agent);const Lr=!!ph&&et!==ph,un=!!(Ye!=null&&Ye.updateAvailable)&&Ye.latest!==pe,Gr=Lr||un,Ki=()=>{L(!0),Ye!=null&&Ye.latest&&(jA(Ye.latest),me(Ye.latest))},Tt=()=>{L(!1),Fe(!0),EA(ph),ve(ph)};return h.jsxDEV("div",{className:"app",style:an?{transform:`translateY(-${an}px)`}:void 0,children:[h.jsxDEV("header",{className:"topbar",children:[h.jsxDEV("button",{className:"hamburger",onClick:()=>w(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:911,columnNumber:9},this),h.jsxDEV("span",{className:"session-name",...vn,children:((ei=Z==null?void 0:Z.session)==null?void 0:ei.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:912,columnNumber:9},this),cn&&h.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>ri(!0),"aria-label":B("app.preview"),title:B("app.openPreview"),children:h.jsxDEV(gg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:916,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:915,columnNumber:11},this),h.jsxDEV("button",{className:"topbar-icon",onClick:()=>lt(!0),"aria-label":B("app.ideas"),title:B("app.ideas"),disabled:!Z,children:[h.jsxDEV(vM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:921,columnNumber:11},this),Qe>0&&h.jsxDEV("span",{className:"idea-badge",children:Qe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:922,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:919,columnNumber:9},this),h.jsxDEV(rO,{rows:vr,top:or,open:rt,onToggle:()=>Nt(he=>!he),onClose:()=>Nt(!1),onSelectRow:Yt,onMarkAllRead:yn,hooksStatus:Ze,onEnableHooks:qt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:924,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:()=>r(!0),"aria-label":B("usage.title"),title:B("usage.title"),children:h.jsxDEV(SM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:935,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:935,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:Kn,"aria-label":B("app.files"),title:B("app.files"),children:h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:936,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:936,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:()=>A(!0),"aria-label":"Git",title:"Git",children:h.jsxDEV(E1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:937,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:937,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:Ki,"aria-label":B("app.settings"),title:B("app.settings"),children:[h.jsxDEV(vg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:939,columnNumber:11},this),Gr&&h.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:940,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:938,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:910,columnNumber:7},this),h.jsxDEV(iO,{open:y,onClose:()=>r(!1),onAuthFail:mt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:943,columnNumber:7},this),h.jsxDEV(QU,{open:j,onClose:()=>L(!1),termRef:Ct,getColCount:()=>{var he,xe;return Qt.current??((xe=(he=Ct.current)==null?void 0:he.getSize())==null?void 0:xe.cols)},onColAdjust:he=>le(he),onColRestore:Ve,onOpenChangelog:Tt,changelogUnread:Lr,updateInfo:Ye,activePreview:cn,pane:Z==null?void 0:Z.paneId,lastPreviewDir:tA((Xn=Z==null?void 0:Z.window)==null?void 0:Xn.id),dynamicEnabled:An,onStartPreview:mn,onStartDynamicPreview:Gn,onOpenPreview:ai,onRenew:Zn,onStop:Ei},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:948,columnNumber:7},this),h.jsxDEV(n4,{open:ae,onClose:()=>Fe(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:968,columnNumber:7},this),h.jsxDEV(JM,{open:d,currentSessionName:(Fn=Z==null?void 0:Z.session)==null?void 0:Fn.name,bound:P,onSelectSession:en,onUnbind:Un,onBind:()=>g(!0),onClose:()=>w(!1),onLogout:rn,orphans:Ie,onTakeoverRequest:Je},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:969,columnNumber:7},this),h.jsxDEV(mO,{open:l,bound:P,onBound:oi,onClose:()=>g(!1),onAuthFail:mt,inset:an},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:981,columnNumber:7},this),h.jsxDEV(vO,{open:_,onClose:()=>u(!1),onCreate:yt,paneId:Z==null?void 0:Z.paneId,inset:an},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:989,columnNumber:7},this),h.jsxDEV(_O,{open:!!p,title:(p==null?void 0:p.kind)==="session"?B("app.renameSession"):B("app.renameWindow"),currentName:(p==null?void 0:p.name)||"",onClose:()=>S(null),onSubmit:pt,inset:an},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:996,columnNumber:7},this),h.jsxDEV(sO,{open:!!Xe,orphan:Xe,onConfirm:gn,onClose:()=>Je(null),inset:an},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1004,columnNumber:7},this),h.jsxDEV(Oh,{open:!!C,title:C?C.name||C.id:"",onClose:()=>b(null),actions:C?[...C.panes===1?[{key:"split-h",icon:h.jsxDEV(Ax,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1020,columnNumber:37},this),label:B("pane.splitH"),onClick:()=>ze(C,"h")},{key:"split-v",icon:h.jsxDEV(Mx,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1021,columnNumber:37},this),label:B("pane.splitV"),onClick:()=>ze(C,"v")}]:[],...C.panes>1?[{key:"manage-split",icon:h.jsxDEV(DM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1025,columnNumber:42},this),label:B("pane.manage"),onClick:()=>je(C)}]:[],...Z&&Z.windows.length>1?[[{key:"move-left",label:B("app.moveLeft"),disabled:!Qv(Z.windows,C.id,"left"),onClick:()=>wt("left")},{key:"move-right",label:B("app.moveRight"),disabled:!Qv(Z.windows,C.id,"right"),onClick:()=>wt("right")}]]:[],{key:"rename",label:B("common.rename"),onClick:()=>{S({kind:"window",id:C.id,name:C.name||""}),b(null)}},{key:"delete",label:B("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:Z&&Z.windows.length<=1?B("app.deleteLastWindowConfirm"):B("app.deleteConfirm"),onClick:Rt}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1011,columnNumber:7},this),h.jsxDEV(Oh,{open:!!c,title:(()=>{if(!c||!Z)return"";const he=Z.panes.findIndex(Ke=>Ke.id===c),xe=Z.panes[he];return xe?`${he<HS.length?HS[he]:String(he+1)} ${xe.command||xe.id}`:""})(),onClose:()=>m(null),actions:c?[{key:"split-h",icon:h.jsxDEV(Ax,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1069,columnNumber:35},this),label:B("pane.splitH"),onClick:()=>Bt(c,"h")},{key:"split-v",icon:h.jsxDEV(Mx,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1070,columnNumber:35},this),label:B("pane.splitV"),onClick:()=>Bt(c,"v")},{key:"close",icon:h.jsxDEV(ro,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1072,columnNumber:33},this),label:B("pane.close"),danger:!0,confirm:!0,confirmLabel:B("pane.closeConfirm"),onClick:oe}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1057,columnNumber:7},this),h.jsxDEV(H2,{open:N,pane:Z==null?void 0:Z.paneId,windowId:(On=Z==null?void 0:Z.window)==null?void 0:On.id,tabs:ie.tabs,active:ie.active,onActivate:Vn,onCloseTab:Rn,onMinimize:()=>T(!1),onOpenDoc:Ii,pendingShare:D,onPendingConsumed:()=>R(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1077,columnNumber:7},this),h.jsxDEV(W2,{open:E,pane:Z==null?void 0:Z.paneId,windowId:(ls=Z==null?void 0:Z.window)==null?void 0:ls.id,inset:an,onClose:()=>A(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1090,columnNumber:7},this),h.jsxDEV(X2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1093,columnNumber:7},this),h.jsxDEV(lO,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1095,columnNumber:7},this),h.jsxDEV(jM,{open:In&&!!cn,name:cn==null?void 0:cn.name,kind:cn==null?void 0:cn.kind,domain:Ln,port:cn==null?void 0:cn.port,dir:cn==null?void 0:cn.dir,expiresAt:cn==null?void 0:cn.expiresAt,onRenew:Zn,onStop:Ei,onMinimize:()=>ri(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1097,columnNumber:7},this),U&&h.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>I(null),children:U},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1110,columnNumber:9},this),G&&h.jsxDEV("div",{className:"exit-toast",role:"status",children:B("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1113,columnNumber:9},this),Q&&h.jsxDEV(J2,{path:Q.path,x:Q.x,y:Q.y,onOpen:Wr,onClose:()=>te(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1116,columnNumber:9},this),h.jsxDEV(t4,{open:Xt,session:(ji=Z==null?void 0:Z.session)==null?void 0:ji.name,window:((cs=Z==null?void 0:Z.window)==null?void 0:cs.name)||((Yr=Z==null?void 0:Z.window)==null?void 0:Yr.id),onClose:()=>lt(!1),onSend:he=>{var xe;(xe=Pt.current)==null||xe.fill(he),lt(!1)},onCountChange:nt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1124,columnNumber:7},this),h.jsxDEV(du,{open:!!M,seedCwd:Sx(Z==null?void 0:Z.paneId)??pn??null,pane:(Z==null?void 0:Z.paneId)??null,hint:M?h.jsxDEV(h.Fragment,{children:[B("app.cannotLocate")," ",h.jsxDEV("code",{children:M.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1136,columnNumber:54},this),B("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1136,columnNumber:28},this):null,onPick:Tr,onClose:()=>H(null),inset:an},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1132,columnNumber:7},this),Z?h.jsxDEV(h.Fragment,{children:[h.jsxDEV(l3,{windows:Z.windows,windowAgents:qi,paneAgents:os,currentAgent:(Mr=_e[Z.paneId])==null?void 0:Mr.agent,currentWindowId:Z.window.id,panes:Z.panes,currentPaneId:Z.paneId,onSelectWindow:gt,onSelectPane:fi,onNewWindow:()=>u(!0),onManageWindow:he=>b(he),onManagePane:he=>m(he),paneSheetOpen:!!c,openMapFor:f,onMapOpened:()=>v(null),trackWindowId:C==null?void 0:C.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1143,columnNumber:11},this),Z.paneId&&h.jsxDEV(X3,{ref:Ct,pane:Z.paneId,inset:an,onAuthFail:mt,onDocLinkTap:ar,onTap:()=>{var he;return(he=Pt.current)==null?void 0:he.hideKeyboard()}},Z.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1162,columnNumber:13},this),h.jsxDEV(GU,{ref:Pt,pane:Z.paneId,onAuthFail:mt,onKey:Mn,onText:hi,cwd:pn,agent:(js=_e[Z.paneId])==null?void 0:js.agent,windowId:(Vi=Z.window)==null?void 0:Vi.id,recent:we,favorites:J,onSent:vt,onToggleFav:Et,onRemoveRecent:Kt,inset:an},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1172,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1142,columnNumber:9},this):se?h.jsxDEV("div",{className:"loading",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1190,columnNumber:9},this):P.length===0?h.jsxDEV("button",{className:"empty-cta",onClick:()=>g(!0),children:[B("app.noBoundSession"),h.jsxDEV("span",{children:B("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1193,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1192,columnNumber:9},this):h.jsxDEV("div",{className:"loading",children:B("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1196,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:909,columnNumber:5},this)}qS(document.getElementById("root")).render(h.jsxDEV(d4,{},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 o=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(d=>d.media==="print"),s=o.length?new Promise(d=>{let w=o.length;o.forEach(j=>j.addEventListener("load",()=>{--w||d()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>s.then(()=>window.__hideBootSplash())))}