offsite 0.0.69 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/client/dist/assets/{XIcon-DQMNLluU.js → XIcon-BTZO46wb.js} +1 -1
- package/apps/client/dist/assets/{context-menu-DKfHACvP.js → context-menu-D16WxIXt.js} +23 -23
- package/apps/client/dist/assets/diff-panel-CGW6idmO.js +260 -0
- package/apps/client/dist/assets/{dist-D5zkZMSx.js → dist-D99rUXSZ.js} +1 -1
- package/apps/client/dist/assets/editor-dialog-BdpvXPtR.js +52 -0
- package/apps/client/dist/assets/{image-viewer-RU1A0RN3.js → image-viewer-BDChyfSI.js} +1 -1
- package/apps/client/dist/assets/{index-B-seWYA6.css → index-B_dYtuJ6.css} +1 -1
- package/apps/client/dist/assets/index-CVRb_eva.js +73 -0
- package/apps/client/dist/assets/{preview-dialog-DLv_D_cw.js → preview-dialog-BWCK-x3l.js} +1 -1
- package/apps/client/dist/assets/{tooltip-CVlWgxCV.js → tooltip-CKPboHje.js} +1 -1
- package/apps/client/dist/assets/{video-viewer-BR9BoG81.js → video-viewer-BXp_ueAz.js} +1 -1
- package/apps/client/dist/assets/{zoomable-image-QJPuc-JP.js → zoomable-image-C1DMNgds.js} +1 -1
- package/apps/client/dist/assets/zoomable-image-DAEgBZCp.js +1 -0
- package/apps/client/dist/index.html +7 -7
- package/apps/client/dist/sw.js +1 -1
- package/package.json +1 -1
- package/apps/client/dist/assets/diff-panel-__AqAgY3.js +0 -260
- package/apps/client/dist/assets/editor-dialog-3JXNSbBz.js +0 -52
- package/apps/client/dist/assets/index-Cb7dxBnJ.js +0 -73
- package/apps/client/dist/assets/zoomable-image-YrWyn05A.js +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/diff-panel-CGW6idmO.js","assets/rolldown-runtime-COiEfhsA.js","assets/dist-D99rUXSZ.js","assets/utils-U6QfaJBO.js","assets/TextWrapIcon-BRhMbXe9.js","assets/ChevronsDownUpIcon-BNVFd2te.js","assets/XIcon-BTZO46wb.js","assets/tags-DrTyXsO5.js","assets/button-CWFREsRn.js","assets/dist-Jliw2AH0.js","assets/tokensToHtml-BxQY-Ba2.js","assets/preload-helper-BLdHbfdN.js","assets/ccount-D7kz22QW.js","assets/unwrapDefault-ByDmBtHB.js","assets/lib-m_q9jTTN.js","assets/resolveLanguages-CUb-sBYj.js","assets/formatCSSVariablePrefix-KRh9vnZf.js","assets/libesm-Bfkx4A5Z.js","assets/editor-dialog-BdpvXPtR.js","assets/context-menu-D16WxIXt.js","assets/dist-C_Y10kCd.js","assets/tooltip-CKPboHje.js","assets/preview-dialog-BWCK-x3l.js","assets/langs-DssLtjmH.js","assets/dist-TdUDcI9m.js","assets/editor.api-Rfucz3mk.js","assets/editor-DjpsE8to.css","assets/engine-oniguruma-BMl9YtsA.js","assets/editor-dialog-BNFI__d8.css","assets/dist-DUf7iKTq.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{$ as n,$t as r,A as i,B as a,Bt as o,C as s,Ct as c,D as l,Dt as u,E as d,Et as f,F as p,Ft as m,G as h,Gt as g,H as _,Ht as v,It as y,J as b,Jt as x,K as S,Kt as C,L as w,Lt as T,M as E,Mt as D,N as O,Nt as k,O as A,Ot as j,P as M,Pt as N,Q as ee,Qt as te,R as ne,Rt as P,S as re,St as ie,T as ae,Tt as oe,U as se,Ut as ce,V as le,Vt as ue,W as F,Wt as de,X as I,Xt as L,Y as fe,Yt as pe,Z as me,Zt as he,_ as R,_t as ge,a as _e,an as ve,at as ye,b as be,bt as xe,c as Se,cn as Ce,ct as we,d as Te,dn as Ee,dt as De,en as Oe,et as ke,f as Ae,fn as je,ft as Me,g as z,gn as Ne,gt as Pe,h as Fe,hn as Ie,ht as Le,i as Re,in as ze,it as Be,j as Ve,jt as He,k as Ue,kt as We,l as Ge,ln as Ke,lt as qe,m as Je,mn as Ye,mt as Xe,n as Ze,nn as Qe,nt as $e,o as et,on as tt,ot as nt,p as rt,pn as it,pt as at,q as ot,qt as st,r as ct,rn as lt,rt as ut,s as dt,sn as ft,st as pt,t as mt,tn as ht,tt as gt,u as _t,un as vt,ut as yt,v as bt,vt as xt,w as St,wt as Ct,x as wt,xt as Tt,y as Et,yt as Dt,z as Ot,zt as kt}from"./XIcon-BTZO46wb.js";import{a as At,c as jt,i as Mt,l as Nt,n as Pt,o as Ft,r as It,t as B}from"./utils-U6QfaJBO.js";import{_ as Lt,c as Rt,d as zt,f as Bt,h as Vt,l as Ht,m as Ut,n as Wt,o as Gt,p as Kt,t as qt,u as Jt}from"./dist-C_Y10kCd.js";import{$ as Yt,B as Xt,C as Zt,Ct as Qt,D as $t,E as en,Et as tn,F as nn,G as rn,H as an,I as on,J as sn,K as cn,L as ln,M as un,N as dn,O as fn,P as pn,Q as mn,R as hn,S as gn,St as _n,T as vn,Tt as yn,U as bn,V as xn,W as Sn,X as Cn,Y as wn,Z as Tn,_ as En,a as Dn,at as On,b as kn,bt as An,c as jn,ct as Mn,d as Nn,dt as Pn,et as Fn,f as In,g as Ln,gt as Rn,h as zn,ht as Bn,i as Vn,it as Hn,k as Un,l as Wn,lt as Gn,m as Kn,mt as qn,n as Jn,nt as Yn,o as Xn,ot as Zn,p as Qn,pt as $n,q as er,r as tr,rt as nr,s as rr,st as ir,t as ar,tt as or,u as sr,ut as cr,v as lr,vt as ur,w as dr,wt as fr,x as pr,xt as mr,y as hr,yt as gr,z as _r}from"./context-menu-D16WxIXt.js";import{a as V,i as vr,n as yr,t as H}from"./button-CWFREsRn.js";import{a as br,i as xr,n as Sr,r as Cr,t as wr}from"./dist-D99rUXSZ.js";import{n as Tr}from"./libesm-Bfkx4A5Z.js";import{a as Er,i as Dr,l as Or,n as kr,o as Ar,r as jr,s as Mr,t as Nr}from"./tooltip-CKPboHje.js";import{C as Pr,S as Fr,a as Ir,c as Lr,h as Rr,i as zr,l as Br,o as Vr,p as Hr,r as Ur,s as Wr,u as Gr,v as Kr,w as qr,y as Jr}from"./preview-dialog-BWCK-x3l.js";import{n as Yr,r as Xr}from"./TextWrapIcon-BRhMbXe9.js";import{t as Zr}from"./preload-helper-BLdHbfdN.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var U=e(Nt(),1),Qr=U.useLayoutEffect,W=jt(),$r=class extends U.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?U.createElement(this.props.errorComponent??ei,{error:e[0],reset:this.reset}):this.props.children}};function ei({error:e}){let[t,n]=U.useState(!1);return(0,W.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,W.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,W.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,W.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,W.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,W.jsx)(`div`,{children:(0,W.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,W.jsx)(`code`,{children:e.message}):null})}):null]})}var ti=()=>!0,ni=()=>!1;function ri({children:e,fallback:t=null}){return(0,W.jsx)(U.Fragment,{children:ii()?e:t})}function ii(e=!0){return U.useSyncExternalStore(ai,ti,e?ni:ti)}function ai(){return()=>{}}function oi(e){let t=vt(),n=`not-found-${Ce(t.stores.location,e=>e.pathname)}-${Ce(t.stores.status)}`;return(0,W.jsx)($r,{getResetKey:()=>n,onCatch:(t,n)=>{if(Ye(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Ye(t))return e.fallback?.(t);throw t},children:e.children})}function si(){return(0,W.jsx)(`p`,{children:`Not Found`})}function ci(e,t,n){return t.options.notFoundComponent?(0,W.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,W.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,W.jsx)(si,{})}function li(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,W.jsx)(n,{}):null}var ui=(e,t)=>e[0]===t[0]&&e[1]===t[1],di=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,fi=U.memo(function({routeId:e}){let t=vt(),n=t.stores.getMatchStore(e);return pi(t,Ce(n))});function pi(e,t){let n=e.routesById[t.routeId],r=li(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=di(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,W.jsx)(mi,{match:t});s&&(l=(0,W.jsx)(ri,{fallback:r,children:l})),o&&(l=(0,W.jsx)(oi,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return U.createElement(o,e)},children:l})),i&&(l=(0,W.jsx)($r,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Ye(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,W.jsx)(U.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,W.jsx)(Ke.Provider,{value:t.routeId,children:(0,W.jsxs)(u,{children:[l,null]})}):(0,W.jsxs)(Ke.Provider,{value:t.routeId,children:[l,null]})}var mi=U.memo(function({match:e}){let t=vt(),n=e.routeId,r=t.routesById[n],i=U.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=U.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,W.jsx)(e,{},i):(0,W.jsx)(hi,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!di(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return li(t,r)}if(e.status===`notFound`)return ci(t,r,e.error);if(e.status===`error`)throw e.error;return a}),hi=U.memo(function(){let e=vt(),t=U.useContext(Ke),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Ce(a,e=>[!!e._notFound,e.error],{compare:ui}),i=Ce(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ci(e,e.routesById[t],r);if(!i)return null;let a=(0,W.jsx)(fi,{routeId:i});return t===`__root__`?(0,W.jsx)(U.Suspense,{fallback:li(e),children:a}):a});function gi(e,t){let n=e[1];e.length=0,n?.(t)}function _i({t:e}){let t=vt(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{gi(n,!1),n.push(i,a),e(t),U.startTransition(r)}),Qr(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Ie(r.publicHref)!==Ie(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...je(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function vi(){let e=vt(),t=e.routesById[it],n=li(e,t),r=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_i,{t:U.useState()[1]}),e.ssr?(0,W.jsx)(yi,{}):(0,W.jsx)(U.Suspense,{fallback:n,children:(0,W.jsx)(yi,{})})]});return e.options.InnerWrap?(0,W.jsx)(e.options.InnerWrap,{children:r}):r}function yi(){let e=vt(),t=e._rendered,n=Ce(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;Qr(()=>{t[0]===n&&gi(t,!0)},[t,n]);let a=i?(0,W.jsx)(fi,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,W.jsx)($r,{getResetKey:()=>r,onCatch:void 0,children:a})}function bi({router:e,children:t,...n}){Ne(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,W.jsx)(Ee.Provider,{value:e,children:t});return e.options.Wrap?(0,W.jsx)(e.options.Wrap,{children:r}):r}function xi({router:e,...t}){return(0,W.jsx)(bi,{router:e,...t,children:(0,W.jsx)(vi,{})})}var Si=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ci=t(((e,t)=>{t.exports=Si()})),wi=t((e=>{var t=Ci(),n=Nt(),r=Lt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function S(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function C(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var w=Object.assign,T=Symbol.for(`react.element`),E=Symbol.for(`react.transitional.element`),D=Symbol.for(`react.portal`),O=Symbol.for(`react.fragment`),k=Symbol.for(`react.strict_mode`),A=Symbol.for(`react.profiler`),j=Symbol.for(`react.consumer`),M=Symbol.for(`react.context`),N=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),P=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.legacy_hidden`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.for(`react.view_transition`),se=Symbol.for(`react.recoverable`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function F(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case O:return`Fragment`;case A:return`Profiler`;case k:return`StrictMode`;case ee:return`Suspense`;case te:return`SuspenseList`;case re:return`Activity`;case oe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case D:return`Portal`;case M:return e.displayName||`Context`;case j:return(e._context.displayName||`Context`)+`.Consumer`;case N:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?F(e.type)||`Memo`:t;case P:t=e._payload,e=e._init;try{return F(e(t))}catch{}}return null}var de=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},pe=[],me=-1;function he(e){return{current:e}}function R(e){0>me||(e.current=pe[me],pe[me]=null,me--)}function ge(e,t){me++,pe[me]=e.current,e.current=t}var _e=he(null),ve=he(null),ye=he(null),be=he(null);function xe(e,t){switch(ge(ye,t),ge(ve,e),ge(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(_e),ge(_e,e)}function Se(){R(_e),R(ve),R(ye)}function Ce(e){var t=e.memoizedState;t!==null&&(ch._currentValue=t.memoizedState,ge(be,e)),t=_e.current;var n=pp(t,e.type);t!==n&&(ge(ve,e),ge(_e,n))}function we(e){ve.current===e&&(R(_e),R(ve)),be.current===e&&(R(be),ch._currentValue=fe)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);case 30:return De(`ViewTransition`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var Me=Object.prototype.hasOwnProperty,z=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,Pe=t.unstable_shouldYield,Fe=t.unstable_requestPaint,Ie=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(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&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Je(n),i=1<<r;t|=e[r],n&=~i}return t}function at(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-1}}function ot(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function st(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ut(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ut(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function dt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ft(e,t){var n=t&-t;return n=n&42?1:pt(n),(n&(e.suspendedLanes|t))===0?n:0}function pt(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 mt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ht(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function gt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var _t=Math.random().toString(36).slice(2),vt=`__reactFiber$`+_t,yt=`__reactProps$`+_t,bt=`__reactContainer$`+_t,xt=`__reactEvents$`+_t,St=`__reactListeners$`+_t,Ct=`__reactHandles$`+_t,wt=`__reactResources$`+_t,Tt=`__reactMarker$`+_t,Et=`__reactLoad$`+_t;function Dt(e){delete e[vt],delete e[yt],delete e[St],delete e[Ct]}function Ot(e){var t;if(t=e[vt])return t;for(var n=e.parentNode;n;){if(t=n[bt]||n[vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[vt])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function kt(e){if(e=e[vt]||e[bt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function At(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function jt(e){var t=e[wt];return t||=e[wt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Mt(e){e[Tt]=!0}function Pt(e){e[Et]=void 0}var Ft=new Set,It={};function B(e,t){Rt(e,t),Rt(e+`Capture`,t)}function Rt(e,t){for(It[e]=t,e=0;e<t.length;e++)Ft.add(t[e])}var zt=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]*$`),Bt={},Vt={};function Ht(e){return Me.call(Vt,e)?!0:Me.call(Bt,e)?!1:zt.test(e)?Vt[e]=!0:(Bt[e]=!0,!1)}var Ut=!1;function Wt(){var e=Ut;return Ut=!1,e}function Gt(e,t,n){if(Ht(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Kt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function qt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Jt(t)):e.value!==``+Jt(t)&&(e.value=``+Jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Jt(n)):o===`number`&&e.value==t?rn(e,Jt(e.value)):rn(e,Jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Jt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Zt(e);return}n=n==null?``:``+Jt(n),t=t==null?n:``+Jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Zt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function on(e,t,n){t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Jt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(de(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Zt(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function un(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Ut=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),Ut=!0)}else for(var o in t)t.hasOwnProperty(o)&&un(e,o,t[o])}function fn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var pn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),mn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function gn(){}var _n=null;function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function xn(e){var t=kt(e);if(t&&(e=t.stateNode)){var n=e[yt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[yt]||null;if(!a)throw Error(i(90));tn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Qt(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}}}var Sn=!1;function Cn(e,t,n){if(Sn)return e(t,n);Sn=!0;try{return e(t)}finally{if(Sn=!1,(yn!==null||bn!==null)&&(Vd(),yn&&(t=yn,e=bn,bn=yn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[yt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(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 Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=w({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=w({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:er,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!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(w({},Un,{dataTransfer:0})),Kn=Fn(w({},Rn,{relatedTarget:0})),qn=Fn(w({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(w({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(w({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={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`},Qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function $n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qn[e])?!!t[e]:!1}function er(){return $n}var tr=Fn(w({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:er,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),nr=Fn(w({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rr=Fn(w({},In,{submitter:0})),ir=Fn(w({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:er})),ar=Fn(w({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=Fn(w({},Un,{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})),sr=Fn(w({},In,{newState:0,oldState:0,source:0})),cr=[9,13,27,32],lr=Tn&&`CompositionEvent`in window,ur=null;Tn&&`documentMode`in document&&(ur=document.documentMode);var dr=Tn&&`TextEvent`in window&&!ur,fr=Tn&&(!lr||ur&&8<ur&&11>=ur),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return cr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function V(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function vr(e,t){if(_r)return e===`compositionend`||!lr&&hr(e,t)?(e=jn(),An=kn=On=null,_r=!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 fr&&t.locale!==`ko`?null:t.data;default:return null}}var yr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function H(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!yr[e.type]:t===`textarea`}function br(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=Zf(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var xr=null,Sr=null;function Cr(e){Wf(e,0)}function wr(e){if(Qt(At(e)))return e}function Tr(e,t){if(e===`change`)return t}var Er=!1;if(Tn){var Dr;if(Tn){var Or=`oninput`in document;if(!Or){var kr=document.createElement(`div`);kr.setAttribute(`oninput`,`return;`),Or=typeof kr.oninput==`function`}Dr=Or}else Dr=!1;Er=Dr&&(!document.documentMode||9<document.documentMode)}function Ar(){xr&&(xr.detachEvent(`onpropertychange`,jr),Sr=xr=null)}function jr(e){if(e.propertyName===`value`&&wr(Sr)){var t=[];br(t,Sr,e,vn(e)),Cn(Cr,t)}}function Mr(e,t,n){e===`focusin`?(Ar(),xr=t,Sr=n,xr.attachEvent(`onpropertychange`,jr)):e===`focusout`&&Ar()}function Nr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return wr(Sr)}function Pr(e,t){if(e===`click`)return wr(t)}function Fr(e,t){if(e===`input`||e===`change`)return wr(t)}function Ir(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Lr=typeof Object.is==`function`?Object.is:Ir;function Rr(e,t){if(Lr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Me.call(t,i)||!Lr(e[i],t[i]))return!1}return!0}function zr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vr(e,t){var n=Br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Br(n)}}function Hr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ur(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zr(e.document)}return t}function Wr(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`)}var Gr=Tn&&`documentMode`in document&&11>=document.documentMode,Kr=null,qr=null,Jr=null,Yr=!1;function Xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yr||Kr==null||Kr!==zr(r)||(r=Kr,`selectionStart`in r&&Wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jr&&Rr(Jr,r)||(Jr=r,r=Zf(qr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Kr)))}function Zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var U={animationend:Zr(`Animation`,`AnimationEnd`),animationiteration:Zr(`Animation`,`AnimationIteration`),animationstart:Zr(`Animation`,`AnimationStart`),transitionrun:Zr(`Transition`,`TransitionRun`),transitionstart:Zr(`Transition`,`TransitionStart`),transitioncancel:Zr(`Transition`,`TransitionCancel`),transitionend:Zr(`Transition`,`TransitionEnd`)},Qr={},W={};Tn&&(W=document.createElement(`div`).style,`AnimationEvent`in window||(delete U.animationend.animation,delete U.animationiteration.animation,delete U.animationstart.animation),`TransitionEvent`in window||delete U.transitionend.transition);function $r(e){if(Qr[e])return Qr[e];if(!U[e])return e;var t=U[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in W)return Qr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionrun`),ii=$r(`transitionstart`),ai=$r(`transitioncancel`),oi=$r(`transitionend`),si=new Map,ci=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ci.push(`scrollEnd`);function li(e,t){si.set(e,t),B(t,[e])}var ui=0;function di(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Sd.identifierPrefix;var n=ui++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function fi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ad;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function pi(e,t){return e=fi(e),t=fi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var mi=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&&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)},hi=[],gi=0,_i=0;function vi(){for(var e=gi,t=_i=gi=0;t<e;){var n=hi[t];hi[t++]=null;var r=hi[t];hi[t++]=null;var i=hi[t];hi[t++]=null;var a=hi[t];if(hi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Si(n,i,a)}}function yi(e,t,n,r){hi[gi++]=e,hi[gi++]=t,hi[gi++]=n,hi[gi++]=r,_i|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function bi(e,t,n,r){return yi(e,t,n,r),wi(e)}function xi(e,t){return yi(e,null,null,t),wi(e)}function Si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function wi(e){if(50<jd)throw jd=0,Md=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ti={};function Ei(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Di(e,t,n,r){return new Ei(e,t,n,r)}function Oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ki(e,t){var n=e.alternate;return n===null?(n=Di(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ai(e,t){e.flags&=1206910978;var n=e.alternate;return n===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.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ji(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Oi(r)&&(s=1);else if(typeof r==`string`)s=Jm(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case re:return e=Di(31,n,t,a),e.elementType=re,e.lanes=o,e;case O:return Mi(n.children,a,o,t);case k:s=8,a|=24;break;case A:return e=Di(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case ee:return e=Di(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=Di(19,n,t,a),e.elementType=te,e.lanes=o,e;case ie:case oe:return e=a|32,e=Di(30,n,t,e),e.elementType=oe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case M:s=10;break a;case j:s=9;break a;case N:s=11;break a;case ne:s=14;break a;case P:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Mi(e,t,n,r){return e=Di(7,e,r,t),e.lanes=n,e}function Ni(e,t,n){return e=Di(6,e,null,t),e.lanes=n,e}function Pi(e){var t=Di(18,null,null,0);return t.stateNode=e,t}function Fi(e,t,n){return t=Di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ii=new WeakMap;function Li(e,t){if(typeof e==`object`&&e){var n=Ii.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Ii.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Ri=[],zi=0,Bi=null,Vi=0,Hi=[],Ui=0,Wi=null,Gi=1,Ki=``;function qi(e,t){Ri[zi++]=Vi,Ri[zi++]=Bi,Bi=e,Vi=t}function Ji(e,t,n){Hi[Ui++]=Gi,Hi[Ui++]=Ki,Hi[Ui++]=Wi,Wi=e;var r=Gi;e=Ki;var i=32-Je(r)-1;r&=~(1<<i),n+=1;var a=32-Je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Gi=1<<32-Je(t)+i|n<<i|r,Ki=a+e}else Gi=1<<a|n<<i|r,Ki=e}function Yi(e){e.return!==null&&(qi(e,1),Ji(e,1,0))}function Xi(e){for(;e===Bi;)Bi=Ri[--zi],Ri[zi]=null,Vi=Ri[--zi],Ri[zi]=null;for(;e===Wi;)Wi=Hi[--Ui],Hi[Ui]=null,Ki=Hi[--Ui],Hi[Ui]=null,Gi=Hi[--Ui],Hi[Ui]=null}function Zi(e,t){Hi[Ui++]=Gi,Hi[Ui++]=Ki,Hi[Ui++]=Wi,Gi=t.id,Ki=t.overflow,Wi=e}var Qi=null,$i=null,G=!1,ea=null,ta=!1,na=Error(i(519));function ra(e){throw la(Li(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),na}function ia(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[vt]=e,t[yt]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),sn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=gn),t=!0):t=!1,t||ra(e,!0)}function aa(e){for(Qi=e.return;Qi;)switch(Qi.tag){case 5:case 31:case 13:ta=!1;return;case 27:case 3:ta=!0;return;default:Qi=Qi.return}}function oa(e){if(e!==Qi)return!1;if(!G)return aa(e),G=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&$i&&ra(e),aa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));$i=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));$i=fm(e)}else t===27?(t=$i,wp(e.type)?(e=dm,dm=null,$i=e):$i=t):$i=Qi?um(e.stateNode.nextSibling):null;return!0}function sa(){$i=Qi=null,G=!1}function ca(){var e=ea;return e!==null&&(md===null?md=e:md.push.apply(md,e),ea=null),e}function la(e){ea===null?ea=[e]:ea.push(e)}var ua=he(null),da=null,fa=null;function pa(e,t,n){ge(ua,t._currentValue),t._currentValue=n}function ma(e){e._currentValue=ua.current,R(ua)}function ha(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ga(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ha(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ha(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ha(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function _a(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Lr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===be.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ch]:e.push(ch))}a=a.return}return e!==null&&ga(t,e,n,r),t.flags|=262144,e!==null}function va(e){for(e=e.firstContext;e!==null;){if(!Lr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){da=e,fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ba(e){return Sa(da,e)}function xa(e,t){return da===null&&ya(e),Sa(e,t)}function Sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},fa===null){if(e===null)throw Error(i(308));fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fa=fa.next=t;return n}var Ca=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},wa=t.unstable_scheduleCallback,Ta=t.unstable_NormalPriority,Ea={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Da(){return{controller:new Ca,data:new Map,refCount:0}}function Oa(e){e.refCount--,e.refCount===0&&wa(Ta,function(){e.controller.abort()})}function ka(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Aa=null;function ja(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ma=null,Na=0,Pa=0,Fa=null;function Ia(e,t){if(Ma===null){var n=Ma=[];Na=0,Pa=Lf(),Fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Na++,t.then(La,La),t}function La(){if(--Na===0&&(Aa=null,Ma!==null)){Fa!==null&&(Fa.status=`fulfilled`);var e=Ma;Ma=null,Pa=0,Fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ra(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var za=I.S;I.S=function(e,t){if(_d=Ie(),typeof t==`object`&&t&&typeof t.then==`function`&&Ia(e,t),Aa!==null)for(var n=Cf;n!==null;)ka(n,Aa),n=n.next;if(n=e.types,n!==null){for(var r=Cf;r!==null;)ka(r,n),r=r.next;if(Pa!==0){r=Aa,r===null&&(r=Aa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}za!==null&&za(e,t)};var Ba=he(null);function Va(){var e=Ba.current;return e===null?$u.pooledCache:e}function Ha(e,t){t===null?ge(Ba,Ba.current):ge(Ba,t.pool)}function Ua(){var e=Va();return e===null?null:{parent:Ea._currentValue,pool:e}}var Wa=Error(i(460)),Ga=Error(i(474)),Ka=Error(i(542)),qa={then:function(){}};function Ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gn,gn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(gn,gn);else{if(e=$u,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e}throw Za=t,Wa}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Za=e,Wa):e}}var Za=null;function Qa(){if(Za===null)throw Error(i(459));var e=Za;return Za=null,e}function $a(e){if(e===Wa||e===Ka)throw Error(i(483))}var eo=null,to=0;function no(e){var t=to;return to+=1,eo===null&&(eo=[]),Ya(eo,e,t)}function ro(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function io(e,t){throw t.$$typeof===T?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ao(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ki(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ni(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===O?(e=d(e,t,n.props.children,r,n.key),ro(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===P&&Xa(i)===t.type)?(t=a(t,n.props),ro(t,n),t.return=e,t):(t=ji(n.type,n.key,n.props,null,e.mode,r),ro(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Fi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ni(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case E:return n=ji(t.type,t.key,t.props,null,e.mode,n),ro(n,t),n.return=e,n;case D:return t=Fi(t,e.mode,n),t.return=e,t;case P:return t=Xa(t),f(e,t,n)}if(de(t)||le(t))return t=Mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,no(t),n);if(t.$$typeof===M)return f(e,xa(e,t),n);io(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case E:return n.key===i?l(e,t,n,r):null;case D:return n.key===i?u(e,t,n,r):null;case P:return n=Xa(n),p(e,t,n,r)}if(de(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,no(n),r);if(n.$$typeof===M)return p(e,t,xa(e,n),r);io(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case E:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case D:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case P:return r=Xa(r),m(e,t,n,r,i)}if(de(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,no(r),i);if(r.$$typeof===M)return m(e,t,n,xa(t,r),i);io(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),G&&qi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return G&&qi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),G&&qi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),G&&qi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return G&&qi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),G&&qi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===O&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case E:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===O){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ro(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===P&&Xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ro(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===O?(c=Mi(o.props.children,e.mode,c,o.key),ro(c,o),c.return=e,e=c):(c=ji(o.type,o.key,o.props,null,e.mode,c),ro(c,o),c.return=e,e=c)}return s(e);case D:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Fi(o,e.mode,c),c.return=e,e=c}return s(e);case P:return o=Xa(o),_(e,r,o,c)}if(de(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,no(o),c);if(o.$$typeof===M)return _(e,r,xa(e,o),c);io(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Ni(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{to=0;var i=_(e,t,n,r);return eo=null,i}catch(t){if(t===Wa||t===Ka)throw t;var a=Di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var oo=ao(!0),so=ao(!1),co=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uo(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 fo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function po(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Qu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=wi(e),Si(e,null,n),t}return yi(e,r,t,n),wi(e)}function mo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}function ho(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var go=!1;function _o(){if(go){var e=Fa;if(e!==null)throw e}}function vo(e,t,n,r){go=!1;var i=e.updateQueue;co=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(ed&f)===f:(r&f)===f){f!==0&&f===Pa&&(go=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=w({},d,f);break a;case 2:co=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),cd|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function bo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)yo(n[e],t)}var xo=he(null),So=he(0);function Co(e,t){e=od,ge(So,e),ge(xo,t),od=e|t.baseLanes}function wo(){ge(So,od),ge(xo,xo.current)}function To(){od=So.current,R(xo),R(So)}var Eo=he(null),Do=null;function Oo(e){var t=e.alternate;ge(No,No.current&1),ge(Eo,e),Do===null&&(t===null||xo.current!==null||t.memoizedState!==null)&&(Do=e)}function ko(e){ge(No,No.current),ge(Eo,e),Do===null&&(Do=e)}function Ao(e){e.tag===22?(ge(No,No.current),ge(Eo,e),Do===null&&(Do=e)):jo()}function jo(){ge(No,No.current),ge(Eo,Eo.current)}function Mo(e){R(Eo),Do===e&&(Do=null),R(No)}var No=he(0);function Po(e,t){ge(Eo,Eo.current),ge(No,t)}function Fo(e){R(No),R(Eo),Do===e&&(Do=null)}function Io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)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}var Lo=0,K=null,Ro=null,zo=null,Bo=!1,Vo=!1,Ho=!1,Uo=0,Wo=0,Go=null,Ko=0;function qo(){throw Error(i(321))}function Jo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lr(e[n],t[n]))return!1;return!0}function Yo(e,t,n,r,i,a){return Lo=a,K=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?fc:pc,Ho=!1,a=n(r,i),Ho=!1,Vo&&(a=Zo(t,n,r,i)),Xo(e),a}function Xo(e){I.H=dc;var t=Ro!==null&&Ro.next!==null;if(Lo=0,zo=Ro=K=null,Bo=!1,Wo=0,Go=null,t)throw Error(i(300));e===null||Ac||(e=e.dependencies,e!==null&&va(e)&&(Ac=!0))}function Zo(e,t,n,r){K=e;var a=0;do{if(Vo&&(Go=null),Wo=0,Vo=!1,25<=a)throw Error(i(301));if(a+=1,zo=Ro=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=mc,o=t(n,r)}while(Vo);return o}function Qo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?as(t):t,e=e.useState()[0],(Ro===null?null:Ro.memoizedState)!==e&&(K.flags|=1024),t}function $o(){var e=Uo!==0;return Uo=0,e}function es(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ts(e){if(Bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bo=!1}Lo=0,zo=Ro=K=null,Vo=!1,Wo=Uo=0,Go=null}function ns(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zo===null?K.memoizedState=zo=e:zo=zo.next=e,zo}function rs(){if(Ro===null){var e=K.alternate;e=e===null?null:e.memoizedState}else e=Ro.next;var t=zo===null?K.memoizedState:zo.next;if(t!==null)zo=t,Ro=e;else{if(e===null)throw K.alternate===null?Error(i(467)):Error(i(310));Ro=e,e={memoizedState:Ro.memoizedState,baseState:Ro.baseState,baseQueue:Ro.baseQueue,queue:Ro.queue,next:null},zo===null?K.memoizedState=zo=e:zo=zo.next=e}return zo}function is(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(e){var t=Wo;return Wo+=1,Go===null&&(Go=[]),e=Ya(Go,e,t),t=K,(zo===null?t.memoizedState:zo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?fc:pc),e}function os(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return as(e);if(e.$$typeof===se)return;if(e.$$typeof===M)return ba(e)}throw Error(i(438,String(e)))}function ss(e){var t=null,n=K.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=K.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=is(),K.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function cs(e,t){return typeof t==`function`?t(e):t}function ls(e){return us(rs(),Ro,e)}function us(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Lo&f)===f:(ed&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Pa&&(d=!0);else if((Lo&p)===p){u=u.next,p===Pa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,K.lanes|=p,cd|=p;f=u.action,Ho&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,K.lanes|=f,cd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Lr(o,e.memoizedState)&&(Ac=!0,d&&(n=Fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ds(e){var t=rs(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Lr(o,t.memoizedState)||(Ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function fs(e,t,n){var r=K,a=rs(),o=G;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Lr((Ro||a).memoizedState,n);if(s&&(a.memoizedState=n,Ac=!0),a=a.queue,Ls(hs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||zo!==null&&!!(zo.memoizedState.tag&1),Ms(e?9:8,{destroy:void 0},ms.bind(null,r,a,n,t),null),e){if(r.flags|=2048,$u===null)throw Error(i(349));o||Lo&127||ps(r,t,n)}return n}function ps(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=K.updateQueue,t===null?(t=is(),K.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ms(e,t,n,r){t.value=n,t.getSnapshot=r,gs(t)&&_s(e)}function hs(e,t,n){return n(function(){gs(t)&&_s(e)})}function gs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lr(e,n)}catch{return!0}}function _s(e){var t=xi(e,2);t!==null&&Id(t,e,2)}function vs(e){var t=ns();if(typeof e==`function`){var n=e;if(e=n(),Ho){qe(!0);try{n()}finally{qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:e},t}function ys(e,t,n,r){return e.baseState=n,us(e,Ro,typeof r==`function`?r:cs)}function bs(e,t,n,r,a){if(cc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,xs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function xs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Ss(e,t,s)}catch(n){ws(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Ss(e,t,a)}catch(n){ws(e,t,n)}}function Ss(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Cs(e,t,n)},function(n){return ws(e,t,n)}):Cs(e,t,n)}function Cs(e,t,n){t.status=`fulfilled`,t.value=n,Ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,xs(e,n)))}function ws(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ts(t),t=t.next;while(t!==r)}e.action=null}function Ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Es(e,t){return t}function Ds(e,t){if(G){var n=$u.formState;if(n!==null){a:{var r=K;if(G){if($i){b:{for(var i=$i,a=ta;i.nodeType!==8;)if(!a||(i=um(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){$i=um(i.nextSibling),r=i.data===`F!`;break a}}ra(r)}r=!1}r&&(t=n[0])}}return n=ns(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:t},n.queue=r,n=ac.bind(null,K,r),r.dispatch=n,r=vs(!1),a=sc.bind(null,K,!1,r.queue),r=ns(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=bs.bind(null,K,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Os(e){return ks(rs(),Ro,e)}function ks(e,t,n){if(t=us(e,t,Es)[0],e=ls(cs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=as(t)}catch(e){throw e===Wa?Ka:e}else r=t;t=rs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(K.flags|=2048,Ms(9,{destroy:void 0},As.bind(null,i,n),null)),[r,a,e]}function As(e,t){e.action=t}function js(e){var t=rs(),n=Ro;if(n!==null)return ks(t,n,e);rs(),t=t.memoizedState,n=rs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ms(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=K.updateQueue,t===null&&(t=is(),K.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ns(){return rs().memoizedState}function Ps(e,t,n,r){var i=ns();K.flags|=e,i.memoizedState=Ms(1|t,{destroy:void 0},n,r===void 0?null:r)}function Fs(e,t,n,r){var i=rs();r=r===void 0?null:r;var a=i.memoizedState.inst;Ro!==null&&r!==null&&Jo(r,Ro.memoizedState.deps)?i.memoizedState=Ms(t,a,n,r):(K.flags|=e,i.memoizedState=Ms(1|t,a,n,r))}function Is(e,t){Ps(8390656,8,e,t)}function Ls(e,t){Fs(2048,8,e,t)}function Rs(e){K.flags|=4;var t=K.updateQueue;if(t===null)t=is(),K.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function zs(e){var t=rs().memoizedState;return Rs({ref:t,nextImpl:e}),function(){if(Qu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Bs(e,t){return Fs(4,2,e,t)}function Vs(e,t){return Fs(4,4,e,t)}function Hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Us(e,t,n){n=n==null?null:n.concat([e]),Fs(4,4,Hs.bind(null,t,e),n)}function Ws(){}function Gs(e,t){var n=rs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Jo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ks(e,t){var n=rs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Jo(t,r[1]))return r[0];if(r=e(),Ho){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r}function qs(e,t,n){return n===void 0||Lo&1073741824&&!(ed&261930)?e.memoizedState=t:(e.memoizedState=n,e=Pd(),K.lanes|=e,cd|=e,n)}function Js(e,t,n,r){return Lr(n,t)?n:xo.current===null?!(Lo&106)||Lo&1073741824&&!(ed&261930)?(Ac=!0,e.memoizedState=n):(e=Pd(),K.lanes|=e,cd|=e,t):(e=qs(e,n,r),Lr(e,t)||(Ac=!0),e)}function Ys(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,sc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?oc(e,t,Ra(c,r),Nd(e)):oc(e,t,r,Nd(e))}catch(n){oc(e,t,{then:function(){},status:`rejected`,reason:n},Nd())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function Xs(){}function Zs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Qs(e).queue;Ys(e,a,t,fe,n===null?Xs:function(){return $s(e),n(r)})}function Qs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:fe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $s(e){var t=Qs(e);t.next===null&&(t=e.alternate.memoizedState),oc(e,t.next.queue,{},Nd())}function ec(){return ba(ch)}function tc(){return rs().memoizedState}function nc(){return rs().memoizedState}function rc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Nd();e=fo(n);var r=po(t,e,n);r!==null&&(Id(r,t,n),mo(r,t,n)),t={cache:Da()},e.payload=t;return}t=t.return}}function ic(e,t,n){var r=Nd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},cc(e)?lc(t,n):(n=bi(e,t,n,r),n!==null&&(Id(n,e,r),uc(n,t,r)))}function ac(e,t,n){oc(e,t,n,Nd())}function oc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(cc(e))lc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o))return yi(e,t,i,0),$u===null&&vi(),!1}catch{}if(n=bi(e,t,i,r),n!==null)return Id(n,e,r),uc(n,t,r),!0}return!1}function sc(e,t,n,r){if(r={lane:2,revertLane:Lf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},cc(e)){if(t)throw Error(i(479))}else t=bi(e,n,r,2),t!==null&&Id(t,e,2)}function cc(e){var t=e.alternate;return e===K||t!==null&&t===K}function lc(e,t){Vo=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}var dc={readContext:ba,use:os,useCallback:qo,useContext:qo,useEffect:qo,useImperativeHandle:qo,useLayoutEffect:qo,useInsertionEffect:qo,useMemo:qo,useReducer:qo,useRef:qo,useState:qo,useDebugValue:qo,useDeferredValue:qo,useTransition:qo,useSyncExternalStore:qo,useId:qo,useHostTransitionStatus:qo,useFormState:qo,useActionState:qo,useOptimistic:qo,useMemoCache:qo,useCacheRefresh:qo,useEffectEvent:qo},fc={readContext:ba,use:os,useCallback:function(e,t){return ns().memoizedState=[e,t===void 0?null:t],e},useContext:ba,useEffect:Is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ps(4194308,4,Hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){Ps(4,2,e,t)},useMemo:function(e,t){var n=ns();t=t===void 0?null:t;var r=e();if(Ho){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ns();if(n!==void 0){var i=n(t);if(Ho){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ic.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=ns();return e={current:e},t.memoizedState=e},useState:function(e){e=vs(e);var t=e.queue,n=ac.bind(null,K,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ws,useDeferredValue:function(e,t){return qs(ns(),e,t)},useTransition:function(){var e=vs(!1);return e=Ys.bind(null,K,e.queue,!0,!1),ns().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=K,a=ns();if(G){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),$u===null)throw Error(i(349));ed&127||ps(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Is(hs.bind(null,r,o,e),[e]),r.flags|=2048,Ms(9,{destroy:void 0},ms.bind(null,r,o,n,t),null),n},useId:function(){var e=ns(),t=$u.identifierPrefix;if(G){var n=Ki,r=Gi;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Uo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Ko++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ec,useFormState:Ds,useActionState:Ds,useOptimistic:function(e){var t=ns();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=sc.bind(null,K,!0,n),n.dispatch=t,[e,t]},useMemoCache:ss,useCacheRefresh:function(){return ns().memoizedState=rc.bind(null,K)},useEffectEvent:function(e){var t=ns(),n={impl:e};return t.memoizedState=n,function(){if(Qu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},pc={readContext:ba,use:os,useCallback:Gs,useContext:ba,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Bs,useLayoutEffect:Vs,useMemo:Ks,useReducer:ls,useRef:Ns,useState:function(){return ls(cs)},useDebugValue:Ws,useDeferredValue:function(e,t){return Js(rs(),Ro.memoizedState,e,t)},useTransition:function(){var e=ls(cs)[0],t=rs().memoizedState;return[typeof e==`boolean`?e:as(e),t]},useSyncExternalStore:fs,useId:tc,useHostTransitionStatus:ec,useFormState:Os,useActionState:Os,useOptimistic:function(e,t){return ys(rs(),Ro,e,t)},useMemoCache:ss,useCacheRefresh:nc,useEffectEvent:zs},mc={readContext:ba,use:os,useCallback:Gs,useContext:ba,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Bs,useLayoutEffect:Vs,useMemo:Ks,useReducer:ds,useRef:Ns,useState:function(){return ds(cs)},useDebugValue:Ws,useDeferredValue:function(e,t){var n=rs();return Ro===null?qs(n,e,t):Js(n,Ro.memoizedState,e,t)},useTransition:function(){var e=ds(cs)[0],t=rs().memoizedState;return[typeof e==`boolean`?e:as(e),t]},useSyncExternalStore:fs,useId:tc,useHostTransitionStatus:ec,useFormState:js,useActionState:js,useOptimistic:function(e,t){var n=rs();return Ro===null?(n.baseState=e,[e,n.queue.dispatch]):ys(n,Ro,e,t)},useMemoCache:ss,useCacheRefresh:nc,useEffectEvent:zs};function hc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var gc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=fo(r);i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Id(t,e,r),mo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=fo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Id(t,e,r),mo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nd(),r=fo(n);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,n),t!==null&&(Id(t,e,n),mo(t,e,n))}};function _c(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Rr(n,r)||!Rr(i,a):!0}function vc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gc.enqueueReplaceState(t,t.state,null)}function yc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=w({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function bc(e){mi(e)}function xc(e){console.error(e)}function Sc(e){mi(e)}function Cc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function wc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){return n=fo(n),n.tag=3,n.payload={element:null},n.callback=function(){Cc(e,t)},n}function Ec(e){return e=fo(e),e.tag=3,e}function Dc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){wc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){wc(t,n,r),typeof i!=`function`&&(bd===null?bd=new Set([this]):bd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Oc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&_a(t,n,a,!0),n=Eo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Do===null?Jd():n.alternate===null&&sd===0&&(sd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,a)),!1;case 22:return n.flags|=65536,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),_f(e,r,a)),!1}throw Error(i(435,n.tag))}return _f(e,r,a),Jd(),!1}if(G)return t=Eo.current,t===null?(r!==na&&(t=Error(i(423),{cause:r}),la(Li(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Li(r,n),a=Tc(e.stateNode,r,a),ho(e,a),sd!==4&&(sd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==na&&(e=Error(i(422),{cause:r}),la(Li(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Li(o,n),pd===null?pd=[o]:pd.push(o),sd!==4&&(sd=2),t===null)return!0;r=Li(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Tc(n.stateNode,r,e),ho(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(bd===null||!bd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ec(a),Dc(a,e,n,r),ho(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var kc=Error(i(461)),Ac=!1;function jc(e,t,n,r){t.child=e===null?so(t,null,n,r):oo(t,e.child,n,r)}function Mc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ya(t),r=Yo(e,t,n,o,a,i),s=$o(),e!==null&&!Ac?(es(e,t,i),ol(e,t,i)):(G&&s&&Yi(t),t.flags|=1,jc(e,t,r,i),t.child)}function Nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Pc(e,t,a,r,i)):(e=ji(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!sl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Rr:n,n(o,r)&&e.ref===t.ref)return ol(e,t,i)}return t.flags|=1,e=ki(a,r),e.ref=t.ref,e.return=t,t.child=e}function Pc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Rr(a,r)&&e.ref===t.ref){if(Ac=!1,t.pendingProps=r=a,sl(e,i))e.flags&131072&&(Ac=!0);else return t.lanes=e.lanes,ol(e,t,i)}}return Hc(e,t,n,r,i)}function Fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ha(t,a===null?null:a.cachePool),a===null?wo():Co(t,a),Ao(t);else return r=t.lanes=536870912,Lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ha(t,null),wo(),jo()):(Ha(t,a.cachePool),Co(t,a),jo(),t.memoizedState=null);return jc(e,t,i,n),t.child}function Ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Lc(e,t,n,r,i){var a=Va();return a=a===null?null:{parent:Ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ha(t,null),wo(),Ao(t),e!==null&&_a(e,t,r,!0),t.childLanes=i,null}function Rc(e,t){return t=Zc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function zc(e,t,n){return oo(t,e.child,null,n),e=Rc(t,t.pendingProps),e.flags|=2,Mo(t),t.memoizedState=null,e}function Bc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(G){if(r.mode===`hidden`)return e=Rc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Ic(null,e);if(ko(t),(e=$i)?(e=om(e,ta),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi===null?null:{id:Gi,overflow:Ki},retryLane:536870912,hydrationErrors:null},n=Pi(e),n.return=t,t.child=n,Qi=t,$i=null)):e=null,e===null)throw ra(t);return t.lanes=536870912,null}return Rc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ko(t),a){if(t.flags&256)t.flags&=-257,t=zc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ac||_a(e,t,n,!1),a=(n&e.childLanes)!==0,Ac||a){if(xo.current===null){if(r=$u,r!==null&&(s=ft(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,xi(e,s),Id(r,e,s),kc;Jd()}t=zc(e,t,n)}else e=o.treeContext,$i=um(s.nextSibling),Qi=t,G=!0,ea=null,ta=!1,e!==null&&Zi(t,e),t=Rc(t,r),t.flags|=134221824;return t}return e=ki(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Hc(e,t,n,r,i){return ya(t),n=Yo(e,t,n,r,void 0,i),r=$o(),e!==null&&!Ac?(es(e,t,i),ol(e,t,i)):(G&&r&&Yi(t),t.flags|=1,jc(e,t,n,i),t.child)}function Uc(e,t,n,r,i,a){return ya(t),t.updateQueue=null,n=Zo(t,r,n,i),Xo(e),r=$o(),e!==null&&!Ac?(es(e,t,a),ol(e,t,a)):(G&&r&&Yi(t),t.flags|=1,jc(e,t,n,a),t.child)}function Wc(e,t,n,r,i){if(ya(t),t.stateNode===null){var a=Ti,o=n.contextType;typeof o==`object`&&o&&(a=ba(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=gc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},lo(t),o=n.contextType,a.context=typeof o==`object`&&o?ba(o):Ti,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(hc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&gc.enqueueReplaceState(a,a.state,null),vo(t,r,a,i),_o(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=yc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ti,typeof u==`object`&&u&&(o=ba(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&vc(t,a,r,o),co=!1;var f=t.memoizedState;a.state=f,vo(t,r,a,i),_o(),l=t.memoizedState,s||f!==l||co?(typeof d==`function`&&(hc(t,n,d,r),l=t.memoizedState),(c=co||_c(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uo(e,t),o=t.memoizedProps,u=yc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ti,typeof l==`object`&&l&&(c=ba(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&vc(t,a,r,c),co=!1,f=t.memoizedState,a.state=f,vo(t,r,a,i),_o();var p=t.memoizedState;o!==d||f!==p||co||e!==null&&e.dependencies!==null&&va(e.dependencies)?(typeof s==`function`&&(hc(t,n,s,r),p=t.memoizedState),(u=co||_c(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&va(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Vc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=oo(t,e.child,null,i),t.child=oo(t,null,n,i)):jc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ol(e,t,i),e}function Gc(e,t,n,r){return sa(),t.flags|=256,jc(e,t,n,r),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qc(e){return{baseLanes:e,cachePool:Ua()}}function Jc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=dd),e}function Yc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(No.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(G){if(i?Oo(t):jo(),(e=$i)?(e=om(e,ta),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi===null?null:{id:Gi,overflow:Ki},retryLane:536870912,hydrationErrors:null},n=Pi(e),n.return=t,t.child=n,Qi=t,$i=null)):e=null,e===null)throw ra(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(jo(),i=t.mode,a=Zc({mode:`hidden`,children:a},i),r=Mi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=qc(n),r.childLanes=Jc(e,o,n),t.memoizedState=Kc,Ic(null,r)):(Oo(t),Xc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return $c(e,t,a,o,r,c,s,n)}return i?(jo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ki(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Mi(i,a,n,null),i.flags|=2):i=ki(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Ic(null,r),r=t.child,i=e.child.memoizedState,i===null?i=qc(n):(a=i.cachePool,a===null?a=Ua():(s=Ea._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Jc(e,o,n),t.memoizedState=Kc,Ic(e.child,r)):(Oo(t),n=e.child,e=n.sibling,n=ki(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Xc(e,t){return t=Zc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Zc(e,t){return e=Di(22,e,null,t),e.lanes=0,e}function Qc(e,t,n){return oo(t,e.child,null,n),e=Xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $c(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Oo(t),t.flags&=-257,Qc(e,t,c)):t.memoizedState===null?(jo(),o=a.fallback,s=t.mode,a=Zc({mode:`visible`,children:a.children},s),o=Mi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,oo(t,e.child,null,c),a=t.child,a.memoizedState=qc(c),a.childLanes=Jc(e,r,c),t.memoizedState=Kc,Ic(null,a)):(jo(),t.child=e.child,t.flags|=128,null);if(Oo(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,la({value:a,source:null,stack:null})),Qc(e,t,c)}if(Ac||_a(e,t,c,!1),r=(c&e.childLanes)!==0,Ac||r){if(xo.current!==null)return Qc(e,t,c);if(r=$u,r!==null&&(a=ft(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,xi(e,a),Id(r,e,a),kc;return sm(o)||Jd(),Qc(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,$i=um(o.nextSibling),Qi=t,G=!0,ea=null,ta=!1,e!==null&&Zi(t,e),t=Xc(t,a.children),t.flags|=134221824,t)}function el(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ha(e.return,t,n)}function tl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Io(n)===null&&(t=e),e=e.sibling}return t}function nl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function rl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function il(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=No.current;if(t.flags&128)return Po(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Po(t,o),i===`backwards`&&e!==null?(rl(e),jc(e,t,r,n),rl(e)):jc(e,t,r,n),r=G?Vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&el(e,n,t);else if(e.tag===19)el(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=tl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,rl(t)),nl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nl(t,!0,n,null,a,r);break;case`together`:nl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=tl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nl(t,!1,i,n,a,r)}return t.child}function al(e,t,n){var r=t.pendingProps;return pa(t,t.type,r.value),jc(e,t,r.children,n),t.child}function ol(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(_a(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ki(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ki(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&va(e)))}function cl(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),pa(t,Ea,e.memoizedState.cache),sa();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ko(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Oo(t),t.flags|=128,null;r=_a(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Yc(e,t,n):(Oo(t),e=ol(e,t,n),e===null?null:e.sibling)}Oo(t);break;case 19:if(t.flags&128)return il(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(_a(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return il(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Po(t,No.current),r)break;return null;case 22:return t.lanes=0,Fc(e,t,n,t.pendingProps);case 24:pa(t,Ea,e.memoizedState.cache)}return ol(e,t,n)}function ll(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ac=!0;else{if(!sl(e,n)&&!(t.flags&128))return Ac=!1,cl(e,t,n);Ac=!!(e.flags&131072)}}else Ac=!1,G&&t.flags&1048576&&Ji(t,Vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e==`function`)Oi(e)?(r=yc(e,r),t.tag=1,t=Wc(null,t,e,r,n)):(t.tag=0,t=Hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===N){t.tag=11,t=Mc(null,t,e,r,n);break a}if(a===ne){t.tag=14,t=Nc(null,t,e,r,n);break a}if(a===M){t.tag=10,t.type=e,t=al(null,t,n);break a}}throw t=F(e)||e,Error(i(306,t,``))}}return t;case 0:return Hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=yc(r,t.pendingProps),Wc(e,t,r,a,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,uo(e,t),vo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,pa(t,Ea,r),r!==o.cache&&ga(t,[Ea],n,!0),_o(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Gc(e,t,r,n);break a}if(r!==a){a=Li(Error(i(424)),t),la(a),t=Gc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for($i=um(e.firstChild),Qi=t,G=!0,ea=null,ta=!0,n=so(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(sa(),r===a){t=ol(e,t,n);break a}jc(e,t,r,n)}t=t.child}return t;case 26:return Vc(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:G||(t.stateNode=mp(t.type,t.pendingProps,ye.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&G&&(r=t.stateNode=gm(t.type,t.pendingProps,ye.current),Qi=t,ta=!0,a=$i,wp(t.type)?(dm=a,$i=um(r.firstChild)):$i=a),jc(e,t,t.pendingProps.children,n),Vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&G&&((a=r=$i)&&(r=im(r,t.type,t.pendingProps,ta),r===null?a=!1:(t.stateNode=r,Qi=t,$i=um(r.firstChild),ta=!1,a=!0)),a||ra(t)),Ce(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Yo(e,t,Qo,null,null,n),ch._currentValue=a),Vc(e,t),jc(e,t,r,n),t.child;case 6:return e===null&&G&&((e=n=$i)&&(n=am(n,t.pendingProps,ta),n===null?e=!1:(t.stateNode=n,Qi=t,$i=null,e=!0)),e||ra(t)),null;case 13:return Yc(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):jc(e,t,r,n),t.child;case 11:return Mc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Vc(e,t),jc(e,t,r,n),t.child;case 8:return jc(e,t,t.pendingProps.children,n),t.child;case 12:return jc(e,t,t.pendingProps.children,n),t.child;case 10:return al(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ya(t),a=ba(a),r=r(a),t.flags|=1,jc(e,t,r,n),t.child;case 14:return Nc(e,t,t.type,t.pendingProps,n);case 15:return Pc(e,t,t.type,t.pendingProps,n);case 19:return il(e,t,n);case 31:return Bc(e,t,n);case 22:return Fc(e,t,n,t.pendingProps);case 24:return ya(t),r=ba(Ea),e===null?(a=Va(),a===null&&(a=$u,o=Da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},lo(t),pa(t,Ea,a)):((e.lanes&n)!==0&&(uo(e,t),vo(t,null,null,n),_o()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,pa(t,Ea,r),r!==a.cache&&ga(t,[Ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),pa(t,Ea,r))),jc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:G&&Yi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Vc(e,t),jc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ul(e){e.flags|=4}function dl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Ym(t,r):Ym(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Gd())e.flags|=8192;else throw Za=qa,Ga}}else e.flags&=-16777217}function fl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xm(t)){if(Gd())e.flags|=8192;else throw Za=qa,Ga}}function pl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ot(),e.lanes|=t,fd|=t)}function ml(e,t){if(!G)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function hl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gl(e,t,n){var r=t.pendingProps;switch(Xi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hl(t),null;case 1:return hl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ma(Ea),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(oa(t)?ul(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ca())),hl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ul(t),o===null?(hl(t),dl(t,a,null,r,n)):(hl(t),fl(t,o))):o?o===e.memoizedState?(hl(t),t.flags&=-16777217):(ul(t),hl(t),fl(t,o)):(e=e.memoizedProps,e!==r&&ul(t),hl(t),dl(t,a,e,r,n)),null;case 27:if(we(t),n=ye.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return hl(t),t.subtreeFlags&=-33554433,null}e=_e.current,oa(t)?ia(t,e):(e=gm(a,r,n),t.stateNode=e,ul(t))}return hl(t),t.subtreeFlags&=-33554433,null;case 5:if(we(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return hl(t),t.subtreeFlags&=-33554433,null}if(o=_e.current,oa(t))ia(t,o);else{var s=dp(ye.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[vt]=t,o[yt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ap(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ul(t)}}return hl(t),t.subtreeFlags&=-33554433,dl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ye.current,oa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Qi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[vt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||ra(t,!0)}else e=dp(e).createTextNode(r),e[vt]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=oa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[vt]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Mo(t),t):(Mo(t),null);if(t.flags&128)throw Error(i(558))}return hl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=oa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[vt]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),a=!1}else a=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Mo(t),t):(Mo(t),null)}return Mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),pl(t,t.updateQueue),hl(t),null);case 4:return Se(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,hl(t),null;case 10:return ma(t.type),hl(t),null;case 19:if(Fo(t),r=t.memoizedState,r===null)return hl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ml(r,!1);else{if(sd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Io(e),o!==null){for(t.flags|=128,ml(r,!1),e=o.updateQueue,t.updateQueue=e,pl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ai(n,e),n=n.sibling;return Po(t,No.current&1|2),G&&qi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ie()>vd&&(t.flags|=128,a=!0,ml(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,pl(t,e),ml(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!G)return hl(t),null}else 2*Ie()-r.renderingStartTime>vd&&n!==536870912&&(t.flags|=128,a=!0,ml(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ie(),e.sibling=null,o=No.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||G?Po(t,o):(n=o,ge(Eo,t),ge(No,n),Do===null&&(Do=t)),G&&qi(t,r.treeForkCount),e}return hl(t),null;case 22:case 23:return Mo(t),To(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(hl(t),t.subtreeFlags&6&&(t.flags|=8192)):hl(t),n=t.updateQueue,n!==null&&pl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&R(Ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ma(Ea),hl(t),null;case 25:return null;case 30:return t.flags|=33554432,hl(t),null}throw Error(i(156,t.tag))}function _l(e,t){switch(Xi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ma(Ea),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(Mo(t),t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Se(),null;case 10:return ma(t.type),null;case 22:case 23:return Mo(t),To(),e!==null&&R(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ma(Ea),null;case 25:return null;default:return null}}function vl(e,t){switch(Xi(t),t.tag){case 3:ma(Ea),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&Mo(t);break;case 13:Mo(t);break;case 19:Fo(t);break;case 10:ma(t.type);break;case 22:case 23:Mo(t),To(),e!==null&&R(Ba);break;case 24:ma(Ea)}}function yl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){gf(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){gf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){gf(t,t.return,e)}}function xl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bo(t,n)}catch(t){gf(e,e.return,t)}}}function Sl(e,t,n){n.props=yc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){gf(e,t,n)}}function Cl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=di(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Fp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Ip(e);f(e.child,!1,$p,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){gf(e,t,n)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){gf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){gf(e,t,n)}else n.current=null}}function Tl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)tm(e.stateNode,t[n])}function El(e){for(var t=e.return;t!==null&&(kl(t)&&tm(e.stateNode,t.stateNode),!Ol(t));)t=t.return}function Dl(e){for(var t=e.return;t!==null&&(kl(t)&&nm(e.stateNode,t.stateNode),!Ol(t));)t=t.return}function Ol(e){return e.tag===5||e.tag===3||e.tag===27}function kl(e){return e&&e.tag===7&&e.stateNode!==null}function Al(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){gf(e,e.return,t)}}function jl(e,t,n){try{var r=e.stateNode;sp(r,e.type,n,t),r[yt]=t}catch(t){gf(e,e.return,t)}}function Ml(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function Nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ml(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&&wp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gn)),Tl(e,r),Ut=!0;else if(i!==4&&(i===27&&(Tl(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Tl(e,r),Ut=!0;else if(i!==4&&(i===27&&(Tl(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ap(t,r,n),t[vt]=e,t[yt]=n}catch(t){gf(e,e.return,t)}}var Ll=!1,Rl=null;function zl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ll=!0)}var Bl=null;function Vl(){var e=Bl;return Bl=null,e}var Hl=0;function Ul(e,t,n,r,i){return Hl=0,Wl(e.child,t,n,r,i)}function Wl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Ll=!0,Dp(o,Hl===0?t:t+`_`+Hl,n),Hl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Wl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Gl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Gl(e.child,t),e=e.sibling}function Kl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Kl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=pi(t.default,t.share),t!==`none`&&(Ul(e,n,t,null,!1)||Gl(e.child,!1))}e=e.sibling}}function ql(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=di(r,n),a=pi(r.default,n.paired?r.share:r.enter);a===`none`?Kl(e):Ul(e,i,a,null,!1)?(Kl(e),n.paired||t||Fd(e,r.onEnter)):Gl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e,t),e=e.sibling;else Kl(e)}function Jl(e){if(Rl!==null&&Rl.size!==0){var t=Rl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=pi(n.default,n.share);if(a!==`none`&&(Ul(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Fd(e,n.onShare)):Gl(e.child,!1)),t.delete(r),t.size===0)break}}}Jl(e)}e=e.sibling}}}function Yl(e){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode),r=Rl===null?void 0:Rl.get(n),i=pi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Ul(e,n,i,null,!1)?r===void 0?Fd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Rl.delete(n),Fd(e,t.onShare)):Gl(e.child,!1)),Rl!==null&&Jl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e),e=e.sibling;else Rl!==null&&Jl(e)}function Xl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode);t=pi(t.default,t.update),e.flags&=-5,t!==`none`&&Ul(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Xl(e);e=e.sibling}}function Zl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Gl(e.child,!1))}Zl(e)}e=e.sibling}}function Ql(e){if(e.tag===30)e.stateNode.paired=null,Gl(e.child,!1),Zl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Zl(e)}function $l(e){for(e=e.child;e!==null;)e.tag===30?Gl(e.child,!1):e.subtreeFlags&33554432&&$l(e),e=e.sibling}function eu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Hl<a.length){var l=a[Hl],u=Ap(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Dp(c,Hl===0?n:n+`_`+Hl,i),s&&e.flags&4||(Bl===null&&(Bl=[]),Bl.push(c,Hl===0?r:r+`_`+Hl,t.memoizedProps)),Hl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:eu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function tu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=di(n,r),a=pi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Hl=0,i=eu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Fd(e,n.onUpdate))}else e.subtreeFlags&33554432&&tu(e,t);e=e.sibling}}var nu=!1,ru=!1,iu=!1,au=!1,ou=typeof WeakSet==`function`?WeakSet:Set,su=null,cu=!1,lu=!1,uu=!1,du=!1;function fu(e,t,n){if(e=e.containerInfo,lp=gh,e=Ur(e),Wr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,su=t,t=n?9270:1024;su!==null;){if(e=su,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Yl(r[a]);if(e.alternate===null&&e.flags&2)n&&zl(e),pu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Yl(r),pu(n);continue}if(r!==null&&r.memoizedState!==null){n&&zl(e),pu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,su=r):(n&&Xl(e),pu(n))}}Rl=null}function pu(e){for(;su!==null;){var t=su,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=yc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){gf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=di(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=pi(a.default,a.update),a!==`none`&&Ul(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,su=r;break}su=t.return}}function mu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Pu(e,n),r&4&&yl(5,n);break;case 1:if(Pu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){gf(n,n.return,e)}else{var i=yc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){gf(n,n.return,e)}}}r&64&&xl(n),r&512&&Cl(n,n.return);break;case 3:if(Pu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{bo(e,t)}catch(e){gf(n,n.return,e)}}break;case 27:t===null&&r&4&&Il(n);case 26:case 5:Pu(e,n),t===null&&r&4&&Al(n),r&512&&Cl(n,n.return);break;case 12:Pu(e,n);break;case 31:Pu(e,n),r&4&&Cu(e,n);break;case 13:Pu(e,n),r&4&&wu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||nu,!r){var a=t!==null&&t.memoizedState!==null||ru;t=nu,i=ru,nu=r,(ru=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Iu(e,n,r)):Pu(e,n),nu=t,ru=i}break;case 30:Pu(e,n),r&512&&Cl(n,n.return);break;case 7:r&512&&Cl(n,n.return);default:Pu(e,n)}}function hu(e,t){for(e=e.child;e!==null;)gu(e,t),e=e.sibling}function gu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){gf(e,e.return,t)}_u(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Ut=!0}catch(t){gf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){gf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&hu(e,t);break;default:hu(e,t)}}function _u(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:gu(n,r);break a;case 22:n.memoizedState===null&&_u(n,r);break a;default:_u(n,r)}}e=e.sibling}}function vu(e){var t=e.alternate;t!==null&&(e.alternate=null,vu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var yu=null,bu=!1;function xu(e,t,n){for(n=n.child;n!==null;)Su(e,t,n),n=n.sibling}function Su(e,t,n){if(Ke&&typeof Ke.onCommitFiberUnmount==`function`)try{Ke.onCommitFiberUnmount(Ge,n)}catch{}switch(n.tag){case 26:ru||wl(n,t),xu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!ru&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ru||wl(n,t),Dl(n);var r=yu,i=bu;wp(n.type)&&(yu=n.stateNode,bu=!1),xu(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),yu=r,bu=i;break;case 5:ru||wl(n,t),Dl(n);case 6:if(n.tag===6&&Dl(n),r=yu,i=bu,yu=null,xu(e,t,n),yu=r,bu=i,yu!==null){if(bu)try{(yu.nodeType===9?yu.body:yu.nodeName===`HTML`?yu.ownerDocument.body:yu).removeChild(n.stateNode),Ut=!0}catch(e){gf(n,t,e)}else try{yu.removeChild(n.stateNode),Ut=!0}catch(e){gf(n,t,e)}}break;case 18:yu!==null&&(bu?(e=yu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Tp(yu,n.stateNode));break;case 4:r=yu,i=bu,yu=n.stateNode.containerInfo,bu=!0,xu(e,t,n),yu=r,bu=i;break;case 0:case 11:case 14:case 15:bl(2,n,t),ru||bl(4,n,t),xu(e,t,n);break;case 1:ru||(wl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Sl(n,t,r)),xu(e,t,n);break;case 21:xu(e,t,n);break;case 22:ru=(r=ru)||n.memoizedState!==null,xu(e,t,n),ru=r;break;case 30:wl(n,t),xu(e,t,n);break;case 7:ru||wl(n,t),xu(e,t,n);break;default:xu(e,t,n)}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){gf(t,t.return,e)}}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){gf(t,t.return,e)}}function Tu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ou),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ou),t;default:throw Error(i(435,e.tag))}}function Eu(e,t){var n=Tu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Du(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){yu=l.stateNode,bu=!1;break a}break;case 5:yu=l.stateNode,bu=!1;break a;case 3:case 4:yu=l.stateNode.containerInfo,bu=!0;break a}l=l.return}if(yu===null)throw Error(i(160));Su(s,c,o),yu=null,bu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ku(t,e,n),t=t.sibling}var Ou=null;function ku(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Du(t,e,n),Au(e),a&4&&(bl(3,e,e.return),yl(3,e),bl(5,e,e.return));break;case 1:Du(t,e,n),Au(e),a&512&&(ru||r===null||wl(r,r.return)),a&64&&nu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Ou,Du(t,e,n),Au(e),a&512&&(ru||r===null||wl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(nu)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Tt]||r[vt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ap(r,t,n),r[vt]=e,Mt(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[vt]=e,Mt(r),t=r}e.stateNode=t}}else nu||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&jl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||ru||t.parentNode.removeChild(t)):a.count--,n===null?nu||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:Du(t,e,n),Au(e),a&512&&(ru||r===null||wl(r,r.return)),r!==null&&a&4&&jl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=iu,iu=!1,Du(t,e,n),iu=o,Au(e),a&512&&(ru||r===null||wl(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),Ut=!0}catch(t){gf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,jl(e,t,r===null?t:r.memoizedProps)),a&1024&&(au=!0);break;case 6:if(Du(t,e,n),Au(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ut=!0}catch(t){gf(e,e.return,t)}}break;case 3:if(Ut=!1,Gm=null,o=Ou,Ou=xm(t.containerInfo),Du(t,e,n),Ou=o,Au(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){gf(e,e.return,t)}au&&(au=!1,ju(e)),Ut=!1;break;case 4:a=iu,iu=nu,r=Wt(),o=Ou,Ou=xm(e.stateNode.containerInfo),Du(t,e,n),Au(e),Ou=o,Ut&&lu&&(uu=!0),Ut=r,iu=a;break;case 12:Du(t,e,n),Au(e);break;case 31:Du(t,e,n),Au(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Eu(e,t)));break;case 13:Du(t,e,n),Au(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(gd=Ie()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Eu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=nu,l=ru,u=iu;nu=c||o,iu=u||o,ru=l||s,Du(t,e,n),ru=l,iu=u,nu=c,Au(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||nu||ru||(t=s||ru,n=nu,r=ru,nu=o||nu,ru=t,Fu(e,2),nu=n,ru=r),!o&&iu||hu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Eu(e,n))));break;case 19:Du(t,e,n),Au(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Eu(e,t)));break;case 30:a&512&&(ru||r===null||wl(r,r.return)),a=Wt(),o=lu,s=(n&335544064)===n,c=e.memoizedProps,lu=s&&pi(c.default,c.update)!==`none`,Du(t,e,n),Au(e),s&&r!==null&&Ut&&(e.flags|=4),lu=o,Ut=a;break;case 21:break;case 7:a&512&&(ru||r===null||wl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Du(t,e,n),Au(e)}}function Au(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ml(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(kl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Ol(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Fl(e,Nl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Fl(e,Nl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Pl(e,Nl(e),u,s);break;default:throw Error(i(161))}}catch(t){gf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ju(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ju(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Mu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Nu(t,e),t=t.sibling;else tu(t,!1)}function Nu(e,t){var n=e.alternate;if(n===null)ql(e,!1);else switch(e.tag){case 3:if(du=cu=!1,Vl(),Mu(t,e),!cu&&!uu){if(e=Bl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),du=!0}Bl=null;break;case 5:Mu(t,e);break;case 4:r=cu,cu=!1,Mu(t,e),cu&&(uu=!0),cu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Mu(t,e):ql(e,!1));break;case 30:r=cu,i=Vl(),cu=!1,Mu(t,e),cu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=di(a,o),o=di(n.memoizedProps,o);var s=pi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Hl=0,t=eu(e,n,t,o,s,a,!0),Hl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Fd(e,e.memoizedProps.onUpdate),Bl=i):i!==null&&(i.push.apply(i,Bl),Bl=i),cu=e.flags&32?!0:r;break;default:Mu(t,e)}}function Pu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mu(e,t.alternate,t),t=t.sibling}function Fu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:bl(4,n,n.return),Fu(n,r);break;case 1:wl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Sl(n,n.return,i),Fu(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:wl(n,n.return),n.tag!==5&&n.tag!==27||Dl(n),Fu(n,r);break;case 6:Dl(n);break;case 26:wl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||ru||i.parentNode.removeChild(i),Fu(n,r);break;case 22:n.memoizedState===null&&Fu(n,r);break;case 30:wl(n,n.return),Fu(n,r);break;case 7:wl(n,n.return);default:Fu(n,r)}e=e.sibling}}function Iu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Iu(i,a,n),yl(4,a);break;case 1:if(Iu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){gf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)yo(l[i],c)}catch(e){gf(r,r.return,e)}}s&&o&64&&xl(a),Cl(a,a.return);break;case 27:n&2&&Il(a);case 5:a.tag!==5&&a.tag!==27||El(a),Iu(i,a,n),s&&r===null&&o&4&&Al(a),Cl(a,a.return);break;case 6:El(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||nu||qm(xm(c.ownerDocument),a.type,c),Iu(i,a,n),s&&r===null&&o&4&&Al(a),Cl(a,a.return);break;case 12:Iu(i,a,n);break;case 31:Iu(i,a,n),s&&o&4&&Cu(i,a);break;case 13:Iu(i,a,n),s&&o&4&&wu(i,a);break;case 22:a.memoizedState===null&&Iu(i,a,n),Cl(a,a.return);break;case 30:Iu(i,a,n),Cl(a,a.return);break;case 7:Cl(a,a.return);default:Iu(i,a,n)}t=t.sibling}}function Lu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Oa(n))}function Ru(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Oa(e))}function zu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Bu(e,t,n,r),t=t.sibling;else i&&$l(t)}function Bu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ql(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:zu(e,t,n,r),a&2048&&yl(9,t);break;case 1:zu(e,t,n,r);break;case 3:zu(e,t,n,r),i&&du&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Oa(a)));break;case 12:if(a&2048){zu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){gf(t,t.return,e)}}else zu(e,t,n,r);break;case 31:zu(e,t,n,r);break;case 13:zu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Ql(t),o._visibility&2?zu(e,t,n,r):(o._visibility|=2,Vu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Ql(s),o._visibility&2?zu(e,t,n,r):Hu(e,t)),a&2048&&Lu(s,t);break;case 24:zu(e,t,n,r),a&2048&&Ru(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Gl(a.child,!0),Gl(t.child,!0))),zu(e,t,n,r);break;default:zu(e,t,n,r)}}function Vu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Vu(a,o,s,c,i),yl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Vu(a,o,s,c,i)):u._visibility&2?Vu(a,o,s,c,i):Hu(a,o),i&&l&2048&&Lu(o.alternate,o);break;case 24:Vu(a,o,s,c,i),i&&l&2048&&Ru(o.alternate,o);break;default:Vu(a,o,s,c,i)}t=t.sibling}}function Hu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Hu(n,r),i&2048&&Lu(r.alternate,r);break;case 24:Hu(n,r),i&2048&&Ru(r.alternate,r);break;default:Hu(n,r)}t=t.sibling}}var q=8192;function Uu(e,t,n){if(e.subtreeFlags&q)for(e=e.child;e!==null;)Wu(e,t,n),e=e.sibling}function Wu(e,t,n){switch(e.tag){case 26:Uu(e,t,n),e.flags&q&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Qm(n,e)):$m(n,Ou,e.memoizedState,e.memoizedProps));break;case 5:Uu(e,t,n),e.flags&q&&(e=e.stateNode,(t&335544128)===t&&Qm(n,e));break;case 3:case 4:var r=Ou;Ou=xm(e.stateNode.containerInfo),Uu(e,t,n),Ou=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=q,q=16777216,Uu(e,t,n),q=r):Uu(e,t,n));break;case 30:if((e.flags&q)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Rl===null&&(Rl=new Map),Rl.set(r,i)}Uu(e,t,n);break;default:Uu(e,t,n)}}function Gu(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 Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];su=r,Yu(r,e)}Gu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qu(e),e=e.sibling}function qu(e){switch(e.tag){case 0:case 11:case 15:Ku(e),e.flags&2048&&bl(9,e,e.return);break;case 3:Ku(e);break;case 12:Ku(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ju(e)):Ku(e);break;default:Ku(e)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];su=r,Yu(r,e)}Gu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(8,t,t.return),Ju(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ju(t));break;default:Ju(t)}e=e.sibling}}function Yu(e,t){for(;su!==null;){var n=su;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,su=r;else a:for(n=e;su!==null;){r=su;var i=r.sibling,a=r.return;if(vu(r),r===n){su=null;break a}if(i!==null){i.return=a,su=i;break a}su=a}}}var Xu={getCacheForType:function(e){var t=ba(Ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ba(Ea).controller.signal}},Zu=typeof WeakMap==`function`?WeakMap:Map,Qu=0,$u=null,J=null,ed=0,td=0,nd=null,rd=!1,id=!1,ad=!1,od=0,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=null,md=null,hd=!1,gd=0,_d=0,vd=1/0,yd=null,bd=null,xd=0,Sd=null,Cd=null,wd=0,Td=0,Ed=null,Dd=null,Od=null,kd=null,Ad=null,jd=0,Md=null;function Nd(){return Qu&2&&ed!==0?ed&-ed:I.T===null?ht():Lf()}function Pd(){if(dd===0){if(!(ed&536870912)||G){var e=$e;$e<<=1,!($e&3932160)&&($e=262144),dd=e}else dd=536870912}return e=Eo.current,e!==null&&(e.flags|=32),dd}function Fd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Fp(di(e.memoizedProps,n))),kd===null&&(kd=[]),kd.push(t.bind(null,r))}}function Id(e,t,n){(e===$u&&(td===2||td===9)||e.cancelPendingCommit!==null)&&(Ud(e,0),Bd(e,ed,dd,!1)),ct(e,n),Qu&2&&e===$u||(e===$u&&(!(Qu&2)&&(ld|=n),sd===4&&Bd(e,ed,dd,!1)),kf(e))}function Ld(e,t,n){if(Qu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||rt(e,t),a=r?Zd(e,t):Yd(e,t,!0),o=r;do{if(a===0){id&&!r&&Bd(e,t,0,!1);break}if(n=e.current.alternate,o&&!zd(n))a=Yd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=pd;var l=c.current.memoizedState.isDehydrated;if(l&&(Ud(c,s).flags|=256),s=Yd(c,s,!1),s!==2&&s!==6){if(ad&&!l){c.errorRecoveryDisabledLanes|=o,ld|=o,a=4;break a}o=md,md=a,o!==null&&(md===null?md=o:md.push.apply(md,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ud(e,0),Bd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Bd(r,t,dd,!rd);break a;case 2:md=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=gd+300-Ie(),10<a)){if(Bd(r,t,dd,!rd),nt(r,0,!0)!==0)break a;wd=t,r.timeoutHandle=vp(Rd.bind(null,r,n,md,yd,hd,t,dd,ld,fd,rd,o,`Throttled`,-0,0),a);break a}Rd(r,n,md,yd,hd,t,dd,ld,fd,rd,o,null,-0,0)}break}}while(1);kf(e)}function Rd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},Rl=null,Wu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=rh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?gd-Ie():(a&4194048)===a?_d-Ie():0,m=th(d,m),m!==null)?(wd=a,e.cancelPendingCommit=m(af.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Bd(e,a,o,!l)):af(e,t,a,n,r,i,o,s,c,l,u,d)}function zd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Lr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Bd(e,t,n,r){t=it(e,t),t&=~ud,t&=~ld,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ut(e,n,t)}function Vd(){return Qu&6?!0:(Af(0,!1),!1)}function Hd(){if(J!==null){if(td===0)var e=J.return;else e=J,fa=da=null,ts(e),eo=null,to=0,e=J;for(;e!==null;)vl(e.alternate,e),e=e.return;J=null}}function Ud(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),wd=0,Hd(),$u=e,J=n=ki(e.current,null),ed=t,td=0,nd=null,rd=!1,id=rt(e,t),ad=!1,fd=dd=ud=ld=cd=sd=0,md=pd=null,hd=!1,od=it(e,t),vi(),n}function Wd(e,t){K=null,I.H=dc,t===Wa||t===Ka?(t=Qa(),td=3):t===Ga?(t=Qa(),td=4):td=t===kc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,nd=t,J===null&&(sd=1,Cc(e,Li(t,e.current)))}function Gd(){var e=Eo.current;return e===null?!0:(ed&4194048)===ed?Do===null:(ed&62914560)===ed||ed&536870912?e===Do:!1}function Kd(){var e=I.H;return I.H=dc,e===null?dc:e}function qd(){var e=I.A;return I.A=Xu,e}function Jd(){sd=4,rd||(ed&4194048)!==ed&&Eo.current!==null||(id=!0),!(cd&134217727)&&!(ld&134217727)||$u===null||Bd($u,ed,dd,!1)}function Yd(e,t,n){var r=Qu;Qu|=2;var i=Kd(),a=qd();($u!==e||ed!==t)&&(yd=null,Ud(e,t)),t=!1;var o=sd;a:do try{if(td!==0&&J!==null){var s=J,c=nd;switch(td){case 8:Hd(),o=6;break a;case 3:case 2:case 9:case 6:Eo.current===null&&(t=!0);var l=td;if(td=0,nd=null,tf(e,s,c,l),n&&id){o=0;break a}break;default:l=td,td=0,nd=null,tf(e,s,c,l)}}Xd(),o=sd;break}catch(t){Wd(e,t)}while(1);return t&&e.shellSuspendCounter++,fa=da=null,Qu=r,I.H=i,I.A=a,J===null&&($u=null,ed=0,vi()),o}function Xd(){for(;J!==null;)$d(J)}function Zd(e,t){var n=Qu;Qu|=2;var r=Kd(),a=qd();$u!==e||ed!==t?(yd=null,vd=Ie()+500,Ud(e,t)):id=rt(e,t);a:do try{if(td!==0&&J!==null){t=J;var o=nd;b:switch(td){case 1:td=0,nd=null,tf(e,t,o,1);break;case 2:case 9:if(Ja(o)){td=0,nd=null,ef(t);break}t=function(){td!==2&&td!==9||$u!==e||(td=7),kf(e)},o.then(t,t);break a;case 3:td=7;break a;case 4:td=5;break a;case 7:Ja(o)?(td=0,nd=null,ef(t)):(td=0,nd=null,tf(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Xm(s):c.stateNode.complete){td=0,nd=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,nf(u))}break b}}td=0,nd=null,tf(e,t,o,5);break;case 6:td=0,nd=null,tf(e,t,o,6);break;case 8:Hd(),sd=6;break a;default:throw Error(i(462))}}Qd();break}catch(t){Wd(e,t)}while(1);return fa=da=null,I.H=r,I.A=a,Qu=n,J===null?($u=null,ed=0,vi(),sd):0}function Qd(){for(;J!==null&&!Pe();)$d(J)}function $d(e){var t=ll(e.alternate,e,od);e.memoizedProps=e.pendingProps,t===null?nf(e):J=t}function ef(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Uc(n,t,t.pendingProps,t.type,void 0,ed);break;case 11:t=Uc(n,t,t.pendingProps,t.type.render,t.ref,ed);break;case 5:ts(t);var r=t;r===Qi&&(G?(aa(r),r.tag===5&&r.stateNode!=null&&($i=r.stateNode)):(aa(r),G=!0));default:vl(n,t),t=J=Ai(t,od),t=ll(n,t,od)}e.memoizedProps=e.pendingProps,t===null?nf(e):J=t}function tf(e,t,n,r){fa=da=null,ts(t),eo=null,to=0;var i=t.return;try{if(Oc(e,i,t,n,ed)){sd=1,Cc(e,Li(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;sd=1,Cc(e,Li(n,e.current)),J=null;return}t.flags&32768?(G||r===1?e=!0:id||ed&536870912?e=!1:(rd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),rf(t,e)):nf(t)}function nf(e){var t=e;do{if(t.flags&32768){rf(t,rd);return}e=t.return;var n=gl(t.alternate,t,od);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);sd===0&&(sd=5)}function rf(e,t){do{var n=_l(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);sd=6,J=null}function af(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do pf();while(xd!==0);if(Qu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===$u&&(J=$u=null,ed=0),Cd=t,Sd=e,wd=n,Ed=a,Dd=r,of(e,t,n,s,c,l,f)}}function of(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Td=s,s|=_i,lt(e,n,s,r,i,a),kd=null,(n&335544064)===n?(Ad=ja(e),r=10262):(Ad=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Be,function(){return mf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ll=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=L.p,L.p=2,a=Qu,Qu|=4;try{fu(e,t,n)}finally{Qu=a,L.p=i,I.T=r}}xd=1,Ll?Od=Np(o,e.containerInfo,Ad,lf,uf,cf,df,mf,sf,null,null):(lf(),uf(),df())}function sf(e){if(xd!==0){var t=Sd.onRecoverableError;t(e,{componentStack:null})}}function cf(){xd===3&&(xd=0,Nu(Cd,Sd),xd=4)}function lf(){if(xd===1){xd=0;var e=Sd,t=Cd,n=wd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=L.p;L.p=2;var a=Qu;Qu|=4;try{lu=uu=!1,ku(t,e,n),n=up;var o=Ur(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Hr(s.ownerDocument.documentElement,s)){if(c!==null&&Wr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Vr(s,h),v=Vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!lp,up=lp=null}finally{Qu=a,L.p=i,I.T=r}}e.current=t,xd=2}}function uf(){if(xd===2){xd=0;var e=Sd,t=Cd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Qu;Qu|=4;try{mu(e,t.alternate,t)}finally{Qu=i,L.p=r,I.T=n}}xd=3}}function df(){if(xd===4||xd===3){xd=0;var e=Od;Od=null,Fe();var t=Sd,n=Cd,r=wd,i=Dd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?xd=5:(xd=0,Cd=Sd=null,ff(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(bd=null),mt(r),n=n.stateNode,Ke&&typeof Ke.onCommitFiberRoot==`function`)try{Ke.onCommitFiberRoot(Ge,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=L.p,L.p=2,I.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{I.T=n,L.p=a}}if(i=kd,o=Ad,Ad=null,i!==null&&(kd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);wd&3&&pf(),kf(t),a=t.pendingLanes,r&261930&&a&42?t===Md?jd++:(jd=0,Md=t):(jd=0,Md=null),Af(0,!1)}}function ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Oa(t)))}function pf(){return Od!==null&&(Od.skipTransition(),Od=null),lf(),uf(),df(),mf()}function mf(){if(xd!==5)return!1;var e=Sd,t=Td;Td=0;var n=mt(wd),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=Ed,Ed=null;var o=Sd,s=wd;if(xd=0,Cd=Sd=null,wd=0,Qu&6)throw Error(i(331));var c=Qu;if(Qu|=4,qu(o.current),Bu(o,o.current,s,n),Qu=c,Af(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,o)}catch{}return!0}finally{L.p=a,I.T=r,ff(e,t)}}function hf(e,t,n){t=Li(n,t),t=Tc(e.stateNode,t,2),e=po(e,t,2),e!==null&&(ct(e,2),kf(e))}function gf(e,t,n){if(e.tag===3)hf(e,e,n);else for(;t!==null;){if(t.tag===3){hf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(bd===null||!bd.has(r))){e=Li(n,e),n=Ec(2),r=po(t,n,2),r!==null&&(Dc(n,r,t,e),ct(r,2),kf(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ad=!0,i.add(n),e=vf.bind(null,e,t,n),t.then(e,e))}function vf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$u===e&&(ed&n)===n&&(sd===4||sd===3&&(ed&62914560)===ed&&300>Ie()-gd?Qu&2?ud|=n:Ud(e,0):ud|=n,fd===ed&&(fd=0)),kf(e)}function yf(e,t){t===0&&(t=ot()),e=xi(e,t),e!==null&&(ct(e,t),kf(e))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yf(e,n)}function xf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),yf(e,n)}function Sf(e,t){return z(e,t)}var Cf=null,wf=null,Tf=!1,Ef=!1,Df=!1,Of=0;function kf(e){e!==wf&&e.next===null&&(wf===null?Cf=wf=e:wf=wf.next=e),Ef=!0,Tf||(Tf=!0,If())}function Af(e,t){if(!Df&&Ef){Df=!0;do for(var n=!1,r=Cf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=ed,a=nt(r,r===$u?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Df=!1}}function jf(){Mf()}function Mf(){Ef=Tf=!1;var e=0;Of!==0&&_p()&&(e=Of);for(var t=Ie(),n=null,r=Cf;r!==null;){var i=r.next,a=Nf(r,t);a===0?(r.next=null,n===null?Cf=i:n.next=i,i===null&&(wf=n)):(n=r,(e!==0||a&3)&&(Ef=!0)),r=i}xd!==0&&xd!==5||Af(e,!1),Of!==0&&(Of=0)}function Nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=at(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=$u,n=ed,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(td===2||td===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ne(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ne(r),mt(n)){case 2:case 8:n=ze;break;case 32:n=Be;break;case 268435456:n=He;break;default:n=Be}return r=Pf.bind(null,e),n=z(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ne(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(xd!==0&&xd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pf()&&e.callbackNode!==n)return null;var r=ed;return r=nt(e,e===$u?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ld(e,r,t),Nf(e,Ie()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(pf())return null;Ld(e,t,!0)}function If(){Sp(function(){Qu&6?z(Re,jf):Mf()})}function Lf(){if(Of===0){var e=Pa;e===0&&(e=Qe,Qe<<=1,!(Qe&261888)&&(Qe=256)),Of=e}return Of}function Rf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Rf((i[yt]||null).action),o=r.submitter;o&&(t=(t=o[yt]||null)?Rf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Of!==0){var e=new FormData(i,o);Zs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Zs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<ci.length;Bf++){var Vf=ci[Bf];li(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}li(ei,`onAnimationEnd`),li(ti,`onAnimationIteration`),li(ni,`onAnimationStart`),li(`dblclick`,`onDoubleClick`),li(`focusin`,`onFocus`),li(`focusout`,`onBlur`),li(ri,`onTransitionRun`),li(ii,`onTransitionStart`),li(ai,`onTransitionCancel`),li(oi,`onTransitionEnd`),Rt(`onMouseEnter`,[`mouseout`,`mouseover`]),Rt(`onMouseLeave`,[`mouseout`,`mouseover`]),Rt(`onPointerEnter`,[`pointerout`,`pointerover`]),Rt(`onPointerLeave`,[`pointerout`,`pointerover`]),B(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),B(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),B(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),B(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),B(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),B(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`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(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[xt];n===void 0&&(n=t[xt]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Ft.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!En||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ot(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Cn(function(){var r=a,i=vn(n),s=[];a:{var c=si.get(e);if(c!==void 0){var l=Ln,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:l=tr;break;case`focusin`:u=`focus`,l=Kn;break;case`focusout`:u=`blur`,l=Kn;break;case`beforeblur`:case`afterblur`:l=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ir;break;case ei:case ti:case ni:l=qn;break;case oi:l=ar;break;case`scroll`:case`scrollend`:l=zn;break;case`wheel`:l=or;break;case`copy`:case`cut`:case`paste`:l=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=nr;break;case`submit`:l=rr;break;case`toggle`:case`beforetoggle`:l=sr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=wn(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==_n&&(u=n.relatedTarget||n.fromElement)&&(Ot(u)||u[bt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ot(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=nr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:At(c),h=l==null?u:At(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Ot(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?C(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?At(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Tr;else if(H(c)){if(Er)_=Fr;else{_=Nr;var v=Mr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Tr):_=Pr;if(_&&=_(e,r)){br(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?At(r):window,e){case`focusin`:(H(v)||v.contentEditable===`true`)&&(Kr=v,qr=r,Jr=null);break;case`focusout`:Jr=qr=Kr=null;break;case`mousedown`:Yr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Yr=!1,Xr(s,n,i);break;case`selectionchange`:if(Gr)break;case`keydown`:case`keyup`:Xr(s,n,i)}var y;if(lr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else _r?hr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(fr&&n.locale!==`ko`&&(_r||b!==`onCompositionStart`?b===`onCompositionEnd`&&_r&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,_r=!0)),v=Zf(r,b),0<v.length&&(b=new Yn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=gr(n),y!==null&&(b.data=y)))),(y=dr?V(e,n):vr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=wn(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=wn(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=wn(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
|
|
10
|
+
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function X(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:Kt(e,`class`,r);break;case`tabIndex`:Kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Kt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){Kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&X(e,t,`name`,a.name,a,null),X(e,t,`formEncType`,a.formEncType,a,null),X(e,t,`formMethod`,a.formMethod,a,null),X(e,t,`formTarget`,a.formTarget,a,null)):(X(e,t,`encType`,a.encType,a,null),X(e,t,`method`,a.method,a,null),X(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=gn);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=hn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),Gt(e,`popover`,r);break;case`xlinkActuate`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Gt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Gt(e,n,r);else return}Ut=!0}function ip(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=gn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!It.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[yt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Ut=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Gt(e,n,r)}return}Ut=!0}function ap(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,o,s,n,null)}}a&&X(e,t,`srcSet`,n.srcSet,n,null),r&&X(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:X(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:X(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:X(e,t,s,c,n,null)}sn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:X(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ip(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&X(e,t,c,r,n,null))}var op={};function sp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||X(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Ut=!0),o=m;break;case`name`:m!==f&&(Ut=!0),a=m;break;case`checked`:m!==f&&(Ut=!0),u=m;break;case`defaultChecked`:m!==f&&(Ut=!0),d=m;break;case`value`:m!==f&&(Ut=!0),s=m;break;case`defaultValue`:m!==f&&(Ut=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&X(e,t,p,m,r,f)}}tn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||X(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Ut=!0),p=o;break;case`defaultValue`:o!==l&&(Ut=!0),c=o;break;case`multiple`:o!==l&&(Ut=!0),s=o;default:o!==l&&X(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:X(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Ut=!0),p=a;break;case`defaultValue`:a!==o&&(Ut=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&X(e,t,s,a,r,o)}on(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:X(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Ut=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:X(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&X(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:X(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ip(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ip(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&X(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||X(e,t,f,p,r,m)}function Z(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Z(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Z(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[vt]=r,n[yt]=t,ap(n,e,t),Mt(n),n}function hp(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}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Tt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vm(e.ownerDocument.body)}n=i}while(n);Hh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Q(e){return e.documentElement.clientHeight}function Mp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Np(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Q(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Zm(f),u>eh){s.length=o;break}f=new Promise(Mp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Pp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Pp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:w({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Pp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Fp(e){return{name:e,group:new Pp(`group`,e),imagePair:new Pp(`image-pair`,e),old:new Pp(`old`,e),new:new Pp(`new`,e)}}function Ip(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ip.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Vp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Lp,e,s,r)}this._eventListeners=a}};function Lp(e,t,n,r){return _(e).addEventListener(t,n,r),!1}Ip.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Ip.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=_(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Ip.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=_(e),mm(e,t))}Ip.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Ip.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=dp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Ip.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}Ip.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Ip.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}Ip.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},Ip.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Up,n,void 0,void 0);var r=_(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=h(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=_(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(n[0]),i=_(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=Ot(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=C(n,a,S),t===null?t=!1:(f(t,!0,b,a,n),a=v,v=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=C(r,a,S),t===null?t=!1:(f(t,!0,x,a,r),a=v,y=v=null,t=a!==null)),t):!1}function Qp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Ip.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Up,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=h(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=_(r),Qp(e,n);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=_(a),Qp(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=_(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rm(n),Dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Tt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function um(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===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function hm(e){xp(function(){xp(function(t){return e(t)})})}function gm(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _m(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&X(e,t,r,null,op,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),Dt(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dt(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=L.d;L.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Vd();return e||t}function wm(e){var t=kt(e);t!==null&&t.tag===5&&t.type===`form`?$s(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=w({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[Et]=!0,o.onload=o.onerror=function(){Pt(o)}),Mt(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zm(e)}if(!ym.has(a)&&(e=w({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),Mt(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=jt(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=w({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);Mt(c),ap(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=jt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=w({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Mt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=jt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=w({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Mt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=ye.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Fm(n.href),t=jt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Fm(n.href);var o=jt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=zm(n),t=jt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Fm(e){return`href="`+en(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Et]){r.loading=1;return}}else t=e.createElement(`link`),t[Et]=!0,t.onload=t.onerror=Pt.bind(null,t),ap(t,`link`,n),Mt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function zm(e){return`[src="`+en(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Mt(r),r;var a=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Mt(r),ap(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,Mt(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),Mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ap(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,Mt(a),a):(r=n,(a=ym.get(o))&&(r=w({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Mt(a),ap(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hm(r,n.precedence,e));return t.instance}function Hm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Tt]||a[vt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Ym(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Xm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Qm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Zm(t),e.suspenseyImages.push(t)),e=ih.bind(e),t.decode().then(e,e))}function $m(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),Mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var eh=0;function th(e,t){return e.stylesheets&&e.count===0&&oh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&eh===0&&(eh=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>eh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function nh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)oh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function rh(){this.count--,nh(this)}function ih(){this.imgCount--,nh(this)}var ah=null;function oh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ah=new Map,t.forEach(sh,e),ah=null,rh.call(e))}function sh(e,t){if(!(t.state.loading&4)){var n=ah.get(e);if(n)var r=n.get(null);else{n=new Map,ah.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=rh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ch={$$typeof:M,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function lh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function uh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Di(3,null,null,t),e.current=a,a.stateNode=e,t=Da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},lo(a),e}function dh(e){return e?(e=Ti,e):Ti}function fh(e,t,n,r,i,a){i=dh(i),r.context===null?r.context=i:r.pendingContext=i,r=fo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=po(e,r,t),n!==null&&(Id(n,e,t),mo(n,e,t))}function ph(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mh(e,t){ph(e,t),(e=e.alternate)&&ph(e,t)}function hh(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Id(t,e,67108864),mh(e,67108864)}}function $(e){if(e.tag===13||e.tag===31){var t=Nd();t=pt(t);var n=xi(e,t);n!==null&&Id(n,e,t),mh(e,t)}}var gh=!0;function _h(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function vh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Yf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=kt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Je(o);s.entanglements[1]|=c,o&=~c}kf(a),!(Qu&6)&&(vd=Ie()+500,Af(0,!1))}}break;case 31:case 13:s=xi(a,2),s!==null&&Id(s,a,2),Vd(),mh(a,2)}if(a=bh(r),a===null&&Yf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function bh(e){return e=vn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Le()){case Re:return 2;case ze:return 8;case Be:case Ve:return 32;case He:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=kt(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,gt(e.priority,function(){$(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,gt(e.priority,function(){$(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_n=r,n.target.dispatchEvent(r),_n=null}else return t=kt(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=kt(n);a!==null&&(e.splice(t,3),t-=3,Zs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[yt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[yt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fh(n,Nd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fh(e.current,2,null,e,null,null),Vd(),t[bt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=ht();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Ge=Jh.inject(qh),Ke=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=bc,s=xc,c=Sc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=uh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[bt]=t.current,qf(e),new Wh(t)}})),Ti=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=wi()}));function Ei(e,t){let n={...e};for(let e=0;e<t.length;e++){let r=t[e];delete n[r]}return n}var Di=Ti(),Oi=e(Lt(),1);function ki(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Ai=e=>{switch(e){case`success`:return Ni;case`info`:return Fi;case`warning`:return Pi;case`error`:return Ii;default:return null}},ji=Array(12).fill(0),Mi=({visible:e,className:t})=>U.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},U.createElement(`div`,{className:`sonner-spinner`},ji.map((e,t)=>U.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Ni=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Pi=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Fi=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Ii=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Li=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},U.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),U.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Ri=()=>{let[e,t]=U.useState(document.hidden);return U.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},zi=1,Bi=100,Vi=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:zi++,Hi=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-Bi;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=Vi(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],U.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Wi(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=Vi(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Ui=(e,t)=>Hi.message(e,t),Wi=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Gi=Object.assign(Ui,{success:Hi.success,info:Hi.info,warning:Hi.warning,error:Hi.error,custom:Hi.custom,message:Hi.message,promise:Hi.promise,dismiss:Hi.dismiss,loading:Hi.loading},{getHistory:()=>Hi.toasts,getToasts:()=>Hi.getActiveToasts()});ki(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Ki(e){return e.label!==void 0}var qi=3,Ji=`24px`,Yi=`16px`,Xi=4e3,Zi=356,Qi=14,$i=45,G=200;function ea(...e){return e.filter(Boolean).join(` `)}function ta(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var na=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=U.useState(null),[O,k]=U.useState(null),[A,j]=U.useState(!1),[M,N]=U.useState(!1),[ee,te]=U.useState(!1),[ne,P]=U.useState(!1),[re,ie]=U.useState(!1),[ae,oe]=U.useState(0),[se,ce]=U.useState(0),le=U.useRef(n.duration||y||Xi),ue=U.useRef(null),F=U.useRef(null),de=c===0,I=c+1<=o,L=n.type,fe=L??`default`,pe=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,R=U.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ge=U.useMemo(()=>n.closeButton??p,[n.closeButton,p]),_e=U.useMemo(()=>n.duration||y||Xi,[n.duration,y]),ve=U.useRef(0),ye=U.useRef(0),be=U.useRef(0),xe=U.useRef(null),[Se,Ce]=b.split(`-`),we=U.useMemo(()=>s.reduce((e,t,n)=>n>=R?e:e+t.height,0),[s,R]),Te=Ri(),Ee=U.useMemo(()=>e.swipeDirections??ta(b),[e.swipeDirections,b]),De=n.invert||t,Oe=L===`loading`;ye.current=U.useMemo(()=>R*x+we,[R,we]),U.useEffect(()=>{le.current=_e},[_e]),U.useEffect(()=>{j(!0)},[]),U.useEffect(()=>{let e=F.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),U.useLayoutEffect(()=>{if(!A)return;let e=F.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ke=U.useCallback(()=>{N(!0),oe(ye.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},G)},[n,d,a,ye]);U.useEffect(()=>{if(n.promise&&L===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Te?(()=>{if(be.current<ve.current){let e=new Date().getTime()-ve.current;le.current-=e}be.current=new Date().getTime()})():le.current!==1/0&&(ve.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ke()},le.current)),()=>clearTimeout(e)},[u,i,n,L,Te,ke]),U.useEffect(()=>{n.delete&&(ke(),n.onDismiss==null||n.onDismiss.call(n,n))},[ke,n.delete]);function Ae(){return w?.loading?U.createElement(`div`,{className:ea(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":L===`loading`},w.loading):U.createElement(Mi,{className:ea(C?.loader,n?.classNames?.loader),visible:L===`loading`})}let je=n.icon||w?.[L]||Ai(L);return U.createElement(`li`,{tabIndex:0,ref:F,className:ea(_,me,C?.toast,n?.classNames?.toast,C?.[fe],n?.classNames?.[fe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":re,"data-removed":M,"data-visible":I,"data-y-position":Se,"data-x-position":Ce,"data-index":c,"data-front":de,"data-swiping":ee,"data-dismissible":pe,"data-type":L,"data-invert":De,"data-swipe-out":ne,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?ae:ye.current}px`,"--initial-height":S?`auto`:`${se}px`,...m,...n.style},onDragEnd:()=>{te(!1),D(null),xe.current=null},onPointerDown:e=>{e.button!==2&&!Oe&&pe&&(ue.current=new Date,oe(ye.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(te(!0),xe.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(ne||!pe)return;xe.current=null;let e=Number(F.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(F.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ue.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if((E===`x`?Ee.includes(e>0?`right`:`left`):Ee.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=$i||a>.11))oe(ye.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ke(),P(!0);else{var o,s;(o=F.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=F.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ie(!1),te(!1),D(null)}},onPointerMove:e=>{var t,n;if(!xe.current||!pe||window.getSelection()?.toString().length>0)return;let r=e.clientY-xe.current.y,i=e.clientX-xe.current.x;!E&&(Math.abs(i)>1||Math.abs(r)>1)&&D(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(Ee.includes(`top`)||Ee.includes(`bottom`)){if(Ee.includes(`top`)&&r<0||Ee.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(E===`x`&&(Ee.includes(`left`)||Ee.includes(`right`))){if(Ee.includes(`left`)&&i<0||Ee.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ie(!0),(t=F.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=F.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ge&&!n.jsx&&L!==`loading`?U.createElement(`button`,{"aria-label":T,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!pe?()=>{}:()=>{ke(),n.onDismiss==null||n.onDismiss.call(n,n)},className:ea(C?.closeButton,n?.classNames?.closeButton)},w?.close??Li):null,(L||n.icon||n.promise)&&n.icon!==null&&(w?.[L]!==null||n.icon)?U.createElement(`div`,{"data-icon":``,className:ea(C?.icon,n?.classNames?.icon)},L===`loading`?n.icon||Ae():n.promise?Ae():null,L===`loading`?null:je):null,U.createElement(`div`,{"data-content":``,className:ea(C?.content,n?.classNames?.content)},U.createElement(`div`,{"data-title":``,className:ea(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?U.createElement(`div`,{"data-description":``,className:ea(v,he,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),U.isValidElement(n.cancel)?n.cancel:n.cancel&&Ki(n.cancel)?U.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{Ki(n.cancel)&&pe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ke())},className:ea(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,U.isValidElement(n.action)?n.action:n.action&&Ki(n.action)?U.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{Ki(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||ke())},className:ea(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function ra(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ia(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Yi:Ji;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var aa=U.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=qi,toastOptions:g,dir:_=ra(),gap:v=Qi,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=U.useState([]),w=U.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),T=U.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=U.useState([]),[O,k]=U.useState(!1),[A,j]=U.useState(!1),[M,N]=U.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ee=U.useRef(null),te=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ne=U.useRef(null),P=U.useRef(!1),re=U.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||Hi.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return U.useEffect(()=>Hi.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{Oi.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),U.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),U.useEffect(()=>{S.length<=1&&k(!1)},[S]),U.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=ee.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ee.current||ee.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),U.useEffect(()=>{if(ee.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,P.current=!1)}},[ee.current]),U.createElement(`section`,{ref:t,"aria-label":b??`${x} ${te}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?U.createElement(`ol`,{key:t,dir:_===`auto`?ra():_,tabIndex:-1,ref:ee,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${Zi}px`,"--gap":`${v}px`,...m,...ia(l,u)},onBlur:e=>{P.current&&!e.currentTarget.contains(e.relatedTarget)&&(P.current=!1,ne.current&&=(ne.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||P.current||(P.current=!0,ne.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>U.createElement(na,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:re,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),oa=`notifications`,sa=Promise.resolve(),ca=new Set;function la(){return window.isSecureContext?!(`Notification`in window)||!(`serviceWorker`in navigator)?`unsupported`:Notification.permission:`insecure`}function ua(){let e=localStorage.getItem(oa);if(e===null||e===`on`)return!0;if(e===`off`)return!1;throw Error(`unknown notification setting ${e}`)}async function da(e){e&&Notification.permission==="default"&&await Notification.requestPermission(),localStorage.setItem(oa,e?`on`:`off`)}async function fa(e,t){(await navigator.permissions.query({name:`notifications`})).addEventListener(`change`,t,{signal:e})}function pa(e,t,n){if(document.hidden)for(let r of t){let t=ha(e,r);ga(e,r,`${t===void 0?`Agent`:yn[t.provider]} ${n}`,t?.title??`Session`,F(e,r)).catch(e=>console.error(`could not show a notification`,e))}}function ma(e,t,n){ga(e,t,ha(e,t)?.title??`Session`,n,`push:${F(e,t)}`).catch(e=>console.error(`could not show a notification`,e))}function ha(e,t){return z().sessions.find(n=>n.machine===e&&n.id===t)}async function ga(e,t,n,r,i){if(la()!==`granted`||!ua()||!R(z(),e).notifier)return;let a=ha(e,t);await(await navigator.serviceWorker.ready).showNotification(n,{body:r,tag:i,data:a===void 0?null:{kind:`session`,machine:e,project:a.projectId,sessionId:t}})}async function _a(e,t,n){la()===`granted`&&ua()&&R(z(),n.machine).notifier&&await(await navigator.serviceWorker.ready).showNotification(e,{body:t,data:{kind:`terminal`,...n}})}function va(){let e=z().machines.filter(e=>ht(e.id)&&!e.notifier&&!ca.has(e.id)).map(e=>e.id);if(e.length!==0){for(let t of e)ca.add(t);ya().then(t=>Promise.all(e.map(e=>r(e,`notifications.claim`,{endpoint:t})))).catch(e=>console.error(`could not claim notifications`,e)).finally(()=>{for(let t of e)ca.delete(t)})}}async function ya(){if(ba()!==`supported`)return null;let e=await navigator.serviceWorker.getRegistration();if(e===void 0)return null;let t=await e.pushManager.getSubscription();return t===null?null:t.endpoint}function ba(){return window.isSecureContext?!(`Notification`in window)||!(`serviceWorker`in navigator)||!(`PushManager`in window)?xa()?`install`:`unsupported`:Notification.permission===`denied`?`denied`:`supported`:`insecure`}function xa(){return/iPhone|iPad|iPod/.test(navigator.userAgent)||navigator.userAgent.includes(`Mac`)&&navigator.maxTouchPoints>1}async function Sa(){return await(await navigator.serviceWorker.ready).pushManager.getSubscription()!==null}async function Ca(){return Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission===`granted`&&(await Ea(Da),!0)}function wa(){return Ea(Oa)}function Ta(e){return Ea(async()=>{if(ba()!==`supported`)return;let t=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!t)return;let n=await ka(),r=t.options.applicationServerKey;r!==null&&ja(r)===n.publicKey?await Ma(e,t,n):await Da()})}function Ea(e){let t=sa.then(e);return sa=t.catch(()=>void 0),t}async function Da(){await Oa();let e=await ka(),t=await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e.publicKey});await Promise.all(Aa().map(n=>Ma(n,t,e)))}async function Oa(){let e=await(await navigator.serviceWorker.ready).pushManager.getSubscription();e&&(await Promise.all(Aa().map(t=>r(t,`push.unsubscribe`,{endpoint:e.endpoint}))),await e.unsubscribe())}async function ka(){let e=await caches.open(`offsite-worker`),t=await e.match(`/push-keys`);if(t!==void 0)return await t.json();let n=await crypto.subtle.generateKey({name:`ECDSA`,namedCurve:`P-256`},!0,[`sign`,`verify`]),r=(await crypto.subtle.exportKey(`jwk`,n.privateKey)).d;if(r===void 0)throw Error(`the browser did not export the push key`);let i={publicKey:ja(await crypto.subtle.exportKey(`raw`,n.publicKey)),privateKey:r};return await e.put(`/push-keys`,new Response(JSON.stringify(i))),i}function Aa(){return z().machines.filter(e=>ht(e.id)).map(e=>e.id)}function ja(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}async function Ma(e,t,n){await r(e,`push.subscribe`,{subscription:t.toJSON(),...n,machine:e})}function Na(){let e=O(e=>e.sessions.filter(t=>{let n=Te(e.machines,t.machine,t.id);return n?.waiting===!0||e.unseen.includes(F(t.machine,t.id))&&n?.running!==!0&&!Object.values(n?.tasks??{}).includes(`running`)}).length);(0,U.useEffect)(()=>{document.title=e===0?`OffSite`:`(${e}) OffSite`,`setAppBadge`in navigator&&(e===0?navigator.clearAppBadge():navigator.setAppBadge(e)).catch(e=>console.error(`could not update the app badge`,e))},[e])}var Pa=50,Fa=null;function Ia(){let e=se(),t=f(e.map(e=>e.id));Ae({machines:e.map(n),sessions:[],inactive:[],inactiveVersion:0,projects:e.flatMap(ke),prefs:ne(),paletteOpen:!1,settingsOpen:!1,settingsPage:`General`,editor:null,exporting:null,settingsAccount:null,settingsEditedMachine:null,settingsListing:!0,settingsMachine:e.at(0)?.id??null,unseen:[],generatingTitles:[],selection:t,loaded:t?.sessionId===null,items:[],earlier:[],before:null,partial:``,requests:[],queue:[],settings:(t===null||t.sessionId===null?null:ue(Fe(t)))??ct,draft:null,context:null,capabilities:null,errors:[],sentAt:0}),M(),Qe({open:(e,t)=>{s(e,{via:t}),Ra(e)},close:e=>{let t=z().machines.find(t=>t.id===e);t!==void 0&&t.status!==`offline`&&s(e,{status:`offline`,via:null,notifier:!1})},unpaired:e=>s(e,{status:`unpaired`,via:null,notifier:!1}),event:Ha}),addEventListener(`keydown`,va,{capture:!0}),addEventListener(`pointerdown`,va,{capture:!0}),addEventListener(`storage`,e=>{e.key===`machines`&&fe()}),$e.history.subscribe(e=>{if(e.action.type===`PUSH`||e.action.type===`REPLACE`)return;let t=f(z().machines.map(e=>e.id));if(t===null){ut();return}let n=z().selection;n===null||n.machine!==t.machine||n.projectId!==t.projectId||n.sessionId!==t.sessionId?De(t):(Ct(),u())});for(let t of e)Oe(t.id,t.addresses);gt(e),La()}async function La(){try{le!==null&&await a(le,null);let e=S();e!==null&&await a([e.address],e.code)}catch(e){ae(e)}}async function Ra(e){try{let t=await r(e,`sync`,void 0),n=z().machines.find(t=>t.id===e);if(n===void 0)return;s(e,{status:`online`,name:n.label??t.hostname,hostname:t.hostname,system:{defaults:t.defaults,platform:t.platform,defaultShell:t.defaultShell,defaultClaudeBaseDir:t.defaultClaudeBaseDir,homeDir:t.homeDir},activity:t.activity,providers:t.providers,terminals:t.terminals}),za(e,t.projects),Ba(e,t.sessions),Ge(e,t.config),Se(e,t.composer),Va(e),_e(e),z().selection?.machine===e&&et()}catch(e){ae(e)}}function za(e,t){Ve({projects:[...z().projects.filter(t=>t.machine!==e),...t.map(t=>({...t,machine:e}))]}),ot()}function Ba(e,t){let n=z(),r=n.selection,i=n.sessions.filter(t=>t.machine===e&&t.status!==`inactive`).map(e=>e.id).sort().join(` `),a=n.sessions.find(n=>n.machine===e&&n.id===r?.sessionId&&!t.some(e=>e.id===n.id)),o=[...n.sessions.filter(t=>t.machine!==e),...t.map(t=>({...t,machine:e})),...a===void 0?[]:[{...a,status:`inactive`}]],s=t.map(e=>e.id).sort().join(` `)===i?n.inactiveVersion:n.inactiveVersion+1;s===n.inactiveVersion&&te(o,n.sessions)||Ve({sessions:o,inactiveVersion:s})}function Va(e){let t=z().selection;t?.machine===e&&t.sessionId!==null&&yt(e,t.projectId,t.sessionId,!1,null)}function Ha(e,t){if(t.type===`delta`){Ua(e,t.sessionId,t.text);return}Wa();let n=z(),r=n.machines.find(t=>t.id===e);if(r===void 0)return;let i=n.selection?.machine===e,a=i?n.selection?.sessionId??null:null;switch(t.type){case`activity`:{let o=r.activity,c=a!==null&&t.activity[a]?.running===!0,l=Object.keys(o).filter(e=>o[e].running&&t.activity[e]?.running!==!0),u=Object.keys(t.activity).filter(e=>t.activity[e].waiting&&o[e]?.waiting!==!0);pa(e,l.filter(e=>o[e].prompted),`finished`),pa(e,u,`needs your input`),s(e,{activity:Object.fromEntries(Object.entries(t.activity).map(e=>[e[0],te(o[e[0]],e[1])?o[e[0]]:e[1]]))}),Ve({partial:c||!i?n.partial:``,unseen:[...n.unseen,...l.filter(e=>e!==a).map(t=>F(e,t)).filter(e=>!n.unseen.includes(e))]});return}case`limits`:s(e,{claudeAccounts:r.claudeAccounts.map(e=>e.id===t.accountId?{...e,limits:t.limits}:e),codexAccounts:r.codexAccounts.map(e=>e.id===t.accountId?{...e,limits:t.limits}:e)});return;case`config`:Ge(e,t.config);return;case`composer`:Se(e,t.composer);return;case`projects`:za(e,t.projects);return;case`sessions`:Ba(e,t.sessions);return;case`accounts`:dt(e,t);return;case`providers`:s(e,{providers:t.providers});return;case`started`:if(n.selection===null||!i||n.selection.projectId!==t.projectId||n.selection.sessionId!==null)return;Ve({selection:{machine:e,projectId:t.projectId,sessionId:t.sessionId},loaded:!0,items:[],earlier:[],before:null,partial:``,requests:[],queue:[]}),u();return;case`notification`:ma(e,t.sessionId,t.message);return;case`notifier`:s(e,{notifier:t.active});return;case`terminals`:s(e,{terminals:t.tabs});return;case`open`:if(i){ie(t.path);return}Gi(`${r.name} opened ${t.path}`);return}if(a!==null&&t.sessionId===a)switch(t.type){case`history`:Ve({loaded:!0,items:t.items,earlier:[],before:t.before,requests:t.requests,queue:t.queue,settings:t.settings??(n.settings.provider===t.provider?n.settings:Re(R(n,e).composer,t.provider)),context:t.context,partial:t.partial}),t.settings!==null&&x(F(e,t.sessionId),t.settings);return;case`context`:Ve({context:t.context});return;case`items`:{let e=new Map(t.items.map(e=>[e.id,e]));Ve({items:[...n.items.map(t=>e.get(t.id)??t),...t.items.filter(e=>!n.items.some(t=>t.id===e.id))],partial:t.items.some(e=>e.kind===`assistant`&&e.parent===null)?``:n.partial});return}case`request`:Ve({requests:[...n.requests,t.request]});return;case`requestDone`:Ve({requests:n.requests.filter(e=>e.id!==t.requestId)});return;case`queue`:Ve({queue:t.queue});return;case`settings`:{let r={...t.settings,accountId:n.settings.accountId};Ve({settings:r}),x(F(e,t.sessionId),r)}}}function Ua(e,t,n){let r=z().selection;r?.machine===e&&r.sessionId===t&&(Fa!==null&&(Fa.machine!==e||Fa.sessionId!==t)&&Wa(),Fa===null&&(Fa={machine:e,sessionId:t,text:``},setTimeout(Wa,Pa)),Fa.text+=n)}function Wa(){if(Fa===null)return;let e=Fa;Fa=null;let t=z();t.selection?.machine===e.machine&&t.selection.sessionId===e.sessionId&&Ve({partial:t.partial+e.text})}var Ga=[[`path`,{d:`M12.001 4.00101V20.001`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.001 12.001L4.00098 12.001`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ka=[[`path`,{d:`M13 20.5H10.5C6.72876 20.5 4.84315 20.5 3.67157 19.3284C2.5 18.1569 2.5 16.2712 2.5 12.5V10.5C2.5 6.72876 2.5 4.84315 3.67157 3.67157C4.84315 2.5 6.72876 2.5 10.5 2.5H12.5C16.2712 2.5 18.1569 2.5 19.3284 3.67157C20.5 4.84315 20.5 6.72876 20.5 10.5V13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.5 7.5H8.5C7.94772 7.5 7.5 7.94772 7.5 8.5M11.5 7.5H14.5C15.0523 7.5 15.5 7.94772 15.5 8.5M11.5 7.5V15.5M11.5 15.5H10M11.5 15.5H13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M19 17.4375V19M19 19V20.5625M19 19H17.75M19 19H20.25M21.5 19L20.4156 18.6385C19.9179 18.4726 19.5274 18.0821 19.3615 17.5844L19 16.5L18.6385 17.5844C18.4726 18.0821 18.0821 18.4726 17.5844 18.6385L16.5 19L17.5844 19.3615C18.0821 19.5274 18.4726 19.9179 18.6385 20.4156L19 21.5L19.3615 20.4156C19.5274 19.9179 19.9179 19.5274 20.4156 19.3615L21.5 19Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],qa=[[`path`,{d:`M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9V13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ja=[[`path`,{d:`M5.92089 5.92089C8.15836 3.68342 9.2771 2.56468 10.5857 2.19562C11.5105 1.93479 12.4895 1.93479 13.4143 2.19562C14.7229 2.56468 15.8416 3.68342 18.0791 5.92089C20.3166 8.15836 21.4353 9.2771 21.8044 10.5857C22.0652 11.5105 22.0652 12.4895 21.8044 13.4143C21.4353 14.7229 20.3166 15.8416 18.0791 18.0791C15.8416 20.3166 14.7229 21.4353 13.4143 21.8044C12.4895 22.0652 11.5105 22.0652 10.5857 21.8044C9.2771 21.4353 8.15836 20.3166 5.92089 18.0791C3.68342 15.8416 2.56468 14.7229 2.19562 13.4143C1.93479 12.4895 1.93479 11.5105 2.19562 10.5857C2.56468 9.2771 3.68342 8.15836 5.92089 5.92089Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 8V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 15.75H12M12.25 15.75C12.25 15.8881 12.1381 16 12 16C11.8619 16 11.75 15.8881 11.75 15.75C11.75 15.6119 11.8619 15.5 12 15.5C12.1381 15.5 12.25 15.6119 12.25 15.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ya=[[`path`,{d:`M6.5 9.5C6.5 6.46243 8.96243 4 12 4C15.0376 4 17.5 6.46243 17.5 9.5V16C17.5 17.4142 17.5 18.1213 17.0607 18.5607C16.6213 19 15.9142 19 14.5 19H9.5C8.08579 19 7.37868 19 6.93934 18.5607C6.5 18.1213 6.5 17.4142 6.5 16V9.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20 11V17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 19V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M9 19V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M4 11V17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M10 4L8.5 2M14 4L15.5 2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M6.5 10H17.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`6`}]],Xa=[[`path`,{d:`M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11 7L12 8.66667M17 17L13.4 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 7L7 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6.5 14H12.5M17.5 14L15.5 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Za=[[`path`,{d:`M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 8V10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M17 8V10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7 16.5C10.5 18.5 13.5 18.5 17 16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M12.9896 2.5C12.1238 3.78525 10.5163 7.71349 10.0737 11.5798C9.98097 12.3899 9.9346 12.795 10.1905 13.1176C10.2151 13.1486 10.2474 13.1843 10.2757 13.212C10.5708 13.5 11.0149 13.5 11.9031 13.5C12.3889 13.5 12.6317 13.5 12.7766 13.6314C12.7923 13.6457 12.8051 13.6588 12.819 13.6748C12.9468 13.8225 12.9383 14.072 12.9212 14.5709C12.8685 16.1156 12.9401 19.0524 14 21.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Qa=[[`path`,{d:`M12 5.75C12 3.75 13.5 1.75 15.5 1.75C15.5 3.75 14 5.75 12 5.75Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.5 8.09001C11.9851 8.09001 11.5867 7.92646 11.1414 7.74368C10.5776 7.51225 9.93875 7.25 8.89334 7.25C7.02235 7.25 4 8.74945 4 12.7495C4 17.4016 7.10471 22.25 9.10471 22.25C9.77426 22.25 10.3775 21.9871 10.954 21.7359C11.4815 21.5059 11.9868 21.2857 12.5 21.2857C13.0132 21.2857 13.5185 21.5059 14.046 21.7359C14.6225 21.9871 15.2257 22.25 15.8953 22.25C17.2879 22.25 18.9573 19.8992 20 16.9008C18.3793 16.2202 17.338 14.618 17.338 12.75C17.338 11.121 18.2036 10.0398 19.5 9.25C18.5 7.75 17.0134 7.25 15.9447 7.25C14.8993 7.25 14.2604 7.51225 13.6966 7.74368C13.2514 7.92646 13.0149 8.09001 12.5 8.09001Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],$a=[[`path`,{d:`M3.3902 21H14.7548C16.8059 21 17.8314 21 18.6101 20.449C19.3889 19.898 19.7302 18.931 20.4128 16.9969L21.8783 12.8448L21.8934 12.8015C21.9615 12.6013 21.9974 12.3916 21.9998 12.1802L21.9999 12.1344C21.9999 12.0096 21.9999 11.9472 21.9972 11.8945C21.9432 10.8729 21.127 10.0567 20.1054 10.0028C20.0527 10 19.9903 10 19.8655 10H11.7893C9.49251 10 8.3441 10 7.52307 10.6554C6.70204 11.3107 6.44753 12.4306 5.93851 14.6703L4.74588 19.9179C4.60203 20.5508 4.03931 21 3.3902 21ZM3.3902 21C2.62238 21 1.99994 20.3776 1.99994 19.6097V7C1.99994 5.11438 1.99994 4.17157 2.58573 3.58579C3.17151 3 4.11432 3 5.99994 3H6.51897C6.97961 3 7.20993 3 7.4115 3.09441C7.61307 3.18882 7.76052 3.36576 8.05541 3.71963L9.35603 5.28037C9.65092 5.63424 9.79837 5.81118 9.99994 5.90559C10.2015 6 10.4318 6 10.8925 6H11.1962`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10.4999 10L11.7199 4.30666C11.8833 3.5445 12.5568 3 13.3363 3C13.4451 3 13.5537 3.01075 13.6604 3.0321L19.7211 4.24423C20.4647 4.39295 20.9999 5.04585 20.9999 5.80416C20.9999 5.93423 20.984 6.06381 20.9524 6.18999L19.9999 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],eo=[[`path`,{d:`M12 19V12M15 17C15 17 12.7905 20 12 20C11.2094 20 9 17 9 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M4.5 8H19.5C19.9647 8 20.197 8 20.3902 7.96157C21.1836 7.80376 21.8038 7.18356 21.9616 6.39018C22 6.19698 22 5.96466 22 5.5C22 5.03534 22 4.80302 21.9616 4.60982C21.8038 3.81644 21.1836 3.19624 20.3902 3.03843C20.197 3 19.9647 3 19.5 3H4.5C4.03534 3 3.80302 3 3.60982 3.03843C2.81644 3.19624 2.19624 3.81644 2.03843 4.60982C2 4.80302 2 5.03534 2 5.5C2 5.96466 2 6.19698 2.03843 6.39018C2.19624 7.18356 2.81644 7.80376 3.60982 7.96157C3.80302 8 4.03534 8 4.5 8Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M17 21C17.7757 20.9009 18.3258 20.7012 18.7603 20.2988C19.6229 19.5 19.724 18.1859 19.9261 15.5578L20.5 8H3.5L4.07386 15.5578C4.27602 18.1859 4.3771 19.5 5.23974 20.2988C5.67424 20.7012 6.22425 20.9009 7 21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],to=[[`path`,{d:`M8 8L16 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17 3.23663C17.7506 3.22596 20.2363 2.70959 20.7634 3.23663C21.2904 3.76367 20.774 6.24941 20.7634 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3.23663 17C3.22596 17.7506 2.70959 20.2363 3.23663 20.7634C3.76367 21.2904 6.24941 20.774 7 20.7634`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M14.998 9.00737L20.3838 3.62158`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M3.62598 20.3741L9.01172 14.9883`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],no=[[`path`,{d:`M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],ro=[[`path`,{d:`M11 6H15.5C17.9853 6 20 8.01472 20 10.5C20 12.9853 17.9853 15 15.5 15H4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.99998 12C6.99998 12 4.00001 14.2095 4 15C3.99999 15.7906 7 18 7 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],io=[[`path`,{d:`M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],ao=[[`path`,{d:`M14.1481 2.79115L14.3942 3.00083C15.0348 3.54679 15.8314 3.87674 16.6704 3.9437L16.9927 3.96941C18.6139 4.09878 19.9012 5.38613 20.0306 7.00731L20.0563 7.32956C20.1233 8.16862 20.4532 8.96518 20.9992 9.60584L21.2089 9.85188C22.2637 11.0897 22.2637 12.9103 21.2089 14.1481L20.9992 14.3942C20.4532 15.0348 20.1233 15.8314 20.0563 16.6704L20.0306 16.9927C19.9012 18.6139 18.6139 19.9012 16.9927 20.0306L16.6704 20.0563C15.8314 20.1233 15.0348 20.4532 14.3942 20.9992L14.1481 21.2089C12.9103 22.2637 11.0897 22.2637 9.85188 21.2089L9.60584 20.9992C8.96518 20.4532 8.16862 20.1233 7.32956 20.0563L7.00731 20.0306C5.38613 19.9012 4.09878 18.6139 3.96941 16.9927L3.9437 16.6704C3.87674 15.8314 3.54679 15.0348 3.00083 14.3942L2.79115 14.1481C1.73628 12.9103 1.73628 11.0897 2.79115 9.85189L3.00083 9.60584C3.54679 8.96518 3.87674 8.16862 3.9437 7.32956L3.96941 7.00731C4.09878 5.38613 5.38613 4.09878 7.00731 3.96941L7.32956 3.9437C8.16862 3.87674 8.96518 3.54679 9.60584 3.00083L9.85189 2.79115C11.0897 1.73628 12.9103 1.73628 14.1481 2.79115Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],oo=[[`path`,{d:`M16.998 7.12652C17.3182 7.04393 17.654 7 18 7C20.2091 7 22 8.79086 22 11C22 13.2091 20.2091 15 18 15C17.6451 15 17.3009 14.9538 16.9733 14.867M16.998 7.12652C16.9993 7.08451 17 7.04233 17 7C17 4.79086 15.2091 3 13 3C11.0824 3 9.47994 4.34939 9.09041 6.15043M16.998 7.12652C16.9769 7.80763 16.7854 8.44584 16.4649 9M16.9733 14.867C16.9909 14.7472 17 14.6247 17 14.5C17 13.2905 16.1411 12.2816 15 12.05M16.9733 14.867C16.7957 16.0737 15.756 17 14.5 17H14C11.7909 17 10 18.7909 10 21M9.09041 6.15043C8.74377 6.05243 8.37801 6 8 6C5.79086 6 4 7.79086 4 10C4 10.3886 4.05542 10.7643 4.15878 11.1195M9.09041 6.15043C10.1015 6.43625 10.9498 7.10965 11.4649 8M4.15878 11.1195C2.9114 11.4832 2 12.6352 2 14C2 15.6569 3.34315 17 5 17C6.30622 17 7.41746 16.1652 7.82929 15M4.15878 11.1195C4.24921 11.4303 4.37632 11.7255 4.53513 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.8361 11.7435C11.3257 12.2353 10.453 12.3202 9.70713 11.9008C8.9612 11.4814 8.58031 10.6917 8.73535 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],so=[[`path`,{d:`M3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682C3 18.364 3 16.2426 3 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 9H21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],co=[[`path`,{d:`M16 10L18.1494 10.6448C19.5226 11.0568 20.2092 11.2628 20.6046 11.7942C21 12.3256 21 13.0425 21 14.4761V22`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 9L11 9M8 13L11 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 22V19C12 18.0572 12 17.5858 11.7071 17.2929C11.4142 17 10.9428 17 10 17H9C8.05719 17 7.58579 17 7.29289 17.2929C7 17.5858 7 18.0572 7 19V22`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M2 22L22 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M3 22V6.71724C3 4.20649 3 2.95111 3.79118 2.32824C4.58237 1.70537 5.74742 2.04355 8.07752 2.7199L13.0775 4.17122C14.4836 4.57937 15.1867 4.78344 15.5933 5.33965C16 5.89587 16 6.65344 16 8.16857V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],lo=[[`path`,{d:`M18.9991 19L5 5.00098`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 5L5.00092 18.999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],uo=[[`path`,{d:`M9 9L5 5M16 12H22M12 16V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],fo=[[`path`,{d:`M11.7453 14.85L6.90436 12V7C6.90436 4.79086 8.72949 3 10.9809 3C12.3782 3 13.6113 3.6898 14.3458 4.74128`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.59961 19.1791C10.3266 20.2757 11.5866 21.0008 13.0192 21.0008C15.2707 21.0008 17.0958 19.21 17.0958 17.0008V12.0008L12.1612 9.0957`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.45166 13.5L9.45123 7.66938L13.8642 5.16938C15.814 4.06481 18.3072 4.72031 19.4329 6.63348C20.1593 7.86806 20.1388 9.32466 19.5089 10.4995`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4.48963 13.4993C3.8595 14.6742 3.83887 16.131 4.56539 17.3657C5.6911 19.2789 8.18428 19.9344 10.1341 18.8298L14.5471 16.3298L14.643 10.7344`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M17.0959 17.6309C18.4415 17.5734 19.7295 16.8634 20.4529 15.634C21.5786 13.7209 20.9106 11.2745 18.9608 10.1699L14.5478 7.66992L9.48907 10.4255`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M6.90454 6.36938C5.55865 6.42662 4.27032 7.13672 3.54684 8.3663C2.42113 10.2795 3.08917 12.7258 5.03896 13.8304L9.45196 16.3304L14.5 13.5807`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],po=[[`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],mo=[[`path`,{d:`M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 11.3151 21.9311 10.6462 21.8 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 12.5C8 12.5 9.5 12.5 11.5 16C11.5 16 17.0588 6.83333 22 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ho=[[`path`,{d:`M18 15C18 15 13.5811 9.00001 12 9C10.4188 8.99999 6 15 6 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],go=[[`path`,{d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 12.5L10 14.5L15.5 9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],_o=[[`path`,{d:`M9.50293 21.6846C10.302 21.8902 11.1397 21.9996 12.0029 21.9996C12.8662 21.9996 13.7039 21.8902 14.5029 21.6846`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.5029 2.31504C13.7039 2.10938 12.8662 2 12.0029 2C11.1397 2 10.302 2.10938 9.50293 2.31504`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.37109 14.6777C2.59251 15.4726 2.91663 16.2527 3.34826 17.0003C3.77988 17.7479 4.29346 18.4187 4.87109 19.0079`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M21.6451 9.32261C21.4237 8.52778 21.0996 7.74762 20.668 7.00002C20.2363 6.25243 19.7228 5.58165 19.1451 4.99248`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M21.6436 14.6777C21.4221 15.4726 21.098 16.2527 20.6664 17.0003C20.2348 17.7479 19.7212 18.4187 19.1436 19.0079`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M2.36952 9.32261C2.59093 8.52778 2.91506 7.74762 3.34668 7.00002C3.7783 6.25243 4.29188 5.58165 4.86952 4.99248`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M12.0039 11.5V12M13.0039 12C13.0039 12.5523 12.5562 13 12.0039 13C11.4516 13 11.0039 12.5523 11.0039 12C11.0039 11.4477 11.4516 11 12.0039 11C12.5562 11 13.0039 11.4477 13.0039 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`6`}]],vo=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],yo=[[`path`,{d:`M12 2.5C15.3137 2.5 18 5.18629 18 8.5C18 9.05228 18.4547 9.48717 18.9899 9.62343C20.7202 10.0639 22 11.6325 22 13.5C22 15.7091 20.2091 17.5 18 17.5H7C4.23858 17.5 2 15.2614 2 12.5C2 10.3043 3.41538 8.43933 5.38353 7.76734C5.7853 7.63017 6.10327 7.30325 6.21664 6.89413C6.91886 4.36014 9.24247 2.5 12 2.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 17.5V21.5M12 21.5H6M12 21.5H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],bo=[[`path`,{d:`M14 4H10C6.22876 4 4.34315 4 3.17157 5.17157C2 6.34315 2 8.22876 2 12C2 15.7712 2 17.6569 3.17157 18.8284C4.34315 20 6.22876 20 10 20H14C17.7712 20 19.6569 20 20.8284 18.8284C22 17.6569 22 15.7712 22 12C22 8.22876 22 6.34315 20.8284 5.17157C19.6569 4 17.7712 4 14 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 9L8.83981 10.5858C9.61327 11.2525 10 11.5858 10 12C10 12.4142 9.61327 12.7475 8.83981 13.4142L7 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 16H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],xo=[[`path`,{d:`M14 21H16M14 21C13.1716 21 12.5 20.3284 12.5 19.5V17L12 17M14 21H10M10 21H8M10 21C10.8284 21 11.5 20.3284 11.5 19.5V17L12 17M12 17V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16 3H8C5.17157 3 3.75736 3 2.87868 3.87868C2 4.75736 2 6.17157 2 9V11C2 13.8284 2 15.2426 2.87868 16.1213C3.75736 17 5.17157 17 8 17H16C18.8284 17 20.2426 17 21.1213 16.1213C22 15.2426 22 13.8284 22 11V9C22 6.17157 22 4.75736 21.1213 3.87868C20.2426 3 18.8284 3 16 3Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],So=[[`path`,{d:`M18.8516 16.3743L19.5 6H4.5L5.14839 16.3743C5.315 19.0401 5.39831 20.373 6.26426 21.1865C7.13021 22 8.46571 22 11.1367 22H12.8633C15.5343 22 16.8698 22 17.7357 21.1865C18.6017 20.373 18.685 19.0401 18.8516 16.3743Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16 6H21M16 6L15.3778 4.34082C15.0007 3.33524 14.8122 2.83245 14.4402 2.50292C14.3213 2.39765 14.1904 2.3069 14.0501 2.2326C13.6109 2 13.074 2 12 2C10.926 2 10.3891 2 9.9499 2.2326C9.8096 2.3069 9.67865 2.39765 9.55982 2.50292C9.18783 2.83245 8.99928 3.33524 8.62219 4.34082L8 6M16 6H8M3 6H8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.5 11V17M14.5 11V17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Co=[[`path`,{d:`M16 6C16 6.55228 15.5523 7 15 7C14.4477 7 14 6.55228 14 6C14 5.44772 14.4477 5 15 5C15.5523 5 16 5.44772 16 6Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 6C10 6.55228 9.55228 7 9 7C8.44772 7 8 6.55228 8 6C8 5.44772 8.44772 5 9 5C9.55228 5 10 5.44772 10 6Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M16 18C16 18.5523 15.5523 19 15 19C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17C15.5523 17 16 17.4477 16 18Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M16 12C16 12.5523 15.5523 13 15 13C14.4477 13 14 12.5523 14 12C14 11.4477 14.4477 11 15 11C15.5523 11 16 11.4477 16 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M10 18C10 18.5523 9.55228 19 9 19C8.44772 19 8 18.5523 8 18C8 17.4477 8.44772 17 9 17C9.55228 17 10 17.4477 10 18Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M10 12C10 12.5523 9.55228 13 9 13C8.44772 13 8 12.5523 8 12C8 11.4477 8.44772 11 9 11C9.55228 11 10 11.4477 10 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],wo=[[`path`,{d:`M12 12H12.5M19 12H19.5M5 12H5.5M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13ZM19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13ZM5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],To=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Eo=[[`path`,{d:`M4.5 13V9.45584C4.5 6.21082 4.5 4.58831 5.38607 3.48933C5.56508 3.26731 5.76731 3.06508 5.98933 2.88607C7.08831 2 8.71082 2 11.9558 2C12.6614 2 13.0141 2 13.3372 2.11401C13.4044 2.13772 13.4702 2.165 13.5345 2.19575C13.8436 2.34355 14.093 2.593 14.5919 3.09188L19.3284 7.82843C19.9065 8.40649 20.1955 8.69552 20.3478 9.06306C20.5 9.4306 20.5 9.83935 20.5 10.6569V14C20.5 17.7712 20.5 19.6569 19.3284 20.8284C18.1569 22 16.2712 22 12.5 22C12.1508 22 11.8178 22 11.5 21.9991M13.5 2.5V3C13.5 5.82843 13.5 7.24264 14.3787 8.12132C15.2574 9 16.6716 9 19.5 9H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3.5 22V20.6611C3.5 20.0548 3.74082 19.4735 4.16947 19.0448L8.81022 14.4041C9.06894 14.1453 9.41983 14 9.78571 14C10.1516 14 10.5025 14.1453 10.7612 14.4041L11.0959 14.7388C11.3547 14.9975 11.5 15.3484 11.5 15.7143C11.5 16.0802 11.3547 16.4311 11.0959 16.6898L6.45518 21.3305C6.02653 21.7592 5.44515 22 4.83894 22H3.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Do=[[`circle`,{cx:`12`,cy:`12`,r:`3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9 12H3M15 12H21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Oo=[[`path`,{d:`M19 17L19 11C19 8.17157 19 6.75736 18.1213 5.87868C17.2426 5 15.8284 5 13 5H10M10 5C10 4.29977 11.9943 2.99153 12.5 2.5M10 5C10 5.70023 11.9943 7.00847 12.5 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5 7.5L5 13.5C5 16.3284 5 17.7426 5.87868 18.6213C6.75736 19.5 8.17157 19.5 11 19.5H14M14 19.5C14 20.2002 12.0057 21.5085 11.5 22M14 19.5C14 18.7998 12.0057 17.4915 11.5 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`19`,cy:`19`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`circle`,{cx:`5`,cy:`5`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}]],ko=[[`path`,{d:`M6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 20C13.1046 20 14 19.1046 14 18C14 16.8954 13.1046 16 12 16C10.8954 16 10 16.8954 10 18C10 19.1046 10.8954 20 12 20Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6.01734 8.74067C6.01734 10.4142 5.77537 12.1995 9.22051 11.9855H12.0053M17.9929 8.57617C18.1259 11.9855 16.9199 11.7648 15.7861 11.9855H12.0053M12.0053 15.7001V11.9855`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Ao=[[`path`,{d:`M6 8L6 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 16V12C18 9.17156 18 7.75735 17.1213 6.87867C16.2426 5.99999 14.8284 5.99999 12 5.99999L11 5.99999M11 5.99999C11 5.29976 12.9943 3.99152 13.5 3.49999M11 5.99999C11 6.70022 12.9943 8.00846 13.5 8.49999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`6`,cy:`18`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`circle`,{cx:`6`,cy:`6`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`circle`,{cx:`18`,cy:`18`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],jo=[[`path`,{d:`M20.7104 8.70122L21.9186 12.7288C21.9578 12.8592 21.9773 12.9244 21.9879 12.9914L21.9908 13.0118C22 13.079 22 13.147 22 13.2831C22 16.7797 22 18.528 20.9812 19.6669C20.8824 19.7774 20.7774 19.8824 20.6669 19.9812C19.528 21 17.7797 21 14.2831 21H9.71685C6.22026 21 4.47197 21 3.33311 19.9812C3.22259 19.8824 3.11765 19.7774 3.01877 19.6669C2 18.528 2 16.7797 2 13.2831C2 13.147 2 13.079 2.00915 13.0118L2.01215 12.9914C2.02269 12.9244 2.04225 12.8592 2.08136 12.7288L3.28963 8.70122C4.11355 5.95484 4.5255 4.58166 5.5884 3.79083C6.6513 3 8.08495 3 10.9522 3H13.0478C15.9151 3 17.3487 3 18.4116 3.79083C19.4745 4.58166 19.8865 5.95484 20.7104 8.70122Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 13H22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18.125 17H18M14.125 17H14M18.25 17C18.25 17.1381 18.1381 17.25 18 17.25C17.8619 17.25 17.75 17.1381 17.75 17C17.75 16.8619 17.8619 16.75 18 16.75C18.1381 16.75 18.25 16.8619 18.25 17ZM14.25 17C14.25 17.1381 14.1381 17.25 14 17.25C13.8619 17.25 13.75 17.1381 13.75 17C13.75 16.8619 13.8619 16.75 14 16.75C14.1381 16.75 14.25 16.8619 14.25 17Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Mo=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],No=[[`path`,{d:`M3 11.9896V14.5C3 17.7998 3 19.4497 4.02513 20.4749C5.05025 21.5 6.70017 21.5 10 21.5H14C17.2998 21.5 18.9497 21.5 19.9749 20.4749C21 19.4497 21 17.7998 21 14.5V11.9896C21 10.3083 21 9.46773 20.6441 8.74005C20.2882 8.01237 19.6247 7.49628 18.2976 6.46411L16.2976 4.90855C14.2331 3.30285 13.2009 2.5 12 2.5C10.7991 2.5 9.76689 3.30285 7.70242 4.90855L5.70241 6.46411C4.37533 7.49628 3.71179 8.01237 3.3559 8.74005C3 9.46773 3 10.3083 3 11.9896Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Po=[[`path`,{d:`M12.8924 2.80982L21.4876 9.59547C21.8112 9.85095 22 10.2405 22 10.6528C22 11.3969 21.3969 12 20.6528 12H20V15.5C20 18.3284 20 19.7426 19.1213 20.6213C18.2426 21.5 16.8284 21.5 14 21.5H10C7.17157 21.5 5.75736 21.5 4.87868 20.6213C4 19.7426 4 18.3284 4 15.5V12H3.34716C2.60315 12 2 11.3969 2 10.6528C2 10.2405 2.1888 9.85095 2.5124 9.59547L11.1076 2.80982C11.3617 2.60915 11.6761 2.5 12 2.5C12.3239 2.5 12.6383 2.60915 12.8924 2.80982Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.5 21.5V17C14.5 16.0654 14.5 15.5981 14.299 15.25C14.1674 15.022 13.978 14.8326 13.75 14.701C13.4019 14.5 12.9346 14.5 12 14.5C11.0654 14.5 10.5981 14.5 10.25 14.701C10.022 14.8326 9.83261 15.022 9.70096 15.25C9.5 15.5981 9.5 16.0654 9.5 17V21.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Fo=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 16V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Io=[[`path`,{d:`M20.4999 16.5V8.5C20.4999 6.14298 20.4999 4.96447 19.7676 4.23223C19.0354 3.5 17.8569 3.5 15.4999 3.5H8.49988C6.14286 3.5 4.96434 3.5 4.23211 4.23223C3.49988 4.96447 3.49988 6.14298 3.49988 8.5V16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21.9841 20.5H2.01567C1.63273 20.5 1.38367 20.1088 1.55493 19.7764L3.49988 16.5H20.4999L22.4448 19.7764C22.6161 20.1088 22.367 20.5 21.9841 20.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Lo=[[`path`,{d:`M9.14339 10.691L9.35031 10.4841C11.329 8.50532 14.5372 8.50532 16.5159 10.4841C18.4947 12.4628 18.4947 15.671 16.5159 17.6497L13.6497 20.5159C11.671 22.4947 8.46279 22.4947 6.48405 20.5159C4.50532 18.5372 4.50532 15.329 6.48405 13.3503L6.9484 12.886`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17.0516 11.114L17.5159 10.6497C19.4947 8.67095 19.4947 5.46279 17.5159 3.48405C15.5372 1.50532 12.329 1.50532 10.3503 3.48405L7.48405 6.35031C5.50532 8.32904 5.50532 11.5372 7.48405 13.5159C9.46279 15.4947 12.671 15.4947 14.6497 13.5159L14.8566 13.309`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],K=[[`path`,{d:`M11.0991 3.00012C7.45013 3.00669 5.53932 3.09629 4.31817 4.31764C3.00034 5.63568 3.00034 7.75704 3.00034 11.9997C3.00034 16.2424 3.00034 18.3638 4.31817 19.6818C5.63599 20.9999 7.75701 20.9999 11.9991 20.9999C16.241 20.9999 18.3621 20.9999 19.6799 19.6818C20.901 18.4605 20.9906 16.5493 20.9972 12.8998`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.556 3.49612L11.0487 13.0586M20.556 3.49612C20.062 3.00151 16.7343 3.04761 16.0308 3.05762M20.556 3.49612C21.05 3.99074 21.0039 7.32273 20.9939 8.02714`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ro=[[`path`,{d:`M3 5H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 12H11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 12.0009H21M17.995 15.0059L17.995 9.00586`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M3 19H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],zo=[[`path`,{d:`M12.9961 6L20.9961 6`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.9961 12L20.9961 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.9961 18L20.9961 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4.23073 19.3478C4.59827 19.5 5.06421 19.5 5.99609 19.5C6.92798 19.5 7.39392 19.5 7.76146 19.3478C8.25152 19.1448 8.64086 18.7554 8.84385 18.2654C8.99609 17.8978 8.99609 17.4319 8.99609 16.5C8.99609 15.5681 8.99609 15.1022 8.84385 14.7346C8.64086 14.2446 8.25152 13.8552 7.76146 13.6522C7.39392 13.5 6.92798 13.5 5.99609 13.5C5.06421 13.5 4.59827 13.5 4.23073 13.6522C3.74067 13.8552 3.35132 14.2446 3.14833 14.7346C2.99609 15.1022 2.99609 15.5681 2.99609 16.5C2.99609 17.4319 2.99609 17.8978 3.14833 18.2654C3.35132 18.7554 3.74067 19.1448 4.23073 19.3478Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M2.99609 7.16667C2.99609 7.16667 3.74609 7.16667 4.49609 8.5C4.49609 8.5 6.87845 5.16667 8.99609 4.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Bo=[[`path`,{d:`M4 5L20 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M4 12L20 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M4 19L20 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Vo=[[`path`,{d:`M21.4961 12C21.4961 17.2467 17.2428 21.5 11.9961 21.5C10.368 21.5 8.83549 21.0904 7.49609 20.3687C5.62786 19.362 4.37071 20.2979 3.26202 20.4658C3.09383 20.4913 2.92634 20.4302 2.80606 20.31C2.6235 20.1274 2.58875 19.8451 2.6896 19.6074C3.12475 18.5818 3.5243 16.6382 2.9795 15C2.6659 14.057 2.49609 13.0483 2.49609 12C2.49609 6.75329 6.74939 2.5 11.9961 2.5C17.2428 2.5 21.4961 6.75329 21.4961 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.49609 9.5C9.49609 8.11929 10.6154 7 11.9961 7C13.3768 7 14.4961 8.11929 14.4961 9.5C14.4961 10.3569 14.0649 11.1131 13.4078 11.5636C12.7244 12.0319 11.9961 12.6716 11.9961 13.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.1211 16.75H11.9961M12.2461 16.75C12.2461 16.8881 12.1342 17 11.9961 17C11.858 17 11.7461 16.8881 11.7461 16.75C11.7461 16.6119 11.858 16.5 11.9961 16.5C12.1342 16.5 12.2461 16.6119 12.2461 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ho=[[`path`,{d:`M13.5 15.5C13.5 14.5572 13.5 14.0858 13.7929 13.7929C14.0858 13.5 14.5572 13.5 15.5 13.5H20C20.9428 13.5 21.4142 13.5 21.7071 13.7929C22 14.0858 22 14.5572 22 15.5V20C22 20.9428 22 21.4142 21.7071 21.7071C21.4142 22 20.9428 22 20 22H15.5C14.5572 22 14.0858 22 13.7929 21.7071C13.5 21.4142 13.5 20.9428 13.5 20V15.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 4C2 3.05719 2 2.58579 2.29289 2.29289C2.58579 2 3.05719 2 4 2H8.5C9.44281 2 9.91421 2 10.2071 2.29289C10.5 2.58579 10.5 3.05719 10.5 4V8.5C10.5 9.44281 10.5 9.91421 10.2071 10.2071C9.91421 10.5 9.44281 10.5 8.5 10.5H4C3.05719 10.5 2.58579 10.5 2.29289 10.2071C2 9.91421 2 9.44281 2 8.5V4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 15.5C2 14.5572 2 14.0858 2.29289 13.7929C2.58579 13.5 3.05719 13.5 4 13.5H8.5C9.44281 13.5 9.91421 13.5 10.2071 13.7929C10.5 14.0858 10.5 14.5572 10.5 15.5V20C10.5 20.9428 10.5 21.4142 10.2071 21.7071C9.91421 22 9.44281 22 8.5 22H4C3.05719 22 2.58579 22 2.29289 21.7071C2 21.4142 2 20.9428 2 20V15.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M13.5 4C13.5 3.05719 13.5 2.58579 13.7929 2.29289C14.0858 2 14.5572 2 15.5 2H20C20.9428 2 21.4142 2 21.7071 2.29289C22 2.58579 22 3.05719 22 4V8.5C22 9.44281 22 9.91421 21.7071 10.2071C21.4142 10.5 20.9428 10.5 20 10.5H15.5C14.5572 10.5 14.0858 10.5 13.7929 10.2071C13.5 9.91421 13.5 9.44281 13.5 8.5V4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Uo=[[`path`,{d:`M7.87124 12.6711L10.0051 14.5001L12.6698 4.28528C12.8673 3.52824 13.5511 3 14.3334 3C15.4424 3 16.2613 4.03438 16.0068 5.11376L14.8058 10.208L16.493 10.4777C18.4216 10.767 19.386 10.9116 20.0652 11.3186C21.1872 11.9907 22 13.0001 22 14.4737C22 15.5001 21.7463 16.1887 21.1296 18.0388C20.7383 19.2128 20.5426 19.7998 20.2236 20.2644C19.6983 21.0294 18.9233 21.5879 18.0315 21.8444C17.4898 22.0001 16.8711 22.0001 15.6336 22.0001H14.5847C12.9395 22.0001 12.1169 22.0001 11.3846 21.6982C11.2533 21.6441 11.1249 21.583 11.0001 21.5152C10.304 21.1372 9.78533 20.4988 8.74791 19.222L5.38941 15.0884C4.87331 14.4533 4.86987 13.5442 5.38114 12.9051C5.99565 12.137 7.12437 12.0309 7.87124 12.6711Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.95596 2.49064C6.95596 2.49064 6.70432 4.76405 6.95596 5.01188M6.95596 5.01188C7.28241 5.33331 9.55781 5.06274 9.55781 5.06274M6.95596 5.01188L10 2M5.04404 9.50936C5.04404 9.50936 5.29568 7.23595 5.04404 6.98812M5.04404 6.98812C4.71759 6.66669 2.44219 6.93726 2.44219 6.93726M5.04404 6.98812L2 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Wo=[[`path`,{d:`M2.46186 20.4697C2.16896 20.7626 2.16896 21.2374 2.46186 21.5303C2.75475 21.8232 3.22962 21.8232 3.52252 21.5303L2.99219 21L2.46186 20.4697ZM10.0225 15.0303C10.3154 14.7374 10.3154 14.2626 10.0225 13.9697C9.72962 13.6768 9.25475 13.6768 8.96186 13.9697L9.49219 14.5L10.0225 15.0303ZM2.99219 21L3.52252 21.5303L10.0225 15.0303L9.49219 14.5L8.96186 13.9697L2.46186 20.4697L2.99219 21Z`,fill:`currentColor`,key:`0`}],[`path`,{d:`M21.5225 3.53033C21.8154 3.23744 21.8154 2.76256 21.5225 2.46967C21.2296 2.17678 20.7548 2.17678 20.4619 2.46967L20.9922 3L21.5225 3.53033ZM13.9619 8.96967C13.669 9.26256 13.669 9.73744 13.9619 10.0303C14.2548 10.3232 14.7296 10.3232 15.0225 10.0303L14.4922 9.5L13.9619 8.96967ZM20.9922 3L20.4619 2.46967L13.9619 8.96967L14.4922 9.5L15.0225 10.0303L21.5225 3.53033L20.9922 3Z`,fill:`currentColor`,key:`1`}],[`path`,{d:`M14.2688 5.00098C14.2688 5.00098 13.6464 9.10202 14.2688 9.72438C14.8911 10.3467 18.9922 9.72436 18.9922 9.72436`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M9.71561 19.001C9.71561 19.001 10.3379 14.8999 9.71558 14.2776C9.09323 13.6552 4.99219 14.2776 4.99219 14.2776`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Go=[[`path`,{d:`M16 12H8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}]],Ko=[[`path`,{d:`M21 11C21 7.22876 21 5.34315 19.8284 4.17157C18.6569 3 16.7712 3 13 3H11C7.22876 3 5.34315 3 4.17157 4.17157C3 5.34315 3 7.22876 3 11V13C3 16.7712 3 18.6569 4.17157 19.8284C5.34315 21 7.22876 21 11 21H13C16.7712 21 18.6569 21 19.8284 19.8284C21 18.6569 21 16.7712 21 13V11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9 3V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M16 9L14.8918 9.87868C13.6306 10.8787 13 11.3787 13 12C13 12.6213 13.6306 13.1213 14.8918 14.1213L16 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],qo=[[`path`,{d:`M18.1688 12L19.713 10.4558C21.4186 8.75022 21.4186 5.98485 19.713 4.27922C18.0073 2.57359 15.242 2.57359 13.5363 4.27922L4.27141 13.5442C2.56578 15.2498 2.56578 18.0152 4.27141 19.7208C5.97704 21.4264 8.7424 21.4264 10.448 19.7208L13.9224 16.2464C14.9884 15.1804 14.9884 13.4521 13.9224 12.386C12.8564 11.32 11.128 11.32 10.062 12.386L8.1318 14.3162`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Jo=[[`path`,{d:`M16.4249 4.60509L17.4149 3.6151C18.2351 2.79497 19.5648 2.79497 20.3849 3.6151C21.205 4.43524 21.205 5.76493 20.3849 6.58507L19.3949 7.57506M16.4249 4.60509L9.76558 11.2644C9.25807 11.772 8.89804 12.4078 8.72397 13.1041L8 16L10.8959 15.276C11.5922 15.102 12.228 14.7419 12.7356 14.2344L19.3949 7.57506M16.4249 4.60509L19.3949 7.57506`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18.9999 13.5C18.9999 16.7875 18.9999 18.4312 18.092 19.5376C17.9258 19.7401 17.7401 19.9258 17.5375 20.092C16.4312 21 14.7874 21 11.4999 21H11C7.22876 21 5.34316 21 4.17159 19.8284C3.00003 18.6569 3 16.7712 3 13V12.5C3 9.21252 3 7.56879 3.90794 6.46244C4.07417 6.2599 4.2599 6.07417 4.46244 5.90794C5.56879 5 7.21252 5 10.5 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Yo=[[`path`,{d:`M7.5 8C6.95863 8.1281 6.49932 8.14239 5.99268 8.45891C5.07234 9.03388 4.85108 9.71674 5.08821 10.7612C5.94028 14.5139 9.48599 18.0596 13.2388 18.9117C14.2834 19.1489 14.9661 18.928 15.5416 18.0077C15.8411 17.5288 15.8716 17.0081 16 16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 7.79915C12.1776 7.77794 12.3182 7.74034 12.4295 7.68235C13.3997 7.17686 13.9291 5.53361 14.4498 4.60009C14.9311 3.73715 15.1718 3.30567 15.7379 3.10227C16.3041 2.89888 16.6448 3.02205 17.3262 3.26839C18.9197 3.8445 20.1555 5.08032 20.7316 6.6738C20.9779 7.35521 21.1011 7.69591 20.8977 8.26204C20.6943 8.82817 20.2628 9.06884 19.3999 9.55018C18.4608 10.074 16.7954 10.6108 16.2905 11.5898C16.2345 11.6983 16.1978 11.8327 16.1769 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 21L8 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M3 3L21 21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Xo=[[`path`,{d:`M3 21L8 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13.2585 18.8714C9.51516 18.0215 5.97844 14.4848 5.12853 10.7415C4.99399 10.1489 4.92672 9.85266 5.12161 9.37197C5.3165 8.89129 5.55457 8.74255 6.03071 8.44509C7.10705 7.77265 8.27254 7.55888 9.48209 7.66586C11.1793 7.81598 12.0279 7.89104 12.4512 7.67048C12.8746 7.44991 13.1622 6.93417 13.7376 5.90269L14.4664 4.59604C14.9465 3.73528 15.1866 3.3049 15.7513 3.10202C16.316 2.89913 16.6558 3.02199 17.3355 3.26771C18.9249 3.84236 20.1576 5.07505 20.7323 6.66449C20.978 7.34417 21.1009 7.68401 20.898 8.2487C20.6951 8.8134 20.2647 9.05346 19.4039 9.53358L18.0672 10.2792C17.0376 10.8534 16.5229 11.1406 16.3024 11.568C16.0819 11.9955 16.162 12.8256 16.3221 14.4859C16.4399 15.7068 16.2369 16.88 15.5555 17.9697C15.2577 18.4458 15.1088 18.6839 14.6283 18.8786C14.1477 19.0733 13.8513 19.006 13.2585 18.8714Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Zo=[[`path`,{d:`M18.7083 6C20.1334 7.59227 21 9.69494 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 9.69494 3.86656 7.59227 5.29168 6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 3V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Qo=[[`path`,{d:`M21 14C21 15.4001 21 16.1002 20.7275 16.635C20.4878 17.1054 20.1054 17.4878 19.635 17.7275C19.1002 18 18.4001 18 17 18H7C5.59987 18 4.8998 18 4.36502 17.7275C3.89462 17.4878 3.51217 17.1054 3.27248 16.635C3 16.1002 3 15.4001 3 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 14H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M6 10H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6 6H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],$o=[[`path`,{d:`M10 8C10 9.88562 10 10.8284 9.41421 11.4142C8.82843 12 7.88562 12 6 12C4.11438 12 3.17157 12 2.58579 11.4142C2 10.8284 2 9.88562 2 8C2 6.11438 2 5.17157 2.58579 4.58579C3.17157 4 4.11438 4 6 4C7.88562 4 8.82843 4 9.41421 4.58579C10 5.17157 10 6.11438 10 8Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 7L10 11.4821C10 15.4547 7.48429 18.8237 4 20`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M22 8C22 9.88562 22 10.8284 21.4142 11.4142C20.8284 12 19.8856 12 18 12C16.1144 12 15.1716 12 14.5858 11.4142C14 10.8284 14 9.88562 14 8C14 6.11438 14 5.17157 14.5858 4.58579C15.1716 4 16.1144 4 18 4C19.8856 4 20.8284 4 21.4142 4.58579C22 5.17157 22 6.11438 22 8Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M22 7L22 11.4821C22 15.4547 19.4843 18.8237 16 20`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}]],es=[[`path`,{d:`M20.4879 15C19.2524 18.4956 15.9187 21 12 21C7.02943 21 3 16.9706 3 12C3 7.02943 7.02943 3 12 3C15.7292 3 18.9286 5.26806 20.2941 8.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15 9H18C19.4142 9 20.1213 9 20.5607 8.56066C21 8.12132 21 7.41421 21 6V3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ts=[[`path`,{d:`M21.0477 3.05293C18.8697 0.707363 2.48648 6.4532 2.50001 8.551C2.51535 10.9299 8.89809 11.6617 10.6672 12.1581C11.7311 12.4565 12.016 12.7625 12.2613 13.8781C13.3723 18.9305 13.9301 21.4435 15.2014 21.4996C17.2278 21.5892 23.1733 5.342 21.0477 3.05293Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.4999 12.5L14.9999 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ns=[[`path`,{d:`M19 4H5C4.06812 4 3.60218 4 3.23463 4.15224C2.74458 4.35523 2.35523 4.74458 2.15224 5.23463C2 5.60218 2 6.06812 2 7C2 7.93188 2 8.39782 2.15224 8.76537C2.35523 9.25542 2.74458 9.64477 3.23463 9.84776C3.60218 10 4.06812 10 5 10H19C19.9319 10 20.3978 10 20.7654 9.84776C21.2554 9.64477 21.6448 9.25542 21.8478 8.76537C22 8.39782 22 7.93188 22 7C22 6.06812 22 5.60218 21.8478 5.23463C21.6448 4.74458 21.2554 4.35523 20.7654 4.15224C20.3978 4 19.9319 4 19 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 14H5C4.06812 14 3.60218 14 3.23463 14.1522C2.74458 14.3552 2.35523 14.7446 2.15224 15.2346C2 15.6022 2 16.0681 2 17C2 17.9319 2 18.3978 2.15224 18.7654C2.35523 19.2554 2.74458 19.6448 3.23463 19.8478C3.60218 20 4.06812 20 5 20H19C19.9319 20 20.3978 20 20.7654 19.8478C21.2554 19.6448 21.6448 19.2554 21.8478 18.7654C22 18.3978 22 17.9319 22 17C22 16.0681 22 15.6022 21.8478 15.2346C21.6448 14.7446 21.2554 14.3552 20.7654 14.1522C20.3978 14 19.9319 14 19 14Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M6.125 7H6M6.25 7C6.25 7.13807 6.13807 7.25 6 7.25C5.86193 7.25 5.75 7.13807 5.75 7C5.75 6.86193 5.86193 6.75 6 6.75C6.13807 6.75 6.25 6.86193 6.25 7Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M10.125 7H10M10.25 7C10.25 7.13807 10.1381 7.25 10 7.25C9.86193 7.25 9.75 7.13807 9.75 7C9.75 6.86193 9.86193 6.75 10 6.75C10.1381 6.75 10.25 6.86193 10.25 7Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M6.125 17H6M6.25 17C6.25 17.1381 6.13807 17.25 6 17.25C5.86193 17.25 5.75 17.1381 5.75 17C5.75 16.8619 5.86193 16.75 6 16.75C6.13807 16.75 6.25 16.8619 6.25 17Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M10.125 17H10M10.25 17C10.25 17.1381 10.1381 17.25 10 17.25C9.86193 17.25 9.75 17.1381 9.75 17C9.75 16.8619 9.86193 16.75 10 16.75C10.1381 16.75 10.25 16.8619 10.25 17Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],rs=[[`path`,{d:`M3.95631 10.5829L3.03254 9.07084C2.74505 8.60024 2.7389 8.00978 3.01652 7.5333L3.63533 6.47124C3.90953 6.00064 4.41721 5.71571 4.96162 5.7269L6.69131 5.76245C6.92616 5.76728 7.15379 5.68727 7.34333 5.54846C7.79531 5.21745 8.28334 4.93276 8.80042 4.70139C9.01191 4.60675 9.19222 4.45165 9.30469 4.24903L10.1203 2.77965C10.3847 2.30328 10.8865 2.00781 11.4312 2.00781H12.6937C13.2384 2.00781 13.7403 2.30329 14.0047 2.77966L14.8202 4.24902C14.9327 4.45165 15.113 4.60675 15.3245 4.70139C15.8416 4.93274 16.3296 5.2174 16.7815 5.54838C16.9711 5.68718 17.1987 5.76718 17.4336 5.76235L19.1634 5.72676C19.7078 5.71557 20.2155 6.00049 20.4897 6.47111L21.1085 7.53314C21.3862 8.00963 21.38 8.60009 21.0925 9.07068L20.1687 10.5828C20.0481 10.7803 20.002 11.0134 20.0235 11.2439C20.0707 11.7486 20.0707 12.267 20.0235 12.7717C20.002 13.0022 20.0481 13.2353 20.1687 13.4329L21.0924 14.9448C21.3799 15.4154 21.3861 16.0058 21.1084 16.4823L20.4896 17.5444C20.2154 18.015 19.7077 18.2999 19.1633 18.2887L17.4338 18.2531C17.1989 18.2483 16.9713 18.3283 16.7817 18.4671C16.3297 18.7982 15.8416 19.0829 15.3245 19.3142C15.113 19.4089 14.9327 19.564 14.8202 19.7666L14.0047 21.236C13.7403 21.7123 13.2384 22.0078 12.6937 22.0078H11.4312C10.8866 22.0078 10.3847 21.7123 10.1203 21.236L9.30468 19.7665C9.19222 19.5639 9.01191 19.4088 8.80042 19.3142C8.28329 19.0828 7.79519 18.798 7.34316 18.467C7.15362 18.3282 6.92597 18.2482 6.69111 18.253L4.96175 18.2886C4.41733 18.2998 3.90963 18.0148 3.63543 17.5442L3.01663 16.4822C2.739 16.0057 2.74515 15.4152 3.03264 14.9446L3.95631 13.4327C4.07699 13.2351 4.12309 13.002 4.10154 12.7715C4.05437 12.267 4.05438 11.7486 4.10154 11.244C4.12308 11.0135 4.07699 10.7805 3.95631 10.5829Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12.0625`,cy:`12.0078`,r:`3.5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}]],is=[[`path`,{d:`M11.9922 8L11.9922 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.1172 15.75L11.9922 15.75M12.2422 15.75C12.2422 15.8881 12.1303 16 11.9922 16C11.8541 16 11.7422 15.8881 11.7422 15.75C11.7422 15.6119 11.8541 15.5 11.9922 15.5C12.1303 15.5 12.2422 15.6119 12.2422 15.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20.9922 11.1835V8.28041C20.9922 6.64041 20.9922 5.82041 20.5881 5.28541C20.184 4.75042 19.2703 4.49068 17.4429 3.97122C16.1944 3.61632 15.0938 3.18875 14.2145 2.79841C13.0156 2.26622 12.4161 2.00012 11.9922 2.00012C11.5682 2.00012 10.9688 2.26622 9.7699 2.79841C8.89057 3.18875 7.79002 3.61632 6.54152 3.97122C4.71411 4.49068 3.80041 4.75042 3.3963 5.28541C2.99219 5.82041 2.99219 6.64041 2.99219 8.28041V11.1835C2.99219 16.8086 8.05496 20.1836 10.5861 21.5195C11.1932 21.8399 11.4968 22.0001 11.9922 22.0001C12.4876 22.0001 12.7911 21.8399 13.3982 21.5195C15.9294 20.1836 20.9922 16.8086 20.9922 11.1835Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],as=[[`path`,{d:`M20.9922 11.1833V8.28029C20.9922 6.64029 20.9922 5.82028 20.5881 5.28529C20.184 4.75029 19.2703 4.49056 17.4429 3.9711C16.1944 3.6162 15.0938 3.18863 14.2145 2.79829C13.0156 2.2661 12.4161 2 11.9922 2C11.5682 2 10.9688 2.2661 9.7699 2.79829C8.89057 3.18863 7.79002 3.61619 6.54152 3.9711C4.71411 4.49056 3.80041 4.75029 3.3963 5.28529C2.99219 5.82028 2.99219 6.64029 2.99219 8.28029V11.1833C2.99219 16.8085 8.05496 20.1835 10.5861 21.5194C11.1932 21.8398 11.4968 22 11.9922 22C12.4876 22 12.7911 21.8398 13.3982 21.5194C15.9294 20.1835 20.9922 16.8085 20.9922 11.1833Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.49219 11.8333C8.49219 11.8333 9.36719 11.8333 10.2422 13.5C10.2422 13.5 13.0216 9.33333 15.4922 8.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],os=[[`path`,{d:`M20.5455 14C20.8286 13.133 20.9922 12.1945 20.9922 11.1833V8.28029C20.9922 6.64029 20.9922 5.82028 20.5881 5.28529C20.184 4.75029 19.2703 4.49056 17.4429 3.9711C16.1944 3.6162 15.0938 3.18863 14.2145 2.79829C13.0156 2.2661 12.4161 2 11.9922 2C11.5682 2 10.9688 2.2661 9.7699 2.79829C9.52703 2.9061 9.26727 3.01676 8.99219 3.12793`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17.9922 18.1221C16.4419 19.7483 14.6235 20.8728 13.3982 21.5194C12.7911 21.8398 12.4876 22 11.9922 22C11.4968 22 11.1932 21.8398 10.5861 21.5194C8.05496 20.1836 2.99219 16.8085 2.99219 11.1834V8.28033C2.99219 6.64032 2.99219 5.82032 3.3963 5.28533C3.60583 5.00794 3.95235 4.80455 4.49219 4.60059`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M1.99219 2L21.9922 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],ss=[[`path`,{d:`M9.5 9C9.5 7.61929 10.6193 6.5 12 6.5C13.3807 6.5 14.5 7.61929 14.5 9C14.5 9.85691 14.0689 10.6131 13.4117 11.0636C12.7283 11.5319 12 12.1716 12 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.125 16.25H12M12.25 16.25C12.25 16.3881 12.1381 16.5 12 16.5C11.8619 16.5 11.75 16.3881 11.75 16.25C11.75 16.1119 11.8619 16 12 16C12.1381 16 12.25 16.1119 12.25 16.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],cs=[[`path`,{d:`M2.99982 12.0002H10.9998`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13.9998 5.00015L20.9998 5.00015`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11.9998 19.0002L20.9998 19.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M2.99982 5.00015H9.99982M9.99982 5.00015V3.00015M9.99982 5.00015V7.00015`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M2.99982 19.0002H7.99982M7.99982 19.0002V17.0002M7.99982 19.0002V21.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M14.9998 12.0002L20.9998 12.0002M14.9998 12.0002V10.0002M14.9998 12.0002V14.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],ls=[[`path`,{d:`M7.99219 16L8.71615 13.1041C8.89023 12.4078 9.25026 11.772 9.75776 11.2644L16.4171 4.60509L17.4071 3.6151C18.2272 2.79497 19.557 2.79497 20.3771 3.6151C21.1972 4.43524 21.1972 5.76493 20.3771 6.58507L19.3871 7.57506L12.7277 14.2344C12.2202 14.7419 11.5843 15.102 10.888 15.276L7.99219 16Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18.9921 13.5C18.9921 16.7875 18.9921 18.4312 18.0842 19.5376C17.918 19.7401 17.7322 19.9258 17.5297 20.092C16.4234 21 14.7796 21 11.4921 21H10.9922C7.22095 21 5.33535 21 4.16378 19.8284C2.99222 18.6569 2.99219 16.7712 2.99219 13V12.5C2.99219 9.21252 2.99219 7.56879 3.90013 6.46244C4.06636 6.2599 4.25208 6.07417 4.45463 5.90794C5.56098 5 7.20471 5 10.4922 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],us=[[`path`,{d:`M7.99219 16L15.9922 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.49219 12C2.49219 7.52166 2.49219 5.28249 3.88343 3.89124C5.27467 2.5 7.51384 2.5 11.9922 2.5C16.4705 2.5 18.7097 2.5 20.1009 3.89124C21.4922 5.28249 21.4922 7.52166 21.4922 12C21.4922 16.4783 21.4922 18.7175 20.1009 20.1088C18.7097 21.5 16.4705 21.5 11.9922 21.5C7.51384 21.5 5.27467 21.5 3.88343 20.1088C2.49219 18.7175 2.49219 16.4783 2.49219 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ds=[[`path`,{d:`M7.49219 7.5L8.71873 8.55719C9.23437 9.00163 9.49219 9.22386 9.49219 9.5C9.49219 9.77614 9.23437 9.99836 8.71873 10.4428L7.49219 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.4922 12.5H15.4922`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11.9922 21C15.7419 21 17.6168 21 18.9311 20.0451C19.3556 19.7367 19.7289 19.3634 20.0373 18.9389C20.9922 17.6246 20.9922 15.7497 20.9922 12C20.9922 8.25027 20.9922 6.3754 20.0373 5.06107C19.7289 4.6366 19.3556 4.26331 18.9311 3.95491C17.6168 3 15.7419 3 11.9922 3C8.24246 3 6.36759 3 5.05326 3.95491C4.62879 4.26331 4.2555 4.6366 3.9471 5.06107C2.99219 6.3754 2.99219 8.25027 2.99219 12C2.99219 15.7497 2.99219 17.6246 3.9471 18.9389C4.2555 19.3634 4.62879 19.7367 5.05326 20.0451C6.36759 21 8.24246 21 11.9922 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],fs=[[`path`,{d:`M9.5 6.5C9.99153 5.9943 11.2998 4 12 4M14.5 6.5C14.0085 5.9943 12.7002 4 12 4M12 4V10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18.3633 10.6357L16.9491 12.05`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 17H5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M5.63657 10.6356L7.05078 12.0498`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M21 17H19`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M21 20H3`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M16 17C16 14.7909 14.2091 13 12 13C9.79086 13 8 14.7909 8 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`6`}]],ps=[[`path`,{d:`M14.4961 2.00027H9.49609C8.66767 2.00027 7.99609 2.67184 7.99609 3.50027C7.99609 4.32869 8.66767 5.00027 9.49609 5.00027H14.4961C15.3245 5.00027 15.9961 4.32869 15.9961 3.50027C15.9961 2.67184 15.3245 2.00027 14.4961 2.00027Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15.9961 3.50027C17.5496 3.54708 18.4761 3.72034 19.1174 4.36163C19.9961 5.24031 19.9961 6.6545 19.9961 9.4829L19.9961 15.9997C19.9961 18.8282 19.9961 20.2424 19.1174 21.1211C18.2387 21.9997 16.8245 21.9997 13.9961 21.9997L9.99609 21.9997C7.16767 21.9997 5.75346 21.9997 4.87478 21.1211C3.9961 20.2424 3.9961 18.8282 3.99609 15.9998L3.99611 9.48295C3.9961 6.65452 3.9961 5.2403 4.87478 4.36162C5.51606 3.72033 6.44261 3.54708 7.99599 3.50027`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M7.49609 11.0003L8.49609 12.0003L10.4961 9.50027`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M13.5 17.0003H16.5M13.5 11.0003H16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M8.625 17.0003H8.5M8.75 17.0003C8.75 17.1383 8.63807 17.2503 8.5 17.2503C8.36193 17.2503 8.25 17.1383 8.25 17.0003C8.25 16.8622 8.36193 16.7503 8.5 16.7503C8.63807 16.7503 8.75 16.8622 8.75 17.0003Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],ms=[[`path`,{d:`M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.0588 8.83333 19 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],hs=[[`path`,{d:`M3 13.3333C3 13.3333 4.5 14 6.5 17C6.5 17 6.78485 16.5192 7.32133 15.7526M17 6C14.7085 7.14577 12.3119 9.55181 10.3879 11.8223`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 13.3333C8 13.3333 9.5 14 11.5 17C11.5 17 17 8.5 22 6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],gs=[[`path`,{d:`M5.25 21H18.75C18.9822 21 19.0983 21 19.196 20.9904C20.1456 20.8968 20.8968 20.1456 20.9904 19.196C21 19.0983 21 18.9822 21 18.75C21 18.5178 21 18.4017 20.9904 18.304C20.8968 17.3544 20.1456 16.6032 19.196 16.5096C19.0983 16.5 18.9822 16.5 18.75 16.5H17.0607C16.8324 16.5 16.7182 16.5 16.6087 16.5121C16.2317 16.5538 15.8742 16.7018 15.5781 16.939C15.4921 17.0079 15.4114 17.0886 15.25 17.25C15.0886 17.4114 15.0079 17.4921 14.9219 17.561C14.6258 17.7982 14.2683 17.9462 13.8913 17.9879C13.7818 18 13.6676 18 13.4393 18H10.5607C10.3324 18 10.2182 18 10.1087 17.9879C9.73165 17.9462 9.37423 17.7982 9.07814 17.561C8.99213 17.4921 8.91142 17.4114 8.75 17.25C8.58858 17.0886 8.50787 17.0079 8.42186 16.939C8.12577 16.7018 7.76835 16.5538 7.3913 16.5121C7.28177 16.5 7.16763 16.5 6.93934 16.5H5.25C5.01783 16.5 4.90175 16.5 4.80397 16.5096C3.85441 16.6032 3.10315 17.3544 3.00963 18.304C3 18.4017 3 18.5178 3 18.75C3 18.9822 3 19.0983 3.00963 19.196C3.10315 20.1456 3.85441 20.8968 4.80397 20.9904C4.90175 21 5.01783 21 5.25 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.5 7.49996C16.5 7.49996 13.1858 3.00001 12 3C10.8141 2.99999 7.5 7.5 7.5 7.5M12 4V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],_s=[[`path`,{d:`M11 13.5C10.6446 13.5097 10.3134 13.5226 10.0008 13.5379C6.3 13.7193 3.28417 16.8058 3 20.5002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19.6709 16.2593C19.8803 16.6249 20 17.0485 20 17.5C20 17.9514 19.8804 18.3749 19.671 18.7404C19.2402 19.493 18.4293 20 17.5 20M15.3291 16.2593C15.1197 16.6249 15 17.0485 15 17.5C15 17.9514 15.1196 18.3749 15.329 18.7404C15.7598 19.493 16.5707 20 17.5 20M17.5 20L17.5 21.5M17.5 15C18.4292 15 19.24 15.5069 19.6709 16.2593M17.5 15C16.5708 15 15.76 15.5069 15.3291 16.2593M17.5 15L17.5 13.5M21 15.4998L19.6709 16.2593M14 19.4998L15.329 18.7404M21 19.4998L19.671 18.7404M14 15.4998L15.3291 16.2593`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`11`,cy:`6.5`,r:`4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],vs=[[`path`,{d:`M17.0158 16.5V21.282C17.0158 21.6025 16.8064 21.874 16.5174 21.9663M17.0158 16.5L10.8772 12M17.0158 16.5V7.5M7.74691 9.7053L4.25118 7.03035C3.85429 6.72665 3.29466 6.76425 2.94169 7.11833L2.2921 7.76997C1.89399 8.16933 1.90433 8.81995 2.31494 9.20638L5.28343 12M7.74691 9.7053L10.8772 12M7.74691 9.7053L15.8129 2.19186C15.9453 2.06854 16.1193 2 16.3 2C16.3758 2 16.4488 2.01181 16.5174 2.0337M10.8772 12L17.0158 7.5M17.0158 7.5V2.71803C17.0158 2.39749 16.8064 2.126 16.5174 2.0337M7.74691 14.2947L4.25118 16.9696C3.85429 17.2733 3.29466 17.2357 2.94169 16.8817L2.2921 16.23C1.89399 15.8307 1.90433 15.18 2.31494 14.7936L5.28343 12M7.74691 14.2947L15.8129 21.8081C15.9453 21.9315 16.1193 22 16.3 22C16.3758 22 16.4488 21.9882 16.5174 21.9663M7.74691 14.2947L5.28343 12M16.5174 2.0337L21.4111 4.23506C21.7695 4.39626 22.0001 4.75353 22.0001 5.14752V18.8525C22.0001 19.2465 21.7695 19.6037 21.4111 19.7649L16.5174 21.9663`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],ys=[[`path`,{d:`M6 16H10L6 20H10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M4 4H11L4 12H11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14 9H20L14 15H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],bs=[`shift`,`alt`,`meta`,`mod`,`ctrl`,`control`];function xs(){return typeof navigator>`u`?!1:/mac/i.test(navigator.userAgent)&&!/iphone|ipad|ipod/i.test(navigator.userAgent)}var Ss={esc:`escape`,return:`enter`,left:`arrowleft`,right:`arrowright`,up:`arrowup`,down:`arrowdown`,ShiftLeft:`shift`,ShiftRight:`shift`,AltLeft:`alt`,AltRight:`alt`,MetaLeft:`meta`,MetaRight:`meta`,OSLeft:`meta`,OSRight:`meta`,ControlLeft:`ctrl`,ControlRight:`ctrl`};function Cs(e){return(Ss[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,``)}function ws(e){return bs.includes(e)}function Ts(e,t=`,`){return e.toLowerCase().split(t)}function Es(e,t=`+`,n=`>`,r=!1,i,a){let o=[],s=!1;e=e.trim(),e.includes(n)?(s=!0,o=e.toLocaleLowerCase().split(n).map(e=>Cs(e))):o=e.toLocaleLowerCase().split(t).map(e=>Cs(e));let c={alt:o.includes(`alt`),ctrl:o.includes(`ctrl`)||o.includes(`control`),shift:o.includes(`shift`),meta:o.includes(`meta`),mod:o.includes(`mod`),useKey:r},l=o.filter(e=>!bs.includes(e));return{...c,keys:l,description:i,isSequence:s,hotkey:e,metadata:a}}typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.code!==void 0&&As([Cs(e.code)])}),document.addEventListener(`keyup`,e=>{e.code!==void 0&&js([Cs(e.code)])})),typeof window<`u`&&(window.addEventListener(`blur`,()=>{Ds.clear()}),window.addEventListener(`focus`,()=>{Ds.clear()}),window.addEventListener(`contextmenu`,()=>{setTimeout(()=>{Ds.clear()},0)})),typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{Ds.clear()});var Ds=new Set;function Os(e){return Array.isArray(e)}function ks(e,t=`,`){return(Os(e)?e:e.split(t)).every(e=>Ds.has(e.trim().toLowerCase()))}function As(e){let t=Array.isArray(e)?e:[e];Ds.has(`meta`)&&Ds.forEach(e=>{ws(e)||Ds.delete(e.toLowerCase())}),t.forEach(e=>{Ds.add(e.toLowerCase())})}function js(e){e===`meta`?Ds.clear():(Array.isArray(e)?e:[e]).forEach(e=>{Ds.delete(e.toLowerCase())})}function Ms(e,t,n){(typeof n==`function`&&n(e,t)||n===!0)&&e.preventDefault()}function Ns(e,t,n){return typeof n==`function`?n(e,t):n===!0||n===void 0}var Ps=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`];function Fs(e){return Is(e,Ps)}function Is(e,t=!1){let{target:n,composed:r}=e,i,a;return Ls(n)&&r?(i=e.composedPath()[0]&&e.composedPath()[0].tagName,a=e.composedPath()[0]&&e.composedPath()[0].role):(i=n&&n.tagName,a=n&&n.role),Os(t)?!!(i&&t?.some(e=>e.toLowerCase()===i.toLowerCase()||e===a)):!!(i&&t&&t)}function Ls(e){return!!e.tagName&&!e.tagName.startsWith(`-`)&&e.tagName.includes(`-`)}function Rs(e,t){return e.length===0&&t?!1:!t||e.some(e=>t.includes(e))||e.includes(`*`)}var zs=(e,t,n=!1)=>{let{alt:r,meta:i,mod:a,shift:o,ctrl:s,keys:c,useKey:l}=t,{code:u,key:d,ctrlKey:f,metaKey:p,shiftKey:m,altKey:h}=e,g=Cs(u),_=typeof e.getModifierState==`function`&&e.getModifierState(`AltGraph`);if(!l&&!c?.includes(g)&&![`ctrl`,`control`,`unknown`,`meta`,`alt`,`shift`,`os`].includes(g))return!1;if(!n){if(r!==h&&g!==`alt`||o!==m&&g!==`shift`)return!1;if(a){if(xs()?!p:!f)return!1}else if(i!==p&&g!==`meta`&&g!==`os`||s!==f&&g!==`ctrl`&&g!==`control`)return!1;if(_&&!r&&!s&&!a&&![`alt`,`ctrl`,`control`].includes(g))return!1}return l&&c?.length===1&&c.includes(d.toLowerCase())||c&&c.length===1&&c.includes(g)?!0:c&&c.length>0?c.includes(g)?ks(c):!1:!c||c.length===0},Bs=(0,U.createContext)(void 0),Vs=()=>(0,U.useContext)(Bs);function Hs(e,t){return e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&Hs(e[r],t[r]),!0):e===t}var Us=(0,U.createContext)({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Ws=()=>(0,U.useContext)(Us);function Gs(e){let t=(0,U.useRef)(void 0);return Hs(t.current,e)||(t.current=e),t.current}var Ks=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},qs=typeof window<`u`?U.useLayoutEffect:U.useEffect;function Js(e){if(!e)return;let{enabled:t,preventDefault:n,ignoreEventWhen:r,...i}=e;return typeof t==`function`?i:{...i,enabled:t}}function Ys(e,t,n,r){let[i,a]=(0,U.useState)(null),o=(0,U.useCallback)(e=>(a(e),()=>a(null)),[]),s=(0,U.useRef)(!1),c=Array.isArray(n)?Array.isArray(r)?void 0:r:n,l=Os(e)?e.join(c?.delimiter):e,u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,d=(0,U.useCallback)(t,u??[]),f=(0,U.useRef)(d);f.current=u?d:t;let p=Gs(Js(c)),m=(0,U.useRef)(c?.enabled);m.current=c?.enabled;let h=(0,U.useRef)(c?.preventDefault);h.current=c?.preventDefault;let g=(0,U.useRef)(c?.ignoreEventWhen);g.current=c?.ignoreEventWhen;let{activeScopes:_}=Ws(),v=Vs();return qs(()=>{if(m.current===!1||!Rs(_,p?.scopes))return;let e=[],t,n=(n,r=!1)=>{if(!Fs(n)||Is(n,p?.enableOnFormTags)){if(i!==null){let e=i.getRootNode();if((e instanceof Document||e instanceof ShadowRoot)&&e.activeElement!==i&&!i.contains(e.activeElement)){Ks(n);return}}n.target?.isContentEditable&&!p?.enableOnContentEditable||Ts(l,p?.delimiter).forEach(i=>{if(i.includes(p?.splitKey??`+`)&&i.includes(p?.sequenceSplitKey??`>`)){console.warn(`Hotkey ${i} contains both ${p?.splitKey??`+`} and ${p?.sequenceSplitKey??`>`} which is not supported.`);return}let a=Es(i,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata);if(a.isSequence){t=setTimeout(()=>{e=[]},p?.sequenceTimeoutMs??1e3);let r=a.useKey?n.key:Cs(n.code);if(ws(r.toLowerCase()))return;if(e.push(r),r!==a.keys?.[e.length-1]){e=[],t&&clearTimeout(t);return}e.length===a.keys?.length&&(f.current(n,a),t&&clearTimeout(t),e=[])}else if(zs(n,a,p?.ignoreModifiers)||a.keys?.includes(`*`)){if(g.current?.(n)||r&&s.current||(Ms(n,a,h.current),!Ns(n,a,m.current)))return;f.current(n,a),r||(s.current=!0)}})}},r=e=>{e.code!==void 0&&(As(Cs(e.code)),(p?.keydown===void 0&&p?.keyup!==!0||p?.keydown)&&n(e))},a=e=>{e.code!==void 0&&(js(Cs(e.code)),s.current=!1,p?.keyup&&n(e,!0))},o=i||c?.document||document;return o.addEventListener(`keyup`,a,c?.eventListenerOptions),o.addEventListener(`keydown`,r,c?.eventListenerOptions),v&&Ts(l,p?.delimiter).forEach(e=>{v.addHotkey(Es(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),()=>{o.removeEventListener(`keyup`,a,c?.eventListenerOptions),o.removeEventListener(`keydown`,r,c?.eventListenerOptions),v&&Ts(l,p?.delimiter).forEach(e=>{v.removeHotkey(Es(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),e=[],t&&clearTimeout(t)}},[i,p,_,l]),o}function Xs(e,t){return O(n=>bt(n,e,t)?.name??``)}async function Zs(e,t){return await r(e,`projects.add`,{path:t})}async function Qs(e,t,n){await r(e,`projects.update`,{id:t,patch:n})}async function $s(e,t){await r(e,`projects.remove`,{id:t})}async function ec(e,t){await r(e,`projects.reorder`,{ids:t})}var tc=[`text-gray-600 dark:text-gray-400`,`text-red-600 dark:text-red-400`,`text-orange-600 dark:text-orange-400`,`text-amber-600 dark:text-amber-400`,`text-yellow-600 dark:text-yellow-400`,`text-lime-600 dark:text-lime-400`,`text-green-600 dark:text-green-400`,`text-emerald-600 dark:text-emerald-400`,`text-teal-600 dark:text-teal-400`,`text-cyan-600 dark:text-cyan-400`,`text-sky-600 dark:text-sky-400`,`text-blue-600 dark:text-blue-400`,`text-indigo-600 dark:text-indigo-400`,`text-violet-600 dark:text-violet-400`,`text-purple-600 dark:text-purple-400`,`text-fuchsia-600 dark:text-fuchsia-400`,`text-pink-600 dark:text-pink-400`,`text-rose-600 dark:text-rose-400`];function nc(e){let t=O(t=>bt(t,e.machine,e.projectId));return(0,W.jsx)(rc,{name:t?.name??``,logo:t?.logo??null,className:e.className})}function rc(e){let t=e.name.normalize(`NFKC`).trim(),n=t.match(/[\p{L}\p{N}]+/gu)??[],r=Array.from(n[0]??`P`),i=r.slice(1).find(e=>/\p{N}/u.test(e))??(n.length>1?Array.from(n.at(-1)??``)[0]:r.at(-1))??r[0],a=Array.from(`${r[0]}${i}`.toUpperCase()).slice(0,2).join(``),o=0;for(let e of t.toLowerCase())o=(o*31+(e.codePointAt(0)??0))%tc.length;return(0,W.jsx)(`span`,{"aria-hidden":`true`,className:B(`inline-flex size-4 shrink-0 items-center justify-center`,e.className),children:e.logo===null?(0,W.jsx)(`svg`,{viewBox:`0 0 16 16`,className:B(`size-full overflow-hidden rounded-[25%] font-mono select-none`,tc[o]),style:{backgroundColor:`color-mix(in srgb, currentColor 14%, transparent)`},children:(0,W.jsx)(`text`,{x:`8`,y:`10.8`,textAnchor:`middle`,fill:`currentColor`,fontSize:`8.25`,fontWeight:`700`,textLength:a.length===1?6:12,lengthAdjust:`spacingAndGlyphs`,children:a})}):(0,W.jsx)(`img`,{src:e.logo,alt:``,className:`size-full rounded-[25%] object-cover`})})}function ic(e){switch(e.provider){case`claude`:return(0,W.jsx)(oc,{className:e.className});case`codex`:return(0,W.jsx)(V,{icon:fo,className:e.className});case`opencode`:return(0,W.jsx)(ac,{className:e.className})}}function ac(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 240 300`,"aria-hidden":`true`,className:B(`fill-current`,e.className),children:[(0,W.jsx)(`path`,{d:`M180 240H60V120H180V240Z`,opacity:`0.4`}),(0,W.jsx)(`path`,{d:`M180 60H60V240H180V60ZM240 300H0V0H240V300Z`})]})}function oc(e){return(0,W.jsx)(`svg`,{viewBox:`0 0 256 257`,preserveAspectRatio:`xMidYMid`,"aria-hidden":`true`,className:B(`fill-[#d97757]`,e.className),children:(0,W.jsx)(`path`,{d:`m50.228 170.321 50.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0 125.796l.583-3.759 5.12-3.434 7.324.648 16.202 1.101 24.304 1.685 17.629 1.037 26.118 2.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758 7-7.713 9.397.649 2.398.648 9.527 7.323 20.35 15.75L94.817 91.9l3.889 3.24 1.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42 0 82.05 1.426l4.472 3.888 6.61 15.101 10.694 23.786 16.591 32.34 4.861 9.592 2.592 8.879.973 2.722h1.685v-1.556l1.36-18.211 2.528-22.36 2.463-28.776.843-8.1 4.018-9.722 7.971-5.25 6.222 2.981 5.12 7.324-.713 4.73-3.046 19.768-5.962 30.98-3.889 20.739h2.268l2.593-2.593 10.499-13.934 17.628-22.036 7.778-8.749 9.073-9.657 5.833-4.601h11.018l8.1 12.055-3.628 12.443-11.342 14.388-9.398 12.184-13.48 18.147-8.426 14.518.778 1.166 2.01-.194 30.46-6.481 16.462-2.982 19.637-3.37 8.88 4.148.971 4.213-3.5 8.62-20.998 5.184-24.628 4.926-36.682 8.685-.454.324.519.648 16.526 1.555 7.065.389h17.304l32.21 2.398 8.426 5.574 5.055 6.805-.843 5.184-12.962 6.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666 11.406 21.387 19.314 26.767 24.887 1.36 6.157-3.434 4.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73 6.935 25.017 37.59 1.296 11.536-1.814 3.76-6.481 2.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194 77.448-3.37 3.953-7.778 2.981-6.48-4.925-3.436-7.972 3.435-15.749 4.148-20.544 3.37-16.333 3.046-20.285 1.815-6.74-.13-.454-1.49.194-15.295 20.999-23.267 31.433-18.406 19.702-4.407 1.75-7.648-3.954.713-7.064 4.277-6.286 25.47-32.405 15.36-20.092 9.917-11.6-.065-1.686h-.583L44.07 198.125l-12.055 1.555-5.185-4.86.648-7.972 2.463-2.593 20.35-13.999-.064.065Z`})})}var sc=Object.defineProperty,cc=U.forwardRef(((e,t)=>sc(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,W.jsx)(Vt.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),lc=Object.defineProperty,uc=(e,t)=>lc(e,`name`,{value:t,configurable:!0});function dc(e,[t,n]){return Math.min(n,Math.max(t,e))}uc(dc,`clamp`);var fc=Object.defineProperty,pc=(e,t)=>fc(e,`name`,{value:t,configurable:!0}),mc={ItemAligned:`item-aligned`,Popper:`popper`},hc={LTR:`ltr`,RTL:`rtl`},gc=[` `,`Enter`,`ArrowUp`,`ArrowDown`],_c=[` `,`Enter`],vc=`Select`,[yc,bc,xc]=Yt(vc),[Sc,Cc]=Ut(vc,[xc,Er]),wc=Er(),[Tc,Ec]=Sc(vc),[Dc,Oc]=Sc(vc);function kc(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=wc(t),[_,v]=U.useState(null),[y,b]=U.useState(null),[x,S]=U.useState(!1),C=mn(l),[w,T]=zt({prop:r,defaultProp:i??!1,onChange:a,caller:vc}),[E,D]=zt({prop:o,defaultProp:s,onChange:c,caller:vc}),O=U.useRef(null),k=U.useRef(!1),[A,j]=U.useState(null),M=pc(e=>{j({value:e,hasConsumerStoppedPropagation:k.current}),D(e)},`handleUserSelect`),N=U.useRef(E);U.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=pc(()=>D(N.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let ee=!_||!!m||!!_.closest(`form`),[te,ne]=U.useState(new Set),P=Ht(),re=Array.from(te).map(e=>e.props.value).join(`;`),ie=U.useCallback(e=>{ne(t=>new Set(t).add(e))},[]),ae=U.useCallback(e=>{ne(t=>{let n=new Set(t);return n.delete(e),n})},[]),oe={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:P,value:E,onValueChange:D,hasConsumerStoppedPropagationRef:k,userSelection:A,onUserSelect:M,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:te,nativeSelectKey:re,isFormControl:ee};return(0,W.jsx)(kr,{...g,children:(0,W.jsx)(Tc,{scope:t,...oe,children:(0,W.jsx)(yc.Provider,{scope:t,children:(0,W.jsx)(Dc,{scope:t,onNativeOptionAdd:ie,onNativeOptionRemove:ae,children:gl(h)?h(oe):n})})})})}pc(kc,`SelectProvider`);var Ac=pc(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,W.jsx)(kc,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,W.jsxs)(W.Fragment,{children:[n,e?(0,W.jsx)(hl,{__scopeSelect:t}):null]})})},`Select`),jc=`SelectTrigger`,Mc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=wc(n),o=Ec(jc,n),s=o.disabled||r,c=vr(t,o.onTriggerChange),l=bc(n),u=U.useRef(`touch`),[d,f,p]=vl(e=>{let t=l().filter(e=>!e.disabled),n=yl(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=pc(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,W.jsx)(jr,{asChild:!0,...a,children:(0,W.jsx)(Vt.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":_l(o.value)?``:void 0,...i,ref:c,onClick:Bt(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Bt(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:Bt(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),t&&e.key===` `||gc.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),Nc=`SelectValue`,Pc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Ec(Nc,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=vr(t,c.onValueNodeChange);Kt(()=>{l(u)},[l,u]);let f=_l(c.value);return(0,W.jsx)(Vt.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,W.jsx)(U.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Fc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,W.jsx)(Vt.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Ic,Lc]=Sc(`SelectPortal`,{forceMount:void 0}),Rc=pc(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,W.jsx)(Ic,{scope:e.__scopeSelect,forceMount:n,children:(0,W.jsx)(qt,{asChild:!0,...r})})},`SelectPortal`),zc=`SelectContent`,Bc=U.forwardRef(pc(function(e,t){let n=Lc(zc,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Ec(zc,e.__scopeSelect),[o,s]=U.useState();return Kt(()=>{s(new DocumentFragment)},[]),(0,W.jsx)(Jt,{present:r||a.open,children:({present:e})=>e?(0,W.jsx)(Kc,{...i,ref:t}):(0,W.jsx)(Vc,{...i,fragment:o})})},`SelectContent`)),Vc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Oi.createPortal((0,W.jsx)(Uc,{scope:n,children:(0,W.jsx)(yc.Slot,{scope:n,children:(0,W.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Hc=10,[Uc,Wc]=Sc(zc),Gc=yr(`SelectContent.RemoveScroll`),Kc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n}=e,{position:r=mc.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=Ec(zc,n),[y,b]=U.useState(null),[x,S]=U.useState(null),C=vr(t,b),[w,T]=U.useState(null),[E,D]=U.useState(null),O=bc(n),[k,A]=U.useState(!1),j=U.useRef(!1),M=U.useRef(!1),N=U.useRef(!1);U.useEffect(()=>{if(y)return Fr(y)},[y]),qr();let ee=U.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),te=U.useCallback(()=>ee([w,y]),[ee,w,y]);U.useEffect(()=>{k&&te()},[k,te]);let{onOpenChange:ne,triggerPointerDownPosRef:P}=v;U.useEffect(()=>{if(y){let e={x:0,y:0},t=pc(t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},`handlePointerMove`),n=pc(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ne(!1),document.removeEventListener(`pointermove`,t),P.current=null},`handlePointerUp`);return P.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ne,P]),U.useEffect(()=>{let e=pc(()=>ne(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[re,ie]=vl(e=>{let t=O().filter(e=>!e.disabled),n=yl(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ae=U.useCallback((e,t,n)=>{let r=!M.current;r&&(M.current=!0);let i=!j.current&&!n;v.value!==void 0&&v.value===t||i?(T(e),i&&(j.current=!0)):r&&T(e)},[v.value]),oe=U.useCallback(()=>y?.focus(),[y]),se=U.useCallback((e,t,n)=>{if(!e)return;let r=!N.current;r&&(N.current=!0);let i=!j.current&&!n;(v.value!==void 0&&v.value===t||i||r)&&D(e)},[v.value]),ce=r===mc.Popper?Jc:qc,le=ce===Jc?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,W.jsx)(Uc,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ae,selectedItem:w,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:te,selectedItemText:E,position:r,isPositioned:k,searchRef:re,children:(0,W.jsx)(Pr,{as:Gc,allowPinchZoom:!0,children:(0,W.jsx)(Wt,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Bt(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,W.jsx)(Gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,W.jsx)(ce,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...le,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Bt(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),qc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Ec(zc,n),o=Wc(zc,n),[s,c]=U.useState(null),[l,u]=U.useState(null),d=vr(t,u),f=bc(n),p=U.useRef(!1),m=U.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=U.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==hc.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Hc,d=dc(a,[Hc,Math.max(Hc,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Hc,d=dc(a,[Hc,Math.max(Hc,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Hc*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Hc,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Hc}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Kt(()=>y(),[y]);let[b,x]=U.useState();Kt(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]);let S=U.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]);return(0,W.jsx)(Yc,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,W.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,W.jsx)(Vt.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Jc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Hc,...a}=e,o=wc(n);return(0,W.jsx)(Dr,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[Yc,Xc]=Sc(zc,{}),Zc=`SelectViewport`,Qc=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Wc(Zc,n),o=Xc(Zc,n),s=vr(t,a.onViewportChange),c=U.useRef(0);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,W.jsx)(yc.Slot,{scope:n,children:(0,W.jsx)(Vt.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Bt(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Hc*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[$c,el]=Sc(`SelectGroup`),tl=`SelectItem`,[nl,rl]=Sc(tl),il=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Ec(tl,n),c=Wc(tl,n),l=s.value===r,[u,d]=U.useState(a??``),[f,p]=U.useState(!1),m=Rt(e=>c.itemRefCallback?.(e,r,i)),h=vr(t,m),g=Ht(),_=U.useRef(`touch`);function v(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return pc(v,`handleSelect`),(0,W.jsx)(nl,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:U.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,W.jsx)(yc.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,W.jsx)(Vt.div,{role:`option`,"aria-labelledby":g,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:Bt(o.onFocus,()=>p(!0)),onBlur:Bt(o.onBlur,()=>p(!1)),onClick:Bt(o.onClick,e=>{i||_.current!==`mouse`&&v(e)}),onPointerUp:Bt(o.onPointerUp,e=>{i||_.current===`mouse`&&v(e)}),onPointerDown:Bt(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Bt(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Bt(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Bt(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(_c.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),al=`SelectItemText`,ol=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Ec(al,n),s=Wc(al,n),c=rl(al,n),l=Oc(al,n),[u,d]=U.useState(null),f=Rt(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=vr(t,d,c.onItemTextChange,f),m=u?.textContent,h=U.useMemo(()=>(0,W.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Kt(()=>(g(h),()=>_(h)),[g,_,h]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Vt.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!_l(o.value)?Oi.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),sl=`SelectItemIndicator`,cl=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,...r}=e;return rl(sl,n).isSelected?(0,W.jsx)(Vt.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),ll=`SelectScrollUpButton`,ul=U.forwardRef(pc(function(e,t){let n=Wc(ll,e.__scopeSelect),r=Xc(ll,e.__scopeSelect),[i,a]=U.useState(!1),o=vr(t,r.onScrollButtonChange);return Kt(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};pc(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,W.jsx)(pl,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),dl=`SelectScrollDownButton`,fl=U.forwardRef(pc(function(e,t){let n=Wc(dl,e.__scopeSelect),r=Xc(dl,e.__scopeSelect),[i,a]=U.useState(!1),o=vr(t,r.onScrollButtonChange);return Kt(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};pc(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,W.jsx)(pl,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),pl=U.forwardRef(pc(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Wc(`SelectScrollButton`,n),o=U.useRef(null),s=bc(n),c=U.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return U.useEffect(()=>()=>c(),[c]),Kt(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,W.jsx)(Vt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Bt(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Bt(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Bt(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),ml=`SelectBubbleInput`,hl=U.forwardRef(pc(function({__scopeSelect:e,...t},n){let r=Ec(ml,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=U.useRef(null),h=vr(n,m),g=i??``,_=U.useRef(g),v=U.useRef(d),y=U.useRef(!1),b=Array.from(f).some(e=>(e.props.value??``)===``);return U.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==v.current;v.current=d;let i=_.current!==g;_.current=g;let a=r&&i;if(r&&!i&&d.value!==g&&!d.hasConsumerStoppedPropagation&&n){y.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{y.current=!1,n.call(e,g)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,g),e.dispatchEvent(t)}},[g,d]),(0,W.jsxs)(Vt.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{y.current||a(e.target.value)},...t,style:{...Mr,...t.style},ref:h,defaultValue:g,children:[_l(i)&&!b?(0,W.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function gl(e){return typeof e==`function`}pc(gl,`isFunction`);function _l(e){return e===``||e===void 0}pc(_l,`shouldShowPlaceholder`);function vl(e){let t=Rt(e),n=U.useRef(``),r=U.useRef(0),i=U.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}pc(a,`updateSearch`),a(i)},[t]),a=U.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return U.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}pc(vl,`useTypeaheadSearch`);function yl(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=bl(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}pc(yl,`findNextItem`);function bl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}pc(bl,`wrapArray`);var xl=Object.defineProperty,Sl=(e,t)=>xl(e,`name`,{value:t,configurable:!0}),Cl={Vertical:`vertical`,Horizontal:`horizontal`},wl={LTR:`ltr`,RTL:`rtl`},Tl=[`PageUp`,`PageDown`],El=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Dl={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},Ol=`Slider`,[kl,Al,jl]=Yt(Ol),[Ml,Nl]=Ut(Ol,[jl]),[Pl,Fl]=Ml(Ol),Il=U.forwardRef(Sl(function(e,t){let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=Cl.Horizontal,disabled:s=!1,minStepsBetweenThumbs:c=0,preserveThumbOrder:l=!1,defaultValue:u=[r],value:d,onValueChange:f=Sl(()=>{},`onValueChange`),onValueCommit:p=Sl(()=>{},`onValueCommit`),inverted:m=!1,form:h,...g}=e,_=U.useRef(new Set),v=U.useRef(0),y=U.useRef(!1),[b,x]=U.useState(null),S=o===Cl.Horizontal?zl:Bl,[C,w]=U.useState(null),T=vr(t,w),[E=[],D]=zt({prop:d,defaultProp:u,onChange:Sl(e=>{[..._.current][v.current]?.focus({preventScroll:!0,focusVisible:y.current}),y.current=!1,f(e)},`onChange`)}),O=U.useRef(E),k=U.useRef(E);U.useEffect(()=>{let e=h?C?.ownerDocument.getElementById(h):C?.closest(`form`);if(e instanceof HTMLFormElement){let t=Sl(()=>D(k.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[C,h,D]);function A(e){N(e,iu(E,e))}Sl(A,`handleSlideStart`);function j(e){N(e,v.current)}Sl(j,`handleSlideMove`);function M(){String(E)!==String(O.current)&&p(E)}Sl(M,`handleSlideEnd`);function N(e,t,{commit:n}={commit:!1}){let o=lu(a),s=dc(uu(Math.round((e-r)/a)*a+r,o),[r,i]),u=c*a;function d(e){let n=l?dc(s,[e[t-1]===void 0?r:e[t-1]+u,e[t+1]===void 0?i:e[t+1]-u]):s,a=tu(e,n,t);return su(a,u)?{nextValues:a,changedIndex:l?t:a.indexOf(n),hasChanged:String(a)!==String(e)}:null}Sl(d,`getNextValues`);let f=d(E);f?.hasChanged&&x(f.nextValues),D((e=[])=>{let t=d(e);return t?(v.current=t.changedIndex,t.hasChanged&&n&&p(t.nextValues),t.hasChanged?t.nextValues:e):e})}return Sl(N,`updateValues`),(0,W.jsx)(Pl,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:v,thumbs:_.current,values:E,orientation:o,form:h,userRequestedValues:b,children:(0,W.jsx)(kl.Provider,{scope:e.__scopeSlider,children:(0,W.jsx)(kl.Slot,{scope:e.__scopeSlider,children:(0,W.jsx)(S,{"aria-disabled":s,"data-disabled":s?``:void 0,...g,ref:T,onPointerDown:Bt(g.onPointerDown,()=>{s||(O.current=E,y.current=!1)}),min:r,max:i,inverted:m,onSlideStart:s?void 0:A,onSlideMove:s?void 0:j,onSlideEnd:s?void 0:M,onHomeKeyDown:()=>{s||(y.current=!0,N(r,0,{commit:!0}))},onEndKeyDown:()=>{s||(y.current=!0,N(i,E.length-1,{commit:!0}))},onStepKeyDown:({event:e,direction:t})=>{if(!s){y.current=!0;let n=Tl.includes(e.key)||e.shiftKey&&El.includes(e.key)?10:1,i=v.current,o=E[i];N(du(o,{min:r,step:a,direction:t,multiplier:n}),i,{commit:!0})}}})})})})},`Slider`)),[Ll,Rl]=Ml(Ol,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),zl=U.forwardRef(Sl(function(e,t){let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=U.useState(null),p=vr(t,f),m=U.useRef(void 0),h=mn(i),g=h===wl.LTR,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=cu([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return Sl(v,`getValueFromPointer`),(0,W.jsx)(Ll,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,W.jsx)(Vl,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=Dl[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})},`SliderHorizontal`)),Bl=U.forwardRef(Sl(function(e,t){let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=U.useRef(null),d=vr(t,u),f=U.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=cu([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return Sl(m,`getValueFromPointer`),(0,W.jsx)(Ll,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,W.jsx)(Vl,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=Dl[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})},`SliderVertical`)),Vl=U.forwardRef(Sl(function(e,t){let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=Fl(Ol,n);return(0,W.jsx)(Vt.span,{...l,ref:t,onKeyDown:Bt(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):Tl.concat(El).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:Bt(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus({preventScroll:!0,focusVisible:!1}):r(e)}),onPointerMove:Bt(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Bt(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})},`SliderImpl`)),Hl=`SliderTrack`,Ul=U.forwardRef(Sl(function(e,t){let{__scopeSlider:n,...r}=e,i=Fl(Hl,n);return(0,W.jsx)(Vt.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})},`SliderTrack`)),Wl=`SliderRange`,Gl=U.forwardRef(Sl(function(e,t){let{__scopeSlider:n,...r}=e,i=Fl(Wl,n),a=Rl(Wl,n),o=U.useRef(null),s=vr(t,o),c=i.values.length,l=i.values.map(e=>nu(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,W.jsx)(Vt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})},`SliderRange`)),[Kl,ql]=Ml(`SliderThumb`),Jl=`SliderThumbProvider`;function Yl(e){let{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:i}=e,a=Fl(Jl,t),o=Al(t),[s,c]=U.useState(null),l=U.useMemo(()=>s?o().findIndex(e=>e.ref.current===s):-1,[o,s]),u=Ar(s),d=!s||!!a.form||!!s.closest(`form`),f=a.values[l],p=n??(a.name?a.name+(a.values.length>1?`[]`:``):void 0),m=f===void 0?0:nu(f,a.min,a.max);U.useEffect(()=>{if(s)return a.thumbs.add(s),()=>{a.thumbs.delete(s)}},[s,a.thumbs]);let h={value:f,name:p,form:a.form,isFormControl:d,index:l,thumb:s,onThumbChange:c,percent:m,size:u};return(0,W.jsx)(Kl,{scope:t,...h,children:fu(i)?i(h):r})}Sl(Yl,`SliderThumbProvider`);var Xl=`SliderThumbTrigger`,Zl=U.forwardRef(Sl(function(e,t){let{__scopeSlider:n,...r}=e,i=Fl(Xl,n),a=Rl(Xl,n),{index:o,value:s,percent:c,size:l,onThumbChange:u}=ql(Xl,n),d=vr(t,u),f=ru(o,i.values.length),p=l?.[a.size],m=p?au(p,c,a.direction):0;return(0,W.jsx)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[a.startEdge]:`calc(${c}% + ${m}px)`},children:(0,W.jsx)(kl.ItemSlot,{scope:n,children:(0,W.jsx)(Vt.span,{role:`slider`,"aria-label":e[`aria-label`]||f,"aria-valuemin":i.min,"aria-valuenow":s,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,tabIndex:i.disabled?void 0:0,...r,ref:d,style:s===void 0?{display:`none`}:e.style,onFocus:Bt(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})})})},`SliderThumbTrigger`)),Ql=U.forwardRef(Sl(function(e,t){let{__scopeSlider:n,name:r,...i}=e;return(0,W.jsx)(Yl,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:e,isFormControl:r})=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Zl,{...i,ref:t,__scopeSlider:n}),r?(0,W.jsx)(eu,{__scopeSlider:n},e):null]})})},`SliderThumb`)),$l=`SliderBubbleInput`,eu=U.forwardRef(Sl(function({__scopeSlider:e,onInput:t,...n},r){let{index:i,value:a,name:o,form:s}=ql($l,e),{userRequestedValues:c}=Fl($l,e),l=U.useRef(null),u=vr(l,r),d=U.useRef(!1),f=U.useRef(a),p=U.useRef(c),m=U.useRef(c);return U.useEffect(()=>{let e=l.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=f.current,o=r!==a;f.current=a;let s=c!==m.current;if(m.current=c,o&&n){let t=c!==p.current;p.current=c;let o=c?.[i];d.current=!(t&&(s&&o!==r||o===a));let l=new Event(`input`,{bubbles:!0});n.call(e,a),e.dispatchEvent(l),d.current=!1}},[i,a,c]),(0,W.jsx)(Vt.input,{style:{display:`none`},name:o,form:s,...n,ref:u,defaultValue:a,onInput:Bt(t,e=>{d.current&&e.stopPropagation()})})},`SliderBubbleInput`));function tu(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}Sl(tu,`getNextSortedValues`);function nu(e,t,n){return dc(100/(n-t)*(e-t),[0,100])}Sl(nu,`convertValueToPercentage`);function ru(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}Sl(ru,`getLabel`);function iu(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}Sl(iu,`getClosestValueIndex`);function au(e,t,n){let r=e/2;return(r-cu([0,50],[0,r])(t)*n)*n}Sl(au,`getThumbInBoundsOffset`);function ou(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}Sl(ou,`getStepsBetweenValues`);function su(e,t){if(t>0){let n=ou(e);return Math.min(...n)>=t}return!0}Sl(su,`hasMinStepsBetweenValues`);function cu(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}Sl(cu,`linearScale`);function lu(e){if(!Number.isFinite(e))return 0;let t=e.toString();if(t.includes(`e`)){let[e,n]=t.split(`e`),r=e.split(`.`)[1]||``,i=Number(n);return Math.max(0,r.length-i)}let n=t.split(`.`)[1];return n?n.length:0}Sl(lu,`getDecimalCount`);function uu(e,t){let n=10**t;return Math.round(e*n)/n}Sl(uu,`roundValue`);function du(e,{min:t,step:n,direction:r,multiplier:i}){let a=lu(n),o=(e-t)/n,s=Math.round(o),c=uu(s*n+t,a)===uu(e,a),l;return l=c?s+i*r:r>0?Math.ceil(o):Math.floor(o),uu(l*n+t,a)}Sl(du,`getNextStepValue`);function fu(e){return typeof e==`function`}Sl(fu,`isFunction`);var pu=Object.defineProperty,mu=(e,t)=>pu(e,`name`,{value:t,configurable:!0}),hu=`Switch`,[gu,_u]=Ut(hu),[vu,yu]=gu(hu);function bu(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=zt({prop:n,defaultProp:i??!1,onChange:c,caller:hu}),[m,h]=U.useState(null),[g,_]=U.useState(null),[v,y]=U.useState(null),b={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,userClick:v,onUserClick:y,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,W.jsx)(vu,{scope:t,...b,children:Ou(d)?d(b):r})}mu(bu,`SwitchProvider`);var xu=`SwitchTrigger`,Su=U.forwardRef(mu(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=yu(xu,e),h=vr(r,u),g=U.useRef(c);return U.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=mu(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,W.jsx)(Vt.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":ku(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:Bt(t,e=>{let t=e.isPropagationStopped();f({requestedChecked:!c,hasConsumerStoppedPropagation:t}),d(e=>!e),m&&p&&(t||e.stopPropagation())})})},`SwitchTrigger`)),Cu=U.forwardRef(mu(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,W.jsx)(bu,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Su,{...d,ref:t,__scopeSwitch:n}),e&&(0,W.jsx)(Du,{__scopeSwitch:n})]})})},`Switch`)),wu=`SwitchThumb`,Tu=U.forwardRef(mu(function(e,t){let{__scopeSwitch:n,...r}=e,i=yu(wu,n);return(0,W.jsx)(Vt.span,{"data-state":ku(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),Eu=`SwitchBubbleInput`,Du=U.forwardRef(mu(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=yu(Eu,e),h=vr(r,m),g=Ar(i),_=U.useRef(!1),v=U.useRef(o),y=U.useRef(a),b=U.useRef(null);U.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=v.current!==o;v.current=o;let i=a!==null&&a!==y.current;if(y.current=a,i)b.current=r?null:a,r&&n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=b.current;b.current=null;let r=t?.requestedChecked===o;_.current=!0,n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let x=U.useRef(o);return(0,W.jsx)(Vt.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??x.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:Bt(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function Ou(e){return typeof e==`function`}mu(Ou,`isFunction`);function ku(e){return e?`checked`:`unchecked`}mu(ku,`getState`);function Au(e){return(0,W.jsx)(aa,{theme:`dark`,expand:!0,gap:8,offset:16,mobileOffset:{top:`calc(env(safe-area-inset-top) + 0.5rem)`,left:16,right:16},duration:3e3,toastOptions:{unstyled:!0,classNames:{toast:`bg-popover text-popover-foreground w-(--width) rounded-md border px-3 py-2 font-sans text-sm shadow-md`}},...e})}var ju={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Mu=U.createContext&&U.createContext(ju),Nu=[`attr`,`size`,`title`];function Pu(e,t){if(e==null)return{};var n,r,i=Fu(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fu(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Iu(){return Iu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iu.apply(null,arguments)}function Lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ru(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lu(Object(n),!0).forEach(function(t){zu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zu(e,t,n){return(t=Bu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bu(e){var t=Vu(e,`string`);return typeof t==`symbol`?t:t+``}function Vu(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Hu(e){return e&&e.map((e,t)=>U.createElement(e.tag,Ru({key:t},e.attr),Hu(e.child)))}function q(e){return t=>U.createElement(Uu,Iu({attr:Ru({},e.attr)},t),Hu(e.child))}function Uu(e){var t=t=>{var n=e.attr,r=e.size,i=e.title,a=Pu(e,Nu),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),U.createElement(`svg`,Iu({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:Ru(Ru({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&U.createElement(`title`,null,i),e.children)};return Mu===void 0?t(ju):U.createElement(Mu.Consumer,null,e=>t(e))}function Wu(e){return q({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{d:`m.334 0 4.358 4.359h7.15v7.15l4.358 4.358V0zM.2 9.72l4.487-4.488v6.281h6.28L6.48 16H.2z`},child:[]}]})(e)}function Gu(e){return q({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z`},child:[]}]})(e)}function Ku(e){return q({tag:`svg`,attr:{viewBox:`0 0 496 512`},child:[{tag:`path`,attr:{d:`M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm52.7 93c8.8-15.2 28.3-20.5 43.5-11.7 15.3 8.8 20.5 28.3 11.7 43.6-8.8 15.2-28.3 20.5-43.5 11.7-15.3-8.9-20.5-28.4-11.7-43.6zM87.4 287.9c-17.6 0-31.9-14.3-31.9-31.9 0-17.6 14.3-31.9 31.9-31.9 17.6 0 31.9 14.3 31.9 31.9 0 17.6-14.3 31.9-31.9 31.9zm28.1 3.1c22.3-17.9 22.4-51.9 0-69.9 8.6-32.8 29.1-60.7 56.5-79.1l23.7 39.6c-51.5 36.3-51.5 112.5 0 148.8L172 370c-27.4-18.3-47.8-46.3-56.5-79zm228.7 131.7c-15.3 8.8-34.7 3.6-43.5-11.7-8.8-15.3-3.6-34.8 11.7-43.6 15.2-8.8 34.7-3.6 43.5 11.7 8.8 15.3 3.6 34.8-11.7 43.6zm.3-69.5c-26.7-10.3-56.1 6.6-60.5 35-5.2 1.4-48.9 14.3-96.7-9.4l22.5-40.3c57 26.5 123.4-11.7 128.9-74.4l46.1.7c-2.3 34.5-17.3 65.5-40.3 88.4zm-5.9-105.3c-5.4-62-71.3-101.2-128.9-74.4l-22.5-40.3c47.9-23.7 91.5-10.8 96.7-9.4 4.4 28.3 33.8 45.3 60.5 35 23.1 22.9 38 53.9 40.2 88.5l-46 .6z`},child:[]}]})(e)}function qu(e){return q({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z`},child:[]}]})(e)}function Ju(e){return q({tag:`svg`,attr:{viewBox:`0 0 496 512`},child:[{tag:`path`,attr:{d:`M131.5 217.5L55.1 100.1c47.6-59.2 119-91.8 192-92.1 42.3-.3 85.5 10.5 124.8 33.2 43.4 25.2 76.4 61.4 97.4 103L264 133.4c-58.1-3.4-113.4 29.3-132.5 84.1zm32.9 38.5c0 46.2 37.4 83.6 83.6 83.6s83.6-37.4 83.6-83.6-37.4-83.6-83.6-83.6-83.6 37.3-83.6 83.6zm314.9-89.2L339.6 174c37.9 44.3 38.5 108.2 6.6 157.2L234.1 503.6c46.5 2.5 94.4-7.7 137.8-32.9 107.4-62 150.9-192 107.4-303.9zM133.7 303.6L40.4 120.1C14.9 159.1 0 205.9 0 256c0 124 90.8 226.7 209.5 244.9l63.7-124.8c-57.6 10.8-113.2-20.8-139.5-72.5z`},child:[]}]})(e)}function Yu(e){return q({tag:`svg`,attr:{viewBox:`0 0 384 512`},child:[{tag:`path`,attr:{d:`M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z`},child:[]}]})(e)}function Xu(e){return q({tag:`svg`,attr:{viewBox:`0 0 576 512`},child:[{tag:`path`,attr:{d:`M327.1 96c-89.97 0-168.54 54.77-212.27 101.63L27.5 131.58c-12.13-9.18-30.24.6-27.14 14.66L24.54 256 .35 365.77c-3.1 14.06 15.01 23.83 27.14 14.66l87.33-66.05C158.55 361.23 237.13 416 327.1 416 464.56 416 576 288 576 256S464.56 96 327.1 96zm87.43 184c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24 13.26 0 24 10.74 24 24 0 13.25-10.75 24-24 24z`},child:[]}]})(e)}function Zu(e){return q({tag:`svg`,attr:{viewBox:`0 0 576 512`},child:[{tag:`path`,attr:{d:`M469.2 75A75.6 75.6 0 1 0 317.9 75a75.6 75.6 0 1 0 151.2 0zM154.2 240.7A75.6 75.6 0 1 0 3 240.7a75.6 75.6 0 1 0 151.2 0zM57 346C75.6 392.9 108 433 150 461.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2c-6.8-.9-13.3-2.1-19.5-3.4c-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0 -151.2 0 75.6 75.6 0 1 0 151.2 0zM444 351.6c18.5 14.8 31.6 35.2 37.2 58.2c33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6c15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3c16.6-24.2 38.9-44.1 64.8-58S255.8 70.4 285.2 70c.2-5.9 .9-11.9 2-17.7c3.6-16.7 11.1-32.3 21.8-45.5c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3c7.5 0 15 .8 22.4 2.3z`},child:[]}]})(e)}function Qu(e){return q({tag:`svg`,attr:{viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M15.7928421,15.3333704 C15.9768442,15.3333704 16.1755131,15.1915021 16.2349804,15.0183002 L18.4310048,8.64836276 C18.4908721,8.47529417 18.3902043,8.33315926 18.2063356,8.33315926 L17.2052578,8.33315926 C17.0219225,8.33315926 16.8228536,8.47529417 16.7629863,8.64836276 L14.5570951,15.0183002 C14.4973611,15.1915021 14.5981622,15.3333704 14.7821642,15.3333704 L15.7928421,15.3333704 Z M24.0002667,12 C24.0002667,18.627007 18.6267403,24 12,24 C11.8170646,24 11.6393293,23.9803998 11.4581273,23.9727997 L13.8777542,16.981922 C13.9382882,16.8085868 14.1365571,16.6668519 14.3205591,16.6668519 L16.0003111,16.6668519 C18.6083401,16.6668519 18.632207,15.8021756 18.9066101,15.0079001 C19.5488839,13.1445461 20.6560962,9.93424371 20.8714319,9.30583673 C21.1779686,8.40956011 21.2793031,7.00007778 19.0002111,7.00007778 L15.0000333,7.00007778 C14.816698,7.00007778 14.6177624,7.14194602 14.5570951,7.31528128 L8.92489917,23.5871954 C3.79030878,22.2271803 0,17.5617951 0,12 C0,6.69394104 3.44790498,2.20055778 8.22275803,0.615473505 L2.77589751,16.3513817 C2.71523017,16.5248503 2.81643129,16.6668519 3.00003333,16.6668519 L4.99965555,16.6668519 C5.1836576,16.6668519 5.38232647,16.5248503 5.44272714,16.3513817 L8.1092901,8.64836276 C8.16915744,8.47529417 8.36755964,8.33315926 8.55102834,8.33315926 L9.539706,8.33315926 C9.72330804,8.33315926 9.82410916,8.47529417 9.76424182,8.64836276 L7.10847898,16.3513817 C7.04914499,16.5248503 7.14994611,16.6668519 7.33328148,16.6668519 L9.33357037,16.6668519 C9.51690574,16.6668519 9.71570795,16.5248503 9.77544195,16.3513817 C9.77544195,16.3513817 11.6389293,10.9485217 12.2016022,9.3149035 C12.7649418,7.68155202 12.3125368,7.00007778 10.3462483,7.00007778 L9.01290014,7.00007778 C8.82956477,7.00007778 8.72889699,6.8580762 8.78916432,6.68514095 L11.0862565,0.0464005156 C11.3887932,0.0234669274 11.6913299,0 12,0 C18.6267403,0 24.0002667,5.37299303 24.0002667,12 L24.0002667,12 Z`},child:[]}]})(e)}function $u(e){return q({tag:`svg`,attr:{viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M3,17 C2.44771525,17 2,16.5522847 2,16 C2,15.4477153 2.44771525,15 3,15 L13.5,15 C14.5,15 15.5,17 15,17 L3,17 Z M17,17 C16.4477153,17 16,16.5522847 16,16 C16,15.4477153 16.4477153,15 17,15 L21,15 C21.5522847,15 22,15.4477153 22,16 C22,16.5522847 21.5522847,17 21,17 L17,17 Z M12.6333775,3.50103556 C12.908948,3.02241319 13.5203421,2.85780709 13.9989644,3.13337754 C14.4775868,3.408948 14.6421929,4.02034208 14.3666225,4.49896444 L7.45953351,16.4954873 C7.18396306,16.9741097 6.57256898,17.1387158 6.09394661,16.8631454 C5.61532424,16.5875749 5.45071815,15.9761808 5.7262886,15.4975585 L12.6333775,3.50103556 Z M4,18.5 C4.5,17.5 7.5,16.5 6.5,18.2208385 C6.32221095,18.5267848 5.77775177,19.4528267 4.86662246,20.9989644 C4.591052,21.4775868 3.97965792,21.6421929 3.50103556,21.3666225 C3.02241319,21.091052 2.85780709,20.4796579 3.13337754,20.0010356 L4,18.5 Z M9.13337754,4.49896444 C8.85780709,4.02034208 9.02241319,3.408948 9.50103556,3.13337754 C9.97965792,2.85780709 10.591052,3.02241319 10.8666225,3.50103556 L12.6104584,6.52980328 C12.8860289,7.00842564 12.7214228,7.61981972 12.2428004,7.89539018 C11.764178,8.17096063 11.152784,8.00635453 10.8772135,7.52773217 L9.13337754,4.49896444 Z M13,11.5 C12.1018662,10 13,7 13.7163439,8.49589818 L20.3666225,20.0010356 C20.6421929,20.4796579 20.4775868,21.091052 19.9989644,21.3666225 C19.5203421,21.6421929 18.908948,21.4775868 18.6333775,20.9989644 L13,11.5 Z`},child:[]}]})(e)}function J(e){return q({tag:`svg`,attr:{version:`1.1`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{d:`M8.894 12.16c-0-0.001-0-0.001-0-0.002 0 0.001 0 0.001 0 0.002z`},child:[]},{tag:`path`,attr:{d:`M8.916 12.727c-0-0.004-0-0.007-0.001-0.011 0 0.004 0 0.007 0.001 0.011z`},child:[]},{tag:`path`,attr:{d:`M8.903 12.442c-0-0.003-0-0.006-0-0.008 0 0.003 0 0.006 0 0.008z`},child:[]},{tag:`path`,attr:{d:`M15 0h-14c-0.55 0-1 0.45-1 1v14c0 0.55 0.45 1 1 1h7.716c0.001 0 0.001 0 0.002 0s0.001-0 0.002-0h6.28c0.55 0 1-0.45 1-1v-14c0-0.55-0.45-1-1-1zM3 3.5c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v1c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-1zM15 15h-5.86c-0.105-0.658-0.17-1.336-0.209-1.994 0 0.002 0 0.004 0 0.005-0.308 0.034-0.618 0.051-0.931 0.051-2.088 0-4.1-0.76-5.664-2.141-0.233-0.206-0.255-0.561-0.050-0.794s0.561-0.255 0.794-0.050c1.358 1.199 3.105 1.859 4.919 1.859 0.298 0 0.595-0.018 0.888-0.053-0.034-1.847 0.107-3.311 0.11-3.334 0.014-0.141-0.032-0.28-0.127-0.385s-0.229-0.164-0.371-0.164h-1.487c0.022-0.541 0.079-1.466 0.234-2.503 0.295-1.981 0.812-3.528 1.502-4.497h6.251v14z`},child:[]},{tag:`path`,attr:{d:`M12.5 5c-0.276 0-0.5-0.224-0.5-0.5v-1c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v1c0 0.276-0.224 0.5-0.5 0.5z`},child:[]},{tag:`path`,attr:{d:`M8.445 13.050c-0.057 0.003-0.114 0.005-0.171 0.007 0.057-0.002 0.114-0.004 0.171-0.007z`},child:[]},{tag:`path`,attr:{d:`M8 13.063c0.073 0 0.146-0.001 0.22-0.003-0.073 0.002-0.146 0.003-0.22 0.003z`},child:[]},{tag:`path`,attr:{d:`M8.423 11.925c0.012-0.001 0.024-0.001 0.037-0.002-0.012 0.001-0.024 0.001-0.037 0.002z`},child:[]},{tag:`path`,attr:{d:`M8.204 11.934c0.017-0 0.034-0.001 0.050-0.002-0.017 0.001-0.034 0.001-0.050 0.002z`},child:[]},{tag:`path`,attr:{d:`M13.713 10.128c-0.206-0.233-0.561-0.255-0.794-0.050-1.135 1.002-2.542 1.627-4.032 1.806 0.007 0.364 0.020 0.742 0.043 1.127 1.749-0.191 3.403-0.916 4.733-2.090 0.233-0.206 0.255-0.561 0.050-0.794z`},child:[]},{tag:`path`,attr:{d:`M8.93 13.012c-0.072 0.008-0.144 0.015-0.216 0.021 0.072-0.006 0.144-0.013 0.216-0.021z`},child:[]},{tag:`path`,attr:{d:`M8.68 13.035c-0.061 0.005-0.122 0.009-0.183 0.013 0.061-0.004 0.122-0.008 0.183-0.013z`},child:[]}]})(e)}function ed(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M11.415 5.038a.58.58 0 0 0-.543.197L.135 18.021a.58.58 0 0 0 .071.814.58.58 0 0 0 .815-.07L11.757 5.979a.58.58 0 0 0-.07-.815.6.6 0 0 0-.272-.126m-8.113.317a3.133 3.133 0 0 0-3.12 3.12 3.13 3.13 0 0 0 3.12 3.119A3.133 3.133 0 0 0 6.42 8.475a3.13 3.13 0 0 0-3.119-3.119m0 1.806a1.3 1.3 0 0 1 1.314 1.313 1.3 1.3 0 0 1-1.314 1.312A1.3 1.3 0 0 1 1.99 8.475a1.3 1.3 0 0 1 1.312-1.314m5.253 5.253a3.13 3.13 0 0 0-3.119 3.119 3.13 3.13 0 0 0 3.12 3.118 3.133 3.133 0 0 0 3.118-3.12 3.133 3.133 0 0 0-3.119-3.118m0 1.805a1.3 1.3 0 0 1 1.313 1.314c0 .735-.577 1.312-1.312 1.312a1.3 1.3 0 0 1-1.314-1.312 1.3 1.3 0 0 1 1.313-1.314m7.201 3.276a.58.58 0 0 0-.578.578.58.58 0 0 0 .578.578h7.666a.58.58 0 0 0 .579-.578.58.58 0 0 0-.579-.578Z`},child:[]}]})(e)}function td(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z`},child:[]}]})(e)}function nd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M17.61.455a3.41 3.41 0 0 0-3.41 3.41 3.41 3.41 0 0 0 3.41 3.41 3.41 3.41 0 0 0 3.41-3.41 3.41 3.41 0 0 0-3.41-3.41zM12.92.8C8.923.777 5.137 2.941 3.148 6.451a4.5 4.5 0 0 1 .26-.007 4.92 4.92 0 0 1 2.585.737A8.316 8.316 0 0 1 12.688 3.6 4.944 4.944 0 0 1 13.723.834 11.008 11.008 0 0 0 12.92.8zm9.226 4.994a4.915 4.915 0 0 1-1.918 2.246 8.36 8.36 0 0 1-.273 8.303 4.89 4.89 0 0 1 1.632 2.54 11.156 11.156 0 0 0 .559-13.089zM3.41 7.932A3.41 3.41 0 0 0 0 11.342a3.41 3.41 0 0 0 3.41 3.409 3.41 3.41 0 0 0 3.41-3.41 3.41 3.41 0 0 0-3.41-3.41zm2.027 7.866a4.908 4.908 0 0 1-2.915.358 11.1 11.1 0 0 0 7.991 6.698 11.234 11.234 0 0 0 2.422.249 4.879 4.879 0 0 1-.999-2.85 8.484 8.484 0 0 1-.836-.136 8.304 8.304 0 0 1-5.663-4.32zm11.405.928a3.41 3.41 0 0 0-3.41 3.41 3.41 3.41 0 0 0 3.41 3.41 3.41 3.41 0 0 0 3.41-3.41 3.41 3.41 0 0 0-3.41-3.41z`},child:[]}]})(e)}function rd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M19.8166 10.2808l.0459 2.6934h-.023l-.7793-2.6934h-1.2837v3.3925h.8481l-.0458-2.785h.023l.8366 2.785h1.2264v-3.3925zm-16.149 0l-.6418 3.427h.9284l.4699-3.1175h.0229l.4585 3.1174h.9169l-.6304-3.4269zm5.1805 0l-.424 2.6132h-.023l-.424-2.6132H6.5788l-.0688 3.427h.8596l.023-3.0832h.0114l.573 3.0831h.8711l.5731-3.083h.023l.0228 3.083h.8596l-.0802-3.4269zm-7.2664 2.4527c.0343.0802.0229.1949.0114.2522-.0229.1146-.1031.2292-.3324.2292-.2177 0-.3438-.126-.3438-.3095v-.3323H0v.2636c0 .7679.6074.9971 1.2493.9971.6189 0 1.1346-.2178 1.2149-.7794.0458-.298.0114-.4928 0-.5616-.1605-.722-1.467-.9283-1.5588-1.3295-.0114-.0688-.0114-.1375 0-.1834.023-.1146.1032-.2292.3095-.2292.2063 0 .321.126.321.3095v.2063h.8595v-.2407c0-.745-.6762-.8596-1.1576-.8596-.6074 0-1.1117.2063-1.2034.7564-.023.149-.0344.2866.0114.4585.1376.7106 1.364.9169 1.5358 1.3524m11.152 0c.0343.0803.0228.1834.0114.2522-.023.1146-.1032.2292-.3324.2292-.2178 0-.3438-.126-.3438-.3095v-.3323h-.917v.2636c0 .7564.596.9857 1.2379.9857.6189 0 1.1232-.2063 1.2034-.7794.0459-.298.0115-.4814 0-.5616-.1375-.7106-1.4327-.9284-1.5243-1.318-.0115-.0688-.0115-.1376 0-.1835.0229-.1146.1031-.2292.3094-.2292.1948 0 .321.126.321.3095v.2063h.848v-.2407c0-.745-.6647-.8596-1.146-.8596-.6075 0-1.1004.1948-1.192.7564-.023.149-.023.2866.0114.4585.1376.7106 1.341.9054 1.513 1.3524m2.8882.4585c.2407 0 .3094-.1605.3323-.2522.0115-.0343.0115-.0917.0115-.126v-2.533h.871v2.4642c0 .0688 0 .1948-.0114.2292-.0573.6419-.5616.8482-1.192.8482-.6303 0-1.1346-.2063-1.192-.8482 0-.0344-.0114-.1604-.0114-.2292v-2.4642h.871v2.533c0 .0458 0 .0916.0115.126 0 .0917.0688.2522.3095.2522m7.1518-.0344c.2522 0 .3324-.1605.3553-.2522.0115-.0343.0115-.0917.0115-.126v-.4929h-.3553v-.5043H24v.917c0 .0687 0 .1145-.0115.2292-.0573.6303-.596.8481-1.2034.8481-.6075 0-1.1461-.2178-1.2034-.8481-.0115-.1147-.0115-.1605-.0115-.2293v-1.444c0-.0574.0115-.172.0115-.2293.0802-.6419.596-.8482 1.2034-.8482s1.1347.2063 1.2034.8482c.0115.1031.0115.2292.0115.2292v.1146h-.8596v-.1948s0-.0803-.0115-.1261c-.0114-.0802-.0802-.2521-.3438-.2521-.2521 0-.321.1604-.3438.2521-.0115.0458-.0115.1032-.0115.1605v1.5702c0 .0458 0 .0916.0115.126 0 .0917.0917.2522.3323.2522`},child:[]}]})(e)}function id(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M16.009 13.386c1.577 0 3.86-.326 3.86-2.202a1.765 1.765 0 0 0-.04-.431l-.94-4.08c-.216-.898-.406-1.305-1.982-2.093-1.223-.625-3.888-1.658-4.676-1.658-.733 0-.947.946-1.822.946-.842 0-1.467-.706-2.255-.706-.757 0-1.25.515-1.63 1.576 0 0-1.06 2.99-1.197 3.424a.81.81 0 0 0-.028.245c0 1.162 4.577 4.974 10.71 4.974m4.101-1.435c.218 1.032.218 1.14.218 1.277 0 1.765-1.984 2.745-4.593 2.745-5.895.004-11.06-3.451-11.06-5.734a2.326 2.326 0 0 1 .19-.925C2.746 9.415 0 9.794 0 12.217c0 3.969 9.405 8.861 16.851 8.861 5.71 0 7.149-2.582 7.149-4.62 0-1.605-1.387-3.425-3.887-4.512`},child:[]}]})(e)}function ad(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.4 0a.385.385 0 00-.278.125L22.91.35l-.401.182a.711.711 0 00-.417 0 .305.305 0 01-.171 0 1.005 1.005 0 00-.567 0A.936.936 0 0021 .596a.877.877 0 00-.412.337l-.037.048a1.246 1.246 0 00-.898.684 1.07 1.07 0 00-.07.225 1.935 1.935 0 00-.337-.193 2.026 2.026 0 00-2.063.305 2.08 2.08 0 00-.69 2.139c.086.376.23.737.428 1.069.496.776 1.079 1.494 1.737 2.138.526.512.996 1.078 1.401 1.69l.053.096c.396.754.321 1.31-.219 1.647a1.358 1.358 0 01-.572.198 2.491 2.491 0 00-.144-2.07 2.342 2.342 0 00-.3-.406c-.79-.866-1.63-.674-1.962-.449a.385.385 0 00-.15.455l.027.058a.385.385 0 00.38.188 1.07 1.07 0 01.962.582c.23.384.23.862 0 1.246a4.812 4.812 0 01-.534-.535l-.07-.07-.037-.042a3.368 3.368 0 00-1.92-1.208 3.09 3.09 0 00-.406-1.455 4.368 4.368 0 00-1.358-1.48 2.673 2.673 0 00-.267-.16 3.085 3.085 0 00-2.251-2.717 2.7 2.7 0 00-2.968 1.139c-.053.086-.112.171-.165.267a12.26 12.26 0 00-1.038 2.78 11.64 11.64 0 01-.775 2.187l-.059.107c-.213.374-.406.583-.609.647a.406.406 0 01-.374-.064c-.203-.14-.155-.423 0-.973a3.33 3.33 0 00.128-.45c.07-.33-.005-.673-.203-.946a1.07 1.07 0 00-.786-.411c-.49-.018-.94.27-1.128.722l-.08.15a.968.968 0 00-.316-.46.936.936 0 00-.294-.129 1.016 1.016 0 00-.535-.198.342.342 0 01-.17-.053.711.711 0 00-.434-.097l-.326-.256-.144-.278c-.18-.35-.707-.238-.727.155a.385.385 0 00.032.727l.305.075.342.267c.026.14.093.268.192.37.043.04.072.092.086.149.058.184.167.347.315.47a.877.877 0 00.727.465h.06c.262.313.662.477 1.068.439a1.07 1.07 0 00.23-.054 1.935 1.935 0 000 .38 2.026 2.026 0 001.3 1.636 2.08 2.08 0 002.208-.481c.276-.26.51-.562.695-.893.422-.817.75-1.68.978-2.572.179-.711.433-1.401.76-2.058l.058-.096c.454-.722.973-.936 1.535-.637.18.096.338.231.46.396-.714.12-1.34.543-1.717 1.16-.084.146-.152.3-.203.46-.353 1.117.23 1.748.593 1.925.16.077.353.035.466-.102l.037-.053a.385.385 0 000-.423 1.07 1.07 0 010-1.128c.218-.384.627-.62 1.07-.615-.04.245-.1.486-.177.722l-.034.093a3.533 3.533 0 00-.084 2.324 3.09 3.09 0 00-1.07 1.07 4.368 4.368 0 00-.603 1.913 2.674 2.674 0 000 .31 3.085 3.085 0 00-1.23 3.31 2.7 2.7 0 002.47 2h.31a12.26 12.26 0 002.925-.493 11.64 11.64 0 012.283-.422h.117c.304-.037.61.035.866.203.102.09.152.224.134.358 0 .246-.289.348-.855.466a3.33 3.33 0 00-.45.117 1.192 1.192 0 00-.721.647 1.07 1.07 0 00.037.888c.229.435.704.683 1.193.62h.165a.968.968 0 00-.235.502.936.936 0 000 .364c-.019.183.013.368.091.535.03.054.045.115.043.176-.002.151.045.3.133.422l-.058.412-.166.262a.385.385 0 00.497.535c.287.265.74-.016.63-.39l-.085-.3.064-.433a.711.711 0 00.22-.353.305.305 0 01.085-.15c.131-.141.218-.318.252-.508a.936.936 0 00.122-.336.877.877 0 00-.085-.535v-.053c.134-.376.08-.794-.144-1.123a1.07 1.07 0 00-.16-.171c.115-.05.226-.11.33-.182a2.026 2.026 0 00.77-1.94 2.08 2.08 0 00-1.518-1.674 3.71 3.71 0 00-1.123-.155c-.919.043-1.83.19-2.716.438-.697.198-1.414.322-2.138.369h-.112c-.85-.032-1.294-.374-1.316-1.01-.007-.204.031-.407.113-.594.459.559 1.138.89 1.86.909.17 0 .338-.018.503-.054 1.144-.25 1.4-1.069 1.374-1.475a.385.385 0 00-.321-.353h-.064a.385.385 0 00-.353.235 1.07 1.07 0 01-.984.535 1.214 1.214 0 01-1.069-.631c.233-.088.473-.158.716-.209h.155a3.368 3.368 0 002.01-1.069c.449.243.95.372 1.46.374.679.01 1.35-.138 1.962-.433.094-.044.185-.094.273-.15a3.085 3.085 0 003.48-.587 2.7 2.7 0 00.498-3.139 6.884 6.884 0 00-.15-.273 12.259 12.259 0 00-1.887-2.288 11.64 11.64 0 01-1.508-1.764l-.064-.102a1.294 1.294 0 01-.257-.85.406.406 0 01.16-.267c.225-.107.444.08.83.508.1.118.21.228.326.331.25.225.584.334.92.3a1.07 1.07 0 00.748-.476c.263-.416.24-.951-.06-1.342l-.085-.145c.18.035.365.019.535-.048a.936.936 0 00.32-.197c.178-.076.33-.2.44-.359a.342.342 0 01.133-.123.711.711 0 00.3-.326l.384-.155h.31a.385.385 0 00.353-.577l-.005.01a.385.385 0 00-.118-.128A.385.385 0 0023.4 0zm.006.398l-.187.315.347.086-.395.005-.658.262a.262.262 0 01-.171.262c-.316.182-.198.321-.583.487-.08.032-.107.101-.256.176-.15.075-.407-.027-.535 0a.32.32 0 00-.203.535c.085.144.486.679.192 1.112a.711.711 0 01-1.107.102c-.368-.305-.866-1.214-1.577-.877-.71.336-.502 1.128-.085 1.796.882 1.39 2.705 2.673 3.523 4.277 1 2-1.107 4.336-3.673 3.117a2.326 2.326 0 01-.396.24c-1.069.535-2.512.578-3.395-.117-.395.941-1.79 1.182-2.031 1.24-.423.08-.832.22-1.214.418.487 1.614 2.47 1.454 2.908.427 0 0 .054.824-1.069 1.07a2.139 2.139 0 01-2.288-1.16c-.33.346-.507.81-.492 1.288.027.69.46 1.337 1.69 1.385 1.662.064 4.25-1.203 6.014-.669 1.344.335 1.723 2.065.642 2.93a2.732 2.732 0 01-1.23.385c-.182.01-.198.091-.181.145.016.053.117.053.278.053.582-.053 1.208.283.93 1.166-.043.123.155.352.117.534-.053.262-.112.203-.112.289-.07.412-.235.326-.337.679a.257.257 0 01-.203.208l-.101.706.112.38-.182-.321-.251.257.214-.332.101-.7a.262.262 0 01-.16-.267c0-.364-.182-.332-.128-.75.037-.085 0-.042 0-.31.016-.186.23-.341.272-.48.043-.14.054-.45-.369-.45-.198.006-.85.075-1.069-.39a.711.711 0 01.465-1.01c.45-.16 1.497-.123 1.556-.91.059-.785-.727-.999-1.513-.972-1.657.059-3.663 1.01-5.48.903-2.23-.128-3.198-3.133-.861-4.737a2.326 2.326 0 010-.465c.09-1.219.77-2.47 1.812-2.85-.593-.818-.128-2.149-.058-2.384.135-.4.213-.818.23-1.24-1.642-.37-2.497 1.411-1.824 2.304 0 0-.743-.369-.395-1.465a2.139 2.139 0 012.138-1.4 1.786 1.786 0 00-.871-1.07c-.61-.3-1.385-.267-2.043.77-.887 1.411-1.063 4.293-2.427 5.544-.961 1-2.652.463-2.86-.909a2.732 2.732 0 01.278-1.256c.08-.166.032-.214-.038-.23-.07-.016-.123.07-.187.214a.823.823 0 01-1.475.224c-.097-.107-.342.006-.535-.17-.192-.177-.128-.188-.192-.241-.321-.273-.16-.375-.418-.636a.257.257 0 01-.08-.284L.796 7.2.41 7.102h.38l-.102-.347.182.353.534.438a.262.262 0 01.31 0c.321.182.38.01.717.262.07.054.133.027.283.134.15.107.187.374.278.476a.32.32 0 00.572-.096c.086-.193.332-.77.866-.728.457.027.77.47.642.91-.091.47-.652 1.357 0 1.801.652.444 1.235-.134 1.604-.829.775-1.46.957-3.678 1.957-5.202 1.23-1.887 4.309-1.224 4.533 1.604.145.06.283.136.412.225 1.032.69 1.759 1.924 1.567 2.994 1.02-.129 1.919.957 2.09 1.138.28.328.606.612.968.845 1.165-1.23.037-2.865-1.07-2.732 0 0 .69-.46 1.466.39.61.728.666 1.772.139 2.561.465.113.956.034 1.363-.219.583-.353.925-1.07.353-2.138-.776-1.476-3.187-3.075-3.588-4.876-.384-1.333.928-2.528 2.219-2.021.38.21.705.51.946.871.102.155.166.134.214.086.048-.048-.005-.14-.096-.268a.823.823 0 01.534-1.39c.145-.027.161-.289.418-.374.256-.086.23-.016.31-.048.395-.15.406.043.759-.048.1-.038.212-.01.283.07l.68-.263zm-10.297 6.26c-.065.53-.348 1.647-.187 2.332.155.871.823.823 1.069.395.163-.332.2-.711.107-1.069a3.106 3.106 0 00-.984-1.636zm.256.872c.17.262.293.551.364.856a1.3 1.3 0 010 .759c-.086.187-.332.187-.423-.23-.04-.462-.02-.928.06-1.385zm1.727 2.661c-.517.012-.67.472-.47.82.207.31.521.534.882.63a3.106 3.106 0 001.908-.037c-.422-.32-1.25-1.123-1.903-1.342a1.255 1.255 0 00-.417-.07zm.088.401a.807.807 0 01.201.04c.429.197.83.45 1.192.753a2.82 2.82 0 01-.962-.107 1.3 1.3 0 01-.642-.396c-.095-.134-.036-.3.21-.29zm-2.285.183a1.54 1.54 0 00-.984.45 3.106 3.106 0 00-.936 1.673c.535-.203 1.604-.519 2.139-.973.663-.588.251-1.166-.22-1.15zm-.025.341c.188.008.276.217-.04.488a5.39 5.39 0 01-1.234.631c.134-.277.315-.528.534-.743a1.3 1.3 0 01.7-.374.284.284 0 01.04-.002z`},child:[]}]})(e)}function od(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`m19.8955 10.8961-.1726-.3028c.0068-2.1746-1.0022-3.061-2.1788-3.7348.356-.0938.7237-.1711.8245-.6182.6118-.1566.7397-.4398.8011-.7398.16-.1066.6955-.4061.6394-.9211.2998-.2069.4669-.4725.3819-.8487.3222-.3515.407-.6419.2702-.9096.3868-.4805.2152-.7295.05-.9817.2897-.5254.0341-1.0887-.7758-.9944-.3221-.4733-1.0244-.3659-1.133-.3637-.1215-.1519-.2819-.2821-.7755-.219-.3197-.2851-.6771-.2364-1.0458-.0964-.4378-.3403-.7275-.0675-1.0584.0356-.53-.1706-.6513.0631-.9117.1583-.5781-.1203-.7538.1416-1.0309.4182l-.3224-.0063c-.8719.5061-1.305 1.5366-1.4585 2.0664-.1536-.5299-.5858-1.5604-1.4575-2.0664l-.3223.0063C9.942.5014 9.7663.2394 9.1883.3597 8.9279.2646 8.807.0309 8.2766.2015c-.2172-.0677-.417-.2084-.6522-.2012l.0004.0002C7.5017.0041 7.369.049 7.2185.166c-.3688-.1401-.7262-.1887-1.0459.0964-.4936-.0631-.654.0671-.7756.219C5.2887.4791 4.5862.3717 4.264.845c-.8096-.0943-1.0655.4691-.7756.9944-.1653.2521-.3366.5013.05.9819-.1367.2677-.0519.5581.2703.9096-.085.3763.0822.6418.3819.8487-.0561.515.4795.8144.6394.9211.0614.3001.1894.5832.8011.7398.1008.4472.4685.5244.8245.6183-1.1766.6737-2.1856 1.56-2.1788 3.7348l-.1724.3028c-1.3491.8082-2.5629 3.4056-.6648 5.5167.124.6609.3319 1.1355.5171 1.6609.2769 2.117 2.0841 3.1082 2.5608 3.2255.6984.524 1.4423 1.0212 2.449 1.3696.949.964 1.977 1.3314 3.0107 1.3308.0152 0 .0306.0002.0457 0 1.0337.0006 2.0618-.3668 3.0107-1.3308 1.0067-.3483 1.7506-.8456 2.4491-1.3696.4766-.1173 2.2838-1.1085 2.5607-3.2255.1851-.5253.3931-1 .517-1.6609 1.8981-2.1113.6843-4.7089-.6649-5.517zm-1.0386-.3715c-.0704.8759-4.6354-3.0504-3.8472-3.1808 2.1391-.3558 3.9191.896 3.8472 3.1808zm-2.0155 4.3649c-1.1481.7409-2.8025.2626-3.6953-1.0681-.8928-1.3306-.6858-3.0101.4623-3.7509 1.1481-.7409 2.8025-.2627 3.6953 1.068.8927 1.3307.6858 3.0101-.4623 3.751zM13.6591 1.3721c.0396.1967.0843.321.1354.3577.2537-.272.4611-.5506.7878-.8123.0011.1537-.0776.3205.1169.4425.1752-.2356.4119-.4459.7263-.6244-.1514.2611-.026.3404.0554.4486.24-.2059.4681-.4144.9109-.5759-.121.1474-.2902.2914-.1108.4607.2473-.1544.496-.3086 1.0833-.4183-.1323.1475-.4059.295-.2401.4426.3104-.1186.6539-.2047 1.034-.2546-.182.1496-.3337.2963-.1846.4122.3323-.1022.7899-.2398 1.2372-.1212l-.2832.2849c-.0314.0382.6623.0297 1.1202.0364-.167.2321-.3375.4562-.437.8548.0454.0459.2723.0204.4862 0-.2194.4618-.6004.5783-.6893.776.134.1015.32.075.5232.006-.158.3254-.4892.5484-.7509.8123.0662.047.1818.075.4555.0425-.2418.257-.5339.492-.8802.7032.0614.0708.2722.0681.4678.0727-.3136.3069-.7173.466-1.0955.6668.1885.1288.3234.0988.4678.097-.2676.2198-.7225.3342-1.1448.4668.0803.1249.1607.1589.3324.194-.447.2473-1.0873.1343-1.2679.2607.0435.1243.1665.2053.3139.2728-.7197.0418-2.6879-.0262-3.0652-1.5156.7367-.8094 2.0813-1.7593 4.394-2.934-1.7994.6022-3.4229 1.405-4.7817 2.5096-1.5978-.7436-.4965-2.6197.283-3.3645zm-1.6126 5.3718c1.1329-.0123 2.5356.8325 2.53 1.6286-.005.7027-.9851 1.2715-2.5213 1.2607-1.5043-.0177-2.5172-.7148-2.5137-1.3957.003-.5603 1.2282-1.5263 2.505-1.4936zm-5.7646-.6006c.1717-.0351.252-.0692.3323-.194-.4223-.1327-.8772-.247-1.1448-.4668.1444.0018.2792.0318.4678-.097-.3783-.2008-.782-.3599-1.0956-.6668.1955-.0048.4064-.002.4677-.0728-.3462-.2113-.6383-.4463-.8801-.7033.2738.0325.3893.0045.4555-.0425-.2617-.264-.593-.487-.7509-.8123.2032.069.3892.0954.5232-.006-.089-.1977-.47-.3142-.6894-.776.214.0204.4409.0459.4863 0-.0994-.3985-.2698-.6226-.4369-.8547.4579-.0067 1.1516.0018 1.1202-.0364l-.2831-.2849c.4472-.1186.9049.019 1.2371.1213.1492-.1159-.0026-.2626-.1847-.4123.3801.05.7236.1361 1.034.2547.1659-.1476-.1076-.2951-.24-.4426.5872.1097.8361.2639 1.0833.4183.1794-.1694.0103-.3133-.1108-.4607.4428.1615.6709.37.911.5759.0814-.1082.2068-.1875.0554-.4486.3143.1785.5511.3888.7263.6244.1945-.122.1159-.2888.1169-.4426.3267.2618.534.5404.7879.8124.0511-.0366.0959-.161.1354-.3577.7794.7448 1.8807 2.6208.2831 3.3646-1.3589-1.1039-2.9817-1.9064-4.78-2.5086 2.3115 1.174 3.6556 2.1239 4.392 2.9328-.3773 1.4895-2.3455 1.5575-3.0651 1.5157.1473-.0676.2703-.1485.3139-.2728-.1806-.1264-.8209-.0134-1.2679-.2607zm2.8175 1.1334c.7881.1304-3.7769 4.0567-3.8472 3.1809-.0719-2.2846 1.7079-3.5367 3.8472-3.1809zm-4.847 8.7567c-1.1094-.8789-1.4668-3.4529.5901-4.6097 1.2394-.3273.4184 5.051-.5901 4.6097zm4.2656 4.5989c-.6257.3719-2.1452.2187-3.2252-1.3095-.7283-1.2823-.6345-2.5872-.123-2.9705.7648-.4589 1.9464.1609 2.8559 1.2003.7923.9405 1.1536 2.5927.4923 3.0797zm-1.2415-5.6086c-1.1481-.7409-1.3551-2.4203-.4623-3.7511.8928-1.3307 2.5472-1.8089 3.6952-1.068 1.1481.7409 1.3551 2.4203.4623 3.7509-.8926 1.3308-2.5471 1.809-3.6952 1.0682zm4.7948 8.2279c-1.3763.0584-2.7258-1.1105-2.7081-1.5157-.0206-.594 1.6758-1.0578 2.782-1.0306 1.1131-.0479 2.6068.3531 2.6097.8851.0184.5166-1.3547 1.6838-2.6836 1.6612zm2.7584-5.8578c.0081 1.3899-1.226 2.5225-2.7562 2.5299-1.5302.0073-2.7773-1.1135-2.7854-2.5033v-.0265c-.008-1.3899 1.2259-2.5226 2.7562-2.5299 1.5302-.0073 2.7773 1.1134 2.7853 2.5033a.7794.7794 0 0 1 .0001.0265zm3.855 2.0029c-1.186 1.6208-2.7916 1.684-3.3896 1.2325-.6255-.5811-.148-2.3854.7094-3.3747v-.0003c.9812-1.0912 2.0302-1.8037 2.7609-1.2469.4919.4828.7805 2.3008-.0807 3.3894zm1.0724-3.4301c-1.0086.4413-1.8298-4.9372-.5901-4.61 2.0568 1.1569 1.6994 3.731.5901 4.61zm-.0256-8.3279h.2985v-.5304h.2986c.1502 0 .2053.0624.2262.2052.0152.1088.0113.2395.0477.3253h.2984c-.0533-.0763-.0515-.2358-.0571-.3213-.0097-.1373-.0513-.2796-.1977-.3176v-.0037c.1502-.061.2149-.1807.2149-.341 0-.2048-.1539-.3738-.3974-.3738h-.732v1.3573zm.2985-1.1255h.3269c.1333 0 .2054.0573.2054.188 0 .1369-.0721.1942-.2054.1942H20.03v-.3822zm-1.0337.4633c0 .7009.5682 1.2694 1.2695 1.2694s1.2695-.5684 1.2695-1.2694c0-.7013-.5683-1.2697-1.2695-1.2697-.7013 0-1.2695.5684-1.2695 1.2697zm2.3275 0c0 .5845-.4737 1.058-1.058 1.058s-1.058-.4735-1.058-1.058c0-.5849.4737-1.058 1.058-1.058s1.058.4731 1.058 1.058z`},child:[]}]})(e)}function sd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12 0C6.22933 0 1.5761 4.48645 1.5761 10.47394c0 6.00417 4.65323 10.47394 10.4239 10.47394.98402 0 1.93468-.13343 2.8353-.3836l1.13412 2.9187c.11675.31688.35025.51702.7672.51702h1.80125c.43364 0 .75052-.28353.55038-.83391l-1.46768-3.81932c2.88534-1.81793 4.80333-5.03683 4.80333-8.8895C22.4239 4.48644 17.77067 0 12 0m4.53648 16.5615l-1.31758-3.41904c-.11675-.28353-.35024-.55038-.85059-.55038h-1.71786c-.43363 0-.7672.28353-.56706.83391l1.73454 4.48645c-.56706.1501-1.18416.21682-1.81793.21682-4.2196 0-7.22168-3.31897-7.22168-7.65532C4.77832 6.1376 7.7804 2.81862 12 2.81862s7.22168 3.31898 7.22168 7.65532c0 2.5351-1.01737 4.70327-2.6852 6.08756`},child:[]}]})(e)}function cd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M4.928 1.825c-1.09.553-1.09.64-.07 1.78 5.655 6.295 7.004 7.782 7.107 7.782.139.017 7.971-8.542 8.058-8.801.034-.07-.208-.312-.519-.536-.415-.312-.864-.433-1.712-.467-1.59-.104-2.144.242-4.115 2.455-.899 1.003-1.66 1.833-1.66 1.833-.017 0-.76-.813-1.642-1.798S8.473 2.1 8.127 1.91c-.796-.45-2.421-.484-3.2-.086zM1.297 4.367C.45 4.695 0 5.007 0 5.248c0 .121 1.331 1.678 2.94 3.459 1.625 1.78 2.939 3.268 2.939 3.302 0 .035-1.331 1.522-2.94 3.303C1.314 17.11.017 18.683.035 18.822c.086.467 1.504 1.055 2.541 1.055 1.678-.018 2.058-.312 5.603-4.202 1.78-1.954 3.233-3.614 3.233-3.666 0-.069-1.435-1.694-3.199-3.63-2.3-2.508-3.423-3.632-3.96-3.874-.812-.398-2.126-.467-2.956-.138zm18.467.12c-.502.26-1.764 1.505-3.943 3.891-1.763 1.937-3.199 3.562-3.199 3.631 0 .07 1.453 1.712 3.234 3.666 3.544 3.89 3.925 4.184 5.602 4.202 1.038 0 2.455-.588 2.542-1.055.017-.156-1.28-1.712-2.905-3.493-1.608-1.78-2.94-3.285-2.94-3.32 0-.034 1.332-1.539 2.94-3.32C22.72 6.91 24.017 5.352 24 5.214c-.087-.45-1.366-.968-2.473-1.038-.795-.034-1.21.035-1.763.312zM7.954 16.973c-2.144 2.369-3.908 4.374-3.943 4.46-.034.07.208.312.52.537.414.311.864.432 1.711.467 1.574.103 2.161-.26 4.15-2.508.864-.968 1.608-1.78 1.625-1.78s.761.812 1.643 1.798c2.023 2.248 2.559 2.576 4.132 2.49.848-.035 1.297-.156 1.712-.467.311-.225.553-.467.519-.536-.087-.26-7.92-8.819-8.058-8.801-.069 0-1.867 1.954-4.011 4.34z`},child:[]}]})(e)}function ld(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12 0C5.372 0 0 5.373 0 12c0 6.628 5.372 12 12 12 6.627 0 12-5.372 12-12 0-6.627-5.373-12-12-12ZM9.64 2.918c1.091-.026 1.548.229 2.182.635a4.459 4.459 0 0 1 1.902 2.764c.254 1.141.178 2.029-.127 2.664v.05c-.609 1.294-1.622 2.335-3.043 2.842l1.217 3.172c.228.583.432 1.192.254 1.75-.177.558-.989.736-1.572.127-1.116-1.192-4.871-8.702-5.15-9.26-.279-.558-.584-1.016-.584-1.574.026-.837 1.318-1.7 1.953-2.131.634-.431 1.877-1.014 2.968-1.039Zm-.996 2.311c-.789.022-.358 1.669-.197 2.129.178.507.661 1.572 1.193 2.105.127.127.254.229.407.254.152.027.457-.127.584-.33a.932.932 0 0 0 .15-.559 3.232 3.232 0 0 0-.049-1.216c-.228-.787-.711-1.548-1.346-2.055-.127-.102-.279-.229-.457-.279a.901.901 0 0 0-.285-.049Zm8.414 2.027a2.283 2.283 0 0 1 1.588.636c.305.279.33.582.229.963-.102.38-.457 1.194-.736 1.777l-.709 1.344c-1.37 2.435-1.649 2.689-2.03 2.537-.456-.178-.304-2.614.127-5.582.127-.812.329-1.217.557-1.42.171-.152.6-.248.975-.254l-.001-.001Zm-1.859 8.332c.554.011.789.7.656 1.232a.861.861 0 0 1-.379.559c-.203.127-.685.127-.965-.102-.278-.228-.33-.609-.254-.914.076-.304.331-.635.686-.736a.757.757 0 0 1 .256-.039Zm-8.604 2.805h10.809c.52 0 .938.419.938.939v.074c0 .52-.418.94-.938.94H6.595a.936.936 0 0 1-.937-.94v-.074c0-.52.417-.939.937-.939Z`},child:[]}]})(e)}function ud(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M10.724 0a12 12 0 0 0-9.448 4.623c1.464.391 2.5.727 2.81.832.005-.19.037-1.893.037-1.893s.004-.04.025-.06c.026-.026.065-.018.065-.018.385.056 8.602 1.274 12.066 3.292.427.25.638.517.902.786.958.99 2.223 5.108 2.359 5.957.005.033-.036.07-.054.083a5.177 5.177 0 0 1-.313.228c-.82.55-2.708 1.872-5.13 1.656-2.176-.193-5.018-1.44-8.445-3.699.336.79.668 1.58 1 2.371.497.258 5.287 2.7 7.651 2.651 1.904-.04 3.941-.968 4.756-1.458 0 0 .179-.108.257-.048.085.066.061.167.041.27-.05.234-.164.66-.242.863l-.065.165c-.093.25-.183.482-.356.625-.48.436-1.246.784-2.446 1.305-1.855.812-4.865 1.328-7.66 1.31-1.001-.022-1.968-.133-2.817-.232-1.743-.197-3.161-.357-4.026.269A12 12 0 0 0 10.724 24a12 12 0 0 0 12-12 12 12 0 0 0-12-12zM13.4 6.963a3.503 3.503 0 0 0-2.521.942 3.498 3.498 0 0 0-1.114 2.449 3.528 3.528 0 0 0 3.39 3.64 3.48 3.48 0 0 0 2.524-.946 3.504 3.504 0 0 0 1.114-2.446 3.527 3.527 0 0 0-3.393-3.64zm-.03 1.035a2.458 2.458 0 0 1 2.368 2.539 2.43 2.43 0 0 1-.774 1.706 2.456 2.456 0 0 1-1.762.659 2.461 2.461 0 0 1-2.364-2.542c.02-.655.3-1.26.777-1.707a2.419 2.419 0 0 1 1.756-.655zm.402 1.23c-.602 0-1.087.325-1.087.727 0 .4.485.725 1.087.725.6 0 1.088-.326 1.088-.725 0-.402-.487-.726-1.088-.726Z`},child:[]}]})(e)}function dd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M8.948 8.798v-1.43a6.7 6.7 0 0 1 .424-.018c3.922-.124 6.493 3.374 6.493 3.374s-2.774 3.851-5.75 3.851c-.398 0-.787-.062-1.158-.185v-4.346c1.528.185 1.837.857 2.747 2.385l2.04-1.714s-1.492-1.952-4-1.952a6.016 6.016 0 0 0-.796.035m0-4.735v2.138l.424-.027c5.45-.185 9.01 4.47 9.01 4.47s-4.08 4.964-8.33 4.964c-.37 0-.733-.035-1.095-.097v1.325c.3.035.61.062.91.062 3.957 0 6.82-2.023 9.593-4.408.459.371 2.34 1.263 2.73 1.652-2.633 2.208-8.772 3.984-12.253 3.984-.335 0-.653-.018-.971-.053v1.864H24V4.063zm0 10.326v1.131c-3.657-.654-4.673-4.46-4.673-4.46s1.758-1.944 4.673-2.262v1.237H8.94c-1.528-.186-2.73 1.245-2.73 1.245s.68 2.412 2.739 3.11M2.456 10.9s2.164-3.197 6.5-3.533V6.201C4.153 6.59 0 10.653 0 10.653s2.35 6.802 8.948 7.42v-1.237c-4.84-.6-6.492-5.936-6.492-5.936z`},child:[]}]})(e)}function fd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M7.352 1.592l-1.364.002L5.32 2.75l1.557 2.713-3.137-.008-1.32 2.34H14.11l-1.353-2.332-3.192-.006-2.214-3.865zm6.175 0l-2.687.025 5.846 10.127 1.341-2.34-1.59-2.765 2.24-3.85-.683-1.182h-1.336l-1.57 2.705-1.56-2.72zm6.887 4.195l-5.846 10.125 2.696-.008 1.601-2.76 4.453.016.682-1.183-.666-1.157-3.13-.008L21.778 8.1l-1.365-2.313zM9.432 8.086l-2.696.008-1.601 2.76-4.453-.016L0 12.02l.666 1.157 3.13.008-1.575 2.71 1.365 2.315L9.432 8.086zM7.33 12.25l-.006.01-.002-.004-1.342 2.34 1.59 2.765-2.24 3.85.684 1.182H7.35l.004-.006h.001l1.567-2.698 1.558 2.72 2.688-.026-.004-.006h.01L7.33 12.25zm2.55 3.93l1.354 2.332 3.192.006 2.215 3.865 1.363-.002.668-1.156-1.557-2.713 3.137.008 1.32-2.34H9.881Z`},child:[]}]})(e)}function pd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`m15.215 10.794 3.78 2.416h-2.663l-3.78-2.416h2.663zM5.656 8.518l-.438 1.626-.175.65-.652 2.416-.175.65-.437 1.622h1.869l.437-1.622.175-.65.651-2.416.175-.65.438-1.626H5.656zm6.06 5.342-.437 1.622h4.947l2.543-1.622h-7.053zm3.556-5.342-2.548 1.626h7.086l.438-1.626h-4.976zm6.86 0-.438 1.626-.175.65-.651 2.416-.175.65-.437 1.622h1.869l.437-1.622.175-.65.651-2.416.175-.65L24 8.518h-1.868zm-20.255 0-.438 1.626-.175.65-.651 2.416-.175.65L0 15.482h1.869l.437-1.622.175-.65.651-2.416.175-.65.438-1.626H1.877zm7.536 0-.438 1.626-.175.65-.651 2.416-.175.65-.437 1.622h1.869l.437-1.622.175-.65.651-2.416.175-.65.438-1.626H9.413z`},child:[]}]})(e)}function md(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M2.182 0A2.177 2.177 0 0 0 0 2.182v19.636C0 23.027.973 24 2.182 24h4.363V6.545h8.728V0Zm15.273 0v24h4.363A2.177 2.177 0 0 0 24 21.818V2.182A2.177 2.177 0 0 0 21.818 0ZM8.727 8.727V24h6.546V8.727Z`},child:[]}]})(e)}function hd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M5.438 5.906v8.438c0 2.06 1.69 3.75 3.75 3.75h5.625c2.06 0 3.75-1.69 3.75-3.75V9.656a2.827 2.827 0 0 0-2.813-2.812 2.8 2.8 0 0 0-1.875.737A2.8 2.8 0 0 0 12 6.844a2.827 2.827 0 0 0-2.812 2.812v4.688h1.875V9.656c0-.529.408-.937.937-.937s.938.408.938.937v4.688h1.875V9.656c0-.529.408-.937.937-.937s.938.408.938.937v4.688a1.86 1.86 0 0 1-1.875 1.875H9.188a1.86 1.86 0 0 1-1.875-1.875V5.906ZM12 0C5.384 0 0 5.384 0 12s5.384 12 12 12 12-5.384 12-12S18.616 0 12 0m0 1.875A10.11 10.11 0 0 1 22.125 12 10.11 10.11 0 0 1 12 22.125 10.11 10.11 0 0 1 1.875 12 10.11 10.11 0 0 1 12 1.875`},child:[]}]})(e)}function gd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M21.044 12.288c0 .5-.343.867-.815.867-.464 0-.827-.38-.827-.867 0-.51.343-.868.815-.868.464 0 .827.381.827.868zm-14.305-.92a.787.787 0 0 0-.651.307.991.991 0 0 0-.172.738l1.479-.614a.708.708 0 0 0-.656-.43zm6.963.052c-.472 0-.816.358-.816.868 0 .486.364.867.828.867.472 0 .815-.368.815-.867 0-.487-.363-.868-.827-.868zM24 7.997v8.006H0V7.997h24zM5.01 13.05H3.088V9.825H2.23v4.003h2.78v-.777zm1.137-.094l2.163-.897a1.667 1.667 0 0 0-.37-.86c-.284-.33-.704-.505-1.216-.505-.931 0-1.633.686-1.633 1.593 0 .93.704 1.593 1.726 1.593.572 0 1.158-.272 1.432-.589l-.535-.411c-.357.264-.56.326-.885.326-.292 0-.52-.09-.682-.25zm5.57-1.039c0-.709-.507-1.223-1.252-1.223a1.28 1.28 0 0 0-1.005.494v-.442h-.846v3.081h.846v-1.753c0-.316.245-.651.698-.651.35 0 .712.243.712.651v1.753h.847v-1.91zm3.647.37c0-.904-.725-1.593-1.65-1.593-.933 0-1.663.7-1.663 1.593 0 .903.726 1.592 1.651 1.592.932 0 1.662-.7 1.662-1.592zm2.066 1.54l1.268-3.081h-.967l-.765 2.099-.765-2.1h-.966l1.268 3.081h.927zm4.449-1.54c0-.904-.725-1.593-1.65-1.593-.932 0-1.662.7-1.662 1.593 0 .903.725 1.592 1.65 1.592.932 0 1.662-.7 1.662-1.592z`},child:[]}]})(e)}function _d(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.778 5.943s-1.97-.13-5.327.92c-3.42 1.07-5.36 2.587-5.36 2.587s5.098-2.847 10.852-3.008zm7.351 3.095l.257-.017s-1.468-1.78-4.278-2.648c1.58.642 2.954 1.493 4.021 2.665zm.42.74c.039-.068.166.217.263.337.004.024.01.039-.045.027-.005-.025-.013-.032-.013-.032s-.135-.08-.177-.137c-.041-.057-.049-.157-.028-.195zm3.448 8.479s.312-3.578-5.31-4.403a18.277 18.277 0 0 0-2.524-.187c-4.506.06-4.67-5.197-1.275-5.462 1.407-.116 3.087.643 4.73 1.408-.007.204.002.385.136.552.134.168.648.35.813.445.164.094.691.43 1.014.85.07-.131.654-.512.654-.512s-.14.003-.465-.119c-.326-.122-.713-.49-.722-.511-.01-.022-.015-.055.06-.07.059-.049-.072-.207-.13-.265-.058-.058-.445-.716-.454-.73-.009-.016-.012-.031-.04-.05-.085-.027-.46.04-.46.04s-.575-.283-.774-.893c.003.107-.099.224 0 .469-.3-.127-.558-.344-.762-.88-.12.305 0 .499 0 .499s-.707-.198-.82-.85c-.124.293 0 .469 0 .469s-1.153-.602-3.069-.61c-1.283-.118-1.55-2.374-1.43-2.754 0 0-1.85-.975-5.493-1.406-3.642-.43-6.628-.065-6.628-.065s6.45-.31 11.617 1.783c.176.785.704 2.094.989 2.723-.815.563-1.733 1.092-1.876 2.97-.143 1.878 1.472 3.53 3.474 3.58 1.9.102 3.214.116 4.806.942 1.52.84 2.766 3.4 2.89 5.703.132-1.709-.509-5.383-3.5-6.498 4.181.732 4.549 3.832 4.549 3.832zM12.68 5.663l-.15-.485s-2.484-.441-5.822-.204C3.37 5.211 0 6.38 0 6.38s6.896-1.735 12.68-.717Z`},child:[]}]})(e)}function vd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M20.42 7.345v9.18h1.651v-9.18zM0 7.475v1.737h1.737V7.474zm9.78.352v6.053c0 .513.044.945.13 1.292.087.34.235.618.44.828.203.21.475.359.803.451.334.093.754.136 1.255.136h.216v-1.533c-.24 0-.445-.012-.593-.037a.672.672 0 0 1-.39-.173.693.693 0 0 1-.173-.377 4.002 4.002 0 0 1-.037-.606v-2.182h1.193v-1.416h-1.193V7.827zm-3.505 2.312c-.396 0-.76.08-1.082.241-.327.161-.6.384-.822.668l-.087.117v-.902H2.658v6.256h1.639v-3.214c.018-.588.16-1.02.433-1.299.29-.297.642-.445 1.044-.445.476 0 .841.149 1.082.433.235.284.359.686.359 1.2v3.324h1.663V12.97c.006-.89-.229-1.595-.686-2.09-.458-.495-1.1-.742-1.917-.742zm10.065.006a3.252 3.252 0 0 0-2.306.946c-.29.29-.525.637-.692 1.033a3.145 3.145 0 0 0-.254 1.273c0 .452.08.878.241 1.274.161.395.39.742.674 1.032.284.29.637.526 1.045.693.408.173.86.26 1.342.26 1.397 0 2.262-.637 2.782-1.23l-1.187-.904c-.248.297-.841.699-1.583.699-.464 0-.847-.105-1.138-.321a1.588 1.588 0 0 1-.593-.872l-.019-.056h4.915v-.587c0-.451-.08-.872-.235-1.267a3.393 3.393 0 0 0-.661-1.033 3.013 3.013 0 0 0-1.02-.692 3.345 3.345 0 0 0-1.311-.248zm-16.297.118v6.256h1.651v-6.256zm16.278 1.286c1.132 0 1.664.797 1.664 1.255l-3.32.006c0-.458.525-1.255 1.656-1.261zm7.073 3.814a.606.606 0 0 0-.606.606.606.606 0 0 0 .606.606.606.606 0 0 0 .606-.606.606.606 0 0 0-.606-.606zm-.008.105a.5.5 0 0 1 .002 0 .5.5 0 0 1 .5.501.5.5 0 0 1-.5.5.5.5 0 0 1-.5-.5.5.5 0 0 1 .498-.5zm-.233.155v.699h.13v-.285h.093l.173.285h.136l-.18-.297a.191.191 0 0 0 .118-.056c.03-.03.05-.074.05-.136 0-.068-.02-.117-.063-.154-.037-.038-.105-.056-.185-.056zm.13.099h.154c.019 0 .037.006.056.012a.064.064 0 0 1 .037.031c.013.013.012.031.012.056a.124.124 0 0 1-.012.055.164.164 0 0 1-.037.031c-.019.006-.037.013-.056.013h-.154Z`},child:[]}]})(e)}function yd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M3.67 6.14S1.82 7.91 1.72 9.78v.35c.08 1.51 1.22 2.4 1.22 2.4 1.83 1.79 6.26 4.04 7.3 4.55 0 0 .06.03.1-.01l.02-.04v-.04C7.52 10.8 3.67 6.14 3.67 6.14zM9.65 18.6c-.02-.08-.1-.08-.1-.08l-7.38.26c.8 1.43 2.15 2.53 3.56 2.2.96-.25 3.16-1.78 3.88-2.3.06-.05.04-.09.04-.09zm.08-.78C6.49 15.63.21 12.28.21 12.28c-.15.46-.2.9-.21 1.3v.07c0 1.07.4 1.82.4 1.82.8 1.69 2.34 2.2 2.34 2.2.7.3 1.4.31 1.4.31.12.02 4.4 0 5.54 0 .05 0 .08-.05.08-.05v-.06c0-.03-.03-.05-.03-.05zM9.06 3.19a3.42 3.42 0 00-2.57 3.15v.41c.03.6.16 1.05.16 1.05.66 2.9 3.86 7.65 4.55 8.65.05.05.1.03.1.03a.1.1 0 00.06-.1c1.06-10.6-1.11-13.42-1.11-13.42-.32.02-1.19.23-1.19.23zm8.299 2.27s-.49-1.8-2.44-2.28c0 0-.57-.14-1.17-.22 0 0-2.18 2.81-1.12 13.43.01.07.06.08.06.08.07.03.1-.03.1-.03.72-1.03 3.9-5.76 4.55-8.64 0 0 .36-1.4.02-2.34zm-2.92 13.07s-.07 0-.09.05c0 0-.01.07.03.1.7.51 2.85 2 3.88 2.3 0 0 .16.05.43.06h.14c.69-.02 1.9-.37 3-2.26l-7.4-.25zm7.83-8.41c.14-2.06-1.94-3.97-1.94-3.98 0 0-3.85 4.66-6.67 10.8 0 0-.03.08.02.13l.04.01h.06c1.06-.53 5.46-2.77 7.28-4.54 0 0 1.15-.93 1.21-2.42zm1.52 2.14s-6.28 3.37-9.52 5.55c0 0-.05.04-.03.11 0 0 .03.06.07.06 1.16 0 5.56 0 5.67-.02 0 0 .57-.02 1.27-.29 0 0 1.56-.5 2.37-2.27 0 0 .73-1.45.17-3.14z`},child:[]}]})(e)}function bd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.0069 24h-.3572l2.459-6.7453h3.3796c.5907 0 1.2364-.4533 1.4424-1.0166l2.6652-7.3085c.4396-1.1952-.2473-2.1706-1.525-2.1706h-4.6983l-3.929 10.798-2.2255 6.127C3.929 22.434 0 17.6806 0 12.007 0 6.498 3.7092 1.8546 8.7647.4396L6.4705 6.759 2.6514 17.2547h2.5415L8.4488 8.339h1.9095l-3.2558 8.9158H9.644l3.0223-8.3251c.4396-1.1952-.2473-2.1706-1.525-2.1706h-2.143l2.459-6.7453C11.636 0 11.8145 0 11.9931 0 18.6285 0 24 5.3715 24 12.007c.0137 6.6216-5.3578 11.993-11.9931 11.993zM19.2742 8.325h-1.9096l-2.6789 7.336h1.9096l2.6789-7.336z`},child:[]}]})(e)}function xd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M0 0v24h24V0H0zm4.602 4.025h2.244c.509 0 .716.215.716.717v5.64h8.883v-5.64c0-.509.215-.717.717-.717h2.229c.5 0 .71.23.724.717v14.516c0 .509-.215.717-.717.717h-2.23c-.51 0-.717-.215-.717-.717v-5.735H7.562v5.735c0 .516-.215.717-.716.717H4.602c-.51 0-.717-.208-.717-.717V4.742c0-.509.207-.717.717-.717z`},child:[]}]})(e)}function Sd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M9.94 0a7.31 7.31 0 00-1.26.116c-4.344.795-7.4 4.555-7.661 7.031-.126 1.215.53 2.125.89 2.526.977 1.085 2.924 1.914 4.175 2.601-1.81 1.543-2.64 2.296-3.457 3.154C1.403 16.712.543 18.125.54 19.138c0 .325-.053 1.365.371 2.187.16.309.613 1.338 1.98 2.109.874.494 2.119.675 3.337.501 3.772-.538 8.823-3.737 12.427-6.716 2.297-1.9 3.977-3.739 4.462-4.644.39-.731.434-2.043.207-2.866-.645-2.337-5.887-7.125-10.172-9.051A7.824 7.824 0 009.94 0zm-.008.068a7.4 7.4 0 013.344.755c3.46 1.7 9.308 6.482 9.739 8.886.534 2.972-9.931 11.017-16.297 12.272-2.47.485-4.576.618-5.537-1.99-.832-2.262.783-3.916 3.16-6.09a92.546 92.546 0 012.96-2.576c.065-.069-5.706-2.059-5.89-4.343C1.221 4.634 4.938.3 9.697.076c.08-.004.157-.007.235-.008zm-.112.52a5.647 5.647 0 00-.506.032c-2.337.245-2.785.547-4.903 2.149-.71.537-2.016 1.844-2.35 3.393-.128.59.024 1.1.448 1.458 1.36 1.144 3.639 2.072 5.509 2.97.547.263.185.74-.698 1.505-2.227 1.928-5.24 4.276-5.45 6.066-.099.842.19 1.988 1.213 2.574 1.195.685 3.676.238 5.333-.379 2.422-.902 5.602-2.892 8.127-4.848 2.625-2.034 5.067-4.617 5.188-5.038.148-.517.133-.996-.154-1.546-.448-.862-1.049-1.503-1.694-2.22-1.732-1.825-3.563-3.43-5.754-4.658C12.694 1.242 11.417.564 9.82.588zm1.075 3.623c.546 0 1.176.173 1.853.5 1.688.817 3.422 2.961-.015 4.195-.935.336-3.9-.824-3.81-2.407.09-1.57.854-2.289 1.972-2.288zm.285 1.367c-.317-.002-.575.079-.694.263-.557.861-.303 1.472.212 1.862.192-.457 2.156.043 2.148.472a.32.32 0 00.055-.032c1.704-1.282-.472-2.557-1.72-2.565z`},child:[]}]})(e)}function Cd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M10.24 3.179C6.82 6.579 3.366 10.064 0 13.465c2.4 2.406 4.889 4.898 7.319 7.332l7.504.024 6.334-6.316-13.754-.012-1.525 1.54 11.512.024-3.198 3.197H7.956L2.172 13.47l8.74-8.74h6.284l4.815 4.815-7.501-.01v-2.12l-3.68 3.68c3.873.004 7.746.003 11.62 0v2.102l1.55-1.55-.003-2.306-6.16-6.159z`},child:[]}]})(e)}function wd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.682 2.406c-.001-.149-.097-.187-.24-.189h-.25v.659h.108v-.282h.102l.17.282h.122l-.184-.29c.102-.012.175-.065.172-.18zm-.382.096v-.193h.13c.06-.002.145.011.143.089.005.09-.08.107-.153.103h-.12zM21.851 1.49c1.172 1.171-2.077 6.319-2.626 6.869-.549.548-1.944.044-3.115-1.128-1.172-1.171-1.676-2.566-1.127-3.115.549-.55 5.697-3.798 6.868-2.626zM1.652 6.61C.626 4.818-.544 2.215.276 1.395c.81-.81 3.355.319 5.144 1.334A11.003 11.003 0 0 0 1.652 6.61zm18.95.418a10.584 10.584 0 0 1 1.368 5.218c0 5.874-4.762 10.636-10.637 10.636C5.459 22.882.697 18.12.697 12.246.697 6.371 5.459 1.61 11.333 1.61c1.771 0 3.441.433 4.909 1.199-.361.201-.69.398-.969.574-.428-.077-.778-.017-.998.202-.402.402-.269 1.245.263 2.2.273.539.701 1.124 1.25 1.674.103.104.208.202.315.297 1.519 1.446 3.205 2.111 3.829 1.486.267-.267.297-.728.132-1.287.167-.27.35-.584.538-.927zm2.814-5.088c-.322 0-.584.266-.584.595s.261.595.584.595c.323 0 .584-.266.584-.595s-.261-.595-.584-.595zm0 1.087c-.252 0-.457-.22-.457-.492s.204-.492.457-.492c.252 0 .457.22.457.492s-.204.492-.457.492z`},child:[]}]})(e)}function Td(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.001 0C5.376 0 .008 5.369.004 11.992H.002v9.287h.002A2.726 2.726 0 0 0 2.73 24h9.275c6.626-.004 11.993-5.372 11.993-11.997C23.998 5.375 18.628 0 12 0zm2.431 4.94c2.015 0 3.917 1.543 3.917 3.671 0 .197.001.395-.03.619a1.002 1.002 0 0 1-1.137.893 1.002 1.002 0 0 1-.842-1.175 2.61 2.61 0 0 0 .013-.337c0-1.207-.987-1.672-1.92-1.672-.934 0-1.775.784-1.777 1.672.016 1.027 0 2.046 0 3.07l1.732-.012c1.352-.028 1.368 2.009.016 1.998l-1.748.013c-.004.826.006.677.002 1.093 0 0 .015 1.01-.016 1.776-.209 2.25-2.124 4.046-4.424 4.046-2.438 0-4.448-1.993-4.448-4.437.073-2.515 2.078-4.492 4.603-4.469l1.409-.01v1.996l-1.409.013h-.007c-1.388.04-2.577.984-2.6 2.47a2.438 2.438 0 0 0 2.452 2.439c1.356 0 2.441-.987 2.441-2.437l-.001-7.557c0-.14.005-.252.02-.407.23-1.848 1.883-3.256 3.754-3.256z`},child:[]}]})(e)}function Ed(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z`},child:[]}]})(e)}function Dd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.04 0C5.408-.02.005 5.37.005 11.992h4.638c0-4.923 4.882-8.731 10.064-6.855a6.95 6.95 0 014.147 4.148c1.889 5.177-1.924 10.055-6.84 10.064v-4.61H7.391v4.623h4.61V24c7.86 0 13.967-7.588 11.397-15.83-1.115-3.59-3.985-6.446-7.575-7.575A12.8 12.8 0 0012.039 0zM7.39 19.362H3.828v3.564H7.39zm-3.563 0v-2.978H.85v2.978z`},child:[]}]})(e)}function Od(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M17.963 14.6V9.324h1.222v4.204h2.14v1.07h-3.362zm-9.784-3.288l2.98-2.292c.281.228.56.458.841.687l-2.827 2.14.611.535 2.827-2.216c.281.228.56.458.841.688a295.83 295.83 0 0 1-2.827 2.216l.61.536 2.83-2.295-.001-1.986h1.223v4.204h2.216v1.07h-3.362v-1.987c-.995.763-1.987 1.529-2.981 2.292l-2.981-2.292c-.144.729-.653 1.36-1.312 1.694-.285.147-.597.24-.915.276-.183.022-.367.017-.551.017H3.516V9.325H5.69a2.544 2.544 0 0 1 1.563.557c.454.36.778.872.927 1.43m-3.516-.917v3.21l.953-.001a1.377 1.377 0 0 0 1.036-.523 1.74 1.74 0 0 0 .182-1.889 1.494 1.494 0 0 0-.976-.766c-.166-.04-.338-.03-.507-.032h-.688zM11.82 0h.337a11.94 11.94 0 0 1 5.405 1.373 12.101 12.101 0 0 1 4.126 3.557A11.93 11.93 0 0 1 24 11.82v.36a11.963 11.963 0 0 1-3.236 8.033A11.967 11.967 0 0 1 12.182 24h-.361a11.993 11.993 0 0 1-4.145-.806 12.04 12.04 0 0 1-4.274-2.836A12.057 12.057 0 0 1 .576 15.67 12.006 12.006 0 0 1 0 12.181v-.361a11.924 11.924 0 0 1 1.992-6.396 12.211 12.211 0 0 1 4.71-4.172A11.875 11.875 0 0 1 11.82 0m-.153 1.23a10.724 10.724 0 0 0-6.43 2.375 10.78 10.78 0 0 0-3.319 4.573 10.858 10.858 0 0 0 .193 8.12 10.788 10.788 0 0 0 3.546 4.421 10.698 10.698 0 0 0 4.786 1.946c1.456.209 2.955.124 4.376-.26a10.756 10.756 0 0 0 5.075-3.062 10.742 10.742 0 0 0 2.686-5.28 10.915 10.915 0 0 0-.122-4.682 10.77 10.77 0 0 0-7.098-7.626 10.78 10.78 0 0 0-3.693-.525z`},child:[]}]})(e)}function kd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M13.88 12.685c-.4 0 .08.2.601.28.14-.1.27-.22.39-.33a3.001 3.001 0 01-.99.05m2.14-.53c.23-.33.4-.69.47-1.06-.06.27-.2.5-.33.73-.75.47-.07-.27 0-.56-.8 1.01-.11.6-.14.89m.781-2.05c.05-.721-.14-.501-.2-.221.07.04.13.5.2.22M12.38.31c.2.04.45.07.42.12.23-.05.28-.1-.43-.12m.43.12l-.15.03.14-.01V.43m6.633 9.944c.02.64-.2.95-.38 1.5l-.35.181c-.28.54.03.35-.17.78-.44.39-1.34 1.22-1.62 1.301-.201 0 .14-.25.19-.34-.591.4-.481.6-1.371.85l-.03-.06c-2.221 1.04-5.303-1.02-5.253-3.842-.03.17-.07.13-.12.2a3.551 3.552 0 012.001-3.501 3.361 3.362 0 013.732.48 3.341 3.342 0 00-2.721-1.3c-1.18.01-2.281.76-2.651 1.57-.6.38-.67 1.47-.93 1.661-.361 2.601.66 3.722 2.38 5.042.27.19.08.21.12.35a4.702 4.702 0 01-1.53-1.16c.23.33.47.66.8.91-.55-.18-1.27-1.3-1.48-1.35.93 1.66 3.78 2.921 5.261 2.3a6.203 6.203 0 01-2.33-.28c-.33-.16-.77-.51-.7-.57a5.802 5.803 0 005.902-.84c.44-.35.93-.94 1.07-.95-.2.32.04.16-.12.44.44-.72-.2-.3.46-1.24l.24.33c-.09-.6.74-1.321.66-2.262.19-.3.2.3 0 .97.29-.74.08-.85.15-1.46.08.2.18.42.23.63-.18-.7.2-1.2.28-1.6-.09-.05-.28.3-.32-.53 0-.37.1-.2.14-.28-.08-.05-.26-.32-.38-.861.08-.13.22.33.34.34-.08-.42-.2-.75-.2-1.08-.34-.68-.12.1-.4-.3-.34-1.091.3-.25.34-.74.54.77.84 1.96.981 2.46-.1-.6-.28-1.2-.49-1.76.16.07-.26-1.241.21-.37A7.823 7.824 0 0017.702 1.6c.18.17.42.39.33.42-.75-.45-.62-.48-.73-.67-.61-.25-.65.02-1.06 0C15.082.73 14.862.8 13.8.4l.05.23c-.77-.25-.9.1-1.73 0-.05-.04.27-.14.53-.18-.741.1-.701-.14-1.431.03.17-.13.36-.21.55-.32-.6.04-1.44.35-1.18.07C9.6.68 7.847 1.3 6.867 2.22L6.838 2c-.45.54-1.96 1.611-2.08 2.311l-.131.03c-.23.4-.38.85-.57 1.261-.3.52-.45.2-.4.28-.6 1.22-.9 2.251-1.16 3.102.18.27 0 1.65.07 2.76-.3 5.463 3.84 10.776 8.363 12.006.67.23 1.65.23 2.49.25-.99-.28-1.12-.15-2.08-.49-.7-.32-.85-.7-1.34-1.13l.2.35c-.971-.34-.57-.42-1.361-.67l.21-.27c-.31-.03-.83-.53-.97-.81l-.34.01c-.41-.501-.63-.871-.61-1.161l-.111.2c-.13-.21-1.52-1.901-.8-1.511-.13-.12-.31-.2-.5-.55l.14-.17c-.35-.44-.64-1.02-.62-1.2.2.24.32.3.45.33-.88-2.172-.93-.12-1.601-2.202l.15-.02c-.1-.16-.18-.34-.26-.51l.06-.6c-.63-.74-.18-3.102-.09-4.402.07-.54.53-1.1.88-1.981l-.21-.04c.4-.71 2.341-2.872 3.241-2.761.43-.55-.09 0-.18-.14.96-.991 1.26-.7 1.901-.88.7-.401-.6.16-.27-.151 1.2-.3.85-.7 2.421-.85.16.1-.39.14-.52.26 1-.49 3.151-.37 4.562.27 1.63.77 3.461 3.011 3.531 5.132l.08.02c-.04.85.13 1.821-.17 2.711l.2-.42M9.54 13.236l-.05.28c.26.35.47.73.8 1.01-.24-.47-.42-.66-.75-1.3m.62-.02c-.14-.15-.22-.34-.31-.52.08.32.26.6.43.88l-.12-.36m10.945-2.382l-.07.15c-.1.76-.34 1.511-.69 2.212.4-.73.65-1.541.75-2.362M12.45.12c.27-.1.66-.05.95-.12-.37.03-.74.05-1.1.1l.15.02M3.006 5.142c.07.57-.43.8.11.42.3-.66-.11-.18-.1-.42m-.64 2.661c.12-.39.15-.62.2-.84-.35.44-.17.53-.2.83`},child:[]}]})(e)}function Ad(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.076.066L8.883 3.28H3.348v5.434L0 12.01l3.349 3.298v5.39h5.374l3.285 3.236 3.285-3.236h5.43v-5.374L24 12.026l-3.232-3.252V3.321H15.31zm0 .749l2.49 2.506h-1.69v6.441l-.8.805-.81-.815V3.28H9.627zm-8.2 2.991h4.483L6.485 5.692l4.253 4.279v.654H9.94L5.674 6.423l-1.798 1.77zm5.227 0h1.635v5.415l-3.509-3.53zm4.302.043h1.687l1.83 1.842-3.517 3.539zm2.431 0h4.404v4.394l-1.83-1.842-4.241 4.267h-.764v-.69l4.261-4.287zm2.574 3.3l1.83 1.843v1.676h-5.327zm-12.735.013l3.515 3.462H3.876v-1.69zM3.348 9.454v1.697h6.377l.871.858-.782.77H3.35v1.786L.753 12.01zm17.42.068l2.488 2.503-2.533 2.55v-1.796h-6.41l-.75-.754.825-.83h6.38zm-9.502.978l.81.815.186-.188.614-.618v.686h.768l-.825.83.75.754h-.719v.808l-.842-.83-.741.73v-.707h-.7l.781-.77-.188-.186-.682-.672h.788zm-7.39 2.807h5.402l-3.603 3.55-1.798-1.772zm6.154 0h.708v.7l-4.404 4.338 1.852 1.824h-4.31v-4.342l1.798 1.77zm3.348 0h.715l4.317 4.343.186-.187 1.599-1.61v4.316h-4.366l1.853-1.825-.188-.185-4.116-4.054zm1.46 0h5.357v1.798l-1.785 1.796zm-2.83.191l.842.829v6.37h1.691l-2.532 2.495-2.533-2.495h1.79V14.23zm-1.27 1.251v5.42H8.939l-1.852-1.823zm2.64.097l3.552 3.499-1.853 1.825h-1.7z`},child:[]}]})(e)}function jd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.904 10.788V9.522h-4.656c-.972 0-1.41.6-1.482 1.182v.018-1.2h-1.368v1.266h1.362zm-6.144.456l-1.368-.078v1.458c0 .456-.228.594-1.02.594H14.28c-.654 0-.93-.186-.93-.594v-1.596l-1.386-.102v1.812h-.03c-.078-.528-.276-1.14-1.596-1.23L6 11.22c0 .666.474 1.062 1.218 1.14l3.024.306c.24.018.414.09.414.288 0 .216-.18.24-.456.24H5.946V11.22l-1.386-.09v3.348h5.646c1.26 0 1.662-.654 1.722-1.2h.03c.156.864.912 1.2 2.19 1.2h1.41c1.494 0 2.202-.456 2.202-1.524zm4.398.258l-4.338-.258c0 .666.438 1.11 1.182 1.17l3.09.24c.24.018.384.078.384.276 0 .186-.168.258-.516.258h-4.212v1.29h4.302c1.356 0 1.95-.474 1.95-1.554 0-.972-.534-1.338-1.842-1.422zm-10.194-1.98h1.386v1.266h-1.386zM3.798 11.07l-1.506-.15L0 14.478h1.686zm7.914-1.548h-4.23c-.984 0-1.416.612-1.518 1.2v-1.2H3.618c-.33 0-.486.102-.642.33l-.648.936h9.384Z`},child:[]}]})(e)}function Md(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M5.419 8.534h1.614v6.911H5.419v-.72c-.71.822-1.573.933-2.07.933C1.218 15.658 0 13.882 0 11.985c0-2.253 1.542-3.633 3.37-3.633.507 0 1.4.132 2.049.984zm-3.765 3.491c0 1.198.751 2.202 1.918 2.202 1.015 0 1.959-.74 1.959-2.181 0-1.512-.934-2.233-1.959-2.233-1.167-.01-1.918.974-1.918 2.212zm7.297-3.49h1.613v.618a3 3 0 0 1 .67-.578c.314-.183.619-.233.984-.233.396 0 .822.06 1.269.324l-.66 1.462a1.432 1.432 0 0 0-.822-.244c-.345 0-.69.05-1.005.376-.446.477-.446 1.136-.446 1.593v3.582H8.94zm5.56 0h1.614v.639c.538-.66 1.177-.822 1.705-.822.72 0 1.4.345 1.786 1.015.579-.822 1.441-1.015 2.05-1.015.842 0 1.573.396 1.969 1.086.132.233.365.74.365 1.745v4.272h-1.614V11.65c0-.771-.08-1.086-.152-1.228-.101-.264-.345-.609-.923-.609-.396 0-.741.213-.954.508-.284.395-.315.984-.315 1.572v3.562H18.43V11.65c0-.771-.081-1.086-.152-1.228-.102-.264-.345-.609-.924-.609-.396 0-.74.213-.954.508-.284.395-.314.984-.314 1.572v3.562h-1.573z`},child:[]}]})(e)}function Nd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M11.39.605C10.376 3.092 9.764 4.72 8.635 7.132c.693.734 1.543 1.589 2.923 2.554-1.484-.61-2.496-1.224-3.252-1.86C6.86 10.842 4.596 15.138 0 23.395c3.612-2.085 6.412-3.37 9.021-3.862a6.61 6.61 0 01-.171-1.547l.003-.115c.058-2.315 1.261-4.095 2.687-3.973 1.426.12 2.534 2.096 2.478 4.409a6.52 6.52 0 01-.146 1.243c2.58.505 5.352 1.787 8.914 3.844-.702-1.293-1.33-2.459-1.929-3.57-.943-.73-1.926-1.682-3.933-2.713 1.38.359 2.367.772 3.137 1.234-6.09-11.334-6.582-12.84-8.67-17.74zM22.898 21.36v-.623h-.234v-.084h.562v.084h-.234v.623h.331v-.707h.142l.167.5.034.107a2.26 2.26 0 01.038-.114l.17-.493H24v.707h-.091v-.593l-.206.593h-.084l-.205-.602v.602h-.091`},child:[]}]})(e)}function Pd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M5.998 1.607L0 12l5.998 10.393h12.004L24 12 18.002 1.607H5.998zM9.965 7.12L12.66 9.9l1.598 1.595.002-.002 2.41 2.363c-.2.14-.386.252-.563.344a3.756 3.756 0 01-.496.217 2.702 2.702 0 01-.425.111c-.131.023-.25.034-.358.034-.13 0-.242-.014-.338-.034a1.317 1.317 0 01-.24-.072.95.95 0 01-.2-.113l-1.062-1.092-3.039-3.041-1.1 1.053-3.07 3.072a.974.974 0 01-.2.111 1.274 1.274 0 01-.237.073c-.096.02-.209.033-.338.033-.108 0-.227-.009-.358-.031a2.7 2.7 0 01-.425-.114 3.748 3.748 0 01-.496-.217 5.228 5.228 0 01-.563-.343l6.803-6.727zm4.72.785l4.579 4.598 1.382 1.353a5.24 5.24 0 01-.564.344 3.73 3.73 0 01-.494.217 2.697 2.697 0 01-.426.111c-.13.023-.251.034-.36.034-.129 0-.241-.014-.337-.034a1.285 1.285 0 01-.385-.146c-.033-.02-.05-.036-.053-.04l-1.232-1.218-2.111-2.111-.334.334L12.79 9.8l1.896-1.897zm-5.966 4.12v2.529a2.128 2.128 0 01-.356-.035 2.765 2.765 0 01-.422-.116 3.708 3.708 0 01-.488-.214 5.217 5.217 0 01-.555-.34l1.82-1.825Z`},child:[]}]})(e)}function Fd(e){return q({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.943 9.364c-.085-.113-.17-.198-.595-.226-.113 0-.453-.029-1.048-.029-1.56 0-2.636.482-3.175 1.417.142-.935-.765-1.417-2.749-1.417-2.324 0-3.798.935-4.393 2.834-.226.709-.226 1.276-.056 1.73h-.567c-.425.027-.992.056-1.36.056-.85 0-1.39-.142-1.588-.425-.17-.255-.17-.737.057-1.446.368-1.162 1.247-1.672 2.664-1.672.737 0 1.445.085 1.445.085.085 0 .142-.113.142-.198l-.028-.085-.057-.397c-.028-.255-.227-.397-.567-.453-.311-.029-.567-.029-.907-.029h-.028c-1.842 0-3.146.624-3.854 1.814.255-1.219-.596-1.814-2.551-1.814-1.105 0-1.9.029-2.353.085-.368.057-.595.199-.68.454l-.17.51c-.028.085.029.142.142.142.085 0 .425-.057.992-.086a24.816 24.816 0 0 1 1.672-.085c1.077 0 1.559.284 1.389.822-.029.114-.114.199-.255.227-1.02.17-1.842.284-2.438.369-1.7.226-2.692.736-2.947 1.587-.369 1.162.538 1.728 2.72 1.728 1.078 0 2.013-.056 2.75-.198.425-.085.652-.17.737-.453l.396-1.304c-.028 1.304.85 1.955 2.721 1.955.794 0 1.559-.028 1.927-.085.369-.056.567-.141.652-.425l.085-.396c.397.623 1.276.935 2.608.935 1.417 0 2.239-.029 2.465-.114a.523.523 0 0 0 .369-.311l.028-.085.17-.539c.029-.085-.028-.142-.142-.142l-.906.057c-.596.029-1.077.057-1.418.057-.651 0-1.076-.057-1.332-.142-.368-.142-.538-.397-.51-.822l2.863-.368c1.275-.17 2.154-.567 2.579-1.19l-.992 3.315c-.028.057 0 .114.028.142.029.028.085.057.199.057h1.19c.198 0 .283-.114.312-.199l1.048-3.656c.142-.481.567-.708 1.36-.708.71 0 1.22 0 1.56.028h.028c.057 0 .17-.028.255-.17l.17-.51c0-.085 0-.17-.057-.227zM4.841 13.73c-.368.057-.907.085-1.587.085-1.219 0-1.729-.255-1.587-.737.113-.34.425-.567.935-.624l2.75-.368zm12.669-2.95c-.114.369-.652.624-1.616.766l-2.295.311.056-.198c.199-.624.454-1.02.794-1.247.34-.227.907-.34 1.7-.34 1.05.028 1.503.255 1.36.708Z`},child:[]}]})(e)}function Id(e){return q({tag:`svg`,attr:{version:`1.1`,viewBox:`0 0 17 17`},child:[{tag:`g`,attr:{},child:[]},{tag:`path`,attr:{d:`M14.001 11.125c-0.469-0.674-0.704-1.44-0.704-2.278 0-0.776 0.225-1.482 0.664-2.115 0.245-0.357 0.633-0.756 1.165-1.205-0.347-0.43-0.706-0.777-1.063-1.022-0.634-0.439-1.358-0.664-2.176-0.664-0.501 0-1.093 0.123-1.767 0.347-0.675 0.235-1.165 0.348-1.461 0.348-0.236 0-0.706-0.102-1.411-0.307-0.715-0.204-1.308-0.306-1.808-0.306-1.176 0-2.136 0.491-2.901 1.471-0.766 0.991-1.154 2.258-1.154 3.821 0 1.675 0.511 3.381 1.501 5.139 1.011 1.757 2.023 2.646 3.075 2.646 0.337 0 0.787-0.112 1.349-0.348 0.553-0.224 1.042-0.337 1.451-0.337 0.419 0 0.939 0.102 1.542 0.327 0.614 0.214 1.083 0.327 1.431 0.327 0.868 0 1.747-0.665 2.626-2.003 0.592-0.889 1.001-1.747 1.256-2.554-0.602-0.183-1.144-0.612-1.615-1.287zM13.523 14.418c-0.657 1-1.293 1.552-1.79 1.552-0.147 0-0.459-0.047-1.081-0.264-0.693-0.259-1.33-0.39-1.892-0.39-0.541 0-1.155 0.138-1.838 0.415-0.58 0.243-0.865 0.269-0.961 0.269-0.628 0-1.412-0.762-2.204-2.137-0.923-1.639-1.372-3.159-1.372-4.648 0-1.336 0.31-2.387 0.942-3.206 0.579-0.741 1.251-1.086 2.113-1.086 0.401 0 0.902 0.088 1.529 0.267 1.051 0.305 1.444 0.346 1.689 0.346 0.425 0 1.010-0.132 1.777-0.399 0.589-0.196 1.077-0.296 1.45-0.296 0.609 0 1.135 0.159 1.61 0.489 0.066 0.046 0.135 0.098 0.204 0.155-0.228 0.236-0.414 0.461-0.562 0.677-0.56 0.806-0.843 1.709-0.843 2.686 0 1.048 0.297 2.006 0.884 2.85 0.354 0.505 0.748 0.908 1.182 1.206-0.217 0.499-0.498 1.006-0.837 1.514zM9.424 3.964c-0.235 0.072-0.582 0.133-1.062 0.174 0.021-1.011 0.286-1.89 0.797-2.625 0.511-0.737 1.368-1.237 2.555-1.513 0.020 0.092 0.040 0.164 0.050 0.225 0 0.071 0.011 0.132 0.011 0.204 0 0.419-0.102 0.889-0.296 1.39-0.204 0.511-0.521 0.981-0.951 1.41-0.368 0.367-0.736 0.612-1.104 0.735z`},child:[]}]})(e)}function Ld(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.2002 2.97067C12.3402 2.8507 12.5497 2.83088 12.7197 2.92087C12.8896 3.01082 12.9999 3.18024 13 3.37009V12.6308C12.9998 12.8207 12.8896 13.0001 12.7197 13.08C12.6498 13.11 12.58 13.1308 12.5 13.1308C12.39 13.1308 12.2902 13.1002 12.2002 13.0302L6.08984 8.40036C5.95988 8.30036 5.88965 8.15995 5.88965 7.99997C5.88979 7.84018 5.97001 7.69048 6.08984 7.60055L12.2002 2.97067ZM7.21973 7.99997L12 11.6201V4.38083L7.21973 7.99997Z`},child:[]},{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11 0.350554C11.32 0.0305537 11.8802 -0.0296026 12.2002 0.190397L12.6201 0.390593C12.6584 0.390649 12.7149 0.417502 12.7197 0.41989L14.7305 1.39059C14.7403 1.40015 14.75 1.40036 14.75 1.40036L15.4297 1.73044H15.4404C15.7901 1.89049 16.0096 2.24015 16.0098 2.62985V13.3701C16.0098 13.75 15.7903 14.1104 15.4404 14.2705L12.1504 15.8603C12.0004 15.9303 11.8297 15.9502 11.7197 15.9502C11.4598 15.9501 11.1995 15.8401 11.0195 15.6601L4.70996 9.91989L1.95996 12C1.69997 12.19 1.30985 12.1604 1.08984 11.9404L0.219727 11.1601C0.059832 10.9702 0 10.8201 0 10.6601C1.22464e-05 10.6 0.0202612 10.3703 0.200195 10.1904L2.58984 7.99997L0.209961 5.83005C0.0100442 5.63007 0 5.3998 0 5.33981C9.8004e-05 5.18993 0.0602551 5.03025 0.160156 4.90036L1.11035 4.04001C1.29048 3.85024 1.70031 3.81006 1.9502 3.99997L4.7002 6.08981L11 0.350554ZM5.05957 7.08981C4.87957 7.24976 4.6099 7.26007 4.41992 7.12008L1.55957 4.95993L1.15039 5.33005L3.66992 7.62008C3.76992 7.72008 3.83008 7.8502 3.83008 7.9902C3.83007 8.13019 3.76992 8.27032 3.66992 8.36032L1.15039 10.6601L1.57031 11.0302L4.42969 8.87008C4.51969 8.80009 4.62047 8.77048 4.73047 8.77048C4.85031 8.77058 4.97044 8.81048 5.07031 8.90036L11.7002 14.9404L12.2803 14.6806L15 13.3701V2.62985L12.2803 1.33005C12.2709 1.33005 12.2435 1.31265 12.2402 1.31051L11.7002 1.04977L5.05957 7.08981Z`},child:[]}]})(e)}function Rd(e){return q({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M18.75 1.5H5.25C3.1815 1.5 1.5 3.183 1.5 5.25V18.75C1.5 20.8185 3.1815 22.5 5.25 22.5H18.75C20.8185 22.5 22.5 20.8185 22.5 18.75V5.25C22.5 3.183 20.8185 1.5 18.75 1.5ZM21 18.75C21 19.9905 19.9905 21 18.75 21H5.25C4.0095 21 3 19.9905 3 18.75V5.25C3 4.0095 4.0095 3 5.25 3H18.75C19.9905 3 21 4.0095 21 5.25V18.75ZM10.281 13.281L5.781 17.781C5.634 17.928 5.442 18 5.25 18C5.058 18 4.866 17.9265 4.719 17.781C4.4265 17.4885 4.4265 17.013 4.719 16.7205L8.688 12.7515L4.719 8.7825C4.4265 8.49 4.4265 8.0145 4.719 7.722C5.0115 7.4295 5.487 7.4295 5.7795 7.722L10.2795 12.222C10.572 12.5145 10.572 12.99 10.2795 13.2825L10.281 13.281ZM19.5 17.25C19.5 17.664 19.164 18 18.75 18H11.25C10.836 18 10.5 17.664 10.5 17.25C10.5 16.836 10.836 16.5 11.25 16.5H18.75C19.164 16.5 19.5 16.836 19.5 17.25Z`},child:[]}]})(e)}function zd(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M6.82499 8.882L4.46199 10.882C4.36799 10.961 4.25299 11 4.13899 11C3.99699 11 3.85599 10.939 3.75699 10.823C3.57799 10.612 3.60499 10.297 3.81599 10.118L5.80399 8.436L4.47899 6.817C4.30399 6.603 4.33499 6.288 4.54899 6.113C4.76199 5.938 5.07799 5.969 5.25199 6.183L6.88799 8.183C7.06099 8.394 7.03299 8.705 6.82499 8.882ZM11 10H7.49999C7.22399 10 6.99999 10.224 6.99999 10.5C6.99999 10.776 7.22399 11 7.49999 11H11C11.276 11 11.5 10.776 11.5 10.5C11.5 10.224 11.276 10 11 10ZM15.784 3.973L14.053 12.973C13.827 14.148 12.795 15 11.598 15H2.67099C1.92299 15 1.21999 14.669 0.742988 14.092C0.265988 13.515 0.0739875 12.763 0.215988 12.028L1.94699 3.027C2.17299 1.852 3.20499 1 4.40199 1H13.329C14.077 1 14.78 1.331 15.257 1.908C15.734 2.485 15.926 3.237 15.784 3.972V3.973ZM14.485 2.545C14.199 2.198 13.778 2 13.329 2H4.40199C3.68399 2 3.06399 2.512 2.92899 3.217L1.19799 12.217C1.11299 12.657 1.22799 13.11 1.51399 13.455C1.79999 13.802 2.22099 14 2.66999 14H11.597C12.315 14 12.935 13.488 13.07 12.783L14.801 3.783C14.886 3.343 14.771 2.89 14.485 2.545Z`},child:[]}]})(e)}function Bd(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13.2812 11.1562C13.4479 11.2292 13.5729 11.3281 13.6562 11.4531C13.7396 11.5781 13.7995 11.7292 13.8359 11.9062C13.8568 12.0104 13.8802 12.1068 13.9062 12.1953C13.9323 12.2839 13.9635 12.3672 14 12.4453C14.0365 12.5234 14.0781 12.599 14.125 12.6719C14.1719 12.7448 14.2344 12.8255 14.3125 12.9141C14.3802 12.987 14.4401 13.0807 14.4922 13.1953C14.5443 13.3099 14.5703 13.4193 14.5703 13.5234C14.5703 13.6432 14.5391 13.7448 14.4766 13.8281C14.4141 13.9115 14.3359 13.9844 14.2422 14.0469C14.1224 14.1302 13.9974 14.2031 13.8672 14.2656C13.737 14.3281 13.6068 14.3932 13.4766 14.4609C13.263 14.5651 13.0781 14.6745 12.9219 14.7891C12.7656 14.9036 12.6094 15.0495 12.4531 15.2266C12.3698 15.3203 12.276 15.4115 12.1719 15.5C12.0677 15.5885 11.9531 15.6719 11.8281 15.75C11.7031 15.8281 11.5755 15.8854 11.4453 15.9219C11.3151 15.9583 11.1849 15.9818 11.0547 15.9922C10.7526 15.9922 10.5026 15.9401 10.3047 15.8359C10.1068 15.7318 9.9349 15.5417 9.78906 15.2656C9.7474 15.1875 9.70573 15.138 9.66406 15.1172C9.6224 15.0964 9.55469 15.0781 9.46094 15.0625C9.19531 15.0417 8.93229 15.0208 8.67188 15C8.41146 14.9792 8.14583 14.9688 7.875 14.9688C7.65625 14.9688 7.43229 14.987 7.20312 15.0234C6.97396 15.0599 6.7474 15.1042 6.52344 15.1562C6.47656 15.1667 6.42969 15.2057 6.38281 15.2734C6.33594 15.3411 6.27083 15.4167 6.1875 15.5C6.10417 15.5833 5.99219 15.6562 5.85156 15.7188C5.71094 15.7812 5.52604 15.8151 5.29688 15.8203C5.125 15.8203 4.9401 15.8021 4.74219 15.7656C4.54427 15.7292 4.36719 15.6693 4.21094 15.5859C3.88802 15.4245 3.57031 15.3151 3.25781 15.2578C2.94531 15.2005 2.61458 15.1484 2.26562 15.1016C2.14583 15.0859 2.03125 15.0651 1.92188 15.0391C1.8125 15.013 1.71615 14.9688 1.63281 14.9062C1.54948 14.8438 1.48438 14.7708 1.4375 14.6875C1.39062 14.6042 1.36458 14.487 1.35938 14.3359C1.35938 14.1745 1.38021 14.0182 1.42188 13.8672C1.46354 13.7161 1.48698 13.5573 1.49219 13.3906C1.49219 13.276 1.48438 13.1641 1.46875 13.0547C1.45312 12.9453 1.44271 12.8281 1.4375 12.7031C1.4375 12.4375 1.5 12.2422 1.625 12.1172C1.75 11.9922 1.93229 11.8932 2.17188 11.8203C2.28646 11.7839 2.38542 11.7344 2.46875 11.6719C2.55208 11.6094 2.63021 11.5417 2.70312 11.4688C2.77604 11.3958 2.84375 11.3151 2.90625 11.2266C2.96875 11.138 3.03906 11.0495 3.11719 10.9609C3.13281 10.9401 3.14062 10.9167 3.14062 10.8906C3.14062 10.8281 3.13802 10.7682 3.13281 10.7109C3.1276 10.6536 3.1224 10.5911 3.11719 10.5234C3.11719 10.1693 3.17188 9.8125 3.28125 9.45312C3.39062 9.09375 3.53385 8.74219 3.71094 8.39844C3.88802 8.05469 4.08594 7.72396 4.30469 7.40625C4.52344 7.08854 4.73958 6.79427 4.95312 6.52344C5.25521 6.13802 5.48177 5.73698 5.63281 5.32031C5.78385 4.90365 5.86198 4.45052 5.86719 3.96094C5.86719 3.7526 5.85677 3.54688 5.83594 3.34375C5.8151 3.14062 5.80469 2.93229 5.80469 2.71875C5.80469 2.30208 5.85156 1.92708 5.94531 1.59375C6.03906 1.26042 6.1849 0.973958 6.38281 0.734375C6.58073 0.494792 6.83854 0.315104 7.15625 0.195312C7.47396 0.0755208 7.85417 0.0104167 8.29688 0C8.82292 0 9.24219 0.104167 9.55469 0.3125C9.86719 0.520833 10.1068 0.794271 10.2734 1.13281C10.4401 1.47135 10.5469 1.84896 10.5938 2.26562C10.6406 2.68229 10.6667 3.10417 10.6719 3.53125V3.66406C10.6719 3.8776 10.6745 4.06771 10.6797 4.23438C10.6849 4.40104 10.7057 4.5651 10.7422 4.72656C10.7786 4.88802 10.8333 5.04948 10.9062 5.21094C10.9792 5.3724 11.0885 5.54688 11.2344 5.73438C11.4844 6.0625 11.7396 6.39323 12 6.72656C12.2604 7.0599 12.4974 7.40365 12.7109 7.75781C12.9245 8.11198 13.099 8.48177 13.2344 8.86719C13.3698 9.2526 13.4401 9.66927 13.4453 10.1172C13.4453 10.4766 13.3906 10.8229 13.2812 11.1562ZM6.72656 3.01562C6.79948 3.01562 6.85938 3.03385 6.90625 3.07031C6.95312 3.10677 6.98958 3.15625 7.01562 3.21875C7.04167 3.28125 7.0599 3.34375 7.07031 3.40625C7.08073 3.46875 7.08594 3.53385 7.08594 3.60156C7.08594 3.65365 7.07812 3.69531 7.0625 3.72656C7.04688 3.75781 7.02344 3.78646 6.99219 3.8125C6.96094 3.83854 6.92969 3.86458 6.89844 3.89062C6.86719 3.91667 6.83594 3.94792 6.80469 3.98438C6.76823 4.04167 6.71875 4.08854 6.65625 4.125C6.59375 4.16146 6.53385 4.20052 6.47656 4.24219C6.41927 4.28385 6.36719 4.32812 6.32031 4.375C6.27344 4.42188 6.25 4.48698 6.25 4.57031C6.25 4.61719 6.27344 4.65625 6.32031 4.6875C6.44531 4.77083 6.53385 4.8724 6.58594 4.99219C6.63802 5.11198 6.69531 5.22917 6.75781 5.34375C6.82031 5.45833 6.90104 5.55469 7 5.63281C7.09896 5.71094 7.2526 5.75 7.46094 5.75H7.50781C7.71615 5.73958 7.91406 5.6849 8.10156 5.58594C8.28906 5.48698 8.47656 5.38281 8.66406 5.27344C8.6901 5.25781 8.72396 5.24219 8.76562 5.22656C8.80729 5.21094 8.84115 5.19271 8.86719 5.17188L9.4375 4.72656C9.44792 4.6901 9.45573 4.65625 9.46094 4.625C9.46615 4.59375 9.47135 4.55729 9.47656 4.51562C9.47656 4.45833 9.46354 4.41146 9.4375 4.375C9.41146 4.33854 9.38021 4.30729 9.34375 4.28125C9.30729 4.25521 9.26302 4.23698 9.21094 4.22656C9.15885 4.21615 9.11198 4.20312 9.07031 4.1875C8.94531 4.16146 8.82812 4.11458 8.71875 4.04688C8.60938 3.97917 8.49479 3.92708 8.375 3.89062C8.35417 3.88542 8.33854 3.86979 8.32812 3.84375C8.31771 3.81771 8.30729 3.78646 8.29688 3.75C8.28646 3.71354 8.28385 3.67969 8.28906 3.64844C8.29427 3.61719 8.29167 3.59115 8.28125 3.57031C8.28125 3.50781 8.28646 3.44271 8.29688 3.375C8.30729 3.30729 8.33073 3.24219 8.36719 3.17969C8.40365 3.11719 8.44531 3.07031 8.49219 3.03906C8.53906 3.00781 8.60677 2.98958 8.69531 2.98438C8.85677 2.98438 8.97396 3.04427 9.04688 3.16406C9.11979 3.28385 9.15885 3.41406 9.16406 3.55469C9.16406 3.6224 9.15104 3.68229 9.125 3.73438C9.09896 3.78646 9.08594 3.84375 9.08594 3.90625C9.08594 3.94792 9.09896 3.97656 9.125 3.99219C9.15104 4.00781 9.1849 4.01823 9.22656 4.02344C9.34635 4.02344 9.42448 3.99479 9.46094 3.9375C9.4974 3.88021 9.51823 3.79427 9.52344 3.67969C9.52344 3.5599 9.51302 3.42708 9.49219 3.28125C9.47135 3.13542 9.42969 3 9.36719 2.875C9.30469 2.75 9.22396 2.64583 9.125 2.5625C9.02604 2.47917 8.89844 2.4375 8.74219 2.4375C8.47135 2.4375 8.27604 2.50521 8.15625 2.64062C8.03646 2.77604 7.97396 2.97917 7.96875 3.25C7.96875 3.32812 7.97396 3.40625 7.98438 3.48438C7.99479 3.5625 8 3.64062 8 3.71875C8 3.74479 7.9974 3.75781 7.99219 3.75781C7.98698 3.75781 7.97135 3.7526 7.94531 3.74219C7.91927 3.73177 7.88802 3.71875 7.85156 3.70312C7.8151 3.6875 7.77604 3.67448 7.73438 3.66406C7.69271 3.65365 7.65104 3.64844 7.60938 3.64844C7.59896 3.64844 7.57292 3.65104 7.53125 3.65625C7.48958 3.66146 7.44792 3.66406 7.40625 3.66406C7.33333 3.66406 7.29688 3.65104 7.29688 3.625C7.29688 3.54688 7.29167 3.44792 7.28125 3.32812C7.27083 3.20833 7.24479 3.08854 7.20312 2.96875C7.16146 2.84896 7.10938 2.75 7.04688 2.67188C6.98438 2.59375 6.89062 2.55208 6.76562 2.54688C6.67708 2.54688 6.60156 2.57552 6.53906 2.63281C6.47656 2.6901 6.42188 2.75781 6.375 2.83594C6.32812 2.91406 6.29948 3.0026 6.28906 3.10156C6.27865 3.20052 6.26823 3.28385 6.25781 3.35156C6.25781 3.38281 6.26302 3.4375 6.27344 3.51562C6.28385 3.59375 6.30208 3.67448 6.32812 3.75781C6.35417 3.84115 6.38281 3.91406 6.41406 3.97656C6.44531 4.03906 6.48177 4.07031 6.52344 4.07031C6.54948 4.07031 6.58333 4.05208 6.625 4.01562C6.66667 3.97917 6.6875 3.94531 6.6875 3.91406C6.6875 3.89844 6.67969 3.88802 6.66406 3.88281C6.64844 3.8776 6.63281 3.875 6.61719 3.875C6.58073 3.875 6.54948 3.85677 6.52344 3.82031C6.4974 3.78385 6.47656 3.74219 6.46094 3.69531C6.44531 3.64844 6.42969 3.59896 6.41406 3.54688C6.39844 3.49479 6.39323 3.45573 6.39844 3.42969C6.39844 3.32552 6.42188 3.23177 6.46875 3.14844C6.51562 3.0651 6.60156 3.02083 6.72656 3.01562ZM5.02344 15.1797C5.14844 15.1797 5.27083 15.1693 5.39062 15.1484C5.51042 15.1276 5.6224 15.0859 5.72656 15.0234C5.83073 14.9609 5.90885 14.8802 5.96094 14.7812C6.01302 14.6823 6.04427 14.5573 6.05469 14.4062C6.05469 14.3125 6.03906 14.2214 6.00781 14.1328C5.97656 14.0443 5.93229 13.9609 5.875 13.8828C5.8125 13.7839 5.74479 13.6901 5.67188 13.6016C5.59896 13.513 5.53125 13.4193 5.46875 13.3203C5.36979 13.1745 5.27344 13.0312 5.17969 12.8906C5.08594 12.75 4.99219 12.6016 4.89844 12.4453C4.8151 12.3099 4.73698 12.1745 4.66406 12.0391C4.59115 11.9036 4.5026 11.7708 4.39844 11.6406C4.33594 11.5625 4.26302 11.4922 4.17969 11.4297C4.09635 11.3672 4 11.3359 3.89062 11.3359C3.77604 11.3359 3.67708 11.3724 3.59375 11.4453C3.51042 11.5182 3.42448 11.6068 3.33594 11.7109C3.2474 11.8151 3.14844 11.9167 3.03906 12.0156C2.92969 12.1146 2.78906 12.1927 2.61719 12.25C2.48177 12.2917 2.3776 12.349 2.30469 12.4219C2.23177 12.4948 2.19531 12.6068 2.19531 12.7578C2.19531 12.862 2.20312 12.9661 2.21875 13.0703C2.23438 13.1745 2.24479 13.2786 2.25 13.3828C2.25 13.5234 2.22917 13.6562 2.1875 13.7812C2.14583 13.9062 2.125 14.0286 2.125 14.1484C2.125 14.2891 2.17448 14.388 2.27344 14.4453C2.3724 14.5026 2.48438 14.5417 2.60938 14.5625C2.76562 14.5885 2.91406 14.6094 3.05469 14.625C3.19531 14.6406 3.33333 14.6641 3.46875 14.6953C3.60417 14.7266 3.73958 14.7604 3.875 14.7969C4.01042 14.8333 4.15365 14.8906 4.30469 14.9688C4.33594 14.9844 4.38281 15.0026 4.44531 15.0234C4.50781 15.0443 4.57812 15.0677 4.65625 15.0938C4.73438 15.1198 4.80729 15.1406 4.875 15.1562C4.94271 15.1719 4.99219 15.1797 5.02344 15.1797ZM7.88281 14.2422C8.02865 14.2422 8.1849 14.2266 8.35156 14.1953C8.51823 14.1641 8.6849 14.1198 8.85156 14.0625C9.01823 14.0052 9.17708 13.9375 9.32812 13.8594C9.47917 13.7812 9.61458 13.6953 9.73438 13.6016C9.74479 13.5911 9.75521 13.5755 9.76562 13.5547C9.77604 13.5339 9.78385 13.513 9.78906 13.4922V13.4844C9.82031 13.3698 9.84635 13.2448 9.86719 13.1094C9.88802 12.974 9.90625 12.8359 9.92188 12.6953C9.9375 12.5547 9.95573 12.4167 9.97656 12.2812C9.9974 12.1458 10.0156 12.013 10.0312 11.8828C10.0521 11.7422 10.0781 11.6068 10.1094 11.4766C10.1406 11.3464 10.1823 11.224 10.2344 11.1094C10.2865 10.9948 10.3568 10.8932 10.4453 10.8047C10.5339 10.7161 10.6484 10.6328 10.7891 10.5547V10.5391L10.7812 10.5156C10.7812 10.4688 10.7969 10.4193 10.8281 10.3672C10.8594 10.3151 10.8984 10.2604 10.9453 10.2031C10.9922 10.1458 11.0417 10.1016 11.0938 10.0703C11.1458 10.0391 11.2005 10.013 11.2578 9.99219C11.2266 9.86719 11.1927 9.74219 11.1562 9.61719C11.1198 9.49219 11.0885 9.36719 11.0625 9.24219C11.0312 9.05469 11 8.89583 10.9688 8.76562C10.9375 8.63542 10.901 8.51562 10.8594 8.40625C10.8177 8.29688 10.7578 8.1901 10.6797 8.08594C10.6016 7.98177 10.5052 7.85677 10.3906 7.71094C10.3333 7.64323 10.2943 7.59115 10.2734 7.55469C10.2526 7.51823 10.237 7.45312 10.2266 7.35938C10.2214 7.32292 10.2057 7.25521 10.1797 7.15625C10.1536 7.05729 10.1198 6.94271 10.0781 6.8125C10.0365 6.68229 9.98958 6.54688 9.9375 6.40625C9.88542 6.26562 9.82812 6.13802 9.76562 6.02344C9.70312 5.90885 9.64583 5.8125 9.59375 5.73438C9.54167 5.65625 9.48698 5.61719 9.42969 5.61719C9.30469 5.61719 9.15625 5.66667 8.98438 5.76562C8.8125 5.86458 8.63021 5.97396 8.4375 6.09375C8.24479 6.21354 8.05729 6.32552 7.875 6.42969C7.69271 6.53385 7.52865 6.58333 7.38281 6.57812C7.22656 6.57812 7.08333 6.52865 6.95312 6.42969C6.82292 6.33073 6.70312 6.21615 6.59375 6.08594C6.48438 5.95573 6.39323 5.84375 6.32031 5.75C6.2474 5.65625 6.19271 5.60417 6.15625 5.59375C6.11458 5.59375 6.09115 5.625 6.08594 5.6875C6.08073 5.75 6.07812 5.82031 6.07812 5.89844V6.03125C6.07812 6.0625 6.07292 6.08333 6.0625 6.09375C6.00521 6.21354 5.94271 6.33073 5.875 6.44531C5.80729 6.5599 5.73958 6.67708 5.67188 6.79688C5.60417 6.91667 5.55208 7.03906 5.51562 7.16406C5.47917 7.28906 5.45833 7.41927 5.45312 7.55469C5.45312 7.63281 5.45833 7.71094 5.46875 7.78906C5.47917 7.86719 5.50521 7.94271 5.54688 8.01562L5.53125 8.04688C5.48958 8.10417 5.44531 8.15625 5.39844 8.20312C5.35156 8.25 5.30729 8.30469 5.26562 8.36719C5.07292 8.65365 4.9375 8.96354 4.85938 9.29688C4.78125 9.63021 4.73958 9.96875 4.73438 10.3125C4.73438 10.401 4.73958 10.4896 4.75 10.5781C4.76042 10.6667 4.76562 10.7552 4.76562 10.8438C4.76562 10.8698 4.76302 10.8984 4.75781 10.9297C4.7526 10.9609 4.75 10.9896 4.75 11.0156C4.83854 11.0208 4.94271 11.0573 5.0625 11.125C5.18229 11.1927 5.3125 11.2786 5.45312 11.3828C5.59375 11.487 5.72656 11.6068 5.85156 11.7422C5.97656 11.8776 6.09635 12.0104 6.21094 12.1406C6.32552 12.2708 6.40885 12.401 6.46094 12.5312C6.51302 12.6615 6.54688 12.7682 6.5625 12.8516C6.5625 12.987 6.52083 13.0964 6.4375 13.1797C6.35417 13.263 6.25 13.3307 6.125 13.3828C6.21354 13.5391 6.32292 13.6719 6.45312 13.7812C6.58333 13.8906 6.72396 13.9792 6.875 14.0469C7.02604 14.1146 7.1901 14.1641 7.36719 14.1953C7.54427 14.2266 7.71615 14.2422 7.88281 14.2422ZM11.0156 15.3516C11.125 15.3516 11.2318 15.3359 11.3359 15.3047C11.4974 15.2578 11.6458 15.1901 11.7812 15.1016C11.9167 15.013 12.0417 14.9036 12.1562 14.7734C12.2969 14.612 12.4453 14.4714 12.6016 14.3516C12.7578 14.2318 12.9349 14.1224 13.1328 14.0234C13.2214 13.9818 13.3073 13.9427 13.3906 13.9062C13.474 13.8698 13.5599 13.8255 13.6484 13.7734C13.7057 13.737 13.7604 13.6927 13.8125 13.6406C13.8646 13.5885 13.8906 13.526 13.8906 13.4531C13.8906 13.4115 13.8828 13.3724 13.8672 13.3359C13.8516 13.2995 13.8281 13.2604 13.7969 13.2188C13.7188 13.1094 13.651 13.0078 13.5938 12.9141C13.5365 12.8203 13.487 12.7214 13.4453 12.6172C13.4036 12.513 13.362 12.4089 13.3203 12.3047C13.2786 12.2005 13.2422 12.0833 13.2109 11.9531C13.2057 11.9271 13.1875 11.8932 13.1562 11.8516C13.0469 11.6953 12.8932 11.6172 12.6953 11.6172C12.6016 11.6172 12.513 11.6406 12.4297 11.6875C12.3464 11.7344 12.2578 11.7839 12.1641 11.8359C12.0703 11.888 11.9766 11.9375 11.8828 11.9844C11.7891 12.0312 11.6901 12.0547 11.5859 12.0547C11.4818 12.0547 11.3958 12.0286 11.3281 11.9766C11.2604 11.9245 11.2031 11.8542 11.1562 11.7656C11.1094 11.6771 11.0703 11.5911 11.0391 11.5078C11.0078 11.4245 10.9766 11.3385 10.9453 11.25C10.9036 11.3177 10.8568 11.3802 10.8047 11.4375C10.7526 11.4948 10.7109 11.5625 10.6797 11.6406C10.612 11.7969 10.5703 11.9714 10.5547 12.1641C10.5286 12.4661 10.4948 12.7604 10.4531 13.0469C10.4115 13.3333 10.3411 13.6198 10.2422 13.9062C10.2161 13.9896 10.1953 14.0807 10.1797 14.1797C10.1641 14.2786 10.1536 14.375 10.1484 14.4688C10.1484 14.724 10.2266 14.9349 10.3828 15.1016C10.5391 15.2682 10.75 15.3516 11.0156 15.3516Z`},child:[]}]})(e)}function Vd(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 3.00002C8.552 3.00002 9 3.44802 9 4.00002C9 4.09002 8.988 4.17602 8.966 4.25902L10 5.29302L11.35 3.94302L8.692 1.29102C8.511 1.11102 8.261 0.999023 7.986 0.999023C7.711 0.999023 7.459 1.11102 7.278 1.29302L6.64 1.93302L7.741 3.03402C7.824 3.01202 7.91 3.00002 8 3.00002ZM7.5 4.86602C7.201 4.69302 7 4.37002 7 4.00002C7 3.91002 7.012 3.82402 7.034 3.74102L5.933 2.64002L4.642 3.93502L7.5 6.79302V4.86602ZM8.5 6.79302L9.293 6.00002L8.5 5.20702V6.79302ZM14.706 7.29202L12.057 4.64902L10.706 6.00002L11.74 7.03402C11.823 7.01202 11.909 7.00002 11.999 7.00002C12.551 7.00002 12.999 7.44802 12.999 8.00002C12.999 8.55202 12.551 9.00002 11.999 9.00002C11.447 9.00002 10.999 8.55202 10.999 8.00002C10.999 7.91002 11.011 7.82402 11.033 7.74102L9.999 6.70702L8.706 8.00002L12.063 11.357L14.707 8.70602C14.887 8.52502 14.999 8.27602 14.999 8.00002C14.999 7.72402 14.887 7.47302 14.705 7.29202H14.706ZM3.936 4.64302L1.292 7.29402C1.112 7.47502 1 7.72502 1 8.00002C1 8.27502 1.112 8.52702 1.294 8.70802L3.943 11.351L7.294 8.00002L3.936 4.64302ZM8.5 11.134C8.799 11.307 9 11.63 9 12C9 12.552 8.552 13 8 13C7.448 13 7 12.552 7 12C7 11.63 7.201 11.307 7.5 11.134V9.20702L4.65 12.057L7.308 14.709C7.489 14.889 7.739 15.001 8.014 15.001C8.289 15.001 8.541 14.889 8.722 14.707L11.357 12.065L8.499 9.20702V11.134H8.5Z`},child:[]}]})(e)}function Hd(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M12.5 1H3.5C2.119 1 1 2.119 1 3.5V12.5C1 13.881 2.119 15 3.5 15H12.5C13.881 15 15 13.881 15 12.5V3.5C15 2.119 13.881 1 12.5 1ZM14 12.5C14 13.328 13.328 14 12.5 14H3.5C2.672 14 2 13.328 2 12.5V5H14V12.5ZM14 4H2V3.5C2 2.672 2.672 2 3.5 2H12.5C13.328 2 14 2.672 14 3.5V4ZM4 10.508V8.508C4 7.681 4.673 7.008 5.5 7.008C6.327 7.008 7 7.681 7 8.508C7 8.784 6.776 9.008 6.5 9.008C6.224 9.008 6 8.784 6 8.508C6 8.232 5.776 8.008 5.5 8.008C5.224 8.008 5 8.232 5 8.508V10.508C5 10.783 5.224 11.008 5.5 11.008C5.776 11.008 6 10.783 6 10.508C6 10.233 6.224 10.008 6.5 10.008C6.776 10.008 7 10.232 7 10.508C7 11.335 6.327 12.008 5.5 12.008C4.673 12.008 4 11.335 4 10.508ZM8 8.5C8 8.224 8.224 8 8.5 8C8.776 8 9 8.224 9 8.5C9 8.776 8.776 9 8.5 9C8.224 9 8 8.776 8 8.5ZM8 10.5C8 10.224 8.224 10 8.5 10C8.776 10 9 10.224 9 10.5C9 10.776 8.776 11 8.5 11C8.224 11 8 10.776 8 10.5ZM9.532 7.676C9.434 7.417 9.565 7.129 9.824 7.032C10.08 6.936 10.371 7.066 10.468 7.324L11.968 11.324C12.066 11.583 11.935 11.871 11.676 11.968C11.618 11.99 11.559 12 11.5 12C11.298 12 11.107 11.876 11.032 11.676L9.532 7.676Z`},child:[]}]})(e)}function Ud(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13.6547 3.56163L8.91789 0.749977C8.64251 0.586821 8.32832 0.500732 8.00824 0.500732C7.68816 0.500732 7.37396 0.586821 7.09859 0.749977L2.36178 3.56163C2.08017 3.7296 1.84714 3.96798 1.68561 4.25334C1.52408 4.53869 1.43963 4.86118 1.44055 5.18908V10.8124C1.43877 11.1395 1.52198 11.4614 1.68201 11.7467C1.84205 12.032 2.07344 12.2708 2.35351 12.4398L7.09032 15.2515C7.36569 15.4146 7.67989 15.5007 7.99997 15.5007C8.32005 15.5007 8.63424 15.4146 8.90962 15.2515L13.6464 12.4398C13.9265 12.2708 14.1579 12.032 14.3179 11.7467C14.478 11.4614 14.5612 11.1395 14.5594 10.8124V5.18908C14.562 4.86277 14.4801 4.54134 14.3215 4.25613C14.163 3.97091 13.9332 3.73164 13.6547 3.56163ZM9.98632 12.3423V12.7458C9.986 12.7706 9.97948 12.795 9.96735 12.8167C9.95522 12.8383 9.93786 12.8566 9.91685 12.8699L9.67704 13.0071C9.639 13.027 9.60757 13.0071 9.60757 12.9542V12.5573C9.43807 12.6405 9.24411 12.6593 9.06178 12.6102C9.04762 12.6007 9.03722 12.5866 9.03239 12.5703C9.02755 12.554 9.02859 12.5365 9.03532 12.5209L9.12132 12.1554C9.12866 12.1246 9.14542 12.0968 9.16928 12.076C9.17614 12.0693 9.18394 12.0638 9.19244 12.0594C9.19844 12.0568 9.20492 12.0555 9.21146 12.0555C9.218 12.0555 9.22447 12.0568 9.23048 12.0594C9.39772 12.1042 9.57586 12.0817 9.72665 11.9966C9.83381 11.9442 9.92481 11.8638 9.99003 11.764C10.0552 11.6641 10.0923 11.5485 10.0971 11.4293C10.0971 11.2242 9.98466 11.1382 9.71342 11.1366C9.36941 11.1366 9.05186 11.0704 9.04359 10.5626C9.04754 10.3458 9.09941 10.1325 9.19548 9.93807C9.29156 9.74363 9.42946 9.57286 9.5993 9.43798V9.02947C9.59918 9.00433 9.6055 8.97957 9.61767 8.95757C9.62982 8.93557 9.64742 8.91704 9.66877 8.90377L9.90032 8.75657C9.93835 8.73672 9.96978 8.75657 9.96978 8.81115V9.21967C10.1116 9.1551 10.2699 9.13603 10.423 9.16509C10.4389 9.17416 10.4508 9.18892 10.4563 9.20639C10.4618 9.22387 10.4605 9.24279 10.4527 9.25936L10.3717 9.62157C10.3648 9.64915 10.3505 9.67432 10.3303 9.69434C10.3236 9.70156 10.3158 9.7077 10.3072 9.71253C10.2959 9.71631 10.2837 9.71631 10.2724 9.71253C10.1232 9.6798 9.967 9.70523 9.83581 9.78365C9.74024 9.825 9.6584 9.89266 9.59984 9.97876C9.54127 10.0649 9.50839 10.1658 9.50503 10.2699C9.50503 10.4551 9.60261 10.5114 9.93009 10.518C10.3684 10.518 10.5569 10.7165 10.5619 11.1564C10.5578 11.384 10.5042 11.608 10.4048 11.8127C10.3054 12.0175 10.1626 12.1982 9.98632 12.3423ZM12.4672 11.6625C12.47 11.6795 12.4682 11.697 12.4617 11.7131C12.4553 11.7291 12.4446 11.7431 12.4308 11.7535L11.2334 12.4812C11.2278 12.4859 11.2208 12.4888 11.2135 12.4894C11.2062 12.4899 11.1989 12.4881 11.1926 12.4843C11.1864 12.4804 11.1815 12.4747 11.1787 12.4679C11.1759 12.4611 11.1754 12.4536 11.1771 12.4465V12.1372C11.1779 12.1206 11.1835 12.1046 11.1932 12.0911C11.2029 12.0775 11.2162 12.0671 11.2317 12.0611L12.411 11.3549C12.4165 11.3501 12.4235 11.3472 12.4308 11.3467C12.4381 11.3461 12.4455 11.3479 12.4517 11.3518C12.458 11.3556 12.4628 11.3614 12.4656 11.3682C12.4684 11.375 12.4689 11.3825 12.4672 11.3896V11.6625ZM13.2941 4.74749L8.81204 7.51614C8.25302 7.84692 7.84119 8.20913 7.84119 8.88227V14.403C7.84119 14.8066 8.00658 15.0646 8.25467 15.144C8.17284 15.1594 8.08984 15.1677 8.00658 15.1688C7.74336 15.1682 7.48514 15.0968 7.25902 14.9621L2.52221 12.1504C2.29224 12.0111 2.10222 11.8147 1.97064 11.5802C1.83907 11.3458 1.7704 11.0812 1.77133 10.8124V5.18908C1.77012 4.91994 1.83864 4.65508 1.97024 4.4203C2.10183 4.18552 2.292 3.98884 2.52221 3.84941L7.25902 1.03776C7.48434 0.904297 7.7414 0.833879 8.00328 0.833879C8.26516 0.833879 8.52222 0.904297 8.74754 1.03776L13.4843 3.84941C13.6772 3.96611 13.8422 4.12352 13.9679 4.31063C14.0936 4.49775 14.177 4.71006 14.2121 4.93272C14.0583 4.59863 13.7043 4.50601 13.2925 4.74749H13.2941Z`},child:[]}]})(e)}function Wd(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.97553 0C3.57186 0 0 3.57186 0 7.97553C0 11.4985 2.29969 14.4832 5.43119 15.5596C5.82263 15.6086 5.96942 15.3639 5.96942 15.1682C5.96942 14.9725 5.96942 14.4832 5.96942 13.7982C3.76758 14.2875 3.27829 12.7217 3.27829 12.7217C2.93578 11.792 2.39755 11.5474 2.39755 11.5474C1.66361 11.0581 2.44648 11.0581 2.44648 11.0581C3.22936 11.107 3.66972 11.8899 3.66972 11.8899C4.40367 13.1131 5.52905 12.7706 5.96942 12.5749C6.01835 12.0367 6.263 11.6942 6.45872 11.4985C4.69725 11.3028 2.83792 10.6177 2.83792 7.53517C2.83792 6.65443 3.1315 5.96942 3.66972 5.38226C3.6208 5.23547 3.32722 4.40367 3.76758 3.32722C3.76758 3.32722 4.4526 3.1315 5.96942 4.15902C6.6055 3.9633 7.29052 3.91437 7.97553 3.91437C8.66055 3.91437 9.34556 4.01223 9.98165 4.15902C11.4985 3.1315 12.1835 3.32722 12.1835 3.32722C12.6239 4.40367 12.3303 5.23547 12.2813 5.43119C12.7706 5.96942 13.1131 6.70336 13.1131 7.5841C13.1131 10.6667 11.2538 11.3028 9.49235 11.4985C9.78593 11.7431 10.0306 12.2324 10.0306 12.9664C10.0306 14.0428 10.0306 14.8746 10.0306 15.1682C10.0306 15.3639 10.1774 15.6086 10.5688 15.5596C13.7492 14.4832 16 11.4985 16 7.97553C15.9511 3.57186 12.3792 0 7.97553 0Z`},child:[]}]})(e)}function Gd(e){return q({tag:`svg`,attr:{viewBox:`0 0 24 25`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M21.0346 5.82524C21.9445 6.91709 22.3994 8.19091 22.3994 9.64671C22.3994 14.924 19.3969 16.4707 16.5763 16.9257C16.9402 17.5626 17.0312 18.2905 17.0312 19.0184V22.7489C17.0312 23.2038 16.7582 23.4768 16.3943 23.4768C16.0303 23.4768 15.6664 23.2038 15.6664 22.7489V19.0184C15.7574 18.1995 15.4844 17.4716 14.9385 16.9257L15.3934 15.7428C18.214 15.3789 21.1256 14.469 21.1256 9.55572C21.1256 8.37289 20.6707 7.28104 19.8518 6.37117L19.6698 5.64327C20.0338 4.7334 20.0338 3.73254 19.7608 2.91365C19.3059 3.00464 18.396 3.18661 16.8492 4.27846L16.3033 4.36945C14.1196 3.82352 11.9359 3.82352 9.75222 4.36945L9.2063 4.27846C7.56853 3.2776 6.65866 3.00464 6.20372 3.00464C5.93076 3.91451 5.93076 4.91537 6.29471 5.73426L6.11274 6.46215C5.20286 7.37203 4.74793 8.55486 4.74793 9.64671C4.74793 14.469 7.47754 15.4699 10.4801 15.8338L10.8441 17.0167C10.2981 17.5626 10.0252 18.2905 10.1162 19.0184V19.9283V20.0192V22.8399C10.1162 23.2038 9.84321 23.5677 9.38828 23.5677C9.02433 23.5677 8.66038 23.2948 8.66038 22.8399V20.7471C5.6578 21.3841 4.47497 19.8373 3.5651 18.6544C3.11016 18.1085 2.74621 17.6536 2.29127 17.5626C2.20029 17.4716 1.92733 17.1077 2.01831 16.7437C2.1093 16.3798 2.47325 16.1068 2.8372 16.2888C3.74707 16.4707 4.29299 17.1986 4.83892 17.8356C5.6578 18.9274 6.47669 19.9283 8.93334 19.3823V19.0184C8.84235 18.2905 9.02433 17.5626 9.38828 16.9257C6.65866 16.3798 3.47411 14.833 3.47411 9.64671C3.47411 8.19091 3.92904 6.91709 4.83892 5.82524C4.56595 4.55142 4.65694 3.18661 5.11188 2.09477L5.56681 1.73082C5.74879 1.63983 7.02261 1.36687 9.66124 3.00464C11.8449 2.45872 14.1196 2.45872 16.3033 3.00464C18.8509 1.27588 20.2158 1.54884 20.3977 1.63983L20.8527 2.00378C21.3076 3.2776 21.3986 4.55142 21.0346 5.82524Z`},child:[]}]})(e)}function Kd(e){return q({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.3702 13.6799L11.3702 1.67989C11.3006 1.47291 11.1652 1.29438 10.9846 1.17159C10.804 1.0488 10.5882 0.988513 10.3702 0.999896H5.63017C5.42052 0.999354 5.21598 1.0647 5.04551 1.18672C4.87504 1.30875 4.74724 1.48127 4.68015 1.67989L0.630165 13.6799C0.577646 13.8346 0.56382 13.9998 0.589943 14.1611C0.616066 14.3225 0.681335 14.4749 0.780007 14.6052C0.878678 14.7354 1.00778 14.8395 1.15598 14.9083C1.30419 14.9771 1.46699 15.0086 1.63017 14.9999H4.56016C4.76809 14.9984 4.97035 14.932 5.13883 14.8101C5.30731 14.6883 5.43363 14.5169 5.50016 14.3199L6.11015 12.5399L9.11015 14.8099C9.28448 14.9362 9.49495 15.0028 9.71018 14.9999H14.3902C14.5517 15.0052 14.7121 14.9712 14.8576 14.901C15.0032 14.8307 15.1295 14.7263 15.2259 14.5965C15.3222 14.4668 15.3856 14.3156 15.4107 14.156C15.4359 13.9963 15.422 13.833 15.3702 13.6799ZM9.75016 14.3399C9.67748 14.3399 9.60693 14.3153 9.55015 14.2699L3.90018 10.0799L3.81016 10.0099H6.81016L6.89017 9.79988L7.89017 7.26988L10.1302 13.8999C10.1482 13.9555 10.1515 14.0148 10.1399 14.072C10.1283 14.1293 10.1022 14.1826 10.064 14.2269C10.0258 14.2711 9.97689 14.3047 9.92191 14.3245C9.86694 14.3443 9.80778 14.3496 9.75016 14.3399ZM14.4201 14.3399H10.7002C10.7749 14.1262 10.7749 13.8935 10.7002 13.6799L6.65018 1.67989H10.3702C10.4408 1.68024 10.5095 1.70258 10.5669 1.74379C10.6242 1.78501 10.6673 1.84308 10.6902 1.9099L14.7402 13.9099C14.7538 13.9597 14.756 14.012 14.7464 14.0628C14.7369 14.1136 14.7159 14.1615 14.6851 14.203C14.6542 14.2444 14.6144 14.2783 14.5685 14.302C14.5226 14.3257 14.4718 14.3387 14.4201 14.3399Z`},child:[]}]})(e)}var qd={computer:{icon:(0,W.jsx)(V,{icon:xo}),group:`Devices`},laptop:{icon:(0,W.jsx)(V,{icon:Io}),group:`Devices`},server:{icon:(0,W.jsx)(V,{icon:ns}),group:`Devices`},cloud:{icon:(0,W.jsx)(V,{icon:yo}),group:`Devices`},home:{icon:(0,W.jsx)(V,{icon:No}),group:`Devices`},office:{icon:(0,W.jsx)(V,{icon:co}),group:`Devices`},drive:{icon:(0,W.jsx)(V,{icon:jo}),group:`Devices`},raspberrypi:{icon:(0,W.jsx)(od,{size:24}),group:`Devices`},macos:{icon:(0,W.jsx)(V,{icon:Za,viewBox:`1.5 1.5 21 21`}),group:`Apple`},finder:{icon:(0,W.jsx)(J,{size:24}),group:`Apple`},apple:{icon:(0,W.jsx)(V,{icon:Qa}),group:`Apple`},applelogo:{icon:(0,W.jsx)(Yu,{size:24,viewBox:`-52 12 489 489`}),group:`Apple`},appletfi:{icon:(0,W.jsx)(Id,{size:24,viewBox:`-0.77 -0.77 18.54 18.54`}),group:`Apple`},appstore:{icon:(0,W.jsx)($u,{size:24}),group:`Apple`},appstoreoutline:{icon:(0,W.jsx)(V,{icon:Xa}),group:`Apple`},windows:{icon:(0,W.jsx)(V,{icon:Ho}),group:`Windows`},windowslogo:{icon:(0,W.jsx)(Gu,{size:24}),group:`Windows`},microsoft:{icon:(0,W.jsx)(qu,{size:24}),group:`Windows`},wsl:{icon:(0,W.jsx)(`svg`,{viewBox:`0 0 380 380`,width:24,height:24,fill:`currentColor`,children:(0,W.jsxs)(`g`,{transform:`translate(0,380) scale(0.1,-0.1)`,children:[(0,W.jsx)(`path`,{d:`M1693 3780 c-70 -10 -285 -65 -311 -80 -9 -6 -52 -25 -94 -44 -388 -173 -699 -573 -785 -1011 -16 -82 -18 -192 -20 -1305 -3 -1172 -3 -1216 15 -1250 11 -19 37 -45 58 -57 l39 -23 1297 0 c895 0 1305 3 1325 11 38 14 72 47 89 88 22 53 21 2278 -2 2441 -21 159 -65 304 -133 445 -132 273 -346 494 -613 635 -119 62 -201 93 -336 126 -91 22 -135 27 -287 29 -99 2 -208 0 -242 -5z m-278 -811 c139 -37 261 -135 321 -259 50 -102 56 -155 54 -429 -1 -135 -2 -250 -1 -256 1 -6 45 -10 111 -10 l110 0 0 281 c0 253 2 289 20 346 60 196 253 338 460 338 133 0 255 -55 350 -157 68 -73 92 -114 114 -200 23 -89 24 -1202 1 -1354 -57 -376 -307 -694 -655 -832 -153 -61 -212 -71 -400 -72 -169 0 -179 1 -289 33 -294 84 -516 263 -664 532 -38 70 -90 219 -108 309 -7 35 -13 289 -16 688 -4 568 -3 638 12 690 62 215 249 361 465 362 41 1 93 -4 115 -10z`}),(0,W.jsx)(`path`,{d:`M1210 2594 c-120 -52 -173 -198 -116 -320 50 -108 185 -162 292 -118 121 50 179 172 142 295 -15 52 -73 117 -122 140 -50 23 -147 24 -196 3z`}),(0,W.jsx)(`path`,{d:`M2383 2589 c-72 -35 -133 -133 -133 -212 0 -121 116 -237 239 -237 86 0 172 53 212 131 23 46 26 153 5 202 -19 45 -94 115 -136 127 -60 17 -141 12 -187 -11z`}),(0,W.jsx)(`path`,{d:`M2345 1572 c-19 -18 -148 -63 -238 -84 -70 -16 -125 -21 -232 -20 -144 0 -215 11 -344 53 -53 18 -65 19 -73 8 -8 -11 -9 -10 -4 3 3 10 1 20 -4 23 -14 9 -12 -58 3 -131 26 -121 112 -228 240 -296 l82 -43 120 0 c117 0 122 1 197 37 106 50 171 114 219 212 21 43 41 97 44 120 9 57 3 130 -10 118z`})]})}),group:`Windows`},powershell:{icon:(0,W.jsx)(zd,{size:24}),group:`Windows`},cmd:{icon:(0,W.jsx)(Hd,{size:24}),group:`Windows`},linux:{icon:(0,W.jsx)(Bd,{size:24}),group:`Linux & BSD`},ubuntu:{icon:(0,W.jsx)(nd,{size:24}),group:`Linux & BSD`},ubuntufa:{icon:(0,W.jsx)(Ku,{size:24}),group:`Linux & BSD`},ubuntufa6:{icon:(0,W.jsx)(Zu,{size:24}),group:`Linux & BSD`},linuxmint:{icon:(0,W.jsx)(hd,{size:24}),group:`Linux & BSD`},archlinux:{icon:(0,W.jsx)(Nd,{size:24}),group:`Linux & BSD`},garuda:{icon:(0,W.jsx)(Cd,{size:24}),group:`Linux & BSD`},kali:{icon:(0,W.jsx)(_d,{size:24}),group:`Linux & BSD`},debian:{icon:(0,W.jsx)(kd,{size:24}),group:`Linux & BSD`},fedora:{icon:(0,W.jsx)(Td,{size:24}),group:`Linux & BSD`},centos:{icon:(0,W.jsx)(Ad,{size:24}),group:`Linux & BSD`},redhat:{icon:(0,W.jsx)(id,{size:24}),group:`Linux & BSD`},opensuse:{icon:(0,W.jsx)(ud,{size:24}),group:`Linux & BSD`},manjaro:{icon:(0,W.jsx)(md,{size:24}),group:`Linux & BSD`},nixos:{icon:(0,W.jsx)(fd,{size:24}),group:`Linux & BSD`},popos:{icon:(0,W.jsx)(ld,{size:24}),group:`Linux & BSD`},alpine:{icon:(0,W.jsx)(Pd,{size:24}),group:`Linux & BSD`},gentoo:{icon:(0,W.jsx)(Sd,{size:24}),group:`Linux & BSD`},freebsd:{icon:(0,W.jsx)(wd,{size:24}),group:`Linux & BSD`},docker:{icon:(0,W.jsx)(Ed,{size:24}),group:`Hosting`},proxmox:{icon:(0,W.jsx)(cd,{size:24}),group:`Hosting`},digitalocean:{icon:(0,W.jsx)(Dd,{size:24}),group:`Hosting`},hetzner:{icon:(0,W.jsx)(xd,{size:24}),group:`Hosting`},azure:{icon:(0,W.jsx)(Kd,{size:24}),group:`Hosting`},asus:{icon:(0,W.jsx)(jd,{size:24}),group:`Brands`},dell:{icon:(0,W.jsx)(Od,{size:24}),group:`Brands`},hp:{icon:(0,W.jsx)(bd,{size:24}),group:`Brands`},hpi:{icon:(0,W.jsx)(Qu,{size:24}),group:`Brands`},lenovo:{icon:(0,W.jsx)(gd,{size:24}),group:`Brands`},acer:{icon:(0,W.jsx)(Fd,{size:24}),group:`Brands`},msi:{icon:(0,W.jsx)(pd,{size:24}),group:`Brands`},razer:{icon:(0,W.jsx)(ad,{size:24}),group:`Brands`},samsung:{icon:(0,W.jsx)(rd,{size:24}),group:`Brands`},huawei:{icon:(0,W.jsx)(yd,{size:24}),group:`Brands`},xiaomi:{icon:(0,W.jsx)(td,{size:24}),group:`Brands`},intel:{icon:(0,W.jsx)(vd,{size:24}),group:`Brands`},amd:{icon:(0,W.jsx)(Wu,{size:24}),group:`Brands`},nvidia:{icon:(0,W.jsx)(dd,{size:24}),group:`Brands`},arm:{icon:(0,W.jsx)(Md,{size:24}),group:`Brands`},qualcomm:{icon:(0,W.jsx)(sd,{size:24}),group:`Brands`},android:{icon:(0,W.jsx)(V,{icon:Ya}),group:`Other`},chrome:{icon:(0,W.jsx)(Ju,{size:24}),group:`Other`},vscode:{icon:(0,W.jsx)(Ld,{size:24}),group:`Other`},github:{icon:(0,W.jsx)(Wd,{size:24}),group:`Other`},githubalt:{icon:(0,W.jsx)(Gd,{size:24}),group:`Other`},terminal:{icon:(0,W.jsx)(Rd,{size:24}),group:`Other`},bash:{icon:(0,W.jsx)(Ud,{size:24}),group:`Other`},gitbash:{icon:(0,W.jsx)(Vd,{size:24}),group:`Other`},zsh:{icon:(0,W.jsx)(ed,{size:24}),group:`Other`},fish:{icon:(0,W.jsx)(Xu,{size:24}),group:`Other`}},Jd=[`macos`,`windows`,`linux`];function Yd(e){if(e.icon===null)return(0,U.cloneElement)(qd.computer.icon,{className:e.className});let t=qd[e.icon];return t===void 0?(0,W.jsx)(V,{icon:Mo,className:e.className}):(0,U.cloneElement)(t.icon,{className:e.className})}async function Xd(e,t){if(t.size>52428800)throw Error(`File is larger than 50 MB`);return r(e,`files.upload`,{name:t.name,data:await Zd(t)})}function Zd(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=String(r.result);t(e.slice(e.indexOf(`,`)+1))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function Qd(e){return(0,W.jsx)(`div`,{className:B(`mx-auto w-full`,e.width===`chat`&&`max-w-[min(var(--chat-content-max-width),calc(100%-2*var(--wrapper-gutter)))]`,e.width===`composer`&&`flex min-h-0 max-w-[calc(min(var(--chat-content-max-width),calc(100%-2*var(--wrapper-gutter)))+0.75rem)] flex-col`,e.className),children:e.children})}function $d(e){let t=L(e.draftKey).images;return(0,W.jsx)(`div`,{className:`mb-3 flex flex-wrap gap-2 px-3 sm:px-4`,children:t.map(t=>(0,W.jsxs)(`div`,{className:`border-border/80 bg-background relative size-16 overflow-hidden rounded-lg border`,children:[(0,W.jsx)(dn,{src:`data:${t.mediaType};base64,${t.data}`,alt:``,name:`Image #${t.number}`,className:`block size-full`,imageClassName:`size-full object-cover`}),(0,W.jsx)(`button`,{className:`absolute top-1 right-1 grid size-5 cursor-pointer place-items-center rounded-full bg-black/60 text-white`,title:`Remove image`,onClick:()=>kt(e.draftKey,e=>({...e,text:e.text.replace(RegExp(`\\[Image #${t.number}\\] ?`),``),images:e.images.filter(e=>e.number!==t.number)})),children:(0,W.jsx)(V,{icon:mt,className:`size-3`})})]},t.number))})}function ef(e,t){let n=0;for(let r of[...t,...e.flatMap(e=>e.parent===null?e.kind===`user`?[e.text]:e.kind===`question`&&e.answers!==null?Object.values(e.answers):[]:[])])for(let e of r.matchAll(/\[Image #(\d+)\]/g))n=Math.max(n,Number(e[1]));return n}function tf(e){let t=[...new Set([...e.text.matchAll(/\[Image #(\d+)\]/g)].map(e=>Number(e[1])))].sort((e,t)=>e-t);if(t.length===e.images.length)return{text:e.text,images:e.images.map((e,n)=>({...e,number:t[n]}))};let n=Math.max(0,...t)+1,r=e.images.map((e,t)=>({...e,number:n+t}));return{text:`${r.map(e=>`[Image #${e.number}] `).join(``)}${e.text}`,images:r}}function nf(e,t){if(new Blob([e]).size<32768)return null;let n=Math.max(0,...t.map(e=>e.number))+1;return new File([e],`pasted-text-${n}.txt`,{type:`text/plain`})}function rf(e){return(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.key.toLowerCase()===`v`}function af(e){let t=(0,U.useRef)(null);return(0,U.useLayoutEffect)(()=>{t.current?.querySelector(`[data-active="true"]`)?.scrollIntoView({block:`nearest`})},[e.active]),(0,W.jsx)(`div`,{ref:t,className:`composer-glass mx-auto -mb-[calc(1rem+1px)] max-h-72 w-[calc(100%-2.75rem)] overflow-y-auto rounded-t-2xl border border-b-0 border-(--composer-outline) p-1 pb-[calc(1rem+1px+0.25rem)]`,children:e.items.map((t,n)=>(0,W.jsxs)(`button`,{"data-active":n===e.active,className:B(`flex min-h-7 w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-left`,n===e.active&&`bg-accent`),onMouseEnter:()=>e.onHover(n),onMouseDown:n=>{n.preventDefault(),e.onPick(t)},children:[(0,W.jsx)(V,{icon:t.insert.startsWith(`/`)?us:To,className:`text-muted-foreground size-4 shrink-0`}),(0,W.jsx)(`span`,{className:`shrink-0 text-xs font-medium`,children:t.label}),(0,W.jsx)(`span`,{className:`text-secondary-label min-w-0 truncate text-xs`,children:t.description})]},t.key))})}function of(e){pe(e),Gi(`Prompt stashed`,{description:`${Ft}+S in an empty composer brings it back`})}function sf(e,t){let n=C(e,t,ef(z().items,[]));requestAnimationFrame(()=>{let e=document.querySelector(`[data-composer]`);if(e===null)throw Error(`the composer is not mounted`);e.focus(),e.setSelectionRange(n.length,n.length)})}function cf(e){if(ce(o(e))){of(e);return}let t=v().at(0);t!==void 0&&sf(e,t.id)}function lf(e){return(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&e.key.toLowerCase()===`s`}var uf={claude:[{value:`default`,label:`Ask before edits`,icon:as},{value:`acceptEdits`,label:`Accept edits`,icon:Eo},{value:`plan`,label:`Plan mode`,icon:zo},{value:`auto`,label:`Auto mode`,icon:or},{value:`bypassPermissions`,label:`Bypass permissions`,icon:os}],codex:[{value:`read-only`,label:`Read only`,icon:as},{value:`auto`,label:`Auto`,icon:Eo},{value:`full-access`,label:`Full access`,icon:os}]};function df(e,t){return e===`opencode`?(t?.agents??[]).map(e=>({value:e.id,label:e.name,icon:e.id===`plan`?zo:Eo})):uf[e]}function ff(e){let t=O(e=>e.settings),n=O(e=>e.context),r=O(e=>e.capabilities),i=df(t.provider,r),a=i.find(e=>e.value===t.mode),o=t.provider===`opencode`?`Agent`:`Permission mode`,[s,c]=(0,U.useState)(!1),l=he(),u=O(e=>e.selection===null?``:Fe(e.selection)),d=L(u);return(0,W.jsxs)(pn,{open:s,onOpenChange:c,children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,title:`More`,"aria-label":`More composer controls`,children:(0,W.jsx)(V,{icon:On})})}),(0,W.jsxs)(on,{className:`w-56`,side:`top`,align:`end`,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:[(0,W.jsxs)(bn,{children:[(0,W.jsxs)(rn,{children:[(0,W.jsx)(V,{icon:a?.icon??as}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a?.label??`Default`})]}),(0,W.jsx)(_r,{children:(0,W.jsxs)(Sn,{className:`w-56`,children:[(0,W.jsx)(hn,{children:o}),(0,W.jsx)(Xt,{value:t.mode??``,children:i.map(e=>(0,W.jsxs)(xn,{value:e.value,onSelect:()=>Ze({mode:e.value}),children:[(0,W.jsx)(V,{icon:e.icon}),e.label]},e.value))})]})})]}),t.provider===`codex`&&(0,W.jsxs)(nn,{checked:t.plan,onCheckedChange:e=>Ze({plan:e}),children:[(0,W.jsx)(V,{icon:zo}),`Plan first`]}),n!==null&&(0,W.jsxs)(`div`,{className:`flex min-h-7 items-center gap-2 px-2 py-1 text-sm [&_svg]:size-4`,children:[(0,W.jsx)(V,{icon:uo}),(0,W.jsx)(`span`,{className:`flex-1`,children:`Context`}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:_n(n.tokens)}),(0,W.jsx)(H,{variant:`outline`,size:`xs`,onClick:()=>{c(!1),Pe({text:`/compact`,images:[]},`queue`,z().selection,z().settings).catch(ae)},children:`Compact`})]}),(0,W.jsx)(an,{}),(0,W.jsxs)(ln,{disabled:!ce(d),onSelect:()=>of(u),children:[(0,W.jsx)(V,{icon:eo}),(0,W.jsx)(`span`,{className:`flex-1`,children:`Stash prompt`}),(0,W.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[Ft,`+S`]})]}),l.length>0&&(0,W.jsxs)(bn,{children:[(0,W.jsxs)(rn,{children:[(0,W.jsx)(V,{icon:$a}),(0,W.jsx)(`span`,{className:`flex-1`,children:`Stashed prompts`}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:l.length})]}),(0,W.jsx)(_r,{children:(0,W.jsx)(Sn,{className:`max-h-80 w-72 overflow-y-auto`,children:l.map(e=>{let t=e.images.length+e.files.length,n=e.text.trim().split(`
|
|
11
|
+
`)[0];return(0,W.jsxs)(ln,{className:`items-start`,onSelect:()=>sf(u,e.id),onKeyDown:t=>{(t.key===`Delete`||t.key===`Backspace`)&&(t.preventDefault(),P(e.id))},children:[(0,W.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`span`,{className:`block truncate`,children:n===``?`Attachments`:n}),(0,W.jsxs)(`span`,{className:`text-muted-foreground block text-xs`,children:[tn(e.createdAt),t>0&&` · ${t} attachment${t===1?``:`s`}`]})]}),(0,W.jsx)(H,{variant:`ghost-muted`,size:`icon-micro`,"aria-label":`Delete stashed prompt`,title:`Delete`,onClick:t=>{t.preventDefault(),t.stopPropagation(),P(e.id)},children:(0,W.jsx)(V,{icon:lo})})]},e.id)})})})]}),e.delivery!==null&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(an,{}),(0,W.jsxs)(ln,{disabled:e.empty,onSelect:e.onSubmit,children:[(0,W.jsx)(V,{icon:e.delivery===`steer`?Qo:ts}),(0,W.jsxs)(`span`,{className:`flex-1`,children:[e.delivery===`steer`&&`Queue`,e.delivery===`queue`&&`Send now`]}),(0,W.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[Ft,`+Enter`]})]})]})]})]})}function pf(e){let t=e.item;switch(t.kind){case`file_change`:return(0,W.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.diffs.map((e,t)=>(0,W.jsx)(yf,{before:e.before,after:e.after},t))});case`todo_list`:return(0,W.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm`,children:t.steps.map((e,t)=>(0,W.jsxs)(`li`,{className:B(`text-secondary-label`,e.status===`completed`&&`text-muted-foreground line-through`,e.status===`running`&&`text-foreground`),children:[e.status===`completed`?`☑`:`☐`,` `,e.text]},t))});case`plan`:return(0,W.jsx)(fn,{text:t.plan});case`tool`:return hf(t.name)===`other`?(0,W.jsx)(vf,{text:JSON.stringify(t.input,null,2)}):null;default:return null}}function mf(e,t){switch(e.kind){case`command`:return e.command;case`file_change`:return xf(e.path,t);case`web_search`:return e.url??e.query??``;case`subagent`:return e.description;case`skill`:return e.skill;case`tool`:{let n=hf(e.name);return n===`read`?xf(gf(e.input),t):n===`search`?bf(e.input.pattern):``}default:return``}}function hf(e){switch(e.toLowerCase()){case`read`:return`read`;case`grep`:case`glob`:return`search`;default:return`other`}}function gf(e){return[e.file_path,e.filePath,e.path].map(bf).find(e=>e!==``)??``}function _f(e){let t=0,n=0;for(let r of e.diffs)for(let e of Tr(r.before,r.after))e.added&&(t+=e.count),e.removed&&(n+=e.count);return{added:t,removed:n}}function vf(e){return(0,W.jsx)(`pre`,{className:`text-foreground/80 text-2xs max-h-64 overflow-auto font-mono leading-relaxed whitespace-pre-wrap`,children:e.text})}function yf(e){return(0,W.jsx)(`pre`,{className:`border-border/60 text-2xs max-h-80 overflow-auto rounded-md border font-mono leading-relaxed`,children:Tr(e.before,e.after).flatMap((e,t)=>e.value.replace(/\n$/,``).split(`
|
|
12
|
+
`).map((n,r)=>(0,W.jsxs)(`div`,{className:B(`px-2 whitespace-pre-wrap`,e.added&&`bg-diff-addition/10 text-diff-addition`,e.removed&&`bg-diff-deletion/10 text-diff-deletion`,!e.added&&!e.removed&&`text-muted-foreground`),children:[e.added?`+`:e.removed?`-`:` `,` `,n]},`${t}:${r}`)))})}function bf(e){return typeof e==`string`?e:``}function xf(e,t){return e.startsWith(t+`/`)||e.startsWith(t+`\\`)?e.slice(t.length+1):e}var Sf=`(Recommended)`;function Cf(e){let t=e.options.map(e=>e.label).filter(e=>e.endsWith(Sf));return e.multiSelect?t:t.slice(0,1)}function wf(e){return(0,W.jsxs)(`span`,{className:B(`mt-0.5 grid size-4 shrink-0 place-items-center border transition-colors`,e.multi?`rounded`:`rounded-full`,e.selected&&`border-primary bg-primary text-primary-foreground`,e.suggested&&`border-primary border-dashed`,!e.selected&&!e.suggested&&`border-muted-foreground/40`),children:[e.selected&&e.multi&&(0,W.jsx)(V,{icon:qn,strokeWidth:3,className:`size-3`}),e.selected&&!e.multi&&(0,W.jsx)(`span`,{className:`bg-primary-foreground size-1.5 rounded-full`})]})}function Tf(e){let[t,n]=(0,U.useState)(Date.now);(0,U.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]);let r=Math.max(0,Math.ceil((e.at-t)/1e3));return(0,W.jsxs)(`span`,{className:`text-muted-foreground text-2xs mr-1 tabular-nums`,children:[e.label,` in`,` `,r<60?`${r}s`:`${Math.ceil(r/60)}m`]})}var Ef=`composer-glass relative mx-auto -mb-[calc(1rem+1px)] w-[calc(100%-2.75rem)] rounded-t-2xl border border-b-0 px-1 pt-1 pb-[calc(1rem+1px+0.25rem)] text-xs/4`;function Df(e){let t=e.request;if(t.kind===`question`)return(0,W.jsx)(Of,{machine:e.machine,request:t,draft:e.draft});let n=t.kind===`plan`,r=n?``:mf(t.item,e.cwd);return(0,W.jsx)(`div`,{className:B(Ef,`border-warning/28 bg-linear-to-b from-warning/8 to-warning/8`),children:(0,W.jsxs)(`div`,{className:`grid grid-cols-[1.5rem_minmax(0,1fr)_auto] items-start gap-x-2 gap-y-3 px-1 py-1`,children:[(0,W.jsx)(`span`,{className:`text-warning flex justify-center pt-0.5`,children:(0,W.jsx)(V,{icon:is,className:`size-4`})}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start gap-1`,children:[(0,W.jsxs)(`span`,{className:`text-muted-foreground text-2xs flex w-full min-w-0 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`text-warning shrink-0 font-medium`,children:n?`Ready to code?`:t.title}),e.count>1&&(0,W.jsxs)(`span`,{className:`ml-auto shrink-0 tabular-nums`,children:[`1/`,e.count]})]}),r!==``&&(0,W.jsx)(`span`,{className:`text-foreground block max-h-20 w-full min-w-0 overflow-auto font-mono text-xs whitespace-pre`,children:r})]}),(0,W.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[t.autoResolve!==void 0&&(0,W.jsx)(Tf,{label:t.autoResolve.decision===`allow`?`Approve`:`Decline`,at:t.autoResolve.at}),(0,W.jsx)(H,{size:`xs`,variant:`outline`,onClick:()=>Le(t.id,`deny`,null),children:n?`Keep planning`:`Decline`}),t.kind===`approval`&&t.canAlwaysAllow&&(0,W.jsx)(H,{size:`xs`,variant:`outline`,onClick:()=>Le(t.id,`always`,null),children:`Always`}),(0,W.jsx)(H,{size:`xs`,onClick:()=>Le(t.id,`allow`,null),children:n?`Approve plan`:`Approve`})]}),n&&(0,W.jsx)(`div`,{className:`col-span-3 max-h-60 overflow-auto px-1 empty:hidden`,children:(0,W.jsx)(fn,{text:t.plan})}),t.kind===`approval`&&t.item.kind!==`command`&&(0,W.jsx)(`div`,{className:`col-span-3 max-h-60 overflow-auto px-1 empty:hidden`,children:(0,W.jsx)(pf,{item:t.item})})]})})}function Of(e){let t=e.request.questions,[n,r]=(0,U.useState)(0),[i,a]=(0,U.useState)({}),[o,s]=(0,U.useState)({}),c=Object.fromEntries(t.map(e=>[e.question,[...i[e.question]??[],o[e.question]?.trim()??``].filter(e=>e!==``)])),l=Object.fromEntries(t.map(e=>[e.question,(c[e.question].length>0?c[e.question]:Cf(e)).join(`, `)])),u=t[n],d=t.flatMap((e,t)=>c[e.question].length===0?[t]:[]),f=d.find(e=>e>n)??d[0];function p(e,c){let l=i[e.question]??[];e.multiSelect?a({...i,[e.question]:l.includes(c)?l.filter(e=>e!==c):[...l,c]}):(a({...i,[e.question]:[c]}),s({...o,[e.question]:``}),n<t.length-1&&r(n+1))}function m(e,t){s({...o,[e.question]:t}),!e.multiSelect&&t.trim()!==``&&a({...i,[e.question]:[]})}async function h(t,n){let r=ef(z().items,[e.draft,...Object.values(o)]);for(let i of n)try{let n=await Xd(e.machine,i),o=n;i.type.startsWith(`image/`)&&(r+=1,o=`[Image #${r}] (saved at ${n})`),s(e=>{let n=e[t.question]??``;return{...e,[t.question]:`${n}${/(^|\s)$/.test(n)?``:` `}${o}`}}),t.multiSelect||a(e=>({...e,[t.question]:[]}))}catch(e){ae(e)}}return(0,W.jsx)(`div`,{className:`composer-glass shadow-composer relative z-10 rounded-3xl border border-(--composer-outline)`,children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 p-2.5`,children:[(0,W.jsxs)(`div`,{role:`tabpanel`,className:`flex min-w-0 flex-col gap-2`,children:[(0,W.jsxs)(`div`,{className:`mb-1 flex items-start gap-1.5 pt-1 pr-1 pl-1.5`,children:[(0,W.jsx)(`span`,{className:`bg-primary/18 text-primary grid size-6 shrink-0 place-items-center rounded-md`,children:(0,W.jsx)(V,{icon:Vo,className:`size-4`})}),(0,W.jsx)(`p`,{className:`text-foreground min-w-0 flex-1 pt-0.5 text-[15px] leading-5 font-medium`,children:u.question}),(0,W.jsx)(H,{size:`icon-micro`,variant:`ghost`,"aria-label":`Skip questions`,title:`Skip questions`,onClick:()=>Le(e.request.id,`deny`,null),children:(0,W.jsx)(V,{icon:mt,className:`size-4`})})]}),(0,W.jsxs)(`div`,{role:u.multiSelect?`group`:`radiogroup`,"aria-label":u.question,className:`flex max-h-[min(18rem,32dvh)] flex-col gap-0.5 overflow-y-auto`,children:[u.options.map(e=>{let t=i[u.question]?.includes(e.label)===!0,n=c[u.question].length===0&&Cf(u).includes(e.label),r=e.label.endsWith(Sf);return(0,W.jsxs)(`button`,{role:u.multiSelect?`checkbox`:`radio`,"aria-checked":t,className:B(`flex cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-2 text-left transition-colors`,t?`bg-muted/70`:`hover:bg-muted/40`),onClick:()=>p(u,e.label),children:[(0,W.jsx)(wf,{multi:u.multiSelect,selected:t,suggested:n}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,W.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,W.jsx)(`span`,{className:`text-foreground text-sm`,children:r?e.label.slice(0,-13).trim():e.label}),r&&(0,W.jsx)(`span`,{className:`text-muted-foreground/70 text-[11px]`,children:`Recommended`})]}),e.description!==``&&(0,W.jsx)(`span`,{className:`text-secondary-label mt-0.5 block text-xs leading-4`,children:e.description})]})]},e.label)}),(0,W.jsxs)(`label`,{className:B(`flex cursor-text items-start gap-2.5 rounded-lg px-2.5 py-2 transition-colors`,(o[u.question]??``).trim()===``?`focus-within:bg-muted/40 hover:bg-muted/40`:`bg-muted/70`),children:[(0,W.jsx)(wf,{multi:u.multiSelect,selected:(o[u.question]??``).trim()!==``,suggested:!1}),(0,W.jsx)(`textarea`,{value:o[u.question]??``,rows:1,onChange:e=>m(u,e.target.value),onPaste:e=>{let t=e.clipboardData.getData(`text/plain`);if(t!==``){e.preventDefault(),document.execCommand(`insertText`,!1,t);return}let n=[...e.clipboardData.files];n.length!==0&&(e.preventDefault(),h(u,n))},onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),h(u,[...e.dataTransfer.files])},placeholder:`Something else…`,className:`placeholder:text-placeholder/75 [field-sizing:content] max-h-40 min-w-0 flex-1 resize-none bg-transparent text-sm leading-5 outline-none`})]})]})]},u.question),(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[t.length>1&&(0,W.jsx)(`div`,{role:`tablist`,className:`flex min-w-0 [scrollbar-width:none] gap-1 overflow-x-auto`,children:t.map((e,t)=>(0,W.jsxs)(`button`,{role:`tab`,"aria-selected":t===n,className:B(`flex h-6 shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors`,t===n?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`),onClick:()=>r(t),children:[c[e.question].length>0&&(0,W.jsx)(V,{icon:po,"aria-label":`Answered`,className:`text-success size-3.5`}),c[e.question].length===0&&l[e.question]!==``&&(0,W.jsx)(V,{icon:$n,"aria-label":`Using the recommended answer`,className:`text-primary size-3.5`}),l[e.question]===``&&(0,W.jsx)(V,{icon:Mo,"aria-label":`Not answered`,className:`text-muted-foreground size-3.5`}),e.header]},e.question))}),(0,W.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 pr-1`,children:[e.request.autoResolve!==void 0&&(0,W.jsx)(Tf,{label:`Skip`,at:e.request.autoResolve.at}),(0,W.jsx)(H,{size:`xs`,variant:`outline`,onClick:()=>Le(e.request.id,`allow`,{}),children:`Skip`}),(0,W.jsx)(H,{size:`xs`,variant:f===void 0?`default`:`outline`,onClick:()=>Le(e.request.id,`allow`,Object.fromEntries(t.flatMap(e=>c[e.question].length===0?[]:[[e.question,c[e.question].join(`, `)]]))),children:`Submit`}),f!==void 0&&(0,W.jsx)(H,{size:`xs`,onClick:()=>{c[u.question].length===0&&a({...i,[u.question]:Cf(u)}),r(f)},children:`Next`})]})]})]})})}function kf(e,t,n,r,i){let a=Af(e,n,r+Math.asin(.5/n)),o=Af(e,n,i-Math.asin(.5/n)),s=Af(e,t,i-Math.asin(.5/t)),c=Af(e,t,r+Math.asin(.5/t)),l=[a,o,s,c,...r<Math.PI/2&&i>Math.PI/2?[Af(e,n,Math.PI/2)]:[]],u=Math.min(...l.map(e=>e.x)),d=Math.min(...l.map(e=>e.y)),f=Af(e,(t+n)/2,(r+i)/2);return{style:{left:u,top:d,width:Math.max(...l.map(e=>e.x))-u,height:Math.max(...l.map(e=>e.y))-d,clipPath:`path('M${a.x-u} ${a.y-d} A${n} ${n} 0 0 0 ${o.x-u} ${o.y-d} L${s.x-u} ${s.y-d} A${t} ${t} 0 0 1 ${c.x-u} ${c.y-d}Z')`},center:{left:f.x-u,top:f.y-d}}}function Af(e,t,n){return{x:e+t*Math.cos(n),y:e-t*Math.sin(n)}}var jf=`relative inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-(--control-radius) border border-transparent outline-none hover:bg-accent data-[state=open]:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0`,Mf=`h-7 gap-1.5 px-1.5 text-sm font-medium text-secondary-label hover:text-foreground [&_svg:not([class*=text-])]:text-muted-foreground [&_svg:not([class*=size-])]:size-4`;function Nf(){let e=O(e=>e.settings),t=O(e=>e.capabilities)?.models.find(t=>t.value===e.model);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Pf,{}),(0,W.jsx)(`span`,{className:`bg-border mx-0.5 hidden h-4 w-px shrink-0 sm:block`}),t!==void 0&&t.efforts.length>0&&(0,W.jsx)(Ff,{title:`Effort`,shortcut:`mod+shift+e`,trigger:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{icon:oo}),(0,W.jsx)(`span`,{className:`capitalize`,children:e.effort??`Default`})]}),value:e.effort??`default`,options:[...e.provider===`opencode`?[{value:`default`,label:`Default`}]:[],...t.efforts.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)}))],onChange:e=>Ze({effort:e==="default"?null:e})})]})}function Pf(){let e=O(e=>e.settings),t=O(e=>e.selection),n=O(e=>e.machines.find(t=>t.id===e.selection?.machine)),i=[...[...n?.claudeAccounts??[],...n?.codexAccounts??[]].filter(e=>e.valid).map(e=>({key:e.id,provider:e.provider,accountId:e.id,name:e.name,color:e.color,plan:e.plan,error:e.error})),...n?.openCode.available===!0?[{key:`opencode`,provider:`opencode`,accountId:null,name:`OpenCode`,color:null,plan:null,error:null}]:[]].filter(n=>t?.sessionId===null||n.provider===e.provider),a=e.provider===`opencode`?`opencode`:e.accountId,o=O(e=>e.capabilities),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(a),[d,f]=(0,U.useState)(``),[p,m]=(0,U.useState)({}),h=(0,U.useRef)(null),g=o?.models.find(t=>t.value===e.model)?.name??e.model??`Choose a model`,_=i.find(e=>e.key===a),v=l===null?[]:l===a?o?.models??null:p[l]??null,y=i.find(e=>e.key===l)?.provider,b=(v??[]).filter(e=>!e.hidden),x=b.length>=5,S=x?d.trim().toLowerCase():``,C=b.filter(e=>`${e.name} ${e.description}`.toLowerCase().includes(S));function w(e){if(c(e),e&&(u(a),f(``),t!==null))for(let e of i)e.key!==a&&e.error===null&&r(t.machine,`capabilities`,{provider:e.provider,accountId:e.accountId,projectId:t.projectId}).then(t=>m(n=>({...n,[e.key]:t.models})),ae)}Ys(`mod+shift+m`,()=>w(!s),{enableOnFormTags:!0,preventDefault:!0});function T(n,r){let a=i.find(e=>e.key===n);if(a===void 0||t===null)return;let o=a.provider,s={accountId:a.accountId,model:r.value,...r.effort===null?{}:{effort:r.effort}};o===e.provider?Ze(s):Ze({...Re(R(z(),t.machine).composer,o),...s})}return(0,W.jsxs)(vn,{open:s,onOpenChange:w,children:[(0,W.jsx)($t,{asChild:!0,children:(0,W.jsxs)(`button`,{className:B(jf,Mf),title:_===void 0?`Model`:`${_.name} · ${g}`,children:[(0,W.jsxs)(`span`,{className:`relative`,children:[(0,W.jsx)(ic,{provider:e.provider,className:`size-4`}),i.filter(t=>t.provider===e.provider).length>1&&_!==void 0&&(0,W.jsx)(`span`,{className:B(`pointer-events-none absolute -right-1 -bottom-1 flex h-3 min-w-3 items-center justify-center rounded-full border px-0.5 text-[8px] leading-none font-semibold shadow-sm`,_.color===null?`bg-card text-muted-foreground`:`border-card text-white`),style:_.color===null?void 0:{backgroundColor:_.color},children:_.name.charAt(0).toUpperCase()})]}),(0,W.jsx)(`span`,{className:`max-w-40 truncate`,children:g})]})}),(0,W.jsxs)(en,{side:`top`,className:`flex max-h-86.5 w-screen max-w-90 flex-row`,onOpenAutoFocus:e=>{e.preventDefault(),h.current?.focus()},onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:[i.length>1&&(0,W.jsxs)(`div`,{className:`bg-muted/30 flex w-11 shrink-0 [scrollbar-width:none] flex-col gap-1 overflow-y-auto p-1`,children:[i.map(t=>(0,W.jsxs)(`div`,{className:`relative w-full`,children:[t.key===l&&(0,W.jsx)(`div`,{className:`bg-primary pointer-events-none absolute top-1/2 -right-1 z-10 h-5 w-0.75 -translate-y-1/2 rounded-l-full`}),(0,W.jsx)(Nr,{side:`left`,label:t.error===null?[t.name,t.plan].filter(e=>e!==null).join(` · `):`${t.name} — ${t.error}`,children:(0,W.jsxs)(`button`,{className:B(`hover:bg-foreground/10 focus-visible:bg-foreground/10 relative flex aspect-square w-full cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none`,t.error!==null&&`cursor-not-allowed opacity-50 hover:bg-transparent`),"aria-label":t.name,"aria-pressed":t.key===l,"aria-disabled":t.error!==null,onClick:()=>{if(t.error!==null)return;let n=p[t.key]?.find(t=>t.value===e.model);t.key!==a&&a!==null&&o!==null&&n!==void 0&&(m(e=>({...e,[a]:o.models})),T(t.key,n)),u(t.key)},children:[(0,W.jsx)(ic,{provider:t.provider,className:`size-5`}),i.filter(e=>e.provider===t.provider).length>1&&(0,W.jsx)(`span`,{className:B(`text-3xs pointer-events-none absolute right-0.5 bottom-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full border px-0.5 leading-none font-semibold shadow-sm`,t.color===null?`bg-card text-muted-foreground`:`border-card text-white`),style:t.color===null?void 0:{backgroundColor:t.color},children:t.name.charAt(0).toUpperCase()})]})})]},t.key)),(0,W.jsx)(Nr,{side:`left`,label:`Manage accounts`,children:(0,W.jsx)(`button`,{className:`text-muted-foreground hover:bg-foreground/10 hover:text-foreground focus-visible:bg-foreground/10 mt-auto flex aspect-square w-full shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none`,"aria-label":`Manage accounts`,onClick:()=>{c(!1),Ue(Et[e.provider])},children:(0,W.jsx)(V,{icon:_s,className:`size-4.5`})})})]}),(0,W.jsxs)(`div`,{className:B(`bg-muted/40 flex min-h-0 min-w-0 flex-1 flex-col`,i.length>1&&`border-border/70 border-l`),children:[x&&(0,W.jsx)(`div`,{className:`shrink-0 px-3 pt-2.5`,children:(0,W.jsxs)(`div`,{className:`border-border/70 focus-within:border-ring relative border-b pb-1.5 transition-colors`,children:[(0,W.jsx)(V,{icon:nr,className:`text-muted-foreground/55 pointer-events-none absolute top-1.5 left-0 size-4`}),(0,W.jsx)(`input`,{ref:h,value:d,placeholder:`Search models...`,className:`placeholder:text-muted-foreground/70 h-6.5 w-full bg-transparent ps-5 text-sm outline-none`,onChange:e=>f(e.target.value),onKeyDown:e=>{if(e.key!==`Enter`||l===null)return;let t=C.at(0);t!==void 0&&(e.preventDefault(),T(l,t),c(!1))}})]})}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 py-1.5`,children:C.length===0?(0,W.jsx)(`p`,{className:`text-muted-foreground p-2 text-center text-sm`,children:v===null?`Loading models…`:`No models found`}):C.map(t=>(0,W.jsx)(`button`,{className:B(`hover:bg-accent hover:text-accent-foreground mb-0.5 flex min-h-8 w-full cursor-pointer flex-col justify-center rounded-sm px-2 py-1.5 text-left`,l===a&&t.value===e.model&&`text-foreground bg-foreground/[0.08]`),onClick:()=>{l!==null&&(T(l,t),c(!1))},children:(0,W.jsxs)(`span`,{className:`truncate text-sm leading-snug font-medium`,children:[t.name,y===`opencode`&&(0,W.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs font-normal`,children:t.description})]})},t.value))})]})]})]})}function Ff(e){let t=Math.min(190,(window.innerWidth-16)/2),[n,r]=(0,U.useState)(!1);return Ys(e.shortcut,()=>r(!n),{enableOnFormTags:!0,preventDefault:!0}),(0,W.jsxs)(pn,{modal:e.options.length>5,open:n,onOpenChange:r,children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(`button`,{className:B(jf,Mf),title:e.title,children:e.trigger})}),e.options.length>5&&(0,W.jsx)(on,{className:`w-72`,side:`top`,align:`start`,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:(0,W.jsx)(Xt,{value:e.value,onValueChange:e.onChange,children:e.options.map(e=>(0,W.jsx)(xn,{value:e.value,children:e.label},e.value))})}),e.options.length<=5&&(0,W.jsx)(wn,{children:(0,W.jsxs)(sn,{"data-slot":`dropdown-menu-content`,side:`top`,sideOffset:-28,className:`data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 pointer-events-none relative z-50 origin-(--radix-dropdown-menu-content-transform-origin) drop-shadow-[0_12px_28px_rgb(0_0_0/45%)] duration-100 outline-none`,style:{width:t*2,height:t},onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:[(0,W.jsx)(`div`,{className:`bg-background pointer-events-auto absolute`,style:kf(t,t*.35,t,0,Math.PI).style}),(0,W.jsx)(Cn,{value:e.value,onValueChange:e.onChange,children:e.options.map((n,r)=>{let i=kf(t,t*.35,t,Math.PI-(r+1)*Math.PI/e.options.length,Math.PI-r*Math.PI/e.options.length);return(0,W.jsx)(Tn,{value:n.value,className:B(`pointer-events-auto absolute cursor-pointer transition-colors outline-none`,n.value===e.value&&`text-foreground bg-[color-mix(in_srgb,var(--primary)_30%,var(--popover))]`,n.value!==e.value&&`bg-popover text-secondary-label data-highlighted:bg-accent data-highlighted:text-accent-foreground`),style:i.style,children:(0,W.jsx)(`span`,{className:`absolute -translate-x-1/2 -translate-y-1/2 text-sm font-medium whitespace-nowrap`,style:i.center,children:n.label})},n.value)})})]})})]})}function If(e){let t=O(e=>e.selection?.sessionId),n=O(t=>bt(t,e.machine,e.projectId)),r=O(e=>e.projects),i=O(e=>e.machines);return(0,W.jsx)(`div`,{className:`absolute inset-x-0 bottom-full pb-4`,children:(0,W.jsxs)(`h1`,{className:`text-foreground w-full text-center text-2xl font-normal tracking-tight sm:text-3xl`,children:[`What should we build in`,` `,t===null?(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:`border-muted-foreground/35 hover:border-foreground/60 inline-flex max-w-64 cursor-pointer border-b border-dotted align-bottom outline-none`,title:n?.path,children:[(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:n?.name}),`?`]})}),(0,W.jsx)(on,{className:`max-h-80 w-64`,onCloseAutoFocus:t=>{t.preventDefault(),e.onCloseMenu()},children:(0,W.jsx)(Xt,{value:F(e.machine,e.projectId),children:i.map(e=>({machine:e,items:r.filter(t=>t.machine===e.id)})).filter(e=>e.items.length>0).map(({machine:e,items:t},n)=>(0,W.jsxs)(U.Fragment,{children:[n>0&&(0,W.jsx)(an,{}),i.length>1&&(0,W.jsxs)(hn,{className:`text-2xs flex items-center gap-1`,children:[(0,W.jsx)(Yd,{icon:e.icon,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:e.name})]}),t.map(e=>(0,W.jsxs)(xn,{value:F(e.machine,e.id),title:e.path,onSelect:()=>De({machine:e.machine,projectId:e.id,sessionId:null}),children:[(0,W.jsx)(nc,{machine:e.machine,projectId:e.id,className:`size-4 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]},F(e.machine,e.id)))]},e.id))})})]}):(0,W.jsx)(`span`,{className:`border-muted-foreground/35 inline-block max-w-64 truncate border-b border-dotted align-bottom`,title:n?.path,children:n?.name}),t!==null&&`?`]})})}function Lf(){let e=O(e=>e.queue);return(0,W.jsx)(`div`,{className:`composer-glass relative mx-auto -mb-[calc(1rem+1px)] w-[calc(100%-2.75rem)] rounded-t-2xl border border-b-0 border-(--composer-outline) px-1 pt-1 pb-[calc(1rem+1px+0.25rem)] text-xs/4`,children:e.map(e=>(0,W.jsxs)(`div`,{className:`grid min-h-6 grid-cols-[1.5rem_minmax(0,1fr)_auto_auto] items-center gap-x-1`,children:[(0,W.jsx)(V,{icon:Ro,className:`text-muted-foreground mx-auto size-3`}),(0,W.jsx)(`span`,{className:`text-secondary-label truncate`,children:e.prompt.text===``?`${e.prompt.images.length} image(s)`:e.prompt.text}),(0,W.jsx)(H,{variant:`ghost-muted`,size:`icon-micro`,title:`Send now`,onClick:()=>ge(e.id),children:(0,W.jsx)(V,{icon:Bn,className:`size-4`})}),(0,W.jsx)(H,{variant:`ghost-muted`,size:`icon-micro`,title:`Remove from queue`,onClick:()=>Dt(e.id),children:(0,W.jsx)(V,{icon:mt,className:`size-4`})})]},e.id))})}function Rf(e){return(0,W.jsxs)(W.Fragment,{children:[e.running&&e.empty&&(0,W.jsx)(`button`,{className:`bg-destructive/90 shadow-destructive/24 hover:bg-destructive flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-white shadow-xs transition-colors`,title:`Stop (Esc)`,"aria-label":`Stop generation`,onClick:e.onStop,children:(0,W.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`currentColor`,"aria-hidden":`true`,children:(0,W.jsx)(`rect`,{x:`2`,y:`2`,width:`8`,height:`8`,rx:`1.5`})})}),!(e.running&&e.empty)&&(0,W.jsx)(`button`,{className:`bg-message-action text-message-action-foreground shadow-message-action/24 hover:bg-message-action-hover disabled:bg-foreground/12 disabled:text-muted-foreground relative flex size-9 items-center justify-center overflow-hidden rounded-full shadow-xs transition-all duration-150 hover:scale-105 enabled:cursor-pointer disabled:pointer-events-none disabled:shadow-none`,title:e.running&&e.delivery===`steer`?`Send now (Enter) · Queue (${Ft}+Enter)`:e.running?`Queue (Enter) · Send now (${Ft}+Enter)`:`Send (Enter)`,"aria-label":`Send message`,disabled:e.empty,onClick:t=>e.onSubmit(t.metaKey||t.ctrlKey),children:(0,W.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M7 11.5V2.5M7 2.5L3 6.5M7 2.5L11 6.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]})}var zf=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],Bf=5242880,Vf=window.matchMedia(`(pointer: coarse)`);function Hf(){let e=O(e=>e.selection),t=O(e=>e.loaded),n=O(e=>e.items.length===0&&e.partial===``),i=O(e=>e.requests),a=O(e=>e.queue),s=O(e=>e.draft),c=O(e=>e.capabilities),l=O(e=>e.settings.provider===`opencode`?e.machines.find(t=>t.id===e.selection?.machine)?.openCode.available!==!0:e.settings.accountId===null),[u,d]=(0,U.useState)(!1),[f,p]=(0,U.useState)(0),[m,h]=(0,U.useState)(!1),[g,_]=(0,U.useState)([]),v=(0,U.useRef)(null),y=(0,U.useRef)(null),b=(0,U.useRef)(!1),x=e?.machine??``,S=e?.projectId??``,C=O(e=>bt(e,x,S)),w=O(e=>R(e,x).status),T=O(e=>R(e,x).config?.delivery??null),E=e===null?``:Fe(e),D=L(E),k=D.text,A=D.images,j=D.files,[M,N]=(0,U.useState)(k.length),ee=O(wt),te=t&&n&&!ee,ne=i.at(0);(0,U.useEffect)(()=>{let e=v.current;e===null||Vf.matches||(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},[e]),(0,U.useEffect)(()=>{if(s===null)return;let e=tf(s);kt(E,t=>({...t,...e})),N(e.text.length),re(null),v.current?.focus()},[s,E]),(0,U.useEffect)(()=>{w===`online`&&r(x,`files.list`,{projectId:S}).then(_,ae)},[x,S,w]);let P=k.slice(0,M),ie=/^\/\S*$/.exec(P)?.[0]??/(?:^|\s)(@\S*)$/.exec(P)?.[1]??null,oe=ie?.slice(1).toLowerCase()??``,se=ie===null||m?[]:ie.startsWith(`/`)?(c?.commands??[]).filter(e=>e.name.toLowerCase().includes(oe)).sort((e,t)=>Number(!e.name.toLowerCase().startsWith(oe))-Number(!t.name.toLowerCase().startsWith(oe))).map(e=>({key:e.name,label:`/${e.name}${e.hint===``?``:` ${e.hint}`}`,description:e.description,insert:`/${e.name}`})):g.filter(e=>e.toLowerCase().includes(oe)).slice(0,50).map(e=>({key:e,label:e,description:``,insert:`@${e}`})),ce=Math.min(f,se.length-1),le=k.trim()===``&&A.length===0||u||l;function ue(e,t){kt(E,t=>({...t,text:e,images:t.images.filter(t=>e.includes(`[Image #${t.number}]`)),files:t.files.filter(t=>e.includes(Uf(t)))})),N(t),p(0),h(!1)}function F(e){if(ie===null)return;let t=M-ie.length,n=t+e.insert.length+1;ue(`${k.slice(0,t)}${e.insert} ${k.slice(M)}`,n),requestAnimationFrame(()=>v.current?.setSelectionRange(n,n))}async function I(t){if(!le){d(!0);try{if(T===null)throw Error(`This machine is not connected`);let n=z().settings,r=k.trim();for(let e of j){let t=await de(e.id);if(t===void 0)throw Error(`${e.name} is no longer saved, attach it again`);let n=await Xd(x,t);r=r.replace(Uf(e),()=>`@${n}`)}await Pe({text:r,images:A.map(e=>({mediaType:e.mediaType,data:e.data}))},t?T===`queue`?`steer`:`queue`:T,e,n),kt(E,e=>({...e,text:``,images:[],files:[]})),N(0)}catch(e){ae(e)}finally{d(!1)}}}async function fe(e){let t=M,n=/(^|\s)$/.test(k.slice(0,M))?``:` `;for(let r of e){if(zf.includes(r.type)&&r.size<=Bf){let e=await Zd(r),i=ef(z().items,[o(E).text])+1,a={number:i,mediaType:r.type,data:e},s=t,c=`${n}[Image #${i}] `;n=``,kt(E,e=>({...e,text:`${e.text.slice(0,s)}${c}${e.text.slice(s)}`,images:[...e.images,a]})),t+=c.length,N(t),requestAnimationFrame(()=>v.current?.setSelectionRange(t,t));continue}if(r.size>52428800){ae(Error(`${r.name} is larger than 50 MB`));continue}let e=await st(r),i={number:Math.max(0,...o(E).files.map(e=>e.number))+1,id:e,name:r.name},a=t,s=`${n}${Uf(i)} `;n=``,kt(E,e=>({...e,text:`${e.text.slice(0,a)}${s}${e.text.slice(a)}`,files:[...e.files,i]})),t+=s.length,N(t),requestAnimationFrame(()=>v.current?.setSelectionRange(t,t))}}return(0,W.jsx)(`div`,{className:B(`pointer-events-none z-20`,te?`absolute inset-0 flex items-center pb-3 sm:pb-4`:`relative flex min-h-0 flex-col before:absolute before:right-(--app-scrollbar-width) before:bottom-full before:left-0 before:h-8 before:bg-linear-to-t before:from-background before:to-transparent`),children:(0,W.jsxs)(Qd,{width:`composer`,className:`pointer-events-auto relative z-10`,children:[te&&(0,W.jsx)(If,{machine:x,projectId:S,onCloseMenu:()=>v.current?.focus()}),a.length>0&&se.length===0&&(0,W.jsx)(Lf,{}),ne!==void 0&&se.length===0&&(0,W.jsx)(Df,{request:ne,machine:x,cwd:C?.path??``,count:i.length,draft:k},ne.id),se.length>0&&(0,W.jsx)(af,{items:se,active:ce,onHover:p,onPick:F}),(0,W.jsxs)(`div`,{className:B(`composer-glass shadow-composer relative z-10 border border-(--composer-outline) transition-[border-color,box-shadow] duration-150 ease-out focus-within:border-[color-mix(in_srgb,var(--text)_16%,transparent)] focus-within:ring-4 focus-within:ring-[color-mix(in_srgb,var(--text)_4%,transparent)] dark:shadow-none`,te?`rounded-3xl`:`rounded-t-3xl border-b-0`,ne?.kind===`question`&&`hidden`),onMouseDown:e=>{e.target instanceof Element&&e.currentTarget.contains(e.target)&&(e.target.closest(`button, a, input, textarea`)||(e.preventDefault(),v.current?.focus()))},onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),fe([...e.dataTransfer.files])},children:[(0,W.jsxs)(`div`,{className:B(`pb-2`,A.length>0&&`pt-3.5 sm:pt-4`),children:[A.length>0&&(0,W.jsx)($d,{draftKey:E}),(0,W.jsx)(`textarea`,{ref:v,"data-composer":!0,rows:1,spellCheck:!1,autoCorrect:`off`,"data-gramm":`false`,"data-gramm_editor":`false`,"data-enable-grammarly":`false`,"data-lt-active":`false`,value:k,onChange:e=>ue(e.target.value,e.target.selectionStart),onSelect:e=>N(e.currentTarget.selectionStart),onPaste:e=>{let t=e.clipboardData.getData(`text/plain`),n=b.current;if(b.current=!1,t!==``){e.preventDefault();let r=n?null:nf(t,j);if(r!==null){fe([r]);return}document.execCommand(`insertText`,!1,t);return}let r=[...e.clipboardData.files];r.length!==0&&(e.preventDefault(),fe(r))},onKeyDown:e=>{if(!e.nativeEvent.isComposing){if(b.current=rf(e.nativeEvent),lf(e.nativeEvent))e.preventDefault(),cf(E);else{if(se.length>0){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;p((ce+t+se.length)%se.length);return}if(e.key===`Enter`&&!e.shiftKey||e.key===`Tab`){e.preventDefault(),F(se[ce]);return}if(e.key===`Escape`){e.preventDefault(),h(!0);return}}if(e.key===`Enter`&&!e.shiftKey&&!Vf.matches)e.preventDefault(),I(e.metaKey||e.ctrlKey);else if(e.key===`ArrowUp`&&k===``){let t=Wf(z().items);if(t===null)return;e.preventDefault(),ue(t,t.length)}else e.key===`Escape`&&ee&&pt()}}},placeholder:l?`Add an account in Settings to start`:ee&&T===`steer`?`Steer the agent… (${Ft}+Enter to queue)`:ee?`Queue a follow-up… (${Ft}+Enter to send now)`:`Ask anything, @tag files/folders, or / for commands`,className:B(`placeholder:text-placeholder/75 block [field-sizing:content] w-full resize-none bg-transparent px-3 text-sm leading-relaxed outline-none sm:px-4`,A.length>0?`max-h-52 min-h-19.5`:`max-h-55.5 min-h-20 pt-3.5 sm:max-h-56 sm:pt-4 [@media(min-height:840px)]:min-h-23 sm:[@media(min-height:840px)]:min-h-23.5`)})]}),(0,W.jsxs)(`div`,{className:B(`flex min-w-0 items-center justify-between gap-2 px-3 sm:px-3.5`,te?`pb-2.5 sm:pb-3.5`:`pb-2 sm:pb-3`),children:[(0,W.jsx)(`div`,{className:`-m-1 -ms-3.5 flex min-w-0 flex-1 [scrollbar-width:none] items-center gap-1 overflow-x-auto p-1 ps-3 sm:ps-4`,children:(0,W.jsx)(Nf,{})}),(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center justify-end gap-2`,children:[(0,W.jsx)(`input`,{ref:y,type:`file`,multiple:!0,hidden:!0,onChange:e=>{fe([...e.target.files??[]]),e.target.value=``}}),u&&j.length>0&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Uploading…`}),(0,W.jsx)(ff,{empty:le,delivery:T,onSubmit:()=>void I(!0)}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,title:`Attach files`,"aria-label":`Attach files`,onClick:()=>y.current?.click(),children:(0,W.jsx)(V,{icon:qo})}),(0,W.jsx)(Rf,{running:ee,empty:le,delivery:T,onSubmit:e=>void I(e),onStop:pt})]})]})]})]})})}function Uf(e){return`[File #${e.number}: ${e.name}]`}function Wf(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.kind===`user`&&n.parent===null&&n.format===`text`&&n.text!==``)return n.text}return null}var Y={working:$n,done:go,failed:An},Gf=new Set,Kf=null,qf=0,Jf={open:!1,label:``,error:``};function Yf(e){Kf!==null&&Kf.id!==e.id&&Gi.dismiss(Kf.id),Kf=e,Gi.custom(()=>(0,W.jsx)(np,{toast:e}),{id:e.id,duration:e.state===`done`?5e3:1/0,onDismiss:()=>{Kf?.id===e.id&&(Kf=null)}})}function Xf(e){Jf=e;for(let e of Gf)e()}function Zf(e){return Gf.add(e),()=>{Gf.delete(e)}}function Qf(e,t){qf+=1;let n=`git-${qf}`;Yf(`url`in t?{id:n,state:`done`,label:e,error:``,url:t.url}:{id:n,state:`failed`,label:e,error:t.error,url:null})}async function $f(e){qf+=1;let t=`git-${qf}`;Yf({id:t,state:`working`,label:e.labels.working,error:``,url:null});try{let n=await e.task();Kf?.id===t&&Yf({id:t,state:`done`,label:e.labels.done,error:``,url:n})}catch(n){Kf?.id===t&&Yf({id:t,state:`failed`,label:e.labels.failed,error:It(n),url:null})}finally{e.onRefresh()}}function ep(e,t,n,i){$f({labels:i?{working:`Committing and pushing…`,done:`Committed and pushed`,failed:`Commit and push failed`}:{working:`Committing…`,done:`Committed`,failed:`Commit failed`},task:async()=>(await r(e.machine,`git.commit`,{projectId:e.projectId,repo:t,message:n,push:i}),null),onRefresh:e.onRefresh})}function tp(e,t,n){$f({labels:{working:`Creating pull request…`,done:`Pull request created`,failed:`Couldn't create pull request`},task:async()=>(await r(e.machine,`git.createPullRequest`,{projectId:e.projectId,repo:t,base:n.base,head:n.head,title:n.title,body:n.body})).url,onRefresh:e.onRefresh})}function np(e){return(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,W.jsx)(V,{icon:Y[e.toast.state],className:B(`size-4 shrink-0`,e.toast.state===`working`&&`animate-spin`,e.toast.state===`done`&&`text-success`,e.toast.state===`failed`&&`text-destructive`)}),(0,W.jsx)(`span`,{className:`truncate`,children:e.toast.label})]}),e.toast.url!==null&&(0,W.jsx)(H,{asChild:!0,size:`xs`,variant:`outline`,children:(0,W.jsx)(`a`,{href:e.toast.url,target:`_blank`,rel:`noopener noreferrer`,children:`Open`})}),e.toast.state===`failed`&&(0,W.jsx)(H,{type:`button`,size:`xs`,variant:`outline`,onClick:()=>Xf({open:!0,label:e.toast.label,error:e.toast.error}),children:`View`}),(0,W.jsx)(H,{type:`button`,size:`icon-micro`,variant:`ghost-muted`,"aria-label":`Dismiss`,onClick:()=>Gi.dismiss(e.toast.id),children:(0,W.jsx)(V,{icon:mt,className:`size-4`})})]})}function rp(){let e=(0,U.useSyncExternalStore)(Zf,()=>Jf);return(0,W.jsx)(Ur,{open:e.open,onOpenChange:t=>Xf({...e,open:t}),children:(0,W.jsxs)(Ir,{className:`sm:max-w-lg`,children:[(0,W.jsx)(Lr,{children:(0,W.jsx)(Br,{children:e.label})}),(0,W.jsx)(`pre`,{className:`bg-muted/50 max-h-[60vh] overflow-y-auto rounded-lg border p-3 font-mono text-xs break-words whitespace-pre-wrap`,children:e.error})]})})}function X({className:e,type:t,...n}){return(0,W.jsx)(`input`,{type:t,"data-slot":`input`,className:B(`h-9 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,background-color,border-color,box-shadow] duration-200 ease-out outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/33 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function ip({...e}){return(0,W.jsx)(Ac,{"data-slot":`select`,...e})}function ap({...e}){return(0,W.jsx)(Pc,{"data-slot":`select-value`,...e})}function op({className:e,size:t=`default`,children:n,...r}){return(0,W.jsxs)(Mc,{"data-slot":`select-trigger`,"data-size":t,className:B(`flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-[color,background-color,border-color,box-shadow] duration-200 ease-out outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/33 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,W.jsx)(Fc,{asChild:!0,children:(0,W.jsx)(V,{icon:xr,className:`text-muted-foreground pointer-events-none size-4`})})]})}function sp({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,W.jsx)(Rc,{children:(0,W.jsxs)(Bc,{"data-slot":`select-content`,"data-align-trigger":n===`item-aligned`,className:B(`relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,W.jsx)(cp,{}),(0,W.jsx)(Qc,{"data-position":n,className:B(`data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`,n===`popper`&&``),children:t}),(0,W.jsx)(lp,{})]})})}function Z({className:e,children:t,...n}){return(0,W.jsxs)(il,{"data-slot":`select-item`,className:B(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,W.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:(0,W.jsx)(cl,{children:(0,W.jsx)(V,{icon:qn,className:`pointer-events-none`})})}),(0,W.jsx)(ol,{children:t})]})}function cp({className:e,...t}){return(0,W.jsx)(ul,{"data-slot":`select-scroll-up-button`,className:B(`z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,W.jsx)(V,{icon:ho})})}function lp({className:e,...t}){return(0,W.jsx)(fl,{"data-slot":`select-scroll-down-button`,className:B(`z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,W.jsx)(V,{icon:br})})}function up(e){return e.target?.kind===`failed`?(0,W.jsx)(`span`,{className:`text-destructive truncate text-xs`,children:e.target.text}):(0,W.jsxs)(`span`,{className:`text-muted-foreground flex min-w-0 items-center gap-1.5 text-xs`,children:[(0,W.jsxs)(`span`,{className:`truncate`,children:[e.head,` →`]}),(0,W.jsxs)(ip,{value:e.target?.base??``,disabled:e.target===void 0,onValueChange:e.onBase,children:[(0,W.jsx)(op,{size:`sm`,className:`max-w-48`,children:(0,W.jsx)(ap,{placeholder:`Loading branches…`})}),(0,W.jsx)(sp,{children:(e.target?.branches??[]).map(e=>(0,W.jsx)(Z,{value:e,children:e},e))})]})]})}function dp(e){return(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 ps-6`,children:[(0,W.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[e.draft.head,` → `,e.draft.base]}),(0,W.jsx)(X,{value:e.draft.title,onChange:t=>e.onChange({...e.draft,title:t.target.value})}),(0,W.jsx)(`textarea`,{value:e.draft.body,onChange:t=>e.onChange({...e.draft,body:t.target.value}),rows:8,className:`bg-background focus-visible:border-ring focus-visible:ring-ring/33 w-full resize-y rounded-lg border px-3 py-2 font-mono text-xs transition-[border-color,box-shadow] duration-200 ease-out outline-none focus-visible:ring-3`}),(0,W.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[e.onSkip!==null&&(0,W.jsx)(H,{variant:`ghost`,size:`sm`,onClick:e.onSkip,children:`Skip`}),(0,W.jsx)(H,{variant:`outline`,size:`sm`,onClick:e.onRegenerate,children:`Regenerate`}),(0,W.jsx)(H,{size:`sm`,disabled:e.draft.title.trim()===``,onClick:e.onCreate,children:`Create PR`})]})]})}var fp={working:$n,review:vo,done:go,failed:An,skipped:Go};function pp(e){let t=O(t=>bt(t,e.machine,e.projectId)?.name)??``,[n]=(0,U.useState)(()=>mp(e.repos,e.action)),[i,a]=(0,U.useState)(()=>n.map(e=>e.path)),[o,s]=(0,U.useState)(``),[c,l]=(0,U.useState)({}),[u,d]=(0,U.useState)(null),f=n.filter(e=>i.includes(e.path)&&c[e.path]?.kind!==`failed`),p=e.action===`pullRequest`&&f.some(e=>c[e.path]===void 0),m=f.filter(e=>e.changed>0);(0,U.useEffect)(()=>{if(e.action===`pullRequest`)for(let t of n)r(e.machine,`git.branches`,{projectId:e.projectId,repo:t.path}).then(e=>l(n=>({...n,[t.path]:{kind:`ready`,...e}})),e=>l(n=>({...n,[t.path]:{kind:`failed`,text:It(e)}})))},[e.machine,e.projectId,e.action,n]);function h(e,t){d(n=>n?.map(n=>n.path===e?{...n,...t}:n)??null)}async function g(t,r){try{await r()}catch(r){if(n.length===1){e.onClose(),Qf(`Pull request failed`,{error:It(r)});return}h(t,{state:`failed`,text:It(r),draft:null})}finally{e.onRefresh()}}function _(e,t){l(n=>{let r=n[e];return r?.kind===`ready`?{...n,[e]:{...r,base:t}}:n})}function v(e,t){d(f.map(t=>({path:t.path,state:`working`,text:e,url:null,draft:null})));for(let e of f)g(e.path,()=>t(e.path))}function y(t){if(n.length===1){e.onClose(),ep(e,n[0].path,o,t);return}let i=t?`Committed and pushed`:`Committed`;v(t?`Committing and pushing…`:`Committing…`,async n=>{await r(e.machine,`git.commit`,{projectId:e.projectId,repo:n,message:o,push:t}),h(n,{state:`done`,text:i})})}function b(){v(`Pushing…`,async t=>{await r(e.machine,`git.push`,{projectId:e.projectId,repo:t}),h(t,{state:`done`,text:`Pushed`})})}async function x(t,i,a){h(t,{state:`working`,text:i?`Committing local changes and writing pull request…`:`Writing pull request…`,draft:null});let o=await r(e.machine,`git.pullRequest`,{projectId:e.projectId,repo:t,base:a,commit:i});if(o.kind===`open`){if(n.length===1){e.onClose(),Qf(`Pull request already open`,{url:o.url});return}h(t,{state:`done`,text:`A pull request is already open`,url:o.url})}else h(t,{state:`review`,text:`Review and create`,draft:{base:o.base,head:o.head,title:o.title,body:o.body}})}function S(e){v(`Starting…`,async t=>{let n=c[t];if(n?.kind!==`ready`)throw Error(`The branches are not loaded`);await x(t,e&&m.some(e=>e.path===t),n.base)})}function C(t,i){n.length===1?(e.onClose(),tp(e,t,i)):g(t,async()=>{h(t,{state:`working`,text:`Creating pull request…`,draft:null}),h(t,{state:`done`,text:`Created pull request`,url:(await r(e.machine,`git.createPullRequest`,{projectId:e.projectId,repo:t,base:i.base,head:i.head,title:i.title,body:i.body})).url})})}return(0,W.jsx)(Ur,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Ir,{className:`top-[12vh] translate-y-0 sm:max-w-lg`,children:[(0,W.jsxs)(Lr,{children:[(0,W.jsxs)(Br,{children:[e.action===`commit`&&`Commit changes`,e.action===`push`&&`Push`,e.action===`pullRequest`&&`Create pull request`]}),(0,W.jsxs)(Vr,{children:[e.action===`commit`&&(n.length===1?`Stages every change and commits it.`:`Stages every change in the selected repositories and commits it.`),e.action===`push`&&`Pushes the selected repositories to their remote.`,e.action===`pullRequest`&&`AI writes the title and description. You review them before the pull request is created.`]})]}),u===null&&(0,W.jsxs)(W.Fragment,{children:[n.length===1&&(0,W.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-1.5 text-xs`,children:[e.action===`pullRequest`?(0,W.jsx)(up,{head:n[0].branch??`detached`,target:c[n[0].path],onBase:e=>_(n[0].path,e)}):n[0].branch??`detached`,(0,W.jsxs)(`span`,{className:`shrink-0`,children:[`· `,n[0].changed,` `,n[0].changed===1?`change`:`changes`]})]}),n.length>1&&(0,W.jsx)(`div`,{className:`flex max-h-60 flex-col gap-0.5 overflow-y-auto`,children:n.map(n=>(0,W.jsxs)(`label`,{className:`hover:bg-accent flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5`,children:[(0,W.jsx)(`input`,{type:`checkbox`,disabled:c[n.path]?.kind===`failed`,checked:i.includes(n.path)&&c[n.path]?.kind!==`failed`,onChange:e=>a(e.target.checked?[...i,n.path]:i.filter(e=>e!==n.path))}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:hp(n.path,t)}),e.action===`pullRequest`?(0,W.jsx)(up,{head:n.branch??`detached`,target:c[n.path],onBase:e=>_(n.path,e)}):(0,W.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:n.branch??`detached`}),(0,W.jsx)(`span`,{className:`text-muted-foreground ml-auto shrink-0 text-xs tabular-nums`,children:e.action===`push`?n.upstream===null?`not pushed yet`:`↑${n.ahead}`:n.changed>0&&`${n.changed} ${n.changed===1?`change`:`changes`}`})]},n.path))}),e.action===`commit`&&(0,W.jsx)(`textarea`,{value:o,onChange:e=>s(e.target.value),placeholder:`Leave empty to write the message with AI`,rows:5,className:`bg-background focus-visible:border-ring focus-visible:ring-ring/33 w-full resize-none rounded-lg border px-3 py-2 font-mono text-xs transition-[border-color,box-shadow] duration-200 ease-out outline-none focus-visible:ring-3`}),e.action===`pullRequest`&&m.length>0&&(0,W.jsxs)(`p`,{children:[`You have local changes`,n.length>1&&` in ${m.map(e=>hp(e.path,t)).join(`, `)}`,`. Do you want to commit and push them before creating the pull request?`]}),(0,W.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[e.action===`commit`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{variant:`outline`,size:`sm`,disabled:f.length===0,onClick:()=>y(!1),children:`Commit`}),(0,W.jsx)(H,{size:`sm`,disabled:f.length===0,onClick:()=>y(!0),children:`Commit and Push`})]}),e.action===`push`&&(0,W.jsx)(H,{size:`sm`,disabled:f.length===0,onClick:b,children:`Push`}),e.action===`pullRequest`&&m.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{variant:`outline`,size:`sm`,disabled:p,onClick:()=>S(!1),children:`Continue without them`}),(0,W.jsx)(H,{size:`sm`,disabled:p,onClick:()=>S(!0),children:`Commit and continue`})]}),e.action===`pullRequest`&&m.length===0&&(0,W.jsx)(H,{size:`sm`,disabled:p||f.length===0,onClick:()=>S(!1),children:`Create pull request`})]})]}),u!==null&&(0,W.jsx)(`div`,{className:`flex max-h-[60vh] flex-col gap-2 overflow-y-auto`,children:u.map(e=>{let r=e.draft;return(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(`span`,{className:`mt-0.5 flex size-4 shrink-0 overflow-hidden`,children:(0,W.jsx)(V,{icon:fp[e.state],className:B(`size-4`,e.state===`working`&&`animate-spin`,e.state===`review`&&`text-info`,e.state===`done`&&`text-success`,e.state===`failed`&&`text-destructive`,e.state===`skipped`&&`text-muted-foreground`)})}),(0,W.jsx)(`span`,{className:`shrink-0 font-medium`,children:hp(e.path,t)}),(0,W.jsxs)(`span`,{className:B(`min-w-0 text-xs leading-5 break-words whitespace-pre-wrap`,e.state===`failed`?`text-destructive`:`text-muted-foreground`),children:[e.text,e.url!==null&&(0,W.jsxs)(W.Fragment,{children:[` `,(0,W.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary hover:underline hover:underline-offset-2`,children:e.url})]})]})]}),e.state===`review`&&r!==null&&(0,W.jsx)(dp,{draft:r,onChange:t=>h(e.path,{draft:t}),onSkip:n.length===1?null:()=>h(e.path,{state:`skipped`,text:`Skipped`,draft:null}),onRegenerate:()=>void g(e.path,()=>x(e.path,!1,r.base)),onCreate:()=>C(e.path,r)})]},e.path)})})]})})}function mp(e,t){if(t===`commit`)return e.filter(e=>e.changed>0);if(t===`push`)return e.filter(e=>e.branch!==null&&(e.upstream===null||e.ahead>0));if(t===`pullRequest`)return e.filter(e=>e.branch!==null);throw Error(`Unknown git action ${String(t)}`)}function hp(e,t){return e===``?t:e}var gp=3e3,_p=18e4;function vp(e,t,n){let[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(0);(0,U.useEffect)(()=>{if(t===null)return;let n=F(e,t),i={projectId:t},o=!0,s=!1,c=!1;async function l(){if(!s){s=!0;try{let t=await r(e,`git.status`,i);if(!o)return;c=!1,a(e=>e!==null&&e.key===n&&te(e.repos,t)?e:{key:n,repos:t})}catch(e){o&&!c&&(c=!0,ae(e))}finally{s=!1}}}function u(){document.hidden||l()}l();let d=window.setInterval(u,gp);return window.addEventListener(`focus`,u),()=>{o=!1,window.clearInterval(d),window.removeEventListener(`focus`,u)}},[e,t,n,o]),(0,U.useEffect)(()=>{if(t===null)return;let n={projectId:t},i=!0,a=!1;async function o(){if(!document.hidden)try{await r(e,`git.fetch`,n),i&&(a=!1,s(e=>e+1))}catch(e){i&&!a&&(a=!0,ae(e))}}o();let c=window.setInterval(o,_p);return()=>{i=!1,window.clearInterval(c)}},[e,t]);let c=(0,U.useCallback)(()=>s(e=>e+1),[]);return{repos:i!==null&&t!==null&&i.key===F(e,t)?i.repos:[],refresh:c}}function yp(e){let[t,n]=(0,U.useState)(null),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(!1),u=mp(e.repos,`push`),d=mp(e.repos,`commit`);function f(t){$f({labels:{working:`Pushing…`,done:`Pushed`,failed:`Push failed`},task:async()=>(await r(e.machine,`git.push`,{projectId:e.projectId,repo:t}),null),onRefresh:e.onRefresh})}async function p(){if(d.length===1)a(!1),ep(e,d[0].path,``,!1);else{l(!0);try{for(let t of d)await r(e.machine,`git.commit`,{projectId:e.projectId,repo:t.path,message:``,push:!1});a(!1)}catch(e){ae(e)}finally{l(!1),e.onRefresh()}}}return{target:e,action:t,setAction:n,menuOpen:i,setMenuOpen:a,branchRepo:o,setBranchRepo:s,committing:c,pushable:u,committable:d,push:f,yoloCommit:p}}function bp(e){let t=e.git,n=t.target.repos,r=n.reduce((e,t)=>e+t.ahead,0);return(0,W.jsxs)(W.Fragment,{children:[e.collapsed&&n.map(e=>(0,W.jsxs)(ln,{onSelect:()=>t.setBranchRepo(e.path),children:[(0,W.jsx)(V,{icon:ir}),(0,W.jsx)(`span`,{className:`flex min-w-0 flex-1`,children:(0,W.jsx)(`span`,{className:`text-muted-foreground truncate rounded-md border px-1.5 py-0.5 font-mono text-xs`,children:e.path===``?e.branch??`detached`:`${e.path}: ${e.branch??`detached`}`})}),(0,W.jsx)(`span`,{className:`text-muted-foreground flex gap-1 text-xs`,children:(0,W.jsx)(Zt,{behind:e.behind,ahead:e.ahead})})]},e.path)),e.collapsed&&(0,W.jsxs)(ln,{disabled:t.committable.length===0,onSelect:()=>t.setAction(`commit`),children:[(0,W.jsx)(V,{icon:Do}),`Commit`]}),(0,W.jsxs)(ln,{disabled:t.pushable.length===0||t.committing,onSelect:()=>{t.pushable.length===1?t.push(t.pushable[0].path):t.setAction(`push`)},children:[(0,W.jsx)(V,{icon:Pn}),`Just Push`,r>0&&(0,W.jsxs)(`span`,{className:`text-muted-foreground ml-auto text-xs tabular-nums`,children:[`↑`,r]})]}),(0,W.jsxs)(ln,{disabled:t.committable.length===0||t.committing,onSelect:e=>{e.preventDefault(),t.yoloCommit()},children:[(0,W.jsx)(V,{icon:t.committing?$n:Do,className:B(t.committing&&`animate-spin`)}),t.committing?`Committing…`:`Yolo Commit`]}),(0,W.jsxs)(ln,{disabled:mp(n,`pullRequest`).length===0,onSelect:()=>t.setAction(`pullRequest`),children:[(0,W.jsx)(V,{icon:Ao}),`Create pull request`]})]})}function xp(e){let t=e.git,n=t.target.repos.find(e=>e.path===t.branchRepo);return(0,W.jsxs)(W.Fragment,{children:[t.action!==null&&(0,W.jsx)(pp,{machine:t.target.machine,projectId:t.target.projectId,action:t.action,repos:t.target.repos,onClose:()=>t.setAction(null),onRefresh:t.target.onRefresh}),t.branchRepo!==null&&n!==void 0&&(0,W.jsx)(pr,{machine:t.target.machine,projectId:t.target.projectId,repo:n,onRefresh:t.target.onRefresh,onClose:()=>t.setBranchRepo(null)})]})}function Sp(e){let t=yp(e),[n,i]=(0,U.useState)(!1),a=[...new Set(e.repos.map(e=>e.branch??`detached`))],o=e.repos.flatMap(e=>{let t=dr(e);return t===null?[]:[{repo:e,next:t}]}),s=e.repos.map(e=>e.path===``?e.branch??`detached`:`${e.path}: ${e.branch??`detached`}`).join(`
|
|
13
|
+
`),c=a.length===1?a[0]:`${a.length} branches`;async function l(t){i(!0);try{await r(e.machine,`git.sync`,{projectId:e.projectId,repo:t})}catch(e){ae(e)}finally{i(!1),e.onRefresh()}}return(0,W.jsxs)(W.Fragment,{children:[e.repos.length===1&&(0,W.jsx)(gn,{machine:e.machine,projectId:e.projectId,repo:e.repos[0],onRefresh:e.onRefresh}),e.repos.length>1&&o.length===0&&(0,W.jsxs)(`span`,{className:`text-muted-foreground hidden max-w-48 items-center gap-1 text-xs sm:flex`,title:s,children:[(0,W.jsx)(V,{icon:ir,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:c})]}),e.repos.length>1&&o.length>0&&(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:`text-muted-foreground hover:text-foreground hidden max-w-48 cursor-pointer items-center gap-1 text-xs sm:flex`,title:s,children:[(0,W.jsx)(V,{icon:n?$n:o.length===1?o[0].next.icon:gr,className:B(`size-3.5 shrink-0`,n&&`animate-spin`)}),(0,W.jsx)(`span`,{className:`truncate`,children:c})]})}),(0,W.jsx)(on,{align:`end`,className:`w-64`,children:o.map(e=>(0,W.jsxs)(ln,{disabled:n,onSelect:()=>void l(e.repo.path),children:[(0,W.jsx)(V,{icon:e.next.icon}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[e.next.label,` ·`,` `,e.repo.path===``?e.repo.branch:e.repo.path]}),(0,W.jsx)(`span`,{className:`text-muted-foreground flex gap-1 text-xs`,children:(0,W.jsx)(Zt,{behind:e.repo.behind,ahead:e.repo.ahead})})]},e.repo.path))})]}),(0,W.jsxs)(`div`,{className:`ml-2.5 flex w-fit`,children:[(0,W.jsxs)(H,{variant:`outline`,size:`xs`,className:`rounded-e-none border-e-0`,disabled:t.committable.length===0,onClick:()=>t.setAction(`commit`),children:[(0,W.jsx)(V,{icon:Do}),(0,W.jsx)(`span`,{className:`hidden sm:inline`,children:`Commit`})]}),(0,W.jsxs)(pn,{open:t.menuOpen,onOpenChange:t.setMenuOpen,children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(H,{variant:`outline`,size:`icon-xs`,className:`rounded-s-none`,"aria-label":`Git actions`,children:(0,W.jsx)(V,{icon:t.committing?$n:br,className:B(`size-4`,t.committing&&`animate-spin`)})})}),(0,W.jsx)(on,{align:`end`,className:`w-56`,children:(0,W.jsx)(bp,{git:t,collapsed:!1})})]})]}),(0,W.jsx)(xp,{git:t})]})}function Cp({className:e,size:t=`default`,...n}){return(0,W.jsx)(Cu,{"data-slot":`switch`,"data-size":t,className:B(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,W.jsx)(Tu,{"data-slot":`switch-thumb`,className:`bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0`})})}var wp=`3.6.8`,Tp=`1.3.1`,Ep=[{family:`FiraCode Nerd Font`,label:`Fira Code`},{family:`JetBrainsMono Nerd Font`,label:`JetBrains Mono`},{family:`CaskaydiaCove Nerd Font`,label:`Cascadia Code`},{family:`Hack Nerd Font`,label:`Hack`}],Dp=[{value:`macos`,label:`macOS`},{value:`linux`,label:`Linux`},{value:`windows`,label:`Windows`}];async function Op(e){let t=`${e.font.size}px ${e.font.family}`;await Promise.all([document.fonts.load(t),document.fonts.load(`bold ${t}`)]);let n=document.documentElement.style;n.setProperty(`--pad-top`,`${e.padding.top}px`),n.setProperty(`--pad-right`,`${e.padding.right}px`),n.setProperty(`--pad-bottom`,`${e.padding.bottom}px`),n.setProperty(`--pad-left`,`${e.padding.left}px`)}function kp(e,t){let n=p();return{fontFamily:e.font.family,fontSize:e.font.size,lineHeight:e.font.lineHeight,ligatures:e.font.ligatures,cursorStyle:e.cursor.style,cursorBlink:e.cursor.blink,scrollback:e.scrollback,boldIsBright:e.boldIsBright,colors:{background:n.background,foreground:n.foreground,cursor:n.cursor,cursorText:n.background,selectionBackground:n.selectionBackground,selectionForeground:n.foreground,palette:n.palette},version:Ap(t),clickToMoveCursor:e.behavior.clickToMoveCursor,optionAsMeta:e.behavior.optionAsMeta,windowsCopyPaste:e.behavior.windowsCopyPaste}}function Ap(e){if(e===`offsite`)return`offsite 0.0.0`;if(e===`ghostty`)return`ghostty ${Tp}`;if(e===`iterm2`)return`iTerm2 ${wp}`;throw Error(`unknown terminal identity ${e}`)}function jp(e){return(0,W.jsxs)(`section`,{children:[(0,W.jsxs)(`h2`,{className:`text-muted-foreground mb-2 px-1 text-xs font-medium`,children:[e.title,e.note&&(0,W.jsxs)(`span`,{className:`font-normal`,children:[` · `,e.note]})]}),(0,W.jsx)(`div`,{className:`@container divide-y overflow-hidden rounded-xl border`,children:e.children})]})}function Q(e){return(0,W.jsxs)(`label`,{className:`flex min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2.5`,children:[(0,W.jsx)(`span`,{className:`min-w-0 flex-1 basis-40 text-sm font-medium`,children:e.label}),(0,W.jsx)(`div`,{className:`max-w-full shrink-0 @max-lg:has-[[data-slot=select-trigger],input:not([type=number])]:w-full @max-lg:has-[[data-slot=select-trigger],input:not([type=number])]:*:w-full @max-lg:**:data-[slot=select-trigger]:w-full`,children:e.children})]})}function Mp(e){let[t,n]=(0,U.useState)(e.value);function r(){t!==e.value&&(e.valid&&!e.valid(t)?n(e.value):e.onCommit(t))}return(0,W.jsx)(X,{className:B(`w-56`,e.className),type:e.type,min:e.type===`number`?0:void 0,step:e.step,placeholder:e.placeholder,disabled:e.disabled,value:t,onChange:e=>n(e.target.value),onBlur:r,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}})}function Np(e){return(0,W.jsx)(Mp,{type:`number`,className:`w-24`,step:e.step??1,value:String(e.value),valid:e=>e!==``&&Number(e)>=0,onCommit:t=>e.onCommit(Number(t))},e.value)}function Pp(e){let t=e.prefs.editor,[n,r]=(0,U.useState)(!Ep.some(e=>e.family===t.font.family));function i(t){E({...e.prefs,editor:t})}function a(e,n){i({...t,[e]:{...t[e],...n}})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jp,{title:`Font`,children:[(0,W.jsx)(Q,{label:`Family`,children:(0,W.jsxs)(ip,{value:n?`custom`:t.font.family,onValueChange:e=>{r(e===`custom`),e!==`custom`&&a(`font`,{family:e})},children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[Ep.map(e=>(0,W.jsx)(Z,{value:e.family,children:e.label},e.family)),(0,W.jsx)(Z,{value:`custom`,children:`Custom`})]})]})}),n&&(0,W.jsx)(Q,{label:`Custom family`,children:(0,W.jsx)(Mp,{placeholder:`Installed font name`,value:t.font.family,onCommit:e=>a(`font`,{family:e})})}),(0,W.jsx)(Q,{label:`Size`,children:(0,W.jsx)(Np,{value:t.font.size,step:.5,onCommit:e=>a(`font`,{size:e})})}),(0,W.jsx)(Q,{label:`Line height`,children:(0,W.jsx)(Np,{value:t.font.lineHeight,step:.05,onCommit:e=>a(`font`,{lineHeight:e})})}),(0,W.jsx)(Q,{label:`Ligatures`,children:(0,W.jsx)(Cp,{checked:t.font.ligatures,onCheckedChange:e=>a(`font`,{ligatures:e})})}),(0,W.jsx)(Q,{label:`Font features`,children:(0,W.jsx)(Mp,{placeholder:`'ss01', 'zero'`,value:t.font.features,onCommit:e=>a(`font`,{features:e})})})]}),(0,W.jsxs)(jp,{title:`Cursor`,children:[(0,W.jsx)(Q,{label:`Style`,children:(0,W.jsxs)(ip,{value:t.cursor.style,onValueChange:e=>a(`cursor`,{style:e}),children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`block`,children:`Block`}),(0,W.jsx)(Z,{value:`bar`,children:`Bar`}),(0,W.jsx)(Z,{value:`underline`,children:`Underline`})]})]})}),(0,W.jsx)(Q,{label:`Blink`,children:(0,W.jsx)(Cp,{checked:t.cursor.blink,onCheckedChange:e=>a(`cursor`,{blink:e})})})]}),(0,W.jsxs)(jp,{title:`Text`,children:[(0,W.jsx)(Q,{label:`Tab size`,children:(0,W.jsx)(Np,{value:t.tabSize,onCommit:e=>i({...t,tabSize:e})})}),(0,W.jsx)(Q,{label:`Word wrap`,children:(0,W.jsx)(Cp,{checked:t.wordWrap,onCheckedChange:e=>i({...t,wordWrap:e})})})]})]})}function Fp(e){let t=e.prefs;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(jp,{title:`Appearance`,children:(0,W.jsx)(Q,{label:`Theme`,children:(0,W.jsxs)(ip,{value:t.theme,onValueChange:e=>E({...t,theme:e}),children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsx)(sp,{children:Ot.map(e=>(0,W.jsx)(Z,{value:e.id,children:e.name},e.id))})]})})}),(0,W.jsx)(jp,{title:`Sidebar`,children:(0,W.jsx)(Q,{label:`Group active sessions by project in Inbox`,children:(0,W.jsx)(Cp,{checked:t.groupActiveByProject,onCheckedChange:e=>E({...t,groupActiveByProject:e})})})}),(0,W.jsx)(Ip,{}),(0,W.jsx)(H,{variant:`outline`,onClick:e.onRestore,children:`Restore browser defaults`})]})}function Ip(){let[e,t]=(0,U.useState)(`idle`),[n,r]=(0,U.useState)(null);async function i(){t(`checking`),r(null);try{let e=`serviceWorker`in navigator?await navigator.serviceWorker.getRegistration():void 0;if(e!==void 0){await e.update();let t=e.installing??e.waiting;t!==null&&await Lp(t)}if(await zp()===Rp()){t(`current`);return}location.reload()}catch(e){console.error(`could not check for updates`,e),r(It(e)),t(`idle`)}}return(0,W.jsx)(jp,{title:`App`,children:(0,W.jsx)(Q,{label:`Load the newest version of OffSite in this browser`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[n!==null&&(0,W.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Could not check: `,n]}),e===`current`&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Up to date`}),(0,W.jsx)(H,{size:`sm`,variant:`outline`,disabled:e===`checking`,onClick:()=>void i(),children:`Check for updates`})]})})})}async function Lp(e){await new Promise((t,n)=>{function r(){e.state===`activated`&&t(),e.state===`redundant`&&n(Error(`the new version failed to install`))}e.addEventListener(`statechange`,r),r()})}function Rp(){let e=document.querySelector(`script[type="module"][src]`)?.getAttribute(`src`);if(e==null)throw Error(`this page has no entry script`);return e}async function zp(){let e=await fetch(`/?update=${Date.now()}`,{cache:`no-store`});if(!e.ok)throw Error(`the server answered ${e.status}`);let t=new DOMParser().parseFromString(await e.text(),`text/html`).querySelector(`script[type="module"][src]`)?.getAttribute(`src`);if(t==null)throw Error(`the server page has no entry script`);return t}function Bp(e){for(let t=0;t<e.length;t++){let n=e[t];if(!n.startsWith(`-`)&&!n.startsWith(`+`))return!1;let r=n.startsWith(`-`),i=n.slice(1);if(i===``||i===`-`)return!1;if(i.startsWith(`-`)){if(!Vp(i.slice(1),r))return!1}else for(let n=0;n<i.length;n++){let a=i[n];if(a===`o`){let a=i.slice(n+1);if(a===``){if(t++,t===e.length)return!1;a=e[t]}if(!Vp(a,r))return!1;break}if(a===`b`||a===`c`||r&&`dfnprvx`.includes(a)||!r&&a===`i`)return!1}}return!0}function Vp(e,t){let n=e.toLowerCase().replace(/[-_]/g,``),r=t;return n.startsWith(`no`)&&(n=n.slice(2),r=!t),[`rcs`,`globalrcs`,`interactive`,`exec`].includes(n)?r:![`privileged`,`restricted`,`sourcetrace`,`verbose`,`xtrace`].includes(n)||!r}function Hp(e,t,n){if(t===`windows`)return`Not available on Windows`;if(e!==null&&/[\n"'\\$`;&|<>()*?[\]{}#!]/.test(e))return`Not available for commands with shell syntax`;let r=e===null?[n]:e.split(/[ \t]/).filter(e=>e!==``);if(r.length===0)return`Available for bash, zsh and fish`;let i=r[0],a=i.split(`/`).pop(),o=r.slice(1);return a===`bash`?t===`macos`&&(i===`/bin/bash`||!i.includes(`/`))?`Needs a newer bash than the one macOS includes`:o.every(e=>[`-l`,`--login`,`-i`].includes(e))?null:`Not available with these bash options`:a===`zsh`?Bp(o)?null:`Not available with these zsh options`:a===`fish`?o.every(e=>{if(e.startsWith(`--`)){let t=e.slice(2).split(`=`)[0];return t===``||![`command`,`no-config`,`no-execute`].some(e=>e.startsWith(t))}return!(e.startsWith(`-`)&&/[cNn]/.test(e))})?null:`Not available with these fish options`:`Available for bash, zsh and fish`}var Up=[10,15,30,45,60,120,180,300,600,900,1800,3600];function Wp(e){let t=e.config;function n(n){_t(e.machine,{...t,...n})}return(0,W.jsxs)(jp,{title:`Agents`,children:[(0,W.jsx)(Q,{label:`Send while working`,children:(0,W.jsxs)(ip,{value:t.delivery,onValueChange:n=>{if(n!==`queue`&&n!==`steer`)throw Error(`Unknown delivery ${n}`);_t(e.machine,{...t,delivery:n})},children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`queue`,children:`Queue messages`}),(0,W.jsx)(Z,{value:`steer`,children:`Steer the agent`})]})]})}),(0,W.jsx)(Q,{label:`Auto-skip questions`,children:(0,W.jsx)(Gp,{value:t.autoSkipQuestionTimeout,onChange:e=>n({autoSkipQuestionTimeout:e})})}),(0,W.jsx)(Q,{label:`Auto-resolve permissions`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t.autoPermissionTimeout!==null&&(0,W.jsxs)(ip,{value:t.autoPermissionMode,onValueChange:e=>{if(e!==`allow`&&e!==`deny`)throw Error(`Unknown decision ${e}`);n({autoPermissionMode:e})},children:[(0,W.jsx)(op,{className:`w-24`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`allow`,children:`Allow`}),(0,W.jsx)(Z,{value:`deny`,children:`Deny`})]})]}),(0,W.jsx)(Gp,{value:t.autoPermissionTimeout,onChange:e=>n({autoPermissionTimeout:e})})]})})]})}function Gp(e){let t=e.value===null||Up.includes(e.value)?Up:[...Up,e.value].sort((e,t)=>e-t);return(0,W.jsxs)(ip,{value:e.value===null?`off`:String(e.value),onValueChange:t=>e.onChange(t===`off`?null:Number(t)),children:[(0,W.jsx)(op,{className:`w-40`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`off`,children:`Off`}),t.map(e=>(0,W.jsx)(Z,{value:String(e),children:e===3600?`After 1 hour`:e===60?`After 1 minute`:e%60==0?`After ${e/60} minutes`:`After ${e} seconds`},e))]})]})}function Kp(e){let t=e.config[e.setting],[n,i]=(0,U.useState)(null),[a,o]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(t.provider===null)return;let n=!0;return i(null),o(null),r(e.machine,`capabilities`,{provider:t.provider,accountId:t.accountId,projectId:null}).then(e=>{n&&i(e.models)},e=>{n&&o(It(e))}),()=>{n=!1}},[e.machine,t.provider,t.accountId]);function s(t){_t(e.machine,{...e.config,[e.setting]:t})}function c(t){if(t===`off`){s({provider:null,accountId:null,model:null});return}if(t===`opencode`){s({provider:`opencode`,accountId:null,model:null});return}let n=[...e.claudeAccounts,...e.codexAccounts].find(e=>e.id===t);if(n===void 0)throw Error(`That account was removed`);s({provider:n.provider,accountId:n.id,model:null})}return(0,W.jsxs)(jp,{title:e.title,children:[(0,W.jsx)(Q,{label:`Account`,children:(0,W.jsxs)(ip,{value:t.provider===null?`off`:t.provider===`opencode`?`opencode`:t.accountId??`off`,onValueChange:c,children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`off`,children:`Off`}),[...e.claudeAccounts,...e.codexAccounts].map(e=>(0,W.jsxs)(Z,{value:e.id,disabled:!e.valid,children:[(0,W.jsx)(ic,{provider:e.provider,className:`size-4`}),`${yn[e.provider]} · ${e.name}`]},e.id)),e.openCode.available&&(0,W.jsxs)(Z,{value:`opencode`,children:[(0,W.jsx)(ic,{provider:`opencode`,className:`size-4`}),yn.opencode]})]})]})}),t.provider!==null&&(0,W.jsx)(Q,{label:`Model`,children:(0,W.jsxs)(ip,{value:t.model??void 0,disabled:n===null,onValueChange:e=>s({...t,model:e}),children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{placeholder:a===null?n===null?`Loading…`:`Choose a model`:`Unavailable`})}),(0,W.jsx)(sp,{children:(n??[]).map(e=>(0,W.jsx)(Z,{value:e.value,children:e.name},e.value))})]})}),a!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:a})]})}var qp={zsh:`M11.415 5.038a.58.58 0 0 0-.543.197L.135 18.021a.58.58 0 0 0 .071.814.58.58 0 0 0 .815-.07L11.757 5.979a.58.58 0 0 0-.07-.815.6.6 0 0 0-.272-.126m-8.113.317a3.133 3.133 0 0 0-3.12 3.12 3.13 3.13 0 0 0 3.12 3.119A3.133 3.133 0 0 0 6.42 8.475a3.13 3.13 0 0 0-3.119-3.119m0 1.806a1.3 1.3 0 0 1 1.314 1.313 1.3 1.3 0 0 1-1.314 1.312A1.3 1.3 0 0 1 1.99 8.475a1.3 1.3 0 0 1 1.312-1.314m5.253 5.253a3.13 3.13 0 0 0-3.119 3.119 3.13 3.13 0 0 0 3.12 3.118 3.133 3.133 0 0 0 3.118-3.12 3.133 3.133 0 0 0-3.119-3.118m0 1.805a1.3 1.3 0 0 1 1.313 1.314c0 .735-.577 1.312-1.312 1.312a1.3 1.3 0 0 1-1.314-1.312 1.3 1.3 0 0 1 1.313-1.314m7.201 3.276a.58.58 0 0 0-.578.578.58.58 0 0 0 .578.578h7.666a.58.58 0 0 0 .579-.578.58.58 0 0 0-.579-.578Z`,bash:`M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z`,fish:`m19.164 9.228-3.016 2.688v.527l3.016 2.688v-1.228l-1.936-1.723 1.936-1.724V9.228m-6.658.046v1.208l1.905 1.696-1.905 1.695v1.209l2.968-2.645v-.518l-2.968-2.645M9.781 7.847a6.519 6.519 0 0 0-2.038-.335c-.672 0-1.349.112-2.03.335a9.23 9.23 0 0 0-2.088 1.017v.723c.69-.4 1.377-.7 2.06-.897a7.388 7.388 0 0 1 2.058-.296c.684 0 1.368.098 2.052.296a9.452 9.452 0 0 1 2.075.897v-.723a9.229 9.229 0 0 0-2.09-1.017m.014 7.78a7.371 7.371 0 0 1-2.052.296 7.388 7.388 0 0 1-2.057-.296 9.18 9.18 0 0 1-2.061-.897v.723a9.228 9.228 0 0 0 2.088 1.017 6.492 6.492 0 0 0 2.03.335c.678 0 1.357-.112 2.038-.335a9.227 9.227 0 0 0 2.089-1.017v-.723c-.7.4-1.391.7-2.075.897m.602-11.23h-.51L7.28 6.92h1.19l1.672-1.62 1.671 1.62h1.191l-2.607-2.525m-2.965 13.68v-.824H6.427v.825l.786 1.527h.614l-.395-1.527M4.127 10.95v1.216H5.13V10.95H4.127m-1.16-1.695L0 11.901v.518l2.967 2.645v-1.208L1.063 12.16l1.904-1.695V9.256m20.68 3.28c-.235-.3-.574-.509-1.017-.626.395-.103.696-.278.902-.525.206-.247.31-.556.31-.926 0-.546-.197-.984-.59-1.314-.393-.33-.919-.495-1.575-.495-.22 0-.473.025-.758.073-.284.048-.61.12-.974.217v.84c.314-.12.613-.21.9-.27a4.05 4.05 0 0 1 .832-.091c.403 0 .714.093.933.278.218.185.328.451.328.798 0 .328-.118.584-.353.768-.235.184-.562.276-.98.276h-.697v.75h.696c.458 0 .821.116 1.09.346.268.23.402.542.402.934 0 .425-.134.75-.402.976-.269.226-.653.339-1.153.339a3.55 3.55 0 0 1-.89-.117 4.395 4.395 0 0 1-.91-.358v.909a6.1 6.1 0 0 0 .95.249c.323.057.639.085.95.085.738 0 1.315-.177 1.733-.53.417-.355.626-.842.626-1.463 0-.449-.118-.823-.353-1.123`,powershell:`M23.181 2.974c.568 0 .923.463.792 1.035l-3.659 15.982c-.13.572-.697 1.035-1.265 1.035H.819c-.568 0-.923-.463-.792-1.035L3.686 4.009c.13-.572.697-1.035 1.265-1.035zm-8.375 9.346c.251-.394.227-.905-.09-1.243L9.122 5.125c-.38-.404-1.037-.407-1.466-.003-.429.402-.468 1.056-.088 1.46l4.662 4.96v.11l-7.42 5.374c-.45.327-.533.977-.187 1.453.346.476.991.597 1.44.27l8.229-5.91c.28-.196.438-.365.514-.52zm-2.796 4.399a.928.928 0 00-.934.923c0 .51.418.923.934.923h4.433a.928.928 0 00.934-.923.928.928 0 00-.934-.923z`,cmd:`M8.165 6V3h7.665v3H8.165zm-.5-3H1c-.55 0-1 .45-1 1v2h7.665V3zM23 3h-6.67v3H24V4c0-.55-.45-1-1-1zM0 6.5h24V20c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V6.5zM11.5 18c0 .3.2.5.5.5h8c.3 0 .5-.2.5-.5v-1.5c0-.3-.2-.5-.5-.5h-8c-.3 0-.5.2-.5.5V18zm-5.2-4.55l-3.1 3.1c-.25.25-.25.6 0 .8l.9.9c.25.25.6.25.8 0l4.4-4.4a.52.52 0 0 0 0-.8l-4.4-4.4c-.2-.2-.6-.2-.8 0l-.9.9c-.25.2-.25.55 0 .8l3.1 3.1z`},Jp={zsh:`zsh`,bash:`bash`,fish:`fish`,pwsh:`powershell`,powershell:`powershell`,cmd:`cmd`},Yp={macos:[`zsh`,`bash`,`fish`,`pwsh`],linux:[`bash`,`zsh`,`fish`,`pwsh`],windows:[`pwsh`,`powershell`,`cmd`]};function Xp(e){let t=e.trim().split(/[\\/]/).pop()?.toLowerCase().replace(/\.exe$/,``);return t===void 0?void 0:Jp[t]}function Zp(e){return e.replace(/[\\/][^\\/]*$/,``)}function Qp(e){return(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 flex-none`,fill:`currentColor`,children:(0,W.jsx)(`path`,{d:qp[e.logo]})})}function $p(e){let[t,n]=(0,U.useState)(e.value??``),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(null),c=Xp(t),l=e.platform===e.device,u=l?i:Yp[e.platform].map(e=>({name:e,path:null}));(0,U.useEffect)(()=>{l&&r(e.machine,`terminal.shells`,void 0).then(a,e=>s(It(e)))},[e.machine,l]);function d(t){n(t),t!==(e.value??``)&&e.onCommit(t===``?null:t)}return(0,W.jsxs)(`div`,{className:`relative w-56`,children:[c&&(0,W.jsx)(`span`,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 -translate-y-1/2`,children:(0,W.jsx)(Qp,{logo:c})}),(0,W.jsx)(X,{className:c?`pr-9 pl-8`:`pr-9`,placeholder:`System default`,value:t,onChange:e=>n(e.target.value),onBlur:()=>d(t),onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}}),(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon-xs`,"aria-label":`Known shells`,className:`text-muted-foreground absolute top-1/2 right-1.5 -translate-y-1/2`,children:(0,W.jsx)(V,{icon:ur})})}),(0,W.jsxs)(on,{align:`end`,className:`w-72`,children:[o&&(0,W.jsx)(`p`,{className:`text-destructive px-2 py-1.5 text-xs`,children:o}),u?.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-2 py-1.5 text-xs`,children:`No known shells found`}),u?.map(e=>(0,W.jsxs)(ln,{onSelect:()=>d(e.path??e.name),children:[(0,W.jsx)(Qp,{logo:Jp[e.name]}),e.name,e.path!==null&&(0,W.jsx)(`span`,{className:`text-muted-foreground ml-auto min-w-0 truncate pl-3 text-xs [direction:rtl]`,title:e.path,children:(0,W.jsx)(`bdi`,{children:Zp(e.path)})})]},e.path??e.name)),(0,W.jsx)(an,{}),(0,W.jsx)(ln,{onSelect:()=>d(``),children:`System default`})]})]})]})}function em(e){let t=e.config.workingDir[e.platform]??``,n=e.config.newThreads;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(jp,{title:`Projects`,children:(0,W.jsx)(Q,{label:`Working directory`,children:(0,W.jsx)(Mp,{className:`w-72 font-mono`,value:t,placeholder:`Home folder`,onCommit:t=>_t(e.machine,{...e.config,workingDir:{...e.config.workingDir,[e.platform]:t.trim()===``?null:t.trim()}})},`${e.machine}-${t}`)})}),(0,W.jsx)(jp,{title:`New threads`,children:(0,W.jsx)(Q,{label:`Account`,children:(0,W.jsxs)(ip,{value:n.provider===`opencode`?`opencode`:n.accountId??void 0,onValueChange:t=>{if(t===`opencode`){_t(e.machine,{...e.config,newThreads:{...n,provider:`opencode`,accountId:null}});return}let r=[...e.claudeAccounts,...e.codexAccounts].find(e=>e.id===t);if(r===void 0)throw Error(`That account was removed`);_t(e.machine,{...e.config,newThreads:{...n,provider:r.provider,accountId:r.id}})},children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{placeholder:`First available`})}),(0,W.jsxs)(sp,{children:[[...e.claudeAccounts,...e.codexAccounts].map(e=>(0,W.jsxs)(Z,{value:e.id,disabled:!e.valid,children:[(0,W.jsx)(ic,{provider:e.provider,className:`size-4`}),`${yn[e.provider]} · ${e.name}`]},e.id)),e.openCode.available&&(0,W.jsxs)(Z,{value:`opencode`,children:[(0,W.jsx)(ic,{provider:`opencode`,className:`size-4`}),yn.opencode]})]})]})})}),(0,W.jsx)(tm,{machine:e.machine,config:e.config,platform:e.platform,defaultShell:e.defaultShell},e.machine),(0,W.jsx)(Wp,{machine:e.machine,config:e.config}),(0,W.jsx)(Kp,{title:`Commit messages and pull requests`,setting:`commitMessage`,machine:e.machine,config:e.config,claudeAccounts:e.claudeAccounts,codexAccounts:e.codexAccounts,openCode:e.openCode},`git-${e.machine}`),(0,W.jsx)(Kp,{title:`Session titles`,setting:`titleGeneration`,machine:e.machine,config:e.config,claudeAccounts:e.claudeAccounts,codexAccounts:e.codexAccounts,openCode:e.openCode},`titles-${e.machine}`),(0,W.jsx)(H,{variant:`outline`,onClick:e.onRestore,children:`Restore machine defaults`})]})}function tm(e){let t=e.config.terminal,[n,r]=(0,U.useState)(e.platform),i=Hp(t.shell[e.platform],e.platform,e.defaultShell);function a(t){_t(e.machine,{...e.config,terminal:t})}return(0,W.jsxs)(jp,{title:`Shell`,note:`Applies to new terminals`,children:[(0,W.jsx)(Q,{label:`Platform`,children:(0,W.jsxs)(ip,{value:n,onValueChange:e=>r(e),children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsx)(sp,{children:Dp.map(t=>(0,W.jsxs)(Z,{value:t.value,children:[t.label,t.value===e.platform&&(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`(this machine)`})]},t.value))})]})}),(0,W.jsx)(Q,{label:`Command`,children:(0,W.jsx)($p,{machine:e.machine,platform:n,device:e.platform,value:t.shell[n],onCommit:e=>a({...t,shell:{...t.shell,[n]:e}})},`${e.machine}-${n}-command`)}),(0,W.jsx)(Q,{label:(0,W.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[`Shell integration`,(0,W.jsx)(Nr,{label:(0,W.jsxs)(`div`,{children:[`Tells the terminal where prompts and commands start and end.`,(0,W.jsxs)(`ul`,{className:`mt-1 list-disc pl-4`,children:[(0,W.jsx)(`li`,{children:`Click in the command line to move the cursor`}),(0,W.jsx)(`li`,{children:`Ignore clipboard reads once the command that asked has finished`})]})]}),children:(0,W.jsx)(`span`,{onClick:e=>e.preventDefault(),children:(0,W.jsx)(V,{icon:Fo,"aria-label":`About shell integration`,className:`text-muted-foreground size-3.5`})})})]}),children:(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i!==null&&(0,W.jsx)(`span`,{className:`text-muted-foreground max-w-32 text-right text-xs sm:max-w-none`,children:i}),(0,W.jsx)(Cp,{checked:i===null&&t.behavior.shellIntegration,disabled:i!==null,onCheckedChange:e=>a({...t,behavior:{...t.behavior,shellIntegration:e}})})]})}),(0,W.jsx)(nm,{identity:t.behavior.terminalIdentity,onChange:e=>a({...t,behavior:{...t.behavior,terminalIdentity:e}})})]})}function nm(e){return(0,W.jsx)(Q,{label:`Report the terminal as`,children:(0,W.jsxs)(ip,{value:e.identity,onValueChange:e.onChange,children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`offsite`,children:`OffSite`}),(0,W.jsx)(Z,{value:`ghostty`,children:`Ghostty`}),(0,W.jsx)(Z,{value:`iterm2`,children:`iTerm2`})]})]})})}var rm=(0,U.createContext)({});function im(e){let t=(0,U.useRef)(null);return t.current===null&&(t.current=e()),t.current}var am=typeof window<`u`?U.useLayoutEffect:U.useEffect,om=(0,U.createContext)(null);function sm(e,t){e.indexOf(t)===-1&&e.push(t)}function cm(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function lm([...e],t,n){let r=t<0?e.length+t:t;if(r>=0&&r<e.length){let r=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(r,0,i)}return e}var um=(e,t,n)=>n>t?t:n<e?e:n,dm={},fm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),pm=e=>typeof e==`object`&&!!e,mm=e=>/^0[^.\s]+$/u.test(e);function hm(e){let t;return()=>(t===void 0&&(t=e()),t)}var gm=e=>e,_m=(...e)=>e.reduce((e,t)=>n=>t(e(n))),vm=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ym=class{constructor(){this.subscriptions=[]}add(e){return sm(this.subscriptions,e),()=>this.remove(e)}remove(e){cm(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},bm=e=>e*1e3,xm=e=>e/1e3,Sm=(e,t)=>t?1e3/t*e:0,Cm=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function wm(e,t,n,r){return e===t&&n===r?gm:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=Cm(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(Cm(s+1e-7,e,n)-i-r)}return Cm(s,t,r)}}var Tm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Em=e=>t=>1-e(1-t),Dm=wm(.33,1.53,.69,.99),Om=Em(Dm),km=Tm(Om),Am=e=>e>=1?1:(e*=2)<1?.5*Om(e):.5*(2-2**(-10*(e-1))),jm=e=>1-Math.sin(Math.acos(e)),Mm=Em(jm),Nm=Tm(jm),Pm=wm(.42,0,1,1),Fm=wm(0,0,.58,1),Im=wm(.42,0,.58,1),Lm=e=>Array.isArray(e)&&typeof e[0]!=`number`,Rm=e=>Array.isArray(e)&&typeof e[0]==`number`,zm={linear:gm,easeIn:Pm,easeInOut:Im,easeOut:Fm,circIn:jm,circInOut:Nm,circOut:Mm,backIn:Om,backInOut:km,backOut:Dm,anticipate:Am},Bm=e=>typeof e==`string`,Vm=e=>{if(Rm(e)){let[t,n,r,i]=e;return wm(t,n,r,i)}return Bm(e)?zm[e]:e},Hm={delta:0,timestamp:0,isProcessing:!1},Um;function Wm(){Um=void 0}var Gm={now:()=>(Um===void 0&&Gm.set(Hm.isProcessing||dm.useManualTiming?Hm.timestamp:performance.now()),Um),set:e=>{Um=e,queueMicrotask(Wm)}},Km=e=>Math.round(e*1e5)/1e5,qm=e=>t=>typeof t==`string`&&t.startsWith(e),Jm=qm(`--`),Ym=qm(`var(--`),Xm=e=>Ym(e)?Zm.test(e.split(`/*`)[0].trim()):!1,Zm=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Qm(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var $m={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},eh={...$m,transform:e=>um(0,1,e)},th={...$m,default:1},nh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rh(e){return e==null}var ih=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ah=(e,t)=>n=>!!(typeof n==`string`&&ih.test(n)&&n.startsWith(e)||t&&!rh(n)&&Object.prototype.hasOwnProperty.call(n,t)),oh=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(nh);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},sh=e=>um(0,255,e),ch={...$m,transform:e=>Math.round(sh(e))},lh={test:ah(`rgb`,`red`),parse:oh(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ch.transform(e)+`, `+ch.transform(t)+`, `+ch.transform(n)+`, `+Km(eh.transform(r))+`)`},uh=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function dh(e){let t=e.length>5?2:1,n=uh(e,3,t);return{red:parseInt(uh(e,0,t),16),green:parseInt(uh(e,1,t),16),blue:parseInt(uh(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var fh={test:ah(`#`),parse:dh,transform:lh.transform},ph=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mh=ph(`deg`),hh=ph(`%`),$=ph(`px`),gh=ph(`vh`),_h=ph(`vw`),vh={...hh,parse:e=>hh.parse(e)/100,transform:e=>hh.transform(e*100)},yh={test:ah(`hsl`,`hue`),parse:oh(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+hh.transform(Km(t))+`, `+hh.transform(Km(n))+`, `+Km(eh.transform(r))+`)`},bh={test:e=>lh.test(e)||fh.test(e)||yh.test(e),parse:e=>lh.test(e)?lh.parse(e):yh.test(e)?yh.parse(e):fh.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?lh.transform(e):yh.transform(e),getAnimatableNone:e=>{let t=bh.parse(e);return t.alpha=0,bh.transform(t)}},xh=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Sh=new RegExp(nh.source),Ch=new RegExp(xh.source,`i`);function wh(e){return isNaN(e)&&typeof e==`string`&&(Sh.test(e)||Ch.test(e))}var Th=`number`,Eh=`color`,Dh=`var`,Oh=`var(`,kh="${}",Ah=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function jh(e){let t=e.toString();return Sh.test(t)||Ch.test(t)}function Mh(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ah,e=>(bh.test(e)?(r.color.push(a),i.push(Eh),n.push(bh.parse(e))):e.startsWith(Oh)?(r.var.push(a),i.push(Dh),n.push(e)):(r.number.push(a),i.push(Th),n.push(parseFloat(e))),++a,kh)).split(kh),indexes:r,types:i}}function Nh(e){return Mh(e).values}function Ph({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Th?Km(r[a]):e===Eh?bh.transform(r[a]):r[a]}return i}}function Fh(e){return Ph(Mh(e))}var Ih=e=>typeof e==`number`?0:bh.test(e)?bh.getAnimatableNone(e):e,Lh=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Ih(e);function Rh(e){let t=Mh(e);return Ph(t)(t.values.map((e,n)=>Lh(e,t.split[n])))}var zh={test:wh,parse:Nh,createTransformer:Fh,getAnimatableNone:Rh};function Bh(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Vh({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Bh(s,r,e+1/3),a=Bh(s,r,e),o=Bh(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Hh(e,t){return n=>n>0?t:e}var Uh=(e,t,n)=>e+(t-e)*n,Wh=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Gh=[fh,lh,yh],Kh=e=>Gh.find(t=>t.test(e));function qh(e){let t=Kh(e);if(!t)return!1;let n=t.parse(e);return t===yh&&(n=Vh(n)),n}var Jh=(e,t)=>{let n=qh(e),r=qh(t);if(!n||!r)return Hh(e,t);let i={...n};return e=>(i.red=Wh(n.red,r.red,e),i.green=Wh(n.green,r.green,e),i.blue=Wh(n.blue,r.blue,e),i.alpha=Uh(n.alpha,r.alpha,e),lh.transform(i))},Yh=new Set([`none`,`hidden`]);function Xh(e,t){return Yh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zh(e,t){return n=>Uh(e,t,n)}function Qh(e){return typeof e==`number`?Zh:typeof e==`string`?Xm(e)?Hh:bh.test(e)?Jh:ng:Array.isArray(e)?$h:typeof e==`object`?bh.test(e)?Jh:eg:Hh}function $h(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Qh(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function eg(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qh(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function tg(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var ng=(e,t)=>{let n=Mh(e),r=Mh(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?Yh.has(e)&&!r.values.length||Yh.has(t)&&!n.values.length?Xh(e,t):_m($h(tg(n,r),r.values),Ph(r)):Hh(e,t)},rg=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ig(e,t){let n=rg.exec(e);if(!n)return;let r=rg.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Km(Uh(a,o,e))+i}function ag(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Uh(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=ig(e,t);if(n)return n}return Qh(e)(e,t)}var og=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function sg(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var cg=40;function lg(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=og.reduce((e,t)=>(e[t]=sg(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=dm.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,cg),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:og.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<og.length;t++)o[og[t]].cancel(e)},state:n,steps:o}}var{schedule:ug,cancel:dg,steps:fg}=lg(typeof requestAnimationFrame<`u`?requestAnimationFrame:gm,!0,Hm),pg=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ug.update(t,e),stop:()=>dg(t),now:()=>Hm.isProcessing?Hm.timestamp:Gm.now()}},mg=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},hg=2e4;function gg(e,t=50,n=hg,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function _g(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(gg(o),hg);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:xm(s)}}var vg=100,yg=10,bg=1,xg=800,Sg=.3,Cg=.3,wg=.01,Tg=2,Eg=.005,Dg=.5,Og=.01,kg=10,Ag=.05,jg=e=>e<0?1/Math.max(1+e,Ag):Math.max(1-e,Ag);function Mg(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Fg(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Ng(e,t){return e*Math.sqrt(1-t*t)}var Pg=12;function Fg(e,t,n){let r=n;for(let n=1;n<Pg;n++)r-=e(r)/t(r);return r}var Ig=.001;function Lg({duration:e=xg,bounce:t=Sg}){let n,r,i=jg(t);e=um(Og,kg,xm(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Ng(t,i),o=Math.exp(-r);return Ig-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Ng(t*t,i);return(-n(t)+Ig>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Fg(n,r,a),s=o*Mg(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:bm(e)}}var Rg=(e,t)=>(t?e>=0:e>0)&&e<1/0;function zg(e,t){if(Rg(e,t))return e}function Bg(e){let t=zg(e.stiffness),n=zg(e.damping,!0),r=zg(e.mass),i={...e,stiffness:t??vg,damping:n??yg,mass:r??bg,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=jg(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Mg(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Lg(i)),i.isResolvedFromDuration=!0;Rg(i.stiffness)&&Rg(i.damping,!0)||(i.stiffness=vg,i.damping=yg)}return i}function Vg(e=Cg,t=Sg){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Bg({...n}),f=e=>d?0:-xm(e),p=s/(2*Math.sqrt(o*c)),m=xm(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?wg:Tg),g.restDelta=n.restDelta||(e?Eg:Dg)};_();let v,y,b;if(p<1){let e=Ng(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>bm(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=bm(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(gg(S),hg),t=mg(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var Hg=Object.assign(Vg,{applyToOptions:e=>{let t=_g(e,100,Vg);return e.ease=t.ease,e.duration=bm(t.duration),e.type=`keyframes`,e}});function Ug({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=Hg({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Wg(e,t,n){let r=[],i=dm.mix||ag,a=e.length-1;for(let o=0;o<a;o++){let a=n?.(e[o],e[o+1])||i(e[o],e[o+1]);t&&(a=_m(Array.isArray(t)?t[o]||gm:t,a)),r.push(a)}return r}function Gg(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Wg(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=vm(e[r],e[r+1],n);return s[r](i)};return n?t=>l(um(e[0],e[a-1],t)):l}function Kg(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=vm(0,t,r);e.push(Uh(n,1,i))}}function qg(e){let t=[0];return Kg(t,e.length-1),t}function Jg(e,t){return e.map(e=>e*t)}function Yg(e,t){return e.map(()=>t||Im).splice(0,e.length-1)}function Xg({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=Lm(r)?r.map(Vm):Vm(r)||Im,s={done:!1,value:t[0]};if(!a&&t.length===2&&!Array.isArray(o)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,i=n===r?void 0:(dm.mix||ag)(n,r);return{calculatedDuration:e,next:t=>(s.value=i?i(o(e>0?um(0,1,t/e):1)):r,s.done=t>=e,s)}}let c=Gg(Jg(n&&n.length===t.length?n:qg(t),e),t,{ease:Array.isArray(o)?o:Yg(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=c(t),s.done=t>=e,s)}}var Zg=5;function Qg(e,t,n){let r=Math.max(t-Zg,0);return Sm(n-e(r),t-r)}function $g(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Qg(t=>e.next(t).value,t,e.next(t).value)}var e_=e=>e!==null;function t_(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(e_),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var n_={decay:Ug,inertia:Ug,tween:Xg,keyframes:Xg,spring:Hg};function r_(e){typeof e.type==`string`&&(e.type=n_[e.type])}var i_=40,a_=(e,t)=>t-e>i_&&!dm.useManualTiming?t:e;function o_(e,t){return{kind:e,animation:t,timestamp:Gm.now(),frameTimestamp:Hm.timestamp,frameIsProcessing:Hm.isProcessing}}function s_(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...o_(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function c_(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...o_(`layout-animation-start`,e),node:t})}catch{}}var l_=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},u_=e=>e/100,d_=e=>Math.round(e*1e4)/1e4,f_=class extends l_{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Gm.now()&&this.tick(Gm.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),s_(this,this.options)}initAnimation(){let{options:e}=this;r_(e);let{type:t=Xg,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Xg;this.mixKeyframes=void 0,s!==Xg&&typeof o[0]!=`number`&&(this.mixKeyframes=_m(u_,e.mixer?.(o[0],o[1])||ag(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=gg(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=a_(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==Ug&&(f.value=t_(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??d_((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==Ug?t_(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=um(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return xm(this.calculatedDuration)}get iterationDuration(){return this.duration+xm(this.options.delay??0)}get time(){return xm(this.currentTime)}set time(e){e=bm(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return $g(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Gm.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=xm(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=pg,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Gm.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},p_=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function m_(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(nh)||[];if(!r)return e;let i=n.replace(r,``),a=+!!p_.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var h_=/\b([a-z-]*)\(.*?\)/gu,g_={...zh,getAnimatableNone:e=>{let t=e.match(h_);return t?t.map(m_).join(` `):e}},__={...zh,getAnimatableNone:e=>{let t=zh.parse(e);return zh.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},v_={...$m,transform:Math.round},y_={rotate:mh,pathRotation:mh,rotateX:mh,rotateY:mh,rotateZ:mh,scale:th,scaleX:th,scaleY:th,scaleZ:th,skew:mh,skewX:mh,skewY:mh,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:eh,originX:vh,originY:vh,originZ:$},b_={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,...y_,zIndex:v_,fillOpacity:eh,strokeOpacity:eh,numOctaves:v_},x_={...b_,color:bh,backgroundColor:bh,outlineColor:bh,fill:bh,stroke:bh,borderColor:bh,borderTopColor:bh,borderRightColor:bh,borderBottomColor:bh,borderLeftColor:bh,filter:g_,WebkitFilter:g_,mask:__,WebkitMask:__},S_=e=>x_[e],C_=new Set([g_,__]);function w_(e,t){let n=S_(e);return C_.has(n)||(n=zh),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function T_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var E_=e=>e*180/Math.PI,D_=e=>k_(E_(Math.atan2(e[1],e[0]))),O_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:D_,rotateZ:D_,skewX:e=>E_(Math.atan(e[1])),skewY:e=>E_(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},k_=e=>(e%=360,e<0&&(e+=360),e),A_=D_,j_=e=>Math.hypot(e[0],e[1]),M_=e=>Math.hypot(e[4],e[5]),N_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:j_,scaleY:M_,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(j_(e)+M_(e))/2,rotateX:e=>k_(E_(Math.atan2(e[6],e[5]))),rotateY:e=>k_(E_(Math.atan2(-e[2],e[0]))),rotateZ:A_,rotate:A_,skewX:e=>E_(Math.atan(e[4])),skewY:e=>E_(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function P_(e){return+!!e.includes(`scale`)}function F_(e,t){if(!e||e===`none`)return P_(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return P_(t);let r=(n[1]?N_:O_)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var I_=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return F_(n,t)},L_=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],R_=new Set([...L_,`pathRotation`]),z_=e=>e===$m||e===$,B_=new Set([`x`,`y`,`z`]),V_=L_.filter(e=>!B_.has(e));function H_(e){let t=[];return V_.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var U_=new Set([`bottom`,`right`]);function W_(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var G_=({transform:e})=>F_(e,`x`),K_=({transform:e})=>F_(e,`y`),q_={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>W_(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>W_(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:G_,y:K_,translateX:G_,translateY:K_},J_=new Set,Y_=!1,X_=!1,Z_=!1;function Q_(){if(X_){let e=[],t=new Set,n=new Set;J_.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),U_.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=H_(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}X_=!1,Y_=!1,J_.forEach(e=>e.complete(Z_)),J_.clear()}function $_(){J_.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(X_=!0)})}function ev(){Z_=!0,$_(),Q_(),Z_=!1}function tv(e,t,n){if(typeof e==`string`){if(fm(e)||mm(e))return parseFloat(e);if(!zh.test(e)&&zh.test(n))return w_(t,n)}return e??void 0}var nv=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(J_.add(this),Y_||(Y_=!0,ug.read($_),ug.resolveKeyframes(Q_))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=tv(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}T_(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),J_.delete(this)}cancel(){this.state===`scheduled`&&(J_.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},rv=e=>e.startsWith(`--`);function iv(e,t,n){rv(t)?e.style.setProperty(t,n):e.style[t]=n}var av={};function ov(e,t){let n=hm(e);return()=>av[t]??n()}var sv=ov(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),cv=ov(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),lv=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uv={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:lv([0,.65,.55,1]),circOut:lv([.55,0,1,.45]),backIn:lv([.31,.01,.66,-.59]),backOut:lv([.33,1.53,.69,.99])};function dv(e,t){if(e)return typeof e==`function`?cv()?mg(e,t):`ease-out`:Rm(e)?lv(e):Array.isArray(e)?e.map(e=>dv(e,t)||uv.easeOut):uv[e]}function fv(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=dv(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function pv(e){return typeof e==`function`&&`applyToOptions`in e}function mv({type:e,...t}){return pv(e)&&cv()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var hv=class extends l_{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=mv(e);this.animation=fv(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=t_(r,this.options,o,this.speed);this.updateMotionValue?.(e),iv(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},s_(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return xm(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+xm(e)}get time(){return xm(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=bm(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&sv()?(this.animation.timeline=e,t?.(this.animation),gm):n(this)}},gv={anticipate:Am,backInOut:km,circInOut:Nm};function _v(e){return e in gv}function vv(e){typeof e.ease==`string`&&_v(e.ease)&&(e.ease=gv[e.ease])}var yv=class extends hv{constructor(e){vv(e),r_(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Gm.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new f_({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?um(0,10,a):0,s=this.sample(a);n&&r&&iv(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},bv=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(zh.test(e)||e===`0`)&&!e.startsWith(`url(`));function xv(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Sv(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=bv(i,t),s=bv(a,t);return!o||!s?!1:xv(e)||(n===`spring`||pv(n))&&r}function Cv(e){e.duration=0,e.type=`keyframes`}var wv=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Tv=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ev(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Tv.test(e[t]))return!0;return!1}var Dv=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),Ov=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),kv=()=>!dm.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function Av(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(wv.has(n)||Ov.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return kv()&&(wv.has(n)||Ov.has(n)&&Ev(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!Dv(e)}var jv=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Mv={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Nv=L_.length,Pv={},Fv=(e,t,n=jv(t,y_[e]))=>(Pv[e]||(Pv[e]=(Mv[e]||e)+`(`))+n+`)`,Iv=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function Lv(e,t,n){let r=``;for(let i=0;i<Nv;i++){let a=L_[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=jv(o,b_[a]));Iv(a,o)||(r+=Fv(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Fv(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Rv=new WeakMap,zv=200,Bv=.001,Vv=.1,Hv=.001,Uv=100,Wv=e=>/^(linear|ease(In|Out|InOut))$/.test(e),Gv=(e,t)=>Math.abs(e-t)<=Bv,Kv=(e,t)=>e-t,qv=(e,t,n)=>qg(Array(n+1)).map(n=>Uh(e,t,n)),Jv=e=>e.motionValue.owner,Yv=e=>Rv.get(e),Xv=({state:e})=>e===`idle`||e===`finished`,Zv=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),Qv=({name:e,motionValue:t})=>e&&L_.includes(e)&&t?.owner?.current instanceof HTMLElement&&kv()&&cv();function $v(e){let t=Jv(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(Zv(t,`transform`)||`none`)===`none`&&!Zv(t,`pathRotation`)&&!t.projection?.isProjecting()&&!Dv(e)}var ey=class extends f_{constructor(e){let t=Jv(e).current,{driver:n=pg}=e,r,i=$v(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=Yv(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=Yv(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;let{stop:a}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),a()}}get group(){return Yv(Jv(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(Gm.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=Rm(n)?lv(n):Wv(n)&&uv[n];if(o&&!i&&!r&&e.length===2&&t===Xg&&this.holdTime===null){let e=this.startTime+a/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,times:u,keyframes:d,type:f}=a,p=(f||Xg)===Xg?u||qg(d):[0,1],m=n+o/r,h=[];if(this.holdTime!==null||!(i>0))return h;for(let n=Math.max(0,Math.floor((e-m)*r/i));n<=s;n++){let a=m+n*i/r;if(a>t)break;for(let o of p){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&h.push(s)}}return h}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=Gm.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||ty(Jv(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(Gm.now())}get time(){return this.isAccelerated()?xm(um(0,this.totalDuration,this.at(Gm.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}};function ty(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p=e=>{for(let t of n)if(t.name===e)return!0},m=(t,n)=>{let o={};for(let s of t===void 0?L_:a){let a=r.get(s),c=t===void 0?Zv(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},h=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&Iv(r,i)||(n+=Fv(r,i)+` `)}return(t?n.trim():n)||`none`},g=(e,t)=>h(m(e,t)),_=(e=m())=>{t.style.transform=h(e,!0)},v=(e=!0)=>{e&&_(),s.forEach(({animation:e})=>e.cancel()),s=[]},y=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),b=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=Gm.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(e.cancel(),s=s.filter(e=>e!==r)),A.schedule(!1)}),e.oncancel=()=>s.includes(r)&&A.demote(),s.push(r)},x=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},S=(e,t,n,r)=>{let i=Math.min(zv,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=qv(t,n,i).concat(r).sort(Kv),o=e=>vm(t,n,e),s,c;for(let n of e){let e=n.numberAt(t),r=a.map(t=>n.numberAt(t)-e),i=r[r.length-1],o=r.some(e=>Math.abs(e)*Bv>Math.abs(i))?0:i,l=r.map(e=>o?e/o:e);if(o&&!s)s=l,c=t=>(n.numberAt(t)-e)/o;else if(l.some((e,t)=>!Gv(e,o&&s[t])))return}if(!s||s.every((e,t)=>Gv(e,o(a[t]))))return`linear`;let l=[],u=(e,t=c(e))=>l.push(d_(t)+` `+d_(o(e)*100)+`%`);return s.forEach((e,t)=>{t&&Math.abs(e-s[t-1])>.2&&x(c,a[t-1],a[t]).forEach(e=>u(e)),u(a[t],e)}),`linear(`+l+`)`},C=(e,t,n,r)=>{let i=[t],a=(t,n)=>e.every(e=>!(Math.abs(e.numberAt((t+n)/2)-(e.numberAt(t)+e.numberAt(n))/2)>(e.name.startsWith(`scale`)?Hv:Vv))),o=(t,n,r)=>{if(n-t<1||a(t,n))i.push(n);else if(r<4)o(t,(t+n)/2,r+1),o((t+n)/2,n,r+1);else{for(let r of e)i.push(...x(e=>r.numberAt(e),t,n));i.push(n)}},s=qv(t,n,Math.ceil((n-t)/100));for(let e of r)s.push(e,Math.min(e+.01,n));let c=t;for(let e of s.sort(Kv))e>c&&o(c,e,0),c=e;return i.sort(Kv)},w=e=>{let t;for(let n of e){let e=n.tween();if(!e||t?.some((t,n)=>n<2?Math.abs(e[n]-t)>1:e[n]!==t))return;t=e}return t},T=(e,t,n,r,i={fill:`both`},a)=>{let o=e.flatMap(e=>e.boundaries(t,n)),s=r||S(e,t,n,o),c=s?[t,n]:C(e,t,n,o),l=c.map(e=>g(e,a)),u={transform:l};return s||(u.offset=c.map(e=>vm(t,n,e))),l.every(e=>e===l[0])&&(_(m(t,a)),u=null),y(u,{...i,duration:n-t,easing:s||`linear`})},E=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),a)e.sync();else{if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=L_.filter(t=>{if(r.has(t))return!0;let n=i[t]=Zv(e,t);return n!==void 0&&!Iv(t,n)}),v(!1);let m=!l&&w(d);try{if(m&&m[1]>t){let[e,n,r]=m;b(T(d,e,n,r),e-t,n-e)}else c>t&&(b(T(d,t,c),0,c-t),p.forEach(e=>e<c-1&&b(y(null,{duration:e-t}),0,e-t)));if(l){let e=u+Math.floor((c-u)/l)*l;b(T(f,e,e+l,void 0,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||v(),!0},D=e=>{let t,r=0;for(let i of n){let n=o.get(i);if(!n)return!1;let[a,s,c]=n,l=i.at(e),u=i.timing()[0]===1/0;if(c){if(u&&l===a)continue;return!1}let d=(l-a)/s,f=u?0:i.speed/s;if(t===void 0)t=d,r=f;else if(Math.abs(d-t)>1||f!==r)return!1}if(t===void 0)return!0;if(!s.length)return!1;for(let{offset:e,end:n,isDone:r}of s){let i=t-e;if(n<1/0&&(r?i<n-1:i<0||i>=n))return!1}for(let{animation:n,offset:i,isDone:a}of s){if(a)continue;let o=t-i;r&&n.updatePlaybackRate&&n.playState===`running`&&Math.abs(Number(n.currentTime)-o)<20?n.playbackRate!==r&&n.updatePlaybackRate(r):r?(n.playbackRate=r,n.startTime=e-o/r):(n.startTime=null,n.currentTime=o)}return!0},O=()=>!n.size&&(u=!0,Yv(t)===A&&Rv.delete(t),A.isJS||v(),!0),k=()=>{let t=Gm.now();if(A.isJS||(A.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=Zv(e,n.name),o.has(n)||(c=!0))}),A.isFinishing=!1),l=!1,u||(n.forEach(e=>Xv(e)&&n.delete(e)),O()))return;for(let e of n)if(!e.canAccelerate)return A.demote(!0);A.isJS&&(A.isJS=!1,c=!0,n.forEach(e=>e.js?.stop()));let r=c,a=d;if(c=d=!1,r||!D(t)){if(a){if(t-f<Uv)return A.demote();f=t}if(!E(t))return A.demote()}},A={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,Hm.isProcessing?ug.render(k,!1,!0):queueMicrotask(k)))},release(e){Xv(e)&&n.delete(e),O()||A.schedule(!0)},check(){if(!A.isJS){for(let t in i)if(Zv(e,t)!==i[t]&&!p(t))return A.schedule(!0,!0)}},demote(e){if(!(A.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),A.isJS=!0,o=new Map,v(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return Rv.set(t,A),A}var ny=class extends l_{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Gm.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||nv;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Gm.now();let u=Sv(e,i,a,o);u||((dm.instantAnimations||!s)&&l?.(t_(e,n,t)),e[0]=e[e.length-1],Cv(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Av(n),p=!f&&Qv(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=a_(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new yv(n)}catch{m=new f_(n)}}else m=p?new ey(n):new f_(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),ev()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}};function ry(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var iy=30,ay=e=>!isNaN(parseFloat(e)),oy={current:void 0},sy=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Gm.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Gm.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ay(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new ym)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new ym,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){ug.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){t&&(this.updatedAt=Gm.now(),this.stop()),this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){oy.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=Gm.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>iy)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,iy);return Sm(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function cy(e,t){return new sy(e,t)}function ly(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function uy(e,t){let n=e?.[t]??e?.default??e;return n===e?n:ly(n,e)}var dy={type:`spring`,stiffness:500,damping:25,restSpeed:10},fy=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),py={type:`keyframes`,duration:.8},my={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},hy=(e,{keyframes:t})=>t.length>2?py:R_.has(e)?e.startsWith(`scale`)?fy(t[1]):dy:my,gy=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function _y(e){for(let t in e)if(!gy.has(t))return!0;return!1}var vy=(e,t,n,r={},i,a)=>o=>{let s=uy(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=bm(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};_y(s)||Object.assign(u,hy(e,u)),u.duration&&=bm(u.duration),u.repeatDelay&&=bm(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Cv(u),u.delay===0&&(d=!0)),(dm.instantAnimations||dm.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Cv(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=t_(u.keyframes,s);if(e!==void 0){ug.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new f_(u):new ny(u)},yy=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function by(e){let t=yy.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function xy(e,t,n=1){let[r,i]=by(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return fm(e)?parseFloat(e):e}return Xm(i)?xy(i,t,n+1):i}function Sy(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Cy(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Sy(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function wy(e,t,n){return Cy(e.getProps(),t,n,e)}var Ty=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Ey=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...L_]),Dy=e=>Array.isArray(e);function Oy(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,cy(n))}function ky(e){return Dy(e)?e[e.length-1]||0:e}function Ay(e,t){let{transitionEnd:n={},transition:r={},...i}=wy(e,t)||{};i={...i,...n};for(let t in i)Oy(e,t,ky(i[t]))}var jy=e=>!!(e&&e.getVelocity);function My(e){return!!(jy(e)&&e.add)}function Ny(e,t){let n=e.getValue(`willChange`);if(My(n))return n.add(t);if(!n&&dm.WillChange){let n=new dm.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var Py=`data-framer-appear-id`;function Fy(e){return e.props[Py]}var Iy=typeof window<`u`;function Ly({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Ry(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?ly(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ly(f,t))continue;let o={delay:n,...uy(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ug.update(()=>r.set(i));continue}let p=!1;if(Iy&&window.MotionHandoffAnimation){let n=Fy(e);if(n){let e=window.MotionHandoffAnimation(n,t,ug);e!==null&&(o.startTime=e,p=!0)}}Ny(e,t);let m=l??e.shouldReduceMotion;r.start(vy(t,r,i,m&&Ey.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>ug.update(()=>{o&&Ay(e,o)});d.length?Promise.all(d).then(t):t()}return d}function zy(e,t,n={}){let r=wy(e,t,Ty(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Ry(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(zy(e,t,{...n,delay:r+(typeof o==`function`?0:o)+ry(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function By(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>zy(e,t,n))):typeof t==`string`?zy(e,t,n):Promise.all(Ry(e,wy(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Vy={test:e=>e===`auto`,parse:e=>e},Hy=e=>t=>t.test(e),Uy=[$m,$,hh,mh,_h,gh,Vy],Wy=e=>Uy.find(Hy(e));function Gy(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||mm(e)}var Ky=new Set([`auto`,`none`,`0`]);function qy(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Ky.has(t)&&jh(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=w_(n,i))}var Jy=class extends nv{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(Qm(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Xm(r))){let i=xy(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Ey.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=Wy(r),o=Wy(i);if(Qm(r)!==Qm(i)&&q_[n])this.needsMeasurement=!0;else if(a!==o){if(z_(a)&&z_(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else q_[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Gy(e[t]))&&n.push(t);n.length&&qy(e,n,t)}measure(){let{element:e,name:t}=this;return q_[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},Yy=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function Xy(e){return pm(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Zy(e){return pm(e)&&`ownerSVGElement`in e}var Qy={};function $y(e){return Qy.current?.add(e),e}var eb=e=>Qy.current?Qy.current.bind(e):e;function tb(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:Qy.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function nb(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function rb(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(R_.has(e))o=!0;else if(Jm(e))i[e]=n;else{let t=jv(n,b_[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Lv(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var ib={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ab={offset:`strokeDashoffset`,array:`strokeDasharray`};function ob(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ib:ab;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var sb=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function cb(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(rb(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of sb)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ob(d,i,a,o,!1)}function lb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ub({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function db(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function fb(e){return e===void 0||e===1}function pb({scale:e,scaleX:t,scaleY:n}){return!fb(e)||!fb(t)||!fb(n)}var mb=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function hb(e){return pb(e)||_b(e)||gb(e)}function gb(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function _b(e){return vb(e.x)||vb(e.y)}function vb(e){return e&&e!==`0%`}function yb(e,t,n){return n+t*(e-n)}function bb(e,t,n,r,i){return i!==void 0&&(e=yb(e,i,r)),yb(e,n,r)+t}function xb(e,t=0,n=1,r,i){e.min=bb(e.min,t,n,r,i),e.max=bb(e.max,t,n,r,i)}function Sb(e,{x:t,y:n}){xb(e.x,t.translate,t.scale,t.originPoint),xb(e.y,n.translate,n.scale,n.originPoint)}var Cb=.999999999999,wb=1.0000000000001;function Tb(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Eb(e.x,-a.scroll.offset.x),Eb(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Sb(e,o)),r&&(r.path?.[s]||r)!==a&&hb(a.latestValues)&&kb(e,a.latestValues,a.layout?.layoutBox));t.x<wb&&t.x>Cb&&(t.x=1),t.y<wb&&t.y>Cb&&(t.y=1)}function Eb(e,t){e.min+=t,e.max+=t}function Db(e,t,n,r,i=.5){xb(e,t,n,Uh(e.min,e.max,i),r)}function Ob(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function kb(e,t,n){let r=n??e;Db(e.x,Ob(t.x,r.x),t.scaleX,t.scale,t.originX),Db(e.y,Ob(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ab(e,t){return lb(db(e.getBoundingClientRect(),t))}function jb(e,t,n){let r=Ab(e,n),{scroll:i}=t;return i&&(Eb(r.x,i.offset.x),Eb(r.y,i.offset.y)),r}var Mb=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:Nb,cancel:Pb}=lg(queueMicrotask,!1);function Fb(e,t,n){let r=jy(e)?e:cy(e);return r.start(vy(``,r,t,n)),r.animation}var Ib={},Lb={value:null,addProjectionMetrics:null,countProjection:void 0};function Rb(e,t){let n=Gm.now();e=eb(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(dg(r),e(a-t))};return ug.setup(r,!0),$y(()=>dg(r))}function zb(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Bb(e){return Zy(e)&&e.tagName===`svg`}function Vb(e){return jy(e)?e.get():e}var Hb=e=>typeof e==`number`?e:parseFloat(e),Ub=Yy.length,Wb=e=>typeof e==`number`||$.test(e);function Gb(e,t,n,r,i,a){i?(e.opacity=Uh(0,n.opacity??1,qb(r)),e.opacityExit=Uh(t.opacity??1,0,Jb(r))):a&&(e.opacity=Uh(t.opacity??1,n.opacity??1,r));for(let i=0;i<Ub;i++){let a=Yy[i],o=Kb(t,a),s=Kb(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Wb(o)===Wb(s)?(e[a]=Math.max(Uh(Hb(o),Hb(s),r),0),(hh.test(s)||hh.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<mb.length;i++){let a=mb[i];(t[a]||n[a])&&(e[a]=Uh(t[a]||0,n[a]||0,r))}}function Kb(e,t){return e[t]===void 0?e.borderRadius:e[t]}var qb=Yb(0,.5,Mm),Jb=Yb(.5,.95,gm);function Yb(e,t,n){return r=>r<e?0:r>t?1:n(vm(e,t,r))}function Xb(e,t){e.min=t.min,e.max=t.max}function Zb(e,t){Xb(e.x,t.x),Xb(e.y,t.y)}function Qb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var $b=.9999,ex=1.0001,tx=-.01,nx=.01;function rx(e){return e.max-e.min}function ix(e,t,n){return Math.abs(e-t)<=n}function ax(e,t,n,r=.5){e.origin=r,e.originPoint=Uh(t.min,t.max,e.origin),e.scale=rx(n)/rx(t),e.translate=Uh(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$b&&e.scale<=ex||isNaN(e.scale))&&(e.scale=1),(e.translate>=tx&&e.translate<=nx||isNaN(e.translate))&&(e.translate=0)}function ox(e,t,n,r){ax(e.x,t.x,n.x,r?.originX),ax(e.y,t.y,n.y,r?.originY)}function sx(e,t,n,r=0){e.min=(r?Uh(n.min,n.max,r):n.min)+t.min,e.max=e.min+rx(t)}function cx(e,t,n,r){sx(e.x,t.x,n.x,r?.x),sx(e.y,t.y,n.y,r?.y)}function lx(e,t,n,r=0){let i=r?Uh(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+rx(t)}function ux(e,t,n,r){lx(e.x,t.x,n.x,r?.x),lx(e.y,t.y,n.y,r?.y)}function dx(e,t,n,r,i){return e-=t,e=yb(e,1/n,r),i!==void 0&&(e=yb(e,1/i,r)),e}function fx(e,t=0,n=1,r=.5,i,a=e,o=e){if(hh.test(t)&&(t=parseFloat(t),t=Uh(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Uh(a.min,a.max,r);e===a&&(s-=t),e.min=dx(e.min,t,n,s,i),e.max=dx(e.max,t,n,s,i)}function px(e,t,[n,r,i],a,o){fx(e,t[n],t[r],t[i],t.scale,a,o)}var mx=[`x`,`scaleX`,`originX`],hx=[`y`,`scaleY`,`originY`];function gx(e,t,n,r){px(e.x,t,mx,n?.x,r?.x),px(e.y,t,hx,n?.y,r?.y)}var _x=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),vx=_x(`applewebkit/`)&&!_x(`chrome/`)?Math.round:gm;function yx(e){e.min=vx(e.min),e.max=vx(e.max)}function bx(e){yx(e.x),yx(e.y)}var xx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sx=()=>({x:xx(),y:xx()}),Cx=()=>({min:0,max:0}),wx=()=>({x:Cx(),y:Cx()});function Tx(e){return e.translate===0&&e.scale===1}function Ex(e){return Tx(e.x)&&Tx(e.y)}function Dx(e,t){return e.min===t.min&&e.max===t.max}function Ox(e,t){return Dx(e.x,t.x)&&Dx(e.y,t.y)}function kx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ax(e,t){return kx(e.x,t.x)&&kx(e.y,t.y)}function jx(e){return rx(e.x)/rx(e.y)}function Mx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Nx=class{constructor(){this.members=[]}add(e){sm(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(cm(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(cm(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function Px(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Fx={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if($.test(e))e=parseFloat(e);else return e}return`${Px(e,t.target.x)}% ${Px(e,t.target.y)}%`}},Ix={borderRadius:Object.assign({},Fx,{applyTo:Yy.slice()}),borderTopLeftRadius:Fx,borderTopRightRadius:Fx,borderBottomLeftRadius:Fx,borderBottomRightRadius:Fx,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=zh.parse(e);if(i.length>5)return r;let a=zh.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Uh(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function Lx(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<mb.length;e++){let t=mb[e],i=n[t];i&&(r+=`${t}(${i}deg) `),!e&&n.pathRotation&&(r+=`rotate(${n.pathRotation}deg) `)}}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function Rx(e){return[e(`x`),e(`y`)]}var zx=(e,t)=>e.depth-t.depth,Bx=class{constructor(){this.children=[],this.isDirty=!1}add(e){sm(this.children,e),this.isDirty=!0}remove(e){cm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(zx),this.isDirty=!1,this.children.forEach(e)}},Vx={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Hx=[`z`,`skew`,`skewZ`],Ux=1e3,Wx=0;function Gx(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Kx=e=>e.instance&&Rv.get(e.instance)?.demote()&&e.resetSkewAndRotation();function qx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Fy(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ug,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&qx(r)}function Jx(e){if(e)return e.options.allowProjection===!1?Jx(e.parent):e.projection}function Yx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Ib,{...Ix,...Ib}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:Jx(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&zb(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=Wx++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Qx),this.nodes.forEach(lS),this.nodes.forEach(uS),this.nodes.forEach($x),Lb.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Bx)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ym),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Zy(t)&&!Bb(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ug.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=Rb(i,250),Vx.hasAnimatedSinceResize&&(Vx.hasAnimatedSinceResize=!1,this.nodes.forEach(cS)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||gS,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!Ax(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...uy(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||cS(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,dg(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(dS),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&qx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Kx(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Kx(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(nS),this.nodes.forEach(tS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(rS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(aS),this.nodes.forEach(oS),this.nodes.forEach(sS),this.nodes.forEach(Xx),this.nodes.forEach(Zx)):this.nodes.forEach(rS),this.clearAllSnapshots();let e=Gm.now();Hm.delta=um(0,1e3/60,e-Hm.timestamp),Hm.timestamp=e,Hm.isProcessing=!0,fg.update.process(Hm),fg.preRender.process(Hm),fg.render.process(Hm),Hm.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eS),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ug.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ug.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!rx(this.snapshot.measuredBox.x)&&!rx(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=wx(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Kx(this);let t=this.projectionDelta&&!Ex(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||hb(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),bx(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return wx();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(yS))){let{scroll:e}=this.root;e&&(Eb(t.x,e.offset.x),Eb(t.y,e.offset.y))}return t}removeElementScroll(e){let t=wx();if(Zb(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Zb(t,e),Eb(t.x,i.offset.x),Eb(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||wx();Zb(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Eb(a.x,-n.scroll.offset.x),Eb(a.y,-n.scroll.offset.y)),hb(n.latestValues)&&kb(a,n.latestValues,n.layout?.layoutBox)}return!r&&hb(this.latestValues)&&kb(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=wx();Zb(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!hb(n.latestValues))continue;let r;n.instance&&(pb(n.latestValues)&&n.updateSnapshot(),r=wx(),Zb(r,n.measurePageBox())),gx(t,n.latestValues,n.snapshot?.layoutBox,r)}return hb(this.latestValues)&&gx(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Hm.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Hm.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=wx(),this.targetWithTransforms=wx()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cx(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Zb(this.target,this.layout.layoutBox),Sb(this.target,this.targetDelta)):Zb(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Lb.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||pb(this.parent.latestValues)||_b(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wx(),this.relativeTargetOrigin=wx(),ux(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Zb(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Hm.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Zb(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Tb(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=wx());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Qb(this.prevProjectionDelta.x,this.projectionDelta.x),Qb(this.prevProjectionDelta.y,this.projectionDelta.y)),ox(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Mx(this.projectionDelta.x,this.prevProjectionDelta.x)&&Mx(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Lb.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sx(),this.projectionDelta=Sx(),this.projectionDeltaWithTransform=Sx()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Sx();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=wx(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(hS));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);fS(o.x,e.x,n),fS(o.y,e.y,n),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ux(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),mS(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Ox(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=wx(),Zb(f,this.relativeTarget)),c&&(this.animationValues=a,Gb(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(dg(this.pendingAnimation),void 0),this.pendingAnimation=ug.update(()=>{Vx.hasAnimatedSinceResize=!0,this.motionValue||=cy(0),this.motionValue.jump(0,!1),this.currentAnimation=Fb(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),c_(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(Ux),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&vS(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||wx(),_S(i.x,t.x,e.x),_S(i.y,t.y,e.y)}Zb(t,i),kb(t,r),ox(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Nx),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!gb(t))return;let n={};for(let t=0;t<Hx.length;t++)Gx(Hx[t],e,n,this.animationValues);for(let t=0;t<mb.length;t++)Gx(mb[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Vb(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Vb(t?.pointerEvents)||``),this.hasProjected&&!hb(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=Lx(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Ib){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Ib[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?Vb(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(tS),this.root.sharedNodes.clear()}}}function Xx(e){e.updateLayout(),iS(e)}function Zx(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)Rx(e=>{let t=rx(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Xb(r[e],a[e])}else vS(i,t.layoutBox,n)&&Rx(t=>{let n=rx(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=Sx();ox(c,n,t.layoutBox);let l=Sx();ox(l,a?e.applyTransform(r,!0):n,s);let u=!Ex(c),d=!1,f=e.getClosestProjectingParent();if((!e.resumeFrom||f?.options.layoutRoot&&e.resumeFrom.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=wx();ux(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=wx();ux(l,n,i.layoutBox,s),a&&o(c,l),Ax(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function Qx(e){Lb.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function $x(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eS(e){e.clearSnapshot()}function tS(e){e.clearMeasurements()}function nS(e){e.isLayoutDirty=!0,e.updateLayout()}function rS(e){e.isLayoutDirty=!1}function iS(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;Rx(e=>Eb(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function aS(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function oS(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function sS(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function cS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lS(e){e.resolveTargetDelta()}function uS(e){e.calcProjection()}function dS(e){e.resetSkewAndRotation()}function fS(e,t,n){e.translate=Uh(t.translate,0,n),e.scale=Uh(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function pS(e,t,n,r){e.min=Uh(t.min,n.min,r),e.max=Uh(t.max,n.max,r)}function mS(e,t,n,r){pS(e.x,t.x,n.x,r),pS(e.y,t.y,n.y,r)}function hS(e){return e.animationValues?.opacityExit!==void 0}var gS={duration:.45,ease:[.4,0,.1,1]};function _S(e,t,n){e.max=rx(n)+(e.min=t.min)}function vS(e,t,n){return e===`position`||e===`preserve-aspect`&&!ix(jx(t),jx(n),.2)}function yS(e){return e!==e.root&&e.scroll?.wasRoot}function bS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var xS=Yx({attachResizeListener:(e,t)=>bS(e,`resize`,t),measureScroll:Mb,checkIsScrollRoot:()=>!0}),SS={current:void 0},CS=Yx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!SS.current){let e=new xS({});e.mount(window),e.setOptions({layoutScroll:!0}),SS.current=e}return SS.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),wS=new WeakMap;function TS(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ES(e){return typeof e==`string`||Array.isArray(e)}var DS=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],OS=[`initial`].concat(DS);function kS(e){if(TS(e.animate))return!0;for(let t=0;t<OS.length;t++)if(ES(e[OS[t]]))return!0;return!1}function AS(e){return!!(kS(e)||e.variants)}function jS(e,t,n){for(let r in t){let i=t[r],a=n[r];if(jy(i))e.addValue(r,i);else if(jy(a))e.addValue(r,cy(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,cy(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var MS={current:null},NS={current:!1},PS=typeof window<`u`;function FS(){if(NS.current=!0,PS){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>MS.current=e.matches;e.addEventListener(`change`,t),t()}else MS.current=!1}}var IS=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],LS={};function RS(e){LS=e}function zS(){return LS}var BS=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=nv,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Gm.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ug.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=kS(t),this.isVariantNode=AS(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&jy(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,wS.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(NS.current||FS(),this.shouldReduceMotion=MS.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),dg(this.notifyUpdate),dg(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&wv.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new hv({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:bm(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=R_.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ug.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Rv.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in LS){let t=LS[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wx()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&Rv.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<IS.length;t++){let n=IS[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=jS(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=cy(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(fm(n)||mm(n))?n=parseFloat(n):typeof n!=`number`&&!zh.test(n)&&zh.test(t)&&(n=w_(e,t)),this.setBaseTarget(e,jy(n)?n.get():n)),jy(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new ym)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){Nb.render(this.render)}},VS=class extends BS{constructor(){super(...arguments),this.KeyframeResolver=Jy}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;jy(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function HS(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function US(e,{layout:t,layoutId:n}){return R_.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ib[e]||e===`opacity`)}function WS(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(jy(r[t])||i&&jy(i[t])||US(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function GS(e){return window.getComputedStyle(e)}var KS=class extends VS{constructor(){super(...arguments),this.type=`html`,this.renderInstance=HS}mount(e){super.mount(e)}readValueFromInstance(e,t){if(R_.has(t))return this.projection?.isProjecting?P_(t):I_(e,t);{let n=GS(e),r=(Jm(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ab(e,t)}build(e,t,n){rb(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return WS(e,t,n)}},qS=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function JS(e){return{point:{x:e.pageX,y:e.pageY}}}var YS=e=>t=>qS(t)&&e(t,JS(t));function XS(e,t,n,r){return bS(e,t,YS(n),r)}var ZS=new WeakMap,QS,$S=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Zy(r)&&`getBBox`in r?r.getBBox()[t]:r[n],eC=$S(`inline`,`width`,`offsetWidth`),tC=$S(`block`,`height`,`offsetHeight`);function nC({target:e,borderBoxSize:t}){ZS.get(e)?.forEach(n=>{n(e,{get width(){return eC(e,t)},get height(){return tC(e,t)}})})}function rC(e){e.forEach(nC)}function iC(){typeof ResizeObserver<`u`&&(QS=new ResizeObserver(rC))}function aC(e,t){QS||iC();let n=tb(e);return n.forEach(e=>{let n=ZS.get(e);n||(n=new Set,ZS.set(e,n)),n.add(t),QS?.observe(e)}),()=>{n.forEach(e=>{let n=ZS.get(e);n?.delete(t),n?.size||QS?.unobserve(e)})}}var oC=new Set,sC;function cC(){sC=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};oC.forEach(t=>t(e))},window.addEventListener(`resize`,sC)}function lC(e){return oC.add(e),sC||cC(),()=>{oC.delete(e),!oC.size&&typeof sC==`function`&&(window.removeEventListener(`resize`,sC),sC=void 0)}}function uC(e,t){return $y(typeof e==`function`?lC(e):aC(e,t))}var dC=(e,t)=>Math.abs(e-t);function fC(e,t){let n=dC(e.x,t.x),r=dC(e.y,t.y);return Math.sqrt(n**2+r**2)}var pC=new Set([`auto`,`scroll`]),mC=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=gC(this.lastRawMoveEventInfo,this.transformPagePoint));let e=vC(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=fC(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Gm.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=gC(t,this.transformPagePoint),this.hasPendingMove=!0,ug.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=vC(e.type===`pointercancel`?this.lastMoveEventInfo:gC(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!qS(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=gC(JS(e),this.transformPagePoint),{point:c}=s;this.history=[{...c,timestamp:Gm.now()}];let{onSessionStart:l}=t;l&&l(e,vC(s,this.history));let u={passive:!0,capture:!0};this.removeListeners=_m(XS(this.contextWindow,`pointermove`,this.handlePointerMove,u),XS(this.contextWindow,`pointerup`,this.handlePointerUp,u),XS(this.contextWindow,`pointercancel`,this.handlePointerUp,u)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(pC.has(e.overflowX)||pC.has(e.overflowY))&&this.scrollPositions.set(t,hC(t)),t=t.parentElement}this.scrollPositions.set(window,hC(window)),this.removeScrollListeners=_m(bS(window,`scroll`,this.onElementScroll,{capture:!0}),bS(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=hC(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),ug.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),dg(this.updatePoint)}},hC=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function gC(e,t){return t?{point:t(e.point)}:e}function _C(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vC({point:e},t){return{point:e,delta:_C(e,bC(t)),offset:_C(e,yC(t)),velocity:xC(t,.1)}}function yC(e){return e[0]}function bC(e){return e[e.length-1]}function xC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=bC(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>bm(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>bm(t)*2&&(r=e[1]);let a=xm(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var SC=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function CC(e){return SC.has(e.tagName)||e.isContentEditable===!0}var wC=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function TC(e){return wC.has(e.tagName)||e.isContentEditable===!0}var EC={x:!1,y:!1};function DC(){return EC.x||EC.y}function OC(e){return e===`x`||e===`y`?EC[e]?null:(EC[e]=!0,()=>{EC[e]=!1}):EC.x||EC.y?null:(EC.x=EC.y=!0,()=>{EC.x=EC.y=!1})}function kC(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Uh(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Uh(n,e,r.max):Math.min(e,n)),e}function AC(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function jC(e,{top:t,left:n,bottom:r,right:i}){return{x:AC(e.x,n,i),y:AC(e.y,t,r)}}function MC(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function NC(e,t){return{x:MC(e.x,t.x),y:MC(e.y,t.y)}}function PC(e,t){let n=.5,r=rx(e),i=rx(t);return i>r?n=vm(t.min,t.max-r,e.min):r>i&&(n=vm(e.min,e.max-i,t.min)),um(0,1,n)}function FC(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var IC=.35;function LC(e=IC){return e===!1?e=0:e===!0&&(e=IC),{x:RC(e,`left`,`right`),y:RC(e,`top`,`bottom`)}}function RC(e,t,n){return{min:zC(e,t),max:zC(e,n)}}function zC(e,t){return typeof e==`number`?e:e[t]||0}function BC(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var VC=new WeakMap,HC=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wx(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let r=e=>{t&&this.snapToCursor(e),this.stopAnimation()},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock?.(),this.openDragLock=OC(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:a}=this.visualElement;a&&(a.isAnimationBlocked=!0,a.target=void 0),Rx(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Xm(t)&&(t=xy(t,this.visualElement.current)||0),$.test(t))t=parseFloat(t);else if(hh.test(t)){let n=a?.layout?.layoutBox[e];n&&(t=rx(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),i&&ug.update(()=>i(e,t),!1,!0),Ny(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=JC(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.visualElement.render(),a&&ug.update(()=>a(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new mC(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&ug.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!qC(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=kC(i,a,this.elastic[e])),r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;UC(e)?this.constraints&&this.scroll===BC(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r?jC(r.layoutBox,e):!1,this.elastic=LC(t),i!==this.constraints&&!UC(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Rx(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=FC(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!UC(e))return!1;let n=WC(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=BC(r);let i=jb(n,r.root,this.visualElement.getTransformPagePoint()),a=NC(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(ub(a));this.hasMutatedConstraints=!!e,e&&(a=lb(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=Rx(s=>{if(!qC(s,t||n,this.currentDirection))return;let l=c[s]||{};(o===!0||o===s)&&(l={min:0,max:0});let u=i?200:1e6,d=i?40:1e7,f={type:`inertia`,velocity:r?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(s,f)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Ny(this.visualElement,e),n.start(vy(e,n,0,t,this.visualElement,!1))}stopAnimation(){Rx(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Rx(e=>{if(!qC(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Uh(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!UC(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Rx(e=>{let t=this.getAxisMotionValue(e).get();i[e]=PC({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Rx(t=>{let n=this.getAxisMotionValue(t);if(!qC(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Uh(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;VC.set(this.visualElement,this);let e=this.visualElement.current,t=XS(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&TC(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=UC(t)&&WC(t);r&&(this.constraints=this.resolveRefConstraints(),n||=KC(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),ug.read(r);let o=bS(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Rx(t=>{if(!qC(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=IC,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function UC(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var WC=e=>`current`in e?e.current:e;function GC(e){let t=!0;return()=>{t?t=!1:e()}}function KC(e,t,n){let r=uC(e,GC(n)),i=uC(t,GC(n));return()=>{r(),i()}}function qC(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function JC(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function YC(e,t){let n=tb(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},$y(()=>r.abort())]}function XC(e){return!(e.pointerType===`touch`||DC())}function ZC(e,t,n={}){t=eb(t);let[r,i,a]=YC(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!XC(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var QC=(e,t)=>t?e===t||QC(e,t.parentElement):!1,$C=new WeakSet;function ew(e){return t=>{t.key===`Enter`&&e(t)}}function tw(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var nw=(e,t)=>{let n=!1,r=ew(()=>{$C.has(e)||(n=!0,tw(e,`down`))}),i=ew(()=>{n&&(n=!1,tw(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&tw(e,`cancel`)},{...t,once:!0})};function rw(e){return qS(e)&&!DC()}var iw=new WeakSet;function aw(e,t,n={}){t=eb(t);let[r,i,a]=YC(e,n),o=e=>{let r=e.currentTarget;if(!rw(e)||iw.has(e))return;$C.add(r),n.stopPropagation&&iw.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),$C.has(r)&&$C.delete(r),rw(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||QC(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Xy(e)&&(e.addEventListener(`focus`,()=>nw(e,i),i),!CC(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function ow(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=Gg(i,a,o);return t?s(r):s}var sw=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},cw=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),lw=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function uw(e,t,n,r){HS(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(cw.has(n)?n:nb(n),t.attrs[n])}function dw(e,t,n){let r=WS(e,t,n);for(let n in e)if(n!==`children`&&(jy(e[n])||jy(t[n]))){let t=L_.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var fw=class extends VS{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=wx}getBaseTargetFromProps(e,t){return R_.has(t)?super.getBaseTargetFromProps(e,t)??P_(t):e[t]}getDefaultValue(e){return R_.has(e)?this.latestValues[e]??P_(e):void 0}readValueFromInstance(e,t){if(R_.has(t)){let e=S_(t);return e&&e.default||0}if(sb.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=cw.has(t)?t:nb(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return dw(e,t,n)}build(e,t,n){cb(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){uw(e,t,n,r)}mount(e){this.isSVGTag=lw(e.tagName),super.mount(e)}};function pw(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var mw=[...DS].reverse(),hw=e=>e?.out===!0?e:e?.out;function gw(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>By(e,t,n))),n=vw(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&wy(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&hw(f(l??(g&&g.props.initial))?.transition);if(mw.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?ES(f)||f===!1?f:void 0:l,y=ES(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||TS(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=_w(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=wy(e,n,Ty(e,t))||{};E={...E,...a,...i},D=hw(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!pw(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=wy(s,n)?.transition?.delayChildren;r.delay=ry(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!jy(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=vw(),i=!0}}}function _w(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!pw(t,e):!1}function vw(){let e={};for(let t of DS)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var yw=(0,U.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function bw(e=!0){let t=(0,U.useContext)(om);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,U.useId)();(0,U.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,U.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var xw=(0,U.createContext)({strict:!1}),Sw={animation:[`variants`,...DS],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Cw=!1;function ww(){if(Cw)return;let e={};for(let t in Sw)e[t]={isEnabled:e=>Sw[t].some(t=>!!e[t])};RS(e),Cw=!0}function Tw(){return ww(),zS()}function Ew(e){let t=Tw();for(let n in e)t[n]={...t[n],...e[n]};RS(t)}var Dw=(0,U.createContext)({});function Ow(e,t){if(kS(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ES(t)?t:void 0,animate:ES(n)?n:void 0}}return e.inherit===!1?{}:t}function kw(e){let{initial:t,animate:n}=Ow(e,(0,U.useContext)(Dw));return(0,U.useMemo)(()=>({initial:t,animate:n}),[Aw(t),Aw(n)])}function Aw(e){return Array.isArray(e)?e.join(` `):e}var jw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mw(e,t,n){for(let r in t)!jy(t[r])&&!US(r,n)&&(e[r]=t[r])}function Nw({transformTemplate:e},t){return(0,U.useMemo)(()=>{let n=jw();return rb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Pw(e,t){let n=e.style||{},r={};return Mw(r,n,e),Object.assign(r,Nw(e,t)),r}function Fw(e,t){let n={},r=Pw(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Iw=()=>({...jw(),attrs:{}});function Lw(e,t,n,r){let i=(0,U.useMemo)(()=>{let n=Iw();return cb(n,t,lw(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return Mw(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var Rw=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function zw(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Rw.has(e)}function Bw(e,t){return e.startsWith(`on`)?!zw(e):t?.(e)??!zw(e)}function Vw(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||jy(e[a])||(Bw(a,r)||n===!0&&zw(a)||!t&&!zw(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var Hw=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Uw(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Hw.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ww(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Uw(e)?Lw:Fw)(t,r,i,e),l=Vw(t,typeof e==`string`,a,s),u=e===U.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,U.useMemo)(()=>jy(d)?d.get():d,[d]);return(0,U.createElement)(e,{...u,children:f})}function Gw({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Kw(n,r,i,e),renderState:t()}}function Kw(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Vb(a[e]);let{initial:o,animate:s}=e,c=kS(e),l=AS(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!TS(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Cy(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var qw=e=>(t,n)=>{let r=(0,U.useContext)(Dw),i=(0,U.useContext)(om),a=()=>Gw(e,t,r,i);return n?a():im(a)},Jw=qw({scrapeMotionValuesFromProps:WS,createRenderState:jw}),Yw=qw({scrapeMotionValuesFromProps:dw,createRenderState:Iw}),Xw=Symbol.for(`motionComponentSymbol`);function Zw(e,t,n){let r=(0,U.useRef)(n);(0,U.useInsertionEffect)(()=>{r.current=n});let i=(0,U.useRef)(null);return(0,U.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Qw=(0,U.createContext)({});function $w(e,t,n,r,i,a){let{visualElement:o}=(0,U.useContext)(Dw),s=(0,U.useContext)(xw),c=(0,U.useContext)(om),l=(0,U.useContext)(yw),u=l.reducedMotion,d=l.skipAnimations,f=(0,U.useRef)(null),p=(0,U.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,U.useContext)(Qw);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&i.create(m,n,h),(0,U.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Py],_=(0,U.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return am(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),am(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,U.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function eT(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ew(r);let a=n?n===`svg`:Uw(e),o=a?Yw:Jw;function s(n,s){let c,l=tT(n);im(()=>!!SS.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,U.useContext)(yw),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=kw(n),m=o(n,d);if(!d&&typeof window<`u`){nT(u,r);let t=rT(u);p.visualElement=$w(e,m,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,W.jsxs)(Dw.Provider,{value:p,children:[c&&p.visualElement?(0,W.jsx)(c,{visualElement:p.visualElement,...u}):null,Ww(e,n,Zw(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,U.forwardRef)(s);return c[Xw]=e,c}function tT({layoutId:e}){let t=(0,U.useContext)(rm).id;return t&&e!==void 0?t+`-`+e:e}function nT(e,t){(0,U.useContext)(xw).strict}function rT(e){let{drag:t,layout:n}=Tw();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function iT(e,t){if(typeof Proxy>`u`)return eT;let n=new Map,r=(n,r)=>eT(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,eT(a,void 0,e,t)),n.get(a))})}var aT=(e,t)=>t.isSVG??Uw(e)?new fw(t):new KS(t,{allowProjection:e!==U.Fragment}),oT=class extends sw{constructor(e){super(e),e.animationState||=gw(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();TS(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},sT=0,cT={animation:{Feature:oT},exit:{Feature:class extends sw{constructor(){super(...arguments),this.id=sT++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=wy(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},lT=class extends sw{constructor(e){super(e),this.removeGroupControls=gm,this.removeListeners=gm,this.controls=new HC(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gm}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},uT=e=>(t,n)=>{e&&ug.update(()=>e(t,n),!1,!0)},dT=class extends sw{constructor(){super(...arguments),this.removePointerDownListener=gm}onPointerDown(e){this.session=new mC(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:uT(e),onStart:uT(t),onMove:uT(n),onEnd:(e,t)=>{delete this.session,r&&ug.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=XS(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},fT=!1,pT=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),mT=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},hT=class extends U.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),fT&&i.root.didUpdate(),i.options.layoutId!==r&&mT(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...pT(this.props),onExitComplete:()=>this.safeToRemove()})),Vx.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),mT(o,n)),o.setOptions({...o.options,...pT(this.props)}),fT=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||ug.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),Nb.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;fT=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function gT(e){let[t,n]=bw(),r=(0,U.useContext)(rm);return(0,W.jsx)(hT,{...e,layoutGroup:r,switchLayoutGroup:(0,U.useContext)(Qw),isPresent:t,safeToRemove:n})}var _T={pan:{Feature:dT},drag:{Feature:lT,ProjectionNode:CS,MeasureLayout:gT}};function vT(e,t,n,r){let{props:i}=e,a=`while`+n;e.animationState&&i[a]&&e.animationState.setActive(a,r===`Start`);let o=i[`on`+n+r];o&&ug.postRender(()=>o(t,JS(t)))}var yT=class extends sw{mount(){let{current:e}=this.node;e&&(this.unmount=ZC(e,(e,t)=>(vT(this.node,t,`Hover`,`Start`),e=>vT(this.node,e,`Hover`,`End`))))}unmount(){}},bT=class extends sw{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=_m(bS(this.node.current,`focus`,()=>this.onFocus()),bS(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function xT(e,t,n){e.current instanceof HTMLButtonElement&&e.current.disabled||vT(e,t,`Tap`,n)}var ST=class extends sw{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=aw(e,(e,t)=>(xT(this.node,t,`Start`),(e,{success:t})=>xT(this.node,e,t?``:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},CT=new WeakMap,wT=new WeakMap,TT=e=>{let t=CT.get(e.target);t&&t(e)},ET=e=>{e.forEach(TT)};function DT({root:e,...t}){let n=e||document;wT.has(n)||wT.set(n,{});let r=wT.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ET,{root:e,...t})),r[i]}function OT(e,t,n){let r=DT(t);return CT.set(e,n),r.observe(e),()=>{CT.delete(e),r.unobserve(e)}}var kT={some:0,all:1},AT=class extends sw{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:kT[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=OT(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(jT(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function jT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var MT=iT(Object.assign({},cT,{inView:{Feature:AT},tap:{Feature:ST},focus:{Feature:bT},hover:{Feature:yT}},_T,{layout:{ProjectionNode:CS,MeasureLayout:gT}}),aT);function NT(e){let t=im(()=>cy(e)),{isStatic:n}=(0,U.useContext)(yw);if(n){let[,n]=(0,U.useState)(e);(0,U.useEffect)(()=>t.on(`change`,n),[])}return t}function PT(e,t){let n=NT(t()),r=()=>n.set(t());return r(),am(()=>{let t=()=>ug.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),dg(r)}}),n}function FT(e){oy.current=[],e();let t=PT(oy.current,e);return oy.current=void 0,t}function IT(e,t,n,r){if(typeof e==`function`)return FT(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return RT(e,t,n,r);let i=typeof t==`function`?t:ow(t,n,r),a=Array.isArray(e)?LT(e,i):LT([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function LT(e,t){let n=im(()=>[]);return PT(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function RT(e,t,n,r){let i=im(()=>Object.keys(n)),a=im(()=>({}));for(let o of i)a[o]=IT(e,t,n[o],r);return a}var zT=class{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}},BT=()=>new zT;function VT(){return im(BT)}var HT=(0,U.createContext)(null);function UT(e,t,n,r,i,a=`ltr`){let o=e.findIndex(e=>e.value===t);if(o===-1)return e;if(i===`xy`){let{layout:t}=e[o],r={x:Uh(t.x.min,t.x.max,.5)+n.x,y:Uh(t.y.min,t.y.max,.5)+n.y},i=WT(e),s=i.find(t=>t.items.includes(e[o])),c=i.reduce((e,t)=>GT(r.y,t)<GT(r.y,e)?t:e);if(c!==s)return KT(e,o,r.x,c,a);let l=qT(r,t),u=-1,d=l;return e.forEach((e,t)=>{if(t===o)return;let n=qT(r,e.layout);n<d&&(u=t,d=n)}),u===-1?e:lm(e,o,o+Math.sign(u-o))}if(!r[i])return e;let s=r[i]>0?1:-1,c=e[o+s];if(!c)return e;let l=e[o].layout[i],u=c.layout[i],d=Uh(u.min,u.max,.5);return s===1&&l.max+n[i]>d||s===-1&&l.min+n[i]<d?lm(e,o,o+s):e}function WT(e){let t=[];return e.forEach(e=>{let{min:n,max:r}=e.layout.y,i=t[t.length-1];!i||n>=i.max||r<=i.min?t.push({items:[e],min:n,max:r}):(i.items.push(e),i.min=Math.min(i.min,n),i.max=Math.max(i.max,r))}),t}function GT(e,t){return e<t.min?t.min-e:e>t.max?e-t.max:0}function KT(e,t,n,r,i){let a=e.filter((e,n)=>n!==t),o=r.items.find(e=>{let t=Uh(e.layout.x.min,e.layout.x.max,.5);return i===`ltr`?n<t:n>t}),s=o?a.indexOf(o):a.indexOf(r.items[r.items.length-1])+1,c=[...a];return c.splice(s,0,e[t]),c.every((t,n)=>t===e[n])?e:c}function qT(e,t){let n=Math.max(t.x.min-e.x,0,e.x-t.x.max),r=Math.max(t.y.min-e.y,0,e.y-t.y.max);return n*n+r*r}var JT=(e,t)=>e.max<=t.min||t.max<=e.min;function YT(e){let t=!1,n=!1;for(let r=0;r<e.length;r++)for(let i=r+1;i<e.length;i++)if(t||=JT(e[r].x,e[i].x),n||=JT(e[r].y,e[i].y),t&&n)return`xy`;return t?`x`:`y`}function XT({children:e,as:t=`ul`,axis:n,onReorder:r,values:i,onPointerDownCapture:a,onClickCapture:o,...s},c,l){let u=im(()=>l[t]),d=(0,U.useRef)(new Map),[f,p]=(0,U.useState)(`y`),m=(0,U.useRef)(!1),h=(0,U.useRef)(!1),g=(0,U.useRef)(null),_=n||f,v=new Set(i);d.current.forEach((e,t)=>{v.has(t)||d.current.delete(t)});let y=()=>i.flatMap(e=>{let t=d.current.get(e);return t?[{value:e,layout:t}]:[]}),b=()=>g.current?.ownerDocument.defaultView?.getComputedStyle(g.current).direction===`rtl`,x=(e,t)=>{let n=0,a=i.map(t=>d.current.has(t)?e[n++].value:t);a.some((e,t)=>e!==i[t])&&r(a,t)},S={axis:_,proxy:l,groupRef:g,hasReordered:h,onKeyDown:(e,t,n,r)=>{let{key:a,currentTarget:o}=e;if(e.defaultPrevented||e.target!==o||e.altKey||e.ctrlKey||e.metaKey)return;let s=y(),c=[`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`].indexOf(a),l=c%2;if(a===` `)e.repeat||r(o,n?void 0:i);else if(!n)return;else if(a===`Escape`){let e=n.flatMap(e=>s.filter(t=>t.value===e));x(s.map(t=>n.includes(t.value)?e.shift():t),t),r(o)}else if(c<0||_!==`xy`&&_!==(l?`x`:`y`))return;else{let e=s.findIndex(({value:e})=>e===t),n=e+(c>1==!!(l&&b())?-1:1);e>-1&&s[n]&&x(lm(s,e,n),t)}e.preventDefault()},registerItem:(e,t)=>{if(d.current.set(e,t),!n){let e=YT(i.flatMap(e=>{let t=d.current.get(e);return t?[t]:[]}));e!==f&&p(e)}},updateOrder:(e,t,n)=>{if(m.current)return;let r=y(),i=UT(r,e,t,n,_,b()?`rtl`:`ltr`);r!==i&&(m.current=!0,h.current=!0,x(i,e))}};(0,U.useEffect)(()=>{m.current=!1},[i]);let C=e=>{g.current=e,typeof c==`function`?c(e):c&&(c.current=e)},w={overflowAnchor:`none`,...s.style};return(0,W.jsx)(u,{...s,style:w,ref:C,onPointerDownCapture:e=>{h.current=!1,a?.(e)},onClickCapture:e=>{h.current&&e.detail&&(h.current=!1,e.stopPropagation(),e.preventDefault()),o?.(e)},ignoreStrict:!0,children:(0,W.jsx)(HT.Provider,{value:S,children:e})})}var ZT=e=>(0,U.forwardRef)((t,n)=>XT(t,n,e)),QT=50,$T=1.5,eE=new Set([`auto`,`scroll`]),tE=new WeakMap,nE=new WeakMap,rE=null;function iE(){if(rE){let e=oE(rE,`y`);e&&(nE.delete(e),tE.delete(e));let t=oE(rE,`x`);t&&t!==e&&(nE.delete(t),tE.delete(t)),rE=null}}function aE(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY,i=e===document.body||e===document.documentElement;return eE.has(r)||i}function oE(e,t){let n=e?.parentElement;for(;n;){if(aE(n,t))return n;n=n.parentElement}return null}function sE(e){let t=Math.min(1,1-e/QT);return $T*t*t*Hm.delta}function cE(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?Math.max(0,r.left):Math.max(0,r.top),a=n===`x`?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),o=e-i,s=a-e;return o<QT?{amount:-sE(o),edge:`start`}:s<QT?{amount:sE(s),edge:`end`}:{amount:0,edge:null}}function lE(e,t,n,r){if(!e)return;rE=e;let i=oE(e,n);if(!i)return;let{amount:a,edge:o}=cE(t-(n===`x`?window.scrollX:window.scrollY),i,n);if(o===null){nE.delete(i),tE.delete(i);return}let s=nE.get(i),c=i===document.body||i===document.documentElement;if(s!==o){if(!(o===`start`&&r<0||o===`end`&&r>0))return;nE.set(i,o);let e=n===`x`?i.scrollWidth-(c?window.innerWidth:i.clientWidth):i.scrollHeight-(c?window.innerHeight:i.clientHeight);tE.set(i,e)}if(a>0){let e=tE.get(i);if((n===`x`?c?window.scrollX:i.scrollLeft:c?window.scrollY:i.scrollTop)>=e)return}n===`x`?c?window.scrollBy({left:a}):i.scrollLeft+=a:c?window.scrollBy({top:a}):i.scrollTop+=a}function uE(e,t=0){return jy(e)?e:NT(t)}function dE({children:e,style:t={},value:n,as:r=`li`,onDrag:i,onDragEnd:a,onKeyDown:o,onBlur:s,layout:c=!0,...l},u){let d=(0,U.useContext)(HT),f=im(()=>d.proxy[r]),[p,m]=(0,U.useState)(),h={x:uE(t.x),y:uE(t.y)},g=IT([h.x,h.y],([e,t])=>e||t?1:`unset`),{axis:_,registerItem:v,updateOrder:y,groupRef:b,hasReordered:x,onKeyDown:S}=d,C=_===`xy`||_,w=(e,t)=>{m(t),wS.get(e)?.animationState?.setActive(`whileDrag`,!!t)};return(0,W.jsx)(f,{drag:C,tabIndex:0,...l,dragSnapToOrigin:!0,style:{...t,x:h.x,y:h.y,zIndex:g},layout:c,onDrag:(e,t)=>{let{velocity:r,point:a}=t,o={x:h.x.get(),y:h.y.get()};y(n,o,r);let s=_===`xy`?Math.abs(r.x)>Math.abs(r.y)?`x`:`y`:_;lE(b.current,a[s],s,r[s]),i&&i(e,t)},onDragEnd:(e,t)=>{x.current=!1,iE(),a&&a(e,t)},onKeyDown:e=>{o?.(e),S(e,n,p,w)},onBlur:e=>{s?.(e),p&&w(e.currentTarget)},onLayoutMeasure:e=>{v(n,e)},ref:u,ignoreStrict:!0,children:e})}var fE=(0,U.forwardRef)(dE),pE=ZT(MT);function mE(e){let[t,n]=(0,U.useState)(!1),[r,i]=(0,U.useState)(``),[o,s]=(0,U.useState)(``),[c,l]=(0,U.useState)(``),[u,d]=(0,U.useState)(null);return(0,W.jsxs)(`form`,{className:`grid`,onSubmit:async n=>{n.preventDefault(),d(null);try{if(t)await a([b(o).address],c.trim()===``?null:c.trim());else{let e=b(r);await a([e.address],e.code)}e.onAdded?.()}catch(e){d(It(e))}},children:[(0,W.jsxs)(`div`,{className:B(`grid gap-2`,e.fieldsClassName),children:[t?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{"aria-label":`Server URL`,placeholder:`Server URL, e.g. http://127.0.0.1:47841`,spellCheck:!1,autoComplete:`off`,value:o,onChange:e=>s(e.target.value)}),(0,W.jsx)(X,{"aria-label":`Pairing code`,placeholder:`Pairing code, empty if auth is off`,spellCheck:!1,autoComplete:`off`,value:c,onChange:e=>l(e.target.value)})]}):(0,W.jsx)(X,{"aria-label":`Pairing link`,placeholder:`Pairing link`,spellCheck:!1,autoComplete:`off`,value:r,onChange:e=>i(e.target.value)}),u!==null&&(0,W.jsx)(`p`,{className:`text-destructive text-sm break-all`,children:u}),(0,W.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground w-fit cursor-pointer text-xs`,onClick:()=>{n(!t),d(null)},children:t?`Paste a pairing link instead`:`Enter the server URL and code separately`})]}),e.actions(t?o.trim()!==``:r.trim()!==``)]})}function hE(e){return(0,W.jsx)(Ur,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Ir,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,children:[(0,W.jsxs)(Lr,{className:`gap-1 px-6 pt-4 pr-12`,children:[(0,W.jsx)(Br,{className:`text-base`,children:`Add machine`}),(0,W.jsx)(Vr,{children:`Paste the pairing link that OffSite printed when it started.`})]}),(0,W.jsx)(mE,{fieldsClassName:`p-6`,onAdded:e.onClose,actions:t=>(0,W.jsxs)(Wr,{className:`bg-muted/40 border-t px-6 py-4`,children:[(0,W.jsx)(H,{type:`button`,variant:`outline`,onClick:e.onClose,children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,disabled:!t,children:`Add machine`})]})})]})})}function gE(e){let t=e.machine,n=t.icon??`computer`,[r,i]=(0,U.useState)(!1);return(0,W.jsxs)(`div`,{className:`flex min-h-13 items-center justify-between gap-4 px-4 py-2.5`,children:[(0,W.jsx)(`span`,{className:`text-sm font-medium`,children:`Icon`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(Jd.includes(n)?Jd:[n,...Jd]).map(e=>(0,W.jsx)(H,{title:e,size:`icon-sm`,"aria-pressed":e===n,variant:e===n?`default`:`ghost`,onClick:()=>_(t.id,{icon:e}),children:(0,W.jsx)(Yd,{icon:e})},e)),(0,W.jsxs)(vn,{open:r,onOpenChange:i,modal:!0,children:[(0,W.jsx)($t,{asChild:!0,children:(0,W.jsx)(H,{title:`More icons`,size:`icon-sm`,variant:`ghost`,children:(0,W.jsx)(V,{icon:On})})}),(0,W.jsx)(en,{align:`end`,collisionPadding:12,className:`flex max-h-96 w-80 flex-col gap-3 overflow-y-auto p-3`,children:[...new Set(Object.values(qd).map(e=>e.group))].map(e=>(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e}),(0,W.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(2rem,1fr))] gap-1`,children:Object.keys(qd).filter(t=>qd[t].group===e&&!Jd.includes(t)).map(e=>(0,W.jsx)(H,{title:e,size:`icon-sm`,className:`aspect-square h-auto! w-full!`,"aria-pressed":e===n,variant:e===n?`default`:`ghost`,onClick:()=>{_(t.id,{icon:e}),i(!1)},children:(0,W.jsx)(Yd,{icon:e,className:`block aspect-square! h-auto! w-[66%]! min-w-0! shrink-0!`})},e))})]},e))})]})]})]})}var _E={connecting:`Connecting…`,online:`Online`,offline:`Offline`,unpaired:`Needs pairing`};function vE(){let e=O(e=>e.machines),t=O(e=>e.machines.find(t=>t.id===e.settingsEditedMachine)),[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(null),o=i===null?e:[...e].sort((e,t)=>i.indexOf(e.id)-i.indexOf(t.id));return t===void 0?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(jp,{title:`Machines`,note:`This browser connects to each one directly. The list stays in this browser`,children:(0,W.jsx)(pE,{as:`div`,axis:`y`,className:`divide-y`,values:o.map(e=>e.id),onReorder:a,children:o.map(e=>(0,W.jsxs)(bE,{value:e.id,disabled:!1,className:`min-h-13 gap-4`,onDragEnd:()=>{i!==null&&ee(i),a(null)},children:[(0,W.jsx)(Yd,{icon:e.icon,className:`text-muted-foreground size-5 shrink-0`}),(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`p`,{className:`truncate text-sm font-medium`,children:e.name}),e.addresses.map(e=>(0,W.jsx)(`p`,{className:`text-muted-foreground truncate font-mono text-xs`,children:e},e)),e.providers.filter(e=>e.state===`error`).map(e=>(0,W.jsxs)(`p`,{className:`text-destructive truncate text-xs`,title:e.error??void 0,children:[yn[e.provider],` threads: `,e.error]},e.provider))]}),(0,W.jsxs)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:[_E[e.status],e.status===`online`&&e.via!==null&&e.via!==e.addresses[0]&&` · via ${new URL(e.via).host}`]}),(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Reconnect, trying the first address first`,onClick:()=>I(e.id),children:(0,W.jsx)(V,{icon:es})}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost-muted`,title:`Open machine`,onClick:()=>Ve({settingsEditedMachine:e.id}),children:(0,W.jsx)(V,{icon:Rn})})]})]},e.id))})}),(0,W.jsx)(`div`,{className:`flex gap-2`,children:(0,W.jsx)(H,{variant:`outline`,size:`sm`,onClick:()=>r(!0),children:`Add machine…`})}),n&&(0,W.jsx)(hE,{onClose:()=>r(!1)})]}):(0,W.jsx)(yE,{machine:t})}function yE(e){let t=e.machine,[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(null),u=c??t.addresses,d=t.addresses.some(e=>le!==null&&le.includes(e)),f=(0,U.useRef)(null);(0,U.useEffect)(()=>{n&&f.current?.focus()},[n]);function p(e){s(null);try{return _(t.id,{addresses:[...new Set(e.map(e=>b(e).address))]}),!0}catch(e){return s(It(e)),!1}}async function m(e){s(null);let n=e.trim();if(n===``)return!0;try{let e=n.includes(`#`)?b(n).code:n;if(e===null)throw Error(`That link has no pairing code`);return await h(t.id,e),!0}catch(e){return s(It(e)),!1}}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jp,{title:`Machine`,children:[(0,W.jsx)(Q,{label:`Name`,children:(0,W.jsx)(Mp,{value:t.label??``,placeholder:t.hostname,onCommit:e=>_(t.id,{label:e.trim()===``?null:e.trim()})},t.label)}),(0,W.jsx)(gE,{machine:t})]}),!d&&(0,W.jsx)(jp,{title:`Pairing`,children:(0,W.jsxs)(`div`,{className:`flex min-h-13 items-center justify-between gap-4 px-4 py-2.5`,children:[t.pairedAt!==null&&t.status!==`unpaired`&&(0,W.jsx)(`span`,{className:`text-sm`,children:t.pairedAt===null?`Paired`:`Paired ${Qt(t.pairedAt)}`}),(t.pairedAt===null||t.status===`unpaired`)&&(0,W.jsxs)(`form`,{className:`flex flex-1 items-center gap-3`,onSubmit:async e=>{e.preventDefault(),await m(i)&&a(``)},children:[(0,W.jsx)(X,{className:`flex-1 font-mono`,placeholder:`Pairing link or code`,spellCheck:!1,autoComplete:`off`,value:i,onChange:e=>a(e.target.value)}),(0,W.jsxs)(H,{type:`submit`,variant:`outline`,className:`px-4`,disabled:i.trim()===``,children:[(0,W.jsx)(V,{icon:Lo}),`Pair`]})]})]})}),(0,W.jsxs)(jp,{title:`Addresses`,note:`OffSite tries them in order whenever it reconnects`,children:[(0,W.jsx)(pE,{as:`div`,axis:`y`,className:`divide-y`,values:u,onReorder:l,children:u.map((e,t)=>(0,W.jsxs)(bE,{value:e,disabled:d,onDragEnd:()=>{c!==null&&p(c),l(null)},children:[(0,W.jsx)(Mp,{className:`flex-1 font-mono`,value:e,disabled:d,onCommit:e=>p(u.map((n,r)=>r===t?e:n))}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Remove address`,disabled:d||u.length===1,onClick:()=>p(u.filter((e,n)=>n!==t)),children:(0,W.jsx)(V,{icon:So})})]},e))}),n&&(0,W.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,W.jsx)(X,{ref:f,className:`font-mono`,placeholder:`http://192.168.1.10:47841`,spellCheck:!1,autoComplete:`off`,onBlur:e=>{let n=e.target.value.trim();(n===``||p([...t.addresses,n]))&&r(!1)},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}})}),!n&&!d&&(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:bg-muted/50 hover:text-foreground flex w-full items-center gap-2 px-4 py-3 text-sm transition-colors`,onClick:()=>r(!0),children:[(0,W.jsx)(V,{icon:Ga,className:`size-4`}),`Add address`]})]}),o!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-1 text-xs break-all`,children:o}),!d&&(0,W.jsxs)(In,{children:[(0,W.jsx)(kn,{asChild:!0,children:(0,W.jsx)(H,{variant:`outline`,className:`text-destructive`,children:`Remove machine`})}),(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsxs)(hr,{children:[`Remove `,t.name,`?`]}),(0,W.jsx)(Ln,{children:`This browser forgets the machine. The machine and its threads stay untouched.`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:()=>{Ve({settingsEditedMachine:null}),me(t.id)},children:`Remove machine`})]})]})]})]})}function bE(e){let t=VT();return(0,W.jsxs)(fE,{as:`div`,value:e.value,dragListener:!1,dragControls:t,onDragEnd:e.onDragEnd,className:B(`bg-background relative flex items-center gap-3 px-4 py-2.5`,e.className),children:[(0,W.jsx)(`span`,{className:B(`text-muted-foreground hover:text-foreground cursor-grab touch-none active:cursor-grabbing`,e.disabled&&`pointer-events-none opacity-50`),title:`Drag to reorder`,onPointerDown:e=>t.start(e),children:(0,W.jsx)(V,{icon:Co,className:`size-4`})}),e.children]})}var xE=new Map([[`denied`,`Blocked in the browser's site settings`],[`insecure`,`Needs https or localhost`],[`install`,`Add OffSite to the Home Screen first`],[`unsupported`,`Not supported in this browser`]]);function SE(e){let t=e.prefs.terminal,n=t.behavior;function r(r){E({...e.prefs,terminal:{...t,behavior:{...n,...r}}})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jp,{title:`Notifications`,children:[(0,W.jsx)(Q,{label:`Desktop notifications on this device`,children:(0,W.jsx)(CE,{})}),(0,W.jsx)(Q,{label:`Push terminal alerts when no OffSite page is open`,children:(0,W.jsx)(wE,{})})]}),(0,W.jsxs)(jp,{title:`Terminal bell`,children:[(0,W.jsx)(Q,{label:`Flash the screen on bell`,children:(0,W.jsx)(Cp,{checked:n.bellFlash,onCheckedChange:e=>r({bellFlash:e})})}),(0,W.jsx)(Q,{label:`Play a sound on bell`,children:(0,W.jsx)(Cp,{checked:n.bellSound,onCheckedChange:e=>r({bellSound:e})})})]})]})}function CE(){let[e,t]=(0,U.useState)(la),[n,r]=(0,U.useState)(ua);(0,U.useEffect)(()=>{let e=la();if(e===`insecure`||e===`unsupported`)return;let n=new AbortController;return fa(n.signal,()=>t(la())).catch(e=>console.error(`could not watch the notification permission`,e)),()=>n.abort()},[]);async function i(e){await da(e),r(e),t(la())}return(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[xE.has(e)&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:xE.get(e)}),(0,W.jsx)(Cp,{checked:e===`granted`&&n,disabled:e!==`granted`&&e!=="default",onCheckedChange:e=>void i(e)})]})}function wE(){let[e,t]=(0,U.useState)(ba),[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(()=>ba()===`supported`),[o,s]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(ba()!==`supported`)return;let e=!0;async function t(){try{let t=await Sa();e&&r(t)}catch(e){console.error(`could not read the push subscription`,e)}e&&a(!1)}return t(),()=>{e=!1}},[]);async function c(e){a(!0),s(null);try{e?r(await Ca()):(await wa(),r(!1))}catch(e){console.error(`could not change push notifications`,e),s(It(e))}t(ba()),a(!1)}return(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[o!==null&&(0,W.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Could not update: `,o]}),xE.has(e)&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:xE.get(e)}),(0,W.jsx)(Cp,{checked:e===`supported`&&n,disabled:e!==`supported`||i,onCheckedChange:e=>void c(e)})]})}function TE({className:e,...t}){return(0,W.jsx)(cc,{"data-slot":`label`,className:B(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var EE={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t`,383:`s`,384:`b`,385:`B`,387:`b`,390:`O`,392:`c`,393:`D`,394:`D`,396:`d`,398:`E`,400:`E`,402:`f`,403:`G`,407:`I`,409:`k`,410:`l`,412:`M`,413:`N`,414:`n`,415:`O`,421:`p`,427:`t`,429:`t`,430:`T`,434:`V`,436:`y`,438:`z`,477:`e`,485:`g`,544:`N`,545:`d`,549:`z`,564:`l`,565:`n`,566:`t`,567:`j`,570:`A`,571:`C`,572:`c`,573:`L`,574:`T`,575:`s`,576:`z`,579:`B`,580:`U`,581:`V`,582:`E`,583:`e`,584:`J`,585:`j`,586:`Q`,587:`q`,588:`R`,589:`r`,590:`Y`,591:`y`,592:`a`,593:`a`,595:`b`,596:`o`,597:`c`,598:`d`,599:`d`,600:`e`,603:`e`,604:`e`,605:`e`,606:`e`,607:`j`,608:`g`,609:`g`,610:`G`,613:`h`,614:`h`,616:`i`,618:`I`,619:`l`,620:`l`,621:`l`,623:`m`,624:`m`,625:`m`,626:`n`,627:`n`,628:`N`,629:`o`,633:`r`,634:`r`,635:`r`,636:`r`,637:`r`,638:`r`,639:`r`,640:`R`,641:`R`,642:`s`,647:`t`,648:`t`,649:`u`,651:`v`,652:`v`,653:`w`,654:`y`,655:`Y`,656:`z`,657:`z`,663:`c`,665:`B`,666:`e`,667:`G`,668:`H`,669:`j`,670:`k`,671:`L`,672:`q`,686:`h`,867:`a`,868:`e`,869:`i`,870:`o`,871:`u`,872:`c`,873:`d`,874:`h`,875:`m`,876:`r`,877:`t`,878:`v`,879:`x`,7424:`A`,7427:`B`,7428:`C`,7429:`D`,7431:`E`,7432:`e`,7433:`i`,7434:`J`,7435:`K`,7436:`L`,7437:`M`,7438:`N`,7439:`O`,7440:`O`,7441:`o`,7442:`o`,7443:`o`,7446:`o`,7447:`o`,7448:`P`,7449:`R`,7450:`R`,7451:`T`,7452:`U`,7453:`u`,7454:`u`,7455:`m`,7456:`V`,7457:`W`,7458:`Z`,7522:`i`,7523:`r`,7524:`u`,7525:`v`,7834:`a`,7835:`s`,8305:`i`,8341:`h`,8342:`k`,8343:`l`,8344:`m`,8345:`n`,8346:`p`,8347:`s`,8348:`t`,8580:`c`};for(let e=`̀`.codePointAt(0);e<=`ͯ`.codePointAt(0);++e){let t=String.fromCodePoint(e);for(let e of`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`){let n=(e+t).normalize().codePointAt(0);n>126&&(EE[n]=e)}}var DE={a:[7844,7863],e:[7870,7879],o:[7888,7907],u:[7912,7921]};for(let e of Object.keys(DE)){let t=e.toUpperCase();for(let n=DE[e][0];n<=DE[e][1];++n)EE[n]=n%2==0?t:e}function OE(e){if(e<192||e>8580)return e;let t=EE[e];return t===void 0?e:t.codePointAt(0)}function kE(e){return e}function AE(e){return e}function jE(e,t){return e>t?e:t}var ME=e=>e.split(``).map(e=>e.codePointAt(0)),NE=new Set(` \f
|
|
14
|
+
\r \v\xA0 \u2028\u2029 `.split(``).map(e=>e.codePointAt(0)));for(let e=` `.codePointAt(0);e<=` `.codePointAt(0);e++)NE.add(e);var PE=``.codePointAt(0),FE=`A`.codePointAt(0),IE=`Z`.codePointAt(0),LE=`a`.codePointAt(0),RE=`z`.codePointAt(0),zE=`0`.codePointAt(0),BE=`9`.codePointAt(0);function VE(e,t,n){return n?e:t-e-1}var HE=16,UE=-3,WE=-1,GE=HE/2,KE=HE/2,qE=7,JE=4,YE=2;function XE(e){return e?new Set:null}function ZE(e,t,n){if(t!==null&&t.i16.length>e+n){let r=t.i16.subarray(e,e+n);return[e+n,r]}return[e,new Int16Array(n)]}function QE(e,t,n){if(t!==null&&t.i32.length>e+n){let r=t.i32.subarray(e,e+n);return[e+n,r]}return[e,new Int32Array(n)]}function $E(e){return e>=LE&&e<=RE?1:e>=FE&&e<=IE?2:e>=zE&&e<=BE?4:0}function eD(e){let t=String.fromCodePoint(e);return t===t.toUpperCase()?t===t.toLowerCase()?t.match(/\p{Number}/gu)===null?t.match(/\p{Letter}/gu)===null?0:3:4:2:1}function tD(e){return e<=PE?$E(e):eD(e)}function nD(e,t){return e===0&&t!==0?GE:e===1&&t===2||e!==4&&t===4?qE:t===0?KE:0}function rD(e,t){return t===0?GE:nD(tD(e[t-1]),tD(e[t]))}function iD(e,t,n,r){let i=e.slice(r),a=i.indexOf(n);if(a===0)return r;if(!t&&n>=LE&&n<=RE){a>0&&(i=i.slice(0,a));let e=i.indexOf(n-32);e>=0&&(a=e)}return a<0?-1:r+a}function aD(e){for(let t of e)if(t>=128)return!1;return!0}function oD(e,t,n){if(!aD(e))return 0;if(!aD(t))return-1;let r=0,i=0;for(let a=0;a<t.length;a++){if(i=iD(e,n,t[a],i),i<0)return-1;a===0&&i>0&&(r=i-1),i++}return r}var sD=(e,t,n,r,i,a,o)=>{let s=i.length;if(s===0)return[{start:0,end:0,score:0},XE(a)];let c=r.length;if(o!==null&&c*s>o.i16.length)return lD(e,t,n,r,i,a);let l=oD(r,i,e);if(l<0)return[{start:-1,end:-1,score:0},null];let u=0,d=0,f=null,p=null,m=null,h=null;[u,f]=ZE(u,o,c),[u,p]=ZE(u,o,c),[u,m]=ZE(u,o,c),[d,h]=QE(d,o,s);let[,g]=QE(d,o,c);for(let e=0;e<g.length;e++)g[e]=r[e];let _=kE(0),v=0,y=0,b=0,x=i[0],S=i[0],C=kE(0),w=0,T=!1,E=g.subarray(l),D=f.subarray(l).subarray(0,E.length),O=p.subarray(l).subarray(0,E.length),k=m.subarray(l).subarray(0,E.length);for(let[r,a]of E.entries()){let o=null;a<=PE?(o=$E(a),!e&&o===2&&(a+=32)):(o=eD(a),!e&&o===2&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)),t&&(a=OE(a))),E[r]=a;let c=nD(w,o);if(k[r]=c,w=o,a===S&&(y<s&&(h[y]=AE(l+r),y++,S=i[Math.min(y,s-1)]),b=l+r),a===x){let e=HE+c*YE;if(D[r]=e,O[r]=1,s===1&&(n&&e>_||!n&&e>=_)&&(_=e,v=l+r,n&&c===GE))break;T=!1}else D[r]=jE(T?C+WE:C+UE,0),O[r]=0,T=!0;C=D[r]}if(y!==s)return[{start:-1,end:-1,score:0},null];if(s===1){let e={start:v,end:v+1,score:_};if(!a)return[e,null];let t=new Set;return t.add(v),[e,t]}let A=h[0],j=b-A+1,M=null;[u,M]=ZE(u,o,j*s);{let e=f.subarray(A,b+1);for(let[t,n]of e.entries())M[t]=n}let[,N]=ZE(u,o,j*s);{let e=p.subarray(A,b+1);for(let[t,n]of e.entries())N[t]=n}let ee=h.subarray(1),te=i.slice(1).slice(0,ee.length);for(let[e,t]of ee.entries()){let r=!1,i=te[e],a=e+1,o=a*j,c=g.subarray(t,b+1),l=m.subarray(t).subarray(0,c.length),u=N.subarray(o+t-A).subarray(0,c.length),d=N.subarray(o+t-A-1-j).subarray(0,c.length),f=M.subarray(o+t-A).subarray(0,c.length),p=M.subarray(o+t-A-1-j).subarray(0,c.length),h=M.subarray(o+t-A-1).subarray(0,c.length);h[0]=0;for(let[e,o]of c.entries()){let c=e+t,g=0,y=0,b=0;if(y=r?h[e]+WE:h[e]+UE,i===o){g=p[e]+HE;let t=l[e];b=d[e]+1,t===GE?b=1:b>1&&(t=jE(t,jE(JE,m[c-b+1]))),g+t<y?(g+=l[e],b=0):g+=t}u[e]=b,r=g<y;let x=jE(jE(g,y),0);a===s-1&&(n&&x>_||!n&&x>=_)&&(_=x,v=c),f[e]=x}}let ne=XE(a),P=A;if(a&&ne!==null){let e=s-1;P=v;let t=!0;for(;;){let n=e*j,r=P-A,i=M[n+r],a=0,o=0;if(e>0&&P>=h[e]&&(a=M[n-j+r-1]),P>h[e]&&(o=M[n+r-1]),i>a&&(i>o||i===o&&t)){if(ne.add(P),e===0)break;e--}t=N[n+r]>1||n+j+r+1<N.length&&N[n+j+r+1]>0,P--}}return[{start:P,end:v+1,score:_},ne]};function cD(e,t,n,r,i,a,o){let s=0,c=0,l=!1,u=0,d=kE(0),f=XE(o),p=0;i>0&&(p=tD(n[i-1]));for(let m=i;m<a;m++){let i=n[m],a=tD(i);if(e||(i>=FE&&i<=IE?i+=32:i>PE&&(i=String.fromCodePoint(i).toLowerCase().codePointAt(0))),t&&(i=OE(i)),i===r[s]){o&&f!==null&&f.add(m),c+=HE;let e=nD(p,a);u===0?d=e:(e===GE&&(d=e),e=jE(jE(e,d),JE)),c+=s===0?e*YE:e,l=!1,u++,s++}else c+=l?WE:UE,l=!0,u=0,d=0;p=a}return[c,f]}var lD=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];if(oD(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let s=0,c=-1,l=-1,u=r.length,d=i.length;for(let a=0;a<u;a++){let o=r[VE(a,u,n)];e||(o>=FE&&o<=IE?o+=32:o>PE&&(o=String.fromCodePoint(o).toLowerCase().codePointAt(0))),t&&(o=OE(o));let f=i[VE(s,d,n)];if(o===f&&(c<0&&(c=a),s++,s===d)){l=a+1;break}}if(c>=0&&l>=0){s--;for(let t=l-1;t>=c;t--){let a=r[VE(t,u,n)];e||(a>=FE&&a<=IE?a+=32:a>PE&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)));let o=i[VE(s,d,n)];if(a===o&&(s--,s<0)){c=t;break}}if(!n){let e=c;c=u-l,l=u-e}let[o,f]=cD(e,t,r,i,c,l,a);return[{start:c,end:l,score:o},f]}return[{start:-1,end:-1,score:0},null]},uD=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];let s=r.length,c=i.length;if(s<c||oD(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let l=0,u=-1,d=kE(0),f=kE(-1);for(let a=0;a<s;a++){let o=VE(a,s,n),p=r[o];e||(p>=FE&&p<=IE?p+=32:p>PE&&(p=String.fromCodePoint(p).toLowerCase().codePointAt(0))),t&&(p=OE(p));let m=VE(l,c,n);if(i[m]===p){if(m===0&&(d=rD(r,o)),l++,l===c){if(d>f&&(u=a,f=d),d===GE)break;a-=l-1,l=0,d=0}}else a-=l,l=0,d=0}if(u>=0){let a=0,o=0;n?(a=u-c+1,o=u+1):(a=s-(u+1),o=s-(u-c+1));let[l]=cD(e,t,r,i,a,o,!1);return[{start:a,end:o,score:l},null]}return[{start:-1,end:-1,score:0},null]},dD=102400,fD=2048;function pD(e,t){return{i16:new Int16Array(e),i32:new Int32Array(t)}}var mD=pD(dD,fD),hD=(e,t,n)=>{let r=!1;switch(t){case`smart-case`:e.toLowerCase()!==e&&(r=!0);break;case`case-sensitive`:r=!0;break;case`case-insensitive`:e=e.toLowerCase(),r=!1}let i=ME(e);return n&&(i=i.map(OE)),{queryRunes:i,caseSensitive:r}};function gD(e,t){let n=Object.keys(e).map(e=>parseInt(e,10)).sort((e,t)=>t-e),r=[];for(let i of n)if(r=r.concat(e[i]),r.length>=t)break;return r}function _D(e,t,n){return r=>{let i=this.runesList[r];if(t.length>i.length)return;let[a,o]=this.algoFn(n,this.opts.normalize,this.opts.forward,i,t,!0,mD);if(a.start===-1)return;if(this.opts.fuzzy===!1){o=new Set;for(let e=a.start;e<a.end;++e)o.add(e)}let s=this.opts.sort?a.score:0;e[s]===void 0&&(e[s]=[]),e[s].push({item:this.items[r],...a,positions:o??new Set})}}function vD(e){let{queryRunes:t,caseSensitive:n}=hD(e,this.opts.casing,this.opts.normalize),r={},i=_D.bind(this)(r,t,n);for(let e=0,t=this.runesList.length;e<t;++e)i(e);return gD(r,this.opts.limit)}var yD={limit:1/0,selector:e=>e,casing:`smart-case`,normalize:!0,fuzzy:`v2`,tiebreakers:[],sort:!0,forward:!0},bD=class{constructor(e,...t){switch(this.opts={...yD,...t[0]},this.items=e,this.runesList=e.map(e=>ME(this.opts.selector(e).normalize())),this.algoFn=uD,this.opts.fuzzy){case`v2`:this.algoFn=sD;break;case`v1`:this.algoFn=lD}}},xD={...yD,match:vD},SD=class extends bD{constructor(e,...t){super(e,...t),this.opts={...xD,...t[0]}}find(e){return e.length===0||this.items.length===0?this.items.slice(0,this.opts.limit).map(CD):(e=e.normalize(),wD(this.opts.match.bind(this)(e),this.opts))}};({...yD});var CD=e=>({item:e,start:-1,end:-1,score:0,positions:new Set});function wD(e,t){if(t.sort){let{selector:n}=t;e.sort((e,r)=>{if(e.score===r.score)for(let i of t.tiebreakers){let t=i(e,r,n);if(t!==0)return t}return 0})}return Number.isFinite(t.limit)&&e.splice(t.limit),e}function TD(e,t,n){return n(e.item).length-n(t.item).length}var ED=class{constructor(e,...t){this.finder=new SD(e,...t),this.find=this.finder.find.bind(this.finder)}};function DD(e){let[t,n]=(0,U.useState)(null),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(``),[c,l]=(0,U.useState)(null),u=o===``?``:`${o}/`,d=(t??[]).filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),f=[...new Set(d.filter(e=>e.includes(`/`)).map(e=>e.split(`/`)[0]))].sort((e,t)=>e.localeCompare(t)),p=i===``?d.filter(e=>!e.includes(`/`)).sort((e,t)=>e.localeCompare(t)).map(e=>`${u}${e}`):new ED(t??[],{limit:50,casing:`case-insensitive`,tiebreakers:[(e,t)=>OD(t)-OD(e),TD]}).find(i).map(e=>e.item);return(0,U.useEffect)(()=>{let t=!1;return(async()=>{try{let i=await r(e.machine,`projects.logoFiles`,{id:e.projectId});t||n(i)}catch(e){t||l(It(e))}})(),()=>{t=!0}},[e.machine,e.projectId]),(0,W.jsx)(Ur,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Ir,{className:`gap-0 overflow-hidden p-0 sm:max-w-lg`,showCloseButton:!1,"aria-describedby":void 0,children:[(0,W.jsx)(Br,{className:`sr-only`,children:`Pick icon`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1 border-b p-1`,children:[(0,W.jsxs)(`label`,{className:`flex h-7 min-w-0 flex-1 items-center gap-2.5 px-2`,children:[(0,W.jsx)(V,{icon:nr,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`input`,{className:`placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none`,placeholder:`Search images in this project`,value:i,onChange:e=>a(e.target.value)})]}),(0,W.jsx)(zr,{asChild:!0,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close`,children:(0,W.jsx)(V,{icon:lo})})})]}),i===``&&(0,W.jsxs)(`div`,{className:`flex items-center gap-1 border-b p-1`,children:[(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Parent folder`,disabled:o===``,onClick:()=>s(o.split(`/`).slice(0,-1).join(`/`)),children:(0,W.jsx)(V,{icon:Bn})}),(0,W.jsxs)(`span`,{className:`truncate px-1.5 font-mono text-xs`,children:[`/`,o]})]}),(0,W.jsxs)(`div`,{className:`h-72 overflow-y-auto p-1`,children:[i===``&&f.map(e=>(0,W.jsxs)(`button`,{className:`hover:bg-muted flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm transition-colors`,onClick:()=>s(`${u}${e}`),children:[(0,W.jsx)(V,{icon:Mn,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`span`,{className:`truncate font-mono text-xs`,children:e})]},e)),p.map(t=>(0,W.jsxs)(`button`,{className:`hover:bg-muted flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm transition-colors`,onClick:async()=>{try{let n=await r(e.machine,`files.read`,{projectId:e.projectId,path:t});n.kind===`image`?e.onPick(`data:${n.mediaType};base64,${n.data}`):n.kind===`large`?l(`${t} is too large`):l(`${t} is not an image`)}catch(e){l(It(e))}},children:[(0,W.jsx)(V,{icon:Zn,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`span`,{className:`truncate font-mono text-xs`,children:i===``?t.slice(u.length):t})]},t)),t?.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:`No images in this project`}),t!==null&&t.length>0&&i!==``&&p.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:`No matching images`})]}),c!==null&&(0,W.jsx)(`p`,{className:`text-destructive border-t px-3 py-2 text-sm break-all`,children:c})]})})}function OD(e){let t=e.item.lastIndexOf(`/`)+1;return[...e.positions].filter(e=>e>=t).length}function kD(e){let t=O(e=>e.machines),[n,i]=(0,U.useState)(null),[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(()=>AD(t.find(t=>t.id===e.machine))),[l,u]=(0,U.useState)(``),[d,f]=(0,U.useState)(!1),p=s.trim()===``?void 0:n?.listing,m=p?.directories.filter(e=>e.name.toLowerCase().includes(l.toLowerCase()));function h(e){c(e),u(``)}return(0,U.useEffect)(()=>{if(s.trim()===``)return;let t=!1,n=setTimeout(async()=>{try{let n=await r(e.machine,`directories.list`,{path:s});if(t)return;i({path:s,listing:n}),o(null)}catch(e){if(t)return;i(null),o(It(e))}},150);return()=>{t=!0,clearTimeout(n)}},[e.machine,s]),(0,W.jsx)(Ur,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Ir,{className:`gap-0 overflow-hidden p-0 sm:max-w-lg`,showCloseButton:!1,"aria-describedby":void 0,children:[(0,W.jsx)(Br,{className:`sr-only`,children:`Add project`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1 border-b p-1`,children:[(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Home folder`,onClick:()=>h(`~`),children:(0,W.jsx)(V,{icon:Po})}),(0,W.jsx)(`div`,{className:`bg-border mx-0.5 h-4 w-px`}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Parent folder`,disabled:p?.parent===void 0||p.parent===null,onClick:()=>{p?.parent!==void 0&&p.parent!==null&&h(p.parent)},children:(0,W.jsx)(V,{icon:Bn})}),(0,W.jsx)(`input`,{"aria-label":`Folder path`,className:`hover:bg-muted focus:bg-muted h-7 min-w-0 flex-1 rounded-md bg-transparent px-1.5 font-mono text-xs outline-none`,spellCheck:!1,value:s,onChange:e=>h(e.target.value)}),(0,W.jsx)(zr,{asChild:!0,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close`,children:(0,W.jsx)(V,{icon:lo})})})]}),(0,W.jsxs)(`label`,{className:`flex h-9 items-center gap-2.5 border-b px-3`,children:[(0,W.jsx)(V,{icon:nr,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`input`,{className:`placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none`,placeholder:`Search this folder`,value:l,onChange:e=>u(e.target.value)})]}),(0,W.jsxs)(`div`,{className:`h-72 overflow-y-auto p-1`,children:[m?.map(e=>(0,W.jsxs)(`button`,{className:`hover:bg-muted flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm transition-colors`,onClick:()=>h(e.path),children:[(0,W.jsx)(V,{icon:Mn,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`span`,{className:`truncate`,children:e.name})]},e.path)),m?.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:l===``?`No folders here`:`No matching folders`})]}),a!==null&&s.trim()!==``&&(0,W.jsx)(`p`,{className:`text-destructive border-t px-3 py-2 text-sm break-all`,children:a}),(0,W.jsx)(Wr,{className:`border-t p-3`,children:(0,W.jsx)(H,{disabled:n?.path!==s||d,onClick:async()=>{if(n!==null&&n.path===s){f(!0);try{e.onAdd({...await Zs(e.machine,n.listing.path),machine:e.machine})}catch(e){o(It(e)),f(!1)}}},children:`Add project`})})]})})}function AD(e){return e===void 0||e.config===null||e.system===null?`~`:e.config.workingDir[e.system.platform]??`~`}function jD(e){let t=e.project.path,[n,r]=(0,U.useState)(e.project.name),[i,a]=(0,U.useState)(e.project.logo),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(!1),[u,d]=(0,U.useState)(!1),[f,p]=(0,U.useState)(!1),m=(0,U.useRef)(null);return(0,W.jsx)(Ur,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Ir,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,children:[(0,W.jsxs)(`form`,{className:`grid`,onSubmit:async t=>{t.preventDefault(),l(!0);try{await Qs(e.project.machine,e.project.id,{name:n,logo:i===e.project.logo?void 0:i}),e.onClose()}catch(e){s(It(e)),l(!1)}},children:[(0,W.jsxs)(Lr,{className:`gap-1 px-6 pt-4 pr-12`,children:[(0,W.jsx)(Br,{className:`text-base`,children:`Edit project`}),(0,W.jsx)(Vr,{className:`truncate font-mono text-xs`,title:t,children:t})]}),(0,W.jsxs)(`div`,{className:`grid gap-6 p-6`,children:[(0,W.jsxs)(`div`,{className:`grid gap-2.5`,children:[(0,W.jsx)(TE,{children:`Icon`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,W.jsxs)(`div`,{className:`relative flex-none`,children:[(0,W.jsx)(rc,{name:n.trim()===``?fr(t):n,logo:i,className:`ring-foreground/10 size-16 rounded-2xl ring-1 [&>img]:rounded-2xl [&>svg]:rounded-2xl`}),i!==null&&(0,W.jsx)(`button`,{type:`button`,className:`bg-popover text-muted-foreground hover:text-foreground absolute -top-1.5 -right-1.5 grid size-5 cursor-pointer place-items-center rounded-full border shadow-xs`,title:`Remove icon`,onClick:()=>a(null),children:(0,W.jsx)(V,{icon:lo,className:`size-3`})})]}),(0,W.jsxs)(`div`,{className:`grid gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,W.jsxs)(H,{type:`button`,variant:`outline`,size:`sm`,title:`Upload an image from this device`,onClick:()=>m.current?.click(),children:[(0,W.jsx)(V,{icon:gs}),`Upload`]}),(0,W.jsxs)(H,{type:`button`,variant:`outline`,size:`sm`,title:`Choose an image from the project on the server`,onClick:()=>p(!0),children:[(0,W.jsx)(V,{icon:Mn}),`Choose from project`]})]}),(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`PNG, JPG, WebP, SVG or ICO. SVG and ICO up to 384 KB`})]})]}),(0,W.jsx)(`input`,{ref:m,type:`file`,accept:`image/png,image/jpeg,image/webp,image/svg+xml,image/x-icon`,hidden:!0,onChange:async e=>{let t=e.target.files?.[0];e.target.value=``,t!==void 0&&a(`data:${t.type};base64,${await Zd(t)}`)}})]}),(0,W.jsxs)(`div`,{className:`grid gap-2`,children:[(0,W.jsx)(TE,{htmlFor:`project-name`,children:`Name`}),(0,W.jsx)(X,{id:`project-name`,placeholder:fr(t),value:n,onChange:e=>r(e.target.value)})]}),o!==null&&(0,W.jsx)(`p`,{className:`text-destructive text-sm break-all`,children:o})]}),(0,W.jsxs)(Wr,{className:`bg-muted/40 border-t px-6 py-4`,children:[(0,W.jsxs)(H,{type:`button`,variant:u?`destructive`:`ghost`,className:B(`sm:mr-auto`,!u&&`text-destructive hover:bg-destructive/10 hover:text-destructive`),title:`Its threads stay in their provider`,onClick:async()=>{if(!u)d(!0);else try{await $s(e.project.machine,e.project.id),e.onRemoved()}catch(e){s(It(e))}},children:[(0,W.jsx)(V,{icon:So,className:`text-current`}),u?`Click again to remove`:`Remove project`]}),(0,W.jsx)(H,{type:`button`,variant:`outline`,onClick:e.onClose,children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,disabled:n.trim()===``||c,children:`Save`})]})]}),f&&(0,W.jsx)(DD,{machine:e.project.machine,projectId:e.project.id,onClose:()=>p(!1),onPick:e=>{a(e),p(!1)}})]})})}function MD(e){let t=O(e=>e.projects),[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(null),[o,s]=Sr(`sidebarScope`,null),c=t.filter(t=>t.machine===e.machine).sort((e,t)=>n===null?0:n.indexOf(e.id)-n.indexOf(t.id));return(0,W.jsxs)(W.Fragment,{children:[c.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground py-8 text-center text-sm`,children:`No projects yet`}),(0,W.jsx)(pE,{as:`div`,axis:`y`,values:c.map(e=>e.id),onReorder:r,children:c.map(t=>(0,W.jsxs)(bE,{value:t.id,disabled:!1,className:`min-h-13 px-1 outline-none`,onDragEnd:async()=>{if(n!==null){try{await ec(e.machine,n)}catch(e){ae(e)}r(null)}},children:[(0,W.jsx)(nc,{machine:t.machine,projectId:t.id,className:`size-5 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1`,title:t.path,children:[(0,W.jsx)(`span`,{className:B(`block truncate text-sm`,t.hidden&&`text-muted-foreground`),children:t.name}),(0,W.jsx)(`span`,{className:`text-muted-foreground block truncate font-mono text-xs`,children:ND(t.path,e.homeDir)})]}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost-muted`,title:`Configure project`,"aria-label":`Configure ${t.name}`,onClick:()=>a(t),children:(0,W.jsx)(V,{icon:rs})}),(0,W.jsx)(Cp,{size:`sm`,checked:!t.hidden,onCheckedChange:e=>Qs(t.machine,t.id,{hidden:!e}).catch(ae),"aria-label":`Show ${t.name}`})]},t.id))}),i!==null&&(0,W.jsx)(jD,{project:i,onClose:()=>a(null),onRemoved:()=>{o?.machine===i.machine&&o.projectId===i.id&&s(null),a(null)}})]})}function ND(e,t){return e===t?`~`:e.startsWith(`${t}/`)||e.startsWith(`${t}\\`)?`~${e.slice(t.length)}`:e}var PD={five_hour:`5h`,seven_day:`Week`,seven_day_opus:`Week (Opus)`,seven_day_sonnet:`Week (Sonnet)`};function FD(e){return PD[e.window]??e.window}function ID(e){let t=e.account,[n,i]=(0,U.useState)(null);async function a(n){i(null);try{await r(e.machine,`accounts.update`,{id:t.id,name:t.name,color:t.color,configDir:t.configDir,enabled:t.enabled,...n})}catch(e){i(It(e))}}async function o(){i(null);try{await r(e.machine,`accounts.remove`,{id:t.id}),Ve({settingsAccount:null})}catch(e){i(It(e))}}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jp,{title:`Account`,children:[(0,W.jsx)(Q,{label:`Name`,children:(0,W.jsx)(Mp,{value:t.name,valid:e=>e.trim()!==``,onCommit:e=>void a({name:e})},t.name)}),(0,W.jsx)(Q,{label:`Color`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t.color!==null&&(0,W.jsx)(`span`,{className:`size-5 shrink-0 rounded-full`,style:{backgroundColor:t.color}}),(0,W.jsx)(Mp,{className:`w-28 font-mono`,value:t.color??``,placeholder:`#3b82f6`,valid:e=>e===``||/^#[0-9a-f]{6}$/i.test(e),onCommit:e=>void a({color:e===``?null:e})},t.color??``)]})}),(0,W.jsx)(Q,{label:`Config directory`,children:(0,W.jsx)(Mp,{className:`w-72 font-mono`,value:t.configDir??``,placeholder:t.provider===`claude`?`~/.claude or empty for default`:`~/.codex or empty for default`,onCommit:e=>void a({configDir:e})},t.configDir??``)})]}),n!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-1 text-xs`,children:n}),(0,W.jsxs)(In,{children:[(0,W.jsx)(kn,{asChild:!0,children:(0,W.jsx)(H,{variant:`outline`,className:`text-destructive`,children:`Remove account`})}),(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsxs)(hr,{children:[`Remove `,t.name,`?`]}),(0,W.jsx)(Ln,{children:`OffSite stops using this account. Its config directory and sessions stay untouched.`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:()=>void o(),children:`Remove account`})]})]})]})]})}function LD(e){let[t,n]=(0,U.useState)(``),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(null);async function u(){s(!0),l(null);try{await r(e.machine,`accounts.add`,{provider:e.provider,name:t,configDir:i}),Ve({settingsAccount:null})}catch(e){l(It(e)),s(!1)}}return(0,W.jsxs)(`form`,{className:`space-y-5`,onSubmit:e=>{e.preventDefault(),u()},children:[(0,W.jsxs)(jp,{title:`Account`,children:[(0,W.jsx)(Q,{label:`Name`,children:(0,W.jsx)(X,{className:`w-56`,value:t,onChange:e=>n(e.target.value),placeholder:`Work`})}),(0,W.jsx)(Q,{label:`Config directory`,children:(0,W.jsx)(X,{className:`w-72 font-mono`,value:i,onChange:e=>a(e.target.value),placeholder:e.provider===`claude`?`~/.claude or empty for default`:`~/.codex or empty for default`})})]}),c!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-1 text-xs`,children:c}),(0,W.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,W.jsx)(H,{type:`button`,variant:`ghost`,onClick:()=>Ve({settingsAccount:null}),children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,disabled:o||t.trim()===``,children:`Add account`})]})]})}function RD(e){let t=e.config,n=t.enabledProviders[e.provider],r=e.provider===`claude`?e.claudeAccounts:e.provider===`codex`?e.codexAccounts:[],i=r.find(e=>e.valid),a=t.claudeBaseDir[e.platform]??e.defaultClaudeBaseDir;if(e.selected===`new`){if(e.provider===`opencode`)throw Error(`OpenCode accounts cannot be added`);return(0,W.jsx)(LD,{machine:e.machine,provider:e.provider})}if(e.selected!==null){let t=r.find(t=>t.id===e.selected);return t===void 0?(0,W.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`This account no longer exists.`}):(0,W.jsx)(ID,{machine:e.machine,account:t})}return(0,W.jsxs)(W.Fragment,{children:[e.provider===`claude`&&(0,W.jsx)(`div`,{className:`divide-y overflow-hidden rounded-xl border`,children:(0,W.jsx)(Q,{label:`Base directory`,children:(0,W.jsx)(Mp,{className:`w-72 font-mono`,value:a,valid:e=>e.trim()!==``,onCommit:n=>_t(e.machine,{...t,claudeBaseDir:{...t.claudeBaseDir,[e.platform]:n}})},a)})}),(0,W.jsxs)(`div`,{className:B(`space-y-5 transition-opacity`,!n&&`opacity-50`),children:[e.provider!==`opencode`&&(0,W.jsx)(jp,{title:`Accounts`,children:(0,W.jsx)(BD,{machine:e.machine,accounts:r})}),n&&e.provider===`opencode`&&e.openCode.available&&(0,W.jsx)(zD,{machine:e.machine,config:t,provider:e.provider,accountId:null}),n&&e.provider!==`opencode`&&i!==void 0&&(0,W.jsx)(zD,{machine:e.machine,config:t,provider:e.provider,accountId:i.id})]})]})}function zD(e){let[t,n]=(0,U.useState)(null),[i,a]=(0,U.useState)(null),o=e.config.models[e.provider],s=t===null?null:t.models,c=e.config.newThreads.models[e.provider]??(t===null?null:t.defaultModel);(0,U.useEffect)(()=>{let t=!0;return n(null),a(null),r(e.machine,`capabilities`,{provider:e.provider,accountId:e.accountId,projectId:null}).then(e=>{t&&n(e)},e=>{t&&a(It(e))}),()=>{t=!1}},[e.machine,e.provider,e.accountId]);function l(t,n){_t(e.machine,{...e.config,models:{...e.config.models,[e.provider]:{...o,[t]:n}}})}return(0,W.jsxs)(jp,{title:`Models`,children:[s!==null&&(0,W.jsx)(Q,{label:`Default model`,children:(0,W.jsxs)(ip,{value:c??void 0,onValueChange:t=>void _t(e.machine,{...e.config,newThreads:{...e.config.newThreads,models:{...e.config.newThreads.models,[e.provider]:t}}}),children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{placeholder:`Choose a model`})}),(0,W.jsx)(sp,{children:s.filter(e=>!(o[e.value]?.hidden??e.deprecated)||e.value===c).map(e=>(0,W.jsx)(Z,{value:e.value,children:e.name},e.value))})]})}),i!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:i}),i===null&&s===null&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-4 py-3 text-xs`,children:`Loading…`}),(s??[]).map(t=>{let n=o[t.value]??{hidden:t.deprecated,effort:t.effort};return(0,W.jsxs)(`div`,{className:`flex min-h-11 items-center gap-3 px-4 py-1.5`,children:[(0,W.jsxs)(`div`,{className:B(`min-w-0 flex-1 truncate text-sm`,n.hidden&&`text-muted-foreground`),children:[t.name,e.provider===`opencode`&&(0,W.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs`,children:t.description})]}),t.efforts.length>0&&(0,W.jsxs)(ip,{value:n.effort??t.effort??void 0,onValueChange:e=>l(t.value,{...n,effort:e}),children:[(0,W.jsx)(op,{size:`sm`,className:`w-28`,children:(0,W.jsx)(ap,{placeholder:`Effort`})}),(0,W.jsx)(sp,{children:t.efforts.map(e=>(0,W.jsx)(Z,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,W.jsx)(Cp,{size:`sm`,checked:!n.hidden,onCheckedChange:e=>l(t.value,{...n,hidden:!e}),"aria-label":`Show ${t.name}`})]},t.value)})]})}function BD(e){let[t,n]=(0,U.useState)(!1),[i,a]=(0,U.useState)(null);async function o(e){n(!0),a(null);try{await e()}catch(e){a(It(e))}finally{n(!1)}}return(0,W.jsxs)(W.Fragment,{children:[e.accounts.map(n=>(0,W.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,W.jsxs)(`div`,{className:B(`min-w-0 flex-1`,!n.enabled&&`opacity-50`),children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:B(`size-2 shrink-0 rounded-full`,!n.enabled&&`bg-muted-foreground/40`,n.enabled&&n.error!==null&&`bg-destructive`,n.enabled&&n.error===null&&!n.linked&&`bg-warning`,n.enabled&&n.error===null&&n.linked&&`bg-success`)}),(0,W.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.name}),n.plan!==null&&(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:n.plan})]}),n.error!==null&&(0,W.jsx)(`p`,{className:`text-destructive mt-1 truncate pl-4 text-xs`,children:n.error}),n.error===null&&!n.linked&&(0,W.jsx)(`p`,{className:`text-warning mt-1 truncate pl-4 text-xs`,children:`Not linked to shared threads · hidden in the composer`}),n.error===null&&n.linked&&n.limits.length>0&&(0,W.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-x-5 gap-y-1.5 pl-4`,children:n.limits.map(e=>(0,W.jsx)(VD,{limit:e},e.window))})]}),(0,W.jsx)(Cp,{size:`sm`,checked:n.enabled,disabled:t,onCheckedChange:t=>void o(()=>r(e.machine,`accounts.update`,{id:n.id,name:n.name,color:n.color,configDir:n.configDir,enabled:t})),"aria-label":`Enable ${n.name}`}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost-muted`,title:`Open account`,onClick:()=>Ve({settingsAccount:n.id}),children:(0,W.jsx)(V,{icon:Rn})})]},n.id)),(0,W.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:bg-muted/50 hover:text-foreground flex w-full items-center gap-2 px-4 py-3 text-sm transition-colors`,onClick:()=>Ve({settingsAccount:`new`}),children:[(0,W.jsx)(V,{icon:Ga,className:`size-4`}),`Add account`]}),i!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:i})]})}function VD(e){let t=e.limit,n=t.rejected?100:t.utilization===null?null:Math.min(100,Math.round(t.utilization*100));return n===null?null:(0,W.jsx)(Nr,{label:t.resetsAt===null?`Reset time unknown`:`Resets ${Qt(t.resetsAt*1e3)}`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:FD(t)}),(0,W.jsx)(`div`,{className:`bg-foreground/10 h-1 w-16 overflow-hidden rounded-full`,children:(0,W.jsx)(`div`,{className:B(`h-full rounded-full`,t.rejected&&`bg-destructive`,!t.rejected&&n>=80&&`bg-warning`,!t.rejected&&n<80&&`bg-foreground/50`),style:{width:`${n}%`}})}),(0,W.jsxs)(`span`,{className:B(`tabular-nums`,t.rejected&&`text-destructive`,!t.rejected&&`text-muted-foreground`),children:[n,`%`]})]})})}var HD=Mt?`⌘`:`Ctrl+Shift`,UD=[[`Enter`,`Send, or queue or steer while the agent works`],[`${Ft}+Enter`,`Send the other way while the agent works`],[`Shift+Enter`,`New line`],[`↑`,`Recall your last message`],[`Esc`,`Stop the agent`],[`/`,`Slash commands`],[`@`,`Mention a file`],[`${Ft}+S`,`Stash the prompt, or bring back the last stash`],[`${Ft}+Shift+V`,`Paste long text inline instead of as a file`],[`${Ft}+Shift+M`,`Choose the model`],[`${Ft}+Shift+E`,`Choose the effort`],[`${Ft}+F`,`Find in the thread`],[`${Ft}+K`,`Search sessions and actions`],[`${Ft}+1…9`,`Open a session from the sidebar`],[`${Ft}+N or ${Ft}+T`,`New thread`],[Mt?"⌘+` or Ctrl+`":"Ctrl+`",`Toggle the terminal`],[`${Ft}+B or ${Ft}+Shift+J`,`Toggle the sidebar`],[`${Ft}+J or ${Ft}+Shift+B`,`Toggle the right panel`],[`${HD}+T`,`New terminal tab, in the terminal`],[`${HD}+W`,`Close the terminal tab`],[`${HD}+F`,`Find in the terminal`],[`Ctrl+Tab`,`Next terminal tab`],[`Ctrl+Shift+Tab`,`Previous terminal tab`]];function WD(){return(0,W.jsx)(jp,{title:`Keyboard shortcuts`,children:UD.map(([e,t])=>(0,W.jsx)(Q,{label:t,children:(0,W.jsx)(`kbd`,{className:`bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-sans text-xs`,children:e})},e))})}var GD=1048576;function KD(e){window.isSecureContext?navigator.clipboard.writeText(e).catch(e=>{console.warn(`could not copy to the clipboard`,e),Gi(`Could not copy to the clipboard`)}):console.warn(`copy from the terminal needs https or localhost`)}async function qD(e){if(!window.isSecureContext){console.warn(`programs can read the clipboard only over https or localhost`),Gi(`Programs can read the clipboard only over https or localhost`);return}let t;try{t=await navigator.clipboard.readText()}catch(e){console.warn(`could not read the clipboard`,e),Gi(`Could not read the clipboard`);return}new TextEncoder().encode(t).length>GD?(console.warn(`the clipboard is over 1 MiB, not replying`),Gi(`The clipboard is too large to share (over 1 MiB)`)):e(t)}var JD={macos:{label:`Ctrl+V`,ctrl:!0,alt:!1,data:``},linux:{label:`Ctrl+V`,ctrl:!0,alt:!1,data:``},windows:{label:`Alt+V`,ctrl:!1,alt:!0,data:`\x1Bv`}};function YD(e,t){let n=JD[t];return e.key.toLowerCase()===`v`&&e.ctrlKey===n.ctrl&&e.altKey===n.alt&&!e.shiftKey&&!e.metaKey}async function XD(e,t){let n=[];for(let e of await navigator.clipboard.read()){let t=e.types.find(e=>e.startsWith(`image/`));t&&n.push(await e.getType(t))}return n.length===0?(Gi(`No image in the clipboard`),!1):(await ZD(e,t,n),!0)}async function ZD(e,t,n){let i=[];for(let t of n){let n=await r(e,`terminal.paste`,{type:t.type,data:await Zd(t)});i.push(/\s/.test(n)?`"${n}"`:n)}t.paste(i.join(` `))}function QD(e){console.error(`could not paste image`,e),Gi(`Could not paste the image`)}function $D(e){let t=e.prefs.terminal,[n,r]=(0,U.useState)(!Ep.some(e=>e.family===t.font.family));function i(t){E({...e.prefs,terminal:t})}function a(e,n){i({...t,[e]:{...t[e],...n}})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jp,{title:`Font`,children:[(0,W.jsx)(Q,{label:`Family`,children:(0,W.jsxs)(ip,{value:n?`custom`:t.font.family,onValueChange:e=>{r(e===`custom`),e!==`custom`&&a(`font`,{family:e})},children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[Ep.map(e=>(0,W.jsx)(Z,{value:e.family,children:e.label},e.family)),(0,W.jsx)(Z,{value:`custom`,children:`Custom`})]})]})}),n&&(0,W.jsx)(Q,{label:`Custom family`,children:(0,W.jsx)(Mp,{placeholder:`Installed font name`,value:t.font.family,onCommit:e=>a(`font`,{family:e})})}),(0,W.jsx)(Q,{label:`Size`,children:(0,W.jsx)(Np,{value:t.font.size,step:.5,onCommit:e=>a(`font`,{size:e})})}),(0,W.jsx)(Q,{label:`Line height`,children:(0,W.jsx)(Np,{value:t.font.lineHeight,step:.05,onCommit:e=>a(`font`,{lineHeight:e})})}),(0,W.jsx)(Q,{label:`Ligatures`,children:(0,W.jsx)(Cp,{checked:t.font.ligatures,onCheckedChange:e=>a(`font`,{ligatures:e})})}),(0,W.jsx)(Q,{label:`Bold text in bright colors`,children:(0,W.jsx)(Cp,{checked:t.boldIsBright,onCheckedChange:e=>i({...t,boldIsBright:e})})})]}),(0,W.jsxs)(jp,{title:`Cursor`,children:[(0,W.jsx)(Q,{label:`Style`,children:(0,W.jsxs)(ip,{value:t.cursor.style,onValueChange:e=>a(`cursor`,{style:e}),children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`block`,children:`Block`}),(0,W.jsx)(Z,{value:`bar`,children:`Bar`}),(0,W.jsx)(Z,{value:`underline`,children:`Underline`})]})]})}),(0,W.jsx)(Q,{label:`Blink`,children:(0,W.jsx)(Cp,{checked:t.cursor.blink,onCheckedChange:e=>a(`cursor`,{blink:e})})})]}),(0,W.jsx)(eO,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,W.jsx)(tO,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,W.jsx)(nO,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,W.jsxs)(jp,{title:`Layout`,children:[[`top`,`right`,`bottom`,`left`].map(e=>(0,W.jsx)(Q,{label:`Padding ${e}`,children:(0,W.jsx)(Np,{value:t.padding[e],onCommit:t=>a(`padding`,{[e]:t})})},e)),(0,W.jsx)(Q,{label:`Scrollback lines`,children:(0,W.jsx)(Np,{value:t.scrollback,step:1e3,onCommit:e=>i({...t,scrollback:e})})})]})]})}function eO(e){return(0,W.jsxs)(jp,{title:`Behavior`,children:[(0,W.jsx)(Q,{label:`Modernize Shift+Enter`,children:(0,W.jsx)(Cp,{checked:e.behavior.modernizeShiftEnter,onCheckedChange:t=>e.onChange({modernizeShiftEnter:t})})}),(0,W.jsx)(Q,{label:`${JD.linux.label} (${JD.windows.label} on Windows machines) pastes images from the browser clipboard`,children:(0,W.jsx)(Cp,{checked:e.behavior.pasteBrowserImages,onCheckedChange:t=>e.onChange({pasteBrowserImages:t})})}),(0,W.jsx)(Q,{label:`Capture browser shortcuts`,children:(0,W.jsx)(Cp,{checked:e.behavior.captureShortcuts,onCheckedChange:t=>e.onChange({captureShortcuts:t})})}),(0,W.jsx)(Q,{label:`Click moves the cursor in the command line`,children:(0,W.jsx)(Cp,{checked:e.behavior.clickToMoveCursor,onCheckedChange:t=>e.onChange({clickToMoveCursor:t})})}),(0,W.jsx)(Q,{label:`Ask before closing a tab that is running a program`,children:(0,W.jsx)(Cp,{checked:e.behavior.confirmCloseBusyTab,onCheckedChange:t=>e.onChange({confirmCloseBusyTab:t})})})]})}function tO(e){return Mt?(0,W.jsx)(jp,{title:`Mac keys`,note:`Meta keeps that Option key from typing @, | and other symbols. Safari and Firefox use US key positions`,children:(0,W.jsx)(Q,{label:`Use Option as Meta`,children:(0,W.jsxs)(ip,{value:e.behavior.optionAsMeta,onValueChange:t=>e.onChange({optionAsMeta:t}),children:[(0,W.jsx)(op,{className:`w-56`,children:(0,W.jsx)(ap,{})}),(0,W.jsxs)(sp,{children:[(0,W.jsx)(Z,{value:`off`,children:`Off`}),(0,W.jsx)(Z,{value:`left`,children:`Left Option`}),(0,W.jsx)(Z,{value:`right`,children:`Right Option`}),(0,W.jsx)(Z,{value:`both`,children:`Both Options`})]})]})})}):null}function nO(e){return At?(0,W.jsx)(jp,{title:`Windows keys`,note:`Ctrl+C sends an interrupt when nothing is selected. Ctrl+Shift+C and Ctrl+Shift+V always copy and paste`,children:(0,W.jsx)(Q,{label:`Ctrl+C copies the selection and Ctrl+V pastes`,children:(0,W.jsx)(Cp,{checked:e.behavior.windowsCopyPaste,onCheckedChange:t=>e.onChange({windowsCopyPaste:t})})})}):null}var rO=[`General`,`Editor`,`Terminal`,`Notifications`,`Shortcuts`,`Machines`],iO=[`Machine`,`Projects`,`Claude`,`Codex`,`OpenCode`];function aO(){let e=O(e=>e.machines),t=O(e=>e.settingsMachine===null?null:R(e,e.settingsMachine)),n=O(e=>e.settingsPage),r=uO(n),i=O(e=>r===null?null:e.settingsAccount),a=O(e=>n===`Machines`?e.machines.find(t=>t.id===e.settingsEditedMachine)??null:null);return{machines:e,machine:t,config:t===null?null:t.config,system:t===null?null:t.system,page:n,provider:r,account:i,editedMachine:a,subpage:i!==null||a!==null,subpageTitle:i===`new`?`New account`:i===null?a?.name:[...t?.claudeAccounts??[],...t?.codexAccounts??[]].find(e=>e.id===i)?.name}}function oO(){let e=O(e=>e.settingsOpen),t=aO(),n=t.page,r=t.machine;function i(e){return(0,W.jsx)(`button`,{className:B(`text-muted-foreground hover:bg-accent hover:text-foreground flex h-9 flex-none items-center rounded-md px-2 text-sm transition-colors`,e===n&&`bg-accent text-foreground`),onClick:()=>Ue(e),children:(0,W.jsx)(sO,{page:e})},e)}return(0,W.jsx)(Ur,{open:e,onOpenChange:A,children:(0,W.jsxs)(Ir,{showCloseButton:!1,"aria-describedby":void 0,className:`flex h-[min(44rem,calc(100dvh-2rem))] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl sm:flex-row`,children:[(0,W.jsxs)(`nav`,{className:`flex flex-none gap-1 overflow-x-auto border-b p-3 sm:w-48 sm:flex-col sm:border-r sm:border-b-0`,children:[(0,W.jsx)(Br,{className:`hidden px-2 pt-1 pb-3 text-base font-semibold sm:block`,children:`Settings`}),rO.map(i),(0,W.jsxs)(`div`,{className:`flex flex-none items-center gap-1 sm:mt-6 sm:flex-col sm:items-stretch`,children:[r!==null&&t.machines.length>1&&(0,W.jsxs)(ip,{value:r.id,onValueChange:e=>Ve({settingsMachine:e,settingsAccount:null}),children:[(0,W.jsx)(op,{className:`mb-1 w-40 sm:w-full`,children:(0,W.jsx)(ap,{})}),(0,W.jsx)(sp,{children:t.machines.map(e=>(0,W.jsxs)(Z,{value:e.id,children:[(0,W.jsx)(Yd,{icon:e.icon}),e.name]},e.id))})]}),r!==null&&t.machines.length===1&&(0,W.jsxs)(`p`,{className:`text-muted-foreground flex h-9 items-center gap-1.5 px-2 text-xs font-medium [&_svg]:size-4`,children:[(0,W.jsx)(Yd,{icon:r.icon}),(0,W.jsx)(`span`,{className:`truncate`,children:r.name})]}),iO.map(i)]})]}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 pt-4 pb-7`,children:[(0,W.jsxs)(`div`,{className:`mb-5 flex h-9 items-center`,children:[t.subpage&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground text-xl font-semibold tracking-tight transition-colors`,onClick:()=>Ve({settingsAccount:null,settingsEditedMachine:null}),children:n}),(0,W.jsx)(V,{icon:Rn,className:`text-muted-foreground mx-1.5 size-5`}),(0,W.jsx)(`h2`,{className:`truncate text-xl font-semibold tracking-tight`,children:t.subpageTitle})]}),!t.subpage&&(0,W.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:n===`Machine`?`General`:n}),(0,W.jsx)(cO,{view:t,className:`ml-3`}),(0,W.jsx)(zr,{asChild:!0,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon`,className:`-mr-2 ml-auto`,"aria-label":`Close settings`,children:(0,W.jsx)(V,{icon:lo})})})]}),(0,W.jsx)(lO,{view:t})]})]})})}function sO(e){let t=uO(e.page);return(0,W.jsxs)(W.Fragment,{children:[t!==null&&(0,W.jsx)(`span`,{className:`mr-2.5 flex size-4 items-center justify-center`,children:(0,W.jsx)(ic,{provider:t,className:B(t===`claude`&&`size-4`,t===`codex`&&`size-[19px] shrink-0`,t===`opencode`&&`h-3.5`)})}),e.page===`Machine`?`General`:e.page]})}function cO(e){let t=e.view.machine,n=e.view.config,r=e.view.provider;return r===null||e.view.account!==null||t===null||n===null?null:(0,W.jsx)(Cp,{className:e.className,checked:n.enabledProviders[r],onCheckedChange:e=>void _t(t.id,{...n,enabledProviders:{...n.enabledProviders,[r]:e}}),"aria-label":`Enable ${e.view.page}`})}function lO(e){let t=O(e=>e.prefs),n=e.view.page,r=e.view.machine,i=e.view.config,a=e.view.system,o=iO.includes(n),[s,c]=(0,U.useState)(null),[l,u]=(0,U.useState)(0);return(0,W.jsxs)(W.Fragment,{children:[o&&r!==null&&r.configError!==null&&(0,W.jsxs)(`p`,{className:`text-destructive mb-5 text-sm whitespace-pre-wrap`,children:[`Not saved: `,r.configError]}),(0,W.jsxs)(`div`,{className:`w-full space-y-5`,children:[n===`General`&&(0,W.jsx)(Fp,{prefs:t,onRestore:()=>c(`browser`)}),n===`Machine`&&r!==null&&i!==null&&a!==null&&(0,W.jsx)(em,{machine:r.id,config:i,platform:a.platform,defaultShell:a.defaultShell,claudeAccounts:r.claudeAccounts,codexAccounts:r.codexAccounts,openCode:r.openCode,onRestore:()=>c(`machine`)}),n===`Projects`&&r!==null&&a!==null&&(0,W.jsx)(MD,{machine:r.id,homeDir:a.homeDir}),o&&r===null&&(0,W.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Add a machine to see its settings.`}),o&&r!==null&&(i===null||a===null)&&(0,W.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[r.name,` is not connected. Its settings show up once it is.`]}),n===`Editor`&&(0,W.jsx)(Pp,{prefs:t}),n===`Terminal`&&(0,W.jsx)($D,{prefs:t}),n===`Notifications`&&(0,W.jsx)(SE,{prefs:t}),e.view.provider!==null&&r!==null&&i!==null&&a!==null&&(0,W.jsx)(RD,{machine:r.id,config:i,platform:a.platform,defaultClaudeBaseDir:a.defaultClaudeBaseDir,provider:e.view.provider,claudeAccounts:r.claudeAccounts,codexAccounts:r.codexAccounts,openCode:r.openCode,selected:e.view.account},e.view.provider),n===`Machines`&&(0,W.jsx)(vE,{}),n===`Shortcuts`&&(0,W.jsx)(WD,{})]},l),(0,W.jsx)(In,{open:s!==null,onOpenChange:e=>{e||c(null)},children:(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsx)(hr,{children:s===`browser`?`Restore browser defaults?`:`Restore machine defaults?`}),(0,W.jsx)(Ln,{children:s===`browser`?`All settings of this browser go back to their defaults.`:`All settings of ${r?.name} go back to their defaults.`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:()=>{if(u(l+1),s===`browser`)E(w);else{if(r===null||i===null||a===null)throw Error(`Restoring machine defaults needs a connected machine`);_t(r.id,{...a.defaults,claudeAccounts:i.claudeAccounts,codexAccounts:i.codexAccounts})}},children:`Restore defaults`})]})]})})]})}function uO(e){return e===`Claude`?`claude`:e===`Codex`?`codex`:e===`OpenCode`?`opencode`:null}function dO(){let e=O(e=>e.settingsOpen),t=O(e=>e.settingsListing),n=aO(),r=n.machine;function i(){t?A(!1):n.subpage?Ve({settingsAccount:null,settingsEditedMachine:null}):Ve({settingsListing:!0})}function a(e){return(0,W.jsxs)(`button`,{className:`active:bg-accent flex min-h-12 w-full items-center px-4 text-left text-sm font-medium`,onClick:()=>Ue(e),children:[(0,W.jsx)(sO,{page:e}),(0,W.jsx)(V,{icon:Rn,className:`text-muted-foreground ml-auto size-4`})]},e)}return(0,W.jsx)(Hr,{open:e,onOpenChange:A,children:(0,W.jsx)(Kr,{children:(0,W.jsxs)(Rr,{"aria-describedby":void 0,className:`bg-background text-foreground data-open:animate-in data-open:slide-in-from-right fixed inset-0 z-50 flex flex-col pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] text-sm duration-200 outline-none [--workspace-topbar-height:44px] motion-reduce:animate-none`,children:[(0,W.jsxs)(`header`,{className:`flex h-(--workspace-topbar-height) shrink-0 items-center gap-1.5 pr-3 pl-1`,children:[(0,W.jsx)(H,{variant:`ghost`,size:`icon`,"aria-label":`Back`,onClick:i,children:(0,W.jsx)(V,{icon:no,className:`text-foreground size-5`,strokeWidth:2})}),(0,W.jsxs)(Jr,{className:`min-w-0 flex-1 truncate font-medium`,children:[t&&`Settings`,!t&&n.subpage&&n.subpageTitle,!t&&!n.subpage&&n.page]}),!t&&(0,W.jsx)(cO,{view:n,className:`shrink-0`})]}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 pt-2 pb-6`,children:[t&&(0,W.jsxs)(`div`,{className:`space-y-5`,children:[(0,W.jsx)(jp,{title:`This browser`,children:rO.map(a)}),(0,W.jsxs)(jp,{title:`Machine`,children:[r!==null&&(0,W.jsxs)(Q,{label:`Machine`,children:[n.machines.length>1&&(0,W.jsxs)(ip,{value:r.id,onValueChange:e=>Ve({settingsMachine:e,settingsAccount:null}),children:[(0,W.jsx)(op,{className:`w-40`,children:(0,W.jsx)(ap,{})}),(0,W.jsx)(sp,{children:n.machines.map(e=>(0,W.jsxs)(Z,{value:e.id,children:[(0,W.jsx)(Yd,{icon:e.icon}),e.name]},e.id))})]}),n.machines.length===1&&(0,W.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1.5 text-sm [&_svg]:size-4`,children:[(0,W.jsx)(Yd,{icon:r.icon}),r.name]})]}),iO.map(a)]})]}),!t&&(0,W.jsx)(lO,{view:n})]})]})})})}function fO(){return(0,W.jsx)(`div`,{className:`grid flex-1 place-items-center p-6`,children:(0,W.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,W.jsx)(`h1`,{className:`text-foreground text-center text-2xl font-normal tracking-tight sm:text-3xl`,children:`Connect a machine`}),(0,W.jsx)(`p`,{className:`text-muted-foreground mt-2 text-center text-sm`,children:`Run this on the computer you want to use, then open the pairing link it prints.`}),(0,W.jsx)(`pre`,{className:`bg-muted text-foreground mt-5 rounded-lg px-4 py-3 font-mono text-sm select-all`,children:`npx offsite serve`}),(0,W.jsx)(`p`,{className:`text-muted-foreground mt-8 mb-3 text-sm`,children:`Or connect it here.`}),(0,W.jsx)(mE,{actions:e=>(0,W.jsx)(H,{type:`submit`,className:`mt-4`,disabled:!e,children:`Connect`})})]})})}var pO=[`messages`,`steps`,`details`,`full`],mO={messages:`Messages`,steps:`Steps`,details:`Details`,full:`Everything`},hO=[{label:`Messages, plans and answers`,how:{messages:`Full text`,steps:`Full text`,details:`Full text`,full:`Full text`}},{label:`Commands`,how:{messages:null,steps:`One line each`,details:`Full command`,full:`Command and output`}},{label:`File edits`,how:{messages:null,steps:`File path`,details:`Path and diff`,full:`Diff and output`}},{label:`Tools, skills and web searches`,how:{messages:null,steps:`Name only`,details:`Inputs and search results`,full:`Inputs and outputs`}},{label:`Subagents and notices`,how:{messages:null,steps:`One line each`,details:`With compaction summaries`,full:`With compaction summaries`}},{label:`Thinking`,how:{messages:null,steps:null,details:`Full text`,full:`Full text`}},{label:`Todo lists`,how:{messages:null,steps:null,details:`Every step`,full:`Every step`}}];function gO(e){let t=e.session,[n,i]=(0,U.useState)(`steps`),[a,o]=(0,U.useState)(null);(0,U.useEffect)(()=>{r(t.machine,`sessions.export`,{sessionId:t.id,projectId:t.projectId}).then(o).catch(e=>{ae(e),d(null)})},[t.machine,t.id,t.projectId]);function s(e){let n=t.title.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);un(new Blob([e],{type:`text/markdown;charset=utf-8`}),`${n===``?`chat`:n}.md`),d(null)}return(0,W.jsx)(Ur,{open:!0,onOpenChange:()=>d(null),children:(0,W.jsxs)(Ir,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,"aria-describedby":void 0,children:[(0,W.jsx)(Lr,{className:`gap-1 px-6 pt-4 pr-12`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(Br,{className:`text-base`,children:`Export to Markdown`}),a!==null&&a.context!==null&&(0,W.jsx)(`span`,{className:`text-muted-foreground rounded-full border px-2 py-0.5 text-xs tabular-nums`,children:_n(a.context.tokens)})]})}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-3 px-6 pt-5 pb-6`,children:[(0,W.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,W.jsx)(`span`,{className:`text-foreground font-medium`,children:`Detail`}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:a===null?`Counting tokens…`:`About ${_O(a.markdown[n]).toLocaleString()} tokens`})]}),(0,W.jsxs)(Il,{className:`relative flex h-5 w-full touch-none items-center select-none`,min:0,max:pO.length-1,step:1,value:[pO.indexOf(n)],onValueChange:e=>i(pO[e[0]]),children:[(0,W.jsx)(Ul,{className:`bg-muted relative h-1.5 grow overflow-hidden rounded-full`,children:(0,W.jsx)(Gl,{className:`bg-primary absolute h-full`})}),(0,W.jsx)(Ql,{"aria-label":`Detail`,className:`border-primary bg-background ring-ring/50 block size-4 rounded-full border-2 shadow-sm transition-shadow hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden`})]}),(0,W.jsx)(`div`,{className:`relative h-8 text-xs`,children:pO.map((e,t)=>(0,W.jsxs)(`button`,{type:`button`,className:B(`text-muted-foreground hover:text-foreground absolute top-0 flex cursor-pointer flex-col`,t===0&&`left-0 items-start`,t>0&&t<pO.length-1&&`-translate-x-1/2 items-center`,t===pO.length-1&&`right-0 items-end`,e===n&&`text-foreground font-medium`),style:t>0&&t<pO.length-1?{left:`calc(8px + (100% - 16px) * ${t/(pO.length-1)})`}:void 0,onClick:()=>i(e),children:[(0,W.jsx)(`span`,{children:mO[e]}),(0,W.jsx)(`span`,{className:`text-muted-foreground/70 font-normal tabular-nums`,children:a===null?`…`:`~${_n(_O(a.markdown[e]))}`})]},e))}),(0,W.jsx)(`ul`,{className:`mt-1 flex flex-col gap-1.5`,children:hO.map(e=>(0,W.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(V,{icon:e.how[n]===null?Or:Fn,className:B(`size-4 shrink-0`,e.how[n]===null&&`text-muted-foreground/50`,e.how[n]!==null&&`text-primary`),strokeWidth:2}),(0,W.jsx)(`span`,{className:B(`min-w-0 flex-1 truncate`,e.how[n]===null&&`text-muted-foreground/60`,e.how[n]!==null&&`text-foreground`),children:e.label}),(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:e.how[n]??`Not included`})]},e.label))})]}),(0,W.jsxs)(Wr,{className:`bg-muted/40 border-t px-6 py-4`,children:[(0,W.jsx)(H,{type:`button`,variant:`outline`,onClick:()=>d(null),children:`Cancel`}),(0,W.jsxs)(H,{type:`button`,disabled:a===null,onClick:()=>{a!==null&&s(a.markdown[n])},children:[(0,W.jsx)(V,{icon:Gn}),`Export`]})]})]})})}function _O(e){return Math.round(e.length/4)}var vO=.5,yO=.8,bO=.6,xO=.45,SO=.3,CO=.25,wO=.25,TO=4,EO=new Set([`a`,`an`,`and`,`for`,`in`,`of`,`on`,`the`,`to`,`with`]),DO=/[\p{L}\p{N}]/u,OO=/\p{Ll}/u,kO=/\p{Lu}/u,AO=/\p{N}/u,jO=/\p{L}/u;function MO(e){return e.replace(/[\u0080-]/g,e=>{let t=e.normalize(`NFKD`).replace(/\p{M}/gu,``).toLowerCase();return t.length===1?t:e}).toLowerCase()}function NO(e){let t=/^"([^"]+)"$/.exec(e.trim())?.[1].trim();return t===void 0||t===``?null:t}function PO(e){let t=NO(e);return t===null?MO(e).replace(/^["'`]+|["'`]+$/g,``).split(/\s+/).filter(Boolean):[MO(t)]}function FO(e){return PO(e).some(e=>e.length>=3)}function IO(e,t){let n=e[t],r=e[t-1]??``,i=e[t+1]??``;return DO.test(n)&&(r===``||!DO.test(r)||OO.test(r)&&kO.test(n)||kO.test(r)&&kO.test(n)&&OO.test(i)||AO.test(r)!==AO.test(n))}function LO(e,t){return t>=e.length||!DO.test(e[t])||IO(e,t)}function RO(e,t){let n=t+1;for(;n<e.length&&DO.test(e[n])&&!IO(e,n);)n+=1;return n}function zO(e){return Array.from({length:e.length},(e,t)=>t).filter(t=>IO(e,t))}function BO(e,t,n){let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];)r+=1;let i=e.slice(r),a=t.slice(r),o=i.length>1&&i[0]===a[1]&&i[1]===a[0]&&i.slice(2)===a.slice(2);return n?o:o||i===a||i.slice(1)===a.slice(1)||i.slice(1)===a||i===a.slice(1)}function VO(e,t,n){for(let r of zO(e)){if(t[r]!==n[0])continue;let i=[],a=r,o=n;for(;o!==``&&a<t.length;){let n=RO(e,a);if(o.length<=n-a&&t.startsWith(o,a))i.push({start:a,end:a+o.length}),o=``;else if(o.startsWith(t.slice(a,n)))for(i.push({start:a,end:n}),o=o.slice(n-a),a=n;a<t.length&&!IO(e,a);)a+=1;else break}if(o===``&&i.length>1)return{score:bO,start:r,end:i[i.length-1].end,pieces:i}}return null}function HO(e,t,n){if(n.length<3||!jO.test(n))return null;let r=n.length<=TO;for(let i of zO(e)){if(!(t[i]===n[0]||!r&&t[i]===n[1]&&t[i+1]===n[0]))continue;let e=i+1;for(;e<t.length&&DO.test(t[e]);)e+=1;let a=r?[n.length,n.length+1]:[n.length,n.length-1,n.length+1];for(let o of a)if(!(o>e-i)&&BO(n,t.slice(i,i+o),r&&o===n.length)){let e={start:i,end:i+o};return{score:xO,...e,pieces:[e]}}}return null}function UO(e,t,n){let r=e.source,i=e.folded,a=null;for(let n=i.indexOf(t);n!==-1;n=i.indexOf(t,n+1)){let i={start:n,end:n+t.length};if(IO(r,n)){let e=LO(r,i.end)?1:yO;if((a===null||e>a.score)&&(a={score:e,...i,pieces:[i]}),e===1)return a}else e.midWord&&t.length>=TO&&a===null&&(a={score:SO,...i,pieces:[i]})}if(a!==null&&a.score>SO)return a;let o=n.primary?VO(r,i,t):null;return o===null?n.typos?HO(r,i,t)??a:a:o}function WO(e){let t=[];for(let n of[...e].sort((e,t)=>e.start-t.start)){let e=t.at(-1);e!==void 0&&n.start<=e.end?e.end=Math.max(e.end,n.end):t.push({...n})}return t}function GO(e,t){let n=[];for(let r=e.indexOf(t);r!==-1;r=e.indexOf(t,r+1)){let i=r+t.length,a=DO.test(t[0])&&DO.test(e[r-1]??``),o=DO.test(t[t.length-1])&&DO.test(e[i]??``);!a&&!o&&n.push({start:r,end:i})}return WO(n)}function KO(e,t){let n=GO(e.folded,t);return n.length===0?null:{score:1,...n[0],pieces:n}}function qO(e,t,n){let r=PO(e);if(r.length===0)return null;let i=NO(e)!==null,a=t.filter(e=>e.value!==``).map(e=>({...e,source:e.value,folded:MO(e.value)})),o=r.some(e=>!EO.has(e)),s=[],c=0,l=0,u=!0;for(let e of r){let t=0,r=!1;for(let[o,c]of a.entries()){let a=i?KO(c,e):UO(c,e,{primary:o===0,typos:n});a!==null&&(o===0&&s.push(...a.pieces),a.score>=yO&&c.weight>wO&&(r=!0),t=Math.max(t,a.score*c.weight))}if(t===0){if(o&&EO.has(e))continue;return null}u&&=r,c+=t,l+=1}let d=a.at(0)?.folded??``,f=r.join(` `),p=d===f?vO:r.length>1&&d.includes(f)?CO:0;return{quality:c/l+p,strong:u,ranges:WO(s)}}function JO(e,t){let n=MO(t);return NO(e)===null?WO(PO(e).filter(e=>e.length>=3).flatMap(e=>{let t=[];for(let r=n.indexOf(e);r!==-1;r=n.indexOf(e,r+e.length))t.push({start:r,end:r+e.length});return t})):GO(n,PO(e)[0])}var YO=.6,XO=.25,ZO=.6,QO=8,$O=3,ek=18144e5,tk=32,nk=12096e5,rk=2.5;function ik(e){return 2**(-Math.max(0,e)/nk)}function ak(e,t){let n=ik(t-e.updatedAt),r=e.opens===null?0:e.opens.score*ik(t-e.opens.openedAt);return Math.min(rk,1+n+.5*Math.log2(1+r))}function ok(e){return PO(e).join(` `).slice(0,tk).trim()}function sk(e,t,n){let r=ok(t),i=(e.opens?.picks??[]).filter(e=>n-e.at<=ek&&(e.query===r||r.length>=$O&&e.query.startsWith(r)));return Math.max(0,...i.map(e=>e.at))}function ck(e,t,n){let r=qO(t,[{value:e.title,weight:1,midWord:!0},{value:e.branch??``,weight:ZO,midWord:!1},{value:e.projectName??``,weight:XO,midWord:!1},{value:e.machineName??``,weight:XO,midWord:!1}],n);if(r!==null)return r;let i=t.trim().toLowerCase();return i.length>=QO&&e.id.toLowerCase().includes(i)?{quality:YO,strong:!0,ranges:[]}:null}function lk(e){return e>=1.5?3:e>=.7?2:+(e>=.4)}function uk(e,t,n,r){function i(i){return e.flatMap(e=>{let a=t(e),o=ck(a,n,i);return o===null?[]:[{item:e,match:o,picked:sk(a,n,r),score:o.quality*ak(a,r)}]})}let a=i(!1);return[...a.some(e=>e.match.strong)?a:i(!0)].sort((e,t)=>lk(t.match.quality)-lk(e.match.quality)||t.picked-e.picked||t.score-e.score).map(e=>({item:e.item,ranges:e.match.ranges}))}function dk(e){return Math.max(e.updatedAt,e.opens?.openedAt??0)}function fk(e,t,n){return qO(e,[{value:t,weight:1,midWord:!0},{value:n,weight:ZO,midWord:!1}],!1)}function pk(e,t,n,r){return e.flatMap(e=>{let n=t(e);return n===void 0?[]:[{match:e,subject:n}]}).sort((e,t)=>mk(e.match,t.match)||sk(t.subject,n,r)-sk(e.subject,n,r)||ak(t.subject,r)-ak(e.subject,r)).map(e=>e.match)}function mk(e,t){return t.quality-e.quality||Number(t.author===`user`)-Number(e.author===`user`)}function hk(e,t,n){let i=O(e=>e.machines),[a,o]=(0,U.useState)([]),[s,c]=(0,U.useState)([]),l=i.filter(e=>e.status===`online`).map(e=>e.id).join(` `),u=i.filter(e=>n===`all`||e.id===n),d=u.filter(e=>e.status===`online`).map(e=>e.id).join(` `);(0,U.useEffect)(()=>{let e=!0;for(let t of z().machines.filter(e=>e.status===`online`))r(t.id,`sessions.searchable`,void 0).then(n=>{e&&o(e=>gk(e,{machine:t.id,sessions:n.sessions.map(e=>({...e,machine:t.id})),failed:_k(n.failed)}))}).catch(()=>{e&&o(e=>gk(e,{machine:t.id,sessions:[],failed:[t.name]}))});return()=>{e=!1}},[l]),(0,U.useEffect)(()=>{if(t.startsWith(`>`)||!FO(t))return;let e=!0;for(let n of z().machines.filter(e=>e.status===`online`))r(n.id,`sessions.searchMessages`,{query:t}).then(r=>{e&&c(e=>gk(e,{machine:n.id,query:t,matches:r.matches.map(e=>({...e,machine:n.id})),failed:_k(r.failed)}))}).catch(()=>{e&&c(e=>gk(e,{machine:n.id,query:t,matches:[],failed:[n.name]}))});return()=>{e=!1}},[t,l]);let f=s.filter(t=>d.split(` `).includes(t.machine)&&t.query===e);return{threadResults:a,reachable:d,messages:f.flatMap(e=>e.matches),searching:!e.startsWith(`>`)&&FO(e)&&u.some(e=>e.status===`online`&&!f.some(t=>t.machine===e.id)),failures:[...new Set([...u.filter(e=>e.status!==`online`).map(e=>e.name),...a.filter(e=>d.split(` `).includes(e.machine)).flatMap(e=>e.failed),...f.flatMap(e=>e.failed)])]}}function gk(e,t){return[...e.filter(e=>e.machine!==t.machine),t]}function _k(e){return e.map(e=>yn[e])}var vk=20,yk=12,bk=10;function xk(){let e=O(e=>e.paletteOpen);return(0,W.jsx)(Ur,{open:e,onOpenChange:l,children:(0,W.jsxs)(Ir,{showCloseButton:!1,className:`top-[20%] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-xl`,children:[(0,W.jsx)(Br,{className:`sr-only`,children:`Search threads`}),(0,W.jsx)(Sk,{})]})})}function Sk(){let e=O(e=>e.selection),t=O(e=>e.machines),n=O(e=>e.projects),[r,i]=(0,U.useState)(``),[a]=wr(r,300),[o,s]=(0,U.useState)(`all`),[c,u]=(0,U.useState)(null),[d]=(0,U.useState)(()=>Date.now()),f=(0,U.useRef)(null),p=(0,U.useRef)(null),m=r.startsWith(`>`),h=m?r.slice(1):r,g=hk(r,a,o),_=g.threadResults,v=g.reachable,y=t.find(e=>e.id===o),b=(0,U.useMemo)(()=>_.filter(e=>v.split(` `).includes(e.machine)).flatMap(e=>e.sessions).map(e=>({thread:e,subject:Ek(e,t,n)})),[_,v,t,n]),x=new Map(b.map(e=>[F(e.thread.machine,e.thread.id),e.subject])),S=(0,U.useMemo)(()=>h.trim()===``?[]:uk(b,e=>e.subject,h,d).slice(0,vk).map(e=>({item:e.item.thread,ranges:e.ranges})),[b,h,d]),C=(0,U.useMemo)(()=>[...b].sort((e,t)=>dk(t.subject)-dk(e.subject)).slice(0,yk).map(e=>({item:e.thread,ranges:[]})),[b]),w=h.trim()===``?C:S,T=[...e===null?[]:[{key:`new`,label:`New thread`,place:{machine:e.machine,projectId:e.projectId},detail:Ok(e.machine,e.projectId,n),run:()=>De({...e,sessionId:null})}],{key:`accounts`,label:`Manage accounts`,detail:``,place:null,run:()=>Ue(Et[z().settings.provider])},{key:`settings`,label:`Settings`,detail:`Theme, notifications, keyboard shortcuts`,place:null,run:()=>A(!0)}].flatMap(e=>{let t={...e,section:`Actions`,labelRanges:[],detailRanges:[],branch:``,updatedAt:null};if(h.trim()===``)return[t];let n=fk(h,e.label,e.detail);return n===null?[]:[{...t,labelRanges:n.ranges}]}),E=new Set(S.map(e=>F(e.item.machine,e.item.id))),D=m?[]:w.map(e=>{let t=e.item,r=h.trim()!==``&&t.branch!==null?` | ${t.branch}`:``;return{key:F(t.machine,t.id),section:h.trim()===``?`Recent`:`Threads`,label:t.title,labelRanges:e.ranges,detail:Dk(t,n),detailRanges:[],branch:r,updatedAt:t.updatedAt,place:{machine:t.machine,projectId:t.projectId},run:()=>De({machine:t.machine,projectId:t.projectId,sessionId:t.id},h.trim()===``?null:h)}}),k=m?[]:pk(g.messages.filter(e=>!E.has(F(e.machine,e.sessionId))),e=>x.get(F(e.machine,e.sessionId)),h,d).slice(0,bk).flatMap(e=>{let t=b.find(t=>t.thread.machine===e.machine&&t.thread.id===e.sessionId)?.thread;if(t===void 0)return[];let n=`${e.author===`user`?`You: `:``}${e.snippet}`;return[{key:`message:${F(e.machine,e.sessionId)}`,section:`In messages`,label:t.title,labelRanges:[],detail:n,detailRanges:JO(h,n),branch:``,updatedAt:t.updatedAt,place:{machine:t.machine,projectId:t.projectId},run:()=>De({machine:t.machine,projectId:t.projectId,sessionId:t.id},h)}]}),j=[...T,...D,...k],M=Math.min(Math.max(0,j.findIndex(e=>e.key===c)),j.length-1);(0,U.useLayoutEffect)(()=>{f.current?.querySelector(`[data-active="true"]`)?.scrollIntoView({block:`nearest`})},[M]);function N(e){l(!1),e.run()}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2 border-b pr-2.5`,children:[(0,W.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center gap-2 pl-4`,children:[(0,W.jsx)(V,{icon:nr,className:`text-muted-foreground size-4 shrink-0`}),(0,W.jsx)(`input`,{ref:p,value:r,onChange:e=>{i(e.target.value),u(null)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;j.length>0&&u(j[(M+t+j.length)%j.length].key)}e.key===`Enter`&&M>=0&&(e.preventDefault(),N(j[M]))},placeholder:`Search threads and actions…`,className:`placeholder:text-placeholder/75 h-11 w-full bg-transparent text-sm outline-none`})]}),t.length>1&&(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:`text-secondary-label hover:bg-accent data-[state=open]:bg-accent flex h-7 max-w-40 shrink-0 cursor-pointer items-center gap-1.5 rounded-[var(--control-radius)] px-1.5 text-xs`,children:[y!==void 0&&(0,W.jsx)(Yd,{icon:y.icon,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:y?.name??`All machines`}),(0,W.jsx)(V,{icon:br,className:`size-3 shrink-0`})]})}),(0,W.jsx)(on,{align:`end`,className:`w-56`,onCloseAutoFocus:e=>{e.preventDefault(),p.current?.focus()},children:(0,W.jsxs)(Xt,{value:o,onValueChange:e=>{s(e),u(null)},children:[(0,W.jsx)(xn,{value:`all`,children:`All machines`}),t.map(e=>(0,W.jsxs)(xn,{value:e.id,disabled:e.status!==`online`,children:[(0,W.jsx)(Yd,{icon:e.icon,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:Tk(e)})]},e.id))]})})]})]}),(0,W.jsxs)(`div`,{ref:f,className:`max-h-96 overflow-y-auto p-1`,children:[j.length===0&&!g.searching&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-3 py-6 text-center text-xs`,children:`Nothing matches.`}),j.map((e,n)=>(0,W.jsxs)(`div`,{children:[e.section!==j[n-1]?.section&&(0,W.jsx)(`p`,{className:`text-secondary-label px-2.5 pt-2 pb-1 text-xs`,children:e.section}),(0,W.jsxs)(`button`,{"data-active":n===M,className:B(`flex w-full cursor-pointer flex-col rounded-lg px-2.5 py-1.5 text-left`,n===M&&`bg-accent`),onMouseMove:()=>u(e.key),onClick:()=>N(e),children:[(0,W.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm`,children:[e.place!==null&&(0,W.jsx)(nc,{machine:e.place.machine,projectId:e.place.projectId,className:`size-3.5 shrink-0 grayscale`}),(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,W.jsx)(wk,{text:e.label,ranges:e.labelRanges})})]}),e.detail!==``&&(0,W.jsxs)(`span`,{className:`text-secondary-label flex min-w-0 items-center gap-1.5 text-xs`,children:[e.place!==null&&t.length>1&&(0,W.jsx)(Ck,{id:e.place.machine,machines:t}),(0,W.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,W.jsx)(wk,{text:e.detail,ranges:e.detailRanges}),(0,W.jsx)(`span`,{className:`text-muted-foreground/40`,children:e.branch})]}),e.updatedAt!==null&&(0,W.jsx)(`span`,{className:`ml-auto shrink-0 pl-2 tabular-nums`,children:tn(e.updatedAt)})]})]})]},e.key)),g.searching&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-2.5 py-2 text-xs`,children:`Searching messages…`})]}),g.failures.length>0&&(0,W.jsxs)(`p`,{className:`text-muted-foreground border-t px-4 py-2 text-xs`,children:[`Couldn't search `,g.failures.join(`, `)]})]})}function Ck(e){let t=e.machines.find(t=>t.id===e.id);return(0,W.jsx)(Yd,{icon:t?.icon??null,className:`size-3 shrink-0`})}function wk(e){return(0,W.jsxs)(W.Fragment,{children:[e.ranges.map((t,n)=>(0,W.jsxs)(U.Fragment,{children:[e.text.slice(e.ranges[n-1]?.end??0,t.start),(0,W.jsx)(`mark`,{className:`text-foreground bg-transparent font-medium`,children:e.text.slice(t.start,t.end)})]},t.start)),e.text.slice(e.ranges.at(-1)?.end??0)]})}function Tk(e){return e.status===`online`?e.name:e.status===`unpaired`?`${e.name} · needs pairing`:`${e.name} · offline`}function Ek(e,t,n){return{id:e.id,title:e.title,branch:e.branch,projectName:n.find(t=>t.machine===e.machine&&t.id===e.projectId)?.name??null,machineName:t.length>1?t.find(t=>t.id===e.machine)?.name??null:null,updatedAt:e.updatedAt,opens:e.opens}}function Dk(e,t){return`${e.status===`minimized`?`Minimized · `:``}${Ok(e.machine,e.projectId,t)}`}function Ok(e,t,n){return n.find(n=>n.machine===e&&n.id===t)?.name??``}function kk(e){let t=e.session,[n,r]=(0,U.useState)(!1),i=O(e=>e.generatingTitles.includes(F(t.machine,t.id))),a=e.context?Vn:ln,o=e.context?rr:an;return(0,W.jsxs)(W.Fragment,{children:[t.status!==`active`&&(0,W.jsxs)(a,{onSelect:()=>void ye(t.machine,t.id,{status:`active`}),children:[(0,W.jsx)(V,{icon:t.status===`pinned`?Yo:Zo}),t.status===`pinned`?`Unpin`:`Activate`]}),t.status!==`inactive`&&(0,W.jsxs)(a,{onSelect:e.onDeactivate,children:[(0,W.jsx)(V,{icon:hs}),`Done`]}),t.status!==`snoozed`&&(0,W.jsxs)(a,{onSelect:()=>void ye(t.machine,t.id,{status:`snoozed`}),children:[(0,W.jsx)(V,{icon:ys}),`Snooze`]}),t.status!==`minimized`&&(0,W.jsxs)(a,{onSelect:()=>void ye(t.machine,t.id,{status:`minimized`}),children:[(0,W.jsx)(V,{icon:Wo}),`Minimize`]}),t.status!==`pinned`&&(0,W.jsxs)(a,{onSelect:()=>void ye(t.machine,t.id,{status:`pinned`}),children:[(0,W.jsx)(V,{icon:Xo}),`Pin`]}),(0,W.jsx)(o,{}),(0,W.jsxs)(a,{disabled:i,onSelect:()=>void at(t),children:[(0,W.jsx)(V,{icon:Ka}),`Refresh title`]}),(0,W.jsxs)(a,{onSelect:e.onRename,children:[(0,W.jsx)(V,{icon:Jo}),`Rename`]}),(0,W.jsxs)(a,{onSelect:()=>d(t),children:[(0,W.jsx)(V,{icon:Gn}),`Export`]}),(0,W.jsxs)(a,{variant:`destructive`,title:`Also removes it from ${yn[t.provider]}`,onSelect:e=>{n?Xe(t.machine,t.id):(e.preventDefault(),r(!0))},children:[(0,W.jsx)(V,{icon:So}),n?e.mobile?`Tap again to delete`:`Click again to delete`:`Delete`]})]})}function Ak(e){return e.activity?.approval===!0&&e.activity?.question===!0?(0,W.jsx)(`span`,{title:`Waiting for approval and an answer`,className:`text-question flex`,children:(0,W.jsx)(V,{icon:ss,className:`size-4 shrink-0`})}):e.activity?.approval===!0?(0,W.jsx)(`span`,{title:`Waiting for approval`,className:`text-question flex`,children:(0,W.jsx)(V,{icon:is,className:`size-4 shrink-0`})}):e.activity?.question===!0?(0,W.jsx)(`span`,{title:`Waiting for an answer`,className:`text-question flex`,children:(0,W.jsx)(V,{icon:ao,className:`size-4 shrink-0`})}):e.activity?.running===!0?(0,W.jsx)(`span`,{title:`Working`,className:`text-info flex`,children:(0,W.jsx)(V,{icon:_o,className:`size-4 shrink-0 animate-spin`})}):e.backgroundRunning?e.activity?.backgroundAgent===!0?(0,W.jsx)(`span`,{title:`Agent running in background`,className:`text-info flex`,children:(0,W.jsx)(V,{icon:$n,className:`size-4 shrink-0 animate-spin`})}):(0,W.jsx)(`span`,{title:`Task running in background`,className:`text-muted-foreground flex`,children:(0,W.jsx)(V,{icon:$n,className:`size-4 shrink-0 animate-spin`})}):e.done?(0,W.jsx)(`span`,{title:`Done`,className:`text-success flex`,children:(0,W.jsx)(V,{icon:mo,className:`size-4 shrink-0`})}):null}function jk(e){let t=O(t=>t.generatingTitles.includes(F(e.session.machine,e.session.id)));return(0,W.jsx)(`span`,{className:B((t||e.awaitingTitle)&&`text-shimmer`),children:e.session.title})}var Mk=`group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`;function Nk(e){let t=e.session,n=Xs(t.machine,t.projectId),r=O(e=>R(e,t.machine).icon),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(!1),c=(0,U.useRef)(null),l=e.activity?.waiting===!0,u=Object.values(e.activity?.tasks??{}).includes(`running`),d=!l&&(e.activity?.running===!0||u),f=e.activity?.running===!0||u,p=!l&&!d&&e.unseen,m=!e.selected&&!l&&!p;function h(){Be(t.machine,t.id,e.scope)}function g(){f?s(!0):h()}let _=(0,W.jsx)(In,{open:o,onOpenChange:s,children:(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsx)(hr,{children:`Stop running work?`}),(0,W.jsx)(Ln,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:h,children:`Stop and Mark Done`})]})]})}),v=e.saved&&(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground inline-flex h-5 cursor-pointer items-center rounded-md px-1.5`,title:`Thread actions`,onClick:e=>e.stopPropagation(),children:(0,W.jsx)(V,{icon:wo,className:`size-3.5`})})}),(0,W.jsx)(on,{align:`end`,className:`w-44`,onClick:e=>e.stopPropagation(),onCloseAutoFocus:e=>{c.current!==null&&(e.preventDefault(),c.current.focus(),c.current.select())},children:(0,W.jsx)(kk,{session:t,context:!1,mobile:!1,onDeactivate:g,onRename:()=>a(t.title)})})]}),y=(0,W.jsx)(tr,{className:`w-44`,onCloseAutoFocus:e=>{c.current!==null&&(e.preventDefault(),c.current.focus(),c.current.select())},children:(0,W.jsx)(kk,{session:t,context:!0,mobile:!1,onDeactivate:g,onRename:()=>a(t.title)})}),b=i===null?(0,W.jsx)(`span`,{className:B(`min-w-0 flex-1 truncate text-sm`,m?`text-secondary-label font-normal`:`font-medium`,!m&&(e.unseen||l)&&`text-foreground`,!m&&!e.unseen&&!l&&`text-foreground/90`),children:(0,W.jsx)(jk,{session:t,awaitingTitle:!e.saved})}):(0,W.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let n=i.trim();a(null),n!==``&&n!==t.title&&ye(t.machine,t.id,{title:n})},children:(0,W.jsx)(`input`,{ref:c,value:i,onChange:e=>a(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>a(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&a(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),x=B(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,m&&`text-sidebar-muted-foreground/75 hover:bg-sidebar-row-hover hover:text-sidebar-foreground has-[[data-state=open]]:bg-sidebar-row-hover has-[[data-state=open]]:text-sidebar-foreground`,!e.selected&&!m&&`text-sidebar-foreground hover:bg-sidebar-row-hover has-[[data-state=open]]:bg-sidebar-row-hover bg-transparent`);return e.slim?(0,W.jsxs)(`li`,{className:`list-none`,children:[(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:B(Mk,x,`flex h-9 items-center gap-2.5 px-2.5`),onClick:e.onSelect,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[(0,W.jsx)(`span`,{className:`flex shrink-0 items-center opacity-40 grayscale transition-opacity group-hover/sidebar-row:opacity-100 group-hover/sidebar-row:grayscale-0 group-has-[[data-state=open]]/sidebar-row:opacity-100 group-has-[[data-state=open]]/sidebar-row:grayscale-0`,children:(0,W.jsx)(nc,{machine:t.machine,projectId:t.projectId})}),(0,W.jsx)(`span`,{className:`group-any-hover/sidebar-row:mask-r-from-[calc(100%-2rem)] group-any-hover/sidebar-row:mask-r-to-[calc(100%-0.5rem)] flex min-w-0 flex-1 group-has-[[data-state=open]]/sidebar-row:mask-r-from-[calc(100%-2rem)] group-has-[[data-state=open]]/sidebar-row:mask-r-to-[calc(100%-0.5rem)]`,children:b}),(0,W.jsxs)(`span`,{className:`relative ml-auto flex h-6 min-w-8 shrink-0 items-center justify-end`,children:[(0,W.jsx)(`span`,{className:`text-secondary-label group-any-hover/sidebar-row:opacity-0 inline-flex justify-end text-xs tabular-nums transition-opacity group-has-[[data-state=open]]/sidebar-row:opacity-0`,children:tn(t.updatedAt)}),(0,W.jsxs)(`span`,{className:`group-any-hover/sidebar-row:opacity-100 absolute inset-y-0 right-0 -mr-1 flex items-center opacity-0 transition-opacity has-[[data-state=open]]:opacity-100`,children:[v,e.saved&&(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground inline-flex h-5 cursor-pointer items-center rounded-md px-1.5`,title:`Activate`,"aria-label":`Activate`,onClick:e=>{e.stopPropagation(),ye(t.machine,t.id,{status:`active`})},children:(0,W.jsx)(V,{icon:Zo,className:`size-3.5`})})]})]})]})}),y]}),_]}):(0,W.jsxs)(`li`,{className:`list-none py-0.5`,children:[(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:B(Mk,x,d&&!e.selected&&`opacity-70 transition-opacity focus-within:opacity-100 hover:opacity-100`),onClick:e.onSelect,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[(0,W.jsxs)(`div`,{className:`group-any-hover/sidebar-row:mask-r-from-[calc(100%-4.5rem)] group-any-hover/sidebar-row:mask-r-to-[calc(100%-2.5rem)] px-(--sidebar-row-content-inset) py-(--sidebar-content-inset) group-has-[[data-state=open]]/sidebar-row:mask-r-from-[calc(100%-4.5rem)] group-has-[[data-state=open]]/sidebar-row:mask-r-to-[calc(100%-2.5rem)]`,children:[(0,W.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,W.jsx)(nc,{machine:t.machine,projectId:t.projectId,className:`size-5`}),b,(0,W.jsx)(Ak,{activity:e.activity,backgroundRunning:u,done:p})]}),(0,W.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,W.jsx)(Yd,{icon:r,className:`size-3 shrink-0`}),(0,W.jsxs)(`span`,{className:B(`min-w-0 flex-1 truncate`,m?`font-normal`:`font-medium`),children:[n,t.branch!==null&&(0,W.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | ${t.branch}`})]}),t.status===`pinned`&&(0,W.jsx)(V,{icon:Xo,className:`size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ys,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:tn(t.updatedAt)})]})]}),e.saved&&(0,W.jsxs)(`div`,{className:`group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100 pointer-events-none absolute inset-y-0 right-0 flex flex-col items-end py-(--sidebar-content-inset) pr-1.5 opacity-0 transition-opacity has-[[data-state=open]]:pointer-events-auto has-[[data-state=open]]:opacity-100`,children:[(0,W.jsx)(`div`,{className:`flex h-6 items-center`,children:(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground me-0.75 inline-flex size-5 cursor-pointer items-center justify-center transition-colors`,title:`Done`,"aria-label":`Done`,onClick:e=>{e.stopPropagation(),g()},children:(0,W.jsx)(V,{icon:hs,strokeWidth:1.25,className:`size-5 scale-110`})})}),(0,W.jsx)(`div`,{className:`mt-1 flex h-5 items-center`,children:v})]})]})}),y]}),_]})}function Pk(e){let t=Xs(e.machine,e.projectId),n=O(t=>R(t,e.machine).icon);return(0,W.jsx)(`li`,{className:`list-none py-0.5`,children:(0,W.jsx)(`div`,{role:`button`,tabIndex:0,className:B(Mk,`bg-sidebar-row-active text-sidebar-foreground`),onClick:e.onSelect,children:(0,W.jsxs)(`div`,{className:`px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)`,children:[(0,W.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,W.jsx)(nc,{machine:e.machine,projectId:e.projectId,className:`size-5`}),(0,W.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,W.jsx)(V,{icon:ls,className:`text-warning-foreground size-4 shrink-0`})]}),(0,W.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,W.jsx)(Yd,{icon:n,className:`size-3 shrink-0`}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:[t,(0,W.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | Draft`})]}),(0,W.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:`now`})]})]})})})}var Fk=`/assets/ghostty-vt-CQAu1Gs5.wasm`,Ik=Uint8Array,Lk=Uint16Array,Rk=Int32Array,zk=new Ik([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bk=new Ik([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Vk=new Ik([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hk=function(e,t){for(var n=new Lk(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new Rk(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},Uk=Hk(zk,2),Wk=Uk.b,Gk=Uk.r;Wk[28]=258,Gk[258]=28;var Kk=Hk(Bk,0),qk=Kk.b;Kk.r;for(var Jk=new Lk(32768),Yk=0;Yk<32768;++Yk){var Xk=(Yk&43690)>>1|(Yk&21845)<<1;Xk=(Xk&52428)>>2|(Xk&13107)<<2,Xk=(Xk&61680)>>4|(Xk&3855)<<4,Jk[Yk]=((Xk&65280)>>8|(Xk&255)<<8)>>1}for(var Zk=(function(e,t,n){for(var r=e.length,i=0,a=new Lk(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new Lk(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new Lk(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[Jk[d]>>c]=l}else for(s=new Lk(r),i=0;i<r;++i)e[i]&&(s[i]=Jk[o[e[i]-1]++]>>15-e[i]);return s}),Qk=new Ik(288),Yk=0;Yk<144;++Yk)Qk[Yk]=8;for(var Yk=144;Yk<256;++Yk)Qk[Yk]=9;for(var Yk=256;Yk<280;++Yk)Qk[Yk]=7;for(var Yk=280;Yk<288;++Yk)Qk[Yk]=8;for(var $k=new Ik(32),Yk=0;Yk<32;++Yk)$k[Yk]=5;var eA=Zk(Qk,9,1),tA=Zk($k,5,1),nA=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},rA=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},iA=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},aA=function(e){return(e+7)/8|0},oA=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Ik(e.subarray(t,n))},sA=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],cA=function(e,t,n){var r=Error(t||sA[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,cA),!n)throw r;return r},lA=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new Ik(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new Ik(i*3));var l=function(e){var t=n.length;if(e>t){var r=new Ik(Math.max(t*2,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=i*8;do{if(!p){u=rA(e,d,1);var v=rA(e,d+1,3);if(d+=3,!v){var y=aA(d)+4,b=e[y-4]|e[y-3]<<8,x=y+b;if(x>i){c&&cA(0);break}s&&l(f+b),n.set(e.subarray(y,x),f),t.b=f+=b,t.p=d=x*8,t.f=u;continue}if(v==1)p=eA,m=tA,h=9,g=5;else if(v==2){var S=rA(e,d,31)+257,C=rA(e,d+10,15)+4,w=S+rA(e,d+5,31)+1;d+=14;for(var T=new Ik(w),E=new Ik(19),D=0;D<C;++D)E[Vk[D]]=rA(e,d+D*3,7);d+=C*3;for(var O=nA(E),k=(1<<O)-1,A=Zk(E,O,1),D=0;D<w;){var j=A[rA(e,d,k)];d+=j&15;var y=j>>4;if(y<16)T[D++]=y;else{var M=0,N=0;for(y==16?(N=3+rA(e,d,3),d+=2,M=T[D-1]):y==17?(N=3+rA(e,d,7),d+=3):y==18&&(N=11+rA(e,d,127),d+=7);N--;)T[D++]=M}}var ee=T.subarray(0,S),te=T.subarray(S);h=nA(ee),g=nA(te),p=Zk(ee,h,1),m=Zk(te,g,1)}else cA(1);if(d>_){c&&cA(0);break}}s&&l(f+131072);for(var ne=(1<<h)-1,P=(1<<g)-1,re=d;;re=d){var M=p[iA(e,d)&ne],ie=M>>4;if(d+=M&15,d>_){c&&cA(0);break}if(M||cA(2),ie<256)n[f++]=ie;else if(ie==256){re=d,p=null;break}else{var ae=ie-254;if(ie>264){var D=ie-257,oe=zk[D];ae=rA(e,d,(1<<oe)-1)+Wk[D],d+=oe}var se=m[iA(e,d)&P],ce=se>>4;se||cA(3),d+=se&15;var te=qk[ce];if(ce>3){var oe=Bk[ce];te+=iA(e,d)&(1<<oe)-1,d+=oe}if(d>_){c&&cA(0);break}s&&l(f+131072);var le=f+ae;if(f<te){var ue=a-te,F=Math.min(te,le);for(ue+f<0&&cA(3);f<F;++f)n[f]=r[ue+f]}for(;f<le;++f)n[f]=n[f-te]}}t.l=p,t.p=re,t.b=f,t.f=u,p&&(u=1,t.m=h,t.d=m,t.n=g)}while(!u);return f!=n.length&&o?oA(n,0,f):n.subarray(0,f)},uA=new Ik(0),dA=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&cA(6,`invalid zlib data`),(e[1]>>5&1)==+!t&&cA(6,`invalid zlib data: `+(e[1]&32?`need`:`unexpected`)+` dictionary`),(e[1]>>3&4)+2},fA=function(){function e(e,t){typeof e==`function`&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new Ik(32768),this.p=new Ik(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||cA(5),this.d&&cA(4),!this.p.length)this.p=e;else if(e.length){var t=new Ik(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=lA(this.p,this.s,this.o);this.ondata(oA(n,t,this.s.b),this.d),this.o=oA(n,this.s.b-32768),this.s.b=this.o.length,this.p=oA(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),pA=function(){function e(e,t){fA.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(fA.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(dA(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&cA(6,`invalid zlib data`),this.p=this.p.subarray(0,-4)),fA.prototype.c.call(this,t)},e}();function mA(e,t){return lA(e.subarray(dA(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}var hA=typeof TextDecoder<`u`&&new TextDecoder;try{hA.decode(uA,{stream:!0})}catch{}function gA(e,t=`utf8`){return new TextDecoder(t).decode(e)}var _A=new TextEncoder;function vA(e){return _A.encode(e)}var yA=8192,bA=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),xA={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},SA=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=yA,n={}){let r=!1;typeof t==`number`?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);let i=n.offset?n.offset>>>0:0,a=t.byteLength-i,o=i;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),this.lastWrittenByte=r?a:0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let e=this._marks.pop();if(e===void 0)throw Error(`Mark stack empty`);return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){let t=(this.offset+e)*2,n=new Uint8Array(t);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,`uint8`)}readArray(e,t){let n=xA[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===bA&&t!==`uint8`&&t!==`int8`){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new xA[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new xA[t](i);return this.offset+=n,a}readInt16(){let e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){let e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){let e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){let e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){let e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){let e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){let e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){let e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t=``;for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return gA(this.readBytes(e))}decodeText(e=1,t=`utf8`){return gA(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(vA(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}},CA=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t>>>=1;CA[e]=t}var wA=4294967295;function TA(e,t,n){let r=e;for(let e=0;e<n;e++)r=CA[(r^t[e])&255]^r>>>8;return r}function EA(e,t){return(TA(wA,e,t)^wA)>>>0}function DA(e,t,n){let r=e.readUint32(),i=EA(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==r)throw Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function OA(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function kA(e,t,n,r){let i=0;for(;i<r;i++)t[i]=e[i];for(;i<n;i++)t[i]=e[i]+t[i-r]&255}function AA(e,t,n,r){let i=0;if(n.length===0)for(;i<r;i++)t[i]=e[i];else for(;i<r;i++)t[i]=e[i]+n[i]&255}function jA(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+(t[a-i]>>1)&255}else{for(;a<i;a++)t[a]=e[a]+(n[a]>>1)&255;for(;a<r;a++)t[a]=e[a]+(t[a-i]+n[a]>>1)&255}}function MA(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+t[a-i]&255}else{for(;a<i;a++)t[a]=e[a]+n[a]&255;for(;a<r;a++)t[a]=e[a]+NA(t[a-i],n[a],n[a-i])&255}}function NA(e,t,n){let r=e+t-n,i=Math.abs(r-e),a=Math.abs(r-t),o=Math.abs(r-n);return i<=a&&i<=o?e:a<=o?t:n}function PA(e,t,n,r,i,a){switch(e){case 0:OA(t,n,i);break;case 1:kA(t,n,i,a);break;case 2:AA(t,n,r,i);break;case 3:jA(t,n,r,i,a);break;case 4:MA(t,n,r,i,a);break;default:throw Error(`Unsupported filter: ${e}`)}}var FA=new Uint16Array([255]),IA=new Uint8Array(FA.buffer)[0]===255;function LA(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(a/8)*i,c=new Uint8Array(r*n*s),l=0;for(let e=0;e<7;e++){let i=o[e],a=Math.ceil((n-i.x)/i.xStep),u=Math.ceil((r-i.y)/i.yStep);if(a<=0||u<=0)continue;let d=a*s,f=new Uint8Array(d);for(let e=0;e<u;e++){let o=t[l++],u=t.subarray(l,l+d);l+=d;let p=new Uint8Array(d);PA(o,u,p,f,d,s),f.set(p);for(let t=0;t<a;t++){let a=i.x+t*i.xStep,o=i.y+e*i.yStep;if(!(a>=n||o>=r))for(let e=0;e<s;e++)c[(o*n+a)*s+e]=p[t*s+e]}}}if(a===16){let e=new Uint16Array(c.buffer);if(IA)for(let t=0;t<e.length;t++)e[t]=RA(e[t]);return e}return c}function RA(e){return(e&255)<<8|e>>8&255}var zA=new Uint16Array([255]),BA=new Uint8Array(zA.buffer)[0]===255,VA=new Uint8Array;function HA(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=Math.ceil(a/8)*i,s=Math.ceil(a/8*i*n),c=new Uint8Array(r*s),l=VA,u=0,d,f;for(let e=0;e<r;e++){switch(d=t.subarray(u+1,u+1+s),f=c.subarray(e*s,(e+1)*s),t[u]){case 0:OA(d,f,s);break;case 1:kA(d,f,s,o);break;case 2:AA(d,f,l,s);break;case 3:jA(d,f,l,s,o);break;case 4:MA(d,f,l,s,o);break;default:throw Error(`Unsupported filter: ${t[u]}`)}l=f,u+=s+1}if(a===16){let e=new Uint16Array(c.buffer);if(BA)for(let t=0;t<e.length;t++)e[t]=UA(e[t]);return e}return c}function UA(e){return(e&255)<<8|e>>8&255}var WA=Uint8Array.of(137,80,78,71,13,10,26,10);function GA(e){if(!KA(e.readBytes(WA.length)))throw Error(`wrong PNG signature`)}function KA(e){if(e.length<WA.length)return!1;for(let t=0;t<WA.length;t++)if(e[t]!==WA[t])return!1;return!0}var qA=`tEXt`,JA=0,YA=new TextDecoder(`latin1`);function XA(e){if(QA(e),e.length===0||e.length>79)throw Error(`keyword length must be between 1 and 79`)}var ZA=/^[\u0000-\u00FF]*$/;function QA(e){if(!ZA.test(e))throw Error(`invalid latin1 text`)}function $A(e,t,n){let r=ej(t);e[r]=tj(t,n-r.length-1)}function ej(e){for(e.mark();e.readByte()!==JA;);let t=e.offset;e.reset();let n=YA.decode(e.readBytes(t-e.offset-1));return e.skip(1),XA(n),n}function tj(e,t){return YA.decode(e.readBytes(t))}var nj={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},rj={UNKNOWN:-1,DEFLATE:0},ij={UNKNOWN:-1,ADAPTIVE:0},aj={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},oj={NONE:0,BACKGROUND:1,PREVIOUS:2},sj={SOURCE:0,OVER:1},cj=class extends SA{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;_chunks;_inflatorResult;constructor(e,t={}){super(e);let{checkCrc:n=!1}=t;this._checkCrc=n,this._inflator=new pA((e,t)=>{if(this._chunks.push(e),t){let e=this._chunks.reduce((e,t)=>e+t.length,0);this._inflatorResult=new Uint8Array(e);let t=0;for(let e of this._chunks)this._inflatorResult.set(e,t),t+=e.length;this._chunks=[]}}),this._chunks=[],this._png={width:-1,height:-1,channels:-1,data:new Uint8Array,depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array,this._compressionMethod=rj.UNKNOWN,this._filterMethod=ij.UNKNOWN,this._interlaceMethod=aj.UNKNOWN,this._colorType=nj.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this._inflatorResult=new Uint8Array,this.setBigEndian()}decode(){for(GA(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this._inflator.push(new Uint8Array,!0),this.decodeImage(),this._png}decodeApng(){for(GA(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){let n=this.offset;switch(t){case`IHDR`:this.decodeIHDR();break;case`PLTE`:this.decodePLTE(e);break;case`IDAT`:this.decodeIDAT(e);break;case`IEND`:this._end=!0;break;case`tRNS`:this.decodetRNS(e);break;case`iCCP`:this.decodeiCCP(e);break;case qA:$A(this._png.text,this,e);break;case`pHYs`:this.decodepHYs();break;default:this.skip(e)}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?DA(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){let n=this.offset;switch(t!==`fdAT`&&t!==`IDAT`&&this._writingDataChunks&&this.pushDataToFrame(),t){case`acTL`:this.decodeACTL();break;case`fcTL`:this.decodeFCTL();break;case`fdAT`:this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=n+e}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?DA(this,e+4,t):this.skip(4)}decodeIHDR(){let e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=lj(this.readUint8());let t=this.readUint8();this._colorType=t;let n;switch(t){case nj.GREYSCALE:n=1;break;case nj.TRUECOLOUR:n=3;break;case nj.INDEXED_COLOUR:n=1;break;case nj.GREYSCALE_ALPHA:n=2;break;case nj.TRUECOLOUR_ALPHA:n=4;break;case nj.UNKNOWN:default:throw Error(`Unknown color type: ${t}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==rj.DEFLATE)throw Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array};this._frames.push(e)}decodePLTE(e){if(e%3!=0)throw RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);let t=e/3;this._hasPalette=!0;let n=[];this._palette=n;for(let e=0;e<t;e++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;try{this._inflator.push(new Uint8Array(this.buffer,n,t),!1)}catch(e){throw Error(`Error while decompressing the data:`,{cause:e})}this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;n+=4,t-=4;try{this._inflator.push(new Uint8Array(this.buffer,n,t),!1)}catch(e){throw Error(`Error while decompressing the data:`,{cause:e})}this.skip(e)}decodetRNS(e){switch(this._colorType){case nj.GREYSCALE:case nj.TRUECOLOUR:if(e%2!=0)throw RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break;case nj.INDEXED_COLOUR:{if(e>this._palette.length)throw Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){let e=this.readByte();this._palette[t].push(e)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}case nj.UNKNOWN:case nj.GREYSCALE_ALPHA:case nj.TRUECOLOUR_ALPHA:default:throw Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){let t=ej(this),n=this.readUint8();if(n!==rj.DEFLATE)throw Error(`Unsupported iCCP compression method: ${n}`);let r=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:mA(r)}}decodepHYs(){let e=this.readUint32(),t=this.readUint32(),n=this.readByte();this._png.resolution={x:e,y:t,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){let t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(e);if(n){if(n.data=HA({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)t.data=n.data;else{let r=this._apng.frames.at(e-1);this.disposeFrame(n,r,t),this.addFrameDataToCanvas(t,n)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,n){switch(e.disposeOp){case oj.NONE:break;case oj.BACKGROUND:for(let t=0;t<this._png.height;t++)for(let r=0;r<this._png.width;r++){let i=(t*e.width+r)*this._png.channels;for(let e=0;e<this._png.channels;e++)n.data[i+e]=0}break;case oj.PREVIOUS:n.data.set(t.data);break;default:throw Error(`Unknown disposeOp`)}}addFrameDataToCanvas(e,t){let n=1<<this._png.depth,r=(e,n)=>({index:((e+t.yOffset)*this._png.width+t.xOffset+n)*this._png.channels,frameIndex:(e*t.width+n)*this._png.channels});switch(t.blendOp){case sj.SOURCE:for(let n=0;n<t.height;n++)for(let i=0;i<t.width;i++){let{index:a,frameIndex:o}=r(n,i);for(let n=0;n<this._png.channels;n++)e.data[a+n]=t.data[o+n]}break;case sj.OVER:for(let i=0;i<t.height;i++)for(let a=0;a<t.width;a++){let{index:o,frameIndex:s}=r(i,a);for(let r=0;r<this._png.channels;r++){let i=t.data[s+this._png.channels-1]/n,a=r%(this._png.channels-1)==0?1:t.data[s+r],c=Math.floor(i*a+(1-i)*e.data[o+r]);e.data[o+r]+=c}}break;default:throw Error(`Unknown blendOp`)}}decodeImage(){let e=this._inflatorResult;if(this._filterMethod!==ij.ADAPTIVE)throw Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===aj.NO_INTERLACE)this._png.data=HA({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===aj.ADAM7)this._png.data=LA({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){this._inflator.push(new Uint8Array,!0);let e=this._inflatorResult,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:oj.NONE,blendOp:sj.SOURCE,data:e}),this._inflator=new pA((e,t)=>{if(this._chunks.push(e),t){let e=this._chunks.reduce((e,t)=>e+t.length,0);this._inflatorResult=new Uint8Array(e);let t=0;for(let e of this._chunks)this._inflatorResult.set(e,t),t+=e.length;this._chunks=[]}}),this._chunks=[],this._writingDataChunks=!1}};function lj(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw Error(`invalid bit depth: ${e}`);return e}function uj(e){let t=e.palette,n=e.depth;if(!t)throw Error(`Color palette is undefined.`);dj(e);let r=e.width*e.height,i=r*t[0].length,a=new Uint8Array(i),o=0,s=0,c=new Uint8Array(r),l=255;switch(n){case 1:l=128;break;case 2:l=192;break;case 4:l=240;break;case 8:l=255;break;default:throw Error(`Incorrect depth value`)}for(let t of e.data){let r=l,i=8;for(;r&&(i-=n,c[o++]=(t&r)>>i,r>>=n,o%e.width!==0););}if(e.palette)for(let t of c){let n=e.palette.at(t);if(!n)throw Error(`Incorrect index of palette color`);a.set(n,s),s+=n.length}return a}function dj(e){let t=e.depth<8?Math.ceil(e.width*e.depth/8)*e.height*e.channels:e.width*e.height*e.channels;if(e.data.length!==t)throw RangeError(`wrong data size. Found ${e.data.length}, expected ${t}`)}function fj(e,t){return new cj(e,t).decode()}var pj=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FOREGROUND=e.DEFAULT_BACKGROUND=e.PALETTE_ANSI_256=e.PALETTE_VT340_GREY=e.PALETTE_VT340_COLOR=e.normalizeHLS=e.normalizeRGB=e.nearestColorIndex=e.fromRGBA8888=e.toRGBA8888=e.alpha=e.blue=e.green=e.red=e.BIG_ENDIAN=void 0,e.BIG_ENDIAN=new Uint8Array(new Uint32Array([4278190080]).buffer)[0]===255,e.BIG_ENDIAN&&console.warn(`BE platform detected. This version of node-sixel works only on LE properly.`);function t(e){return e&255}e.red=t;function n(e){return e>>>8&255}e.green=n;function r(e){return e>>>16&255}e.blue=r;function i(e){return e>>>24&255}e.alpha=i;function a(e,t,n,r=255){return((r&255)<<24|(n&255)<<16|(t&255)<<8|e&255)>>>0}e.toRGBA8888=a;function o(e){return[e&255,e>>8&255,e>>16&255,e>>>24]}e.fromRGBA8888=o;function s(e,i){let a=t(e),o=n(e),s=r(e),c=2**53-1,l=-1;for(let e=0;e<i.length;++e){let t=a-i[e][0],n=o-i[e][1],r=s-i[e][2],u=t*t+n*n+r*r;if(!u)return e;u<c&&(c=u,l=e)}return l}e.nearestColorIndex=s;function c(e,t,n){return Math.max(e,Math.min(n,t))}function l(e,t,n){return n<0&&(n+=1),n>1&&--n,n*6<1?t+(e-t)*6*n:n*2<1?e:n*3<2?t+(e-t)*(4-n*6):t}function u(e,t,n){if(!n){let e=Math.round(t*255);return a(e,e,e)}let r=t<.5?t*(1+n):t+n-t*n,i=2*t-r;return a(c(0,255,Math.round(l(r,i,e+1/3)*255)),c(0,255,Math.round(l(r,i,e)*255)),c(0,255,Math.round(l(r,i,e-1/3)*255)))}function d(e,t,n){return(4278190080|Math.round(n/100*255)<<16|Math.round(t/100*255)<<8|Math.round(e/100*255))>>>0}e.normalizeRGB=d;function f(e,t,n){return u((e+240)/360,t/100,n/100)}e.normalizeHLS=f,e.PALETTE_VT340_COLOR=new Uint32Array([d(0,0,0),d(20,20,80),d(80,13,13),d(20,80,20),d(80,20,80),d(20,80,80),d(80,80,20),d(53,53,53),d(26,26,26),d(33,33,60),d(60,26,26),d(33,60,33),d(60,33,60),d(33,60,60),d(60,60,33),d(80,80,80)]),e.PALETTE_VT340_GREY=new Uint32Array([d(0,0,0),d(13,13,13),d(26,26,26),d(40,40,40),d(6,6,6),d(20,20,20),d(33,33,33),d(46,46,46),d(0,0,0),d(13,13,13),d(26,26,26),d(40,40,40),d(6,6,6),d(20,20,20),d(33,33,33),d(46,46,46)]),e.PALETTE_ANSI_256=(()=>{let e=[a(0,0,0),a(205,0,0),a(0,205,0),a(205,205,0),a(0,0,238),a(205,0,205),a(0,250,205),a(229,229,229),a(127,127,127),a(255,0,0),a(0,255,0),a(255,255,0),a(92,92,255),a(255,0,255),a(0,255,255),a(255,255,255)],t=[0,95,135,175,215,255];for(let n=0;n<6;++n)for(let r=0;r<6;++r)for(let i=0;i<6;++i)e.push(a(t[n],t[r],t[i]));for(let t=8;t<=238;t+=10)e.push(a(t,t,t));return new Uint32Array(e)})(),e.DEFAULT_BACKGROUND=a(0,0,0,255),e.DEFAULT_FOREGROUND=a(255,255,255,255)})),mj=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LIMITS=void 0,e.LIMITS={CHUNK_SIZE:16384,PALETTE_SIZE:4096,MAX_WIDTH:16384,BYTES:`AGFzbQEAAAABJAdgAAF/YAJ/fwBgA39/fwF/YAF/AX9gAABgBH9/f38AYAF/AAIlAgNlbnYLaGFuZGxlX2JhbmQAAwNlbnYLbW9kZV9wYXJzZWQAAwMTEgQAAAAAAQQBAQUBAAACAgAGAwQFAXABBwcFBAEBBwcGCAF/AUGAihoLB9wBDgZtZW1vcnkCABFnZXRfc3RhdGVfYWRkcmVzcwADEWdldF9jaHVua19hZGRyZXNzAAQOZ2V0X3AwX2FkZHJlc3MABRNnZXRfcGFsZXR0ZV9hZGRyZXNzAAYEaW5pdAALBmRlY29kZQAMDWN1cnJlbnRfd2lkdGgADQ5jdXJyZW50X2hlaWdodAAOGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtfaW5pdGlhbGl6ZQACCXN0YWNrU2F2ZQARDHN0YWNrUmVzdG9yZQASCnN0YWNrQWxsb2MAEwkMAQBBAQsGCgcJDxACDAEBCq5UEgMAAQsFAEGgCAsGAEGQiQELBgBBsIkCCwUAQZAJC+okAQh/QeQIKAIAIQVB4AgoAgAhA0HoCCgCACEIIAFBkIkBaiIJQf8BOgAAIAAgAUgEQCAAQZCJAWohBgNAIAMhBCAGQQFqIQECQCAGLQAAQf8AcSIDQTBrQQlLBEAgASEGDAELQewIKAIAQQJ0QewIaiICKAIAIQADQCACIAMgAEEKbGpBMGsiADYCACABLQAAIQMgAUEBaiIGIQEgA0H/AHEiA0Ewa0EKSQ0ACwsCQAJAAkACQAJAAkACQAJ/AkACQCADQT9rIgBBP00EQCAERQ0BIARBIUYEQAJAQfAIKAIAIgFBASABGyIHIAhqIgFB1AgoAgAiA0gNACADQf//AEoNAANAIANBAnQiAkGgiQJqIgRBoAgpAwA3AwAgAkGoiQJqQaAIKQMANwMAIAJBsIkCakGgCCkDADcDACACQbiJAmpBoAgpAwA3AwAgAkHAiQJqQaAIKQMANwMAIAJByIkCakGgCCkDADcDACACQdCJAmpBoAgpAwA3AwAgAkHYiQJqQaAIKQMANwMAIAJB4IkCakGgCCkDADcDACACQeiJAmpBoAgpAwA3AwAgAkHwiQJqQaAIKQMANwMAIAJB+IkCakGgCCkDADcDACACQYCKAmpBoAgpAwA3AwAgAkGIigJqQaAIKQMANwMAIAJBkIoCakGgCCkDADcDACACQZiKAmpBoAgpAwA3AwAgAkGgigJqQaAIKQMANwMAIAJBqIoCakGgCCkDADcDACACQbCKAmpBoAgpAwA3AwAgAkG4igJqQaAIKQMANwMAIAJBwIoCakGgCCkDADcDACACQciKAmpBoAgpAwA3AwAgAkHQigJqQaAIKQMANwMAIAJB2IoCakGgCCkDADcDACACQeCKAmpBoAgpAwA3AwAgAkHoigJqQaAIKQMANwMAIAJB8IoCakGgCCkDADcDACACQfiKAmpBoAgpAwA3AwAgAkGAiwJqQaAIKQMANwMAIAJBiIsCakGgCCkDADcDACACQZCLAmpBoAgpAwA3AwAgAkGYiwJqQaAIKQMANwMAIAJBoIsCakGgCCkDADcDACACQaiLAmpBoAgpAwA3AwAgAkGwiwJqQaAIKQMANwMAIAJBuIsCakGgCCkDADcDACACQcCLAmpBoAgpAwA3AwAgAkHIiwJqQaAIKQMANwMAIAJB0IsCakGgCCkDADcDACACQdiLAmpBoAgpAwA3AwAgAkHgiwJqQaAIKQMANwMAIAJB6IsCakGgCCkDADcDACACQfCLAmpBoAgpAwA3AwAgAkH4iwJqQaAIKQMANwMAIAJBgIwCakGgCCkDADcDACACQYiMAmpBoAgpAwA3AwAgAkGQjAJqQaAIKQMANwMAIAJBmIwCakGgCCkDADcDACACQaCMAmpBoAgpAwA3AwAgAkGojAJqQaAIKQMANwMAIAJBsIwCakGgCCkDADcDACACQbiMAmpBoAgpAwA3AwAgAkHAjAJqQaAIKQMANwMAIAJByIwCakGgCCkDADcDACACQdCMAmpBoAgpAwA3AwAgAkHYjAJqQaAIKQMANwMAIAJB4IwCakGgCCkDADcDACACQeiMAmpBoAgpAwA3AwAgAkHwjAJqQaAIKQMANwMAIAJB+IwCakGgCCkDADcDACACQYCNAmpBoAgpAwA3AwAgAkGIjQJqQaAIKQMANwMAIAJBkI0CakGgCCkDADcDACACQZiNAmpBoAgpAwA3AwAgAkGwiQZqIARBgAT8CgAAQdQIKAIAQQJ0QcCJCmogBEGABPwKAABB1AgoAgBBAnRB0IkOaiAEQYAE/AoAAEHUCCgCAEECdEHgiRJqIARBgAT8CgAAQdQIKAIAQQJ0QfCJFmogBEGABPwKAABB1AhB1AgoAgAiAkGAAWoiAzYCACABIANIDQEgAkGA/wBIDQALCwJAIABFDQAgCEH//wBLDQBBgIABIAhrIAcgAUH//wBLGyECAkAgAEEBcUUNACACRQ0AIAhBAnRBoIkCaiEDIAIhBCACQQdxIgcEQANAIAMgBTYCACADQQRqIQMgBEEBayEEIAdBAWsiBw0ACwsgAkEBa0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgBEEIayIEDQALCwJAIABBAnFFDQAgAkUNACAIQQJ0QbCJBmohAyACIQQgAkEHcSIHBEADQCADIAU2AgAgA0EEaiEDIARBAWshBCAHQQFrIgcNAAsLIAJBAWtBB0kNAANAIAMgBTYCHCADIAU2AhggAyAFNgIUIAMgBTYCECADIAU2AgwgAyAFNgIIIAMgBTYCBCADIAU2AgAgA0EgaiEDIARBCGsiBA0ACwsCQCAAQQRxRQ0AIAJFDQAgCEECdEHAiQpqIQMgAiEEIAJBB3EiBwRAA0AgAyAFNgIAIANBBGohAyAEQQFrIQQgB0EBayIHDQALCyACQQFrQQdJDQADQCADIAU2AhwgAyAFNgIYIAMgBTYCFCADIAU2AhAgAyAFNgIMIAMgBTYCCCADIAU2AgQgAyAFNgIAIANBIGohAyAEQQhrIgQNAAsLAkAgAEEIcUUNACACRQ0AIAhBAnRB0IkOaiEDIAIhBCACQQdxIgcEQANAIAMgBTYCACADQQRqIQMgBEEBayEEIAdBAWsiBw0ACwsgAkEBa0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgBEEIayIEDQALCwJAIABBEHFFDQAgAkUNACAIQQJ0QeCJEmohAyACIQQgAkEHcSIHBEADQCADIAU2AgAgA0EEaiEDIARBAWshBCAHQQFrIgcNAAsLIAJBAWtBB0kNAANAIAMgBTYCHCADIAU2AhggAyAFNgIUIAMgBTYCECADIAU2AgwgAyAFNgIIIAMgBTYCBCADIAU2AgAgA0EgaiEDIARBCGsiBA0ACwsgAEEgcUUNACACRQ0AIAJBAWshByAIQQJ0QfCJFmohAyACQQdxIgQEQANAIAMgBTYCACADQQRqIQMgAkEBayECIARBAWsiBA0ACwsgB0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgAkEIayICDQALC0HcCEHcCCgCACAAcjYCACAGQQFqIgIgBi0AAEH/AHEiA0E/ayIAQT9LDQQaDAMLAkBB7AgoAgAiBEEBRgRAQfAIKAIAIgNBzAgoAgAiAUkNASADIAFwIQMMAQtB+AgoAgAhAkH0CCgCACEBAkACQCAEQQVHDQAgAUEBRw0AIAJB6QJODQQMAQsgAkHkAEoNA0H8CCgCAEHkAEoNA0GACSgCAEHkAEoNAwsCQCABRQ0AIAFBAkoNACACQfwIKAIAQYAJKAIAIAFBAnRBiAhqKAIAEQIAIQFB8AgoAgAiA0HMCCgCACICTwR/IAMgAnAFIAMLQQJ0QZAJaiABNgIAC0HwCCgCACIDQcwIKAIAIgFJDQAgAyABcCEDCyADQQJ0QZAJaigCACEFDAELIANB/QBxQSFHBEAgCCEBIAYhAgwECyAEQSNHDQQCQEHsCCgCACICQQFGBEBB8AgoAgAiAUHMCCgCACIASQ0BIAEgAHAhAQwBC0H4CCgCACEBQfQIKAIAIQACQAJAIAJBBUcNACAAQQFHDQAgAUHpAkgNAQwHCyABQeQASg0GQfwIKAIAQeQASg0GQYAJKAIAQeQASg0GCwJAIABFDQAgAEECSg0AIAFB/AgoAgBBgAkoAgAgAEECdEGICGooAgARAgAhAEHwCCgCACIBQcwIKAIAIgJPBH8gASACcAUgAQtBAnRBkAlqIAA2AgALQfAIKAIAIgFBzAgoAgAiAEkNACABIABwIQELIAFBAnRBkAlqKAIAIQUMBAsgCCEBIAYhAgtB1AgoAgAhBgNAAkAgASAGSA0AIAZB//8ASg0AIAZBAnQiBEGgiQJqIgZBoAgpAwA3AwAgBEGoiQJqQaAIKQMANwMAIARBsIkCakGgCCkDADcDACAEQbiJAmpBoAgpAwA3AwAgBEHAiQJqQaAIKQMANwMAIARByIkCakGgCCkDADcDACAEQdCJAmpBoAgpAwA3AwAgBEHYiQJqQaAIKQMANwMAIARB4IkCakGgCCkDADcDACAEQeiJAmpBoAgpAwA3AwAgBEHwiQJqQaAIKQMANwMAIARB+IkCakGgCCkDADcDACAEQYCKAmpBoAgpAwA3AwAgBEGIigJqQaAIKQMANwMAIARBkIoCakGgCCkDADcDACAEQZiKAmpBoAgpAwA3AwAgBEGgigJqQaAIKQMANwMAIARBqIoCakGgCCkDADcDACAEQbCKAmpBoAgpAwA3AwAgBEG4igJqQaAIKQMANwMAIARBwIoCakGgCCkDADcDACAEQciKAmpBoAgpAwA3AwAgBEHQigJqQaAIKQMANwMAIARB2IoCakGgCCkDADcDACAEQeCKAmpBoAgpAwA3AwAgBEHoigJqQaAIKQMANwMAIARB8IoCakGgCCkDADcDACAEQfiKAmpBoAgpAwA3AwAgBEGAiwJqQaAIKQMANwMAIARBiIsCakGgCCkDADcDACAEQZCLAmpBoAgpAwA3AwAgBEGYiwJqQaAIKQMANwMAIARBoIsCakGgCCkDADcDACAEQaiLAmpBoAgpAwA3AwAgBEGwiwJqQaAIKQMANwMAIARBuIsCakGgCCkDADcDACAEQcCLAmpBoAgpAwA3AwAgBEHIiwJqQaAIKQMANwMAIARB0IsCakGgCCkDADcDACAEQdiLAmpBoAgpAwA3AwAgBEHgiwJqQaAIKQMANwMAIARB6IsCakGgCCkDADcDACAEQfCLAmpBoAgpAwA3AwAgBEH4iwJqQaAIKQMANwMAIARBgIwCakGgCCkDADcDACAEQYiMAmpBoAgpAwA3AwAgBEGQjAJqQaAIKQMANwMAIARBmIwCakGgCCkDADcDACAEQaCMAmpBoAgpAwA3AwAgBEGojAJqQaAIKQMANwMAIARBsIwCakGgCCkDADcDACAEQbiMAmpBoAgpAwA3AwAgBEHAjAJqQaAIKQMANwMAIARByIwCakGgCCkDADcDACAEQdCMAmpBoAgpAwA3AwAgBEHYjAJqQaAIKQMANwMAIARB4IwCakGgCCkDADcDACAEQeiMAmpBoAgpAwA3AwAgBEHwjAJqQaAIKQMANwMAIARB+IwCakGgCCkDADcDACAEQYCNAmpBoAgpAwA3AwAgBEGIjQJqQaAIKQMANwMAIARBkI0CakGgCCkDADcDACAEQZiNAmpBoAgpAwA3AwAgBEGwiQZqIAZBgAT8CgAAQdQIKAIAQQJ0QcCJCmogBkGABPwKAABB1AgoAgBBAnRB0IkOaiAGQYAE/AoAAEHUCCgCAEECdEHgiRJqIAZBgAT8CgAAQdQIKAIAQQJ0QfCJFmogBkGABPwKAABB1AhB1AgoAgBBgAFqIgY2AgALIAFB//8ATQRAIABBAXEgAWxBAnRBoIkCaiAFNgIAIABBAXZBAXEgAWxBAnRBsIkGaiAFNgIAIABBAnZBAXEgAWxBAnRBwIkKaiAFNgIAIABBA3ZBAXEgAWxBAnRB0IkOaiAFNgIAIABBBHZBAXEgAWxBAnRB4IkSaiAFNgIAIABBBXYgAWxBAnRB8IkWaiAFNgIAQdQIKAIAIQYLIAFBAWohAUHcCEHcCCgCACAAcjYCACACLQAAIQAgAkEBaiIEIQIgAEH/AHEiA0E/ayIAQcAASQ0ACyAECyECQQAhBCACIQYgASEIIANB/QBxQSFGDQELIANBJGsOCgEDAwMDAwMDAwIDC0HsCEIBNwIADAQLQdgIIAFB2AgoAgAiACAAIAFIGyIAQYCAASAAQYCAAUgbNgIADAILQegIIAFB2AgoAgAiACAAIAFIGyIAQYCAASAAQYCAAUgbIgA2AgBB2AggADYCACAAQQRrEAAEQEHoCEEENgIAQdgIQQQ2AgBB0AhBATYCAA8LEAgMAQsCQCADQTtHDQBB7AgoAgAiAEEHSg0AQewIIABBAWo2AgAgAEECdEHwCGpBADYCAAsgAiEGIAQhAyABIQgMAQtBBCEIIAIhBiAEIQMLIAYgCUkNAAsLQeQIIAU2AgBB4AggAzYCAEHoCCAINgIAC9ELAgF+CH9B2AhCBDcDAEGojQJBoAgpAwAiADcDAEGgjQIgADcDAEGYjQIgADcDAEGQjQIgADcDAEGIjQIgADcDAEGAjQIgADcDAEH4jAIgADcDAEHwjAIgADcDAEHojAIgADcDAEHgjAIgADcDAEHYjAIgADcDAEHQjAIgADcDAEHIjAIgADcDAEHAjAIgADcDAEG4jAIgADcDAEGwjAIgADcDAEGojAIgADcDAEGgjAIgADcDAEGYjAIgADcDAEGQjAIgADcDAEGIjAIgADcDAEGAjAIgADcDAEH4iwIgADcDAEHwiwIgADcDAEHoiwIgADcDAEHgiwIgADcDAEHYiwIgADcDAEHQiwIgADcDAEHIiwIgADcDAEHAiwIgADcDAEG4iwIgADcDAEGwiwIgADcDAEGoiwIgADcDAEGgiwIgADcDAEGYiwIgADcDAEGQiwIgADcDAEGIiwIgADcDAEGAiwIgADcDAEH4igIgADcDAEHwigIgADcDAEHoigIgADcDAEHgigIgADcDAEHYigIgADcDAEHQigIgADcDAEHIigIgADcDAEHAigIgADcDAEG4igIgADcDAEGwigIgADcDAEGoigIgADcDAEGgigIgADcDAEGYigIgADcDAEGQigIgADcDAEGIigIgADcDAEGAigIgADcDAEH4iQIgADcDAEHwiQIgADcDAEHoiQIgADcDAEHgiQIgADcDAEHYiQIgADcDAEHQiQIgADcDAEHIiQIgADcDAEHAiQIgADcDAEG4iQIgADcDAEGwiQIgADcDAEGoCCgCACIEQf8AakGAAW0hCAJAIARBgQFIDQBBASEBIAhBAiAIQQJKG0EBayICQQFxIQMgBEGBAk4EQCACQX5xIQIDQCABQQl0IgdBEHJBoIkCakGwiQJBgAT8CgAAIAdBsI0CakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsLIANFDQAgAUEJdEEQckGgiQJqQbCJAkGABPwKAAALAkAgBEEBSA0AIAhBASAIQQFKGyIDQQFxIQUCQCADQQFrIgdFBEBBACEBDAELIANB/v///wdxIQJBACEBA0AgAUEJdCIGQRByQbCJBmpBsIkCQYAE/AoAACAGQZAEckGwiQZqQbCJAkGABPwKAAAgAUECaiEBIAJBAmsiAg0ACwsgBQRAIAFBCXRBEHJBsIkGakGwiQJBgAT8CgAACyAEQQFIDQAgA0EBcSEFIAcEfyADQf7///8HcSECQQAhAQNAIAFBCXQiBkEQckHAiQpqQbCJAkGABPwKAAAgBkGQBHJBwIkKakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsgAUEHdEEEcgVBBAshASAFBEAgAUECdEHAiQpqQbCJAkGABPwKAAALIARBAUgNACADQQFxIQUgBwR/IANB/v///wdxIQJBACEBA0AgAUEJdCIGQRByQdCJDmpBsIkCQYAE/AoAACAGQZAEckHQiQ5qQbCJAkGABPwKAAAgAUECaiEBIAJBAmsiAg0ACyABQQd0QQRyBUEECyEBIAUEQCABQQJ0QdCJDmpBsIkCQYAE/AoAAAsgBEEBSA0AIANBAXEhBSAHBH8gA0H+////B3EhAkEAIQEDQCABQQl0IgZBEHJB4IkSakGwiQJBgAT8CgAAIAZBkARyQeCJEmpBsIkCQYAE/AoAACABQQJqIQEgAkECayICDQALIAFBB3RBBHIFQQQLIQEgBQRAIAFBAnRB4IkSakGwiQJBgAT8CgAACyAEQQFIDQAgA0EBcSEEIAcEfyADQf7///8HcSECQQAhAQNAIAFBCXQiA0EQckHwiRZqQbCJAkGABPwKAAAgA0GQBHJB8IkWakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsgAUEHdEEEcgVBBAshASAERQ0AIAFBAnRB8IkWakGwiQJBgAT8CgAAC0HUCCAIQQd0QQRyNgIAC58TAgh/AX5B5AgoAgAhA0HgCCgCACECQegIKAIAIQcgAUGQiQFqIglB/wE6AAAgACABSARAIABBkIkBaiEIA0AgAiEEIAhBAWohAQJAIAgtAABB/wBxIgJBMGtBCUsEQCABIQgMAQtB7AgoAgBBAnRB7AhqIgUoAgAhAANAIAUgAiAAQQpsakEwayIANgIAIAEtAAAhAiABQQFqIgghASACQf8AcSICQTBrQQpJDQALCwJAAkACQAJAAkACQAJ/AkAgAkE/ayIAQT9NBEAgBEUNASAEQSFGBEBB8AgoAgAiAUEBIAEbIgQgB2ohAQJAIABFDQAgB0H//wBLDQBBgIABIAdrIAQgAUH//wBLGyEFAkAgAEEBcUUNACAHQQJ0QaCJAmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEECcUUNACAHQQJ0QbCJBmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEEcUUNACAHQQJ0QcCJCmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEIcUUNACAHQQJ0QdCJDmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEQcUUNACAHQQJ0QeCJEmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLIABBIHFFDQAgBUEBayEEIAdBAnRB8IkWaiEAIAVBB3EiAgRAA0AgACADNgIAIABBBGohACAFQQFrIQUgAkEBayICDQALCyAEQQdJDQADQCAAIAM2AhwgACADNgIYIAAgAzYCFCAAIAM2AhAgACADNgIMIAAgAzYCCCAAIAM2AgQgACADNgIAIABBIGohACAFQQhrIgUNAAsLIAhBAWoiBSAILQAAQf8AcSICQT9rIgBBP00NAxoMBAsCQEHsCCgCACIFQQFGBEBB8AgoAgAiAUHMCCgCACIESQ0BIAEgBHAhAQwBC0H4CCgCACEEQfQIKAIAIQECQAJAIAVBBUcNACABQQFHDQAgBEHpAk4NBAwBCyAEQeQASg0DQfwIKAIAQeQASg0DQYAJKAIAQeQASg0DCwJAIAFFDQAgAUECSg0AIARB/AgoAgBBgAkoAgAgAUECdEGICGooAgARAgAhBEHwCCgCACIBQcwIKAIAIgVPBH8gASAFcAUgAQtBAnRBkAlqIAQ2AgALQfAIKAIAIgFBzAgoAgAiBEkNACABIARwIQELIAFBAnRBkAlqKAIAIQMMAQsgAkH9AHFBIUcEQCAHIQEgAiEADAQLIARBI0cNBAJAQewIKAIAIgRBAUYEQEHwCCgCACIBQcwIKAIAIgBJDQEgASAAcCEBDAELQfgIKAIAIQFB9AgoAgAhAAJAAkAgBEEFRw0AIABBAUcNACABQekCSA0BDAcLIAFB5ABKDQZB/AgoAgBB5ABKDQZBgAkoAgBB5ABKDQYLAkAgAEUNACAAQQJKDQAgAUH8CCgCAEGACSgCACAAQQJ0QYgIaigCABECACEAQfAIKAIAIgFBzAgoAgAiBE8EfyABIARwBSABC0ECdEGQCWogADYCAAtB8AgoAgAiAUHMCCgCACIASQ0AIAEgAHAhAQsgAUECdEGQCWooAgAhAwwECyAHIQEgCAshBQNAIAFB//8ATQRAIABBAXEgAWxBAnRBoIkCaiADNgIAIABBAXZBAXEgAWxBAnRBsIkGaiADNgIAIABBAnZBAXEgAWxBAnRBwIkKaiADNgIAIABBA3ZBAXEgAWxBAnRB0IkOaiADNgIAIABBBHZBAXEgAWxBAnRB4IkSaiADNgIAIABBBXYgAWxBAnRB8IkWaiADNgIACyABQQFqIQEgBS0AACEAIAVBAWoiBCEFIABB/wBxIgJBP2siAEHAAEkNAAsgBCEFC0EAIQQgBSEIIAEhByACIQAgAkH9AHFBIUYNAQtBBCEHIAQhAiAAQSRrDgoDAgICAgICAgIBAgtB7AhCATcCAAwCC0GoCCgCAEEEaxAABEBB0AhBATYCAA8LAkBBqAgoAgAiBkEFSA0AQaAIKQMAIQogBkEDa0EBdiIBQQdxIQJBACEAIAFBAWtBB08EQCABQfj///8HcSEFA0AgAEEDdCIBQbCJAmogCjcDACABQQhyQbCJAmogCjcDACABQRByQbCJAmogCjcDACABQRhyQbCJAmogCjcDACABQSByQbCJAmogCjcDACABQShyQbCJAmogCjcDACABQTByQbCJAmogCjcDACABQThyQbCJAmogCjcDACAAQQhqIQAgBUEIayIFDQALCyACRQ0AA0AgAEEDdEGwiQJqIAo3AwAgAEEBaiEAIAJBAWsiAg0ACwtBwIkGQbCJAiAGQQJ0IgD8CgAAQdCJCkGwiQIgAPwKAABB4IkOQbCJAiAA/AoAAEHwiRJBsIkCIAD8CgAAQYCKFkGwiQIgAPwKAAAgBCECDAELAkAgAEE7Rw0AQewIKAIAIgBBB0oNAEHsCCAAQQFqNgIAIABBAnRB8AhqQQA2AgALIAEhBwsgCCAJSQ0ACwtB5AggAzYCAEHgCCACNgIAQegIIAc2AgAL4gcCBX8BfgJAQdAIAn8CQAJAIAAgAU4NACABQZCJAWohBiAAQZCJAWohBQNAIAUtAAAiA0H/AHEhAgJAAkACQAJAAkACQAJAQeAIKAIAIgRBIkcEQCAEDQcgAkEiRgRAQewIQgE3AgBB4AhBIjYCAAwICyACQT9rQcAASQ0GIANBIWsiAkEMTQ0BDAULAkAgAkEwayIEQQlNBEBB7AgoAgBBAnRB7AhqIgIgBCACKAIAQQpsajYCAAwBC0HsCCgCACEEIAJBO0YEQCAEQQdKDQFB7AggBEEBajYCACAEQQJ0QfAIakEANgIADAELIARBBEYEQEHECEECNgIAQbAIQfAIKQMANwMAQbgIQfgIKAIAIgI2AgBBvAhB/AgoAgAiBDYCAEHICEECQQFBwAgoAgAiAxs2AgBBrAggBEEAIAMbNgIAQagIIAJBgIABIAJBgIABSBtBBGpBACADGzYCAEHgCEEANgIADAoLIAJBP2tBwABJDQQLIANBIWsiAkEMTQ0BDAILQQEgAnRBjSBxRQ0DDAQLQQEgAnRBjSBxDQELIANBoQFrIgJBDEsNA0EBIAJ0QY0gcUUNAwtBxAhCgYCAgBA3AgBBsAhB8AgoAgBBAEHsCCgCACICQQBKGzYCAEG0CEH0CCgCAEEAIAJBAUobNgIAQbgIQfgIKAIAQQAgAkECShs2AgBB4AhBADYCAEG8CEEANgIADAQLIANBoQFrIgJBDEsNAUEBIAJ0QY0gcUUNAQtBxAhCgYCAgBA3AgBBsAhCADcDAEG4CEIANwMADAMLIAVBAWoiBSAGSQ0ACwsCQEHICCgCAA4DAwEAAQsCQEGoCCgCACIFQQVIDQBBoAgpAwAhByAFQQNrQQF2IgNBB3EhBEEAIQIgA0EBa0EHTwRAIANB+P///wdxIQYDQCACQQN0IgNBsIkCaiAHNwMAIANBCHJBsIkCaiAHNwMAIANBEHJBsIkCaiAHNwMAIANBGHJBsIkCaiAHNwMAIANBIHJBsIkCaiAHNwMAIANBKHJBsIkCaiAHNwMAIANBMHJBsIkCaiAHNwMAIANBOHJBsIkCaiAHNwMAIAJBCGohAiAGQQhrIgYNAAsLIARFDQADQCACQQN0QbCJAmogBzcDACACQQFqIQIgBEEBayIEDQALC0HAiQZBsIkCIAVBAnQiA/wKAABB0IkKQbCJAiAD/AoAAEHgiQ5BsIkCIAP8CgAAQfCJEkGwiQIgA/wKAABBgIoWQbCJAiAD/AoAAEECDAELEAhByAgoAgALEAEiAjYCACACDQAgACABQcgIKAIAQQJ0QYAIaigCABEBAAsLdABB6AhBBDYCAEHkCCAANgIAQewIQgE3AgBBxAhCADcCAEHACCADNgIAQdwIQgA3AgBBqAhCADcDAEGwCEIANwMAQbgIQgA3AwBBzAggAkGAICACQYAgSRs2AgBBoAggAa1CgYCAgBB+NwMAQdAIQQA2AgALIwBB0AgoAgBFBEAgACABQcgIKAIAQQJ0QYAIaigCABEBAAsLWgECfwJAAkACQEHICCgCAEEBaw4CAAECC0HYCEHoCCgCACIAQdgIKAIAIgEgACABShsiAEGAgAEgAEGAgAFIGyIANgIAIABBBGsPC0GoCCgCAEEEayEACyAAC0IBAX8Cf0EGQdwIKAIAIgBBIHENABpBBSAAQRBxDQAaQQQgAEEIcQ0AGkEDIABBBHENABpBAiAAQQFxIABBAnEbCwu9BQEFfQJ/IAJFBEAgAUH/AWxBMmpB5ABtIgBBCHQgAHIgAEEQdHIMAQsgArJDAADIQpUhBiAAQfABarJDAAC0Q5UhBQJ9IAGyQwAAyEKVIgNDAAAAP10EQCADIAZDAACAP5KUDAELIAYgA0MAAIA/IAaTlJILIQcgAyADkiEGAkAgBUOrqqo+kiIEQwAAAABdBEAgBEMAAIA/kiEEDAELIARDAACAP15FDQAgBEMAAIC/kiEECyAGIAeTIQMgBUMAAAAAXSEAAn8CfSADIAcgA5NDAADAQJQgBJSSIARDq6oqPl0NABogByAEQwAAAD9dDQAaIAMgBEOrqio/XUUNABogAyAHIAOTIARDAADAwJRDAACAQJKUkgtDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALIQECQCAABEAgBUMAAIA/kiEEDAELIAUiBEMAAIA/XkUNACAFQwAAgL+SIQQLIAVDq6qqvpIiBUMAAAAAXSECAn8CfSADIAcgA5NDAADAQJQgBJSSIARDq6oqPl0NABogByAEQwAAAD9dDQAaIAMgBEOrqio/XUUNABogAyAHIAOTIARDAADAwJRDAACAQJKUkgtDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALIQACQCACBEAgBUMAAIA/kiEFDAELIAVDAACAP15FDQAgBUMAAIC/kiEFCwJAIAVDq6oqPl0EQCADIAcgA5NDAADAQJQgBZSSIQcMAQsgBUMAAAA/XQ0AIAVDq6oqP11FBEAgAyEHDAELIAMgByADkyAFQwAAwMCUQwAAgECSlJIhBwsgAEEIdAJ/IAdDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALQRB0ciABcgtBgICAeHILNwAgAEH/AWxBMmpB5ABtIAFB/wFsQTJqQeQAbUEIdHIgAkH/AWxBMmpB5ABtQRB0ckGAgIB4cgsEACMACwYAIAAkAAsQACMAIABrQXBxIgAkACAACwsYAQBBgAgLEQEAAAACAAAAAwAAAAQAAAAF`}})),hj=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAsync=e.decode=e.Decoder=e.DecoderAsync=void 0;var t=pj(),n=mj();function r(e){if(typeof Buffer<`u`)return Buffer.from(e,`base64`);let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<n.length;++e)n[e]=t.charCodeAt(e);return n}var i=r(n.LIMITS.BYTES),a,o=new Uint32Array,s=class{constructor(){this.bandHandler=e=>1,this.modeHandler=e=>1}handle_band(e){return this.bandHandler(e)}mode_parsed(e){return this.modeHandler(e)}},c={memoryLimit:134217728,sixelColor:t.DEFAULT_FOREGROUND,fillColor:t.DEFAULT_BACKGROUND,palette:t.PALETTE_VT340_COLOR,paletteLimit:n.LIMITS.PALETTE_SIZE,truncate:!0};function l(e){let t=new s,n={env:{handle_band:t.handle_band.bind(t),mode_parsed:t.mode_parsed.bind(t)}};return WebAssembly.instantiate(a||i,n).then(n=>(a||=n.module,new u(e,n.instance||n,t)))}e.DecoderAsync=l;var u=class{constructor(e,r,s){if(this._PIXEL_OFFSET=n.LIMITS.MAX_WIDTH+4,this._canvas=o,this._bandWidths=[],this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0,this._opts=Object.assign({},c,e),this._opts.paletteLimit>n.LIMITS.PALETTE_SIZE)throw Error(`DecoderOptions.paletteLimit must not exceed ${n.LIMITS.PALETTE_SIZE}`);if(r)s.bandHandler=this._handle_band.bind(this),s.modeHandler=this._initCanvas.bind(this);else{let e=a||=new WebAssembly.Module(i);r=new WebAssembly.Instance(e,{env:{handle_band:this._handle_band.bind(this),mode_parsed:this._initCanvas.bind(this)}})}this._instance=r,this._wasm=this._instance.exports,this._chunk=new Uint8Array(this._wasm.memory.buffer,this._wasm.get_chunk_address(),n.LIMITS.CHUNK_SIZE),this._states=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_state_address(),12),this._palette=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_palette_address(),n.LIMITS.PALETTE_SIZE),this._palette.set(this._opts.palette),this._pSrc=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_p0_address()),this._wasm.init(t.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}get _fillColor(){return this._states[0]}get _truncate(){return this._states[8]}get _rasterWidth(){return this._states[6]}get _rasterHeight(){return this._states[7]}get _width(){return this._states[2]?this._states[2]-4:0}get _height(){return this._states[3]}get _level(){return this._states[9]}get _mode(){return this._states[10]}get _paletteLimit(){return this._states[11]}_initCanvas(e){if(e===2){let e=this.width*this.height;if(e>this._canvas.length){if(this._opts.memoryLimit&&e*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);this._canvas=new Uint32Array(e)}this._maxWidth=this._width}else if(e===1){if(this._level===2){let e=Math.min(this._rasterWidth,n.LIMITS.MAX_WIDTH)*this._rasterHeight;if(e>this._canvas.length){if(this._opts.memoryLimit&&e*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);this._canvas=new Uint32Array(e)}}else this._canvas.length<65536&&(this._canvas=new Uint32Array(65536))}return 0}_realloc(e,t){let n=e+t;if(n>this._canvas.length){if(this._opts.memoryLimit&&n*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);let e=new Uint32Array(Math.ceil(n/65536)*65536);e.set(this._canvas),this._canvas=e}}_handle_band(e){let t=this._PIXEL_OFFSET,n=this._lastOffset;if(this._mode===2){let r=this.height-this._currentHeight,i=0;for(;i<6&&r>0;)this._canvas.set(this._pSrc.subarray(t*i,t*i+e),n+e*i),i++,r--;this._lastOffset+=e*i,this._currentHeight+=i}else if(this._mode===1){this._realloc(n,e*6),this._maxWidth=Math.max(this._maxWidth,e),this._minWidth=Math.min(this._minWidth,e);for(let r=0;r<6;++r)this._canvas.set(this._pSrc.subarray(t*r,t*r+e),n+e*r);this._bandWidths.push(e),this._lastOffset+=e*6,this._currentHeight+=6}return 0}get width(){return this._mode===1?Math.max(this._maxWidth,this._wasm.current_width()):this._width}get height(){return this._mode===1?this._wasm.current_width()?this._bandWidths.length*6+this._wasm.current_height():this._bandWidths.length*6:this._height}get palette(){return this._palette.subarray(0,this._paletteLimit)}get memoryUsage(){return this._canvas.byteLength+this._wasm.memory.buffer.byteLength+8*this._bandWidths.length}get properties(){return{width:this.width,height:this.height,mode:this._mode,level:this._level,truncate:!!this._truncate,paletteLimit:this._paletteLimit,fillColor:this._fillColor,memUsage:this.memoryUsage,rasterAttributes:{numerator:this._states[4],denominator:this._states[5],width:this._rasterWidth,height:this._rasterHeight}}}init(e=this._opts.fillColor,t=this._opts.palette,r=this._opts.paletteLimit,i=this._opts.truncate){this._wasm.init(this._opts.sixelColor,e,r,+!!i),t&&this._palette.set(t.subarray(0,n.LIMITS.PALETTE_SIZE)),this._bandWidths.length=0,this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0}decode(e,t=0,r=e.length){let i=t;for(;i<r;){let t=Math.min(r-i,n.LIMITS.CHUNK_SIZE);this._chunk.set(e.subarray(i,i+=t)),this._wasm.decode(0,t)}}decodeString(e,t=0,r=e.length){let i=t;for(;i<r;){let t=Math.min(r-i,n.LIMITS.CHUNK_SIZE);for(let n=0,r=i;n<t;++n,++r)this._chunk[n]=e.charCodeAt(r);i+=t,this._wasm.decode(0,t)}}get data32(){if(this._mode===0||!this.width||!this.height)return o;let e=this._wasm.current_width();if(this._mode===2){let t=this.height-this._currentHeight;if(t>0){let n=this._PIXEL_OFFSET,r=this._lastOffset,i=0;for(;i<6&&t>0;)this._canvas.set(this._pSrc.subarray(n*i,n*i+e),r+e*i),i++,t--;t&&this._canvas.fill(this._fillColor,r+e*i)}return this._canvas.subarray(0,this.width*this.height)}if(this._mode===1){if(this._minWidth===this._maxWidth){let t=!1;if(e){if(e!==this._minWidth)t=!0;else{let t=this._PIXEL_OFFSET,n=this._lastOffset;this._realloc(n,e*6);for(let r=0;r<6;++r)this._canvas.set(this._pSrc.subarray(t*r,t*r+e),n+e*r)}}if(!t)return this._canvas.subarray(0,this.width*this.height)}let t=new Uint32Array(this.width*this.height);t.fill(this._fillColor);let n=0,r=0;for(let e=0;e<this._bandWidths.length;++e){let i=this._bandWidths[e];for(let e=0;e<6;++e)t.set(this._canvas.subarray(r,r+=i),n),n+=this.width}if(e){let r=this._PIXEL_OFFSET,i=this._wasm.current_height();for(let a=0;a<i;++a)t.set(this._pSrc.subarray(r*a,r*a+e),n+this.width*a)}return t}return o}get data8(){return new Uint8ClampedArray(this.data32.buffer,0,this.width*this.height*4)}release(){this._canvas=o,this._bandWidths.length=0,this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._wasm.init(t.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}};e.Decoder=u;function d(e,t){let n=new u(t);return n.init(),typeof e==`string`?n.decodeString(e):n.decode(e),{width:n.width,height:n.height,data32:n.data32,data8:n.data8}}e.decode=d;async function f(e,t){let n=await l(t);return n.init(),typeof e==`string`?n.decodeString(e):n.decode(e),{width:n.width,height:n.height,data32:n.data32,data8:n.data8}}e.decodeAsync=f})),gj=pj(),_j=hj(),vj=gj.PALETTE_ANSI_256.slice();vj.set(gj.PALETTE_VT340_COLOR);var yj=200,bj=new TextEncoder,xj=`offsite-image:`;async function Sj(e){let t=await(0,_j.decodeAsync)(e,{fillColor:0,palette:vj});return!t.width||!t.height?null:createImageBitmap(new ImageData(new Uint8ClampedArray(t.data8),t.width,t.height))}function Cj(e,t,n){return e===void 0||e===`auto`?0:e.endsWith(`%`)?parseInt(e.slice(0,-1))*t/100:e.endsWith(`px`)?parseInt(e.slice(0,-2)):parseInt(e)*n}async function wj(e,t){let n=e.indexOf(`:`);if(n===-1)return null;let r=new Map(e.slice(0,n).split(`;`).map(e=>{let t=e.indexOf(`=`);return[e.slice(0,t),e.slice(t+1)]}));if(r.get(`inline`)!==`1`)return null;let i=Uint8Array.from(atob(e.slice(n+1)),e=>e.charCodeAt(0)),a=await createImageBitmap(new Blob([i])),o=Cj(r.get(`width`),t.width,t.cellWidth),s=Cj(r.get(`height`),t.height,t.cellHeight),c=[a.width,a.height];if(!o&&!s){let e=Math.min(t.width/a.width,(t.height-t.cellHeight)/a.height);e<1&&(c=[a.width*e,a.height*e])}else c=o?r.get(`preserveAspectRatio`)!==`0`||!s?[o,a.height*o/a.width]:[o,s]:[a.width*s/a.height,s];let[l,u]=c.map(e=>Math.max(1,Math.floor(e*t.pixelRatio))),d=await createImageBitmap(a,{resizeWidth:l,resizeHeight:u});return a.close(),d}function Tj(e){let t=fj(e),{width:n,height:r,depth:i,channels:a}=t,o=n*r,s=new Uint8Array(o*4);if(t.palette){let e=uj(t),i=t.palette[0].length;for(let t=0;t<o;t+=1)s.set(e.subarray(t*i,t*i+3),t*4),s[t*4+3]=i===4?e[t*i+3]:255;return{width:n,height:r,data:s}}let c=2**i-1,l=Math.ceil(n*i/8);function u(e){if(i>=8)return t.data[e];let r=e%n*i;return t.data[Math.floor(e/n)*l+(r>>3)]>>8-i-(r&7)&c}function d(e){return i===16?e>>8:i===8?e:Math.round(e*255/c)}let f=t.transparency;for(let e=0;e<o;e+=1){let t=e*4;if(a===1||a===2){let n=u(e*a);s.fill(d(n),t,t+3),s[t+3]=a===2?d(u(e*2+1)):f?.[0]===n?0:255}else if(a===3||a===4){let n=u(e*a),r=u(e*a+1),i=u(e*a+2);s[t]=d(n),s[t+1]=d(r),s[t+2]=d(i),s[t+3]=a===4?d(u(e*4+3)):f?.[0]===n&&f[1]===r&&f[2]===i?0:255}else throw Error(`unsupported PNG with ${a} channels`)}return{width:n,height:r,data:s}}var Ej=class{core;images=[];nextImage=0;constructor(e){this.core=e}place(e,t,n){let r=`${xj}${this.nextImage++}`;this.core.write(bj.encode(`\x1b]8;;${r}\x1b\\ \x1b]8;;\x1b\\\b`));let i={ref:this.core.trackCursor(),marker:r,bitmap:e,width:e.width/t,height:e.height/t,alternate:this.core.isAlternateScreen()};if(this.images.push(i),this.images.length>yj){let e=this.images.shift();e&&this.remove(e)}let a=Math.ceil(i.height/n);a>1&&this.core.write(bj.encode(`\x1BD`.repeat(a-1)))}visible(e,t,n){if(this.images.length===0)return[];let r=this.core.isAlternateScreen(),i=[],a=[];for(let o of this.images){if(o.alternate!==r){a.push(o);continue}let s=this.core.trackedPoint(o.ref);if(s===null||this.core.trackedHyperlink(o.ref)!==o.marker){this.remove(o);continue}a.push(o);let c=s.y-e;c+Math.ceil(o.height/n)<=0||c>=t||i.push({bitmap:o.bitmap,width:o.width,height:o.height,x:s.x,y:c})}return this.images=a,i}clear(){for(let e of this.images)this.remove(e);this.images=[]}remove(e){this.core.untrack(e.ref),e.bitmap.close()}},Dj=new Uint8Array([0,97,115,109,1,0,0,0,1,35,5,96,4,127,127,127,127,0,96,3,127,127,127,1,127,96,2,127,127,0,96,3,127,127,127,0,96,5,127,127,127,127,127,1,127,2,49,6,3,101,110,118,1,119,0,0,3,101,110,118,1,100,0,1,3,101,110,118,1,115,0,1,3,101,110,118,1,98,0,2,3,101,110,118,1,118,0,3,3,101,110,118,1,112,0,4,7,25,6,1,119,0,0,1,100,0,1,1,115,0,2,1,98,0,3,1,118,0,4,1,112,0,5]),Oj={userdata:0,writePty:1,bell:2,xtversion:4,size:6,deviceAttributes:8},kj=1,Aj=-3,jj={width:0,height:4,data:8,length:12},Mj=new TextDecoder,Nj=new TextEncoder,Pj=class e{memory;layouts;exports;memoryView;hosts=new Map;nextHostId=1;callbacks={writePty:0,deviceAttributes:0,size:0,bell:0,xtversion:0};version={pointer:0,size:0};constructor(e){this.exports=e.exports;let t=e.exports.memory;if(!(t instanceof WebAssembly.Memory))throw Error(`libghostty-vt did not export its memory`);this.memory=t,this.memoryView=new DataView(t.buffer);let n=this.call(`ghostty_type_json`),r=new Uint8Array(t.buffer),i=n;for(;i<r.length&&r[i]!==0;)i+=1;this.layouts=JSON.parse(Mj.decode(r.subarray(n,i)))}static async load(){let t=await fetch(Fk);if(!t.ok)throw Error(`could not load libghostty-vt (${t.status})`);let n=null,r=await WebAssembly.instantiate(await t.arrayBuffer(),{env:{log:(e,t)=>{n&&console.debug(`[libghostty-vt]`,Mj.decode(new Uint8Array(n.buffer,e,t)))}}}),i=new e(r.instance);return n=i.memory,i.installCallbacks(),i}call(e,...t){let n=this.exports[e];if(typeof n!=`function`)throw Error(`libghostty-vt export is missing: ${e}`);return n(...t)}layout(e){let t=this.layouts[e];if(!t)throw Error(`libghostty-vt layout is missing: ${e}`);return t}field(e,t){let n=this.layout(e).fields[t];if(!n)throw Error(`libghostty-vt field is missing: ${e}.${t}`);return n}alloc(e){let t=this.call(`ghostty_wasm_alloc_u8_array`,e);if(t===0)throw Error(`libghostty-vt could not allocate ${e} bytes`);return new Uint8Array(this.memory.buffer,t,e).fill(0),t}free(e,t){e!==0&&this.call(`ghostty_wasm_free_u8_array`,e,t)}allocOpaque(){let e=this.call(`ghostty_wasm_alloc_opaque`);if(e===0)throw Error(`libghostty-vt could not allocate a pointer`);return new DataView(this.memory.buffer).setUint32(e,0,!0),e}freeOpaque(e){e!==0&&this.call(`ghostty_wasm_free_opaque`,e)}readPointer(e){return this.dataView().getUint32(e,!0)}check(e,t){if(t!==0)throw Error(`${e} failed with result ${t}`)}flag(e,t,n){let r=this.alloc(1),i=this.call(e,t,n,r),a=this.bytes(r,1)[0];return this.free(r,1),i===0&&a!==0}encodeOutput(e){let t=this.call(`ghostty_wasm_alloc_usize`),n=``,r=e(0,0,t),i=this.view(t,4).getUint32(0,!0);if(r===Aj&&i>0){let r=this.alloc(i),a=e(r,i,t),o=this.view(t,4).getUint32(0,!0);a===0&&(n=Mj.decode(this.bytes(r,o))),this.free(r,i)}return this.call(`ghostty_wasm_free_usize`,t),n}attachHost(e,t){let n=this.nextHostId++;this.hosts.set(n,t),this.call(`ghostty_terminal_set`,e,Oj.userdata,n);for(let t of[[Oj.writePty,this.callbacks.writePty],[Oj.deviceAttributes,this.callbacks.deviceAttributes],[Oj.size,this.callbacks.size],[Oj.bell,this.callbacks.bell],[Oj.xtversion,this.callbacks.xtversion]])this.call(`ghostty_terminal_set`,e,t[0],t[1]);return n}detachHost(e,t){this.call(`ghostty_terminal_set`,e,Oj.xtversion,0),this.call(`ghostty_terminal_set`,e,Oj.bell,0),this.call(`ghostty_terminal_set`,e,Oj.size,0),this.call(`ghostty_terminal_set`,e,Oj.deviceAttributes,0),this.call(`ghostty_terminal_set`,e,Oj.writePty,0),this.call(`ghostty_terminal_set`,e,Oj.userdata,0),this.hosts.delete(t)}view(e,t){return new DataView(this.memory.buffer,e,t)}bytes(e,t){return new Uint8Array(this.memory.buffer,e,t)}dataView(){return this.memoryView.buffer!==this.memory.buffer&&(this.memoryView=new DataView(this.memory.buffer)),this.memoryView}setField(e,t,n,r){let i=this.field(t,n),a=this.dataView(),o=e+i.offset;if(i.type===`bool`||i.type===`u8`)a.setUint8(o,r);else if(i.type===`u16`)a.setUint16(o,r,!0);else if(i.type===`i32`)a.setInt32(o,r,!0);else if(i.type===`u32`||i.type===`enum`)a.setUint32(o,r,!0);else if(i.type===`u64`)a.setBigUint64(o,BigInt(r),!0);else throw Error(`unsupported libghostty-vt field type ${i.type}`)}readField(e,t,n){let r=this.field(t,n),i=this.dataView(),a=e+r.offset;if(r.type===`bool`||r.type===`u8`)return i.getUint8(a);if(r.type===`u16`)return i.getUint16(a,!0);if(r.type===`i32`)return i.getInt32(a,!0);if(r.type===`u32`||r.type===`enum`)return i.getUint32(a,!0);if(r.type===`u64`)return Number(i.getBigUint64(a,!0));throw Error(`unsupported libghostty-vt field type ${r.type}`)}installCallbacks(){let e=new WebAssembly.Instance(new WebAssembly.Module(Dj),{env:{w:(e,t,n,r)=>{let i=this.hosts.get(t);i&&r!==0&&i.write(Mj.decode(new Uint8Array(this.memory.buffer,n,r)))},d:(e,t,n)=>this.hosts.has(t)?(this.writeDeviceAttributes(n),1):0,s:(e,t,n)=>{let r=this.hosts.get(t);if(!r)return 0;let i=r.size(),a=`GhosttySizeReportSize`;return this.setField(n,a,`rows`,i.rows),this.setField(n,a,`columns`,i.columns),this.setField(n,a,`cell_width`,i.cellWidth),this.setField(n,a,`cell_height`,i.cellHeight),1},b:(e,t)=>{this.hosts.get(t)?.bell()},v:(e,t,n)=>{let r=this.hosts.get(n);r&&this.writeVersion(e,r.version())},p:(e,t,n,r,i)=>this.decodePng(t,n,r,i)}}),t=this.exports.__indirect_function_table;if(!(t instanceof WebAssembly.Table))throw Error(`libghostty-vt did not expose its callback table`);let n=[`w`,`d`,`s`,`b`,`v`,`p`].map(n=>{let r=e.exports[n];if(typeof r!=`function`)throw Error(`libghostty-vt callback is missing: ${n}`);let i=t.length;return t.grow(1),t.set(i,r),i});if(this.callbacks={writePty:n[0],deviceAttributes:n[1],size:n[2],bell:n[3],xtversion:n[4]},this.call(`ghostty_sys_set`,kj,n[5])!==0)throw Error(`libghostty-vt did not accept the PNG decoder`)}decodePng(e,t,n,r){let i;try{i=Tj(new Uint8Array(this.memory.buffer,t,n))}catch(e){return console.warn(`could not decode a kitty PNG image`,e),0}let a=this.call(`ghostty_alloc`,e,i.data.length);if(a===0)return 0;this.bytes(a,i.data.length).set(i.data);let o=this.dataView();return o.setUint32(r+jj.width,i.width,!0),o.setUint32(r+jj.height,i.height,!0),o.setUint32(r+jj.data,a,!0),o.setUint32(r+jj.length,i.data.length,!0),1}writeVersion(e,t){let n=Nj.encode(t);this.free(this.version.pointer,this.version.size);let r=this.alloc(n.length);this.bytes(r,n.length).set(n),this.version={pointer:r,size:n.length},this.dataView().setUint32(e+this.field(`GhosttyString`,`ptr`).offset,r,!0),this.setField(e,`GhosttyString`,`len`,n.length)}writeDeviceAttributes(e){let t=e+this.field(`GhosttyDeviceAttributes`,`primary`).offset,n=e+this.field(`GhosttyDeviceAttributes`,`secondary`).offset,r=e+this.field(`GhosttyDeviceAttributes`,`tertiary`).offset,i=`GhosttyDeviceAttributesPrimary`,a=`GhosttyDeviceAttributesSecondary`,o=t+this.field(i,`features`).offset,s=this.dataView(),c=[4,22];c.forEach((e,t)=>s.setUint16(o+t*2,e,!0)),this.setField(t,i,`conformance_level`,62),this.setField(t,i,`num_features`,c.length),this.setField(n,a,`device_type`,0),this.setField(n,a,`firmware_version`,276),this.setField(n,a,`rom_cartridge`,0),this.setField(r,`GhosttyDeviceAttributesTertiary`,`unit_id`,0)}},Fj=null;async function Ij(){Fj=await Pj.load()}function Lj(){if(!Fj)throw Error(`libghostty-vt is not loaded`);return Fj}var Rj=new Map(`Unidentified.Backquote.Backslash.BracketLeft.BracketRight.Comma.Digit0.Digit1.Digit2.Digit3.Digit4.Digit5.Digit6.Digit7.Digit8.Digit9.Equal.IntlBackslash.IntlRo.IntlYen.KeyA.KeyB.KeyC.KeyD.KeyE.KeyF.KeyG.KeyH.KeyI.KeyJ.KeyK.KeyL.KeyM.KeyN.KeyO.KeyP.KeyQ.KeyR.KeyS.KeyT.KeyU.KeyV.KeyW.KeyX.KeyY.KeyZ.Minus.Period.Quote.Semicolon.Slash.AltLeft.AltRight.Backspace.CapsLock.ContextMenu.ControlLeft.ControlRight.Enter.MetaLeft.MetaRight.ShiftLeft.ShiftRight.Space.Tab.Convert.KanaMode.NonConvert.Delete.End.Help.Home.Insert.PageDown.PageUp.ArrowDown.ArrowLeft.ArrowRight.ArrowUp.NumLock.Numpad0.Numpad1.Numpad2.Numpad3.Numpad4.Numpad5.Numpad6.Numpad7.Numpad8.Numpad9.NumpadAdd.NumpadBackspace.NumpadClear.NumpadClearEntry.NumpadComma.NumpadDecimal.NumpadDivide.NumpadEnter.NumpadEqual.NumpadMemoryAdd.NumpadMemoryClear.NumpadMemoryRecall.NumpadMemoryStore.NumpadMemorySubtract.NumpadMultiply.NumpadParenLeft.NumpadParenRight.NumpadSubtract.NumpadSeparator.NumpadArrowUp.NumpadArrowDown.NumpadArrowRight.NumpadArrowLeft.NumpadBegin.NumpadHome.NumpadEnd.NumpadInsert.NumpadDelete.NumpadPageUp.NumpadPageDown.Escape.F1.F2.F3.F4.F5.F6.F7.F8.F9.F10.F11.F12.F13.F14.F15.F16.F17.F18.F19.F20.F21.F22.F23.F24.F25.Fn.FnLock.PrintScreen.ScrollLock.Pause.BrowserBack.BrowserFavorites.BrowserForward.BrowserHome.BrowserRefresh.BrowserSearch.BrowserStop.Eject.LaunchApp1.LaunchApp2.LaunchMail.MediaPlayPause.MediaSelect.MediaStop.MediaTrackNext.MediaTrackPrevious.Power.Sleep.AudioVolumeDown.AudioVolumeMute.AudioVolumeUp.WakeUp.Copy.Cut.Paste`.split(`.`).map((e,t)=>[e,t]));function zj(e){return Rj.get(e)??0}var Bj=new Map([[`!`,`1`],[`@`,`2`],[`#`,`3`],[`$`,`4`],[`%`,`5`],[`^`,`6`],[`&`,`7`],[`*`,`8`],[`(`,`9`],[`)`,`0`],[`~`,"`"],[`_`,`-`],[`+`,`=`],[`{`,`[`],[`}`,`]`],[`|`,`\\`],[`:`,`;`],[`"`,`'`],[`<`,`,`],[`>`,`.`],[`?`,`/`]]),Vj;function Hj(){return Vj||(Vj=globalThis.navigator?.keyboard?.getLayoutMap().catch(()=>void 0)??Promise.resolve(void 0),Vj)}function Uj(){return Vj=void 0,Hj()}function Wj(e){return!e.shiftKey||e.ctrlKey||e.altKey||e.metaKey?0:+([...e.key].length===1)}function Gj(e,t){if([...e.key].length!==1)return 0;let n=t?.get(e.code);if(n&&[...n].length===1)return n.codePointAt(0)??0;if(/^[A-Z]$/u.test(e.key))return e.key.charCodeAt(0)+32;if(e.shiftKey){let t=Bj.get(e.key);if(t)return t.codePointAt(0)??0;let n=e.key.toLowerCase();return n!==e.key&&[...n].length===1?n.codePointAt(0)??0:0}return e.key.codePointAt(0)??0}var Kj=new Map([[`Backquote`,"`"],[`Minus`,`-`],[`Equal`,`=`],[`BracketLeft`,`[`],[`BracketRight`,`]`],[`Backslash`,`\\`],[`Semicolon`,`;`],[`Quote`,`'`],[`Comma`,`,`],[`Period`,`.`],[`Slash`,`/`],[`Space`,` `]]),qj=[...`0123456789`].map(e=>[`Digit${e}`,e]),Jj=new Map([...Bj].map(e=>[e[1],e[0]]));function Yj(e){return/^Key[A-Z]$/u.test(e)?e[3].toLowerCase():/^Digit[0-9]$/u.test(e)?e[5]:Kj.get(e)}function Xj(e){return[...Kj,...qj].every(t=>t[0]===`Space`||e.get(t[0])===t[1])}function Zj(e,t){let n=t?.get(e.code),r=n&&[...n].length===1?n:Yj(e.code);if(r===void 0)return[...e.key].length===1?null:e.key;if(!e.shiftKey)return r;let i=r.toUpperCase();return i!==r&&[...i].length===1?i:t===void 0||!Xj(t)?null:Jj.get(r)??r}var Qj=new TextEncoder,$j=new Map([[`[`,`\x1B`],[`m`,`\r`],[`i`,` `],[`@`,`\0`]]),eM=class{runtime=Lj();terminal;keyEncoderSlot;keyEncoder;keyEventSlot;keyEvent;mouseEncoderSlot;mouseEncoder;mouseEventSlot;mouseEvent;scratch;keyboardLayoutMap;constructor(e){let t=this.runtime;this.terminal=e,this.loadKeyboardLayout(Hj()),this.keyEncoderSlot=t.allocOpaque(),t.check(`ghostty_key_encoder_new`,t.call(`ghostty_key_encoder_new`,0,this.keyEncoderSlot)),this.keyEncoder=t.readPointer(this.keyEncoderSlot),this.keyEventSlot=t.allocOpaque(),t.check(`ghostty_key_event_new`,t.call(`ghostty_key_event_new`,0,this.keyEventSlot)),this.keyEvent=t.readPointer(this.keyEventSlot),this.mouseEncoderSlot=t.allocOpaque(),t.check(`ghostty_mouse_encoder_new`,t.call(`ghostty_mouse_encoder_new`,0,this.mouseEncoderSlot)),this.mouseEncoder=t.readPointer(this.mouseEncoderSlot),this.mouseEventSlot=t.allocOpaque(),t.check(`ghostty_mouse_event_new`,t.call(`ghostty_mouse_event_new`,0,this.mouseEventSlot)),this.mouseEvent=t.readPointer(this.mouseEventSlot),this.scratch=t.alloc(1)}encodeKey(e,t=`press`,n=!1){let r=this.runtime,i=e.key.toLowerCase(),a=$j.get(i);if(a!==void 0&&t===`press`&&e.ctrlKey&&!e.altKey&&!e.metaKey&&!(e.shiftKey&&/^[a-z]$/u.test(i))&&!r.flag(`ghostty_terminal_get`,this.terminal,8))return a;let o=n?this.metaText(e):null,s=o??e.key;if(o!==null&&t===`press`&&!e.ctrlKey&&[...s].length===1&&(s.codePointAt(0)??0)>127&&r.flag(`ghostty_terminal_mode_get`,this.terminal,1036)&&this.isLegacyKeyboard())return`\x1b${s}`;r.call(`ghostty_key_encoder_setopt_from_terminal`,this.keyEncoder,this.terminal),r.call(`ghostty_key_event_set_action`,this.keyEvent,t===`release`?0:e.repeat?2:1),r.call(`ghostty_key_event_set_key`,this.keyEvent,zj(e.code));let c=+!!e.shiftKey|(e.ctrlKey?2:0)|(e.altKey?4:0)|(e.metaKey?8:0)|(e.getModifierState(`CapsLock`)?16:0)|(e.getModifierState(`NumLock`)?32:0);r.call(`ghostty_key_event_set_mods`,this.keyEvent,c),r.call(`ghostty_key_event_set_consumed_mods`,this.keyEvent,Wj(e)),r.call(`ghostty_key_event_set_composing`,this.keyEvent,+!!e.isComposing),r.call(`ghostty_key_event_set_unshifted_codepoint`,this.keyEvent,Gj({code:e.code,key:s,shiftKey:e.shiftKey},this.keyboardLayoutMap));let l=Qj.encode(s.length===1?s:``),u=l.length===0?0:r.alloc(l.length);u!==0&&r.bytes(u,l.length).set(l),r.call(`ghostty_key_event_set_utf8`,this.keyEvent,u,l.length);let d=r.encodeOutput((e,t,n)=>r.call(`ghostty_key_encoder_encode`,this.keyEncoder,this.keyEvent,e,t,n));return u!==0&&r.free(u,l.length),d}metaText(e){return Zj(e,this.keyboardLayoutMap)}refreshKeyboardLayout(){this.loadKeyboardLayout(Uj())}encodePaste(e){let t=this.runtime,n=Qj.encode(e);if(n.length===0)return``;let r=t.alloc(n.length);t.bytes(r,n.length).set(n);let i=+!!t.flag(`ghostty_terminal_mode_get`,this.terminal,2004),a=t.encodeOutput((e,a,o)=>t.call(`ghostty_paste_encode`,r,n.length,i,e,a,o));return t.free(r,n.length),a}encodeMouse(e){let t=this.runtime;t.call(`ghostty_mouse_encoder_setopt_from_terminal`,this.mouseEncoder,this.terminal);let n=t.layout(`GhosttyMouseEncoderSize`),r=t.alloc(n.size);for(let i of[[`size`,n.size],[`screen_width`,e.screenWidth],[`screen_height`,e.screenHeight],[`cell_width`,e.cellWidth],[`cell_height`,e.cellHeight],[`padding_top`,0],[`padding_bottom`,0],[`padding_right`,0],[`padding_left`,0]])t.setField(r,`GhosttyMouseEncoderSize`,i[0],Math.max(0,Math.round(i[1])));t.call(`ghostty_mouse_encoder_setopt`,this.mouseEncoder,2,r),t.free(r,n.size),t.bytes(this.scratch,1)[0]=+!!e.anyButtonPressed,t.call(`ghostty_mouse_encoder_setopt`,this.mouseEncoder,3,this.scratch),t.bytes(this.scratch,1)[0]=1,t.call(`ghostty_mouse_encoder_setopt`,this.mouseEncoder,4,this.scratch),t.call(`ghostty_mouse_event_set_action`,this.mouseEvent,{press:0,release:1,motion:2}[e.action]),e.button===null?t.call(`ghostty_mouse_event_clear_button`,this.mouseEvent):t.call(`ghostty_mouse_event_set_button`,this.mouseEvent,e.button),t.call(`ghostty_mouse_event_set_mods`,this.mouseEvent,e.mods);let i=t.layout(`GhosttyMousePosition`),a=t.alloc(i.size),o=t.view(a,i.size);return o.setFloat32(t.field(`GhosttyMousePosition`,`x`).offset,e.x,!0),o.setFloat32(t.field(`GhosttyMousePosition`,`y`).offset,e.y,!0),t.call(`ghostty_mouse_event_set_position`,this.mouseEvent,a),t.free(a,i.size),t.encodeOutput((e,n,r)=>t.call(`ghostty_mouse_encoder_encode`,this.mouseEncoder,this.mouseEvent,e,n,r))}dispose(){let e=this.runtime;e.call(`ghostty_mouse_event_free`,this.mouseEvent),e.call(`ghostty_mouse_encoder_free`,this.mouseEncoder),e.call(`ghostty_key_event_free`,this.keyEvent),e.call(`ghostty_key_encoder_free`,this.keyEncoder),e.free(this.scratch,1),e.freeOpaque(this.mouseEventSlot),e.freeOpaque(this.mouseEncoderSlot),e.freeOpaque(this.keyEventSlot),e.freeOpaque(this.keyEncoderSlot)}async loadKeyboardLayout(e){this.keyboardLayoutMap=await e}isLegacyKeyboard(){return this.encodeKey(new KeyboardEvent(`keydown`,{key:`Tab`,code:`Tab`,shiftKey:!0}))===`\x1B[Z`}},tM=26,nM=30,rM=1,iM={imageId:1,placementId:2,isVirtual:3,xOffset:4,yOffset:5,columns:10,rows:11,z:12},aM={width:3,height:4,format:5,data:7,length:8},oM={size:48,pixelWidth:4,pixelHeight:8,column:20,row:24,visible:28,sourceX:32,sourceY:36,sourceWidth:40,sourceHeight:44},sM=new Map([[0,3],[1,4],[3,2],[4,1]]),cM=new Map([773,781,782,784,786,829,830,831,838,842,843,844,848,849,850,855,859,867,868,869,870,871,872,873,874,875,876,877,878,879,1155,1156,1157,1158,1159,1426,1427,1428,1429,1431,1432,1433,1436,1437,1438,1439,1440,1441,1448,1449,1451,1452,1455,1476,1552,1553,1554,1555,1556,1557,1558,1559,1623,1624,1625,1626,1627,1629,1630,1750,1751,1752,1753,1754,1755,1756,1759,1760,1761,1762,1764,1767,1768,1771,1772,1840,1842,1843,1845,1846,1850,1853,1855,1856,1857,1859,1861,1863,1865,1866,2027,2028,2029,2030,2031,2032,2033,2035,2070,2071,2072,2073,2075,2076,2077,2078,2079,2080,2081,2082,2083,2085,2086,2087,2089,2090,2091,2092,2093,2385,2387,2388,3970,3971,3974,3975,4957,4958,4959,6109,6458,6679,6773,6774,6775,6776,6777,6778,6779,6780,7019,7021,7022,7023,7024,7025,7026,7027,7376,7377,7378,7386,7387,7392,7616,7617,7619,7620,7621,7622,7623,7624,7625,7627,7628,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7678,8400,8401,8404,8405,8406,8407,8411,8412,8417,8423,8425,8432,11503,11504,11505,11744,11745,11746,11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,42607,42620,42621,42736,42737,43232,43233,43234,43235,43236,43237,43238,43239,43240,43241,43242,43243,43244,43245,43246,43247,43248,43249,43696,43698,43699,43703,43704,43710,43711,43713,65056,65057,65058,65059,65060,65061,65062,68111,68152,119173,119174,119175,119176,119177,119210,119211,119212,119213,119362,119363,119364].map((e,t)=>[e,t]));function lM(e,t,n){let r=Array.from(e).slice(1,4).map(e=>cM.get(e.codePointAt(0)??0)??null),i=r[2]??null;return{imageId:t,placementId:n,row:r[0]??null,column:r[1]??null,imageIdHigh:i!==null&&i<256?i:null}}function uM(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n].cells,i=null;for(let e=0;e<r.length;e+=1){let a=r[e].placeholder;i!==null&&a!==null&&a.imageId===i.imageId&&a.placementId===i.placementId&&(a.row===null||a.row===i.row)&&(a.column===null||a.column===i.column+i.width)&&(a.imageIdHigh===null||a.imageIdHigh===i.imageIdHigh)?i.width+=1:(i!==null&&t.push(dM(i)),i=a===null?null:{x:e,y:n,imageId:a.imageId,imageIdHigh:a.imageIdHigh,placementId:a.placementId,row:a.row??0,column:a.column??0,width:1})}i!==null&&t.push(dM(i))}return t}function dM(e){return{x:e.x,y:e.y,imageId:e.imageId+(e.imageIdHigh??0)*2**24,placementId:e.placementId,row:e.row,column:e.column,width:e.width}}function fM(e,t,n,r){let i=t.columns===0?Math.ceil(n.width/r.width):t.columns,a=t.rows===0?Math.ceil(n.height/r.height):t.rows,o=i*r.width,s=a*r.height,c=n.width*s>n.height*o,l=c?o/Math.max(n.width,1):s/Math.max(n.height,1),u=c?0:(o-n.width*l)/2/l,d=c?(s-n.height*l)/2/l:0,f=n.width+u*2,p=n.height+d*2,m={x:f*e.column/i,y:p*e.row/a,width:f*e.width/i,height:p/a},h=0,g=0,_=e.width*r.width,v=r.height;if(m.y<d){let e=d-m.y;m.height-=e,g=e,v-=e*l,m.y=0,m.height>n.height&&(m.height=n.height,v=n.height*l)}else m.y+m.height>p-d?(m.y-=d,m.height=p-d-m.y-d,v=m.height*l):m.y-=d;if(m.x<u){let e=u-m.x;m.width-=e,h=e,_-=e*l,m.x=0,m.width>n.width&&(m.width=n.width,_=n.width*l)}else m.x+m.width>f-u?(m.x-=u,m.width=f-u-m.x-u,_=m.width*l):m.x-=u;if(m.width<=0||m.height<=0)return null;let y={xOffset:Math.round(h*l),yOffset:Math.round(g*l),width:Math.round(_),height:Math.round(v),source:{x:Math.round(m.x),y:Math.round(m.y),width:Math.round(m.width),height:Math.round(m.height)}};return y.width===0||y.height===0?null:y}function pM(e){let t=Lj(),n=t.alloc(16),r=t.call(`ghostty_terminal_get`,e,tM,n);return t.free(n,16),r===0}var mM=class{runtime=Lj();terminal;iteratorSlot;info;scratch;tail=[0,0];commands=0;cachedCommands=0;bitmaps=new Map;constructor(e){let t=this.runtime;this.terminal=e,this.iteratorSlot=t.allocOpaque(),t.check(`ghostty_kitty_graphics_placement_iterator_new`,t.call(`ghostty_kitty_graphics_placement_iterator_new`,0,this.iteratorSlot)),this.info=t.alloc(oM.size),this.scratch=t.alloc(16)}note(e){let t=[...this.tail,...e.subarray(0,2)],n=t.some((e,n)=>e===27&&t[n+1]===95&&t[n+2]===71),r=e.indexOf(27);for(;!n&&r!==-1;)n=e[r+1]===95&&e[r+2]===71,r=e.indexOf(27,r+1);n&&(this.commands+=1),this.tail=[...this.tail,...e.subarray(-2)].slice(-2)}images(e,t){this.commands!==this.cachedCommands&&(this.cachedCommands=this.commands,this.bitmaps.clear());let n=new Map,r=this.placements(e,t).map(e=>{let t=n.get(e.key)??this.bitmaps.get(e.key)??_M(e.image);return n.set(e.key,t),{placement:e,bitmap:t}});return this.bitmaps=n,r}dispose(){let e=this.runtime;e.call(`ghostty_kitty_graphics_placement_iterator_free`,e.readPointer(this.iteratorSlot)),e.free(this.info,oM.size),e.free(this.scratch,16),e.freeOpaque(this.iteratorSlot),this.bitmaps.clear()}placements(e,t){let n=this.runtime;n.check(`ghostty_terminal_get`,n.call(`ghostty_terminal_get`,this.terminal,nM,this.scratch));let r=n.readPointer(this.scratch);n.check(`ghostty_kitty_graphics_get`,n.call(`ghostty_kitty_graphics_get`,r,rM,this.iteratorSlot));let i=n.readPointer(this.iteratorSlot),a=[],o=[];for(;n.call(`ghostty_kitty_graphics_placement_next`,i);){let e=this.placementU32(i,iM.imageId);if(this.placementData(i,iM.isVirtual).getUint8(0)){o.push({imageId:e,placementId:this.placementU32(i,iM.placementId),columns:this.placementU32(i,iM.columns),rows:this.placementU32(i,iM.rows)});continue}let t=n.call(`ghostty_kitty_graphics_image`,r,e);if(t===0)throw Error(`kitty placement points to missing image ${e}`);n.bytes(this.info,oM.size).fill(0);let s=n.view(this.info,oM.size);s.setUint32(0,oM.size,!0),n.check(`ghostty_kitty_graphics_placement_render_info`,n.call(`ghostty_kitty_graphics_placement_render_info`,i,t,this.terminal,this.info)),s.getUint8(oM.visible)!==0&&a.push({...this.image(t,e),z:this.placementData(i,iM.z).getInt32(0,!0),column:s.getInt32(oM.column,!0),row:s.getInt32(oM.row,!0),xOffset:this.placementU32(i,iM.xOffset),yOffset:this.placementU32(i,iM.yOffset),width:s.getUint32(oM.pixelWidth,!0),height:s.getUint32(oM.pixelHeight,!0),source:{x:s.getUint32(oM.sourceX,!0),y:s.getUint32(oM.sourceY,!0),width:s.getUint32(oM.sourceWidth,!0),height:s.getUint32(oM.sourceHeight,!0)}})}if(o.length===0)return a;for(let i of uM(e)){let e=o.find(e=>e.imageId===i.imageId&&(i.placementId===0||e.placementId===i.placementId));if(e===void 0)continue;let s=n.call(`ghostty_kitty_graphics_image`,r,i.imageId);if(s===0)continue;let c=this.image(s,i.imageId),l=fM(i,e,c.image,t);l!==null&&a.push({...c,...l,z:-1,column:i.x,row:i.y})}return a}image(e,t){let n=this.imageData(e,aM.data),r=this.imageData(e,aM.length);return{key:`${t}:${n}:${r}`,image:{width:this.imageData(e,aM.width),height:this.imageData(e,aM.height),format:this.imageData(e,aM.format),pixels:this.runtime.bytes(n,r)}}}placementData(e,t){return this.runtime.bytes(this.scratch,4).fill(0),this.runtime.check(`ghostty_kitty_graphics_placement_get`,this.runtime.call(`ghostty_kitty_graphics_placement_get`,e,t,this.scratch)),this.runtime.view(this.scratch,4)}placementU32(e,t){return this.placementData(e,t).getUint32(0,!0)}imageData(e,t){return this.runtime.bytes(this.scratch,4).fill(0),this.runtime.check(`ghostty_kitty_graphics_image_get`,this.runtime.call(`ghostty_kitty_graphics_image_get`,e,t,this.scratch)),this.runtime.view(this.scratch,4).getUint32(0,!0)}};function hM(e,t,n,r,i){let a=r.width/i.width,o=r.height/i.height;for(let i of t){let t=i.placement;gM(t.z)===n&&e.drawImage(i.bitmap,t.source.x,t.source.y,t.source.width,t.source.height,t.column*r.width+t.xOffset*a,t.row*r.height+t.yOffset*o,t.width*a,t.height*o)}}function gM(e){return e<-1073741824?`belowBackground`:e<0?`belowText`:`aboveText`}function _M(e){let t=sM.get(e.format);if(t===void 0)throw Error(`unsupported kitty image format ${e.format}`);let n=e.width*e.height,r=e.pixels,i=new Uint8ClampedArray(n*4);if(t===4)i.set(r.subarray(0,n*4));else for(let e=0;e<n;e+=1){let n=e*t,a=e*4;t===3?i.set(r.subarray(n,n+3),a):i.fill(r[n],a,a+3),i[a+3]=t===2?r[n+1]:255}let a=new OffscreenCanvas(e.width,e.height),o=a.getContext(`2d`);if(!o)throw Error(`could not create a canvas for a kitty image`);return o.putImageData(new ImageData(i,e.width,e.height),0,0),a}var vM=8,yM=16,bM=0,xM=1,SM=2,CM=8,wM={cols:1,rows:2,dirty:3,rowIterator:4,background:5,foreground:6,cursor:7,cursorHasValue:8,cursorStyle:10,cursorVisible:11,cursorBlinking:12,cursorInViewport:14,cursorX:15,cursorY:16},TM={dirty:1,raw:2,cells:3},EM={raw:1,style:2,graphemesLength:3,graphemes:4,background:5,foreground:6,selected:7},DM={keys:0,values:20,graphemesLength:40,selected:44,background:48,foreground:52,written:56,size:60},OM={narrow:0,wide:1,spacerTail:2},kM={r:229,g:231,b:235},AM={r:0,g:0,b:0};function jM(e,t){return Math.floor((e*155+t*100)/255)}function MM(e,t){return{r:jM(e.r,t.r),g:jM(e.g,t.g),b:jM(e.b,t.b)}}function NM(e,t){let n=``;for(let r=0;r<t;r+=4096){let i=Math.min(4096,t-r),a=Array(i);for(let t=0;t<i;t+=1)a[t]=e.getUint32((r+t)*4,!0);n+=String.fromCodePoint(...a)}return n}function PM(e,t){return{text:``,wide:0,foreground:e,background:t,bold:!1,italic:!1,invisible:!1,strikethrough:!1,overline:!1,underline:0,underlineColor:null,selected:!1,placeholder:null}}function FM(e,t){let n=e.dataView();return{r:n.getUint8(t),g:n.getUint8(t+1),b:n.getUint8(t+2)}}function IM(e,t){let n=e.alloc(768);e.call(`ghostty_terminal_get`,t,21,n);let r=e.bytes(n,768),i=Array.from({length:256},(e,t)=>({r:r[t*3],g:r[t*3+1],b:r[t*3+2]}));return e.free(n,768),i}function LM(e,t){let n=[],r=[];return e.cells.forEach((e,i)=>{if(e.wide!==2)for(let a of(e.text||` `).split(``))n.push(a),r.push({x:i,y:t})}),{text:n.join(``),points:r}}var RM=class{runtime=Lj();stateSlot;state;rowIteratorSlot;rowCellsSlot;scratch;style;cellQuery;graphemes=0;graphemeCapacity=0;rows=[];palette=[];constructor(){let e=this.runtime;this.stateSlot=e.allocOpaque(),e.check(`ghostty_render_state_new`,e.call(`ghostty_render_state_new`,0,this.stateSlot)),this.state=e.readPointer(this.stateSlot),this.rowIteratorSlot=e.allocOpaque(),e.check(`ghostty_render_state_row_iterator_new`,e.call(`ghostty_render_state_row_iterator_new`,0,this.rowIteratorSlot)),this.rowCellsSlot=e.allocOpaque(),e.check(`ghostty_render_state_row_cells_new`,e.call(`ghostty_render_state_row_cells_new`,0,this.rowCellsSlot)),this.scratch=e.alloc(16),this.style=e.alloc(e.layout(`GhosttyStyle`).size),this.cellQuery=e.alloc(DM.size);let t=e.dataView();[[EM.style,this.style],[EM.graphemesLength,this.cellQuery+DM.graphemesLength],[EM.selected,this.cellQuery+DM.selected],[EM.background,this.cellQuery+DM.background],[EM.foreground,this.cellQuery+DM.foreground]].forEach((e,n)=>{t.setUint32(this.cellQuery+DM.keys+n*4,e[0],!0),t.setUint32(this.cellQuery+DM.values+n*4,e[1],!0)})}snapshot(e,t){let n=this.runtime;n.check(`ghostty_render_state_update`,n.call(`ghostty_render_state_update`,this.state,e));let r=this.getRender(wM.cols,2),i=this.getRender(wM.rows,2),a=this.getRender(wM.dirty,4),o=this.getColor(wM.foreground,kM),s=this.getColor(wM.background,AM),c=this.getRender(wM.cursorHasValue,1)===0?o:this.getColor(wM.cursor,o),l=this.getRender(wM.cursorInViewport,1)!==0,u=this.getRender(wM.cursorVisible,1)!==0&&l;(this.rows.length!==i||this.rows.some(e=>e.cells.length!==r))&&(this.rows=Array.from({length:i},()=>({cells:Array.from({length:r},()=>PM(o,s)),isWrapContinuation:!1,wrapsToNext:!1})));let d=new Set;if(a!==0){this.palette=IM(n,e),n.check(`ghostty_render_state_get`,n.call(`ghostty_render_state_get`,this.state,wM.rowIterator,this.rowIteratorSlot));let c=n.readPointer(this.rowIteratorSlot),l=0;for(;l<i&&n.call(`ghostty_render_state_row_iterator_next`,c)!==0;)(a===2||this.getRowFlag(c,TM.dirty))&&(this.rows[l]=this.readRow(c,r,o,s,t),d.add(l),n.bytes(this.scratch,1)[0]=0,n.call(`ghostty_render_state_row_set`,c,0,this.scratch)),l+=1;n.view(this.scratch,4).setUint32(0,0,!0),n.call(`ghostty_render_state_set`,this.state,0,this.scratch)}return{cols:r,rows:i,foreground:o,background:s,cursor:c,cursorX:l?this.getRender(wM.cursorX,2):-1,cursorY:l?this.getRender(wM.cursorY,2):-1,cursorVisible:u,cursorBlinking:this.getRender(wM.cursorBlinking,1)!==0,cursorStyle:this.getRender(wM.cursorStyle,4),dirtyRows:d,rowData:this.rows}}invalidate(){this.rows=[]}dispose(){let e=this.runtime,t=e.readPointer(this.rowCellsSlot);t&&e.call(`ghostty_render_state_row_cells_free`,t);let n=e.readPointer(this.rowIteratorSlot);n&&e.call(`ghostty_render_state_row_iterator_free`,n),e.call(`ghostty_render_state_free`,this.state),e.free(this.style,e.layout(`GhosttyStyle`).size),e.free(this.cellQuery,DM.size),e.free(this.scratch,16),e.free(this.graphemes,this.graphemeCapacity),e.freeOpaque(this.rowCellsSlot),e.freeOpaque(this.rowIteratorSlot),e.freeOpaque(this.stateSlot)}readRow(e,t,n,r,i){let a=this.runtime;a.check(`ghostty_render_state_row_get`,a.call(`ghostty_render_state_row_get`,e,TM.raw,this.scratch));let o=a.view(this.scratch,8).getBigUint64(0,!0);a.bytes(this.scratch+8,1)[0]=0,a.call(`ghostty_row_get`,o,2,this.scratch+8);let s=a.bytes(this.scratch+8,1)[0]!==0;a.bytes(this.scratch+8,1)[0]=0,a.call(`ghostty_row_get`,o,1,this.scratch+8);let c=a.bytes(this.scratch+8,1)[0]!==0;a.check(`ghostty_render_state_row_get`,a.call(`ghostty_render_state_row_get`,e,TM.cells,this.rowCellsSlot));let l=a.readPointer(this.rowCellsSlot),u=a.layout(`GhosttyStyle`),d=u.size,f=u.fields,p=[];for(;p.length<t&&a.call(`ghostty_render_state_row_cells_next`,l)!==0;){a.bytes(this.style,d).fill(0),a.setField(this.style,`GhosttyStyle`,`size`,d);let e=a.call(`ghostty_render_state_row_cells_get_multi`,l,5,this.cellQuery+DM.keys,this.cellQuery+DM.values,this.cellQuery+DM.written),t=a.dataView(),o=t.getUint32(this.cellQuery+DM.written,!0);o<3&&a.check(`ghostty_render_state_row_cells_get_multi`,e);let s=t.getUint32(this.cellQuery+DM.graphemesLength,!0),c=t.getUint8(this.cellQuery+DM.selected)!==0,u=o>=4?FM(a,this.cellQuery+DM.background):r,m=o===5?FM(a,this.cellQuery+DM.foreground):o===3?this.getCellColor(l,n):n,h=``;if(s>0){let e=s*4;if(e>this.graphemeCapacity){let t=Math.max(e,this.graphemeCapacity*2),n=a.alloc(t);a.free(this.graphemes,this.graphemeCapacity),this.graphemes=n,this.graphemeCapacity=t}a.call(`ghostty_render_state_row_cells_get`,l,EM.graphemes,this.graphemes)===0&&(h=NM(a.view(this.graphemes,e),s))}let g=0;if(h.length===0&&p.at(-1)?.text.length){a.call(`ghostty_render_state_row_cells_get`,l,EM.raw,this.scratch);let e=a.view(this.scratch,8).getBigUint64(0,!0);a.view(this.scratch+8,4).setUint32(0,0,!0),a.call(`ghostty_cell_get`,e,3,this.scratch+8),g=a.view(this.scratch+8,4).getUint32(0,!0)}let _=a.dataView(),v=e=>_.getUint8(this.style+f[e].offset)!==0,y=v(`bold`);if(i&&y&&_.getUint32(this.style+vM,!0)===xM){let e=_.getUint8(this.style+yM);e<8&&(m=this.palette[e+8]??m)}if(v(`inverse`)){let e=m;m=u,u=e}v(`faint`)&&(m=MM(m,u));let b=this.style+f.underline_color.offset,x=_.getUint32(b,!0),S=b+CM,C=null;h.codePointAt(0)===1109742&&(C=lM(h,this.colorId(this.style+vM),this.colorId(b)),h=``),p.push({text:h,wide:g,foreground:m,background:u,bold:y,italic:v(`italic`),invisible:v(`invisible`),strikethrough:v(`strikethrough`),overline:v(`overline`),underline:_.getInt32(this.style+f.underline.offset,!0),underlineColor:x===xM?this.palette[_.getUint8(S)]:x===SM?FM(a,S):null,selected:c,placeholder:C})}for(;p.length<t;)p.push(PM(n,r));return{cells:p,isWrapContinuation:s,wrapsToNext:c}}getRender(e,t){this.runtime.bytes(this.scratch,4).fill(0),this.runtime.check(`ghostty_render_state_get`,this.runtime.call(`ghostty_render_state_get`,this.state,e,this.scratch));let n=this.runtime.view(this.scratch,4);return t===1?n.getUint8(0):t===2?n.getUint16(0,!0):n.getUint32(0,!0)}getColor(e,t){return this.runtime.bytes(this.scratch,3).fill(0),this.runtime.call(`ghostty_render_state_get`,this.state,e,this.scratch)===0?FM(this.runtime,this.scratch):t}getRowFlag(e,t){return this.runtime.bytes(this.scratch,1)[0]=0,this.runtime.call(`ghostty_render_state_row_get`,e,t,this.scratch)===0&&this.runtime.bytes(this.scratch,1)[0]!==0}getCellColor(e,t){return this.runtime.bytes(this.scratch,3).fill(0),this.runtime.call(`ghostty_render_state_row_cells_get`,e,EM.foreground,this.scratch)===0?FM(this.runtime,this.scratch):t}colorId(e){let t=this.runtime.dataView(),n=t.getUint32(e,!0);if(n===bM)return 0;if(n===xM)return t.getUint8(e+CM);if(n===SM){let t=FM(this.runtime,e+CM);return t.r<<16|t.g<<8|t.b}throw Error(`unknown style color tag ${n}`)}},zM=16,BM=589824,VM=381888,HM=5e7,UM=new TextDecoder;function WM(e){let t=[...e],n=[0,95,135,175,215,255];for(let e=16;e<232;e+=1){let r=e-16;t.push({r:n[Math.floor(r/36)],g:n[Math.floor(r/6)%6],b:n[r%6]})}for(let e=0;e<24;e+=1){let n=8+e*10;t.push({r:n,g:n,b:n})}return t}var GM=class{encoder;kitty;runtime=Lj();terminalSlot;terminal;renderState;formatterSlot;formatter;scratch;point;scrollbar;host;hostId=0;sizeReport;disposed=!1;boldIsBright=!1;version=``;constructor(e,t,n,r,i){let a=this.runtime,o=a.layout(`GhosttyTerminalOptions`).size,s=a.alloc(o);a.setField(s,`GhosttyTerminalOptions`,`cols`,e),a.setField(s,`GhosttyTerminalOptions`,`rows`,t);let c=Math.floor(VM/(8*(e+1)));a.setField(s,`GhosttyTerminalOptions`,`max_scrollback`,n===0?0:Math.min((Math.ceil(n/c)+1)*BM,HM)),this.terminalSlot=a.allocOpaque();let l=a.call(`ghostty_terminal_new`,0,this.terminalSlot,s);if(a.free(s,o),a.check(`ghostty_terminal_new`,l),this.terminal=a.readPointer(this.terminalSlot),!pM(this.terminal))throw a.call(`ghostty_terminal_free`,this.terminal),a.freeOpaque(this.terminalSlot),Error(`libghostty-vt was built without kitty graphics, build it with scripts/build-ghostty-wasm.mts`);this.sizeReport={rows:t,columns:e,cellWidth:1,cellHeight:1},this.host={write:r,size:()=>this.sizeReport,bell:i,version:()=>this.version},this.hostId=a.attachHost(this.terminal,this.host),this.renderState=new RM,this.encoder=new eM(this.terminal),this.kitty=new mM(this.terminal);let u=`GhosttyFormatterTerminalOptions`,d=a.layout(u),f=a.alloc(d.size),p=a.field(u,`extra`),m=a.field(`GhosttyFormatterTerminalExtra`,`screen`);a.setField(f,u,`size`,d.size),a.setField(f,u,`trim`,1),a.setField(f+p.offset,`GhosttyFormatterTerminalExtra`,`size`,p.size),a.setField(f+p.offset+m.offset,`GhosttyFormatterScreenExtra`,`size`,m.size),this.formatterSlot=a.allocOpaque();let h=a.call(`ghostty_formatter_terminal_new`,0,this.formatterSlot,this.terminal,f);a.free(f,d.size),a.check(`ghostty_formatter_terminal_new`,h),this.formatter=a.readPointer(this.formatterSlot),this.scratch=a.alloc(16),this.point=a.alloc(a.layout(`GhosttyPoint`).size),this.scrollbar=a.alloc(a.layout(`GhosttyTerminalScrollbar`).size)}write(e){if(e.length===0)return;this.kitty.note(e);let t=this.runtime.alloc(e.length);this.runtime.bytes(t,e.length).set(e),this.runtime.call(`ghostty_terminal_vt_write`,this.terminal,t,e.length),this.runtime.free(t,e.length)}setReplies(e){e&&this.hostId===0?this.hostId=this.runtime.attachHost(this.terminal,this.host):!e&&this.hostId!==0&&(this.runtime.detachHost(this.terminal,this.hostId),this.hostId=0)}reset(){this.runtime.call(`ghostty_terminal_reset`,this.terminal),this.renderState.invalidate()}resize(e,t,n,r,i){this.sizeReport={rows:t,columns:e,cellWidth:Math.max(1,Math.round(n*i)),cellHeight:Math.max(1,Math.round(r*i))},this.runtime.check(`ghostty_terminal_resize`,this.runtime.call(`ghostty_terminal_resize`,this.terminal,Math.max(1,Math.min(65535,e)),Math.max(1,Math.min(65535,t)),this.sizeReport.cellWidth,this.sizeReport.cellHeight))}setColors(e){let t=this.runtime.alloc(3);for(let n of[[11,e.foreground],[12,e.background],[13,e.cursor]]){let e=n[1];this.runtime.bytes(t,3).set([e.r,e.g,e.b]),this.runtime.call(`ghostty_terminal_set`,this.terminal,n[0],t)}this.runtime.free(t,3);let n=WM(e.palette),r=this.runtime.alloc(n.length*3);this.runtime.bytes(r,n.length*3).set(n.flatMap(e=>[e.r,e.g,e.b])),this.runtime.call(`ghostty_terminal_set`,this.terminal,14,r),this.runtime.free(r,n.length*3),this.renderState.invalidate()}setCursor(e,t){let n={bar:0,block:1,underline:2}[e];this.runtime.view(this.scratch,4).setUint32(0,n,!0),this.runtime.call(`ghostty_terminal_set`,this.terminal,22,this.scratch),this.runtime.bytes(this.scratch,1)[0]=+!!t,this.runtime.call(`ghostty_terminal_set`,this.terminal,23,this.scratch)}title(){if(this.runtime.bytes(this.scratch,8).fill(0),this.runtime.call(`ghostty_terminal_get`,this.terminal,12,this.scratch)!==0)return``;let e=this.runtime.view(this.scratch,8),t=e.getUint32(0,!0),n=e.getUint32(4,!0);return n===0?``:UM.decode(this.runtime.bytes(t,n))}screenText(){let e=this.runtime.alloc(8),t=this.runtime.call(`ghostty_formatter_format_alloc`,this.formatter,0,e,e+4),n=this.runtime.view(e,8),r=n.getUint32(0,!0),i=n.getUint32(4,!0);if(this.runtime.free(e,8),t!==0)return``;let a=UM.decode(this.runtime.bytes(r,i));return this.runtime.call(`ghostty_free`,0,r,i),a}scroll(e){let t=this.runtime.layout(`GhosttyTerminalScrollViewport`),n=this.runtime.alloc(t.size);this.runtime.setField(n,`GhosttyTerminalScrollViewport`,`tag`,2);let r=this.runtime.field(`GhosttyTerminalScrollViewport`,`value`);this.runtime.view(n+r.offset,r.size).setInt32(0,e,!0),this.runtime.call(`ghostty_terminal_scroll_viewport`,this.terminal,n),this.runtime.free(n,t.size)}scrollToBottom(){let e=this.runtime.layout(`GhosttyTerminalScrollViewport`),t=this.runtime.alloc(e.size);this.runtime.setField(t,`GhosttyTerminalScrollViewport`,`tag`,1),this.runtime.call(`ghostty_terminal_scroll_viewport`,this.terminal,t),this.runtime.free(t,e.size)}scrollbarState(){let e=this.runtime.layout(`GhosttyTerminalScrollbar`);return this.runtime.bytes(this.scrollbar,e.size).fill(0),this.runtime.call(`ghostty_terminal_get`,this.terminal,9,this.scrollbar)===0?{total:this.runtime.readField(this.scrollbar,`GhosttyTerminalScrollbar`,`total`),offset:this.runtime.readField(this.scrollbar,`GhosttyTerminalScrollbar`,`offset`),len:this.runtime.readField(this.scrollbar,`GhosttyTerminalScrollbar`,`len`)}:null}isMouseTracking(){return this.flag(`ghostty_terminal_get`,11)}isMouseAnyEventTracking(){return this.flag(`ghostty_terminal_mode_get`,1003)}isFocusReporting(){return this.flag(`ghostty_terminal_mode_get`,1004)}isSynchronizedOutput(){return this.flag(`ghostty_terminal_mode_get`,2026)}endSynchronizedOutput(){this.runtime.check(`ghostty_terminal_mode_set`,this.runtime.call(`ghostty_terminal_mode_set`,this.terminal,2026,0))}currentColors(){return{foreground:this.terminalColor(18),background:this.terminalColor(19),cursor:this.terminalColor(20),palette:IM(this.runtime,this.terminal)}}isApplicationCursorKeys(){return this.flag(`ghostty_terminal_mode_get`,1)}isKittyKeyboard(){return this.flag(`ghostty_terminal_get`,8)}isAlternateScreen(){return this.runtime.dataView().setUint32(this.scratch,0,!0),this.runtime.call(`ghostty_terminal_get`,this.terminal,6,this.scratch)===0&&this.runtime.dataView().getUint32(this.scratch,!0)===1}setSelection(e,t){let n=this.runtime.layout(`GhosttyGridRef`).size,r=this.gridRef(e.x,e.y,2);try{let e=this.gridRef(t.x,t.y,2),i=this.runtime.layout(`GhosttySelection`),a=this.runtime.alloc(i.size);this.runtime.setField(a,`GhosttySelection`,`size`,i.size);let o=this.runtime.field(`GhosttySelection`,`start`),s=this.runtime.field(`GhosttySelection`,`end`);this.runtime.bytes(a+o.offset,o.size).set(this.runtime.bytes(r,o.size)),this.runtime.bytes(a+s.offset,s.size).set(this.runtime.bytes(e,s.size)),this.runtime.call(`ghostty_terminal_set`,this.terminal,21,a),this.runtime.free(e,n),this.runtime.free(a,i.size)}finally{this.runtime.free(r,n)}}selectWord(e){return this.selectAt(`GhosttyTerminalSelectWordOptions`,`ghostty_terminal_select_word`,e)}selectLine(e){return this.selectAt(`GhosttyTerminalSelectLineOptions`,`ghostty_terminal_select_line`,e)}clearSelection(){this.runtime.call(`ghostty_terminal_set`,this.terminal,21,0)}selectionText(){let e=this.runtime.alloc(zM),t=this.runtime.view(e,zM);t.setUint32(0,zM,!0),t.setUint8(8,1),t.setUint8(9,1);let n=this.runtime.encodeOutput((t,n,r)=>this.runtime.call(`ghostty_terminal_selection_format_buf`,this.terminal,e,t,n,r));return this.runtime.free(e,zM),n}hyperlinkAt(e,t){let n=this.gridRef(e,t,1),r=this.hyperlinkOf(n);return this.runtime.free(n,this.runtime.layout(`GhosttyGridRef`).size),r}toScreen(e){let t=this.gridRef(e.x,e.y,1),n=this.pointFromGridRef(t,2);return this.runtime.free(t,this.runtime.layout(`GhosttyGridRef`).size),n}trackCursor(){let e=this.runtime.allocOpaque(),t=this.runtime.call(`ghostty_terminal_grid_ref_track`,this.terminal,this.cursorPoint(),e),n=this.runtime.readPointer(e);return this.runtime.freeOpaque(e),this.runtime.check(`ghostty_terminal_grid_ref_track`,t),n}retrack(e){let t=this.runtime.call(`ghostty_tracked_grid_ref_set`,e,this.terminal,this.cursorPoint());this.runtime.check(`ghostty_tracked_grid_ref_set`,t)}trackedPoint(e){return this.runtime.call(`ghostty_tracked_grid_ref_point`,e,2,this.scratch)===0?{x:this.runtime.readField(this.scratch,`GhosttyPointCoordinate`,`x`),y:this.runtime.readField(this.scratch,`GhosttyPointCoordinate`,`y`)}:null}trackedHyperlink(e){let t=this.runtime.layout(`GhosttyGridRef`).size,n=this.runtime.alloc(t);this.runtime.setField(n,`GhosttyGridRef`,`size`,t);let r=this.runtime.call(`ghostty_tracked_grid_ref_snapshot`,e,n)===0?this.hyperlinkOf(n):null;return this.runtime.free(n,t),r}untrack(e){this.runtime.call(`ghostty_tracked_grid_ref_free`,e)}snapshot(){return this.renderState.snapshot(this.terminal,this.boldIsBright)}invalidate(){this.renderState.invalidate()}cellSize(){return{width:this.sizeReport.cellWidth,height:this.sizeReport.cellHeight}}dispose(){if(this.disposed)return;this.disposed=!0;let e=this.runtime;e.call(`ghostty_formatter_free`,this.formatter),this.encoder.dispose(),this.kitty.dispose(),this.renderState.dispose(),this.hostId!==0&&e.detachHost(this.terminal,this.hostId),e.call(`ghostty_terminal_free`,this.terminal),e.free(this.scrollbar,e.layout(`GhosttyTerminalScrollbar`).size),e.free(this.scratch,16),e.free(this.point,e.layout(`GhosttyPoint`).size),e.freeOpaque(this.formatterSlot),e.freeOpaque(this.terminalSlot)}hyperlinkOf(e){let t=this.runtime.encodeOutput((t,n,r)=>this.runtime.call(`ghostty_grid_ref_hyperlink_uri`,e,t,n,r));return t===``?null:t}cursorPosition(){this.runtime.dataView().setUint32(this.scratch,0,!0),this.runtime.call(`ghostty_terminal_get`,this.terminal,3,this.scratch),this.runtime.call(`ghostty_terminal_get`,this.terminal,4,this.scratch+2);let e=this.runtime.dataView();return{x:e.getUint16(this.scratch,!0),y:e.getUint16(this.scratch+2,!0)}}cursorPoint(){let e=this.cursorPosition();return this.fillPoint(this.point,e.x,e.y,0),this.point}fillPoint(e,t,n,r){this.runtime.setField(e,`GhosttyPoint`,`tag`,r);let i=this.runtime.field(`GhosttyPoint`,`value`),a=this.runtime.dataView();a.setUint16(e+i.offset,Math.max(0,t),!0),a.setUint32(e+i.offset+4,Math.max(0,n),!0)}gridRef(e,t,n){let r=this.runtime.alloc(this.runtime.layout(`GhosttyPoint`).size);this.fillPoint(r,e,t,n);let i=this.runtime.layout(`GhosttyGridRef`).size,a=this.runtime.alloc(i);this.runtime.setField(a,`GhosttyGridRef`,`size`,i);let o=this.runtime.call(`ghostty_terminal_grid_ref`,this.terminal,r,a);return this.runtime.free(r,this.runtime.layout(`GhosttyPoint`).size),o!==0&&(this.runtime.free(a,i),this.runtime.check(`ghostty_terminal_grid_ref`,o)),a}selectAt(e,t,n){let r=this.gridRef(n.x,n.y,2),i=this.runtime.layout(e),a=this.runtime.layout(`GhosttySelection`),o=this.runtime.alloc(i.size),s=this.runtime.alloc(a.size);this.runtime.setField(o,e,`size`,i.size);let c=this.runtime.field(e,`ref`);this.runtime.bytes(o+c.offset,c.size).set(this.runtime.bytes(r,c.size)),this.runtime.setField(s,`GhosttySelection`,`size`,a.size);let l=null;if(this.runtime.call(t,this.terminal,o,s)===0){let e=this.pointFromGridRef(s+this.runtime.field(`GhosttySelection`,`start`).offset,2),t=this.pointFromGridRef(s+this.runtime.field(`GhosttySelection`,`end`).offset,2);e&&t&&(l={start:e,end:t})}return this.runtime.free(s,a.size),this.runtime.free(r,this.runtime.layout(`GhosttyGridRef`).size),this.runtime.free(o,i.size),l}pointFromGridRef(e,t){let n=this.runtime.layout(`GhosttyPointCoordinate`),r=this.runtime.alloc(n.size),i=this.runtime.call(`ghostty_terminal_point_from_grid_ref`,this.terminal,e,t,r)===0?{x:this.runtime.readField(r,`GhosttyPointCoordinate`,`x`),y:this.runtime.readField(r,`GhosttyPointCoordinate`,`y`)}:null;return this.runtime.free(r,n.size),i}flag(e,t){return this.runtime.flag(e,this.terminal,t)}terminalColor(e){return this.runtime.bytes(this.scratch,3).fill(0),this.runtime.check(`ghostty_terminal_get`,this.runtime.call(`ghostty_terminal_get`,this.terminal,e,this.scratch)),FM(this.runtime,this.scratch)}};function KM(e,t){let n=[],r=e.toLowerCase(),i=t.toLowerCase(),a=r.indexOf(i);for(;a!==-1;)n.push(a),a=r.indexOf(i,a+i.length);return n}var qM=class{core;redraw;listeners=new Set;query=``;matches=[];activeMatch=-1;stale=!1;timer=null;constructor(e,t){this.core=e,this.redraw=t}find(e,t,n,r){let i=this.matches[this.activeMatch]??null;if(this.query=e,this.refresh(),this.matches.length===0)this.activeMatch=-1;else if(n||i===null){let e=i?.row??r,t=this.matches.findIndex(t=>t.row>=e);this.activeMatch=t===-1?this.matches.length-1:t}else{let e=this.matches.findIndex(e=>e.row===i.row&&e.index===i.index),n=e===-1?0:e,r=t?-1:1;this.activeMatch=(n+r+this.matches.length)%this.matches.length}return this.emit(),this.matches[this.activeMatch]??null}onResults(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}clear(){this.query=``,this.matches=[],this.activeMatch=-1}outputChanged(){this.query!==``&&(this.stale=!0,this.timer===null&&(this.timer=window.setTimeout(()=>{if(this.timer=null,!this.stale||this.query===``)return;let e=this.matches[this.activeMatch];this.refresh();let t=e?this.matches.findIndex(t=>t.row===e.row&&t.index===e.index):-1;this.activeMatch=t===-1?this.matches.length-1:t,this.emit(),this.redraw()},200)))}highlights(e,t){if(this.query===``)return[];let n=this.matches[this.activeMatch],r=[];return e.rowData.forEach((e,i)=>{let a=LM(e,i);KM(a.text,this.query).forEach((e,o)=>{let s=a.points[e],c=a.points[e+this.query.length-1];s&&c&&r.push({row:i,start:s.x,end:c.x+1,active:n?.row===t+i&&n.index===o})})}),r}dispose(){this.timer!==null&&window.clearTimeout(this.timer),this.timer=null}refresh(){this.stale=!1,this.matches=[],this.query!==``&&this.core.screenText().split(`
|
|
15
|
+
`).forEach((e,t)=>{KM(e,this.query).forEach((e,n)=>this.matches.push({row:t,index:n}))})}emit(){let e={resultIndex:this.activeMatch,resultCount:this.matches.length};for(let t of this.listeners)t(e)}},JM=new TextDecoder;function YM(e){function t(e){return e.toString(16).padStart(2,`0`).repeat(2)}return`rgb:${t(e.r)}/${t(e.g)}/${t(e.b)}`}function XM(e){return Math.min(Math.max(e,0),100)}function ZM(e){return JM.decode(Uint8Array.from(atob(e),e=>e.charCodeAt(0)))}function QM(e){return e===``?`s0`:[...e].filter(e=>`cpqs01234567`.includes(e)).join(``)}function $M(e){try{return ZM(e)}catch(e){return console.warn(`invalid clipboard sequence`,e),null}}function eN(e,t,n){let r=Array.from(new TextEncoder().encode(e),e=>String.fromCharCode(e)).join(``);return`\x1b]52;${t};${btoa(r)}${n}`}function tN(e,t,n){let r=e===`10;?`?t.foreground:e===`11;?`?t.background:t.cursor;return`\x1b]${e.slice(0,2)};${YM(r)}${n}`}function nN(e,t,n){let r=e.split(`;`),i=[];for(let e=1;e+1<r.length;e+=2){if(r[e+1]!==`?`||!/^\d+$/.test(r[e]))continue;let a=t[Number(r[e])];a!==void 0&&i.push(`\x1b]4;${r[e]};${YM(a)}${n}`)}return i}function rN(e,t){let n=e.split(`;`);if(n.length>4)return null;let r=n[2]===void 0||n[2]===``?0:Number(n[2]),i=n[3]===void 0||n[3]===``?-1:Number(n[3]);return!Number.isInteger(r)||!Number.isInteger(i)?null:r===0?{state:r,value:0}:r===1?i<0?null:{state:r,value:XM(i)}:r===2||r===4?i<0?{state:r,value:t.value}:{state:r,value:XM(i||t.value)}:r===3?{state:r,value:t.value}:null}function iN(e,t){if(e.startsWith(`9;`)&&!/^9;\d+(;|$)/.test(e))return{title:``,body:JM.decode(t.subarray(2))};if(e.startsWith(`777;notify;`)){let e=JM.decode(t).split(`;`);return{title:e[2]??``,body:e.slice(3).join(`;`)}}return null}var aN=class{pending={id:``,title:``,body:``};add(e){let t=e.indexOf(`;`,3);if(t===-1)return null;let n=new Map;for(let r of e.slice(3,t).split(`:`)){let e=r.indexOf(`=`);e!==-1&&n.set(r.slice(0,e),r.slice(e+1))}let r=n.get(`p`)??`title`;if(r===`?`||r===`close`||r===`alive`)return null;let i=e.slice(t+1);if(n.get(`e`)===`1`)try{i=ZM(i)}catch(e){return console.warn(`invalid notification sequence`,e),null}let a=n.get(`i`)??``;if(a!==this.pending.id&&(this.pending={id:a,title:``,body:``}),r===`title`&&(this.pending.title+=i),r===`body`&&(this.pending.body+=i),n.get(`d`)===`0`)return null;let o=this.pending;return this.pending={id:``,title:``,body:``},o.title===``&&o.body===``?null:{title:o.title,body:o.body}}},oN=27,sN=7,cN=24,lN=26,uN=33554432,dN=class{state=`ground`;params=``;collecting=!1;chunks=[];size=0;reset(){this.state=`ground`,this.drop()}scan(e,t){let n=0;for(let r=0;r<e.length;r+=1){let i=e[r];if(i===cN||i===lN)this.state=`ground`,this.drop();else if(this.state===`ground`)i===oN&&(this.state=`escape`);else if(this.state===`escape`){if(this.params=``,i===93){this.state=`osc`,this.begin(),n=r+1;continue}if(i===80){this.state=`dcsHeader`;continue}this.state=i===oN?`escape`:`ground`}else if(this.state===`osc`){if(i===sN){if(this.state=`ground`,this.append(e,n,r),t({type:`osc`,data:this.take(),terminator:`\x07`},r+1))return r+1;continue}i===oN&&(this.state=`oscEscape`,this.append(e,n,r))}else if(this.state===`oscEscape`){if(i===92){if(this.state=`ground`,t({type:`osc`,data:this.take(),terminator:`\x1B\\`},r+1))return r+1;continue}this.drop(),this.state=`escape`,--r}else if(this.state===`dcsHeader`){if(i===oN){this.state=`dcsEscape`;continue}if(i>=32&&i<=63){this.params.length<16&&(this.params+=String.fromCharCode(i));continue}this.state=`dcs`,i===113&&/^[0-9;]*$/.test(this.params)&&(this.begin(),n=r+1)}else if(this.state===`dcs`)i===oN&&(this.state=`dcsEscape`,this.append(e,n,r));else if(i===92){if(this.state=`ground`,this.collecting&&t({type:`sixel`,data:this.take()},r+1))return r+1}else this.drop(),this.state=`escape`,--r}return(this.state===`osc`||this.state===`dcs`)&&this.append(e,n,e.length),e.length}begin(){this.collecting=!0,this.chunks=[],this.size=0}append(e,t,n){!this.collecting||n<=t||(this.size+n-t>uN?this.drop():(this.chunks.push(e.slice(t,n)),this.size+=n-t))}take(){let e=new Uint8Array(this.size),t=0;for(let n of this.chunks)e.set(n,t),t+=n.length;return this.drop(),e}drop(){this.collecting=!1,this.chunks=[],this.size=0}},fN=`0101.0202.1010.2020.........0110.0210.0120.0220.0011.0012.0021.0022.1100.1200.2100.2200.1001.1002.2001.2002.1110.1210.2110.1120.2120.2210.1220.2220.1011.1012.2011.1021.2021.2012.1022.2022.0111.0112.0211.0212.0121.0122.0221.0222.1101.1102.1201.1202.2101.2102.2201.2202.1111.1112.1211.1212.2111.1121.2121.2112.2211.1122.1221.2212.1222.2122.2221.2222`.split(`.`),pN=[`0001`,`1000`,`0100`,`0010`,`0002`,`2000`,`0200`,`0020`,`0201`,`1020`,`0102`,`2010`],mN=`0303.3030.0310.0130.0330.0013.0031.0033.1300.3100.3300.1003.3001.3003.1310.3130.3330.1013.3031.3033.0313.0131.0333.1303.3101.3303.1313.3131.3333`.split(`.`),hN=[0,0,4,4],gN=[4,0,4,4],_N=[0,4,4,4],vN=[4,4,4,4],yN=[[[0,0,8,4]],[[0,7,8,1]],[[0,6,8,2]],[[0,5,8,3]],[[0,4,8,4]],[[0,3,8,5]],[[0,2,8,6]],[[0,1,8,7]],[[0,0,8,8]],[[0,0,7,8]],[[0,0,6,8]],[[0,0,5,8]],[[0,0,4,8]],[[0,0,3,8]],[[0,0,2,8]],[[0,0,1,8]],[[4,0,4,8]],[],[],[],[[0,0,8,1]],[[7,0,1,8]],[_N],[vN],[hN],[hN,_N,vN],[hN,vN],[hN,gN,_N],[hN,gN,vN],[gN],[gN,_N],[gN,_N,vN]],bN={9617:.25,9618:.5,9619:.75},xN={9581:[1,1],9582:[-1,1],9583:[-1,-1],9584:[1,-1]};function SN(e){return e>=9472&&e<=9547?fN[e-9472]:e>=9552&&e<=9580?mN[e-9552]:e>=9588&&e<=9599?pN[e-9588]:``}function CN(e){if(e.length!==1)return!1;let t=e.charCodeAt(0);return SN(t)!==``||xN[t]!==void 0||t>=9600&&t<=9631}function wN(e){return Math.max(1,Math.round(e.height/20))}function TN(e,t,n){let[r,i,a,o]=t,s=wN(n),c=s*2,l=Math.floor(Math.max(0,n.height-s)/2),u=l+s,d=Math.floor(Math.max(0,n.height-c)/2),f=d+c,p=Math.max(0,l-s),m=u+s,h=Math.floor(Math.max(0,n.width-s)/2),g=h+s,_=Math.floor(Math.max(0,n.width-c)/2),v=_+c,y=Math.max(0,h-s),b=g+s;function x(t,r,i,a){e.fillRect(n.left+t,n.top+r,i-t,a-r)}let S=o===`2`||i===`2`?f:o!==i||a===r?o===`3`||i===`3`?m:u:o===`0`&&i===`0`?u:l,C=o===`2`||i===`2`?d:o!==i||r===a?o===`3`||i===`3`?p:l:o===`0`&&i===`0`?l:u,w=r===`2`||a===`2`?v:r!==a||o===i?r===`3`||a===`3`?b:g:r===`0`&&a===`0`?g:h,T=r===`2`||a===`2`?_:r!==a||i===o?r===`3`||a===`3`?y:h:r===`0`&&a===`0`?h:g;r===`1`&&x(h,0,g,S),r===`2`&&x(_,0,v,S),r===`3`&&(x(y,0,h,o===`3`?l:S),x(g,0,b,i===`3`?l:S)),i===`1`&&x(T,l,n.width,u),i===`2`&&x(T,d,n.width,f),i===`3`&&(x(r===`3`?g:T,p,n.width,l),x(a===`3`?g:T,u,n.width,m)),a===`1`&&x(h,C,g,n.height),a===`2`&&x(_,C,v,n.height),a===`3`&&(x(y,o===`3`?u:C,h,n.height),x(g,i===`3`?u:C,b,n.height)),o===`1`&&x(0,l,w,u),o===`2`&&x(0,d,w,f),o===`3`&&(x(0,p,r===`3`?h:w,l),x(0,u,a===`3`?h:w,m))}function EN(e,[t,n],r){let i=wN(r),a=r.left+Math.floor(Math.max(0,r.width-i)/2)+i/2,o=r.top+Math.floor(Math.max(0,r.height-i)/2)+i/2,s=t===1?r.left+r.width:r.left,c=n===1?r.top+r.height:r.top,l=Math.min(r.width,r.height)/2;e.save(),e.strokeStyle=e.fillStyle,e.lineWidth=i,e.beginPath(),e.moveTo(a,c),e.arcTo(a,o,s,o,l),e.lineTo(s,o),e.stroke(),e.restore()}function DN(e,t,n,r){e.save(),e.setTransform(1,0,0,1,0,0),ON(e,t.charCodeAt(0),{left:Math.round(n.left*r),top:Math.round(n.top*r),width:Math.round((n.left+n.width)*r)-Math.round(n.left*r),height:Math.round((n.top+n.height)*r)-Math.round(n.top*r)}),e.restore()}function ON(e,t,n){let r=SN(t);if(r!==``){TN(e,r,n);return}let i=xN[t];if(i!==void 0){EN(e,i,n);return}let a=bN[t];if(a!==void 0)e.globalAlpha=a,e.fillRect(n.left,n.top,n.width,n.height);else for(let[r,i,a,o]of yN[t-9600]){let t=n.left+Math.round(n.width*r/8),s=n.top+Math.round(n.height*i/8);e.fillRect(t,s,n.left+Math.round(n.width*(r+a)/8)-t,n.top+Math.round(n.height*(i+o)/8)-s)}}function kN(e){return`rgb(${e.r}, ${e.g}, ${e.b})`}function AN(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b}function jN(e,t){return Math.round(e*t)/t}function MN(e,t,n,r){let i=jN(e*n.width,r);return{left:i,width:jN(t*n.width,r)-i}}function NN(e,t,n,r,i){let a=i-2,o=n+r;if(t===1)e.fillRect(n,a,r,1);else if(t===2)e.fillRect(n,a,r,1),e.fillRect(n,a-2,r,1);else if(t===3){function t(e){return a-1+Math.sin(e/3*Math.PI)*1.5}e.save(),e.strokeStyle=e.fillStyle,e.lineWidth=1,e.beginPath(),e.moveTo(n,t(n));for(let r=Math.floor(n)+1;r<o;r+=1)e.lineTo(r,t(r));e.lineTo(o,t(o)),e.stroke(),e.restore()}else if(t===4)for(let t=Math.ceil(n/2)*2;t<o;t+=2)e.fillRect(t,a,1,1);else if(t===5)for(let t=Math.floor(n/5)*5;t<o;t+=5){let r=Math.max(t,n),i=Math.min(t+3,o);i>r&&e.fillRect(r,a,i-r,1)}else throw Error(`unknown underline style ${t}`)}function PN(e,t){return e.selected===t.selected&&AN(e.foreground,t.foreground)&&e.bold===t.bold&&e.italic===t.italic&&e.invisible===t.invisible}function FN(e,t){return`${e.italic?`italic`:`normal`} ${e.bold?700:400} ${t.fontSize}px ${t.fontFamily}`}function IN(e,t,n,r,i){e.font=`normal 400 ${t}px ${n}`;let a=e.measureText(`M`).width,o=e.measureText(`Mg`),s=o.fontBoundingBoxAscent||t,c=s+o.fontBoundingBoxDescent,l=Math.max(1,Math.round(c*r*i))/i;return{width:Math.max(1,Math.round(a*i))/i,height:l,baseline:jN((l-c)/2+s,i),faceWidth:a}}function LN(e){return/^[!-/:-@[-`{-~]$/.test(e)}function RN(e,t,n){return!(e===null||t<e.start.y||t>e.end.y||t===e.start.y&&n<e.start.x||t===e.end.y&&n>e.end.x)}function zN(e){let{context:t,snapshot:n,metrics:r,appearance:i,cursorOn:a,previousCursorY:o,pixelRatio:s}=e,c=e.forceFull?Array.from({length:n.rows},(e,t)=>t):[...n.dirtyRows];o!==null&&!c.includes(o)&&c.push(o),n.cursorVisible&&n.cursorY>=0&&!c.includes(n.cursorY)&&c.push(n.cursorY),e.forceFull&&(t.save(),t.resetTransform(),t.fillStyle=kN(n.background),t.fillRect(0,0,t.canvas.width,t.canvas.height),t.restore());function l(e){let t=e*r.height,n=jN(t,s);return{top:t,cellTop:n,cellHeight:jN(t+r.height,s)-n}}t.textBaseline=`alphabetic`;for(let e of c){if(!n.rowData[e])continue;let{cellTop:r,cellHeight:i}=l(e);t.fillStyle=kN(n.background),t.fillRect(0,r,t.canvas.width,i)}e.drawLayer(`belowBackground`);for(let a of c){let o=n.rowData[a];if(!o)continue;let{cellTop:c,cellHeight:u}=l(a),d=0;for(;d<o.cells.length;){let e=o.cells[d],a=d+1;for(;a<o.cells.length&&o.cells[a].selected===e.selected&&AN(o.cells[a].background,e.background);)a+=1;let{left:l,width:f}=MN(d,a,r,s);e.selected?(t.fillStyle=i.selectionBackground,t.fillRect(l,c,f,u)):AN(e.background,n.background)||(t.fillStyle=kN(e.background),t.fillRect(l,c,f,u)),d=a}for(let n of e.highlights){if(n.row!==a)continue;let{left:e,width:o}=MN(n.start,n.end,r,s);t.fillStyle=i.matchBackground,t.fillRect(e,c,o,u),n.active&&(t.strokeStyle=i.activeMatchBorder,t.strokeRect(e+.5,c+.5,o-1,u-1))}}e.drawLayer(`belowText`);for(let a of c){let o=n.rowData[a];if(!o)continue;let{top:c,cellTop:u,cellHeight:d}=l(a);t.save(),t.beginPath(),t.rect(0,u,t.canvas.width,d),t.clip();for(let e=0;e<o.cells.length;e+=1){let n=o.cells[e];if(n.invisible||n.text.trim().length===0)continue;t.fillStyle=n.selected?i.selectionForeground:kN(n.foreground);let a=e*r.width;if(CN(n.text)){DN(t,n.text,{left:a,top:c,width:r.width,height:r.height},s);continue}t.font=FN(n,i);let l=a+(r.width-r.faceWidth)/2,u=e,d=e+1;if(i.ligatures&&LN(n.text)){for(;u>e-3&&u>0&&LN(o.cells[u-1].text)&&PN(o.cells[u-1],n);)--u;for(;d<e+4&&d<o.cells.length&&LN(o.cells[d].text)&&PN(o.cells[d],n);)d+=1}d-u===1?t.fillText(n.text,l,c+r.baseline):(t.save(),t.beginPath(),t.rect(a,c,r.width,r.height),t.clip(),t.fillText(o.cells.slice(u,d).map(e=>e.text).join(``),l-(e-u)*r.faceWidth,c+r.baseline),t.restore())}t.restore();for(let n=0;n<o.cells.length;n+=1){let i=o.cells[n],l=RN(e.hoveredLink,a,n);if(i.underline===0&&!i.strikethrough&&!i.overline&&!l)continue;let{left:f,width:p}=MN(n,n+1,r,s),m=u+d;t.fillStyle=kN(i.foreground),i.strikethrough&&t.fillRect(f,c+Math.floor(r.height*.55),p,1),i.overline&&t.fillRect(f,u+1,p,1),i.underline===0?l&&NN(t,1,f,p,m):(i.underlineColor!==null&&(t.fillStyle=kN(i.underlineColor)),NN(t,i.underline,f,p,m))}}if(!a||!n.cursorVisible||n.cursorX<0||n.cursorY<0)return;let u=n.cursorY*r.height,d=jN(u,s),f=jN(u+r.height,s)-d,p=n.rowData[n.cursorY]?.cells,m=p?.[n.cursorX],h=p?.[n.cursorX+1]?.wide===OM.spacerTail?2:1,{left:g,width:_}=MN(n.cursorX,n.cursorX+h,r,s);t.fillStyle=kN(n.cursor),t.strokeStyle=kN(n.cursor),!e.focused||n.cursorStyle===3?t.strokeRect(g+.5,d+.5,_-1,f-1):n.cursorStyle===0?t.fillRect(g,d,1,f):n.cursorStyle===2?t.fillRect(g,d+f-2,_,2):(t.fillRect(g,d,_,f),m?.text&&(t.fillStyle=i.cursorText,CN(m.text)?DN(t,m.text,{left:n.cursorX*r.width,top:u,width:r.width,height:r.height},s):(t.font=FN(m,i),t.fillText(m.text,n.cursorX*r.width+(r.width-r.faceWidth)/2,u+r.baseline))))}var BN=navigator.userAgent.includes(`Mac`),VN=500,HN=/https?:\/\/[^\s"'`<>]+/g;function UN(e){return e===0?1:e===1?3:e===2?2:null}function WN(e,t){let n=Math.max(0,e.total-e.len);if(t<=0||e.len<=0||n===0)return null;let r=Math.min(t,Math.max(20,t*e.len/e.total)),i=t-r;return{thumbHeight:r,thumbTop:i*(Math.min(e.offset,n)/n),travel:i,maxOffset:n}}var GN=class{hoveredLink=null;context;linkPointer=null;mousePointer=null;mouseButton=null;lastMotion=``;selectionPointer=null;selectionMode=`cell`;selectionAnchor=null;selectionBase=null;selectionMoved=!1;selectionScroll=null;selectionScrollDelta=0;selectionClient=null;clickMove=null;clicks={count:0,time:0,x:0,y:0};touch=null;wheelRemainder=0;scrollbarDrag=null;constructor(e){this.context=e;let t=e.canvas,n=e.scrollbar;t.addEventListener(`pointerdown`,this.onPointerDown),t.addEventListener(`pointermove`,this.onPointerMove),t.addEventListener(`pointerup`,this.onPointerUp),t.addEventListener(`pointercancel`,this.onPointerUp),t.addEventListener(`pointerleave`,this.onPointerLeave),t.addEventListener(`wheel`,this.onWheel,{passive:!1}),t.addEventListener(`mousedown`,this.onMouseDown),n.addEventListener(`pointerdown`,this.onScrollbarDown),n.addEventListener(`pointermove`,this.onScrollbarMove),n.addEventListener(`pointerup`,this.onScrollbarUp),n.addEventListener(`pointercancel`,this.onScrollbarUp)}updateScrollbar(e){let t=this.context.core.scrollbarState(),n=t===null?null:WN(t,e);this.context.scrollbar.hidden=n===null,n!==null&&(this.context.thumb.style.height=`${n.thumbHeight}px`,this.context.thumb.style.transform=`translateY(${n.thumbTop}px)`)}dispose(){this.setSelectionScroll(0)}scrollRows(e,t){let n=this.context.core,r=this.wheelRemainder+e/this.context.view().metrics.height,i=Math.trunc(r);if(this.wheelRemainder=r-i,i!==0){if(this.reportsMouse(t))for(let e=0;e<Math.abs(i);e+=1)this.sendMouse(`press`,i<0?4:5,t);else if(n.isAlternateScreen()){let e=(n.isApplicationCursorKeys()?`\x1BO`:`\x1B[`)+(i<0?`A`:`B`);this.context.onData(e.repeat(Math.abs(i)))}else this.context.scrollViewport(i)}}cellAt(e,t){let n=this.context.view(),r=this.context.canvas.getBoundingClientRect();return{x:Math.max(0,Math.min(n.cols-1,Math.floor((e-r.left)/n.metrics.width))),y:Math.max(0,Math.min(n.rows-1,Math.floor((t-r.top)/n.metrics.height)))}}reportsMouse(e){return this.context.core.isMouseTracking()&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey}sendMouse(e,t,n){let r=this.context.view(),i=this.context.canvas.getBoundingClientRect(),a=window.devicePixelRatio||1,o=this.context.core.encoder.encodeMouse({action:e,button:t,mods:+!!n.shiftKey|(n.ctrlKey?2:0)|(n.altKey?4:0)|(n.metaKey?8:0),x:Math.max(0,n.clientX-i.left)*a,y:Math.max(0,n.clientY-i.top)*a,screenWidth:r.cols*r.metrics.width*a,screenHeight:r.rows*r.metrics.height*a,cellWidth:r.metrics.width*a,cellHeight:r.metrics.height*a,anyButtonPressed:n.buttons!==0});if(o.length!==0){if(e===`motion`){if(o===this.lastMotion)return;this.lastMotion=o}else this.lastMotion=``;this.context.onData(o)}}linkAt(e,t){let n=this.context.view(),r=this.context.core,i=n.snapshot;if(!i)return null;let a=this.context.canvas.getBoundingClientRect(),o=e-a.left,s=t-a.top;if(o<0||s<0||o>=n.cols*n.metrics.width||s>=n.rows*n.metrics.height)return null;let c={x:Math.floor(o/n.metrics.width),y:Math.floor(s/n.metrics.height)},l=r.hyperlinkAt(c.x,c.y);if(l!==null){if(l.startsWith(`offsite-image:`))return null;let e=c.x,t=c.x;for(;e>0&&r.hyperlinkAt(e-1,c.y)===l;)--e;for(;t<n.cols-1&&r.hyperlinkAt(t+1,c.y)===l;)t+=1;return{uri:l,range:{start:{x:e,y:c.y},end:{x:t,y:c.y}}}}let u=c.y;for(;u>0&&i.rowData[u]?.isWrapContinuation;)--u;let d=c.y;for(;d<i.rows-1&&i.rowData[d]?.wrapsToNext;)d+=1;let f=``,p=[];for(let e=u;e<=d;e+=1){let t=i.rowData[e];if(!t)break;let n=LM(t,e);f+=n.text,p.push(...n.points)}for(let e of f.matchAll(HN)){let t=e[0].replace(/[.,;:!?)\]}'"]+$/,``),n=p[e.index],r=p[e.index+t.length-1];if(!n||!r)continue;let i={start:n,end:r};if(RN(i,c.y,c.x))return{uri:t,range:i}}return null}setHoveredLink(e){let t=this.hoveredLink;this.context.canvas.style.cursor=e?`pointer`:``,(t?.uri!==e?.uri||t?.range.start.x!==e?.range.start.x||t?.range.start.y!==e?.range.start.y)&&(this.hoveredLink=e,this.context.redraw())}beginSelection(e,t){let n=this.context.core,r=this.cellAt(e.clientX,e.clientY),i=n.toScreen(r);if(!i)return;this.selectionMoved=!1,this.selectionMode=t>=3?`line`:t===2?`word`:`cell`;let a=this.selectionMode===`line`?n.selectLine(i):this.selectionMode===`word`?n.selectWord(i):null;this.selectionAnchor=a?a.start:i,this.selectionBase=a,a?n.setSelection(a.start,a.end):(this.selectionMode=`cell`,n.setSelection(i,i)),this.context.redraw()}extendSelection(e,t){let n=this.context.core,r=this.selectionAnchor;if(!r)return;let i=this.cellAt(e,t),a=n.toScreen(i);if(!a)return;this.selectionMoved=!0;let o=this.selectionBase;if(o===null)n.setSelection(r,a);else{let e=this.selectionMode===`line`?n.selectLine(a):n.selectWord(a),t=a.y<o.start.y||a.y===o.start.y&&a.x<o.start.x;n.setSelection(t?o.end:o.start,e?t?e.start:e.end:a)}this.context.redraw()}setSelectionScroll(e){this.selectionScrollDelta=e,e===0?(this.selectionScroll!==null&&window.clearInterval(this.selectionScroll),this.selectionScroll=null):this.selectionScroll===null&&(this.selectionScroll=window.setInterval(()=>{this.context.scrollViewport(this.selectionScrollDelta);let e=this.selectionClient;e&&this.extendSelection(e.x,e.y)},80))}dragScrollbar(e){let t=this.context.core.scrollbarState(),n=this.scrollbarDrag;if(t===null||n===null)return;let r=this.context.scrollbar.getBoundingClientRect(),i=WN(t,r.height);if(i===null||i.travel===0)return;let a=Math.max(0,Math.min(e-r.top-n.offset,i.travel)),o=Math.round(a/i.travel*i.maxOffset);this.context.scrollViewport(o-t.offset)}onPointerDown=e=>{let t=this.context.canvas;if(this.context.focus(),e.pointerType===`touch`){this.touch={id:e.pointerId,y:e.clientY,moved:!1},t.setPointerCapture(e.pointerId);return}if(this.reportsMouse(e)){let n=UN(e.button);if(n===null)return;e.preventDefault(),this.mousePointer=e.pointerId,this.mouseButton=n,this.sendMouse(`press`,n,e),t.setPointerCapture(e.pointerId);return}if(e.button!==0)return;if(this.linkAt(e.clientX,e.clientY)&&(BN?e.metaKey:e.ctrlKey)){e.preventDefault(),this.linkPointer=e.pointerId;return}let n=e.timeStamp-this.clicks.time<=VN&&Math.hypot(e.clientX-this.clicks.x,e.clientY-this.clicks.y)<=4;this.clicks={count:n?this.clicks.count>=3?1:this.clicks.count+1:1,time:e.timeStamp,x:e.clientX,y:e.clientY},this.clickMove=!e.altKey&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&this.context.view().clickToMoveCursor&&this.clicks.count===1?this.cellAt(e.clientX,e.clientY):null,this.selectionPointer=e.pointerId,this.beginSelection(e,this.clicks.count),t.setPointerCapture(e.pointerId)};onPointerMove=e=>{let t=this.touch;if(t?.id===e.pointerId){let n=t.y-e.clientY;if(Math.abs(n)<1)return;t.y=e.clientY,t.moved=!0,this.scrollRows(n,e)}else if(this.mousePointer===e.pointerId||this.context.core.isMouseAnyEventTracking()&&this.reportsMouse(e)){let t=e.buttons,n=t&1?1:t&4?3:t&2?2:null;this.sendMouse(`motion`,n,e)}else if(this.selectionPointer===e.pointerId){let t=this.cellAt(e.clientX,e.clientY);this.clickMove!==null&&(t.x!==this.clickMove.x||t.y!==this.clickMove.y)&&(this.clickMove=null),this.selectionClient={x:e.clientX,y:e.clientY};let n=this.context.canvas.getBoundingClientRect();this.setSelectionScroll(e.clientY<n.top?-1:+(e.clientY>n.bottom)),this.extendSelection(e.clientX,e.clientY)}else this.setHoveredLink(this.linkAt(e.clientX,e.clientY))};onPointerUp=e=>{let t=this.context.canvas;if(t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),this.touch?.id===e.pointerId)this.touch=null;else if(this.linkPointer===e.pointerId){this.linkPointer=null;let t=this.linkAt(e.clientX,e.clientY);t&&e.type===`pointerup`&&this.context.onLink(t.uri,e)}else if(this.mousePointer===e.pointerId)this.sendMouse(`release`,this.mouseButton,e),this.mousePointer=null,this.mouseButton=null;else if(this.selectionPointer===e.pointerId){this.selectionPointer=null,this.setSelectionScroll(0),!this.selectionMoved&&this.selectionMode===`cell`&&(this.context.core.clearSelection(),this.selectionAnchor=null,this.context.redraw());let t=this.clickMove;this.clickMove=null,t!==null&&e.type===`pointerup`&&this.context.moveCursorTo(t)}};onPointerLeave=()=>{this.lastMotion=``,this.setHoveredLink(null)};onWheel=e=>{if(e.deltaY===0)return;e.preventDefault();let t=this.context.view(),n=e.deltaMode===1?e.deltaY*t.metrics.height:e.deltaMode===2?e.deltaY*t.rows*t.metrics.height:e.deltaY;this.scrollRows(n,e)};onMouseDown=e=>{e.button===0&&e.preventDefault(),this.context.focus()};onScrollbarDown=e=>{let t=this.context.core.scrollbarState();if(e.button!==0||t===null)return;let n=this.context.scrollbar,r=n.getBoundingClientRect(),i=WN(t,r.height);i!==null&&(e.preventDefault(),e.stopPropagation(),this.scrollbarDrag={id:e.pointerId,offset:e.target===this.context.thumb?e.clientY-r.top-i.thumbTop:i.thumbHeight/2},n.setPointerCapture(e.pointerId),this.dragScrollbar(e.clientY))};onScrollbarMove=e=>{this.scrollbarDrag?.id===e.pointerId&&(e.preventDefault(),this.dragScrollbar(e.clientY))};onScrollbarUp=e=>{if(this.scrollbarDrag?.id!==e.pointerId)return;this.scrollbarDrag=null;let t=this.context.scrollbar;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}},KN=[`\r`,`
|
|
16
|
+
`,``,``,``,``,`\x1B[99;5u`,`\x1B[100;5u`,`\x1B[111;5u`,`\x1B[122;5u`];function qN(e,t){return e.y<t.y||e.y===t.y&&e.x<t.x}var JN=class{shell=`unknown`;generation=0;core;native=!1;input=!1;clickEvents=!1;inputRef=null;constructor(e){this.core=e}mark(e,t){let n=e.startsWith(`133;`),r=n?4:5;if(e.length>r+1&&e[r+1]!==`;`)return;let i=e.charAt(r);if(!this.core.isAlternateScreen()){if(i===`A`){let r=e.split(`;`);if(r.includes(`k=s`)||r.includes(`k=c`))return;let i=n&&r.includes(`click_events=1`),a=this.shell===`prompt`,o=a&&!this.input&&this.native!==n;if(this.shell=`prompt`,this.native=n,t&&this.trackInput(),o){this.clickEvents=this.clickEvents||i;return}if(this.input=!1,this.clickEvents=i,a)return;this.generation+=1}else if(i===`B`)this.shell=`prompt`,this.input=!0,t&&this.trackInput();else if(i===`C`)this.shell=`command`;else if(i===`D`){if(this.shell===`prompt`&&!this.input)return;this.shell=`unknown`}}}beforeInput(e){this.shell===`prompt`&&KN.some(t=>e.includes(t))&&(this.shell=`unknown`)}reset(){this.release(),this.shell=`unknown`,this.input=!1,this.clickEvents=!1}release(){this.inputRef!==null&&this.core.untrack(this.inputRef),this.inputRef=null}moveCursorInput(e,t,n){if(this.shell!==`prompt`||this.inputRef===null||t===null||t.cursorX<0||t.cursorY<0||this.core.isAlternateScreen()||this.core.isMouseTracking())return null;let r=this.core.trackedPoint(this.inputRef);if(r===null)return null;let i={x:r.x,y:r.y-n};if(qN(e,i))return null;if(this.clickEvents){let t=this.core.scrollbarState();if(t===null)return null;let r=e.y+n-(t.total-t.len);return r<0?null:`\x1b[<0;${e.x+1};${r+1}M`}if(!this.input)return null;let a={x:e.x,y:e.y};a.x>0&&t.rowData[a.y]?.cells[a.x]?.wide===OM.spacerTail&&--a.x;let o={x:t.cursorX,y:t.cursorY};if(qN(a,i)||qN(o,i))return null;let s=qN(a,o),c=s?a:o,l=s?o:a,u=0;for(let e=c.y;e<=l.y;e+=1){let n=t.rowData[e];if(n===void 0)return null;let r=e===l.y?l.x:n.cells.length;for(let t=e===c.y?c.x:0;t<r;t+=1)n.cells[t].text!==``&&(u+=1);if(e<l.y&&!n.wrapsToNext){if(s)return null;break}}let d=s?`ArrowLeft`:`ArrowRight`,f=this.core.encoder.encodeKey(new KeyboardEvent(`keydown`,{key:d,code:d}));return u>0?f.repeat(u):``}trackInput(){this.inputRef===null?this.inputRef=this.core.trackCursor():this.core.retrack(this.inputRef)}},YN=navigator.userAgent.includes(`Mac`),XN=navigator.userAgent.includes(`Windows`),ZN=600,QN=1e3,$N=1e4,eP=new TextDecoder(`latin1`),tP=new TextDecoder;function nP(e){let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!t)throw Error(`unsupported color ${e}`);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}}function rP(e){return[...e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>/^(['"]).*\1$/.test(e)||/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e)?e:`"${e.replaceAll(`"`,``)}"`),`monospace`].join(`, `)}async function iP(e){try{(await e)?.close()}catch(e){console.warn(`could not decode image`,e)}}var aP=class{element;cols=80;rows=24;canvas;input;context;core;scanner=new dN;handlers;observer;prompt;search;images;pointer;notifications=new aN;options;appearance;metrics;snapshot=null;sized=!1;fitted=!1;frame=0;forceFull=!0;renderFailed=!1;cursorOn=!0;cursorTimer=null;syncTimer=null;renderedCursorY=null;focused=!1;composing=!1;suppressedKeys=new Set;heldOptionKeys=new Set;backlog=[];blocked=!1;epoch=0;title=``;progress={state:0,value:0};disposed=!1;constructor(e,t){this.options=e,this.handlers=t,this.element=document.createElement(`div`),this.element.className=`relative h-full overflow-hidden`,this.canvas=document.createElement(`canvas`),this.canvas.className=`absolute top-0 left-0 cursor-text touch-none`,this.input=document.createElement(`textarea`),this.input.setAttribute(`aria-label`,`Terminal input`),this.input.autocapitalize=`off`,this.input.autocomplete=`off`,this.input.spellcheck=!1,this.input.style.cssText=`position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;padding:0;border:0;resize:none;pointer-events:none;`;let n=document.createElement(`div`);n.className=`absolute top-0 right-0 bottom-0 w-2 cursor-default touch-none`,n.hidden=!0;let r=document.createElement(`div`);r.className=`bg-foreground/15 hover:bg-foreground/30 absolute inset-x-0.5 top-0 rounded-full`,n.append(r),this.element.append(this.canvas,this.input,n);let i=this.canvas.getContext(`2d`,{alpha:!1});if(!i)throw Error(`canvas 2d is unavailable`);this.context=i,this.appearance=this.appearanceFor(e),this.metrics=this.measure(),this.core=new GM(Math.max(1,Math.floor(window.innerWidth/this.metrics.width)),this.rows,e.scrollback,t.onReply,t.onBell),this.prompt=new JN(this.core),this.search=new qM(this.core,()=>this.redraw()),this.images=new Ej(this.core),this.pointer=new GN({canvas:this.canvas,scrollbar:n,thumb:r,core:this.core,view:()=>({cols:this.cols,rows:this.rows,metrics:this.metrics,snapshot:this.snapshot,clickToMoveCursor:this.options.clickToMoveCursor}),focus:()=>this.focus(),redraw:()=>this.redraw(),scrollViewport:e=>this.scrollViewport(e),moveCursorTo:e=>this.moveCursorTo(e),onData:t.onData,onLink:t.onLink}),this.applyTerminalOptions(),this.resizeCore(),this.installEvents(),this.observer=new ResizeObserver(()=>this.fit()),this.observer.observe(this.element)}setOptions(e){this.options=e,this.appearance=this.appearanceFor(e),this.metrics=this.measure(),e.clickToMoveCursor||this.prompt.release(),this.applyTerminalOptions(),this.resizeCore(),this.forceFull=!0,this.fit(),this.requestRender()}write(e,t){this.disposed||(this.backlog.push({data:e,replay:t}),this.blocked||this.drain())}reset(){this.epoch+=1,this.backlog=[],this.blocked=!1,this.scanner.reset(),this.prompt.reset(),this.core.reset(),this.applyTerminalOptions(),this.images.clear(),this.core.clearSelection(),this.redraw()}focus(){this.input.focus({preventScroll:!0})}isKittyKeyboard(){return this.core.isKittyKeyboard()}paste(e){let t=this.core.encoder.encodePaste(e);t.length>0&&this.sendInput(t)}presize(e,t){this.fitted||e===this.cols&&t===this.rows||(this.cols=e,this.rows=t,this.resizeCore())}fit(){if(this.disposed)return;let e=this.element.clientWidth,t=this.element.clientHeight;if(e===0||t===0){this.sized=!1;return}this.sized=!0,this.fitted=!0;let n=window.devicePixelRatio||1,r=Math.round(e*n),i=Math.round(t*n);(this.canvas.width!==r||this.canvas.height!==i)&&(this.canvas.width=r,this.canvas.height=i,this.canvas.style.width=`${e}px`,this.canvas.style.height=`${t}px`,this.context.setTransform(n,0,0,n,0,0),this.metrics=this.measure(),this.resizeCore(),this.forceFull=!0);let a=Math.max(1,Math.floor(e/this.metrics.width)),o=Math.max(1,Math.floor(t/this.metrics.height));(a!==this.cols||o!==this.rows)&&(this.cols=a,this.rows=o,this.resizeCore(),this.forceFull=!0,this.handlers.onResize(a,o)),this.renderFrame()}find(e,t,n){let r=this.viewportTop(),i=this.search.find(e,t,n,r);i!==null&&(i.row<r||i.row>=r+this.rows)&&this.scrollViewport(i.row-r-Math.floor(this.rows/2)),this.redraw()}onFindResults(e){return this.search.onResults(e)}clearFind(){this.search.clear(),this.redraw()}replyClipboard(e,t){t.epoch!==this.epoch||t.generation!==this.prompt.generation||t.atPrompt&&this.prompt.shell!==`prompt`||this.handlers.onReply(eN(e,t.selection,t.terminator))}beforeInput(e){this.prompt.beforeInput(e)}dispose(){this.disposed||(this.disposed=!0,this.observer.disconnect(),this.cancelRender(),this.pointer.dispose(),this.search.dispose(),window.removeEventListener(`focus`,this.onWindowFocus),document.removeEventListener(`visibilitychange`,this.onVisibilityChange),this.images.clear(),this.prompt.release(),this.core.dispose(),this.element.remove())}redraw(){this.forceFull=!0,this.requestRender()}resizeCore(){this.core.resize(this.cols,this.rows,this.metrics.width,this.metrics.height,window.devicePixelRatio||1)}appearanceFor(e){let t=e.colors;return{fontSize:e.fontSize,fontFamily:rP(e.fontFamily),ligatures:e.ligatures,cursorText:t.cursorText,selectionBackground:t.selectionBackground,selectionForeground:t.selectionForeground,matchBackground:t.palette[8],activeMatchBorder:t.palette[3]}}measure(){return IN(this.context,this.options.fontSize,this.appearance.fontFamily,this.options.lineHeight,window.devicePixelRatio||1)}applyTerminalOptions(){let e=this.options.colors;this.core.setColors({foreground:nP(e.foreground),background:nP(e.background),cursor:nP(e.cursor),palette:e.palette.map(nP)}),this.core.setCursor(this.options.cursorStyle,this.options.cursorBlink),this.core.boldIsBright=this.options.boldIsBright,this.core.version=this.options.version,this.core.invalidate()}drain(){for(;!this.blocked&&this.backlog.length>0;){let e=this.backlog.shift();e&&this.process(e)}let e=this.core.title();e!==this.title&&(this.title=e,this.handlers.onTitle(e)),this.search.outputChanged(),this.cursorOn=!0,this.requestRender()}process(e){let t=e.data,n=e.replay;this.core.setReplies(!n);let r=0,i=this.scanner.scan(t,(e,i)=>(this.core.write(t.subarray(r,i)),r=i,this.handleOutput(e,n)));this.core.write(t.subarray(r,i)),i<t.length&&this.backlog.unshift({data:t.subarray(i),replay:n})}handleOutput(e,t){if(e.type===`sixel`)return this.decodeImage(Sj(e.data));let n=eP.decode(e.data);if(n.startsWith(`1337;File=`))return this.decodeImage(wj(n.slice(10),{cellWidth:this.metrics.width,cellHeight:this.metrics.height,width:this.cols*this.metrics.width,height:this.rows*this.metrics.height,pixelRatio:window.devicePixelRatio||1}));if(n.startsWith(`133;`)||n.startsWith(`6973;`))return this.prompt.mark(n,this.options.clickToMoveCursor),!1;if(n.startsWith(`52;`)){let r=n.split(`;`),i=r[2];if(t||i===void 0)return!1;if(i===`?`)return this.handlers.onClipboardRead({selection:QM(r[1]),terminator:e.terminator,generation:this.prompt.generation,epoch:this.epoch,atPrompt:this.prompt.shell===`prompt`}),!1;let a=$M(i);return a!==null&&this.handlers.onClipboard(a),!1}if(n===`10;?`||n===`11;?`||n===`12;?`)return t||this.handlers.onReply(tN(n,this.core.currentColors(),e.terminator)),!1;if(n.startsWith(`4;`)){if(!t)for(let t of nN(n,this.core.currentColors().palette,e.terminator))this.handlers.onReply(t);return!1}if(n===`9;4`||n.startsWith(`9;4;`)){let e=rN(n,this.progress);return e!==null&&(this.progress=e,this.handlers.onProgress(e)),!1}if(t)return!1;let r=n.startsWith(`99;`)?this.notifications.add(tP.decode(e.data)):iN(n,e.data);return r!==null&&this.handlers.onNotify(r.title,r.body),!1}decodeImage(e){return this.blocked=!0,this.placeImage(e,this.epoch,window.devicePixelRatio||1),!0}async placeImage(e,t,n){let r=0,i=new Promise(e=>{r=window.setTimeout(()=>e(`timeout`),$N)});try{let r=await Promise.race([e,i]);r===`timeout`?(console.warn(`image decoding took too long, skipping the image`),iP(e)):r!==null&&(t===this.epoch&&!this.disposed?this.images.place(r,n,this.metrics.height):r.close())}catch(e){console.warn(`could not decode image`,e)}window.clearTimeout(r),t!==this.epoch||this.disposed||(this.blocked=!1,this.drain())}moveCursorTo(e){if(!this.options.clickToMoveCursor)return;let t=this.prompt.moveCursorInput(e,this.snapshot,this.viewportTop());t!==null&&(t!==``&&this.sendInput(t),this.core.clearSelection(),this.redraw())}sendInput(e){this.prompt.beforeInput(e),this.core.scrollbarState()?.offset!==this.maxOffset()&&(this.core.scrollToBottom(),this.redraw()),this.handlers.onData(e)}maxOffset(){let e=this.core.scrollbarState();return e?Math.max(0,e.total-e.len):0}viewportTop(){return this.core.toScreen({x:0,y:0})?.y??0}scrollViewport(e){let t=this.core.scrollbarState(),n=Math.trunc(e);if(t!==null){let e=Math.max(0,t.total-t.len);n=Math.max(0,Math.min(t.offset+n,e))-t.offset}n!==0&&(this.core.scroll(n),this.redraw())}requestRender(){!this.disposed&&this.sized&&this.frame===0&&(this.frame=window.requestAnimationFrame(()=>{this.frame=0,this.renderFrame()}))}cancelRender(){this.frame!==0&&window.cancelAnimationFrame(this.frame),this.frame=0,this.cursorTimer!==null&&window.clearTimeout(this.cursorTimer),this.cursorTimer=null,this.syncTimer!==null&&window.clearTimeout(this.syncTimer),this.syncTimer=null}renderFrame(){if(!this.disposed&&this.sized&&this.element.isConnected){this.frame!==0&&window.cancelAnimationFrame(this.frame),this.frame=0;try{this.draw(),this.renderFailed=!1}catch(e){this.renderFailed||console.error(`could not draw the terminal`,e),this.renderFailed=!0}}}draw(){if(this.core.isSynchronizedOutput()){this.syncTimer===null&&(this.syncTimer=window.setTimeout(()=>{this.syncTimer=null,this.core.endSynchronizedOutput(),this.requestRender()},QN));return}this.syncTimer!==null&&window.clearTimeout(this.syncTimer),this.syncTimer=null;let e=this.core.snapshot();this.snapshot=e;let t=this.focused&&e.cursorBlinking&&e.cursorVisible;t||(this.cursorOn=!0);let n=this.viewportTop(),r=this.images.visible(n,this.rows,this.metrics.height),i=this.core.cellSize(),a=this.core.kitty.images(e.rowData,i);zN({context:this.context,snapshot:e,metrics:this.metrics,appearance:this.appearance,forceFull:this.forceFull||r.length>0||a.length>0,cursorOn:this.cursorOn,previousCursorY:this.renderedCursorY,focused:this.focused,hoveredLink:this.pointer.hoveredLink?.range??null,highlights:this.search.highlights(e,n),pixelRatio:window.devicePixelRatio||1,drawLayer:e=>hM(this.context,a,e,this.metrics,i)}),hM(this.context,a,`aboveText`,this.metrics,i);for(let e of r)this.context.drawImage(e.bitmap,e.x*this.metrics.width,e.y*this.metrics.height,e.width,e.height);this.forceFull=r.length>0||a.length>0,this.renderedCursorY=this.cursorOn&&e.cursorVisible&&e.cursorY>=0?e.cursorY:null,e.cursorX>=0&&e.cursorY>=0&&(this.input.style.left=`${e.cursorX*this.metrics.width}px`,this.input.style.top=`${e.cursorY*this.metrics.height}px`),this.pointer.updateScrollbar(this.element.clientHeight),this.cursorTimer!==null&&window.clearTimeout(this.cursorTimer),this.cursorTimer=null,t&&(this.cursorTimer=window.setTimeout(()=>{this.cursorTimer=null,this.cursorOn=!this.cursorOn,this.requestRender()},ZN))}copySelection(){let e=this.core.selectionText();e.length!==0&&(window.isSecureContext?navigator.clipboard.writeText(e):console.warn(`copy from the terminal needs https or localhost`))}optionIsMeta(e){if(!YN||!e.altKey||e.metaKey)return!1;let t=this.options.optionAsMeta;if(t===`off`)return!1;if(t===`both`)return!0;if(t===`left`)return this.heldOptionKeys.has(`AltLeft`);if(t===`right`)return this.heldOptionKeys.has(`AltRight`);throw Error(`unknown option as meta mode ${t}`)}onKeyDown=e=>{if((e.code===`AltLeft`||e.code===`AltRight`)&&this.heldOptionKeys.add(e.code),!this.handlers.beforeKey(e)){this.suppressedKeys.add(e.code);return}let t=this.optionIsMeta(e),n=t&&this.core.encoder.metaText(e)!==null;if(e.isComposing||this.composing||!n&&(e.key===`Process`||e.keyCode===229)||YN&&this.options.optionAsMeta!==`off`&&!t&&e.altKey&&!e.ctrlKey&&!e.metaKey&&([...e.key].length===1||e.key===`Dead`)||!n&&e.getModifierState(`AltGraph`)&&[...e.key].length===1){this.suppressedKeys.add(e.code);return}let r=e.key.toLowerCase(),i=XN&&this.options.windowsCopyPaste&&e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;if(i&&r===`c`&&this.core.selectionText().length>0){this.copySelection(),this.core.clearSelection(),this.redraw(),e.preventDefault(),this.suppressedKeys.add(e.code);return}if(YN?e.metaKey&&r===`c`:e.ctrlKey&&e.shiftKey&&r===`c`||e.ctrlKey&&!e.shiftKey&&r===`insert`){this.copySelection(),e.preventDefault(),this.suppressedKeys.add(e.code);return}if((YN?e.metaKey&&r===`v`:e.ctrlKey&&e.shiftKey&&r===`v`||e.shiftKey&&!e.ctrlKey&&r===`insert`||i&&r===`v`)||YN&&e.metaKey&&r===`q`){this.suppressedKeys.add(e.code);return}let a=this.core.encoder.encodeKey(e,`press`,n);a.length!==0&&(this.suppressedKeys.delete(e.code),e.preventDefault(),e.stopPropagation(),this.core.selectionText().length>0&&!e.shiftKey&&(this.core.clearSelection(),this.forceFull=!0),this.sendInput(a))};onKeyUp=e=>{if(this.heldOptionKeys.delete(e.code),this.suppressedKeys.delete(e.code)||e.isComposing||this.composing)return;let t=this.core.encoder.encodeKey(e,`release`,this.optionIsMeta(e));t.length!==0&&(e.preventDefault(),this.handlers.onData(t))};onInput=e=>{let t=e;if(this.composing||t.isComposing)return;let n=this.input.value||t.data||``;this.input.value=``,n.length>0&&this.sendInput(n)};onCompositionStart=()=>{this.composing=!0};onCompositionEnd=e=>{this.composing=!1;let t=this.input.value||e.data;this.input.value=``,t.length>0&&this.sendInput(t)};onPaste=e=>{e.preventDefault();let t=e.clipboardData?.getData(`text/plain`)??``;t.length>0&&this.paste(t)};onCopy=e=>{let t=this.core.selectionText();t.length!==0&&e.clipboardData&&(e.preventDefault(),e.clipboardData.setData(`text/plain`,t))};onWindowFocus=()=>{YN&&this.options.optionAsMeta!==`off`&&this.core.encoder.refreshKeyboardLayout()};onContextRestored=()=>{let e=window.devicePixelRatio||1;this.context.setTransform(e,0,0,e,0,0),this.redraw()};onVisibilityChange=()=>{document.visibilityState===`visible`&&this.redraw()};onFocus=()=>{this.focused=!0,this.cursorOn=!0,this.requestRender(),!this.disposed&&this.core.isFocusReporting()&&this.handlers.onReply(`\x1B[I`)};onBlur=()=>{this.focused=!1,this.heldOptionKeys.clear(),this.cursorOn=!0,this.requestRender(),!this.disposed&&this.core.isFocusReporting()&&this.handlers.onReply(`\x1B[O`)};installEvents(){this.input.addEventListener(`keydown`,this.onKeyDown),this.input.addEventListener(`keyup`,this.onKeyUp),this.input.addEventListener(`input`,this.onInput),this.input.addEventListener(`compositionstart`,this.onCompositionStart),this.input.addEventListener(`compositionend`,this.onCompositionEnd),this.input.addEventListener(`paste`,this.onPaste),this.input.addEventListener(`copy`,this.onCopy),this.input.addEventListener(`focus`,this.onFocus),this.input.addEventListener(`blur`,this.onBlur),this.canvas.addEventListener(`contextrestored`,this.onContextRestored),window.addEventListener(`focus`,this.onWindowFocus),document.addEventListener(`visibilitychange`,this.onVisibilityChange)}},oP=new Map,sP=new Map,cP=null,lP=0;function uP(e){return BP().open&&UP()?.tabId===e&&!document.hidden&&document.hasFocus()}function dP(e){if(uP(e))return!1;let t=BP();return t.alerts.includes(e)||VP({alerts:[...t.alerts,e]}),!0}function fP(e){if(!dP(e)||sP.has(e))return;let t=oP.get(e);t!==void 0&&performance.now()-t<5e3||sP.set(e,window.setTimeout(()=>{sP.delete(e),uP(e)||(oP.set(e,performance.now()),mP(e,``,`Bell`))},500))}function pP(e,t,n){dP(e)&&(window.clearTimeout(sP.get(e)),sP.delete(e),oP.set(e,performance.now()),mP(e,t,n))}function mP(e,t,n){let r=KP(e);r&&_a(t||qP(r),n,{machine:RP(),project:r.projectId??`global`,tabId:e}).catch(e=>console.error(`could not show a notification`,e))}function hP(){let e=performance.now();if(e-lP<150)return;lP=e,cP??=new AudioContext,cP.state===`suspended`&&cP.resume();let t=cP.createOscillator(),n=cP.createGain(),r=cP.currentTime;t.frequency.value=880,n.gain.setValueAtTime(.1,r),n.gain.exponentialRampToValueAtTime(.001,r+.15),t.connect(n).connect(cP.destination),t.start(r),t.stop(r+.15)}function gP(e){return{alerts:BP().alerts.filter(t=>e(t)&&!uP(t))}}function _P(e){window.clearTimeout(sP.get(e)),sP.delete(e),oP.delete(e)}function vP(e){return e.key===`Enter`&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey}function yP(e){let t=new aP(LP(),{onData:t=>{BP().status===`active`&&$P(e,bP(t))},onReply:t=>{t===`\x1B[I`||t===`\x1B[O`?$P(e,t):eF(e,t)},onResize:(t,n)=>ZP({type:`resize`,id:e,cols:t,rows:n}),onTitle:t=>VP({titles:{...BP().titles,[e]:t}}),onProgress:t=>VP({progress:{...BP().progress,[e]:t}}),onBell:()=>{let n=HP().behavior;n.bellSound&&hP(),n.bellFlash&&t.element.isConnected&&!document.hidden&&t.element.animate([{opacity:.4},{opacity:1}],{duration:200,easing:`ease-out`}),fP(e)},onNotify:(t,n)=>pP(e,t,n),onClipboard:KD,onClipboardRead:n=>{uP(e)&&qD(e=>t.replyClipboard(e,n))},onLink:e=>{e.startsWith(`file:`)?ie(e):window.open(e,`_blank`,`noopener`)},beforeKey:n=>{if(n.type!==`keydown`)return!0;let r=HP(),i=R(z(),RP()).system;if(i===null)throw Error(`the terminal machine is not connected`);let a=i.platform;if(BP().status===`active`&&r.behavior.modernizeShiftEnter&&vP(n)&&!t.isKittyKeyboard())return n.preventDefault(),t.beforeInput(`\x1B\r`),$P(e,`\x1B\r`),!1;if(BP().status===`active`&&r.behavior.pasteBrowserImages&&window.isSecureContext&&YD(n,a)&&!(At&&r.behavior.windowsCopyPaste&&n.ctrlKey)){n.preventDefault();let r=JD[a].data;return t.beforeInput(r),XD(RP(),t).then(t=>{t||$P(e,r)}).catch(t=>{QD(t),$P(e,r)}),!1}return!cF(n)||(n.preventDefault(),VP({finding:e}),document.querySelector(`[data-find]`)?.select(),!1)}});return t.element.addEventListener(`paste`,e=>{if(!e.clipboardData||e.clipboardData.getData(`text/plain`)!==``)return;let n=[...e.clipboardData.files].filter(e=>e.type.startsWith(`image/`));n.length!==0&&(e.preventDefault(),e.stopPropagation(),ZD(RP(),t,n).catch(QD))},!0),t}function bP(e){if(!BP().ctrl||(VP({ctrl:!1}),e.length!==1))return e;let t=e.toUpperCase().charCodeAt(0);return t>=64&&t<=95?String.fromCharCode(t-64):e}function xP(e,t){Me(e,t)}function SP(e){let t=e.terminals.map(GP),n=localStorage.getItem(`lastTerminalView`);xP(e.id,t.find(e=>e===n)??t.at(0)??`global`)}async function CP(e,t){try{await r(e,`terminal`,{type:`createTab`,projectId:t})}catch(e){console.error(`terminal request failed`,e);return}xP(e,t??`global`)}function wP(){let e=BP(),t=j();if(t===null||e.instance===null||t!==RP()||WP(e.layout,We()).length>0)return;let n=e.layout.tabs.at(0);if(n!==void 0){xP(t,GP(n));return}let r=z().machines.find(e=>e.id!==t&&e.status===`online`&&e.terminals.length>0);r===void 0?Tt(`chat`,()=>void $e.navigate({to:`/`,search:{},replace:!0})):SP(r)}function TP(){return{titles:{},progress:{},alerts:[],finding:null}}var EP=new TextEncoder,DP=new Map,OP=new Set,kP=new Set,AP={status:`connecting`,failure:null,loaded:!1,open:!1,instance:null,layout:{tabs:[],active:{}},ctrl:!1,...TP()},jP=null,MP=null,NP=!1;async function PP(){Ct(),YP(),$e.history.subscribe(({action:e})=>{(e.type===`PUSH`||e.type===`REPLACE`)&&Ct(),YP()});try{await Promise.all([Ij(),Op(HP())]),VP({loaded:!0})}catch(e){console.error(`could not start the terminal`,e),VP({failure:It(e)});return}Qe({close:e=>{e===MP&&VP({status:`connecting`})},terminal:(e,t)=>{e===MP&&oF(t)},frame:(e,t)=>{e===MP&&aF(t)}}),FP(),$e.history.subscribe(FP),$e.history.subscribe(wP),document.addEventListener(`visibilitychange`,()=>VP({})),window.addEventListener(`focus`,()=>{VP({}),jP!==null&&lF(jP,uF(jP))}),window.addEventListener(`blur`,()=>VP({})),`serviceWorker`in navigator&&navigator.serviceWorker.addEventListener(`message`,e=>{e.data.type===`select`&&XP(e.data.machine,e.data.project,e.data.tabId)});let e=z().prefs,t=IP();i(()=>{FP();let n=z().prefs,r=IP(),i=n.theme!==e.theme||n.terminal!==e.terminal||r!==t;e=n,t=r,i&&fF()}),pF()}function FP(){let e=j()??z().selection?.machine??null;if(e!==MP&&(MP!==null&&NP&&ZP({type:`detach`}),sF([]),OP.clear(),MP=e,NP=!1,VP({status:`connecting`,instance:null,layout:{tabs:[],active:{}},...TP()})),MP===null)return;let t=R(z(),MP).status===`online`;t&&!NP&&(NP=!0,ZP({type:`attach`})),t||(NP=!1)}function IP(){return MP===null?null:R(z(),MP).config?.terminal.behavior.terminalIdentity??null}function LP(){if(MP===null)throw Error(`the terminal has no machine`);let e=R(z(),MP);if(e.config===null||e.system===null)throw Error(`${e.name} is not connected`);return kp(HP(),e.config.terminal.behavior.terminalIdentity)}function RP(){if(MP===null)throw Error(`the terminal has no machine`);return MP}function zP(e){return kP.add(e),()=>{kP.delete(e)}}function BP(){return AP}function VP(e){AP={...AP,...e},AP={...AP,...gP(e=>DP.has(e))};for(let e of kP)e()}function HP(){return z().prefs.terminal}function UP(){let e=j()===null?z().selection?.projectId:We();return e===void 0?null:{view:e,tabs:WP(AP.layout,e),tabId:AP.layout.active[e]??null}}function WP(e,t){return e.tabs.filter(e=>GP(e)===t)}function GP(e){return e.projectId??`global`}function KP(e){return AP.layout.tabs.find(t=>t.id===e)}function qP(e){return(e.customName??AP.titles[e.id])||`Terminal`}function JP(e){e?oe({bottom:`terminal`}):Tt(`overlay`,()=>oe({bottom:void 0}))}function YP(){let e=xe().bottom===`terminal`||j()!==null;e!==AP.open&&VP({open:e})}function XP(e,t,n){if(t===`global`)xP(e,tt);else{let n=z().selection;(n?.machine!==e||n.projectId!==t)&&De({machine:e,projectId:t,sessionId:null}),JP(!0)}QP(e,{type:`select`,view:t,tabId:n})}function ZP(e){MP!==null&&QP(MP,e)}function QP(e,t){ht(e)&&r(e,`terminal`,t).catch(e=>console.error(`terminal request failed`,e))}function $P(e,t){MP!==null&&ze(MP,0,e,typeof t==`string`?EP.encode(t):t)}function eF(e,t){MP!==null&&ze(MP,1,e,EP.encode(t))}function tF(e,t,n,r){uF(e).find(t,n,r)}function nF(e,t){return uF(e).onFindResults(t)}function rF(e){let t=uF(e);t.clearFind(),VP({finding:null}),t.focus()}function iF(){VP({ctrl:!AP.ctrl})}function aF(e){let t=DP.get(e.id);if(!t)return;let n=e.kind===3,r=n&&OP.delete(e.id);r&&t.reset(),t.write(e.data,n),r&&OP.size===0&&VP({status:`active`})}function oF(e){let t=e.type===`active`&&e.instance!==AP.instance;if(t&&sF([]),sF(e.layout.tabs),e.type===`active`){OP.clear(),DP.forEach((e,t)=>{OP.add(t),e.element.isConnected&&lF(t,e)}),VP({...t&&{instance:e.instance,...TP()},status:OP.size===0?`active`:`connecting`,layout:e.layout}),wP();return}for(let e of OP)DP.has(e)||OP.delete(e);let n=z().selection?.projectId,r=n!==void 0&&WP(AP.layout,n).length>0&&WP(e.layout,n).length===0;VP({status:OP.size===0?`active`:`connecting`,layout:e.layout}),r&&AP.open&&JP(!1),wP()}function sF(e){let t=new Set(e.map(e=>e.id));DP.forEach((e,n)=>{t.has(n)||(e.dispose(),DP.delete(n),_P(n))});for(let e of t)DP.has(e)||DP.set(e,yP(e))}function cF(e){return e.key.toLowerCase()===`f`?Mt?e.metaKey&&!e.ctrlKey&&!e.altKey:e.ctrlKey&&e.shiftKey&&!e.altKey&&!e.metaKey:!1}function lF(e,t){ZP({type:`resize`,id:e,cols:t.cols,rows:t.rows})}function uF(e){let t=DP.get(e);if(!t)throw Error(`terminal ${e} does not exist`);return t}function dF(e,t){let n=uF(e);t.append(n.element),n.fit();for(let e of DP.values())e.presize(n.cols,n.rows);return jP=e,lF(e,n),n.focus(),()=>{n.element.remove(),jP===e&&(jP=null)}}async function fF(){if(await Op(HP()),DP.size>0){let e=LP();for(let t of DP.values())t.setOptions(e)}VP({})}function pF(){let e=xe(),t=j(),n=t??e.machine,r=t===null?e.project:tt,i=e.terminal;if(n===void 0||r===void 0||i===void 0)return;oe({terminal:void 0});let a=zP(()=>{AP.status===`active`&&MP===n&&(a(),XP(n,r,Number(i)))})}var mF=null,hF=null,gF=new Set,_F=new Set;function vF(e){return _F.add(e),()=>{_F.delete(e)}}function yF(){return mF}function bF(){mF!==null&&CF({open:!1,closing:mF.closing})}function xF(){return hF}function SF(){hF!==null&&wF({open:!1,closing:hF.closing})}function CF(e){mF=e;for(let e of _F)e()}function wF(e){hF=e;for(let e of _F)e()}function TF(){return document.querySelector(`[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]`)!==null}async function EF(e,t){try{let n=await Promise.race([r(e,`terminal.busy`,{id:t}),new Promise((e,t)=>window.setTimeout(()=>t(Error(`timed out`)),5e3))]);return`error`in n?(console.error(`could not check whether tab ${t} is running a program`,n.error),{checked:!1}):{checked:!0,program:n.program}}catch(e){return console.error(`could not check whether a program is running`,e),{checked:!1}}}async function DF(e){if(!HP().behavior.confirmCloseBusyTab){ZP({type:`closeTab`,id:e});return}if(!KP(e)||gF.has(e))return;gF.add(e);let t=await EF(RP(),e);if(gF.delete(e),t.checked&&t.program===null){ZP({type:`closeTab`,id:e});return}let n=KP(e);n&&!TF()&&CF({open:!0,closing:{id:e,name:qP(n),program:t.checked?t.program:null}})}function OF(e){for(let t of e)QP(t.machine,{type:`closeTab`,id:t.id})}async function kF(e){if(!HP().behavior.confirmCloseBusyTab){OF(e);return}let t=await Promise.all(e.map(e=>EF(e.machine,e.id)));if(t.every(e=>e.checked&&e.program===null)){OF(e);return}if(TF())return;let n=t.flatMap(e=>e.checked&&e.program!==null?[e.program]:[]);wF({open:!0,closing:{tabs:e,programs:[...new Set(n)]}})}var AF=Mt?`meta+t`:`ctrl+shift+t`,jF=Mt?`meta+w`:`ctrl+shift+w`,MF=`ctrl+tab`,NF=`ctrl+shift+tab`;function PF(){let e=UP()?.tabId??null;BP().open&&e!==null&&uF(e).focus()}function FF(){return Ys([AF,jF,MF,NF],(e,t)=>{e.preventDefault(),e.stopPropagation();let n=UP();if(n===null)return;if(t.hotkey===AF){ZP({type:`createTab`,projectId:n.view===`global`?null:n.view});return}if(n.tabId===null)return;if(t.hotkey===jF){DF(n.tabId);return}let r;if(t.hotkey===MF)r=1;else if(t.hotkey===NF)r=-1;else throw Error(`unknown terminal shortcut ${t.hotkey}`);let i=n.tabs,a=i[(i.findIndex(e=>e.id===n.tabId)+r+i.length)%i.length];a&&ZP({type:`select`,view:n.view,tabId:a.id})},{enabled:()=>HP().behavior.captureShortcuts,enableOnFormTags:!0,eventListenerOptions:{capture:!0}})}function IF(e){let[t,n]=(0,U.useState)(e.name);return(0,W.jsx)(Ur,{open:!0,onOpenChange:t=>{t||e.onDone()},children:(0,W.jsx)(Ir,{onCloseAutoFocus:zF,children:(0,W.jsxs)(`form`,{className:`grid gap-4`,onSubmit:n=>{n.preventDefault(),ZP({type:`renameTab`,id:e.id,name:t.trim()}),e.onDone()},children:[(0,W.jsx)(Lr,{children:(0,W.jsx)(Br,{children:`Rename tab`})}),(0,W.jsx)(X,{"aria-label":`Name`,placeholder:`Use terminal title`,value:t,onChange:e=>n(e.target.value)}),(0,W.jsxs)(Wr,{children:[(0,W.jsx)(H,{type:`button`,variant:`outline`,onClick:e.onDone,children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,children:`Rename`})]})]})})})}function LF(){let e=(0,U.useSyncExternalStore)(vF,yF),t=(0,U.useRef)(null);if(e===null)return null;let n=e.closing;return(0,W.jsx)(In,{open:e.open,onOpenChange:e=>{e||bF()},children:(0,W.jsxs)(zn,{onOpenAutoFocus:e=>{e.preventDefault(),t.current?.focus()},onCloseAutoFocus:zF,children:[(0,W.jsxs)(lr,{children:[(0,W.jsxs)(hr,{children:[`Close “`,n.name,`”?`]}),(0,W.jsx)(Ln,{children:n.program===null?`OffSite couldn’t check whether a program is still running.`:`${n.program} is still running.`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{ref:t,variant:`destructive`,onClick:()=>ZP({type:`closeTab`,id:n.id}),children:`Close`})]})]})})}function RF(){let e=(0,U.useSyncExternalStore)(vF,xF);if(e===null)return null;let t=e.closing;return(0,W.jsx)(In,{open:e.open,onOpenChange:e=>{e||SF()},children:(0,W.jsxs)(zn,{onCloseAutoFocus:zF,children:[(0,W.jsxs)(lr,{children:[(0,W.jsxs)(hr,{children:[`Close `,t.tabs.length,` `,t.tabs.length===1?`terminal`:`terminals`,`?`]}),(0,W.jsx)(Ln,{children:t.programs.length===0?`OffSite couldn’t check whether programs are still running.`:`Still running: ${t.programs.join(`, `)}.`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:()=>OF(t.tabs),children:`Close all`})]})]})})}function zF(e){e.preventDefault();let t=document.querySelector(`[role="dialog"], [role="alertdialog"]`);t===null?PF():t.focus()}function BF(e){let t=O(e=>e.machines).filter(e=>e.status===`online`),n=t.some(e=>e.terminals.length>0);return t.length===0?null:(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(`button`,{className:B(`text-muted-foreground hover:text-foreground absolute top-1 right-1 grid size-6 cursor-pointer place-items-center rounded-md opacity-0 transition-opacity group-hover/terminal:opacity-100 group-has-[[data-state=open]]/terminal:opacity-100 focus-visible:opacity-100`,e.mobile&&`text-popover-foreground`,n?`pointer-coarse:opacity-100`:`pointer-coarse:pointer-events-none`),"aria-label":`New terminal`,title:`New terminal`,children:(0,W.jsx)(V,{icon:Ga,className:`size-4`})})}),(0,W.jsx)(on,{side:e.mobile?`bottom`:`right`,align:`end`,className:`max-h-80 w-auto min-w-40 overflow-y-auto`,onCloseAutoFocus:e=>e.preventDefault(),children:(0,W.jsx)(VF,{})})]})}function VF(e){let t=O(e=>e.machines),n=O(e=>e.projects),r=e.contextMenu?Vn:ln;return t.filter(e=>e.status===`online`).flatMap(e=>[(0,W.jsxs)(r,{onSelect:()=>void CP(e.id,null),children:[(0,W.jsx)(Yd,{icon:e.icon}),(0,W.jsx)(`span`,{className:`max-w-60 truncate`,children:e.name})]},e.id),...n.filter(t=>t.machine===e.id).map(t=>(0,W.jsxs)(r,{className:`pl-7`,onSelect:()=>void CP(e.id,t.id),children:[(0,W.jsx)(nc,{machine:e.id,projectId:t.id,className:`size-4`}),(0,W.jsx)(`span`,{className:`max-w-60 truncate`,children:t.name})]},`${e.id}:${t.id}`))])}function HF(e){let t=(0,U.useRef)(null),[n,r]=(0,U.useState)(``),[i,a]=(0,U.useState)({resultIndex:-1,resultCount:0});(0,U.useEffect)(()=>nF(e.id,a),[e.id]),(0,U.useEffect)(()=>t.current?.focus(),[]);function o(t,n,i){r(t),tF(e.id,t,n,i)}return(0,W.jsxs)(`div`,{className:`bg-card absolute top-2 right-4 z-10 flex items-center gap-1 rounded-lg border p-1 shadow-lg`,children:[(0,W.jsx)(X,{ref:t,"data-find":!0,className:`h-7 w-52`,placeholder:`Find`,value:n,onChange:e=>o(e.target.value,!1,!0),onKeyDown:t=>{t.key===`Escape`?(t.preventDefault(),rF(e.id)):t.key===`Enter`?(t.preventDefault(),o(n,t.shiftKey,!1)):cF(t.nativeEvent)&&(t.preventDefault(),t.currentTarget.select())}}),(0,W.jsx)(`span`,{className:`text-muted-foreground w-16 text-center text-xs tabular-nums`,children:n===``?``:i.resultCount===0?`No results`:`${i.resultIndex+1} of ${i.resultCount}`}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Previous match`,onClick:()=>o(n,!0,!1),children:(0,W.jsx)(V,{icon:io})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Next match`,onClick:()=>o(n,!1,!1),children:(0,W.jsx)(V,{icon:ur})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close find`,onClick:()=>rF(e.id),children:(0,W.jsx)(V,{icon:lo})})]})}var UF=[{label:`Esc`,sequence:`\x1B`},{label:`Tab`,sequence:` `},{label:`↑`,sequence:`\x1B[A`},{label:`↓`,sequence:`\x1B[B`},{label:`←`,sequence:`\x1B[D`},{label:`→`,sequence:`\x1B[C`}];function WF(e){let t=(0,U.useSyncExternalStore)(zP,BP),n=t.status===`active`,r=WP(t.layout,e.view),i=t.layout.active[e.view]??null,a=FF();(0,U.useEffect)(()=>{n&&!e.page&&ZP({type:`select`,view:e.view,tabId:null})},[e.view,n,e.page]);function o(){ZP({type:`createTab`,projectId:e.view===`global`?null:e.view})}return t.loaded?(0,W.jsxs)(`div`,{ref:a,className:`flex h-full flex-col text-sm`,children:[(0,W.jsxs)(`header`,{className:B(`flex h-9 flex-none select-none`,e.tabSize===`lg`&&`h-(--workspace-topbar-height)`,r.length===1?`bg-background`:`bg-sidebar`),children:[e.leading&&(0,W.jsx)(`div`,{className:`flex flex-none items-center border-b px-1.5`,children:e.leading}),(0,W.jsx)(`div`,{className:`flex min-w-0 flex-1 [scrollbar-width:none] overflow-x-auto`,children:r.map(n=>(0,W.jsx)(KF,{tab:n,children:(0,W.jsxs)(`div`,{className:B(`group/tab text-muted-foreground hover:text-foreground relative flex min-w-28 flex-1 items-center justify-center border-r border-b px-7 text-xs transition-colors last:border-r-0`,e.tabSize===`lg`&&`text-[13px]`,n.id===i&&`bg-background text-foreground border-b-transparent`),onMouseDown:e=>e.preventDefault(),onClick:()=>ZP({type:`select`,view:e.view,tabId:n.id}),children:[(0,W.jsx)(`span`,{className:`truncate`,children:qP(n)}),(0,W.jsx)(qF,{id:n.id,className:`ml-1.5 size-1.5 flex-none rounded-full`}),(0,W.jsx)(JF,{progress:t.progress[n.id]}),(0,W.jsx)(`button`,{className:B(`text-muted-foreground hover:bg-accent hover:text-foreground absolute left-1.5 grid size-4.5 place-items-center rounded opacity-0 transition-opacity group-hover/tab:opacity-100`,n.id===i&&`pointer-coarse:opacity-100`),"aria-label":`Close tab`,onClick:e=>{e.stopPropagation(),DF(n.id)},children:(0,W.jsx)(V,{icon:lo,className:`size-3`})})]})},n.id))}),(0,W.jsx)(`button`,{className:B(`text-muted-foreground hover:text-foreground grid w-8 flex-none place-items-center transition-colors`,r.length>1&&`border-b border-l`),"aria-label":`New tab`,title:`New tab`,onClick:o,children:(0,W.jsx)(V,{icon:Ga,className:`size-4`})})]}),(0,W.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[i!==null&&(0,W.jsx)(GF,{id:i},`${t.instance}-${i}`),i!==null&&t.finding===i&&(0,W.jsx)(HF,{id:i},i),n&&i===null&&!e.page&&(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground grid size-full cursor-pointer place-items-center text-xs transition-colors`,onClick:o,children:`New terminal`}),!n&&(0,W.jsx)(`div`,{className:`bg-background/80 animate-in fade-in absolute inset-0 z-20 grid place-items-center p-6 text-center backdrop-blur-md duration-200`,children:(0,W.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,W.jsx)(`span`,{className:`border-foreground/15 border-t-foreground/70 size-6 animate-spin rounded-full border-[3px]`}),(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Connecting. Your terminals keep running while you wait.`})]})})]}),i!==null&&(0,W.jsxs)(`div`,{className:`bg-card hidden flex-none gap-1.5 overflow-x-auto border-t p-1.5 pointer-coarse:flex`,children:[UF.map(e=>(0,W.jsx)(H,{variant:`secondary`,className:`min-w-11`,onPointerDown:e=>e.preventDefault(),onClick:()=>$P(i,e.sequence),children:e.label},e.label)),(0,W.jsx)(H,{variant:t.ctrl?`default`:`secondary`,className:`min-w-11`,onPointerDown:e=>e.preventDefault(),onClick:iF,children:`Ctrl`})]}),(0,W.jsx)(LF,{})]}):(0,W.jsx)(`div`,{className:`text-muted-foreground grid h-full place-items-center p-4 text-xs whitespace-pre-wrap`,children:t.failure===null?`Starting the terminal…`:`The terminal could not start: ${t.failure}`})}function GF(e){let t=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(!t.current)throw Error(`terminal container missing`);return dF(e.id,t.current)},[e.id]),(0,W.jsx)(`div`,{className:`bg-background absolute inset-0 pt-(--pad-top) pr-(--pad-right) pb-(--pad-bottom) pl-(--pad-left)`,ref:t})}function KF(e){let[t,n]=(0,U.useState)(!1),r=O(e=>e.projects).filter(e=>e.machine===RP()),i=e.tab;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,children:e.children}),(0,W.jsxs)(tr,{children:[(0,W.jsxs)(Vn,{onSelect:()=>n(!0),children:[(0,W.jsx)(V,{icon:Jo}),`Rename`]}),(0,W.jsxs)(jn,{children:[(0,W.jsxs)(sr,{children:[(0,W.jsx)(V,{icon:Mn}),`Move to`]}),(0,W.jsx)(Wn,{className:`max-h-80 overflow-y-auto`,children:(0,W.jsxs)(Dn,{value:i.projectId??``,onValueChange:e=>ZP({type:`assignTab`,id:i.id,projectId:e===``?null:e}),children:[(0,W.jsx)(Xn,{value:``,children:`No project`}),r.length>0&&(0,W.jsx)(rr,{}),r.map(e=>(0,W.jsx)(Xn,{value:e.id,children:(0,W.jsx)(`span`,{className:`max-w-60 truncate`,children:e.name})},e.id))]})})]}),(0,W.jsxs)(Vn,{variant:`destructive`,onSelect:()=>void DF(i.id),children:[(0,W.jsx)(V,{icon:So}),`Close tab`]})]})]}),t&&(0,W.jsx)(IF,{id:i.id,name:i.customName??``,onDone:()=>n(!1)})]})}function qF(e){return BP().alerts.includes(e.id)?(0,W.jsx)(`span`,{className:B(`bg-primary`,e.className)}):null}function JF(e){let t=e.progress;return!t||t.state===0?null:t.state===3?(0,W.jsx)(`span`,{className:`bg-primary absolute inset-x-0 bottom-0 h-0.5 animate-pulse`}):(0,W.jsx)(`span`,{className:B(`absolute bottom-0 left-0 h-0.5 transition-[width]`,t.state===1&&`bg-primary`,t.state===2&&`bg-destructive`,t.state===4&&`bg-yellow-500`),style:{width:`${t.state!==1&&t.value===0?100:t.value}%`}})}function YF(e){(0,U.useSyncExternalStore)(zP,BP);let t=O(e=>e.machines).filter(e=>e.status===`online`),n=D(),r=ZF(),i=r.find(t=>t.machine.id===e.machine&&t.view===n);(0,U.useEffect)(()=>{localStorage.setItem(`lastTerminal`,e.machine),localStorage.setItem(`lastTerminalView`,n)},[e.machine,n]);let a=(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,disabled:t.length===0,children:(0,W.jsx)(`button`,{className:`text-muted-foreground enabled:hover:text-foreground grid w-11 flex-none place-items-center self-stretch transition-colors`,"aria-label":`New terminal`,title:`New terminal`,children:(0,W.jsx)(V,{icon:Ga,className:`size-4`})})}),(0,W.jsx)(on,{align:`end`,className:`w-auto min-w-56`,children:(0,W.jsx)(VF,{})})]});return e.mobile?(0,W.jsxs)(`main`,{className:`bg-background flex min-w-0 flex-1 flex-col overflow-hidden pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[(0,W.jsxs)(`header`,{className:`grid h-(--workspace-topbar-height) flex-none grid-cols-[auto_1fr_auto] items-center border-b select-none`,children:[e.leading,(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:`text-muted-foreground hover:text-foreground flex min-w-0 items-center justify-center gap-1.5 self-stretch px-1 text-[13px]`,children:[i!==void 0&&(0,W.jsx)(eI,{group:i}),(0,W.jsx)(`span`,{className:`truncate`,children:i?.name})]})}),(0,W.jsx)(on,{align:`center`,className:`w-auto`,children:r.filter(QF).map(t=>(0,W.jsxs)(ln,{className:B(t.view!==`global`&&`pl-7`),onSelect:()=>t.count===0?void CP(t.machine.id,null):xP(t.machine.id,t.view),children:[(0,W.jsx)(eI,{group:t}),(0,W.jsx)(`span`,{className:`max-w-60 truncate`,children:t.name}),(0,W.jsx)(tI,{count:t.count,alert:$F(t,e.machine)})]},`${t.machine.id}:${t.view}`))})]}),a]}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,W.jsx)(WF,{view:n,page:!0})})]}):(0,W.jsx)(`main`,{className:`bg-background flex min-w-0 flex-1 flex-col overflow-hidden`,children:(0,W.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,W.jsx)(WF,{view:n,page:!0,tabSize:`lg`,leading:e.leading})})})}function XF(e){(0,U.useSyncExternalStore)(zP,BP);let t=He(),n=D(),r=ZF().filter(QF);return r.length===0?null:(0,W.jsx)(`div`,{className:`flex max-h-52 flex-col gap-px overflow-y-auto`,children:r.map(r=>(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,children:(0,W.jsxs)(`div`,{className:B(`group/row text-sidebar-muted-foreground/80 hover:bg-sidebar-row-hover hover:text-sidebar-foreground data-[state=open]:bg-sidebar-row-hover relative shrink-0 rounded-[var(--control-radius)]`,e.mobile&&`text-popover-foreground`,r.machine.id===t&&r.view===n&&`bg-sidebar-row-hover text-sidebar-foreground`),children:[(0,W.jsxs)(`button`,{className:B(`flex h-7 w-full cursor-pointer items-center gap-2 rounded-[var(--control-radius)] pr-2.5 pl-7 text-left text-[13px]`,r.view!==`global`&&`pl-11`),onClick:()=>r.count===0?void CP(r.machine.id,null):xP(r.machine.id,r.view),children:[(0,W.jsx)(eI,{group:r}),(0,W.jsx)(`span`,{className:`truncate`,children:r.name}),(0,W.jsx)(tI,{count:r.count,alert:$F(r,t),className:`group-hover/row:invisible`})]}),(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground absolute top-0.5 right-1 grid size-6 cursor-pointer place-items-center rounded-md opacity-0 transition-opacity group-hover/row:opacity-100 focus-visible:opacity-100 pointer-coarse:hidden`,"aria-label":`New terminal`,title:`New terminal`,onClick:()=>void CP(r.machine.id,r.view===`global`?null:r.view),children:(0,W.jsx)(V,{icon:Ga,className:`size-4`})})]})}),(0,W.jsxs)(tr,{onCloseAutoFocus:e=>e.preventDefault(),children:[(0,W.jsxs)(Vn,{onSelect:()=>void CP(r.machine.id,r.view===`global`?null:r.view),children:[(0,W.jsx)(V,{icon:Ga}),`New terminal`]}),r.view===`global`&&(0,W.jsxs)(Vn,{variant:`destructive`,onSelect:()=>void kF(r.machine.terminals.map(e=>({machine:r.machine.id,id:e.id}))),children:[(0,W.jsx)(V,{icon:So}),`Close All`]}),(0,W.jsxs)(Vn,{variant:`destructive`,disabled:r.count===0,onSelect:()=>void kF(r.machine.terminals.filter(e=>GP(e)===r.view).map(e=>({machine:r.machine.id,id:e.id}))),children:[(0,W.jsx)(V,{icon:So}),r.view===`global`?`Close All Except Projects`:`Close All`]})]})]},`${r.machine.id}:${r.view}`))})}function ZF(){let e=O(e=>e.machines),t=O(e=>e.projects);return e.flatMap(e=>{let n=e.status===`online`?e.terminals:[],r=[...new Set(n.flatMap(e=>e.projectId===null?[]:[e.projectId]))];return[{machine:e,view:tt,name:e.name,count:n.filter(e=>e.projectId===null).length},...r.map(r=>({machine:e,view:r,name:t.find(t=>t.machine===e.id&&t.id===r)?.name??`Removed project`,count:n.filter(e=>e.projectId===r).length}))]})}function QF(e){return e.machine.status===`online`&&e.machine.terminals.length>0}function $F(e,t){let n=BP();return e.machine.id===t&&n.layout.tabs.some(t=>(t.projectId??`global`)===e.view&&n.alerts.includes(t.id))}function eI(e){return e.group.view===`global`?(0,W.jsx)(Yd,{icon:e.group.machine.icon,className:`size-4 shrink-0`}):(0,W.jsx)(nc,{machine:e.group.machine.id,projectId:e.group.view,className:`size-4 shrink-0`})}function tI(e){return e.count===0?null:(0,W.jsx)(`span`,{className:B(`ml-auto grid h-4 min-w-4 shrink-0 place-items-center rounded-full px-1 text-[10px] leading-none font-medium tabular-nums`,e.alert?`bg-primary text-primary-foreground`:`text-foreground/75 bg-[color-mix(in_srgb,var(--foreground)_8%,var(--background))]`,e.className),children:e.count})}function nI(e){let t=O(e=>e.machines),[n,r]=Sr(`terminalGroupsExpanded`,!0),i=t.reduce((e,t)=>e+t.terminals.length,0),a=t.some(e=>e.status===`online`&&e.terminals.length>0),o=t.some(e=>e.status===`online`),s=a&&!e.mobile;if(t.length===0)return null;let c=(0,W.jsxs)(`button`,{className:B(e.buttonClassName,`group-hover/terminal:text-sidebar-foreground group-hover/terminal:[&>svg]:text-sidebar-foreground group-has-[[data-state=open]]/terminal:text-sidebar-foreground group-has-[[data-state=open]]/terminal:[&>svg]:text-sidebar-foreground h-8 w-full justify-start gap-2 px-2.5 text-sm`,s&&`group-hover/terminal:[&>svg]:opacity-0 pointer-coarse:[&>svg]:opacity-0`),title:`Terminal`,onClick:s?()=>r(!n):void 0,children:[(0,W.jsx)(V,{icon:ds}),`Terminal`,i>0&&(0,W.jsx)(`span`,{className:B(`text-foreground/75 ml-auto grid h-4 min-w-4 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_8%,var(--background))] px-1 text-[10px] leading-none font-medium tabular-nums`,o&&`group-hover/terminal:invisible group-has-[[data-state=open]]/terminal:invisible`,a&&`pointer-coarse:invisible`),children:i})]});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,disabled:!o,children:(0,W.jsxs)(`div`,{className:`group/terminal hover:bg-sidebar-row-hover has-[[data-state=open]]:bg-sidebar-row-hover data-[state=open]:bg-sidebar-row-hover relative rounded-[var(--control-radius)]`,children:[s?c:(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,disabled:!o,children:c}),(0,W.jsx)(on,{side:`bottom`,align:`start`,className:`max-h-80 w-(--radix-dropdown-menu-trigger-width) overflow-y-auto`,onCloseAutoFocus:e=>e.preventDefault(),children:(0,W.jsx)(VF,{})})]}),s&&(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground absolute top-1 left-1.5 grid size-6 cursor-pointer place-items-center rounded-md opacity-0 group-hover/terminal:opacity-100 focus-visible:opacity-100 pointer-coarse:opacity-100`,"aria-label":n?`Collapse terminals`:`Expand terminals`,"aria-expanded":n,onClick:()=>r(!n),children:(0,W.jsx)(V,{icon:Xr,"aria-hidden":!0,className:B(`size-4 transition-transform duration-200`,n&&`rotate-90`)})}),(0,W.jsx)(BF,{mobile:e.mobile})]})}),(0,W.jsxs)(tr,{onCloseAutoFocus:e=>e.preventDefault(),children:[(0,W.jsxs)(jn,{children:[(0,W.jsxs)(sr,{children:[(0,W.jsx)(V,{icon:Ga}),`New terminal`]}),(0,W.jsx)(Wn,{className:`max-h-80 overflow-y-auto`,children:(0,W.jsx)(VF,{contextMenu:!0})})]}),(0,W.jsxs)(Vn,{variant:`destructive`,disabled:!a,onSelect:()=>void kF(t.filter(e=>e.status===`online`).flatMap(e=>e.terminals.map(t=>({machine:e.id,id:t.id})))),children:[(0,W.jsx)(V,{icon:So}),`Close All`]})]})]}),(0,W.jsx)(`div`,{className:B(`grid transition-[grid-template-rows] duration-200`,n||e.mobile?`grid-rows-[1fr]`:`grid-rows-[0fr]`),inert:!n&&!e.mobile,children:(0,W.jsx)(`div`,{className:`min-h-0 overflow-hidden`,children:(0,W.jsx)(XF,{mobile:e.mobile})})}),(0,W.jsx)(RF,{})]})}function rI(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsxs)(vn,{open:t,onOpenChange:n,children:[(0,W.jsx)($t,{asChild:!0,children:(0,W.jsx)(`button`,{className:B(e.buttonClassName,`size-7`),title:`Menu`,"aria-label":`Menu`,children:(0,W.jsx)(V,{icon:Bo})})}),(0,W.jsxs)(en,{role:`group`,"aria-label":`Menu`,className:`flex w-56 flex-col gap-px p-1`,children:[(0,W.jsx)(nI,{buttonClassName:B(e.buttonClassName,`text-popover-foreground [&>svg]:text-popover-foreground`),mobile:!0}),(0,W.jsxs)(`button`,{className:B(e.buttonClassName,`text-popover-foreground [&>svg]:text-popover-foreground h-8 w-full justify-start gap-2 px-2.5 text-sm`),onClick:()=>{n(!1),A(!0)},children:[(0,W.jsx)(V,{icon:rs}),`Settings`]})]})]})}var iI=`relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none touch-pan-y [-webkit-touch-callout:none] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,aI={active:{status:`snoozed`,icon:ys},snoozed:{status:`active`,icon:fs},minimized:{status:`active`,icon:to},inactive:{status:`minimized`,icon:Wo},pinned:{status:`active`,icon:Yo}};function oI(e){let t=e.session,n=Xs(t.machine,t.projectId),r=O(e=>R(e,t.machine).icon),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(0),u=(0,U.useRef)(null),d=(0,U.useRef)(null),f=(0,U.useRef)(!1),p=e.activity?.waiting===!0,m=Object.values(e.activity?.tasks??{}).includes(`running`),h=!p&&(e.activity?.running===!0||m),g=e.activity?.running===!0||m,_=!p&&!h&&e.unseen,v=!e.selected&&!p&&!_;function y(){Be(t.machine,t.id,e.scope)}function b(){g?s(!0):y()}function x(e){let n=d.current;d.current=null,l(0),n!==null&&n.swiping&&(f.current=!0,e.clientX-n.x>e.currentTarget.offsetWidth*.4&&(t.status===`inactive`?ye(t.machine,t.id,{status:`active`}):b()),e.clientX-n.x<-e.currentTarget.offsetWidth*.4&&ye(t.machine,t.id,{status:aI[t.status].status}))}let S={onClick:()=>{f.current?f.current=!1:e.onSelect()},onPointerDown:t=>{e.saved&&t.pointerType===`touch`&&(f.current=!1,d.current={x:t.clientX,y:t.clientY,swiping:!1})},onPointerMove:e=>{let t=d.current;if(t===null)return;let n=e.clientX-t.x,r=e.clientY-t.y;!t.swiping&&Math.abs(n)<10&&Math.abs(r)<10||(!t.swiping&&Math.abs(n)<=Math.abs(r)?d.current=null:(t.swiping=!0,l(n)))},onPointerUp:x,onPointerCancel:()=>{d.current=null,l(0)}},C=c!==0&&(0,W.jsx)(`div`,{className:B(`absolute inset-x-0 flex items-center rounded-md px-4 text-white`,e.slim?`inset-y-0`:`inset-y-0.5`,c>0&&t.status!==`inactive`&&`bg-success`,c>0&&t.status===`inactive`&&`bg-[#56b6c2]`,c<0&&t.status===`active`&&`bg-[#c678dd]`,c<0&&t.status===`snoozed`&&`bg-[#d19a66]`,c<0&&t.status===`minimized`&&`bg-info`,c<0&&t.status===`inactive`&&`bg-[#5c6370]`,c<0&&t.status===`pinned`&&`bg-[#e06c75]`,c<0&&`justify-end`),children:(0,W.jsx)(V,{icon:c<0?aI[t.status].icon:t.status===`inactive`?Zo:hs,className:`size-6`})}),w=(0,W.jsx)(In,{open:o,onOpenChange:s,children:(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsx)(hr,{children:`Stop running work?`}),(0,W.jsx)(Ln,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:y,children:`Stop and Mark Done`})]})]})}),T=(0,W.jsx)(tr,{className:`w-44`,onCloseAutoFocus:e=>{u.current!==null&&(e.preventDefault(),u.current.focus(),u.current.select())},children:(0,W.jsx)(kk,{session:t,context:!0,mobile:!0,onDeactivate:b,onRename:()=>a(t.title)})}),E=i===null?(0,W.jsx)(`span`,{className:B(`min-w-0 flex-1 truncate text-sm`,v?`text-secondary-label font-normal`:`font-medium`,!v&&(e.unseen||p)&&`text-foreground`,!v&&!e.unseen&&!p&&`text-foreground/90`),children:(0,W.jsx)(jk,{session:t,awaitingTitle:!e.saved})}):(0,W.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let n=i.trim();a(null),n!==``&&n!==t.title&&ye(t.machine,t.id,{title:n})},children:(0,W.jsx)(`input`,{ref:u,value:i,onChange:e=>a(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>a(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&a(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),D=B(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,v&&`text-sidebar-muted-foreground/75`,!e.selected&&!v&&`text-sidebar-foreground bg-transparent`);return e.slim?(0,W.jsxs)(`li`,{className:`relative list-none`,children:[C,(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:B(iI,D,`flex h-9 items-center gap-2.5 px-2.5`,c!==0&&`bg-sidebar`),style:c===0?void 0:{transform:`translateX(${c}px)`},...S,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[(0,W.jsx)(`span`,{className:`flex shrink-0 items-center opacity-40 grayscale`,children:(0,W.jsx)(nc,{machine:t.machine,projectId:t.projectId})}),E,(0,W.jsx)(`span`,{className:`text-secondary-label ml-auto shrink-0 text-xs tabular-nums`,children:tn(t.updatedAt)})]})}),T]}),w]}):(0,W.jsxs)(`li`,{className:`relative list-none py-0.5`,children:[C,(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,disabled:!e.saved,children:(0,W.jsx)(`div`,{role:`button`,tabIndex:0,className:B(iI,D,h&&!e.selected&&c===0&&`opacity-70`,c!==0&&`bg-sidebar`),style:c===0?void 0:{transform:`translateX(${c}px)`},...S,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:(0,W.jsxs)(`div`,{className:`px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)`,children:[(0,W.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,W.jsx)(nc,{machine:t.machine,projectId:t.projectId,className:`size-5`}),E,(0,W.jsx)(Ak,{activity:e.activity,backgroundRunning:m,done:_})]}),(0,W.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,W.jsx)(Yd,{icon:r,className:`size-3 shrink-0`}),(0,W.jsxs)(`span`,{className:B(`min-w-0 flex-1 truncate`,v?`font-normal`:`font-medium`),children:[n,t.branch!==null&&(0,W.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | ${t.branch}`})]}),t.status===`pinned`&&(0,W.jsx)(V,{icon:Xo,className:`size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ys,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:tn(t.updatedAt)})]})]})})}),T]}),w]})}function sI(e){let t=Xs(e.machine,e.projectId),n=O(t=>R(t,e.machine).icon);return(0,W.jsx)(`li`,{className:`list-none py-0.5`,children:(0,W.jsx)(`div`,{role:`button`,tabIndex:0,className:B(iI,`bg-sidebar-row-active text-sidebar-foreground`),onClick:e.onSelect,children:(0,W.jsxs)(`div`,{className:`px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)`,children:[(0,W.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,W.jsx)(nc,{machine:e.machine,projectId:e.projectId,className:`size-5`}),(0,W.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,W.jsx)(V,{icon:ls,className:`text-warning-foreground size-4 shrink-0`})]}),(0,W.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,W.jsx)(Yd,{icon:n,className:`size-3 shrink-0`}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:[t,(0,W.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | Draft`})]}),(0,W.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:`now`})]})]})})})}var cI=`group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`;function lI(e){let t=e.session,[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(!1),o=(0,U.useRef)(null),s=e.activity?.waiting===!0,c=Object.values(e.activity?.tasks??{}).includes(`running`),l=!s&&(e.activity?.running===!0||c),u=e.activity?.running===!0||c,d=!s&&!l&&e.unseen,f=!e.selected&&!s&&!d;function p(){Be(t.machine,t.id,null)}function m(){u?a(!0):p()}let h=(0,W.jsx)(In,{open:i,onOpenChange:a,children:(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsx)(hr,{children:`Stop running work?`}),(0,W.jsx)(Ln,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:p,children:`Stop and Mark Done`})]})]})}),g=e.saved&&(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground inline-flex h-5 cursor-pointer items-center rounded-md px-1.5`,title:`Thread actions`,onClick:e=>e.stopPropagation(),children:(0,W.jsx)(V,{icon:wo,className:`size-3.5`})})}),(0,W.jsx)(on,{align:`end`,className:`w-44`,onClick:e=>e.stopPropagation(),onCloseAutoFocus:e=>{o.current!==null&&(e.preventDefault(),o.current.focus(),o.current.select())},children:(0,W.jsx)(kk,{session:t,context:!1,mobile:!1,onDeactivate:m,onRename:()=>r(t.title)})})]}),_=(0,W.jsx)(tr,{className:`w-44`,onCloseAutoFocus:e=>{o.current!==null&&(e.preventDefault(),o.current.focus(),o.current.select())},children:(0,W.jsx)(kk,{session:t,context:!0,mobile:!1,onDeactivate:m,onRename:()=>r(t.title)})}),v=n===null?(0,W.jsx)(`span`,{className:B(`min-w-0 flex-1 truncate text-sm`,f?`text-secondary-label font-normal`:`font-medium`,!f&&(e.unseen||s)&&`text-foreground`,!f&&!e.unseen&&!s&&`text-foreground/90`),children:(0,W.jsx)(jk,{session:t,awaitingTitle:!e.saved})}):(0,W.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let i=n.trim();r(null),i!==``&&i!==t.title&&ye(t.machine,t.id,{title:i})},children:(0,W.jsx)(`input`,{ref:o,value:n,onChange:e=>r(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>r(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&r(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),y=B(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,f&&`text-sidebar-muted-foreground/75 hover:bg-sidebar-row-hover hover:text-sidebar-foreground has-[[data-state=open]]:bg-sidebar-row-hover has-[[data-state=open]]:text-sidebar-foreground`,!e.selected&&!f&&`text-sidebar-foreground hover:bg-sidebar-row-hover has-[[data-state=open]]:bg-sidebar-row-hover bg-transparent`);return(0,W.jsxs)(`li`,{className:`list-none`,children:[(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:B(cI,y,`flex h-9 items-center gap-2 px-2.5`,l&&!e.selected&&`opacity-70 transition-opacity focus-within:opacity-100 hover:opacity-100`),onClick:e.onSelect,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[(0,W.jsxs)(`span`,{className:`group-any-hover/sidebar-row:mask-r-from-[calc(100%-5rem)] group-any-hover/sidebar-row:mask-r-to-[calc(100%-3rem)] flex min-w-0 flex-1 items-center gap-2 group-has-[[data-state=open]]/sidebar-row:mask-r-from-[calc(100%-5rem)] group-has-[[data-state=open]]/sidebar-row:mask-r-to-[calc(100%-3rem)]`,children:[v,t.status===`pinned`&&(0,W.jsx)(V,{icon:Xo,className:`text-muted-foreground/65 size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ys,className:`text-secondary-label size-3 shrink-0`}),(0,W.jsx)(Ak,{activity:e.activity,backgroundRunning:c,done:d}),(0,W.jsx)(`span`,{className:`text-secondary-label shrink-0 text-xs tabular-nums`,children:tn(t.updatedAt)})]}),e.saved&&(0,W.jsxs)(`div`,{className:`group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100 pointer-events-none absolute inset-y-0 right-0 flex items-center pr-1.5 opacity-0 transition-opacity has-[[data-state=open]]:pointer-events-auto has-[[data-state=open]]:opacity-100`,children:[g,(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground ms-0.5 me-0.5 inline-flex size-5 cursor-pointer items-center justify-center transition-colors`,title:`Done`,"aria-label":`Done`,onClick:e=>{e.stopPropagation(),m()},children:(0,W.jsx)(V,{icon:hs,strokeWidth:1.35,className:`size-5 scale-110`})})]})]})}),_]}),h]})}function uI(e){return(0,W.jsx)(`li`,{className:`list-none`,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:B(cI,`bg-sidebar-row-active text-sidebar-foreground flex h-9 items-center gap-2 px-2.5`),onClick:e.onSelect,children:[(0,W.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,W.jsx)(V,{icon:ls,className:`text-warning-foreground size-4 shrink-0`})]})})}var dI=`relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none touch-pan-y [-webkit-touch-callout:none] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`;function fI(e){let t=e.session,[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(0),c=(0,U.useRef)(null),l=(0,U.useRef)(null),u=(0,U.useRef)(!1),d=e.activity?.waiting===!0,f=Object.values(e.activity?.tasks??{}).includes(`running`),p=!d&&(e.activity?.running===!0||f),m=e.activity?.running===!0||f,h=!d&&!p&&e.unseen,g=!e.selected&&!d&&!h;function _(){Be(t.machine,t.id,null)}function v(){m?a(!0):_()}function y(e){let n=l.current;l.current=null,s(0),n!==null&&n.swiping&&(u.current=!0,e.clientX-n.x>e.currentTarget.offsetWidth*.4&&(t.status===`inactive`?ye(t.machine,t.id,{status:`active`}):v()),e.clientX-n.x<-e.currentTarget.offsetWidth*.4&&ye(t.machine,t.id,{status:aI[t.status].status}))}let b={onClick:()=>{u.current?u.current=!1:e.onSelect()},onPointerDown:t=>{e.saved&&t.pointerType===`touch`&&(u.current=!1,l.current={x:t.clientX,y:t.clientY,swiping:!1})},onPointerMove:e=>{let t=l.current;if(t===null)return;let n=e.clientX-t.x,r=e.clientY-t.y;!t.swiping&&Math.abs(n)<10&&Math.abs(r)<10||(!t.swiping&&Math.abs(n)<=Math.abs(r)?l.current=null:(t.swiping=!0,s(n)))},onPointerUp:y,onPointerCancel:()=>{l.current=null,s(0)}},x=o!==0&&(0,W.jsx)(`div`,{className:B(`absolute inset-0 flex items-center rounded-md px-4 text-white`,o>0&&t.status!==`inactive`&&`bg-success`,o>0&&t.status===`inactive`&&`bg-[#56b6c2]`,o<0&&t.status===`active`&&`bg-[#c678dd]`,o<0&&t.status===`snoozed`&&`bg-[#d19a66]`,o<0&&t.status===`minimized`&&`bg-info`,o<0&&t.status===`inactive`&&`bg-[#5c6370]`,o<0&&t.status===`pinned`&&`bg-[#e06c75]`,o<0&&`justify-end`),children:(0,W.jsx)(V,{icon:o<0?aI[t.status].icon:t.status===`inactive`?Zo:hs,className:`size-6`})}),S=(0,W.jsx)(In,{open:i,onOpenChange:a,children:(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsx)(hr,{children:`Stop running work?`}),(0,W.jsx)(Ln,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:_,children:`Stop and Mark Done`})]})]})}),C=(0,W.jsx)(tr,{className:`w-44`,onCloseAutoFocus:e=>{c.current!==null&&(e.preventDefault(),c.current.focus(),c.current.select())},children:(0,W.jsx)(kk,{session:t,context:!0,mobile:!0,onDeactivate:v,onRename:()=>r(t.title)})}),w=n===null?(0,W.jsx)(`span`,{className:B(`min-w-0 flex-1 truncate text-sm`,g?`text-secondary-label font-normal`:`font-medium`,!g&&(e.unseen||d)&&`text-foreground`,!g&&!e.unseen&&!d&&`text-foreground/90`),children:(0,W.jsx)(jk,{session:t,awaitingTitle:!e.saved})}):(0,W.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let i=n.trim();r(null),i!==``&&i!==t.title&&ye(t.machine,t.id,{title:i})},children:(0,W.jsx)(`input`,{ref:c,value:n,onChange:e=>r(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>r(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&r(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),T=B(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,g&&`text-sidebar-muted-foreground/75`,!e.selected&&!g&&`text-sidebar-foreground bg-transparent`);return(0,W.jsxs)(`li`,{className:`relative list-none`,children:[x,(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:B(dI,T,`flex h-9 items-center gap-2 px-2.5`,p&&!e.selected&&o===0&&`opacity-70`,o!==0&&`bg-sidebar`),style:o===0?void 0:{transform:`translateX(${o}px)`},...b,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[w,t.status===`pinned`&&(0,W.jsx)(V,{icon:Xo,className:`text-muted-foreground/65 size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ys,className:`text-secondary-label size-3 shrink-0`}),(0,W.jsx)(Ak,{activity:e.activity,backgroundRunning:f,done:h}),(0,W.jsx)(`span`,{className:`text-secondary-label shrink-0 text-xs tabular-nums`,children:tn(t.updatedAt)})]})}),C]}),S]})}function pI(e){return(0,W.jsx)(`li`,{className:`list-none`,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:B(dI,`bg-sidebar-row-active text-sidebar-foreground flex h-9 items-center gap-2 px-2.5`),onClick:e.onSelect,children:[(0,W.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,W.jsx)(V,{icon:ls,className:`text-warning-foreground size-4 shrink-0`})]})})}function mI(e){let t=Xs(e.machine,e.projectId),n=O(t=>R(t,e.machine).icon),r=O(e=>e.selection),i=O(e=>e.machines),a=O(e=>e.unseen),o=r!==null&&r.sessionId===null&&r.machine===e.machine&&r.projectId===e.projectId,s=e.mobile?pI:uI,c=e.mobile?fI:lI;function l(){De({machine:e.machine,projectId:e.projectId,sessionId:null})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`li`,{className:`text-sidebar-muted-foreground/60 mx-0.5 mt-2 flex h-7 items-center gap-2 pl-2 text-xs font-medium first:mt-0`,children:[(0,W.jsx)(Yd,{icon:n,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`bg-sidebar-border/60 h-px min-w-2 flex-1`}),(0,W.jsx)(nc,{machine:e.machine,projectId:e.projectId,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),(0,W.jsx)(`span`,{className:`bg-sidebar-border/60 h-px min-w-2 flex-1`}),(0,W.jsx)(`button`,{className:`text-sidebar-muted-foreground/80 hover:bg-sidebar-row-hover hover:text-sidebar-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-[var(--control-radius)]`,title:`New thread`,"aria-label":`New thread`,onClick:l,children:(0,W.jsx)(V,{icon:Ga,className:`size-4 text-(--sidebar-icon-color)`})})]}),o&&(0,W.jsx)(s,{onSelect:l}),e.sessions.map(t=>(0,W.jsx)(c,{session:t,selected:r?.machine===t.machine&&r.sessionId===t.id,activity:Te(i,t.machine,t.id),unseen:a.includes(F(t.machine,t.id)),saved:t!==e.started,onSelect:()=>De({machine:t.machine,projectId:t.projectId,sessionId:t.id})},F(t.machine,t.id)))]})}function hI(e){let t=O(e=>e.machines),n=O(e=>e.projects),r=O(e=>e.sessions),i=O(e=>e.unseen),[a,o]=(0,U.useState)(!1),s=t.map(e=>({machine:e,projects:n.filter(t=>t.machine===e.id&&!t.hidden)})).filter(e=>t.length>1||e.projects.length>0),c=r.filter(e=>{let n=Te(t,e.machine,e.id);return n?.running===!0||n?.waiting===!0||Object.values(n?.tasks??{}).includes(`running`)||i.includes(F(e.machine,e.id))});function l(e,t){return n.find(n=>n.machine===e&&n.id===t)}function u(e){return(0,W.jsx)(ln,{className:`text-muted-foreground grid size-5 min-h-0 shrink-0 place-items-center rounded-sm p-0`,title:`Manage projects on ${e.name}`,"aria-label":`Manage projects on ${e.name}`,disabled:e.status!==`online`,onSelect:()=>{Ue(`Projects`),Ve({settingsMachine:e.id})},children:(0,W.jsx)(V,{icon:cs,className:`size-3.5`})})}function d(e){return e.status===`online`?e.name:e.status===`unpaired`?`${e.name} · needs pairing`:`${e.name} · offline`}return(0,W.jsxs)(pn,{open:a,onOpenChange:o,children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:`hover:bg-sidebar-row-hover data-[state=open]:bg-sidebar-row-hover -ml-1.5 flex h-7 min-w-0 cursor-pointer items-center gap-1.5 rounded-[var(--control-radius)] px-1.5 text-sm font-medium`,title:e.scope===null?`Inbox`:l(e.scope.machine,e.scope.projectId)?.path,children:[e.scope!==null&&(0,W.jsx)(nc,{machine:e.scope.machine,projectId:e.scope.projectId,className:`size-4 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,W.jsx)(`span`,{className:`truncate`,children:e.scope===null?`Inbox`:l(e.scope.machine,e.scope.projectId)?.name}),(0,W.jsx)(V,{icon:br,className:`text-sidebar-muted-foreground size-3.5 shrink-0`})]})}),(0,W.jsxs)(on,{className:`w-64`,children:[(0,W.jsxs)(Xt,{value:e.scope===null?``:F(e.scope.machine,e.scope.projectId),children:[(0,W.jsxs)(xn,{value:``,className:`pr-9 pl-8 *:data-[slot=dropdown-menu-radio-item-indicator]:right-auto *:data-[slot=dropdown-menu-radio-item-indicator]:left-2`,onSelect:()=>e.onScope(null),children:[(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:`Inbox`}),c.length>0&&(0,W.jsx)(`span`,{className:`text-foreground grid h-4 min-w-4 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))] px-1 text-[10px] leading-none font-medium tabular-nums`,children:c.length})]}),s.length>0&&(0,W.jsx)(an,{}),s.map(({machine:n,projects:r},i)=>(0,W.jsxs)(U.Fragment,{children:[i>0&&(0,W.jsx)(an,{}),t.length>1&&(0,W.jsxs)(`div`,{className:`flex items-center`,children:[(0,W.jsxs)(hn,{className:`flex min-w-0 flex-1 items-center gap-2 pl-[0.52rem]!`,children:[(0,W.jsx)(Yd,{icon:n.icon,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:d(n)})]}),(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 pr-1`,children:[u(n),(0,W.jsx)(ln,{className:`text-muted-foreground grid size-5 min-h-0 shrink-0 place-items-center rounded-sm p-0`,title:`Add project to ${n.name}`,"aria-label":`Add project to ${n.name}`,disabled:n.status!==`online`,onSelect:()=>e.onAddProject(n.id),children:(0,W.jsx)(V,{icon:Ga,className:`size-3.5`})})]})]}),r.map(t=>{let n=c.filter(e=>e.machine===t.machine&&e.projectId===t.id).length;return(0,W.jsxs)(xn,{value:F(t.machine,t.id),title:t.path,className:`group/project pr-1 pl-8 *:data-[slot=dropdown-menu-radio-item-indicator]:right-auto *:data-[slot=dropdown-menu-radio-item-indicator]:left-2`,onSelect:()=>e.onScope({machine:t.machine,projectId:t.id}),onContextMenu:n=>{n.preventDefault(),o(!1),e.onEdit(t)},children:[(0,W.jsx)(nc,{machine:t.machine,projectId:t.id,className:`size-5 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t.name}),n>0&&(0,W.jsx)(`span`,{className:`text-foreground grid h-4 min-w-4 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))] px-1 text-[10px] leading-none font-medium tabular-nums`,children:n}),(0,W.jsx)(`div`,{className:`-my-0.5 flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-data-highlighted/project:opacity-100 pointer-coarse:opacity-100`,children:(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground hover:bg-foreground/10 grid size-5 cursor-pointer place-items-center rounded-sm [&_svg]:size-3.5`,title:`Configure project`,"aria-label":`Configure ${t.name}`,onClick:n=>{n.stopPropagation(),o(!1),e.onEdit(t)},children:(0,W.jsx)(V,{icon:rs})})})]},F(t.machine,t.id))})]},n.id))]}),t.length===1&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(an,{}),(0,W.jsxs)(`div`,{className:`flex items-center`,children:[(0,W.jsxs)(ln,{className:`flex-1 pl-8`,onSelect:()=>e.onAddProject(t[0].id),children:[(0,W.jsx)(V,{icon:Ga}),`Add project…`]}),(0,W.jsx)(`div`,{className:`flex shrink-0 items-center pr-1`,children:u(t[0])})]})]})]})]})}function gI(e){let t=O(e=>e.errors),n=O(e=>e.machines),r=O(e=>e.sessions),i=O(e=>e.unseen),a=n.filter(e=>e.status===`offline`||e.status===`unpaired`),o=r.filter(e=>Object.values(Te(n,e.machine,e.id)?.tasks??{}).includes(`failed`)),s=r.filter(e=>Te(n,e.machine,e.id)?.waiting===!0),c=r.filter(e=>{let t=Te(n,e.machine,e.id);return i.includes(F(e.machine,e.id))&&t?.waiting!==!0&&t?.running!==!0&&!Object.values(t?.tasks??{}).includes(`running`)}),l=t.length+a.length+o.length,u=!e.hideDone&&c.length>0;if(l===0&&s.length===0&&!u)return null;let d=c.map(e=>(0,W.jsx)(yI,{session:e,icon:go,className:`text-success`,detail:`Done`},F(e.machine,e.id))),f=s.map(e=>(0,W.jsx)(yI,{session:e,icon:ss,className:`text-question`,detail:`Waiting for approval`},F(e.machine,e.id))),p=e.collapsed===!0&&u&&s.length>0&&l>0;return(0,W.jsxs)(`div`,{className:B(`flex shrink-0 items-center gap-1`,e.className),children:[p&&(0,W.jsxs)(_I,{className:`bg-question/15 text-question`,icon:ss,count:s.length+c.length,label:`${s.length} waiting for approval, ${c.length} done`,children:[f,d]}),!p&&u&&(0,W.jsx)(_I,{className:`bg-success/15 text-success`,icon:go,count:c.length,label:`${c.length} done`,children:d}),!p&&s.length>0&&(0,W.jsx)(_I,{className:`bg-question/15 text-question`,icon:ss,count:s.length,label:`${s.length} waiting for approval`,children:f}),l>0&&(0,W.jsxs)(_I,{className:B(t.length>0&&`bg-error/15 text-error`,t.length===0&&`bg-warning/15 text-warning-foreground`),icon:t.length>0?An:qa,count:l,label:l===1?`1 problem`:`${l} problems`,onClose:Je,children:[t.map((e,t)=>(0,W.jsx)(vI,{icon:An,className:`text-error`,children:(0,W.jsx)(`span`,{className:`text-error-foreground whitespace-pre-wrap`,children:e})},t)),a.map(e=>(0,W.jsxs)(vI,{icon:qa,className:`text-warning-foreground`,children:[e.status===`offline`&&`${e.name} is offline`,e.status===`unpaired`&&`${e.name} needs pairing`]},e.id)),o.map(e=>(0,W.jsx)(yI,{session:e,icon:qa,className:`text-warning-foreground`,detail:`Background task failed`},F(e.machine,e.id)))]})]})}function _I(e){return(0,W.jsxs)(vn,{onOpenChange:t=>!t&&e.onClose?.(),children:[(0,W.jsx)($t,{asChild:!0,children:(0,W.jsxs)(`button`,{className:B(`flex h-5 shrink-0 cursor-pointer items-center gap-0.75 rounded-[6px] px-1.25 text-[11px] font-medium tabular-nums`,e.className),title:e.label,"aria-label":e.label,children:[(0,W.jsx)(V,{icon:e.icon,className:`size-3 shrink-0`}),e.count]})}),(0,W.jsx)(en,{align:`end`,collisionPadding:12,className:`flex max-h-80 w-[min(20rem,calc(100vw-2rem))] flex-col gap-px overflow-y-auto p-1 text-sm`,children:e.children})]})}function vI(e){return(0,W.jsxs)(`div`,{className:`flex items-start gap-2 px-2 py-1.5`,children:[(0,W.jsx)(V,{icon:e.icon,className:B(`mt-0.5 size-4 shrink-0`,e.className)}),(0,W.jsx)(`div`,{className:`min-w-0 flex-1`,children:e.children})]})}function yI(e){return(0,W.jsx)(er,{asChild:!0,children:(0,W.jsx)(`button`,{className:`hover:bg-accent cursor-pointer rounded-md text-left`,onClick:()=>De({machine:e.session.machine,projectId:e.session.projectId,sessionId:e.session.id}),children:(0,W.jsxs)(vI,{icon:e.icon,className:e.className,children:[(0,W.jsx)(`div`,{className:`text-foreground truncate`,children:e.session.title}),(0,W.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:e.detail})]})})})}var bI=`text-sidebar-muted-foreground/80 hover:bg-sidebar-row-hover hover:text-sidebar-foreground flex shrink-0 cursor-pointer items-center justify-center rounded-[var(--control-radius)] [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-(--sidebar-icon-color) hover:[&>svg]:text-sidebar-foreground`;function xI(e){let t=O(e=>e.selection),n=O(e=>e.machines),i=O(e=>e.sessions),a=O(e=>e.projects),o=O(e=>e.settings.provider),s=O(e=>e.unseen),c=O(e=>e.loaded),u=O(e=>e.inactive),d=O(e=>e.inactiveVersion),f=O(e=>e.prefs.groupActiveByProject),[p,m]=Sr(`sidebarScope`,null),[h,g]=(0,U.useState)(null),[_,v]=(0,U.useState)(null),[y,b]=(0,U.useState)(!1),[x,S]=(0,U.useState)(!1),[C,w]=(0,U.useState)(!1),[T,E]=Sr(`sidebarWidth`,240),D=i.filter(e=>p===null||e.machine===p.machine&&e.projectId===p.projectId).sort((e,t)=>t.updatedAt-e.updatedAt),k=D.filter(e=>{let t=Te(n,e.machine,e.id);return e.status===`snoozed`&&t?.waiting!==!0&&(t?.running===!0||Object.values(t?.tasks??{}).includes(`running`))}),j=[...D.filter(e=>e.status===`pinned`),...D.filter(e=>e.status===`active`||e.status===`snoozed`&&!k.includes(e))],M=D.filter(e=>e.status===`minimized`),N=p?.machine??null,ee=p?.projectId??null,te=t!==null&&t.sessionId!==null&&c&&!i.some(e=>e.machine===t.machine&&e.id===t.sessionId)?{machine:t.machine,id:t.sessionId,provider:o,title:`New thread`,projectId:t.projectId,branch:null,updatedAt:Date.now(),status:`active`}:null,ne=t!==null&&t.sessionId===null?t:null,P=te===null?j:[te,...j],re=f&&p===null,ie=[...new Map([...ne===null?[]:[ne],...P].map(e=>[F(e.machine,e.projectId),e]))],oe=e.mobile?sI:Pk;(0,U.useEffect)(()=>{if(!C)return;let e=!0,t=0;async function n(){let n=++t,i=N===null?z().machines.filter(e=>e.status===`online`).map(e=>e.id):[N],a=await Promise.all(i.map(async e=>(await r(e,`sessions.inactive`,{projectId:ee})).map(t=>({...t,machine:e}))));e&&n===t&&Ve({inactive:a.flat().sort((e,t)=>t.updatedAt-e.updatedAt)})}function i(){document.visibilityState===`visible`&&n().catch(ae)}return n().catch(ae),window.addEventListener(`focus`,i),document.addEventListener(`visibilitychange`,i),()=>{e=!1,window.removeEventListener(`focus`,i),document.removeEventListener(`visibilitychange`,i)}},[C,N,ee,d]);function se(e,t,n){De({machine:e,projectId:t,sessionId:n})}function ce(){let e=p??t??le();e===null?n.length>0?g(n[0].id):Ue(`Machines`):se(e.machine,e.projectId,null)}function le(){let e=localStorage.getItem(`lastProject`),t=e===null?null:JSON.parse(e),n=(t===null?void 0:a.find(e=>e.machine===t.machine&&e.id===t.projectId))??a.at(0);return n===void 0?null:{machine:n.machine,projectId:n.id}}Ys([`mod+n`,`mod+t`],ce,{enableOnFormTags:!0,preventDefault:!0}),Ys([`mod+1`,`mod+2`,`mod+3`,`mod+4`,`mod+5`,`mod+6`,`mod+7`,`mod+8`,`mod+9`],e=>{let t=re?ie.flatMap(e=>P.filter(t=>F(t.machine,t.projectId)===e[0])):P,n=/^(?:Digit|Numpad)([1-9])$/.exec(e.code);if(n===null)throw Error(`unexpected session shortcut key ${e.code}`);let r=t[Number(n[1])-1];r!==void 0&&se(r.machine,r.projectId,r.id)},{enableOnFormTags:!0,preventDefault:!0,enabled:!e.mobile});function ue(e){let t=e.clientX-T;Pt(e,e=>{let n=Math.min(480,Math.max(200,e.clientX-t));E(n)})}function de(r,i){let a=e.mobile?oI:Nk;return(0,W.jsx)(a,{session:r,slim:i,selected:t?.machine===r.machine&&t.sessionId===r.id,activity:Te(n,r.machine,r.id),unseen:s.includes(F(r.machine,r.id)),saved:r!==te,scope:p,onSelect:()=>se(r.machine,r.projectId,r.id)},F(r.machine,r.id))}function I(e){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`li`,{className:B(`mx-0.5 h-9 pt-2`,e.first&&`mt-auto`),children:(0,W.jsxs)(`button`,{"aria-expanded":e.open,className:`text-sidebar-muted-foreground/60 flex h-9 w-full cursor-pointer items-center gap-2 rounded-md px-2 text-left text-xs font-medium`,onClick:e.onToggle,children:[(0,W.jsx)(V,{icon:e.icon,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`-ms-1 shrink-0`,children:e.label}),(0,W.jsx)(`span`,{className:`bg-sidebar-border/60 h-px min-w-2 flex-1`}),(0,W.jsx)(V,{icon:br,className:B(`size-3 shrink-0 transition-transform`,!e.open&&`rotate-180`)})]})}),e.open&&e.items.map(e=>de(e,e.status===`inactive`))]})}return(0,W.jsxs)(`aside`,{className:B(`bg-sidebar text-sidebar-foreground border-sidebar-border flex flex-none border-r select-none`,e.className),children:[(0,W.jsxs)(`div`,{className:B(`relative flex min-w-0 flex-col`,e.mobile&&`flex-1`),style:e.mobile?void 0:{width:T},children:[(0,W.jsxs)(`div`,{className:`flex h-(--workspace-topbar-height) shrink-0 items-center gap-2 px-3`,children:[e.mobile?(0,W.jsx)(rI,{buttonClassName:bI}):(0,W.jsx)(`button`,{className:B(bI,`size-7`),title:`Hide sidebar (${Ft}+B)`,"aria-label":`Hide sidebar`,onClick:e.onHide,children:(0,W.jsx)(V,{icon:Ko})}),(0,W.jsx)(hI,{scope:p,onScope:m,onEdit:v,onAddProject:g}),e.mobile&&(0,W.jsx)(gI,{hideDone:!0}),(0,W.jsx)(`button`,{className:B(bI,`ml-auto size-7`),title:`Search (${Ft}+K)`,"aria-label":`Search`,onClick:()=>l(!0),children:(0,W.jsx)(V,{icon:nr})}),(0,W.jsx)(`button`,{className:B(bI,`size-7`),title:`New thread (${Ft}+N)`,onClick:ce,children:(0,W.jsx)(V,{icon:ls})})]}),(0,W.jsx)(`nav`,{className:`flex min-h-0 flex-1 [scrollbar-width:none] flex-col overflow-y-auto px-(--sidebar-content-inset) pb-(--sidebar-content-inset)`,children:(0,W.jsxs)(`ul`,{className:`flex flex-1 flex-col gap-px`,children:[re?ie.map(([t,n])=>(0,W.jsx)(mI,{machine:n.machine,projectId:n.projectId,sessions:P.filter(e=>F(e.machine,e.projectId)===t),started:te,mobile:e.mobile},t)):(0,W.jsxs)(W.Fragment,{children:[ne!==null&&(0,W.jsx)(oe,{machine:ne.machine,projectId:ne.projectId,onSelect:()=>se(ne.machine,ne.projectId,null)}),P.map(e=>de(e,!1))]}),j.length===0&&te===null&&t?.sessionId!==null&&(0,W.jsx)(`li`,{className:`text-sidebar-muted-foreground/60 px-2.5 py-6 text-center text-xs`,children:`No threads yet`}),k.length>0&&I({icon:ys,label:y?`Snoozed`:`Snoozed (${k.length})`,items:k,open:y,onToggle:()=>b(!y),first:!0}),M.length>0&&I({icon:Wo,label:x?`Minimized`:`Minimized (${M.length})`,items:M,open:x,onToggle:()=>S(!x),first:k.length===0}),I({icon:ms,label:`Done`,items:u,open:C,onToggle:()=>w(!C),first:k.length===0&&M.length===0})]})}),!e.mobile&&(0,W.jsxs)(`div`,{className:`border-sidebar-border @container flex shrink-0 flex-col gap-px border-t p-(--sidebar-content-inset)`,children:[(0,W.jsx)(nI,{buttonClassName:bI,mobile:!1}),(0,W.jsxs)(`div`,{className:`relative`,children:[(0,W.jsxs)(`button`,{className:B(bI,`h-8 w-full justify-start gap-2 px-2.5 text-sm`),title:`Settings`,onClick:()=>A(!0),children:[(0,W.jsx)(V,{icon:rs}),(0,W.jsx)(`span`,{className:`truncate`,children:`Settings`})]}),(0,W.jsxs)(`div`,{className:`absolute top-1.5 right-1.5`,children:[(0,W.jsx)(gI,{className:`@max-[13rem]:hidden`,hideDone:!1}),(0,W.jsx)(gI,{className:`hidden @max-[13rem]:flex`,hideDone:!1,collapsed:!0})]})]})]}),!e.mobile&&(0,W.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,className:`group absolute inset-y-0 -right-1 z-20 w-2 cursor-col-resize select-none`,onPointerDown:ue,children:(0,W.jsx)(`span`,{className:`group-hover:bg-border group-active:bg-primary/60 pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`})})]}),h!==null&&(0,W.jsx)(kD,{machine:h,onClose:()=>g(null),onAdd:e=>{g(null),se(e.machine,e.id,null)}}),_!==null&&(0,W.jsx)(jD,{project:_,onClose:()=>v(null),onRemoved:()=>{p?.machine===_.machine&&p.projectId===_.id&&m(null),v(null)}})]})}var SI={running:`Running`,completed:`Done`,failed:`Failed`,stopped:`Stopped`};function CI(e,t){return{agents:e.flatMap(e=>e.kind===`subagent`?[{item:e,agentId:e.agentId,status:TI(e.status,e.agentId,t)}]:[]),tasks:e.flatMap(e=>e.kind===`command`&&e.background!==null?[{item:e,taskId:e.background.taskId,path:e.background.outputPath,events:e.background.events,status:TI(e.status,e.background.taskId,t)}]:[])}}function wI(e){return e.description===``?e.command:e.description}function TI(e,t,n){let r=t===null?void 0:n?.tasks[t];return r===void 0?e===`running`?t===null&&n?.running===!0?`Running`:`Stopped`:SI[e]:SI[r]}function EI(e){return(0,W.jsx)(`span`,{className:B(e.active&&`text-shimmer`),children:e.text})}function DI(e){return(0,W.jsxs)(`span`,{className:B(`flex min-w-0 items-baseline overflow-hidden text-[13px] leading-4 tracking-[-0.04px]`,e.grouped?`gap-1.5`:`gap-2`),children:[(0,W.jsx)(`span`,{className:B(`text-foreground shrink-0`,e.grouped?`font-normal`:`font-medium`),children:(0,W.jsx)(EI,{text:e.title,active:e.pending})}),e.subtitle!==void 0&&e.subtitle!==``&&(0,W.jsx)(`span`,{className:B(`min-w-0 truncate tabular-nums`,e.grouped?`text-muted-foreground/70`:`text-muted-foreground`),children:e.subtitle}),e.args?.map(t=>(0,W.jsx)(`span`,{className:B(`min-w-0 truncate tabular-nums`,e.grouped?`text-muted-foreground/70`:`text-muted-foreground`),children:t},t))]})}function OI(e){return(0,W.jsx)(`span`,{"aria-hidden":!0,className:B(`text-muted-foreground/70 flex size-6 shrink-0 items-center justify-center transition-opacity`,e.open?`opacity-100`:`opacity-0 group-hover/tool:opacity-100`,e.className),children:(0,W.jsx)(V,{icon:ur,strokeWidth:2.5,className:B(`size-3.5 transition-transform`,!e.open&&`-rotate-90`)})})}function kI(e){let t=e.onToggle,n=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`flex max-w-[calc(100%-24px)] min-w-0 items-center`,children:(0,W.jsx)(DI,{title:e.title,subtitle:e.subtitle,args:e.args,pending:e.pending,grouped:e.grouped})}),t!==null&&(0,W.jsx)(OI,{open:e.open})]});return(0,W.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col`,children:[t===null?(0,W.jsx)(`div`,{className:B(`flex w-full items-center select-none`,e.grouped?`min-h-7`:`min-h-9`),children:n}):(0,W.jsx)(`button`,{type:`button`,"aria-expanded":e.open,onClick:t,className:B(`group/tool focus-visible:ring-ring/70 flex w-full cursor-pointer items-center rounded-md text-left select-none focus-visible:ring-2 focus-visible:outline-none`,e.grouped?`h-7`:`h-9`),children:n}),e.open&&e.children!==void 0&&(0,W.jsx)(`div`,{className:B(`min-w-0 pt-1`,e.rail!==!1&&`ps-3`),children:e.children})]})}var AI=new Map([[`build`,`text-blue-400`],[`explore`,`text-yellow-400`],[`plan`,`text-pink-400`],[`review`,`text-green-400`],[`writer`,`text-purple-400`]]),jI=new Map([[`Running`,`Launched agent`],[`Done`,`Agent finished`],[`Failed`,`Agent failed`],[`Stopped`,`Agent stopped`]]),MI=new Map([[`Running`,`Started in background`],[`Done`,`Background task finished`],[`Failed`,`Background task failed`],[`Stopped`,`Background task stopped`]]),NI=[`text-sky-400`,`text-amber-400`,`text-fuchsia-400`,`text-emerald-400`,`text-violet-400`,`text-cyan-400`,`text-orange-400`,`text-teal-400`,`text-rose-400`,`text-indigo-400`,`text-lime-400`,`text-red-400`];function PI(e){let t=e.agent,n=t.toLowerCase(),r=0;for(let e of n)r=r*31+e.charCodeAt(0)>>>0;return{name:t[0].toUpperCase()+t.slice(1),description:e.description,tone:AI.get(n)??NI[r%NI.length]}}function FI(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,className:B(`size-4 shrink-0`,e.className),children:[(0,W.jsx)(`path`,{d:`M4 4.5C4 4.22386 4.22386 4 4.5 4H11.5C11.7761 4 12 4.22386 12 4.5V11.5C12 11.7761 11.7761 12 11.5 12H4.5C4.22386 12 4 11.7761 4 11.5V4.5Z`,fill:`currentColor`}),(0,W.jsx)(`path`,{d:`M14.5 1C14.7761 1 15 1.22386 15 1.5V14.5C15 14.7761 14.7761 15 14.5 15H1.5C1.22386 15 1 14.7761 1 14.5V1.5C1 1.22386 1.22386 1 1.5 1H14.5ZM2 14H14V2H2V14Z`,fill:`currentColor`})]})}function II(e){return(0,W.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":!0,className:B(`size-4 shrink-0`,e.className),children:Array.from({length:25},(e,t)=>(0,W.jsx)(`rect`,{x:1+t%5*3,y:1+Math.floor(t/5)*3,width:2,height:2,fill:`currentColor`,className:`agent-dot`,style:{animationDelay:`${(t%5+Math.floor(t/5))*90}ms`}},t))})}function LI(e){let t=e.item;if(t.kind===`agent_message`){let n=t.target;return(0,W.jsx)(RI,{label:`Messaged agent`,detail:t.summary,pending:e.sending,onOpen:n===null?null:()=>e.onOpen(n)})}if(t.kind===`command`){let n=e.tasks.find(e=>e.item.id===t.id);if(n===void 0)throw Error(`Task ${t.id} is missing from the thread`);return(0,W.jsx)(RI,{label:MI.get(n.status)??`Background task ${n.status.toLowerCase()}`,detail:wI(n.item),pending:n.status===`Running`,onOpen:()=>e.onOpen(t.id)})}let n=e.agents.find(e=>e.item.id===t.id);if(n===void 0)throw Error(`Agent ${t.id} is missing from the thread`);return(0,W.jsx)(RI,{label:jI.get(n.status)??`Agent ${n.status.toLowerCase()}`,detail:t.description,pending:n.status===`Running`,onOpen:()=>e.onOpen(t.id)})}function RI(e){let t=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:(0,W.jsx)(EI,{text:e.detail===``?e.label:`${e.label}:`,active:e.pending})}),e.detail!==``&&(0,W.jsx)(`span`,{className:`text-foreground min-w-0 truncate`,children:e.detail})]});return e.onOpen===null?(0,W.jsx)(`div`,{className:`flex min-h-7 min-w-0 items-center gap-1 text-[13px] leading-4 tracking-[-0.04px] select-none`,children:t}):(0,W.jsxs)(`button`,{type:`button`,title:`Open in Tasks panel`,onClick:e.onOpen,className:`group/agent focus-visible:ring-ring/70 flex min-h-7 w-fit max-w-full cursor-pointer items-center gap-1 rounded-md text-left text-[13px] leading-4 tracking-[-0.04px] select-none focus-visible:ring-2 focus-visible:outline-none`,children:[t,(0,W.jsx)(`span`,{className:`text-muted-foreground/70 flex shrink-0 opacity-0 transition-opacity group-hover/agent:opacity-100 group-focus-visible/agent:opacity-100 pointer-coarse:opacity-100`,children:(0,W.jsx)(V,{icon:Rn,className:`size-3.5`})})]})}function zI(e){let t=(0,U.useRef)(null),[n,r]=(0,U.useState)(``),[i,a]=(0,U.useState)(0),[o,s]=(0,U.useState)([]),c=o.length===0?-1:Math.min(i,o.length-1);(0,U.useEffect)(()=>t.current?.focus(),[]),(0,U.useEffect)(()=>{let t=e.content.current;if(t===null)throw Error(`transcript is not mounted`);if(n===``)return;let r=0,i=new MutationObserver(()=>{cancelAnimationFrame(r),r=requestAnimationFrame(()=>s(BI(t,n)))});return i.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{i.disconnect(),cancelAnimationFrame(r)}},[n,e.content]),(0,U.useEffect)(()=>{if(o.length!==0)return CSS.highlights.set(`transcript-find`,new Highlight(...o)),c!==-1&&CSS.highlights.set(`transcript-find-current`,new Highlight(o[c])),()=>{CSS.highlights.delete(`transcript-find`),CSS.highlights.delete(`transcript-find-current`)}},[o,c]);function l(t,n){let i=e.content.current,o=e.scroller.current;if(i===null||o===null)throw Error(`transcript is not mounted`);let c=t===``?[]:BI(i,t),l=c.length===0?0:(n+c.length)%c.length;if(r(t),a(l),s(c),c.length===0)return;let u=c[l].getBoundingClientRect(),d=o.getBoundingClientRect();(u.top<d.top+48||u.bottom>d.bottom-48)&&o.scrollBy({top:u.top-d.top-d.height/3})}return(0,W.jsxs)(`div`,{"data-transcript":!0,className:`bg-card absolute top-2 right-6 z-30 flex items-center gap-1 rounded-lg border p-1 shadow-lg`,children:[(0,W.jsx)(X,{ref:t,"data-thread-find":!0,className:`h-7 w-52`,placeholder:`Find in thread`,"aria-label":`Find in thread`,value:n,onChange:e=>l(e.target.value,0),onKeyDown:t=>{t.key===`Escape`?(t.preventDefault(),e.onClose()):t.key===`Enter`&&(t.preventDefault(),l(n,c+(t.shiftKey?-1:1)))}}),(0,W.jsx)(`span`,{className:`text-muted-foreground w-16 text-center text-xs tabular-nums`,children:n===``?``:o.length===0?`No results`:`${c+1} of ${o.length}`}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Previous match`,onClick:()=>l(n,c-1),children:(0,W.jsx)(V,{icon:io})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Next match`,onClick:()=>l(n,c+1),children:(0,W.jsx)(V,{icon:ur})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close find`,onClick:e.onClose,children:(0,W.jsx)(V,{icon:lo})})]})}function BI(e,t){let n=[],r=[],i=``,a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let e=a.nextNode();e!==null;e=a.nextNode())e instanceof Text&&(n.push(e),r.push(i.length),i+=e.data);let o=new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),`gi`),s=[],c=0;for(let e of i.matchAll(o)){let t=e.index+e[0].length;for(;c+1<r.length&&r[c+1]<=e.index;)c++;let i=c;for(;i+1<r.length&&r[i+1]<t;)i++;let a=document.createRange();a.setStart(n[c],e.index-r[c]),a.setEnd(n[i],t-r[i]),a.getClientRects().length>0&&s.push(a)}return s}function VI(e){let[t,n]=(0,U.useState)(!1),r=Un(),i=e.plan,a=HI(i),o=i.length>900||i.split(`
|
|
17
|
+
`).length>20,s=o&&!t,c=`${i.trimEnd()}\n`;return(0,W.jsxs)(`div`,{className:`border-border/80 bg-card/70 rounded-3xl border p-4 sm:p-5`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`bg-secondary text-secondary-foreground relative inline-flex h-5.5 min-w-5.5 shrink-0 items-center justify-center gap-1 rounded-sm border border-transparent px-[calc(--spacing(1)-1px)] text-sm font-medium whitespace-nowrap sm:h-4.5 sm:min-w-4.5 sm:text-xs`,children:`Plan`}),(0,W.jsx)(`h3`,{className:`text-foreground truncate text-sm font-medium`,children:a??`Proposed plan`})]}),(0,W.jsxs)(pn,{children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(H,{"aria-label":`Plan actions`,size:`icon-xs`,variant:`outline`,children:(0,W.jsx)(V,{icon:On,className:`size-4`})})}),(0,W.jsxs)(on,{align:`end`,children:[(0,W.jsx)(ln,{onSelect:e=>{e.preventDefault(),r.copy(c)},children:r.copied?`Copied!`:`Copy to clipboard`}),(0,W.jsx)(ln,{onSelect:()=>{let e=URL.createObjectURL(new Blob([c],{type:`text/markdown;charset=utf-8`})),t=document.createElement(`a`);t.href=e,t.download=`${GI(a??`plan`)}.md`,t.click(),setTimeout(()=>URL.revokeObjectURL(e),0)},children:`Download as markdown`})]})]})]}),(0,W.jsxs)(`div`,{className:`mt-4`,children:[(0,W.jsxs)(`div`,{className:B(`relative`,s&&`max-h-104 overflow-hidden`),children:[(0,W.jsx)(fn,{text:s?WI(i):UI(i)}),s&&(0,W.jsx)(`div`,{className:`from-card/95 via-card/80 pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-linear-to-t to-transparent`})]}),o&&(0,W.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,W.jsx)(H,{size:`sm`,variant:`outline`,onClick:()=>n(!t),children:t?`Collapse plan`:`Expand plan`})})]})]})}function HI(e){let t=/^\s{0,3}#{1,6}\s+(.+)$/m.exec(e)?.[1]?.trim();return t===void 0||t===``?null:t}function UI(e){let t=e.trimEnd().split(/\r?\n/),n=/^\s{0,3}#{1,6}\s+/.test(t[0]??``)?t.slice(1):t;for(;n[0]?.trim()===``;)n.shift();if(/^\s{0,3}#{1,6}\s+(.+)$/.exec(n[0]??``)?.[1]?.trim().toLowerCase()===`summary`)for(n.shift();n[0]?.trim()===``;)n.shift();return n.join(`
|
|
18
|
+
`)}function WI(e){let t=UI(e).trimEnd().split(/\r?\n/).map(e=>e.trimEnd()),n=[],r=0,i=!1;for(let e of t){let t=e.trim()!==``;if(t&&r>=10){i=!0;break}n.push(e),t&&(r+=1)}for(;n.length>0&&n.at(-1)?.trim()===``;)n.pop();return n.length===0?HI(e)??`Plan preview unavailable.`:(i&&n.push(``,`...`),n.join(`
|
|
19
|
+
`))}function GI(e){let t=e.toLowerCase().replace(/[`'".,!?()[\]{}]+/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return t===``?`plan`:t}function KI(e){let t=e.item.answers;return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 text-sm leading-6 select-text`,children:[e.item.questions.map(e=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`text-foreground font-medium`,children:e.question}),(0,W.jsx)(`ul`,{className:`text-secondary-label list-disc pl-5`,children:e.options.map(e=>(0,W.jsxs)(`li`,{children:[e.label,e.description!==``&&` — ${e.description}`]},e.label))}),t?.[e.question]!==void 0&&(0,W.jsxs)(`p`,{className:`text-foreground whitespace-pre-wrap`,children:[`Answer: `,t[e.question]]})]},e.question)),e.item.status===`failed`&&(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Skipped`})]})}function qI(e){let[t,n]=(0,U.useState)(null);return(0,U.useEffect)(()=>{function t(){let t=e.scroller.current,r=window.getSelection();if(t===null||r===null||r.isCollapsed||r.rangeCount===0){n(null);return}let i=r.getRangeAt(0),a=r.toString().trim();if(a===``||!JI(i.startContainer,t)||!JI(i.endContainer,t)){n(null);return}let o=i.getBoundingClientRect(),s=t.getBoundingClientRect();n({text:a,top:o.bottom-s.top+t.scrollTop+6,left:Math.min(Math.max(o.left+o.width/2-s.left,48),s.width-48)})}return document.addEventListener(`selectionchange`,t),()=>document.removeEventListener(`selectionchange`,t)},[e.scroller]),t===null?null:(0,W.jsxs)(H,{type:`button`,size:`xs`,variant:`outline`,className:`bg-popover dark:bg-popover hover:bg-accent dark:hover:bg-accent absolute z-20 -translate-x-1/2 shadow-md`,style:{top:t.top,left:t.left},onPointerDown:e=>e.preventDefault(),onClick:()=>{YI(t.text),window.getSelection()?.removeAllRanges(),n(null)},children:[(0,W.jsx)(V,{icon:$o}),`Quote`]})}function JI(e,t){let n=e instanceof Element?e:e.parentElement;return n!==null&&t.contains(n)&&n.closest(`[data-quotable]`)!==null}function YI(e){let t=z().selection;if(t===null)throw Error(`no thread is open to quote into`);let n=e.split(`
|
|
20
|
+
`).map(e=>e.trim()===``?`>`:`> ${e}`).join(`
|
|
21
|
+
`);kt(Fe(t),e=>({...e,text:e.text.trim()===``?`${n}\n\n`:`${e.text.trimEnd()}\n\n${n}\n\n`})),requestAnimationFrame(()=>{let e=document.querySelector(`[data-composer]`);if(e===null)throw Error(`the composer is not mounted`);e.focus(),e.setSelectionRange(e.value.length,e.value.length)})}function XI(e){return e.kind===`group`||e.kind===`agent`}function ZI(e,t){let n=[],r=e.prompt?.id??`start`;e.prompt!==null&&n.push({kind:`user`,key:e.prompt.id,item:e.prompt,first:e.first});for(let r of e.items){let e=QI(r,t!==null),i=n.at(-1);e?.kind===`group`&&i?.kind===`group`?i.entries.push(...e.entries):e!==null&&n.push(e)}let i=n.at(-1);return t!==null&&t.partial===``&&i?.kind===`group`&&(n[n.length-1]={...i,live:!0}),t!==null&&t.partial!==``&&n.push({kind:`assistant`,key:`${r}:partial`,message:``,text:t.partial,time:null,streaming:!0,meta:!1}),t!==null&&t.partial===``&&n.push({kind:`working`,key:`${r}:working`}),t===null&&i?.kind===`assistant`&&(n[n.length-1]={...i,meta:!0}),n}function QI(e,t){switch(e.kind){case`assistant`:return{kind:`assistant`,key:e.id,message:e.message,text:e.text,time:e.time,streaming:!1,meta:!1};case`reasoning`:case`file_change`:case`web_search`:case`skill`:case`tool`:return{kind:`group`,key:`group:${e.id}`,entries:[e],live:!1};case`command`:return e.background===null?{kind:`group`,key:`group:${e.id}`,entries:[e],live:!1}:{kind:`agent`,key:e.id,item:e,live:t};case`subagent`:case`agent_message`:return{kind:`agent`,key:e.id,item:e,live:t};case`plan`:return{kind:`plan`,key:e.id,plan:e.plan};case`question`:return{kind:`question`,key:e.id,item:e};case`notice`:return{kind:`notice`,key:e.id,text:e.text};case`compaction`:return{kind:`compaction`,key:e.id,summary:e.summary,time:e.time};case`error`:return{kind:`error`,key:e.id,text:e.text,time:e.time};case`user`:case`todo_list`:return null}}function $I(e,t,n){let r=[],i=!1;for(let t of e)t.parent===null&&(t.kind===`user`?(r.push({prompt:t,first:!i,items:[]}),i=!0):(t.kind!==`notice`&&t.kind!==`error`&&(i=!0),r.length===0&&r.push({prompt:null,first:!0,items:[]}),r[r.length-1].items.push(t)));let a=r.flatMap((e,i)=>ZI(e,t&&i===r.length-1?{partial:n}:null));return t&&r.length===0&&a.push({kind:`working`,key:`working`}),a}var eL={all:{label:`Restore code and chat`,description:`This will undo file changes made since this message and remove this message and everything after it from the chat.`,icon:ro,code:!0,conversation:!0},chat:{label:`Restore chat`,description:`This will remove this message and everything after it from the chat. Files will not change.`,icon:Jo,code:!1,conversation:!0},code:{label:`Restore code`,description:`This will undo file changes made since this message. The chat will not change.`,icon:Yn,code:!0,conversation:!1}};function tL(e){if(e===`claude`)return[`all`,`chat`,`code`];if(e===`opencode`)return[`all`,`chat`];if(e===`codex`)return[`chat`];throw Error(`unknown provider ${e}`)}function nL(e){let[t,n]=(0,U.useState)(!1),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(!1),[u,d]=(0,U.useState)(null),f=e.target,p=f.messageId,m=O(e=>e.selection),h=O(e=>e.settings.provider),g=tL(h),_=O(e=>e.prefs.rewind),v=g.includes(_)?_:`chat`,y=m?.machine??null,b=m?.sessionId??null,x=m?.projectId??``,S=O(e=>y===null?``:bt(e,y,x)?.path??``),C=t||u!==null;(0,U.useEffect)(()=>{if(a(null),s(null),!C||y===null||b===null)return;let e=!0;return r(y,`sessions.rewind`,{sessionId:b,projectId:x,messageId:p,settings:z().settings,code:!0,conversation:!1,dryRun:!0}).then(t=>{e&&a(t)},t=>{e&&s(It(t))}),()=>{e=!1}},[C,p,y,b,x]);async function w(e){if(y===null||b===null)return;let{code:t,conversation:i}=eL[e];l(!0);try{let a=i?await Promise.all(f.images.map((e,t)=>e.data===null?r(y,`sessions.image`,{sessionId:b,itemId:f.messageId,index:t}):{mediaType:e.mediaType,data:e.data})):[],o=i&&(!f.first||h===`opencode`);(t||o)&&await r(y,`sessions.rewind`,{sessionId:b,projectId:x,messageId:f.messageId,settings:z().settings,code:t,conversation:o,dryRun:!1}),i&&f.first&&h!==`opencode`&&De({machine:y,projectId:x,sessionId:null}),i&&re({text:f.text,images:a}),E({...z().prefs,rewind:e}),n(!1)}catch(e){Gi(It(e)),ae(e)}finally{l(!1)}}let T=i!==null&&o===null;return(0,W.jsxs)(W.Fragment,{children:[g.length>1&&(0,W.jsxs)(pn,{open:t,onOpenChange:e=>{c||n(e)},children:[(0,W.jsx)(Nr,{label:`Restore options`,children:(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsx)(H,{type:`button`,size:`icon-micro`,variant:`ghost-muted`,"aria-label":`Restore options`,disabled:e.disabled,children:(0,W.jsx)(V,{icon:On,className:`size-4`})})})}),(0,W.jsxs)(on,{align:`end`,className:`w-72`,children:[(0,W.jsxs)(`div`,{className:`text-muted-foreground px-2 py-1.5 text-xs`,children:[o!==null&&`Code can't be restored: ${o}`,o===null&&i===null&&`Checking file changes…`,i!==null&&i.files.length===0&&`No file changes since this message.`,i!==null&&i.files.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{children:[`Restores `,i.files.length,` `,i.files.length===1?`file`:`files`,` (`,(0,W.jsxs)(`span`,{className:`text-diff-addition`,children:[`+`,i.insertions]}),` `,(0,W.jsxs)(`span`,{className:`text-diff-deletion`,children:[`−`,i.deletions]}),`)`]}),(0,W.jsx)(`ul`,{className:`mt-1 max-h-24 overflow-y-auto font-mono`,children:i.files.map(e=>(0,W.jsx)(`li`,{className:`truncate`,children:xf(e,S)},e))})]})]}),(0,W.jsx)(an,{}),g.map(e=>(0,W.jsxs)(ln,{disabled:c||eL[e].code&&!T,onSelect:()=>d(e),children:[(0,W.jsx)(V,{icon:eL[e].icon}),eL[e].label]},e))]})]}),(0,W.jsx)(Nr,{label:eL[v].label,children:(0,W.jsx)(H,{type:`button`,size:`icon-micro`,variant:`ghost-muted`,"aria-label":eL[v].label,disabled:e.disabled||c,onClick:()=>d(v),children:(0,W.jsx)(V,{icon:eL[v].icon,className:`size-4`})})}),(0,W.jsx)(In,{open:u!==null,onOpenChange:e=>{e||d(null)},children:u!==null&&(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsxs)(hr,{children:[eL[u].label,`?`]}),(0,W.jsxs)(Ln,{children:[eL[u].description,` Do you really want to continue?`,eL[u].code&&o!==null&&(0,W.jsx)(`span`,{className:`text-destructive mt-2 block`,children:`Code can't be restored: ${o}`})]})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,disabled:eL[u].code&&!T,onClick:()=>void w(u),children:eL[u].label})]})]})})]})}var rL=20,iL=`linear-gradient(to bottom, black calc(100% - 1.75rem), transparent)`,aL=new Map;function oL(e){let[t,n]=(0,U.useState)(!1),r=e.item,i=r.format===`text`||r.format===`command`?r.text:``,a=i.trim()!==``&&(i.length>600||i.split(`
|
|
22
|
+
`).length>8),o=a&&!t;return(0,W.jsxs)(`div`,{className:`group flex flex-col items-end gap-1`,children:[(0,W.jsxs)(`div`,{className:`bg-message text-message-foreground relative max-w-[80%] rounded-2xl px-3 py-2`,children:[r.images.length>0&&(0,W.jsx)(`div`,{className:`mb-2 grid max-w-[210px] grid-cols-2 gap-2`,children:r.images.map((e,t)=>(0,W.jsx)(`div`,{className:`border-border/80 bg-background/70 aspect-[4/3] overflow-hidden rounded-lg border`,children:(0,W.jsx)(cL,{itemId:r.id,index:t,mediaType:e.mediaType,data:e.data})},t))}),r.text!==``&&(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{className:B(`relative`,o&&`max-h-44 overflow-hidden`),style:o?{WebkitMaskImage:iL,maskImage:iL}:void 0,children:[r.format===`command`&&(0,W.jsx)(`span`,{className:`font-mono text-sm`,children:r.text}),r.format===`output`&&(0,W.jsx)(`pre`,{className:`text-muted-foreground font-mono text-xs whitespace-pre-wrap`,children:r.text}),r.format===`text`&&(0,W.jsx)(fn,{text:r.text,className:`text-foreground`,lineBreaks:!0,rawHtml:!1})]}),a&&(0,W.jsx)(`div`,{className:`mt-1.5 flex items-center justify-end gap-2`,children:(0,W.jsx)(H,{type:`button`,size:`xs`,variant:`ghost-muted`,"aria-expanded":t,className:`-ml-1`,onClick:()=>n(!t),children:t?`Show less`:`Show full message`})})]})]}),(0,W.jsx)(`div`,{className:`flex w-full max-w-[80%] items-center justify-end pe-1 text-xs tabular-nums opacity-0 transition-opacity duration-200 group-hover:opacity-100 focus-within:opacity-100 has-aria-expanded:opacity-100 pointer-coarse:opacity-100`,children:(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[r.time!==null&&(0,W.jsx)(Nr,{label:Qt(r.time),children:(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:mr(r.time)})}),i!==``&&(0,W.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[e.rewind&&(0,W.jsx)(nL,{target:{messageId:r.id,text:i,images:r.images,first:e.first},disabled:e.running}),(0,W.jsx)(sL,{text:i})]})]})})]})}function sL(e){let t=Un();return(0,W.jsx)(Nr,{label:`Copy message`,children:(0,W.jsx)(H,{type:`button`,size:`icon-micro`,variant:`ghost-muted`,"aria-label":`Copy message`,disabled:t.copied,onClick:()=>void t.copy(e.text),children:(0,W.jsx)(V,{icon:t.copied?qn:cr,className:B(`size-4`,t.copied&&`text-primary`)})})})}function cL(e){let t=O(e=>e.selection),n=t?.machine??null,i=t?.sessionId??null,[a,o]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(e.data!==null||n===null||i===null)return;let t=!0,a=JSON.stringify([n,i,e.itemId,e.index]),s=aL.get(a);if(s===void 0){if(s=r(n,`sessions.image`,{sessionId:i,itemId:e.itemId,index:e.index}),aL.set(a,s),aL.size>rL){let[e]=aL.keys();aL.delete(e)}s.catch(()=>aL.delete(a))}return s.then(e=>{t&&o(e.data)}).catch(ae),()=>{t=!1}},[e.data,e.itemId,e.index,n,i]);let s=e.data??a;return s===null?null:(0,W.jsx)(dn,{src:`data:${e.mediaType};base64,${s}`,alt:``,name:`Image`,className:`block size-full`,imageClassName:`block size-full object-cover`})}function lL(e){switch(e.kind){case`command`:return`Shell`;case`file_change`:return`Edit`;case`web_search`:return e.url===null?`Web Search`:`Webfetch`;case`skill`:return`Skill`;case`tool`:return e.name}}function uL(e){let t=e.item,n=e.live&&t.status===`running`;if(t.status===`failed`)return(0,W.jsx)(gL,{title:lL(t),subtitle:_L(t,e.cwd),error:t.output});switch(t.kind){case`command`:return(0,W.jsx)(dL,{command:t.command,output:t.output,pending:n});case`file_change`:return(0,W.jsx)(mL,{items:[t],cwd:e.cwd,live:e.live});case`web_search`:{let e=t.url;return e===null?(0,W.jsx)(fL,{query:t.query??``,links:t.results,pending:n}):(0,W.jsx)(kI,{title:`Webfetch`,subtitle:(0,W.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary hover:underline hover:underline-offset-2`,children:e}),pending:n,grouped:!0,open:!1,onToggle:null})}case`skill`:return(0,W.jsxs)(`div`,{className:`flex min-h-7 items-center gap-1 text-[13px] leading-4 tracking-[-0.04px]`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`Loaded`}),(0,W.jsx)(`span`,{className:`text-foreground`,children:(0,W.jsx)(EI,{text:t.skill,active:n})}),(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`skill`})]});case`tool`:{let r=t.input;switch(hf(t.name)){case`read`:return(0,W.jsx)(kI,{title:`Read`,subtitle:yL(gf(r)),args:vL(r,[`offset`,`limit`]),pending:n,grouped:!0,open:!1,onToggle:null});case`search`:return(0,W.jsx)(kI,{title:t.name,subtitle:_L(t,e.cwd),args:[...vL(r,[`pattern`]),...bf(r.glob)===``?[]:[`include=${bf(r.glob)}`]],pending:n,grouped:!0,open:!1,onToggle:null});case`other`:return(0,W.jsx)(kI,{title:`Called ${t.name}`,subtitle:_L(t,e.cwd),args:vL(r,Object.keys(r).filter(e=>![`description`,`query`,`url`,`path`,`pattern`].includes(e))).slice(0,3),pending:n,grouped:!0,open:!1,onToggle:null})}}}}function dL(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsx)(kI,{title:`Shell`,subtitle:t?void 0:e.command,pending:e.pending,grouped:!0,open:t,onToggle:()=>n(!t),rail:!1,children:(0,W.jsxs)(`div`,{dir:`ltr`,className:`group/output border-border relative w-full overflow-hidden rounded-md border`,children:[(0,W.jsx)(`div`,{className:`absolute top-1 right-1 opacity-0 transition-opacity group-hover/output:opacity-100 focus-within:opacity-100`,children:(0,W.jsx)(sL,{text:e.command})}),(0,W.jsx)(`div`,{className:`max-h-60 [scrollbar-width:none] overflow-x-hidden overflow-y-auto`,children:(0,W.jsx)(`pre`,{className:`m-0 font-mono text-[13px] leading-5 tracking-[-0.04px] [overflow-wrap:anywhere] whitespace-pre-wrap select-text`,children:(0,W.jsxs)(`code`,{children:[(0,W.jsx)(`span`,{className:`text-foreground block p-3`,children:e.command}),e.output!==``&&(0,W.jsx)(`span`,{className:`border-border bg-muted text-muted-foreground block border-t p-3`,children:e.output})]})})})]})})}function fL(e){let[t,n]=(0,U.useState)(!1),r=e.links;return(0,W.jsx)(kI,{title:`Web Search`,subtitle:e.query,pending:e.pending,grouped:!0,open:t,onToggle:r.length===0?null:()=>n(!t),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-1 text-[13px] leading-5`,children:[r.slice(0,10).map(e=>(0,W.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary truncate hover:underline hover:underline-offset-2`,children:e.title===``?e.url:e.title},e.url)),r.length>10&&(0,W.jsxs)(`span`,{className:`text-muted-foreground`,children:[`+`,r.length-10,` more`]})]})})}function pL(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsx)(kI,{title:e.streaming?`Thinking`:`Thought`,subtitle:e.streaming?bL(e.text):void 0,pending:e.streaming,grouped:!0,open:t,onToggle:()=>n(!t),children:(0,W.jsx)(fn,{text:e.text,className:`text-muted-foreground text-[13px]`,lineBreaks:!0})})}function mL(e){let t=new Map;for(let n of e.items){let r=xf(n.path,e.cwd);t.set(r,[...t.get(r)??[],n])}return(0,W.jsx)(`div`,{className:`border-border overflow-hidden rounded-md border`,children:[...t].map(([t,n])=>(0,W.jsx)(hL,{file:t,items:n,pending:e.live&&n.some(e=>e.status===`running`)},t))})}function hL(e){let[t,n]=(0,U.useState)(!1),r=Math.max(e.file.lastIndexOf(`/`),e.file.lastIndexOf(`\\`)),i=0,a=0;for(let t of e.items){let e=_f(t);i+=e.added,a+=e.removed}return(0,W.jsxs)(`div`,{className:`border-border border-b last:border-b-0`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(!t),className:`group/tool flex h-9 w-full cursor-pointer items-center gap-2 ps-3 pe-1 text-left text-[13px] leading-4 tracking-[-0.04px] select-none`,children:[(0,W.jsx)(Gr,{path:e.file,className:`size-4 shrink-0`}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline`,children:[r>=0&&(0,W.jsx)(`span`,{className:`text-muted-foreground truncate`,children:e.file.slice(0,r+1)}),(0,W.jsx)(`span`,{className:`text-foreground shrink-0`,children:(0,W.jsx)(EI,{text:e.file.slice(r+1),active:e.pending})})]}),(0,W.jsxs)(`span`,{role:`group`,"aria-label":`${i} additions, ${a} deletions`,className:`inline-flex items-center gap-1 align-middle font-mono text-xs tabular-nums`,children:[(0,W.jsxs)(`span`,{"aria-hidden":!0,className:`text-diff-addition`,children:[`+`,_n(i)]}),(0,W.jsxs)(`span`,{"aria-hidden":!0,className:`text-diff-deletion`,children:[`-`,_n(a)]})]}),(0,W.jsx)(OI,{open:t})]}),t&&(0,W.jsx)(`div`,{className:`border-border flex flex-col gap-2 border-t p-2`,children:e.items.map(e=>(0,W.jsx)(pf,{item:e},e.id))})]})}function gL(e){let[t,n]=(0,U.useState)(!1),r=e.error.replace(/<\/?tool_use_error>/g,``).trim(),i=r.split(`: `)[0].trim();return(0,W.jsxs)(`div`,{className:`group/error flex w-full min-w-0 flex-col`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(!t),className:`flex h-6 w-full cursor-pointer items-center text-left text-[13px] leading-4 tracking-[-0.04px] select-none`,children:[(0,W.jsxs)(`span`,{className:`flex max-w-[calc(100%-20px)] min-w-0 items-center gap-1.5`,children:[(0,W.jsx)(V,{icon:Ja,className:`text-destructive size-4 shrink-0`}),(0,W.jsx)(`span`,{className:`text-foreground shrink-0 font-medium`,children:e.title}),e.subtitle!==``&&!t&&(0,W.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate`,children:e.subtitle}),!t&&(0,W.jsx)(`span`,{className:`text-destructive min-w-0 truncate`,children:i===``?`Failed`:i[0].toUpperCase()+i.slice(1)})]}),(0,W.jsx)(OI,{open:!0,className:`ms-1.5 size-3.5`})]}),t&&(0,W.jsxs)(`div`,{className:`relative ps-6 pe-10 select-text`,children:[(0,W.jsx)(`div`,{className:`absolute top-0 right-0 opacity-0 transition-opacity group-hover/error:opacity-100 focus-within:opacity-100`,children:(0,W.jsx)(sL,{text:r})}),(0,W.jsx)(`p`,{className:`text-destructive text-[13px] leading-5 tracking-[-0.04px] [overflow-wrap:anywhere] whitespace-pre-wrap`,children:r})]})]})}function _L(e,t){switch(e.kind){case`command`:return e.command;case`file_change`:return e.path;case`web_search`:return e.url??e.query??``;case`skill`:return e.skill;case`tool`:{let n=e.input;if(hf(e.name)===`search`){let e=bf(n.path);return e===``||e===t?``:xf(e,t)}return[`description`,`query`,`url`,`file_path`,`path`,`pattern`].map(e=>bf(n[e])).find(e=>e!==``)??``}}}function vL(e,t){return t.flatMap(t=>{let n=e[t];return typeof n==`string`||typeof n==`number`||typeof n==`boolean`?[`${t}=${n}`]:[]})}function yL(e){return e.split(`/`).at(-1)??e}function bL(e){let t=[...e.matchAll(/^\s*(?:#{1,6}[ \t]+(.+?)|\*\*([^*\n]+)\*\*)\s*$/gm)].at(-1);return t===void 0?void 0:(t[1]??t[2]).trim()}var xL=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`});function SL(e){let t=e.entries.flatMap(e=>e.kind===`reasoning`?[]:[e]),n=e.entries.length-t.length,r=xL.format([...new Set(t.map(lL))]),i=r===``?n===1?`Thought`:`Thoughts`:r,a=t.length>0?t.length:n;return(0,W.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-expanded":e.open,"aria-label":`Used ${a} ${i}`,onClick:e.onToggle,className:B(`group/tool focus-visible:ring-ring/70 flex h-7 w-full cursor-pointer items-center rounded-md text-left text-xs select-none focus-visible:ring-2 focus-visible:outline-none`,e.open&&`bg-background sticky top-0 z-20 box-content pb-2`),children:[(0,W.jsxs)(`span`,{className:`flex max-w-[calc(100%-24px)] min-w-0 items-center gap-1`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:`Used`}),(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0 tabular-nums`,children:a}),(0,W.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate`,children:i})]}),(0,W.jsx)(OI,{open:e.open})]}),e.open&&(0,W.jsx)(`div`,{className:`flex flex-col gap-2`,children:wL(e.entries).map(t=>(0,W.jsx)(`div`,{className:`flex min-h-7 min-w-0 flex-col justify-center`,children:(0,W.jsx)(CL,{item:t,cwd:e.cwd,live:e.live})},t.key))})]})}function CL(e){let t=e.item;switch(t.kind){case`thinking`:return(0,W.jsx)(pL,{text:t.text,streaming:e.live&&t.last});case`tool`:return(0,W.jsx)(uL,{item:t.item,cwd:e.cwd,live:e.live});case`reads`:return(0,W.jsx)(kI,{title:`Read`,subtitle:(0,W.jsx)(`span`,{title:t.items.map(e=>gf(e.input)).join(`
|
|
23
|
+
`),children:t.items.map((t,n)=>(0,W.jsxs)(`span`,{children:[n>0&&` `,(0,W.jsx)(EI,{text:gf(t.input).split(`/`).at(-1)??``,active:e.live&&t.status===`running`})]},t.id))}),pending:e.live&&t.items.some(e=>e.status===`running`),grouped:!0,open:!1,onToggle:null});case`files`:return(0,W.jsx)(mL,{items:t.items,cwd:e.cwd,live:e.live})}}function wL(e){let t=[];return e.forEach((n,r)=>{if(n.kind===`reasoning`){t.push({kind:`thinking`,key:n.id,text:n.text,last:r===e.length-1});return}let i=t.at(-1);n.status!==`failed`&&n.kind===`file_change`?i?.kind===`files`?i.items.push(n):t.push({kind:`files`,key:n.id,items:[n]}):n.status!==`failed`&&n.kind===`tool`&&hf(n.name)===`read`?i?.kind===`reads`?i.items.push(n):t.push({kind:`reads`,key:n.id,items:[n]}):t.push({kind:`tool`,key:n.id,item:n})}),t}function TL(e){let[t,n]=(0,U.useState)(null),[r,i]=(0,U.useState)(!0),a=(0,U.useRef)(null),o=t??e.turns.at(-1)?.key??null;(0,U.useEffect)(()=>{let t=e.scroller.current;if(t===null)throw Error(`transcript is not mounted`);function r(){if(t===null)throw Error(`transcript is not mounted`);let e=t.getBoundingClientRect().top+t.clientHeight/3,r=null;for(let n of t.querySelectorAll(`[data-kind="user"]`)){if(r!==null&&n.getBoundingClientRect().top>e)break;r=n.dataset.row??null}n(r)}let a=new ResizeObserver(()=>{if(t===null)throw Error(`transcript is not mounted`);let e=t.querySelector(`[data-row]`)?.parentElement;e!=null&&i(t.getBoundingClientRect().right-e.getBoundingClientRect().right>=40)});return r(),a.observe(t),t.addEventListener(`scroll`,r,{passive:!0}),()=>{a.disconnect(),t.removeEventListener(`scroll`,r)}},[e.scroller]);function s(t){e.onJump(t),n(t)}return(0,W.jsx)(`div`,{ref:a,role:`toolbar`,tabIndex:-1,"aria-orientation":`vertical`,"aria-label":`Jump between your messages`,className:B(`absolute top-1/2 right-[calc(var(--app-scrollbar-width)+0.25rem)] z-20 flex max-h-[60%] -translate-y-1/2 flex-col py-1 pointer-coarse:hidden`,!r&&`hidden`),onKeyDown:t=>{if(t.key!==`ArrowUp`&&t.key!==`ArrowDown`)return;t.preventDefault();let n=e.turns.findIndex(e=>e.key===o),r=e.turns[Math.min(Math.max(n+(t.key===`ArrowUp`?-1:1),0),e.turns.length-1)];s(r.key),a.current?.querySelector(`[data-turn="${CSS.escape(r.key)}"]`)?.focus()},children:e.turns.map(e=>(0,W.jsx)(Nr,{side:`left`,label:DL(e.item),children:(0,W.jsx)(`button`,{type:`button`,"data-turn":e.key,tabIndex:e.key===o?0:-1,"aria-label":`Jump to: ${DL(e.item)}`,className:`group/turn focus-visible:ring-ring flex h-3 min-h-1 shrink cursor-pointer items-center justify-end rounded-sm px-1 outline-none focus-visible:ring-2`,onClick:()=>s(e.key),children:(0,W.jsx)(`span`,{className:B(`h-0.5 rounded-full transition-all duration-150`,e.key===o?`bg-foreground/70 w-4`:`bg-foreground/20 group-hover/turn:bg-foreground/45 w-2.5 group-hover/turn:w-4`)})})},e.key))})}function EL(e,t){let n=e?.querySelector(`[data-row="${CSS.escape(t)}"]`);if(e===null||!(n instanceof HTMLElement))throw Error(`that message is not on screen`);e.scrollTop+=n.getBoundingClientRect().top-e.getBoundingClientRect().top-24}function DL(e){let t=e.text.trim().split(`
|
|
24
|
+
`)[0];return t===``?e.images.length>0?`Image`:`Message`:t.length>120?`${t.slice(0,120)}…`:t}var OL=30;function kL(e){let t=O(e=>e.selection),n=O(e=>e.loaded),r=O(e=>e.items),i=O(e=>e.earlier),a=O(e=>e.before),o=O(e=>e.partial),s=O(e=>e.requests),c=O(be),l=(0,U.useRef)(null),u=(0,U.useRef)(null),d=(0,U.useRef)(!0),f=(0,U.useRef)(null),[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)([]),[_,v]=(0,U.useState)(null),[y,b]=(0,U.useState)(!1),x=(0,U.useRef)(null),S=O(e=>t===null?``:bt(e,t.machine,t.projectId)?.path??``),C=O(wt),w=O(e=>e.sentAt);(0,U.useLayoutEffect)(()=>{let e=l.current;e!==null&&w!==0&&(d.current=!0,e.scrollTop=e.scrollHeight)},[w]),(0,U.useEffect)(()=>{let e=l.current;if(e===null||u.current===null)throw Error(`transcript is not mounted`);let t=new ResizeObserver(()=>{d.current&&(e.scrollTop=e.scrollHeight)});return t.observe(e),t.observe(u.current),()=>t.disconnect()},[]),(0,U.useLayoutEffect)(()=>{let e=l.current;e!==null&&d.current&&(e.scrollTop=e.scrollHeight)},[r,o,s,C]);let T=(0,U.useMemo)(()=>CI([...i,...r],c),[i,r,c]),E=$I(i,!1,``),D=[...E,...$I(r,C,o)],k=D.flatMap(e=>e.kind===`user`?[e]:[]),A=D.findIndex(e=>e.key===_?.key),j=y?0:Math.max(0,A===-1?D.length-OL:A-(_?.above??0));(0,U.useLayoutEffect)(()=>{let e=l.current;e!==null&&f.current!==null&&(e.scrollTop=e.scrollHeight-f.current),f.current=null},[i,j]),(0,U.useLayoutEffect)(()=>{x.current!==null&&(EL(l.current,x.current),x.current=null)},[j]),Ys(`mod+f`,e=>{let t=e.target;e.defaultPrevented||t instanceof Element&&t!==document.body&&t.closest(`[data-composer], [data-transcript]`)===null||(e.preventDefault(),b(!0),requestAnimationFrame(()=>document.querySelector(`[data-thread-find]`)?.select()))},{enableOnFormTags:!0}),(0,U.useLayoutEffect)(()=>{let e=l.current;e!==null&&D.length!==0&&(A===-1?v({key:D[j].key,above:0}):M(e))});function M(e){j===0||e.scrollTop>=e.clientHeight||(f.current=e.scrollHeight-e.scrollTop,v({key:D[j].key,above:OL}))}function N(e){let t=D.findIndex(t=>t.key===e);if(t===-1)throw Error(`that message is not loaded`);t>=j?EL(l.current,e):(x.current=e,v({key:e,above:1}))}let ee=(0,U.useCallback)(e=>{g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]);return(0,W.jsxs)(W.Fragment,{children:[y&&(0,W.jsx)(zI,{content:u,scroller:l,onClose:()=>{b(!1),D.length>0&&v({key:D[0].key,above:0}),document.querySelector(`[data-composer]`)?.focus()}}),k.length>1&&(0,W.jsx)(TL,{turns:k,scroller:l,onJump:N}),(0,W.jsxs)(`div`,{ref:l,"data-transcript":!0,className:`topbar-scroll-fade relative min-h-0 flex-1 overflow-y-auto overscroll-y-contain pb-8`,onScroll:e=>{let t=e.currentTarget;d.current=t.scrollHeight-t.scrollTop-t.clientHeight<40,M(t)},children:[(0,W.jsx)(`div`,{ref:u,children:(0,W.jsxs)(Qd,{width:`chat`,className:`pt-3`,children:[!n&&(0,W.jsx)(`p`,{className:`text-muted-foreground py-6 text-center text-xs`,children:`Loading…`}),a!==null&&j===0&&(0,W.jsx)(`div`,{className:`flex justify-center pb-4`,children:(0,W.jsx)(H,{type:`button`,size:`xs`,variant:`ghost-muted`,disabled:p,onClick:async()=>{let e=l.current;e!==null&&(f.current=e.scrollHeight-e.scrollTop),v({key:D[0].key,above:OL}),m(!0),await qe(),m(!1)},children:p?`Loading…`:`Load earlier conversation`})}),D.slice(j).map((t,n)=>{let r=j+n,i=D[r-1],a=r<E.length;return(0,W.jsx)(`div`,{"data-row":t.key,"data-kind":t.kind,className:B(i===void 0?void 0:t.kind===`user`?`pt-6`:t.kind===`working`?void 0:XI(t)&&XI(i)?`pt-2`:XI(t)||XI(i)?`pt-3`:`pt-4`,t.kind===`assistant`&&`group/assistant`),children:(0,W.jsx)(ML,{row:t,agents:T.agents,tasks:T.tasks,running:C,compacting:c?.compacting===!0,fork:!a,expanded:h.includes(t.key),onToggle:ee,onOpenTask:e.onOpenTask,rewind:!a,cwd:S})},t.key)})]})}),(0,W.jsx)(qI,{scroller:l})]})]})}var AL=(0,U.memo)(kL);function jL(e){let t=e.row;switch(t.kind){case`user`:return(0,W.jsx)(oL,{item:t.item,first:t.first,running:e.running,rewind:e.rewind});case`working`:return(0,W.jsx)(`div`,{className:`text-muted-foreground h-9 pt-3 text-[13px] leading-5 font-medium tracking-[-0.04px]`,children:(0,W.jsx)(EI,{text:e.compacting?`Compacting conversation`:`Working`,active:!0})});case`group`:return(0,W.jsx)(SL,{entries:t.entries,cwd:e.cwd,live:t.live,open:e.expanded,onToggle:()=>e.onToggle(t.key)});case`agent`:return(0,W.jsx)(LI,{item:t.item,agents:e.agents,tasks:e.tasks,sending:t.live&&t.item.status===`running`,onOpen:e.onOpenTask});case`assistant`:return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{"data-quotable":!0,children:(0,W.jsx)(fn,{text:t.text===``&&!t.streaming?`(empty response)`:t.text,streaming:t.streaming})}),t.meta&&(0,W.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-2 text-xs tabular-nums opacity-0 transition-opacity duration-200 group-hover/assistant:opacity-100 focus-within:opacity-100 pointer-coarse:opacity-100`,children:[(0,W.jsx)(sL,{text:t.text}),e.fork&&(0,W.jsx)(NL,{uuid:t.message}),t.time!==null&&(0,W.jsx)(Nr,{label:Qt(t.time),children:(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:mr(t.time)})})]})]});case`error`:return(0,W.jsxs)(`div`,{className:`text-destructive flex gap-1.5 text-[13px] leading-5 tracking-[-0.04px]`,children:[(0,W.jsx)(V,{icon:Ja,className:`mt-0.5 size-4 shrink-0`}),(0,W.jsx)(`p`,{className:`min-w-0 [overflow-wrap:anywhere] whitespace-pre-wrap select-text`,children:t.text})]});case`notice`:return(0,W.jsxs)(`div`,{className:`text-muted-foreground mx-auto flex w-full max-w-(--chat-content-max-width) items-center gap-3 py-1 text-xs`,children:[(0,W.jsx)(`span`,{className:`bg-border/70 h-px flex-1`}),(0,W.jsx)(`span`,{children:t.text}),(0,W.jsx)(`span`,{className:`bg-border/70 h-px flex-1`})]});case`compaction`:return(0,W.jsxs)(`div`,{className:`mx-auto w-full max-w-(--chat-content-max-width)`,children:[(0,W.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-3 py-1 text-xs`,children:[(0,W.jsx)(`span`,{className:`bg-border/70 h-px flex-1`}),t.summary===null?(0,W.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,W.jsx)(V,{icon:Uo,className:`size-3`}),`Conversation compacted`]}):(0,W.jsxs)(`button`,{type:`button`,"aria-expanded":e.expanded,className:`hover:text-foreground flex items-center gap-1.5 transition-colors`,onClick:()=>e.onToggle(t.key),children:[(0,W.jsx)(V,{icon:Uo,className:`size-3`}),`Compacted summary`,(0,W.jsx)(V,{icon:ur,strokeWidth:2.5,className:B(`size-3 transition-transform`,!e.expanded&&`-rotate-90`)})]}),(0,W.jsx)(`span`,{className:`bg-border/70 h-px flex-1`})]}),e.expanded&&t.summary!==null&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`bg-muted/40 text-muted-foreground mt-2 rounded-lg border px-4 py-3 text-sm`,children:(0,W.jsx)(fn,{text:t.summary,streaming:!1})}),(0,W.jsxs)(`div`,{className:`mt-1.5 flex items-center justify-end gap-2 text-xs tabular-nums`,children:[t.time!==null&&(0,W.jsx)(Nr,{label:Qt(t.time),children:(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:mr(t.time)})}),(0,W.jsx)(sL,{text:t.summary})]})]})]});case`plan`:return(0,W.jsx)(`div`,{className:`min-w-0`,"data-quotable":!0,children:(0,W.jsx)(VI,{plan:t.plan})});case`question`:return(0,W.jsx)(KI,{item:t.item})}}var ML=(0,U.memo)(jL,(e,t)=>t.row.kind===`agent`?te(e,t):te(Ei(e,[`agents`,`tasks`]),Ei(t,[`agents`,`tasks`])));function NL(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsx)(Nr,{label:`Fork from this response`,children:(0,W.jsx)(H,{type:`button`,size:`icon-micro`,variant:`ghost-muted`,disabled:t,"aria-label":`Fork from this response`,onClick:()=>{n(!0),nt(e.uuid).finally(()=>n(!1))},children:(0,W.jsx)(V,{icon:ko,className:B(`size-4`,t&&`animate-pulse`)})})})}var PL=N(`event`,[y({offsite:m(`browser`),event:m(`location`),url:T(),replaced:k()}),y({offsite:m(`browser`),event:m(`open`),url:T()}),y({offsite:m(`browser`),event:m(`loading`)})]);function FL(e){let t=ft({from:`__root__`,select:e=>e.browse??null}),[n,i]=(0,U.useState)(null),[a,o]=(0,U.useState)(0),[s,c]=(0,U.useState)(0),[l,u]=(0,U.useState)(!1),[d,f]=(0,U.useState)(null),p=(0,U.useRef)(null),m=(0,U.useRef)(null),h=(0,U.useRef)({entries:[],index:-1}),g=O(t=>R(t,e.machine).status===`online`);(0,U.useEffect)(()=>{if(t===null||!g)return;let n=`${e.machine} ${a} ${t}`;if(m.current===n)return;let r=!0;return IL(e.machine,t).then(e=>{r&&(m.current=n,h.current={entries:[],index:-1},i({target:t,src:e,error:null}),c(e=>e+1),f(null),u(!0))},e=>{r&&(i({target:t,src:null,error:It(e)}),f(null),u(!1))}),()=>{r=!1}},[e.machine,t,a,g]),(0,U.useEffect)(()=>{function o(o){if(o.source===null||o.source!==p.current?.contentWindow)return;let s=PL.safeParse(o.data);if(!s.success)return;if(s.data.event===`loading`){f(null),u(!0);return}if(t===null||n===null)throw Error(`a page reported its location outside the browser`);let c=s.data.url;s.data.event===`open`?r(e.machine,`browser.open`,{url:c,fromPage:!0}).then(t=>{m.current=`${e.machine} ${a} ${c}`,i({target:c,src:`${lt(e.machine)}${t}`,error:null}),u(!0),oe({browse:c})},ae):(f(LL(h.current,c,s.data.replaced)),c!==t&&(m.current=`${e.machine} ${a} ${c}`,i({...n,target:c}),oe({browse:c})))}return window.addEventListener(`message`,o),()=>window.removeEventListener(`message`,o)},[e.machine,a,t,n]);let _=t!==null&&/^https?:\/\//i.test(t),v=t===null?null:n?.src??null,y=!_&&n?.target===t?n.src:null,b=n?.target===t?n.error:null,x=t!==null&&g&&(n?.target!==t||l);function S(e){if(d===null)throw Error(`no page is open to send a browser command to`);p.current?.contentWindow?.postMessage({offsite:`browser`,command:e},`*`)}return(0,W.jsxs)(`div`,{className:`bg-background flex h-full min-h-0 min-w-0 flex-col`,children:[(0,W.jsxs)(`div`,{className:`border-border/60 bg-background flex h-(--workspace-topbar-height) shrink-0 items-center gap-2 border-b pr-3 pl-3`,children:[(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Close`,"aria-label":`Close`,onClick:e.onClose,children:(0,W.jsx)(V,{icon:mt,className:`size-4`})}),(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Back`,"aria-label":`Back`,disabled:d?.back!==!0,onClick:()=>S(`back`),children:(0,W.jsx)(V,{icon:no,className:`size-4`})}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Forward`,"aria-label":`Forward`,disabled:d?.forward!==!0,onClick:()=>S(`forward`),children:(0,W.jsx)(V,{icon:Rn,className:`size-4`})}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Reload`,"aria-label":`Reload`,onClick:()=>{d===null?o(a+1):S(`reload`)},children:(0,W.jsx)(V,{icon:Yr,className:B(`size-4`,x&&`animate-spin`)})})]}),(0,W.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`address`);if(typeof t!=`string`)throw Error(`the address field is missing`);let n=t.trim();n!==``&&ie(RL(n))},children:(0,W.jsx)(X,{name:`address`,className:`h-7 font-mono text-xs`,placeholder:`URL or file path`,"aria-label":`URL or file path`,defaultValue:t??``})},t),y!==null&&(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,asChild:!0,children:(0,W.jsx)(`a`,{href:y,target:`_blank`,rel:`noopener noreferrer`,title:`Open in a new tab`,"aria-label":`Open in a new tab`,children:(0,W.jsx)(V,{icon:K,className:`size-4`})})})]}),b!==null&&(0,W.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:b}),t===null&&(0,W.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:`Type a URL or a file path above. URLs load from this machine.`}),v!==null&&(0,W.jsx)(`iframe`,{ref:p,src:v,sandbox:_?`allow-scripts allow-forms allow-popups allow-modals allow-downloads allow-presentation allow-pointer-lock`:void 0,title:t??``,className:`min-h-0 w-full flex-1 bg-white`,onLoad:()=>u(!1)},s)]})}async function IL(e,t){if(/^https?:\/\//i.test(t)){let n=await r(e,`browser.open`,{url:t,fromPage:!1});return`${lt(e)}${n}`}let n=await r(e,`files.browse`,void 0);return`${lt(e)}/api/browse/${n}${zL(t)}`}function LL(e,t,n){return n&&e.index>=0?e.entries[e.index]=t:e.entries[e.index-1]===t?--e.index:e.entries[e.index+1]===t?e.index+=1:e.entries[e.index]!==t&&(e.entries=[...e.entries.slice(0,e.index+1),t],e.index+=1),{back:e.index>0,forward:e.index<e.entries.length-1}}function RL(e){return/^(https?:\/\/|file:)/i.test(e)||/^[/.]/.test(e)||/^[a-z]:[\\/]/i.test(e)?e:/^(localhost|\d+(\.\d+){3}|[\w.-]+:\d+)([:/?#]\S*)?$/i.test(e)?`http://${e}`:/^[\w-]+(\.[\w-]+)+([/?#]\S*)?$/.test(e)?`https://${e}`:`https://www.google.com/search?q=${encodeURIComponent(e)}`}function zL(e){let t=e.replaceAll(`\\`,`/`).split(`/`).map(encodeURIComponent).join(`/`);return t.startsWith(`/`)?t:`/${t}`}function BL(e){let t=O(e=>e.items),n=O(e=>e.earlier),r=O(t=>Te(t.machines,e.machine,e.sessionId)),i=[...n,...t],a=CI(i,r),o=a.agents.find(t=>t.item.id===e.selected),s=a.tasks.find(t=>t.item.id===e.selected),c=o===void 0?null:PI(o.item);return(0,W.jsxs)(`div`,{className:`bg-background flex h-full min-h-0 min-w-0 flex-col`,children:[(0,W.jsxs)(`div`,{className:`border-border/60 bg-background flex h-(--workspace-topbar-height) shrink-0 items-center gap-1 border-b pr-3 pl-3`,children:[(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Close`,"aria-label":`Close`,onClick:e.onClose,children:(0,W.jsx)(V,{icon:mt,className:`size-4`})}),o===void 0&&s===void 0&&(0,W.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-xs font-medium`,children:`Tasks`}),(o!==void 0||s!==void 0)&&(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs`,children:[(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Back to tasks`,"aria-label":`Back to tasks`,onClick:()=>e.onSelect(null),children:(0,W.jsx)(V,{icon:no,className:`size-4`})}),o!==void 0&&c!==null&&(0,W.jsxs)(W.Fragment,{children:[o.status===`Running`?(0,W.jsx)(II,{className:c.tone}):(0,W.jsx)(FI,{className:c.tone}),(0,W.jsx)(`span`,{className:`text-foreground shrink-0 font-medium`,children:c.name}),c.description!==``&&(0,W.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate`,children:c.description}),o.status===`Running`&&o.agentId!==null&&e.sessionId!==null&&(0,W.jsx)(VL,{machine:e.machine,sessionId:e.sessionId,taskId:o.agentId})]}),s!==void 0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{icon:bo,className:`text-muted-foreground size-4 shrink-0`}),(0,W.jsx)(`span`,{className:`text-foreground min-w-0 truncate font-medium`,children:wI(s.item)}),(0,W.jsx)(`span`,{className:B(`text-muted-foreground shrink-0`,s.status===`Failed`&&`text-destructive`),children:s.status}),s.status===`Running`&&s.taskId!==null&&e.sessionId!==null&&(0,W.jsx)(VL,{machine:e.machine,sessionId:e.sessionId,taskId:s.taskId})]})]})]}),o===void 0&&s===void 0&&(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:[(0,W.jsx)(`h2`,{className:`text-muted-foreground px-1 pb-1.5 text-xs font-medium`,children:`Agents`}),a.agents.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-1 py-1 text-xs`,children:`No agents in this thread.`}),(0,W.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:[...a.agents.filter(e=>e.status===`Running`),...a.agents.filter(e=>e.status!==`Running`)].map(t=>{let n=PI(t.item);return(0,W.jsxs)(`button`,{type:`button`,"aria-label":`Open ${n.name} agent: ${n.description}`,className:`bg-secondary hover:bg-accent focus-visible:ring-ring/70 flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-left text-[13px] leading-5 tracking-[-0.04px] select-none focus-visible:ring-2 focus-visible:outline-none`,onClick:()=>e.onSelect(t.item.id),children:[t.status===`Running`?(0,W.jsx)(II,{className:n.tone}):(0,W.jsx)(FI,{className:n.tone}),(0,W.jsx)(`span`,{className:`text-foreground shrink-0 font-medium`,children:n.name}),(0,W.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate`,children:n.description}),(0,W.jsx)(`span`,{className:B(`text-muted-foreground shrink-0 text-xs`,t.status===`Failed`&&`text-destructive`),children:t.status})]},t.item.id)})}),(0,W.jsx)(`h2`,{className:`text-muted-foreground px-1 pt-5 pb-1.5 text-xs font-medium`,children:`Tasks`}),a.tasks.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-1 py-1 text-xs`,children:`No background tasks in this thread.`}),(0,W.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:[...a.tasks.filter(e=>e.status===`Running`),...a.tasks.filter(e=>e.status!==`Running`)].map(t=>(0,W.jsxs)(`button`,{type:`button`,"aria-label":`Open task: ${wI(t.item)}`,className:`bg-secondary hover:bg-accent focus-visible:ring-ring/70 flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-left text-[13px] leading-5 tracking-[-0.04px] select-none focus-visible:ring-2 focus-visible:outline-none`,onClick:()=>e.onSelect(t.item.id),children:[(0,W.jsx)(V,{icon:bo,className:B(`size-4 shrink-0`,t.status===`Running`?`text-foreground animate-pulse`:`text-muted-foreground`)}),(0,W.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate`,children:wI(t.item)}),(0,W.jsx)(`span`,{className:B(`text-muted-foreground shrink-0 text-xs`,t.status===`Failed`&&`text-destructive`),children:t.status})]},t.item.id))})]}),o!==void 0&&(0,W.jsx)(UL,{item:o.item,agentId:o.agentId,running:o.status===`Running`,items:i,found:a,cwd:e.cwd,onSelect:e.onSelect},o.item.id),s!==void 0&&e.sessionId!==null&&(0,W.jsx)(HL,{machine:e.machine,sessionId:e.sessionId,command:s.item.command,path:s.path,events:s.events,running:s.status===`Running`},s.item.id)]})}function VL(e){return(0,W.jsx)(H,{size:`xs`,variant:`outline`,className:`shrink-0`,onClick:()=>xt(e.machine,e.sessionId,e.taskId),children:`Stop`})}function HL(e){let[t,n]=(0,U.useState)(void 0),[i,a]=(0,U.useState)(null),o=(0,U.useRef)(null),s=(0,U.useRef)(!0);(0,U.useEffect)(()=>{let t=e.path;if(t===null)return;let i=!0;async function o(t){try{let o=await r(e.machine,`tasks.output`,{sessionId:e.sessionId,path:t});if(!i)return;n(o),a(null)}catch(e){i&&a(It(e))}}o(t);let s=e.running?window.setInterval(()=>void o(t),2e3):null;return()=>{i=!1,s!==null&&window.clearInterval(s)}},[e.machine,e.sessionId,e.path,e.running]),(0,U.useLayoutEffect)(()=>{let e=o.current;e!==null&&s.current&&(e.scrollTop=e.scrollHeight)},[t,e.events]);let c=e.path===null?e.events.join(`
|
|
25
|
+
`):t?.text??``;return(0,W.jsxs)(`div`,{ref:o,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain p-3`,onScroll:e=>{let t=e.currentTarget;s.current=t.scrollHeight-t.scrollTop-t.clientHeight<40},children:[e.command!==``&&(0,W.jsxs)(`p`,{className:`text-muted-foreground pb-2 font-mono text-xs [overflow-wrap:anywhere] whitespace-pre-wrap`,children:[`$ `,e.command]}),i!==null&&(0,W.jsx)(`p`,{className:`text-destructive text-xs`,children:i}),i===null&&e.path!==null&&t===void 0&&(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Loading…`}),i===null&&e.path!==null&&t===null&&(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`The output file no longer exists.`}),t?.truncated===!0&&(0,W.jsx)(`p`,{className:`text-muted-foreground pb-2 text-xs`,children:`Showing the end of the output.`}),e.path===null&&e.events.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`No events yet.`}),t?.text===``&&(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:e.running?`No output yet.`:`No output.`}),c!==``&&(0,W.jsx)(`pre`,{className:`bg-secondary text-foreground rounded-lg p-3 font-mono text-xs leading-5 [overflow-wrap:anywhere] whitespace-pre-wrap select-text`,children:c})]})}function UL(e){let t=(0,U.useRef)(null),n=(0,U.useRef)(!0),[r,i]=(0,U.useState)([]);(0,U.useLayoutEffect)(()=>{let e=t.current;e!==null&&n.current&&(e.scrollTop=e.scrollHeight)},[e.items,e.running]);function a(e){i(r.includes(e)?r.filter(t=>t!==e):[...r,e])}let o=e.items.filter(t=>t.parent===e.item.id),s=o.length===0;(0,U.useEffect)(()=>{s&&e.agentId!==null&&we(e.item.id,e.agentId)},[s,e.item.id,e.agentId]);let c=o.at(0),l=c?.kind===`user`?c:null,u=ZI({prompt:null,first:!1,items:l===null?o:o.slice(1)},e.running?{partial:``}:null);return(0,W.jsxs)(`div`,{ref:t,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-4 pt-1 pb-8`,onScroll:e=>{let t=e.currentTarget;n.current=t.scrollHeight-t.scrollTop-t.clientHeight<40},children:[l!==null&&(0,W.jsx)(kI,{title:`Prompt`,pending:!1,grouped:!0,open:r.includes(`prompt`),onToggle:()=>a(`prompt`),children:(0,W.jsx)(fn,{text:l.text,className:`text-muted-foreground text-[13px]`})}),u.map((t,n)=>{let i=u[n-1];return(0,W.jsx)(`div`,{className:B(i===void 0?`pt-2`:t.kind===`working`?void 0:XI(t)&&XI(i)?`pt-2`:`pt-4`,t.kind===`assistant`&&`group/assistant`),children:(0,W.jsx)(ML,{row:t,agents:e.found.agents,tasks:e.found.tasks,running:e.running,compacting:!1,fork:!1,expanded:r.includes(t.key),onToggle:a,onOpenTask:e.onSelect,rewind:!1,cwd:e.cwd})},t.key)})]})}var WL=(0,U.lazy)(async()=>({default:(await Zr(async()=>{let{DiffPanel:e}=await import(`./diff-panel-CGW6idmO.js`);return{DiffPanel:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))).DiffPanel})),GL=`text-foreground hover:bg-accent data-[pressed=true]:bg-accent relative grid h-7 min-w-7 cursor-pointer place-items-center rounded-lg border border-transparent [&_svg]:size-4 [&_svg]:opacity-80`;function KL(e){let t=JL(e),n=O(e=>e.prefs);return(0,W.jsxs)(ar,{children:[(0,W.jsx)(Nn,{asChild:!0,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-1`,children:[t.filter(e=>n.toolbar.includes(e.id)).map(e=>(0,W.jsxs)(`button`,{className:GL,"data-pressed":e.pressed,"aria-label":e.label,title:e.title,onClick:e.onSelect,children:[(0,W.jsx)(V,{icon:e.icon}),e.badge]},e.id)),e.children]})}),(0,W.jsx)(tr,{className:`w-44`,children:t.map(e=>(0,W.jsxs)(Jn,{checked:n.toolbar.includes(e.id),onCheckedChange:t=>E({...n,toolbar:t?[...n.toolbar,e.id]:n.toolbar.filter(t=>t!==e.id)}),children:[(0,W.jsx)(V,{icon:e.icon}),e.label]},e.id))})]})}function qL(e){let t=e.session,n=O(e=>e.prefs.toolbar),r=JL(e).filter(t=>e.mobile||!n.includes(t.id)),i=Cr(`sidebarScope`),a=O(e=>{if(t===void 0)return!1;let n=Te(e.machines,t.machine,t.id);return n?.running===!0||Object.values(n?.tasks??{}).includes(`running`)}),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(!1);function u(){if(t===void 0)throw Error(`session is missing`);Be(t.machine,t.id,i)}return(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,W.jsxs)(pn,{open:e.open,onOpenChange:e.onOpenChange,children:[(0,W.jsx)(cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:B(GL,`data-[state=open]:bg-accent`),"aria-label":`More`,title:`More`,children:[(0,W.jsx)(V,{icon:On}),r.some(e=>e.attention)&&(0,W.jsx)(`span`,{className:`bg-muted-foreground ring-background absolute top-0.5 right-0.5 size-1.5 rounded-full ring-2`})]})}),(0,W.jsxs)(on,{className:`w-56 [&>[data-slot=dropdown-menu-separator]:first-child]:hidden`,align:`end`,children:[r.map(e=>(0,W.jsxs)(ln,{onSelect:e.onSelect,children:[(0,W.jsx)(V,{icon:e.icon}),(0,W.jsx)(`span`,{className:`flex-1`,children:e.label}),e.detail]},e.id)),e.children,t!==void 0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(an,{}),(0,W.jsx)(kk,{session:t,context:!1,mobile:e.mobile,onDeactivate:()=>{a?l(!0):u()},onRename:()=>s(t.title)})]})]})]}),t!==void 0&&o!==null&&(0,W.jsx)(Ur,{open:!0,onOpenChange:e=>{e||s(null)},children:(0,W.jsx)(Ir,{children:(0,W.jsxs)(`form`,{className:`grid gap-4`,onSubmit:e=>{e.preventDefault();let n=o.trim();s(null),n!==``&&n!==t.title&&ye(t.machine,t.id,{title:n})},children:[(0,W.jsx)(Lr,{children:(0,W.jsx)(Br,{children:`Rename thread`})}),(0,W.jsx)(X,{"aria-label":`Title`,value:o,onChange:e=>s(e.target.value)}),(0,W.jsxs)(Wr,{children:[(0,W.jsx)(H,{type:`button`,variant:`outline`,onClick:()=>s(null),children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,children:`Rename`})]})]})})}),(0,W.jsx)(In,{open:c,onOpenChange:l,children:(0,W.jsxs)(zn,{children:[(0,W.jsxs)(lr,{children:[(0,W.jsx)(hr,{children:`Stop running work?`}),(0,W.jsx)(Ln,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(En,{children:[(0,W.jsx)(Kn,{children:`Cancel`}),(0,W.jsx)(Qn,{variant:`destructive`,onClick:u,children:`Stop and Mark Done`})]})]})})]})}function JL(e){let t=(0,U.useSyncExternalStore)(zP,()=>BP().alerts.length>0),n=(0,U.useSyncExternalStore)(zP,()=>BP().layout.tabs.filter(t=>t.projectId===e.selection.projectId).length),r=O(e=>{if(e.selection?.sessionId===null)return 0;let t=CI([...e.earlier,...e.items],be(e));return[...t.agents,...t.tasks].filter(e=>e.status===`Running`).length});return[{id:`diff`,label:`Diff`,title:`Diff`,icon:Oo,pressed:e.panel===`diff`,attention:e.changed,badge:e.changed&&(0,W.jsx)(`span`,{className:`bg-muted-foreground ring-background absolute top-0.5 right-0.5 size-1.5 rounded-full ring-2`}),detail:e.changed&&(0,W.jsx)(`span`,{className:`bg-muted-foreground size-1.5 rounded-full`}),onSelect:()=>e.onPanel(e.panel===`diff`?null:`diff`)},{id:`terminal`,label:`Terminal`,title:`Terminal (${Ft}+\`)`,icon:ds,pressed:e.terminal,attention:t,badge:n>0&&(0,W.jsx)(`span`,{className:B(`absolute top-0 right-0 grid h-3 min-w-3 place-items-center rounded-full px-0.5 text-[8px] leading-none font-medium tabular-nums`,t?`bg-primary text-primary-foreground`:`text-foreground bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))]`),children:n}),detail:n>0&&(0,W.jsx)(`span`,{className:B(`text-xs tabular-nums`,t?`text-primary`:`text-muted-foreground`),children:n}),onSelect:()=>e.onTerminal(!e.terminal)},{id:`tasks`,label:`Tasks`,title:`Tasks`,icon:ps,pressed:e.panel===`tasks`,attention:r>0,badge:r>0&&(0,W.jsx)(`span`,{className:`text-foreground absolute top-0 right-0 grid h-3 min-w-3 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))] px-0.5 text-[8px] leading-none font-medium tabular-nums`,children:r}),detail:r>0&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:r}),onSelect:()=>e.onPanel(e.panel===`tasks`?null:`tasks`)},{id:`browser`,label:`Browser`,title:`Browser`,icon:so,pressed:e.panel===`browser`,attention:!1,badge:null,detail:null,onSelect:()=>e.onPanel(e.panel===`browser`?null:`browser`)},{id:`editor`,label:`Editor`,title:`Editor`,icon:vs,pressed:!1,attention:!1,badge:null,detail:null,onSelect:()=>St({machine:e.selection.machine,projectId:e.selection.projectId})}]}function YL(e){return(0,W.jsxs)(W.Fragment,{children:[e.panel===`browser`&&(0,W.jsx)(FL,{machine:e.selection.machine,onClose:()=>e.onPanel(null)}),e.panel===`diff`&&(0,W.jsx)(U.Suspense,{children:(0,W.jsx)(WL,{machine:e.selection.machine,projectId:e.selection.projectId,running:e.running,onClose:()=>e.onPanel(null)},`${e.selection.machine} ${e.selection.projectId}`)}),e.panel===`tasks`&&(0,W.jsx)(BL,{machine:e.selection.machine,cwd:e.cwd,sessionId:e.selection.sessionId,selected:e.selectedTask,onSelect:e.onSelectTask,onClose:()=>e.onPanel(null)})]})}function XL(){let e=O(e=>e.selection),t=O(e=>e.machines.length>0),n=He();return n===null?e===null?t?(0,W.jsx)(`div`,{className:`bg-sidebar relative flex min-w-0 flex-1 pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:(0,W.jsx)(xI,{className:`min-w-0 flex-1 border-r-0`,mobile:!0})}):(0,W.jsx)(`main`,{className:`bg-background flex flex-1 overflow-y-auto pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:(0,W.jsx)(fO,{})}):(0,W.jsx)(ZL,{selection:e}):(0,W.jsx)(YF,{machine:n,mobile:!0,leading:(0,W.jsx)(H,{variant:`ghost`,size:`icon-xs`,className:`h-full w-11 rounded-none`,"aria-label":`Back`,title:`Back`,onClick:()=>Tt(`chat`,()=>void $e.navigate({to:`/`,search:{},replace:!0})),children:(0,W.jsx)(V,{icon:no})})})}function ZL(e){let t=O(t=>R(t,e.selection.machine)),n=O(t=>t.sessions.find(t=>t.machine===e.selection.machine&&t.id===e.selection.sessionId)),r=O(e=>n!==void 0&&e.generatingTitles.includes(F(n.machine,n.id))),i=O(t=>bt(t,e.selection.machine,e.selection.projectId)?.path??``),a=Xs(e.selection.machine,e.selection.projectId),o=O(wt),s=vp(e.selection.machine,t.status===`online`?e.selection.projectId:null,o),l=yp({machine:e.selection.machine,projectId:e.selection.projectId,repos:s.repos,onRefresh:s.refresh}),u=(0,U.useSyncExternalStore)(zP,()=>BP().open),d=ft({from:`__root__`,select:e=>e.panel??null}),[f,p]=(0,U.useState)(null),m=s.repos.some(e=>e.changed>0),h=d!==null||u,g=(0,U.useCallback)(e=>{h?oe(e):c(e,`overlay`)},[h]),_=(0,U.useCallback)(e=>{p(null),e===null?QL():g({panel:e,bottom:void 0})},[g]),v=(0,U.useCallback)(e=>{_(`tasks`),p(e)},[_]);function y(e){e?g({panel:void 0,bottom:`terminal`}):QL()}return(0,W.jsxs)(`main`,{className:`bg-background flex min-w-0 flex-1 flex-col overflow-hidden pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[(0,W.jsxs)(`header`,{className:`flex h-(--workspace-topbar-height) shrink-0 items-center gap-1.5 px-2`,children:[(0,W.jsx)(H,{variant:`ghost`,size:`icon`,"aria-label":`Back`,onClick:()=>Tt(`chat`,ut),children:(0,W.jsx)(V,{icon:no,className:`text-foreground size-5`,strokeWidth:2})}),(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`div`,{className:`text-foreground truncate font-medium`,children:(0,W.jsx)(`span`,{className:B((r||e.selection.sessionId!==null&&n===void 0)&&`text-shimmer`),children:n?.title??`New thread`})}),t.status===`online`&&(0,W.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-1 text-xs`,children:[(0,W.jsx)(Yd,{icon:t.icon,className:`size-3.5 shrink-0`}),(0,W.jsxs)(`span`,{className:`truncate`,children:[t.name,` / `,a]})]}),t.status!==`online`&&(0,W.jsxs)(`div`,{className:`text-warning-foreground truncate text-xs`,children:[t.status===`connecting`&&`Connecting to ${t.name}…`,t.status===`offline`&&`${t.name} is offline, reconnecting…`,t.status===`unpaired`&&`${t.name} needs pairing`]})]}),(0,W.jsx)(qL,{selection:e.selection,mobile:!0,session:n,panel:d,terminal:u,changed:m,open:l.menuOpen,onOpenChange:l.setMenuOpen,onPanel:_,onTerminal:y,children:s.repos.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(an,{}),(0,W.jsx)(bp,{git:l,collapsed:!0})]})}),(0,W.jsx)(xp,{git:l})]}),(0,W.jsx)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(AL,{onOpenTask:v}),(0,W.jsx)(Hf,{})]},`${e.selection.machine} ${e.selection.sessionId??e.selection.projectId}`)}),(0,W.jsx)(Hr,{open:h,onOpenChange:()=>_(null),children:(0,W.jsx)(Kr,{children:(0,W.jsxs)(Rr,{"aria-describedby":void 0,className:`bg-background data-open:animate-in data-open:slide-in-from-right fixed inset-0 z-40 flex flex-col pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] text-sm duration-200 outline-none [--workspace-topbar-height:44px] motion-reduce:animate-none`,children:[(0,W.jsxs)(Jr,{className:`sr-only`,children:[d===`diff`&&`Diff`,d===`tasks`&&`Tasks`,d===`browser`&&`Browser`,d===null&&`Terminal`]}),(0,W.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[d!==null&&(0,W.jsx)(YL,{panel:d,selection:e.selection,cwd:i,running:o,selectedTask:f,onSelectTask:p,onPanel:_}),d===null&&u&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`border-border/60 flex h-(--workspace-topbar-height) shrink-0 items-center gap-1 border-b px-3`,children:[(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Close`,"aria-label":`Close`,onClick:()=>y(!1),children:(0,W.jsx)(V,{icon:mt,className:`size-4`})}),(0,W.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-xs font-medium`,children:`Terminal`})]}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,W.jsx)(WF,{view:e.selection.projectId})})]})]})]})})})]})}function QL(){Tt(`overlay`,()=>oe({panel:void 0,bottom:void 0}))}var $L=(0,U.lazy)(async()=>({default:(await Zr(async()=>{let{EditorDialog:e}=await import(`./editor-dialog-BdpvXPtR.js`);return{EditorDialog:e}},__vite__mapDeps([18,1,19,3,6,7,20,8,4,21,22,11,12,23,5,9,10,13,14,15,16,17,24,25,26,27,28]))).EditorDialog})),eR=window.matchMedia(`(min-width: 768px)`),tR=800;function nR(e){return eR.addEventListener(`change`,e),()=>eR.removeEventListener(`change`,e)}function rR(){let e=(0,U.useSyncExternalStore)(nR,()=>eR.matches),t=O(e=>e.editor),n=O(e=>e.exporting);return Na(),Ys(`mod+k`,()=>l(!z().paletteOpen),{enableOnFormTags:!0,preventDefault:!0}),(0,W.jsxs)(`div`,{className:`flex h-dvh text-sm`,children:[e?(0,W.jsx)(aR,{}):(0,W.jsx)(XL,{}),(0,W.jsx)(xk,{}),e?(0,W.jsx)(oO,{}):(0,W.jsx)(dO,{}),t!==null&&(0,W.jsx)(U.Suspense,{children:(0,W.jsx)($L,{machine:t.machine,projectId:t.projectId,onClose:()=>St(null)})}),n!==null&&(0,W.jsx)(gO,{session:n}),(0,W.jsx)(rp,{}),(0,W.jsx)(Au,{position:e?`bottom-right`:`top-center`,swipeDirections:e?[`right`,`bottom`]:[`left`,`right`,`top`]})]})}function iR(e){oe({panel:e??void 0})}function aR(){let e=O(e=>e.selection),t=O(e=>e.sessions),n=He(),r=O(e=>e.selection===null?``:bt(e,e.selection.machine,e.selection.projectId)?.path??``),i=O(e=>{let t=rt(e);return t===null?null:R(e,t)}),[a,o]=(0,U.useState)(!0),s=(0,U.useRef)(null),[c,l]=(0,U.useState)(!1),u=ft({from:`__root__`,select:e=>e.panel??null}),d=(0,U.useRef)(`diff`),[f,p]=(0,U.useState)(null),m=(0,U.useCallback)(e=>{p(e),iR(`tasks`)},[]),[h,g]=Sr(`panelWidth`,540),[_,v]=(0,U.useState)(280),y=(0,U.useSyncExternalStore)(zP,()=>BP().open),b=O(wt),x=vp(e?.machine??``,i?.status===`online`?e?.projectId??null:null,b),S=yp({machine:e?.machine??``,projectId:e?.projectId??``,repos:x.repos,onRefresh:x.refresh}),C=t.find(t=>t.machine===e?.machine&&t.id===e.sessionId),w=O(e=>C!==void 0&&e.generatingTitles.includes(F(C.machine,C.id))),T=Xs(e?.machine??``,e?.projectId??``);return Ys([`meta+backquote`,`ctrl+backquote`],e=>{e.stopPropagation(),JP(!BP().open)},{enableOnFormTags:!0,preventDefault:!0,eventListenerOptions:{capture:!0}}),Ys([`mod+j`,`mod+shift+b`],e=>{e.stopPropagation(),iR(xe().panel===void 0?d.current:null)},{enableOnFormTags:!0,preventDefault:!0,eventListenerOptions:{capture:!0}}),(0,U.useEffect)(()=>{u!==null&&(d.current=u)},[u]),Ys([`mod+b`,`mod+shift+j`],()=>o(e=>!e),{enableOnFormTags:!0,preventDefault:!0}),(0,U.useEffect)(()=>{if(n!==null)return;let e=s.current;if(e===null)throw Error(`header is not mounted`);let t=new ResizeObserver(e=>l(e[0].contentRect.width<tR));return t.observe(e),()=>t.disconnect()},[n]),n===null?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(xI,{className:B(`relative`,!a&&`hidden`),mobile:!1,onHide:()=>o(!1)}),!a&&(0,W.jsx)(`div`,{className:`fixed top-0 left-3 z-50 flex h-(--workspace-topbar-height) items-center`,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Show sidebar`,title:`Show sidebar (${Ft}+B)`,onClick:()=>o(!0),children:(0,W.jsx)(V,{icon:Hn})})}),(0,W.jsxs)(`main`,{className:`bg-background relative flex min-w-0 flex-1 flex-col overflow-hidden`,children:[(0,W.jsxs)(`header`,{ref:s,className:B(`bg-background flex h-(--workspace-topbar-height) shrink-0 items-center gap-3 pr-3 pl-[3.25rem]`,a&&`pl-5`),children:[e!==null&&i!==null&&(0,W.jsx)(`nav`,{className:`min-w-0 flex-1`,children:(0,W.jsxs)(`ol`,{className:`flex min-w-0 items-center gap-3 text-sm`,children:[(0,W.jsxs)(`li`,{className:`text-icon-muted flex shrink-0 items-center gap-1.5`,children:[(0,W.jsx)(Yd,{icon:i.icon,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`max-w-40 truncate`,children:i.name})]}),(0,W.jsx)(`li`,{"aria-hidden":!0,className:`text-icon-muted shrink-0`,children:`/`}),(0,W.jsxs)(`li`,{className:`text-muted-foreground flex min-w-0 shrink items-center gap-1.5 font-medium`,title:`${i.name}:${r}`,children:[(0,W.jsx)(nc,{machine:e.machine,projectId:e.projectId,className:`size-3.5`}),(0,W.jsx)(`span`,{className:`max-w-40 truncate`,children:T})]}),(0,W.jsx)(`li`,{"aria-hidden":!0,className:`text-icon-muted shrink-0`,children:`/`}),(0,W.jsx)(`li`,{className:B(`text-foreground min-w-10 truncate font-medium`,a&&`flex-1`),children:(0,W.jsx)(`span`,{className:B((w||e.sessionId!==null&&C===void 0)&&`text-shimmer`),children:C?.title??`New thread`})}),!a&&(0,W.jsx)(`li`,{className:`shrink-0`,children:(0,W.jsx)(gI,{hideDone:!0})})]})}),e===null&&!a&&(0,W.jsx)(gI,{hideDone:!0}),e===null&&(0,W.jsx)(`span`,{className:`flex-1`}),i!==null&&i.status!==`online`&&(0,W.jsxs)(`span`,{className:`text-warning-foreground shrink-0 text-xs`,children:[i.status===`connecting`&&`Connecting to ${i.name}…`,i.status===`offline`&&`${i.name} is offline, reconnecting…`,i.status===`unpaired`&&`${i.name} needs pairing`]}),e!==null&&(0,W.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[!c&&x.repos.length>0&&(0,W.jsx)(Sp,{machine:e.machine,projectId:e.projectId,repos:x.repos,onRefresh:x.refresh}),!c&&x.repos.length>0&&(0,W.jsx)(`span`,{className:`bg-foreground/15 mr-1 ml-2.5 h-4 w-px`}),(0,W.jsx)(KL,{selection:e,panel:u,terminal:y,changed:x.repos.some(e=>e.changed>0),onPanel:e=>{p(null),iR(e)},onTerminal:JP,children:(0,W.jsx)(qL,{selection:e,mobile:!1,session:C,panel:u,terminal:y,changed:x.repos.some(e=>e.changed>0),open:S.menuOpen,onOpenChange:S.setMenuOpen,onPanel:e=>{p(null),iR(e)},onTerminal:JP,children:c&&x.repos.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(an,{}),(0,W.jsx)(bp,{git:S,collapsed:!0})]})})})]})]}),(0,W.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,W.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden`,children:[(0,W.jsxs)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:[i===null&&(0,W.jsx)(fO,{}),e===null&&i!==null&&(0,W.jsx)(`div`,{className:`grid flex-1 place-items-center p-6 text-center`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-foreground text-3xl font-normal tracking-tight`,children:`Pick a thread, or start one`}),(0,W.jsx)(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:`Open a project from the sidebar to talk to Claude.`})]})}),e!==null&&(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(AL,{onOpenTask:m}),(0,W.jsx)(Hf,{})]},`${e.machine} ${e.sessionId??e.projectId}`)]}),e!==null&&y&&(0,W.jsxs)(`aside`,{className:`border-border/80 bg-background relative shrink-0 overflow-hidden border-t`,style:{height:_},children:[(0,W.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,className:`group absolute inset-x-0 top-0 z-30 h-1.5 cursor-row-resize touch-none select-none`,onPointerDown:e=>Pt(e,e=>{let t=Math.max(120,Math.floor(window.innerHeight*.8));v(Math.min(t,Math.max(120,window.innerHeight-e.clientY)))}),children:(0,W.jsx)(`span`,{className:`group-hover:bg-border group-active:bg-primary/60 pointer-events-none absolute inset-x-0 top-0 h-px transition-colors`})}),(0,W.jsx)(WF,{view:e.projectId})]})]}),e!==null&&u!==null&&(0,W.jsxs)(`div`,{className:`relative flex shrink-0`,style:{width:h},children:[(0,W.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,className:`group absolute inset-y-0 -left-1 z-20 w-2 cursor-col-resize select-none`,onPointerDown:e=>Pt(e,e=>{let t=Math.max(360,Math.floor(window.innerWidth*.7)),n=Math.min(t,Math.max(360,window.innerWidth-e.clientX));g(n)}),children:(0,W.jsx)(`span`,{className:`group-hover:bg-border group-active:bg-primary/60 pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`})}),(0,W.jsx)(`div`,{className:`bg-background flex min-w-0 flex-1 flex-col overflow-hidden rounded-tl-lg border-t border-l`,children:(0,W.jsx)(YL,{panel:u,selection:e,cwd:r,running:b,selectedTask:f,onSelectTask:p,onPanel:iR})})]})]})]}),(0,W.jsx)(xp,{git:S})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(xI,{className:B(`relative`,!a&&`hidden`),mobile:!1,onHide:()=>o(!1)}),(0,W.jsx)(YF,{machine:n,mobile:!1,leading:!a&&(0,W.jsx)(H,{variant:`ghost`,size:`icon-xs`,"aria-label":`Show sidebar`,title:`Show sidebar (${Ft}+B)`,onClick:()=>o(!0),children:(0,W.jsx)(V,{icon:Hn})})})]})}var oR=class extends U.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(e,t.componentStack)}render(){let e=this.state.error;return e===null?this.props.children:(0,W.jsxs)(`div`,{className:`flex h-dvh flex-col items-center justify-center gap-3 p-4 text-center`,children:[(0,W.jsx)(`p`,{className:`font-medium`,children:`Something went wrong`}),(0,W.jsx)(`p`,{className:`text-muted-foreground max-w-xl text-sm whitespace-pre-wrap`,children:e.message}),(0,W.jsx)(H,{onClick:()=>location.reload(),children:`Reload`})]})}},sR=[`typescript`,`tsx`,`javascript`],cR=`import { readFile } from 'node:fs/promises'
|
|
26
|
+
import type { Config } from './config'
|
|
27
|
+
|
|
28
|
+
export interface Entry<T> {
|
|
29
|
+
readonly id: string
|
|
30
|
+
value?: T | null
|
|
31
|
+
tags: Array<string>
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type Status = 'idle' | 'running' | \`done-\${number}\`
|
|
35
|
+
|
|
36
|
+
enum Mode { Fast = 1, Slow }
|
|
37
|
+
|
|
38
|
+
export class Store<T extends object> extends Base implements Disposable {
|
|
39
|
+
#items = new Map<string, Entry<T>>()
|
|
40
|
+
private static count = 0
|
|
41
|
+
constructor(private readonly config: Config) {
|
|
42
|
+
super()
|
|
43
|
+
}
|
|
44
|
+
async load(path: string): Promise<T[]> {
|
|
45
|
+
const text = await readFile(path, 'utf8')
|
|
46
|
+
const data = JSON.parse(text) as T[]
|
|
47
|
+
for (const [index, item] of data.entries()) {
|
|
48
|
+
if (index % 2 === 0 && item !== undefined) continue
|
|
49
|
+
}
|
|
50
|
+
return data.filter((item) => item != null).map(({ ...rest }) => rest)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function List(props: { items: string[] }) {
|
|
55
|
+
const [open, setOpen] = useState(false)
|
|
56
|
+
return (
|
|
57
|
+
<ul className="list" onClick={() => setOpen(!open)}>
|
|
58
|
+
{props.items.map((item) => <li key={item}>{item}</li>)}
|
|
59
|
+
</ul>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export default function run(...args: number[]): void {
|
|
64
|
+
const pattern = /^[a-z]+\\d*$/gi
|
|
65
|
+
let total = 0n
|
|
66
|
+
try {
|
|
67
|
+
total += BigInt(args.length ?? 0)
|
|
68
|
+
} catch (error: unknown) {
|
|
69
|
+
console.error(\`failed: \${String(error)}\`, pattern.test('x'))
|
|
70
|
+
} finally {
|
|
71
|
+
// done
|
|
72
|
+
}
|
|
73
|
+
}`;async function lR(){await uR();let e=await Zr(()=>import(`./dist-DUf7iKTq.js`),__vite__mapDeps([29,9,10,11,12,1,13,14,15,16,17]));for(let t of sR){await uR();let n=p().codeTheme;(await e.getSharedHighlighter({themes:[n],langs:[t],preferredHighlighter:`shiki-wasm`})).codeToTokens(cR,{lang:t,themes:{dark:n},defaultColor:!1})}}function uR(){return new Promise(e=>{`requestIdleCallback`in window?requestIdleCallback(()=>e()):setTimeout(e,1e3)})}var dR=document.getElementById(`root`);if(!dR)throw Error(`root element missing`);if(`serviceWorker`in navigator){let e=navigator.serviceWorker.controller!==null,t=document.querySelector(`link[rel="manifest"]`)!==null;navigator.serviceWorker.addEventListener(`controllerchange`,()=>{e&&location.reload()}),navigator.serviceWorker.addEventListener(`message`,e=>{e.data.type===`openSession`&&De({machine:e.data.machine,projectId:e.data.project,sessionId:e.data.sessionId})}),navigator.serviceWorker.register(t?`/sw.js?pwa`:`/sw.js`,{type:`classic`}).catch(e=>console.error(`could not register the service worker`,e))}addEventListener(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`w`&&e.preventDefault()},{capture:!0}),await g(),ve(),Qe({open:e=>{Ta(e).catch(e=>console.error(`could not refresh the push subscription`,e))}}),Ia(),PP(),$e.routeTree.update({component:rR}),(0,Di.createRoot)(dR).render((0,W.jsx)(U.StrictMode,{children:(0,W.jsx)(oR,{children:(0,W.jsx)(xi,{router:$e})})})),lR().catch(e=>console.error(`could not prepare code highlighting`,e));
|