@aiwg/cockpit 2026.9.3 → 2026.9.5
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,312 @@
|
|
|
1
|
+
var nE=Object.defineProperty;var sE=(S,k,U)=>k in S?nE(S,k,{enumerable:!0,configurable:!0,writable:!0,value:U}):S[k]=U;var Gt=(S,k,U)=>sE(S,typeof k!="symbol"?k+"":k,U);(function(){const k=document.createElement("link").relList;if(k&&k.supports&&k.supports("modulepreload"))return;for(const X of document.querySelectorAll('link[rel="modulepreload"]'))V(X);new MutationObserver(X=>{for(const ee of X)if(ee.type==="childList")for(const $ of ee.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&V($)}).observe(document,{childList:!0,subtree:!0});function U(X){const ee={};return X.integrity&&(ee.integrity=X.integrity),X.referrerPolicy&&(ee.referrerPolicy=X.referrerPolicy),X.crossOrigin==="use-credentials"?ee.credentials="include":X.crossOrigin==="anonymous"?ee.credentials="omit":ee.credentials="same-origin",ee}function V(X){if(X.ep)return;X.ep=!0;const ee=U(X);fetch(X.href,ee)}})();var jm={exports:{}},Fu={},Lm={exports:{}},Tl={exports:{}};Tl.exports;var jw;function rE(){return jw||(jw=1,(function(S,k){/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/(function(){function U(j,te){Object.defineProperty(ee.prototype,j,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",te[0],te[1])}})}function V(j){return j===null||typeof j!="object"?null:(j=ye&&j[ye]||j["@@iterator"],typeof j=="function"?j:null)}function X(j,te){j=(j=j.constructor)&&(j.displayName||j.name)||"ReactClass";var we=j+"."+te;be[we]||(console.error("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.",te,j),be[we]=!0)}function ee(j,te,we){this.props=j,this.context=te,this.refs=Le,this.updater=we||ze}function $(){}function c(j,te,we){this.props=j,this.context=te,this.refs=Le,this.updater=we||ze}function b(){}function _(j){return""+j}function N(j){try{_(j);var te=!1}catch{te=!0}if(te){te=console;var we=te.error,Se=typeof Symbol=="function"&&Symbol.toStringTag&&j[Symbol.toStringTag]||j.constructor.name||"Object";return we.call(te,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Se),_(j)}}function f(j){if(j==null)return null;if(typeof j=="function")return j.$$typeof===Ii?null:j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case L:return"Fragment";case ue:return"Profiler";case P:return"StrictMode";case Y:return"Suspense";case H:return"SuspenseList";case oe:return"Activity"}if(typeof j=="object")switch(typeof j.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),j.$$typeof){case z:return"Portal";case ve:return j.displayName||"Context";case pe:return(j._context.displayName||"Context")+".Consumer";case Ce:var te=j.render;return j=j.displayName,j||(j=te.displayName||te.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case me:return te=j.displayName||null,te!==null?te:f(j.type)||"Memo";case ae:te=j._payload,j=j._init;try{return f(j(te))}catch{}}return null}function m(j){if(j===L)return"<>";if(typeof j=="object"&&j!==null&&j.$$typeof===ae)return"<...>";try{var te=f(j);return te?"<"+te+">":"<...>"}catch{return"<...>"}}function w(){var j=Ae.A;return j===null?null:j.getOwner()}function E(){return Error("react-stack-top-frame")}function p(j){if(Nt.call(j,"key")){var te=Object.getOwnPropertyDescriptor(j,"key").get;if(te&&te.isReactWarning)return!1}return j.key!==void 0}function u(j,te){function we(){Te||(Te=!0,console.error("%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://react.dev/link/special-props)",te))}we.isReactWarning=!0,Object.defineProperty(j,"key",{get:we,configurable:!0})}function h(){var j=f(this.type);return Ie[j]||(Ie[j]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),j=this.props.ref,j!==void 0?j:null}function a(j,te,we,Se,ke,Pe){var Me=we.ref;return j={$$typeof:M,type:j,key:te,props:we,_owner:Se},(Me!==void 0?Me:null)!==null?Object.defineProperty(j,"ref",{enumerable:!1,get:h}):Object.defineProperty(j,"ref",{enumerable:!1,value:null}),j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(j,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(j,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ke}),Object.defineProperty(j,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Pe}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j}function o(j,te){return te=a(j.type,te,j.props,j._owner,j._debugStack,j._debugTask),j._store&&(te._store.validated=j._store.validated),te}function v(j){x(j)?j._store&&(j._store.validated=1):typeof j=="object"&&j!==null&&j.$$typeof===ae&&(j._payload.status==="fulfilled"?x(j._payload.value)&&j._payload.value._store&&(j._payload.value._store.validated=1):j._store&&(j._store.validated=1))}function x(j){return typeof j=="object"&&j!==null&&j.$$typeof===M}function C(j){var te={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(we){return te[we]})}function D(j,te){return typeof j=="object"&&j!==null&&j.key!=null?(N(j.key),C(""+j.key)):te.toString(36)}function y(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(b,b):(j.status="pending",j.then(function(te){j.status==="pending"&&(j.status="fulfilled",j.value=te)},function(te){j.status==="pending"&&(j.status="rejected",j.reason=te)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function T(j,te,we,Se,ke){var Pe=typeof j;(Pe==="undefined"||Pe==="boolean")&&(j=null);var Me=!1;if(j===null)Me=!0;else switch(Pe){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(j.$$typeof){case M:case z:Me=!0;break;case ae:return Me=j._init,T(Me(j._payload),te,we,Se,ke)}}if(Me){Me=j,ke=ke(Me);var ot=Se===""?"."+D(Me,0):Se;return Wt(ke)?(we="",ot!=null&&(we=ot.replace(bt,"$&/")+"/"),T(ke,te,we,"",function(hi){return hi})):ke!=null&&(x(ke)&&(ke.key!=null&&(Me&&Me.key===ke.key||N(ke.key)),we=o(ke,we+(ke.key==null||Me&&Me.key===ke.key?"":(""+ke.key).replace(bt,"$&/")+"/")+ot),Se!==""&&Me!=null&&x(Me)&&Me.key==null&&Me._store&&!Me._store.validated&&(we._store.validated=2),ke=we),te.push(ke)),1}if(Me=0,ot=Se===""?".":Se+":",Wt(j))for(var Fe=0;Fe<j.length;Fe++)Se=j[Fe],Pe=ot+D(Se,Fe),Me+=T(Se,te,we,Pe,ke);else if(Fe=V(j),typeof Fe=="function")for(Fe===j.entries&&(ct||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ct=!0),j=Fe.call(j),Fe=0;!(Se=j.next()).done;)Se=Se.value,Pe=ot+D(Se,Fe++),Me+=T(Se,te,we,Pe,ke);else if(Pe==="object"){if(typeof j.then=="function")return T(y(j),te,we,Se,ke);throw te=String(j),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Me}function R(j,te,we){if(j==null)return j;var Se=[],ke=0;return T(j,Se,"","",function(Pe){return te.call(we,Pe,ke++)}),Se}function W(j){if(j._status===-1){var te=j._ioInfo;te!=null&&(te.start=te.end=performance.now()),te=j._result;var we=te();if(we.then(function(ke){if(j._status===0||j._status===-1){j._status=1,j._result=ke;var Pe=j._ioInfo;Pe!=null&&(Pe.end=performance.now()),we.status===void 0&&(we.status="fulfilled",we.value=ke)}},function(ke){if(j._status===0||j._status===-1){j._status=2,j._result=ke;var Pe=j._ioInfo;Pe!=null&&(Pe.end=performance.now()),we.status===void 0&&(we.status="rejected",we.reason=ke)}}),te=j._ioInfo,te!=null){te.value=we;var Se=we.displayName;typeof Se=="string"&&(te.name=Se)}j._status===-1&&(j._status=0,j._result=we)}if(j._status===1)return te=j._result,te===void 0&&console.error(`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?`,te),"default"in te||console.error(`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'))`,te),te.default;throw j._result}function I(){var j=Ae.H;return j===null&&console.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:
|
|
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://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),j}function B(){Ae.asyncTransitions--}function ie(j){if(ht===null)try{var te=("require"+Math.random()).slice(0,7);ht=(S&&S[te]).call(S,"timers").setImmediate}catch{ht=function(Se){Ot===!1&&(Ot=!0,typeof MessageChannel>"u"&&console.error("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 ke=new MessageChannel;ke.port1.onmessage=Se,ke.port2.postMessage(void 0)}}return ht(j)}function se(j){return 1<j.length&&typeof AggregateError=="function"?new AggregateError(j):j[0]}function ne(j,te){te!==vn-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),vn=te}function de(j,te,we){var Se=Ae.actQueue;if(Se!==null)if(Se.length!==0)try{ce(Se),ie(function(){return de(j,te,we)});return}catch(ke){Ae.thrownErrors.push(ke)}else Ae.actQueue=null;0<Ae.thrownErrors.length?(Se=se(Ae.thrownErrors),Ae.thrownErrors.length=0,we(Se)):te(j)}function ce(j){if(!Xr){Xr=!0;var te=0;try{for(;te<j.length;te++){var we=j[te];do{Ae.didUsePromise=!1;var Se=we(!1);if(Se!==null){if(Ae.didUsePromise){j[te]=we,j.splice(0,te);return}we=Se}else break}while(!0)}j.length=0}catch(ke){j.splice(0,te+1),Ae.thrownErrors.push(ke)}finally{Xr=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var M=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),pe=Symbol.for("react.consumer"),ve=Symbol.for("react.context"),Ce=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ye=Symbol.iterator,be={},ze={isMounted:function(){return!1},enqueueForceUpdate:function(j){X(j,"forceUpdate")},enqueueReplaceState:function(j){X(j,"replaceState")},enqueueSetState:function(j){X(j,"setState")}},qe=Object.assign,Le={};Object.freeze(Le),ee.prototype.isReactComponent={},ee.prototype.setState=function(j,te){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,te,"setState")},ee.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};var De={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)."]};for(ys in De)De.hasOwnProperty(ys)&&U(ys,De[ys]);$.prototype=ee.prototype,De=c.prototype=new $,De.constructor=c,qe(De,ee.prototype),De.isPureReactComponent=!0;var Wt=Array.isArray,Ii=Symbol.for("react.client.reference"),Ae={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Nt=Object.prototype.hasOwnProperty,ge=console.createTask?console.createTask:function(){return null};De={react_stack_bottom_frame:function(j){return j()}};var Te,Je,Ie={},Ye=De.react_stack_bottom_frame.bind(De,E)(),ut=ge(m(E)),ct=!1,bt=/\/+/g,wt=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Ot=!1,ht=null,vn=0,cr=!1,Xr=!1,Qr=typeof queueMicrotask=="function"?function(j){queueMicrotask(function(){return queueMicrotask(j)})}:ie;De=Object.freeze({__proto__:null,c:function(j){return I().useMemoCache(j)}});var ys={map:R,forEach:function(j,te,we){R(j,function(){te.apply(this,arguments)},we)},count:function(j){var te=0;return R(j,function(){te++}),te},toArray:function(j){return R(j,function(te){return te})||[]},only:function(j){if(!x(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};k.Activity=oe,k.Children=ys,k.Component=ee,k.Fragment=L,k.Profiler=ue,k.PureComponent=c,k.StrictMode=P,k.Suspense=Y,k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ae,k.__COMPILER_RUNTIME=De,k.act=function(j){var te=Ae.actQueue,we=vn;vn++;var Se=Ae.actQueue=te!==null?te:[],ke=!1;try{var Pe=j()}catch(Fe){Ae.thrownErrors.push(Fe)}if(0<Ae.thrownErrors.length)throw ne(te,we),j=se(Ae.thrownErrors),Ae.thrownErrors.length=0,j;if(Pe!==null&&typeof Pe=="object"&&typeof Pe.then=="function"){var Me=Pe;return Qr(function(){ke||cr||(cr=!0,console.error("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 () => ...);"))}),{then:function(Fe,hi){ke=!0,Me.then(function(_n){if(ne(te,we),we===0){try{ce(Se),ie(function(){return de(_n,Fe,hi)})}catch(Kr){Ae.thrownErrors.push(Kr)}if(0<Ae.thrownErrors.length){var Ml=se(Ae.thrownErrors);Ae.thrownErrors.length=0,hi(Ml)}}else Fe(_n)},function(_n){ne(te,we),0<Ae.thrownErrors.length&&(_n=se(Ae.thrownErrors),Ae.thrownErrors.length=0),hi(_n)})}}}var ot=Pe;if(ne(te,we),we===0&&(ce(Se),Se.length!==0&&Qr(function(){ke||cr||(cr=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Ae.actQueue=null),0<Ae.thrownErrors.length)throw j=se(Ae.thrownErrors),Ae.thrownErrors.length=0,j;return{then:function(Fe,hi){ke=!0,we===0?(Ae.actQueue=Se,ie(function(){return de(ot,Fe,hi)})):Fe(ot)}}},k.cache=function(j){return function(){return j.apply(null,arguments)}},k.cacheSignal=function(){return null},k.captureOwnerStack=function(){var j=Ae.getCurrentStack;return j===null?null:j()},k.cloneElement=function(j,te,we){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var Se=qe({},j.props),ke=j.key,Pe=j._owner;if(te!=null){var Me;e:{if(Nt.call(te,"ref")&&(Me=Object.getOwnPropertyDescriptor(te,"ref").get)&&Me.isReactWarning){Me=!1;break e}Me=te.ref!==void 0}Me&&(Pe=w()),p(te)&&(N(te.key),ke=""+te.key);for(ot in te)!Nt.call(te,ot)||ot==="key"||ot==="__self"||ot==="__source"||ot==="ref"&&te.ref===void 0||(Se[ot]=te[ot])}var ot=arguments.length-2;if(ot===1)Se.children=we;else if(1<ot){Me=Array(ot);for(var Fe=0;Fe<ot;Fe++)Me[Fe]=arguments[Fe+2];Se.children=Me}for(Se=a(j.type,ke,Se,Pe,j._debugStack,j._debugTask),ke=2;ke<arguments.length;ke++)v(arguments[ke]);return Se},k.createContext=function(j){return j={$$typeof:ve,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:pe,_context:j},j._currentRenderer=null,j._currentRenderer2=null,j},k.createElement=function(j,te,we){for(var Se=2;Se<arguments.length;Se++)v(arguments[Se]);Se={};var ke=null;if(te!=null)for(Fe in Je||!("__self"in te)||"key"in te||(Je=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),p(te)&&(N(te.key),ke=""+te.key),te)Nt.call(te,Fe)&&Fe!=="key"&&Fe!=="__self"&&Fe!=="__source"&&(Se[Fe]=te[Fe]);var Pe=arguments.length-2;if(Pe===1)Se.children=we;else if(1<Pe){for(var Me=Array(Pe),ot=0;ot<Pe;ot++)Me[ot]=arguments[ot+2];Object.freeze&&Object.freeze(Me),Se.children=Me}if(j&&j.defaultProps)for(Fe in Pe=j.defaultProps,Pe)Se[Fe]===void 0&&(Se[Fe]=Pe[Fe]);ke&&u(Se,typeof j=="function"?j.displayName||j.name||"Unknown":j);var Fe=1e4>Ae.recentlyCreatedOwnerStacks++;return a(j,ke,Se,w(),Fe?Error("react-stack-top-frame"):Ye,Fe?ge(m(j)):ut)},k.createRef=function(){var j={current:null};return Object.seal(j),j},k.forwardRef=function(j){j!=null&&j.$$typeof===me?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof j!="function"?console.error("forwardRef requires a render function but was given %s.",j===null?"null":typeof j):j.length!==0&&j.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",j.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),j!=null&&j.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var te={$$typeof:Ce,render:j},we;return Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return we},set:function(Se){we=Se,j.name||j.displayName||(Object.defineProperty(j,"name",{value:Se}),j.displayName=Se)}}),te},k.isValidElement=x,k.lazy=function(j){j={_status:-1,_result:j};var te={$$typeof:ae,_payload:j,_init:W},we={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return j._ioInfo=we,te._debugInfo=[{awaited:we}],te},k.memo=function(j,te){j==null&&console.error("memo: The first argument must be a component. Instead received: %s",j===null?"null":typeof j),te={$$typeof:me,type:j,compare:te===void 0?null:te};var we;return Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return we},set:function(Se){we=Se,j.name||j.displayName||(Object.defineProperty(j,"name",{value:Se}),j.displayName=Se)}}),te},k.startTransition=function(j){var te=Ae.T,we={};we._updatedFibers=new Set,Ae.T=we;try{var Se=j(),ke=Ae.S;ke!==null&&ke(we,Se),typeof Se=="object"&&Se!==null&&typeof Se.then=="function"&&(Ae.asyncTransitions++,Se.then(B,B),Se.then(b,wt))}catch(Pe){wt(Pe)}finally{te===null&&we._updatedFibers&&(j=we._updatedFibers.size,we._updatedFibers.clear(),10<j&&console.warn("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.")),te!==null&&we.types!==null&&(te.types!==null&&te.types!==we.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),te.types=we.types),Ae.T=te}},k.unstable_useCacheRefresh=function(){return I().useCacheRefresh()},k.use=function(j){return I().use(j)},k.useActionState=function(j,te,we){return I().useActionState(j,te,we)},k.useCallback=function(j,te){return I().useCallback(j,te)},k.useContext=function(j){var te=I();return j.$$typeof===pe&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),te.useContext(j)},k.useDebugValue=function(j,te){return I().useDebugValue(j,te)},k.useDeferredValue=function(j,te){return I().useDeferredValue(j,te)},k.useEffect=function(j,te){return j==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),I().useEffect(j,te)},k.useEffectEvent=function(j){return I().useEffectEvent(j)},k.useId=function(){return I().useId()},k.useImperativeHandle=function(j,te,we){return I().useImperativeHandle(j,te,we)},k.useInsertionEffect=function(j,te){return j==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),I().useInsertionEffect(j,te)},k.useLayoutEffect=function(j,te){return j==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),I().useLayoutEffect(j,te)},k.useMemo=function(j,te){return I().useMemo(j,te)},k.useOptimistic=function(j,te){return I().useOptimistic(j,te)},k.useReducer=function(j,te,we){return I().useReducer(j,te,we)},k.useRef=function(j){return I().useRef(j)},k.useState=function(j){return I().useState(j)},k.useSyncExternalStore=function(j,te,we){return I().useSyncExternalStore(j,te,we)},k.useTransition=function(){return I().useTransition()},k.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Tl,Tl.exports)),Tl.exports}var Lw;function Qu(){return Lw||(Lw=1,Lm.exports=rE()),Lm.exports}var Ww;function aE(){if(Ww)return Fu;Ww=1;/**
|
|
22
|
+
* @license React
|
|
23
|
+
* react-jsx-dev-runtime.development.js
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the MIT license found in the
|
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/return(function(){function S(L){if(L==null)return null;if(typeof L=="function")return L.$$typeof===W?null:L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case u:return"Fragment";case a:return"Profiler";case h:return"StrictMode";case C:return"Suspense";case D:return"SuspenseList";case R:return"Activity"}if(typeof L=="object")switch(typeof L.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),L.$$typeof){case p:return"Portal";case v:return L.displayName||"Context";case o:return(L._context.displayName||"Context")+".Consumer";case x:var P=L.render;return L=L.displayName,L||(L=P.displayName||P.name||"",L=L!==""?"ForwardRef("+L+")":"ForwardRef"),L;case y:return P=L.displayName||null,P!==null?P:S(L.type)||"Memo";case T:P=L._payload,L=L._init;try{return S(L(P))}catch{}}return null}function k(L){return""+L}function U(L){try{k(L);var P=!1}catch{P=!0}if(P){P=console;var ue=P.error,pe=typeof Symbol=="function"&&Symbol.toStringTag&&L[Symbol.toStringTag]||L.constructor.name||"Object";return ue.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",pe),k(L)}}function V(L){if(L===u)return"<>";if(typeof L=="object"&&L!==null&&L.$$typeof===T)return"<...>";try{var P=S(L);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function X(){var L=I.A;return L===null?null:L.getOwner()}function ee(){return Error("react-stack-top-frame")}function $(L){if(B.call(L,"key")){var P=Object.getOwnPropertyDescriptor(L,"key").get;if(P&&P.isReactWarning)return!1}return L.key!==void 0}function c(L,P){function ue(){ne||(ne=!0,console.error("%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://react.dev/link/special-props)",P))}ue.isReactWarning=!0,Object.defineProperty(L,"key",{get:ue,configurable:!0})}function b(){var L=S(this.type);return de[L]||(de[L]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),L=this.props.ref,L!==void 0?L:null}function _(L,P,ue,pe,ve,Ce){var Y=ue.ref;return L={$$typeof:E,type:L,key:P,props:ue,_owner:pe},(Y!==void 0?Y:null)!==null?Object.defineProperty(L,"ref",{enumerable:!1,get:b}):Object.defineProperty(L,"ref",{enumerable:!1,value:null}),L._store={},Object.defineProperty(L._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(L,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(L,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ve}),Object.defineProperty(L,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ce}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L}function N(L,P,ue,pe,ve,Ce){var Y=P.children;if(Y!==void 0)if(pe)if(ie(Y)){for(pe=0;pe<Y.length;pe++)f(Y[pe]);Object.freeze&&Object.freeze(Y)}else console.error("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 f(Y);if(B.call(P,"key")){Y=S(L);var H=Object.keys(P).filter(function(ae){return ae!=="key"});pe=0<H.length?"{key: someKey, "+H.join(": ..., ")+": ...}":"{key: someKey}",z[Y+pe]||(H=0<H.length?"{"+H.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
30
|
+
let props = %s;
|
|
31
|
+
<%s {...props} />
|
|
32
|
+
React keys must be passed directly to JSX without using spread:
|
|
33
|
+
let props = %s;
|
|
34
|
+
<%s key={someKey} {...props} />`,pe,Y,H,Y),z[Y+pe]=!0)}if(Y=null,ue!==void 0&&(U(ue),Y=""+ue),$(P)&&(U(P.key),Y=""+P.key),"key"in P){ue={};for(var me in P)me!=="key"&&(ue[me]=P[me])}else ue=P;return Y&&c(ue,typeof L=="function"?L.displayName||L.name||"Unknown":L),_(L,Y,ue,X(),ve,Ce)}function f(L){m(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===T&&(L._payload.status==="fulfilled"?m(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function m(L){return typeof L=="object"&&L!==null&&L.$$typeof===E}var w=Qu(),E=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),v=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),I=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,ie=Array.isArray,se=console.createTask?console.createTask:function(){return null};w={react_stack_bottom_frame:function(L){return L()}};var ne,de={},ce=w.react_stack_bottom_frame.bind(w,ee)(),M=se(V(ee)),z={};Fu.Fragment=u,Fu.jsxDEV=function(L,P,ue,pe){var ve=1e4>I.recentlyCreatedOwnerStacks++;return N(L,P,ue,pe,ve?Error("react-stack-top-frame"):ce,ve?se(V(L)):M)}})(),Fu}var Bw;function oE(){return Bw||(Bw=1,jm.exports=aE()),jm.exports}var l=oE(),J=Qu(),Wm={exports:{}},Rl={},Bm={exports:{}},Vm={},Vw;function lE(){return Vw||(Vw=1,(function(S){/**
|
|
35
|
+
* @license React
|
|
36
|
+
* scheduler.development.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/(function(){function k(){if(x=!1,T){var ne=S.unstable_now();I=ne;var de=!0;try{e:{o=!1,v&&(v=!1,D(R),R=-1),a=!0;var ce=h;try{t:{for($(ne),u=V(w);u!==null&&!(u.expirationTime>ne&&b());){var M=u.callback;if(typeof M=="function"){u.callback=null,h=u.priorityLevel;var z=M(u.expirationTime<=ne);if(ne=S.unstable_now(),typeof z=="function"){u.callback=z,$(ne),de=!0;break t}u===V(w)&&X(w),$(ne)}else X(w);u=V(w)}if(u!==null)de=!0;else{var L=V(E);L!==null&&_(c,L.startTime-ne),de=!1}}break e}finally{u=null,h=ce,a=!1}de=void 0}}finally{de?B():T=!1}}}function U(ne,de){var ce=ne.length;ne.push(de);e:for(;0<ce;){var M=ce-1>>>1,z=ne[M];if(0<ee(z,de))ne[M]=de,ne[ce]=z,ce=M;else break e}}function V(ne){return ne.length===0?null:ne[0]}function X(ne){if(ne.length===0)return null;var de=ne[0],ce=ne.pop();if(ce!==de){ne[0]=ce;e:for(var M=0,z=ne.length,L=z>>>1;M<L;){var P=2*(M+1)-1,ue=ne[P],pe=P+1,ve=ne[pe];if(0>ee(ue,ce))pe<z&&0>ee(ve,ue)?(ne[M]=ve,ne[pe]=ce,M=pe):(ne[M]=ue,ne[P]=ce,M=P);else if(pe<z&&0>ee(ve,ce))ne[M]=ve,ne[pe]=ce,M=pe;else break e}}return de}function ee(ne,de){var ce=ne.sortIndex-de.sortIndex;return ce!==0?ce:ne.id-de.id}function $(ne){for(var de=V(E);de!==null;){if(de.callback===null)X(E);else if(de.startTime<=ne)X(E),de.sortIndex=de.expirationTime,U(w,de);else break;de=V(E)}}function c(ne){if(v=!1,$(ne),!o)if(V(w)!==null)o=!0,T||(T=!0,B());else{var de=V(E);de!==null&&_(c,de.startTime-ne)}}function b(){return x?!0:!(S.unstable_now()-I<W)}function _(ne,de){R=C(function(){ne(S.unstable_now())},de)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),S.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var N=performance;S.unstable_now=function(){return N.now()}}else{var f=Date,m=f.now();S.unstable_now=function(){return f.now()-m}}var w=[],E=[],p=1,u=null,h=3,a=!1,o=!1,v=!1,x=!1,C=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null,T=!1,R=-1,W=5,I=-1;if(typeof y=="function")var B=function(){y(k)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,se=ie.port2;ie.port1.onmessage=k,B=function(){se.postMessage(null)}}else B=function(){C(k,0)};S.unstable_IdlePriority=5,S.unstable_ImmediatePriority=1,S.unstable_LowPriority=4,S.unstable_NormalPriority=3,S.unstable_Profiling=null,S.unstable_UserBlockingPriority=2,S.unstable_cancelCallback=function(ne){ne.callback=null},S.unstable_forceFrameRate=function(ne){0>ne||125<ne?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<ne?Math.floor(1e3/ne):5},S.unstable_getCurrentPriorityLevel=function(){return h},S.unstable_next=function(ne){switch(h){case 1:case 2:case 3:var de=3;break;default:de=h}var ce=h;h=de;try{return ne()}finally{h=ce}},S.unstable_requestPaint=function(){x=!0},S.unstable_runWithPriority=function(ne,de){switch(ne){case 1:case 2:case 3:case 4:case 5:break;default:ne=3}var ce=h;h=ne;try{return de()}finally{h=ce}},S.unstable_scheduleCallback=function(ne,de,ce){var M=S.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?M+ce:M):ce=M,ne){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=ce+z,ne={id:p++,callback:de,priorityLevel:ne,startTime:ce,expirationTime:z,sortIndex:-1},ce>M?(ne.sortIndex=ce,U(E,ne),V(w)===null&&ne===V(E)&&(v?(D(R),R=-1):v=!0,_(c,ce-M))):(ne.sortIndex=z,U(w,ne),o||a||(o=!0,T||(T=!0,B()))),ne},S.unstable_shouldYield=b,S.unstable_wrapCallback=function(ne){var de=h;return function(){var ce=h;h=de;try{return ne.apply(this,arguments)}finally{h=ce}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Vm)),Vm}var Hw;function cE(){return Hw||(Hw=1,Bm.exports=lE()),Bm.exports}var Hm={exports:{}},ui={},Uw;function uE(){if(Uw)return ui;Uw=1;/**
|
|
43
|
+
* @license React
|
|
44
|
+
* react-dom.development.js
|
|
45
|
+
*
|
|
46
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the MIT license found in the
|
|
49
|
+
* LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/return(function(){function S(){}function k(f){return""+f}function U(f,m,w){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{k(E);var p=!1}catch{p=!0}return p&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&E[Symbol.toStringTag]||E.constructor.name||"Object"),k(E)),{$$typeof:_,key:E==null?null:""+E,children:f,containerInfo:m,implementation:w}}function V(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}function X(f){return f===null?"`null`":f===void 0?"`undefined`":f===""?"an empty string":'something with type "'+typeof f+'"'}function ee(f){return f===null?"`null`":f===void 0?"`undefined`":f===""?"an empty string":typeof f=="string"?JSON.stringify(f):typeof f=="number"?"`"+f+"`":'something with type "'+typeof f+'"'}function $(){var f=N.H;return f===null&&console.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:
|
|
51
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
52
|
+
2. You might be breaking the Rules of Hooks
|
|
53
|
+
3. You might have more than one copy of React in the same app
|
|
54
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),f}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var c=Qu(),b={d:{f:S,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:S,C:S,L:S,m:S,X:S,S,M:S},p:0,findDOMNode:null},_=Symbol.for("react.portal"),N=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;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"||console.error("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"),ui.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b,ui.createPortal=function(f,m){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error("Target container is not a DOM element.");return U(f,m,null,w)},ui.flushSync=function(f){var m=N.T,w=b.p;try{if(N.T=null,b.p=2,f)return f()}finally{N.T=m,b.p=w,b.d.f()&&console.error("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.")}},ui.preconnect=function(f,m){typeof f=="string"&&f?m!=null&&typeof m!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",ee(m)):m!=null&&typeof m.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",X(m.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",X(f)),typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,b.d.C(f,m))},ui.prefetchDNS=function(f){if(typeof f!="string"||!f)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",X(f));else if(1<arguments.length){var m=arguments[1];typeof m=="object"&&m.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",ee(m)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",ee(m))}typeof f=="string"&&b.d.D(f)},ui.preinit=function(f,m){if(typeof f=="string"&&f?m==null||typeof m!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",ee(m)):m.as!=="style"&&m.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',ee(m.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",X(f)),typeof f=="string"&&m&&typeof m.as=="string"){var w=m.as,E=V(w,m.crossOrigin),p=typeof m.integrity=="string"?m.integrity:void 0,u=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;w==="style"?b.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:E,integrity:p,fetchPriority:u}):w==="script"&&b.d.X(f,{crossOrigin:E,integrity:p,fetchPriority:u,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},ui.preinitModule=function(f,m){var w="";if(typeof f=="string"&&f||(w+=" The `href` argument encountered was "+X(f)+"."),m!==void 0&&typeof m!="object"?w+=" The `options` argument encountered was "+X(m)+".":m&&"as"in m&&m.as!=="script"&&(w+=" The `as` option encountered was "+ee(m.as)+"."),w)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",w);else switch(w=m&&typeof m.as=="string"?m.as:"script",w){case"script":break;default:w=ee(w),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',w,f)}typeof f=="string"&&(typeof m=="object"&&m!==null?(m.as==null||m.as==="script")&&(w=V(m.as,m.crossOrigin),b.d.M(f,{crossOrigin:w,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})):m==null&&b.d.M(f))},ui.preload=function(f,m){var w="";if(typeof f=="string"&&f||(w+=" The `href` argument encountered was "+X(f)+"."),m==null||typeof m!="object"?w+=" The `options` argument encountered was "+X(m)+".":typeof m.as=="string"&&m.as||(w+=" The `as` option encountered was "+X(m.as)+"."),w&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',w),typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){w=m.as;var E=V(w,m.crossOrigin);b.d.L(f,w,{crossOrigin:E,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},ui.preloadModule=function(f,m){var w="";typeof f=="string"&&f||(w+=" The `href` argument encountered was "+X(f)+"."),m!==void 0&&typeof m!="object"?w+=" The `options` argument encountered was "+X(m)+".":m&&"as"in m&&typeof m.as!="string"&&(w+=" The `as` option encountered was "+X(m.as)+"."),w&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',w),typeof f=="string"&&(m?(w=V(m.as,m.crossOrigin),b.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:w,integrity:typeof m.integrity=="string"?m.integrity:void 0})):b.d.m(f))},ui.requestFormReset=function(f){b.d.r(f)},ui.unstable_batchedUpdates=function(f,m){return f(m)},ui.useFormState=function(f,m,w){return $().useFormState(f,m,w)},ui.useFormStatus=function(){return $().useHostTransitionStatus()},ui.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),ui}var zw;function hE(){return zw||(zw=1,Hm.exports=uE()),Hm.exports}var Iw;function dE(){if(Iw)return Rl;Iw=1;/**
|
|
55
|
+
* @license React
|
|
56
|
+
* react-dom-client.development.js
|
|
57
|
+
*
|
|
58
|
+
* Copyright (c) Meta Platforms, Inc. and 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
|
+
*/return(function(){function S(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function k(e,t,i,n){if(i>=t.length)return n;var s=t[i],r=Yt(e)?e.slice():tt({},e);return r[s]=k(e[s],t,i+1,n),r}function U(e,t,i){if(t.length!==i.length)console.warn("copyWithRename() expects paths of the same length");else{for(var n=0;n<i.length-1;n++)if(t[n]!==i[n]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return V(e,t,i,0)}}function V(e,t,i,n){var s=t[n],r=Yt(e)?e.slice():tt({},e);return n+1===t.length?(r[i[n]]=r[s],Yt(r)?r.splice(s,1):delete r[s]):r[s]=V(e[s],t,i,n+1),r}function X(e,t,i){var n=t[i],s=Yt(e)?e.slice():tt({},e);return i+1===t.length?(Yt(s)?s.splice(n,1):delete s[n],s):(s[n]=X(e[n],t,i+1),s)}function ee(){return!1}function $(){return null}function c(){console.error("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://react.dev/link/rules-of-hooks")}function b(){console.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().")}function _(){}function N(){}function f(e){var t=[];return e.forEach(function(i){t.push(i)}),t.sort().join(", ")}function m(e,t,i,n){return new qy(e,t,i,n)}function w(e,t){e.context===zs&&(Zd(e.current,2,t,e,null,null),ua())}function E(e,t){if(Xi!==null){var i=t.staleFamilies;t=t.updatedFamilies,xo(),Up(e.current,t,i),ua()}}function p(e){Xi=e}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function a(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function o(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(h(e)!==e)throw Error("Unable to find node on an unmounted component.")}function x(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var i=e,n=t;;){var s=i.return;if(s===null)break;var r=s.alternate;if(r===null){if(n=s.return,n!==null){i=n;continue}break}if(s.child===r.child){for(r=s.child;r;){if(r===i)return v(s),e;if(r===n)return v(s),t;r=r.sibling}throw Error("Unable to find node on an unmounted component.")}if(i.return!==n.return)i=s,n=r;else{for(var d=!1,g=s.child;g;){if(g===i){d=!0,i=s,n=r;break}if(g===n){d=!0,n=s,i=r;break}g=g.sibling}if(!d){for(g=r.child;g;){if(g===i){d=!0,i=r,n=s;break}if(g===n){d=!0,n=r,i=s;break}g=g.sibling}if(!d)throw 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!==n)throw 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!==3)throw Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}function D(e){return e===null||typeof e!="object"?null:(e=Gv&&e[Gv]||e["@@iterator"],typeof e=="function"?e:null)}function y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===d1?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ga:return"Fragment";case af:return"Profiler";case Uc:return"StrictMode";case lf:return"Suspense";case cf:return"SuspenseList";case uf:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ba:return"Portal";case Bn:return e.displayName||"Context";case of:return(e._context.displayName||"Context")+".Consumer";case Lo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zc:return t=e.displayName||null,t!==null?t:y(e.type)||"Memo";case Li:t=e._payload,e=e._init;try{return y(e(t))}catch{}}return null}function T(e){return typeof e.tag=="number"?R(e):typeof e.name=="string"?e.name:null}function R(e){var t=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(t._context.displayName||"Context")+".Consumer";case 10:return t.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return y(t);case 8:return t===Uc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;break;case 29:if(t=e._debugInfo,t!=null){for(var i=t.length-1;0<=i;i--)if(typeof t[i].name=="string")return t[i].name}if(e.return!==null)return R(e.return)}return null}function W(e){return{current:e}}function I(e,t){0>is?console.error("Unexpected pop."):(t!==df[is]&&console.error("Unexpected Fiber popped."),e.current=hf[is],hf[is]=null,df[is]=null,is--)}function B(e,t,i){is++,hf[is]=e.current,df[is]=i,e.current=t}function ie(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function se(e,t){B(Ls,t,e),B(Wo,e,e),B(js,null,e);var i=t.nodeType;switch(i){case 9:case 11:i=i===9?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?gv(t):gs;break;default:if(i=t.tagName,t=t.namespaceURI)t=gv(t),t=vv(t,i);else switch(i){case"svg":t=Ka;break;case"math":t=Hu;break;default:t=gs}}i=i.toLowerCase(),i=hp(null,i),i={context:t,ancestorInfo:i},I(js,e),B(js,i,e)}function ne(e){I(js,e),I(Wo,e),I(Ls,e)}function de(){return ie(js.current)}function ce(e){e.memoizedState!==null&&B(Ic,e,e);var t=ie(js.current),i=e.type,n=vv(t.context,i);i=hp(t.ancestorInfo,i),n={context:n,ancestorInfo:i},t!==n&&(B(Wo,e,e),B(js,n,e))}function M(e){Wo.current===e&&(I(js,e),I(Wo,e)),Ic.current===e&&(I(Ic,e),Al._currentValue=Yr)}function z(){}function L(){if(Bo===0){Yv=console.log,Xv=console.info,Qv=console.warn,Kv=console.error,Zv=console.group,Jv=console.groupCollapsed,e_=console.groupEnd;var e={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Bo++}function P(){if(Bo--,Bo===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:tt({},e,{value:Yv}),info:tt({},e,{value:Xv}),warn:tt({},e,{value:Qv}),error:tt({},e,{value:Kv}),group:tt({},e,{value:Zv}),groupCollapsed:tt({},e,{value:Jv}),groupEnd:tt({},e,{value:e_})})}0>Bo&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function ue(e){var t=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith(`Error: react-stack-top-frame
|
|
63
|
+
`)&&(e=e.slice(29)),t=e.indexOf(`
|
|
64
|
+
`),t!==-1&&(e=e.slice(t+1)),t=e.indexOf("react_stack_bottom_frame"),t!==-1&&(t=e.lastIndexOf(`
|
|
65
|
+
`,t)),t!==-1)e=e.slice(0,t);else return"";return e}function pe(e){if(ff===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ff=t&&t[1]||"",t_=-1<i.stack.indexOf(`
|
|
66
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
67
|
+
`+ff+e+t_}function ve(e,t){if(!e||mf)return"";var i=pf.get(e);if(i!==void 0)return i;mf=!0,i=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var n=null;n=he.H,he.H=null,L();try{var s={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(Ne){var re=Ne}Reflect.construct(e,[],F)}else{try{F.call()}catch(Ne){re=Ne}e.call(F.prototype)}}else{try{throw Error()}catch(Ne){re=Ne}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(Ne){if(Ne&&re&&typeof Ne.stack=="string")return[Ne.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),g=d[0],A=d[1];if(g&&A){var O=g.split(`
|
|
68
|
+
`),K=A.split(`
|
|
69
|
+
`);for(d=r=0;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;for(;d<K.length&&!K[d].includes("DetermineComponentFrameRoot");)d++;if(r===O.length||d===K.length)for(r=O.length-1,d=K.length-1;1<=r&&0<=d&&O[r]!==K[d];)d--;for(;1<=r&&0<=d;r--,d--)if(O[r]!==K[d]){if(r!==1||d!==1)do if(r--,d--,0>d||O[r]!==K[d]){var Z=`
|
|
70
|
+
`+O[r].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),typeof e=="function"&&pf.set(e,Z),Z}while(1<=r&&0<=d);break}}}finally{mf=!1,he.H=n,P(),Error.prepareStackTrace=i}return O=(O=e?e.displayName||e.name:"")?pe(O):"",typeof e=="function"&&pf.set(e,O),O}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe("Lazy");case 13:return e.child!==t&&t!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return pe("Activity");default:return""}}function Y(e){try{var t="",i=null;do{t+=Ce(e,i);var n=e._debugInfo;if(n)for(var s=n.length-1;0<=s;s--){var r=n[s];if(typeof r.name=="string"){var d=t;e:{var g=r.name,A=r.env,O=r.debugLocation;if(O!=null){var K=ue(O),Z=K.lastIndexOf(`
|
|
71
|
+
`),F=Z===-1?K:K.slice(Z+1);if(F.indexOf(g)!==-1){var re=`
|
|
72
|
+
`+F;break e}}re=pe(g+(A?" ["+A+"]":""))}t=d+re}}i=e,e=e.return}while(e);return t}catch(Ne){return`
|
|
73
|
+
Error generating stack: `+Ne.message+`
|
|
74
|
+
`+Ne.stack}}function H(e){return(e=e?e.displayName||e.name:"")?pe(e):""}function me(){if(Wi===null)return null;var e=Wi._debugOwner;return e!=null?T(e):null}function ae(){if(Wi===null)return"";var e=Wi;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=pe(e.type);break;case 13:t+=pe("Suspense");break;case 19:t+=pe("SuspenseList");break;case 31:t+=pe("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=H(e.type));break;case 11:e._debugOwner||t!==""||(t+=H(e.type.render))}for(;e;)if(typeof e.tag=="number"){var i=e;e=i._debugOwner;var n=i._debugStack;if(e&&n){var s=ue(n);s!==""&&(t+=`
|
|
75
|
+
`+s)}}else if(e.debugStack!=null){var r=e.debugStack;(e=e.owner)&&r&&(t+=`
|
|
76
|
+
`+ue(r))}else break;var d=t}catch(g){d=`
|
|
77
|
+
Error generating stack: `+g.message+`
|
|
78
|
+
`+g.stack}return d}function oe(e,t,i,n,s,r,d){var g=Wi;ye(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,i,n,s,r,d)):t(i,n,s,r,d)}finally{ye(g)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function ye(e){he.getCurrentStack=e===null?null:ae,Vn=!1,Wi=e}function be(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function ze(e){try{return qe(e),!1}catch{return!0}}function qe(e){return""+e}function Le(e,t){if(ze(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,be(e)),qe(e)}function De(e,t){if(ze(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,be(e)),qe(e)}function Wt(e){if(ze(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",be(e)),qe(e)}function Ii(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 console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{_a=t.inject(e),li=t}catch(i){console.error("React instrumentation encountered an error: %o.",i)}return!!t.checkDCE}function Ae(e){if(typeof _1=="function"&&w1(e),li&&typeof li.setStrictMode=="function")try{li.setStrictMode(_a,e)}catch(t){Hn||(Hn=!0,console.error("React instrumentation encountered an error: %o",t))}}function Nt(e){return e>>>=0,e===0?32:31-(y1(e)/S1|0)|0}function ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function Te(e,t,i){var n=e.pendingLanes;if(n===0)return 0;var s=0,r=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var g=n&134217727;return g!==0?(n=g&~r,n!==0?s=ge(n):(d&=g,d!==0?s=ge(d):i||(i=g&~e,i!==0&&(s=ge(i))))):(g=n&~r,g!==0?s=ge(g):d!==0?s=ge(d):i||(i=n&~e,i!==0&&(s=ge(i)))),s===0?0:t!==0&&t!==s&&(t&r)===0&&(r=s&-s,i=t&-t,r>=i||r===32&&(i&4194048)!==0)?t:s}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ie(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Ye(){var e=Pc;return Pc<<=1,(Pc&62914560)===0&&(Pc=4194304),e}function ut(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bt(e,t,i,n,s,r){var d=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var g=e.entanglements,A=e.expirationTimes,O=e.hiddenUpdates;for(i=d&~i;0<i;){var K=31-fi(i),Z=1<<K;g[K]=0,A[K]=-1;var F=O[K];if(F!==null)for(O[K]=null,K=0;K<F.length;K++){var re=F[K];re!==null&&(re.lane&=-536870913)}i&=~Z}n!==0&&wt(e,n,0),r!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=r&~(d&~t))}function wt(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-fi(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|i&261930}function Ot(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var n=31-fi(i),s=1<<n;s&t|e[n]&t&&(e[n]|=t),i&=~s}}function ht(e,t){var i=t&-t;return i=(i&42)!==0?1:vn(i),(i&(e.suspendedLanes|t))!==0?0:i}function vn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cr(e,t,i){if(Un)for(e=e.pendingUpdatersLaneMap;0<i;){var n=31-fi(i),s=1<<n;e[n].add(t),i&=~s}}function Xr(e,t){if(Un)for(var i=e.pendingUpdatersLaneMap,n=e.memoizedUpdaters;0<t;){var s=31-fi(t);e=1<<s,s=i[s],0<s.size&&(s.forEach(function(r){var d=r.alternate;d!==null&&n.has(d)||n.add(r)}),s.clear()),t&=~e}}function Qr(e){return e&=-e,Fi<e?zn<e?(e&134217727)!==0?ns:Fc:zn:Fi}function ys(){var e=ft.p;return e!==0?e:(e=window.event,e===void 0?ns:Uv(e.type))}function j(e,t){var i=ft.p;try{return ft.p=e,t()}finally{ft.p=i}}function te(e){delete e[ri],delete e[mi],delete e[wf],delete e[N1],delete e[E1]}function we(e){var t=e[ri];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Bs]||i[ri]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Cv(e);e!==null;){if(i=e[ri])return i;e=Cv(e)}return t}e=i,i=e.parentNode}return null}function Se(e){if(e=e[ri]||e[Bs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ke(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Pe(e){var t=e[i_];return t||(t=e[i_]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Me(e){e[Vo]=!0}function ot(e,t){Fe(e,t),Fe(e+"Capture",t)}function Fe(e,t){xr[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),xr[e]=t;var i=e.toLowerCase();for(yf[i]=e,e==="onDoubleClick"&&(yf.ondblclick=e),e=0;e<t.length;e++)n_.add(t[e])}function hi(e,t){x1[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||console.error(e==="select"?"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 `onChange`.":"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||console.error("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 _n(e){return un.call(r_,e)?!0:un.call(s_,e)?!1:C1.test(e)?r_[e]=!0:(s_[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function Ml(e,t,i){if(_n(t)){if(!e.hasAttribute(t)){switch(typeof i){case"symbol":case"object":return i;case"function":return i;case"boolean":if(i===!1)return i}return i===void 0?void 0:null}return e=e.getAttribute(t),e===""&&i===!0?!0:(Le(i,t),e===""+i?i:e)}}function Kr(e,t,i){if(_n(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}Le(i,t),e.setAttribute(t,""+i)}}function Ol(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}Le(i,t),e.setAttribute(t,""+i)}}function Gn(e,t,i,n){if(n===null)e.removeAttribute(i);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}Le(n,i),e.setAttributeNS(t,i,""+n)}}function $i(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Wt(e),e;default:return""}}function Km(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yy(e,t,i){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){Wt(d),i=""+d,r.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(d){Wt(d),i=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zu(e){if(!e._valueTracker){var t=Km(e)?"checked":"value";e._valueTracker=yy(e,t,""+e[t])}}function Zm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),n="";return e&&(n=Km(e)?e.checked?"true":"false":e.value),e=n,e!==i?(t.setValue(e),!0):!1}function jl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function qi(e){return e.replace(A1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jm(e,t){t.checked===void 0||t.defaultChecked===void 0||o_||(console.error("%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://react.dev/link/controlled-components",me()||"A component",t.type),o_=!0),t.value===void 0||t.defaultValue===void 0||a_||(console.error("%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://react.dev/link/controlled-components",me()||"A component",t.type),a_=!0)}function Ju(e,t,i,n,s,r,d,g){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?(Le(d,"type"),e.type=d):e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+$i(t)):e.value!==""+$i(t)&&(e.value=""+$i(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?eh(e,d,$i(t)):i!=null?eh(e,d,$i(i)):n!=null&&e.removeAttribute("value"),s==null&&r!=null&&(e.defaultChecked=!!r),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?(Le(g,"name"),e.name=""+$i(g)):e.removeAttribute("name")}function ep(e,t,i,n,s,r,d,g){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(Le(r,"type"),e.type=r),t!=null||i!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){Zu(e);return}i=i!=null?""+$i(i):"",t=t!=null?""+$i(t):i,g||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=g?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(Le(d,"name"),e.name=d),Zu(e)}function eh(e,t,i){t==="number"&&jl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function tp(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?rf.Children.forEach(t.children,function(i){i==null||typeof i=="string"||typeof i=="number"||typeof i=="bigint"||c_||(c_=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):t.dangerouslySetInnerHTML==null||u_||(u_=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||l_||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),l_=!0)}function ip(){var e=me();return e?`
|
|
79
|
+
|
|
80
|
+
Check the render method of \``+e+"`.":""}function Zr(e,t,i,n){if(e=e.options,t){t={};for(var s=0;s<i.length;s++)t["$"+i[s]]=!0;for(i=0;i<e.length;i++)s=t.hasOwnProperty("$"+e[i].value),e[i].selected!==s&&(e[i].selected=s),s&&n&&(e[i].defaultSelected=!0)}else{for(i=""+$i(i),t=null,s=0;s<e.length;s++){if(e[s].value===i){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function np(e,t){for(e=0;e<d_.length;e++){var i=d_[e];if(t[i]!=null){var n=Yt(t[i]);t.multiple&&!n?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",i,ip()):!t.multiple&&n&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",i,ip())}}t.value===void 0||t.defaultValue===void 0||h_||(console.error("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://react.dev/link/controlled-components"),h_=!0)}function sp(e,t){t.value===void 0||t.defaultValue===void 0||f_||(console.error("%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://react.dev/link/controlled-components",me()||"A component"),f_=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function rp(e,t,i){if(t!=null&&(t=""+$i(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+$i(i):""}function ap(e,t,i,n){if(t==null){if(n!=null){if(i!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Yt(n)){if(1<n.length)throw Error("<textarea> can only have at most one child.");n=n[0]}i=n}i==null&&(i=""),t=i}i=$i(t),e.defaultValue=i,n=e.textContent,n===i&&n!==""&&n!==null&&(e.value=n),Zu(e)}function op(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?op(e.children[0],t):e}function Di(e){return" "+" ".repeat(e)}function Jr(e){return"+ "+" ".repeat(e)}function ur(e){return"- "+" ".repeat(e)}function lp(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function eo(e,t){return m_.test(e)?(e=JSON.stringify(e),e.length>t-2?8>t?'{"..."}':"{"+e.slice(0,t-7)+'..."}':"{"+e+"}"):e.length>t?5>t?'{"..."}':e.slice(0,t-3)+"...":e}function Ll(e,t,i){var n=120-2*i;if(t===null)return Jr(i)+eo(e,n)+`
|
|
81
|
+
`;if(typeof t=="string"){for(var s=0;s<t.length&&s<e.length&&t.charCodeAt(s)===e.charCodeAt(s);s++);return s>n-8&&10<s&&(e="..."+e.slice(s-8),t="..."+t.slice(s-8)),Jr(i)+eo(e,n)+`
|
|
82
|
+
`+ur(i)+eo(t,n)+`
|
|
83
|
+
`}return Di(i)+eo(e,n)+`
|
|
84
|
+
`}function th(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(t,i){return i})}function to(e,t){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>t?5>t?'"..."':e.slice(0,t-4)+'..."':e;case"object":if(e===null)return"null";if(Yt(e))return"[...]";if(e.$$typeof===Wn)return(t=y(e.type))?"<"+t+">":"<...>";var i=th(e);if(i==="Object"){i="",t-=2;for(var n in e)if(e.hasOwnProperty(n)){var s=JSON.stringify(n);if(s!=='"'+n+'"'&&(n=s),t-=n.length-2,s=to(e[n],15>t?t:15),t-=s.length,0>t){i+=i===""?"...":", ...";break}i+=(i===""?"":",")+n+":"+s}return"{"+i+"}"}return i;case"function":return(t=e.displayName||e.name)?"function "+t:"function";default:return String(e)}}function ea(e,t){return typeof e!="string"||m_.test(e)?"{"+to(e,t-2)+"}":e.length>t-2?5>t?'"..."':'"'+e.slice(0,t-5)+'..."':'"'+e+'"'}function ih(e,t,i){var n=120-i.length-e.length,s=[],r;for(r in t)if(t.hasOwnProperty(r)&&r!=="children"){var d=ea(t[r],120-i.length-r.length-1);n-=r.length+d.length+2,s.push(r+"="+d)}return s.length===0?i+"<"+e+`>
|
|
85
|
+
`:0<n?i+"<"+e+" "+s.join(" ")+`>
|
|
86
|
+
`:i+"<"+e+`
|
|
87
|
+
`+i+" "+s.join(`
|
|
88
|
+
`+i+" ")+`
|
|
89
|
+
`+i+`>
|
|
90
|
+
`}function Sy(e,t,i){var n="",s=tt({},t),r;for(r in e)if(e.hasOwnProperty(r)){delete s[r];var d=120-2*i-r.length-2,g=to(e[r],d);t.hasOwnProperty(r)?(d=to(t[r],d),n+=Jr(i)+r+": "+g+`
|
|
91
|
+
`,n+=ur(i)+r+": "+d+`
|
|
92
|
+
`):n+=Jr(i)+r+": "+g+`
|
|
93
|
+
`}for(var A in s)s.hasOwnProperty(A)&&(e=to(s[A],120-2*i-A.length-2),n+=ur(i)+A+": "+e+`
|
|
94
|
+
`);return n}function Ny(e,t,i,n){var s="",r=new Map;for(O in i)i.hasOwnProperty(O)&&r.set(O.toLowerCase(),O);if(r.size===1&&r.has("children"))s+=ih(e,t,Di(n));else{for(var d in t)if(t.hasOwnProperty(d)&&d!=="children"){var g=120-2*(n+1)-d.length-1,A=r.get(d.toLowerCase());if(A!==void 0){r.delete(d.toLowerCase());var O=t[d];A=i[A];var K=ea(O,g);g=ea(A,g),typeof O=="object"&&O!==null&&typeof A=="object"&&A!==null&&th(O)==="Object"&&th(A)==="Object"&&(2<Object.keys(O).length||2<Object.keys(A).length||-1<K.indexOf("...")||-1<g.indexOf("..."))?s+=Di(n+1)+d+`={{
|
|
95
|
+
`+Sy(O,A,n+2)+Di(n+1)+`}}
|
|
96
|
+
`:(s+=Jr(n+1)+d+"="+K+`
|
|
97
|
+
`,s+=ur(n+1)+d+"="+g+`
|
|
98
|
+
`)}else s+=Di(n+1)+d+"="+ea(t[d],g)+`
|
|
99
|
+
`}r.forEach(function(Z){if(Z!=="children"){var F=120-2*(n+1)-Z.length-1;s+=ur(n+1)+Z+"="+ea(i[Z],F)+`
|
|
100
|
+
`}}),s=s===""?Di(n)+"<"+e+`>
|
|
101
|
+
`:Di(n)+"<"+e+`
|
|
102
|
+
`+s+Di(n)+`>
|
|
103
|
+
`}return e=i.children,t=t.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(r="",(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(r=""+t),s+=Ll(r,""+e,n+1)):(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(s=e==null?s+Ll(""+t,null,n+1):s+Ll(""+t,void 0,n+1)),s}function cp(e,t){var i=lp(e);if(i===null){for(i="",e=e.child;e;)i+=cp(e,t),e=e.sibling;return i}return Di(t)+"<"+i+`>
|
|
104
|
+
`}function nh(e,t){var i=op(e,t);if(i!==e&&(e.children.length!==1||e.children[0]!==i))return Di(t)+`...
|
|
105
|
+
`+nh(i,t+1);i="";var n=e.fiber._debugInfo;if(n)for(var s=0;s<n.length;s++){var r=n[s].name;typeof r=="string"&&(i+=Di(t)+"<"+r+`>
|
|
106
|
+
`,t++)}if(n="",s=e.fiber.pendingProps,e.fiber.tag===6)n=Ll(s,e.serverProps,t),t++;else if(r=lp(e.fiber),r!==null)if(e.serverProps===void 0){n=t;var d=120-2*n-r.length-2,g="";for(O in s)if(s.hasOwnProperty(O)&&O!=="children"){var A=ea(s[O],15);if(d-=O.length+A.length+2,0>d){g+=" ...";break}g+=" "+O+"="+A}n=Di(n)+"<"+r+g+`>
|
|
107
|
+
`,t++}else e.serverProps===null?(n=ih(r,s,Jr(t)),t++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(n=Ny(r,s,e.serverProps,t),t++);var O="";for(s=e.fiber.child,r=0;s&&r<e.children.length;)d=e.children[r],d.fiber===s?(O+=nh(d,t),r++):O+=cp(s,t),s=s.sibling;for(s&&0<e.children.length&&(O+=Di(t)+`...
|
|
108
|
+
`),s=e.serverTail,e.serverProps===null&&t--,e=0;e<s.length;e++)r=s[e],O=typeof r=="string"?O+(ur(t)+eo(r,120-2*t)+`
|
|
109
|
+
`):O+ih(r.type,r.props,ur(t));return i+n+O}function sh(e){try{return`
|
|
110
|
+
|
|
111
|
+
`+nh(e,0)}catch{return""}}function up(e,t,i){for(var n=t,s=null,r=0;n;)n===e&&(r=0),s={fiber:n,children:s!==null?[s]:[],serverProps:n===t?i:n===e?null:void 0,serverTail:[],distanceFromLeaf:r},r++,n=n.return;return s!==null?sh(s).replaceAll(/^[+-]/gm,">"):""}function hp(e,t){var i=tt({},e||b_),n={tag:t};return p_.indexOf(t)!==-1&&(i.aTagInScope=null,i.buttonTagInScope=null,i.nobrTagInScope=null),k1.indexOf(t)!==-1&&(i.pTagInButtonScope=null),D1.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(i.listItemTagAutoclosing=null,i.dlItemTagAutoclosing=null),i.current=n,t==="form"&&(i.formTag=n),t==="a"&&(i.aTagInScope=n),t==="button"&&(i.buttonTagInScope=n),t==="nobr"&&(i.nobrTagInScope=n),t==="p"&&(i.pTagInButtonScope=n),t==="li"&&(i.listItemTagAutoclosing=n),(t==="dd"||t==="dt")&&(i.dlItemTagAutoclosing=n),t==="#document"||t==="html"?i.containerTagInScope=null:i.containerTagInScope||(i.containerTagInScope=n),e!==null||t!=="#document"&&t!=="html"&&t!=="body"?i.implicitRootScope===!0&&(i.implicitRootScope=!1):i.implicitRootScope=!0,i}function dp(e,t,i){switch(t){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||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":if(i)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!i)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 R1.indexOf(t)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null;case"head":return i||t===null;case"html":return i&&t==="#document"||t===null;case"body":return i&&(t==="#document"||t==="html")||t===null}return!0}function Ey(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}function fp(e,t){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===t)return e}e=e.return}return null}function rh(e,t){t=t||b_;var i=t.current;if(t=(i=dp(e,i&&i.tag,t.implicitRootScope)?null:i)?null:Ey(e,t),t=i||t,!t)return!0;var n=t.tag;if(t=String(!!i)+"|"+e+"|"+n,Gc[t])return!1;Gc[t]=!0;var s=(t=Wi)?fp(t.return,n):null,r=t!==null&&s!==null?up(s,t,null):"",d="<"+e+">";return i?(i="",n==="table"&&e==="tr"&&(i+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
112
|
+
This will cause a hydration error.%s`,d,n,i,r)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
113
|
+
This will cause a hydration error.%s`,d,n,r),t&&(e=t.return,s===null||e===null||s===e&&e._debugOwner===t._debugOwner||oe(s,function(){console.error(`<%s> cannot contain a nested %s.
|
|
114
|
+
See this log for the ancestor stack trace.`,n,d)})),!1}function Wl(e,t,i){if(i||dp("#text",t,!1))return!0;if(i="#text|"+t,Gc[i])return!1;Gc[i]=!0;var n=(i=Wi)?fp(i,t):null;return i=i!==null&&n!==null?up(n,i,i.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
115
|
+
This will cause a hydration error.%s`,t,i):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
116
|
+
This will cause a hydration error.%s`,t,i),!1}function io(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}function xy(e){return e.replace(O1,function(t,i){return i.toUpperCase()})}function mp(e,t,i){var n=t.indexOf("--")===0;n||(-1<t.indexOf("-")?wa.hasOwnProperty(t)&&wa[t]||(wa[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,xy(t.replace(M1,"ms-")))):T1.test(t)?wa.hasOwnProperty(t)&&wa[t]||(wa[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!__.test(i)||Nf.hasOwnProperty(i)&&Nf[i]||(Nf[i]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,i.replace(__,""))),typeof i=="number"&&(isNaN(i)?w_||(w_=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(i)||y_||(y_=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),i==null||typeof i=="boolean"||i===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,i):typeof i!="number"||i===0||S_.has(t)?t==="float"?e.cssFloat=i:(De(i,t),e[t]=(""+i).trim()):e[t]=i+"px"}function pp(e,t,i){if(t!=null&&typeof t!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(t&&Object.freeze(t),e=e.style,i!=null){if(t){var n={};if(i){for(var s in i)if(i.hasOwnProperty(s)&&!t.hasOwnProperty(s))for(var r=Sf[s]||[s],d=0;d<r.length;d++)n[r[d]]=s}for(var g in t)if(t.hasOwnProperty(g)&&(!i||i[g]!==t[g]))for(s=Sf[g]||[g],r=0;r<s.length;r++)n[s[r]]=g;g={};for(var A in t)for(s=Sf[A]||[A],r=0;r<s.length;r++)g[s[r]]=A;A={};for(var O in n)if(s=n[O],(r=g[O])&&s!==r&&(d=s+","+r,!A[d])){A[d]=!0,d=console;var K=t[s];d.error.call(d,"%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.",K==null||typeof K=="boolean"||K===""?"Removing":"Updating",s,r)}}for(var Z in i)!i.hasOwnProperty(Z)||t!=null&&t.hasOwnProperty(Z)||(Z.indexOf("--")===0?e.setProperty(Z,""):Z==="float"?e.cssFloat="":e[Z]="");for(var F in t)O=t[F],t.hasOwnProperty(F)&&i[F]!==O&&mp(e,F,O)}else for(n in t)t.hasOwnProperty(n)&&mp(e,n,t[n])}function no(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function bp(e){return j1.get(e)||e}function Cy(e,t){if(un.call(Sa,t)&&Sa[t])return!0;if(W1.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=N_.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Sa[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Sa[t]=!0}if(L1.test(t)){if(e=t.toLowerCase(),e=N_.hasOwnProperty(e)?e:null,e==null)return Sa[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Sa[t]=!0)}return!0}function Ay(e,t){var i=[],n;for(n in t)Cy(e,n)||i.push(n);t=i.map(function(s){return"`"+s+"`"}).join(", "),i.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e):1<i.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e)}function Dy(e,t,i,n){if(un.call(pi,t)&&pi[t])return!0;var s=t.toLowerCase();if(s==="onfocusin"||s==="onfocusout")return console.error("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."),pi[t]=!0;if(typeof i=="function"&&(e==="form"&&t==="action"||e==="input"&&t==="formAction"||e==="button"&&t==="formAction"))return!0;if(n!=null){if(e=n.possibleRegistrationNames,n.registrationNameDependencies.hasOwnProperty(t))return!0;if(n=e.hasOwnProperty(s)?e[s]:null,n!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,n),pi[t]=!0;if(x_.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),pi[t]=!0}else if(x_.test(t))return B1.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),pi[t]=!0;if(V1.test(t)||H1.test(t))return!0;if(s==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),pi[t]=!0;if(s==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),pi[t]=!0;if(s==="is"&&i!==null&&i!==void 0&&typeof i!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof i),pi[t]=!0;if(typeof i=="number"&&isNaN(i))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),pi[t]=!0;if(Xc.hasOwnProperty(s)){if(s=Xc[s],s!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,s),pi[t]=!0}else if(t!==s)return console.error("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,s),pi[t]=!0;switch(t){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof i){case"boolean":switch(t){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return s=t.toLowerCase().slice(0,5),s==="data-"||s==="aria-"?!0:(i?console.error('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()}.',i,t,t,i,t):console.error('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.',i,t,t,i,t,t,t),pi[t]=!0)}case"function":case"symbol":return pi[t]=!0,!1;case"string":if(i==="false"||i==="true"){switch(t){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",i,t,i==="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,i),pi[t]=!0}}return!0}function ky(e,t,i){var n=[],s;for(s in t)Dy(e,s,t[s],i)||n.push(s);t=n.map(function(r){return"`"+r+"`"}).join(", "),n.length===1?console.error("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://react.dev/link/attribute-behavior ",t,e):1<n.length&&console.error("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://react.dev/link/attribute-behavior ",t,e)}function so(e){return U1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Yn(){}function ah(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function gp(e){var t=Se(e);if(t&&(e=t.stateNode)){var i=e[mi]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ju(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(Le(t,"name"),i=i.querySelectorAll('input[name="'+qi(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var n=i[t];if(n!==e&&n.form===e.form){var s=n[mi]||null;if(!s)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Ju(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<i.length;t++)n=i[t],n.form===e.form&&Zm(n)}break e;case"textarea":rp(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Zr(e,!!i.multiple,t,!1)}}}function vp(e,t,i){if(Ef)return e(t,i);Ef=!0;try{var n=e(t);return n}finally{if(Ef=!1,(Na!==null||Ea!==null)&&(ua(),Na&&(t=Na,e=Ea,Ea=Na=null,gp(t),e)))for(t=0;t<e.length;t++)gp(e[t])}}function ro(e,t){var i=e.stateNode;if(i===null)return null;var n=i[mi]||null;if(n===null)return null;i=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof i+"` type.");return i}function _p(){if(Qc)return Qc;var e,t=Cf,i=t.length,n,s="value"in Vs?Vs.value:Vs.textContent,r=s.length;for(e=0;e<i&&t[e]===s[e];e++);var d=i-e;for(n=1;n<=d&&t[i-n]===s[r-n];n++);return Qc=s.slice(e,1<n?1-n:void 0)}function Bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vl(){return!0}function wp(){return!1}function yi(e){function t(i,n,s,r,d){this._reactName=i,this._targetInst=s,this.type=n,this.nativeEvent=r,this.target=d,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(i=e[g],this[g]=i?i(r):r[g]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Vl:wp,this.isPropagationStopped=wp,this}return tt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),t}function Ry(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J1[e])?!!t[e]:!1}function oh(){return Ry}function yp(e,t){switch(e){case"keyup":return hN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==k_;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function Ty(e,t){switch(e){case"compositionend":return Sp(t);case"keypress":return t.which!==T_?null:(O_=!0,M_);case"textInput":return e=t.data,e===M_&&O_?null:e;default:return null}}function My(e,t){if(xa)return e==="compositionend"||!Rf&&yp(e,t)?(e=_p(),Qc=Cf=Vs=null,xa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return R_&&t.locale!=="ko"?null:t.data;default:return null}}function Np(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fN[e.type]:t==="textarea"}function Oy(e){if(!In)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}function Ep(e,t,i,n){Na?Ea?Ea.push(n):Ea=[n]:Na=n,t=Rc(t,"onChange"),0<t.length&&(i=new Kc("onChange","change",null,i,n),e.push({event:i,listeners:t}))}function jy(e){av(e,0)}function Hl(e){var t=ke(e);if(Zm(t))return e}function xp(e,t){if(e==="change")return t}function Cp(){qo&&(qo.detachEvent("onpropertychange",Ap),Po=qo=null)}function Ap(e){if(e.propertyName==="value"&&Hl(Po)){var t=[];Ep(t,Po,e,ah(e)),vp(jy,t)}}function Ly(e,t,i){e==="focusin"?(Cp(),qo=t,Po=i,qo.attachEvent("onpropertychange",Ap)):e==="focusout"&&Cp()}function Wy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hl(Po)}function By(e,t){if(e==="click")return Hl(t)}function Vy(e,t){if(e==="input"||e==="change")return Hl(t)}function Hy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function ao(e,t){if(bi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(n=0;n<i.length;n++){var s=i[n];if(!un.call(t,s)||!bi(e[s],t[s]))return!1}return!0}function Dp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kp(e,t){var i=Dp(e);e=0;for(var n;i;){if(i.nodeType===3){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Dp(i)}}function Rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=jl(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=jl(e.document)}return t}function lh(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 Mp(e,t,i){var n=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Mf||Ca==null||Ca!==jl(n)||(n=Ca,"selectionStart"in n&&lh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Fo&&ao(Fo,n)||(Fo=n,n=Rc(Tf,"onSelect"),0<n.length&&(t=new Kc("onSelect","select",null,t,i),e.push({event:t,listeners:n}),t.target=Ca)))}function hr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}function dr(e){if(Of[e])return Of[e];if(!Aa[e])return e;var t=Aa[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in L_)return Of[e]=t[i];return e}function an(e,t){U_.set(e,t),ot(t,[e])}function Uy(e){for(var t=Jc,i=0;i<e.length;i++){var n=e[i];if(typeof n=="object"&&n!==null)if(Yt(n)&&n.length===2&&typeof n[0]=="string"){if(t!==Jc&&t!==Vf)return Wf;t=Vf}else return Wf;else{if(typeof n=="function"||typeof n=="string"&&50<n.length||t!==Jc&&t!==Bf)return Wf;t=Bf}}return t}function ch(e,t,i,n){for(var s in e)un.call(e,s)&&s[0]!=="_"&&wn(s,e[s],t,i,n)}function wn(e,t,i,n,s){switch(typeof t){case"object":if(t===null){t="null";break}else{if(t.$$typeof===Wn){var r=y(t.type)||"…",d=t.key;t=t.props;var g=Object.keys(t),A=g.length;if(d==null&&A===0){t="<"+r+" />";break}if(3>n||A===1&&g[0]==="children"&&d==null){t="<"+r+" … />";break}i.push([s+" ".repeat(n)+e,"<"+r]),d!==null&&wn("key",d,i,n+1,s),e=!1;for(var O in t)O==="children"?t.children!=null&&(!Yt(t.children)||0<t.children.length)&&(e=!0):un.call(t,O)&&O[0]!=="_"&&wn(O,t[O],i,n+1,s);i.push(["",e?">…</"+r+">":"/>"]);return}if(r=Object.prototype.toString.call(t),r=r.slice(8,r.length-1),r==="Array"){if(O=Uy(t),O===Bf||O===Jc){t=JSON.stringify(t);break}else if(O===Vf){for(i.push([s+" ".repeat(n)+e,""]),e=0;e<t.length;e++)r=t[e],wn(r[0],r[1],i,n+1,s);return}}if(r==="Promise"){if(t.status==="fulfilled"){if(r=i.length,wn(e,t.value,i,n,s),i.length>r){i=i[r],i[1]="Promise<"+(i[1]||"Object")+">";return}}else if(t.status==="rejected"&&(r=i.length,wn(e,t.reason,i,n,s),i.length>r)){i=i[r],i[1]="Rejected Promise<"+i[1]+">";return}i.push([" ".repeat(n)+e,"Promise"]);return}r==="Object"&&(O=Object.getPrototypeOf(t))&&typeof O.constructor=="function"&&(r=O.constructor.name),i.push([s+" ".repeat(n)+e,r==="Object"?3>n?"":"…":r]),3>n&&ch(t,i,n+1,s);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===wN?"…":JSON.stringify(t);break;case"undefined":t="undefined";break;case"boolean":t=t?"true":"false";break;default:t=String(t)}i.push([s+" ".repeat(n)+e,t])}function Op(e,t,i,n){var s=!0;for(d in e)d in t||(i.push([eu+" ".repeat(n)+d,"…"]),s=!1);for(var r in t)if(r in e){var d=e[r],g=t[r];if(d!==g){if(n===0&&r==="children")s=" ".repeat(n)+r,i.push([eu+s,"…"],[tu+s,"…"]);else{if(!(3<=n)){if(typeof d=="object"&&typeof g=="object"&&d!==null&&g!==null&&d.$$typeof===g.$$typeof)if(g.$$typeof===Wn){if(d.type===g.type&&d.key===g.key){d=y(g.type)||"…",s=" ".repeat(n)+r,d="<"+d+" … />",i.push([eu+s,d],[tu+s,d]),s=!1;continue}}else{var A=Object.prototype.toString.call(d),O=Object.prototype.toString.call(g);if(A===O&&(O==="[object Object]"||O==="[object Array]")){A=[$_+" ".repeat(n)+r,O==="[object Array]"?"Array":""],i.push(A),O=i.length,Op(d,g,i,n+1)?O===i.length&&(A[1]="Referentially unequal but deeply equal objects. Consider memoization."):s=!1;continue}}else if(typeof d=="function"&&typeof g=="function"&&d.name===g.name&&d.length===g.length&&(A=Function.prototype.toString.call(d),O=Function.prototype.toString.call(g),A===O)){d=g.name===""?"() => {}":g.name+"() {}",i.push([$_+" ".repeat(n)+r,d+" Referentially unequal function closure. Consider memoization."]);continue}}wn(r,d,i,n,eu),wn(r,g,i,n,tu)}s=!1}}else i.push([tu+" ".repeat(n)+r,"…"]),s=!1;return s}function on(e){at=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function yn(e,t,i,n){Et&&(Us.start=t,Us.end=i,ss.color="warning",ss.tooltipText=n,ss.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,n,Us)):performance.measure(n,Us))}function Ul(e,t,i){yn(e,t,i,"Reconnect")}function zl(e,t,i,n,s){var r=R(e);if(r!==null&&Et){var d=e.alternate,g=e.actualDuration;if(d===null||d.child!==e.child)for(var A=e.child;A!==null;A=A.sibling)g-=A.actualDuration;n=.5>g?n?"tertiary-light":"primary-light":10>g?n?"tertiary":"primary":100>g?n?"tertiary-dark":"primary-dark":"error";var O=e.memoizedProps;g=e._debugTask,O!==null&&d!==null&&d.memoizedProps!==O?(A=[yN],O=Op(d.memoizedProps,O,A,0),1<A.length&&(O&&!Hs&&(d.lanes&s)===0&&100<e.actualDuration?(Hs=!0,A[0]=SN,ss.color="warning",ss.tooltipText=q_):(ss.color=n,ss.tooltipText=r),ss.properties=A,Us.start=t,Us.end=i,g!=null?g.run(performance.measure.bind(performance,""+r,Us)):performance.measure(""+r,Us))):g!=null?g.run(console.timeStamp.bind(console,r,t,i,Gi,void 0,n)):console.timeStamp(r,t,i,Gi,void 0,n)}}function uh(e,t,i,n){if(Et){var s=R(e);if(s!==null){for(var r=null,d=[],g=0;g<n.length;g++){var A=n[g];r==null&&A.source!==null&&(r=A.source._debugTask),A=A.value,d.push(["Error",typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A)])}e.key!==null&&wn("key",e.key,d,0,""),e.memoizedProps!==null&&ch(e.memoizedProps,d,0,""),r==null&&(r=e._debugTask),e={start:t,end:i,detail:{devtools:{color:"error",track:Gi,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:d}}},r?r.run(performance.measure.bind(performance,""+s,e)):performance.measure(""+s,e)}}}function Sn(e,t,i,n,s){if(s!==null){if(Et){var r=R(e);if(r!==null){n=[];for(var d=0;d<s.length;d++){var g=s[d].value;n.push(["Error",typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g)])}e.key!==null&&wn("key",e.key,n,0,""),e.memoizedProps!==null&&ch(e.memoizedProps,n,0,""),t={start:t,end:i,detail:{devtools:{color:"error",track:Gi,tooltipText:"A lifecycle or effect errored",properties:n}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,""+r,t)):performance.measure(""+r,t)}}}else r=R(e),r!==null&&Et&&(s=1>n?"secondary-light":100>n?"secondary":500>n?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,r,t,i,Gi,void 0,s)):console.timeStamp(r,t,i,Gi,void 0,s))}function zy(e,t,i,n){if(Et&&!(t<=e)){var s=(i&738197653)===i?"tertiary-dark":"primary-dark";i=(i&536870912)===i?"Prepared":(i&201326741)===i?"Hydrated":"Render",n?n.run(console.timeStamp.bind(console,i,e,t,at,st,s)):console.timeStamp(i,e,t,at,st,s)}}function jp(e,t,i,n){!Et||t<=e||(i=(i&738197653)===i?"tertiary-dark":"primary-dark",n?n.run(console.timeStamp.bind(console,"Prewarm",e,t,at,st,i)):console.timeStamp("Prewarm",e,t,at,st,i))}function Lp(e,t,i,n){!Et||t<=e||(i=(i&738197653)===i?"tertiary-dark":"primary-dark",n?n.run(console.timeStamp.bind(console,"Suspended",e,t,at,st,i)):console.timeStamp("Suspended",e,t,at,st,i))}function Iy(e,t,i,n,s,r){if(Et&&!(t<=e)){i=[];for(var d=0;d<n.length;d++){var g=n[d].value;i.push(["Recoverable Error",typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g)])}e={start:e,end:t,detail:{devtools:{color:"primary-dark",track:at,trackGroup:st,tooltipText:s?"Hydration Failed":"Recovered after Error",properties:i}}},r?r.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function hh(e,t,i,n){!Et||t<=e||(n?n.run(console.timeStamp.bind(console,"Errored",e,t,at,st,"error")):console.timeStamp("Errored",e,t,at,st,"error"))}function $y(e,t,i,n){!Et||t<=e||(n?n.run(console.timeStamp.bind(console,i,e,t,at,st,"secondary-light")):console.timeStamp(i,e,t,at,st,"secondary-light"))}function Wp(e,t,i,n,s){if(Et&&!(t<=e)){for(var r=[],d=0;d<i.length;d++){var g=i[d].value;r.push(["Error",typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g)])}e={start:e,end:t,detail:{devtools:{color:"error",track:at,trackGroup:st,tooltipText:n?"Remaining Effects Errored":"Commit Errored",properties:r}}},s?s.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function dh(e,t,i){!Et||t<=e||console.timeStamp("Animating",e,t,at,st,"secondary-dark")}function Il(){for(var e=Da,t=Hf=Da=0;t<e;){var i=Yi[t];Yi[t++]=null;var n=Yi[t];Yi[t++]=null;var s=Yi[t];Yi[t++]=null;var r=Yi[t];if(Yi[t++]=null,n!==null&&s!==null){var d=n.pending;d===null?s.next=s:(s.next=d.next,d.next=s),n.pending=s}r!==0&&Bp(i,s,r)}}function $l(e,t,i,n){Yi[Da++]=e,Yi[Da++]=t,Yi[Da++]=i,Yi[Da++]=n,Hf|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function fh(e,t,i,n){return $l(e,t,i,n),ql(e)}function oi(e,t){return $l(e,null,null,t),ql(e)}function Bp(e,t,i){e.lanes|=i;var n=e.alternate;n!==null&&(n.lanes|=i);for(var s=!1,r=e.return;r!==null;)r.childLanes|=i,n=r.alternate,n!==null&&(n.childLanes|=i),r.tag===22&&(e=r.stateNode,e===null||e._visibility&Go||(s=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,s&&t!==null&&(s=31-fi(i),e=r.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=i|536870912),r):null}function ql(e){if(wl>VN)throw Ir=wl=0,yl=vm=null,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.");Ir>HN&&(Ir=0,yl=null,console.error("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.")),e.alternate===null&&(e.flags&4098)!==0&&Jg(e);for(var t=e,i=t.return;i!==null;)t.alternate===null&&(t.flags&4098)!==0&&Jg(e),t=i,i=t.return;return t.tag===3?t.stateNode:null}function fr(e){if(Xi===null)return e;var t=Xi(e);return t===void 0?e:t.current}function mh(e){if(Xi===null)return e;var t=Xi(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=fr(e.render),e.render!==t)?(t={$$typeof:Lo,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function Vp(e,t){if(Xi===null)return!1;var i=e.elementType;t=t.type;var n=!1,s=typeof t=="object"&&t!==null?t.$$typeof:null;switch(e.tag){case 1:typeof t=="function"&&(n=!0);break;case 0:(typeof t=="function"||s===Li)&&(n=!0);break;case 11:(s===Lo||s===Li)&&(n=!0);break;case 14:case 15:(s===zc||s===Li)&&(n=!0);break;default:return!1}return!!(n&&(e=Xi(i),e!==void 0&&e===Xi(t)))}function Hp(e){Xi!==null&&typeof WeakSet=="function"&&(ka===null&&(ka=new WeakSet),ka.add(e))}function Up(e,t,i){do{var n=e,s=n.alternate,r=n.child,d=n.sibling,g=n.tag;n=n.type;var A=null;switch(g){case 0:case 15:case 1:A=n;break;case 11:A=n.render}if(Xi===null)throw Error("Expected resolveFamily to be set during hot reload.");var O=!1;if(n=!1,A!==null&&(A=Xi(A),A!==void 0&&(i.has(A)?n=!0:t.has(A)&&(g===1?n=!0:O=!0))),ka!==null&&(ka.has(e)||s!==null&&ka.has(s))&&(n=!0),n&&(e._debugNeedsRemount=!0),(n||O)&&(s=oi(e,2),s!==null&&Tt(s,e,2)),r===null||n||Up(r,t,i),d===null)break;e=d}while(!0)}function qy(e,t,i,n){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,P_||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function ph(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xn(e,t){var i=e.alternate;switch(i===null?(i=m(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i._debugOwner=e._debugOwner,i._debugStack=e._debugStack,i._debugTask=e._debugTask,i._debugHookTypes=e._debugHookTypes,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null,i.actualDuration=-0,i.actualStartTime=-1.1),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i.selfBaseDuration=e.selfBaseDuration,i.treeBaseDuration=e.treeBaseDuration,i._debugInfo=e._debugInfo,i._debugNeedsRemount=e._debugNeedsRemount,i.tag){case 0:case 15:i.type=fr(e.type);break;case 1:i.type=fr(e.type);break;case 11:i.type=mh(e.type)}return i}function zp(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},e.selfBaseDuration=i.selfBaseDuration,e.treeBaseDuration=i.treeBaseDuration),e}function bh(e,t,i,n,s,r){var d=0,g=e;if(typeof e=="function")ph(e)&&(d=1),g=fr(g);else if(typeof e=="string")d=de(),d=JS(e,i,d)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case uf:return t=m(31,i,t,s),t.elementType=uf,t.lanes=r,t;case ga:return mr(i.children,s,r,t);case Uc:d=8,s|=ci,s|=hn;break;case af:return e=i,n=s,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),t=m(12,e,t,n|Xe),t.elementType=af,t.lanes=r,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case lf:return t=m(13,i,t,s),t.elementType=lf,t.lanes=r,t;case cf:return t=m(19,i,t,s),t.elementType=cf,t.lanes=r,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bn:d=10;break e;case of:d=9;break e;case Lo:d=11,g=mh(g);break e;case zc:d=14;break e;case Li:d=16,g=null;break e}g="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(g+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?i="null":Yt(e)?i="array":e!==void 0&&e.$$typeof===Wn?(i="<"+(y(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):i=typeof e,(d=n?T(n):null)&&(g+=`
|
|
117
|
+
|
|
118
|
+
Check the render method of \``+d+"`."),d=29,i=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(i+"."+g)),g=null}return t=m(d,i,t,s),t.elementType=e,t.type=g,t.lanes=r,t._debugOwner=n,t}function Pl(e,t,i){return t=bh(e.type,e.key,e.props,e._owner,t,i),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function mr(e,t,i,n){return e=m(7,e,n,t),e.lanes=i,e}function gh(e,t,i){return e=m(6,e,null,t),e.lanes=i,e}function Ip(e){var t=m(18,null,null,Ve);return t.stateNode=e,t}function vh(e,t,i){return t=m(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ki(e,t){if(typeof e=="object"&&e!==null){var i=Uf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Y(t)},Uf.set(e,t),t)}return{value:e,source:t,stack:Y(t)}}function Qn(e,t){Ss(),Ra[Ta++]=Yo,Ra[Ta++]=iu,iu=e,Yo=t}function $p(e,t,i){Ss(),Qi[Ki++]=as,Qi[Ki++]=os,Qi[Ki++]=Ar,Ar=e;var n=as;e=os;var s=32-fi(n)-1;n&=~(1<<s),i+=1;var r=32-fi(t)+s;if(30<r){var d=s-s%5;r=(n&(1<<d)-1).toString(32),n>>=d,s-=d,as=1<<32-fi(t)+s|i<<s|n,os=r+e}else as=1<<r|i<<s|n,os=e}function _h(e){Ss(),e.return!==null&&(Qn(e,1),$p(e,1,0))}function wh(e){for(;e===iu;)iu=Ra[--Ta],Ra[Ta]=null,Yo=Ra[--Ta],Ra[Ta]=null;for(;e===Ar;)Ar=Qi[--Ki],Qi[Ki]=null,os=Qi[--Ki],Qi[Ki]=null,as=Qi[--Ki],Qi[Ki]=null}function qp(){return Ss(),Ar!==null?{id:as,overflow:os}:null}function Pp(e,t){Ss(),Qi[Ki++]=as,Qi[Ki++]=os,Qi[Ki++]=Ar,as=t.id,os=t.overflow,Ar=e}function Ss(){it||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function pr(e,t){if(e.return===null){if(Bi===null)Bi={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(Bi.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Bi.distanceFromLeaf>t&&(Bi.distanceFromLeaf=t)}return Bi}var i=pr(e.return,t+1).children;return 0<i.length&&i[i.length-1].fiber===e?(i=i[i.length-1],i.distanceFromLeaf>t&&(i.distanceFromLeaf=t),i):(t={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t},i.push(t),t)}function Fp(){it&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Fl(e,t){$n||(e=pr(e,0),e.serverProps=null,t!==null&&(t=Ev(t),e.serverTail.push(t)))}function Ns(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,i="",n=Bi;throw n!==null&&(Bi=null,i=sh(n)),oo(ki(Error("Hydration failed because the server rendered "+(t?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
119
|
+
|
|
120
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
121
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
122
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
123
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
124
|
+
- Invalid HTML tag nesting.
|
|
125
|
+
|
|
126
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
127
|
+
|
|
128
|
+
https://react.dev/link/hydration-mismatch`+i),e)),zf}function Gp(e){var t=e.stateNode,i=e.type,n=e.memoizedProps;switch(t[ri]=e,t[mi]=n,Ud(i,n),i){case"dialog":nt("cancel",t),nt("close",t);break;case"iframe":case"object":case"embed":nt("load",t);break;case"video":case"audio":for(i=0;i<Sl.length;i++)nt(Sl[i],t);break;case"source":nt("error",t);break;case"img":case"image":case"link":nt("error",t),nt("load",t);break;case"details":nt("toggle",t);break;case"input":hi("input",n),nt("invalid",t),Jm(t,n),ep(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"option":tp(t,n);break;case"select":hi("select",n),nt("invalid",t),np(t,n);break;case"textarea":hi("textarea",n),nt("invalid",t),sp(t,n),ap(t,n.value,n.defaultValue,n.children)}i=n.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||n.suppressHydrationWarning===!0||uv(t.textContent,i)?(n.popover!=null&&(nt("beforetoggle",t),nt("toggle",t)),n.onScroll!=null&&nt("scroll",t),n.onScrollEnd!=null&&nt("scrollend",t),n.onClick!=null&&(t.onclick=Yn),t=!0):t=!1,t||Ns(e,!0)}function Yp(e){for(ai=e.return;ai;)switch(ai.tag){case 5:case 31:case 13:Zi=!1;return;case 27:case 3:Zi=!0;return;default:ai=ai.return}}function ta(e){if(e!==ai)return!1;if(!it)return Yp(e),it=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Pd(e.type,e.memoizedProps)),i=!i),i&&xt){for(i=xt;i;){var n=pr(e,0),s=Ev(i);n.serverTail.push(s),i=s.type==="Suspense"?Xd(i):ji(i.nextSibling)}Ns(e)}if(Yp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");xt=Xd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");xt=Xd(e)}else t===27?(t=xt,Os(e.type)?(e=Rm,Rm=null,xt=e):xt=t):xt=ai?ji(e.stateNode.nextSibling):null;return!0}function br(){xt=ai=null,$n=it=!1}function yh(){var e=Is;return e!==null&&(wi===null?wi=e:wi.push.apply(wi,e),Is=null),e}function oo(e){Is===null?Is=[e]:Is.push(e)}function Sh(){var e=Bi;if(e!==null){Bi=null;for(var t=sh(e);0<e.children.length;)e=e.children[0];oe(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
129
|
+
|
|
130
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
131
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
132
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
133
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
134
|
+
- Invalid HTML tag nesting.
|
|
135
|
+
|
|
136
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
137
|
+
|
|
138
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function Gl(){Ma=nu=null,Oa=!1}function Es(e,t,i){B(If,t._currentValue,e),t._currentValue=i,B($f,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==G_&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=G_}function Kn(e,t){e._currentValue=If.current;var i=$f.current;I($f,t),e._currentRenderer=i,I(If,t)}function Nh(e,t,i){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===i)break;e=e.return}e!==i&&console.error("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 Eh(e,t,i,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var r=s.dependencies;if(r!==null){var d=s.child;r=r.firstContext;e:for(;r!==null;){var g=r;r=s;for(var A=0;A<t.length;A++)if(g.context===t[A]){r.lanes|=i,g=r.alternate,g!==null&&(g.lanes|=i),Nh(r.return,i,e),n||(d=null);break e}r=g.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");d.lanes|=i,r=d.alternate,r!==null&&(r.lanes|=i),Nh(d,i,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function ia(e,t,i,n){e=null;for(var s=t,r=!1;s!==null;){if(!r){if((s.flags&524288)!==0)r=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error("Should have a current fiber. This is a bug in React.");if(d=d.memoizedProps,d!==null){var g=s.type;bi(s.pendingProps.value,d.value)||(e!==null?e.push(g):e=[g])}}else if(s===Ic.current){if(d=s.alternate,d===null)throw Error("Should have a current fiber. This is a bug in React.");d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Al):e=[Al])}s=s.return}e!==null&&Eh(t,e,i,n),t.flags|=262144}function Yl(e){for(e=e.firstContext;e!==null;){if(!bi(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gr(e){nu=e,Ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return Oa&&console.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()."),Xp(nu,e)}function Xl(e,t){return nu===null&&gr(e),Xp(e,t)}function Xp(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ma===null){if(e===null)throw 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().");Ma=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else Ma=Ma.next=t;return i}function xh(){return{controller:new xN,data:new Map,refCount:0}}function vr(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function lo(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&CN(AN,function(){e.controller.abort()})}function Nn(e,t,i){(e&127)!==0?0>qn&&(qn=zt(),Qo=su(t),qf=t,i!=null&&(Pf=R(i)),(lt&(Qt|Ui))!==ti&&(Mt=!0,qs=Xo),e=Ro(),t=ko(),e!==ja||t!==Ko?ja=-1.1:t!==null&&(qs=Xo),Rr=e,Ko=t):(e&4194048)!==0&&0>Ji&&(Ji=zt(),Zo=su(t),Y_=t,i!=null&&(X_=R(i)),0>hs)&&(e=Ro(),t=ko(),(e!==Fs||t!==Tr)&&(Fs=-1.1),Ps=e,Tr=t)}function Py(e){if(0>qn){qn=zt(),Qo=e._debugTask!=null?e._debugTask:null,(lt&(Qt|Ui))!==ti&&(qs=Xo);var t=Ro(),i=ko();t!==ja||i!==Ko?ja=-1.1:i!==null&&(qs=Xo),Rr=t,Ko=i}0>Ji&&(Ji=zt(),Zo=e._debugTask!=null?e._debugTask:null,0>hs)&&(e=Ro(),t=ko(),(e!==Fs||t!==Tr)&&(Fs=-1.1),Ps=e,Tr=t)}function Zn(){var e=Dr;return Dr=0,e}function Ql(e){var t=Dr;return Dr=e,t}function co(e){var t=Dr;return Dr+=e,t}function Kl(){Be=je=-1.1}function Ri(){var e=je;return je=-1.1,e}function Ti(e){0<=e&&(je=e)}function En(){var e=kt;return kt=-0,e}function xn(e){0<=e&&(kt=e)}function Cn(){var e=Dt;return Dt=null,e}function An(){var e=Mt;return Mt=!1,e}function Ch(e){gi=zt(),0>e.actualStartTime&&(e.actualStartTime=gi)}function Ah(e){if(0<=gi){var t=zt()-gi;e.actualDuration+=t,e.selfBaseDuration=t,gi=-1}}function Qp(e){if(0<=gi){var t=zt()-gi;e.actualDuration+=t,gi=-1}}function Dn(){if(0<=gi){var e=zt(),t=e-gi;gi=-1,Dr+=t,kt+=t,Be=e}}function Kp(e){Dt===null&&(Dt=[]),Dt.push(e),cs===null&&(cs=[]),cs.push(e)}function kn(){gi=zt(),0>je&&(je=gi)}function uo(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Fy(e,t){if(el===null){var i=el=[];Gf=0,Mr=Wd(),La={status:"pending",value:void 0,then:function(n){i.push(n)}}}return Gf++,t.then(Zp,Zp),t}function Zp(){if(--Gf===0&&(-1<Ji||(hs=-1.1),el!==null)){La!==null&&(La.status="fulfilled");var e=el;el=null,Mr=0,La=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Gy(e,t){var i=[],n={status:"pending",value:null,reason:null,then:function(s){i.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<i.length;s++)(0,i[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<i.length;s++)(0,i[s])(void 0)}),n}function Dh(){var e=Or.current;return e!==null?e:_t.pooledCache}function Zl(e,t){t===null?B(Or,Or.current,e):B(Or,t.pool,e)}function Jp(){var e=Dh();return e===null?null:{parent:Ut._currentValue,pool:e}}function eb(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function tb(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ib(e,t,i){he.actQueue!==null&&(he.didUsePromise=!0);var n=e.thenables;if(i=n[i],i===void 0?n.push(t):i!==t&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),t.then(Yn,Yn),t=i),t._debugInfo===void 0){e=performance.now(),n=t.displayName;var s={name:typeof n=="string"?n:"Promise",start:e,end:e,value:t};t._debugInfo=[{awaited:s}],t.status!=="fulfilled"&&t.status!=="rejected"&&(e=function(){s.end=performance.now()},t.then(e,e))}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sb(e),e;default:if(typeof t.status=="string")t.then(Yn,Yn);else{if(e=_t,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=r}},function(r){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sb(e),e}throw Lr=t,ol=!0,Wa}}function xs(e){try{return MN(e)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Lr=t,ol=!0,Wa):t}}function nb(){if(Lr===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Lr;return Lr=null,ol=!1,e}function sb(e){if(e===Wa||e===du)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ii(e){var t=Qe;return e!=null&&(Qe=t===null?e:t.concat(e)),t}function kh(){var e=Qe;if(e!=null){for(var t=e.length-1;0<=t;t--)if(e[t].name!=null){var i=e[t].debugTask;if(i!=null)return i}}return null}function Jl(e,t,i){for(var n=Object.keys(e.props),s=0;s<n.length;s++){var r=n[s];if(r!=="children"&&r!=="key"){t===null&&(t=Pl(e,i.mode,0),t._debugInfo=Qe,t.return=i),oe(t,function(d){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",d)},r);break}}}function ec(e){var t=ll;return ll+=1,Ba===null&&(Ba=eb()),ib(Ba,e,t)}function ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rb(e,t){throw t.$$typeof===u1?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
139
|
+
- Multiple copies of the "react" package is used.
|
|
140
|
+
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
141
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function tc(e,t){var i=kh();i!==null?i.run(rb.bind(null,e,t)):rb(e,t)}function ab(e,t){var i=R(e)||"Component";p0[i]||(p0[i]=!0,t=t.displayName||t.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
142
|
+
root.render(%s)`,t,t,t):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
143
|
+
<%s>{%s}</%s>`,t,t,i,t,i))}function ic(e,t){var i=kh();i!==null?i.run(ab.bind(null,e,t)):ab(e,t)}function ob(e,t){var i=R(e)||"Component";b0[i]||(b0[i]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
|
|
144
|
+
root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
|
|
145
|
+
<%s>%s</%s>`,i,t,i))}function nc(e,t){var i=kh();i!==null?i.run(ob.bind(null,e,t)):ob(e,t)}function lb(e){function t(q,G){if(e){var Q=q.deletions;Q===null?(q.deletions=[G],q.flags|=16):Q.push(G)}}function i(q,G){if(!e)return null;for(;G!==null;)t(q,G),G=G.sibling;return null}function n(q){for(var G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function s(q,G){return q=Xn(q,G),q.index=0,q.sibling=null,q}function r(q,G,Q){return q.index=Q,e?(Q=q.alternate,Q!==null?(Q=Q.index,Q<G?(q.flags|=67108866,G):Q):(q.flags|=67108866,G)):(q.flags|=1048576,G)}function d(q){return e&&q.alternate===null&&(q.flags|=67108866),q}function g(q,G,Q,fe){return G===null||G.tag!==6?(G=gh(Q,q.mode,fe),G.return=q,G._debugOwner=q,G._debugTask=q._debugTask,G._debugInfo=Qe,G):(G=s(G,Q),G.return=q,G._debugInfo=Qe,G)}function A(q,G,Q,fe){var Ee=Q.type;return Ee===ga?(G=K(q,G,Q.props.children,fe,Q.key),Jl(Q,G,q),G):G!==null&&(G.elementType===Ee||Vp(G,Q)||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Li&&xs(Ee)===G.type)?(G=s(G,Q.props),ho(G,Q),G.return=q,G._debugOwner=Q._owner,G._debugInfo=Qe,G):(G=Pl(Q,q.mode,fe),ho(G,Q),G.return=q,G._debugInfo=Qe,G)}function O(q,G,Q,fe){return G===null||G.tag!==4||G.stateNode.containerInfo!==Q.containerInfo||G.stateNode.implementation!==Q.implementation?(G=vh(Q,q.mode,fe),G.return=q,G._debugInfo=Qe,G):(G=s(G,Q.children||[]),G.return=q,G._debugInfo=Qe,G)}function K(q,G,Q,fe,Ee){return G===null||G.tag!==7?(G=mr(Q,q.mode,fe,Ee),G.return=q,G._debugOwner=q,G._debugTask=q._debugTask,G._debugInfo=Qe,G):(G=s(G,Q),G.return=q,G._debugInfo=Qe,G)}function Z(q,G,Q){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=gh(""+G,q.mode,Q),G.return=q,G._debugOwner=q,G._debugTask=q._debugTask,G._debugInfo=Qe,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case Wn:return Q=Pl(G,q.mode,Q),ho(Q,G),Q.return=q,q=ii(G._debugInfo),Q._debugInfo=Qe,Qe=q,Q;case ba:return G=vh(G,q.mode,Q),G.return=q,G._debugInfo=Qe,G;case Li:var fe=ii(G._debugInfo);return G=xs(G),q=Z(q,G,Q),Qe=fe,q}if(Yt(G)||D(G))return Q=mr(G,q.mode,Q,null),Q.return=q,Q._debugOwner=q,Q._debugTask=q._debugTask,q=ii(G._debugInfo),Q._debugInfo=Qe,Qe=q,Q;if(typeof G.then=="function")return fe=ii(G._debugInfo),q=Z(q,ec(G),Q),Qe=fe,q;if(G.$$typeof===Bn)return Z(q,Xl(q,G),Q);tc(q,G)}return typeof G=="function"&&ic(q,G),typeof G=="symbol"&&nc(q,G),null}function F(q,G,Q,fe){var Ee=G!==null?G.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Ee!==null?null:g(q,G,""+Q,fe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Wn:return Q.key===Ee?(Ee=ii(Q._debugInfo),q=A(q,G,Q,fe),Qe=Ee,q):null;case ba:return Q.key===Ee?O(q,G,Q,fe):null;case Li:return Ee=ii(Q._debugInfo),Q=xs(Q),q=F(q,G,Q,fe),Qe=Ee,q}if(Yt(Q)||D(Q))return Ee!==null?null:(Ee=ii(Q._debugInfo),q=K(q,G,Q,fe,null),Qe=Ee,q);if(typeof Q.then=="function")return Ee=ii(Q._debugInfo),q=F(q,G,ec(Q),fe),Qe=Ee,q;if(Q.$$typeof===Bn)return F(q,G,Xl(q,Q),fe);tc(q,Q)}return typeof Q=="function"&&ic(q,Q),typeof Q=="symbol"&&nc(q,Q),null}function re(q,G,Q,fe,Ee){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return q=q.get(Q)||null,g(G,q,""+fe,Ee);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case Wn:return Q=q.get(fe.key===null?Q:fe.key)||null,q=ii(fe._debugInfo),G=A(G,Q,fe,Ee),Qe=q,G;case ba:return q=q.get(fe.key===null?Q:fe.key)||null,O(G,q,fe,Ee);case Li:var Ue=ii(fe._debugInfo);return fe=xs(fe),G=re(q,G,Q,fe,Ee),Qe=Ue,G}if(Yt(fe)||D(fe))return Q=q.get(Q)||null,q=ii(fe._debugInfo),G=K(G,Q,fe,Ee,null),Qe=q,G;if(typeof fe.then=="function")return Ue=ii(fe._debugInfo),G=re(q,G,Q,ec(fe),Ee),Qe=Ue,G;if(fe.$$typeof===Bn)return re(q,G,Q,Xl(G,fe),Ee);tc(G,fe)}return typeof fe=="function"&&ic(G,fe),typeof fe=="symbol"&&nc(G,fe),null}function Ne(q,G,Q,fe){if(typeof Q!="object"||Q===null)return fe;switch(Q.$$typeof){case Wn:case ba:N(q,G,Q);var Ee=Q.key;if(typeof Ee!="string")break;if(fe===null){fe=new Set,fe.add(Ee);break}if(!fe.has(Ee)){fe.add(Ee);break}oe(G,function(){console.error("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.",Ee)});break;case Li:Q=xs(Q),Ne(q,G,Q,fe)}return fe}function xe(q,G,Q,fe){for(var Ee=null,Ue=null,Oe=null,Re=G,Ge=G=0,Ct=null;Re!==null&&Ge<Q.length;Ge++){Re.index>Ge?(Ct=Re,Re=null):Ct=Re.sibling;var Vt=F(q,Re,Q[Ge],fe);if(Vt===null){Re===null&&(Re=Ct);break}Ee=Ne(q,Vt,Q[Ge],Ee),e&&Re&&Vt.alternate===null&&t(q,Re),G=r(Vt,G,Ge),Oe===null?Ue=Vt:Oe.sibling=Vt,Oe=Vt,Re=Ct}if(Ge===Q.length)return i(q,Re),it&&Qn(q,Ge),Ue;if(Re===null){for(;Ge<Q.length;Ge++)Re=Z(q,Q[Ge],fe),Re!==null&&(Ee=Ne(q,Re,Q[Ge],Ee),G=r(Re,G,Ge),Oe===null?Ue=Re:Oe.sibling=Re,Oe=Re);return it&&Qn(q,Ge),Ue}for(Re=n(Re);Ge<Q.length;Ge++)Ct=re(Re,q,Ge,Q[Ge],fe),Ct!==null&&(Ee=Ne(q,Ct,Q[Ge],Ee),e&&Ct.alternate!==null&&Re.delete(Ct.key===null?Ge:Ct.key),G=r(Ct,G,Ge),Oe===null?Ue=Ct:Oe.sibling=Ct,Oe=Ct);return e&&Re.forEach(function(_s){return t(q,_s)}),it&&Qn(q,Ge),Ue}function St(q,G,Q,fe){if(Q==null)throw Error("An iterable object provided no iterator.");for(var Ee=null,Ue=null,Oe=G,Re=G=0,Ge=null,Ct=null,Vt=Q.next();Oe!==null&&!Vt.done;Re++,Vt=Q.next()){Oe.index>Re?(Ge=Oe,Oe=null):Ge=Oe.sibling;var _s=F(q,Oe,Vt.value,fe);if(_s===null){Oe===null&&(Oe=Ge);break}Ct=Ne(q,_s,Vt.value,Ct),e&&Oe&&_s.alternate===null&&t(q,Oe),G=r(_s,G,Re),Ue===null?Ee=_s:Ue.sibling=_s,Ue=_s,Oe=Ge}if(Vt.done)return i(q,Oe),it&&Qn(q,Re),Ee;if(Oe===null){for(;!Vt.done;Re++,Vt=Q.next())Oe=Z(q,Vt.value,fe),Oe!==null&&(Ct=Ne(q,Oe,Vt.value,Ct),G=r(Oe,G,Re),Ue===null?Ee=Oe:Ue.sibling=Oe,Ue=Oe);return it&&Qn(q,Re),Ee}for(Oe=n(Oe);!Vt.done;Re++,Vt=Q.next())Ge=re(Oe,q,Re,Vt.value,fe),Ge!==null&&(Ct=Ne(q,Ge,Vt.value,Ct),e&&Ge.alternate!==null&&Oe.delete(Ge.key===null?Re:Ge.key),G=r(Ge,G,Re),Ue===null?Ee=Ge:Ue.sibling=Ge,Ue=Ge);return e&&Oe.forEach(function(iE){return t(q,iE)}),it&&Qn(q,Re),Ee}function rt(q,G,Q,fe){if(typeof Q=="object"&&Q!==null&&Q.type===ga&&Q.key===null&&(Jl(Q,null,q),Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Wn:var Ee=ii(Q._debugInfo);e:{for(var Ue=Q.key;G!==null;){if(G.key===Ue){if(Ue=Q.type,Ue===ga){if(G.tag===7){i(q,G.sibling),fe=s(G,Q.props.children),fe.return=q,fe._debugOwner=Q._owner,fe._debugInfo=Qe,Jl(Q,fe,q),q=fe;break e}}else if(G.elementType===Ue||Vp(G,Q)||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===Li&&xs(Ue)===G.type){i(q,G.sibling),fe=s(G,Q.props),ho(fe,Q),fe.return=q,fe._debugOwner=Q._owner,fe._debugInfo=Qe,q=fe;break e}i(q,G);break}else t(q,G);G=G.sibling}Q.type===ga?(fe=mr(Q.props.children,q.mode,fe,Q.key),fe.return=q,fe._debugOwner=q,fe._debugTask=q._debugTask,fe._debugInfo=Qe,Jl(Q,fe,q),q=fe):(fe=Pl(Q,q.mode,fe),ho(fe,Q),fe.return=q,fe._debugInfo=Qe,q=fe)}return q=d(q),Qe=Ee,q;case ba:e:{for(Ee=Q,Q=Ee.key;G!==null;){if(G.key===Q)if(G.tag===4&&G.stateNode.containerInfo===Ee.containerInfo&&G.stateNode.implementation===Ee.implementation){i(q,G.sibling),fe=s(G,Ee.children||[]),fe.return=q,q=fe;break e}else{i(q,G);break}else t(q,G);G=G.sibling}fe=vh(Ee,q.mode,fe),fe.return=q,q=fe}return d(q);case Li:return Ee=ii(Q._debugInfo),Q=xs(Q),q=rt(q,G,Q,fe),Qe=Ee,q}if(Yt(Q))return Ee=ii(Q._debugInfo),q=xe(q,G,Q,fe),Qe=Ee,q;if(D(Q)){if(Ee=ii(Q._debugInfo),Ue=D(Q),typeof Ue!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Oe=Ue.call(Q);return Oe===Q?(q.tag!==0||Object.prototype.toString.call(q.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Oe)!=="[object Generator]")&&(f0||console.error("Using Iterators 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. You can also use an Iterable that can iterate multiple times over the same items."),f0=!0):Q.entries!==Ue||Kf||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Kf=!0),q=St(q,G,Oe,fe),Qe=Ee,q}if(typeof Q.then=="function")return Ee=ii(Q._debugInfo),q=rt(q,G,ec(Q),fe),Qe=Ee,q;if(Q.$$typeof===Bn)return rt(q,G,Xl(q,Q),fe);tc(q,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Ee=""+Q,G!==null&&G.tag===6?(i(q,G.sibling),fe=s(G,Ee),fe.return=q,q=fe):(i(q,G),fe=gh(Ee,q.mode,fe),fe.return=q,fe._debugOwner=q,fe._debugTask=q._debugTask,fe._debugInfo=Qe,q=fe),d(q)):(typeof Q=="function"&&ic(q,Q),typeof Q=="symbol"&&nc(q,Q),i(q,G))}return function(q,G,Q,fe){var Ee=Qe;Qe=null;try{ll=0;var Ue=rt(q,G,Q,fe);return Ba=null,Ue}catch(Ct){if(Ct===Wa||Ct===du)throw Ct;var Oe=m(29,Ct,null,q.mode);Oe.lanes=fe,Oe.return=q;var Re=Oe._debugInfo=Qe;if(Oe._debugOwner=q._debugOwner,Oe._debugTask=q._debugTask,Re!=null){for(var Ge=Re.length-1;0<=Ge;Ge--)if(typeof Re[Ge].stack=="string"){Oe._debugOwner=Re[Ge],Oe._debugTask=Re[Ge].debugTask;break}}return Oe}finally{Qe=Ee}}}function cb(e,t){var i=Yt(e);return e=!i&&typeof D(e)=="function",i||e?(i=i?"array":"iterable",console.error("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>",i,t,i),!1):!0}function Rh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Th(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Cs(e){return{lane:e,tag:v0,payload:null,callback:null,next:null}}function As(e,t,i){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Jf===n&&!y0){var s=R(e);console.error(`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.
|
|
146
|
+
|
|
147
|
+
Please update the following component: %s`,s),y0=!0}return(lt&Qt)!==ti?(s=n.pending,s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=ql(e),Bp(e,null,i),t):($l(e,n,t,i),ql(e))}function fo(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,i|=n,t.lanes=i,Ot(e,i)}}function sc(e,t){var i=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,i===n)){var s=null,r=null;if(i=i.firstBaseUpdate,i!==null){do{var d={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};r===null?s=r=d:r=r.next=d,i=i.next}while(i!==null);r===null?s=r=t:r=r.next=t}else s=r=t;i={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:n.shared,callbacks:n.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function mo(){if(em){var e=La;if(e!==null)throw e}}function po(e,t,i,n){em=!1;var s=e.updateQueue;Gs=!1,Jf=s.shared;var r=s.firstBaseUpdate,d=s.lastBaseUpdate,g=s.shared.pending;if(g!==null){s.shared.pending=null;var A=g,O=A.next;A.next=null,d===null?r=O:d.next=O,d=A;var K=e.alternate;K!==null&&(K=K.updateQueue,g=K.lastBaseUpdate,g!==d&&(g===null?K.firstBaseUpdate=O:g.next=O,K.lastBaseUpdate=A))}if(r!==null){var Z=s.baseState;d=0,K=O=A=null,g=r;do{var F=g.lane&-536870913,re=F!==g.lane;if(re?(Ke&F)===F:(n&F)===F){F!==0&&F===Mr&&(em=!0),K!==null&&(K=K.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{F=e;var Ne=g,xe=t,St=i;switch(Ne.tag){case _0:if(Ne=Ne.payload,typeof Ne=="function"){Oa=!0;var rt=Ne.call(St,Z,xe);if(F.mode&ci){Ae(!0);try{Ne.call(St,Z,xe)}finally{Ae(!1)}}Oa=!1,Z=rt;break e}Z=Ne;break e;case Zf:F.flags=F.flags&-65537|128;case v0:if(rt=Ne.payload,typeof rt=="function"){if(Oa=!0,Ne=rt.call(St,Z,xe),F.mode&ci){Ae(!0);try{rt.call(St,Z,xe)}finally{Ae(!1)}}Oa=!1}else Ne=rt;if(Ne==null)break e;Z=tt({},Z,Ne);break e;case w0:Gs=!0}}F=g.callback,F!==null&&(e.flags|=64,re&&(e.flags|=8192),re=s.callbacks,re===null?s.callbacks=[F]:re.push(F))}else re={lane:F,tag:g.tag,payload:g.payload,callback:g.callback,next:null},K===null?(O=K=re,A=Z):K=K.next=re,d|=F;if(g=g.next,g===null){if(g=s.shared.pending,g===null)break;re=g,g=re.next,re.next=null,s.lastBaseUpdate=re,s.shared.pending=null}}while(!0);K===null&&(A=Z),s.baseState=A,s.firstBaseUpdate=O,s.lastBaseUpdate=K,r===null&&(s.shared.lanes=0),Qs|=d,e.lanes=d,e.memoizedState=Z}Jf=null}function ub(e,t){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function Yy(e,t){var i=e.shared.hiddenCallbacks;if(i!==null)for(e.shared.hiddenCallbacks=null,e=0;e<i.length;e++)ub(i[e],t)}function hb(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ub(i[e],t)}function db(e,t){var i=Fn;B(mu,i,e),B(Va,t,e),Fn=i|t.baseLanes}function Mh(e){B(mu,Fn,e),B(Va,Va.current,e)}function Oh(e){Fn=mu.current,I(Va,e),I(mu,e)}function Ds(e){var t=e.alternate;B(Bt,Bt.current&Ha,e),B(Vi,e,e),en===null&&(t===null||Va.current!==null||t.memoizedState!==null)&&(en=e)}function jh(e){B(Bt,Bt.current,e),B(Vi,e,e),en===null&&(en=e)}function fb(e){e.tag===22?(B(Bt,Bt.current,e),B(Vi,e,e),en===null&&(en=e)):ks(e)}function ks(e){B(Bt,Bt.current,e),B(Vi,Vi.current,e)}function Mi(e){I(Vi,e),en===e&&(en=null),I(Bt,e)}function rc(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Gd(i)||Yd(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;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}function et(){var e=le;nn===null?nn=[e]:nn.push(e)}function _e(){var e=le;if(nn!==null&&(ms++,nn[ms]!==e)){var t=R(He);if(!S0.has(t)&&(S0.add(t),nn!==null)){for(var i="",n=0;n<=ms;n++){var s=nn[n],r=n===ms?e:s;for(s=n+1+". "+s;30>s.length;)s+=" ";s+=r+`
|
|
148
|
+
`,i+=s}console.error(`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://react.dev/link/rules-of-hooks
|
|
149
|
+
|
|
150
|
+
Previous render Next render
|
|
151
|
+
------------------------------------------------------
|
|
152
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
153
|
+
`,t,i)}}}function na(e){e==null||Yt(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",le,typeof e)}function ac(){var e=R(He);E0.has(e)||(E0.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function jt(){throw 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:
|
|
154
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
155
|
+
2. You might be breaking the Rules of Hooks
|
|
156
|
+
3. You might have more than one copy of React in the same app
|
|
157
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Lh(e,t){if(hl)return!1;if(t===null)return console.error("%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.",le),!1;e.length!==t.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
158
|
+
|
|
159
|
+
Previous: %s
|
|
160
|
+
Incoming: %s`,le,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var i=0;i<t.length&&i<e.length;i++)if(!bi(e[i],t[i]))return!1;return!0}function Wh(e,t,i,n,s,r){ds=r,He=t,nn=e!==null?e._debugHookTypes:null,ms=-1,hl=e!==null&&e.type!==t.type,(Object.prototype.toString.call(i)==="[object AsyncFunction]"||Object.prototype.toString.call(i)==="[object AsyncGeneratorFunction]")&&(r=R(He),tm.has(r)||(tm.add(r),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",r===null?"An unknown Component":"<"+r+">"))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,he.H=e!==null&&e.memoizedState!==null?nm:nn!==null?x0:im,Br=r=(t.mode&ci)!==Ve;var d=Yf(i,n,s);if(Br=!1,za&&(d=Bh(t,i,n,s)),r){Ae(!0);try{d=Bh(t,i,n,s)}finally{Ae(!1)}}return mb(e,t),d}function mb(e,t){t._debugHookTypes=nn,t.dependencies===null?fs!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:fs}):t.dependencies._debugThenableState=fs,he.H=dl;var i=vt!==null&&vt.next!==null;if(ds=0,nn=le=It=vt=He=null,ms=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),bu=!1,ul=0,fs=null,i)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||$t||(e=e.dependencies,e!==null&&Yl(e)&&($t=!0)),ol?(ol=!1,e=!0):e=!1,e&&(t=R(t)||"Unknown",N0.has(t)||tm.has(t)||(N0.add(t),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Bh(e,t,i,n){He=e;var s=0;do{if(za&&(fs=null),ul=0,za=!1,s>=jN)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(s+=1,hl=!1,It=vt=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}ms=-1,he.H=C0,r=Yf(t,i,n)}while(za);return r}function Xy(){var e=he.H,t=e.useState()[0];return t=typeof t.then=="function"?bo(t):t,e=e.useState()[0],(vt!==null?vt.memoizedState:null)!==e&&(He.flags|=1024),t}function Vh(){var e=gu!==0;return gu=0,e}function Hh(e,t,i){t.updateQueue=e.updateQueue,t.flags=(t.mode&hn)!==Ve?t.flags&-402655237:t.flags&-2053,e.lanes&=~i}function Uh(e){if(bu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bu=!1}ds=0,nn=It=vt=He=null,ms=-1,le=null,za=!1,ul=gu=0,fs=null}function di(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?He.memoizedState=It=e:It=It.next=e,It}function mt(){if(vt===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=vt.next;var t=It===null?He.memoizedState:It.next;if(t!==null)It=t,vt=e;else{if(e===null)throw He.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");vt=e,e={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},It===null?He.memoizedState=It=e:It=It.next=e}return It}function oc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bo(e){var t=ul;return ul+=1,fs===null&&(fs=eb()),e=ib(fs,e,t),t=He,(It===null?t.memoizedState:It.next)===null&&(t=t.alternate,he.H=t!==null&&t.memoizedState!==null?nm:im),e}function Rs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bo(e);if(e.$$typeof===Bn)return At(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function _r(e){var t=null,i=He.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var n=He.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=oc(),He.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0||hl)for(i=t.data[t.index]=Array(e),n=0;n<e;n++)i[n]=h1;else i.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",i.length,e);return t.index++,i}function ln(e,t){return typeof t=="function"?t(e):t}function zh(e,t,i){var n=di();if(i!==void 0){var s=i(t);if(Br){Ae(!0);try{i(t)}finally{Ae(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=eS.bind(null,He,e),[n.memoizedState,e]}function sa(e){var t=mt();return Ih(t,vt,e)}function Ih(e,t,i){var n=e.queue;if(n===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");n.lastRenderedReducer=i;var s=e.baseQueue,r=n.pending;if(r!==null){if(s!==null){var d=s.next;s.next=r.next,r.next=d}t.baseQueue!==s&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),t.baseQueue=s=r,n.pending=null}if(r=e.baseState,s===null)e.memoizedState=r;else{t=s.next;var g=d=null,A=null,O=t,K=!1;do{var Z=O.lane&-536870913;if(Z!==O.lane?(Ke&Z)===Z:(ds&Z)===Z){var F=O.revertLane;if(F===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),Z===Mr&&(K=!0);else if((ds&F)===F){O=O.next,F===Mr&&(K=!0);continue}else Z={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},A===null?(g=A=Z,d=r):A=A.next=Z,He.lanes|=F,Qs|=F;Z=O.action,Br&&i(r,Z),r=O.hasEagerState?O.eagerState:i(r,Z)}else F={lane:Z,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},A===null?(g=A=F,d=r):A=A.next=F,He.lanes|=Z,Qs|=Z;O=O.next}while(O!==null&&O!==t);if(A===null?d=r:A.next=g,!bi(r,e.memoizedState)&&($t=!0,K&&(i=La,i!==null)))throw i;e.memoizedState=r,e.baseState=d,e.baseQueue=A,n.lastRenderedState=r}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function go(e){var t=mt(),i=t.queue;if(i===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");i.lastRenderedReducer=e;var n=i.dispatch,s=i.pending,r=t.memoizedState;if(s!==null){i.pending=null;var d=s=s.next;do r=e(r,d.action),d=d.next;while(d!==s);bi(r,t.memoizedState)||($t=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),i.lastRenderedState=r}return[r,n]}function $h(e,t,i){var n=He,s=di();if(it){if(i===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var r=i();Ua||r===i()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Ua=!0)}else{if(r=t(),Ua||(i=t(),bi(r,i)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ua=!0)),_t===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Ke&127)!==0||pb(n,t,r)}return s.memoizedState=r,i={value:r,getSnapshot:t},s.queue=i,hc(gb.bind(null,n,i,e),[e]),n.flags|=2048,aa(tn|_i,{destroy:void 0},bb.bind(null,n,i,r,t),null),r}function lc(e,t,i){var n=He,s=mt(),r=it;if(r){if(i===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");i=i()}else if(i=t(),!Ua){var d=t();bi(i,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ua=!0)}(d=!bi((vt||s).memoizedState,i))&&(s.memoizedState=i,$t=!0),s=s.queue;var g=gb.bind(null,n,s,e);if(Si(2048,_i,g,[e]),s.getSnapshot!==t||d||It!==null&&It.memoizedState.tag&tn){if(n.flags|=2048,aa(tn|_i,{destroy:void 0},bb.bind(null,n,s,i,t),null),_t===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");r||(ds&127)!==0||pb(n,t,i)}return i}function pb(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=He.updateQueue,t===null?(t=oc(),He.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function bb(e,t,i,n){t.value=i,t.getSnapshot=n,vb(t)&&_b(e)}function gb(e,t,i){return i(function(){vb(t)&&(Nn(2,"updateSyncExternalStore()",e),_b(e))})}function vb(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!bi(e,i)}catch{return!0}}function _b(e){var t=oi(e,2);t!==null&&Tt(t,e,2)}function qh(e){var t=di();if(typeof e=="function"){var i=e;if(e=i(),Br){Ae(!0);try{i()}finally{Ae(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ln,lastRenderedState:e},t}function Ph(e){e=qh(e);var t=e.queue,i=Vb.bind(null,He,t);return t.dispatch=i,[e.memoizedState,i]}function Fh(e){var t=di();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ad.bind(null,He,!0,i),i.dispatch=t,[e,t]}function wb(e,t){var i=mt();return yb(i,vt,e,t)}function yb(e,t,i,n){return e.baseState=i,Ih(e,vt,typeof n=="function"?n:ln)}function Sb(e,t){var i=mt();return vt!==null?yb(i,vt,e,t):(i.baseState=e,[e,i.queue.dispatch])}function Qy(e,t,i,n,s){if(gc(e))throw Error("Cannot update form state while rendering.");if(e=t.action,e!==null){var r={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){r.listeners.push(d)}};he.T!==null?i(!0):r.isTransition=!1,n(r),i=t.pending,i===null?(r.next=t.pending=r,Nb(t,r)):(r.next=i.next,t.pending=i.next=r)}}function Nb(e,t){var i=t.action,n=t.payload,s=e.state;if(t.isTransition){var r=he.T,d={};d._updatedFibers=new Set,he.T=d;try{var g=i(s,n),A=he.S;A!==null&&A(d,g),Eb(e,t,g)}catch(O){Gh(e,t,O)}finally{r!==null&&d.types!==null&&(r.types!==null&&r.types!==d.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),r.types=d.types),he.T=r,r===null&&d._updatedFibers&&(e=d._updatedFibers.size,d._updatedFibers.clear(),10<e&&console.warn("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."))}}else try{d=i(s,n),Eb(e,t,d)}catch(O){Gh(e,t,O)}}function Eb(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?(he.asyncTransitions++,i.then(bc,bc),i.then(function(n){xb(e,t,n)},function(n){return Gh(e,t,n)}),t.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):xb(e,t,i)}function xb(e,t,i){t.status="fulfilled",t.value=i,Cb(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Nb(e,i)))}function Gh(e,t,i){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=i,Cb(t),t=t.next;while(t!==n)}e.action=null}function Cb(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ab(e,t){return t}function ra(e,t){if(it){var i=_t.formState;if(i!==null){e:{var n=He;if(it){if(xt){t:{for(var s=xt,r=Zi;s.nodeType!==8;){if(!r){s=null;break t}if(s=ji(s.nextSibling),s===null){s=null;break t}}r=s.data,s=r===Cm||r===hw?s:null}if(s){xt=ji(s.nextSibling),n=s.data===Cm;break e}}Ns(n)}n=!1}n&&(t=i[0])}}return i=di(),i.memoizedState=i.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ab,lastRenderedState:t},i.queue=n,i=Vb.bind(null,He,n),n.dispatch=i,n=qh(!1),r=ad.bind(null,He,!1,n.queue),n=di(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,i=Qy.bind(null,He,s,r,i),s.dispatch=i,n.memoizedState=e,[t,i,!1]}function cc(e){var t=mt();return Db(t,vt,e)}function Db(e,t,i){if(t=Ih(e,t,Ab)[0],e=sa(ln)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=bo(t)}catch(d){throw d===Wa?du:d}else n=t;t=mt();var s=t.queue,r=s.dispatch;return i!==t.memoizedState&&(He.flags|=2048,aa(tn|_i,{destroy:void 0},Ky.bind(null,s,i),null)),[n,r,e]}function Ky(e,t){e.action=t}function uc(e){var t=mt(),i=vt;if(i!==null)return Db(t,i,e);mt(),t=t.memoizedState,i=mt();var n=i.queue.dispatch;return i.memoizedState=e,[t,n,!1]}function aa(e,t,i,n){return e={tag:e,create:i,deps:n,inst:t,next:null},t=He.updateQueue,t===null&&(t=oc(),He.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(n=i.next,i.next=e,e.next=n,t.lastEffect=e),e}function Yh(e){var t=di();return e={current:e},t.memoizedState=e}function wr(e,t,i,n){var s=di();He.flags|=e,s.memoizedState=aa(tn|t,{destroy:void 0},i,n===void 0?null:n)}function Si(e,t,i,n){var s=mt();n=n===void 0?null:n;var r=s.memoizedState.inst;vt!==null&&n!==null&&Lh(n,vt.memoizedState.deps)?s.memoizedState=aa(t,r,i,n):(He.flags|=e,s.memoizedState=aa(tn|t,r,i,n))}function hc(e,t){(He.mode&hn)!==Ve?wr(276826112,_i,e,t):wr(8390656,_i,e,t)}function Zy(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=oc(),He.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Xh(e){var t=di(),i={impl:e};return t.memoizedState=i,function(){if((lt&Qt)!==ti)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return i.impl.apply(void 0,arguments)}}function dc(e){var t=mt().memoizedState;return Zy({ref:t,nextImpl:e}),function(){if((lt&Qt)!==ti)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function Qh(e,t){var i=4194308;return(He.mode&hn)!==Ve&&(i|=134217728),wr(i,Hi,e,t)}function kb(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return t.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(t).join(", ")+"}"),e=e(),t.current=e,function(){t.current=null}}function Kh(e,t,i){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),i=i!=null?i.concat([e]):null;var n=4194308;(He.mode&hn)!==Ve&&(n|=134217728),wr(n,Hi,kb.bind(null,t,e),i)}function fc(e,t,i){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),i=i!=null?i.concat([e]):null,Si(4,Hi,kb.bind(null,t,e),i)}function Zh(e,t){return di().memoizedState=[e,t===void 0?null:t],e}function mc(e,t){var i=mt();t=t===void 0?null:t;var n=i.memoizedState;return t!==null&&Lh(t,n[1])?n[0]:(i.memoizedState=[e,t],e)}function Jh(e,t){var i=di();t=t===void 0?null:t;var n=e();if(Br){Ae(!0);try{e()}finally{Ae(!1)}}return i.memoizedState=[n,t],n}function pc(e,t){var i=mt();t=t===void 0?null:t;var n=i.memoizedState;if(t!==null&&Lh(t,n[1]))return n[0];if(n=e(),Br){Ae(!0);try{e()}finally{Ae(!1)}}return i.memoizedState=[n,t],n}function ed(e,t){var i=di();return td(i,e,t)}function Rb(e,t){var i=mt();return Mb(i,vt.memoizedState,e,t)}function Tb(e,t){var i=mt();return vt===null?td(i,e,t):Mb(i,vt.memoizedState,e,t)}function td(e,t,i){return i===void 0||(ds&1073741824)!==0&&(Ke&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Og(),He.lanes|=e,Qs|=e,i)}function Mb(e,t,i,n){return bi(i,t)?i:Va.current!==null?(e=td(e,i,n),bi(e,t)||($t=!0),e):(ds&42)===0||(ds&1073741824)!==0&&(Ke&261930)===0?($t=!0,e.memoizedState=i):(e=Og(),He.lanes|=e,Qs|=e,t)}function bc(){he.asyncTransitions--}function Ob(e,t,i,n,s){var r=ft.p;ft.p=r!==0&&r<zn?r:zn;var d=he.T,g={};g._updatedFibers=new Set,he.T=g,ad(e,!1,t,i);try{var A=s(),O=he.S;if(O!==null&&O(g,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){he.asyncTransitions++,A.then(bc,bc);var K=Gy(A,n);vo(e,t,K,Oi(e))}else vo(e,t,n,Oi(e))}catch(Z){vo(e,t,{then:function(){},status:"rejected",reason:Z},Oi(e))}finally{ft.p=r,d!==null&&g.types!==null&&(d.types!==null&&d.types!==g.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),d.types=g.types),he.T=d,d===null&&g._updatedFibers&&(e=g._updatedFibers.size,g._updatedFibers.clear(),10<e&&console.warn("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."))}}function id(e,t,i,n){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var s=jb(e).queue;Py(e),Ob(e,s,t,Yr,i===null?_:function(){return Lb(e),i(n)})}function jb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Yr,baseState:Yr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ln,lastRenderedState:Yr},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ln,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Lb(e){he.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=jb(e);t.next===null&&(t=e.alternate.memoizedState),vo(e,t.next.queue,{},Oi(e))}function nd(){var e=qh(!1);return e=Ob.bind(null,He,e.queue,!0,!1),di().memoizedState=e,[!1,e]}function Wb(){var e=sa(ln)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:bo(e),t]}function Bb(){var e=go(ln)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:bo(e),t]}function yr(){return At(Al)}function sd(){var e=di(),t=_t.identifierPrefix;if(it){var i=os,n=as;i=(n&~(1<<32-fi(n)-1)).toString(32)+i,t="_"+t+"R_"+i,i=gu++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=ON++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t}function rd(){return di().memoizedState=Jy.bind(null,He)}function Jy(e,t){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var n=Oi(i),s=Cs(n),r=As(i,s,n);r!==null&&(Nn(n,"refresh()",e),Tt(r,i,n),fo(r,i,n)),e=xh(),t!=null&&r!==null&&console.error("The seed argument is not enabled outside experimental channels."),s.payload={cache:e};return}i=i.return}}function eS(e,t,i){var n=arguments;typeof n[3]=="function"&&console.error("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()."),n=Oi(e);var s={lane:n,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};gc(e)?Hb(t,s):(s=fh(e,t,s,n),s!==null&&(Nn(n,"dispatch()",e),Tt(s,e,n),Ub(s,t,n)))}function Vb(e,t,i){var n=arguments;typeof n[3]=="function"&&console.error("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()."),n=Oi(e),vo(e,t,i,n)&&Nn(n,"setState()",e)}function vo(e,t,i,n){var s={lane:n,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(gc(e))Hb(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null)){var d=he.H;he.H=fn;try{var g=t.lastRenderedState,A=r(g,i);if(s.hasEagerState=!0,s.eagerState=A,bi(A,g))return $l(e,t,s,0),_t===null&&Il(),!1}catch{}finally{he.H=d}}if(i=fh(e,t,s,n),i!==null)return Tt(i,e,n),Ub(i,t,n),!0}return!1}function ad(e,t,i,n){if(he.T===null&&Mr===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),n={lane:2,revertLane:Wd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},gc(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=fh(e,i,n,2),t!==null&&(Nn(2,"setOptimistic()",e),Tt(t,e,2))}function gc(e){var t=e.alternate;return e===He||t!==null&&t===He}function Hb(e,t){za=bu=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ub(e,t,i){if((i&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,i|=n,t.lanes=i,Ot(e,i)}}function od(e){if(e!==null&&typeof e!="function"){var t=String(e);B0.has(t)||(B0.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function ld(e,t,i,n){var s=e.memoizedState,r=i(n,s);if(e.mode&ci){Ae(!0);try{r=i(n,s)}finally{Ae(!1)}}r===void 0&&(t=y(t)||"Component",O0.has(t)||(O0.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),s=r==null?s:tt({},s,r),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}function zb(e,t,i,n,s,r,d){var g=e.stateNode;if(typeof g.shouldComponentUpdate=="function"){if(i=g.shouldComponentUpdate(n,r,d),e.mode&ci){Ae(!0);try{i=g.shouldComponentUpdate(n,r,d)}finally{Ae(!1)}}return i===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",y(t)||"Component"),i}return t.prototype&&t.prototype.isPureReactComponent?!ao(i,n)||!ao(s,r):!0}function Ib(e,t,i,n){var s=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,n),t.state!==s&&(e=R(e)||"Component",D0.has(e)||(D0.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),sm.enqueueReplaceState(t,t.state,null))}function Sr(e,t){var i=t;if("ref"in t){i={};for(var n in t)n!=="ref"&&(i[n]=t[n])}if(e=e.defaultProps){i===t&&(i=tt({},i));for(var s in e)i[s]===void 0&&(i[s]=e[s])}return i}function $b(e){Lf(e),console.warn(`%s
|
|
161
|
+
|
|
162
|
+
%s
|
|
163
|
+
`,Ia?"An error occurred in the <"+Ia+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
164
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function qb(e){var t=Ia?"The above error occurred in the <"+Ia+"> component.":"The above error occurred in one of your React components.",i="React will try to recreate this component tree from scratch using the error boundary you provided, "+((rm||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var n=e.environmentName;e=[`%o
|
|
165
|
+
|
|
166
|
+
%s
|
|
167
|
+
|
|
168
|
+
%s
|
|
169
|
+
`,e,t,i].slice(0),typeof e[0]=="string"?e.splice(0,1,_w+" "+e[0],ww,Iu+n+Iu,yw):e.splice(0,0,_w,ww,Iu+n+Iu,yw),e.unshift(console),n=eE.apply(console.error,e),n()}else console.error(`%o
|
|
170
|
+
|
|
171
|
+
%s
|
|
172
|
+
|
|
173
|
+
%s
|
|
174
|
+
`,e,t,i)}function Pb(e){Lf(e)}function vc(e,t){try{Ia=t.source?R(t.source):null,rm=null;var i=t.value;if(he.actQueue!==null)he.thrownErrors.push(i);else{var n=e.onUncaughtError;n(i,{componentStack:t.stack})}}catch(s){setTimeout(function(){throw s})}}function Fb(e,t,i){try{Ia=i.source?R(i.source):null,rm=R(t);var n=e.onCaughtError;n(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function cd(e,t,i){return i=Cs(i),i.tag=Zf,i.payload={element:null},i.callback=function(){oe(t.source,vc,e,t)},i}function ud(e){return e=Cs(e),e.tag=Zf,e}function hd(e,t,i,n){var s=i.type.getDerivedStateFromError;if(typeof s=="function"){var r=n.value;e.payload=function(){return s(r)},e.callback=function(){Hp(i),oe(n.source,Fb,t,i,n)}}var d=i.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Hp(i),oe(n.source,Fb,t,i,n),typeof s!="function"&&(Zs===null?Zs=new Set([this]):Zs.add(this)),kN(this,n),typeof s=="function"||(i.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",R(i)||"Unknown")})}function tS(e,t,i,n,s){if(i.flags|=32768,Un&&Co(e,s),n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=i.alternate,t!==null&&ia(t,i,s,!0),it&&($n=!0),i=Vi.current,i!==null){switch(i.tag){case 31:case 13:return en===null?Ac():i.alternate===null&&Rt===bs&&(Rt=wu),i.flags&=-257,i.flags|=65536,i.lanes=s,n===fu?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([n]):t.add(n),Md(e,n,s)),!1;case 22:return i.flags|=65536,n===fu?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([n]):i.add(n)),Md(e,n,s)),!1}throw Error("Unexpected Suspense handler tag ("+i.tag+"). This is a bug in React.")}return Md(e,n,s),Ac(),!1}if(it)return $n=!0,t=Vi.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==zf&&oo(ki(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:n}),i))):(n!==zf&&oo(ki(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:n}),i)),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=ki(n,i),s=cd(e.stateNode,n,s),sc(e,s),Rt!==Ys&&(Rt=Vr)),!1;var r=ki(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:n}),i);if(vl===null?vl=[r]:vl.push(r),Rt!==Ys&&(Rt=Vr),t===null)return!0;n=ki(n,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=s&-s,i.lanes|=e,e=cd(i.stateNode,n,e),sc(i,e),!1;case 1:if(t=i.type,r=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Zs===null||!Zs.has(r))))return i.flags|=65536,s&=-s,i.lanes|=s,s=ud(s),hd(s,e,i,n),sc(i,s),!1}i=i.return}while(i!==null);return!1}function ni(e,t,i,n){t.child=e===null?g0(t,null,i,n):Wr(t,e.child,i,n)}function Gb(e,t,i,n,s){i=i.render;var r=t.ref;if("ref"in n){var d={};for(var g in n)g!=="ref"&&(d[g]=n[g])}else d=n;return gr(t),n=Wh(e,t,i,d,r,s),g=Vh(),e!==null&&!$t?(Hh(e,t,s),Jn(e,t,s)):(it&&g&&_h(t),t.flags|=1,ni(e,t,n,s),t.child)}function Yb(e,t,i,n,s){if(e===null){var r=i.type;return typeof r=="function"&&!ph(r)&&r.defaultProps===void 0&&i.compare===null?(i=fr(r),t.tag=15,t.type=i,fd(t,r),Xb(e,t,i,n,s)):(e=bh(i.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!_d(e,s)){var d=r.memoizedProps;if(i=i.compare,i=i!==null?i:ao,i(d,n)&&e.ref===t.ref)return Jn(e,t,s)}return t.flags|=1,e=Xn(r,n),e.ref=t.ref,e.return=t,t.child=e}function Xb(e,t,i,n,s){if(e!==null){var r=e.memoizedProps;if(ao(r,n)&&e.ref===t.ref&&t.type===e.type)if($t=!1,t.pendingProps=n=r,_d(e,s))(e.flags&131072)!==0&&($t=!0);else return t.lanes=e.lanes,Jn(e,t,s)}return dd(e,t,i,n,s)}function Qb(e,t,i,n){var s=n.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:Go,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|i:i,e!==null){for(n=t.child=e.child,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~r}else n=0,t.child=null;return Kb(e,t,r,i,n)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zl(t,r!==null?r.cachePool:null),r!==null?db(t,r):Mh(t),fb(t);else return n=t.lanes=536870912,Kb(e,t,r!==null?r.baseLanes|i:i,i,n)}else r!==null?(Zl(t,r.cachePool),db(t,r),ks(t),t.memoizedState=null):(e!==null&&Zl(t,null),Mh(t),ks(t));return ni(e,t,s,i),t.child}function _o(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:Go,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Kb(e,t,i,n,s){var r=Dh();return r=r===null?null:{parent:Ut._currentValue,pool:r},t.memoizedState={baseLanes:i,cachePool:r},e!==null&&Zl(t,null),Mh(t),fb(t),e!==null&&ia(e,t,n,!0),t.childLanes=s,null}function _c(e,t){var i=t.hidden;return i!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
175
|
+
- <Activity %s>
|
|
176
|
+
+ <Activity %s>`,i===!0?"hidden":i===!1?"hidden={false}":"hidden={...}",i?'mode="hidden"':'mode="visible"'),t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Zb(e,t,i){return Wr(t,e.child,null,i),e=_c(t,t.pendingProps),e.flags|=2,Mi(t),t.memoizedState=null,e}function iS(e,t,i){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(it){if(n.mode==="hidden")return e=_c(t,n),t.lanes=536870912,_o(null,e);if(jh(t),(e=xt)?(i=Nv(e,Zi),i=i!==null&&i.data===qr?i:null,i!==null&&(n={dehydrated:i,treeContext:qp(),retryLane:536870912,hydrationErrors:null},t.memoizedState=n,n=Ip(i),n.return=t,t.child=n,ai=t,xt=null)):i=null,i===null)throw Fl(t,e),Ns(t);return t.lanes=536870912,null}return _c(t,n)}var r=e.memoizedState;if(r!==null){var d=r.dehydrated;if(jh(t),s)if(t.flags&256)t.flags&=-257,t=Zb(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(Fp(),(i&536870912)!==0&&Cc(t),$t||ia(e,t,i,!1),s=(i&e.childLanes)!==0,$t||s){if(n=_t,n!==null&&(d=ht(n,i),d!==0&&d!==r.retryLane))throw r.retryLane=d,oi(e,d),Tt(n,e,d),am;Ac(),t=Zb(e,t,i)}else e=r.treeContext,xt=ji(d.nextSibling),ai=t,it=!0,Is=null,$n=!1,Bi=null,Zi=!1,e!==null&&Pp(t,e),t=_c(t,n),t.flags|=4096;return t}return r=e.child,n={mode:n.mode,children:n.children},(i&536870912)!==0&&(i&e.lanes)!==0&&Cc(t),e=Xn(r,n),e.ref=t.ref,t.child=e,e.return=t,e}function wc(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==i)&&(t.flags|=4194816)}}function dd(e,t,i,n,s){if(i.prototype&&typeof i.prototype.render=="function"){var r=y(i)||"Unknown";V0[r]||(console.error("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.",r,r),V0[r]=!0)}return t.mode&ci&&dn.recordLegacyContextWarning(t,null),e===null&&(fd(t,t.type),i.contextTypes&&(r=y(i)||"Unknown",U0[r]||(U0[r]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",r)))),gr(t),i=Wh(e,t,i,n,void 0,s),n=Vh(),e!==null&&!$t?(Hh(e,t,s),Jn(e,t,s)):(it&&n&&_h(t),t.flags|=1,ni(e,t,i,s),t.child)}function Jb(e,t,i,n,s,r){return gr(t),ms=-1,hl=e!==null&&e.type!==t.type,t.updateQueue=null,i=Bh(t,n,i,s),mb(e,t),n=Vh(),e!==null&&!$t?(Hh(e,t,r),Jn(e,t,r)):(it&&n&&_h(t),t.flags|=1,ni(e,t,i,r),t.child)}function eg(e,t,i,n,s){switch($(t)){case!1:var r=t.stateNode,d=new t.type(t.memoizedProps,r.context).state;r.updater.enqueueSetState(r,d,null);break;case!0:t.flags|=128,t.flags|=65536,r=Error("Simulated error coming from DevTools");var g=s&-s;if(t.lanes|=g,d=_t,d===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");g=ud(g),hd(g,d,t,ki(r,t)),sc(t,g)}if(gr(t),t.stateNode===null){if(d=zs,r=i.contextType,"contextType"in i&&r!==null&&(r===void 0||r.$$typeof!==Bn)&&!W0.has(i)&&(W0.add(i),g=r===void 0?" 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 r!="object"?" However, it is set to a "+typeof r+".":r.$$typeof===of?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(r).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",y(i)||"Component",g)),typeof r=="object"&&r!==null&&(d=At(r)),r=new i(n,d),t.mode&ci){Ae(!0);try{r=new i(n,d)}finally{Ae(!1)}}if(d=t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=sm,t.stateNode=r,r._reactInternals=t,r._reactInternalInstance=A0,typeof i.getDerivedStateFromProps=="function"&&d===null&&(d=y(i)||"Component",k0.has(d)||(k0.add(d),console.error("`%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.",d,r.state===null?"null":"undefined",d))),typeof i.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"){var A=g=d=null;if(typeof r.componentWillMount=="function"&&r.componentWillMount.__suppressDeprecationWarning!==!0?d="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(d="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps.__suppressDeprecationWarning!==!0?g="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(g="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"&&r.componentWillUpdate.__suppressDeprecationWarning!==!0?A="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(A="UNSAFE_componentWillUpdate"),d!==null||g!==null||A!==null){r=y(i)||"Component";var O=typeof i.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";T0.has(r)||(T0.add(r),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
177
|
+
|
|
178
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
179
|
+
|
|
180
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
181
|
+
https://react.dev/link/unsafe-component-lifecycles`,r,O,d!==null?`
|
|
182
|
+
`+d:"",g!==null?`
|
|
183
|
+
`+g:"",A!==null?`
|
|
184
|
+
`+A:""))}}r=t.stateNode,d=y(i)||"Component",r.render||(i.prototype&&typeof i.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",d):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",d)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||console.error("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?",d),r.getDefaultProps&&!r.getDefaultProps.isReactClassApproved&&console.error("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.",d),r.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",d),i.childContextTypes&&!L0.has(i)&&(L0.add(i),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",d)),i.contextTypes&&!j0.has(i)&&(j0.add(i),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",d)),typeof r.componentShouldUpdate=="function"&&console.error("%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.",d),i.prototype&&i.prototype.isPureReactComponent&&typeof r.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",y(i)||"A pure component"),typeof r.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",d),typeof r.componentDidReceiveProps=="function"&&console.error("%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().",d),typeof r.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",d),typeof r.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",d),g=r.props!==n,r.props!==void 0&&g&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",d),r.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",d,d),typeof r.getSnapshotBeforeUpdate!="function"||typeof r.componentDidUpdate=="function"||R0.has(i)||(R0.add(i),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",y(i))),typeof r.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof r.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",d),typeof i.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",d),(g=r.state)&&(typeof g!="object"||Yt(g))&&console.error("%s.state: must be set to an object or null",d),typeof r.getChildContext=="function"&&typeof i.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",d),r=t.stateNode,r.props=n,r.state=t.memoizedState,r.refs={},Rh(t),d=i.contextType,r.context=typeof d=="object"&&d!==null?At(d):zs,r.state===n&&(d=y(i)||"Component",M0.has(d)||(M0.add(d),console.error("%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.",d))),t.mode&ci&&dn.recordLegacyContextWarning(t,r),dn.recordUnsafeLifecycleWarnings(t,r),r.state=t.memoizedState,d=i.getDerivedStateFromProps,typeof d=="function"&&(ld(t,i,d,n),r.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(d=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),d!==r.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",R(t)||"Component"),sm.enqueueReplaceState(r,r.state,null)),po(t,n,r,s),mo(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&hn)!==Ve&&(t.flags|=134217728),r=!0}else if(e===null){r=t.stateNode;var K=t.memoizedProps;g=Sr(i,K),r.props=g;var Z=r.context;A=i.contextType,d=zs,typeof A=="object"&&A!==null&&(d=At(A)),O=i.getDerivedStateFromProps,A=typeof O=="function"||typeof r.getSnapshotBeforeUpdate=="function",K=t.pendingProps!==K,A||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(K||Z!==d)&&Ib(t,r,n,d),Gs=!1;var F=t.memoizedState;r.state=F,po(t,n,r,s),mo(),Z=t.memoizedState,K||F!==Z||Gs?(typeof O=="function"&&(ld(t,i,O,n),Z=t.memoizedState),(g=Gs||zb(t,i,g,n,F,Z,d))?(A||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&hn)!==Ve&&(t.flags|=134217728)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&hn)!==Ve&&(t.flags|=134217728),t.memoizedProps=n,t.memoizedState=Z),r.props=n,r.state=Z,r.context=d,r=g):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&hn)!==Ve&&(t.flags|=134217728),r=!1)}else{r=t.stateNode,Th(e,t),d=t.memoizedProps,A=Sr(i,d),r.props=A,O=t.pendingProps,F=r.context,Z=i.contextType,g=zs,typeof Z=="object"&&Z!==null&&(g=At(Z)),K=i.getDerivedStateFromProps,(Z=typeof K=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(d!==O||F!==g)&&Ib(t,r,n,g),Gs=!1,F=t.memoizedState,r.state=F,po(t,n,r,s),mo();var re=t.memoizedState;d!==O||F!==re||Gs||e!==null&&e.dependencies!==null&&Yl(e.dependencies)?(typeof K=="function"&&(ld(t,i,K,n),re=t.memoizedState),(A=Gs||zb(t,i,A,n,F,re,g)||e!==null&&e.dependencies!==null&&Yl(e.dependencies))?(Z||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(n,re,g),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(n,re,g)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=re),r.props=n,r.state=re,r.context=g,r=A):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),r=!1)}if(g=r,wc(e,t),d=(t.flags&128)!==0,g||d){if(g=t.stateNode,ye(t),d&&typeof i.getDerivedStateFromError!="function")i=null,gi=-1;else if(i=n0(g),t.mode&ci){Ae(!0);try{n0(g)}finally{Ae(!1)}}t.flags|=1,e!==null&&d?(t.child=Wr(t,e.child,null,s),t.child=Wr(t,null,i,s)):ni(e,t,i,s),t.memoizedState=g.state,e=t.child}else e=Jn(e,t,s);return s=t.stateNode,r&&s.props!==n&&($a||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",R(t)||"a component"),$a=!0),e}function tg(e,t,i,n){return br(),t.flags|=256,ni(e,t,i,n),t.child}function fd(e,t){t&&t.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
185
|
+
%s.childContextTypes = ...`,t.displayName||t.name||"Component"),typeof t.getDerivedStateFromProps=="function"&&(e=y(t)||"Unknown",z0[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),z0[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=y(t)||"Unknown",H0[t]||(console.error("%s: Function components do not support contextType.",t),H0[t]=!0))}function md(e){return{baseLanes:e,cachePool:Jp()}}function pd(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Ai),e}function ig(e,t,i){var n,s=t.pendingProps;ee(t)&&(t.flags|=128);var r=!1,d=(t.flags&128)!==0;if((n=d)||(n=e!==null&&e.memoizedState===null?!1:(Bt.current&cl)!==0),n&&(r=!0,t.flags&=-129),n=(t.flags&32)!==0,t.flags&=-33,e===null){if(it){if(r?Ds(t):ks(t),(e=xt)?(i=Nv(e,Zi),i=i!==null&&i.data!==qr?i:null,i!==null&&(n={dehydrated:i,treeContext:qp(),retryLane:536870912,hydrationErrors:null},t.memoizedState=n,n=Ip(i),n.return=t,t.child=n,ai=t,xt=null)):i=null,i===null)throw Fl(t,e),Ns(t);return Yd(i)?t.lanes=32:t.lanes=536870912,null}var g=s.children;if(s=s.fallback,r){ks(t);var A=t.mode;return g=yc({mode:"hidden",children:g},A),s=mr(s,A,i,null),g.return=t,s.return=t,g.sibling=s,t.child=g,s=t.child,s.memoizedState=md(i),s.childLanes=pd(e,n,i),t.memoizedState=om,_o(null,s)}return Ds(t),bd(t,g)}var O=e.memoizedState;if(O!==null){var K=O.dehydrated;if(K!==null){if(d)t.flags&256?(Ds(t),t.flags&=-257,t=gd(e,t,i)):t.memoizedState!==null?(ks(t),t.child=e.child,t.flags|=128,t=null):(ks(t),g=s.fallback,A=t.mode,s=yc({mode:"visible",children:s.children},A),g=mr(g,A,i,null),g.flags|=2,s.return=t,g.return=t,s.sibling=g,t.child=s,Wr(t,e.child,null,i),s=t.child,s.memoizedState=md(i),s.childLanes=pd(e,n,i),t.memoizedState=om,t=_o(null,s));else if(Ds(t),Fp(),(i&536870912)!==0&&Cc(t),Yd(K)){if(n=K.nextSibling&&K.nextSibling.dataset,n){g=n.dgst;var Z=n.msg;A=n.stck;var F=n.cstck}r=Z,n=g,s=A,K=F,g=r,A=K,g=Error(g||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),g.stack=s||"",g.digest=n,n=A===void 0?null:A,s={value:g,source:null,stack:n},typeof n=="string"&&Uf.set(g,s),oo(s),t=gd(e,t,i)}else if($t||ia(e,t,i,!1),n=(i&e.childLanes)!==0,$t||n){if(n=_t,n!==null&&(s=ht(n,i),s!==0&&s!==O.retryLane))throw O.retryLane=s,oi(e,s),Tt(n,e,s),am;Gd(K)||Ac(),t=gd(e,t,i)}else Gd(K)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,xt=ji(K.nextSibling),ai=t,it=!0,Is=null,$n=!1,Bi=null,Zi=!1,e!==null&&Pp(t,e),t=bd(t,s.children),t.flags|=4096);return t}}return r?(ks(t),g=s.fallback,A=t.mode,F=e.child,K=F.sibling,s=Xn(F,{mode:"hidden",children:s.children}),s.subtreeFlags=F.subtreeFlags&65011712,K!==null?g=Xn(K,g):(g=mr(g,A,i,null),g.flags|=2),g.return=t,s.return=t,s.sibling=g,t.child=s,_o(null,s),s=t.child,g=e.child.memoizedState,g===null?g=md(i):(A=g.cachePool,A!==null?(F=Ut._currentValue,A=A.parent!==F?{parent:F,pool:F}:A):A=Jp(),g={baseLanes:g.baseLanes|i,cachePool:A}),s.memoizedState=g,s.childLanes=pd(e,n,i),t.memoizedState=om,_o(e.child,s)):(O!==null&&(i&62914560)===i&&(i&e.lanes)!==0&&Cc(t),Ds(t),i=e.child,e=i.sibling,i=Xn(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i)}function bd(e,t){return t=yc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=m(22,e,null,t),e.lanes=0,e}function gd(e,t,i){return Wr(t,e.child,null,i),e=bd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ng(e,t,i){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Nh(e.return,t,i)}function vd(e,t,i,n,s,r){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:i,tailMode:s,treeForkCount:r}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=i,d.tailMode=s,d.treeForkCount=r)}function sg(e,t,i){var n=t.pendingProps,s=n.revealOrder,r=n.tail,d=n.children,g=Bt.current;if((n=(g&cl)!==0)?(g=g&Ha|cl,t.flags|=128):g&=Ha,B(Bt,g,t),g=s??"null",s!=="forwards"&&s!=="unstable_legacy-backwards"&&s!=="together"&&s!=="independent"&&!I0[g])if(I0[g]=!0,s==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(s==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof s=="string")switch(s.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',s,s.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',s,s.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',s)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',s);g=r??"null",_u[g]||(r==null?(s==="forwards"||s==="backwards"||s==="unstable_legacy-backwards")&&(_u[g]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):r!=="visible"&&r!=="collapsed"&&r!=="hidden"?(_u[g]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',r)):s!=="forwards"&&s!=="backwards"&&s!=="unstable_legacy-backwards"&&(_u[g]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',r)));e:if((s==="forwards"||s==="backwards"||s==="unstable_legacy-backwards")&&d!==void 0&&d!==null&&d!==!1)if(Yt(d)){for(g=0;g<d.length;g++)if(!cb(d[g],g))break e}else if(g=D(d),typeof g=="function"){if(g=g.call(d))for(var A=g.next(),O=0;!A.done;A=g.next()){if(!cb(A.value,O))break e;O++}}else console.error('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?',s);if(ni(e,t,d,i),it?(Ss(),d=Yo):d=0,!n&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ng(e,i,t);else if(e.tag===19)ng(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(i=t.child,s=null;i!==null;)e=i.alternate,e!==null&&rc(e)===null&&(s=i),i=i.sibling;i=s,i===null?(s=t.child,t.child=null):(s=i.sibling,i.sibling=null),vd(t,!1,s,i,r,d);break;case"backwards":case"unstable_legacy-backwards":for(i=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&rc(e)===null){t.child=s;break}e=s.sibling,s.sibling=i,i=s,s=e}vd(t,!0,i,null,r,d);break;case"together":vd(t,!1,null,null,void 0,d);break;default:t.memoizedState=null}return t.child}function Jn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),gi=-1,Qs|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ia(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,i=Xn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Xn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function _d(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Yl(e)))}function nS(e,t,i){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Es(t,Ut,e.memoizedState.cache),br();break;case 27:case 5:ce(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Es(t,t.type,t.memoizedProps.value);break;case 12:(i&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var n=t.stateNode;n.effectDuration=-0,n.passiveEffectDuration=-0;break;case 31:if(t.memoizedState!==null)return t.flags|=128,jh(t),null;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ds(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ig(e,t,i):(Ds(t),e=Jn(e,t,i),e!==null?e.sibling:null);Ds(t);break;case 19:var s=(e.flags&128)!==0;if(n=(i&t.childLanes)!==0,n||(ia(e,t,i,!1),n=(i&t.childLanes)!==0),s){if(n)return sg(e,t,i);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),B(Bt,Bt.current,t),n)break;return null;case 22:return t.lanes=0,Qb(e,t,i,t.pendingProps);case 24:Es(t,Ut,e.memoizedState.cache)}return Jn(e,t,i)}function wd(e,t,i){if(t._debugNeedsRemount&&e!==null){i=bh(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),i._debugStack=t._debugStack,i._debugTask=t._debugTask;var n=t.return;if(n===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,i.index=t.index,i.sibling=t.sibling,i.return=t.return,i.ref=t.ref,i._debugInfo=t._debugInfo,t===n.child)n.child=i;else{var s=n.child;if(s===null)throw Error("Expected parent to have a child.");for(;s.sibling!==t;)if(s=s.sibling,s===null)throw Error("Expected to find the previous sibling.");s.sibling=i}return t=n.deletions,t===null?(n.deletions=[e],n.flags|=16):t.push(e),i.flags|=2,i}if(e!==null)if(e.memoizedProps!==t.pendingProps||t.type!==e.type)$t=!0;else{if(!_d(e,i)&&(t.flags&128)===0)return $t=!1,nS(e,t,i);$t=(e.flags&131072)!==0}else $t=!1,(n=it)&&(Ss(),n=(t.flags&1048576)!==0),n&&(n=t.index,Ss(),$p(t,Yo,n));switch(t.lanes=0,t.tag){case 16:e:if(n=t.pendingProps,e=xs(t.elementType),t.type=e,typeof e=="function")ph(e)?(n=Sr(e,n),t.tag=1,t.type=e=fr(e),t=eg(null,t,e,n,i)):(t.tag=0,fd(t,e),t.type=e=fr(e),t=dd(null,t,e,n,i));else{if(e!=null){if(s=e.$$typeof,s===Lo){t.tag=11,t.type=e=mh(e),t=Gb(null,t,e,n,i);break e}else if(s===zc){t.tag=14,t=Yb(null,t,e,n,i);break e}}throw t="",e!==null&&typeof e=="object"&&e.$$typeof===Li&&(t=" Did you wrap a component in React.lazy() more than once?"),i=y(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+i+". Lazy element type must resolve to a class or function."+t)}return t;case 0:return dd(e,t,t.type,t.pendingProps,i);case 1:return n=t.type,s=Sr(n,t.pendingProps),eg(e,t,n,s,i);case 3:e:{if(se(t,t.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");n=t.pendingProps;var r=t.memoizedState;s=r.element,Th(e,t),po(t,n,null,i);var d=t.memoizedState;if(n=d.cache,Es(t,Ut,n),n!==r.cache&&Eh(t,[Ut],i,!0),mo(),n=d.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=tg(e,t,n,i);break e}else if(n!==s){s=ki(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),oo(s),t=tg(e,t,n,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(xt=ji(e.firstChild),ai=t,it=!0,Is=null,$n=!1,Bi=null,Zi=!0,i=g0(t,null,n,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(br(),n===s){t=Jn(e,t,i);break e}ni(e,t,n,i)}t=t.child}return t;case 26:return wc(e,t),e===null?(i=kv(t.type,null,t.pendingProps,null))?t.memoizedState=i:it||(i=t.type,e=t.pendingProps,n=ie(Ls.current),n=Tc(n).createElement(i),n[ri]=t,n[mi]=e,si(n,i,e),Me(n),t.stateNode=n):t.memoizedState=kv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ce(t),e===null&&it&&(n=ie(Ls.current),s=de(),n=t.stateNode=Av(t.type,t.pendingProps,n,s,!1),$n||(s=pv(n,t.type,t.pendingProps,s),s!==null&&(pr(t,0).serverProps=s)),ai=t,Zi=!0,s=xt,Os(t.type)?(Rm=s,xt=ji(n.firstChild)):xt=s),ni(e,t,t.pendingProps.children,i),wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&it&&(r=de(),n=rh(t.type,r.ancestorInfo),s=xt,(d=!s)||(d=PS(s,t.type,t.pendingProps,Zi),d!==null?(t.stateNode=d,$n||(r=pv(d,t.type,t.pendingProps,r),r!==null&&(pr(t,0).serverProps=r)),ai=t,xt=ji(d.firstChild),Zi=!1,r=!0):r=!1,d=!r),d&&(n&&Fl(t,s),Ns(t))),ce(t),s=t.type,r=t.pendingProps,d=e!==null?e.memoizedProps:null,n=r.children,Pd(s,r)?n=null:d!==null&&Pd(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Wh(e,t,Xy,null,null,i),Al._currentValue=s),wc(e,t),ni(e,t,n,i),t.child;case 6:return e===null&&it&&(i=t.pendingProps,e=de(),n=e.ancestorInfo.current,i=n!=null?Wl(i,n.tag,e.ancestorInfo.implicitRootScope):!0,e=xt,(n=!e)||(n=FS(e,t.pendingProps,Zi),n!==null?(t.stateNode=n,ai=t,xt=null,n=!0):n=!1,n=!n),n&&(i&&Fl(t,e),Ns(t))),null;case 13:return ig(e,t,i);case 4:return se(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Wr(t,null,n,i):ni(e,t,n,i),t.child;case 11:return Gb(e,t,t.type,t.pendingProps,i);case 7:return ni(e,t,t.pendingProps,i),t.child;case 8:return ni(e,t,t.pendingProps.children,i),t.child;case 12:return t.flags|=4,t.flags|=2048,n=t.stateNode,n.effectDuration=-0,n.passiveEffectDuration=-0,ni(e,t,t.pendingProps.children,i),t.child;case 10:return n=t.type,s=t.pendingProps,r=s.value,"value"in s||$0||($0=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Es(t,n,r),ni(e,t,s.children,i),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,typeof n!="function"&&console.error("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."),gr(t),s=At(s),n=Yf(n,s,void 0),t.flags|=1,ni(e,t,n,i),t.child;case 14:return Yb(e,t,t.type,t.pendingProps,i);case 15:return Xb(e,t,t.type,t.pendingProps,i);case 19:return sg(e,t,i);case 31:return iS(e,t,i);case 22:return Qb(e,t,i,t.pendingProps);case 24:return gr(t),n=At(Ut),e===null?(s=Dh(),s===null&&(s=_t,r=xh(),s.pooledCache=r,vr(r),r!==null&&(s.pooledCacheLanes|=i),s=r),t.memoizedState={parent:n,cache:s},Rh(t),Es(t,Ut,s)):((e.lanes&i)!==0&&(Th(e,t),po(t,null,null,i),mo()),s=e.memoizedState,r=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Es(t,Ut,n)):(n=r.cache,Es(t,Ut,n),n!==s.cache&&Eh(t,[Ut],i,!0))),ni(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function es(e){e.flags|=4}function yd(e,t,i,n,s){if((t=(e.mode&EN)!==Ve)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Bg())e.flags|=8192;else throw Lr=fu,Qf}else e.flags&=-16777217}function rg(e,t){if(t.type!=="stylesheet"||(t.state.loading&sn)!==Gr)e.flags&=-16777217;else if(e.flags|=16777216,!jv(t))if(Bg())e.flags|=8192;else throw Lr=fu,Qf}function Sc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ye():536870912,e.lanes|=t,zr|=t)}function wo(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var n=null;i!==null;)i.alternate!==null&&(n=i),i=i.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,n=0;if(t)if((e.mode&Xe)!==Ve){for(var s=e.selfBaseDuration,r=e.child;r!==null;)i|=r.lanes|r.childLanes,n|=r.subtreeFlags&65011712,n|=r.flags&65011712,s+=r.treeBaseDuration,r=r.sibling;e.treeBaseDuration=s}else for(s=e.child;s!==null;)i|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else if((e.mode&Xe)!==Ve){s=e.actualDuration,r=e.selfBaseDuration;for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,n|=d.subtreeFlags,n|=d.flags,s+=d.actualDuration,r+=d.treeBaseDuration,d=d.sibling;e.actualDuration=s,e.treeBaseDuration=r}else for(s=e.child;s!==null;)i|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=i,t}function sS(e,t,i){var n=t.pendingProps;switch(wh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return i=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Kn(Ut,t),ne(t),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ta(t)?(Sh(),es(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yh())),yt(t),null;case 26:var s=t.type,r=t.memoizedState;return e===null?(es(t),r!==null?(yt(t),rg(t,r)):(yt(t),yd(t,s,null,n,i))):r?r!==e.memoizedState?(es(t),yt(t),rg(t,r)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&es(t),yt(t),yd(t,s,e,n,i)),null;case 27:if(M(t),i=ie(Ls.current),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&es(t);else{if(!n){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return yt(t),null}e=de(),ta(t)?Gp(t):(e=Av(s,n,i,e,!0),t.stateNode=e,es(t))}return yt(t),null;case 5:if(M(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&es(t);else{if(!n){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return yt(t),null}var d=de();if(ta(t))Gp(t);else{switch(r=ie(Ls.current),rh(s,d.ancestorInfo),d=d.context,r=Tc(r),d){case Ka:r=r.createElementNS(ya,s);break;case Hu:r=r.createElementNS(Yc,s);break;default:switch(s){case"svg":r=r.createElementNS(ya,s);break;case"math":r=r.createElementNS(Yc,s);break;case"script":r=r.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof n.is=="string"?r.createElement("select",{is:n.is}):r.createElement("select"),n.multiple?r.multiple=!0:n.size&&(r.size=n.size);break;default:r=typeof n.is=="string"?r.createElement(s,{is:n.is}):r.createElement(s),s.indexOf("-")===-1&&(s!==s.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",s),Object.prototype.toString.call(r)!=="[object HTMLUnknownElement]"||un.call(fw,s)||(fw[s]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",s)))}}r[ri]=t,r[mi]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)r.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=r;e:switch(si(r,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&es(t)}}return yt(t),yd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&es(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=ie(Ls.current),i=de(),ta(t)){if(e=t.stateNode,i=t.memoizedProps,s=!$n,n=null,r=ai,r!==null)switch(r.tag){case 3:s&&(s=xv(e,i,n),s!==null&&(pr(t,0).serverProps=s));break;case 27:case 5:n=r.memoizedProps,s&&(s=xv(e,i,n),s!==null&&(pr(t,0).serverProps=s))}e[ri]=t,e=!!(e.nodeValue===i||n!==null&&n.suppressHydrationWarning===!0||uv(e.nodeValue,i)),e||Ns(t,!0)}else s=i.ancestorInfo.current,s!=null&&Wl(n,s.tag,i.ancestorInfo.implicitRootScope),e=Tc(e).createTextNode(n),e[ri]=t,t.stateNode=e}return yt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(n=ta(t),i!==null){if(e===null){if(!n)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");e[ri]=t,yt(t),(t.mode&Xe)!==Ve&&i!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Sh(),br(),(t.flags&128)===0&&(i=t.memoizedState=null),t.flags|=4,yt(t),(t.mode&Xe)!==Ve&&i!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else i=yh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Mi(t),t):(Mi(t),null);if((t.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return yt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=n,r=ta(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");r[ri]=t,yt(t),(t.mode&Xe)!==Ve&&s!==null&&(s=t.child,s!==null&&(t.treeBaseDuration-=s.treeBaseDuration))}else Sh(),br(),(t.flags&128)===0&&(s=t.memoizedState=null),t.flags|=4,yt(t),(t.mode&Xe)!==Ve&&s!==null&&(s=t.child,s!==null&&(t.treeBaseDuration-=s.treeBaseDuration));s=!1}else s=yh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Mi(t),t):(Mi(t),null)}return Mi(t),(t.flags&128)!==0?(t.lanes=i,(t.mode&Xe)!==Ve&&uo(t),t):(i=n!==null,e=e!==null&&e.memoizedState!==null,i&&(n=t.child,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==s&&(n.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Sc(t,t.updateQueue),yt(t),(t.mode&Xe)!==Ve&&i&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return ne(t),e===null&&Vd(t.stateNode.containerInfo),yt(t),null;case 10:return Kn(t.type,t),yt(t),null;case 19:if(I(Bt,t),n=t.memoizedState,n===null)return yt(t),null;if(s=(t.flags&128)!==0,r=n.rendering,r===null)if(s)wo(n,!1);else{if(Rt!==bs||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=rc(e),r!==null){for(t.flags|=128,wo(n,!1),e=r.updateQueue,t.updateQueue=e,Sc(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)zp(i,e),i=i.sibling;return B(Bt,Bt.current&Ha|cl,t),it&&Qn(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Zt()>Cu&&(t.flags|=128,s=!0,wo(n,!1),t.lanes=4194304)}else{if(!s)if(e=rc(r),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Sc(t,e),wo(n,!0),n.tail===null&&n.tailMode==="hidden"&&!r.alternate&&!it)return yt(t),null}else 2*Zt()-n.renderingStartTime>Cu&&i!==536870912&&(t.flags|=128,s=!0,wo(n,!1),t.lanes=4194304);n.isBackwards?(r.sibling=t.child,t.child=r):(e=n.last,e!==null?e.sibling=r:t.child=r,n.last=r)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Zt(),e.sibling=null,i=Bt.current,i=s?i&Ha|cl:i&Ha,B(Bt,i,t),it&&Qn(t,n.treeForkCount),e):(yt(t),null);case 22:case 23:return Mi(t),Oh(t),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(i&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),i=t.updateQueue,i!==null&&Sc(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==i&&(t.flags|=2048),e!==null&&I(Or,t),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Kn(Ut,t),yt(t),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function rS(e,t){switch(wh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Xe)!==Ve&&uo(t),t):null;case 3:return Kn(Ut,t),ne(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return M(t),null;case 31:if(t.memoizedState!==null){if(Mi(t),t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Xe)!==Ve&&uo(t),t):null;case 13:if(Mi(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Xe)!==Ve&&uo(t),t):null;case 19:return I(Bt,t),null;case 4:return ne(t),null;case 10:return Kn(t.type,t),null;case 22:case 23:return Mi(t),Oh(t),e!==null&&I(Or,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Xe)!==Ve&&uo(t),t):null;case 24:return Kn(Ut,t),null;case 25:return null;default:return null}}function ag(e,t){switch(wh(t),t.tag){case 3:Kn(Ut,t),ne(t);break;case 26:case 27:case 5:M(t);break;case 4:ne(t);break;case 31:t.memoizedState!==null&&Mi(t);break;case 13:Mi(t);break;case 19:I(Bt,t);break;case 10:Kn(t.type,t);break;case 22:case 23:Mi(t),Oh(t),e!==null&&I(Or,t);break;case 24:Kn(Ut,t)}}function Rn(e){return(e.mode&Xe)!==Ve}function og(e,t){Rn(e)?(kn(),yo(t,e),Dn()):yo(t,e)}function Sd(e,t,i){Rn(e)?(kn(),oa(i,e,t),Dn()):oa(i,e,t)}function yo(e,t){try{var i=t.updateQueue,n=i!==null?i.lastEffect:null;if(n!==null){var s=n.next;i=s;do{if((i.tag&e)===e&&(n=void 0,(e&vi)!==pu&&(Ya=!0),n=oe(t,RN,i),(e&vi)!==pu&&(Ya=!1),n!==void 0&&typeof n!="function")){var r=void 0;r=(i.tag&Hi)!==0?"useLayoutEffect":(i.tag&vi)!==0?"useInsertionEffect":"useEffect";var d=void 0;d=n===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof n.then=="function"?`
|
|
186
|
+
|
|
187
|
+
It looks like you wrote `+r+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
188
|
+
|
|
189
|
+
`+r+`(() => {
|
|
190
|
+
async function fetchData() {
|
|
191
|
+
// You can await here
|
|
192
|
+
const response = await MyAPI.getData(someId);
|
|
193
|
+
// ...
|
|
194
|
+
}
|
|
195
|
+
fetchData();
|
|
196
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
197
|
+
|
|
198
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+n,oe(t,function(g,A){console.error("%s must not return anything besides a function, which is used for clean-up.%s",g,A)},r,d)}i=i.next}while(i!==s)}}catch(g){dt(t,t.return,g)}}function oa(e,t,i){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&e)===e){var d=n.inst,g=d.destroy;g!==void 0&&(d.destroy=void 0,(e&vi)!==pu&&(Ya=!0),s=t,oe(s,TN,s,i,g),(e&vi)!==pu&&(Ya=!1))}n=n.next}while(n!==r)}}catch(A){dt(t,t.return,A)}}function lg(e,t){Rn(e)?(kn(),yo(t,e),Dn()):yo(t,e)}function Nd(e,t,i){Rn(e)?(kn(),oa(i,e,t),Dn()):oa(i,e,t)}function cg(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||$a||(i.props!==e.memoizedProps&&console.error("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.",R(e)||"instance"),i.state!==e.memoizedState&&console.error("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.",R(e)||"instance"));try{oe(e,hb,t,i)}catch(n){dt(e,e.return,n)}}}function aS(e,t,i){return e.getSnapshotBeforeUpdate(t,i)}function oS(e,t){var i=t.memoizedProps,n=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||$a||(t.props!==e.memoizedProps&&console.error("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.",R(e)||"instance"),t.state!==e.memoizedState&&console.error("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.",R(e)||"instance"));try{var s=Sr(e.type,i),r=oe(e,aS,t,s,n);i=q0,r!==void 0||i.has(e.type)||(i.add(e.type),oe(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",R(e))})),t.__reactInternalSnapshotBeforeUpdate=r}catch(d){dt(e,e.return,d)}}function ug(e,t,i){i.props=Sr(e.type,e.memoizedProps),i.state=e.memoizedState,Rn(e)?(kn(),oe(e,c0,e,t,i),Dn()):oe(e,c0,e,t,i)}function lS(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}if(typeof t=="function")if(Rn(e))try{kn(),e.refCleanup=t(i)}finally{Dn()}else e.refCleanup=t(i);else typeof t=="string"?console.error("String refs are no longer supported."):t.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",R(e)),t.current=i}}function So(e,t){try{oe(e,lS,e)}catch(i){dt(e,t,i)}}function Tn(e,t){var i=e.ref,n=e.refCleanup;if(i!==null)if(typeof n=="function")try{if(Rn(e))try{kn(),oe(e,n)}finally{Dn(e)}else oe(e,n)}catch(s){dt(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{if(Rn(e))try{kn(),oe(e,i,null)}finally{Dn(e)}else oe(e,i,null)}catch(s){dt(e,t,s)}else i.current=null}function hg(e,t,i,n){var s=e.memoizedProps,r=s.id,d=s.onCommit;s=s.onRender,t=t===null?"mount":"update",cu&&(t="nested-update"),typeof s=="function"&&s(r,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,i),typeof d=="function"&&d(r,t,n,i)}function cS(e,t,i,n){var s=e.memoizedProps;e=s.id,s=s.onPostCommit,t=t===null?"mount":"update",cu&&(t="nested-update"),typeof s=="function"&&s(e,t,n,i)}function dg(e){var t=e.type,i=e.memoizedProps,n=e.stateNode;try{oe(e,OS,n,t,i,e)}catch(s){dt(e,e.return,s)}}function Ed(e,t,i){try{oe(e,LS,e.stateNode,e.type,i,t,e)}catch(n){dt(e,e.return,n)}}function fg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Os(e.type)||e.tag===4}function xd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Os(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cd(e,t,i){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(wv(i),(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t)):(wv(i),t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Yn));else if(n!==4&&(n===27&&Os(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Cd(e,t,i),e=e.sibling;e!==null;)Cd(e,t,i),e=e.sibling}function Nc(e,t,i){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(n!==4&&(n===27&&Os(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nc(e,t,i),e=e.sibling;e!==null;)Nc(e,t,i),e=e.sibling}function uS(e){for(var t,i=e.return;i!==null;){if(fg(i)){t=i;break}i=i.return}if(t==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(t.tag){case 27:t=t.stateNode,i=xd(e),Nc(e,i,t);break;case 5:i=t.stateNode,t.flags&32&&(_v(i),t.flags&=-33),t=xd(e),Nc(e,t,i);break;case 3:case 4:t=t.stateNode.containerInfo,i=xd(e),Cd(e,i,t);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function mg(e){var t=e.stateNode,i=e.memoizedProps;try{oe(e,KS,e.type,i,t,e)}catch(n){dt(e,e.return,n)}}function pg(e,t){return t.tag===31?(t=t.memoizedState,e.memoizedState!==null&&t===null):t.tag===13?(e=e.memoizedState,t=t.memoizedState,e!==null&&e.dehydrated!==null&&(t===null||t.dehydrated===null)):t.tag===3?e.memoizedState.isDehydrated&&(t.flags&256)===0:!1}function hS(e,t){if(e=e.containerInfo,Am=$u,e=Tp(e),lh(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var n=i.getSelection&&i.getSelection();if(n&&n.rangeCount!==0){i=n.anchorNode;var s=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{i.nodeType,r.nodeType}catch{i=null;break e}var d=0,g=-1,A=-1,O=0,K=0,Z=e,F=null;t:for(;;){for(var re;Z!==i||s!==0&&Z.nodeType!==3||(g=d+s),Z!==r||n!==0&&Z.nodeType!==3||(A=d+n),Z.nodeType===3&&(d+=Z.nodeValue.length),(re=Z.firstChild)!==null;)F=Z,Z=re;for(;;){if(Z===e)break t;if(F===i&&++O===s&&(g=d),F===r&&++K===n&&(A=d),(re=Z.nextSibling)!==null)break;Z=F,F=Z.parentNode}Z=re}i=g===-1||A===-1?null:{start:g,end:A}}else i=null}i=i||{start:0,end:0}}else i=null;for(Dm={focusedElem:e,selectionRange:i},$u=!1,ei=t;ei!==null;)if(t=ei,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ei=e;else for(;ei!==null;){switch(e=t=ei,i=e.alternate,s=e.flags,e.tag){case 0:if((s&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)s=e[i],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:(s&1024)!==0&&i!==null&&oS(e,i);break;case 3:if((s&1024)!==0){if(e=e.stateNode.containerInfo,i=e.nodeType,i===9)Fd(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw 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.")}if(e=t.sibling,e!==null){e.return=t.return,ei=e;break}ei=t.return}}function bg(e,t,i){var n=Ri(),s=En(),r=Cn(),d=An(),g=i.flags;switch(i.tag){case 0:case 11:case 15:Mn(e,i),g&4&&og(i,Hi|tn);break;case 1:if(Mn(e,i),g&4)if(e=i.stateNode,t===null)i.type.defaultProps||"ref"in i.memoizedProps||$a||(e.props!==i.memoizedProps&&console.error("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.",R(i)||"instance"),e.state!==i.memoizedState&&console.error("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.",R(i)||"instance")),Rn(i)?(kn(),oe(i,Xf,i,e),Dn()):oe(i,Xf,i,e);else{var A=Sr(i.type,t.memoizedProps);t=t.memoizedState,i.type.defaultProps||"ref"in i.memoizedProps||$a||(e.props!==i.memoizedProps&&console.error("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.",R(i)||"instance"),e.state!==i.memoizedState&&console.error("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.",R(i)||"instance")),Rn(i)?(kn(),oe(i,a0,i,e,A,t,e.__reactInternalSnapshotBeforeUpdate),Dn()):oe(i,a0,i,e,A,t,e.__reactInternalSnapshotBeforeUpdate)}g&64&&cg(i),g&512&&So(i,i.return);break;case 3:if(t=Zn(),Mn(e,i),g&64&&(g=i.updateQueue,g!==null)){if(A=null,i.child!==null)switch(i.child.tag){case 27:case 5:A=i.child.stateNode;break;case 1:A=i.child.stateNode}try{oe(i,hb,g,A)}catch(K){dt(i,i.return,K)}}e.effectDuration+=Ql(t);break;case 27:t===null&&g&4&&mg(i);case 26:case 5:if(Mn(e,i),t===null){if(g&4)dg(i);else if(g&64){e=i.type,t=i.memoizedProps,A=i.stateNode;try{oe(i,jS,A,e,t,i)}catch(K){dt(i,i.return,K)}}}g&512&&So(i,i.return);break;case 12:if(g&4){g=Zn(),Mn(e,i),e=i.stateNode,e.effectDuration+=co(g);try{oe(i,hg,i,t,$s,e.effectDuration)}catch(K){dt(i,i.return,K)}}else Mn(e,i);break;case 31:Mn(e,i),g&4&&_g(e,i);break;case 13:Mn(e,i),g&4&&wg(e,i),g&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(g=wS.bind(null,i),GS(e,g))));break;case 22:if(g=i.memoizedState!==null||ps,!g){t=t!==null&&t.memoizedState!==null||qt,A=ps;var O=qt;ps=g,(qt=t)&&!O?(On(e,i,(i.subtreeFlags&8772)!==0),(i.mode&Xe)!==Ve&&0<=je&&0<=Be&&.05<Be-je&&Ul(i,je,Be)):Mn(e,i),ps=A,qt=O}break;case 30:break;default:Mn(e,i)}(i.mode&Xe)!==Ve&&0<=je&&0<=Be&&((Mt||.05<kt)&&Sn(i,je,Be,kt,Dt),i.alternate===null&&i.return!==null&&i.return.alternate!==null&&.05<Be-je&&(pg(i.return.alternate,i.return)||yn(i,je,Be,"Mount"))),Ti(n),xn(s),Dt=r,Mt=d}function gg(e){var t=e.alternate;t!==null&&(e.alternate=null,gg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&te(t)),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 ts(e,t,i){for(i=i.child;i!==null;)vg(e,t,i),i=i.sibling}function vg(e,t,i){if(li&&typeof li.onCommitFiberUnmount=="function")try{li.onCommitFiberUnmount(_a,i)}catch(O){Hn||(Hn=!0,console.error("React instrumentation encountered an error: %o",O))}var n=Ri(),s=En(),r=Cn(),d=An();switch(i.tag){case 26:qt||Tn(i,t),ts(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(e=i.stateNode,e.parentNode.removeChild(e));break;case 27:qt||Tn(i,t);var g=Pt,A=xi;Os(i.type)&&(Pt=i.stateNode,xi=!1),ts(e,t,i),oe(i,To,i.stateNode),Pt=g,xi=A;break;case 5:qt||Tn(i,t);case 6:if(g=Pt,A=xi,Pt=null,ts(e,t,i),Pt=g,xi=A,Pt!==null)if(xi)try{oe(i,VS,Pt,i.stateNode)}catch(O){dt(i,t,O)}else try{oe(i,BS,Pt,i.stateNode)}catch(O){dt(i,t,O)}break;case 18:Pt!==null&&(xi?(e=Pt,yv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),pa(e)):yv(Pt,i.stateNode));break;case 4:g=Pt,A=xi,Pt=i.stateNode.containerInfo,xi=!0,ts(e,t,i),Pt=g,xi=A;break;case 0:case 11:case 14:case 15:oa(vi,i,t),qt||Sd(i,t,Hi),ts(e,t,i);break;case 1:qt||(Tn(i,t),g=i.stateNode,typeof g.componentWillUnmount=="function"&&ug(i,t,g)),ts(e,t,i);break;case 21:ts(e,t,i);break;case 22:qt=(g=qt)||i.memoizedState!==null,ts(e,t,i),qt=g;break;default:ts(e,t,i)}(i.mode&Xe)!==Ve&&0<=je&&0<=Be&&(Mt||.05<kt)&&Sn(i,je,Be,kt,Dt),Ti(n),xn(s),Dt=r,Mt=d}function _g(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{oe(t,XS,e)}catch(i){dt(t,t.return,i)}}}function wg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{oe(t,QS,e)}catch(i){dt(t,t.return,i)}}function dS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new P0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new P0),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function Ec(e,t){var i=dS(e);t.forEach(function(n){if(!i.has(n)){if(i.add(n),Un)if(qa!==null&&Pa!==null)Co(Pa,qa);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var s=yS.bind(null,e,n);n.then(s,s)}})}function Ni(e,t){var i=t.deletions;if(i!==null)for(var n=0;n<i.length;n++){var s=e,r=t,d=i[n],g=Ri(),A=r;e:for(;A!==null;){switch(A.tag){case 27:if(Os(A.type)){Pt=A.stateNode,xi=!1;break e}break;case 5:Pt=A.stateNode,xi=!1;break e;case 3:case 4:Pt=A.stateNode.containerInfo,xi=!0;break e}A=A.return}if(Pt===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");vg(s,r,d),Pt=null,xi=!1,(d.mode&Xe)!==Ve&&0<=je&&0<=Be&&.05<Be-je&&yn(d,je,Be,"Unmount"),Ti(g),s=d,r=s.alternate,r!==null&&(r.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yg(t,e),t=t.sibling}function yg(e,t){var i=Ri(),n=En(),s=Cn(),r=An(),d=e.alternate,g=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ni(t,e),Ei(e),g&4&&(oa(vi|tn,e,e.return),yo(vi|tn,e),Sd(e,e.return,Hi|tn));break;case 1:if(Ni(t,e),Ei(e),g&512&&(qt||d===null||Tn(d,d.return)),g&64&&ps&&(g=e.updateQueue,g!==null&&(d=g.callbacks,d!==null))){var A=g.shared.hiddenCallbacks;g.shared.hiddenCallbacks=A===null?d:A.concat(d)}break;case 26:if(A=mn,Ni(t,e),Ei(e),g&512&&(qt||d===null||Tn(d,d.return)),g&4){var O=d!==null?d.memoizedState:null;if(g=e.memoizedState,d===null)if(g===null)if(e.stateNode===null){e:{g=e.type,d=e.memoizedProps,A=A.ownerDocument||A;t:switch(g){case"title":O=A.getElementsByTagName("title")[0],(!O||O[Vo]||O[ri]||O.namespaceURI===ya||O.hasAttribute("itemprop"))&&(O=A.createElement(g),A.head.insertBefore(O,A.querySelector("head > title"))),si(O,g,d),O[ri]=e,Me(O),g=O;break e;case"link":var K=Mv("link","href",A).get(g+(d.href||""));if(K){for(var Z=0;Z<K.length;Z++)if(O=K[Z],O.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&O.getAttribute("rel")===(d.rel==null?null:d.rel)&&O.getAttribute("title")===(d.title==null?null:d.title)&&O.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){K.splice(Z,1);break t}}O=A.createElement(g),si(O,g,d),A.head.appendChild(O);break;case"meta":if(K=Mv("meta","content",A).get(g+(d.content||""))){for(Z=0;Z<K.length;Z++)if(O=K[Z],Le(d.content,"content"),O.getAttribute("content")===(d.content==null?null:""+d.content)&&O.getAttribute("name")===(d.name==null?null:d.name)&&O.getAttribute("property")===(d.property==null?null:d.property)&&O.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&O.getAttribute("charset")===(d.charSet==null?null:d.charSet)){K.splice(Z,1);break t}}O=A.createElement(g),si(O,g,d),A.head.appendChild(O);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+g+'". This is a bug in React.')}O[ri]=e,Me(O),g=O}e.stateNode=g}else Ov(A,e.type,e.stateNode);else e.stateNode=Tv(A,g,e.memoizedProps);else O!==g?(O===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):O.count--,g===null?Ov(A,e.type,e.stateNode):Tv(A,g,e.memoizedProps)):g===null&&e.stateNode!==null&&Ed(e,e.memoizedProps,d.memoizedProps)}break;case 27:Ni(t,e),Ei(e),g&512&&(qt||d===null||Tn(d,d.return)),d!==null&&g&4&&Ed(e,e.memoizedProps,d.memoizedProps);break;case 5:if(Ni(t,e),Ei(e),g&512&&(qt||d===null||Tn(d,d.return)),e.flags&32){A=e.stateNode;try{oe(e,_v,A)}catch(xe){dt(e,e.return,xe)}}g&4&&e.stateNode!=null&&(A=e.memoizedProps,Ed(e,A,d!==null?d.memoizedProps:A)),g&1024&&(lm=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Ni(t,e),Ei(e),g&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");g=e.memoizedProps,d=d!==null?d.memoizedProps:g,A=e.stateNode;try{oe(e,WS,A,d,g)}catch(xe){dt(e,e.return,xe)}}break;case 3:if(A=Zn(),Uu=null,O=mn,mn=Mc(t.containerInfo),Ni(t,e),mn=O,Ei(e),g&4&&d!==null&&d.memoizedState.isDehydrated)try{oe(e,YS,t.containerInfo)}catch(xe){dt(e,e.return,xe)}lm&&(lm=!1,Sg(e)),t.effectDuration+=Ql(A);break;case 4:g=mn,mn=Mc(e.stateNode.containerInfo),Ni(t,e),Ei(e),mn=g;break;case 12:g=Zn(),Ni(t,e),Ei(e),e.stateNode.effectDuration+=co(g);break;case 31:Ni(t,e),Ei(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,Ec(e,g)));break;case 13:Ni(t,e),Ei(e),e.child.flags&8192&&e.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(xu=Zt()),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,Ec(e,g)));break;case 22:A=e.memoizedState!==null;var F=d!==null&&d.memoizedState!==null,re=ps,Ne=qt;if(ps=re||A,qt=Ne||F,Ni(t,e),qt=Ne,ps=re,F&&!A&&!re&&!Ne&&(e.mode&Xe)!==Ve&&0<=je&&0<=Be&&.05<Be-je&&Ul(e,je,Be),Ei(e),g&8192)e:for(t=e.stateNode,t._visibility=A?t._visibility&~Go:t._visibility|Go,!A||d===null||F||ps||qt||(Nr(e),(e.mode&Xe)!==Ve&&0<=je&&0<=Be&&.05<Be-je&&yn(e,je,Be,"Disconnect")),d=null,t=e;;){if(t.tag===5||t.tag===26){if(d===null){F=d=t;try{O=F.stateNode,A?oe(F,US,O):oe(F,$S,F.stateNode,F.memoizedProps)}catch(xe){dt(F,F.return,xe)}}}else if(t.tag===6){if(d===null){F=t;try{K=F.stateNode,A?oe(F,zS,K):oe(F,qS,K,F.memoizedProps)}catch(xe){dt(F,F.return,xe)}}}else if(t.tag===18){if(d===null){F=t;try{Z=F.stateNode,A?oe(F,HS,Z):oe(F,IS,F.stateNode)}catch(xe){dt(F,F.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;d===t&&(d=null),t=t.return}d===t&&(d=null),t.sibling.return=t.return,t=t.sibling}g&4&&(g=e.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,Ec(e,d))));break;case 19:Ni(t,e),Ei(e),g&4&&(g=e.updateQueue,g!==null&&(e.updateQueue=null,Ec(e,g)));break;case 30:break;case 21:break;default:Ni(t,e),Ei(e)}(e.mode&Xe)!==Ve&&0<=je&&0<=Be&&((Mt||.05<kt)&&Sn(e,je,Be,kt,Dt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Be-je&&(pg(e.return.alternate,e.return)||yn(e,je,Be,"Mount"))),Ti(i),xn(n),Dt=s,Mt=r}function Ei(e){var t=e.flags;if(t&2){try{oe(e,uS,e)}catch(i){dt(e,e.return,i)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Mn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bg(e,t.alternate,t),t=t.sibling}function Ng(e){var t=Ri(),i=En(),n=Cn(),s=An();switch(e.tag){case 0:case 11:case 14:case 15:Sd(e,e.return,Hi),Nr(e);break;case 1:Tn(e,e.return);var r=e.stateNode;typeof r.componentWillUnmount=="function"&&ug(e,e.return,r),Nr(e);break;case 27:oe(e,To,e.stateNode);case 26:case 5:Tn(e,e.return),Nr(e);break;case 22:e.memoizedState===null&&Nr(e);break;case 30:Nr(e);break;default:Nr(e)}(e.mode&Xe)!==Ve&&0<=je&&0<=Be&&(Mt||.05<kt)&&Sn(e,je,Be,kt,Dt),Ti(t),xn(i),Dt=n,Mt=s}function Nr(e){for(e=e.child;e!==null;)Ng(e),e=e.sibling}function Eg(e,t,i,n){var s=Ri(),r=En(),d=Cn(),g=An(),A=i.flags;switch(i.tag){case 0:case 11:case 15:On(e,i,n),og(i,Hi);break;case 1:if(On(e,i,n),t=i.stateNode,typeof t.componentDidMount=="function"&&oe(i,Xf,i,t),t=i.updateQueue,t!==null){e=i.stateNode;try{oe(i,Yy,t,e)}catch(O){dt(i,i.return,O)}}n&&A&64&&cg(i),So(i,i.return);break;case 27:mg(i);case 26:case 5:On(e,i,n),n&&t===null&&A&4&&dg(i),So(i,i.return);break;case 12:if(n&&A&4){A=Zn(),On(e,i,n),n=i.stateNode,n.effectDuration+=co(A);try{oe(i,hg,i,t,$s,n.effectDuration)}catch(O){dt(i,i.return,O)}}else On(e,i,n);break;case 31:On(e,i,n),n&&A&4&&_g(e,i);break;case 13:On(e,i,n),n&&A&4&&wg(e,i);break;case 22:i.memoizedState===null&&On(e,i,n),So(i,i.return);break;case 30:break;default:On(e,i,n)}(i.mode&Xe)!==Ve&&0<=je&&0<=Be&&(Mt||.05<kt)&&Sn(i,je,Be,kt,Dt),Ti(s),xn(r),Dt=d,Mt=g}function On(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)Eg(e,t.alternate,t,i),t=t.sibling}function Ad(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&vr(e),i!=null&&lo(i))}function Dd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(vr(t),e!=null&&lo(e))}function cn(e,t,i,n,s){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(t=t.child;t!==null;){var r=t.sibling;xg(e,t,i,n,r!==null?r.actualStartTime:s),t=r}}function xg(e,t,i,n,s){var r=Ri(),d=En(),g=Cn(),A=An(),O=Hs,K=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Xe)!==Ve&&0<t.actualStartTime&&(t.flags&1)!==0&&zl(t,t.actualStartTime,s,Xt,i),cn(e,t,i,n,s),K&2048&&lg(t,_i|tn);break;case 1:(t.mode&Xe)!==Ve&&0<t.actualStartTime&&((t.flags&128)!==0?uh(t,t.actualStartTime,s,[]):(t.flags&1)!==0&&zl(t,t.actualStartTime,s,Xt,i)),cn(e,t,i,n,s);break;case 3:var Z=Zn(),F=Xt;Xt=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,cn(e,t,i,n,s),Xt=F,K&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),n=t.memoizedState.cache,n!==i&&(vr(n),i!=null&&lo(i))),e.passiveEffectDuration+=Ql(Z);break;case 12:if(K&2048){K=Zn(),cn(e,t,i,n,s),e=t.stateNode,e.passiveEffectDuration+=co(K);try{oe(t,cS,t,t.alternate,$s,e.passiveEffectDuration)}catch(re){dt(t,t.return,re)}}else cn(e,t,i,n,s);break;case 31:K=Xt,Z=t.alternate!==null?t.alternate.memoizedState:null,F=t.memoizedState,Z!==null&&F===null?(F=t.deletions,F!==null&&0<F.length&&F[0].tag===18?(Xt=!1,Z=Z.hydrationErrors,Z!==null&&uh(t,t.actualStartTime,s,Z)):Xt=!0):Xt=!1,cn(e,t,i,n,s),Xt=K;break;case 13:K=Xt,Z=t.alternate!==null?t.alternate.memoizedState:null,F=t.memoizedState,Z===null||Z.dehydrated===null||F!==null&&F.dehydrated!==null?Xt=!1:(F=t.deletions,F!==null&&0<F.length&&F[0].tag===18?(Xt=!1,Z=Z.hydrationErrors,Z!==null&&uh(t,t.actualStartTime,s,Z)):Xt=!0),cn(e,t,i,n,s),Xt=K;break;case 23:break;case 22:F=t.stateNode,Z=t.alternate,t.memoizedState!==null?F._visibility&rs?cn(e,t,i,n,s):No(e,t,i,n,s):F._visibility&rs?cn(e,t,i,n,s):(F._visibility|=rs,la(e,t,i,n,(t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),s),(t.mode&Xe)===Ve||Xt||(e=t.actualStartTime,0<=e&&.05<s-e&&Ul(t,e,s),0<=je&&0<=Be&&.05<Be-je&&Ul(t,je,Be))),K&2048&&Ad(Z,t);break;case 24:cn(e,t,i,n,s),K&2048&&Dd(t.alternate,t);break;default:cn(e,t,i,n,s)}(t.mode&Xe)!==Ve&&((e=!Xt&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(i=t.actualStartTime,0<=i&&.05<s-i&&yn(t,i,s,"Mount")),0<=je&&0<=Be&&((Mt||.05<kt)&&Sn(t,je,Be,kt,Dt),e&&.05<Be-je&&yn(t,je,Be,"Mount"))),Ti(r),xn(d),Dt=g,Mt=A,Hs=O}function la(e,t,i,n,s,r){for(s=s&&((t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child)),t=t.child;t!==null;){var d=t.sibling;Cg(e,t,i,n,s,d!==null?d.actualStartTime:r),t=d}}function Cg(e,t,i,n,s,r){var d=Ri(),g=En(),A=Cn(),O=An(),K=Hs;s&&(t.mode&Xe)!==Ve&&0<t.actualStartTime&&(t.flags&1)!==0&&zl(t,t.actualStartTime,r,Xt,i);var Z=t.flags;switch(t.tag){case 0:case 11:case 15:la(e,t,i,n,s,r),lg(t,_i);break;case 23:break;case 22:var F=t.stateNode;t.memoizedState!==null?F._visibility&rs?la(e,t,i,n,s,r):No(e,t,i,n,r):(F._visibility|=rs,la(e,t,i,n,s,r)),s&&Z&2048&&Ad(t.alternate,t);break;case 24:la(e,t,i,n,s,r),s&&Z&2048&&Dd(t.alternate,t);break;default:la(e,t,i,n,s,r)}(t.mode&Xe)!==Ve&&0<=je&&0<=Be&&(Mt||.05<kt)&&Sn(t,je,Be,kt,Dt),Ti(d),xn(g),Dt=A,Mt=O,Hs=K}function No(e,t,i,n,s){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(var r=t.child;r!==null;){t=r.sibling;var d=e,g=i,A=n,O=t!==null?t.actualStartTime:s,K=Hs;(r.mode&Xe)!==Ve&&0<r.actualStartTime&&(r.flags&1)!==0&&zl(r,r.actualStartTime,O,Xt,g);var Z=r.flags;switch(r.tag){case 22:No(d,r,g,A,O),Z&2048&&Ad(r.alternate,r);break;case 24:No(d,r,g,A,O),Z&2048&&Dd(r.alternate,r);break;default:No(d,r,g,A,O)}Hs=K,r=t}}function ca(e,t,i){if(e.subtreeFlags&fl)for(e=e.child;e!==null;)Ag(e,t,i),e=e.sibling}function Ag(e,t,i){switch(e.tag){case 26:ca(e,t,i),e.flags&fl&&e.memoizedState!==null&&e1(i,mn,e.memoizedState,e.memoizedProps);break;case 5:ca(e,t,i);break;case 3:case 4:var n=mn;mn=Mc(e.stateNode.containerInfo),ca(e,t,i),mn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=fl,fl=16777216,ca(e,t,i),fl=n):ca(e,t,i));break;default:ca(e,t,i)}}function Dg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Eo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var n=t[i],s=Ri();ei=n,Tg(n,e),(n.mode&Xe)!==Ve&&0<=je&&0<=Be&&.05<Be-je&&yn(n,je,Be,"Unmount"),Ti(s)}Dg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kg(e),e=e.sibling}function kg(e){var t=Ri(),i=En(),n=Cn(),s=An();switch(e.tag){case 0:case 11:case 15:Eo(e),e.flags&2048&&Nd(e,e.return,_i|tn);break;case 3:var r=Zn();Eo(e),e.stateNode.passiveEffectDuration+=Ql(r);break;case 12:r=Zn(),Eo(e),e.stateNode.passiveEffectDuration+=co(r);break;case 22:r=e.stateNode,e.memoizedState!==null&&r._visibility&rs&&(e.return===null||e.return.tag!==13)?(r._visibility&=~rs,xc(e),(e.mode&Xe)!==Ve&&0<=je&&0<=Be&&.05<Be-je&&yn(e,je,Be,"Disconnect")):Eo(e);break;default:Eo(e)}(e.mode&Xe)!==Ve&&0<=je&&0<=Be&&(Mt||.05<kt)&&Sn(e,je,Be,kt,Dt),Ti(t),xn(i),Mt=s,Dt=n}function xc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var n=t[i],s=Ri();ei=n,Tg(n,e),(n.mode&Xe)!==Ve&&0<=je&&0<=Be&&.05<Be-je&&yn(n,je,Be,"Unmount"),Ti(s)}Dg(e)}for(e=e.child;e!==null;)Rg(e),e=e.sibling}function Rg(e){var t=Ri(),i=En(),n=Cn(),s=An();switch(e.tag){case 0:case 11:case 15:Nd(e,e.return,_i),xc(e);break;case 22:var r=e.stateNode;r._visibility&rs&&(r._visibility&=~rs,xc(e));break;default:xc(e)}(e.mode&Xe)!==Ve&&0<=je&&0<=Be&&(Mt||.05<kt)&&Sn(e,je,Be,kt,Dt),Ti(t),xn(i),Mt=s,Dt=n}function Tg(e,t){for(;ei!==null;){var i=ei,n=i,s=t,r=Ri(),d=En(),g=Cn(),A=An();switch(n.tag){case 0:case 11:case 15:Nd(n,s,_i);break;case 23:case 22:n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool,s!=null&&vr(s));break;case 24:lo(n.memoizedState.cache)}if((n.mode&Xe)!==Ve&&0<=je&&0<=Be&&(Mt||.05<kt)&&Sn(n,je,Be,kt,Dt),Ti(r),xn(d),Mt=A,Dt=g,n=i.child,n!==null)n.return=i,ei=n;else e:for(i=e;ei!==null;){if(n=ei,r=n.sibling,d=n.return,gg(n),n===i){ei=null;break e}if(r!==null){r.return=d,ei=r;break e}ei=d}}}function fS(){WN.forEach(function(e){return e()})}function Mg(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||he.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Oi(e){if((lt&Qt)!==ti&&Ke!==0)return Ke&-Ke;var t=he.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),Wd()):ys()}function Og(){if(Ai===0)if((Ke&536870912)===0||it){var e=qc;qc<<=1,(qc&3932160)===0&&(qc=262144),Ai=e}else Ai=536870912;return e=Vi.current,e!==null&&(e.flags|=32),Ai}function Tt(e,t,i){if(Ya&&console.error("useInsertionEffect must not schedule updates."),_m&&(ku=!0),(e===_t&&(pt===Hr||pt===Ur)||e.cancelPendingCommit!==null)&&(ha(e,0),Ts(e,Ke,Ai,!1)),ct(e,i),(lt&Qt)!==ti&&e===_t){if(Vn)switch(t.tag){case 0:case 11:case 15:e=Ze&&R(Ze)||"Unknown",aw.has(e)||(aw.add(e),t=R(t)||"Unknown",console.error("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://react.dev/link/setstate-in-render",t,e,e));break;case 1:rw||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),rw=!0)}}else Un&&cr(e,t,i),NS(t),e===_t&&((lt&Qt)===ti&&(Ks|=i),Rt===Ys&&Ts(e,Ke,Ai,!1)),jn(e)}function jg(e,t,i){if((lt&(Qt|Ui))!==ti)throw Error("Should not already be working.");if(Ke!==0&&Ze!==null){var n=Ze,s=Zt();switch(Z_){case bl:case Hr:var r=Jo;Et&&((n=n._debugTask)?n.run(console.timeStamp.bind(console,"Suspended",r,s,Gi,void 0,"primary-light")):console.timeStamp("Suspended",r,s,Gi,void 0,"primary-light"));break;case Ur:r=Jo,Et&&((n=n._debugTask)?n.run(console.timeStamp.bind(console,"Action",r,s,Gi,void 0,"primary-light")):console.timeStamp("Action",r,s,Gi,void 0,"primary-light"));break;default:Et&&(n=s-Jo,3>n||console.timeStamp("Blocked",Jo,s,Gi,void 0,5>n?"primary-light":10>n?"primary":100>n?"primary-dark":"error"))}}r=(i=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Je(e,t))?pS(e,t):Rd(e,t,!0);var d=i;do{if(r===bs){Fa&&!i&&Ts(e,t,0,!1),t=pt,Jo=zt(),Z_=t;break}else{if(n=Zt(),s=e.current.alternate,d&&!mS(s)){on(t),s=Jt,r=n,!Et||r<=s||(Lt?Lt.run(console.timeStamp.bind(console,"Teared Render",s,r,at,st,"error")):console.timeStamp("Teared Render",s,r,at,st,"error")),Er(t,n),r=Rd(e,t,!1),d=!1;continue}if(r===Vr){if(d=t,e.errorRecoveryDisabledLanes&d)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){on(t),hh(Jt,n,t,Lt),Er(t,n),t=g;e:{n=e,r=d,d=vl;var A=n.current.memoizedState.isDehydrated;if(A&&(ha(n,g).flags|=256),g=Rd(n,g,!1),g!==Vr){if(hm&&!A){n.errorRecoveryDisabledLanes|=r,Ks|=r,r=Ys;break e}n=wi,wi=d,n!==null&&(wi===null?wi=n:wi.push.apply(wi,n))}r=g}if(d=!1,r!==Vr)continue;n=Zt()}}if(r===pl){on(t),hh(Jt,n,t,Lt),Er(t,n),ha(e,0),Ts(e,t,0,!0);break}e:{switch(i=e,r){case bs:case pl:throw Error("Root did not complete. This is a bug in React.");case Ys:if((t&4194048)!==t)break;case yu:on(t),jp(Jt,n,t,Lt),Er(t,n),s=t,(s&127)!==0?au=n:(s&4194048)!==0&&(ou=n),Ts(i,t,Ai,!Xs);break e;case Vr:wi=null;break;case wu:case F0:break;default:throw Error("Unknown root exit status.")}if(he.actQueue!==null)Td(i,s,t,wi,_l,Eu,Ai,Ks,zr,r,null,null,Jt,n);else{if((t&62914560)===t&&(d=xu+X0-Zt(),10<d)){if(Ts(i,t,Ai,!Xs),Te(i,0,!0)!==0)break e;pn=t,i.timeoutHandle=mw(Lg.bind(null,i,s,wi,_l,Eu,t,Ai,Ks,zr,Xs,r,"Throttled",Jt,n),d);break e}Lg(i,s,wi,_l,Eu,t,Ai,Ks,zr,Xs,r,null,Jt,n)}}}break}while(!0);jn(e)}function Lg(e,t,i,n,s,r,d,g,A,O,K,Z,F,re){e.timeoutHandle=Fr;var Ne=t.subtreeFlags,xe=null;if((Ne&8192||(Ne&16785408)===16785408)&&(xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},Ag(t,r,xe),Ne=(r&62914560)===r?xu-Zt():(r&4194048)===r?Y0-Zt():0,Ne=t1(xe,Ne),Ne!==null)){pn=r,e.cancelPendingCommit=Ne(Td.bind(null,e,t,r,i,n,s,d,g,A,K,xe,xe.waitingForViewTransition?"Waiting for the previous Animation":0<xe.count?0<xe.imgCount?"Suspended on CSS and Images":"Suspended on CSS":xe.imgCount===1?"Suspended on an Image":0<xe.imgCount?"Suspended on Images":null,F,re)),Ts(e,r,d,!O);return}Td(e,t,r,i,n,s,d,g,A,K,xe,Z,F,re)}function mS(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var n=0;n<i.length;n++){var s=i[n],r=s.getSnapshot;s=s.value;try{if(!bi(r(),s))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;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 Ts(e,t,i,n){t&=~dm,t&=~Ks,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var r=31-fi(s),d=1<<r;n[r]=-1,s&=~d}i!==0&&wt(e,i,t)}function ua(){return(lt&(Qt|Ui))===ti?(Ao(0),!1):!0}function kd(){if(Ze!==null){if(pt===Ci)var e=Ze.return;else e=Ze,Gl(),Uh(e),Ba=null,ll=0,e=Ze;for(;e!==null;)ag(e.alternate,e),e=e.return;Ze=null}}function Er(e,t){(e&127)!==0&&(kr=t),(e&4194048)!==0&&(us=t),(e&62914560)!==0&&(Q_=t),(e&2080374784)!==0&&(K_=t)}function ha(e,t){Et&&(console.timeStamp("Blocking Track",.003,.003,"Blocking",st,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",st,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",st,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",st,"primary-light"));var i=Jt;if(Jt=zt(),Ke!==0&&0<i){if(on(Ke),Rt===wu||Rt===Ys)jp(i,Jt,t,Lt);else{var n=Jt,s=Lt;if(Et&&!(n<=i)){var r=(t&738197653)===t?"tertiary-dark":"primary-dark",d=(t&536870912)===t?"Prewarm":(t&201326741)===t?"Interrupted Hydration":"Interrupted Render";s?s.run(console.timeStamp.bind(console,d,i,n,at,st,r)):console.timeStamp(d,i,n,at,st,r)}}Er(Ke,Jt)}if(i=Lt,Lt=null,(t&127)!==0){Lt=Qo,s=0<=qn&&qn<kr?kr:qn,n=0<=Rr&&Rr<kr?kr:Rr,r=0<=n?n:0<=s?s:Jt,0<=au?(on(2),Lp(au,r,t,i)):lu&127,i=s;var g=n,A=Ko,O=0<ja,K=qs===Xo,Z=qs===ru;if(s=Jt,n=Qo,r=qf,d=Pf,Et){if(at="Blocking",0<i?i>s&&(i=s):i=s,0<g?g>i&&(g=i):g=i,A!==null&&i>g){var F=O?"secondary-light":"warning";n?n.run(console.timeStamp.bind(console,O?"Consecutive":"Event: "+A,g,i,at,st,F)):console.timeStamp(O?"Consecutive":"Event: "+A,g,i,at,st,F)}s>i&&(g=K?"error":(t&738197653)===t?"tertiary-light":"primary-light",K=Z?"Promise Resolved":K?"Cascading Update":5<s-i?"Update Blocked":"Update",Z=[],d!=null&&Z.push(["Component name",d]),r!=null&&Z.push(["Method name",r]),i={start:i,end:s,detail:{devtools:{properties:Z,track:at,trackGroup:st,color:g}}},n?n.run(performance.measure.bind(performance,K,i)):performance.measure(K,i))}qn=-1.1,qs=0,Pf=qf=null,au=-1.1,ja=Rr,Rr=-1.1,kr=zt()}if((t&4194048)!==0&&(Lt=Zo,s=0<=hs&&hs<us?us:hs,i=0<=Ji&&Ji<us?us:Ji,n=0<=Ps&&Ps<us?us:Ps,r=0<=n?n:0<=i?i:Jt,0<=ou?(on(256),Lp(ou,r,t,Lt)):lu&4194048,Z=n,g=Tr,A=0<Fs,O=Ff===ru,r=Jt,n=Zo,d=Y_,K=X_,Et&&(at="Transition",0<i?i>r&&(i=r):i=r,0<s?s>i&&(s=i):s=i,0<Z?Z>s&&(Z=s):Z=s,s>Z&&g!==null&&(F=A?"secondary-light":"warning",n?n.run(console.timeStamp.bind(console,A?"Consecutive":"Event: "+g,Z,s,at,st,F)):console.timeStamp(A?"Consecutive":"Event: "+g,Z,s,at,st,F)),i>s&&(n?n.run(console.timeStamp.bind(console,"Action",s,i,at,st,"primary-dark")):console.timeStamp("Action",s,i,at,st,"primary-dark")),r>i&&(s=O?"Promise Resolved":5<r-i?"Update Blocked":"Update",Z=[],K!=null&&Z.push(["Component name",K]),d!=null&&Z.push(["Method name",d]),i={start:i,end:r,detail:{devtools:{properties:Z,track:at,trackGroup:st,color:"primary-light"}}},n?n.run(performance.measure.bind(performance,s,i)):performance.measure(s,i))),Ji=hs=-1.1,Ff=0,ou=-1.1,Fs=Ps,Ps=-1.1,us=zt()),(t&62914560)!==0&&(lu&62914560)!==0&&(on(4194304),dh(Q_,Jt)),(t&2080374784)!==0&&(lu&2080374784)!==0&&(on(268435456),dh(K_,Jt)),i=e.timeoutHandle,i!==Fr&&(e.timeoutHandle=Fr,XN(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),pn=0,kd(),_t=e,Ze=i=Xn(e.current,null),Ke=t,pt=Ci,zi=null,Xs=!1,Fa=Je(e,t),hm=!1,Rt=bs,zr=Ai=dm=Ks=Qs=0,wi=vl=null,Eu=!1,(t&8)!==0&&(t|=t&32),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=t;0<n;)s=31-fi(n),r=1<<s,t|=e[s],n&=~r;return Fn=t,Il(),e=I_(),1e3<e-z_&&(he.recentlyCreatedOwnerStacks=0,z_=e),dn.discardPendingWarnings(),i}function Wg(e,t){He=null,he.H=dl,he.getCurrentStack=null,Vn=!1,Wi=null,t===Wa||t===du?(t=nb(),pt=bl):t===Qf?(t=nb(),pt=G0):pt=t===am?um:t!==null&&typeof t=="object"&&typeof t.then=="function"?gl:Su,zi=t;var i=Ze;i===null?(Rt=pl,vc(e,ki(t,e.current))):i.mode&Xe&&Ah(i)}function Bg(){var e=Vi.current;return e===null?!0:(Ke&4194048)===Ke?en===null:(Ke&62914560)===Ke||(Ke&536870912)!==0?e===en:!1}function Vg(){var e=he.H;return he.H=dl,e===null?dl:e}function Hg(){var e=he.A;return he.A=LN,e}function Cc(e){Lt===null&&(Lt=e._debugTask==null?null:e._debugTask)}function Ac(){Rt=Ys,Xs||(Ke&4194048)!==Ke&&Vi.current!==null||(Fa=!0),(Qs&134217727)===0&&(Ks&134217727)===0||_t===null||Ts(_t,Ke,Ai,!1)}function Rd(e,t,i){var n=lt;lt|=Qt;var s=Vg(),r=Hg();if(_t!==e||Ke!==t){if(Un){var d=e.memoizedUpdaters;0<d.size&&(Co(e,Ke),d.clear()),Xr(e,t)}_l=null,ha(e,t)}t=!1,d=Rt;e:do try{if(pt!==Ci&&Ze!==null){var g=Ze,A=zi;switch(pt){case um:kd(),d=yu;break e;case bl:case Hr:case Ur:case gl:Vi.current===null&&(t=!0);var O=pt;if(pt=Ci,zi=null,da(e,g,A,O),i&&Fa){d=bs;break e}break;default:O=pt,pt=Ci,zi=null,da(e,g,A,O)}}Ug(),d=Rt;break}catch(K){Wg(e,K)}while(!0);return t&&e.shellSuspendCounter++,Gl(),lt=n,he.H=s,he.A=r,Ze===null&&(_t=null,Ke=0,Il()),d}function Ug(){for(;Ze!==null;)zg(Ze)}function pS(e,t){var i=lt;lt|=Qt;var n=Vg(),s=Hg();if(_t!==e||Ke!==t){if(Un){var r=e.memoizedUpdaters;0<r.size&&(Co(e,Ke),r.clear()),Xr(e,t)}_l=null,Cu=Zt()+Q0,ha(e,t)}else Fa=Je(e,t);e:do try{if(pt!==Ci&&Ze!==null)t:switch(t=Ze,r=zi,pt){case Su:pt=Ci,zi=null,da(e,t,r,Su);break;case Hr:case Ur:if(tb(r)){pt=Ci,zi=null,Ig(t);break}t=function(){pt!==Hr&&pt!==Ur||_t!==e||(pt=Nu),jn(e)},r.then(t,t);break e;case bl:pt=Nu;break e;case G0:pt=cm;break e;case Nu:tb(r)?(pt=Ci,zi=null,Ig(t)):(pt=Ci,zi=null,da(e,t,r,Nu));break;case cm:var d=null;switch(Ze.tag){case 26:d=Ze.memoizedState;case 5:case 27:var g=Ze;if(d?jv(d):g.stateNode.complete){pt=Ci,zi=null;var A=g.sibling;if(A!==null)Ze=A;else{var O=g.return;O!==null?(Ze=O,Dc(O)):Ze=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}pt=Ci,zi=null,da(e,t,r,cm);break;case gl:pt=Ci,zi=null,da(e,t,r,gl);break;case um:kd(),Rt=yu;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}he.actQueue!==null?Ug():bS();break}catch(K){Wg(e,K)}while(!0);return Gl(),he.H=n,he.A=s,lt=i,Ze!==null?bs:(_t=null,Ke=0,Il(),Rt)}function bS(){for(;Ze!==null&&!p1();)zg(Ze)}function zg(e){var t=e.alternate;(e.mode&Xe)!==Ve?(Ch(e),t=oe(e,wd,t,e,Fn),Ah(e)):t=oe(e,wd,t,e,Fn),e.memoizedProps=e.pendingProps,t===null?Dc(e):Ze=t}function Ig(e){var t=oe(e,gS,e);e.memoizedProps=e.pendingProps,t===null?Dc(e):Ze=t}function gS(e){var t=e.alternate,i=(e.mode&Xe)!==Ve;switch(i&&Ch(e),e.tag){case 15:case 0:t=Jb(t,e,e.pendingProps,e.type,void 0,Ke);break;case 11:t=Jb(t,e,e.pendingProps,e.type.render,e.ref,Ke);break;case 5:Uh(e);default:ag(t,e),e=Ze=zp(e,Fn),t=wd(t,e,Fn)}return i&&Ah(e),t}function da(e,t,i,n){Gl(),Uh(t),Ba=null,ll=0;var s=t.return;try{if(tS(e,s,t,i,Ke)){Rt=pl,vc(e,ki(i,e.current)),Ze=null;return}}catch(r){if(s!==null)throw Ze=s,r;Rt=pl,vc(e,ki(i,e.current)),Ze=null;return}t.flags&32768?(it||n===Su?e=!0:Fa||(Ke&536870912)!==0?e=!1:(Xs=e=!0,(n===Hr||n===Ur||n===bl||n===gl)&&(n=Vi.current,n!==null&&n.tag===13&&(n.flags|=16384))),$g(t,e)):Dc(t)}function Dc(e){var t=e;do{if((t.flags&32768)!==0){$g(t,Xs);return}var i=t.alternate;if(e=t.return,Ch(t),i=oe(t,sS,i,t,Fn),(t.mode&Xe)!==Ve&&Qp(t),i!==null){Ze=i;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);Rt===bs&&(Rt=F0)}function $g(e,t){do{var i=rS(e.alternate,e);if(i!==null){i.flags&=32767,Ze=i;return}if((e.mode&Xe)!==Ve){Qp(e),i=e.actualDuration;for(var n=e.child;n!==null;)i+=n.actualDuration,n=n.sibling;e.actualDuration=i}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ze=e;return}Ze=e=i}while(e!==null);Rt=yu,Ze=null}function Td(e,t,i,n,s,r,d,g,A,O,K,Z,F,re){e.cancelPendingCommit=null;do xo();while(Ft!==Js);if(dn.flushLegacyContextWarning(),dn.flushPendingUnsafeLifecycleWarnings(),(lt&(Qt|Ui))!==ti)throw Error("Should not already be working.");if(on(i),O===Vr?hh(F,re,i,Lt):n!==null?Iy(F,re,i,n,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Lt):zy(F,re,i,Lt),t!==null){if(i===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),t===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(r=t.lanes|t.childLanes,r|=Hf,bt(e,i,r,d,g,A),e===_t&&(Ze=_t=null,Ke=0),Ga=t,er=e,pn=i,pm=r,gm=s,iw=n,bm=re,nw=Z,bn=Au,sw=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,SS(va,function(){return xl=window.event,bn===Au&&(bn=mm),Yg(),null})):(e.callbackNode=null,e.callbackPriority=0),cs=null,$s=zt(),Z!==null&&$y(re,$s,Z,Lt),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=he.T,he.T=null,s=ft.p,ft.p=Fi,d=lt,lt|=Ui;try{hS(e,t,i)}finally{lt=d,ft.p=s,he.T=n}}Ft=Z0,qg(),Pg(),Fg()}}function qg(){if(Ft===Z0){Ft=Js;var e=er,t=Ga,i=pn,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=he.T,he.T=null;var s=ft.p;ft.p=Fi;var r=lt;lt|=Ui;try{qa=i,Pa=e,Kl(),yg(t,e),Pa=qa=null,i=Dm;var d=Tp(e.containerInfo),g=i.focusedElem,A=i.selectionRange;if(d!==g&&g&&g.ownerDocument&&Rp(g.ownerDocument.documentElement,g)){if(A!==null&&lh(g)){var O=A.start,K=A.end;if(K===void 0&&(K=O),"selectionStart"in g)g.selectionStart=O,g.selectionEnd=Math.min(K,g.value.length);else{var Z=g.ownerDocument||document,F=Z&&Z.defaultView||window;if(F.getSelection){var re=F.getSelection(),Ne=g.textContent.length,xe=Math.min(A.start,Ne),St=A.end===void 0?xe:Math.min(A.end,Ne);!re.extend&&xe>St&&(d=St,St=xe,xe=d);var rt=kp(g,xe),q=kp(g,St);if(rt&&q&&(re.rangeCount!==1||re.anchorNode!==rt.node||re.anchorOffset!==rt.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var G=Z.createRange();G.setStart(rt.node,rt.offset),re.removeAllRanges(),xe>St?(re.addRange(G),re.extend(q.node,q.offset)):(G.setEnd(q.node,q.offset),re.addRange(G))}}}}for(Z=[],re=g;re=re.parentNode;)re.nodeType===1&&Z.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<Z.length;g++){var Q=Z[g];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}$u=!!Am,Dm=Am=null}finally{lt=r,ft.p=s,he.T=n}}e.current=t,Ft=J0}}function Pg(){if(Ft===J0){Ft=Js;var e=sw;if(e!==null){$s=zt();var t=ls,i=$s;!Et||i<=t||console.timeStamp(e,t,i,at,st,"secondary-light")}e=er,t=Ga,i=pn;var n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=he.T,he.T=null;var s=ft.p;ft.p=Fi;var r=lt;lt|=Ui;try{qa=i,Pa=e,Kl(),bg(e,t.alternate,t),Pa=qa=null}finally{lt=r,ft.p=s,he.T=n}}e=bm,t=nw,ls=zt(),e=t===null?e:$s,t=ls,i=bn===fm,n=Lt,cs!==null?Wp(e,t,cs,!1,n):!Et||t<=e||(n?n.run(console.timeStamp.bind(console,i?"Commit Interrupted View Transition":"Commit",e,t,at,st,i?"error":"secondary-dark")):console.timeStamp(i?"Commit Interrupted View Transition":"Commit",e,t,at,st,i?"error":"secondary-dark")),Ft=ew}}function Fg(){if(Ft===tw||Ft===ew){if(Ft===tw){var e=ls;ls=zt();var t=ls,i=bn===fm;!Et||t<=e||console.timeStamp(i?"Interrupted View Transition":"Starting Animation",e,t,at,st,i?" error":"secondary-light"),bn!==fm&&(bn=K0)}Ft=Js,b1(),e=er;var n=Ga;t=pn,i=iw;var s=n.actualDuration!==0||(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;s?Ft=Du:(Ft=Js,Ga=er=null,Gg(e,e.pendingLanes),Ir=0,yl=null);var r=e.pendingLanes;if(r===0&&(Zs=null),s||Zg(e),r=Qr(t),n=n.stateNode,li&&typeof li.onCommitFiberRoot=="function")try{var d=(n.current.flags&128)===128;switch(r){case Fi:var g=gf;break;case zn:g=vf;break;case ns:g=va;break;case Fc:g=_f;break;default:g=va}li.onCommitFiberRoot(_a,n,g,d)}catch(Z){Hn||(Hn=!0,console.error("React instrumentation encountered an error: %o",Z))}if(Un&&e.memoizedUpdaters.clear(),fS(),i!==null){d=he.T,g=ft.p,ft.p=Fi,he.T=null;try{var A=e.onRecoverableError;for(n=0;n<i.length;n++){var O=i[n],K=vS(O.stack);oe(O.source,A,O.value,K)}}finally{he.T=d,ft.p=g}}(pn&3)!==0&&xo(),jn(e),r=e.pendingLanes,(t&261930)!==0&&(r&42)!==0?(uu=!0,e===vm?wl++:(wl=0,vm=e)):wl=0,s||Er(t,ls),Ao(0)}}function vS(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Gg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,lo(t)))}function xo(){return qg(),Pg(),Fg(),Yg()}function Yg(){if(Ft!==Du)return!1;var e=er,t=pm;pm=0;var i=Qr(pn),n=ns>i?ns:i;i=he.T;var s=ft.p;try{ft.p=n,he.T=null;var r=gm;gm=null,n=er;var d=pn;if(Ft=Js,Ga=er=null,pn=0,(lt&(Qt|Ui))!==ti)throw Error("Cannot flush passive effects while already rendering.");on(d),_m=!0,ku=!1;var g=0;if(cs=null,g=Zt(),bn===K0)dh(ls,g,DN);else{var A=ls,O=g,K=bn===mm;!Et||O<=A||(Lt?Lt.run(console.timeStamp.bind(console,K?"Waiting for Paint":"Waiting",A,O,at,st,"secondary-light")):console.timeStamp(K?"Waiting for Paint":"Waiting",A,O,at,st,"secondary-light"))}A=lt,lt|=Ui;var Z=n.current;Kl(),kg(Z);var F=n.current;Z=bm,Kl(),xg(n,F,d,r,Z),Zg(n),lt=A;var re=Zt();if(F=g,Z=Lt,cs!==null?Wp(F,re,cs,!0,Z):!Et||re<=F||(Z?Z.run(console.timeStamp.bind(console,"Remaining Effects",F,re,at,st,"secondary-dark")):console.timeStamp("Remaining Effects",F,re,at,st,"secondary-dark")),Er(d,re),Ao(0,!1),ku?n===yl?Ir++:(Ir=0,yl=n):Ir=0,ku=_m=!1,li&&typeof li.onPostCommitFiberRoot=="function")try{li.onPostCommitFiberRoot(_a,n)}catch(xe){Hn||(Hn=!0,console.error("React instrumentation encountered an error: %o",xe))}var Ne=n.current.stateNode;return Ne.effectDuration=0,Ne.passiveEffectDuration=0,!0}finally{ft.p=s,he.T=i,Gg(e,t)}}function Xg(e,t,i){t=ki(i,t),Kp(t),t=cd(e.stateNode,t,2),e=As(e,t,2),e!==null&&(ct(e,2),jn(e))}function dt(e,t,i){if(Ya=!1,e.tag===3)Xg(e,e,i);else{for(;t!==null;){if(t.tag===3){Xg(t,e,i);return}if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Zs===null||!Zs.has(n))){e=ki(i,e),Kp(e),i=ud(2),n=As(t,i,2),n!==null&&(hd(i,n,t,e),ct(n,2),jn(n));return}}t=t.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
199
|
+
|
|
200
|
+
Error message:
|
|
201
|
+
|
|
202
|
+
%s`,i)}}function Md(e,t,i){var n=e.pingCache;if(n===null){n=e.pingCache=new BN;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(i)||(hm=!0,s.add(i),n=_S.bind(null,e,t,i),Un&&Co(e,i),t.then(n,n))}function _S(e,t,i){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,(i&127)!==0?0>qn&&(kr=qn=zt(),Qo=su("Promise Resolved"),qs=ru):(i&4194048)!==0&&0>Ji&&(us=Ji=zt(),Zo=su("Promise Resolved"),Ff=ru),Mg()&&he.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
203
|
+
|
|
204
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
205
|
+
|
|
206
|
+
act(() => {
|
|
207
|
+
/* finish loading suspended data */
|
|
208
|
+
});
|
|
209
|
+
/* assert on the output */
|
|
210
|
+
|
|
211
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),_t===e&&(Ke&i)===i&&(Rt===Ys||Rt===wu&&(Ke&62914560)===Ke&&Zt()-xu<X0?(lt&Qt)===ti&&ha(e,0):dm|=i,zr===Ke&&(zr=0)),jn(e)}function Qg(e,t){t===0&&(t=Ye()),e=oi(e,t),e!==null&&(ct(e,t),jn(e))}function wS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Qg(e,i)}function yS(e,t){var i=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(i=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}n!==null&&n.delete(t),Qg(e,i)}function Od(e,t,i){if((t.subtreeFlags&67117056)!==0)for(t=t.child;t!==null;){var n=e,s=t,r=s.type===Uc;r=i||r,s.tag!==22?s.flags&67108864?r&&oe(s,Kg,n,s):Od(n,s,r):s.memoizedState===null&&(r&&s.flags&8192?oe(s,Kg,n,s):s.subtreeFlags&67108864&&oe(s,Od,n,s,r)),t=t.sibling}}function Kg(e,t){Ae(!0);try{Ng(t),Rg(t),Eg(e,t.alternate,t,!1),Cg(e,t,0,null,!1,0)}finally{Ae(!1)}}function Zg(e){var t=!0;e.current.mode&(ci|hn)||(t=!1),Od(e,e.current,t)}function Jg(e){if((lt&Qt)===ti){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=R(e)||"ReactComponent",Ru!==null){if(Ru.has(t))return;Ru.add(t)}else Ru=new Set([t]);oe(e,function(){console.error("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 tries to update the component. Move this work to useEffect instead.")})}}}function Co(e,t){Un&&e.memoizedUpdaters.forEach(function(i){cr(e,i,t)})}function SS(e,t){var i=he.actQueue;return i!==null?(i.push(t),UN):bf(e,t)}function NS(e){Mg()&&he.actQueue===null&&oe(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
212
|
+
|
|
213
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
214
|
+
|
|
215
|
+
act(() => {
|
|
216
|
+
/* fire events that update state */
|
|
217
|
+
});
|
|
218
|
+
/* assert on the output */
|
|
219
|
+
|
|
220
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,R(e))})}function jn(e){e!==Xa&&e.next===null&&(Xa===null?Tu=Xa=e:Xa=Xa.next=e),Mu=!0,he.actQueue!==null?ym||(ym=!0,nv()):wm||(wm=!0,nv())}function Ao(e,t){if(!Sm&&Mu){Sm=!0;do for(var i=!1,n=Tu;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var r=0;else{var d=n.suspendedLanes,g=n.pingedLanes;r=(1<<31-fi(42|e)+1)-1,r&=s&~(d&~g),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(i=!0,iv(n,r))}else r=Ke,r=Te(n,n===_t?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==Fr),(r&3)===0||Je(n,r)||(i=!0,iv(n,r));n=n.next}while(i);Sm=!1}}function ES(){xl=window.event,jd()}function jd(){Mu=ym=wm=!1;var e=0;tr!==0&&TS()&&(e=tr);for(var t=Zt(),i=null,n=Tu;n!==null;){var s=n.next,r=ev(n,t);r===0?(n.next=null,i===null?Tu=s:i.next=s,s===null&&(Xa=i)):(i=n,(e!==0||(r&3)!==0)&&(Mu=!0)),n=s}Ft!==Js&&Ft!==Du||Ao(e),tr!==0&&(tr=0)}function ev(e,t){for(var i=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var d=31-fi(r),g=1<<d,A=s[d];A===-1?((g&i)===0||(g&n)!==0)&&(s[d]=Ie(g,t)):A<=t&&(e.expiredLanes|=g),r&=~g}if(t=_t,i=Ke,i=Te(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Fr),n=e.callbackNode,i===0||e===t&&(pt===Hr||pt===Ur)||e.cancelPendingCommit!==null)return n!==null&&Ld(n),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Je(e,i)){if(t=i&-i,t!==e.callbackPriority||he.actQueue!==null&&n!==Nm)Ld(n);else return t;switch(Qr(i)){case Fi:case zn:i=vf;break;case ns:i=va;break;case Fc:i=_f;break;default:i=va}return n=tv.bind(null,e),he.actQueue!==null?(he.actQueue.push(n),i=Nm):i=bf(i,n),e.callbackPriority=t,e.callbackNode=i,t}return n!==null&&Ld(n),e.callbackPriority=2,e.callbackNode=null,2}function tv(e,t){if(uu=cu=!1,xl=window.event,Ft!==Js&&Ft!==Du)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(bn===Au&&(bn=mm),xo()&&e.callbackNode!==i)return null;var n=Ke;return n=Te(e,e===_t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Fr),n===0?null:(jg(e,n,t),ev(e,Zt()),e.callbackNode!=null&&e.callbackNode===i?tv.bind(null,e):null)}function iv(e,t){if(xo())return null;cu=uu,uu=!1,jg(e,t,!0)}function Ld(e){e!==Nm&&e!==null&&m1(e)}function nv(){he.actQueue!==null&&he.actQueue.push(function(){return jd(),null}),QN(function(){(lt&(Qt|Ui))!==ti?bf(gf,ES):jd()})}function Wd(){if(tr===0){var e=Mr;e===0&&(e=$c,$c<<=1,($c&261888)===0&&($c=256)),tr=e}return tr}function sv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(Le(e,"action"),so(""+e))}function rv(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function xS(e,t,i,n,s){if(t==="submit"&&i&&i.stateNode===s){var r=sv((s[mi]||null).action),d=n.submitter;d&&(t=(t=d[mi]||null)?sv(t.formAction):d.getAttribute("formAction"),t!==null&&(r=t,d=null));var g=new Kc("action","action",null,n,s);e.push({event:g,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(tr!==0){var A=d?rv(s,d):new FormData(s),O={pending:!0,data:A,method:s.method,action:r};Object.freeze(O),id(i,O,null,A)}}else typeof r=="function"&&(g.preventDefault(),A=d?rv(s,d):new FormData(s),O={pending:!0,data:A,method:s.method,action:r},Object.freeze(O),id(i,O,r,A))},currentTarget:s}]})}}function kc(e,t,i){e.currentTarget=i;try{t(e)}catch(n){Lf(n)}e.currentTarget=null}function av(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var n=e[i];e:{var s=void 0,r=n.event;if(n=n.listeners,t)for(var d=n.length-1;0<=d;d--){var g=n[d],A=g.instance,O=g.currentTarget;if(g=g.listener,A!==s&&r.isPropagationStopped())break e;A!==null?oe(A,kc,r,g,O):kc(r,g,O),s=A}else for(d=0;d<n.length;d++){if(g=n[d],A=g.instance,O=g.currentTarget,g=g.listener,A!==s&&r.isPropagationStopped())break e;A!==null?oe(A,kc,r,g,O):kc(r,g,O),s=A}}}}function nt(e,t){Em.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var i=t[wf];i===void 0&&(i=t[wf]=new Set);var n=e+"__bubble";i.has(n)||(ov(t,e,2,!1),i.add(n))}function Bd(e,t,i){Em.has(e)&&!t&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var n=0;t&&(n|=4),ov(i,e,n,t)}function Vd(e){if(!e[Ou]){e[Ou]=!0,n_.forEach(function(i){i!=="selectionchange"&&(Em.has(i)||Bd(i,!1,e),Bd(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ou]||(t[Ou]=!0,Bd("selectionchange",!1,t))}}function ov(e,t,i,n){switch(Uv(t)){case Fi:var s=r1;break;case zn:s=a1;break;default:s=ef}i=s.bind(null,t,i,e),s=void 0,!xf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,i,{capture:!0,passive:s}):e.addEventListener(t,i,!0):s!==void 0?e.addEventListener(t,i,{passive:s}):e.addEventListener(t,i,!1)}function Hd(e,t,i,n,s){var r=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var g=n.stateNode.containerInfo;if(g===s)break;if(d===4)for(d=n.return;d!==null;){var A=d.tag;if((A===3||A===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;g!==null;){if(d=we(g),d===null)return;if(A=d.tag,A===5||A===6||A===26||A===27){n=r=d;continue e}g=g.parentNode}}n=n.return}vp(function(){var O=r,K=ah(i),Z=[];e:{var F=U_.get(e);if(F!==void 0){var re=Kc,Ne=e;switch(e){case"keypress":if(Bl(i)===0)break e;case"keydown":case"keyup":re=tN;break;case"focusin":Ne="focus",re=kf;break;case"focusout":Ne="blur",re=kf;break;case"beforeblur":case"afterblur":re=kf;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=C_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=$1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=sN;break;case W_:case B_:case V_:re=F1;break;case H_:re=aN;break;case"scroll":case"scrollend":re=z1;break;case"wheel":re=lN;break;case"copy":case"cut":case"paste":re=Y1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=D_;break;case"toggle":case"beforetoggle":re=uN}var xe=(t&4)!==0,St=!xe&&(e==="scroll"||e==="scrollend"),rt=xe?F!==null?F+"Capture":null:F;xe=[];for(var q=O,G;q!==null;){var Q=q;if(G=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||G===null||rt===null||(Q=ro(q,rt),Q!=null&&xe.push(Do(q,Q,G))),St)break;q=q.return}0<xe.length&&(F=new re(F,Ne,null,i,K),Z.push({event:F,listeners:xe}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",re=e==="mouseout"||e==="pointerout",F&&i!==Ho&&(Ne=i.relatedTarget||i.fromElement)&&(we(Ne)||Ne[Bs]))break e;if((re||F)&&(F=K.window===K?K:(F=K.ownerDocument)?F.defaultView||F.parentWindow:window,re?(Ne=i.relatedTarget||i.toElement,re=O,Ne=Ne?we(Ne):null,Ne!==null&&(St=h(Ne),xe=Ne.tag,Ne!==St||xe!==5&&xe!==27&&xe!==6)&&(Ne=null)):(re=null,Ne=O),re!==Ne)){if(xe=C_,Q="onMouseLeave",rt="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(xe=D_,Q="onPointerLeave",rt="onPointerEnter",q="pointer"),St=re==null?F:ke(re),G=Ne==null?F:ke(Ne),F=new xe(Q,q+"leave",re,i,K),F.target=St,F.relatedTarget=G,Q=null,we(K)===O&&(xe=new xe(rt,q+"enter",Ne,i,K),xe.target=G,xe.relatedTarget=St,Q=xe),St=Q,re&&Ne)t:{for(xe=CS,rt=re,q=Ne,G=0,Q=rt;Q;Q=xe(Q))G++;Q=0;for(var fe=q;fe;fe=xe(fe))Q++;for(;0<G-Q;)rt=xe(rt),G--;for(;0<Q-G;)q=xe(q),Q--;for(;G--;){if(rt===q||q!==null&&rt===q.alternate){xe=rt;break t}rt=xe(rt),q=xe(q)}xe=null}else xe=null;re!==null&&lv(Z,F,re,xe,!1),Ne!==null&&St!==null&&lv(Z,St,Ne,xe,!0)}}e:{if(F=O?ke(O):window,re=F.nodeName&&F.nodeName.toLowerCase(),re==="select"||re==="input"&&F.type==="file")var Ee=xp;else if(Np(F))if(j_)Ee=Vy;else{Ee=Wy;var Ue=Ly}else re=F.nodeName,!re||re.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?O&&no(O.elementType)&&(Ee=xp):Ee=By;if(Ee&&(Ee=Ee(e,O))){Ep(Z,Ee,i,K);break e}Ue&&Ue(e,F,O),e==="focusout"&&O&&F.type==="number"&&O.memoizedProps.value!=null&&eh(F,"number",F.value)}switch(Ue=O?ke(O):window,e){case"focusin":(Np(Ue)||Ue.contentEditable==="true")&&(Ca=Ue,Tf=O,Fo=null);break;case"focusout":Fo=Tf=Ca=null;break;case"mousedown":Mf=!0;break;case"contextmenu":case"mouseup":case"dragend":Mf=!1,Mp(Z,i,K);break;case"selectionchange":if(mN)break;case"keydown":case"keyup":Mp(Z,i,K)}var Oe;if(Rf)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else xa?yp(e,i)&&(Re="onCompositionEnd"):e==="keydown"&&i.keyCode===k_&&(Re="onCompositionStart");Re&&(R_&&i.locale!=="ko"&&(xa||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&xa&&(Oe=_p()):(Vs=K,Cf="value"in Vs?Vs.value:Vs.textContent,xa=!0)),Ue=Rc(O,Re),0<Ue.length&&(Re=new A_(Re,e,null,i,K),Z.push({event:Re,listeners:Ue}),Oe?Re.data=Oe:(Oe=Sp(i),Oe!==null&&(Re.data=Oe)))),(Oe=dN?Ty(e,i):My(e,i))&&(Re=Rc(O,"onBeforeInput"),0<Re.length&&(Ue=new Q1("onBeforeInput","beforeinput",null,i,K),Z.push({event:Ue,listeners:Re}),Ue.data=Oe)),xS(Z,e,O,i,K)}av(Z,t)})}function Do(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Rc(e,t){for(var i=t+"Capture",n=[];e!==null;){var s=e,r=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||r===null||(s=ro(e,i),s!=null&&n.unshift(Do(e,s,r)),s=ro(e,t),s!=null&&n.push(Do(e,s,r))),e.tag===3)return n;e=e.return}return[]}function CS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function lv(e,t,i,n,s){for(var r=t._reactName,d=[];i!==null&&i!==n;){var g=i,A=g.alternate,O=g.stateNode;if(g=g.tag,A!==null&&A===n)break;g!==5&&g!==26&&g!==27||O===null||(A=O,s?(O=ro(i,r),O!=null&&d.unshift(Do(i,O,A))):s||(O=ro(i,r),O!=null&&d.push(Do(i,O,A)))),i=i.return}d.length!==0&&e.push({event:t,listeners:d})}function Ud(e,t){Ay(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||E_||(E_=!0,e==="select"&&t.multiple?console.error("`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):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var i={registrationNameDependencies:xr,possibleRegistrationNames:yf};no(e)||typeof t.is=="string"||ky(e,t,i),t.contentEditable&&!t.suppressContentEditableWarning&&t.children!=null&&console.error("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.")}function Kt(e,t,i,n){t!==i&&(i=Ms(i),Ms(t)!==i&&(n[e]=t))}function AS(e,t,i){t.forEach(function(n){i[hv(n)]=n==="style"?Id(e):e.getAttribute(n)})}function Ln(e,t){t===!1?console.error("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):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)}function cv(e,t){return e=e.namespaceURI===Yc||e.namespaceURI===ya?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function Ms(e){return ze(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",be(e)),qe(e)),(typeof e=="string"?e:""+e).replace(zN,`
|
|
221
|
+
`).replace(IN,"")}function uv(e,t){return t=Ms(t),Ms(e)===t}function gt(e,t,i,n,s,r){switch(i){case"children":typeof n=="string"?(Wl(n,t,!1),t==="body"||t==="textarea"&&n===""||io(e,n)):(typeof n=="number"||typeof n=="bigint")&&(Wl(""+n,t,!1),t!=="body"&&io(e,""+n));break;case"className":Ol(e,"class",n);break;case"tabIndex":Ol(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ol(e,i,n);break;case"style":pp(e,n,r);break;case"data":if(t!=="object"){Ol(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||i!=="href")){console.error(i==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',i,i),e.removeAttribute(i);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(i);break}Le(n,i),n=so(""+n),e.setAttribute(i,n);break;case"action":case"formAction":if(n!=null&&(t==="form"?i==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof n=="function"&&(s.encType==null&&s.method==null||Wu||(Wu=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),s.target==null||Lu||(Lu=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):t==="input"||t==="button"?i==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):t!=="input"||s.type==="submit"||s.type==="image"||ju?t!=="button"||s.type==null||s.type==="submit"||ju?typeof n=="function"&&(s.name==null||cw||(cw=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),s.formEncType==null&&s.formMethod==null||Wu||(Wu=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),s.formTarget==null||Lu||(Lu=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(ju=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(ju=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(i==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof n=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof r=="function"&&(i==="formAction"?(t!=="input"&>(e,t,"name",s.name,s,null),gt(e,t,"formEncType",s.formEncType,s,null),gt(e,t,"formMethod",s.formMethod,s,null),gt(e,t,"formTarget",s.formTarget,s,null)):(gt(e,t,"encType",s.encType,s,null),gt(e,t,"method",s.method,s,null),gt(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(i);break}Le(n,i),n=so(""+n),e.setAttribute(i,n);break;case"onClick":n!=null&&(typeof n!="function"&&Ln(i,n),e.onclick=Yn);break;case"onScroll":n!=null&&(typeof n!="function"&&Ln(i,n),nt("scroll",e));break;case"onScrollEnd":n!=null&&(typeof n!="function"&&Ln(i,n),nt("scrollend",e));break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(i=n.__html,i!=null){if(s.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=i}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}Le(n,i),i=so(""+n),e.setAttributeNS($r,"xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?(Le(n,i),e.setAttribute(i,""+n)):e.removeAttribute(i);break;case"inert":n!==""||Bu[i]||(Bu[i]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",i));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":n===!0?e.setAttribute(i,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?(Le(n,i),e.setAttribute(i,n)):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?(Le(n,i),e.setAttribute(i,n)):e.removeAttribute(i);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(i):(Le(n,i),e.setAttribute(i,n));break;case"popover":nt("beforetoggle",e),nt("toggle",e),Kr(e,"popover",n);break;case"xlinkActuate":Gn(e,$r,"xlink:actuate",n);break;case"xlinkArcrole":Gn(e,$r,"xlink:arcrole",n);break;case"xlinkRole":Gn(e,$r,"xlink:role",n);break;case"xlinkShow":Gn(e,$r,"xlink:show",n);break;case"xlinkTitle":Gn(e,$r,"xlink:title",n);break;case"xlinkType":Gn(e,$r,"xlink:type",n);break;case"xmlBase":Gn(e,xm,"xml:base",n);break;case"xmlLang":Gn(e,xm,"xml:lang",n);break;case"xmlSpace":Gn(e,xm,"xml:space",n);break;case"is":r!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),Kr(e,"is",n);break;case"innerText":case"textContent":break;case"popoverTarget":uw||n==null||typeof n!="object"||(uw=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",n));default:!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N"?(i=bp(i),Kr(e,i,n)):xr.hasOwnProperty(i)&&n!=null&&typeof n!="function"&&Ln(i,n)}}function zd(e,t,i,n,s,r){switch(i){case"style":pp(e,n,r);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(i=n.__html,i!=null){if(s.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=i}}break;case"children":typeof n=="string"?io(e,n):(typeof n=="number"||typeof n=="bigint")&&io(e,""+n);break;case"onScroll":n!=null&&(typeof n!="function"&&Ln(i,n),nt("scroll",e));break;case"onScrollEnd":n!=null&&(typeof n!="function"&&Ln(i,n),nt("scrollend",e));break;case"onClick":n!=null&&(typeof n!="function"&&Ln(i,n),e.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(xr.hasOwnProperty(i))n!=null&&typeof n!="function"&&Ln(i,n);else e:{if(i[0]==="o"&&i[1]==="n"&&(s=i.endsWith("Capture"),t=i.slice(2,s?i.length-7:void 0),r=e[mi]||null,r=r!=null?r[i]:null,typeof r=="function"&&e.removeEventListener(t,r,s),typeof n=="function")){typeof r!="function"&&r!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,n,s);break e}i in e?e[i]=n:n===!0?e.setAttribute(i,""):Kr(e,i,n)}}}function si(e,t,i){switch(Ud(t,i),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",e),nt("load",e);var n=!1,s=!1,r;for(r in i)if(i.hasOwnProperty(r)){var d=i[r];if(d!=null)switch(r){case"src":n=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:gt(e,t,r,d,i,null)}}s&>(e,t,"srcSet",i.srcSet,i,null),n&>(e,t,"src",i.src,i,null);return;case"input":hi("input",i),nt("invalid",e);var g=r=d=s=null,A=null,O=null;for(n in i)if(i.hasOwnProperty(n)){var K=i[n];if(K!=null)switch(n){case"name":s=K;break;case"type":d=K;break;case"checked":A=K;break;case"defaultChecked":O=K;break;case"value":r=K;break;case"defaultValue":g=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:gt(e,t,n,K,i,null)}}Jm(e,i),ep(e,r,g,A,O,d,s,!1);return;case"select":hi("select",i),nt("invalid",e),n=d=r=null;for(s in i)if(i.hasOwnProperty(s)&&(g=i[s],g!=null))switch(s){case"value":r=g;break;case"defaultValue":d=g;break;case"multiple":n=g;default:gt(e,t,s,g,i,null)}np(e,i),t=r,i=d,e.multiple=!!n,t!=null?Zr(e,!!n,t,!1):i!=null&&Zr(e,!!n,i,!0);return;case"textarea":hi("textarea",i),nt("invalid",e),r=s=n=null;for(d in i)if(i.hasOwnProperty(d)&&(g=i[d],g!=null))switch(d){case"value":n=g;break;case"defaultValue":s=g;break;case"children":r=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:gt(e,t,d,g,i,null)}sp(e,i),ap(e,n,s,r);return;case"option":tp(e,i);for(A in i)if(i.hasOwnProperty(A)&&(n=i[A],n!=null))switch(A){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:gt(e,t,A,n,i,null)}return;case"dialog":nt("beforetoggle",e),nt("toggle",e),nt("cancel",e),nt("close",e);break;case"iframe":case"object":nt("load",e);break;case"video":case"audio":for(n=0;n<Sl.length;n++)nt(Sl[n],e);break;case"image":nt("error",e),nt("load",e);break;case"details":nt("toggle",e);break;case"embed":case"source":case"link":nt("error",e),nt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in i)if(i.hasOwnProperty(O)&&(n=i[O],n!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:gt(e,t,O,n,i,null)}return;default:if(no(t)){for(K in i)i.hasOwnProperty(K)&&(n=i[K],n!==void 0&&zd(e,t,K,n,i,void 0));return}}for(g in i)i.hasOwnProperty(g)&&(n=i[g],n!=null&>(e,t,g,n,i,null))}function DS(e,t,i,n){switch(Ud(t,n),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,r=null,d=null,g=null,A=null,O=null,K=null;for(re in i){var Z=i[re];if(i.hasOwnProperty(re)&&Z!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":A=Z;default:n.hasOwnProperty(re)||gt(e,t,re,null,n,Z)}}for(var F in n){var re=n[F];if(Z=i[F],n.hasOwnProperty(F)&&(re!=null||Z!=null))switch(F){case"type":r=re;break;case"name":s=re;break;case"checked":O=re;break;case"defaultChecked":K=re;break;case"value":d=re;break;case"defaultValue":g=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:re!==Z&>(e,t,F,re,n,Z)}}t=i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null,n=n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null,t||!n||lw||(console.error("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://react.dev/link/controlled-components"),lw=!0),!t||n||ow||(console.error("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://react.dev/link/controlled-components"),ow=!0),Ju(e,d,g,A,O,K,r,s);return;case"select":re=d=g=F=null;for(r in i)if(A=i[r],i.hasOwnProperty(r)&&A!=null)switch(r){case"value":break;case"multiple":re=A;default:n.hasOwnProperty(r)||gt(e,t,r,null,n,A)}for(s in n)if(r=n[s],A=i[s],n.hasOwnProperty(s)&&(r!=null||A!=null))switch(s){case"value":F=r;break;case"defaultValue":g=r;break;case"multiple":d=r;default:r!==A&>(e,t,s,r,n,A)}n=g,t=d,i=re,F!=null?Zr(e,!!t,F,!1):!!i!=!!t&&(n!=null?Zr(e,!!t,n,!0):Zr(e,!!t,t?[]:"",!1));return;case"textarea":re=F=null;for(g in i)if(s=i[g],i.hasOwnProperty(g)&&s!=null&&!n.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:gt(e,t,g,null,n,s)}for(d in n)if(s=n[d],r=i[d],n.hasOwnProperty(d)&&(s!=null||r!=null))switch(d){case"value":F=s;break;case"defaultValue":re=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:s!==r&>(e,t,d,s,n,r)}rp(e,F,re);return;case"option":for(var Ne in i)if(F=i[Ne],i.hasOwnProperty(Ne)&&F!=null&&!n.hasOwnProperty(Ne))switch(Ne){case"selected":e.selected=!1;break;default:gt(e,t,Ne,null,n,F)}for(A in n)if(F=n[A],re=i[A],n.hasOwnProperty(A)&&F!==re&&(F!=null||re!=null))switch(A){case"selected":e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:gt(e,t,A,F,n,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var xe in i)F=i[xe],i.hasOwnProperty(xe)&&F!=null&&!n.hasOwnProperty(xe)&>(e,t,xe,null,n,F);for(O in n)if(F=n[O],re=i[O],n.hasOwnProperty(O)&&F!==re&&(F!=null||re!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:gt(e,t,O,F,n,re)}return;default:if(no(t)){for(var St in i)F=i[St],i.hasOwnProperty(St)&&F!==void 0&&!n.hasOwnProperty(St)&&zd(e,t,St,void 0,n,F);for(K in n)F=n[K],re=i[K],!n.hasOwnProperty(K)||F===re||F===void 0&&re===void 0||zd(e,t,K,F,n,re);return}}for(var rt in i)F=i[rt],i.hasOwnProperty(rt)&&F!=null&&!n.hasOwnProperty(rt)&>(e,t,rt,null,n,F);for(Z in n)F=n[Z],re=i[Z],!n.hasOwnProperty(Z)||F===re||F==null&&re==null||gt(e,t,Z,F,n,re)}function hv(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function Id(e){var t={};e=e.style;for(var i=0;i<e.length;i++){var n=e[i];t[n]=e.getPropertyValue(n)}return t}function dv(e,t,i){if(t!=null&&typeof t!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var n,s=n="",r;for(r in t)if(t.hasOwnProperty(r)){var d=t[r];d!=null&&typeof d!="boolean"&&d!==""&&(r.indexOf("--")===0?(De(d,r),n+=s+r+":"+(""+d).trim()):typeof d!="number"||d===0||S_.has(r)?(De(d,r),n+=s+r.replace(g_,"-$1").toLowerCase().replace(v_,"-ms-")+":"+(""+d).trim()):n+=s+r.replace(g_,"-$1").toLowerCase().replace(v_,"-ms-")+":"+d+"px",s=";")}n=n||null,t=e.getAttribute("style"),t!==n&&(n=Ms(n),Ms(t)!==n&&(i.style=Id(e)))}}function Pi(e,t,i,n,s,r){if(s.delete(i),e=e.getAttribute(i),e===null)switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return}else if(n!=null)switch(typeof n){case"function":case"symbol":case"boolean":break;default:if(Le(n,t),e===""+n)return}Kt(t,e,n,r)}function fv(e,t,i,n,s,r){if(s.delete(i),e=e.getAttribute(i),e===null){switch(typeof n){case"function":case"symbol":return}if(!n)return}else switch(typeof n){case"function":case"symbol":break;default:if(n)return}Kt(t,e,n,r)}function $d(e,t,i,n,s,r){if(s.delete(i),e=e.getAttribute(i),e===null)switch(typeof n){case"undefined":case"function":case"symbol":return}else if(n!=null)switch(typeof n){case"function":case"symbol":break;default:if(Le(n,i),e===""+n)return}Kt(t,e,n,r)}function mv(e,t,i,n,s,r){if(s.delete(i),e=e.getAttribute(i),e===null)switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(n))return}else if(n!=null)switch(typeof n){case"function":case"symbol":case"boolean":break;default:if(!isNaN(n)&&(Le(n,t),e===""+n))return}Kt(t,e,n,r)}function qd(e,t,i,n,s,r){if(s.delete(i),e=e.getAttribute(i),e===null)switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return}else if(n!=null)switch(typeof n){case"function":case"symbol":case"boolean":break;default:if(Le(n,t),i=so(""+n),e===i)return}Kt(t,e,n,r)}function pv(e,t,i,n){for(var s={},r=new Set,d=e.attributes,g=0;g<d.length;g++)switch(d[g].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:r.add(d[g].name)}if(no(t)){for(var A in i)if(i.hasOwnProperty(A)){var O=i[A];if(O!=null){if(xr.hasOwnProperty(A))typeof O!="function"&&Ln(A,O);else if(i.suppressHydrationWarning!==!0)switch(A){case"children":typeof O!="string"&&typeof O!="number"||Kt("children",e.textContent,O,s);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":d=e.innerHTML,O=O?O.__html:void 0,O!=null&&(O=cv(e,O),Kt(A,d,O,s));continue;case"style":r.delete(A),dv(e,O,s);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":r.delete(A.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",A);continue;case"className":r.delete("class"),d=Ml(e,"class",O),Kt("className",d,O,s);continue;default:n.context===gs&&t!=="svg"&&t!=="math"?r.delete(A.toLowerCase()):r.delete(A),d=Ml(e,A,O),Kt(A,d,O,s)}}}}else for(O in i)if(i.hasOwnProperty(O)&&(A=i[O],A!=null)){if(xr.hasOwnProperty(O))typeof A!="function"&&Ln(O,A);else if(i.suppressHydrationWarning!==!0)switch(O){case"children":typeof A!="string"&&typeof A!="number"||Kt("children",e.textContent,A,s);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":d=e.innerHTML,A=A?A.__html:void 0,A!=null&&(A=cv(e,A),d!==A&&(s[O]={__html:d}));continue;case"className":Pi(e,O,"class",A,r,s);continue;case"tabIndex":Pi(e,O,"tabindex",A,r,s);continue;case"style":r.delete(O),dv(e,A,s);continue;case"multiple":r.delete(O),Kt(O,e.multiple,A,s);continue;case"muted":r.delete(O),Kt(O,e.muted,A,s);continue;case"autoFocus":r.delete("autofocus"),Kt(O,e.autofocus,A,s);continue;case"data":if(t!=="object"){r.delete(O),d=e.getAttribute("data"),Kt(O,d,A,s);continue}case"src":case"href":if(!(A!==""||t==="a"&&O==="href"||t==="object"&&O==="data")){console.error(O==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',O,O);continue}qd(e,O,O,A,r,s);continue;case"action":case"formAction":if(d=e.getAttribute(O),typeof A=="function"){r.delete(O.toLowerCase()),O==="formAction"?(r.delete("name"),r.delete("formenctype"),r.delete("formmethod"),r.delete("formtarget")):(r.delete("enctype"),r.delete("method"),r.delete("target"));continue}else if(d===$N){r.delete(O.toLowerCase()),Kt(O,"function",A,s);continue}qd(e,O,O.toLowerCase(),A,r,s);continue;case"xlinkHref":qd(e,O,"xlink:href",A,r,s);continue;case"contentEditable":$d(e,O,"contenteditable",A,r,s);continue;case"spellCheck":$d(e,O,"spellcheck",A,r,s);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":$d(e,O,O,A,r,s);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":fv(e,O,O.toLowerCase(),A,r,s);continue;case"capture":case"download":e:{g=e;var K=d=O,Z=s;if(r.delete(K),g=g.getAttribute(K),g===null)switch(typeof A){case"undefined":case"function":case"symbol":break e;default:if(A===!1)break e}else if(A!=null)switch(typeof A){case"function":case"symbol":break;case"boolean":if(A===!0&&g==="")break e;break;default:if(Le(A,d),g===""+A)break e}Kt(d,g,A,Z)}continue;case"cols":case"rows":case"size":case"span":e:{if(g=e,K=d=O,Z=s,r.delete(K),g=g.getAttribute(K),g===null)switch(typeof A){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(A)||1>A)break e}else if(A!=null)switch(typeof A){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(A)||1>A)&&(Le(A,d),g===""+A))break e}Kt(d,g,A,Z)}continue;case"rowSpan":mv(e,O,"rowspan",A,r,s);continue;case"start":mv(e,O,O,A,r,s);continue;case"xHeight":Pi(e,O,"x-height",A,r,s);continue;case"xlinkActuate":Pi(e,O,"xlink:actuate",A,r,s);continue;case"xlinkArcrole":Pi(e,O,"xlink:arcrole",A,r,s);continue;case"xlinkRole":Pi(e,O,"xlink:role",A,r,s);continue;case"xlinkShow":Pi(e,O,"xlink:show",A,r,s);continue;case"xlinkTitle":Pi(e,O,"xlink:title",A,r,s);continue;case"xlinkType":Pi(e,O,"xlink:type",A,r,s);continue;case"xmlBase":Pi(e,O,"xml:base",A,r,s);continue;case"xmlLang":Pi(e,O,"xml:lang",A,r,s);continue;case"xmlSpace":Pi(e,O,"xml:space",A,r,s);continue;case"inert":A!==""||Bu[O]||(Bu[O]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",O)),fv(e,O,O,A,r,s);continue;default:if(!(2<O.length)||O[0]!=="o"&&O[0]!=="O"||O[1]!=="n"&&O[1]!=="N"){g=bp(O),d=!1,n.context===gs&&t!=="svg"&&t!=="math"?r.delete(g.toLowerCase()):(K=O.toLowerCase(),K=Xc.hasOwnProperty(K)&&Xc[K]||null,K!==null&&K!==O&&(d=!0,r.delete(K)),r.delete(g));e:if(K=e,Z=g,g=A,_n(Z))if(K.hasAttribute(Z))K=K.getAttribute(Z),Le(g,Z),g=K===""+g?g:K;else{switch(typeof g){case"function":case"symbol":break e;case"boolean":if(K=Z.toLowerCase().slice(0,5),K!=="data-"&&K!=="aria-")break e}g=g===void 0?void 0:null}else g=void 0;d||Kt(O,g,A,s)}}}return 0<r.size&&i.suppressHydrationWarning!==!0&&AS(e,r,s),Object.keys(s).length===0?null:s}function kS(e,t){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+t+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+t+" "+e[e.length-1]}}function bv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function RS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),n=0;n<i.length;n++){var s=i[n],r=s.transferSize,d=s.initiatorType,g=s.duration;if(r&&g&&bv(d)){for(d=0,g=s.responseEnd,n+=1;n<i.length;n++){var A=i[n],O=A.startTime;if(O>g)break;var K=A.transferSize,Z=A.initiatorType;K&&bv(Z)&&(A=A.responseEnd,d+=K*(A<g?1:(g-O)/(A-O)))}if(--n,t+=8*(r+d)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}function Tc(e){return e.nodeType===9?e:e.ownerDocument}function gv(e){switch(e){case ya:return Ka;case Yc:return Hu;default:return gs}}function vv(e,t){if(e===gs)switch(t){case"svg":return Ka;case"math":return Hu;default:return gs}return e===Ka&&t==="foreignObject"?gs:e}function Pd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function TS(){var e=window.event;return e&&e.type==="popstate"?e===km?!1:(km=e,!0):(km=null,!1)}function ko(){var e=window.event;return e&&e!==xl?e.type:null}function Ro(){var e=window.event;return e&&e!==xl?e.timeStamp:-1.1}function MS(e){setTimeout(function(){throw e})}function OS(e,t,i){switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&e.focus();break;case"img":i.src?e.src=i.src:i.srcSet&&(e.srcset=i.srcSet)}}function jS(){}function LS(e,t,i,n){DS(e,t,i,n),e[mi]=n}function _v(e){io(e,"")}function WS(e,t,i){e.nodeValue=i}function wv(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[mi]||null;if(t!==null){var i=Se(e);i!==null&&(typeof t.children=="string"||typeof t.children=="number"?(e.__reactWarnedAboutChildrenConflict=!0,oe(i,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):t.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,oe(i,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Os(e){return e==="head"}function BS(e,t){e.removeChild(t)}function VS(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function yv(e,t){var i=t,n=0;do{var s=i.nextSibling;if(e.removeChild(i),s&&s.nodeType===8)if(i=s.data,i===El||i===Vu){if(n===0){e.removeChild(s),pa(t);return}n--}else if(i===Nl||i===ir||i===Pr||i===Qa||i===qr)n++;else if(i===PN)To(e.ownerDocument.documentElement);else if(i===GN){i=e.ownerDocument.head,To(i);for(var r=i.firstChild;r;){var d=r.nextSibling,g=r.nodeName;r[Vo]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&r.rel.toLowerCase()==="stylesheet"||i.removeChild(r),r=d}}else i===FN&&To(e.ownerDocument.body);i=s}while(i);pa(t)}function Sv(e,t){var i=e;e=0;do{var n=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),n&&n.nodeType===8)if(i=n.data,i===El){if(e===0)break;e--}else i!==Nl&&i!==ir&&i!==Pr&&i!==Qa||e++;i=n}while(i)}function HS(e){Sv(e,!0)}function US(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function zS(e){e.nodeValue=""}function IS(e){Sv(e,!1)}function $S(e,t){t=t[YN],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function qS(e,t){e.nodeValue=t}function Fd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Fd(i),te(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function PS(e,t,i,n){for(;e.nodeType===1;){var s=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Vo])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){Le(s.name,"name");var r=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=ji(e.nextSibling),e===null)break}return null}function FS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=ji(e.nextSibling),e===null))return null;return e}function Nv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ji(e.nextSibling),e===null))return null;return e}function Gd(e){return e.data===ir||e.data===Pr}function Yd(e){return e.data===Qa||e.data===ir&&e.ownerDocument.readyState!==dw}function GS(e,t){var i=e.ownerDocument;if(e.data===Pr)e._reactRetry=t;else if(e.data!==ir||i.readyState!==dw)t();else{var n=function(){t(),i.removeEventListener("DOMContentLoaded",n)};i.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function ji(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===Nl||t===Qa||t===ir||t===Pr||t===qr||t===Cm||t===hw)break;if(t===El||t===Vu)return null}}return e}function Ev(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),i={},n=e.attributes,s=0;s<n.length;s++){var r=n[s];i[hv(r.name)]=r.name.toLowerCase()==="style"?Id(e):r.value}return{type:t,props:i}}return e.nodeType===8?e.data===qr?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function xv(e,t,i){return i===null||i[qN]!==!0?(e.nodeValue===t?e=null:(t=Ms(t),e=Ms(e.nodeValue)===t?null:e.nodeValue),e):null}function Xd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i===El||i===Vu){if(t===0)return ji(e.nextSibling);t--}else i!==Nl&&i!==Qa&&i!==ir&&i!==Pr&&i!==qr||t++}e=e.nextSibling}return null}function Cv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i===Nl||i===Qa||i===ir||i===Pr||i===qr){if(t===0)return e;t--}else i!==El&&i!==Vu||t++}e=e.previousSibling}return null}function YS(e){pa(e)}function XS(e){pa(e)}function QS(e){pa(e)}function Av(e,t,i,n,s){switch(s&&rh(e,n.ancestorInfo),t=Tc(i),e){case"html":if(e=t.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=t.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=t.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function KS(e,t,i,n){if(!i[Bs]&&Se(i)){var s=i.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",s,s,s)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(s=i.attributes;s.length;)i.removeAttributeNode(s[0]);si(i,e,t),i[ri]=n,i[mi]=t}function To(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);te(e)}function Mc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function Dv(e,t,i){var n=Za;if(n&&typeof t=="string"&&t){var s=qi(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof i=="string"&&(s+='[crossorigin="'+i+'"]'),vw.has(s)||(vw.add(s),e={rel:e,crossOrigin:i,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),si(t,"link",e),Me(t),n.head.appendChild(t)))}}function kv(e,t,i,n){var s=(s=Ls.current)?Mc(s):null;if(!s)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=fa(i.href),t=Pe(s).hoistableStyles,n=t.get(i),n||(n={type:"style",instance:null,count:0,state:null},t.set(i,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=fa(i.href);var r=Pe(s).hoistableStyles,d=r.get(e);if(!d&&(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:Gr,preload:null}},r.set(e,d),(r=s.querySelector(Mo(e)))&&!r._p&&(d.instance=r,d.state.loading=Cl|sn),!rn.has(e))){var g={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy};rn.set(e,g),r||ZS(s,e,g,d.state)}if(t&&n===null)throw i=`
|
|
222
|
+
|
|
223
|
+
- `+Oc(t)+`
|
|
224
|
+
+ `+Oc(i),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+i);return d}if(t&&n!==null)throw i=`
|
|
225
|
+
|
|
226
|
+
- `+Oc(t)+`
|
|
227
|
+
+ `+Oc(i),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+i);return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(i=ma(i),t=Pe(s).hoistableScripts,n=t.get(i),n||(n={type:"script",instance:null,count:0,state:null},t.set(i,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function Oc(e){var t=0,i="<link";return typeof e.rel=="string"?(t++,i+=' rel="'+e.rel+'"'):un.call(e,"rel")&&(t++,i+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,i+=' href="'+e.href+'"'):un.call(e,"href")&&(t++,i+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,i+=' precedence="'+e.precedence+'"'):un.call(e,"precedence")&&(t++,i+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(i+=" ..."),i+" />"}function fa(e){return'href="'+qi(e)+'"'}function Mo(e){return'link[rel="stylesheet"]['+e+"]"}function Rv(e){return tt({},e,{"data-precedence":e.precedence,precedence:null})}function ZS(e,t,i,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=Cl:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=Cl}),t.addEventListener("error",function(){return n.loading|=bw}),si(t,"link",i),Me(t),e.head.appendChild(t))}function ma(e){return'[src="'+qi(e)+'"]'}function Oo(e){return"script[async]"+e}function Tv(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+qi(i.href)+'"]');if(n)return t.instance=n,Me(n),n;var s=tt({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Me(n),si(n,"style",s),jc(n,i.precedence,e),t.instance=n;case"stylesheet":s=fa(i.href);var r=e.querySelector(Mo(s));if(r)return t.state.loading|=sn,t.instance=r,Me(r),r;n=Rv(i),(s=rn.get(s))&&Qd(n,s),r=(e.ownerDocument||e).createElement("link"),Me(r);var d=r;return d._p=new Promise(function(g,A){d.onload=g,d.onerror=A}),si(r,"link",n),t.state.loading|=sn,jc(r,i.precedence,e),t.instance=r;case"script":return r=ma(i.src),(s=e.querySelector(Oo(r)))?(t.instance=s,Me(s),s):(n=i,(s=rn.get(r))&&(n=tt({},i),Kd(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),Me(s),si(s,"link",n),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+t.type+'". this is a bug in React.')}else t.type==="stylesheet"&&(t.state.loading&sn)===Gr&&(n=t.instance,t.state.loading|=sn,jc(n,i.precedence,e));return t.instance}function jc(e,t,i){for(var n=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,r=s,d=0;d<n.length;d++){var g=n[d];if(g.dataset.precedence===t)r=g;else if(r!==s)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Qd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function Mv(e,t,i){if(Uu===null){var n=new Map,s=Uu=new Map;s.set(i,n)}else s=Uu,n=s.get(i),n||(n=new Map,s.set(i,n));if(n.has(e))return n;for(n.set(e,null),i=i.getElementsByTagName(e),s=0;s<i.length;s++){var r=i[s];if(!(r[Vo]||r[ri]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!==ya){var d=r.getAttribute(t)||"";d=e+d;var g=n.get(d);g?g.push(r):n.set(d,[r])}}return n}function Ov(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function JS(e,t,i){var n=!i.ancestorInfo.containerTagInScope;if(i.context===Ka||t.itemProp!=null)return!n||t.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href===""){n&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError){if(t.rel==="stylesheet"&&typeof t.precedence=="string"){e=t.href;var s=t.onError,r=t.disabled;i=[],t.onLoad&&i.push("`onLoad`"),s&&i.push("`onError`"),r!=null&&i.push("`disabled`"),s=kS(i,"and"),s+=i.length===1?" prop":" props",r=i.length===1?"an "+s:"the "+s,i.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,r,s)}n&&(typeof t.rel!="string"||typeof t.href!="string"||t.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(t.onError||t.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(t.rel){case"stylesheet":return e=t.precedence,t=t.disabled,typeof e!="string"&&n&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&t==null;default:return!0}case"script":if(e=t.async&&typeof t.async!="function"&&typeof t.async!="symbol",!e||t.onLoad||t.onError||!t.src||typeof t.src!="string"){n&&(e?t.onLoad||t.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":n&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function jv(e){return!(e.type==="stylesheet"&&(e.state.loading&gw)===Gr)}function e1(e,t,i,n){if(i.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(i.state.loading&sn)===Gr){if(i.instance===null){var s=fa(n.href),r=t.querySelector(Mo(s));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Lc.bind(e),t.then(e,e)),i.state.loading|=sn,i.instance=r,Me(r);return}r=t.ownerDocument||t,n=Rv(n),(s=rn.get(s))&&Qd(n,s),r=r.createElement("link"),Me(r);var d=r;d._p=new Promise(function(g,A){d.onload=g,d.onerror=A}),si(r,"link",n),i.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&gw)===Gr&&(e.count++,i=Lc.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}function t1(e,t){return e.stylesheets&&e.count===0&&Wc(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var n=setTimeout(function(){if(e.stylesheets&&Wc(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},KN+t);0<e.imgBytes&&Tm===0&&(Tm=125*RS()*JN);var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Wc(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Tm?50:ZN)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(s)}}:null}function Lc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Wc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zu=new Map,t.forEach(i1,e),zu=null,Lc.call(e))}function i1(e,t){if(!(t.state.loading&sn)){var i=zu.get(e);if(i)var n=i.get(Mm);else{i=new Map,zu.set(e,i);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<s.length;r++){var d=s[r];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(i.set(d.dataset.precedence,d),n=d)}n&&i.set(Mm,n)}s=t.instance,d=s.getAttribute("data-precedence"),r=i.get(d)||n,r===n&&i.set(Mm,s),i.set(d,s),this.count++,n=Lc.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),r?r.parentNode.insertBefore(s,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=sn}}function n1(e,t,i,n,s,r,d,g,A){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Fr,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=r,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=i?"hydrateRoot()":"createRoot()"}function Lv(e,t,i,n,s,r,d,g,A,O,K,Z){return e=new n1(e,t,i,d,A,O,K,Z,g),t=NN,r===!0&&(t|=ci|hn),t|=Xe,r=m(3,null,null,t),e.current=r,r.stateNode=e,t=xh(),vr(t),e.pooledCache=t,vr(t),r.memoizedState={element:n,isDehydrated:i,cache:t},Rh(r),e}function Wv(e){return e?(e=zs,e):zs}function Zd(e,t,i,n,s,r){if(li&&typeof li.onScheduleFiberRoot=="function")try{li.onScheduleFiberRoot(_a,n,i)}catch(d){Hn||(Hn=!0,console.error("React instrumentation encountered an error: %o",d))}s=Wv(s),n.context===null?n.context=s:n.pendingContext=s,Vn&&Wi!==null&&!Sw&&(Sw=!0,console.error(`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.
|
|
228
|
+
|
|
229
|
+
Check the render method of %s.`,R(Wi)||"Unknown")),n=Cs(t),n.payload={element:i},r=r===void 0?null:r,r!==null&&(typeof r!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",r),n.callback=r),i=As(e,n,t),i!==null&&(Nn(t,"root.render()",null),Tt(i,e,t),fo(i,e,t))}function Bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Jd(e,t){Bv(e,t),(e=e.alternate)&&Bv(e,t)}function Vv(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&Tt(t,e,67108864),Jd(e,67108864)}}function Hv(e){if(e.tag===13||e.tag===31){var t=Oi(e);t=vn(t);var i=oi(e,t);i!==null&&Tt(i,e,t),Jd(e,t)}}function s1(){return Wi}function r1(e,t,i,n){var s=he.T;he.T=null;var r=ft.p;try{ft.p=Fi,ef(e,t,i,n)}finally{ft.p=r,he.T=s}}function a1(e,t,i,n){var s=he.T;he.T=null;var r=ft.p;try{ft.p=zn,ef(e,t,i,n)}finally{ft.p=r,he.T=s}}function ef(e,t,i,n){if($u){var s=tf(n);if(s===null)Hd(e,t,n,qu,i),zv(e,n);else if(o1(s,e,t,i,n))n.stopPropagation();else if(zv(e,n),t&4&&-1<tE.indexOf(e)){for(;s!==null;){var r=Se(s);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var d=ge(r.pendingLanes);if(d!==0){var g=r;for(g.pendingLanes|=2,g.entangledLanes|=2;d;){var A=1<<31-fi(d);g.entanglements[1]|=A,d&=~A}jn(r),(lt&(Qt|Ui))===ti&&(Cu=Zt()+Q0,Ao(0))}}break;case 31:case 13:g=oi(r,2),g!==null&&Tt(g,r,2),ua(),Jd(r,2)}if(r=tf(n),r===null&&Hd(e,t,n,qu,i),r===s)break;s=r}s!==null&&n.stopPropagation()}else Hd(e,t,n,null,i)}}function tf(e){return e=ah(e),nf(e)}function nf(e){if(qu=null,e=we(e),e!==null){var t=h(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=a(t),e!==null)return e;e=null}else if(i===31){if(e=o(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qu=e,null}function Uv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return Fi;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return zn;case"message":switch(g1()){case gf:return Fi;case vf:return zn;case va:case v1:return ns;case _f:return Fc;default:return ns}default:return ns}}function zv(e,t){switch(e){case"focusin":case"focusout":nr=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":Dl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function jo(e,t,i,n,s,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:i,eventSystemFlags:n,nativeEvent:r,targetContainers:[s]},t!==null&&(t=Se(t),t!==null&&Vv(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function o1(e,t,i,n,s){switch(t){case"focusin":return nr=jo(nr,e,t,i,n,s),!0;case"dragenter":return sr=jo(sr,e,t,i,n,s),!0;case"mouseover":return rr=jo(rr,e,t,i,n,s),!0;case"pointerover":var r=s.pointerId;return Dl.set(r,jo(Dl.get(r)||null,e,t,i,n,s)),!0;case"gotpointercapture":return r=s.pointerId,kl.set(r,jo(kl.get(r)||null,e,t,i,n,s)),!0}return!1}function Iv(e){var t=we(e.target);if(t!==null){var i=h(t);if(i!==null){if(t=i.tag,t===13){if(t=a(i),t!==null){e.blockedOn=t,j(e.priority,function(){Hv(i)});return}}else if(t===31){if(t=o(i),t!==null){e.blockedOn=t,j(e.priority,function(){Hv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=tf(e.nativeEvent);if(i===null){i=e.nativeEvent;var n=new i.constructor(i.type,i),s=n;Ho!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Ho=s,i.target.dispatchEvent(n),Ho===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Ho=null}else return t=Se(i),t!==null&&Vv(t),e.blockedOn=i,!1;t.shift()}return!0}function $v(e,t,i){Bc(e)&&i.delete(t)}function l1(){Om=!1,nr!==null&&Bc(nr)&&(nr=null),sr!==null&&Bc(sr)&&(sr=null),rr!==null&&Bc(rr)&&(rr=null),Dl.forEach($v),kl.forEach($v)}function Vc(e,t){e.blockedOn===t&&(e.blockedOn=null,Om||(Om=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,l1)))}function qv(e){Pu!==e&&(Pu=e,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,function(){Pu===e&&(Pu=null);for(var t=0;t<e.length;t+=3){var i=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(nf(n||i)===null)continue;break}var r=Se(i);r!==null&&(e.splice(t,3),t-=3,i={pending:!0,data:s,method:i.method,action:n},Object.freeze(i),id(r,i,n,s))}}))}function pa(e){function t(A){return Vc(A,e)}nr!==null&&Vc(nr,e),sr!==null&&Vc(sr,e),rr!==null&&Vc(rr,e),Dl.forEach(t),kl.forEach(t);for(var i=0;i<ar.length;i++){var n=ar[i];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ar.length&&(i=ar[0],i.blockedOn===null);)Iv(i),i.blockedOn===null&&ar.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(n=0;n<i.length;n+=3){var s=i[n],r=i[n+1],d=s[mi]||null;if(typeof r=="function")d||qv(i);else if(d){var g=null;if(r&&r.hasAttribute("formAction")){if(s=r,d=r[mi]||null)g=d.formAction;else if(nf(s)!==null)continue}else g=d.action;typeof g=="function"?i[n+1]=g:(i.splice(n,3),n-=3),qv(i)}}}function Pv(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),n||setTimeout(i,20)}function i(){if(!n&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function sf(e){this._internalRoot=e}function Hc(e){this._internalRoot=e}function Fv(e){e[Bs]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("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."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Ht=cE(),rf=Qu(),c1=hE(),tt=Object.assign,u1=Symbol.for("react.element"),Wn=Symbol.for("react.transitional.element"),ba=Symbol.for("react.portal"),ga=Symbol.for("react.fragment"),Uc=Symbol.for("react.strict_mode"),af=Symbol.for("react.profiler"),of=Symbol.for("react.consumer"),Bn=Symbol.for("react.context"),Lo=Symbol.for("react.forward_ref"),lf=Symbol.for("react.suspense"),cf=Symbol.for("react.suspense_list"),zc=Symbol.for("react.memo"),Li=Symbol.for("react.lazy"),uf=Symbol.for("react.activity"),h1=Symbol.for("react.memo_cache_sentinel"),Gv=Symbol.iterator,d1=Symbol.for("react.client.reference"),Yt=Array.isArray,he=rf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ft=c1.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,f1=Object.freeze({pending:!1,data:null,method:null,action:null}),hf=[],df=[],is=-1,js=W(null),Wo=W(null),Ls=W(null),Ic=W(null),Bo=0,Yv,Xv,Qv,Kv,Zv,Jv,e_;z.__reactDisabledLog=!0;var ff,t_,mf=!1,pf=new(typeof WeakMap=="function"?WeakMap:Map),Wi=null,Vn=!1,un=Object.prototype.hasOwnProperty,bf=Ht.unstable_scheduleCallback,m1=Ht.unstable_cancelCallback,p1=Ht.unstable_shouldYield,b1=Ht.unstable_requestPaint,Zt=Ht.unstable_now,g1=Ht.unstable_getCurrentPriorityLevel,gf=Ht.unstable_ImmediatePriority,vf=Ht.unstable_UserBlockingPriority,va=Ht.unstable_NormalPriority,v1=Ht.unstable_LowPriority,_f=Ht.unstable_IdlePriority,_1=Ht.log,w1=Ht.unstable_setDisableYieldValue,_a=null,li=null,Hn=!1,Un=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",fi=Math.clz32?Math.clz32:Nt,y1=Math.log,S1=Math.LN2,$c=256,qc=262144,Pc=4194304,Fi=2,zn=8,ns=32,Fc=268435456,Ws=Math.random().toString(36).slice(2),ri="__reactFiber$"+Ws,mi="__reactProps$"+Ws,Bs="__reactContainer$"+Ws,wf="__reactEvents$"+Ws,N1="__reactListeners$"+Ws,E1="__reactHandles$"+Ws,i_="__reactResources$"+Ws,Vo="__reactMarker$"+Ws,n_=new Set,xr={},yf={},x1={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},C1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),s_={},r_={},A1=/[\n"\\]/g,a_=!1,o_=!1,l_=!1,c_=!1,u_=!1,h_=!1,d_=["value","defaultValue"],f_=!1,m_=/["'&<>\n\t]|^\s|\s$/,D1="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".split(" "),p_="applet caption html table td th marquee object template foreignObject desc title".split(" "),k1=p_.concat(["button"]),R1="dd dt li option optgroup p rp rt".split(" "),b_={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Gc={},Sf={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),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".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),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".split(" "),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"]},g_=/([A-Z])/g,v_=/^ms-/,T1=/^(?:webkit|moz|o)[A-Z]/,M1=/^-ms-/,O1=/-(.)/g,__=/;\s*$/,wa={},Nf={},w_=!1,y_=!1,S_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Yc="http://www.w3.org/1998/Math/MathML",ya="http://www.w3.org/2000/svg",j1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Xc={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",fetchpriority:"fetchPriority",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",inert:"inert",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",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",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",transformorigin:"transformOrigin","transform-origin":"transformOrigin",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"},N_={"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,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},Sa={},L1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),W1=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),E_=!1,pi={},x_=/^on./,B1=/^on[^A-Z]/,V1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),H1=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),U1=/^[\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,Ho=null,Na=null,Ea=null,Ef=!1,In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xf=!1;if(In)try{var Uo={};Object.defineProperty(Uo,"passive",{get:function(){xf=!0}}),window.addEventListener("test",Uo,Uo),window.removeEventListener("test",Uo,Uo)}catch{xf=!1}var Vs=null,Cf=null,Qc=null,Cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kc=yi(Cr),zo=tt({},Cr,{view:0,detail:0}),z1=yi(zo),Af,Df,Io,Zc=tt({},zo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oh,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!==Io&&(Io&&e.type==="mousemove"?(Af=e.screenX-Io.screenX,Df=e.screenY-Io.screenY):Df=Af=0,Io=e),Af)},movementY:function(e){return"movementY"in e?e.movementY:Df}}),C_=yi(Zc),I1=tt({},Zc,{dataTransfer:0}),$1=yi(I1),q1=tt({},zo,{relatedTarget:0}),kf=yi(q1),P1=tt({},Cr,{animationName:0,elapsedTime:0,pseudoElement:0}),F1=yi(P1),G1=tt({},Cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Y1=yi(G1),X1=tt({},Cr,{data:0}),A_=yi(X1),Q1=A_,K1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z1={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"},J1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},eN=tt({},zo,{key:function(e){if(e.key){var t=K1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Z1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oh,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tN=yi(eN),iN=tt({},Zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),D_=yi(iN),nN=tt({},zo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oh}),sN=yi(nN),rN=tt({},Cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),aN=yi(rN),oN=tt({},Zc,{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}),lN=yi(oN),cN=tt({},Cr,{newState:0,oldState:0}),uN=yi(cN),hN=[9,13,27,32],k_=229,Rf=In&&"CompositionEvent"in window,$o=null;In&&"documentMode"in document&&($o=document.documentMode);var dN=In&&"TextEvent"in window&&!$o,R_=In&&(!Rf||$o&&8<$o&&11>=$o),T_=32,M_=String.fromCharCode(T_),O_=!1,xa=!1,fN={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},qo=null,Po=null,j_=!1;In&&(j_=Oy("input")&&(!document.documentMode||9<document.documentMode));var bi=typeof Object.is=="function"?Object.is:Hy,mN=In&&"documentMode"in document&&11>=document.documentMode,Ca=null,Tf=null,Fo=null,Mf=!1,Aa={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},Of={},L_={};In&&(L_=document.createElement("div").style,"AnimationEvent"in window||(delete Aa.animationend.animation,delete Aa.animationiteration.animation,delete Aa.animationstart.animation),"TransitionEvent"in window||delete Aa.transitionend.transition);var W_=dr("animationend"),B_=dr("animationiteration"),V_=dr("animationstart"),pN=dr("transitionrun"),bN=dr("transitionstart"),gN=dr("transitioncancel"),H_=dr("transitionend"),U_=new Map,jf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");jf.push("scrollEnd");var z_=0;if(typeof performance=="object"&&typeof performance.now=="function")var vN=performance,I_=function(){return vN.now()};else{var _N=Date;I_=function(){return _N.now()}}var Lf=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},wN="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",Jc=0,Wf=1,Bf=2,Vf=3,eu="– ",tu="+ ",$_=" ",Et=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",Gi="Components ⚛",st="Scheduler ⚛",at="Blocking",Hs=!1,ss={color:"primary",properties:null,tooltipText:"",track:Gi},Us={start:-0,end:-0,detail:{devtools:ss}},yN=["Changed Props",""],q_="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",SN=["Changed Props",q_],Go=1,rs=2,Yi=[],Da=0,Hf=0,zs={};Object.freeze(zs);var Xi=null,ka=null,Ve=0,NN=1,Xe=2,ci=8,hn=16,EN=32,P_=!1;try{var F_=Object.preventExtensions({})}catch{P_=!0}var Uf=new WeakMap,Ra=[],Ta=0,iu=null,Yo=0,Qi=[],Ki=0,Ar=null,as=1,os="",ai=null,xt=null,it=!1,$n=!1,Bi=null,Is=null,Zi=!1,zf=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),If=W(null),$f=W(null),G_={},nu=null,Ma=null,Oa=!1,xN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},CN=Ht.unstable_scheduleCallback,AN=Ht.unstable_NormalPriority,Ut={$$typeof:Bn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},zt=Ht.unstable_now,su=console.createTask?console.createTask:function(){return null},Xo=1,ru=2,Jt=-0,$s=-0,ls=-0,cs=null,gi=-1.1,Dr=-0,kt=-0,je=-1.1,Be=-1.1,Dt=null,Mt=!1,kr=-0,qn=-1.1,Qo=null,qs=0,qf=null,Pf=null,Rr=-1.1,Ko=null,ja=-1.1,au=-1.1,us=-0,hs=-1.1,Ji=-1.1,Ff=0,Zo=null,Y_=null,X_=null,Ps=-1.1,Tr=null,Fs=-1.1,ou=-1.1,Q_=-0,K_=-0,lu=0,DN=null,Z_=0,Jo=-1.1,cu=!1,uu=!1,el=null,Gf=0,Mr=0,La=null,J_=he.S;he.S=function(e,t){if(Y0=Zt(),typeof t=="object"&&t!==null&&typeof t.then=="function"){if(0>hs&&0>Ji){hs=zt();var i=Ro(),n=ko();(i!==Fs||n!==Tr)&&(Fs=-1.1),Ps=i,Tr=n}Fy(e,t)}J_!==null&&J_(e,t)};var Or=W(null),dn={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},tl=[],il=[],nl=[],sl=[],rl=[],al=[],jr=new Set;dn.recordUnsafeLifecycleWarnings=function(e,t){jr.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&tl.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillMount=="function"&&il.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&nl.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&sl.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&rl.push(e),e.mode&ci&&typeof t.UNSAFE_componentWillUpdate=="function"&&al.push(e))},dn.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<tl.length&&(tl.forEach(function(g){e.add(R(g)||"Component"),jr.add(g.type)}),tl=[]);var t=new Set;0<il.length&&(il.forEach(function(g){t.add(R(g)||"Component"),jr.add(g.type)}),il=[]);var i=new Set;0<nl.length&&(nl.forEach(function(g){i.add(R(g)||"Component"),jr.add(g.type)}),nl=[]);var n=new Set;0<sl.length&&(sl.forEach(function(g){n.add(R(g)||"Component"),jr.add(g.type)}),sl=[]);var s=new Set;0<rl.length&&(rl.forEach(function(g){s.add(R(g)||"Component"),jr.add(g.type)}),rl=[]);var r=new Set;if(0<al.length&&(al.forEach(function(g){r.add(R(g)||"Component"),jr.add(g.type)}),al=[]),0<t.size){var d=f(t);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
230
|
+
|
|
231
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
232
|
+
|
|
233
|
+
Please update the following components: %s`,d)}0<n.size&&(d=f(n),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
234
|
+
|
|
235
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
236
|
+
* 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://react.dev/link/derived-state
|
|
237
|
+
|
|
238
|
+
Please update the following components: %s`,d)),0<r.size&&(d=f(r),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
239
|
+
|
|
240
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
241
|
+
|
|
242
|
+
Please update the following components: %s`,d)),0<e.size&&(d=f(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
243
|
+
|
|
244
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
245
|
+
* 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.
|
|
246
|
+
|
|
247
|
+
Please update the following components: %s`,d)),0<i.size&&(d=f(i),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
248
|
+
|
|
249
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
250
|
+
* 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://react.dev/link/derived-state
|
|
251
|
+
* 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.
|
|
252
|
+
|
|
253
|
+
Please update the following components: %s`,d)),0<s.size&&(d=f(s),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
254
|
+
|
|
255
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
256
|
+
* 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.
|
|
257
|
+
|
|
258
|
+
Please update the following components: %s`,d))};var hu=new Map,e0=new Set;dn.recordLegacyContextWarning=function(e,t){for(var i=null,n=e;n!==null;)n.mode&ci&&(i=n),n=n.return;i===null?console.error("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."):!e0.has(e.type)&&(n=hu.get(i),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(n===void 0&&(n=[],hu.set(i,n)),n.push(e))},dn.flushLegacyContextWarning=function(){hu.forEach(function(e){if(e.length!==0){var t=e[0],i=new Set;e.forEach(function(s){i.add(R(s)||"Component"),e0.add(s.type)});var n=f(i);oe(t,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
259
|
+
|
|
260
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
261
|
+
|
|
262
|
+
Please update the following components: %s
|
|
263
|
+
|
|
264
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,n)})}})},dn.discardPendingWarnings=function(){tl=[],il=[],nl=[],sl=[],rl=[],al=[],hu=new Map};var t0={react_stack_bottom_frame:function(e,t,i){var n=Vn;Vn=!0;try{return e(t,i)}finally{Vn=n}}},Yf=t0.react_stack_bottom_frame.bind(t0),i0={react_stack_bottom_frame:function(e){var t=Vn;Vn=!0;try{return e.render()}finally{Vn=t}}},n0=i0.react_stack_bottom_frame.bind(i0),s0={react_stack_bottom_frame:function(e,t){try{t.componentDidMount()}catch(i){dt(e,e.return,i)}}},Xf=s0.react_stack_bottom_frame.bind(s0),r0={react_stack_bottom_frame:function(e,t,i,n,s){try{t.componentDidUpdate(i,n,s)}catch(r){dt(e,e.return,r)}}},a0=r0.react_stack_bottom_frame.bind(r0),o0={react_stack_bottom_frame:function(e,t){var i=t.stack;e.componentDidCatch(t.value,{componentStack:i!==null?i:""})}},kN=o0.react_stack_bottom_frame.bind(o0),l0={react_stack_bottom_frame:function(e,t,i){try{i.componentWillUnmount()}catch(n){dt(e,t,n)}}},c0=l0.react_stack_bottom_frame.bind(l0),u0={react_stack_bottom_frame:function(e){var t=e.create;return e=e.inst,t=t(),e.destroy=t}},RN=u0.react_stack_bottom_frame.bind(u0),h0={react_stack_bottom_frame:function(e,t,i){try{i()}catch(n){dt(e,t,n)}}},TN=h0.react_stack_bottom_frame.bind(h0),d0={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},MN=d0.react_stack_bottom_frame.bind(d0),Wa=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),Qf=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),du=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),fu={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Lr=null,ol=!1,Ba=null,ll=0,Qe=null,Kf,f0=Kf=!1,m0={},p0={},b0={};N=function(e,t,i){if(i!==null&&typeof i=="object"&&i._store&&(!i._store.validated&&i.key==null||i._store.validated===2)){if(typeof i._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");i._store.validated=1;var n=R(e),s=n||"null";if(!m0[s]){m0[s]=!0,i=i._owner,e=e._debugOwner;var r="";e&&typeof e.tag=="number"&&(s=R(e))&&(r=`
|
|
265
|
+
|
|
266
|
+
Check the render method of \``+s+"`."),r||n&&(r=`
|
|
267
|
+
|
|
268
|
+
Check the top-level render call using <`+n+">.");var d="";i!=null&&e!==i&&(n=null,typeof i.tag=="number"?n=R(i):typeof i.name=="string"&&(n=i.name),n&&(d=" It was passed a child from "+n+".")),oe(t,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,d)})}}};var Wr=lb(!0),g0=lb(!1),v0=0,_0=1,w0=2,Zf=3,Gs=!1,y0=!1,Jf=null,em=!1,Va=W(null),mu=W(0),Vi=W(null),en=null,Ha=1,cl=2,Bt=W(0),pu=0,tn=1,vi=2,Hi=4,_i=8,Ua,S0=new Set,N0=new Set,tm=new Set,E0=new Set,ds=0,He=null,vt=null,It=null,bu=!1,za=!1,Br=!1,gu=0,ul=0,fs=null,ON=0,jN=25,le=null,nn=null,ms=-1,hl=!1,dl={readContext:At,use:Rs,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};dl.useEffectEvent=jt;var im=null,x0=null,nm=null,C0=null,Pn=null,fn=null,vu=null;im={readContext:function(e){return At(e)},use:Rs,useCallback:function(e,t){return le="useCallback",et(),na(t),Zh(e,t)},useContext:function(e){return le="useContext",et(),At(e)},useEffect:function(e,t){return le="useEffect",et(),na(t),hc(e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",et(),na(i),Kh(e,t,i)},useInsertionEffect:function(e,t){le="useInsertionEffect",et(),na(t),wr(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",et(),na(t),Qh(e,t)},useMemo:function(e,t){le="useMemo",et(),na(t);var i=he.H;he.H=Pn;try{return Jh(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",et();var n=he.H;he.H=Pn;try{return zh(e,t,i)}finally{he.H=n}},useRef:function(e){return le="useRef",et(),Yh(e)},useState:function(e){le="useState",et();var t=he.H;he.H=Pn;try{return Ph(e)}finally{he.H=t}},useDebugValue:function(){le="useDebugValue",et()},useDeferredValue:function(e,t){return le="useDeferredValue",et(),ed(e,t)},useTransition:function(){return le="useTransition",et(),nd()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",et(),$h(e,t,i)},useId:function(){return le="useId",et(),sd()},useFormState:function(e,t){return le="useFormState",et(),ac(),ra(e,t)},useActionState:function(e,t){return le="useActionState",et(),ra(e,t)},useOptimistic:function(e){return le="useOptimistic",et(),Fh(e)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",et(),rd()},useEffectEvent:function(e){return le="useEffectEvent",et(),Xh(e)}},x0={readContext:function(e){return At(e)},use:Rs,useCallback:function(e,t){return le="useCallback",_e(),Zh(e,t)},useContext:function(e){return le="useContext",_e(),At(e)},useEffect:function(e,t){return le="useEffect",_e(),hc(e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",_e(),Kh(e,t,i)},useInsertionEffect:function(e,t){le="useInsertionEffect",_e(),wr(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",_e(),Qh(e,t)},useMemo:function(e,t){le="useMemo",_e();var i=he.H;he.H=Pn;try{return Jh(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",_e();var n=he.H;he.H=Pn;try{return zh(e,t,i)}finally{he.H=n}},useRef:function(e){return le="useRef",_e(),Yh(e)},useState:function(e){le="useState",_e();var t=he.H;he.H=Pn;try{return Ph(e)}finally{he.H=t}},useDebugValue:function(){le="useDebugValue",_e()},useDeferredValue:function(e,t){return le="useDeferredValue",_e(),ed(e,t)},useTransition:function(){return le="useTransition",_e(),nd()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",_e(),$h(e,t,i)},useId:function(){return le="useId",_e(),sd()},useActionState:function(e,t){return le="useActionState",_e(),ra(e,t)},useFormState:function(e,t){return le="useFormState",_e(),ac(),ra(e,t)},useOptimistic:function(e){return le="useOptimistic",_e(),Fh(e)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",_e(),rd()},useEffectEvent:function(e){return le="useEffectEvent",_e(),Xh(e)}},nm={readContext:function(e){return At(e)},use:Rs,useCallback:function(e,t){return le="useCallback",_e(),mc(e,t)},useContext:function(e){return le="useContext",_e(),At(e)},useEffect:function(e,t){le="useEffect",_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",_e(),Si(4,Hi,e,t)},useMemo:function(e,t){le="useMemo",_e();var i=he.H;he.H=fn;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",_e();var n=he.H;he.H=fn;try{return sa(e,t,i)}finally{he.H=n}},useRef:function(){return le="useRef",_e(),mt().memoizedState},useState:function(){le="useState",_e();var e=he.H;he.H=fn;try{return sa(ln)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",_e()},useDeferredValue:function(e,t){return le="useDeferredValue",_e(),Rb(e,t)},useTransition:function(){return le="useTransition",_e(),Wb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",_e(),lc(e,t,i)},useId:function(){return le="useId",_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",_e(),ac(),cc(e)},useActionState:function(e){return le="useActionState",_e(),cc(e)},useOptimistic:function(e,t){return le="useOptimistic",_e(),wb(e,t)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",_e(),dc(e)}},C0={readContext:function(e){return At(e)},use:Rs,useCallback:function(e,t){return le="useCallback",_e(),mc(e,t)},useContext:function(e){return le="useContext",_e(),At(e)},useEffect:function(e,t){le="useEffect",_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",_e(),Si(4,Hi,e,t)},useMemo:function(e,t){le="useMemo",_e();var i=he.H;he.H=vu;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",_e();var n=he.H;he.H=vu;try{return go(e,t,i)}finally{he.H=n}},useRef:function(){return le="useRef",_e(),mt().memoizedState},useState:function(){le="useState",_e();var e=he.H;he.H=vu;try{return go(ln)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",_e()},useDeferredValue:function(e,t){return le="useDeferredValue",_e(),Tb(e,t)},useTransition:function(){return le="useTransition",_e(),Bb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",_e(),lc(e,t,i)},useId:function(){return le="useId",_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",_e(),ac(),uc(e)},useActionState:function(e){return le="useActionState",_e(),uc(e)},useOptimistic:function(e,t){return le="useOptimistic",_e(),Sb(e,t)},useHostTransitionStatus:yr,useMemoCache:_r,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",_e(),dc(e)}},Pn={readContext:function(e){return b(),At(e)},use:function(e){return c(),Rs(e)},useCallback:function(e,t){return le="useCallback",c(),et(),Zh(e,t)},useContext:function(e){return le="useContext",c(),et(),At(e)},useEffect:function(e,t){return le="useEffect",c(),et(),hc(e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",c(),et(),Kh(e,t,i)},useInsertionEffect:function(e,t){le="useInsertionEffect",c(),et(),wr(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",c(),et(),Qh(e,t)},useMemo:function(e,t){le="useMemo",c(),et();var i=he.H;he.H=Pn;try{return Jh(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",c(),et();var n=he.H;he.H=Pn;try{return zh(e,t,i)}finally{he.H=n}},useRef:function(e){return le="useRef",c(),et(),Yh(e)},useState:function(e){le="useState",c(),et();var t=he.H;he.H=Pn;try{return Ph(e)}finally{he.H=t}},useDebugValue:function(){le="useDebugValue",c(),et()},useDeferredValue:function(e,t){return le="useDeferredValue",c(),et(),ed(e,t)},useTransition:function(){return le="useTransition",c(),et(),nd()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",c(),et(),$h(e,t,i)},useId:function(){return le="useId",c(),et(),sd()},useFormState:function(e,t){return le="useFormState",c(),et(),ra(e,t)},useActionState:function(e,t){return le="useActionState",c(),et(),ra(e,t)},useOptimistic:function(e){return le="useOptimistic",c(),et(),Fh(e)},useMemoCache:function(e){return c(),_r(e)},useHostTransitionStatus:yr,useCacheRefresh:function(){return le="useCacheRefresh",et(),rd()},useEffectEvent:function(e){return le="useEffectEvent",c(),et(),Xh(e)}},fn={readContext:function(e){return b(),At(e)},use:function(e){return c(),Rs(e)},useCallback:function(e,t){return le="useCallback",c(),_e(),mc(e,t)},useContext:function(e){return le="useContext",c(),_e(),At(e)},useEffect:function(e,t){le="useEffect",c(),_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",c(),_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",c(),_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",c(),_e(),Si(4,Hi,e,t)},useMemo:function(e,t){le="useMemo",c(),_e();var i=he.H;he.H=fn;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",c(),_e();var n=he.H;he.H=fn;try{return sa(e,t,i)}finally{he.H=n}},useRef:function(){return le="useRef",c(),_e(),mt().memoizedState},useState:function(){le="useState",c(),_e();var e=he.H;he.H=fn;try{return sa(ln)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",c(),_e()},useDeferredValue:function(e,t){return le="useDeferredValue",c(),_e(),Rb(e,t)},useTransition:function(){return le="useTransition",c(),_e(),Wb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",c(),_e(),lc(e,t,i)},useId:function(){return le="useId",c(),_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",c(),_e(),cc(e)},useActionState:function(e){return le="useActionState",c(),_e(),cc(e)},useOptimistic:function(e,t){return le="useOptimistic",c(),_e(),wb(e,t)},useMemoCache:function(e){return c(),_r(e)},useHostTransitionStatus:yr,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",c(),_e(),dc(e)}},vu={readContext:function(e){return b(),At(e)},use:function(e){return c(),Rs(e)},useCallback:function(e,t){return le="useCallback",c(),_e(),mc(e,t)},useContext:function(e){return le="useContext",c(),_e(),At(e)},useEffect:function(e,t){le="useEffect",c(),_e(),Si(2048,_i,e,t)},useImperativeHandle:function(e,t,i){return le="useImperativeHandle",c(),_e(),fc(e,t,i)},useInsertionEffect:function(e,t){return le="useInsertionEffect",c(),_e(),Si(4,vi,e,t)},useLayoutEffect:function(e,t){return le="useLayoutEffect",c(),_e(),Si(4,Hi,e,t)},useMemo:function(e,t){le="useMemo",c(),_e();var i=he.H;he.H=fn;try{return pc(e,t)}finally{he.H=i}},useReducer:function(e,t,i){le="useReducer",c(),_e();var n=he.H;he.H=fn;try{return go(e,t,i)}finally{he.H=n}},useRef:function(){return le="useRef",c(),_e(),mt().memoizedState},useState:function(){le="useState",c(),_e();var e=he.H;he.H=fn;try{return go(ln)}finally{he.H=e}},useDebugValue:function(){le="useDebugValue",c(),_e()},useDeferredValue:function(e,t){return le="useDeferredValue",c(),_e(),Tb(e,t)},useTransition:function(){return le="useTransition",c(),_e(),Bb()},useSyncExternalStore:function(e,t,i){return le="useSyncExternalStore",c(),_e(),lc(e,t,i)},useId:function(){return le="useId",c(),_e(),mt().memoizedState},useFormState:function(e){return le="useFormState",c(),_e(),uc(e)},useActionState:function(e){return le="useActionState",c(),_e(),uc(e)},useOptimistic:function(e,t){return le="useOptimistic",c(),_e(),Sb(e,t)},useMemoCache:function(e){return c(),_r(e)},useHostTransitionStatus:yr,useCacheRefresh:function(){return le="useCacheRefresh",_e(),mt().memoizedState},useEffectEvent:function(e){return le="useEffectEvent",c(),_e(),dc(e)}};var A0={},D0=new Set,k0=new Set,R0=new Set,T0=new Set,M0=new Set,O0=new Set,j0=new Set,L0=new Set,W0=new Set,B0=new Set;Object.freeze(A0);var sm={enqueueSetState:function(e,t,i){e=e._reactInternals;var n=Oi(e),s=Cs(n);s.payload=t,i!=null&&(od(i),s.callback=i),t=As(e,s,n),t!==null&&(Nn(n,"this.setState()",e),Tt(t,e,n),fo(t,e,n))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var n=Oi(e),s=Cs(n);s.tag=_0,s.payload=t,i!=null&&(od(i),s.callback=i),t=As(e,s,n),t!==null&&(Nn(n,"this.replaceState()",e),Tt(t,e,n),fo(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Oi(e),n=Cs(i);n.tag=w0,t!=null&&(od(t),n.callback=t),t=As(e,n,i),t!==null&&(Nn(i,"this.forceUpdate()",e),Tt(t,e,i),fo(t,e,i))}},Ia=null,rm=null,am=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),$t=!1,V0={},H0={},U0={},z0={},$a=!1,I0={},_u={},om={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},$0=!1,q0=null;q0=new Set;var ps=!1,qt=!1,lm=!1,P0=typeof WeakSet=="function"?WeakSet:Set,ei=null,qa=null,Pa=null,Pt=null,xi=!1,mn=null,Xt=!1,fl=8192,LN={getCacheForType:function(e){var t=At(Ut),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return At(Ut).controller.signal},getOwner:function(){return Wi}};if(typeof Symbol=="function"&&Symbol.for){var ml=Symbol.for;ml("selector.component"),ml("selector.has_pseudo_class"),ml("selector.role"),ml("selector.test_id"),ml("selector.text")}var WN=[],BN=typeof WeakMap=="function"?WeakMap:Map,ti=0,Qt=2,Ui=4,bs=0,pl=1,Vr=2,wu=3,Ys=4,yu=6,F0=5,lt=ti,_t=null,Ze=null,Ke=0,Ci=0,Su=1,Hr=2,bl=3,G0=4,cm=5,gl=6,Nu=7,um=8,Ur=9,pt=Ci,zi=null,Xs=!1,Fa=!1,hm=!1,Fn=0,Rt=bs,Qs=0,Ks=0,dm=0,Ai=0,zr=0,vl=null,wi=null,Eu=!1,xu=0,Y0=0,X0=300,Cu=1/0,Q0=500,_l=null,Lt=null,Zs=null,Au=0,fm=1,mm=2,K0=3,Js=0,Z0=1,J0=2,ew=3,tw=4,Du=5,Ft=0,er=null,Ga=null,pn=0,pm=0,bm=-0,gm=null,iw=null,nw=null,bn=Au,sw=null,VN=50,wl=0,vm=null,_m=!1,ku=!1,HN=50,Ir=0,yl=null,Ya=!1,Ru=null,rw=!1,aw=new Set,UN={},Tu=null,Xa=null,wm=!1,ym=!1,Mu=!1,Sm=!1,tr=0,Nm={};(function(){for(var e=0;e<jf.length;e++){var t=jf[e],i=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),an(i,"on"+t)}an(W_,"onAnimationEnd"),an(B_,"onAnimationIteration"),an(V_,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(pN,"onTransitionRun"),an(bN,"onTransitionStart"),an(gN,"onTransitionCancel"),an(H_,"onTransitionEnd")})(),Fe("onMouseEnter",["mouseout","mouseover"]),Fe("onMouseLeave",["mouseout","mouseover"]),Fe("onPointerEnter",["pointerout","pointerover"]),Fe("onPointerLeave",["pointerout","pointerover"]),ot("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ot("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ot("onBeforeInput",["compositionend","keypress","textInput","paste"]),ot("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ot("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ot("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Em=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sl)),Ou="_reactListening"+Math.random().toString(36).slice(2),ow=!1,lw=!1,ju=!1,cw=!1,Lu=!1,Wu=!1,uw=!1,Bu={},zN=/\r\n?/g,IN=/\u0000|\uFFFD/g,$r="http://www.w3.org/1999/xlink",xm="http://www.w3.org/XML/1998/namespace",$N="javascript:throw new Error('React form unexpectedly submitted.')",qN="suppressHydrationWarning",qr="&",Vu="/&",Nl="$",El="/$",ir="$?",Pr="$~",Qa="$!",PN="html",FN="body",GN="head",Cm="F!",hw="F",dw="loading",YN="style",gs=0,Ka=1,Hu=2,Am=null,Dm=null,fw={dialog:!0,webview:!0},km=null,xl=void 0,mw=typeof setTimeout=="function"?setTimeout:void 0,XN=typeof clearTimeout=="function"?clearTimeout:void 0,Fr=-1,pw=typeof Promise=="function"?Promise:void 0,QN=typeof queueMicrotask=="function"?queueMicrotask:typeof pw<"u"?function(e){return pw.resolve(null).then(e).catch(MS)}:mw,Rm=null,Gr=0,Cl=1,bw=2,gw=3,sn=4,rn=new Map,vw=new Set,vs=ft.d;ft.d={f:function(){var e=vs.f(),t=ua();return e||t},r:function(e){var t=Se(e);t!==null&&t.tag===5&&t.type==="form"?Lb(t):vs.r(e)},D:function(e){vs.D(e),Dv("dns-prefetch",e,null)},C:function(e,t){vs.C(e,t),Dv("preconnect",e,t)},L:function(e,t,i){vs.L(e,t,i);var n=Za;if(n&&e&&t){var s='link[rel="preload"][as="'+qi(t)+'"]';t==="image"&&i&&i.imageSrcSet?(s+='[imagesrcset="'+qi(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(s+='[imagesizes="'+qi(i.imageSizes)+'"]')):s+='[href="'+qi(e)+'"]';var r=s;switch(t){case"style":r=fa(e);break;case"script":r=ma(e)}rn.has(r)||(e=tt({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),rn.set(r,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(Mo(r))||t==="script"&&n.querySelector(Oo(r))||(t=n.createElement("link"),si(t,"link",e),Me(t),n.head.appendChild(t)))}},m:function(e,t){vs.m(e,t);var i=Za;if(i&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+qi(n)+'"][href="'+qi(e)+'"]',r=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=ma(e)}if(!rn.has(r)&&(e=tt({rel:"modulepreload",href:e},t),rn.set(r,e),i.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Oo(r)))return}n=i.createElement("link"),si(n,"link",e),Me(n),i.head.appendChild(n)}}},X:function(e,t){vs.X(e,t);var i=Za;if(i&&e){var n=Pe(i).hoistableScripts,s=ma(e),r=n.get(s);r||(r=i.querySelector(Oo(s)),r||(e=tt({src:e,async:!0},t),(t=rn.get(s))&&Kd(e,t),r=i.createElement("script"),Me(r),si(r,"link",e),i.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(s,r))}},S:function(e,t,i){vs.S(e,t,i);var n=Za;if(n&&e){var s=Pe(n).hoistableStyles,r=fa(e);t=t||"default";var d=s.get(r);if(!d){var g={loading:Gr,preload:null};if(d=n.querySelector(Mo(r)))g.loading=Cl|sn;else{e=tt({rel:"stylesheet",href:e,"data-precedence":t},i),(i=rn.get(r))&&Qd(e,i);var A=d=n.createElement("link");Me(A),si(A,"link",e),A._p=new Promise(function(O,K){A.onload=O,A.onerror=K}),A.addEventListener("load",function(){g.loading|=Cl}),A.addEventListener("error",function(){g.loading|=bw}),g.loading|=sn,jc(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:g},s.set(r,d)}}},M:function(e,t){vs.M(e,t);var i=Za;if(i&&e){var n=Pe(i).hoistableScripts,s=ma(e),r=n.get(s);r||(r=i.querySelector(Oo(s)),r||(e=tt({src:e,async:!0,type:"module"},t),(t=rn.get(s))&&Kd(e,t),r=i.createElement("script"),Me(r),si(r,"link",e),i.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(s,r))}}};var Za=typeof document>"u"?null:document,Uu=null,KN=6e4,ZN=800,JN=500,Tm=0,Mm=null,zu=null,Yr=f1,Al={$$typeof:Bn,Provider:null,Consumer:null,_currentValue:Yr,_currentValue2:Yr,_threadCount:0},_w="%c%s%c",ww="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",yw="",Iu=" ",eE=Function.prototype.bind,Sw=!1,Nw=null,Ew=null,xw=null,Cw=null,Aw=null,Dw=null,kw=null,Rw=null,Tw=null,Mw=null;Nw=function(e,t,i,n){t=S(e,t),t!==null&&(i=k(t.memoizedState,i,0,n),t.memoizedState=i,t.baseState=i,e.memoizedProps=tt({},e.memoizedProps),i=oi(e,2),i!==null&&Tt(i,e,2))},Ew=function(e,t,i){t=S(e,t),t!==null&&(i=X(t.memoizedState,i,0),t.memoizedState=i,t.baseState=i,e.memoizedProps=tt({},e.memoizedProps),i=oi(e,2),i!==null&&Tt(i,e,2))},xw=function(e,t,i,n){t=S(e,t),t!==null&&(i=U(t.memoizedState,i,n),t.memoizedState=i,t.baseState=i,e.memoizedProps=tt({},e.memoizedProps),i=oi(e,2),i!==null&&Tt(i,e,2))},Cw=function(e,t,i){e.pendingProps=k(e.memoizedProps,t,0,i),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=oi(e,2),t!==null&&Tt(t,e,2)},Aw=function(e,t){e.pendingProps=X(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=oi(e,2),t!==null&&Tt(t,e,2)},Dw=function(e,t,i){e.pendingProps=U(e.memoizedProps,t,i),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=oi(e,2),t!==null&&Tt(t,e,2)},kw=function(e){var t=oi(e,2);t!==null&&Tt(t,e,2)},Rw=function(e){var t=Ye(),i=oi(e,t);i!==null&&Tt(i,e,t)},Tw=function(e){$=e},Mw=function(e){ee=e};var $u=!0,qu=null,Om=!1,nr=null,sr=null,rr=null,Dl=new Map,kl=new Map,ar=[],tE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Pu=null;if(Hc.prototype.render=sf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error("Cannot update an unmounted root.");var i=arguments;typeof i[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):u(i[1])?console.error("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 i[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),i=e;var n=t.current,s=Oi(n);Zd(n,s,i,t,null,null)},Hc.prototype.unmount=sf.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var t=e.containerInfo;(lt&(Qt|Ui))!==ti&&console.error("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."),Zd(e.current,2,null,e,null,null),ua(),t[Bs]=null}},Hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=ys();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ar.length&&t!==0&&t<ar[i].priority;i++);ar.splice(i,0,e),i===0&&Iv(e)}},(function(){var e=rf.version;if(e!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
269
|
+
- react: `+(e+`
|
|
270
|
+
- react-dom: 19.2.7
|
|
271
|
+
Learn more: https://react.dev/warnings/version-mismatch`))})(),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"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),ft.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=x(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e},!(function(){var e={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:he,reconcilerVersion:"19.2.7"};return e.overrideHookState=Nw,e.overrideHookStateDeletePath=Ew,e.overrideHookStateRenamePath=xw,e.overrideProps=Cw,e.overridePropsDeletePath=Aw,e.overridePropsRenamePath=Dw,e.scheduleUpdate=kw,e.scheduleRetry=Rw,e.setErrorHandler=Tw,e.setSuspenseHandler=Mw,e.scheduleRefresh=E,e.scheduleRoot=w,e.setRefreshHandler=p,e.getCurrentFiber=s1,Ii(e)})()&&In&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Ow=window.location.protocol;/^(https?|file):$/.test(Ow)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Ow==="file:"?`
|
|
272
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Rl.createRoot=function(e,t){if(!u(e))throw Error("Target container is not a DOM element.");Fv(e);var i=!1,n="",s=$b,r=qb,d=Pb;return t!=null&&(t.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Wn&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
273
|
+
|
|
274
|
+
let root = createRoot(domContainer);
|
|
275
|
+
root.render(<App />);`),t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Lv(e,1,!1,null,null,i,n,null,s,r,d,Pv),e[Bs]=t.current,Vd(e),new sf(t)},Rl.hydrateRoot=function(e,t,i){if(!u(e))throw Error("Target container is not a DOM element.");Fv(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var n=!1,s="",r=$b,d=qb,g=Pb,A=null;return i!=null&&(i.unstable_strictMode===!0&&(n=!0),i.identifierPrefix!==void 0&&(s=i.identifierPrefix),i.onUncaughtError!==void 0&&(r=i.onUncaughtError),i.onCaughtError!==void 0&&(d=i.onCaughtError),i.onRecoverableError!==void 0&&(g=i.onRecoverableError),i.formState!==void 0&&(A=i.formState)),t=Lv(e,1,!0,t,i??null,n,s,A,r,d,g,Pv),t.context=Wv(null),i=t.current,n=Oi(i),n=vn(n),s=Cs(n),s.callback=null,As(i,s,n),Nn(n,"hydrateRoot()",null),i=n,t.current.lanes=i,ct(t,i),jn(t),e[Bs]=t.current,Vd(e),new Hc(t)},Rl.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),Rl}var $w;function fE(){return $w||($w=1,Wm.exports=dE()),Wm.exports}var mE=fE(),Um={exports:{}},qw;function pE(){return qw||(qw=1,(function(S,k){(function(U,V){S.exports=V()})(globalThis,(()=>(()=>{var U={4567:function($,c,b){var _=this&&this.__decorate||function(a,o,v,x){var C,D=arguments.length,y=D<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(a,o,v,x);else for(var T=a.length-1;T>=0;T--)(C=a[T])&&(y=(D<3?C(y):D>3?C(o,v,y):C(o,v))||y);return D>3&&y&&Object.defineProperty(o,v,y),y},N=this&&this.__param||function(a,o){return function(v,x){o(v,x,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;const f=b(9042),m=b(9924),w=b(844),E=b(4725),p=b(2585),u=b(3656);let h=c.AccessibilityManager=class extends w.Disposable{constructor(a,o,v,x){super(),this._terminal=a,this._coreBrowserService=v,this._renderService=x,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 C=0;C<this._terminal.rows;C++)this._rowElements[C]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[C]);if(this._topBoundaryFocusListener=C=>this._handleBoundaryFocus(C,0),this._bottomBoundaryFocusListener=C=>this._handleBoundaryFocus(C,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 m.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((C=>this._handleResize(C.rows)))),this.register(this._terminal.onRender((C=>this._refreshRows(C.start,C.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((C=>this._handleChar(C)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
276
|
+
`)))),this.register(this._terminal.onA11yTab((C=>this._handleTab(C)))),this.register(this._terminal.onKey((C=>this._handleKey(C.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,u.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(a){for(let o=0;o<a;o++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
|
277
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,o){this._liveRegionDebouncer.refresh(a,o,this._terminal.rows)}_renderRows(a,o){const v=this._terminal.buffer,x=v.lines.length.toString();for(let C=a;C<=o;C++){const D=v.lines.get(v.ydisp+C),y=[],T=(D==null?void 0:D.translateToString(!0,void 0,void 0,y))||"",R=(v.ydisp+C+1).toString(),W=this._rowElements[C];W&&(T.length===0?(W.innerText=" ",this._rowColumns.set(W,[0,1])):(W.textContent=T,this._rowColumns.set(W,y)),W.setAttribute("aria-posinset",R),W.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,o){const v=a.target,x=this._rowElements[o===0?1:this._rowElements.length-2];if(v.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==x)return;let C,D;if(o===0?(C=v,D=this._rowElements.pop(),this._rowContainer.removeChild(D)):(C=this._rowElements.shift(),D=v,this._rowContainer.removeChild(C)),C.removeEventListener("focus",this._topBoundaryFocusListener),D.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const y=this._createAccessibilityTreeNode();this._rowElements.unshift(y),this._rowContainer.insertAdjacentElement("afterbegin",y)}else{const y=this._createAccessibilityTreeNode();this._rowElements.push(y),this._rowContainer.appendChild(y)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}_handleSelectionChange(){var T;if(this._rowElements.length===0)return;const a=document.getSelection();if(!a)return;if(a.isCollapsed)return void(this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection());if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let o={node:a.anchorNode,offset:a.anchorOffset},v={node:a.focusNode,offset:a.focusOffset};if((o.node.compareDocumentPosition(v.node)&Node.DOCUMENT_POSITION_PRECEDING||o.node===v.node&&o.offset>v.offset)&&([o,v]=[v,o]),o.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(o={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(o.node))return;const x=this._rowElements.slice(-1)[0];if(v.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(v={node:x,offset:((T=x.textContent)==null?void 0:T.length)??0}),!this._rowContainer.contains(v.node))return;const C=({node:R,offset:W})=>{const I=R instanceof Text?R.parentNode:R;let B=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(B))return console.warn("row is invalid. Race condition?"),null;const ie=this._rowColumns.get(I);if(!ie)return console.warn("columns is null. Race condition?"),null;let se=W<ie.length?ie[W]:ie.slice(-1)[0]+1;return se>=this._terminal.cols&&(++B,se=0),{row:B,column:se}},D=C(o),y=C(v);if(D&&y){if(D.row>y.row||D.row===y.row&&D.column>=y.column)throw new Error("invalid range");this._terminal.select(D.column,D.row,(y.row-D.row)*this._terminal.cols-D.column+y.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_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 a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};c.AccessibilityManager=h=_([N(1,p.IInstantiationService),N(2,E.ICoreBrowserService),N(3,E.IRenderService)],h)},3614:($,c)=>{function b(m){return m.replace(/\r?\n/g,"\r")}function _(m,w){return w?"\x1B[200~"+m+"\x1B[201~":m}function N(m,w,E,p){m=_(m=b(m),E.decPrivateModes.bracketedPasteMode&&p.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(m,!0),w.value=""}function f(m,w,E){const p=E.getBoundingClientRect(),u=m.clientX-p.left-10,h=m.clientY-p.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${u}px`,w.style.top=`${h}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=b,c.bracketTextForPaste=_,c.copyHandler=function(m,w){m.clipboardData&&m.clipboardData.setData("text/plain",w.selectionText),m.preventDefault()},c.handlePasteEvent=function(m,w,E,p){m.stopPropagation(),m.clipboardData&&N(m.clipboardData.getData("text/plain"),w,E,p)},c.paste=N,c.moveTextAreaUnderMouseCursor=f,c.rightClickHandler=function(m,w,E,p,u){f(m,w,E),u&&p.rightClickSelect(m),w.value=p.selectionText,w.select()}},7239:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;const _=b(1505);c.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(N,f,m){this._css.set(N,f,m)}getCss(N,f){return this._css.get(N,f)}setColor(N,f,m){this._color.set(N,f,m)}getColor(N,f){return this._color.get(N,f)}clear(){this._color.clear(),this._css.clear()}}},3656:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(b,_,N,f){b.addEventListener(_,N,f);let m=!1;return{dispose:()=>{m||(m=!0,b.removeEventListener(_,N,f))}}}},3551:function($,c,b){var _=this&&this.__decorate||function(h,a,o,v){var x,C=arguments.length,D=C<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,o):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(h,a,o,v);else for(var y=h.length-1;y>=0;y--)(x=h[y])&&(D=(C<3?x(D):C>3?x(a,o,D):x(a,o))||D);return C>3&&D&&Object.defineProperty(a,o,D),D},N=this&&this.__param||function(h,a){return function(o,v){a(o,v,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier=void 0;const f=b(3656),m=b(8460),w=b(844),E=b(2585),p=b(4725);let u=c.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(h,a,o,v,x){super(),this._element=h,this._mouseService=a,this._renderService=o,this._bufferService=v,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var C;this._lastMouseEvent=void 0,(C=this._activeProviderReplies)==null||C.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const a=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const o=h.composedPath();for(let v=0;v<o.length;v++){const x=o[v];if(x.classList.contains("xterm"))break;if(x.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,a){var v,x;this._activeProviderReplies&&a||((v=this._activeProviderReplies)==null||v.forEach((C=>{C==null||C.forEach((D=>{D.link.dispose&&D.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let o=!1;for(const[C,D]of this._linkProviderService.linkProviders.entries())a?(x=this._activeProviderReplies)!=null&&x.get(C)&&(o=this._checkLinkProviderResult(C,h,o)):D.provideLinks(h.y,(y=>{var R,W;if(this._isMouseOut)return;const T=y==null?void 0:y.map((I=>({link:I})));(R=this._activeProviderReplies)==null||R.set(C,T),o=this._checkLinkProviderResult(C,h,o),((W=this._activeProviderReplies)==null?void 0:W.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,a){const o=new Set;for(let v=0;v<a.size;v++){const x=a.get(v);if(x)for(let C=0;C<x.length;C++){const D=x[C],y=D.link.range.start.y<h?0:D.link.range.start.x,T=D.link.range.end.y>h?this._bufferService.cols:D.link.range.end.x;for(let R=y;R<=T;R++){if(o.has(R)){x.splice(C--,1);break}o.add(R)}}}}_checkLinkProviderResult(h,a,o){var C;if(!this._activeProviderReplies)return o;const v=this._activeProviderReplies.get(h);let x=!1;for(let D=0;D<h;D++)this._activeProviderReplies.has(D)&&!this._activeProviderReplies.get(D)||(x=!0);if(!x&&v){const D=v.find((y=>this._linkAtPosition(y.link,a)));D&&(o=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!o)for(let D=0;D<this._activeProviderReplies.size;D++){const y=(C=this._activeProviderReplies.get(D))==null?void 0:C.find((T=>this._linkAtPosition(T.link,a)));if(y){o=!0,this._handleNewLink(y);break}}return o}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const a=this._positionFromMouseEvent(h,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,a){this._currentLink&&this._lastMouseEvent&&(!h||!a||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(h.link,a)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var o,v;return(v=(o=this._currentLink)==null?void 0:o.state)==null?void 0:v.decorations.pointerCursor},set:o=>{var v;(v=this._currentLink)!=null&&v.state&&this._currentLink.state.decorations.pointerCursor!==o&&(this._currentLink.state.decorations.pointerCursor=o,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",o))}},underline:{get:()=>{var o,v;return(v=(o=this._currentLink)==null?void 0:o.state)==null?void 0:v.decorations.underline},set:o=>{var v,x,C;(v=this._currentLink)!=null&&v.state&&((C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.underline)!==o&&(this._currentLink.state.decorations.underline=o,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,o))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((o=>{if(!this._currentLink)return;const v=o.start===0?0:o.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+o.end;if(this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(v,x),this._lastMouseEvent)){const C=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);C&&this._askForLink(C,!1)}}))))}_linkHover(h,a,o){var v;(v=this._currentLink)!=null&&v.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(o,a.text)}_fireUnderlineEvent(h,a){const o=h.range,v=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(o.start.x-1,o.start.y-v-1,o.end.x,o.end.y-v-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(h,a,o){var v;(v=this._currentLink)!=null&&v.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(o,a.text)}_linkAtPosition(h,a){const o=h.range.start.y*this._bufferService.cols+h.range.start.x,v=h.range.end.y*this._bufferService.cols+h.range.end.x,x=a.y*this._bufferService.cols+a.x;return o<=x&&x<=v}_positionFromMouseEvent(h,a,o){const v=o.getCoords(h,a,this._bufferService.cols,this._bufferService.rows);if(v)return{x:v[0],y:v[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,a,o,v,x){return{x1:h,y1:a,x2:o,y2:v,cols:this._bufferService.cols,fg:x}}};c.Linkifier=u=_([N(1,p.IMouseService),N(2,p.IRenderService),N(3,E.IBufferService),N(4,p.ILinkProviderService)],u)},9042:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function($,c,b){var _=this&&this.__decorate||function(p,u,h,a){var o,v=arguments.length,x=v<3?u:a===null?a=Object.getOwnPropertyDescriptor(u,h):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(p,u,h,a);else for(var C=p.length-1;C>=0;C--)(o=p[C])&&(x=(v<3?o(x):v>3?o(u,h,x):o(u,h))||x);return v>3&&x&&Object.defineProperty(u,h,x),x},N=this&&this.__param||function(p,u){return function(h,a){u(h,a,p)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkProvider=void 0;const f=b(511),m=b(2585);let w=c.OscLinkProvider=class{constructor(p,u,h){this._bufferService=p,this._optionsService=u,this._oscLinkService=h}provideLinks(p,u){var T;const h=this._bufferService.buffer.lines.get(p-1);if(!h)return void u(void 0);const a=[],o=this._optionsService.rawOptions.linkHandler,v=new f.CellData,x=h.getTrimmedLength();let C=-1,D=-1,y=!1;for(let R=0;R<x;R++)if(D!==-1||h.hasContent(R)){if(h.loadCell(R,v),v.hasExtendedAttrs()&&v.extended.urlId){if(D===-1){D=R,C=v.extended.urlId;continue}y=v.extended.urlId!==C}else D!==-1&&(y=!0);if(y||D!==-1&&R===x-1){const W=(T=this._oscLinkService.getLinkData(C))==null?void 0:T.uri;if(W){const I={start:{x:D+1,y:p},end:{x:R+(y||R!==x-1?0:1),y:p}};let B=!1;if(!(o!=null&&o.allowNonHttpProtocols))try{const ie=new URL(W);["http:","https:"].includes(ie.protocol)||(B=!0)}catch{B=!0}B||a.push({text:W,range:I,activate:(ie,se)=>o?o.activate(ie,se,I):E(0,se),hover:(ie,se)=>{var ne;return(ne=o==null?void 0:o.hover)==null?void 0:ne.call(o,ie,se,I)},leave:(ie,se)=>{var ne;return(ne=o==null?void 0:o.leave)==null?void 0:ne.call(o,ie,se,I)}})}y=!1,v.hasExtendedAttrs()&&v.extended.urlId?(D=R,C=v.extended.urlId):(D=-1,C=-1)}}u(a)}};function E(p,u){if(confirm(`Do you want to navigate to ${u}?
|
|
278
|
+
|
|
279
|
+
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}}c.OscLinkProvider=w=_([N(0,m.IBufferService),N(1,m.IOptionsService),N(2,m.IOscLinkService)],w)},6193:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0,c.RenderDebouncer=class{constructor(b,_){this._renderCallback=b,this._coreBrowserService=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(b){return this._refreshCallbacks.push(b),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(b,_,N){this._rowCount=N,b=b!==void 0?b:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,b):b,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,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 b=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(b,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const b of this._refreshCallbacks)b(0);this._refreshCallbacks=[]}}},3236:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const _=b(3614),N=b(3656),f=b(3551),m=b(9042),w=b(3730),E=b(1680),p=b(3107),u=b(5744),h=b(2950),a=b(1296),o=b(428),v=b(4269),x=b(5114),C=b(8934),D=b(3230),y=b(9312),T=b(4725),R=b(6731),W=b(8055),I=b(8969),B=b(8460),ie=b(844),se=b(6114),ne=b(8437),de=b(2584),ce=b(7399),M=b(5941),z=b(9074),L=b(2585),P=b(5435),ue=b(4567),pe=b(779);class ve extends I.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(Y={}){super(Y),this.browser=se,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ie.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(z.DecorationService),this._instantiationService.setService(L.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(pe.LinkProviderService),this._instantiationService.setService(T.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((H,me)=>this.refresh(H,me)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((H=>this._reportWindowsOptions(H)))),this.register(this._inputHandler.onColor((H=>this._handleColorEvent(H)))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((H=>this._afterResize(H.cols,H.rows)))),this.register((0,ie.toDisposable)((()=>{var H,me;this._customKeyEventHandler=void 0,(me=(H=this.element)==null?void 0:H.parentNode)==null||me.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const H of Y){let me,ae="";switch(H.index){case 256:me="foreground",ae="10";break;case 257:me="background",ae="11";break;case 258:me="cursor",ae="12";break;default:me="ansi",ae="4;"+H.index}switch(H.type){case 0:const oe=W.color.toColorRGB(me==="ansi"?this._themeService.colors.ansi[H.index]:this._themeService.colors[me]);this.coreService.triggerDataEvent(`${de.C0.ESC}]${ae};${(0,M.toRgbString)(oe)}${de.C1_ESCAPED.ST}`);break;case 1:if(me==="ansi")this._themeService.modifyColors((ye=>ye.ansi[H.index]=W.channels.toColor(...H.color)));else{const ye=me;this._themeService.modifyColors((be=>be[ye]=W.channels.toColor(...H.color)))}break;case 2:this._themeService.restoreColor(H.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ue.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(de.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Y;return(Y=this.textarea)==null?void 0:Y.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(de.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 Y=this.buffer.ybase+this.buffer.y,H=this.buffer.lines.get(Y);if(!H)return;const me=Math.min(this.buffer.x,this.cols-1),ae=this._renderService.dimensions.css.cell.height,oe=H.getWidth(me),ye=this._renderService.dimensions.css.cell.width*oe,be=this.buffer.y*this._renderService.dimensions.css.cell.height,ze=me*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ze+"px",this.textarea.style.top=be+"px",this.textarea.style.width=ye+"px",this.textarea.style.height=ae+"px",this.textarea.style.lineHeight=ae+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,N.addDisposableDomListener)(this.element,"copy",(H=>{this.hasSelection()&&(0,_.copyHandler)(H,this._selectionService)})));const Y=H=>(0,_.handlePasteEvent)(H,this.textarea,this.coreService,this.optionsService);this.register((0,N.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,N.addDisposableDomListener)(this.element,"paste",Y)),se.isFirefox?this.register((0,N.addDisposableDomListener)(this.element,"mousedown",(H=>{H.button===2&&(0,_.rightClickHandler)(H,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,N.addDisposableDomListener)(this.element,"contextmenu",(H=>{(0,_.rightClickHandler)(H,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),se.isLinux&&this.register((0,N.addDisposableDomListener)(this.element,"auxclick",(H=>{H.button===1&&(0,_.moveTextAreaUnderMouseCursor)(H,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,N.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,N.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,N.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,N.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,N.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,N.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,N.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){var me;if(!Y)throw new Error("Terminal requires a parent element.");if(Y.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((me=this.element)==null?void 0:me.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Y.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"),Y.appendChild(this.element);const H=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),H.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,N.addDisposableDomListener)(this.screenElement,"mousemove",(ae=>this.updateCursorStyle(ae)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),H.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),se.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(x.CoreBrowserService,this.textarea,Y.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(T.ICoreBrowserService,this._coreBrowserService),this.register((0,N.addDisposableDomListener)(this.textarea,"focus",(ae=>this._handleTextAreaFocus(ae)))),this.register((0,N.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(o.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(T.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(R.ThemeService),this._instantiationService.setService(T.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(v.CharacterJoinerService),this._instantiationService.setService(T.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(T.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ae=>this._onRender.fire(ae)))),this.onResize((ae=>this._renderService.resize(ae.cols,ae.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(C.MouseService),this._instantiationService.setService(T.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(H);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.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(y.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(T.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ae=>this._renderService.handleSelectionChanged(ae.start,ae.end,ae.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ae=>{this.textarea.value=ae,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ae=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,N.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(p.BufferDecorationRenderer,this.screenElement)),this.register((0,N.addDisposableDomListener)(this.element,"mousedown",(ae=>this._selectionService.handleMouseDown(ae)))),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(ue.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ae=>this._handleScreenReaderModeOptionChange(ae)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ae=>{!this._overviewRulerRenderer&&ae&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Y=this,H=this.element;function me(ye){const be=Y._mouseService.getMouseReportCoords(ye,Y.screenElement);if(!be)return!1;let ze,qe;switch(ye.overrideType||ye.type){case"mousemove":qe=32,ye.buttons===void 0?(ze=3,ye.button!==void 0&&(ze=ye.button<3?ye.button:3)):ze=1&ye.buttons?0:4&ye.buttons?1:2&ye.buttons?2:3;break;case"mouseup":qe=0,ze=ye.button<3?ye.button:3;break;case"mousedown":qe=1,ze=ye.button<3?ye.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(ye)===!1||Y.viewport.getLinesScrolled(ye)===0)return!1;qe=ye.deltaY<0?0:1,ze=4;break;default:return!1}return!(qe===void 0||ze===void 0||ze>4)&&Y.coreMouseService.triggerMouseEvent({col:be.col,row:be.row,x:be.x,y:be.y,button:ze,action:qe,ctrl:ye.ctrlKey,alt:ye.altKey,shift:ye.shiftKey})}const ae={mouseup:null,wheel:null,mousedrag:null,mousemove:null},oe={mouseup:ye=>(me(ye),ye.buttons||(this._document.removeEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.removeEventListener("mousemove",ae.mousedrag)),this.cancel(ye)),wheel:ye=>(me(ye),this.cancel(ye,!0)),mousedrag:ye=>{ye.buttons&&me(ye)},mousemove:ye=>{ye.buttons||me(ye)}};this.register(this.coreMouseService.onProtocolChange((ye=>{ye?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ye)),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&ye?ae.mousemove||(H.addEventListener("mousemove",oe.mousemove),ae.mousemove=oe.mousemove):(H.removeEventListener("mousemove",ae.mousemove),ae.mousemove=null),16&ye?ae.wheel||(H.addEventListener("wheel",oe.wheel,{passive:!1}),ae.wheel=oe.wheel):(H.removeEventListener("wheel",ae.wheel),ae.wheel=null),2&ye?ae.mouseup||(ae.mouseup=oe.mouseup):(this._document.removeEventListener("mouseup",ae.mouseup),ae.mouseup=null),4&ye?ae.mousedrag||(ae.mousedrag=oe.mousedrag):(this._document.removeEventListener("mousemove",ae.mousedrag),ae.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,N.addDisposableDomListener)(H,"mousedown",(ye=>{if(ye.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ye))return me(ye),ae.mouseup&&this._document.addEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.addEventListener("mousemove",ae.mousedrag),this.cancel(ye)}))),this.register((0,N.addDisposableDomListener)(H,"wheel",(ye=>{if(!ae.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ye)===!1)return!1;if(!this.buffer.hasScrollback){const be=this.viewport.getLinesScrolled(ye);if(be===0)return;const ze=de.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ye.deltaY<0?"A":"B");let qe="";for(let Le=0;Le<Math.abs(be);Le++)qe+=ze;return this.coreService.triggerDataEvent(qe,!0),this.cancel(ye,!0)}return this.viewport.handleWheel(ye)?this.cancel(ye):void 0}}),{passive:!1})),this.register((0,N.addDisposableDomListener)(H,"touchstart",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ye),this.cancel(ye)}),{passive:!0})),this.register((0,N.addDisposableDomListener)(H,"touchmove",(ye=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ye)?void 0:this.cancel(ye)}),{passive:!1}))}refresh(Y,H){var me;(me=this._renderService)==null||me.refreshRows(Y,H)}updateCursorStyle(Y){var H;(H=this._selectionService)!=null&&H.shouldColumnSelect(Y)?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(Y,H,me=0){var ae;me===1?(super.scrollLines(Y,H,me),this.refresh(0,this.rows-1)):(ae=this.viewport)==null||ae.scrollLines(Y)}paste(Y){(0,_.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}attachCustomWheelEventHandler(Y){this._customWheelEventHandler=Y}registerLinkProvider(Y){return this._linkProviderService.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const H=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),H}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,H,me){this._selectionService.setSelection(Y,H,me)}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 Y;(Y=this._selectionService)==null||Y.clearSelection()}selectAll(){var Y;(Y=this._selectionService)==null||Y.selectAll()}selectLines(Y,H){var me;(me=this._selectionService)==null||me.selectLines(Y,H)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const H=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!H&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;H||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const me=(0,ce.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),me.type===3||me.type===2){const ae=this.rows-1;return this.scrollLines(me.type===2?-ae:ae),this.cancel(Y,!0)}return me.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(me.cancel&&this.cancel(Y,!0),!me.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(me.key!==de.C0.ETX&&me.key!==de.C0.CR||(this.textarea.value=""),this._onKey.fire({key:me.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(me.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,H){const me=Y.isMac&&!this.options.macOptionIsMeta&&H.altKey&&!H.ctrlKey&&!H.metaKey||Y.isWindows&&H.altKey&&H.ctrlKey&&!H.metaKey||Y.isWindows&&H.getModifierState("AltGraph");return H.type==="keypress"?me:me&&(!H.keyCode||H.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(H){return H.keyCode===16||H.keyCode===17||H.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let H;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)H=Y.charCode;else if(Y.which===null||Y.which===void 0)H=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;H=Y.which}return!(!H||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(H=String.fromCharCode(H),this._onKey.fire({key:H,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(H,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const H=Y.data;return this.coreService.triggerDataEvent(H,!0),this.cancel(Y),!0}return!1}resize(Y,H){Y!==this.cols||H!==this.rows?super.resize(Y,H):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,H){var me,ae;(me=this._charSizeService)==null||me.measure(),(ae=this.viewport)==null||ae.syncScrollArea(!0)}clear(){var Y;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 H=1;H<this.rows;H++)this.buffer.lines.push(this.buffer.getBlankLine(ne.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Y=this.viewport)==null||Y.reset(),this.refresh(0,this.rows-1)}}reset(){var H,me;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(H=this._selectionService)==null||H.reset(),this._decorationService.reset(),(me=this.viewport)==null||me.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Y;(Y=this._renderService)==null||Y.clearTextureAtlas()}_reportFocus(){var Y;(Y=this.element)!=null&&Y.classList.contains("focus")?this.coreService.triggerDataEvent(de.C0.ESC+"[I"):this.coreService.triggerDataEvent(de.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case P.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const H=this._renderService.dimensions.css.canvas.width.toFixed(0),me=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${de.C0.ESC}[4;${me};${H}t`);break;case P.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ae=this._renderService.dimensions.css.cell.width.toFixed(0),oe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${de.C0.ESC}[6;${oe};${ae}t`)}}cancel(Y,H){if(this.options.cancelEvents||H)return Y.preventDefault(),Y.stopPropagation(),!1}}c.Terminal=ve},9924:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0,c.TimeBasedDebouncer=class{constructor(b,_=1e3){this._renderCallback=b,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(b,_,N){this._rowCount=N,b=b!==void 0?b:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,b):b,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=f-this._lastRefreshMs,w=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const b=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(b,_)}}},1680:function($,c,b){var _=this&&this.__decorate||function(h,a,o,v){var x,C=arguments.length,D=C<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,o):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(h,a,o,v);else for(var y=h.length-1;y>=0;y--)(x=h[y])&&(D=(C<3?x(D):C>3?x(a,o,D):x(a,o))||D);return C>3&&D&&Object.defineProperty(a,o,D),D},N=this&&this.__param||function(h,a){return function(o,v){a(o,v,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;const f=b(3656),m=b(4725),w=b(8460),E=b(844),p=b(2585);let u=c.Viewport=class extends E.Disposable{constructor(h,a,o,v,x,C,D,y){super(),this._viewportElement=h,this._scrollArea=a,this._bufferService=o,this._optionsService=v,this._charSizeService=x,this._renderService=C,this._coreBrowserService=D,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 w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((T=>this._activeBuffer=T.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((T=>this._renderDimensions=T))),this._handleThemeChange(y.colors),this.register(y.onChangeColors((T=>this._handleThemeChange(T)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,a){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&o<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const a=this._getPixelsScrolled(h);return a!==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+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(h,a))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let a=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(h,a){var y;let o,v="";const x=[],C=a??this._bufferService.buffer.lines.length,D=this._bufferService.buffer.lines;for(let T=h;T<C;T++){const R=D.get(T);if(!R)continue;const W=(y=D.get(T+1))==null?void 0:y.isWrapped;if(v+=R.translateToString(!W),!W||T===D.length-1){const I=document.createElement("div");I.textContent=v,x.push(I),v.length>0&&(o=I),v=""}}return{bufferElements:x,cursorElement:o}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let a=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(h,a){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&a.altKey||o==="ctrl"&&a.ctrlKey||o==="shift"&&a.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const a=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(h,a))}};c.Viewport=u=_([N(2,p.IBufferService),N(3,p.IOptionsService),N(4,m.ICharSizeService),N(5,m.IRenderService),N(6,m.ICoreBrowserService),N(7,m.IThemeService)],u)},3107:function($,c,b){var _=this&&this.__decorate||function(p,u,h,a){var o,v=arguments.length,x=v<3?u:a===null?a=Object.getOwnPropertyDescriptor(u,h):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(p,u,h,a);else for(var C=p.length-1;C>=0;C--)(o=p[C])&&(x=(v<3?o(x):v>3?o(u,h,x):o(u,h))||x);return v>3&&x&&Object.defineProperty(u,h,x),x},N=this&&this.__param||function(p,u){return function(h,a){u(h,a,p)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;const f=b(4725),m=b(844),w=b(2585);let E=c.BufferDecorationRenderer=class extends m.Disposable{constructor(p,u,h,a,o){super(),this._screenElement=p,this._bufferService=u,this._coreBrowserService=h,this._decorationService=a,this._renderService=o,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((v=>this._removeDecoration(v)))),this.register((0,m.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 p of this._decorationService.decorations)this._renderDecoration(p);this._dimensionsChanged=!1}_renderDecoration(p){this._refreshStyle(p),this._dimensionsChanged&&this._refreshXPosition(p)}_createElement(p){var a;const u=this._coreBrowserService.mainDocument.createElement("div");u.classList.add("xterm-decoration"),u.classList.toggle("xterm-decoration-top-layer",((a=p==null?void 0:p.options)==null?void 0:a.layer)==="top"),u.style.width=`${Math.round((p.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,u.style.height=(p.options.height||1)*this._renderService.dimensions.css.cell.height+"px",u.style.top=(p.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",u.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=p.options.x??0;return h&&h>this._bufferService.cols&&(u.style.display="none"),this._refreshXPosition(p,u),u}_refreshStyle(p){const u=p.marker.line-this._bufferService.buffers.active.ydisp;if(u<0||u>=this._bufferService.rows)p.element&&(p.element.style.display="none",p.onRenderEmitter.fire(p.element));else{let h=this._decorationElements.get(p);h||(h=this._createElement(p),p.element=h,this._decorationElements.set(p,h),this._container.appendChild(h),p.onDispose((()=>{this._decorationElements.delete(p),h.remove()}))),h.style.top=u*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",p.onRenderEmitter.fire(h)}}_refreshXPosition(p,u=p.element){if(!u)return;const h=p.options.x??0;(p.options.anchor||"left")==="right"?u.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":u.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(p){var u;(u=this._decorationElements.get(p))==null||u.remove(),this._decorationElements.delete(p),p.dispose()}};c.BufferDecorationRenderer=E=_([N(1,w.IBufferService),N(2,f.ICoreBrowserService),N(3,w.IDecorationService),N(4,f.IRenderService)],E)},5871:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0,c.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(b){if(b.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===b.options.overviewRulerOptions.color&&_.position===b.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,b.marker.line))return;if(this._lineAdjacentToZone(_,b.marker.line,b.options.overviewRulerOptions.position))return void this._addLineToZone(_,b.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=b.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=b.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=b.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=b.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:b.options.overviewRulerOptions.color,position:b.options.overviewRulerOptions.position,startBufferLine:b.marker.line,endBufferLine:b.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(b){this._linePadding=b}_lineIntersectsZone(b,_){return _>=b.startBufferLine&&_<=b.endBufferLine}_lineAdjacentToZone(b,_,N){return _>=b.startBufferLine-this._linePadding[N||"full"]&&_<=b.endBufferLine+this._linePadding[N||"full"]}_addLineToZone(b,_){b.startBufferLine=Math.min(b.startBufferLine,_),b.endBufferLine=Math.max(b.endBufferLine,_)}}},5744:function($,c,b){var _=this&&this.__decorate||function(o,v,x,C){var D,y=arguments.length,T=y<3?v:C===null?C=Object.getOwnPropertyDescriptor(v,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(o,v,x,C);else for(var R=o.length-1;R>=0;R--)(D=o[R])&&(T=(y<3?D(T):y>3?D(v,x,T):D(v,x))||T);return y>3&&T&&Object.defineProperty(v,x,T),T},N=this&&this.__param||function(o,v){return function(x,C){v(x,C,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;const f=b(5871),m=b(4725),w=b(844),E=b(2585),p={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let a=c.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(o,v,x,C,D,y,T){var W;super(),this._viewportElement=o,this._screenElement=v,this._bufferService=x,this._decorationService=C,this._renderService=D,this._optionsService=y,this._coreBrowserService=T,this._colorZoneStore=new f.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(),(W=this._viewportElement.parentElement)==null||W.insertBefore(this._canvas,this._viewportElement);const R=this._canvas.getContext("2d");if(!R)throw new Error("Ctx cannot be null");this._ctx=R,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var I;(I=this._canvas)==null||I.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 o=Math.floor(this._canvas.width/3),v=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=o,u.center=v,u.right=o,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=u.left,h.right=u.left+u.center}_refreshDrawHeightConstants(){p.full=Math.round(2*this._coreBrowserService.dpr);const o=this._canvas.height/this._bufferService.buffer.lines.length,v=Math.round(Math.max(Math.min(o,12),6)*this._coreBrowserService.dpr);p.left=v,p.center=v,p.right=v}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.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 v of this._decorationService.decorations)this._colorZoneStore.addDecoration(v);this._ctx.lineWidth=1;const o=this._colorZoneStore.zones;for(const v of o)v.position!=="full"&&this._renderColorZone(v);for(const v of o)v.position==="full"&&this._renderColorZone(v);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(o){this._ctx.fillStyle=o.color,this._ctx.fillRect(h[o.position||"full"],Math.round((this._canvas.height-1)*(o.startBufferLine/this._bufferService.buffers.active.lines.length)-p[o.position||"full"]/2),u[o.position||"full"],Math.round((this._canvas.height-1)*((o.endBufferLine-o.startBufferLine)/this._bufferService.buffers.active.lines.length)+p[o.position||"full"]))}_queueRefresh(o,v){this._shouldUpdateDimensions=o||this._shouldUpdateDimensions,this._shouldUpdateAnchor=v||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};c.OverviewRulerRenderer=a=_([N(2,E.IBufferService),N(3,E.IDecorationService),N(4,m.IRenderService),N(5,E.IOptionsService),N(6,m.ICoreBrowserService)],a)},2950:function($,c,b){var _=this&&this.__decorate||function(p,u,h,a){var o,v=arguments.length,x=v<3?u:a===null?a=Object.getOwnPropertyDescriptor(u,h):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(p,u,h,a);else for(var C=p.length-1;C>=0;C--)(o=p[C])&&(x=(v<3?o(x):v>3?o(u,h,x):o(u,h))||x);return v>3&&x&&Object.defineProperty(u,h,x),x},N=this&&this.__param||function(p,u){return function(h,a){u(h,a,p)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;const f=b(4725),m=b(2585),w=b(2584);let E=c.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(p,u,h,a,o,v){this._textarea=p,this._compositionView=u,this._bufferService=h,this._optionsService=a,this._coreService=o,this._renderService=v,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(p){this._compositionView.textContent=p.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(p){if(this._isComposing||this._isSendingComposition){if(p.keyCode===229||p.keyCode===16||p.keyCode===17||p.keyCode===18)return!1;this._finalizeComposition(!1)}return p.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(p){if(this._compositionView.classList.remove("active"),this._isComposing=!1,p){const u={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,u.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(u.start,u.end):this._textarea.value.substring(u.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const u=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(u,!0)}}_handleAnyTextareaChanges(){const p=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const u=this._textarea.value,h=u.replace(p,"");this._dataAlreadySent=h,u.length>p.length?this._coreService.triggerDataEvent(h,!0):u.length<p.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):u.length===p.length&&u!==p&&this._coreService.triggerDataEvent(u,!0)}}),0)}updateCompositionElements(p){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const u=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=u*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=a+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const v=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(v.width,1)+"px",this._textarea.style.height=Math.max(v.height,1)+"px",this._textarea.style.lineHeight=v.height+"px"}p||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};c.CompositionHelper=E=_([N(2,m.IBufferService),N(3,m.IOptionsService),N(4,m.ICoreService),N(5,f.IRenderService)],E)},9806:($,c)=>{function b(_,N,f){const m=f.getBoundingClientRect(),w=_.getComputedStyle(f),E=parseInt(w.getPropertyValue("padding-left")),p=parseInt(w.getPropertyValue("padding-top"));return[N.clientX-m.left-E,N.clientY-m.top-p]}Object.defineProperty(c,"__esModule",{value:!0}),c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=b,c.getCoords=function(_,N,f,m,w,E,p,u,h){if(!E)return;const a=b(_,N,f);return a?(a[0]=Math.ceil((a[0]+(h?p/2:0))/p),a[1]=Math.ceil(a[1]/u),a[0]=Math.min(Math.max(a[0],1),m+(h?1:0)),a[1]=Math.min(Math.max(a[1],1),w),a):void 0}},9504:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;const _=b(2584);function N(u,h,a,o){const v=u-f(u,a),x=h-f(h,a),C=Math.abs(v-x)-(function(D,y,T){let R=0;const W=D-f(D,T),I=y-f(y,T);for(let B=0;B<Math.abs(W-I);B++){const ie=m(D,y)==="A"?-1:1,se=T.buffer.lines.get(W+ie*B);se!=null&&se.isWrapped&&R++}return R})(u,h,a);return p(C,E(m(u,h),o))}function f(u,h){let a=0,o=h.buffer.lines.get(u),v=o==null?void 0:o.isWrapped;for(;v&&u>=0&&u<h.rows;)a++,o=h.buffer.lines.get(--u),v=o==null?void 0:o.isWrapped;return a}function m(u,h){return u>h?"A":"B"}function w(u,h,a,o,v,x){let C=u,D=h,y="";for(;C!==a||D!==o;)C+=v?1:-1,v&&C>x.cols-1?(y+=x.buffer.translateBufferLineToString(D,!1,u,C),C=0,u=0,D++):!v&&C<0&&(y+=x.buffer.translateBufferLineToString(D,!1,0,u+1),C=x.cols-1,u=C,D--);return y+x.buffer.translateBufferLineToString(D,!1,u,C)}function E(u,h){const a=h?"O":"[";return _.C0.ESC+a+u}function p(u,h){u=Math.floor(u);let a="";for(let o=0;o<u;o++)a+=h;return a}c.moveToCellSequence=function(u,h,a,o){const v=a.buffer.x,x=a.buffer.y;if(!a.buffer.hasScrollback)return(function(y,T,R,W,I,B){return N(T,W,I,B).length===0?"":p(w(y,T,y,T-f(T,I),!1,I).length,E("D",B))})(v,x,0,h,a,o)+N(x,h,a,o)+(function(y,T,R,W,I,B){let ie;ie=N(T,W,I,B).length>0?W-f(W,I):T;const se=W,ne=(function(de,ce,M,z,L,P){let ue;return ue=N(M,z,L,P).length>0?z-f(z,L):ce,de<M&&ue<=z||de>=M&&ue<z?"C":"D"})(y,T,R,W,I,B);return p(w(y,ie,R,se,ne==="C",I).length,E(ne,B))})(v,x,u,h,a,o);let C;if(x===h)return C=v>u?"D":"C",p(Math.abs(v-u),E(C,o));C=x>h?"D":"C";const D=Math.abs(x-h);return p((function(y,T){return T.cols-y})(x>h?u:v,a)+(D-1)*a.cols+1+((x>h?v:u)-1),E(C,o))}},1296:function($,c,b){var _=this&&this.__decorate||function(B,ie,se,ne){var de,ce=arguments.length,M=ce<3?ie:ne===null?ne=Object.getOwnPropertyDescriptor(ie,se):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(B,ie,se,ne);else for(var z=B.length-1;z>=0;z--)(de=B[z])&&(M=(ce<3?de(M):ce>3?de(ie,se,M):de(ie,se))||M);return ce>3&&M&&Object.defineProperty(ie,se,M),M},N=this&&this.__param||function(B,ie){return function(se,ne){ie(se,ne,B)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;const f=b(3787),m=b(2550),w=b(2223),E=b(6171),p=b(6052),u=b(4725),h=b(8055),a=b(8460),o=b(844),v=b(2585),x="xterm-dom-renderer-owner-",C="xterm-rows",D="xterm-fg-",y="xterm-bg-",T="xterm-focus",R="xterm-selection";let W=1,I=c.DomRenderer=class extends o.Disposable{constructor(B,ie,se,ne,de,ce,M,z,L,P,ue,pe,ve){super(),this._terminal=B,this._document=ie,this._element=se,this._screenElement=ne,this._viewportElement=de,this._helperContainer=ce,this._linkifier2=M,this._charSizeService=L,this._optionsService=P,this._bufferService=ue,this._coreBrowserService=pe,this._themeService=ve,this._terminalClass=W++,this._rowElements=[],this._selectionRenderModel=(0,p.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(C),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(R),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Ce=>this._injectCss(Ce)))),this._injectCss(this._themeService.colors),this._rowFactory=z.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(x+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Ce=>this._handleLinkHover(Ce)))),this.register(this._linkifier2.onHideLinkUnderline((Ce=>this._handleLinkLeave(Ce)))),this.register((0,o.toDisposable)((()=>{this._element.classList.remove(x+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const B=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*B,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*B),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/B),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/B),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const se of this._rowElements)se.style.width=`${this.dimensions.css.canvas.width}px`,se.style.height=`${this.dimensions.css.cell.height}px`,se.style.lineHeight=`${this.dimensions.css.cell.height}px`,se.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const ie=`${this._terminalSelector} .${C} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=ie,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(B){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let ie=`${this._terminalSelector} .${C} { color: ${B.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;ie+=`${this._terminalSelector} .${C} .xterm-dim { color: ${h.color.multiplyOpacity(B.foreground,.5).css};}`,ie+=`${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 se=`blink_underline_${this._terminalClass}`,ne=`blink_bar_${this._terminalClass}`,de=`blink_block_${this._terminalClass}`;ie+=`@keyframes ${se} { 50% { border-bottom-style: hidden; }}`,ie+=`@keyframes ${ne} { 50% { box-shadow: none; }}`,ie+=`@keyframes ${de} { 0% { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css}; } 50% { background-color: inherit; color: ${B.cursor.css}; }}`,ie+=`${this._terminalSelector} .${C}.${T} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${se} 1s step-end infinite;}${this._terminalSelector} .${C}.${T} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${C}.${T} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${de} 1s step-end infinite;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css};}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${B.cursor.css} !important; color: ${B.cursorAccent.css} !important;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${B.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${B.cursor.css} inset;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${B.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,ie+=`${this._terminalSelector} .${R} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${R} div { position: absolute; background-color: ${B.selectionBackgroundOpaque.css};}${this._terminalSelector} .${R} div { position: absolute; background-color: ${B.selectionInactiveBackgroundOpaque.css};}`;for(const[ce,M]of B.ansi.entries())ie+=`${this._terminalSelector} .${D}${ce} { color: ${M.css}; }${this._terminalSelector} .${D}${ce}.xterm-dim { color: ${h.color.multiplyOpacity(M,.5).css}; }${this._terminalSelector} .${y}${ce} { background-color: ${M.css}; }`;ie+=`${this._terminalSelector} .${D}${w.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(B.background).css}; }${this._terminalSelector} .${D}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(B.background),.5).css}; }${this._terminalSelector} .${y}${w.INVERTED_DEFAULT_COLOR} { background-color: ${B.foreground.css}; }`,this._themeStyleElement.textContent=ie}_setDefaultSpacing(){const B=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${B}px`,this._rowFactory.defaultSpacing=B}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(B,ie){for(let se=this._rowElements.length;se<=ie;se++){const ne=this._document.createElement("div");this._rowContainer.appendChild(ne),this._rowElements.push(ne)}for(;this._rowElements.length>ie;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(B,ie){this._refreshRowElements(B,ie),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(T),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(T),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(B,ie,se){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(B,ie,se),this.renderRows(0,this._bufferService.rows-1),!B||!ie)return;this._selectionRenderModel.update(this._terminal,B,ie,se);const ne=this._selectionRenderModel.viewportStartRow,de=this._selectionRenderModel.viewportEndRow,ce=this._selectionRenderModel.viewportCappedStartRow,M=this._selectionRenderModel.viewportCappedEndRow;if(ce>=this._bufferService.rows||M<0)return;const z=this._document.createDocumentFragment();if(se){const L=B[0]>ie[0];z.appendChild(this._createSelectionElement(ce,L?ie[0]:B[0],L?B[0]:ie[0],M-ce+1))}else{const L=ne===ce?B[0]:0,P=ce===de?ie[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(ce,L,P));const ue=M-ce-1;if(z.appendChild(this._createSelectionElement(ce+1,0,this._bufferService.cols,ue)),ce!==M){const pe=de===M?ie[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(M,0,pe))}}this._selectionContainer.appendChild(z)}_createSelectionElement(B,ie,se,ne=1){const de=this._document.createElement("div"),ce=ie*this.dimensions.css.cell.width;let M=this.dimensions.css.cell.width*(se-ie);return ce+M>this.dimensions.css.canvas.width&&(M=this.dimensions.css.canvas.width-ce),de.style.height=ne*this.dimensions.css.cell.height+"px",de.style.top=B*this.dimensions.css.cell.height+"px",de.style.left=`${ce}px`,de.style.width=`${M}px`,de}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const B of this._rowElements)B.replaceChildren()}renderRows(B,ie){const se=this._bufferService.buffer,ne=se.ybase+se.y,de=Math.min(se.x,this._bufferService.cols-1),ce=this._optionsService.rawOptions.cursorBlink,M=this._optionsService.rawOptions.cursorStyle,z=this._optionsService.rawOptions.cursorInactiveStyle;for(let L=B;L<=ie;L++){const P=L+se.ydisp,ue=this._rowElements[L],pe=se.lines.get(P);if(!ue||!pe)break;ue.replaceChildren(...this._rowFactory.createRow(pe,P,P===ne,M,z,de,ce,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${this._terminalClass}`}_handleLinkHover(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!0)}_handleLinkLeave(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!1)}_setCellUnderline(B,ie,se,ne,de,ce){se<0&&(B=0),ne<0&&(ie=0);const M=this._bufferService.rows-1;se=Math.max(Math.min(se,M),0),ne=Math.max(Math.min(ne,M),0),de=Math.min(de,this._bufferService.cols);const z=this._bufferService.buffer,L=z.ybase+z.y,P=Math.min(z.x,de-1),ue=this._optionsService.rawOptions.cursorBlink,pe=this._optionsService.rawOptions.cursorStyle,ve=this._optionsService.rawOptions.cursorInactiveStyle;for(let Ce=se;Ce<=ne;++Ce){const Y=Ce+z.ydisp,H=this._rowElements[Ce],me=z.lines.get(Y);if(!H||!me)break;H.replaceChildren(...this._rowFactory.createRow(me,Y,Y===L,pe,ve,P,ue,this.dimensions.css.cell.width,this._widthCache,ce?Ce===se?B:0:-1,ce?(Ce===ne?ie:de)-1:-1))}}};c.DomRenderer=I=_([N(7,v.IInstantiationService),N(8,u.ICharSizeService),N(9,v.IOptionsService),N(10,v.IBufferService),N(11,u.ICoreBrowserService),N(12,u.IThemeService)],I)},3787:function($,c,b){var _=this&&this.__decorate||function(C,D,y,T){var R,W=arguments.length,I=W<3?D:T===null?T=Object.getOwnPropertyDescriptor(D,y):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(C,D,y,T);else for(var B=C.length-1;B>=0;B--)(R=C[B])&&(I=(W<3?R(I):W>3?R(D,y,I):R(D,y))||I);return W>3&&I&&Object.defineProperty(D,y,I),I},N=this&&this.__param||function(C,D){return function(y,T){D(y,T,C)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=void 0;const f=b(2223),m=b(643),w=b(511),E=b(2585),p=b(8055),u=b(4725),h=b(4269),a=b(6171),o=b(3734);let v=c.DomRendererRowFactory=class{constructor(C,D,y,T,R,W,I){this._document=C,this._characterJoinerService=D,this._optionsService=y,this._coreBrowserService=T,this._coreService=R,this._decorationService=W,this._themeService=I,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(C,D,y){this._selectionStart=C,this._selectionEnd=D,this._columnSelectMode=y}createRow(C,D,y,T,R,W,I,B,ie,se,ne){const de=[],ce=this._characterJoinerService.getJoinedCharacters(D),M=this._themeService.colors;let z,L=C.getNoBgTrimmedLength();y&&L<W+1&&(L=W+1);let P=0,ue="",pe=0,ve=0,Ce=0,Y=!1,H=0,me=!1,ae=0;const oe=[],ye=se!==-1&&ne!==-1;for(let be=0;be<L;be++){C.loadCell(be,this._workCell);let ze=this._workCell.getWidth();if(ze===0)continue;let qe=!1,Le=be,De=this._workCell;if(ce.length>0&&be===ce[0][0]){qe=!0;const ht=ce.shift();De=new h.JoinedCellData(this._workCell,C.translateToString(!0,ht[0],ht[1]),ht[1]-ht[0]),Le=ht[1]-1,ze=De.getWidth()}const Wt=this._isCellInSelection(be,D),Ii=y&&be===W,Ae=ye&&be>=se&&be<=ne;let Nt=!1;this._decorationService.forEachDecorationAtCell(be,D,void 0,(ht=>{Nt=!0}));let ge=De.getChars()||m.WHITESPACE_CELL_CHAR;if(ge===" "&&(De.isUnderline()||De.isOverline())&&(ge=" "),ae=ze*B-ie.get(ge,De.isBold(),De.isItalic()),z){if(P&&(Wt&&me||!Wt&&!me&&De.bg===pe)&&(Wt&&me&&M.selectionForeground||De.fg===ve)&&De.extended.ext===Ce&&Ae===Y&&ae===H&&!Ii&&!qe&&!Nt){De.isInvisible()?ue+=m.WHITESPACE_CELL_CHAR:ue+=ge,P++;continue}P&&(z.textContent=ue),z=this._document.createElement("span"),P=0,ue=""}else z=this._document.createElement("span");if(pe=De.bg,ve=De.fg,Ce=De.extended.ext,Y=Ae,H=ae,me=Wt,qe&&W>=be&&W<=Le&&(W=be),!this._coreService.isCursorHidden&&Ii&&this._coreService.isCursorInitialized){if(oe.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&oe.push("xterm-cursor-blink"),oe.push(T==="bar"?"xterm-cursor-bar":T==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(R)switch(R){case"outline":oe.push("xterm-cursor-outline");break;case"block":oe.push("xterm-cursor-block");break;case"bar":oe.push("xterm-cursor-bar");break;case"underline":oe.push("xterm-cursor-underline")}}if(De.isBold()&&oe.push("xterm-bold"),De.isItalic()&&oe.push("xterm-italic"),De.isDim()&&oe.push("xterm-dim"),ue=De.isInvisible()?m.WHITESPACE_CELL_CHAR:De.getChars()||m.WHITESPACE_CELL_CHAR,De.isUnderline()&&(oe.push(`xterm-underline-${De.extended.underlineStyle}`),ue===" "&&(ue=" "),!De.isUnderlineColorDefault()))if(De.isUnderlineColorRGB())z.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(De.getUnderlineColor()).join(",")})`;else{let ht=De.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&De.isBold()&&ht<8&&(ht+=8),z.style.textDecorationColor=M.ansi[ht].css}De.isOverline()&&(oe.push("xterm-overline"),ue===" "&&(ue=" ")),De.isStrikethrough()&&oe.push("xterm-strikethrough"),Ae&&(z.style.textDecoration="underline");let Te=De.getFgColor(),Je=De.getFgColorMode(),Ie=De.getBgColor(),Ye=De.getBgColorMode();const ut=!!De.isInverse();if(ut){const ht=Te;Te=Ie,Ie=ht;const vn=Je;Je=Ye,Ye=vn}let ct,bt,wt,Ot=!1;switch(this._decorationService.forEachDecorationAtCell(be,D,void 0,(ht=>{ht.options.layer!=="top"&&Ot||(ht.backgroundColorRGB&&(Ye=50331648,Ie=ht.backgroundColorRGB.rgba>>8&16777215,ct=ht.backgroundColorRGB),ht.foregroundColorRGB&&(Je=50331648,Te=ht.foregroundColorRGB.rgba>>8&16777215,bt=ht.foregroundColorRGB),Ot=ht.options.layer==="top")})),!Ot&&Wt&&(ct=this._coreBrowserService.isFocused?M.selectionBackgroundOpaque:M.selectionInactiveBackgroundOpaque,Ie=ct.rgba>>8&16777215,Ye=50331648,Ot=!0,M.selectionForeground&&(Je=50331648,Te=M.selectionForeground.rgba>>8&16777215,bt=M.selectionForeground)),Ot&&oe.push("xterm-decoration-top"),Ye){case 16777216:case 33554432:wt=M.ansi[Ie],oe.push(`xterm-bg-${Ie}`);break;case 50331648:wt=p.channels.toColor(Ie>>16,Ie>>8&255,255&Ie),this._addStyle(z,`background-color:#${x((Ie>>>0).toString(16),"0",6)}`);break;default:ut?(wt=M.foreground,oe.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):wt=M.background}switch(ct||De.isDim()&&(ct=p.color.multiplyOpacity(wt,.5)),Je){case 16777216:case 33554432:De.isBold()&&Te<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Te+=8),this._applyMinimumContrast(z,wt,M.ansi[Te],De,ct,void 0)||oe.push(`xterm-fg-${Te}`);break;case 50331648:const ht=p.channels.toColor(Te>>16&255,Te>>8&255,255&Te);this._applyMinimumContrast(z,wt,ht,De,ct,bt)||this._addStyle(z,`color:#${x(Te.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(z,wt,M.foreground,De,ct,bt)||ut&&oe.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}oe.length&&(z.className=oe.join(" "),oe.length=0),Ii||qe||Nt?z.textContent=ue:P++,ae!==this.defaultSpacing&&(z.style.letterSpacing=`${ae}px`),de.push(z),be=Le}return z&&P&&(z.textContent=ue),de}_applyMinimumContrast(C,D,y,T,R,W){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(T.getCode()))return!1;const I=this._getContrastCache(T);let B;if(R||W||(B=I.getColor(D.rgba,y.rgba)),B===void 0){const ie=this._optionsService.rawOptions.minimumContrastRatio/(T.isDim()?2:1);B=p.color.ensureContrastRatio(R||D,W||y,ie),I.setColor((R||D).rgba,(W||y).rgba,B??null)}return!!B&&(this._addStyle(C,`color:${B.css}`),!0)}_getContrastCache(C){return C.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(C,D){C.setAttribute("style",`${C.getAttribute("style")||""}${D};`)}_isCellInSelection(C,D){const y=this._selectionStart,T=this._selectionEnd;return!(!y||!T)&&(this._columnSelectMode?y[0]<=T[0]?C>=y[0]&&D>=y[1]&&C<T[0]&&D<=T[1]:C<y[0]&&D>=y[1]&&C>=T[0]&&D<=T[1]:D>y[1]&&D<T[1]||y[1]===T[1]&&D===y[1]&&C>=y[0]&&C<T[0]||y[1]<T[1]&&D===T[1]&&C<T[0]||y[1]<T[1]&&D===y[1]&&C>=y[0])}};function x(C,D,y){for(;C.length<y;)C=D+C;return C}c.DomRendererRowFactory=v=_([N(1,u.ICharacterJoinerService),N(2,E.IOptionsService),N(3,u.ICoreBrowserService),N(4,E.ICoreService),N(5,E.IDecorationService),N(6,u.IThemeService)],v)},2550:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WidthCache=void 0,c.WidthCache=class{constructor(b,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=b.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 N=b.createElement("span");N.classList.add("xterm-char-measure-element");const f=b.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const m=b.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const w=b.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[N,f,m,w],this._container.appendChild(N),this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(w),_.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(b,_,N,f){b===this._font&&_===this._fontSize&&N===this._weight&&f===this._weightBold||(this._font=b,this._fontSize=_,this._weight=N,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${N}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${N}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(b,_,N){let f=0;if(!_&&!N&&b.length===1&&(f=b.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const E=this._measure(b,0);return E>0&&(this._flat[f]=E),E}let m=b;_&&(m+="B"),N&&(m+="I");let w=this._holey.get(m);if(w===void 0){let E=0;_&&(E|=1),N&&(E|=2),w=this._measure(b,E),w>0&&this._holey.set(m,w)}return w}_measure(b,_){const N=this._measureElements[_];return N.textContent=b.repeat(32),N.offsetWidth/32}}},2223:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;const _=b(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:($,c)=>{function b(N){return 57508<=N&&N<=57558}function _(N){return N>=128512&&N<=128591||N>=127744&&N<=128511||N>=128640&&N<=128767||N>=9728&&N<=9983||N>=9984&&N<=10175||N>=65024&&N<=65039||N>=129280&&N<=129535||N>=127462&&N<=127487}Object.defineProperty(c,"__esModule",{value:!0}),c.computeNextVariantOffset=c.createRenderDimensions=c.treatGlyphAsBackgroundColor=c.allowRescaling=c.isEmoji=c.isRestrictedPowerlineGlyph=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(N){if(!N)throw new Error("value must not be falsy");return N},c.isPowerlineGlyph=b,c.isRestrictedPowerlineGlyph=function(N){return 57520<=N&&N<=57527},c.isEmoji=_,c.allowRescaling=function(N,f,m,w){return f===1&&m>Math.ceil(1.5*w)&&N!==void 0&&N>255&&!_(N)&&!b(N)&&!(function(E){return 57344<=E&&E<=63743})(N)},c.treatGlyphAsBackgroundColor=function(N){return b(N)||(function(f){return 9472<=f&&f<=9631})(N)},c.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}}}},c.computeNextVariantOffset=function(N,f,m=0){return(N-(2*Math.round(f)-m))%(2*Math.round(f))}},6052:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createSelectionRenderModel=void 0;class b{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(N,f,m,w=!1){if(this.selectionStart=f,this.selectionEnd=m,!f||!m||f[0]===m[0]&&f[1]===m[1])return void this.clear();const E=N.buffers.active.ydisp,p=f[1]-E,u=m[1]-E,h=Math.max(p,0),a=Math.min(u,N.rows-1);h>=N.rows||a<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=p,this.viewportEndRow=u,this.viewportCappedStartRow=h,this.viewportCappedEndRow=a,this.startCol=f[0],this.endCol=m[0])}isCellSelected(N,f,m){return!!this.hasSelection&&(m-=N.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&m>=this.viewportCappedStartRow&&f<this.endCol&&m<=this.viewportCappedEndRow:f<this.startCol&&m>=this.viewportCappedStartRow&&f>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&f>=this.startCol)}}c.createSelectionRenderModel=function(){return new b}},456:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0,c.SelectionModel=class{constructor(b){this._bufferService=b,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 b=this.selectionStart[0]+this.selectionStartLength;return b>this._bufferService.cols?b%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(b/this._bufferService.cols)-1]:[b%this._bufferService.cols,this.selectionStart[1]+Math.floor(b/this._bufferService.cols)]:[b,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const b=this.selectionStart[0]+this.selectionStartLength;return b>this._bufferService.cols?[b%this._bufferService.cols,this.selectionStart[1]+Math.floor(b/this._bufferService.cols)]:[Math.max(b,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const b=this.selectionStart,_=this.selectionEnd;return!(!b||!_)&&(b[1]>_[1]||b[1]===_[1]&&b[0]>_[0])}handleTrim(b){return this.selectionStart&&(this.selectionStart[1]-=b),this.selectionEnd&&(this.selectionEnd[1]-=b),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function($,c,b){var _=this&&this.__decorate||function(a,o,v,x){var C,D=arguments.length,y=D<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(a,o,v,x);else for(var T=a.length-1;T>=0;T--)(C=a[T])&&(y=(D<3?C(y):D>3?C(o,v,y):C(o,v))||y);return D>3&&y&&Object.defineProperty(o,v,y),y},N=this&&this.__param||function(a,o){return function(v,x){o(v,x,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;const f=b(2585),m=b(8460),w=b(844);let E=c.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,o,v){super(),this._optionsService=v,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new u(a,o,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};c.CharSizeService=E=_([N(2,f.IOptionsService)],E);class p extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(o,v){o!==void 0&&o>0&&v!==void 0&&v>0&&(this._result.width=o,this._result.height=v)}}class u extends p{constructor(o,v,x){super(),this._document=o,this._parentElement=v,this._optionsService=x,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 h extends p{constructor(o){super(),this._optionsService=o,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const v=this._ctx.measureText("W");if(!("width"in v&&"fontBoundingBoxAscent"in v&&"fontBoundingBoxDescent"in v))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const o=this._ctx.measureText("W");return this._validateAndSet(o.width,o.fontBoundingBoxAscent+o.fontBoundingBoxDescent),this._result}}},4269:function($,c,b){var _=this&&this.__decorate||function(h,a,o,v){var x,C=arguments.length,D=C<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,o):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(h,a,o,v);else for(var y=h.length-1;y>=0;y--)(x=h[y])&&(D=(C<3?x(D):C>3?x(a,o,D):x(a,o))||D);return C>3&&D&&Object.defineProperty(a,o,D),D},N=this&&this.__param||function(h,a){return function(o,v){a(o,v,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;const f=b(3734),m=b(643),w=b(511),E=b(2585);class p extends f.AttributeData{constructor(a,o,v){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=o,this._width=v}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.JoinedCellData=p;let u=c.CharacterJoinerService=class cy{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(a){const o={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(o),o.id}deregister(a){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===a)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(a);if(!o||o.length===0)return[];const v=[],x=o.translateToString(!0);let C=0,D=0,y=0,T=o.getFg(0),R=o.getBg(0);for(let W=0;W<o.getTrimmedLength();W++)if(o.loadCell(W,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==T||this._workCell.bg!==R){if(W-C>1){const I=this._getJoinedRanges(x,y,D,o,C);for(let B=0;B<I.length;B++)v.push(I[B])}C=W,y=D,T=this._workCell.fg,R=this._workCell.bg}D+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-C>1){const W=this._getJoinedRanges(x,y,D,o,C);for(let I=0;I<W.length;I++)v.push(W[I])}return v}_getJoinedRanges(a,o,v,x,C){const D=a.substring(o,v);let y=[];try{y=this._characterJoiners[0].handler(D)}catch(T){console.error(T)}for(let T=1;T<this._characterJoiners.length;T++)try{const R=this._characterJoiners[T].handler(D);for(let W=0;W<R.length;W++)cy._mergeRanges(y,R[W])}catch(R){console.error(R)}return this._stringRangesToCellRanges(y,x,C),y}_stringRangesToCellRanges(a,o,v){let x=0,C=!1,D=0,y=a[x];if(y){for(let T=v;T<this._bufferService.cols;T++){const R=o.getWidth(T),W=o.getString(T).length||m.WHITESPACE_CELL_CHAR.length;if(R!==0){if(!C&&y[0]<=D&&(y[0]=T,C=!0),y[1]<=D){if(y[1]=T,y=a[++x],!y)break;y[0]<=D?(y[0]=T,C=!0):C=!1}D+=W}}y&&(y[1]=this._bufferService.cols)}}static _mergeRanges(a,o){let v=!1;for(let x=0;x<a.length;x++){const C=a[x];if(v){if(o[1]<=C[0])return a[x-1][1]=o[1],a;if(o[1]<=C[1])return a[x-1][1]=Math.max(o[1],C[1]),a.splice(x,1),a;a.splice(x,1),x--}else{if(o[1]<=C[0])return a.splice(x,0,o),a;if(o[1]<=C[1])return C[0]=Math.min(o[0],C[0]),a;o[0]<C[1]&&(C[0]=Math.min(o[0],C[0]),v=!0)}}return v?a[a.length-1][1]=o[1]:a.push(o),a}};c.CharacterJoinerService=u=_([N(0,E.IBufferService)],u)},5114:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;const _=b(844),N=b(8460),f=b(3656);class m extends _.Disposable{constructor(p,u,h){super(),this._textarea=p,this._window=u,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new N.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new N.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((a=>this._screenDprMonitor.setWindow(a)))),this.register((0,N.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(p){this._window!==p&&(this._window=p,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}}c.CoreBrowserService=m;class w extends _.Disposable{constructor(p){super(),this._parentWindow=p,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new N.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(p){this._parentWindow=p,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)==null||p.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:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LinkProviderService=void 0;const _=b(844);class N extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const w=this.linkProviders.indexOf(m);w!==-1&&this.linkProviders.splice(w,1)}}}}c.LinkProviderService=N},8934:function($,c,b){var _=this&&this.__decorate||function(E,p,u,h){var a,o=arguments.length,v=o<3?p:h===null?h=Object.getOwnPropertyDescriptor(p,u):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(E,p,u,h);else for(var x=E.length-1;x>=0;x--)(a=E[x])&&(v=(o<3?a(v):o>3?a(p,u,v):a(p,u))||v);return o>3&&v&&Object.defineProperty(p,u,v),v},N=this&&this.__param||function(E,p){return function(u,h){p(u,h,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;const f=b(4725),m=b(9806);let w=c.MouseService=class{constructor(E,p){this._renderService=E,this._charSizeService=p}getCoords(E,p,u,h,a){return(0,m.getCoords)(window,E,p,u,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(E,p){const u=(0,m.getCoordsRelativeToElement)(window,E,p);if(this._charSizeService.hasValidSize)return u[0]=Math.min(Math.max(u[0],0),this._renderService.dimensions.css.canvas.width-1),u[1]=Math.min(Math.max(u[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(u[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(u[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(u[0]),y:Math.floor(u[1])}}};c.MouseService=w=_([N(0,f.IRenderService),N(1,f.ICharSizeService)],w)},3230:function($,c,b){var _=this&&this.__decorate||function(a,o,v,x){var C,D=arguments.length,y=D<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(a,o,v,x);else for(var T=a.length-1;T>=0;T--)(C=a[T])&&(y=(D<3?C(y):D>3?C(o,v,y):C(o,v))||y);return D>3&&y&&Object.defineProperty(o,v,y),y},N=this&&this.__param||function(a,o){return function(v,x){o(v,x,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;const f=b(6193),m=b(4725),w=b(8460),E=b(844),p=b(7226),u=b(2585);let h=c.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(a,o,v,x,C,D,y,T){super(),this._rowCount=a,this._charSizeService=x,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new p.DebouncedIdleTask,this._observerDisposable=this.register(new E.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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((R,W)=>this._renderRows(R,W)),y),this.register(this._renderDebouncer),this.register(y.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(D.onResize((()=>this._fullRefresh()))),this.register(D.buffers.onBufferActivate((()=>{var R;return(R=this._renderer.value)==null?void 0:R.clear()}))),this.register(v.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(C.onDecorationRegistered((()=>this._fullRefresh()))),this.register(C.onDecorationRemoved((()=>this._fullRefresh()))),this.register(v.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(D.cols,D.rows),this._fullRefresh()}))),this.register(v.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(D.buffer.y,D.buffer.y,!0)))),this.register(T.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(y.window,o),this.register(y.onWindowChange((R=>this._registerIntersectionObserver(R,o))))}_registerIntersectionObserver(a,o){if("IntersectionObserver"in a){const v=new a.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});v.observe(o),this._observerDisposable.value=(0,E.toDisposable)((()=>v.disconnect()))}}_handleIntersectionChange(a){this._isPaused=a.isIntersecting===void 0?a.intersectionRatio===0:!a.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(a,o,v=!1){this._isPaused?this._needsFullRefresh=!0:(v||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,o,this._rowCount))}_renderRows(a,o){this._renderer.value&&(a=Math.min(a,this._rowCount-1),o=Math.min(o,this._rowCount-1),this._renderer.value.renderRows(a,o),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:o}),this._onRender.fire({start:a,end:o}),this._isNextRenderRedrawOnly=!0)}resize(a,o){this._rowCount=o,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(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw((o=>this.refreshRows(o.start,o.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var a,o;this._renderer.value&&((o=(a=this._renderer.value).clearTextureAtlas)==null||o.call(a),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,o){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var v;return(v=this._renderer.value)==null?void 0:v.handleResize(a,o)})):this._renderer.value.handleResize(a,o),this._fullRefresh())}handleCharSizeChanged(){var a;(a=this._renderer.value)==null||a.handleCharSizeChanged()}handleBlur(){var a;(a=this._renderer.value)==null||a.handleBlur()}handleFocus(){var a;(a=this._renderer.value)==null||a.handleFocus()}handleSelectionChanged(a,o,v){var x;this._selectionState.start=a,this._selectionState.end=o,this._selectionState.columnSelectMode=v,(x=this._renderer.value)==null||x.handleSelectionChanged(a,o,v)}handleCursorMove(){var a;(a=this._renderer.value)==null||a.handleCursorMove()}clear(){var a;(a=this._renderer.value)==null||a.clear()}};c.RenderService=h=_([N(2,u.IOptionsService),N(3,m.ICharSizeService),N(4,u.IDecorationService),N(5,u.IBufferService),N(6,m.ICoreBrowserService),N(7,m.IThemeService)],h)},9312:function($,c,b){var _=this&&this.__decorate||function(y,T,R,W){var I,B=arguments.length,ie=B<3?T:W===null?W=Object.getOwnPropertyDescriptor(T,R):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(y,T,R,W);else for(var se=y.length-1;se>=0;se--)(I=y[se])&&(ie=(B<3?I(ie):B>3?I(T,R,ie):I(T,R))||ie);return B>3&&ie&&Object.defineProperty(T,R,ie),ie},N=this&&this.__param||function(y,T){return function(R,W){T(R,W,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;const f=b(9806),m=b(9504),w=b(456),E=b(4725),p=b(8460),u=b(844),h=b(6114),a=b(4841),o=b(511),v=b(2585),x=" ",C=new RegExp(x,"g");let D=c.SelectionService=class extends u.Disposable{constructor(y,T,R,W,I,B,ie,se,ne){super(),this._element=y,this._screenElement=T,this._linkifier=R,this._bufferService=W,this._coreService=I,this._mouseService=B,this._optionsService=ie,this._renderService=se,this._coreBrowserService=ne,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new o.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new p.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new p.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new p.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=de=>this._handleMouseMove(de),this._mouseUpListener=de=>this._handleMouseUp(de),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((de=>this._handleTrim(de))),this.register(this._bufferService.buffers.onBufferActivate((de=>this._handleBufferActivate(de)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,u.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 y=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!(!y||!T||y[0]===T[0]&&y[1]===T[1])}get selectionText(){const y=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;if(!y||!T)return"";const R=this._bufferService.buffer,W=[];if(this._activeSelectionMode===3){if(y[0]===T[0])return"";const I=y[0]<T[0]?y[0]:T[0],B=y[0]<T[0]?T[0]:y[0];for(let ie=y[1];ie<=T[1];ie++){const se=R.translateBufferLineToString(ie,!0,I,B);W.push(se)}}else{const I=y[1]===T[1]?T[0]:void 0;W.push(R.translateBufferLineToString(y[1],!0,y[0],I));for(let B=y[1]+1;B<=T[1]-1;B++){const ie=R.lines.get(B),se=R.translateBufferLineToString(B,!0);ie!=null&&ie.isWrapped?W[W.length-1]+=se:W.push(se)}if(y[1]!==T[1]){const B=R.lines.get(T[1]),ie=R.translateBufferLineToString(T[1],!0,0,T[0]);B&&B.isWrapped?W[W.length-1]+=ie:W.push(ie)}}return W.map((I=>I.replace(C," "))).join(h.isWindows?`\r
|
|
280
|
+
`:`
|
|
281
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(y){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&y&&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(y){const T=this._getMouseBufferCoords(y),R=this._model.finalSelectionStart,W=this._model.finalSelectionEnd;return!!(R&&W&&T)&&this._areCoordsInSelection(T,R,W)}isCellInSelection(y,T){const R=this._model.finalSelectionStart,W=this._model.finalSelectionEnd;return!(!R||!W)&&this._areCoordsInSelection([y,T],R,W)}_areCoordsInSelection(y,T,R){return y[1]>T[1]&&y[1]<R[1]||T[1]===R[1]&&y[1]===T[1]&&y[0]>=T[0]&&y[0]<R[0]||T[1]<R[1]&&y[1]===R[1]&&y[0]<R[0]||T[1]<R[1]&&y[1]===T[1]&&y[0]>=T[0]}_selectWordAtCursor(y,T){var I,B;const R=(B=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:B.range;if(R)return this._model.selectionStart=[R.start.x-1,R.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(R,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const W=this._getMouseBufferCoords(y);return!!W&&(this._selectWordAt(W,T),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(y,T){this._model.clearSelection(),y=Math.max(y,0),T=Math.min(T,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,T],this.refresh(),this._onSelectionChange.fire()}_handleTrim(y){this._model.handleTrim(y)&&this.refresh()}_getMouseBufferCoords(y){const T=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(T)return T[0]--,T[1]--,T[1]+=this._bufferService.buffer.ydisp,T}_getMouseEventScrollAmount(y){let T=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,y,this._screenElement)[1];const R=this._renderService.dimensions.css.canvas.height;return T>=0&&T<=R?0:(T>R&&(T-=R),T=Math.min(Math.max(T,-50),50),T/=50,T/Math.abs(T)+Math.round(14*T))}shouldForceSelection(y){return h.isMac?y.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:y.shiftKey}handleMouseDown(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._handleIncrementalClick(y):y.detail===1?this._handleSingleClick(y):y.detail===2?this._handleDoubleClick(y):y.detail===3&&this._handleTripleClick(y),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(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))}_handleSingleClick(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const T=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);T&&T.length!==this._model.selectionStart[0]&&T.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(y){this._selectWordAtCursor(y,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(y){const T=this._getMouseBufferCoords(y);T&&(this._activeSelectionMode=2,this._selectLineAt(T[1]))}shouldColumnSelect(y){return y.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(y){if(y.stopImmediatePropagation(),!this._model.selectionStart)return;const T=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),!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(y),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const R=this._bufferService.buffer;if(this._model.selectionEnd[1]<R.lines.length){const W=R.lines.get(this._model.selectionEnd[1]);W&&W.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}T&&T[0]===this._model.selectionEnd[0]&&T[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 y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}}_handleMouseUp(y){const T=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&T<500&&y.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const R=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(R&&R[0]!==void 0&&R[1]!==void 0){const W=(0,m.moveToCellSequence)(R[0]-1,R[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(W,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const y=this._model.finalSelectionStart,T=this._model.finalSelectionEnd,R=!(!y||!T||y[0]===T[0]&&y[1]===T[1]);R?y&&T&&(this._oldSelectionStart&&this._oldSelectionEnd&&y[0]===this._oldSelectionStart[0]&&y[1]===this._oldSelectionStart[1]&&T[0]===this._oldSelectionEnd[0]&&T[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(y,T,R)):this._oldHasSelection&&this._fireOnSelectionChange(y,T,R)}_fireOnSelectionChange(y,T,R){this._oldSelectionStart=y,this._oldSelectionEnd=T,this._oldHasSelection=R,this._onSelectionChange.fire()}_handleBufferActivate(y){this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim((T=>this._handleTrim(T)))}_convertViewportColToCharacterIndex(y,T){let R=T;for(let W=0;T>=W;W++){const I=y.loadCell(W,this._workCell).getChars().length;this._workCell.getWidth()===0?R--:I>1&&T!==W&&(R+=I-1)}return R}setSelection(y,T,R){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,T],this._model.selectionStartLength=R,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(y){this._isClickInSelection(y)||(this._selectWordAtCursor(y,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(y,T,R=!0,W=!0){if(y[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,B=I.lines.get(y[1]);if(!B)return;const ie=I.translateBufferLineToString(y[1],!1);let se=this._convertViewportColToCharacterIndex(B,y[0]),ne=se;const de=y[0]-se;let ce=0,M=0,z=0,L=0;if(ie.charAt(se)===" "){for(;se>0&&ie.charAt(se-1)===" ";)se--;for(;ne<ie.length&&ie.charAt(ne+1)===" ";)ne++}else{let pe=y[0],ve=y[0];B.getWidth(pe)===0&&(ce++,pe--),B.getWidth(ve)===2&&(M++,ve++);const Ce=B.getString(ve).length;for(Ce>1&&(L+=Ce-1,ne+=Ce-1);pe>0&&se>0&&!this._isCharWordSeparator(B.loadCell(pe-1,this._workCell));){B.loadCell(pe-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(ce++,pe--):Y>1&&(z+=Y-1,se-=Y-1),se--,pe--}for(;ve<B.length&&ne+1<ie.length&&!this._isCharWordSeparator(B.loadCell(ve+1,this._workCell));){B.loadCell(ve+1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,ve++):Y>1&&(L+=Y-1,ne+=Y-1),ne++,ve++}}ne++;let P=se+de-ce+z,ue=Math.min(this._bufferService.cols,ne-se+ce+M-z-L);if(T||ie.slice(se,ne).trim()!==""){if(R&&P===0&&B.getCodePoint(0)!==32){const pe=I.lines.get(y[1]-1);if(pe&&B.isWrapped&&pe.getCodePoint(this._bufferService.cols-1)!==32){const ve=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(ve){const Ce=this._bufferService.cols-ve.start;P-=Ce,ue+=Ce}}}if(W&&P+ue===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const pe=I.lines.get(y[1]+1);if(pe!=null&&pe.isWrapped&&pe.getCodePoint(0)!==32){const ve=this._getWordAt([0,y[1]+1],!1,!1,!0);ve&&(ue+=ve.length)}}return{start:P,length:ue}}}_selectWordAt(y,T){const R=this._getWordAt(y,T);if(R){for(;R.start<0;)R.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[R.start,y[1]],this._model.selectionStartLength=R.length}}_selectToWordAt(y){const T=this._getWordAt(y,!0);if(T){let R=y[1];for(;T.start<0;)T.start+=this._bufferService.cols,R--;if(!this._model.areSelectionValuesReversed())for(;T.start+T.length>this._bufferService.cols;)T.length-=this._bufferService.cols,R++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?T.start:T.start+T.length,R]}}_isCharWordSeparator(y){return y.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(y.getChars())>=0}_selectLineAt(y){const T=this._bufferService.buffer.getWrappedRangeForLine(y),R={start:{x:0,y:T.first},end:{x:this._bufferService.cols-1,y:T.last}};this._model.selectionStart=[0,T.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(R,this._bufferService.cols)}};c.SelectionService=D=_([N(3,v.IBufferService),N(4,v.ICoreService),N(5,E.IMouseService),N(6,v.IOptionsService),N(7,E.IRenderService),N(8,E.ICoreBrowserService)],D)},4725:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ILinkProviderService=c.IThemeService=c.ICharacterJoinerService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;const _=b(8343);c.ICharSizeService=(0,_.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),c.IMouseService=(0,_.createDecorator)("MouseService"),c.IRenderService=(0,_.createDecorator)("RenderService"),c.ISelectionService=(0,_.createDecorator)("SelectionService"),c.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),c.IThemeService=(0,_.createDecorator)("ThemeService"),c.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function($,c,b){var _=this&&this.__decorate||function(D,y,T,R){var W,I=arguments.length,B=I<3?y:R===null?R=Object.getOwnPropertyDescriptor(y,T):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(D,y,T,R);else for(var ie=D.length-1;ie>=0;ie--)(W=D[ie])&&(B=(I<3?W(B):I>3?W(y,T,B):W(y,T))||B);return I>3&&B&&Object.defineProperty(y,T,B),B},N=this&&this.__param||function(D,y){return function(T,R){y(T,R,D)}};Object.defineProperty(c,"__esModule",{value:!0}),c.ThemeService=c.DEFAULT_ANSI_COLORS=void 0;const f=b(7239),m=b(8055),w=b(8460),E=b(844),p=b(2585),u=m.css.toColor("#ffffff"),h=m.css.toColor("#000000"),a=m.css.toColor("#ffffff"),o=m.css.toColor("#000000"),v={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],y=[0,95,135,175,215,255];for(let T=0;T<216;T++){const R=y[T/36%6|0],W=y[T/6%6|0],I=y[T%6];D.push({css:m.channels.toCss(R,W,I),rgba:m.channels.toRgba(R,W,I)})}for(let T=0;T<24;T++){const R=8+10*T;D.push({css:m.channels.toCss(R,R,R),rgba:m.channels.toRgba(R,R,R)})}return D})());let x=c.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(D){super(),this._optionsService=D,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:h,cursor:a,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:v,selectionBackgroundOpaque:m.color.blend(h,v),selectionInactiveBackgroundTransparent:v,selectionInactiveBackgroundOpaque:m.color.blend(h,v),ansi:c.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(D={}){const y=this._colors;if(y.foreground=C(D.foreground,u),y.background=C(D.background,h),y.cursor=C(D.cursor,a),y.cursorAccent=C(D.cursorAccent,o),y.selectionBackgroundTransparent=C(D.selectionBackground,v),y.selectionBackgroundOpaque=m.color.blend(y.background,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundTransparent=C(D.selectionInactiveBackground,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundOpaque=m.color.blend(y.background,y.selectionInactiveBackgroundTransparent),y.selectionForeground=D.selectionForeground?C(D.selectionForeground,m.NULL_COLOR):void 0,y.selectionForeground===m.NULL_COLOR&&(y.selectionForeground=void 0),m.color.isOpaque(y.selectionBackgroundTransparent)&&(y.selectionBackgroundTransparent=m.color.opacity(y.selectionBackgroundTransparent,.3)),m.color.isOpaque(y.selectionInactiveBackgroundTransparent)&&(y.selectionInactiveBackgroundTransparent=m.color.opacity(y.selectionInactiveBackgroundTransparent,.3)),y.ansi=c.DEFAULT_ANSI_COLORS.slice(),y.ansi[0]=C(D.black,c.DEFAULT_ANSI_COLORS[0]),y.ansi[1]=C(D.red,c.DEFAULT_ANSI_COLORS[1]),y.ansi[2]=C(D.green,c.DEFAULT_ANSI_COLORS[2]),y.ansi[3]=C(D.yellow,c.DEFAULT_ANSI_COLORS[3]),y.ansi[4]=C(D.blue,c.DEFAULT_ANSI_COLORS[4]),y.ansi[5]=C(D.magenta,c.DEFAULT_ANSI_COLORS[5]),y.ansi[6]=C(D.cyan,c.DEFAULT_ANSI_COLORS[6]),y.ansi[7]=C(D.white,c.DEFAULT_ANSI_COLORS[7]),y.ansi[8]=C(D.brightBlack,c.DEFAULT_ANSI_COLORS[8]),y.ansi[9]=C(D.brightRed,c.DEFAULT_ANSI_COLORS[9]),y.ansi[10]=C(D.brightGreen,c.DEFAULT_ANSI_COLORS[10]),y.ansi[11]=C(D.brightYellow,c.DEFAULT_ANSI_COLORS[11]),y.ansi[12]=C(D.brightBlue,c.DEFAULT_ANSI_COLORS[12]),y.ansi[13]=C(D.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),y.ansi[14]=C(D.brightCyan,c.DEFAULT_ANSI_COLORS[14]),y.ansi[15]=C(D.brightWhite,c.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const T=Math.min(y.ansi.length-16,D.extendedAnsi.length);for(let R=0;R<T;R++)y.ansi[R+16]=C(D.extendedAnsi[R],c.DEFAULT_ANSI_COLORS[R+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(D){this._restoreColor(D),this._onChangeColors.fire(this.colors)}_restoreColor(D){if(D!==void 0)switch(D){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[D]=this._restoreColors.ansi[D]}else for(let y=0;y<this._restoreColors.ansi.length;++y)this._colors.ansi[y]=this._restoreColors.ansi[y]}modifyColors(D){D(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 C(D,y){if(D!==void 0)try{return m.css.toColor(D)}catch{}return y}c.ThemeService=x=_([N(0,p.IOptionsService)],x)},6349:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;const _=b(8460),N=b(844);class f extends N.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.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(w){if(this._maxLength===w)return;const E=new Array(w);for(let p=0;p<Math.min(w,this.length);p++)E[p]=this._array[this._getCyclicIndex(p)];this._array=E,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let E=this._length;E<w;E++)this._array[E]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,E){this._array[this._getCyclicIndex(w)]=E}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,E,...p){if(E){for(let u=w;u<this._length-E;u++)this._array[this._getCyclicIndex(u)]=this._array[this._getCyclicIndex(u+E)];this._length-=E,this.onDeleteEmitter.fire({index:w,amount:E})}for(let u=this._length-1;u>=w;u--)this._array[this._getCyclicIndex(u+p.length)]=this._array[this._getCyclicIndex(u)];for(let u=0;u<p.length;u++)this._array[this._getCyclicIndex(w+u)]=p[u];if(p.length&&this.onInsertEmitter.fire({index:w,amount:p.length}),this._length+p.length>this._maxLength){const u=this._length+p.length-this._maxLength;this._startIndex+=u,this._length=this._maxLength,this.onTrimEmitter.fire(u)}else this._length+=p.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,E,p){if(!(E<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+p<0)throw new Error("Cannot shift elements in list beyond index 0");if(p>0){for(let h=E-1;h>=0;h--)this.set(w+h+p,this.get(w+h));const u=w+E+p-this._length;if(u>0)for(this._length+=u;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let u=0;u<E;u++)this.set(w+u+p,this.get(w+u))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}c.CircularList=f},1439:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function b(_,N=5){if(typeof _!="object")return _;const f=Array.isArray(_)?[]:{};for(const m in _)f[m]=N<=1?_[m]:_[m]&&b(_[m],N-1);return f}},8055:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=c.NULL_COLOR=void 0;let b=0,_=0,N=0,f=0;var m,w,E,p,u;function h(o){const v=o.toString(16);return v.length<2?"0"+v:v}function a(o,v){return o<v?(v+.05)/(o+.05):(o+.05)/(v+.05)}c.NULL_COLOR={css:"#00000000",rgba:0},(function(o){o.toCss=function(v,x,C,D){return D!==void 0?`#${h(v)}${h(x)}${h(C)}${h(D)}`:`#${h(v)}${h(x)}${h(C)}`},o.toRgba=function(v,x,C,D=255){return(v<<24|x<<16|C<<8|D)>>>0},o.toColor=function(v,x,C,D){return{css:o.toCss(v,x,C,D),rgba:o.toRgba(v,x,C,D)}}})(m||(c.channels=m={})),(function(o){function v(x,C){return f=Math.round(255*C),[b,_,N]=u.toChannels(x.rgba),{css:m.toCss(b,_,N,f),rgba:m.toRgba(b,_,N,f)}}o.blend=function(x,C){if(f=(255&C.rgba)/255,f===1)return{css:C.css,rgba:C.rgba};const D=C.rgba>>24&255,y=C.rgba>>16&255,T=C.rgba>>8&255,R=x.rgba>>24&255,W=x.rgba>>16&255,I=x.rgba>>8&255;return b=R+Math.round((D-R)*f),_=W+Math.round((y-W)*f),N=I+Math.round((T-I)*f),{css:m.toCss(b,_,N),rgba:m.toRgba(b,_,N)}},o.isOpaque=function(x){return(255&x.rgba)==255},o.ensureContrastRatio=function(x,C,D){const y=u.ensureContrastRatio(x.rgba,C.rgba,D);if(y)return m.toColor(y>>24&255,y>>16&255,y>>8&255)},o.opaque=function(x){const C=(255|x.rgba)>>>0;return[b,_,N]=u.toChannels(C),{css:m.toCss(b,_,N),rgba:C}},o.opacity=v,o.multiplyOpacity=function(x,C){return f=255&x.rgba,v(x,f*C/255)},o.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(c.color=w={})),(function(o){let v,x;try{const C=document.createElement("canvas");C.width=1,C.height=1;const D=C.getContext("2d",{willReadFrequently:!0});D&&(v=D,v.globalCompositeOperation="copy",x=v.createLinearGradient(0,0,1,1))}catch{}o.toColor=function(C){if(C.match(/#[\da-f]{3,8}/i))switch(C.length){case 4:return b=parseInt(C.slice(1,2).repeat(2),16),_=parseInt(C.slice(2,3).repeat(2),16),N=parseInt(C.slice(3,4).repeat(2),16),m.toColor(b,_,N);case 5:return b=parseInt(C.slice(1,2).repeat(2),16),_=parseInt(C.slice(2,3).repeat(2),16),N=parseInt(C.slice(3,4).repeat(2),16),f=parseInt(C.slice(4,5).repeat(2),16),m.toColor(b,_,N,f);case 7:return{css:C,rgba:(parseInt(C.slice(1),16)<<8|255)>>>0};case 9:return{css:C,rgba:parseInt(C.slice(1),16)>>>0}}const D=C.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(D)return b=parseInt(D[1]),_=parseInt(D[2]),N=parseInt(D[3]),f=Math.round(255*(D[5]===void 0?1:parseFloat(D[5]))),m.toColor(b,_,N,f);if(!v||!x)throw new Error("css.toColor: Unsupported css format");if(v.fillStyle=x,v.fillStyle=C,typeof v.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(v.fillRect(0,0,1,1),[b,_,N,f]=v.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(b,_,N,f),css:C}}})(E||(c.css=E={})),(function(o){function v(x,C,D){const y=x/255,T=C/255,R=D/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.0722*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))}o.relativeLuminance=function(x){return v(x>>16&255,x>>8&255,255&x)},o.relativeLuminance2=v})(p||(c.rgb=p={})),(function(o){function v(C,D,y){const T=C>>24&255,R=C>>16&255,W=C>>8&255;let I=D>>24&255,B=D>>16&255,ie=D>>8&255,se=a(p.relativeLuminance2(I,B,ie),p.relativeLuminance2(T,R,W));for(;se<y&&(I>0||B>0||ie>0);)I-=Math.max(0,Math.ceil(.1*I)),B-=Math.max(0,Math.ceil(.1*B)),ie-=Math.max(0,Math.ceil(.1*ie)),se=a(p.relativeLuminance2(I,B,ie),p.relativeLuminance2(T,R,W));return(I<<24|B<<16|ie<<8|255)>>>0}function x(C,D,y){const T=C>>24&255,R=C>>16&255,W=C>>8&255;let I=D>>24&255,B=D>>16&255,ie=D>>8&255,se=a(p.relativeLuminance2(I,B,ie),p.relativeLuminance2(T,R,W));for(;se<y&&(I<255||B<255||ie<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),B=Math.min(255,B+Math.ceil(.1*(255-B))),ie=Math.min(255,ie+Math.ceil(.1*(255-ie))),se=a(p.relativeLuminance2(I,B,ie),p.relativeLuminance2(T,R,W));return(I<<24|B<<16|ie<<8|255)>>>0}o.blend=function(C,D){if(f=(255&D)/255,f===1)return D;const y=D>>24&255,T=D>>16&255,R=D>>8&255,W=C>>24&255,I=C>>16&255,B=C>>8&255;return b=W+Math.round((y-W)*f),_=I+Math.round((T-I)*f),N=B+Math.round((R-B)*f),m.toRgba(b,_,N)},o.ensureContrastRatio=function(C,D,y){const T=p.relativeLuminance(C>>8),R=p.relativeLuminance(D>>8);if(a(T,R)<y){if(R<T){const B=v(C,D,y),ie=a(T,p.relativeLuminance(B>>8));if(ie<y){const se=x(C,D,y);return ie>a(T,p.relativeLuminance(se>>8))?B:se}return B}const W=x(C,D,y),I=a(T,p.relativeLuminance(W>>8));if(I<y){const B=v(C,D,y);return I>a(T,p.relativeLuminance(B>>8))?W:B}return W}},o.reduceLuminance=v,o.increaseLuminance=x,o.toChannels=function(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]}})(u||(c.rgba=u={})),c.toPaddedHex=h,c.contrastRatio=a},8969:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;const _=b(844),N=b(2585),f=b(4348),m=b(7866),w=b(744),E=b(7302),p=b(6975),u=b(8460),h=b(1753),a=b(1480),o=b(7994),v=b(9282),x=b(5435),C=b(5981),D=b(2660);let y=!1;class T extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event((W=>{var I;(I=this._onScrollApi)==null||I.fire(W.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(W){for(const I in W)this.optionsService.options[I]=W[I]}constructor(W){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new u.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new u.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new u.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new E.OptionsService(W)),this._instantiationService.setService(N.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(N.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(N.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(p.CoreService)),this._instantiationService.setService(N.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(N.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(N.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(N.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(N.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new x.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,u.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,u.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,u.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,u.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((I=>{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((I=>{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 C.WriteBuffer(((I,B)=>this._inputHandler.parse(I,B)))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(W,I){this._writeBuffer.write(W,I)}writeSync(W,I){this._logService.logLevel<=N.LogLevelEnum.WARN&&!y&&(this._logService.warn("writeSync is unreliable and will be removed soon."),y=!0),this._writeBuffer.writeSync(W,I)}input(W,I=!0){this.coreService.triggerDataEvent(W,I)}resize(W,I){isNaN(W)||isNaN(I)||(W=Math.max(W,w.MINIMUM_COLS),I=Math.max(I,w.MINIMUM_ROWS),this._bufferService.resize(W,I))}scroll(W,I=!1){this._bufferService.scroll(W,I)}scrollLines(W,I,B){this._bufferService.scrollLines(W,I,B)}scrollPages(W){this.scrollLines(W*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(W){const I=W-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(W,I){return this._inputHandler.registerEscHandler(W,I)}registerDcsHandler(W,I){return this._inputHandler.registerDcsHandler(W,I)}registerCsiHandler(W,I){return this._inputHandler.registerCsiHandler(W,I)}registerOscHandler(W,I){return this._inputHandler.registerOscHandler(W,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let W=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?W=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(W=!0),W?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const W=[];W.push(this.onLineFeed(v.updateWindowsModeWrappedState.bind(null,this._bufferService))),W.push(this.registerCsiHandler({final:"H"},(()=>((0,v.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const I of W)I.dispose()}))}}}c.CoreTerminal=T},8460:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.runAndSubscribe=c.forwardEvent=c.EventEmitter=void 0,c.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=b=>(this._listeners.push(b),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===b)return void this._listeners.splice(_,1)}}})),this._event}fire(b,_){const N=[];for(let f=0;f<this._listeners.length;f++)N.push(this._listeners[f]);for(let f=0;f<N.length;f++)N[f].call(void 0,b,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},c.forwardEvent=function(b,_){return b((N=>_.fire(N)))},c.runAndSubscribe=function(b,_){return _(void 0),b((N=>_(N)))}},5435:function($,c,b){var _=this&&this.__decorate||function(ce,M,z,L){var P,ue=arguments.length,pe=ue<3?M:L===null?L=Object.getOwnPropertyDescriptor(M,z):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(ce,M,z,L);else for(var ve=ce.length-1;ve>=0;ve--)(P=ce[ve])&&(pe=(ue<3?P(pe):ue>3?P(M,z,pe):P(M,z))||pe);return ue>3&&pe&&Object.defineProperty(M,z,pe),pe},N=this&&this.__param||function(ce,M){return function(z,L){M(z,L,ce)}};Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;const f=b(2584),m=b(7116),w=b(2015),E=b(844),p=b(482),u=b(8437),h=b(8460),a=b(643),o=b(511),v=b(3734),x=b(2585),C=b(1480),D=b(6242),y=b(6351),T=b(5941),R={"(":0,")":1,"*":2,"+":3,"-":1,".":2},W=131072;function I(ce,M){if(ce>24)return M.setWinLines||!1;switch(ce){case 1:return!!M.restoreWin;case 2:return!!M.minimizeWin;case 3:return!!M.setWinPosition;case 4:return!!M.setWinSizePixels;case 5:return!!M.raiseWin;case 6:return!!M.lowerWin;case 7:return!!M.refreshWin;case 8:return!!M.setWinSizeChars;case 9:return!!M.maximizeWin;case 10:return!!M.fullscreenWin;case 11:return!!M.getWinState;case 13:return!!M.getWinPosition;case 14:return!!M.getWinSizePixels;case 15:return!!M.getScreenSizePixels;case 16:return!!M.getCellSizePixels;case 18:return!!M.getWinSizeChars;case 19:return!!M.getScreenSizeChars;case 20:return!!M.getIconTitle;case 21:return!!M.getWinTitle;case 22:return!!M.pushTitle;case 23:return!!M.popTitle;case 24:return!!M.setWinLines}return!1}var B;(function(ce){ce[ce.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ce[ce.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(B||(c.WindowsOptionsReportType=B={}));let ie=0;class se extends E.Disposable{getAttrData(){return this._curAttrData}constructor(M,z,L,P,ue,pe,ve,Ce,Y=new w.EscapeSequenceParser){super(),this._bufferService=M,this._charsetService=z,this._coreService=L,this._logService=P,this._optionsService=ue,this._oscLinkService=pe,this._coreMouseService=ve,this._unicodeService=Ce,this._parser=Y,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new p.StringToUtf32,this._utf8Decoder=new p.Utf8ToUtf32,this._workCell=new o.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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 ne(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((H=>this._activeBuffer=H.activeBuffer))),this._parser.setCsiHandlerFallback(((H,me)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(H),params:me.toArray()})})),this._parser.setEscHandlerFallback((H=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(H)})})),this._parser.setExecuteHandlerFallback((H=>{this._logService.debug("Unknown EXECUTE code: ",{code:H})})),this._parser.setOscHandlerFallback(((H,me,ae)=>{this._logService.debug("Unknown OSC code: ",{identifier:H,action:me,data:ae})})),this._parser.setDcsHandlerFallback(((H,me,ae)=>{me==="HOOK"&&(ae=ae.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(H),action:me,payload:ae})})),this._parser.setPrintHandler(((H,me,ae)=>this.print(H,me,ae))),this._parser.registerCsiHandler({final:"@"},(H=>this.insertChars(H))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(H=>this.scrollLeft(H))),this._parser.registerCsiHandler({final:"A"},(H=>this.cursorUp(H))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(H=>this.scrollRight(H))),this._parser.registerCsiHandler({final:"B"},(H=>this.cursorDown(H))),this._parser.registerCsiHandler({final:"C"},(H=>this.cursorForward(H))),this._parser.registerCsiHandler({final:"D"},(H=>this.cursorBackward(H))),this._parser.registerCsiHandler({final:"E"},(H=>this.cursorNextLine(H))),this._parser.registerCsiHandler({final:"F"},(H=>this.cursorPrecedingLine(H))),this._parser.registerCsiHandler({final:"G"},(H=>this.cursorCharAbsolute(H))),this._parser.registerCsiHandler({final:"H"},(H=>this.cursorPosition(H))),this._parser.registerCsiHandler({final:"I"},(H=>this.cursorForwardTab(H))),this._parser.registerCsiHandler({final:"J"},(H=>this.eraseInDisplay(H,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(H=>this.eraseInDisplay(H,!0))),this._parser.registerCsiHandler({final:"K"},(H=>this.eraseInLine(H,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(H=>this.eraseInLine(H,!0))),this._parser.registerCsiHandler({final:"L"},(H=>this.insertLines(H))),this._parser.registerCsiHandler({final:"M"},(H=>this.deleteLines(H))),this._parser.registerCsiHandler({final:"P"},(H=>this.deleteChars(H))),this._parser.registerCsiHandler({final:"S"},(H=>this.scrollUp(H))),this._parser.registerCsiHandler({final:"T"},(H=>this.scrollDown(H))),this._parser.registerCsiHandler({final:"X"},(H=>this.eraseChars(H))),this._parser.registerCsiHandler({final:"Z"},(H=>this.cursorBackwardTab(H))),this._parser.registerCsiHandler({final:"`"},(H=>this.charPosAbsolute(H))),this._parser.registerCsiHandler({final:"a"},(H=>this.hPositionRelative(H))),this._parser.registerCsiHandler({final:"b"},(H=>this.repeatPrecedingCharacter(H))),this._parser.registerCsiHandler({final:"c"},(H=>this.sendDeviceAttributesPrimary(H))),this._parser.registerCsiHandler({prefix:">",final:"c"},(H=>this.sendDeviceAttributesSecondary(H))),this._parser.registerCsiHandler({final:"d"},(H=>this.linePosAbsolute(H))),this._parser.registerCsiHandler({final:"e"},(H=>this.vPositionRelative(H))),this._parser.registerCsiHandler({final:"f"},(H=>this.hVPosition(H))),this._parser.registerCsiHandler({final:"g"},(H=>this.tabClear(H))),this._parser.registerCsiHandler({final:"h"},(H=>this.setMode(H))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(H=>this.setModePrivate(H))),this._parser.registerCsiHandler({final:"l"},(H=>this.resetMode(H))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(H=>this.resetModePrivate(H))),this._parser.registerCsiHandler({final:"m"},(H=>this.charAttributes(H))),this._parser.registerCsiHandler({final:"n"},(H=>this.deviceStatus(H))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(H=>this.deviceStatusPrivate(H))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(H=>this.softReset(H))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(H=>this.setCursorStyle(H))),this._parser.registerCsiHandler({final:"r"},(H=>this.setScrollRegion(H))),this._parser.registerCsiHandler({final:"s"},(H=>this.saveCursor(H))),this._parser.registerCsiHandler({final:"t"},(H=>this.windowOptions(H))),this._parser.registerCsiHandler({final:"u"},(H=>this.restoreCursor(H))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(H=>this.insertColumns(H))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(H=>this.deleteColumns(H))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(H=>this.selectProtected(H))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(H=>this.requestMode(H,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(H=>this.requestMode(H,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new D.OscHandler((H=>(this.setTitle(H),this.setIconName(H),!0)))),this._parser.registerOscHandler(1,new D.OscHandler((H=>this.setIconName(H)))),this._parser.registerOscHandler(2,new D.OscHandler((H=>this.setTitle(H)))),this._parser.registerOscHandler(4,new D.OscHandler((H=>this.setOrReportIndexedColor(H)))),this._parser.registerOscHandler(8,new D.OscHandler((H=>this.setHyperlink(H)))),this._parser.registerOscHandler(10,new D.OscHandler((H=>this.setOrReportFgColor(H)))),this._parser.registerOscHandler(11,new D.OscHandler((H=>this.setOrReportBgColor(H)))),this._parser.registerOscHandler(12,new D.OscHandler((H=>this.setOrReportCursorColor(H)))),this._parser.registerOscHandler(104,new D.OscHandler((H=>this.restoreIndexedColor(H)))),this._parser.registerOscHandler(110,new D.OscHandler((H=>this.restoreFgColor(H)))),this._parser.registerOscHandler(111,new D.OscHandler((H=>this.restoreBgColor(H)))),this._parser.registerOscHandler(112,new D.OscHandler((H=>this.restoreCursorColor(H)))),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 H in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:H},(()=>this.selectCharset("("+H))),this._parser.registerEscHandler({intermediates:")",final:H},(()=>this.selectCharset(")"+H))),this._parser.registerEscHandler({intermediates:"*",final:H},(()=>this.selectCharset("*"+H))),this._parser.registerEscHandler({intermediates:"+",final:H},(()=>this.selectCharset("+"+H))),this._parser.registerEscHandler({intermediates:"-",final:H},(()=>this.selectCharset("-"+H))),this._parser.registerEscHandler({intermediates:".",final:H},(()=>this.selectCharset("."+H))),this._parser.registerEscHandler({intermediates:"/",final:H},(()=>this.selectCharset("/"+H)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((H=>(this._logService.error("Parsing error: ",H),H))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new y.DcsHandler(((H,me)=>this.requestStatusString(H,me))))}_preserveStack(M,z,L,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=M,this._parseStack.cursorStartY=z,this._parseStack.decodedLength=L,this._parseStack.position=P}_logSlowResolvingAsync(M){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([M,new Promise(((z,L)=>setTimeout((()=>L("#SLOW_TIMEOUT")),5e3)))]).catch((z=>{if(z!=="#SLOW_TIMEOUT")throw z;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(M,z){let L,P=this._activeBuffer.x,ue=this._activeBuffer.y,pe=0;const ve=this._parseStack.paused;if(ve){if(L=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,z))return this._logSlowResolvingAsync(L),L;P=this._parseStack.cursorStartX,ue=this._parseStack.cursorStartY,this._parseStack.paused=!1,M.length>W&&(pe=this._parseStack.position+W)}if(this._logService.logLevel<=x.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof M=="string"?` "${M}"`:` "${Array.prototype.map.call(M,(H=>String.fromCharCode(H))).join("")}"`),typeof M=="string"?M.split("").map((H=>H.charCodeAt(0))):M),this._parseBuffer.length<M.length&&this._parseBuffer.length<W&&(this._parseBuffer=new Uint32Array(Math.min(M.length,W))),ve||this._dirtyRowTracker.clearRange(),M.length>W)for(let H=pe;H<M.length;H+=W){const me=H+W<M.length?H+W:M.length,ae=typeof M=="string"?this._stringDecoder.decode(M.substring(H,me),this._parseBuffer):this._utf8Decoder.decode(M.subarray(H,me),this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,ae))return this._preserveStack(P,ue,ae,H),this._logSlowResolvingAsync(L),L}else if(!ve){const H=typeof M=="string"?this._stringDecoder.decode(M,this._parseBuffer):this._utf8Decoder.decode(M,this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,H))return this._preserveStack(P,ue,H,0),this._logSlowResolvingAsync(L),L}this._activeBuffer.x===P&&this._activeBuffer.y===ue||this._onCursorMove.fire();const Ce=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Y=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Y<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Y,this._bufferService.rows-1),Math.min(Ce,this._bufferService.rows-1))}print(M,z,L){let P,ue;const pe=this._charsetService.charset,ve=this._optionsService.rawOptions.screenReaderMode,Ce=this._bufferService.cols,Y=this._coreService.decPrivateModes.wraparound,H=this._coreService.modes.insertMode,me=this._curAttrData;let ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&L-z>0&&ae.getWidth(this._activeBuffer.x-1)===2&&ae.setCellFromCodepoint(this._activeBuffer.x-1,0,1,me);let oe=this._parser.precedingJoinState;for(let ye=z;ye<L;++ye){if(P=M[ye],P<127&&pe){const Le=pe[String.fromCharCode(P)];Le&&(P=Le.charCodeAt(0))}const be=this._unicodeService.charProperties(P,oe);ue=C.UnicodeService.extractWidth(be);const ze=C.UnicodeService.extractShouldJoin(be),qe=ze?C.UnicodeService.extractWidth(oe):0;if(oe=be,ve&&this._onA11yChar.fire((0,p.stringFromCodePoint)(P)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+ue-qe>Ce){if(Y){const Le=ae;let De=this._activeBuffer.x-qe;for(this._activeBuffer.x=qe,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),ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),qe>0&&ae instanceof u.BufferLine&&ae.copyCellsFrom(Le,De,0,qe,!1);De<Ce;)Le.setCellFromCodepoint(De++,0,1,me)}else if(this._activeBuffer.x=Ce-1,ue===2)continue}if(ze&&this._activeBuffer.x){const Le=ae.getWidth(this._activeBuffer.x-1)?1:2;ae.addCodepointToCell(this._activeBuffer.x-Le,P,ue);for(let De=ue-qe;--De>=0;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,me)}else if(H&&(ae.insertCells(this._activeBuffer.x,ue-qe,this._activeBuffer.getNullCell(me)),ae.getWidth(Ce-1)===2&&ae.setCellFromCodepoint(Ce-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,me)),ae.setCellFromCodepoint(this._activeBuffer.x++,P,ue,me),ue>0)for(;--ue;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,me)}this._parser.precedingJoinState=oe,this._activeBuffer.x<Ce&&L-z>0&&ae.getWidth(this._activeBuffer.x)===0&&!ae.hasContent(this._activeBuffer.x)&&ae.setCellFromCodepoint(this._activeBuffer.x,0,1,me),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(M,z){return M.final!=="t"||M.prefix||M.intermediates?this._parser.registerCsiHandler(M,z):this._parser.registerCsiHandler(M,(L=>!I(L.params[0],this._optionsService.rawOptions.windowOptions)||z(L)))}registerDcsHandler(M,z){return this._parser.registerDcsHandler(M,new y.DcsHandler(z))}registerEscHandler(M,z){return this._parser.registerEscHandler(M,z)}registerOscHandler(M,z){return this._parser.registerOscHandler(M,new D.OscHandler(z))}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 M;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&&((M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&M.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);z.hasWidth(this._activeBuffer.x)&&!z.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const M=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-M),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(M=this._bufferService.cols-1){this._activeBuffer.x=Math.min(M,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(M,z){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=M,this._activeBuffer.y=this._activeBuffer.scrollTop+z):(this._activeBuffer.x=M,this._activeBuffer.y=z),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(M,z){this._restrictCursor(),this._setCursor(this._activeBuffer.x+M,this._activeBuffer.y+z)}cursorUp(M){const z=this._activeBuffer.y-this._activeBuffer.scrollTop;return z>=0?this._moveCursor(0,-Math.min(z,M.params[0]||1)):this._moveCursor(0,-(M.params[0]||1)),!0}cursorDown(M){const z=this._activeBuffer.scrollBottom-this._activeBuffer.y;return z>=0?this._moveCursor(0,Math.min(z,M.params[0]||1)):this._moveCursor(0,M.params[0]||1),!0}cursorForward(M){return this._moveCursor(M.params[0]||1,0),!0}cursorBackward(M){return this._moveCursor(-(M.params[0]||1),0),!0}cursorNextLine(M){return this.cursorDown(M),this._activeBuffer.x=0,!0}cursorPrecedingLine(M){return this.cursorUp(M),this._activeBuffer.x=0,!0}cursorCharAbsolute(M){return this._setCursor((M.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(M){return this._setCursor(M.length>=2?(M.params[1]||1)-1:0,(M.params[0]||1)-1),!0}charPosAbsolute(M){return this._setCursor((M.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(M){return this._moveCursor(M.params[0]||1,0),!0}linePosAbsolute(M){return this._setCursor(this._activeBuffer.x,(M.params[0]||1)-1),!0}vPositionRelative(M){return this._moveCursor(0,M.params[0]||1),!0}hVPosition(M){return this.cursorPosition(M),!0}tabClear(M){const z=M.params[0];return z===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:z===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(M){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let z=M.params[0]||1;for(;z--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(M){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let z=M.params[0]||1;for(;z--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(M){const z=M.params[0];return z===1&&(this._curAttrData.bg|=536870912),z!==2&&z!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(M,z,L,P=!1,ue=!1){const pe=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);pe.replaceCells(z,L,this._activeBuffer.getNullCell(this._eraseAttrData()),ue),P&&(pe.isWrapped=!1)}_resetBufferLine(M,z=!1){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);L&&(L.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),z),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+M),L.isWrapped=!1)}eraseInDisplay(M,z=!1){let L;switch(this._restrictCursor(this._bufferService.cols),M.params[0]){case 0:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,z);L<this._bufferService.rows;L++)this._resetBufferLine(L,z);this._dirtyRowTracker.markDirty(L);break;case 1:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L,0,this._activeBuffer.x+1,!0,z),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(L+1).isWrapped=!1);L--;)this._resetBufferLine(L,z);this._dirtyRowTracker.markDirty(0);break;case 2:for(L=this._bufferService.rows,this._dirtyRowTracker.markDirty(L-1);L--;)this._resetBufferLine(L,z);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine(M,z=!1){switch(this._restrictCursor(this._bufferService.cols),M.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,z);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,z);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,z)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(M){this._restrictCursor();let z=M.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y,P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,ue=this._bufferService.rows-1+this._activeBuffer.ybase-P+1;for(;z--;)this._activeBuffer.lines.splice(ue-1,1),this._activeBuffer.lines.splice(L,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(M){this._restrictCursor();let z=M.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y;let P;for(P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-P;z--;)this._activeBuffer.lines.splice(L,1),this._activeBuffer.lines.splice(P,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(M){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.insertCells(this._activeBuffer.x,M.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(M){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.deleteCells(this._activeBuffer.x,M.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(M){let z=M.params[0]||1;for(;z--;)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(M){let z=M.params[0]||1;for(;z--;)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(u.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=M.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);P.deleteCells(0,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=M.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);P.insertCells(0,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=M.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);P.insertCells(this._activeBuffer.x,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=M.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);P.deleteCells(this._activeBuffer.x,z,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(M){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(M.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(M){const z=this._parser.precedingJoinState;if(!z)return!0;const L=M.params[0]||1,P=C.UnicodeService.extractWidth(z),ue=this._activeBuffer.x-P,pe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(ue),ve=new Uint32Array(pe.length*L);let Ce=0;for(let H=0;H<pe.length;){const me=pe.codePointAt(H)||0;ve[Ce++]=me,H+=me>65535?2:1}let Y=Ce;for(let H=1;H<L;++H)ve.copyWithin(Y,0,Ce),Y+=Ce;return this.print(ve,0,Y),!0}sendDeviceAttributesPrimary(M){return M.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(M){return M.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(M.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(M){return(this._optionsService.rawOptions.termName+"").indexOf(M)===0}setMode(M){for(let z=0;z<M.length;z++)switch(M.params[z]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(M){for(let z=0;z<M.length;z++)switch(M.params[z]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.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(M){for(let z=0;z<M.length;z++)switch(M.params[z]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(M){for(let z=0;z<M.length;z++)switch(M.params[z]){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(),M.params[z]===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(M,z){const L=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:ue}=this._coreMouseService,pe=this._coreService,{buffers:ve,cols:Ce}=this._bufferService,{active:Y,alt:H}=ve,me=this._optionsService.rawOptions,ae=ze=>ze?1:2,oe=M.params[0];return ye=oe,be=z?oe===2?4:oe===4?ae(pe.modes.insertMode):oe===12?3:oe===20?ae(me.convertEol):0:oe===1?ae(L.applicationCursorKeys):oe===3?me.windowOptions.setWinLines?Ce===80?2:Ce===132?1:0:0:oe===6?ae(L.origin):oe===7?ae(L.wraparound):oe===8?3:oe===9?ae(P==="X10"):oe===12?ae(me.cursorBlink):oe===25?ae(!pe.isCursorHidden):oe===45?ae(L.reverseWraparound):oe===66?ae(L.applicationKeypad):oe===67?4:oe===1e3?ae(P==="VT200"):oe===1002?ae(P==="DRAG"):oe===1003?ae(P==="ANY"):oe===1004?ae(L.sendFocus):oe===1005?4:oe===1006?ae(ue==="SGR"):oe===1015?4:oe===1016?ae(ue==="SGR_PIXELS"):oe===1048?1:oe===47||oe===1047||oe===1049?ae(Y===H):oe===2004?ae(L.bracketedPasteMode):0,pe.triggerDataEvent(`${f.C0.ESC}[${z?"":"?"}${ye};${be}$y`),!0;var ye,be}_updateAttrColor(M,z,L,P,ue){return z===2?(M|=50331648,M&=-16777216,M|=v.AttributeData.fromColorRGB([L,P,ue])):z===5&&(M&=-50331904,M|=33554432|255&L),M}_extractColor(M,z,L){const P=[0,0,-1,0,0,0];let ue=0,pe=0;do{if(P[pe+ue]=M.params[z+pe],M.hasSubParams(z+pe)){const ve=M.getSubParams(z+pe);let Ce=0;do P[1]===5&&(ue=1),P[pe+Ce+1+ue]=ve[Ce];while(++Ce<ve.length&&Ce+pe+1+ue<P.length);break}if(P[1]===5&&pe+ue>=2||P[1]===2&&pe+ue>=5)break;P[1]&&(ue=1)}while(++pe+z<M.length&&pe+ue<P.length);for(let ve=2;ve<P.length;++ve)P[ve]===-1&&(P[ve]=0);switch(P[0]){case 38:L.fg=this._updateAttrColor(L.fg,P[1],P[3],P[4],P[5]);break;case 48:L.bg=this._updateAttrColor(L.bg,P[1],P[3],P[4],P[5]);break;case 58:L.extended=L.extended.clone(),L.extended.underlineColor=this._updateAttrColor(L.extended.underlineColor,P[1],P[3],P[4],P[5])}return pe}_processUnderline(M,z){z.extended=z.extended.clone(),(!~M||M>5)&&(M=1),z.extended.underlineStyle=M,z.fg|=268435456,M===0&&(z.fg&=-268435457),z.updateExtended()}_processSGR0(M){M.fg=u.DEFAULT_ATTR_DATA.fg,M.bg=u.DEFAULT_ATTR_DATA.bg,M.extended=M.extended.clone(),M.extended.underlineStyle=0,M.extended.underlineColor&=-67108864,M.updateExtended()}charAttributes(M){if(M.length===1&&M.params[0]===0)return this._processSGR0(this._curAttrData),!0;const z=M.length;let L;const P=this._curAttrData;for(let ue=0;ue<z;ue++)L=M.params[ue],L>=30&&L<=37?(P.fg&=-50331904,P.fg|=16777216|L-30):L>=40&&L<=47?(P.bg&=-50331904,P.bg|=16777216|L-40):L>=90&&L<=97?(P.fg&=-50331904,P.fg|=16777224|L-90):L>=100&&L<=107?(P.bg&=-50331904,P.bg|=16777224|L-100):L===0?this._processSGR0(P):L===1?P.fg|=134217728:L===3?P.bg|=67108864:L===4?(P.fg|=268435456,this._processUnderline(M.hasSubParams(ue)?M.getSubParams(ue)[0]:1,P)):L===5?P.fg|=536870912:L===7?P.fg|=67108864:L===8?P.fg|=1073741824:L===9?P.fg|=2147483648:L===2?P.bg|=134217728:L===21?this._processUnderline(2,P):L===22?(P.fg&=-134217729,P.bg&=-134217729):L===23?P.bg&=-67108865:L===24?(P.fg&=-268435457,this._processUnderline(0,P)):L===25?P.fg&=-536870913:L===27?P.fg&=-67108865:L===28?P.fg&=-1073741825:L===29?P.fg&=2147483647:L===39?(P.fg&=-67108864,P.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):L===49?(P.bg&=-67108864,P.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):L===38||L===48||L===58?ue+=this._extractColor(M,ue,P):L===53?P.bg|=1073741824:L===55?P.bg&=-1073741825:L===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):L===100?(P.fg&=-67108864,P.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",L);return!0}deviceStatus(M){switch(M.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const z=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${z};${L}R`)}return!0}deviceStatusPrivate(M){if(M.params[0]===6){const z=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${z};${L}R`)}return!0}softReset(M){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=u.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(M){const z=M.params[0]||1;switch(z){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 L=z%2==1;return this._optionsService.options.cursorBlink=L,!0}setScrollRegion(M){const z=M.params[0]||1;let L;return(M.length<2||(L=M.params[1])>this._bufferService.rows||L===0)&&(L=this._bufferService.rows),L>z&&(this._activeBuffer.scrollTop=z-1,this._activeBuffer.scrollBottom=L-1,this._setCursor(0,0)),!0}windowOptions(M){if(!I(M.params[0],this._optionsService.rawOptions.windowOptions))return!0;const z=M.length>1?M.params[1]:0;switch(M.params[0]){case 14:z!==2&&this._onRequestWindowsOptionsReport.fire(B.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(B.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:z!==0&&z!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),z!==0&&z!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:z!==0&&z!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),z!==0&&z!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(M){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(M){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(M){return this._windowTitle=M,this._onTitleChange.fire(M),!0}setIconName(M){return this._iconName=M,!0}setOrReportIndexedColor(M){const z=[],L=M.split(";");for(;L.length>1;){const P=L.shift(),ue=L.shift();if(/^\d+$/.exec(P)){const pe=parseInt(P);if(de(pe))if(ue==="?")z.push({type:0,index:pe});else{const ve=(0,T.parseColor)(ue);ve&&z.push({type:1,index:pe,color:ve})}}}return z.length&&this._onColor.fire(z),!0}setHyperlink(M){const z=M.split(";");return!(z.length<2)&&(z[1]?this._createHyperlink(z[0],z[1]):!z[0]&&this._finishHyperlink())}_createHyperlink(M,z){this._getCurrentLinkId()&&this._finishHyperlink();const L=M.split(":");let P;const ue=L.findIndex((pe=>pe.startsWith("id=")));return ue!==-1&&(P=L[ue].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:z}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(M,z){const L=M.split(";");for(let P=0;P<L.length&&!(z>=this._specialColors.length);++P,++z)if(L[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[z]}]);else{const ue=(0,T.parseColor)(L[P]);ue&&this._onColor.fire([{type:1,index:this._specialColors[z],color:ue}])}return!0}setOrReportFgColor(M){return this._setOrReportSpecialColor(M,0)}setOrReportBgColor(M){return this._setOrReportSpecialColor(M,1)}setOrReportCursorColor(M){return this._setOrReportSpecialColor(M,2)}restoreIndexedColor(M){if(!M)return this._onColor.fire([{type:2}]),!0;const z=[],L=M.split(";");for(let P=0;P<L.length;++P)if(/^\d+$/.exec(L[P])){const ue=parseInt(L[P]);de(ue)&&z.push({type:2,index:ue})}return z.length&&this._onColor.fire(z),!0}restoreFgColor(M){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(M){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(M){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,m.DEFAULT_CHARSET),!0}selectCharset(M){return M.length!==2?(this.selectDefaultCharset(),!0):(M[0]==="/"||this._charsetService.setgCharset(R[M[0]],m.CHARSETS[M[1]]||m.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 M=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,M,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=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(M){return this._charsetService.setgLevel(M),!0}screenAlignmentPattern(){const M=new o.CellData;M.content=4194373,M.fg=this._curAttrData.fg,M.bg=this._curAttrData.bg,this._setCursor(0,0);for(let z=0;z<this._bufferService.rows;++z){const L=this._activeBuffer.ybase+this._activeBuffer.y+z,P=this._activeBuffer.lines.get(L);P&&(P.fill(M),P.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(M,z){const L=this._bufferService.buffer,P=this._optionsService.rawOptions;return(ue=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${ue}${f.C0.ESC}\\`),!0))(M==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:M==='"p'?'P1$r61;1"p':M==="r"?`P1$r${L.scrollTop+1};${L.scrollBottom+1}r`:M==="m"?"P1$r0m":M===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(M,z){this._dirtyRowTracker.markRangeDirty(M,z)}}c.InputHandler=se;let ne=class{constructor(ce){this._bufferService=ce,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ce){ce<this.start?this.start=ce:ce>this.end&&(this.end=ce)}markRangeDirty(ce,M){ce>M&&(ie=ce,ce=M,M=ie),ce<this.start&&(this.start=ce),M>this.end&&(this.end=M)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function de(ce){return 0<=ce&&ce<256}ne=_([N(0,x.IBufferService)],ne)},844:($,c)=>{function b(_){for(const N of _)N.dispose();_.length=0}Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.toDisposable=c.MutableDisposable=c.Disposable=void 0,c.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const N=this._disposables.indexOf(_);N!==-1&&this._disposables.splice(N,1)}},c.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var N;this._isDisposed||_===this._value||((N=this._value)==null||N.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},c.toDisposable=function(_){return{dispose:_}},c.disposeArray=b,c.getDisposeArrayDisposable=function(_){return{dispose:()=>b(_)}}},1505:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.FourKeyMap=c.TwoKeyMap=void 0;class b{constructor(){this._data={}}set(N,f,m){this._data[N]||(this._data[N]={}),this._data[N][f]=m}get(N,f){return this._data[N]?this._data[N][f]:void 0}clear(){this._data={}}}c.TwoKeyMap=b,c.FourKeyMap=class{constructor(){this._data=new b}set(_,N,f,m,w){this._data.get(_,N)||this._data.set(_,N,new b),this._data.get(_,N).set(f,m,w)}get(_,N,f,m){var w;return(w=this._data.get(_,N))==null?void 0:w.get(f,m)}clear(){this._data.clear()}}},6114:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isChromeOS=c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.getSafariVersion=c.isSafari=c.isLegacyEdge=c.isFirefox=c.isNode=void 0,c.isNode=typeof process<"u"&&"title"in process;const b=c.isNode?"node":navigator.userAgent,_=c.isNode?"node":navigator.platform;c.isFirefox=b.includes("Firefox"),c.isLegacyEdge=b.includes("Edge"),c.isSafari=/^((?!chrome|android).)*safari/i.test(b),c.getSafariVersion=function(){if(!c.isSafari)return 0;const N=b.match(/Version\/(\d+)/);return N===null||N.length<2?0:parseInt(N[1])},c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),c.isIpad=_==="iPad",c.isIphone=_==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),c.isLinux=_.indexOf("Linux")>=0,c.isChromeOS=/\bCrOS\b/.test(b)},6106:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SortedList=void 0;let b=0;c.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(b=this._search(this._getKey(_)),this._array.splice(b,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const N=this._getKey(_);if(N===void 0||(b=this._search(N),b===-1)||this._getKey(this._array[b])!==N)return!1;do if(this._array[b]===_)return this._array.splice(b,1),!0;while(++b<this._array.length&&this._getKey(this._array[b])===N);return!1}*getKeyIterator(_){if(this._array.length!==0&&(b=this._search(_),!(b<0||b>=this._array.length)&&this._getKey(this._array[b])===_))do yield this._array[b];while(++b<this._array.length&&this._getKey(this._array[b])===_)}forEachByKey(_,N){if(this._array.length!==0&&(b=this._search(_),!(b<0||b>=this._array.length)&&this._getKey(this._array[b])===_))do N(this._array[b]);while(++b<this._array.length&&this._getKey(this._array[b])===_)}values(){return[...this._array].values()}_search(_){let N=0,f=this._array.length-1;for(;f>=N;){let m=N+f>>1;const w=this._getKey(this._array[m]);if(w>_)f=m-1;else{if(!(w<_)){for(;m>0&&this._getKey(this._array[m-1])===_;)m--;return m}N=m+1}}return N}}},7226:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DebouncedIdleTask=c.IdleTaskQueue=c.PriorityTaskQueue=void 0;const _=b(6114);class N{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let E=0,p=0,u=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),p=Math.max(E,p),h=w.timeRemaining(),1.5*p>h)return u-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(u-E))}ms`),void this._start();u=h}this.clear()}}class f extends N{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const E=Date.now()+w;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}c.PriorityTaskQueue=f,c.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends N{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:f,c.DebouncedIdleTask=class{constructor(){this._queue=new c.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;const _=b(643);c.updateWindowsModeWrappedState=function(N){const f=N.buffer.lines.get(N.buffer.ybase+N.buffer.y-1),m=f==null?void 0:f.get(N.cols-1),w=N.buffer.lines.get(N.buffer.ybase+N.buffer.y);w&&m&&(w.isWrapped=m[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&m[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;class b{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new b;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}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}}c.AttributeData=b;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,m=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=m}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}c.ExtendedAttrs=_},9092:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Buffer=c.MAX_BUFFER_SIZE=void 0;const _=b(6349),N=b(7226),f=b(3734),m=b(8437),w=b(4634),E=b(511),p=b(643),u=b(4863),h=b(7116);c.MAX_BUFFER_SIZE=4294967295,c.Buffer=class{constructor(a,o,v){this._hasScrollback=a,this._optionsService=o,this._bufferService=v,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,p.NULL_CELL_CHAR,p.NULL_CELL_WIDTH,p.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,p.WHITESPACE_CELL_CHAR,p.WHITESPACE_CELL_WIDTH,p.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new N.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,o){return new m.BufferLine(this._bufferService.cols,this.getNullCell(a),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const o=a+this._optionsService.rawOptions.scrollback;return o>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:o}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=m.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,o){const v=this.getNullCell(m.DEFAULT_ATTR_DATA);let x=0;const C=this._getCorrectBufferLength(o);if(C>this.lines.maxLength&&(this.lines.maxLength=C),this.lines.length>0){if(this._cols<a)for(let y=0;y<this.lines.length;y++)x+=+this.lines.get(y).resize(a,v);let D=0;if(this._rows<o)for(let y=this._rows;y<o;y++)this.lines.length<o+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(a,v)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(a,v)));else for(let y=this._rows;y>o;y--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(C<this.lines.maxLength){const y=this.lines.length-C;y>0&&(this.lines.trimStart(y),this.ybase=Math.max(this.ybase-y,0),this.ydisp=Math.max(this.ydisp-y,0),this.savedY=Math.max(this.savedY-y,0)),this.lines.maxLength=C}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,o-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(a,o),this._cols>a))for(let D=0;D<this.lines.length;D++)x+=+this.lines.get(D).resize(a,v);this._cols=a,this._rows=o,this._memoryCleanupQueue.clear(),x>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,o){this._cols!==a&&(a>this._cols?this._reflowLarger(a,o):this._reflowSmaller(a,o))}_reflowLarger(a,o){const v=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(v.length>0){const x=(0,w.reflowLargerCreateNewLayout)(this.lines,v);(0,w.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(a,o,x.countRemoved)}}_reflowLargerAdjustViewport(a,o,v){const x=this.getNullCell(m.DEFAULT_ATTR_DATA);let C=v;for(;C-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new m.BufferLine(a,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-v,0)}_reflowSmaller(a,o){const v=this.getNullCell(m.DEFAULT_ATTR_DATA),x=[];let C=0;for(let D=this.lines.length-1;D>=0;D--){let y=this.lines.get(D);if(!y||!y.isWrapped&&y.getTrimmedLength()<=a)continue;const T=[y];for(;y.isWrapped&&D>0;)y=this.lines.get(--D),T.unshift(y);const R=this.ybase+this.y;if(R>=D&&R<D+T.length)continue;const W=T[T.length-1].getTrimmedLength(),I=(0,w.reflowSmallerGetNewLineLengths)(T,this._cols,a),B=I.length-T.length;let ie;ie=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const se=[];for(let L=0;L<B;L++){const P=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);se.push(P)}se.length>0&&(x.push({start:D+T.length+C,newLines:se}),C+=se.length),T.push(...se);let ne=I.length-1,de=I[ne];de===0&&(ne--,de=I[ne]);let ce=T.length-B-1,M=W;for(;ce>=0;){const L=Math.min(M,de);if(T[ne]===void 0)break;if(T[ne].copyCellsFrom(T[ce],M-L,de-L,L,!0),de-=L,de===0&&(ne--,de=I[ne]),M-=L,M===0){ce--;const P=Math.max(ce,0);M=(0,w.getWrappedLineTrimmedLength)(T,P,this._cols)}}for(let L=0;L<T.length;L++)I[L]<a&&T[L].setCell(I[L],v);let z=B-ie;for(;z-- >0;)this.ybase===0?this.y<o-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+C)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+B,this.ybase+o-1)}if(x.length>0){const D=[],y=[];for(let ne=0;ne<this.lines.length;ne++)y.push(this.lines.get(ne));const T=this.lines.length;let R=T-1,W=0,I=x[W];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+C);let B=0;for(let ne=Math.min(this.lines.maxLength-1,T+C-1);ne>=0;ne--)if(I&&I.start>R+B){for(let de=I.newLines.length-1;de>=0;de--)this.lines.set(ne--,I.newLines[de]);ne++,D.push({index:R+1,amount:I.newLines.length}),B+=I.newLines.length,I=x[++W]}else this.lines.set(ne,y[R--]);let ie=0;for(let ne=D.length-1;ne>=0;ne--)D[ne].index+=ie,this.lines.onInsertEmitter.fire(D[ne]),ie+=D[ne].amount;const se=Math.max(0,T+C-this.lines.maxLength);se>0&&this.lines.onTrimEmitter.fire(se)}}translateBufferLineToString(a,o,v=0,x){const C=this.lines.get(a);return C?C.translateToString(o,v,x):""}getWrappedRangeForLine(a){let o=a,v=a;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;v+1<this.lines.length&&this.lines.get(v+1).isWrapped;)v++;return{first:o,last:v}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===a&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const o=new u.Marker(a);return this.markers.push(o),o.register(this.lines.onTrim((v=>{o.line-=v,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((v=>{o.line>=v.index&&(o.line+=v.amount)}))),o.register(this.lines.onDelete((v=>{o.line>=v.index&&o.line<v.index+v.amount&&o.dispose(),o.line>v.index&&(o.line-=v.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;const _=b(3734),N=b(511),f=b(643),m=b(482);c.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let w=0;class E{constructor(u,h,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*u);const o=h||N.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let v=0;v<u;++v)this.setCell(v,o);this.length=u}get(u){const h=this._data[3*u+0],a=2097151&h;return[this._data[3*u+1],2097152&h?this._combined[u]:a?(0,m.stringFromCodePoint)(a):"",h>>22,2097152&h?this._combined[u].charCodeAt(this._combined[u].length-1):a]}set(u,h){this._data[3*u+1]=h[f.CHAR_DATA_ATTR_INDEX],h[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[u]=h[1],this._data[3*u+0]=2097152|u|h[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*u+0]=h[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(u){return this._data[3*u+0]>>22}hasWidth(u){return 12582912&this._data[3*u+0]}getFg(u){return this._data[3*u+1]}getBg(u){return this._data[3*u+2]}hasContent(u){return 4194303&this._data[3*u+0]}getCodePoint(u){const h=this._data[3*u+0];return 2097152&h?this._combined[u].charCodeAt(this._combined[u].length-1):2097151&h}isCombined(u){return 2097152&this._data[3*u+0]}getString(u){const h=this._data[3*u+0];return 2097152&h?this._combined[u]:2097151&h?(0,m.stringFromCodePoint)(2097151&h):""}isProtected(u){return 536870912&this._data[3*u+2]}loadCell(u,h){return w=3*u,h.content=this._data[w+0],h.fg=this._data[w+1],h.bg=this._data[w+2],2097152&h.content&&(h.combinedData=this._combined[u]),268435456&h.bg&&(h.extended=this._extendedAttrs[u]),h}setCell(u,h){2097152&h.content&&(this._combined[u]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[u]=h.extended),this._data[3*u+0]=h.content,this._data[3*u+1]=h.fg,this._data[3*u+2]=h.bg}setCellFromCodepoint(u,h,a,o){268435456&o.bg&&(this._extendedAttrs[u]=o.extended),this._data[3*u+0]=h|a<<22,this._data[3*u+1]=o.fg,this._data[3*u+2]=o.bg}addCodepointToCell(u,h,a){let o=this._data[3*u+0];2097152&o?this._combined[u]+=(0,m.stringFromCodePoint)(h):2097151&o?(this._combined[u]=(0,m.stringFromCodePoint)(2097151&o)+(0,m.stringFromCodePoint)(h),o&=-2097152,o|=2097152):o=h|4194304,a&&(o&=-12582913,o|=a<<22),this._data[3*u+0]=o}insertCells(u,h,a){if((u%=this.length)&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,a),h<this.length-u){const o=new N.CellData;for(let v=this.length-u-h-1;v>=0;--v)this.setCell(u+h+v,this.loadCell(u+v,o));for(let v=0;v<h;++v)this.setCell(u+v,a)}else for(let o=u;o<this.length;++o)this.setCell(o,a);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,a)}deleteCells(u,h,a){if(u%=this.length,h<this.length-u){const o=new N.CellData;for(let v=0;v<this.length-u-h;++v)this.setCell(u+v,this.loadCell(u+h+v,o));for(let v=this.length-h;v<this.length;++v)this.setCell(v,a)}else for(let o=u;o<this.length;++o)this.setCell(o,a);u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,a),this.getWidth(u)!==0||this.hasContent(u)||this.setCellFromCodepoint(u,0,1,a)}replaceCells(u,h,a,o=!1){if(o)for(u&&this.getWidth(u-1)===2&&!this.isProtected(u-1)&&this.setCellFromCodepoint(u-1,0,1,a),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,a);u<h&&u<this.length;)this.isProtected(u)||this.setCell(u,a),u++;else for(u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,a),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,a);u<h&&u<this.length;)this.setCell(u++,a)}resize(u,h){if(u===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*u;if(u>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const o=new Uint32Array(a);o.set(this._data),this._data=o}for(let o=this.length;o<u;++o)this.setCell(o,h)}else{this._data=this._data.subarray(0,a);const o=Object.keys(this._combined);for(let x=0;x<o.length;x++){const C=parseInt(o[x],10);C>=u&&delete this._combined[C]}const v=Object.keys(this._extendedAttrs);for(let x=0;x<v.length;x++){const C=parseInt(v[x],10);C>=u&&delete this._extendedAttrs[C]}}return this.length=u,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const u=new Uint32Array(this._data.length);return u.set(this._data),this._data=u,1}return 0}fill(u,h=!1){if(h)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,u);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,u)}}copyFrom(u){this.length!==u.length?this._data=new Uint32Array(u._data):this._data.set(u._data),this.length=u.length,this._combined={};for(const h in u._combined)this._combined[h]=u._combined[h];this._extendedAttrs={};for(const h in u._extendedAttrs)this._extendedAttrs[h]=u._extendedAttrs[h];this.isWrapped=u.isWrapped}clone(){const u=new E(0);u._data=new Uint32Array(this._data),u.length=this.length;for(const h in this._combined)u._combined[h]=this._combined[h];for(const h in this._extendedAttrs)u._extendedAttrs[h]=this._extendedAttrs[h];return u.isWrapped=this.isWrapped,u}getTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0])return u+(this._data[3*u+0]>>22);return 0}getNoBgTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0]||50331648&this._data[3*u+2])return u+(this._data[3*u+0]>>22);return 0}copyCellsFrom(u,h,a,o,v){const x=u._data;if(v)for(let D=o-1;D>=0;D--){for(let y=0;y<3;y++)this._data[3*(a+D)+y]=x[3*(h+D)+y];268435456&x[3*(h+D)+2]&&(this._extendedAttrs[a+D]=u._extendedAttrs[h+D])}else for(let D=0;D<o;D++){for(let y=0;y<3;y++)this._data[3*(a+D)+y]=x[3*(h+D)+y];268435456&x[3*(h+D)+2]&&(this._extendedAttrs[a+D]=u._extendedAttrs[h+D])}const C=Object.keys(u._combined);for(let D=0;D<C.length;D++){const y=parseInt(C[D],10);y>=h&&(this._combined[y-h+a]=u._combined[y])}}translateToString(u,h,a,o){h=h??0,a=a??this.length,u&&(a=Math.min(a,this.getTrimmedLength())),o&&(o.length=0);let v="";for(;h<a;){const x=this._data[3*h+0],C=2097151&x,D=2097152&x?this._combined[h]:C?(0,m.stringFromCodePoint)(C):f.WHITESPACE_CELL_CHAR;if(v+=D,o)for(let y=0;y<D.length;++y)o.push(h);h+=x>>22||1}return o&&o.push(h),v}}c.BufferLine=E},4841:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(b,_){if(b.start.y>b.end.y)throw new Error(`Buffer range end (${b.end.x}, ${b.end.y}) cannot be before start (${b.start.x}, ${b.start.y})`);return _*(b.end.y-b.start.y)+(b.end.x-b.start.x+1)}},4634:($,c)=>{function b(_,N,f){if(N===_.length-1)return _[N].getTrimmedLength();const m=!_[N].hasContent(f-1)&&_[N].getWidth(f-1)===1,w=_[N+1].getWidth(0)===2;return m&&w?f-1:f}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(_,N,f,m,w){const E=[];for(let p=0;p<_.length-1;p++){let u=p,h=_.get(++u);if(!h.isWrapped)continue;const a=[_.get(p)];for(;u<_.length&&h.isWrapped;)a.push(h),h=_.get(++u);if(m>=p&&m<u){p+=a.length-1;continue}let o=0,v=b(a,o,N),x=1,C=0;for(;x<a.length;){const y=b(a,x,N),T=y-C,R=f-v,W=Math.min(T,R);a[o].copyCellsFrom(a[x],C,v,W,!1),v+=W,v===f&&(o++,v=0),C+=W,C===y&&(x++,C=0),v===0&&o!==0&&a[o-1].getWidth(f-1)===2&&(a[o].copyCellsFrom(a[o-1],f-1,v++,1,!1),a[o-1].setCell(f-1,w))}a[o].replaceCells(v,f,w);let D=0;for(let y=a.length-1;y>0&&(y>o||a[y].getTrimmedLength()===0);y--)D++;D>0&&(E.push(p+a.length-D),E.push(D)),p+=a.length-1}return E},c.reflowLargerCreateNewLayout=function(_,N){const f=[];let m=0,w=N[m],E=0;for(let p=0;p<_.length;p++)if(w===p){const u=N[++m];_.onDeleteEmitter.fire({index:p-E,amount:u}),p+=u-1,E+=u,w=N[++m]}else f.push(p);return{layout:f,countRemoved:E}},c.reflowLargerApplyNewLayout=function(_,N){const f=[];for(let m=0;m<N.length;m++)f.push(_.get(N[m]));for(let m=0;m<f.length;m++)_.set(m,f[m]);_.length=N.length},c.reflowSmallerGetNewLineLengths=function(_,N,f){const m=[],w=_.map(((h,a)=>b(_,a,N))).reduce(((h,a)=>h+a));let E=0,p=0,u=0;for(;u<w;){if(w-u<f){m.push(w-u);break}E+=f;const h=b(_,p,N);E>h&&(E-=h,p++);const a=_[p].getWidth(E-1)===2;a&&E--;const o=a?f-1:f;m.push(o),u+=o}return m},c.getWrappedLineTrimmedLength=b},5295:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;const _=b(8460),N=b(844),f=b(9092);class m extends N.Disposable{constructor(E,p){super(),this._optionsService=E,this._bufferService=p,this._onBufferActivate=this.register(new _.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 f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.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(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),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(E,p){this._normal.resize(E,p),this._alt.resize(E,p),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}c.BufferSet=m},511:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;const _=b(482),N=b(643),f=b(3734);class m extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const p=new m;return p.setFromCharData(E),p}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[N.CHAR_DATA_ATTR_INDEX],this.bg=0;let p=!1;if(E[N.CHAR_DATA_CHAR_INDEX].length>2)p=!0;else if(E[N.CHAR_DATA_CHAR_INDEX].length===2){const u=E[N.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=u&&u<=56319){const h=E[N.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(u-55296)+h-56320+65536|E[N.CHAR_DATA_WIDTH_INDEX]<<22:p=!0}else p=!0}else this.content=E[N.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[N.CHAR_DATA_WIDTH_INDEX]<<22;p&&(this.combinedData=E[N.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[N.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.CellData=m},643:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_EXT=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=0,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.DEFAULT_EXT=0,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;const _=b(8460),N=b(844);class f{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,N.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}c.Marker=f,f._nextId=1},7116:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.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:"≥","{":"π","|":"≠","}":"£","~":"·"},c.CHARSETS.A={"#":"£"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},c.CHARSETS.C=c.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},c.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},c.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},c.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},c.CHARSETS.E=c.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},c.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},c.CHARSETS.H=c.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:($,c)=>{var b,_,N;Object.defineProperty(c,"__esModule",{value:!0}),c.C1_ESCAPED=c.C1=c.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
|
|
282
|
+
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(b||(c.C0=b={})),(function(f){f.PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC=""})(_||(c.C1=_={})),(function(f){f.ST=`${b.ESC}\\`})(N||(c.C1_ESCAPED=N={}))},7399:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;const _=b(2584),N={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:["'",'"']};c.evaluateKeyboardEvent=function(f,m,w,E){const p={type:0,cancel:!1,key:void 0},u=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?p.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?p.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?p.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(p.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:p.key=f.ctrlKey?"\b":_.C0.DEL,f.altKey&&(p.key=_.C0.ESC+p.key);break;case 9:if(f.shiftKey){p.key=_.C0.ESC+"[Z";break}p.key=_.C0.HT,p.cancel=!0;break;case 13:p.key=f.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,p.cancel=!0;break;case 27:p.key=_.C0.ESC,f.altKey&&(p.key=_.C0.ESC+_.C0.ESC),p.cancel=!0;break;case 37:if(f.metaKey)break;u?(p.key=_.C0.ESC+"[1;"+(u+1)+"D",p.key===_.C0.ESC+"[1;3D"&&(p.key=_.C0.ESC+(w?"b":"[1;5D"))):p.key=m?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(f.metaKey)break;u?(p.key=_.C0.ESC+"[1;"+(u+1)+"C",p.key===_.C0.ESC+"[1;3C"&&(p.key=_.C0.ESC+(w?"f":"[1;5C"))):p.key=m?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(f.metaKey)break;u?(p.key=_.C0.ESC+"[1;"+(u+1)+"A",w||p.key!==_.C0.ESC+"[1;3A"||(p.key=_.C0.ESC+"[1;5A")):p.key=m?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(f.metaKey)break;u?(p.key=_.C0.ESC+"[1;"+(u+1)+"B",w||p.key!==_.C0.ESC+"[1;3B"||(p.key=_.C0.ESC+"[1;5B")):p.key=m?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(p.key=_.C0.ESC+"[2~");break;case 46:p.key=u?_.C0.ESC+"[3;"+(u+1)+"~":_.C0.ESC+"[3~";break;case 36:p.key=u?_.C0.ESC+"[1;"+(u+1)+"H":m?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:p.key=u?_.C0.ESC+"[1;"+(u+1)+"F":m?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:f.shiftKey?p.type=2:f.ctrlKey?p.key=_.C0.ESC+"[5;"+(u+1)+"~":p.key=_.C0.ESC+"[5~";break;case 34:f.shiftKey?p.type=3:f.ctrlKey?p.key=_.C0.ESC+"[6;"+(u+1)+"~":p.key=_.C0.ESC+"[6~";break;case 112:p.key=u?_.C0.ESC+"[1;"+(u+1)+"P":_.C0.ESC+"OP";break;case 113:p.key=u?_.C0.ESC+"[1;"+(u+1)+"Q":_.C0.ESC+"OQ";break;case 114:p.key=u?_.C0.ESC+"[1;"+(u+1)+"R":_.C0.ESC+"OR";break;case 115:p.key=u?_.C0.ESC+"[1;"+(u+1)+"S":_.C0.ESC+"OS";break;case 116:p.key=u?_.C0.ESC+"[15;"+(u+1)+"~":_.C0.ESC+"[15~";break;case 117:p.key=u?_.C0.ESC+"[17;"+(u+1)+"~":_.C0.ESC+"[17~";break;case 118:p.key=u?_.C0.ESC+"[18;"+(u+1)+"~":_.C0.ESC+"[18~";break;case 119:p.key=u?_.C0.ESC+"[19;"+(u+1)+"~":_.C0.ESC+"[19~";break;case 120:p.key=u?_.C0.ESC+"[20;"+(u+1)+"~":_.C0.ESC+"[20~";break;case 121:p.key=u?_.C0.ESC+"[21;"+(u+1)+"~":_.C0.ESC+"[21~";break;case 122:p.key=u?_.C0.ESC+"[23;"+(u+1)+"~":_.C0.ESC+"[23~";break;case 123:p.key=u?_.C0.ESC+"[24;"+(u+1)+"~":_.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(w&&!E||!f.altKey||f.metaKey)!w||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?p.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(p.key=_.C0.US),f.key==="@"&&(p.key=_.C0.NUL)):f.keyCode===65&&(p.type=1);else{const h=N[f.keyCode],a=h==null?void 0:h[f.shiftKey?1:0];if(a)p.key=_.C0.ESC+a;else if(f.keyCode>=65&&f.keyCode<=90){const o=f.ctrlKey?f.keyCode-64:f.keyCode+32;let v=String.fromCharCode(o);f.shiftKey&&(v=v.toUpperCase()),p.key=_.C0.ESC+v}else if(f.keyCode===32)p.key=_.C0.ESC+(f.ctrlKey?_.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let o=f.code.slice(3,4);f.shiftKey||(o=o.toLowerCase()),p.key=_.C0.ESC+o,p.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?p.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?p.key=_.C0.NUL:f.keyCode>=51&&f.keyCode<=55?p.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?p.key=_.C0.DEL:f.keyCode===219?p.key=_.C0.ESC:f.keyCode===220?p.key=_.C0.FS:f.keyCode===221&&(p.key=_.C0.GS)}return p}},482:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(b){return b>65535?(b-=65536,String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):String.fromCharCode(b)},c.utf32ToString=function(b,_=0,N=b.length){let f="";for(let m=_;m<N;++m){let w=b[m];w>65535?(w-=65536,f+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):f+=String.fromCharCode(w)}return f},c.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(b,_){const N=b.length;if(!N)return 0;let f=0,m=0;if(this._interim){const w=b.charCodeAt(m++);56320<=w&&w<=57343?_[f++]=1024*(this._interim-55296)+w-56320+65536:(_[f++]=this._interim,_[f++]=w),this._interim=0}for(let w=m;w<N;++w){const E=b.charCodeAt(w);if(55296<=E&&E<=56319){if(++w>=N)return this._interim=E,f;const p=b.charCodeAt(w);56320<=p&&p<=57343?_[f++]=1024*(E-55296)+p-56320+65536:(_[f++]=E,_[f++]=p)}else E!==65279&&(_[f++]=E)}return f}},c.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(b,_){const N=b.length;if(!N)return 0;let f,m,w,E,p=0,u=0,h=0;if(this.interim[0]){let v=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let C,D=0;for(;(C=63&this.interim[++D])&&D<4;)x<<=6,x|=C;const y=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,T=y-D;for(;h<T;){if(h>=N)return 0;if(C=b[h++],(192&C)!=128){h--,v=!0;break}this.interim[D++]=C,x<<=6,x|=63&C}v||(y===2?x<128?h--:_[p++]=x:y===3?x<2048||x>=55296&&x<=57343||x===65279||(_[p++]=x):x<65536||x>1114111||(_[p++]=x)),this.interim.fill(0)}const a=N-4;let o=h;for(;o<N;){for(;!(!(o<a)||128&(f=b[o])||128&(m=b[o+1])||128&(w=b[o+2])||128&(E=b[o+3]));)_[p++]=f,_[p++]=m,_[p++]=w,_[p++]=E,o+=4;if(f=b[o++],f<128)_[p++]=f;else if((224&f)==192){if(o>=N)return this.interim[0]=f,p;if(m=b[o++],(192&m)!=128){o--;continue}if(u=(31&f)<<6|63&m,u<128){o--;continue}_[p++]=u}else if((240&f)==224){if(o>=N)return this.interim[0]=f,p;if(m=b[o++],(192&m)!=128){o--;continue}if(o>=N)return this.interim[0]=f,this.interim[1]=m,p;if(w=b[o++],(192&w)!=128){o--;continue}if(u=(15&f)<<12|(63&m)<<6|63&w,u<2048||u>=55296&&u<=57343||u===65279)continue;_[p++]=u}else if((248&f)==240){if(o>=N)return this.interim[0]=f,p;if(m=b[o++],(192&m)!=128){o--;continue}if(o>=N)return this.interim[0]=f,this.interim[1]=m,p;if(w=b[o++],(192&w)!=128){o--;continue}if(o>=N)return this.interim[0]=f,this.interim[1]=m,this.interim[2]=w,p;if(E=b[o++],(192&E)!=128){o--;continue}if(u=(7&f)<<18|(63&m)<<12|(63&w)<<6|63&E,u<65536||u>1114111)continue;_[p++]=u}}return p}}},225:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;const _=b(1480),N=[[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]],f=[[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 m;c.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let w=0;w<N.length;++w)m.fill(0,N[w][0],N[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?m[w]:(function(E,p){let u,h=0,a=p.length-1;if(E<p[0][0]||E>p[a][1])return!1;for(;a>=h;)if(u=h+a>>1,E>p[u][1])h=u+1;else{if(!(E<p[u][0]))return!0;a=u-1}return!1})(w,f)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,E){let p=this.wcwidth(w),u=p===0&&E!==0;if(u){const h=_.UnicodeService.extractWidth(E);h===0?u=!1:h>p&&(p=h)}return _.UnicodeService.createPropertyValue(0,p,u)}}},5981:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;const _=b(8460),N=b(844);class f extends N.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let p;for(this._isSyncWriting=!0;p=this._writeBuffer.shift();){this._action(p);const u=this._callbacks.shift();u&&u()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,E){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+=w.length,this._writeBuffer.push(w),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(E)}_innerWrite(w=0,E=!0){const p=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const u=this._writeBuffer[this._bufferOffset],h=this._action(u,E);if(h){const o=v=>Date.now()-p>=12?setTimeout((()=>this._innerWrite(0,v))):this._innerWrite(p,v);return void h.catch((v=>(queueMicrotask((()=>{throw v})),Promise.resolve(!1)))).then(o)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=u.length,Date.now()-p>=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()}}c.WriteBuffer=f},5941:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.parseColor=void 0;const b=/^([\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})$/,_=/^[\da-f]+$/;function N(f,m){const w=f.toString(16),E=w.length<2?"0"+w:w;switch(m){case 4:return w[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}c.parseColor=function(f){if(!f)return;let m=f.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const w=b.exec(m);if(w){const E=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/E*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/E*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/E*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),_.exec(m)&&[3,6,9,12].includes(m.length))){const w=m.length/3,E=[0,0,0];for(let p=0;p<3;++p){const u=parseInt(m.slice(w*p,w*p+w),16);E[p]=w===1?u<<4:w===2?u:w===3?u>>4:u>>8}return E}},c.toRgbString=function(f,m=16){const[w,E,p]=f;return`rgb:${N(w,m)}/${N(E,m)}/${N(p,m)}`}},5770:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;const _=b(482),N=b(8742),f=b(5770),m=[];c.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(E,p){this._handlers[E]===void 0&&(this._handlers[E]=[]);const u=this._handlers[E];return u.push(p),{dispose:()=>{const h=u.indexOf(p);h!==-1&&u.splice(h,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(E,p){if(this.reset(),this._ident=E,this._active=this._handlers[E]||m,this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].hook(p);else this._handlerFb(this._ident,"HOOK",p)}put(E,p,u){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(E,p,u);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(E,p,u))}unhook(E,p=!0){if(this._active.length){let u=!1,h=this._active.length-1,a=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,u=p,a=this._stack.fallThrough,this._stack.paused=!1),!a&&u===!1){for(;h>=0&&(u=this._active[h].unhook(E),u!==!0);h--)if(u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,u;h--}for(;h>=0;h--)if(u=this._active[h].unhook(!1),u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,u}else this._handlerFb(this._ident,"UNHOOK",E);this._active=m,this._ident=0}};const w=new N.Params;w.addParam(0),c.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=w,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():w,this._data="",this._hitLimit=!1}put(E,p,u){this._hitLimit||(this._data+=(0,_.utf32ToString)(E,p,u),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let p=!1;if(this._hitLimit)p=!1;else if(E&&(p=this._handler(this._data,this._params),p instanceof Promise))return p.then((u=>(this._params=w,this._data="",this._hitLimit=!1,u)));return this._params=w,this._data="",this._hitLimit=!1,p}}},2015:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;const _=b(844),N=b(8742),f=b(6242),m=b(6351);class w{constructor(h){this.table=new Uint8Array(h)}setDefault(h,a){this.table.fill(h<<4|a)}add(h,a,o,v){this.table[a<<8|h]=o<<4|v}addMany(h,a,o,v){for(let x=0;x<h.length;x++)this.table[a<<8|h[x]]=o<<4|v}}c.TransitionTable=w;const E=160;c.VT500_TRANSITION_TABLE=(function(){const u=new w(4095),h=Array.apply(null,Array(256)).map(((D,y)=>y)),a=(D,y)=>h.slice(D,y),o=a(32,127),v=a(0,24);v.push(25),v.push.apply(v,a(28,32));const x=a(0,14);let C;for(C in u.setDefault(1,0),u.addMany(o,0,2,0),x)u.addMany([24,26,153,154],C,3,0),u.addMany(a(128,144),C,3,0),u.addMany(a(144,152),C,3,0),u.add(156,C,0,0),u.add(27,C,11,1),u.add(157,C,4,8),u.addMany([152,158,159],C,0,7),u.add(155,C,11,3),u.add(144,C,11,9);return u.addMany(v,0,3,0),u.addMany(v,1,3,1),u.add(127,1,0,1),u.addMany(v,8,0,8),u.addMany(v,3,3,3),u.add(127,3,0,3),u.addMany(v,4,3,4),u.add(127,4,0,4),u.addMany(v,6,3,6),u.addMany(v,5,3,5),u.add(127,5,0,5),u.addMany(v,2,3,2),u.add(127,2,0,2),u.add(93,1,4,8),u.addMany(o,8,5,8),u.add(127,8,5,8),u.addMany([156,27,24,26,7],8,6,0),u.addMany(a(28,32),8,0,8),u.addMany([88,94,95],1,0,7),u.addMany(o,7,0,7),u.addMany(v,7,0,7),u.add(156,7,0,0),u.add(127,7,0,7),u.add(91,1,11,3),u.addMany(a(64,127),3,7,0),u.addMany(a(48,60),3,8,4),u.addMany([60,61,62,63],3,9,4),u.addMany(a(48,60),4,8,4),u.addMany(a(64,127),4,7,0),u.addMany([60,61,62,63],4,0,6),u.addMany(a(32,64),6,0,6),u.add(127,6,0,6),u.addMany(a(64,127),6,0,0),u.addMany(a(32,48),3,9,5),u.addMany(a(32,48),5,9,5),u.addMany(a(48,64),5,0,6),u.addMany(a(64,127),5,7,0),u.addMany(a(32,48),4,9,5),u.addMany(a(32,48),1,9,2),u.addMany(a(32,48),2,9,2),u.addMany(a(48,127),2,10,0),u.addMany(a(48,80),1,10,0),u.addMany(a(81,88),1,10,0),u.addMany([89,90,92],1,10,0),u.addMany(a(96,127),1,10,0),u.add(80,1,11,9),u.addMany(v,9,0,9),u.add(127,9,0,9),u.addMany(a(28,32),9,0,9),u.addMany(a(32,48),9,9,12),u.addMany(a(48,60),9,8,10),u.addMany([60,61,62,63],9,9,10),u.addMany(v,11,0,11),u.addMany(a(32,128),11,0,11),u.addMany(a(28,32),11,0,11),u.addMany(v,10,0,10),u.add(127,10,0,10),u.addMany(a(28,32),10,0,10),u.addMany(a(48,60),10,8,10),u.addMany([60,61,62,63],10,0,11),u.addMany(a(32,48),10,9,12),u.addMany(v,12,0,12),u.add(127,12,0,12),u.addMany(a(28,32),12,0,12),u.addMany(a(32,48),12,9,12),u.addMany(a(48,64),12,0,11),u.addMany(a(64,127),12,12,13),u.addMany(a(64,127),10,12,13),u.addMany(a(64,127),9,12,13),u.addMany(v,13,13,13),u.addMany(o,13,13,13),u.add(127,13,0,13),u.addMany([27,156,24,26],13,14,0),u.add(E,0,2,0),u.add(E,8,5,8),u.add(E,6,0,6),u.add(E,11,0,11),u.add(E,13,13,13),u})();class p extends _.Disposable{constructor(h=c.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new N.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,o,v)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,o)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,_.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,a=[64,126]){let o=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(o=h.prefix.charCodeAt(0),o&&60>o||o>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let x=0;x<h.intermediates.length;++x){const C=h.intermediates.charCodeAt(x);if(32>C||C>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");o<<=8,o|=C}}if(h.final.length!==1)throw new Error("final must be a single byte");const v=h.final.charCodeAt(0);if(a[0]>v||v>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return o<<=8,o|=v,o}identToString(h){const a=[];for(;h;)a.push(String.fromCharCode(255&h)),h>>=8;return a.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,a){const o=this._identifier(h,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const v=this._escHandlers[o];return v.push(a),{dispose:()=>{const x=v.indexOf(a);x!==-1&&v.splice(x,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,a){this._executeHandlers[h.charCodeAt(0)]=a}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,a){const o=this._identifier(h);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const v=this._csiHandlers[o];return v.push(a),{dispose:()=>{const x=v.indexOf(a);x!==-1&&v.splice(x,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,a){return this._dcsParser.registerHandler(this._identifier(h),a)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,a){return this._oscParser.registerHandler(h,a)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,a,o,v,x){this._parseStack.state=h,this._parseStack.handlers=a,this._parseStack.handlerPos=o,this._parseStack.transition=v,this._parseStack.chunkPos=x}parse(h,a,o){let v,x=0,C=0,D=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,D=this._parseStack.chunkPos+1;else{if(o===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const y=this._parseStack.handlers;let T=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&T>-1){for(;T>=0&&(v=y[T](this._params),v!==!0);T--)if(v instanceof Promise)return this._parseStack.handlerPos=T,v}this._parseStack.handlers=[];break;case 4:if(o===!1&&T>-1){for(;T>=0&&(v=y[T](),v!==!0);T--)if(v instanceof Promise)return this._parseStack.handlerPos=T,v}this._parseStack.handlers=[];break;case 6:if(x=h[this._parseStack.chunkPos],v=this._dcsParser.unhook(x!==24&&x!==26,o),v)return v;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=h[this._parseStack.chunkPos],v=this._oscParser.end(x!==24&&x!==26,o),v)return v;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,D=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let y=D;y<a;++y){switch(x=h[y],C=this._transitions.table[this.currentState<<8|(x<160?x:E)],C>>4){case 2:for(let B=y+1;;++B){if(B>=a||(x=h[B])<32||x>126&&x<E){this._printHandler(h,y,B),y=B-1;break}if(++B>=a||(x=h[B])<32||x>126&&x<E){this._printHandler(h,y,B),y=B-1;break}if(++B>=a||(x=h[B])<32||x>126&&x<E){this._printHandler(h,y,B),y=B-1;break}if(++B>=a||(x=h[B])<32||x>126&&x<E){this._printHandler(h,y,B),y=B-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:y,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const T=this._csiHandlers[this._collect<<8|x];let R=T?T.length-1:-1;for(;R>=0&&(v=T[R](this._params),v!==!0);R--)if(v instanceof Promise)return this._preserveStack(3,T,R,C,y),v;R<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingJoinState=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++y<a&&(x=h[y])>47&&x<60);y--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const W=this._escHandlers[this._collect<<8|x];let I=W?W.length-1:-1;for(;I>=0&&(v=W[I](),v!==!0);I--)if(v instanceof Promise)return this._preserveStack(4,W,I,C,y),v;I<0&&this._escHandlerFb(this._collect<<8|x),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|x,this._params);break;case 13:for(let B=y+1;;++B)if(B>=a||(x=h[B])===24||x===26||x===27||x>127&&x<E){this._dcsParser.put(h,y,B),y=B-1;break}break;case 14:if(v=this._dcsParser.unhook(x!==24&&x!==26),v)return this._preserveStack(6,[],0,C,y),v;x===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let B=y+1;;B++)if(B>=a||(x=h[B])<32||x>127&&x<E){this._oscParser.put(h,y,B),y=B-1;break}break;case 6:if(v=this._oscParser.end(x!==24&&x!==26),v)return this._preserveStack(5,[],0,C,y),v;x===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&C}}}c.EscapeSequenceParser=p},6242:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;const _=b(5770),N=b(482),f=[];c.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,w){this._handlers[m]===void 0&&(this._handlers[m]=[]);const E=this._handlers[m];return E.push(w),{dispose:()=>{const p=E.indexOf(w);p!==-1&&E.splice(p,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,w,E){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(m,w,E);else this._handlerFb(this._id,"PUT",(0,N.utf32ToString)(m,w,E))}start(){this.reset(),this._state=1}put(m,w,E){if(this._state!==3){if(this._state===1)for(;w<E;){const p=m[w++];if(p===59){this._state=2,this._start();break}if(p<48||57<p)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+p-48}this._state===2&&E-w>0&&this._put(m,w,E)}}end(m,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,p=this._active.length-1,u=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,E=w,u=this._stack.fallThrough,this._stack.paused=!1),!u&&E===!1){for(;p>=0&&(E=this._active[p].end(m),E!==!0);p--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!1,E;p--}for(;p>=0;p--)if(E=this._active[p].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",m);this._active=f,this._id=-1,this._state=0}}},c.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,w,E){this._hitLimit||(this._data+=(0,N.utf32ToString)(m,w,E),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let w=!1;if(this._hitLimit)w=!1;else if(m&&(w=this._handler(this._data),w instanceof Promise))return w.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,w}}},8742:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;const b=2147483647;class _{static fromArray(f){const m=new _;if(!f.length)return m;for(let w=Array.isArray(f[0])?1:0;w<f.length;++w){const E=f[w];if(Array.isArray(E))for(let p=0;p<E.length;++p)m.addSubParam(E[p]);else m.addParam(E)}return m}constructor(f=32,m=32){if(this.maxLength=f,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new _(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let m=0;m<this.length;++m){f.push(this.params[m]);const w=this._subParamsIdx[m]>>8,E=255&this._subParamsIdx[m];E-w>0&&f.push(Array.prototype.slice.call(this._subParams,w,E))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>b?b:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>b?b:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const m=this._subParamsIdx[f]>>8,w=255&this._subParamsIdx[f];return w-m>0?this._subParams.subarray(m,w):null}getSubParamsAll(){const f={};for(let m=0;m<this.length;++m){const w=this._subParamsIdx[m]>>8,E=255&this._subParamsIdx[m];E-w>0&&(f[m]=this._subParams.slice(w,E))}return f}addDigit(f){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,E=w[m-1];w[m-1]=~E?Math.min(10*E+f,b):f}}c.Params=_},5741:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0,c.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let b=this._addons.length-1;b>=0;b--)this._addons[b].instance.dispose()}loadAddon(b,_){const N={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(N),_.dispose=()=>this._wrappedAddonDispose(N),_.activate(b)}_wrappedAddonDispose(b){if(b.isDisposed)return;let _=-1;for(let N=0;N<this._addons.length;N++)if(this._addons[N]===b){_=N;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");b.isDisposed=!0,b.dispose.apply(b.instance),this._addons.splice(_,1)}}},8771:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;const _=b(3785),N=b(511);c.BufferApiView=class{constructor(f,m){this._buffer=f,this.type=m}init(f){return this._buffer=f,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(f){const m=this._buffer.lines.get(f);if(m)return new _.BufferLineApiView(m)}getNullCell(){return new N.CellData}}},3785:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;const _=b(511);c.BufferLineApiView=class{constructor(N){this._line=N}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(N,f){if(!(N<0||N>=this._line.length))return f?(this._line.loadCell(N,f),f):this._line.loadCell(N,new _.CellData)}translateToString(N,f,m){return this._line.translateToString(N,f,m)}}},8285:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;const _=b(8771),N=b(8460),f=b(844);class m extends f.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new N.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.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)}}c.BufferNamespaceApi=m},7975:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0,c.ParserApi=class{constructor(b){this._core=b}registerCsiHandler(b,_){return this._core.registerCsiHandler(b,(N=>_(N.toArray())))}addCsiHandler(b,_){return this.registerCsiHandler(b,_)}registerDcsHandler(b,_){return this._core.registerDcsHandler(b,((N,f)=>_(N,f.toArray())))}addDcsHandler(b,_){return this.registerDcsHandler(b,_)}registerEscHandler(b,_){return this._core.registerEscHandler(b,_)}addEscHandler(b,_){return this.registerEscHandler(b,_)}registerOscHandler(b,_){return this._core.registerOscHandler(b,_)}addOscHandler(b,_){return this.registerOscHandler(b,_)}}},7090:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0,c.UnicodeApi=class{constructor(b){this._core=b}register(b){this._core.unicodeService.register(b)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(b){this._core.unicodeService.activeVersion=b}}},744:function($,c,b){var _=this&&this.__decorate||function(u,h,a,o){var v,x=arguments.length,C=x<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(u,h,a,o);else for(var D=u.length-1;D>=0;D--)(v=u[D])&&(C=(x<3?v(C):x>3?v(h,a,C):v(h,a))||C);return x>3&&C&&Object.defineProperty(h,a,C),C},N=this&&this.__param||function(u,h){return function(a,o){h(a,o,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;const f=b(8460),m=b(844),w=b(5295),E=b(2585);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;let p=c.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(u){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(u.rawOptions.cols||0,c.MINIMUM_COLS),this.rows=Math.max(u.rawOptions.rows||0,c.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(u,this))}resize(u,h){this.cols=u,this.rows=h,this.buffers.resize(u,h),this._onResize.fire({cols:u,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(u,h=!1){const a=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===u.fg&&o.getBg(0)===u.bg||(o=a.getBlankLine(u,h),this._cachedBlankLine=o),o.isWrapped=h;const v=a.ybase+a.scrollTop,x=a.ybase+a.scrollBottom;if(a.scrollTop===0){const C=a.lines.isFull;x===a.lines.length-1?C?a.lines.recycle().copyFrom(o):a.lines.push(o.clone()):a.lines.splice(x+1,0,o.clone()),C?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const C=x-v+1;a.lines.shiftElements(v+1,C-1,-1),a.lines.set(x,o.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(u,h,a){const o=this.buffer;if(u<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else u+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const v=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+u,o.ybase),0),v!==o.ydisp&&(h||this._onScroll.fire(o.ydisp))}};c.BufferService=p=_([N(0,E.IOptionsService)],p)},7994:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0,c.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(b){this.glevel=b,this.charset=this._charsets[b]}setgCharset(b,_){this._charsets[b]=_,this.glevel===b&&(this.charset=_)}}},1753:function($,c,b){var _=this&&this.__decorate||function(o,v,x,C){var D,y=arguments.length,T=y<3?v:C===null?C=Object.getOwnPropertyDescriptor(v,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(o,v,x,C);else for(var R=o.length-1;R>=0;R--)(D=o[R])&&(T=(y<3?D(T):y>3?D(v,x,T):D(v,x))||T);return y>3&&T&&Object.defineProperty(v,x,T),T},N=this&&this.__param||function(o,v){return function(x,C){v(x,C,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;const f=b(2585),m=b(8460),w=b(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:o=>o.button!==4&&o.action===1&&(o.ctrl=!1,o.alt=!1,o.shift=!1,!0)},VT200:{events:19,restrict:o=>o.action!==32},DRAG:{events:23,restrict:o=>o.action!==32||o.button!==3},ANY:{events:31,restrict:o=>!0}};function p(o,v){let x=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(x|=64,x|=o.action):(x|=3&o.button,4&o.button&&(x|=64),8&o.button&&(x|=128),o.action===32?x|=32:o.action!==0||v||(x|=3)),x}const u=String.fromCharCode,h={DEFAULT:o=>{const v=[p(o,!1)+32,o.col+32,o.row+32];return v[0]>255||v[1]>255||v[2]>255?"":`\x1B[M${u(v[0])}${u(v[1])}${u(v[2])}`},SGR:o=>{const v=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${p(o,!0)};${o.col};${o.row}${v}`},SGR_PIXELS:o=>{const v=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${p(o,!0)};${o.x};${o.y}${v}`}};let a=c.CoreMouseService=class extends w.Disposable{constructor(o,v){super(),this._bufferService=o,this._coreService=v,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const x of Object.keys(E))this.addProtocol(x,E[x]);for(const x of Object.keys(h))this.addEncoding(x,h[x]);this.reset()}addProtocol(o,v){this._protocols[o]=v}addEncoding(o,v){this._encodings[o]=v}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(o){if(!this._protocols[o])throw new Error(`unknown protocol "${o}"`);this._activeProtocol=o,this._onProtocolChange.fire(this._protocols[o].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(o){if(!this._encodings[o])throw new Error(`unknown encoding "${o}"`);this._activeEncoding=o}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(o){if(o.col<0||o.col>=this._bufferService.cols||o.row<0||o.row>=this._bufferService.rows||o.button===4&&o.action===32||o.button===3&&o.action!==32||o.button!==4&&(o.action===2||o.action===3)||(o.col++,o.row++,o.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,o,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(o))return!1;const v=this._encodings[this._activeEncoding](o);return v&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(v):this._coreService.triggerDataEvent(v,!0)),this._lastEvent=o,!0}explainEvents(o){return{down:!!(1&o),up:!!(2&o),drag:!!(4&o),move:!!(8&o),wheel:!!(16&o)}}_equalEvents(o,v,x){if(x){if(o.x!==v.x||o.y!==v.y)return!1}else if(o.col!==v.col||o.row!==v.row)return!1;return o.button===v.button&&o.action===v.action&&o.ctrl===v.ctrl&&o.alt===v.alt&&o.shift===v.shift}};c.CoreMouseService=a=_([N(0,f.IBufferService),N(1,f.ICoreService)],a)},6975:function($,c,b){var _=this&&this.__decorate||function(a,o,v,x){var C,D=arguments.length,y=D<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(a,o,v,x);else for(var T=a.length-1;T>=0;T--)(C=a[T])&&(y=(D<3?C(y):D>3?C(o,v,y):C(o,v))||y);return D>3&&y&&Object.defineProperty(o,v,y),y},N=this&&this.__param||function(a,o){return function(v,x){o(v,x,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;const f=b(1439),m=b(8460),w=b(844),E=b(2585),p=Object.freeze({insertMode:!1}),u=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=c.CoreService=class extends w.Disposable{constructor(a,o,v){super(),this._bufferService=a,this._logService=o,this._optionsService=v,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(p),this.decPrivateModes=(0,f.clone)(u)}reset(){this.modes=(0,f.clone)(p),this.decPrivateModes=(0,f.clone)(u)}triggerDataEvent(a,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const v=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&v.ybase!==v.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(a))}};c.CoreService=h=_([N(0,E.IBufferService),N(1,E.ILogService),N(2,E.IOptionsService)],h)},9074:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DecorationService=void 0;const _=b(8055),N=b(8460),f=b(844),m=b(6106);let w=0,E=0;class p extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((a=>a==null?void 0:a.marker.line)),this._onDecorationRegistered=this.register(new N.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new N.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const o=new u(a);if(o){const v=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),v.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,o,v){let x=0,C=0;for(const D of this._decorations.getKeyIterator(o))x=D.options.x??0,C=x+(D.options.width??1),a>=x&&a<C&&(!v||(D.options.layer??"bottom")===v)&&(yield D)}forEachDecorationAtCell(a,o,v,x){this._decorations.forEachByKey(o,(C=>{w=C.options.x??0,E=w+(C.options.width??1),a>=w&&a<E&&(!v||(C.options.layer??"bottom")===v)&&x(C)}))}}c.DecorationService=p;class u extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(a){super(),this.options=a,this.onRenderEmitter=this.register(new N.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new N.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;const _=b(2585),N=b(8343);class f{constructor(...w){this._entries=new Map;for(const[E,p]of w)this.set(E,p)}set(w,E){const p=this._entries.get(w);return this._entries.set(w,E),p}forEach(w){for(const[E,p]of this._entries.entries())w(E,p)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}c.ServiceCollection=f,c.InstantiationService=class{constructor(){this._services=new f,this._services.set(_.IInstantiationService,this)}setService(m,w){this._services.set(m,w)}getService(m){return this._services.get(m)}createInstance(m,...w){const E=(0,N.getServiceDependencies)(m).sort(((h,a)=>h.index-a.index)),p=[];for(const h of E){const a=this._services.get(h.id);if(!a)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${h.id}.`);p.push(a)}const u=E.length>0?E[0].index:w.length;if(w.length!==u)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${u+1} conflicts with ${w.length} static arguments`);return new m(...w,...p)}}},7866:function($,c,b){var _=this&&this.__decorate||function(u,h,a,o){var v,x=arguments.length,C=x<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(u,h,a,o);else for(var D=u.length-1;D>=0;D--)(v=u[D])&&(C=(x<3?v(C):x>3?v(h,a,C):v(h,a))||C);return x>3&&C&&Object.defineProperty(h,a,C),C},N=this&&this.__param||function(u,h){return function(a,o){h(a,o,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.traceCall=c.setTraceLogger=c.LogService=void 0;const f=b(844),m=b(2585),w={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let E,p=c.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(u){super(),this._optionsService=u,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(u){for(let h=0;h<u.length;h++)typeof u[h]=="function"&&(u[h]=u[h]())}_log(u,h,a){this._evalLazyOptionalParams(a),u.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...a)}trace(u,...h){var a;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.trace.bind(this._optionsService.options.logger))??console.log,u,h)}debug(u,...h){var a;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.debug.bind(this._optionsService.options.logger))??console.log,u,h)}info(u,...h){var a;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.info.bind(this._optionsService.options.logger))??console.info,u,h)}warn(u,...h){var a;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.warn.bind(this._optionsService.options.logger))??console.warn,u,h)}error(u,...h){var a;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.error.bind(this._optionsService.options.logger))??console.error,u,h)}};c.LogService=p=_([N(0,m.IOptionsService)],p),c.setTraceLogger=function(u){E=u},c.traceCall=function(u,h,a){if(typeof a.value!="function")throw new Error("not supported");const o=a.value;a.value=function(...v){if(E.logLevel!==m.LogLevelEnum.TRACE)return o.apply(this,v);E.trace(`GlyphRenderer#${o.name}(${v.map((C=>JSON.stringify(C))).join(", ")})`);const x=o.apply(this,v);return E.trace(`GlyphRenderer#${o.name} return`,x),x}}},7302:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=void 0;const _=b(8460),N=b(844),f=b(6114);c.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:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends N.Disposable{constructor(p){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const u={...c.DEFAULT_OPTIONS};for(const h in p)if(h in u)try{const a=p[h];u[h]=this._sanitizeAndValidateOption(h,a)}catch(a){console.error(a)}this.rawOptions=u,this.options={...u},this._setupOptions(),this.register((0,N.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(p,u){return this.onOptionChange((h=>{h===p&&u(this.rawOptions[p])}))}onMultipleOptionChange(p,u){return this.onOptionChange((h=>{p.indexOf(h)!==-1&&u()}))}_setupOptions(){const p=h=>{if(!(h in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},u=(h,a)=>{if(!(h in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);a=this._sanitizeAndValidateOption(h,a),this.rawOptions[h]!==a&&(this.rawOptions[h]=a,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const a={get:p.bind(this,h),set:u.bind(this,h)};Object.defineProperty(this.options,h,a)}}_sanitizeAndValidateOption(p,u){switch(p){case"cursorStyle":if(u||(u=c.DEFAULT_OPTIONS[p]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(u))throw new Error(`"${u}" is not a valid value for ${p}`);break;case"wordSeparator":u||(u=c.DEFAULT_OPTIONS[p]);break;case"fontWeight":case"fontWeightBold":if(typeof u=="number"&&1<=u&&u<=1e3)break;u=m.includes(u)?u:c.DEFAULT_OPTIONS[p];break;case"cursorWidth":u=Math.floor(u);case"lineHeight":case"tabStopWidth":if(u<1)throw new Error(`${p} cannot be less than 1, value: ${u}`);break;case"minimumContrastRatio":u=Math.max(1,Math.min(21,Math.round(10*u)/10));break;case"scrollback":if((u=Math.min(u,4294967295))<0)throw new Error(`${p} cannot be less than 0, value: ${u}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(u<=0)throw new Error(`${p} cannot be less than or equal to 0, value: ${u}`);break;case"rows":case"cols":if(!u&&u!==0)throw new Error(`${p} must be numeric, value: ${u}`);break;case"windowsPty":u=u??{}}return u}}c.OptionsService=w},2660:function($,c,b){var _=this&&this.__decorate||function(w,E,p,u){var h,a=arguments.length,o=a<3?E:u===null?u=Object.getOwnPropertyDescriptor(E,p):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(w,E,p,u);else for(var v=w.length-1;v>=0;v--)(h=w[v])&&(o=(a<3?h(o):a>3?h(E,p,o):h(E,p))||o);return a>3&&o&&Object.defineProperty(E,p,o),o},N=this&&this.__param||function(w,E){return function(p,u){E(p,u,w)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkService=void 0;const f=b(2585);let m=c.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const E=this._bufferService.buffer;if(w.id===void 0){const v=E.addMarker(E.ybase+E.y),x={data:w,id:this._nextId++,lines:[v]};return v.onDispose((()=>this._removeMarkerFromLink(x,v))),this._dataByLinkId.set(x.id,x),x.id}const p=w,u=this._getEntryIdKey(p),h=this._entriesWithId.get(u);if(h)return this.addLineToLink(h.id,E.ybase+E.y),h.id;const a=E.addMarker(E.ybase+E.y),o={id:this._nextId++,key:this._getEntryIdKey(p),data:p,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(o,a))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(w,E){const p=this._dataByLinkId.get(w);if(p&&p.lines.every((u=>u.line!==E))){const u=this._bufferService.buffer.addMarker(E);p.lines.push(u),u.onDispose((()=>this._removeMarkerFromLink(p,u)))}}getLinkData(w){var E;return(E=this._dataByLinkId.get(w))==null?void 0:E.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,E){const p=w.lines.indexOf(E);p!==-1&&(w.lines.splice(p,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};c.OscLinkService=m=_([N(0,f.IBufferService)],m)},8343:($,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0;const b="di$target",_="di$dependencies";c.serviceRegistry=new Map,c.getServiceDependencies=function(N){return N[_]||[]},c.createDecorator=function(N){if(c.serviceRegistry.has(N))return c.serviceRegistry.get(N);const f=function(m,w,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(p,u,h){u[b]===u?u[_].push({id:p,index:h}):(u[_]=[{id:p,index:h}],u[b]=u)})(f,m,E)};return f.toString=()=>N,c.serviceRegistry.set(N,f),f}},2585:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IDecorationService=c.IUnicodeService=c.IOscLinkService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;const _=b(8343);var N;c.IBufferService=(0,_.createDecorator)("BufferService"),c.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),c.ICoreService=(0,_.createDecorator)("CoreService"),c.ICharsetService=(0,_.createDecorator)("CharsetService"),c.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(N||(c.LogLevelEnum=N={})),c.ILogService=(0,_.createDecorator)("LogService"),c.IOptionsService=(0,_.createDecorator)("OptionsService"),c.IOscLinkService=(0,_.createDecorator)("OscLinkService"),c.IUnicodeService=(0,_.createDecorator)("UnicodeService"),c.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:($,c,b)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;const _=b(8460),N=b(225);class f{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,E,p=!1){return(16777215&w)<<3|(3&E)<<1|(p?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const w=new N.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let E=0,p=0;const u=w.length;for(let h=0;h<u;++h){let a=w.charCodeAt(h);if(55296<=a&&a<=56319){if(++h>=u)return E+this.wcwidth(a);const x=w.charCodeAt(h);56320<=x&&x<=57343?a=1024*(a-55296)+x-56320+65536:E+=this.wcwidth(x)}const o=this.charProperties(a,p);let v=f.extractWidth(o);f.extractShouldJoin(o)&&(v-=f.extractWidth(p)),E+=v,p=o}return E}charProperties(w,E){return this._activeProvider.charProperties(w,E)}}c.UnicodeService=f}},V={};function X($){var c=V[$];if(c!==void 0)return c.exports;var b=V[$]={exports:{}};return U[$].call(b.exports,b,b.exports,X),b.exports}var ee={};return(()=>{var $=ee;Object.defineProperty($,"__esModule",{value:!0}),$.Terminal=void 0;const c=X(9042),b=X(3236),_=X(844),N=X(5741),f=X(8285),m=X(7975),w=X(7090),E=["cols","rows"];class p extends _.Disposable{constructor(h){super(),this._core=this.register(new b.Terminal(h)),this._addonManager=this.register(new N.AddonManager),this._publicOptions={...this._core.options};const a=v=>this._core.options[v],o=(v,x)=>{this._checkReadonlyOptions(v),this._core.options[v]=x};for(const v in this._core.options){const x={get:a.bind(this,v),set:o.bind(this,v)};Object.defineProperty(this._publicOptions,v,x)}}_checkReadonlyOptions(h){if(E.includes(h))throw new Error(`Option "${h}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.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 f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const a in h)this._publicOptions[a]=h[a]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,a=!0){this._core.input(h,a)}resize(h,a){this._verifyIntegers(h,a),this._core.resize(h,a)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,a,o){this._verifyIntegers(h,a,o),this._core.select(h,a,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,a){this._verifyIntegers(h,a),this._core.selectLines(h,a)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,a){this._core.write(h,a)}writeln(h,a){this._core.write(h),this._core.write(`\r
|
|
283
|
+
`,a)}paste(h){this._core.paste(h)}refresh(h,a){this._verifyIntegers(h,a),this._core.refresh(h,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return c}_verifyIntegers(...h){for(const a of h)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const a of h)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}$.Terminal=p})(),ee})()))})(Um)),Um.exports}var bE=pE(),zm={exports:{}},Pw;function gE(){return Pw||(Pw=1,(function(S,k){(function(U,V){S.exports=V()})(self,(()=>(()=>{var U={};return(()=>{var V=U;Object.defineProperty(V,"__esModule",{value:!0}),V.FitAddon=void 0,V.FitAddon=class{activate(X){this._terminal=X}dispose(){}fit(){const X=this.proposeDimensions();if(!X||!this._terminal||isNaN(X.cols)||isNaN(X.rows))return;const ee=this._terminal._core;this._terminal.rows===X.rows&&this._terminal.cols===X.cols||(ee._renderService.clear(),this._terminal.resize(X.cols,X.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const X=this._terminal._core,ee=X._renderService.dimensions;if(ee.css.cell.width===0||ee.css.cell.height===0)return;const $=this._terminal.options.scrollback===0?0:X.viewport.scrollBarWidth,c=window.getComputedStyle(this._terminal.element.parentElement),b=parseInt(c.getPropertyValue("height")),_=Math.max(0,parseInt(c.getPropertyValue("width"))),N=window.getComputedStyle(this._terminal.element),f=b-(parseInt(N.getPropertyValue("padding-top"))+parseInt(N.getPropertyValue("padding-bottom"))),m=_-(parseInt(N.getPropertyValue("padding-right"))+parseInt(N.getPropertyValue("padding-left")))-$;return{cols:Math.max(2,Math.floor(m/ee.css.cell.width)),rows:Math.max(1,Math.floor(f/ee.css.cell.height))}}}})(),U})()))})(zm)),zm.exports}var vE=gE();const Fw=20,Gw=5,Yw=6,_E=1200,wE=2e3,Gu=4e3,ws=new TextEncoder,yE=new TextDecoder;function SE(S){return/\/api\/pty\/agents\//.test(S)?["pty-ws.v1"]:void 0}const Xw=S=>{try{const k=atob(S),U=new Uint8Array(k.length);for(let V=0;V<k.length;V++)U[V]=k.charCodeAt(V);return U}catch{return new Uint8Array(0)}},Qw=S=>{const k=ws.encode(S);let U="";for(let V=0;V<k.length;V++)U+=String.fromCharCode(k[V]);return btoa(U)};function Kw(S){if(!S)return null;const k=/\/agents\/([^/]+)\/sessions\/([^/]+)\/attach/;try{const V=new URL(S).pathname.match(k);return V?{instanceId:decodeURIComponent(V[1]),sessionId:decodeURIComponent(V[2])}:null}catch{const U=S.match(k);return U?{instanceId:decodeURIComponent(U[1]),sessionId:decodeURIComponent(U[2])}:null}}function NE(S){return S.replace(/\x1b\][\s\S]*?(?:\x07|\x1b\\)/g,"").replace(/\x1b\[\?[0-9;]*[cnhl]/g,"").replace(/\x1b\[[0-9;]*[Rn]/g,"")}function EE(S){return S.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[()][A-Za-z0-9]/g,"")}function xE(S){const U=EE(S).replace(/\r/g,`
|
|
284
|
+
`).split(`
|
|
285
|
+
`).map(ee=>ee.trim()).filter(Boolean).slice(-24),V=U.join(`
|
|
286
|
+
`);return[/Enter to select\b/i,/(?:↑|up)\/(?:↓|down)|arrow keys|navigate/i,/\bEsc to cancel\b/i,/\b(?:y\/n|Y\/n|y\/N|\[y\/N\]|\[Y\/n\])\b/,/\b(?:choose|select|pick) (?:one|an option|a number)\b/i,/\?$/].some(ee=>ee.test(V))?U.slice(-10).join(`
|
|
287
|
+
`).slice(0,900):""}function Zw(S,k){return S?`${S.instanceId}:${S.sessionId}`:`url:${k}`}class CE{constructor(k,U,V,X,ee){Gt(this,"term");Gt(this,"fit");Gt(this,"wrapper");Gt(this,"url");Gt(this,"target");Gt(this,"role",null);Gt(this,"attached",!1);Gt(this,"ws",null);Gt(this,"lastSeq",0);Gt(this,"connId",0);Gt(this,"closedByUser",!1);Gt(this,"gotFrame",!1);Gt(this,"retries",0);Gt(this,"outputTail","");Gt(this,"ro",null);Gt(this,"retryTimer",null);Gt(this,"noticeTimer",null);Gt(this,"deadlineTimer",null);Gt(this,"disposed",!1);this.onChange=V,this.onPrompt=X,this.isActive=ee,this.url=k,this.target=U,this.term=new bE.Terminal({convertEol:!1,scrollback:5e3,cursorBlink:!1,disableStdin:!0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:13,theme:{background:"#0a0c10",foreground:"#cdd3de"}}),this.fit=new vE.FitAddon,this.term.loadAddon(this.fit),this.wrapper=document.createElement("div"),this.wrapper.className="pty-surface",this.wrapper.style.width="100%",this.wrapper.style.height="100%";try{this.term.open(this.wrapper)}catch{}this.term.onData($=>{if(this.role!=="controller")return;const c=NE($);c&&(this.isActive()&&this.onPrompt(null),this.send("pty.session_input",{data:Qw(c)}))}),this.term.onResize(({cols:$,rows:c})=>{this.role==="controller"&&($<Fw||c<Gw||this.send("pty.session_resize",{cols:$,rows:c}))})}fitSafe(){try{this.fit.fit()}catch{}}write(k){const U=yE.decode(k,{stream:!0});if(U){this.outputTail=(this.outputTail+U).slice(-6e3);const V=xE(this.outputTail);V&&this.isActive()&&this.onPrompt({needed:!0,prompt:V,since:new Date().toISOString(),source:"pty"})}try{this.term.write(k)}catch{}}send(k,U){var V;try{(V=this.ws)==null||V.send(JSON.stringify(U===void 0?{op:k}:{op:k,payload:U}))}catch{}}sendOn(k,U,V){try{k.send(JSON.stringify(V===void 0?{op:U}:{op:U,payload:V}))}catch{}}clearTimers(){this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null),this.noticeTimer&&(clearTimeout(this.noticeTimer),this.noticeTimer=null),this.deadlineTimer&&(clearTimeout(this.deadlineTimer),this.deadlineTimer=null)}clearFrameTimers(){this.noticeTimer&&(clearTimeout(this.noticeTimer),this.noticeTimer=null),this.deadlineTimer&&(clearTimeout(this.deadlineTimer),this.deadlineTimer=null)}setVisible(k){this.wrapper.style.display=k?"block":"none",k&&(this.fitSafe(),requestAnimationFrame(()=>this.fitSafe()))}onContainerResize(){this.wrapper.style.display!=="none"&&this.fitSafe()}connect(k,U,V){var $;this.clearTimers();const X=++this.connId;if(this.closedByUser=!1,this.retries=0,this.gotFrame=!1,($=this.ws)==null||$.close(),!U){this.lastSeq=0,this.outputTail="";try{this.term.reset()}catch{}}this.role=null,this.term.options.disableStdin=!0,this.attached=!1,this.isActive()&&this.onPrompt(null),this.onChange();const ee=()=>{if(this.connId!==X||this.closedByUser||this.disposed)return;const c=new WebSocket(this.url,SE(this.url));this.ws=c;let b=!1;c.addEventListener("open",()=>{this.connId!==X||this.ws!==c||(this.attached=!0,this.onChange(),this.clearFrameTimers(),this.noticeTimer=setTimeout(()=>{this.connId!==X||this.ws!==c||this.closedByUser||this.gotFrame||this.write(ws.encode(`\r
|
|
288
|
+
[attached — no output yet]\r
|
|
289
|
+
`))},wE),this.deadlineTimer=setTimeout(()=>{if(!(this.connId!==X||this.ws!==c||this.closedByUser||this.gotFrame)){if(this.role==="controller"){this.write(ws.encode(`\r
|
|
290
|
+
[attached — no output after ${Math.round(Gu/1e3)}s; requesting repaint]\r
|
|
291
|
+
`)),this.sendOn(c,"pty.request_keyframe");return}if(this.retries>=Yw){this.write(ws.encode(`\r
|
|
292
|
+
[attached — no output after ${Math.round(Gu/1e3)}s]\r
|
|
293
|
+
`));return}this.retries+=1,this.write(ws.encode(`\r
|
|
294
|
+
[attached — no output after ${Math.round(Gu/1e3)}s; requesting repaint]\r
|
|
295
|
+
`));try{c.close()}catch{}ee()}},Gu))});const _=()=>{if(!(this.connId!==X||this.ws!==c||b)&&(b=!0,this.clearFrameTimers(),this.role=null,this.attached=!1,this.onChange(),!(this.closedByUser||this.gotFrame))){if(this.retries<Yw){this.retries+=1,this.retries===1&&this.write(ws.encode(`\r
|
|
296
|
+
[waiting for session…]\r
|
|
297
|
+
`)),this.retryTimer=setTimeout(ee,_E);return}this.write(ws.encode(`\r
|
|
298
|
+
[connection error — session did not become ready]\r
|
|
299
|
+
`))}};c.addEventListener("close",_),c.addEventListener("error",_),c.addEventListener("message",N=>{var m,w,E,p;if(this.connId!==X||this.ws!==c)return;let f;try{f=JSON.parse(N.data)}catch{return}switch(f.op){case"binding_hello":{const u=V??(U?this.lastSeq:0);this.sendOn(c,"pty.join_session",{role:k,replay_from:u}),k==="controller"&&this.term.cols>=Fw&&this.term.rows>=Gw&&this.sendOn(c,"pty.session_resize",{cols:this.term.cols,rows:this.term.rows});break}case"role_assigned":{const u=((m=f.payload)==null?void 0:m.role)??null;this.role=u,this.term.options.disableStdin=u!=="controller",this.onChange(),requestAnimationFrame(()=>this.fitSafe());break}case"output":this.clearFrameTimers(),this.gotFrame=!0,this.retries=0,f.seq&&(this.lastSeq=Math.max(this.lastSeq,f.seq)),this.write(Xw(((w=f.payload)==null?void 0:w.data)??""));break;case"keyframe":this.clearFrameTimers(),this.gotFrame=!0,this.retries=0;for(const u of((E=f.payload)==null?void 0:E.frames)??[])u.seq&&(this.lastSeq=Math.max(this.lastSeq,u.seq)),this.write(Xw(u.payload.data));break;case"error":this.write(ws.encode(`\r
|
|
300
|
+
[${((p=f.payload)==null?void 0:p.code)??"error"}]\r
|
|
301
|
+
`));break}})};ee()}requestKeyframe(){this.send("pty.request_keyframe")}sendInput(k){return!this.ws||this.role!=="controller"||!k?!1:(this.isActive()&&this.onPrompt(null),this.send("pty.session_input",{data:Qw(k+`\r
|
|
302
|
+
`)}),!0)}close(){var k;this.closedByUser=!0,this.connId+=1,this.role=null,this.attached=!1,this.term.options.disableStdin=!0,this.clearTimers(),(k=this.ws)==null||k.close(),this.ws=null,this.onChange()}dispose(){var k;this.disposed=!0,this.close();try{(k=this.ro)==null||k.disconnect()}catch{}try{this.term.dispose()}catch{}try{this.wrapper.remove()}catch{}}observe(k){this.ro||typeof ResizeObserver>"u"||(this.ro=new ResizeObserver(()=>this.onContainerResize()),this.ro.observe(k))}}function AE(){const S=J.useRef(new Map),k=J.useRef(""),U=J.useRef(null),[V,X]=J.useState({attached:!1,role:null,url:null,target:null}),[ee,$]=J.useState({needed:!1,prompt:"",since:null,source:"pty"}),c=()=>S.current.get(k.current)??null,b=J.useCallback(()=>{const a=S.current.get(k.current);if(!a){X({attached:!1,role:null,url:null,target:null});return}X({attached:a.attached,role:a.role,url:a.url,target:a.target})},[]),_=J.useCallback(a=>{$(a??{needed:!1,prompt:"",since:null,source:"pty"})},[]),N=J.useCallback(a=>{k.current=a;for(const[o,v]of S.current)v.setVisible(o===a);_(null),b()},[_,b]),f=J.useCallback((a,o=!1,v="observer",x)=>{const C=x??Kw(a),D=Zw(C,a);let y=S.current.get(D);y?(y.url=a,(o||v==="controller"&&y.role!=="controller")&&y.connect(v,o)):(y=new CE(a,C,b,_,()=>k.current===D),S.current.set(D,y),U.current&&(U.current.appendChild(y.wrapper),y.observe(U.current)),y.connect(v,o)),N(D)},[N,_,b]),m=J.useCallback(()=>{const a=c();if(!a)return;const o=k.current;a.dispose(),S.current.delete(o);const v=S.current.keys().next();v.done?(k.current="",_(null),b()):N(v.value)},[N,_,b]),w=J.useCallback((a,o,v)=>{const x=v??Kw(a),C=S.current.get(Zw(x,a)),D=o??(C==null?void 0:C.role)??"observer";f(a,!0,D,x)},[f]),E=J.useCallback(()=>{var a;(a=c())==null||a.requestKeyframe()},[]),p=J.useCallback((a,o)=>{const v=c();if(!v)return!1;if(o&&(!v.target||v.target.instanceId!==o.instanceId||v.target.sessionId!==o.sessionId)){try{v.term.write(ws.encode(`\r
|
|
303
|
+
[inject refused: target ${o.instanceId}:${o.sessionId} does not match attached session ${v.target?`${v.target.instanceId}:${v.target.sessionId}`:"none"}]\r
|
|
304
|
+
`))}catch{}return!1}return v.sendInput(a)},[]),u=J.useCallback(a=>{if(!a){U.current=null;return}U.current=a;for(const[o,v]of S.current)v.wrapper.parentElement!==a&&a.appendChild(v.wrapper),v.observe(a),v.setVisible(o===k.current)},[]);J.useEffect(()=>{const a=()=>{for(const o of S.current.values())o.onContainerResize()};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);const h=S.current;return J.useEffect(()=>()=>{for(const a of h.values())a.dispose();h.clear()},[h]),{state:V,responseNeeded:ee,attach:f,detach:m,replay:w,requestKeyframe:E,sendInput:p,openTerminal:u,isController:V.role==="controller"}}let uy="";function DE(){if(typeof window>"u")return null;const S=new URLSearchParams(window.location.hash.replace(/^#/,"")),k=S.get("bootstrap")||"";return k?{nonce:k,audience:S.get("audience")||"browser",next:S.get("next")||""}:null}async function kE(){const S=DE(),k=S?await fetch("/bootstrap/session",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({nonce:S.nonce,audience:S.audience})}):await fetch("/bootstrap/session",{credentials:"same-origin"});if(!k.ok)throw new Error(`Cockpit session bootstrap failed (${k.status})`);const U=await k.json();if(!U.csrf)throw new Error("Cockpit session bootstrap returned no CSRF binding");uy=U.csrf,S&&typeof window<"u"&&window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}${S.next?`#${S.next}`:""}`)}let Jw;function hy(){return Jw??(Jw=kE()),Jw}async function Gm(S,k={}){await hy();const U=String(k.method||"GET").toUpperCase(),V=new Headers(k.headers);return["GET","HEAD","OPTIONS"].includes(U)||V.set("x-cockpit-csrf",uy),fetch(S,{...k,credentials:"same-origin",headers:V})}async function We(S,k={}){const U=await Gm(S,k);if(!U.ok){const V=await U.clone().json().catch(()=>null);throw(V==null?void 0:V.error)==="managed_docker_raw_credentials_rejected"?new Error(`${V.message} ${V.recovery}`.trim()):new Error(`${S} → ${U.status}`)}return U.status===204?{}:U.json()}const $e=S=>S&&S.length>12?S.slice(0,8)+"…":S;function lr(S){const k=String(S??"").toLowerCase();return k==="host"?"host":k==="container"||k==="docker"?"container":k==="vm"||k==="qemu"||k==="kvm"?"vm":"other"}function dy(S,k){return S==="agent"?`@${k}`:S==="command"?`/${k}`:k}const ey=[[50,10],[72,16],[88,34],[84,58],[68,72],[50,72],[32,72],[16,58],[12,34],[28,16],[50,30]];function RE({onStartSession:S,onLaunchInstance:k,goTo:U}){var y,T;const[V,X]=J.useState(null),[ee]=J.useState(()=>!localStorage.getItem("cockpit.welcomed")),[$,c]=J.useState(""),[b,_]=J.useState("auto"),[N,f]=J.useState("observe"),[m,w]=J.useState(()=>LE());J.useEffect(()=>{localStorage.setItem("cockpit.welcomed","1")},[]),J.useEffect(()=>{(async()=>{try{const[R,W]=await Promise.all([We("/api/inventory"),We("/api/health")]),[I,B,ie]=await Promise.all([We("/api/running").catch(()=>({running:[]})),We("/api/approvals?status=pending").catch(()=>({approvals:[]})),We("/api/cost").catch(()=>null)]);X({instances:R.instances,running:I.running??[],approvals:B.approvals??[],cost:ie,executor:W.executor_url,connected:R.instances.length>0,inventoryWarning:TE(R)})}catch{X({instances:[],running:[],approvals:[],cost:null,executor:"",connected:!1})}})()},[]);const E=(V==null?void 0:V.instances.filter(R=>R.state==="running"))??[],p={host:(V==null?void 0:V.instances.some(R=>{var W;return lr(((W=R.runtime_posture)==null?void 0:W.kind)??R.runtime)==="host"}))??!1,container:(V==null?void 0:V.instances.some(R=>{var W;return lr(((W=R.runtime_posture)==null?void 0:W.kind)??R.runtime)==="container"}))??!1,vm:(V==null?void 0:V.instances.some(R=>{var W;return lr(((W=R.runtime_posture)==null?void 0:W.kind)??R.runtime)==="vm"}))??!1},u=async()=>{var R;await((R=navigator.clipboard)==null?void 0:R.writeText("aiwg cockpit"))},h=WE(V),a=((V==null?void 0:V.approvals.length)??0)+(p.host&&p.container&&p.vm?0:1),o=E.find(R=>R.id===$)??E[0]??(V==null?void 0:V.instances[0]),v=o?(y=V==null?void 0:V.cost)==null?void 0:y.per_instance.find(R=>R.instance_id===o.id):void 0,x=((T=V==null?void 0:V.cost)==null?void 0:T.total.usd)??0,C=V!=null&&V.cost?Math.min(100,Math.max(6,x*12)):0,D=[o?o.loadout:"no stack",b==="auto"?"auto runtime":b,N].join(" / ");return l.jsxDEV("div",{className:"welcome operator-wall",children:[l.jsxDEV("section",{className:`wall-hero ${V!=null&&V.connected?"wall-hero-compact":""}`,"aria-labelledby":"cockpit-wall-title",children:[l.jsxDEV("div",{children:[l.jsxDEV("p",{className:"eyebrow",children:"Operator wall"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:108,columnNumber:11},this),l.jsxDEV("h2",{id:"cockpit-wall-title",children:"Work alongside your agents"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:109,columnNumber:11},this),l.jsxDEV("p",{className:"lead",children:"Observe live stacks, take control when a session allows it, and keep approvals, cost, runtime posture, and handoff context visible in one control plane."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:110,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:107,columnNumber:9},this),l.jsxDEV("div",{className:"hero-actions","aria-label":"Primary Cockpit actions",children:[l.jsxDEV("button",{className:"cta",onClick:k,children:"+ New instance + session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:116,columnNumber:11},this),l.jsxDEV("button",{className:"cta",onClick:S,children:"▸ Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:117,columnNumber:11},this),l.jsxDEV("button",{onClick:()=>U("running"),children:"View board"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:118,columnNumber:11},this),l.jsxDEV("button",{onClick:u,children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:119,columnNumber:11},this),(V==null?void 0:V.connected)&&l.jsxDEV("div",{className:"segmented",role:"group","aria-label":"Wall review mode",children:[l.jsxDEV("button",{"aria-pressed":m==="topology",onClick:()=>w("topology"),children:"Topology"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:122,columnNumber:15},this),l.jsxDEV("button",{"aria-pressed":m==="handoff",onClick:()=>w("handoff"),children:"Handoff"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:123,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:121,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:115,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:106,columnNumber:7},this),V?V.connected?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("section",{className:"radial-wall","aria-labelledby":"operator-wall-map-title",children:l.jsxDEV("div",{className:`radial-map mode-${m}`,"aria-label":"Operator wall topology",children:[l.jsxDEV("svg",{className:"radial-links",viewBox:"0 0 100 100","aria-hidden":"true",focusable:"false",children:[l.jsxDEV("circle",{className:"link-ring",cx:"50",cy:"50",r:"37"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:154,columnNumber:19},this),l.jsxDEV("circle",{className:"link-ring link-ring-inner",cx:"50",cy:"50",r:"22"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:155,columnNumber:19},this),h.map(R=>l.jsxDEV("line",{className:`link-line link-${R.state}`,x1:"50",y1:"50",x2:R.x,y2:R.y},R.key,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:157,columnNumber:21},this)),l.jsxDEV("path",{className:"handoff-arc",d:"M 17 58 C 29 19, 70 13, 87 42"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:159,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:153,columnNumber:17},this),l.jsxDEV("button",{className:"central-hub",onClick:S,"aria-label":"Start from Cockpit command hub",children:[l.jsxDEV("span",{className:"hub-core","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:162,columnNumber:19},this),l.jsxDEV("strong",{children:"Cockpit"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:163,columnNumber:19},this),l.jsxDEV("span",{children:[E.length," running · ",V.approvals.length," approvals"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:164,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:161,columnNumber:17},this),h.map((R,W)=>l.jsxDEV("button",{className:`orbit-node node-${R.family} node-${R.state}`,style:jE(R),onClick:()=>U(R.tab),"aria-label":`${R.label}: ${R.meta}`,children:[l.jsxDEV("span",{className:`node-glyph glyph-${R.family}`,"aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:174,columnNumber:21},this),l.jsxDEV("span",{className:"node-copy",children:[l.jsxDEV("strong",{children:R.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:176,columnNumber:23},this),l.jsxDEV("span",{children:R.meta},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:177,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:175,columnNumber:21},this),W===3&&l.jsxDEV("span",{className:"handoff-marker","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:179,columnNumber:37},this)]},R.key,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:167,columnNumber:19},this)),m==="handoff"&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("div",{className:"handoff-callout handoff-source",children:[l.jsxDEV("span",{children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:185,columnNumber:23},this),l.jsxDEV("strong",{children:V.running[0]?$e(V.running[0].instance_id):"ready"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:186,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:184,columnNumber:21},this),l.jsxDEV("div",{className:"handoff-callout handoff-destination",children:[l.jsxDEV("span",{children:"Destination"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:189,columnNumber:23},this),l.jsxDEV("strong",{children:E[1]?$e(E[1].id):"next stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:190,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:188,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:183,columnNumber:19},this),l.jsxDEV("div",{className:"radial-overlay","aria-labelledby":"operator-wall-map-title",children:[l.jsxDEV("div",{className:"radial-overlay-head",children:[l.jsxDEV("div",{children:[l.jsxDEV("p",{className:"eyebrow",children:m==="handoff"?"Mission route":"Live topology"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:197,columnNumber:23},this),l.jsxDEV("h3",{id:"operator-wall-map-title",children:m==="handoff"?"Mission-handoff operator wall":"Eleven-stack operator wall"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:198,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:196,columnNumber:21},this),l.jsxDEV("div",{className:"mission-route","aria-label":"Mission handoff state",children:[l.jsxDEV("span",{children:"Mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:201,columnNumber:23},this),l.jsxDEV("strong",{children:V.running[0]?$e(V.running[0].task_id):"ready"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:202,columnNumber:23},this),l.jsxDEV("span",{className:a>0?"route-attention":"route-ready",children:a>0?`${a} gate(s)`:"clear"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:203,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:200,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:195,columnNumber:19},this),l.jsxDEV("dl",{className:"wall-readout",children:[l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Coverage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:26},this),l.jsxDEV("dd",{children:[[p.host,p.container,p.vm].filter(Boolean).length,"/3"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:43},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:209,columnNumber:21},this),l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Executor"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:26},this),l.jsxDEV("dd",{children:V.executor||"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:43},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:210,columnNumber:21},this),l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Control"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:26},this),l.jsxDEV("dd",{children:E.some(R=>R.session_backends.some(W=>W.available&&W.drive))?"drive available":"observe first"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:42},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:211,columnNumber:21},this),l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:26},this),l.jsxDEV("dd",{children:V.cost?`$${V.cost.total.usd.toFixed(2)}`:"n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:212,columnNumber:21},this),l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Gates"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:26},this),l.jsxDEV("dd",{children:a>0?`${a} attention`:"clear"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:213,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:208,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:194,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:152,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:151,columnNumber:13},this),l.jsxDEV("section",{className:"stack-board","aria-label":"Running stack board",children:E.slice(0,6).map(R=>{var ie;const W=V.running.find(se=>se.instance_id===R.id),I=(ie=V.cost)==null?void 0:ie.per_instance.find(se=>se.instance_id===R.id),B=R.session_backends.some(se=>se.available&&se.drive);return l.jsxDEV("article",{className:`stack-card accent-${OE(R.id)}`,children:[l.jsxDEV("div",{className:"stack-head",children:[l.jsxDEV("span",{className:`topology topology-${ME(R)}`,"aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:227,columnNumber:23},this),l.jsxDEV("div",{children:[l.jsxDEV("h3",{children:R.loadout},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:229,columnNumber:25},this),l.jsxDEV("p",{children:[$e(R.id)," · ",R.runtime_posture.label]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:230,columnNumber:25},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:228,columnNumber:23},this),l.jsxDEV("span",{className:`badge isolation-${R.runtime_posture.isolation}`,children:R.state},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:232,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:226,columnNumber:21},this),l.jsxDEV("div",{className:"stack-log",role:"img","aria-label":`Recent activity for ${R.loadout}`,children:[l.jsxDEV("span",{children:W?`task ${$e(W.task_id)} · ${W.state}`:"idle · ready for session attach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:235,columnNumber:23},this),l.jsxDEV("span",{children:[R.transport.label," · ",R.transport.mode]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:236,columnNumber:23},this),l.jsxDEV("span",{children:B?"Drive enabled":"Observe only"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:237,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:234,columnNumber:21},this),l.jsxDEV("div",{className:"segment-progress","aria-label":"Session progress",children:l.jsxDEV("span",{style:{width:W?"68%":"28%"}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:240,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:239,columnNumber:21},this),l.jsxDEV("div",{className:"transport-bar",children:[l.jsxDEV("button",{onClick:()=>U("sessions"),children:"Attach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:243,columnNumber:23},this),l.jsxDEV("button",{onClick:()=>U("running"),children:"Details"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:244,columnNumber:23},this),l.jsxDEV("span",{children:I?`$${I.usd.toFixed(2)}`:"cost n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:245,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:242,columnNumber:21},this)]},R.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:225,columnNumber:19},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:219,columnNumber:13},this),l.jsxDEV("section",{className:"telemetry-strip","aria-label":"Fleet telemetry",children:[l.jsxDEV("button",{onClick:()=>U("inventory"),children:[l.jsxDEV("strong",{children:V.instances.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:254,columnNumber:17},this),l.jsxDEV("span",{children:["instances · ",E.length," running"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:255,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:253,columnNumber:15},this),l.jsxDEV("button",{onClick:()=>U("running"),children:[l.jsxDEV("strong",{children:V.running.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:258,columnNumber:17},this),l.jsxDEV("span",{children:"active tasks"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:259,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:257,columnNumber:15},this),l.jsxDEV("button",{onClick:()=>U("approvals"),children:[l.jsxDEV("strong",{children:V.approvals.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:262,columnNumber:17},this),l.jsxDEV("span",{children:"pending approvals"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:263,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:261,columnNumber:15},this),l.jsxDEV("button",{onClick:()=>U("running"),children:[l.jsxDEV("strong",{children:V.cost?`$${V.cost.total.usd.toFixed(2)}`:"--"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:266,columnNumber:17},this),l.jsxDEV("span",{children:"cost · quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:267,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:265,columnNumber:15},this),l.jsxDEV("button",{onClick:()=>U("inventory"),children:[l.jsxDEV("strong",{children:p.host&&p.container&&p.vm?"3/3":`${[p.host,p.container,p.vm].filter(Boolean).length}/3`},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:270,columnNumber:17},this),l.jsxDEV("span",{children:"host · docker · vm"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:271,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:269,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:252,columnNumber:13},this),l.jsxDEV("section",{className:"control-planner","aria-label":"Guided start and cost quota",children:[l.jsxDEV("div",{className:"guided-start","aria-label":"Guided start",children:[l.jsxDEV("div",{children:[l.jsxDEV("p",{className:"eyebrow",children:"Guided start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:278,columnNumber:19},this),l.jsxDEV("h3",{children:"Pick stack, runtime, and task posture."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:279,columnNumber:19},this),l.jsxDEV("p",{className:"hint",children:["Plan: ",D]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:280,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:277,columnNumber:17},this),l.jsxDEV("div",{className:"planner-grid",children:[l.jsxDEV("label",{children:[l.jsxDEV("span",{children:"Stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:284,columnNumber:21},this),l.jsxDEV("select",{value:(o==null?void 0:o.id)??"",onChange:R=>c(R.target.value),children:E.map(R=>l.jsxDEV("option",{value:R.id,children:[R.loadout," · ",R.runtime_posture.kind]},R.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:286,columnNumber:52},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:285,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:283,columnNumber:19},this),l.jsxDEV("label",{children:[l.jsxDEV("span",{children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:290,columnNumber:21},this),l.jsxDEV("select",{value:b,onChange:R=>_(R.target.value),children:[l.jsxDEV("option",{value:"auto",children:"Auto from selected stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:292,columnNumber:23},this),l.jsxDEV("option",{value:"host",children:"Host"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:293,columnNumber:23},this),l.jsxDEV("option",{value:"container",children:"Docker/container"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:294,columnNumber:23},this),l.jsxDEV("option",{value:"vm",children:"VM"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:295,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:291,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:289,columnNumber:19},this),l.jsxDEV("label",{children:[l.jsxDEV("span",{children:"Task"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:299,columnNumber:21},this),l.jsxDEV("select",{value:N,onChange:R=>f(R.target.value),children:[l.jsxDEV("option",{value:"observe",children:"Observe first"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:301,columnNumber:23},this),l.jsxDEV("option",{value:"drive",children:"Drive when granted"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:302,columnNumber:23},this),l.jsxDEV("option",{value:"handoff",children:"Mission handoff"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:303,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:300,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:298,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:282,columnNumber:17},this),l.jsxDEV("div",{className:"cta-row",children:[l.jsxDEV("button",{className:"cta",onClick:S,children:"▸ Start planned session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:308,columnNumber:19},this),l.jsxDEV("button",{onClick:()=>U("explore"),children:"Browse capabilities"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:309,columnNumber:19},this),V.approvals.length>0&&l.jsxDEV("button",{onClick:()=>U("approvals"),children:["Review ",V.approvals.length," approval(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:310,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:307,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:276,columnNumber:15},this),l.jsxDEV("aside",{className:"quota-panel","aria-label":"Cost and quota",children:[l.jsxDEV("p",{className:"eyebrow",children:"Cost & quota"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:315,columnNumber:17},this),l.jsxDEV("div",{className:"quota-donut",style:{"--quota":`${C}%`},children:[l.jsxDEV("strong",{children:V.cost?`$${x.toFixed(2)}`:"--"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:317,columnNumber:19},this),l.jsxDEV("span",{children:V.cost?`${V.cost.total.input_tokens+V.cost.total.output_tokens} tokens`:"metrics unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:318,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:316,columnNumber:17},this),l.jsxDEV("dl",{className:"quota-readout",children:[l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Selected stack"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:24},this),l.jsxDEV("dd",{children:v?`$${v.usd.toFixed(2)}`:"n/a"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:321,columnNumber:19},this),l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Headroom"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:24},this),l.jsxDEV("dd",{children:V.cost?C>80?"near limit":"clear":"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:41},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:322,columnNumber:19},this),l.jsxDEV("div",{children:[l.jsxDEV("dt",{children:"Approval load"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:24},this),l.jsxDEV("dd",{children:[V.approvals.length," pending"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:323,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:320,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:314,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:275,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:150,columnNumber:11},this):l.jsxDEV("div",{className:"card warn-card",children:[l.jsxDEV("h3",{children:"No stack connected"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:132,columnNumber:13},this),V.executor?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{children:["Bridge is connected to a real executor at ",l.jsxDEV("code",{children:V.executor},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:135,columnNumber:62},this),", but that executor is not reporting any registered instances or agents."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:135,columnNumber:17},this),V.inventoryWarning&&l.jsxDEV("p",{className:"warn",children:["Inventory note: ",V.inventoryWarning]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:136,columnNumber:41},this),l.jsxDEV("div",{className:"cta-row",children:[l.jsxDEV("button",{className:"cta",onClick:k,children:"+ Launch instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:138,columnNumber:19},this),l.jsxDEV("button",{onClick:()=>U("inventory"),children:"Open inventory"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:139,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:137,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:134,columnNumber:15},this):l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{children:"Cockpit talks to a real agentic-sandbox executor. Start the executor, then point the Bridge at it:"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:144,columnNumber:17},this),l.jsxDEV("pre",{className:"terminal",children:"AIWG_COCKPIT_EXECUTOR_URL=http://127.0.0.1:<executor-port> node apps/cockpit/bridge/src/server.mjs"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:145,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:143,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:131,columnNumber:11},this):l.jsxDEV("p",{className:"empty",children:"Checking your stacks…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:129,columnNumber:14},this),ee&&l.jsxDEV("div",{className:"card tour",children:[l.jsxDEV("h3",{children:"Three things to know"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:332,columnNumber:11},this),l.jsxDEV("ol",{children:[l.jsxDEV("li",{children:[l.jsxDEV("strong",{children:"Sessions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:334,columnNumber:17},this)," are where work happens — attach to observe, take the wheel to drive. Output mirrors to every viewer."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:334,columnNumber:13},this),l.jsxDEV("li",{children:[l.jsxDEV("strong",{children:"Actions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:17},this)," and the ",l.jsxDEV("strong",{children:"+ capability picker"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:50},this)," drop a command into a session; the agent runs it. The Cockpit never runs the CLI."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:335,columnNumber:13},this),l.jsxDEV("li",{children:[l.jsxDEV("strong",{children:"Explore"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:336,columnNumber:17},this)," browses the read-only AIWG catalog. Your own copied/imported assets live in your library — AIWG files are never overwritten."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:336,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:333,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:331,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Welcome.tsx",lineNumber:105,columnNumber:5},this)}function TE(S){const k=S.admin_error;return[S.degraded_admin_inventory,k==null?void 0:k.code,k==null?void 0:k.title,k==null?void 0:k.detail].filter(Boolean).join(" · ")||void 0}function ME(S){var U;const k=lr(((U=S.runtime_posture)==null?void 0:U.kind)??S.runtime);return k==="host"?"terminal":k==="vm"||k==="container"?"cube":"window"}function OE(S){let k=0;for(const U of S)k+=U.charCodeAt(0);return k%4+1}function jE(S){return{"--x":`${S.x}%`,"--y":`${S.y}%`}}function LE(){return new URLSearchParams(window.location.search).get("wall")==="handoff"?"handoff":"topology"}function WE(S){var _,N;const k=(S==null?void 0:S.instances.filter(f=>f.state==="running"))??[],U=S==null?void 0:S.instances.find(f=>{var m;return lr(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="host"}),V=S==null?void 0:S.instances.find(f=>{var m;return lr(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="container"}),X=S==null?void 0:S.instances.find(f=>{var m;return lr(((m=f.runtime_posture)==null?void 0:m.kind)??f.runtime)==="vm"}),ee=(S==null?void 0:S.instances.some(f=>f.session_backends.some(m=>m.available&&m.drive)))??!1,$=(S==null?void 0:S.approvals.length)??0,c=(N=(_=S==null?void 0:S.cost)==null?void 0:_.total)==null?void 0:N.usd;return[{key:"host",label:(U==null?void 0:U.loadout)||"Host CLI",meta:U?`${$e(U.id)} · ${U.state}`:"not connected",family:"host",tab:"inventory",state:U?"running":"blocked"},{key:"vm",label:(X==null?void 0:X.loadout)||"VM sandbox",meta:X?`${$e(X.id)} · ${X.state}`:"not connected",family:"vm",tab:"inventory",state:X?"running":"blocked"},{key:"container",label:(V==null?void 0:V.loadout)||"Docker runtime",meta:V?`${$e(V.id)} · ${V.state}`:"not connected",family:"container",tab:"inventory",state:V?"running":"blocked"},{key:"mission",label:"Mission handoff",meta:S!=null&&S.running[0]?`${$e(S.running[0].task_id)} · ${S.running[0].state}`:"ready",family:"mission",tab:"running",state:S!=null&&S.running.length?"running":"ready"},{key:"approvals",label:"Approvals",meta:$?`${$} pending`:"clear",family:"approval",tab:"approvals",state:$?"attention":"ready"},{key:"cost",label:"Cost & quota",meta:c===void 0?"metrics n/a":`$${c.toFixed(2)}`,family:"cost",tab:"running",state:c===void 0?"idle":"ready"},{key:"capabilities",label:"Capability search",meta:"catalog ready",family:"capability",tab:"explore",state:"ready"},{key:"library",label:"Library",meta:"workspace assets",family:"library",tab:"library",state:"ready"},{key:"actions",label:"Actions",meta:ee?"drive available":"observe first",family:"action",tab:"actions",state:ee?"ready":"idle"},{key:"sessions",label:"Sessions",meta:k.length?`${k.length} attachable`:"none active",family:"session",tab:"sessions",state:k.length?"running":"idle"},{key:"inventory",label:"Inventory",meta:`${(S==null?void 0:S.instances.length)??0} registered`,family:"inventory",tab:"inventory",state:S!=null&&S.instances.length?"ready":"idle"}].map((f,m)=>({...f,x:ey[m][0],y:ey[m][1]}))}function BE({onStartSession:S,onLaunchInstance:k,refreshTick:U=0,refreshMs:V=5e3}){const[X,ee]=J.useState(null),[$,c]=J.useState(""),[b,_]=J.useState(""),[N,f]=J.useState(""),m=J.useCallback(()=>{We("/api/inventory").then(p=>{ee(p),c("")}).catch(p=>c(p.message))},[]);J.useEffect(()=>{m();const p=window.setInterval(m,V);return()=>window.clearInterval(p)},[m,V,U]);const w=(p,u,h="")=>We(p,{method:u}).then(a=>{_(""),f(a.message??(a.already_gone?"Instance already removed; inventory refreshed.":h)),m()}).catch(a=>{f(""),_(a.message)}),E=async(p,u)=>{var x,C;if(u.disabled)return;const h=iy(((x=p.launch_context)==null?void 0:x.name)??$e(p.id)),a=`${h}-${u.id==="snapshot"?"snapshot":u.id}`,o=window.prompt(`${u.label} asset id`,a);if(o===null)return;const v={asset_ref:o.trim()};if(u.id!=="snapshot"){const D=window.prompt("New instance name",`${h}-${u.id==="warm-pool"?"warm":u.id}`);if(D===null)return;v.name=iy(D)}_(""),f(`${u.label} requested; waiting for operation...`);try{const D=await We(`/api/instances/${encodeURIComponent(p.id)}/${u.id}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(v)}),y=D.id??((C=D.operation)==null?void 0:C.id);if(!y){f(`${u.label} accepted.`),m();return}const T=await FE(y);await We("/api/audit/intent",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({event:"instance.fast_start.terminal",detail:{instance_id:p.id,provider:p.provider,action:u.id,operation_id:y,state:T.state,result:T.result,error:T.error??T.failure}})}).catch(()=>{}),f(`${u.label} ${T.state??"completed"}: ${y}`),m()}catch(D){f(""),_(D.message)}};return $?l.jsxDEV("p",{className:"err",children:["Could not load inventory: ",$]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:106,columnNumber:19},this):X?X.instances.length?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("div",{className:"section-toolbar",children:[l.jsxDEV("div",{children:[l.jsxDEV("h2",{children:"Agent instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:122,columnNumber:11},this),l.jsxDEV("p",{className:"hint",children:[X.count," ",X.count===1?"target":"targets"," · ",new Date(X.fetched_at).toLocaleTimeString()]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:123,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:121,columnNumber:9},this),k&&l.jsxDEV("button",{className:"cta",onClick:k,children:"New instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:125,columnNumber:30},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:120,columnNumber:7},this),b&&l.jsxDEV("p",{className:"err",children:["Action failed: ",b]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:127,columnNumber:21},this),N&&l.jsxDEV("p",{className:"hint",role:"status",children:N},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:128,columnNumber:21},this),X.bootstrap_trust&&l.jsxDEV(HE,{posture:X.bootstrap_trust},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:129,columnNumber:32},this),l.jsxDEV("table",{className:"inventory-table",children:[l.jsxDEV("caption",{children:"Available instance deployments"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:131,columnNumber:9},this),l.jsxDEV("thead",{children:l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:134,columnNumber:13},this),l.jsxDEV("th",{scope:"col",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:134,columnNumber:42},this),l.jsxDEV("th",{scope:"col",children:"Loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:134,columnNumber:70},this),l.jsxDEV("th",{scope:"col",children:"Transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:13},this),l.jsxDEV("th",{scope:"col",children:"Host daemon"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:43},this),l.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:75},this),l.jsxDEV("th",{scope:"col",children:"Tenant"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:101},this),l.jsxDEV("th",{scope:"col",children:"Manage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:135,columnNumber:128},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:133,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:132,columnNumber:9},this),l.jsxDEV("tbody",{children:X.instances.map(p=>l.jsxDEV("tr",{children:(()=>{var v,x,C,D,y,T,R,W,I;const u=(v=p.session_backends)==null?void 0:v.some(B=>B.available),h=(C=(x=p.session_backends)==null?void 0:x.find(B=>!B.available))==null?void 0:C.reason,a=IE(p),o=$E(p);return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("td",{className:"instance-cell",children:[l.jsxDEV("code",{title:p.id,children:((D=p.launch_context)==null?void 0:D.name)??$e(p.id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:153,columnNumber:17},this),((y=p.launch_context)==null?void 0:y.name)&&l.jsxDEV("div",{className:"cell-note",children:$e(p.id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:154,columnNumber:44},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:152,columnNumber:15},this),l.jsxDEV("td",{className:"runtime-cell",children:[l.jsxDEV("span",{className:`badge isolation-${p.runtime_posture.isolation}`,title:p.runtime_posture.warning||p.runtime_posture.label,children:p.runtime_posture.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:157,columnNumber:17},this),p.provider&&l.jsxDEV("div",{className:"cell-note",children:p.provider},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:160,columnNumber:32},this),qE(p)&&l.jsxDEV("div",{className:"cell-note",children:["VFIO",ty(p).length?` · ${ty(p).join(", ")}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:162,columnNumber:19},this),((T=p.gpu)==null?void 0:T.reason)&&l.jsxDEV("div",{className:"cell-note",children:p.gpu.reason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:166,columnNumber:35},this),p.runtime_posture.warning&&l.jsxDEV("div",{className:"cell-note",children:p.runtime_posture.warning},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:167,columnNumber:47},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:156,columnNumber:15},this),l.jsxDEV("td",{children:[p.loadout,((R=p.launch_context)==null?void 0:R.image_ref)&&l.jsxDEV("div",{className:"cell-note",children:p.launch_context.image_ref},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:171,columnNumber:49},this),((W=p.launch_context)==null?void 0:W.source)&&l.jsxDEV("div",{className:"cell-note",children:p.launch_context.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:172,columnNumber:46},this),p.storage&&l.jsxDEV("div",{className:"cell-note",children:["Storage: ",p.storage.persistent?"persistent":"ephemeral",p.storage.delete_on_destroy?" · delete on destroy":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:174,columnNumber:19},this),((I=p.storage)==null?void 0:I.reason)&&l.jsxDEV("div",{className:"cell-note",children:p.storage.reason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:178,columnNumber:39},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:169,columnNumber:15},this),l.jsxDEV("td",{children:[l.jsxDEV("span",{className:`badge trust-${p.transport.trust}`,title:`${p.transport.source}${p.transport.evidence?`: ${p.transport.evidence}`:""}`,children:p.transport.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:181,columnNumber:17},this),l.jsxDEV("div",{className:"cell-note",children:[p.transport.mode,p.transport.stale?" · stale":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:184,columnNumber:17},this),p.managed_docker_posture&&l.jsxDEV(VE,{posture:p.managed_docker_posture},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:185,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:180,columnNumber:15},this),l.jsxDEV("td",{className:"daemon-cell",children:[l.jsxDEV("span",{className:`badge daemon-${p.host_daemon.status}`,children:p.host_daemon.status.replace("_"," ")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:188,columnNumber:17},this),p.host_daemon.detail&&l.jsxDEV("div",{className:"cell-note",children:p.host_daemon.detail},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:189,columnNumber:42},this),p.host_daemon.operator_command&&l.jsxDEV("code",{title:"Operator start command",children:p.host_daemon.operator_command},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:190,columnNumber:52},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:187,columnNumber:15},this),l.jsxDEV("td",{children:[l.jsxDEV("span",{className:`state ${o.kind==="stale-agent"?"degraded":p.state}`,title:o.detail,children:[l.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:194,columnNumber:19},this),o.label]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:193,columnNumber:17},this),o.detail&&o.kind!=="healthy"&&l.jsxDEV("div",{className:"cell-note",children:o.detail},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:196,columnNumber:64},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:192,columnNumber:15},this),l.jsxDEV("td",{children:p.tenant},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:198,columnNumber:15},this),l.jsxDEV("td",{className:"manage-actions",children:[p.state==="running"&&S&&l.jsxDEV("button",{className:"cta","aria-label":`Start session on ${$e(p.id)}`,disabled:!u,title:u?void 0:h,onClick:()=>S(p.id),children:"Session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:201,columnNumber:19},this)," ",a&&l.jsxDEV("button",{"aria-label":`Reconnect agent for ${$e(p.id)}`,title:h??"Ask the running agent to re-register without restarting the instance.",onClick:()=>w(`/api/instances/${encodeURIComponent(p.id)}/reconnect`,"POST","Reconnect requested; inventory will refresh shortly."),children:"Reconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:212,columnNumber:19},this)," ",PE(p).map(B=>l.jsxDEV("button",{"aria-label":`${B.label} ${$e(p.id)}`,disabled:B.disabled,title:B.reason,onClick:()=>E(p,B),children:B.label},B.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:221,columnNumber:19},this))," ",p.state==="running"?l.jsxDEV("button",{"aria-label":`Stop instance ${$e(p.id)}`,onClick:()=>w(`/api/instances/${encodeURIComponent(p.id)}/stop`,"POST"),children:"Stop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:232,columnNumber:21},this):l.jsxDEV("button",{"aria-label":`Start instance ${$e(p.id)}`,onClick:()=>w(`/api/instances/${encodeURIComponent(p.id)}/start`,"POST"),children:"Start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:233,columnNumber:21},this)," ",l.jsxDEV("button",{"aria-label":`Destroy instance ${$e(p.id)}`,title:p.state!=="running"&&p.runtime==="docker"?"Stopped Docker row — Destroy asks the sandbox management API to remove it.":void 0,onClick:()=>{confirm(`Destroy ${$e(p.id)}? This cannot be undone.`)&&w(`/api/instances/${encodeURIComponent(p.id)}`,"DELETE")},children:"Destroy"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:234,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:199,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:151,columnNumber:13},this)})()},p.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:140,columnNumber:13},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:138,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:130,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:119,columnNumber:5},this):l.jsxDEV("section",{className:"empty-state",children:[l.jsxDEV("h2",{children:"No instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:111,columnNumber:9},this),l.jsxDEV("p",{className:"hint",children:"Bridge is connected, but no host, Docker, or VM targets are registered."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:112,columnNumber:9},this),k&&l.jsxDEV("button",{className:"cta",onClick:k,children:"+ New instance + session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:113,columnNumber:30},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:110,columnNumber:7},this):l.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:107,columnNumber:21},this)}function VE({posture:S}){return S.secure_default?l.jsxDEV("div",{children:[l.jsxDEV("span",{className:"badge trust-secure",children:"Managed UDS · split identity"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:254,columnNumber:43},this),l.jsxDEV("div",{className:"cell-note",children:["control identity valid · workload UID ",S.workload_uid]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:254,columnNumber:115},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:254,columnNumber:38},this):S.requires_recreation?l.jsxDEV("div",{children:[l.jsxDEV("span",{className:"badge trust-degraded",children:"Recreate required"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:255,columnNumber:48},this),l.jsxDEV("div",{className:"cell-note",children:"Existing container lacks managed identity evidence; recreate it to adopt the secure default."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:255,columnNumber:111},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:255,columnNumber:43},this):l.jsxDEV("div",{children:[l.jsxDEV("span",{className:"badge trust-compatibility",children:"Compatibility transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:256,columnNumber:15},this),l.jsxDEV("div",{className:"cell-note",children:S.fallback_reason??`${S.transport_mode} is not equivalent to native UDS peer identity`},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:256,columnNumber:89},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:256,columnNumber:10},this)}function HE({posture:S}){const k=[S.ca_provider_ref,S.trust_bundle_ref,S.rotation_state,S.expires_at?`expires ${new Date(S.expires_at).toLocaleDateString()}`:void 0].filter(Boolean).join(" · ");return l.jsxDEV("p",{className:`trust-banner trust-${S.status}`,role:S.status==="secure"?"status":"alert",children:[l.jsxDEV("span",{children:S.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:268,columnNumber:7},this),k&&l.jsxDEV("span",{className:"trust-detail",children:k},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:269,columnNumber:18},this),S.status!=="secure"&&l.jsxDEV("span",{className:"trust-detail",children:S.recovery},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:270,columnNumber:39},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Inventory.tsx",lineNumber:267,columnNumber:5},this)}const UE=["docker","container","vm","qemu","kvm"],zE=[{id:"snapshot",label:"Snapshot",capabilities:["instance.snapshot","instance.checkpoint"]},{id:"restore",label:"Restore",capabilities:["instance.restore"]},{id:"fork",label:"Fork",capabilities:["instance.fork"]},{id:"warm-pool",label:"Warm pool",capabilities:["warm_pool.manage"]}];function IE(S){var X,ee;const k=String(((X=S.runtime_posture)==null?void 0:X.kind)??S.runtime).toLowerCase(),U=String(S.state).toLowerCase()==="running",V=S.agent_ready===!1||((ee=S.session_backends)==null?void 0:ee.some($=>$.available===!1));return U&&UE.includes(k)&&!!V}function $E(S){var X,ee;const k=String(S.state).toLowerCase()==="running",U=(ee=(X=S.session_backends)==null?void 0:X.find($=>$.available===!1))==null?void 0:ee.reason,V=S.agent_ready===!1||!!U;return k&&V?{kind:"stale-agent",label:"agent unreachable",detail:U??"Runtime is still running, but the agent is not registered."}:{kind:"healthy",label:S.state}}function qE(S){var k,U,V,X,ee,$;return((k=S.capabilities)==null?void 0:k.some(c=>c.id==="device.vfio"))||((U=S.capability_constraints)==null?void 0:U.some(c=>c.capability==="device.vfio"))||!!((V=S.gpu)!=null&&V.assigned||(X=S.gpu)!=null&&X.available||($=(ee=S.gpu)==null?void 0:ee.devices)!=null&&$.length)}function ty(S){var k,U;return((U=(k=S.gpu)==null?void 0:k.devices)==null?void 0:U.filter(Boolean))??[]}function PE(S){var ee;const k=String(((ee=S.runtime_posture)==null?void 0:ee.kind)??S.runtime).toLowerCase();if(!["vm","qemu","kvm"].includes(k))return[];const U=new Set((S.capabilities??[]).map($=>$.id)),V=S.capability_constraints??[],X=String(S.provider??"").toLowerCase();return zE.flatMap($=>{const c=$.capabilities.some(N=>U.has(N)),b=V.find(N=>{var f;return((f=N.excludes)==null?void 0:f.some(m=>$.capabilities.includes(m)))||$.capabilities.includes(N.capability)});if(!c&&!b)return[];const _=$.id==="snapshot"&&X==="libvirt"?"Checkpoint":$.label;return[{id:$.id,label:_,disabled:!!b,reason:b==null?void 0:b.reason}]})}function iy(S){const k=String(S||"cockpit-vm").toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+$/g,"").slice(0,63),U=/^[a-z]/.test(k)?k:`a-${k.replace(/^-+/,"")}`;return U.length>=2?U:"cockpit-vm"}async function FE(S){let k={id:S,state:"unknown"};for(let U=0;U<60;U+=1){k=await We(`/api/operations/${encodeURIComponent(S)}`);const V=String(k.state??"").toLowerCase();if(["succeeded","failed","canceled","cancelled"].includes(V))return k;await new Promise(X=>window.setTimeout(X,1e3))}return k}function GE({refreshTick:S=0}){const[k,U]=J.useState(null),[V,X]=J.useState(null),[ee,$]=J.useState(""),c=J.useCallback(()=>{We("/api/running").then(_=>{U(_),$("")}).catch(_=>$(_.message)),We("/api/cost").then(X).catch(()=>X(null))},[]);J.useEffect(()=>{c()},[c,S]);const b=_=>We(`/api/tasks/${encodeURIComponent(_.instance_id)}/${encodeURIComponent(_.task_id)}/cancel`,{method:"POST"}).then(c).catch(N=>alert(N.message));return ee?l.jsxDEV("p",{className:"err",children:["Could not load running: ",ee]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:23,columnNumber:19},this):k?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:[l.jsxDEV("strong",{children:"Fleet overview."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:29,columnNumber:9},this)," Every task running across all stacks — a read-only board. To attach to one and observe or drive it, open it in ",l.jsxDEV("strong",{children:"Sessions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:30,columnNumber:59},this)," (the attached workspace)."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:28,columnNumber:7},this),V&&l.jsxDEV("p",{className:"hint",children:["Spend across stacks: ",l.jsxDEV("strong",{children:["$",V.total.usd.toFixed(2)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:33,columnNumber:50},this)," · ",(V.total.input_tokens+V.total.output_tokens).toLocaleString()," tokens"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:33,columnNumber:9},this),k.running.length?l.jsxDEV("table",{children:[l.jsxDEV("caption",{children:["Running across all stacks — ",k.count," task(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:39,columnNumber:13},this),l.jsxDEV("thead",{children:l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:19},this),l.jsxDEV("th",{scope:"col",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:48},this),l.jsxDEV("th",{scope:"col",children:"Transport"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:76},this),l.jsxDEV("th",{scope:"col",children:"Task"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:106},this),l.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:131},this),l.jsxDEV("th",{scope:"col",children:"Tenant"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:157},this),l.jsxDEV("th",{scope:"col",children:"Control"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:184},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:41,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:40,columnNumber:13},this),l.jsxDEV("tbody",{children:k.running.map(_=>l.jsxDEV("tr",{children:[l.jsxDEV("td",{children:l.jsxDEV("code",{title:_.instance_id,children:$e(_.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:46,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:46,columnNumber:19},this),l.jsxDEV("td",{children:_.runtime_posture?l.jsxDEV("span",{className:`badge isolation-${_.runtime_posture.isolation}`,title:_.runtime_posture.warning||_.runtime_posture.label,children:_.runtime_posture.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:47,columnNumber:44},this):l.jsxDEV("span",{className:"badge",children:"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:47,columnNumber:207},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:47,columnNumber:19},this),l.jsxDEV("td",{children:_.transport?l.jsxDEV("span",{className:`badge trust-${_.transport.trust}`,children:_.transport.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:48,columnNumber:38},this):l.jsxDEV("span",{className:"badge",children:"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:48,columnNumber:120},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:48,columnNumber:19},this),l.jsxDEV("td",{children:l.jsxDEV("code",{title:_.task_id,children:$e(_.task_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:49,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:49,columnNumber:19},this),l.jsxDEV("td",{children:l.jsxDEV("span",{className:`state ${_.state}`,children:[l.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:50,columnNumber:60},this),_.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:50,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:50,columnNumber:19},this),l.jsxDEV("td",{children:_.tenant},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:51,columnNumber:19},this),l.jsxDEV("td",{children:l.jsxDEV("button",{"aria-label":`Stop task ${$e(_.task_id)}`,onClick:()=>b(_),children:"Stop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:52,columnNumber:23},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:52,columnNumber:19},this)]},_.task_id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:45,columnNumber:17},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:43,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:38,columnNumber:11},this):l.jsxDEV("p",{className:"empty",children:"Nothing running yet — use “Start a session” (top right or Home) to put an agent to work."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:36,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:27,columnNumber:5},this):l.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Running.tsx",lineNumber:24,columnNumber:20},this)}function YE({refreshTick:S=0}){const[k,U]=J.useState(null),[V,X]=J.useState(""),[ee,$]=J.useState(null),[c,b]=J.useState("all"),_=J.useCallback(()=>{We("/api/missions").then(E=>{U(E),X(""),$(p=>{var u;return p??((u=E.sessions[0])==null?void 0:u.id)??null})}).catch(E=>X(E.message))},[]);if(J.useEffect(()=>{_()},[_,S]),V)return l.jsxDEV("p",{className:"err",children:["Could not load Missions: ",V]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:24,columnNumber:19},this);if(!k)return l.jsxDEV("p",{className:"empty",children:"Loading..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:25,columnNumber:21},this);const N=nx(k.missions),f=k.missions.filter(E=>E.graph),m=k.sessions.map(E=>({...E,missions:E.missions.filter(p=>c==="all"||(c==="graph"?!!p.graph:!p.graph))})).filter(E=>E.missions.length>0||c==="all"),w=m.find(E=>E.id===ee)??m[0]??null;return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:"Durable AIWG Mission Control state and Agentic Sandbox fleet work share one projection. Cockpit observes the parent mission and its independently managed child workloads; the conductor remains the owner of policy and durability."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:37,columnNumber:7},this),l.jsxDEV("div",{className:"mission-summary","aria-label":"Mission status summary",children:[l.jsxDEV("span",{children:[l.jsxDEV("strong",{children:k.count},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:43,columnNumber:15},this)," total"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:43,columnNumber:9},this),l.jsxDEV("span",{children:[l.jsxDEV("strong",{children:N.active},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:44,columnNumber:15},this)," active"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:44,columnNumber:9},this),l.jsxDEV("span",{children:[l.jsxDEV("strong",{children:N.awaiting},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:45,columnNumber:15},this)," awaiting approval"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:45,columnNumber:9},this),l.jsxDEV("span",{children:[l.jsxDEV("strong",{children:N.terminal},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:46,columnNumber:15},this)," terminal"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:46,columnNumber:9},this),l.jsxDEV("span",{children:[l.jsxDEV("strong",{children:f.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:47,columnNumber:15},this)," graph-profile"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:42,columnNumber:7},this),l.jsxDEV("fieldset",{className:"mission-profile-filter",children:[l.jsxDEV("legend",{children:"Run profile"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:50,columnNumber:9},this),["all","graph","ordinary"].map(E=>l.jsxDEV("label",{children:[l.jsxDEV("input",{type:"radio",name:"mission-profile",checked:c===E,onChange:()=>b(E)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:52,columnNumber:11},this)," ",E==="graph"?"Graph profile":E==="ordinary"?"Ordinary Flow / Mission":"All runs"]},E,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:51,columnNumber:66},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:49,columnNumber:7},this),c!=="ordinary"&&f.length>0&&l.jsxDEV(XE,{missions:f},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:55,columnNumber:68},this),l.jsxDEV(KE,{sessions:k.sessions.filter(E=>E.source==="aiwg-mc"),onChanged:_},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:56,columnNumber:7},this),m.length?l.jsxDEV("div",{className:"missions-layout",children:[l.jsxDEV("aside",{className:"mission-sessions","aria-label":"Mission sessions",children:m.map(E=>l.jsxDEV("button",{className:E.id===(w==null?void 0:w.id)?"selected":"",onClick:()=>$(E.id),"aria-pressed":E.id===(w==null?void 0:w.id),children:[l.jsxDEV("span",{children:E.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:67,columnNumber:17},this),l.jsxDEV("small",{children:[E.source," · ",E.missions.length]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:68,columnNumber:17},this)]},E.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:61,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:59,columnNumber:11},this),w&&l.jsxDEV(ZE,{session:w,onChanged:_},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:72,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:58,columnNumber:9},this):l.jsxDEV("p",{className:"empty",children:"No runs match this profile filter."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:57,columnNumber:34},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:36,columnNumber:5},this)}function XE({missions:S}){return l.jsxDEV("section",{className:"graph-runs","aria-label":"Flow graph runs",children:[l.jsxDEV("h2",{children:"Flow / graph runs"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:81,columnNumber:5},this),l.jsxDEV("p",{className:"hint",children:"Read-only ledger projection. Visual editing is intentionally deferred; raw route evidence is not rendered."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:82,columnNumber:5},this),S.map(k=>{var U;return l.jsxDEV("article",{className:"graph-run",children:[l.jsxDEV("h3",{children:[k.graph.graph_id," ",l.jsxDEV("small",{children:["run ",$e(k.graph.run_id)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:84,columnNumber:37},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:84,columnNumber:7},this),l.jsxDEV("p",{children:[k.graph.graph_version?`v${k.graph.graph_version} · `:"",k.status,k.graph.replay_of_run_id?` · replay of ${$e(k.graph.replay_of_run_id)}`:"",k.graph.checkpoint_id?` · checkpoint ${$e(k.graph.checkpoint_id)}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:85,columnNumber:7},this),(U=k.graph_nodes)!=null&&U.length?l.jsxDEV("table",{children:[l.jsxDEV("caption",{children:[k.graph_nodes.length," graph node(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:87,columnNumber:9},this),l.jsxDEV("thead",{children:l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Node"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:20},this),l.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:45},this),l.jsxDEV("th",{scope:"col",children:"Runtime / route"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:71},this),l.jsxDEV("th",{scope:"col",children:"HITL / retry"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:107},this),l.jsxDEV("th",{scope:"col",children:"Cost / evidence"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:140},this),l.jsxDEV("th",{scope:"col",children:"Replay lineage"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:176},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:16},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:88,columnNumber:9},this),l.jsxDEV("tbody",{children:k.graph_nodes.map(V=>l.jsxDEV(QE,{node:V},V.node_run_id??V.node_id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:89,columnNumber:51},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:89,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:86,columnNumber:132},this):l.jsxDEV("p",{className:"empty",children:"Graph identity is present; node ledger data is not available yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:86,columnNumber:39},this)]},`${k.graph.run_id}:${k.id}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:83,columnNumber:32},this)})]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:80,columnNumber:10},this)}function QE({node:S}){return l.jsxDEV("tr",{children:[l.jsxDEV("td",{children:[l.jsxDEV("strong",{children:S.node_id},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:97,columnNumber:9},this),S.node_run_id&&l.jsxDEV("small",{className:"block",children:$e(S.node_run_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:97,columnNumber:61},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:97,columnNumber:5},this),l.jsxDEV("td",{children:l.jsxDEV("span",{className:`state ${fy(S.state)}`,children:[l.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:98,columnNumber:62},this),S.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:98,columnNumber:9},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:98,columnNumber:5},this),l.jsxDEV("td",{children:[S.runtime_binding,l.jsxDEV("small",{className:"block",children:S.route_reason??"No route reason recorded"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:99,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:99,columnNumber:5},this),l.jsxDEV("td",{children:[S.hitl_status??"-",l.jsxDEV("small",{className:"block",children:["retries ",S.retry_count??0]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:100,columnNumber:34},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:100,columnNumber:5},this),l.jsxDEV("td",{children:["$",(S.cost_usd??0).toFixed(4)," · ",S.tokens??0," tokens",l.jsxDEV("small",{className:"block",children:S.evidence_summary??"No redacted evidence summary"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:101,columnNumber:71},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:101,columnNumber:5},this),l.jsxDEV("td",{children:S.replay_of_node_run_id?`replay of ${$e(S.replay_of_node_run_id)}`:S.checkpoint_id?`checkpoint ${$e(S.checkpoint_id)}`:"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:102,columnNumber:5},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:96,columnNumber:10},this)}function KE({sessions:S,onChanged:k}){var a;const[U,V]=J.useState(((a=S[0])==null?void 0:a.id)??""),[X,ee]=J.useState(""),[$,c]=J.useState(""),[b,_]=J.useState(!1),[N,f]=J.useState(!1),[m,w]=J.useState(""),[E,p]=J.useState(!1);if(J.useEffect(()=>{var o;S.some(v=>v.id===U)||V(((o=S[0])==null?void 0:o.id)??"")},[S,U]),!S.length)return l.jsxDEV("p",{className:"hint",children:["Create a Mission Control session with ",l.jsxDEV("code",{children:"aiwg mc start"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:117,columnNumber:90},this)," before dispatching from Cockpit."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:117,columnNumber:32},this);const u=S.find(o=>o.id===U)??S[0],h=async o=>{var v,x;o.preventDefault(),p(!0),w("");try{await We("/api/missions",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({session_id:u.id,objective:X,completion:$,expected_updated_at:u.updated_at,request_id:((x=(v=globalThis.crypto)==null?void 0:v.randomUUID)==null?void 0:x.call(v))??`cockpit-${Date.now()}`,run:b,accept_cost:N})}),ee(""),c(""),k()}catch(C){w(`Mission dispatch failed: ${C.message}`)}finally{p(!1)}};return l.jsxDEV("form",{className:"mission-composer","aria-label":"Dispatch durable mission",onSubmit:h,children:[l.jsxDEV("label",{children:["Session",l.jsxDEV("select",{value:u.id,onChange:o=>V(o.target.value),children:S.map(o=>l.jsxDEV("option",{value:o.id,children:o.name},o.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:147,columnNumber:129},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:147,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:147,columnNumber:5},this),l.jsxDEV("label",{children:["Objective",l.jsxDEV("input",{required:!0,maxLength:4096,value:X,onChange:o=>ee(o.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:148,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:148,columnNumber:5},this),l.jsxDEV("label",{children:["Completion criteria",l.jsxDEV("input",{maxLength:4096,value:$,onChange:o=>c(o.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:149,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:149,columnNumber:5},this),l.jsxDEV("label",{children:[l.jsxDEV("input",{type:"checkbox",checked:b,onChange:o=>_(o.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:150,columnNumber:12},this)," Run after queueing"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:150,columnNumber:5},this),b&&l.jsxDEV("label",{children:[l.jsxDEV("input",{type:"checkbox",checked:N,onChange:o=>f(o.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:151,columnNumber:23},this)," Accept estimated provider cost if the non-interactive gate requires it"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:151,columnNumber:16},this),l.jsxDEV("button",{disabled:E||!X.trim(),type:"submit",children:b?"Queue and run mission":"Queue mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:152,columnNumber:5},this),m&&l.jsxDEV("p",{className:"err",role:"alert",children:m},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:153,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:146,columnNumber:10},this)}function ZE({session:S,onChanged:k}){const U=S.source==="agentic-sandbox-fleet",V=S.source==="aiwg-mc",[X,ee]=J.useState(""),[$,c]=J.useState(""),b=async(_,N)=>{var m,w;c(`${_}:${N??S.id}`),ee("");const f=_==="cancel"?`/api/missions/${encodeURIComponent(S.id)}/${encodeURIComponent(N)}/cancel`:`/api/missions/${encodeURIComponent(S.id)}/${_}`;try{await We(f,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({expected_updated_at:S.updated_at,request_id:((w=(m=globalThis.crypto)==null?void 0:m.randomUUID)==null?void 0:w.call(m))??`cockpit-${Date.now()}`})}),k()}catch(E){ee(`Mission control failed: ${E.message}. Refresh and retry if the state changed elsewhere.`)}finally{c("")}};return l.jsxDEV("section",{className:"mission-detail","aria-label":`${S.name} missions`,children:[l.jsxDEV("div",{className:"mission-detail-head",children:[l.jsxDEV("div",{children:[l.jsxDEV("h2",{children:S.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:188,columnNumber:11},this),l.jsxDEV("p",{children:[U&&S.parent_mission_id?`Parent mission ${S.parent_mission_id} · `:"",S.source," · ",S.state,S.inventory_revision!==void 0?` · inventory r${S.inventory_revision}`:"",S.updated_at?` · updated ${new Date(S.updated_at).toLocaleString()}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:189,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:187,columnNumber:9},this),l.jsxDEV("div",{children:[l.jsxDEV("span",{className:"badge",children:[S.audit_count," audit events"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:197,columnNumber:11},this),V&&S.state==="active"&&l.jsxDEV("button",{disabled:!!$,onClick:()=>b("pause"),children:"Pause session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:198,columnNumber:58},this),V&&S.state==="paused"&&l.jsxDEV("button",{disabled:!!$,onClick:()=>b("resume"),children:"Resume session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:199,columnNumber:58},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:196,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:186,columnNumber:7},this),X&&l.jsxDEV("p",{className:"err",role:"alert",children:X},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:202,columnNumber:25},this),S.missions.length?l.jsxDEV("table",{className:U?"fleet-missions":void 0,children:[l.jsxDEV("caption",{children:[S.missions.length," mission projection(s)"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:205,columnNumber:11},this),l.jsxDEV("thead",{children:U?l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Child workload"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:208,columnNumber:21},this),l.jsxDEV("th",{scope:"col",children:"Status"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:208,columnNumber:56},this),l.jsxDEV("th",{scope:"col",children:"Target / runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:208,columnNumber:83},this),l.jsxDEV("th",{scope:"col",children:"Binding"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:208,columnNumber:120},this),l.jsxDEV("th",{scope:"col",children:"Evidence"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:208,columnNumber:148},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:208,columnNumber:17},this):l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:209,columnNumber:21},this),l.jsxDEV("th",{scope:"col",children:"Status"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:209,columnNumber:49},this),l.jsxDEV("th",{scope:"col",children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:209,columnNumber:76},this),l.jsxDEV("th",{scope:"col",children:"Loop"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:209,columnNumber:103},this),l.jsxDEV("th",{scope:"col",children:"Backing"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:209,columnNumber:128},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:209,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:206,columnNumber:11},this),l.jsxDEV("tbody",{children:S.missions.map(_=>l.jsxDEV("tr",{children:[l.jsxDEV("td",{children:[l.jsxDEV("strong",{children:_.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:215,columnNumber:19},this),U&&l.jsxDEV("small",{className:"block",children:JE(_)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:216,columnNumber:29},this),_.completion&&l.jsxDEV("small",{className:"block",children:["Done when: ",_.completion]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:217,columnNumber:36},this),_.error&&l.jsxDEV("small",{className:"block err",children:_.error},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:218,columnNumber:31},this),V&&!_.terminal&&_.status!=="aborted"&&_.status!=="failed"&&_.status!=="completed"&&_.status!=="done"&&l.jsxDEV("button",{disabled:!!$,onClick:()=>b("cancel",_.id),children:"Cancel mission"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:220,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:214,columnNumber:17},this),l.jsxDEV("td",{children:[l.jsxDEV("span",{className:`state ${fy(_.status)}`,children:[l.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:224,columnNumber:70},this),_.status]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:224,columnNumber:19},this),_.health&&l.jsxDEV("small",{className:"block",children:["health: ",_.health]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:225,columnNumber:32},this),_.backpressure&&l.jsxDEV("small",{className:"block fleet-warning",children:["backpressure: ",_.backpressure.reason,_.backpressure.retryable?" · retryable":" · operator action"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:226,columnNumber:38},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:223,columnNumber:17},this),U?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("td",{children:[l.jsxDEV("strong",{children:_.target_id??"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:229,columnNumber:23},this),l.jsxDEV("small",{className:"block",children:[_.executor_id??"-"," / ",_.runtime_id??"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:229,columnNumber:60},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:229,columnNumber:19},this),l.jsxDEV("td",{children:[ex(_),l.jsxDEV("small",{className:"block",children:["revision ",_.revision??0,_.last_seen?` · ${new Date(_.last_seen).toLocaleString()}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:230,columnNumber:40},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:230,columnNumber:19},this),l.jsxDEV("td",{children:tx(_)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:231,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:228,columnNumber:26},this):l.jsxDEV(l.Fragment,{children:[l.jsxDEV("td",{children:_.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:233,columnNumber:19},this),l.jsxDEV("td",{children:sx(_)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:234,columnNumber:19},this),l.jsxDEV("td",{children:rx(_)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:235,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:232,columnNumber:23},this)]},_.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:213,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:211,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:204,columnNumber:9},this):l.jsxDEV("p",{className:"empty",children:"This session has no missions."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:203,columnNumber:35},this),S.audit_tail.length>0&&l.jsxDEV("section",{className:"audit-tail","aria-label":"Mission audit tail",children:[l.jsxDEV("h3",{children:"Audit Tail"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:244,columnNumber:11},this),S.audit_tail.map((_,N)=>l.jsxDEV("p",{children:[l.jsxDEV("code",{children:_.ts?new Date(_.ts).toLocaleTimeString():"event"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:247,columnNumber:15},this)," ",String(_.event??"mission_event"),_.missionId||_.mission_id?l.jsxDEV(l.Fragment,{children:[" · ",l.jsxDEV("code",{children:$e(String(_.missionId??_.mission_id))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:249,columnNumber:59},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:249,columnNumber:54},this):null]},`${_.ts??"event"}-${N}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:246,columnNumber:13},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:243,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:185,columnNumber:5},this)}function JE(S){return S.workload_kind==="daemon"?`daemon health · desired ${S.desired_state??"unknown"}`:S.workload_kind==="persistent-agent"?`persistent retention · desired ${S.desired_state??"unknown"}`:S.workload_kind==="scheduled-collector"?`scheduled collection${S.schedule?` · ${S.schedule}`:""}`:S.workload_kind==="one-shot-command"?`one-shot terminal result · desired ${S.desired_state??"unknown"}`:S.workload_kind??"fleet workload"}function ex(S){const k=[S.runtime_session_id&&`session ${$e(S.runtime_session_id)}`,S.task_id&&`task ${$e(S.task_id)}`,S.command_id&&`command ${$e(S.command_id)}`].filter(Boolean);return k.length?k.join(" · "):"binding pending"}function tx(S){var k;return(k=S.artifacts)!=null&&k.length?l.jsxDEV("ul",{className:"fleet-artifacts",children:S.artifacts.map(U=>l.jsxDEV("li",{children:[ix(U.uri)?l.jsxDEV("a",{href:U.uri,children:U.kind},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:279,columnNumber:41},this):l.jsxDEV("span",{children:U.kind},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:279,columnNumber:86},this),l.jsxDEV("small",{className:"block",children:[l.jsxDEV("code",{children:U.sha256.slice(0,12)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:280,columnNumber:32},this)," · ",U.uri]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:280,columnNumber:7},this)]},`${U.kind}:${U.uri}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:278,columnNumber:5},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:277,columnNumber:10},this):l.jsxDEV("span",{className:"muted",children:"No artifacts yet"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Missions.tsx",lineNumber:276,columnNumber:42},this)}function ix(S){try{return["http:","https:"].includes(new URL(S).protocol)}catch{return!1}}function nx(S){return S.reduce((k,U)=>{var V;return(U.status==="awaiting-approval"||U.status==="input-required"||((V=U.backpressure)==null?void 0:V.reason)==="approval")&&(k.awaiting+=1),U.terminal?k.terminal+=1:k.active+=1,k},{active:0,awaiting:0,terminal:0})}function fy(S){return S.replace(/[^a-z0-9_-]/gi,"-")}function sx(S){return S.loop===void 0&&!S.max_iterations?"-":`${S.loop??0}/${S.max_iterations??"?"}`}function rx(S){return S.transport==="uhp"?`UHP ${S.endpoint_profile??"profile unknown"} · ${S.protocol_version??"version unknown"}`:S.transport==="a2a"?`A2A${S.task_id?` ${$e(S.task_id)}`:""}`:S.ralph_loop_id?`Ralph ${$e(S.ralph_loop_id)}`:S.task_id&&S.instance_id?`${$e(S.instance_id)} / ${$e(S.task_id)}`:S.target_agent?$e(S.target_agent):"-"}function ax(S,k=300){const[U,V]=J.useState(S);return J.useEffect(()=>{const X=setTimeout(()=>V(S),k);return()=>clearTimeout(X)},[S,k]),U}const ox=["all","skill","agent","command","rule","flow","behavior","hook","template","tool","addon","framework","extension","plugin","provider","document"];function Ym({onPick:S,autoFocus:k,compact:U,refreshTick:V=0}){const[X,ee]=J.useState(""),[$,c]=J.useState("all"),[b,_]=J.useState(null),[N,f]=J.useState(""),m=ax(X,300),w=J.useRef(null);return J.useEffect(()=>{var E;k&&((E=w.current)==null||E.focus())},[k]),J.useEffect(()=>{const E=p=>{var u;(p.ctrlKey||p.metaKey)&&p.key==="k"&&(p.preventDefault(),(u=w.current)==null||u.focus())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),J.useEffect(()=>{const E=m.trim();if(!E){_(null);return}let p=!0;return We(`/api/capabilities?q=${encodeURIComponent(E)}&type=${encodeURIComponent($)}&limit=12`).then(u=>{p&&(_(u.results),f(""))}).catch(u=>{p&&f(u.message)}),()=>{p=!1}},[m,$,V]),l.jsxDEV("div",{children:[l.jsxDEV("div",{className:"controls",children:[l.jsxDEV("input",{ref:w,type:"search",value:X,onChange:E=>ee(E.target.value),placeholder:"Search capabilities… (Ctrl/⌘-K)","aria-label":"Search capabilities",style:{minWidth:U?220:300}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:45,columnNumber:9},this),l.jsxDEV("select",{value:$,onChange:E=>c(E.target.value),"aria-label":"Capability type filter",children:ox.map(E=>l.jsxDEV("option",{value:E,children:E},E,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:48,columnNumber:29},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:44,columnNumber:7},this),N&&l.jsxDEV("p",{className:"err",children:N},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:51,columnNumber:15},this),b===null?l.jsxDEV("p",{className:"hint",children:"Type to search every indexed capability and artifact type."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:53,columnNumber:11},this):b.length?l.jsxDEV("div",{className:"capgrid",role:"listbox","aria-label":"Capability results",children:b.map(E=>{var p;return l.jsxDEV("button",{className:"capcard",role:"option","aria-selected":!1,onClick:()=>S(E),children:[l.jsxDEV("div",{className:"capcard-head",children:[l.jsxDEV("span",{className:"badge",children:E.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:61,columnNumber:21},this)," ",l.jsxDEV("strong",{children:E.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:61,columnNumber:61},this),l.jsxDEV("span",{className:"capcard-score",children:(E.score??0).toFixed(2)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:62,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:60,columnNumber:19},this),l.jsxDEV("div",{className:"capcard-cap",children:(E.capability||E.title||"").slice(0,110)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:64,columnNumber:19},this),(p=E.triggers)!=null&&p.length?l.jsxDEV("div",{className:"capcard-tags",children:E.triggers.slice(0,3).map(u=>l.jsxDEV("span",{className:"tag",children:u},u,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:66,columnNumber:88},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:66,columnNumber:23},this):null]},E.path,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:59,columnNumber:17},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:57,columnNumber:13},this):l.jsxDEV("p",{className:"empty",children:"No matches."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:55,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/CapabilitySearch.tsx",lineNumber:43,columnNumber:5},this)}const my={needed:!1,prompt:"",since:null,source:"snapshot"};let Xu={activeKey:null,entries:{}};const Pm=new Set;function Ku(S,k){return`${S}:${k}`}function py(S){return Ku(S.instance_id,S.id)}function lx(S){return Pm.add(S),()=>Pm.delete(S)}function Fm(){return Xu}function Xm(){return J.useSyncExternalStore(lx,Fm,Fm)}function cx(S){return Object.values(S.entries).filter(k=>k.responseNeeded.needed).map(k=>({id:`pty:${k.key}`,instance_id:k.instanceId,prompt:k.responseNeeded.prompt,source:k.responseNeeded.source,status:"response-needed",attach_url:k.metadata.attach_url}))}function ux(S,k=new Date().toISOString()){S.length&&Qm(U=>{const V={...U.entries};for(const X of S){const ee=py(X),$=V[ee];V[ee]={key:ee,instanceId:X.instance_id,sessionId:X.id,metadata:{...($==null?void 0:$.metadata)??{},...X},lastOutputAt:($==null?void 0:$.lastOutputAt)??null,unread:($==null?void 0:$.unread)??!1,responseNeeded:($==null?void 0:$.responseNeeded)??my,snapshot:($==null?void 0:$.snapshot)??null,attached:($==null?void 0:$.attached)??!1,updatedAt:k}}return{...U,entries:V}})}function Im(S,k,U=new Date().toISOString()){const V=S&&k?Ku(S,k):null;Qm(X=>{const ee={...X.entries};for(const[$,c]of Object.entries(ee))c.attached!==($===V)&&(ee[$]={...c,attached:$===V,updatedAt:U});return{activeKey:V,entries:ee}})}function hx(S,k,U=new Date().toISOString()){const V=Ku(S,k);by(V,X=>({...X,unread:!1,updatedAt:U}))}function dx(S,k,U,V={}){const X=Ku(S,k),ee=V.now??new Date().toISOString();by(X,$=>{var f;const c=((f=$.snapshot)==null?void 0:f.text)??"",b=U,_=b!==c,N=bx(b);return{...$,lastOutputAt:_?ee:$.lastOutputAt,unread:$.attached?!1:$.unread||_,responseNeeded:N?{needed:!0,prompt:N,since:$.responseNeeded.prompt===N?$.responseNeeded.since:ee,source:V.source??"snapshot"}:{...my,source:V.source??"snapshot"},snapshot:{text:b,lines:mx(b),fetchedAt:ee,seq:V.seq},updatedAt:ee}})}function by(S,k){Qm(U=>{const V=U.entries[S];return V?{...U,entries:{...U.entries,[S]:k(V)}}:U})}function Qm(S){const k=S(Xu);k!==Xu&&(Xu=k,fx())}function fx(){for(const S of Pm)S()}function mx(S,k=24){return S.replace(/\r/g,`
|
|
305
|
+
`).split(`
|
|
306
|
+
`).filter(Boolean).slice(-k)}function px(S){return S.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[()][A-Za-z0-9]/g,"")}function bx(S){const U=px(S).replace(/\r/g,`
|
|
307
|
+
`).split(`
|
|
308
|
+
`).map(ee=>ee.trim()).filter(Boolean).slice(-24),V=U.join(`
|
|
309
|
+
`);return[/Enter to select\b/i,/(?:↑|up)\/(?:↓|down)|arrow keys|navigate/i,/\bEsc to cancel\b/i,/\b(?:y\/n|Y\/n|y\/N|\[y\/N\]|\[Y\/n\])\b/,/\b(?:choose|select|pick) (?:one|an option|a number)\b/i,/\?$/].some(ee=>ee.test(V))?U.slice(-10).join(`
|
|
310
|
+
`).slice(0,900):""}function gx(S=12e3){Xm();const k=J.useRef(new Set);J.useEffect(()=>{let U=!1,V;const X=($=S)=>{V=window.setTimeout(ee,$)},ee=async()=>{if(U)return;if(document.hidden){X(S);return}const $=Object.values(Fm().entries).filter(c=>!c.attached).filter(c=>c.metadata.has_screen!==!1).filter(c=>!k.current.has(`${c.instanceId}:${c.sessionId}`));await Promise.all($.map(async c=>{const b=`${c.instanceId}:${c.sessionId}`;try{const _=await Gm(`/api/instances/${encodeURIComponent(c.instanceId)}/sessions/${encodeURIComponent(c.sessionId)}/screen`);if(!_.ok){_.status===404&&k.current.add(b);return}const N=await _.json(),f=String(N.text??N.snapshot??N.screen??N.content??""),m=N.seq??N.sequence??N.anchor_sequence??N.anchorSequence;dx(c.instanceId,c.sessionId,f,{seq:typeof m=="number"?m:void 0})}catch{}})),U||X(S)};return X(0),()=>{U=!0,V!==void 0&&window.clearTimeout(V)}},[S])}function vx({session:S,composer:k,setComposer:U,onRequestStart:V,refreshMs:X=5e3,refreshTick:ee=0}){var Nt;const[$,c]=J.useState([]),[b,_]=J.useState([]),[N,f]=J.useState(""),[m,w]=J.useState(""),[E,p]=J.useState(""),[u,h]=J.useState(!1),[a,o]=J.useState(""),[v,x]=J.useState(""),[C,D]=J.useState(""),[y,T]=J.useState(""),[R,W]=J.useState(""),I=J.useRef(""),B=J.useRef(!1),ie=J.useRef(""),se=J.useRef(0),ne=J.useRef(0),de=J.useRef(0),ce=J.useRef(null),M=Xm();gx(),J.useEffect(()=>{I.current=N},[N]),J.useEffect(()=>{B.current=S.state.attached},[S.state.attached]);const z=ge=>{var Je;const Te=k&&!k.endsWith(" ")?" ":"";U(k+Te+dy(ge.type,ge.name)),h(!1),(Je=ce.current)==null||Je.focus()},L=J.useCallback(async()=>{var ut;const ge=se.current+1;se.current=ge;const Te=await We("/api/inventory");if(ge!==se.current)return;const Je=Sx(Te.instances).filter(ct=>{var bt;return ct.state==="running"&&((bt=ct.session_backends)==null?void 0:bt.length)});c(Je);const Ie=I.current;let Ye=((ut=Je[0])==null?void 0:ut.id)??"";(Ie&&Je.some(ct=>ct.id===Ie)||B.current&&Ie)&&(Ye=Ie),I.current=Ye,f(Ye),p(ct=>{const bt=Je.find(Ot=>Ot.id===Ye)??Je[0];if(ct&&(bt!=null&&bt.session_backends.some(Ot=>`${Ot.mode}:${Ot.backend}`===ct&&Ot.available!==!1))||B.current&&ct)return ct;const wt=(bt==null?void 0:bt.session_backends.find(Ot=>Ot.available!==!1))??(bt==null?void 0:bt.session_backends[0]);return wt?`${wt.mode}:${wt.backend}`:""})},[]);J.useEffect(()=>{ie.current=y||ny(S.state.url)},[y,S.state.url]);const P=J.useCallback(async ge=>{if(!ge)return;const Te=ne.current+1;ne.current=Te;const Je=await We(`/api/sessions?instance=${encodeURIComponent(ge)}`);if(Te!==ne.current||ge!==I.current)return;const Ie=Je.sessions??[];ux(Ie),_(Ie),D(""),w(Ye=>Ye&&Ie.some(ut=>or(ut)===Ye)||B.current&&ie.current===ge&&Ye?Ye:Ie[0]?or(Ie[0]):"")},[]);J.useEffect(()=>{let ge=!1,Te,Je=X;const Ie=ut=>{Te=window.setTimeout(Ye,ut)},Ye=async()=>{if(!ge){if(a){Ie(X);return}try{const ut=I.current;await L(),ut&&ut===I.current&&await P(I.current),Je=X}catch(ut){ge||D(ut.message),Je=Math.min(Math.max(X,Je*2),3e4)}ge||Ie(Je)}};return Ye(),()=>{ge=!0,Te!==void 0&&window.clearTimeout(Te)}},[a,P,L,X,ee]),J.useEffect(()=>{N&&(_([]),D(""),P(N).catch(ge=>D(ge.message)))},[N,P]);const ue=S.state.attached,pe=S.state.role==="controller"?"controller":"observer",ve=$.find(ge=>ge.id===N),Ce=(ve==null?void 0:ve.session_backends)??[],Y=Ce.find(ge=>`${ge.mode}:${ge.backend}`===E)??Ce.find(ge=>ge.available!==!1)??Ce[0],H=(Nt=Ce.find(ge=>ge.available===!1))==null?void 0:Nt.reason,me=ve?sy(ve):!1,ae=b.find(ge=>or(ge)===m),oe=y||ny(S.state.url),ye=oe&&R?`${oe}:${R}`:yx(S.state.url),be=S.state.target??(oe&&R?{instanceId:oe,sessionId:R}:null),ze=ue&&oe===N&&R&&!b.some(ge=>or(ge)===ye)?[...b,{id:R,instance_id:N,attach_url:S.state.url??"",session_name:"attached session",session_backend:Y==null?void 0:Y.backend,session_class:Y==null?void 0:Y.mode}]:b,qe=()=>{S.sendInput(k,be)&&U("")},Le=(ge,Te)=>{T(ge.instance_id||N),W(String(ge.id)),Im(ge.instance_id||N,String(ge.id)),S.attach(ge.attach_url,!1,Te,{instanceId:ge.instance_id||N,sessionId:String(ge.id)})},De=(ge,Te)=>{T(ge.instance_id||N),W(String(ge.id)),Im(ge.instance_id||N,String(ge.id)),S.replay(ge.attach_url,Te,{instanceId:ge.instance_id||N,sessionId:String(ge.id)})},Wt=()=>{T(""),W(""),Im(null,null),S.detach()};J.useEffect(()=>{const ge=b.find(Te=>or(Te)===m);ge&&hx(ge.instance_id,String(ge.id))},[m,b]),J.useEffect(()=>{if(!S.state.url||!oe||oe!==N)return;if(b.some(Te=>or(Te)===ye)){de.current=0;return}b.length&&(de.current+=1,de.current>=2&&Wt())},[ye,oe,N,S.state.url,b]),J.useEffect(()=>{if(!ve)return;if(!ve.session_backends.some(Te=>`${Te.mode}:${Te.backend}`===E)){const Te=ve.session_backends.find(Je=>Je.available)??ve.session_backends[0];p(Te?`${Te.mode}:${Te.backend}`:"")}},[E,ve]);const Ii=async ge=>{const Te=ge??ae;if(!ve||!Te)return;const Je=Te.session_name??Te.id;if(confirm(`End session ${Je}? This closes the PTY and detaches connected views.`)){o(Te.id),D("");try{await We(`/api/instances/${encodeURIComponent(ve.id)}/sessions/${encodeURIComponent(Te.id)}`,{method:"DELETE"}),or(Te)===ye&&Wt(),await P(ve.id)}catch(Ie){D(Ie.message)}finally{o("")}}},Ae=async()=>{if(ve){x(ve.id),D("");try{await We(`/api/instances/${encodeURIComponent(ve.id)}/reconnect`,{method:"POST"}),await L(),await P(ve.id)}catch(ge){D(ge.message)}finally{x("")}}};return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:[l.jsxDEV("strong",{children:"Workspace."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:242,columnNumber:9},this)," Pick an instance on the left, then a session under it to observe or drive. Start a new session per instance, or open a live task from the ",l.jsxDEV("strong",{children:"Running"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:243,columnNumber:72},this)," fleet board."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:241,columnNumber:7},this),l.jsxDEV("div",{className:"session-workspace",children:[l.jsxDEV("aside",{className:"session-nav","aria-label":"Instances and sessions",children:[l.jsxDEV("div",{className:"session-nav-head",children:[l.jsxDEV("h2",{children:"Instances"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:249,columnNumber:13},this),l.jsxDEV("span",{className:"hint",children:$.length},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:250,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:248,columnNumber:11},this),!$.length&&l.jsxDEV("p",{className:"empty",children:"No running instances with session metadata."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:252,columnNumber:33},this),l.jsxDEV("ul",{className:"nav-list",children:$.map(ge=>{var Ie;const Te=ge.id===N,Je=((Ie=ge.launch_context)==null?void 0:Ie.name)??$e(ge.id);return l.jsxDEV("li",{className:`nav-instance${Te?" selected":""}`,children:[l.jsxDEV("button",{className:"nav-instance-row","aria-expanded":Te,onClick:()=>f(ge.id),title:ge.id,children:[l.jsxDEV("span",{className:`badge isolation-${ge.runtime_posture.isolation}`,children:ge.runtime},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:260,columnNumber:21},this),l.jsxDEV("span",{className:"nav-instance-name",children:Je},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:261,columnNumber:21},this),l.jsxDEV("span",{className:`state ${ge.state}`,children:[l.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:262,columnNumber:58},this),ge.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:262,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:259,columnNumber:19},this),Te&&l.jsxDEV("div",{className:"nav-sessions",children:[ze.length===0&&l.jsxDEV("p",{className:"empty nav-empty",children:sy(ge)?"Agent unreachable; reconnect to recover existing sessions.":"No sessions yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:267,columnNumber:25},this),l.jsxDEV("ul",{children:ze.map(Ye=>{const ut=or(Ye),ct=ut===m,bt=ut===ye&&ue,wt=M.entries[py(Ye)];return l.jsxDEV("li",{children:[l.jsxDEV("button",{className:`nav-session${ct?" selected":""}${bt?" live":""}`,onClick:()=>{const Ot=S.state.role==="controller"&&(Y==null?void 0:Y.drive)!==!1?"controller":"observer";w(ut),ut===ye&&ue?De(Ye,Ot):Le(Ye,Ot)},title:Ye.id,children:[l.jsxDEV("span",{className:"nav-session-name",children:$m(Ye)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:296,columnNumber:33},this),l.jsxDEV("span",{className:"nav-session-meta",children:_x(Ye)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:297,columnNumber:33},this),wx(Ye)&&l.jsxDEV("span",{className:"badge controller",title:"A controller is connected",children:"ctrl"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:298,columnNumber:63},this),(wt==null?void 0:wt.unread)&&l.jsxDEV("span",{className:"badge unread",title:"Unread output",children:"unread"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:299,columnNumber:59},this),(wt==null?void 0:wt.responseNeeded.needed)&&l.jsxDEV("span",{className:"badge response",title:"Response needed",children:"response"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:300,columnNumber:74},this),bt&&l.jsxDEV("span",{className:"badge live-dot",title:"Attached here",children:"●"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:301,columnNumber:42},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:279,columnNumber:31},this),l.jsxDEV("button",{className:"nav-session-end","aria-label":`End session ${$m(Ye)}`,title:"End this PTY session",disabled:a===Ye.id,onClick:()=>Ii(Ye),children:a===Ye.id?"…":"×"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:303,columnNumber:31},this)]},Ye.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:278,columnNumber:29},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:271,columnNumber:23},this),l.jsxDEV("button",{className:"cta-sm nav-new-session",disabled:Ce.length>0&&(Y==null?void 0:Y.available)===!1,onClick:()=>V(ge.id),children:"+ New session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:316,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:265,columnNumber:21},this)]},ge.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:258,columnNumber:17},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:253,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:247,columnNumber:9},this),l.jsxDEV("section",{className:"session-main",children:[l.jsxDEV("div",{className:"controls",children:[Ce.length>1&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"sel-backend",children:"Mode"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:329,columnNumber:17},this),l.jsxDEV("select",{id:"sel-backend",value:E,onChange:ge=>p(ge.target.value),children:Ce.map(ge=>l.jsxDEV("option",{value:`${ge.mode}:${ge.backend}`,disabled:!ge.available,children:[ge.mode," · ",ge.backend,ge.available?"":` — ${ge.reason??"unsupported"}`]},`${ge.mode}:${ge.backend}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:331,columnNumber:40},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:330,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:328,columnNumber:15},this),l.jsxDEV("span",{className:"controls-active",title:ae==null?void 0:ae.id,children:ae?$m(ae):"— no session selected —"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:335,columnNumber:13},this),l.jsxDEV("button",{disabled:!ae||ue&&S.state.role==="observer",onClick:()=>ae&&Le(ae,"observer"),children:"Observe"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:336,columnNumber:13},this),l.jsxDEV("button",{disabled:!ae||(Y==null?void 0:Y.drive)===!1||ue&&S.state.role==="controller",onClick:()=>ae&&Le(ae,"controller"),children:ue&&S.state.role==="observer"?"Take Control":"Drive"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:337,columnNumber:13},this),l.jsxDEV("button",{disabled:!ue||(Y==null?void 0:Y.keyframe)===!1,onClick:S.requestKeyframe,children:"Keyframe"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:340,columnNumber:13},this),l.jsxDEV("button",{disabled:!ue,onClick:()=>ae&&De(ae,pe),children:"Reattach + replay"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:341,columnNumber:13},this),l.jsxDEV("button",{disabled:!ue,onClick:Wt,children:"Detach"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:342,columnNumber:13},this),me&&l.jsxDEV("button",{disabled:v===(ve==null?void 0:ve.id),onClick:Ae,children:v===(ve==null?void 0:ve.id)?"Reconnecting…":"Reconnect"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:344,columnNumber:15},this),S.state.role&&l.jsxDEV("span",{className:`badge ${S.state.role}`,children:S.state.role},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:348,columnNumber:36},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:326,columnNumber:11},this),C&&l.jsxDEV("p",{className:"err",children:["Session action failed: ",C]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:350,columnNumber:26},this),ve&&l.jsxDEV("p",{className:"hint",children:[ve.runtime_posture.label," · ",ve.transport.label," (",ve.transport.mode,") · attach starts as observe unless control is explicitly granted.",ue&&S.state.role==="observer"?" Click Take Control to re-attach with write access.":"",Y&&!Y.available?` ${Y.reason??"Selected backend is unavailable."}`:"",me?` Agent is unreachable while the runtime is still running. ${H??"Reconnect can re-register the agent without restarting the instance."}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:352,columnNumber:13},this),l.jsxDEV("div",{className:"terminal",ref:S.openTerminal,role:"log","aria-label":"Session output"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:359,columnNumber:11},this),u&&l.jsxDEV("div",{className:"picker",children:[l.jsxDEV("p",{className:"hint",style:{marginTop:0},children:"Pick a capability to insert into the command — then Send to inject it. (Lookup is UI; the agent runs it.)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:362,columnNumber:15},this),l.jsxDEV(Ym,{compact:!0,autoFocus:!0,onPick:z},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:363,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:361,columnNumber:13},this),l.jsxDEV("div",{className:"inputrow",children:[l.jsxDEV("button",{"aria-label":"Insert a capability",title:"Insert a capability (search)",onClick:()=>h(ge=>!ge),children:"+"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:367,columnNumber:13},this),l.jsxDEV("input",{ref:ce,value:k,onChange:ge=>U(ge.target.value),onKeyDown:ge=>{ge.key==="Enter"&&qe()},placeholder:S.isController?"Type to drive the session…":"Observing — input is read-only",disabled:!S.isController,"aria-label":"Session input"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:368,columnNumber:13},this),l.jsxDEV("button",{disabled:!S.isController,onClick:qe,children:"Send"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:377,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:366,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:325,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:245,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Sessions.tsx",lineNumber:240,columnNumber:5},this)}function $m(S){return S.session_name??$e(S.id)}function _x(S){const k=`${S.session_class??"managed"}/${S.session_backend??"tmux"}`;if(!S.membership)return k;const U=S.membership.attachment_count;return`${k} · ${U} viewer${U===1?"":"s"}`}function wx(S){var k;return(((k=S.membership)==null?void 0:k.controllers.length)??0)>0}function or(S){return`${S.instance_id}:${S.id}`}function yx(S){const k=gy(S);return k?`${k.instanceId}:${k.sessionId}`:""}function gy(S){if(!S)return null;const k=/\/agents\/([^/]+)\/sessions\/([^/]+)\/attach/;try{const V=new URL(S).pathname.match(k);return V?{instanceId:decodeURIComponent(V[1]),sessionId:decodeURIComponent(V[2])}:null}catch{const U=S.match(k);return U?{instanceId:decodeURIComponent(U[1]),sessionId:decodeURIComponent(U[2])}:null}}function ny(S){var k;return((k=gy(S))==null?void 0:k.instanceId)??""}function Sx(S){const k=new Set;return S.filter(U=>k.has(U.id)?!1:(k.add(U.id),!0))}const Nx=["docker","container","vm","qemu","kvm"];function sy(S){var X,ee;const k=String(((X=S.runtime_posture)==null?void 0:X.kind)??S.runtime).toLowerCase(),U=String(S.state).toLowerCase()==="running",V=S.agent_ready===!1||((ee=S.session_backends)==null?void 0:ee.some($=>$.available===!1));return U&&Nx.includes(k)&&!!V}function Ex({refreshTick:S=0,responses:k=[],goSessions:U}){const[V,X]=J.useState(null),[ee,$]=J.useState(""),c=J.useCallback(()=>{We("/api/approvals?status=pending").then(_=>{X(_.approvals),$("")}).catch(_=>$(_.message))},[]);J.useEffect(()=>{c()},[c,S]);const b=(_,N)=>We(`/api/approvals/${encodeURIComponent(_)}?decision=${N}`,{method:"POST"}).then(c).catch(f=>alert(f.message));return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:["Unified response-needed inbox — formal ",l.jsxDEV("code",{children:"hitl-prompt/v1"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:22,columnNumber:66},this)," approvals, provider prompts, and agent sessions waiting for human input."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:22,columnNumber:7},this),ee&&l.jsxDEV("p",{className:"err",children:ee},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:23,columnNumber:15},this),k.length>0&&l.jsxDEV("section",{className:"response-needed","aria-label":"Sessions waiting for response",children:[l.jsxDEV("h2",{children:"Response Needed"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:26,columnNumber:11},this),k.map(_=>l.jsxDEV("article",{className:"response-item",children:[l.jsxDEV("div",{children:[l.jsxDEV("strong",{children:_.source==="pty"?"Interactive session prompt":_.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:30,columnNumber:17},this),l.jsxDEV("p",{children:_.prompt},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:31,columnNumber:17},this),l.jsxDEV("span",{children:[l.jsxDEV("code",{children:$e(_.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:32,columnNumber:23},this)," · ",_.status]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:32,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:29,columnNumber:15},this),U&&l.jsxDEV("button",{onClick:U,children:"Open Session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:34,columnNumber:30},this)]},_.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:28,columnNumber:13},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:25,columnNumber:9},this),V?!V.length&&!k.length?l.jsxDEV("p",{className:"empty",children:"No pending approvals or responses."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:40,columnNumber:48},this):V.length?l.jsxDEV("table",{children:[l.jsxDEV("caption",{children:[V.length," approval request(s) awaiting your decision"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:43,columnNumber:15},this),l.jsxDEV("thead",{children:l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Request"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:26},this),l.jsxDEV("th",{scope:"col",children:"Risk"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:54},this),l.jsxDEV("th",{scope:"col",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:79},this),l.jsxDEV("th",{scope:"col",children:"Decision"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:108},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:22},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:44,columnNumber:15},this),l.jsxDEV("tbody",{children:V.map(_=>l.jsxDEV("tr",{children:[l.jsxDEV("td",{children:_.prompt},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:48,columnNumber:21},this),l.jsxDEV("td",{children:l.jsxDEV("span",{className:`badge ${_.risk==="high"?"high":""}`,children:_.risk},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:49,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:49,columnNumber:21},this),l.jsxDEV("td",{children:l.jsxDEV("code",{title:_.instance_id,children:$e(_.instance_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:50,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:50,columnNumber:21},this),l.jsxDEV("td",{style:{whiteSpace:"nowrap"},children:[l.jsxDEV("button",{onClick:()=>b(_.id,"approve"),children:"Approve"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:52,columnNumber:23},this)," ",l.jsxDEV("button",{onClick:()=>b(_.id,"deny"),children:"Deny"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:53,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:51,columnNumber:21},this)]},_.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:47,columnNumber:19},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:45,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:42,columnNumber:13},this):null:l.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:39,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Approvals.tsx",lineNumber:21,columnNumber:5},this)}function xx({refreshTick:S=0}){const[k,U]=J.useState(null),[V,X]=J.useState(null),[ee,$]=J.useState("requirements"),[c,b]=J.useState(null),[_,N]=J.useState(""),[f,m]=J.useState("docs"),[w,E]=J.useState(""),[p,u]=J.useState(""),[h,a]=J.useState(!1),o=()=>{We("/api/index/status").then(R=>{X(R),a(!1),u("")}).catch(R=>{u(R.message),a(!0)})};J.useEffect(()=>{o()},[S]);const v=R=>{U(null),u("");const W=`type=${encodeURIComponent(R.type)}&name=${encodeURIComponent(R.name)}&path=${encodeURIComponent(R.path)}`;We(`/api/show?${W}`).then(U).catch(I=>u(I.message))},x=async()=>{const R=ee.trim();if(R){E("query"),u("");try{b(await We(`/api/index/query?q=${encodeURIComponent(R)}&limit=8`))}catch(W){u(W.message)}finally{E("")}}},C=async()=>{E("rebuild"),u("");try{const R=await We("/api/index/rebuild",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({all:!0})});X(R.status),b(null)}catch(R){u(R.message)}finally{E("")}},D=async()=>{if(!(!_.trim()||!f.trim())){E("create"),u("");try{await We("/api/index/graphs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:_.trim(),scanDirs:f.split(",").map(R=>R.trim()).filter(Boolean)})}),N(""),o()}catch(R){u(R.message)}finally{E("")}}},y=(V==null?void 0:V.graphs)??[],T=(c==null?void 0:c.results)??[];return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:["Read-only catalog from the AIWG registry — display, not execution. To ",l.jsxDEV("em",{children:"run"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:93,columnNumber:79},this)," a capability, inject it into a session (Actions/Sessions). Search modeled on the fortemi-react patterns."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:92,columnNumber:7},this),p&&l.jsxDEV("p",{className:"err",children:[p,V?" — showing last-known index state.":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:96,columnNumber:15},this),l.jsxDEV("section",{className:"index-live","aria-label":"Live index status",children:[l.jsxDEV("div",{className:"section-toolbar",children:[l.jsxDEV("div",{children:[l.jsxDEV("h2",{children:"Live Index"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:100,columnNumber:13},this),l.jsxDEV("p",{className:"hint",children:[V?`${V.summary.built}/${V.summary.total} graphs built, ${V.summary.missing} missing, ${V.summary.orphans} orphan dirs.`:"Loading index status.",h&&V?" Stale: live refresh is temporarily unavailable.":""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:99,columnNumber:11},this),l.jsxDEV("div",{className:"manage-actions",children:[l.jsxDEV("button",{onClick:o,disabled:w==="rebuild",children:"Refresh"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:109,columnNumber:13},this),l.jsxDEV("button",{onClick:C,disabled:w==="rebuild",children:w==="rebuild"?"Rebuilding...":"Rebuild all"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:110,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:108,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:98,columnNumber:9},this),l.jsxDEV("div",{className:"index-grid",children:y.map(R=>l.jsxDEV("article",{className:R.missing?"index-graph missing":"index-graph",children:[l.jsxDEV("div",{children:[l.jsxDEV("strong",{children:R.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:116,columnNumber:20},this)," ",l.jsxDEV("span",{className:"badge",children:R.origin},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:116,columnNumber:46},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:116,columnNumber:15},this),l.jsxDEV("p",{children:[R.built?`${R.entries??0} entries`:"not built",R.ageHours!==null?` · ${R.ageHours}h old`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:117,columnNumber:15},this)]},R.name,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:115,columnNumber:13},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:113,columnNumber:9},this),l.jsxDEV("div",{className:"index-query",children:[l.jsxDEV("label",{children:["Index query",l.jsxDEV("input",{value:ee,onChange:R=>$(R.target.value),onKeyDown:R=>{R.key==="Enter"&&x()}},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:124,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:122,columnNumber:11},this),l.jsxDEV("button",{onClick:x,disabled:w==="query",children:w==="query"?"Searching...":"Search index"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:121,columnNumber:9},this),l.jsxDEV("div",{className:"index-query","aria-label":"Create user index graph",children:[l.jsxDEV("label",{children:["New graph name",l.jsxDEV("input",{value:_,onChange:R=>N(R.target.value),placeholder:"references"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:131,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:129,columnNumber:11},this),l.jsxDEV("label",{children:["Scan directories (comma-separated)",l.jsxDEV("input",{value:f,onChange:R=>m(R.target.value),placeholder:"docs,research"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:135,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:133,columnNumber:11},this),l.jsxDEV("button",{onClick:D,disabled:w==="create"||!_.trim(),children:w==="create"?"Creating...":"Create graph"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:137,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:128,columnNumber:9},this),c&&l.jsxDEV("div",{className:"index-results","aria-label":"Index query results",children:T.length?T.map(R=>l.jsxDEV("article",{children:[l.jsxDEV("strong",{children:R.title||R.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:144,columnNumber:19},this),l.jsxDEV("p",{children:R.summary||R.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:145,columnNumber:19},this),l.jsxDEV("small",{children:[R.type||"artifact",R.phase?` · ${R.phase}`:"",typeof R.score=="number"?` · ${R.score.toFixed(2)}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:146,columnNumber:19},this)]},R.path,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:143,columnNumber:17},this)):l.jsxDEV("p",{className:"empty",children:"No index hits."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:149,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:140,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:97,columnNumber:7},this),l.jsxDEV("div",{className:"grid2",children:[l.jsxDEV(Ym,{onPick:v,autoFocus:!0,refreshTick:S},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:154,columnNumber:9},this),l.jsxDEV("div",{role:"region","aria-label":"Capability detail",children:k?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("div",{style:{marginBottom:8},children:[l.jsxDEV("span",{className:"badge",children:k.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:160,columnNumber:50},this)," ",l.jsxDEV("strong",{children:k.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:160,columnNumber:93},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:160,columnNumber:17},this),l.jsxDEV("div",{className:"terminal",style:{maxHeight:"52vh"},children:k.body},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:161,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:159,columnNumber:15},this):l.jsxDEV("p",{className:"empty",children:"Select a capability to inspect its definition."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:157,columnNumber:15},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:155,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:153,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Explore.tsx",lineNumber:91,columnNumber:5},this)}function Cx({session:S,setComposer:k,goSessions:U}){const[V,X]=J.useState(null),[ee,$]=J.useState(!1),[c,b]=J.useState(""),_=J.useCallback(()=>{We("/api/library").then(w=>{X(w.library),b("")}).catch(w=>b(w.message))},[]);J.useEffect(()=>{_()},[_]);const N=async w=>{try{await We(`/api/library/clone?type=${encodeURIComponent(w.type)}&name=${encodeURIComponent(w.name)}&path=${encodeURIComponent(w.path)}`,{method:"POST"}),$(!1),_()}catch(E){b(E.message)}},f=w=>{confirm(`Remove "${w.name}" from your library? (Your copy only — AIWG is untouched.)`)&&We(`/api/library/${encodeURIComponent(w.name)}`,{method:"DELETE"}).then(_).catch(E=>alert(E.message))},m=w=>{const E=dy(w.type,w.name.replace(/\.(md|markdown|ya?ml|json)$/i,""));S.isController&&S.state.target&&S.sendInput(E,S.state.target)||k(E),U()};return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:["Your ",l.jsxDEV("strong",{children:"own"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:39,columnNumber:14},this)," assets — copied, cloned, or imported. Edit them freely; ",l.jsxDEV("strong",{children:"AIWG install files are never touched"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:39,columnNumber:91},this),". Stored on disk under ",l.jsxDEV("code",{children:"~/.aiwg/cockpit/library"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:40,columnNumber:48},this),". Deploying one into a project is an agent action (Use → inject into a session)."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:38,columnNumber:7},this),c&&l.jsxDEV("p",{className:"err",children:c},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:43,columnNumber:15},this),l.jsxDEV("div",{className:"controls",children:l.jsxDEV("button",{onClick:()=>$(w=>!w),children:ee?"Close":"+ Clone from catalog"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:45,columnNumber:9},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:44,columnNumber:7},this),ee&&l.jsxDEV("div",{className:"picker",children:[l.jsxDEV("p",{className:"hint",style:{marginTop:0},children:"Search the AIWG catalog and clone a copy into your library."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:49,columnNumber:11},this),l.jsxDEV(Ym,{compact:!0,autoFocus:!0,onPick:N},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:48,columnNumber:9},this),V?V.length?l.jsxDEV("table",{children:[l.jsxDEV("caption",{children:[V.length," asset(s) in your library"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:57,columnNumber:15},this),l.jsxDEV("thead",{children:l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:58,columnNumber:26},this),l.jsxDEV("th",{scope:"col",children:"Type"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:58,columnNumber:51},this),l.jsxDEV("th",{scope:"col",children:"Origin"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:58,columnNumber:76},this),l.jsxDEV("th",{scope:"col",children:"Actions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:58,columnNumber:103},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:58,columnNumber:22},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:58,columnNumber:15},this),l.jsxDEV("tbody",{children:V.map(w=>l.jsxDEV("tr",{children:[l.jsxDEV("td",{children:l.jsxDEV("strong",{children:w.name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:62,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:62,columnNumber:21},this),l.jsxDEV("td",{children:l.jsxDEV("span",{className:"badge",children:w.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:63,columnNumber:25},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:63,columnNumber:21},this),l.jsxDEV("td",{children:w.origin},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:64,columnNumber:21},this),l.jsxDEV("td",{style:{whiteSpace:"nowrap"},children:[l.jsxDEV("button",{onClick:()=>m(w),children:"Use"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:66,columnNumber:23},this)," ",l.jsxDEV("button",{onClick:()=>f(w),"aria-label":`Remove ${w.name}`,children:"Remove"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:67,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:65,columnNumber:21},this)]},w.name,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:61,columnNumber:19},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:59,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:56,columnNumber:13},this):l.jsxDEV("p",{className:"empty",children:"Your library is empty. Clone a capability from the catalog to get a copy you can modify."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:54,columnNumber:27},this):l.jsxDEV("p",{className:"empty",children:"Loading…"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:53,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Library.tsx",lineNumber:37,columnNumber:5},this)}function Ax({refreshTick:S=0,session:k,setComposer:U,goSessions:V}){const[X,ee]=J.useState([]),[$,c]=J.useState([]),[b,_]=J.useState([]),[N,f]=J.useState(""),[m,w]=J.useState("");J.useEffect(()=>{We("/api/contributions").then(a=>{ee(a.actions??[]),c(a.screens??[]),_(a.workflows??[])}).catch(a=>f(a.message))},[S]);const E=async a=>{let o=a.inject.command;if(a.inject.needs_args){const v=prompt(`Arguments for ${a.title}${a.inject.args_hint?` (${a.inject.args_hint})`:""}:`,"");if(v===null)return;v.trim()&&(o+=" "+v.trim())}await We("/api/audit/intent",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({event:"action.inject.requested",detail:{action_id:a.id,source:a.source,target:a.inject.target??"focused",command:o,controller_attached:k.isController}})}).catch(()=>{}),k.isController&&k.state.target&&k.sendInput(o,k.state.target)?w(`Injected "${o}" into the attached session — the agent runs it.`):(U(o),w(`Ready to inject "${o}". Attach to a session (drive) or start one, then Send.`)),V()},p=async a=>{var o;await((o=navigator.clipboard)==null?void 0:o.writeText(a.inject.command)),w(`Copied "${a.inject.command}" to the clipboard.`)},u=new Map(X.map(a=>[a.id,a])),h=a=>{if(a.source==="cockpit://index/live"){window.location.hash="#explore",w("Opened the contributed Live Index screen.");return}if(a.source==="cockpit://issues/workbench"){window.location.hash="#actions",w("Issue Workbench is available here through the contributed issue actions and workflows.");return}w(`Unsupported contributed screen source: ${a.source}`)};return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:["Actions are ",l.jsxDEV("strong",{children:"contributed declaratively"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:73,columnNumber:21},this),". Clicking one ",l.jsxDEV("strong",{children:"injects a command into an agentic session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:73,columnNumber:78},this)," ","(focused, else it offers a new one); the agent runs it. The Cockpit never runs the CLI — agents do."]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:72,columnNumber:7},this),N&&l.jsxDEV("p",{className:"err",children:N},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:76,columnNumber:15},this),l.jsxDEV("div",{className:"controls",role:"group","aria-label":"Contributed actions",children:X.length?X.map(a=>l.jsxDEV("span",{className:"action-cluster",children:[l.jsxDEV("button",{className:"act",title:`injects: ${a.inject.command}`,onClick:()=>E(a),children:[a.icon?a.icon+" ":"",a.title]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:81,columnNumber:15},this),a.trust_tier==="sandboxed-third-party"&&l.jsxDEV("span",{className:"badge",children:"sandboxed"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:84,columnNumber:60},this),l.jsxDEV("button",{className:"copy-command","aria-label":`Copy CLI command for ${a.title}`,title:a.inject.command,onClick:()=>p(a),children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:85,columnNumber:15},this)]},a.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:80,columnNumber:13},this)):l.jsxDEV("p",{className:"empty",children:"No contributed actions."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:90,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:77,columnNumber:7},this),l.jsxDEV("div",{className:"contrib-layout",children:[l.jsxDEV("section",{"aria-label":"Contributed screens",children:[l.jsxDEV("div",{className:"section-toolbar",children:l.jsxDEV("h2",{children:"Screens"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:95,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:94,columnNumber:11},this),l.jsxDEV("div",{className:"contrib-grid",children:$.length?$.map(a=>l.jsxDEV("article",{className:"contrib-item",children:[l.jsxDEV("strong",{children:a.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:101,columnNumber:19},this),l.jsxDEV("p",{children:a.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:102,columnNumber:19},this),l.jsxDEV("button",{onClick:()=>h(a),children:"Open"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:103,columnNumber:19},this)]},a.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:100,columnNumber:17},this)):l.jsxDEV("p",{className:"empty",children:"No contributed screens."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:106,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:93,columnNumber:9},this),l.jsxDEV("section",{"aria-label":"Contributed workflows",children:[l.jsxDEV("div",{className:"section-toolbar",children:l.jsxDEV("h2",{children:"Workflows"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:111,columnNumber:13},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:110,columnNumber:11},this),l.jsxDEV("div",{className:"contrib-grid",children:b.length?b.map(a=>l.jsxDEV("article",{className:"contrib-item",children:[l.jsxDEV("strong",{children:a.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:117,columnNumber:19},this),a.description&&l.jsxDEV("p",{children:a.description},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:118,columnNumber:37},this),l.jsxDEV("div",{className:"workflow-steps",children:a.steps.map((o,v)=>{const x=u.get(o.action);return l.jsxDEV("button",{disabled:!x,onClick:()=>x&&E(x),children:o.label||(x==null?void 0:x.title)||o.action},`${a.id}-${v}-${o.action}`,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:123,columnNumber:25},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:119,columnNumber:19},this)]},a.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:116,columnNumber:17},this)):l.jsxDEV("p",{className:"empty",children:"No contributed workflows."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:131,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:113,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:109,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:92,columnNumber:7},this),l.jsxDEV("p",{className:"empty",children:m||"Output appears in the session terminal — actions drop a command into a session and the agent executes it."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:135,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Actions.tsx",lineNumber:71,columnNumber:5},this)}function Dx({refreshTick:S=0}){const[k,U]=J.useState(null),[V,X]=J.useState(null),[ee,$]=J.useState(null),[c,b]=J.useState(null),[_,N]=J.useState("all"),[f,m]=J.useState(""),w=J.useCallback(()=>{Promise.all([We("/api/events/snapshot"),We("/api/missions").catch(()=>null),We("/api/cost").catch(()=>null),We("/api/mcp/discovery").catch(()=>null)]).then(([h,a,o,v])=>{U(h),X(a),$(o),b(v),m("")}).catch(h=>m(h.message))},[]);if(J.useEffect(()=>{w()},[w,S]),f)return l.jsxDEV("p",{className:"err",children:["Could not load telemetry: ",f]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:33,columnNumber:19},this);if(!k)return l.jsxDEV("p",{className:"empty",children:"Loading..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:34,columnNumber:23},this);const E=_==="all"?k.events:k.events.filter(h=>h.type.startsWith(_)),p=kx(V),u=ee?ee.total.input_tokens+ee.total.output_tokens:0;return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:"Live Cockpit telemetry from the unified event model. This replaces the legacy dashboard feed with Bridge-backed inventory, session, task, approval, Mission, and cost posture."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:42,columnNumber:7},this),l.jsxDEV("section",{className:"telemetry-kpis","aria-label":"Telemetry key performance indicators",children:[l.jsxDEV("article",{children:[l.jsxDEV("span",{children:"Events"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:18},this),l.jsxDEV("strong",{children:k.count},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:37},this),l.jsxDEV("small",{children:k.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:68},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:47,columnNumber:9},this),l.jsxDEV("article",{children:[l.jsxDEV("span",{children:"Active Missions"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:18},this),l.jsxDEV("strong",{children:p.active},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:46},this),l.jsxDEV("small",{children:[p.terminal," terminal"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:85},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:48,columnNumber:9},this),l.jsxDEV("article",{children:[l.jsxDEV("span",{children:"Approvals"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:18},this),l.jsxDEV("strong",{children:p.awaiting},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:40},this),l.jsxDEV("small",{children:"awaiting operator input"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:81},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:49,columnNumber:9},this),l.jsxDEV("article",{children:[l.jsxDEV("span",{children:"Spend"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:18},this),l.jsxDEV("strong",{children:ee?`$${ee.total.usd.toFixed(2)}`:"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:36},this),l.jsxDEV("small",{children:u?`${u.toLocaleString()} tokens`:"cost route unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:99},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:50,columnNumber:9},this),l.jsxDEV("article",{children:[l.jsxDEV("span",{children:"MCP"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:18},this),l.jsxDEV("strong",{children:(c==null?void 0:c.status)??"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:34},this),l.jsxDEV("small",{children:c?`${c.tools.length} tools · ${c.auth.scopes.length} scopes`:"discovery unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:71},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:51,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:46,columnNumber:7},this),c&&l.jsxDEV("section",{className:"audit-tail","aria-label":"MCP management posture",children:[l.jsxDEV("h3",{children:"MCP Management"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:56,columnNumber:11},this),l.jsxDEV("p",{children:[l.jsxDEV("strong",{children:c.endpoint.path},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:57,columnNumber:14},this)," · ",c.endpoint.transport," · ",c.endpoint.stateless?"stateless":"stateful"," · session id ",c.endpoint.mcp_session_id?"expected":"not expected"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:57,columnNumber:11},this),l.jsxDEV("p",{children:[c.auth.principals.length," principal(s): ",c.auth.principals.map(h=>h.client_id).join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:58,columnNumber:11},this),l.jsxDEV("p",{children:["Tools: ",c.tools.map(h=>h.name).join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:59,columnNumber:11},this),l.jsxDEV("p",{children:["Resources: ",[...c.resources.map(h=>h.uri),...c.resource_templates.map(h=>h.uriTemplate)].join(", ")||"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:60,columnNumber:11},this),c.reason_code&&l.jsxDEV("p",{children:c.reason_code},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:61,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:55,columnNumber:9},this),l.jsxDEV("div",{className:"controls",role:"group","aria-label":"Filter telemetry events",children:["all","mission","task","approval","session","inventory"].map(h=>l.jsxDEV("button",{"aria-pressed":_===h,onClick:()=>N(h),children:h},h,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:67,columnNumber:11},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:65,columnNumber:7},this),E.length?l.jsxDEV("table",{children:[l.jsxDEV("caption",{children:[E.length," event(s), fetched ",new Date(k.fetched_at).toLocaleTimeString()]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:73,columnNumber:11},this),l.jsxDEV("thead",{children:l.jsxDEV("tr",{children:[l.jsxDEV("th",{scope:"col",children:"Time"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:22},this),l.jsxDEV("th",{scope:"col",children:"Type"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:47},this),l.jsxDEV("th",{scope:"col",children:"Subject"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:72},this),l.jsxDEV("th",{scope:"col",children:"State"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:100},this),l.jsxDEV("th",{scope:"col",children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:126},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:18},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:74,columnNumber:11},this),l.jsxDEV("tbody",{children:E.map(h=>l.jsxDEV("tr",{children:[l.jsxDEV("td",{children:l.jsxDEV("time",{dateTime:h.ts,children:new Date(h.ts).toLocaleTimeString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:78,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:78,columnNumber:17},this),l.jsxDEV("td",{children:l.jsxDEV("span",{className:"badge",children:h.type},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:79,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:79,columnNumber:17},this),l.jsxDEV("td",{children:l.jsxDEV("code",{title:h.subject,children:$e(h.subject)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:80,columnNumber:21},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:80,columnNumber:17},this),l.jsxDEV("td",{children:h.state?l.jsxDEV("span",{className:`state ${h.state}`,children:[l.jsxDEV("span",{className:"dot","aria-hidden":"true"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:69},this),h.state]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:32},this):"-"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:81,columnNumber:17},this),l.jsxDEV("td",{children:h.source},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:82,columnNumber:17},this)]},h.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:77,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:75,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:72,columnNumber:9},this):l.jsxDEV("p",{className:"empty",children:"No events match this filter."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:71,columnNumber:26},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Telemetry.tsx",lineNumber:41,columnNumber:5},this)}function kx(S){const k={active:0,terminal:0,awaiting:0};for(const U of(S==null?void 0:S.missions)??[])(U.status==="awaiting-approval"||U.status==="input-required")&&(k.awaiting+=1),U.terminal?k.terminal+=1:k.active+=1;return k}const Rx={tenant_id:"",host_id:"",instance_id:"",agent_id:""};function Tx(){const[S,k]=J.useState(Rx),[U,V]=J.useState(null),[X,ee]=J.useState(null),[$,c]=J.useState(""),[b,_]=J.useState(!1),[N,f]=J.useState(null),m=Object.values(S).every(h=>h.trim()),w=JSON.stringify({...S,filter:{limit:250}}),E=async()=>{if(m){_(!0),c(""),ee(null),V(null),f(null);try{const h={"content-type":"application/json"},a=await We("/api/activity/coverage",{method:"POST",headers:h,body:w});V(a);const o=await We("/api/activity/timeline",{method:"POST",headers:h,body:w});ee(o)}catch(h){c(h.message)}finally{_(!1)}}},p=async()=>{c(""),f(null);const h=await Gm("/api/activity/export",{method:"POST",headers:{"content-type":"application/json"},body:w});if(!h.ok){c(h.status===503?"Signed export unavailable: the sandbox signing key is unavailable.":`Signed export failed (${h.status}).`);return}const a=await h.json();f({key_id:a.manifest.key_id,merkle_root:a.manifest.merkle_root});const o=URL.createObjectURL(new Blob([JSON.stringify(a,null,2)],{type:"application/json"})),v=window.document.createElement("a");v.href=o,v.download="activity-export.json",v.click(),URL.revokeObjectURL(o)},u=U==null?void 0:U.completeness;return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("div",{className:"section-toolbar",children:l.jsxDEV("div",{children:[l.jsxDEV("h2",{children:"Governed activity"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:60,columnNumber:43},this),l.jsxDEV("p",{className:"hint",children:"Exact sandbox scope; coverage is checked before events."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:60,columnNumber:69},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:60,columnNumber:38},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:60,columnNumber:5},this),l.jsxDEV("div",{className:"activity-scope",children:[Object.keys(S).map(h=>l.jsxDEV("label",{children:[h.replace("_id",""),l.jsxDEV("input",{value:S[h],onChange:a=>k({...S,[h]:a.target.value})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:62,columnNumber:105},this)]},h,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:62,columnNumber:64},this)),l.jsxDEV("button",{className:"cta",disabled:!m||b,onClick:E,children:b?"Loading…":"Load activity"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:63,columnNumber:7},this),l.jsxDEV("button",{disabled:!X||b,onClick:p,children:"Export signed evidence"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:61,columnNumber:5},this),$&&l.jsxDEV("p",{className:"err",role:"alert",children:$},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:66,columnNumber:15},this),u&&l.jsxDEV("section",{className:`activity-coverage ${u.complete?"complete":"incomplete"}`,"aria-label":"Activity coverage",children:[l.jsxDEV("h3",{children:[u.complete?"Complete coverage":"Incomplete coverage"," ",l.jsxDEV("span",{className:"badge",children:u.label},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:68,columnNumber:70},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:68,columnNumber:7},this),l.jsxDEV("p",{children:["Collectors ",u.collector_count," · gaps ",u.sequence_gap_count," · durable loss ",u.durable_loss_count," · restarts ",u.restart_count," · dropped ",u.dropped_event_count," · stale ",u.stale_collector_count," · clock uncertainty ",u.maximum_clock_error_ms," ms"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:69,columnNumber:7},this),l.jsxDEV("p",{children:["Unsupported event classes: ",u.unsupported_event_classes.length?u.unsupported_event_classes.join(", "):"none"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:70,columnNumber:7},this),U.coverage.map(h=>l.jsxDEV("p",{className:"cell-note",children:[h.collector_id,": gaps ",h.sequence_gaps.length,", loss ",h.durable_loss_records.length,", restarts ",h.restart_count,", dropped ",h.dropped_event_count,", stale ",h.stale?"yes":"no",", clock ±",h.maximum_clock_error_ms," ms"]},h.collector_id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:71,columnNumber:40},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:67,columnNumber:11},this),X&&l.jsxDEV("table",{className:"inventory-table",children:[l.jsxDEV("caption",{children:["Metadata-only activity events — coverage ",X.completeness.complete?"complete":"incomplete"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:53},this),l.jsxDEV("thead",{children:l.jsxDEV("tr",{children:[l.jsxDEV("th",{children:"Time"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:184},this),l.jsxDEV("th",{children:"Event"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:197},this),l.jsxDEV("th",{children:"Plane"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:211},this),l.jsxDEV("th",{children:"Source"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:225},this),l.jsxDEV("th",{children:"Trust"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:240},this),l.jsxDEV("th",{children:"Outcome"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:254},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:180},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:173},this),l.jsxDEV("tbody",{children:(X.events??[]).map(h=>{var a;return l.jsxDEV("tr",{children:[l.jsxDEV("td",{children:new Date(h.occurred_at).toLocaleString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:72},this),l.jsxDEV("td",{children:h.event_name},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:127},this),l.jsxDEV("td",{children:h.plane},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:154},this),l.jsxDEV("td",{children:[h.source.collector," · ",h.source.layer]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:176},this),l.jsxDEV("td",{children:l.jsxDEV("span",{className:`badge activity-trust-${h.source.trust}`,children:h.source.trust},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:236},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:232},this),l.jsxDEV("td",{children:((a=h.outcome)==null?void 0:a.status)??"unknown"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:331},this)]},h.event_id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:74,columnNumber:47},this)})},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:283},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:73,columnNumber:18},this),N&&l.jsxDEV("p",{role:"status",children:["Signed export downloaded · key ",N.key_id," · Merkle root ",N.merkle_root]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:76,columnNumber:20},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Activity.tsx",lineNumber:59,columnNumber:10},this)}const vy="aiwg.cockpit.memory.notes.v1";function Mx({refreshTick:S=0}){const[k,U]=J.useState(()=>Ox()),[V,X]=J.useState([]),[ee,$]=J.useState(""),[c,b]=J.useState(""),[_,N]=J.useState(""),[f,m]=J.useState(""),[w,E]=J.useState(""),p=J.useCallback(o=>{U(o),localStorage.setItem(vy,JSON.stringify(o))},[]);J.useEffect(()=>{We("/api/missions").then(o=>{X(o.missions),E("");const v=jx(k,o.missions);v!==k&&p(v)}).catch(o=>E(o.message))},[S]);const u=J.useMemo(()=>{const o=ee.trim().toLowerCase();return o?k.filter(v=>[v.title,v.body,v.source,v.mission_id??"",...v.tags].some(x=>x.toLowerCase().includes(o))):k},[k,ee]),h=()=>{c.trim()&&(p([{id:`note-${Date.now()}`,title:c.trim(),body:_.trim(),tags:f.split(",").map(o=>o.trim()).filter(Boolean),created_at:new Date().toISOString(),source:"operator"},...k]),b(""),N(""),m(""))},a=o=>p(k.filter(v=>v.id!==o));return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("p",{className:"hint",children:"Operator memory for Cockpit: local notes plus automatic Mission completion notes from durable Mission Control state. Notes stay in this browser profile; AIWG source files are not modified."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:73,columnNumber:7},this),w&&l.jsxDEV("p",{className:"err",children:["Mission memory sync failed: ",w]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:77,columnNumber:15},this),l.jsxDEV("section",{className:"memory-layout",children:[l.jsxDEV("form",{className:"memory-form",onSubmit:o=>{o.preventDefault(),h()},"aria-label":"Add memory note",children:[l.jsxDEV("h2",{children:"Add Note"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:80,columnNumber:11},this),l.jsxDEV("label",{children:["Title",l.jsxDEV("input",{value:c,onChange:o=>b(o.target.value),placeholder:"Note title"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:81,columnNumber:23},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:81,columnNumber:11},this),l.jsxDEV("label",{children:["Body",l.jsxDEV("textarea",{value:_,onChange:o=>N(o.target.value),placeholder:"What should future you remember?",rows:4},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:82,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:82,columnNumber:11},this),l.jsxDEV("label",{children:["Tags",l.jsxDEV("input",{value:f,onChange:o=>m(o.target.value),placeholder:"cockpit, release, risk"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:83,columnNumber:22},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:83,columnNumber:11},this),l.jsxDEV("button",{type:"submit",disabled:!c.trim(),children:"Save Note"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:84,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:79,columnNumber:9},this),l.jsxDEV("section",{className:"memory-list","aria-label":"Memory notes",children:[l.jsxDEV("div",{className:"section-toolbar",children:[l.jsxDEV("div",{children:[l.jsxDEV("h2",{children:"Notes"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:89,columnNumber:15},this),l.jsxDEV("p",{className:"hint",children:[k.length," saved · ",V.filter(o=>o.terminal).length," terminal mission(s) observed"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:90,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:88,columnNumber:13},this),l.jsxDEV("input",{"aria-label":"Search memory notes",value:ee,onChange:o=>$(o.target.value),placeholder:"Search notes"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:92,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:87,columnNumber:11},this),u.length?l.jsxDEV("div",{className:"note-grid",children:u.map(o=>l.jsxDEV("article",{className:"note-card",children:[l.jsxDEV("header",{children:[l.jsxDEV("h3",{children:o.title},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:99,columnNumber:21},this),l.jsxDEV("button",{"aria-label":`Delete note ${o.title}`,onClick:()=>a(o.id),children:"Remove"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:100,columnNumber:21},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:98,columnNumber:19},this),o.body&&l.jsxDEV("p",{children:o.body},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:102,columnNumber:33},this),l.jsxDEV("footer",{children:[l.jsxDEV("time",{dateTime:o.created_at,children:new Date(o.created_at).toLocaleString()},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:104,columnNumber:21},this),o.mission_id&&l.jsxDEV("code",{children:$e(o.mission_id)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:105,columnNumber:41},this),o.tags.map(v=>l.jsxDEV("span",{className:"tag",children:v},v,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:106,columnNumber:45},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:103,columnNumber:19},this)]},o.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:97,columnNumber:17},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:95,columnNumber:13},this):l.jsxDEV("p",{className:"empty",children:ee?"No notes match your search.":"No notes yet."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:94,columnNumber:31},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:86,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/Memory.tsx",lineNumber:72,columnNumber:5},this)}function Ox(){try{const S=JSON.parse(localStorage.getItem(vy)||"[]");return Array.isArray(S)?S:[]}catch{return[]}}function jx(S,k){const U=new Set(S.map(X=>X.mission_id).filter(Boolean)),V=k.filter(X=>X.terminal&&!U.has(X.id)).map(X=>({id:`mission-note-${X.id}`,title:X.title.slice(0,96),body:[`Status: ${X.status}`,X.completion?`Completion: ${X.completion}`:"",X.error?`Error: ${X.error}`:""].filter(Boolean).join(`
|
|
311
|
+
`),tags:["mission",X.status,X.source].filter(Boolean),created_at:X.completed_at??new Date().toISOString(),mission_id:X.id,source:"mission"}));return V.length?[...V,...S]:S}const Lx=15e3;function Wx({open:S,onClose:k,session:U,onStarted:V,initialInstanceId:X,startTimeoutMs:ee=Lx}){var R;const[$,c]=J.useState([]),[b,_]=J.useState(""),[N,f]=J.useState(""),[m,w]=J.useState(""),[E,p]=J.useState("observer"),[u,h]=J.useState(!1),[a,o]=J.useState("");J.useEffect(()=>{if(!S)return;o(""),h(!1);let W=!1;return(async()=>{var I,B,ie;try{const se=await We("/api/inventory");if(W)return;const ne=Bx(se.instances).filter(ce=>ce.state==="running");c(ne);const de=ne.find(ce=>ce.id===X)??ne.find(ce=>{var M;return(M=ce.session_backends)==null?void 0:M.some(z=>z.available)})??ne[0];if(de){_(de.id),f(((I=de.launch_context)==null?void 0:I.loadout)??de.loadout??"");const ce=((B=de.session_backends)==null?void 0:B.find(M=>M.available))??((ie=de.session_backends)==null?void 0:ie[0]);w(ce?`${ce.mode}:${ce.backend}`:"")}else o("No stack connected — start an executor first.")}catch(se){W||o(se.message)}})(),()=>{W=!0}},[S,X]);const v=$.find(W=>W.id===b),x=(v==null?void 0:v.session_backends)??[],C=x.find(W=>`${W.mode}:${W.backend}`===m)??x.find(W=>W.available)??x[0];if(J.useEffect(()=>{var I,B,ie;if(!v)return;f(((I=v.launch_context)==null?void 0:I.loadout)??v.loadout??"");const W=((B=v.session_backends)==null?void 0:B.find(se=>se.available))??((ie=v.session_backends)==null?void 0:ie[0]);w(W?`${W.mode}:${W.backend}`:"")},[b]),!S)return null;const D=U.state.attached,y=!u&&!!v&&!!(C!=null&&C.available),T=async()=>{if(!v||!C)return;h(!0),o("");const W=new AbortController,I=window.setTimeout(()=>W.abort(),ee);try{const B=new URLSearchParams({mode:C.mode,backend:C.backend}),ie=await We(`/api/instances/${encodeURIComponent(v.id)}/sessions?${B}`,{method:"POST",signal:W.signal});if(!ie.attach_url)throw new Error("Session started but no attach URL was returned.");U.attach(ie.attach_url,!1,E,{instanceId:v.id,sessionId:ie.id}),V(),k(),h(!1)}catch(B){const ie=B instanceof DOMException&&B.name==="AbortError"?"Starting the session timed out. The instance may still be preparing PTY support; refresh sessions and try again.":B.message;o(ie),h(!1)}finally{window.clearTimeout(I)}};return l.jsxDEV("div",{className:"modal-backdrop",role:"presentation",onClick:k,children:l.jsxDEV("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"start-session-title",onClick:W=>W.stopPropagation(),onKeyDown:W=>{W.key==="Escape"&&k()},children:[l.jsxDEV("h2",{id:"start-session-title",children:"Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:122,columnNumber:9},this),a&&l.jsxDEV("p",{className:"err",children:a},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:124,columnNumber:17},this),D&&l.jsxDEV("p",{className:"hint warn",children:"You have an attached view. Starting creates another managed session and switches Cockpit to it; existing sessions keep running."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:126,columnNumber:11},this),l.jsxDEV("div",{className:"form-grid",children:[l.jsxDEV("label",{htmlFor:"ss-instance",children:"Instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:130,columnNumber:11},this),l.jsxDEV("select",{id:"ss-instance",value:b,onChange:W=>_(W.target.value),children:$.map(W=>l.jsxDEV("option",{value:W.id,children:[$e(W.id)," · ",W.runtime," · ",W.state]},W.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:133,columnNumber:15},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:131,columnNumber:11},this),l.jsxDEV("label",{children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:137,columnNumber:11},this),l.jsxDEV("span",{className:"ro",children:v?`${v.runtime_posture.label} (${v.runtime})`:"—"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:138,columnNumber:11},this),l.jsxDEV("label",{children:"Instance loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:140,columnNumber:11},this),l.jsxDEV("span",{className:"ro",children:[N||"unknown",(R=v==null?void 0:v.launch_context)!=null&&R.image_ref?` · ${v.launch_context.image_ref}`:""]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:141,columnNumber:11},this),l.jsxDEV("label",{htmlFor:"ss-backend",children:"Backend"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:143,columnNumber:11},this),l.jsxDEV("select",{id:"ss-backend",value:m,onChange:W=>w(W.target.value),children:x.length?x.map(W=>l.jsxDEV("option",{value:`${W.mode}:${W.backend}`,disabled:!W.available,children:[W.mode," · ",W.backend,W.available?"":` — ${W.reason??"unsupported"}`]},`${W.mode}:${W.backend}`,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:147,columnNumber:17},this)):l.jsxDEV("option",{value:"",children:"— not advertised —"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:150,columnNumber:17},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:144,columnNumber:11},this),l.jsxDEV("label",{htmlFor:"ss-posture",children:"Posture"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:153,columnNumber:11},this),l.jsxDEV("select",{id:"ss-posture",value:E,onChange:W=>p(W.target.value),children:[l.jsxDEV("option",{value:"observer",children:"Observe (read-only)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:159,columnNumber:13},this),l.jsxDEV("option",{value:"controller",disabled:(C==null?void 0:C.drive)===!1,children:"Drive (control)"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:154,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:129,columnNumber:9},this),C&&!C.available&&l.jsxDEV("p",{className:"hint",children:C.reason??"Selected backend is unavailable on this instance."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:165,columnNumber:11},this),l.jsxDEV("div",{className:"modal-actions",children:[l.jsxDEV("button",{onClick:k,disabled:u,children:"Cancel"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:169,columnNumber:11},this),l.jsxDEV("button",{className:"cta",onClick:T,disabled:!y,children:u?"Starting…":D?"Start another session":"Start session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:170,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:114,columnNumber:7},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/StartSessionModal.tsx",lineNumber:113,columnNumber:5},this)}function Bx(S){const k=new Set;return S.filter(U=>k.has(U.id)?!1:(k.add(U.id),!0))}const Vx=[{value:"agentic/codex:latest",label:"Codex"},{value:"agentic/claude:latest",label:"Claude"},{value:"agentic/opencode:latest",label:"OpenCode"},{value:"agentic/automation-control:latest",label:"Automation control"},{value:"agentic/agent:dev",label:"Agent dev base"}],ry=[{id:"host-tools",label:"host-tools",description:"Host tools",runtimes:["host"]},{id:"agentic-dev",label:"agentic-dev",description:"Full development environment",runtimes:["docker","container","qemu","vm"]},{id:"claude-only",label:"claude-only",description:"Claude provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"codex-only",label:"codex-only",description:"Codex provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"opencode-only",label:"opencode-only",description:"OpenCode provider loadout",runtimes:["docker","container","qemu","vm"]},{id:"full-suite",label:"full-suite",description:"Multi-provider tool suite",runtimes:["qemu","vm"]}],Yu=()=>`cockpit-${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`.slice(0,32),_y=["instance.snapshot","instance.restore","instance.fork","warm_pool.manage"];function Hx({open:S,onClose:k,onLaunched:U}){var ye;const[V,X]=J.useState("host"),[ee,$]=J.useState(Yu),[c,b]=J.useState("host-tools"),[_,N]=J.useState([]),[f,m]=J.useState([]),[w,E]=J.useState(""),[p,u]=J.useState(null),[h,a]=J.useState(""),[o,v]=J.useState(!1),[x,C]=J.useState("agentic/codex:latest"),[D,y]=J.useState(""),[T,R]=J.useState(""),[W,I]=J.useState(""),[B,ie]=J.useState(""),[se,ne]=J.useState(!0),[de,ce]=J.useState(!1),[M,z]=J.useState(""),[L,P]=J.useState("");if(J.useEffect(()=>{if(!S)return;$(Yu());let be=!1;return Promise.all([We("/api/loadouts").catch(()=>({loadouts:[]})),We("/api/inventory").catch(()=>({instances:[]})),We("/api/executor/capabilities").catch(()=>null)]).then(([ze,qe,Le])=>{if(be)return;N(ze.loadouts??[]),m(qe.instances??[]),u(Le);const De=(qe.instances??[]).find(wy);E(Wt=>Wt||(De==null?void 0:De.id)||"")}),()=>{be=!0}},[S]),J.useEffect(()=>{if(!S||V!=="qemu")return;const be=oy(_,V).find(qe=>qe.id===c),ze=ay(p,be);ze.length&&!ze.some(qe=>qe.provider===h)&&a(ze[0].provider)},[p,c,_,S,V,h]),!S)return null;const ue=oy(_,V),pe=ue.find(be=>be.id===c),ve=ay(p,pe),Ce=V==="qemu"&&(h||((ye=ve[0])==null?void 0:ye.provider))||"",Y=ve.find(be=>be.provider===Ce),H=Ce?$x(pe,Ce):void 0,me=qx(pe,H,Y,Ce,o),ae=be=>{X(be),be==="host"?b("host-tools"):be==="docker"?(b("agentic-dev"),C(ze=>ze||"agentic/codex:latest")):(b("profiles/basic.yaml"),v(!1))},oe=async()=>{var be,ze,qe,Le,De,Wt,Ii,Ae;ce(!0),z(""),P("");try{if(V==="host"){const Ie=Ja(f).find(wt=>wt.id===w)??Ja(f)[0];if(Ie){P(se?`Using host target ${((be=Ie.launch_context)==null?void 0:be.name)??$e(Ie.id)}; starting session...`:`Using host target ${((ze=Ie.launch_context)==null?void 0:ze.name)??$e(Ie.id)}`),await U(Ie.id,se),se&&k();return}if(!(p!=null&&p.host_runtime_enabled))throw new Error("Host runtime is not enabled on this executor. Enable the host supervisor or choose Docker container.");const Ye={name:ee.replace(/[^a-z0-9-]/g,"-").replace(/^-+/,"a-").slice(0,63),runtime:"host",loadout:"host-tools",start:!0},ut=await We("/api/instances",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Ye)}),ct=ut.instance_id??ut.instanceId??((qe=ut.result)==null?void 0:qe.instance_id)??((Le=ut.result)==null?void 0:Le.instanceId),bt=ut.id??((De=ut.operation)==null?void 0:De.id);P(se?`Host launch accepted: ${ct??bt??"operation pending"}; waiting for session...`:`Host launch accepted: ${ct??bt??"operation pending"}`),await U(ct,se,bt),se?k():$(Yu());return}const Nt={name:ee.replace(/[^a-z0-9-]/g,"-").replace(/^-+/,"a-").slice(0,63),runtime:V,start:!0};if(c&&(Nt.loadout=c),T&&(Nt.profile=T),V==="docker"&&(Nt.image=x==="__custom__"?D.trim():x,Nt.agentshare=!0),V==="qemu"){Nt.agentshare=!0,Ce&&(Nt.provider=Ce);const Ie=Px(Ce,me);Ie&&(Nt.runtime_options=Ie),W.trim()&&(Nt.ssh_key=W.trim())}V==="docker"&&B.trim()&&(Nt.mounts=B.split(`
|
|
312
|
+
`).map(Ie=>Ie.trim()).filter(Boolean));const ge=await We("/api/instances",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Nt)}),Te=ge.instance_id??ge.instanceId??((Wt=ge.result)==null?void 0:Wt.instance_id)??((Ii=ge.result)==null?void 0:Ii.instanceId),Je=ge.id??((Ae=ge.operation)==null?void 0:Ae.id);P(se?`Launch accepted: ${Te??Je??"operation pending"}; waiting for session...`:`Launch accepted: ${Te??Je??"operation pending"}`),await U(Te,se,Je),se?k():$(Yu())}catch(Nt){z(Nt.message)}finally{ce(!1)}};return l.jsxDEV("div",{className:"modal-backdrop",role:"presentation",onClick:k,children:l.jsxDEV("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"launch-instance-title",onClick:be=>be.stopPropagation(),children:[l.jsxDEV("h2",{id:"launch-instance-title",children:"New instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:213,columnNumber:9},this),l.jsxDEV("p",{className:"hint",children:"Create a runtime target. Existing instances and sessions keep running."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:214,columnNumber:9},this),M&&l.jsxDEV("p",{className:"err",children:M},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:215,columnNumber:17},this),L&&l.jsxDEV("p",{className:"hint ok-text",children:L},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:216,columnNumber:20},this),l.jsxDEV("div",{className:"form-grid",children:[l.jsxDEV("label",{htmlFor:"li-runtime",children:"Runtime"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:218,columnNumber:11},this),l.jsxDEV("select",{id:"li-runtime",value:V,onChange:be=>ae(be.target.value),children:[l.jsxDEV("option",{value:"host",children:"Host"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:220,columnNumber:13},this),l.jsxDEV("option",{value:"docker",children:"Docker container"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:221,columnNumber:13},this),l.jsxDEV("option",{value:"qemu",children:"VM / QEMU"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:222,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:219,columnNumber:11},this),V==="host"?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"li-host-target",children:"Host target"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:226,columnNumber:15},this),l.jsxDEV("select",{id:"li-host-target",value:w,onChange:be=>E(be.target.value),children:[Ja(f).map(be=>{var ze;return l.jsxDEV("option",{value:be.id,children:[((ze=be.launch_context)==null?void 0:ze.name)??$e(be.id)," - ",be.loadout]},be.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:228,columnNumber:52},this)}),!Ja(f).length&&(p==null?void 0:p.host_runtime_enabled)&&l.jsxDEV("option",{value:"",children:"Local host runtime - create new"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:229,columnNumber:90},this),!Ja(f).length&&!(p!=null&&p.host_runtime_enabled)&&l.jsxDEV("option",{value:"",children:"Host runtime not enabled"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:230,columnNumber:91},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:227,columnNumber:15},this),!Ja(f).length&&(p==null?void 0:p.host_runtime_enabled)&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"li-name",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:234,columnNumber:19},this),l.jsxDEV("input",{id:"li-name",value:ee,onChange:be=>$(be.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:235,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:233,columnNumber:17},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:225,columnNumber:13},this):l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"li-name",children:"Name"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:241,columnNumber:15},this),l.jsxDEV("input",{id:"li-name",value:ee,onChange:be=>$(be.target.value)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:242,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:240,columnNumber:13},this),l.jsxDEV("label",{htmlFor:"li-loadout",children:"Instance loadout"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:245,columnNumber:11},this),V==="host"?l.jsxDEV("span",{className:"ro",children:"host-tools"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:247,columnNumber:13},this):l.jsxDEV("select",{id:"li-loadout",value:c,onChange:be=>b(be.target.value),children:ue.map(be=>l.jsxDEV("option",{value:be.id,children:[be.label,be.description?` - ${be.description}`:""]},be.id,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:250,columnNumber:43},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:249,columnNumber:13},this),V==="qemu"&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"li-vm-provider",children:"VM provider"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:255,columnNumber:15},this),l.jsxDEV("select",{id:"li-vm-provider",value:Ce,onChange:be=>a(be.target.value),disabled:!ve.length,children:[!ve.length&&l.jsxDEV("option",{value:"",children:"Provider discovery unavailable"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:262,columnNumber:45},this),ve.map(be=>l.jsxDEV("option",{value:be.provider,children:[be.label??be.provider,be.default?" (default)":""]},be.provider,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:264,columnNumber:19},this))]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:256,columnNumber:15},this),l.jsxDEV("label",{htmlFor:"li-gpu-vfio",children:"GPU / VFIO"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:269,columnNumber:15},this),l.jsxDEV("div",{className:"field-stack",children:[l.jsxDEV("label",{className:"check-row",children:[l.jsxDEV("input",{id:"li-gpu-vfio",type:"checkbox",checked:me.required||o,disabled:me.required||!me.selectable,onChange:be=>v(be.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:272,columnNumber:19},this),"Request GPU passthrough"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:271,columnNumber:17},this),l.jsxDEV("div",{className:`posture-line ${me.blocked?"warn":me.effective?"ok-text":""}`,children:me.message},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:281,columnNumber:17},this),me.fastStartReason&&l.jsxDEV("div",{className:"cell-note",children:me.fastStartReason},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:284,columnNumber:41},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:270,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:254,columnNumber:13},this),V!=="host"&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"li-profile",children:"Profile"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:290,columnNumber:15},this),l.jsxDEV("input",{id:"li-profile",value:T,onChange:be=>R(be.target.value),placeholder:"optional"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:291,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:289,columnNumber:13},this),V==="qemu"&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"li-ssh-key",children:"SSH public key"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:296,columnNumber:15},this),l.jsxDEV("input",{id:"li-ssh-key",value:W,onChange:be=>I(be.target.value),placeholder:"auto-detect, or ~/.ssh/agentic_ed25519.pub"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:297,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:295,columnNumber:13},this),V==="docker"&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("label",{htmlFor:"li-image",children:"Container image"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:307,columnNumber:15},this),l.jsxDEV("div",{className:"field-stack",children:[l.jsxDEV("select",{id:"li-image",value:x,onChange:be=>C(be.target.value),children:[Vx.map(be=>l.jsxDEV("option",{value:be.value,children:[be.label," - ",be.value]},be.value,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:310,columnNumber:57},this)),l.jsxDEV("option",{value:"__custom__",children:"Custom image..."},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:311,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:309,columnNumber:17},this),x==="__custom__"&&l.jsxDEV("input",{"aria-label":"Custom container image",value:D,onChange:be=>y(be.target.value),placeholder:"registry.example.com/team/agent:tag"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:314,columnNumber:19},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:308,columnNumber:15},this),l.jsxDEV("label",{htmlFor:"li-mounts",children:"Mounts"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:322,columnNumber:15},this),l.jsxDEV("textarea",{id:"li-mounts",value:B,onChange:be=>ie(be.target.value),placeholder:"/host/path:/container/path"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:323,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:306,columnNumber:13},this),l.jsxDEV("label",{htmlFor:"li-open-session",children:"After launch"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:326,columnNumber:11},this),l.jsxDEV("label",{className:"check-row",children:[l.jsxDEV("input",{id:"li-open-session",type:"checkbox",checked:se,onChange:be=>ne(be.target.checked)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:328,columnNumber:13},this),"Start a session automatically when the instance is ready"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:327,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:217,columnNumber:9},this),l.jsxDEV("div",{className:"modal-actions",children:[l.jsxDEV("button",{onClick:k,disabled:de,children:"Close"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:333,columnNumber:11},this),l.jsxDEV("button",{className:"cta",onClick:oe,disabled:de||V==="host"&&!w&&!(p!=null&&p.host_runtime_enabled)||V==="host"&&!w&&!ee.trim()||V!=="host"&&!ee.trim()||V==="docker"&&x==="__custom__"&&!D.trim()||V==="qemu"&&me.effective&&me.blocked,children:de?"Working...":V==="host"?se?"Start host session":"Use host":se?"Create + start session":"Create instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:334,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:332,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:212,columnNumber:7},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/components/LaunchInstanceModal.tsx",lineNumber:211,columnNumber:5},this)}function Ux(S){return new Set(((S==null?void 0:S.capabilities)??[]).map(k=>k.id))}function zx(S,k){var U;return new Set([...((U=S==null?void 0:S.runtime_options)==null?void 0:U.required_capabilities)??[],...(k==null?void 0:k.required_capabilities)??[]])}function Ix(S,k){var U;return new Set([...((U=S==null?void 0:S.runtime_options)==null?void 0:U.excluded_capabilities)??[],...(k==null?void 0:k.excluded_capabilities)??[]])}function ay(S,k){var ee,$;const U=(($=(ee=S==null?void 0:S.runtime_providers)==null?void 0:ee.providers)==null?void 0:$.filter(c=>c.kind==="vm"))??[],V=new Set(((k==null?void 0:k.compatibility)??[]).filter(c=>["vm","qemu"].includes(String(c.runtime_kind).toLowerCase())).map(c=>c.provider)),X=V.size?U.filter(c=>V.has(c.provider)):U;return X.length?X:[...V].map(c=>({provider:c,kind:"vm",capabilities:[]}))}function $x(S,k){var U;return(U=S==null?void 0:S.compatibility)==null?void 0:U.find(V=>V.provider===k&&["vm","qemu"].includes(String(V.runtime_kind).toLowerCase()))}function qx(S,k,U,V,X){var w;const ee=zx(S,k).has("device.vfio"),$=Ix(S,k),c=ee||X,b=Ux(U).has("device.vfio"),_=[...$].filter(E=>_y.includes(E)),N=(w=[...(k==null?void 0:k.constraints)??[],...(U==null?void 0:U.capability_constraints)??[]].find(E=>E.capability==="device.vfio"))==null?void 0:w.reason;let f=!1,m="No GPU requested";return V?k&&!k.eligible?(f=c||ee,m=k.reason??"Loadout is not eligible for this provider"):!k&&c?(f=!0,m="Loadout compatibility does not advertise VFIO"):!b&&c?(f=!0,m="Selected provider does not advertise VFIO"):b?k?$.has("device.vfio")&&c?(f=!0,m="Selected loadout excludes GPU passthrough"):ee?m=f?m:"GPU passthrough required by loadout":X?m=f?m:"GPU passthrough requested":b&&!$.has("device.vfio")?m="GPU passthrough available":$.has("device.vfio")&&(m="GPU passthrough unavailable for this loadout"):m="GPU passthrough requires loadout compatibility":m="GPU passthrough unavailable":(f=c,m="Provider discovery unavailable"),{required:ee,effective:c,blocked:f,selectable:!!(V&&b&&k&&!$.has("device.vfio")&&k.eligible!==!1),message:m,fastStartReason:c&&_.length?`${N??"VFIO-backed VMs cannot safely reuse memory state"} Disabled: ${_.join(", ")}.`:N}}function Px(S,k){if(!S&&!k.effective)return;const U={kind:"vm",launch_strategy:{mode:"cold"}};return S&&(U.provider=S),k.effective&&(U.required_capabilities=["device.vfio"],U.excluded_capabilities=_y,U.constraints={allow_vfio_fast_start:!1,fallback_mode:"fail"}),U}function oy(S,k){if(k==="host")return ry.filter(ee=>ee.id==="host-tools");const U=k==="docker"?["docker","container"]:k==="qemu"?["qemu","vm"]:[k],V=[...S,...ry].reduce((ee,$)=>(ee.some(c=>c.id===$.id)||ee.push($),ee),[]),X=V.filter(ee=>{var $;return!(($=ee.runtimes)!=null&&$.length)||ee.runtimes.some(c=>U.includes(String(c).toLowerCase()))});return X.length?X:V}function Ja(S){return S.filter(wy)}function wy(S){var k,U;return S.state==="running"&&((k=S.runtime_posture)==null?void 0:k.kind)==="host"&&((U=S.session_backends)==null?void 0:U.some(V=>V.available!==!1))}const qm=[{id:"welcome",label:"Home"},{id:"inventory",label:"Inventory"},{id:"running",label:"Running"},{id:"missions",label:"Missions"},{id:"sessions",label:"Sessions"},{id:"approvals",label:"Approvals"},{id:"explore",label:"Explore"},{id:"library",label:"Library"},{id:"telemetry",label:"Telemetry"},{id:"activity",label:"Activity"},{id:"memory",label:"Memory"},{id:"actions",label:"Actions"}],Fx=S=>new Promise(k=>window.setTimeout(k,S));function Gx(){const[S,k]=J.useState(()=>{const y=window.location.hash.replace(/^#/,"");return qm.some(T=>T.id===y)?y:"welcome"}),U=AE(),V=Xm(),X=cx(V).filter(y=>y.id!==`pty:${V.activeKey}`),[ee,$]=J.useState(""),[c,b]=J.useState(null),[_,N]=J.useState("checking"),f=J.useRef(!1),m=J.useRef(!1),[w,E]=J.useState(!1),[p,u]=J.useState(void 0),[h,a]=J.useState(!1),[o,v]=J.useState(0);J.useEffect(()=>{let y=!1,T,R=1e3;const W=B=>{T=window.setTimeout(I,B)},I=async()=>{try{const[B,ie]=await Promise.all([We("/api/health"),We("/api/inventory")]);if(y)return;const[se,ne]=await Promise.all([We("/api/running").catch(()=>({count:0})),We("/api/approvals?status=pending").catch(()=>({approvals:[]}))]);if(y)return;const de=ie.instances.map(M=>{var z;return lr(((z=M.runtime_posture)==null?void 0:z.kind)??M.runtime)}),ce=U.responseNeeded.needed?1:0;if(b({executor:B.executor_url,instances:ie.instances.length,running:se.count,responses:ne.approvals.length+X.length+ce,host:de.includes("host"),container:de.includes("container"),vm:de.includes("vm")}),!m.current){const M=f.current;f.current=!1,N("live"),M&&v(z=>z+1)}R=1e3,y||W(15e3)}catch{y||(f.current=!0,N("reconnecting"),W(R),R=Math.min(R*2,15e3))}};return I(),()=>{y=!0,T!==void 0&&window.clearTimeout(T)}},[U.responseNeeded.needed,o,X.length]),J.useEffect(()=>{if(typeof EventSource>"u")return;let y,T=!1;const R=()=>{m.current=!1,v(W=>W+1)};return hy().then(()=>{T||(y=new EventSource("/api/events"),y.onopen=R,y.addEventListener("cockpit.refresh",R),y.onerror=()=>{m.current=!0,f.current=!0,N("reconnecting"),v(W=>W+1)})}).catch(()=>{m.current=!0,N("reconnecting")}),()=>{T=!0,y==null||y.close()}},[]),J.useEffect(()=>{const y=()=>{const T=window.location.hash.replace(/^#/,"");qm.some(R=>R.id===T)&&k(T)};return window.addEventListener("hashchange",y),()=>window.removeEventListener("hashchange",y)},[]);const x=y=>{u(y),E(!0)},C=async(y,T,R)=>{if(v(W=>W+1),!T){k("inventory"),v(W=>W+1);return}k("sessions"),(async()=>{try{const W=await Yx(y,R),I=W.session_backends.find(se=>se.available!==!1&&se.drive!==!1)??W.session_backends.find(se=>se.available!==!1)??W.session_backends[0];if(!I||I.available===!1)throw new Error((I==null?void 0:I.reason)??"No available session backend for the new instance.");const B=new URLSearchParams({mode:I.mode,backend:I.backend}),ie=await We(`/api/instances/${encodeURIComponent(W.id)}/sessions?${B}`,{method:"POST"});U.attach(ie.attach_url,!1,I.drive===!1?"observer":"controller",{instanceId:W.id,sessionId:ie.id})}catch(W){console.warn("auto-session after launch did not complete:",W.message)}finally{v(W=>W+1)}})()},D=async()=>{var y;await((y=navigator.clipboard)==null?void 0:y.writeText("aiwg cockpit"))};return l.jsxDEV(l.Fragment,{children:[l.jsxDEV("header",{children:[l.jsxDEV("div",{className:"brand-lockup",children:[l.jsxDEV("span",{className:"mark","aria-hidden":"true",children:"◆"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:217,columnNumber:11},this),l.jsxDEV("h1",{children:"AIWG Cockpit"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:218,columnNumber:11},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:216,columnNumber:9},this),l.jsxDEV("div",{className:"top-status","aria-label":"Cockpit status","aria-live":"polite",children:[l.jsxDEV("span",{className:`health-pill ${_==="live"?"ok":"warn"}`,title:_==="reconnecting"&&c?"Connection interrupted; showing last-known status while Cockpit retries.":void 0,children:_==="live"?"Bridge live":_==="reconnecting"?"Reconnecting…":"Bridge checking"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:221,columnNumber:11},this),c&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("span",{className:"executor-pill",title:c.executor,children:c.executor},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:229,columnNumber:15},this),l.jsxDEV("span",{children:[c.instances," stacks"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:230,columnNumber:15},this),l.jsxDEV("span",{children:[c.running," running"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:231,columnNumber:15},this),l.jsxDEV("span",{children:[c.responses," responses needed"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:232,columnNumber:15},this),l.jsxDEV("span",{className:"matrix-mini",title:"Runtime target coverage",children:["host ",c.host?"✓":"-"," · docker ",c.container?"✓":"-"," · vm ",c.vm?"✓":"-"]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:233,columnNumber:15},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:228,columnNumber:13},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:220,columnNumber:9},this),l.jsxDEV("button",{className:"meta",onClick:()=>a(!0),children:"+ Launch instance"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:237,columnNumber:9},this),l.jsxDEV("button",{className:"meta",onClick:()=>x(),children:"▸ Start a session"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:238,columnNumber:9},this),l.jsxDEV("button",{className:"meta",onClick:D,children:"Copy CLI"},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:239,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:215,columnNumber:7},this),l.jsxDEV("div",{role:"tablist","aria-label":"Cockpit views",children:qm.map(y=>l.jsxDEV("button",{role:"tab",id:`tab-${y.id}`,"aria-controls":`panel-${y.id}`,"aria-selected":S===y.id,tabIndex:S===y.id?0:-1,onClick:()=>k(y.id),children:y.label},y.id,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:243,columnNumber:11},this))},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:241,columnNumber:7},this),l.jsxDEV("main",{children:[l.jsxDEV(gn,{id:"welcome",tab:S,children:l.jsxDEV(RE,{onStartSession:()=>x(),onLaunchInstance:()=>a(!0),goTo:y=>k(y)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:250,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:250,columnNumber:9},this),l.jsxDEV(gn,{id:"inventory",tab:S,children:l.jsxDEV(BE,{onStartSession:x,onLaunchInstance:()=>a(!0),refreshTick:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:251,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:251,columnNumber:9},this),l.jsxDEV(gn,{id:"running",tab:S,children:l.jsxDEV(GE,{refreshTick:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:252,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:252,columnNumber:9},this),l.jsxDEV(gn,{id:"missions",tab:S,children:l.jsxDEV(YE,{refreshTick:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:253,columnNumber:40},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:253,columnNumber:9},this),l.jsxDEV("section",{id:"panel-sessions",role:"tabpanel","aria-labelledby":"tab-sessions",hidden:S!=="sessions",children:l.jsxDEV(vx,{session:U,composer:ee,setComposer:$,onRequestStart:x,refreshTick:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:256,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:255,columnNumber:9},this),l.jsxDEV(gn,{id:"approvals",tab:S,children:l.jsxDEV(Ex,{refreshTick:o,responses:[...X,...U.responseNeeded.needed?[Kx(U)]:[]],goSessions:()=>k("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:258,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:258,columnNumber:9},this),l.jsxDEV(gn,{id:"explore",tab:S,children:l.jsxDEV(xx,{refreshTick:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:259,columnNumber:39},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:259,columnNumber:9},this),l.jsxDEV(gn,{id:"library",tab:S,children:l.jsxDEV(Cx,{session:U,setComposer:$,goSessions:()=>k("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:261,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:260,columnNumber:9},this),l.jsxDEV(gn,{id:"telemetry",tab:S,children:l.jsxDEV(Dx,{refreshTick:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:263,columnNumber:41},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:263,columnNumber:9},this),l.jsxDEV(gn,{id:"activity",tab:S,children:l.jsxDEV(Tx,{},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:264,columnNumber:40},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:264,columnNumber:9},this),l.jsxDEV(gn,{id:"memory",tab:S,children:l.jsxDEV(Mx,{refreshTick:o},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:265,columnNumber:38},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:265,columnNumber:9},this),l.jsxDEV(gn,{id:"actions",tab:S,children:l.jsxDEV(Ax,{refreshTick:o,session:U,setComposer:$,goSessions:()=>k("sessions")},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:267,columnNumber:11},this)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:266,columnNumber:9},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:249,columnNumber:7},this),l.jsxDEV(Wx,{open:w,onClose:()=>E(!1),session:U,onStarted:()=>k("sessions"),initialInstanceId:p},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:270,columnNumber:7},this),l.jsxDEV(Hx,{open:h,onClose:()=>a(!1),onLaunched:C},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:277,columnNumber:7},this)]},void 0,!0,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:214,columnNumber:5},this)}const ly=(()=>{const S=Number(window.AIWG_COCKPIT_SESSION_WAIT_S);return Number.isFinite(S)&&S>0?Math.floor(S):150})();async function Yx(S,k){var ee,$;let U="",V="";for(let c=0;c<ly;c+=1){if(k){const w=await We(`/api/operations/${encodeURIComponent(k)}`),E=String(w.state??"").toLowerCase(),p=((ee=w.result)==null?void 0:ee.instance_id)??(($=w.result)==null?void 0:$.instanceId);if(p&&!S&&(S=p),E==="failed")throw new Error(Xx(w));E&&(V=Qx(w),U=V)}const b=await We("/api/inventory"),_=new Set(["stopped","failed","error","terminated","destroyed","exited","dead"]),N=S?b.instances.find(w=>w.id===S):null;if(N&&c>3&&_.has(String(N.state).toLowerCase()))throw new Error(`Instance ${N.id} did not come online — it settled to '${N.state}' instead of running`+(V?` (${V})`:"")+". Its agent likely failed to register; check the runtime and try again.");const f=b.instances.filter(w=>String(w.state).toLowerCase()==="running"),m=S?f.find(w=>w.id===S):null;if(m){const w=m.session_backends.find(E=>E.available!==!1)??m.session_backends[0];if(w&&w.available!==!1)return m;U=(w==null?void 0:w.reason)??`instance ${m.id} has no available backend yet`}else U=[V,S?`instance ${S} not visible in inventory yet`:"waiting for launch operation to report instance id"].filter(Boolean).join("; ");await Fx(1e3)}const X=S?`Instance ${S}`:"The instance";throw new Error(`${X} launched and is still installing its loadout — its agent had not registered after ${ly}s (${U}). This is not a failure: heavy loadouts (e.g. full-suite) can take longer. It will appear under Inventory once its agent enrolls; open a session from there when it shows as running.`)}function Xx(S){var k,U,V,X,ee,$;return typeof S.error=="string"?S.error:((k=S.failure)==null?void 0:k.message)??((U=S.failure)==null?void 0:U.detail)??((V=S.failure)==null?void 0:V.code)??((X=S.error)==null?void 0:X.message)??((ee=S.error)==null?void 0:ee.detail)??(($=S.error)==null?void 0:$.code)??`operation ${S.id??""} failed`}function Qx(S){var U,V,X,ee,$;const k=[`operation ${S.id??""} is ${S.state??"unknown"}`];return(U=S.result)!=null&&U.runtime&&k.push(`runtime ${S.result.runtime}`),(V=S.result)!=null&&V.container_id&&k.push(`container ${S.result.container_id.slice(0,12)}`),(((X=S.result)==null?void 0:X.instance_id)??((ee=S.result)==null?void 0:ee.instanceId))&&k.push(`instance ${S.result.instance_id??S.result.instanceId}`),String(S.state??"").toLowerCase()==="succeeded"&&(($=S.result)!=null&&$.container_id)&&k.push("container was created, but no agent registered; see agentic-sandbox #501"),k.join("; ")}function Kx(S){return{id:`pty:${S.state.url??"attached"}`,instance_id:"attached session",prompt:S.responseNeeded.prompt,source:S.responseNeeded.source,status:"response-needed",attach_url:S.state.url}}function gn({id:S,tab:k,children:U}){return l.jsxDEV("section",{id:`panel-${S}`,role:"tabpanel","aria-labelledby":`tab-${S}`,hidden:k!==S,children:k===S?U:null},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/App.tsx",lineNumber:388,columnNumber:5},this)}mE.createRoot(document.getElementById("root")).render(l.jsxDEV(J.StrictMode,{children:l.jsxDEV(Gx,{},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/main.tsx",lineNumber:9,columnNumber:5},void 0)},void 0,!1,{fileName:"/tmp/aiwg-cockpit-web-release-An07Wa/web/src/main.tsx",lineNumber:8,columnNumber:3},void 0));
|