offsite 0.0.88 → 0.0.89
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/CenterFocusIcon-KMjH0sFO.js +1 -0
- package/apps/client/dist/assets/{XIcon-gbQKQqpC.js → XIcon-CDJz0EhT.js} +2 -2
- package/apps/client/dist/assets/{diff-panel-CSL-MBoH.js → diff-panel-CttCts3n.js} +1 -1
- package/apps/client/dist/assets/{editor-dialog-BZY0-avL.js → editor-dialog-CEMtEtdH.js} +3 -3
- package/apps/client/dist/assets/{image-viewer-CVERQTJS.js → image-viewer-3S4rNjFt.js} +1 -1
- package/apps/client/dist/assets/index-BGzAkUgH.js +72 -0
- package/apps/client/dist/assets/index-C9_oOHbj.css +2 -0
- package/apps/client/dist/assets/{preview-dialog-sVMONOFM.js → preview-dialog-BuSSuMeQ.js} +1 -1
- package/apps/client/dist/assets/{use-editor-shortcut-Bqc1G-T5.js → use-editor-shortcut-auobREOP.js} +4 -4
- package/apps/client/dist/assets/{video-viewer-DX49MZpf.js → video-viewer-gcKzQe3N.js} +1 -1
- package/apps/client/dist/assets/zoomable-image-BD-kkiyn.js +41 -0
- package/apps/client/dist/assets/zoomable-image-_HGrW8wW.js +1 -0
- package/apps/client/dist/index.html +6 -5
- package/apps/client/dist/sw.js +1 -1
- package/apps/server/dist/main.mjs +73 -48
- package/apps/server/dist/main.mjs.map +1 -1
- package/package.json +2 -1
- package/apps/client/dist/assets/index-D8k0XOju.css +0 -2
- package/apps/client/dist/assets/index-D_7IXtRu.js +0 -72
- package/apps/client/dist/assets/zoomable-image-C1DMNgds.js +0 -41
- package/apps/client/dist/assets/zoomable-image-DAEgBZCp.js +0 -1
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/image-viewer-CVERQTJS.js","assets/preview-dialog-sVMONOFM.js","assets/rolldown-runtime-COiEfhsA.js","assets/utils-U6QfaJBO.js","assets/dist-C_Y10kCd.js","assets/button-CWFREsRn.js","assets/XIcon-gbQKQqpC.js","assets/zoomable-image-C1DMNgds.js","assets/tooltip-CKPboHje.js","assets/diff-panel-CSL-MBoH.js","assets/dist-D99rUXSZ.js","assets/TextWrapIcon-BRhMbXe9.js","assets/ChevronsDownUpIcon-BNVFd2te.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-BZY0-avL.js","assets/use-editor-shortcut-Bqc1G-T5.js","assets/tags-DrTyXsO5.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,At as a,B as o,Bt as s,C as c,Cn as l,Ct as u,D as d,Dt as f,E as p,En as m,Et as h,Ft as g,G as _,Gt as v,H as y,Ht as b,I as x,It as S,J as C,Jt as w,K as T,Kt as E,L as D,Lt as O,M as k,Mt as A,N as j,Nt as M,O as N,Ot as ee,P as te,Pt as ne,Q as re,Qt as ie,R as ae,Rt as oe,S as se,Sn as ce,St as le,T as ue,Tn as de,Tt as fe,U as P,Ut as F,V as I,Vt as pe,W as me,Wt as he,X as ge,Xt as _e,Y as ve,Yt as ye,Z as be,Zt as xe,_ as Se,_n as Ce,_t as we,a as Te,an as Ee,at as De,b as Oe,bn as ke,bt as Ae,c as je,cn as Me,ct as Ne,d as Pe,dn as Fe,dt as Ie,en as Le,et as Re,f as ze,fn as Be,ft as Ve,g as He,gn as Ue,gt as We,h as Ge,ht as Ke,i as qe,in as L,it as Je,j as Ye,jt as Xe,k as Ze,kt as Qe,l as $e,ln as et,lt as tt,m as R,mt as nt,n as rt,nt as it,o as at,on as ot,ot as st,p as ct,pt as lt,q as ut,qt as dt,r as ft,rt as pt,s as mt,sn as ht,st as gt,t as _t,tn as vt,tt as yt,u as bt,un as xt,ut as St,v as Ct,vn as wt,vt as Tt,w as Et,wn as Dt,wt as Ot,x as kt,xn as At,xt as jt,y as Mt,yn as Nt,yt as Pt,z as Ft,zt as It}from"./XIcon-gbQKQqpC.js";import{a as Lt,c as Rt,i as zt,l as Bt,n as Vt,o as Ht,r as Ut,t as z}from"./utils-U6QfaJBO.js";import{_ as Wt,c as Gt,d as Kt,f as B,h as qt,i as Jt,l as Yt,m as Xt,n as Zt,o as Qt,p as $t,t as en,u as tn}from"./dist-C_Y10kCd.js";import{$ as nn,A as rn,At as an,B as on,C as sn,D as cn,Dt as ln,E as un,Et as dn,F as fn,G as pn,H as mn,I as hn,J as gn,K as _n,L as vn,M as yn,Mt as bn,N as xn,Nt as Sn,O as Cn,Ot as wn,P as Tn,Pt as En,Q as Dn,R as On,S as kn,St as An,T as jn,Tt as Mn,U as Nn,V as Pn,W as Fn,X as In,Y as Ln,Z as Rn,_ as zn,_t as Bn,a as Vn,at as Hn,b as Un,bt as Wn,c as Gn,ct as Kn,d as qn,dt as Jn,et as Yn,f as Xn,ft as Zn,g as Qn,gt as $n,h as er,ht as tr,i as nr,it as rr,jt as ir,k as ar,kt as or,l as sr,lt as cr,m as lr,mt as ur,n as dr,nt as fr,o as pr,ot as mr,p as hr,pt as gr,q as _r,r as vr,rt as yr,s as br,st as xr,t as Sr,tt as Cr,u as wr,ut as Tr,v as Er,w as Dr,wt as Or,x as kr,xt as Ar,y as jr,yt as Mr,z as Nr}from"./use-editor-shortcut-Bqc1G-T5.js";import{a as V,i as Pr,n as Fr,t as H}from"./button-CWFREsRn.js";import{a as Ir,i as Lr,n as Rr,r as zr,t as Br}from"./dist-D99rUXSZ.js";import{n as Vr}from"./libesm-Bfkx4A5Z.js";import{a as Hr,i as Ur,l as Wr,n as Gr,o as Kr,r as qr,s as Jr,t as Yr}from"./tooltip-CKPboHje.js";import{C as Xr,S as Zr,a as Qr,c as $r,h as ei,i as ti,l as ni,o as ri,p as ii,r as ai,s as oi,u as si,v as ci,w as li,y as ui}from"./preview-dialog-sVMONOFM.js";import{n as di,r as fi}from"./TextWrapIcon-BRhMbXe9.js";import{t as pi}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(Bt(),1),mi=U.useLayoutEffect,W=Rt(),hi=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??gi,{error:e[0],reset:this.reset}):this.props.children}};function gi({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 _i=()=>!0,vi=()=>!1;function yi({children:e,fallback:t=null}){return(0,W.jsx)(U.Fragment,{children:bi()?e:t})}function bi(e=!0){return U.useSyncExternalStore(xi,_i,e?vi:_i)}function xi(){return()=>{}}function Si(e){let t=ke(),n=`not-found-${wt(t.stores.location,e=>e.pathname)}-${wt(t.stores.status)}`;return(0,W.jsx)(hi,{getResetKey:()=>n,onCatch:(t,n)=>{if(Dt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Dt(t))return e.fallback?.(t);throw t},children:e.children})}function Ci(){return(0,W.jsx)(`p`,{children:`Not Found`})}function wi(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)(Ci,{})}function Ti(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,W.jsx)(n,{}):null}var Ei=(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,Oi=U.memo(function({routeId:e}){let t=ke(),n=t.stores.getMatchStore(e);return ki(t,wt(n))});function ki(e,t){let n=e.routesById[t.routeId],r=Ti(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)(Ai,{match:t});s&&(l=(0,W.jsx)(yi,{fallback:r,children:l})),o&&(l=(0,W.jsx)(Si,{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)(hi,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Dt(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)(Nt.Provider,{value:t.routeId,children:(0,W.jsxs)(u,{children:[l,null]})}):(0,W.jsxs)(Nt.Provider,{value:t.routeId,children:[l,null]})}var Ai=U.memo(function({match:e}){let t=ke(),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)(ji,{})},[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 Ti(t,r)}if(e.status===`notFound`)return wi(t,r,e.error);if(e.status===`error`)throw e.error;return a}),ji=U.memo(function(){let e=ke(),t=U.useContext(Nt),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=wt(a,e=>[!!e._notFound,e.error],{compare:Ei}),i=wt(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return wi(e,e.routesById[t],r);if(!i)return null;let a=(0,W.jsx)(Oi,{routeId:i});return t===`__root__`?(0,W.jsx)(U.Suspense,{fallback:Ti(e),children:a}):a});function Mi(e,t){let n=e[1];e.length=0,n?.(t)}function Ni({t:e}){let t=ke(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Mi(n,!1),n.push(i,a),e(t),U.startTransition(r)}),mi(()=>{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(de(r.publicHref)!==de(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`,...ce(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Pi(){let e=ke(),t=e.routesById[l],n=Ti(e,t),r=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Ni,{t:U.useState()[1]}),e.ssr?(0,W.jsx)(Fi,{}):(0,W.jsx)(U.Suspense,{fallback:n,children:(0,W.jsx)(Fi,{})})]});return e.options.InnerWrap?(0,W.jsx)(e.options.InnerWrap,{children:r}):r}function Fi(){let e=ke(),t=e._rendered,n=wt(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;mi(()=>{t[0]===n&&Mi(t,!0)},[t,n]);let a=i?(0,W.jsx)(Oi,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,W.jsx)(hi,{getResetKey:()=>r,onCatch:void 0,children:a})}function Ii({router:e,children:t,...n}){m(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,W.jsx)(At.Provider,{value:e,children:t});return e.options.Wrap?(0,W.jsx)(e.options.Wrap,{children:r}):r}function Li({router:e,...t}){return(0,W.jsx)(Ii,{router:e,...t,children:(0,W.jsx)(Pi,{})})}var Ri=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}}}})),zi=t(((e,t)=>{t.exports=Ri()})),Bi=t((e=>{var t=zi(),n=Bt(),r=Wt();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`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.legacy_hidden`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.for(`react.view_transition`),ce=Symbol.for(`react.recoverable`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?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 ie:return`Activity`;case se: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?fe(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var P=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,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}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){var t=e.memoizedState;t!==null&&(ch._currentValue=t.memoizedState,ve(Se,e)),t=ye.current;var n=pp(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),ch._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1<e.stack.indexOf(`
|
|
3
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
-
`+De+e+Oe}var Ae=!1;function je(e,t){if(!e||Ae)return``;Ae=!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{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);case 30:return ke(`ViewTransition`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
-
Error generating stack: `+e.message+`
|
|
9
|
-
`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,L=null,Je=null;function Ye(e){if(typeof Ke==`function`&&qe(e),Je&&typeof Je.setStrictMode==`function`)try{Je.setStrictMode(L,e)}catch{}}var Xe=Math.clz32?Math.clz32:$e,Ze=Math.log,Qe=Math.LN2;function $e(e){return e>>>=0,e===0?32:31-(Ze(e)/Qe|0)|0}var et=256,tt=262144,R=4194304;function nt(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 rt(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=nt(n))):i=nt(o):i=nt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=nt(n))):i=nt(o)):i=nt(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 it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function at(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-Xe(n),i=1<<r;t|=e[r],n&=~i}return t}function ot(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 st(){var e=R;return R<<=1,!(R&62914560)&&(R=4194304),e}function ct(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ut(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-Xe(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&&dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Xe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ft(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function pt(e,t){var n=t&-t;return n=n&42?1:mt(n),(n&(e.suspendedLanes|t))===0?n:0}function mt(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 ht(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:wh(e.type)):e}function _t(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt,Dt=`__reactLoad$`+vt;function Ot(e){delete e[yt],delete e[bt],delete e[Ct],delete e[wt]}function kt(e){var t;if(t=e[yt])return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mm(e);e!==null;){if(n=e[yt])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function At(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Mt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Nt(e){e[Et]=!0}function Pt(e){e[Dt]=void 0}var Ft=new Set,It={};function Lt(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]*$`),Vt={},Ht={};function Ut(e){return Pe.call(Ht,e)?!0:Pe.call(Vt,e)?!1:zt.test(e)?Ht[e]=!0:(Vt[e]=!0,!1)}var z=!1;function Gt(){var e=z;return z=!1,e}function Kt(e,t,n){if(Ut(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 B(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(P(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]=``,z=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),z=!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=At(e);if(t&&(e=t.stateNode)){var n=e[bt]||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[bt]||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)&&(zd(),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[bt]||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 vr(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 yr(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 br={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 xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!br[e.type]:t===`textarea`}function Sr(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=Yf(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Cr=null,wr=null;function Tr(e){Hf(e,0)}function Er(e){if(Qt(jt(e)))return e}function Dr(e,t){if(e===`change`)return t}var Or=!1;if(Tn){var kr;if(Tn){var Ar=`oninput`in document;if(!Ar){var jr=document.createElement(`div`);jr.setAttribute(`oninput`,`return;`),Ar=typeof jr.oninput==`function`}kr=Ar}else kr=!1;Or=kr&&(!document.documentMode||9<document.documentMode)}function Mr(){Cr&&(Cr.detachEvent(`onpropertychange`,Nr),wr=Cr=null)}function Nr(e){if(e.propertyName===`value`&&Er(wr)){var t=[];Sr(t,wr,e,vn(e)),Cn(Tr,t)}}function V(e,t,n){e===`focusin`?(Mr(),Cr=t,wr=n,Cr.attachEvent(`onpropertychange`,Nr)):e===`focusout`&&Mr()}function Pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Er(wr)}function Fr(e,t){if(e===`click`)return Er(t)}function H(e,t){if(e===`input`||e===`change`)return Er(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(!Pe.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=Yf(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 Qr={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`)},$r={},ei={};Tn&&(ei=document.createElement(`div`).style,`AnimationEvent`in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),`TransitionEvent`in window||delete Qr.transitionend.transition);function ti(e){if($r[e])return $r[e];if(!Qr[e])return e;var t=Qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ei)return $r[e]=t[n];return e}var ni=ti(`animationend`),ri=ti(`animationiteration`),ii=ti(`animationstart`),ai=ti(`transitionrun`),oi=ti(`transitionstart`),si=ti(`transitioncancel`),ci=ti(`transitionend`),li=new Map,ui=`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(` `);ui.push(`scrollEnd`);function di(e,t){li.set(e,t),Lt(t,[e])}var fi=0;function pi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=fi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function U(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;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 mi(e,t){return e=U(e),t=U(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var W=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),Ci(e)}function xi(e,t){return yi(e,null,null,t),Ci(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-Xe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ci(e){if(50<kd)throw kd=0,Ad=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wi={};function Ti(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 Ei(e,t,n,r){return new Ti(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var n=e.alternate;return n===null?(n=Ei(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 ki(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 Ai(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Di(r)&&(s=1);else if(typeof r==`string`)s=Jm(e,n,ye.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ie:return e=Ei(31,n,t,a),e.elementType=ie,e.lanes=o,e;case O:return ji(n.children,a,o,t);case k:s=8,a|=24;break;case A:return e=Ei(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case ee:return e=Ei(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=Ei(19,n,t,a),e.elementType=te,e.lanes=o,e;case ae:case se:return e=a|32,e=Ei(30,n,t,e),e.elementType=se,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 re:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ji(e,t,n,r){return e=Ei(7,e,r,t),e.lanes=n,e}function Mi(e,t,n){return e=Ei(6,e,null,t),e.lanes=n,e}function Ni(e){var t=Ei(18,null,null,0);return t.stateNode=e,t}function Pi(e,t,n){return t=Ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fi=new WeakMap;function Ii(e,t){if(typeof e==`object`&&e){var n=Fi.get(e);return n===void 0?(t={value:e,source:t,stack:Ne(t)},Fi.set(e,t),t):n}return{value:e,source:t,stack:Ne(t)}}var Li=[],Ri=0,Bi=null,Vi=0,Hi=[],Ui=0,Wi=null,Gi=1,Ki=``;function qi(e,t){Li[Ri++]=Vi,Li[Ri++]=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-Xe(r)-1;r&=~(1<<i),n+=1;var a=32-Xe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Gi=1<<32-Xe(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=Li[--Ri],Li[Ri]=null,Vi=Li[--Ri],Li[Ri]=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(Ii(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[yt]=e,t[bt]=r,n){case`dialog`:Z(`cancel`,t),Z(`close`,t);break;case`iframe`:case`object`:case`embed`:Z(`load`,t);break;case`video`:case`audio`:for(n=0;n<Bf.length;n++)Z(Bf[n],t);break;case`source`:Z(`error`,t);break;case`img`:case`image`:case`link`:Z(`error`,t),Z(`load`,t);break;case`details`:Z(`toggle`,t);break;case`input`:Z(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Z(`invalid`,t);break;case`textarea`:Z(`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||tp(t.textContent,n)?(r.popover!=null&&(Z(`beforetoggle`,t),Z(`toggle`,t)),r.onScroll!=null&&Z(`scroll`,t),r.onScrollEnd!=null&&Z(`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=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));$i=pm(e)}else t===27?(t=$i,wp(e.type)?(e=fm,fm=null,$i=e):$i=t):$i=Qi?dm(e.stateNode.nextSibling):null;return!0}function sa(){$i=Qi=null,G=!1}function ca(){var e=ea;return e!==null&&(pd===null?pd=e:pd.push.apply(pd,e),ea=null),e}function la(e){ea===null?ea=[e]:ea.push(e)}var ua=ge(null),da=null,fa=null;function pa(e,t,n){ve(ua,t._currentValue),t._currentValue=n}function ma(e){e._currentValue=ua.current,_e(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===Se.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=Ff(),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=F.S;F.S=function(e,t){if(X=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Ia(e,t),Aa!==null)for(var n=xf;n!==null;)ka(n,Aa),n=n.next;if(n=e.types,n!==null){for(var r=xf;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=ge(null);function Va(){var e=Ba.current;return e===null?$u.pooledCache:e}function Ha(e,t){t===null?ve(Ba,Ba.current):ve(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=Oi(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=Mi(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===re&&Xa(i)===t.type)?(t=a(t,n.props),ro(t,n),t.return=e,t):(t=Ai(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=Pi(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=ji(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=Mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case E:return n=Ai(t.type,t.key,t.props,null,e.mode,n),ro(n,t),n.return=e,n;case D:return t=Pi(t,e.mode,n),t.return=e,t;case re:return t=Xa(t),f(e,t,n)}if(P(t)||ue(t))return t=ji(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 re:return n=Xa(n),p(e,t,n,r)}if(P(n)||ue(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 re:return r=Xa(r),m(e,t,n,r,i)}if(P(r)||ue(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===re&&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=ji(o.props.children,e.mode,c,o.key),ro(c,o),c.return=e,e=c):(c=Ai(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=Pi(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=Xa(o),_(e,r,o,c)}if(P(o))return h(e,r,o,c);if(ue(o)){if(l=ue(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=Mi(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=Ei(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=Ci(e),Si(e,null,n),t}return yi(e,r,t,n),Ci(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,ft(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?(Y&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),sd|=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=ge(null),So=ge(0);function Co(e,t){e=ad,ve(So,e),ve(xo,t),ad=e|t.baseLanes}function wo(){ve(So,ad),ve(xo,xo.current)}function To(){ad=So.current,_e(xo),_e(So)}var Eo=ge(null),Do=null;function Oo(e){var t=e.alternate;ve(No,No.current&1),ve(Eo,e),Do===null&&(t===null||xo.current!==null||t.memoizedState!==null)&&(Do=e)}function ko(e){ve(No,No.current),ve(Eo,e),Do===null&&(Do=e)}function Ao(e){e.tag===22?(ve(No,No.current),ve(Eo,e),Do===null&&(Do=e)):jo()}function jo(){ve(No,No.current),ve(Eo,Eo.current)}function Mo(e){_e(Eo),Do===e&&(Do=null),_e(No)}var No=ge(0);function Po(e,t){ve(Eo,Eo.current),ve(No,t)}function Fo(e){_e(No),_e(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||cm(n)||lm(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,F.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){F.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)}F.H=mc,o=t(n,r)}while(Vo);return o}function Qo(){var e=F.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,F.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===ce)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]=oe;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:(Y&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,sd|=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,sd|=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&&Pd(t,e,2)}function vs(e){var t=ns();if(typeof e==`function`){var n=e;if(e=n(),Ho){Ye(!0);try{n()}finally{Ye(!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)}};F.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=F.T,o={};o.types=a===null?null:a.types,F.T=o;try{var s=n(i,r),c=F.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),F.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=dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){$i=dm(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){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r}function qs(e,t,n){return n===void 0||Lo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),K.lanes|=e,sd|=e,n)}function Js(e,t,n,r){return Lr(n,t)?n:xo.current===null?!(Lo&106)||Lo&1073741824&&!(Y&261930)?(Ac=!0,e.memoizedState=n):(e=Md(),K.lanes|=e,sd|=e,t):(e=qs(e,n,r),Lr(e,t)||(Ac=!0),e)}function Ys(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};s.types=o===null?null:o.types,F.T=s,sc(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?oc(e,t,Ra(c,r),jd(e)):oc(e,t,r,jd(e))}catch(n){oc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.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,pe,n===null?Xs:function(){return $s(e),n(r)})}function Qs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:pe},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,{},jd())}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=jd();e=fo(n);var r=po(t,e,n);r!==null&&(Pd(r,t,n),mo(r,t,n)),t={cache:Da()},e.payload=t;return}t=t.return}}function ic(e,t,n){var r=jd();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&&(Pd(n,e,r),uc(n,t,r)))}function ac(e,t,n){oc(e,t,n,jd())}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 Pd(n,e,r),uc(n,t,r),!0}return!1}function sc(e,t,n,r){if(r={lane:2,revertLane:Ff(),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&&Pd(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,ft(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){Ye(!0);try{e()}finally{Ye(!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){Ye(!0);try{n(t)}finally{Ye(!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));Y&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-Xe(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=jd(),i=fo(r);i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Pd(t,e,r),mo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=fo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Pd(t,e,r),mo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=fo(n);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,n),t!==null&&(Pd(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){W(e)}function xc(e){console.error(e)}function Sc(e){W(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`&&(vd===null?vd=new Set([this]):vd.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?Kd():n.alternate===null&&od===0&&(od=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),hf(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)),hf(e,r,a)),!1}throw Error(i(435,n.tag))}return hf(e,r,a),Kd(),!1}if(G)return t=Eo.current,t===null?(r!==na&&(t=Error(i(423),{cause:r}),la(Ii(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ii(r,n),a=Tc(e.stateNode,r,a),ho(e,a),od!==4&&(od=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==na&&(e=Error(i(422),{cause:r}),la(Ii(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ii(o,n),fd===null?fd=[o]:fd.push(o),od!==4&&(od=2),t===null)return!0;r=Ii(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`&&(vd===null||!vd.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`&&!Di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Pc(e,t,a,r,i)):(e=Ai(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=Oi(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=sm(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=Ni(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=pt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,xi(e,s),Pd(r,e,s),kc;Kd()}t=zc(e,t,n)}else e=o.treeContext,$i=dm(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=Oi(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=wi,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):wi,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=wi,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=wi,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|=ud),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=sm(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=Ni(e),n.return=t,t.child=n,Qi=t,$i=null)):e=null,e===null)throw ra(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(jo(),i=t.mode,a=Zc({mode:`hidden`,children:a},i),r=ji(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=Oi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=ji(i,a,n,null),i.flags|=2):i=Oi(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=Oi(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=Ei(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=ji(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),lm(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=pt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,xi(e,a),Pd(r,e,a),kc;return cm(o)||Kd(),Qc(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,$i=dm(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),sd|=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=Oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oi(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:Ce(t,t.stateNode.containerInfo),pa(t,Ea,e.memoizedState.cache),sa();break;case 27:case 5:Te(t);break;case 4:Ce(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`)Di(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=fe(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(Ce(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=Ii(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=dm(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,xe.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&G&&(r=t.stateNode=Q(t.type,t.pendingProps,xe.current),Qi=t,ta=!0,a=$i,wp(t.type)?(fm=a,$i=dm(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=am(r,t.type,t.pendingProps,ta),r===null?a=!1:(t.stateNode=r,Qi=t,$i=dm(r.firstChild),ta=!1,a=!0)),a||ra(t)),Te(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=om(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 Ce(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(Ud())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(Ud())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:st(),e.lanes|=t,dd|=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),we(),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(Ee(t),n=xe.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=ye.current,oa(t)?ia(t,e):(e=Q(a,r,n),t.stateNode=e,ul(t))}return hl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(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=ye.current,oa(t))ia(t,o);else{var s=dp(xe.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[yt]=t,o[bt]=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(ip(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=xe.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[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||ra(t,!0)}else e=dp(e).createTextNode(r),e[yt]=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[yt]=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[yt]=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 we(),e===null&&Gf(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(od!==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;)ki(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&&ze()>gd&&(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*ze()-r.renderingStartTime>gd&&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=ze(),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,ve(Eo,t),ve(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&&_e(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),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(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 we(),null;case 10:return ma(t.type),null;case 22:case 23:return Mo(t),To(),e!==null&&_e(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),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();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&&_e(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){mf(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){mf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){mf(t,t.return,e)}}function xl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bo(t,n)}catch(t){mf(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){mf(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=pi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);f(e.child,!1,em,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){mf(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){mf(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){mf(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++)nm(e.stateNode,t[n])}function El(e){for(var t=e.return;t!==null&&(kl(t)&&nm(e.stateNode,t.stateNode),!Ol(t));)t=t.return}function Dl(e){for(var t=e.return;t!==null&&(kl(t)&&rm(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){mf(e,e.return,t)}}function jl(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[bt]=t}catch(t){mf(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),z=!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),z=!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]);ip(t,r,n),t[yt]=e,t[bt]=n}catch(t){mf(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=mi(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=pi(r,n),a=mi(r.default,n.paired?r.share:r.enter);a===`none`?Kl(e):Ul(e,i,a,null,!1)?(Kl(e),n.paired||t||Nd(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=mi(n.default,n.share);if(a!==`none`&&(Ul(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(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=pi(t,e.stateNode),r=Rl===null?void 0:Rl.get(n),i=mi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Ul(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Rl.delete(n),Nd(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=pi(t,e.stateNode);t=mi(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 q(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;)q(e),e=e.sibling;else Zl(e)}function Ql(e){for(e=e.child;e!==null;)e.tag===30?Gl(e.child,!1):e.subtreeFlags&33554432&&Ql(e),e=e.sibling}function $l(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:$l(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function eu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=pi(n,r),a=mi(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=$l(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&eu(e,t);e=e.sibling}}var tu=!1,nu=!1,ru=!1,iu=!1,au=typeof WeakSet==`function`?WeakSet:Set,ou=null,su=!1,cu=!1,lu=!1,uu=!1;function du(e,t,n){if(e=e.containerInfo,lp=_h,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},_h=!1,n=(n&335544064)===n,ou=t,t=n?9270:1024;ou!==null;){if(e=ou,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),fu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Yl(r),fu(n);continue}if(r!==null&&r.memoizedState!==null){n&&zl(e),fu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ou=r):(n&&Xl(e),fu(n))}}Rl=null}function fu(e){for(;ou!==null;){var t=ou,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){mf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(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=pi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=mi(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,ou=r;break}ou=t.return}}function pu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Nu(e,n),r&4&&yl(5,n);break;case 1:if(Nu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){mf(n,n.return,e)}else{var i=yc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){mf(n,n.return,e)}}}r&64&&xl(n),r&512&&Cl(n,n.return);break;case 3:if(Nu(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){mf(n,n.return,e)}}break;case 27:t===null&&r&4&&Il(n);case 26:case 5:Nu(e,n),t===null&&r&4&&Al(n),r&512&&Cl(n,n.return);break;case 12:Nu(e,n);break;case 31:Nu(e,n),r&4&&Su(e,n);break;case 13:Nu(e,n),r&4&&Cu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=vf.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||tu,!r){var a=t!==null&&t.memoizedState!==null||nu;t=tu,i=nu,tu=r,(nu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Fu(e,n,r)):Nu(e,n),tu=t,nu=i}break;case 30:Nu(e,n),r&512&&Cl(n,n.return);break;case 7:r&512&&Cl(n,n.return);default:Nu(e,n)}}function mu(e,t){for(e=e.child;e!==null;)hu(e,t),e=e.sibling}function hu(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){mf(e,e.return,t)}gu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,z=!0}catch(t){mf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){mf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&mu(e,t);break;default:mu(e,t)}}function gu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:hu(n,r);break a;case 22:n.memoizedState===null&&gu(n,r);break a;default:gu(n,r)}}e=e.sibling}}function _u(e){var t=e.alternate;t!==null&&(e.alternate=null,_u(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ot(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 vu=null,yu=!1;function bu(e,t,n){for(n=n.child;n!==null;)xu(e,t,n),n=n.sibling}function xu(e,t,n){if(Je&&typeof Je.onCommitFiberUnmount==`function`)try{Je.onCommitFiberUnmount(L,n)}catch{}switch(n.tag){case 26:nu||wl(n,t),bu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!nu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nu||wl(n,t),Dl(n);var r=vu,i=yu;wp(n.type)&&(vu=n.stateNode,yu=!1),bu(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),vu=r,yu=i;break;case 5:nu||wl(n,t),Dl(n);case 6:if(n.tag===6&&Dl(n),r=vu,i=yu,vu=null,bu(e,t,n),vu=r,yu=i,vu!==null){if(yu)try{(vu.nodeType===9?vu.body:vu.nodeName===`HTML`?vu.ownerDocument.body:vu).removeChild(n.stateNode),z=!0}catch(e){mf(n,t,e)}else try{vu.removeChild(n.stateNode),z=!0}catch(e){mf(n,t,e)}}break;case 18:vu!==null&&(yu?(e=vu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Uh(e)):Tp(vu,n.stateNode));break;case 4:r=vu,i=yu,vu=n.stateNode.containerInfo,yu=!0,bu(e,t,n),vu=r,yu=i;break;case 0:case 11:case 14:case 15:bl(2,n,t),nu||bl(4,n,t),bu(e,t,n);break;case 1:nu||(wl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Sl(n,t,r)),bu(e,t,n);break;case 21:bu(e,t,n);break;case 22:nu=(r=nu)||n.memoizedState!==null,bu(e,t,n),nu=r;break;case 30:wl(n,t),bu(e,t,n);break;case 7:nu||wl(n,t),bu(e,t,n);break;default:bu(e,t,n)}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Uh(e)}catch(e){mf(t,t.return,e)}}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Uh(e)}catch(e){mf(t,t.return,e)}}function wu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new au),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new au),t;default:throw Error(i(435,e.tag))}}function Tu(e,t){var n=wu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=yf.bind(null,e,t);t.then(r,r)}})}function Eu(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)){vu=l.stateNode,yu=!1;break a}break;case 5:vu=l.stateNode,yu=!1;break a;case 3:case 4:vu=l.stateNode.containerInfo,yu=!0;break a}l=l.return}if(vu===null)throw Error(i(160));xu(s,c,o),vu=null,yu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ou(t,e,n),t=t.sibling}var Du=null;function Ou(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}Eu(t,e,n),ku(e),a&4&&(bl(3,e,e.return),yl(3,e),bl(5,e,e.return));break;case 1:Eu(t,e,n),ku(e),a&512&&(nu||r===null||wl(r,r.return)),a&64&&tu&&(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=Du,Eu(t,e,n),ku(e),a&512&&(nu||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(tu)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[Et]||r[yt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[yt]=e,Nt(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),ip(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),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[yt]=e,Nt(r),t=r}e.stateNode=t}}else tu||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||nu||t.parentNode.removeChild(t)):a.count--,n===null?tu||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:Eu(t,e,n),ku(e),a&512&&(nu||r===null||wl(r,r.return)),r!==null&&a&4&&jl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ru,ru=!1,Eu(t,e,n),ru=o,ku(e),a&512&&(nu||r===null||wl(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),z=!0}catch(t){mf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,jl(e,t,r===null?t:r.memoizedProps)),a&1024&&(iu=!0);break;case 6:if(Eu(t,e,n),ku(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,z=!0}catch(t){mf(e,e.return,t)}}break;case 3:if(z=!1,Gm=null,o=Du,Du=xm(t.containerInfo),Eu(t,e,n),Du=o,ku(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Uh(t.containerInfo)}catch(t){mf(e,e.return,t)}iu&&(iu=!1,Au(e)),z=!1;break;case 4:a=ru,ru=tu,r=Gt(),o=Du,Du=xm(e.stateNode.containerInfo),Eu(t,e,n),ku(e),Du=o,z&&cu&&(lu=!0),z=r,ru=a;break;case 12:Eu(t,e,n),ku(e);break;case 31:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 13:Eu(t,e,n),ku(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(hd=ze()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=tu,l=nu,u=ru;tu=c||o,ru=u||o,nu=l||s,Eu(t,e,n),nu=l,ru=u,tu=c,ku(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||tu||nu||(t=s||nu,n=tu,r=nu,tu=o||tu,nu=t,Pu(e,2),tu=n,nu=r),!o&&ru||mu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Tu(e,n))));break;case 19:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 30:a&512&&(nu||r===null||wl(r,r.return)),a=Gt(),o=cu,s=(n&335544064)===n,c=e.memoizedProps,cu=s&&mi(c.default,c.update)!==`none`,Eu(t,e,n),ku(e),s&&r!==null&&z&&(e.flags|=4),cu=o,z=a;break;case 21:break;case 7:a&512&&(nu||r===null||wl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Eu(t,e,n),ku(e)}}function ku(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){mf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Au(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Au(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,_h=!0,t.reset(),_h=!1),e=e.sibling}}function ju(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Mu(t,e),t=t.sibling;else eu(t,!1)}function Mu(e,t){var n=e.alternate;if(n===null)ql(e,!1);else switch(e.tag){case 3:if(uu=su=!1,Vl(),ju(t,e),!su&&!lu){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`})),uu=!0}Bl=null;break;case 5:ju(t,e);break;case 4:r=su,su=!1,ju(t,e),su&&(lu=!0),su=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ju(t,e):ql(e,!1));break;case 30:r=su,i=Vl(),su=!1,ju(t,e),su&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=pi(a,o),o=pi(n.memoizedProps,o);var s=mi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Hl=0,t=$l(e,n,t,o,s,a,!0),Hl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Bl=i):i!==null&&(i.push.apply(i,Bl),Bl=i),su=e.flags&32?!0:r;break;default:ju(t,e)}}function Nu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pu(e,t.alternate,t),t=t.sibling}function Pu(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),Pu(n,r);break;case 1:wl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Sl(n,n.return,i),Pu(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),Pu(n,r);break;case 6:Dl(n);break;case 26:wl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||nu||i.parentNode.removeChild(i),Pu(n,r);break;case 22:n.memoizedState===null&&Pu(n,r);break;case 30:wl(n,n.return),Pu(n,r);break;case 7:wl(n,n.return);default:Pu(n,r)}e=e.sibling}}function Fu(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:Fu(i,a,n),yl(4,a);break;case 1:if(Fu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){mf(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){mf(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),Fu(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||tu||qm(xm(c.ownerDocument),a.type,c),Fu(i,a,n),s&&r===null&&o&4&&Al(a),Cl(a,a.return);break;case 12:Fu(i,a,n);break;case 31:Fu(i,a,n),s&&o&4&&Su(i,a);break;case 13:Fu(i,a,n),s&&o&4&&Cu(i,a);break;case 22:a.memoizedState===null&&Fu(i,a,n),Cl(a,a.return);break;case 30:Fu(i,a,n),Cl(a,a.return);break;case 7:Cl(a,a.return);default:Fu(i,a,n)}t=t.sibling}}function Iu(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 Lu(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 Ru(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)zu(e,t,n,r),t=t.sibling;else i&&Ql(t)}function zu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&q(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ru(e,t,n,r),a&2048&&yl(9,t);break;case 1:Ru(e,t,n,r);break;case 3:Ru(e,t,n,r),i&&uu&&(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){Ru(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){mf(t,t.return,e)}}else Ru(e,t,n,r);break;case 31:Ru(e,t,n,r);break;case 13:Ru(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&&q(t),o._visibility&2?Ru(e,t,n,r):(o._visibility|=2,Bu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&q(s),o._visibility&2?Ru(e,t,n,r):Vu(e,t)),a&2048&&Iu(s,t);break;case 24:Ru(e,t,n,r),a&2048&&Lu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Gl(a.child,!0),Gl(t.child,!0))),Ru(e,t,n,r);break;default:Ru(e,t,n,r)}}function Bu(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:Bu(a,o,s,c,i),yl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Bu(a,o,s,c,i)):u._visibility&2?Bu(a,o,s,c,i):Vu(a,o),i&&l&2048&&Iu(o.alternate,o);break;case 24:Bu(a,o,s,c,i),i&&l&2048&&Lu(o.alternate,o);break;default:Bu(a,o,s,c,i)}t=t.sibling}}function Vu(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:Vu(n,r),i&2048&&Iu(r.alternate,r);break;case 24:Vu(n,r),i&2048&&Lu(r.alternate,r);break;default:Vu(n,r)}t=t.sibling}}var Hu=8192;function Uu(e,t,n){if(e.subtreeFlags&Hu)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&Hu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Qm(n,e)):$m(n,Du,e.memoizedState,e.memoizedProps));break;case 5:Uu(e,t,n),e.flags&Hu&&(e=e.stateNode,(t&335544128)===t&&Qm(n,e));break;case 3:case 4:var r=Du;Du=xm(e.stateNode.containerInfo),Uu(e,t,n),Du=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Hu,Hu=16777216,Uu(e,t,n),Hu=r):Uu(e,t,n));break;case 30:if((e.flags&Hu)!==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];ou=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];ou=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(;ou!==null;){var n=ou;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,ou=r;else a:for(n=e;ou!==null;){r=ou;var i=r.sibling,a=r.return;if(_u(r),r===n){ou=null;break a}if(i!==null){i.return=a,ou=i;break a}ou=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,Y=0,ed=0,td=null,nd=!1,rd=!1,id=!1,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=0,fd=null,pd=null,md=!1,hd=0,X=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return Qu&2&&Y!==0?Y&-Y:F.T===null?gt():Ff()}function Md(){if(ud===0){if(!(Y&536870912)||G){var e=tt;tt<<=1,!(tt&3932160)&&(tt=262144),ud=e}else ud=536870912}return e=Eo.current,e!==null&&(e.flags|=32),ud}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(pi(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===$u&&(ed===2||ed===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Y,ud,!1)),lt(e,n),Qu&2&&e===$u||(e===$u&&(!(Qu&2)&&(cd|=n),od===4&&Rd(e,Y,ud,!1)),Df(e))}function Fd(e,t,n){if(Qu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||it(e,t),a=r?Yd(e,t):qd(e,t,!0),o=r;do{if(a===0){rd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ld(n))a=qd(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=fd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=qd(c,s,!1),s!==2&&s!==6){if(id&&!l){c.errorRecoveryDisabledLanes|=o,cd|=o,a=4;break a}o=pd,pd=a,o!==null&&(pd===null?pd=o:pd.push.apply(pd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Vd(e,0),Rd(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:Rd(r,t,ud,!nd);break a;case 2:pd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=hd+300-ze(),10<a)){if(Rd(r,t,ud,!nd),rt(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=vp(Id.bind(null,r,n,pd,_d,md,t,ud,cd,dd,nd,o,`Throttled`,-0,0),a);break a}Id(r,n,pd,_d,md,t,ud,cd,dd,nd,o,null,-0,0)}break}}while(1);Df(e)}function Id(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?hd-ze():(a&4194048)===a?X-ze():0,m=th(d,m),m!==null)?(Sd=a,e.cancelPendingCommit=m(nf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l)):nf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(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 Rd(e,t,n,r){t=at(e,t),t&=~ld,t&=~cd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Xe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&dt(e,n,t)}function zd(){return Qu&6?!0:(Of(0,!1),!1)}function Bd(){if(J!==null){if(ed===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 Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),$u=e,J=n=Oi(e.current,null),Y=t,ed=0,td=null,nd=!1,rd=it(e,t),id=!1,dd=ud=ld=cd=sd=od=0,pd=fd=null,md=!1,ad=at(e,t),vi(),n}function Hd(e,t){K=null,F.H=dc,t===Wa||t===Ka?(t=Qa(),ed=3):t===Ga?(t=Qa(),ed=4):ed=t===kc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,td=t,J===null&&(od=1,Cc(e,Ii(t,e.current)))}function Ud(){var e=Eo.current;return e===null?!0:(Y&4194048)===Y?Do===null:(Y&62914560)===Y||Y&536870912?e===Do:!1}function Wd(){var e=F.H;return F.H=dc,e===null?dc:e}function Gd(){var e=F.A;return F.A=Xu,e}function Kd(){od=4,nd||(Y&4194048)!==Y&&Eo.current!==null||(rd=!0),!(sd&134217727)&&!(cd&134217727)||$u===null||Rd($u,Y,ud,!1)}function qd(e,t,n){var r=Qu;Qu|=2;var i=Wd(),a=Gd();($u!==e||Y!==t)&&(_d=null,Vd(e,t)),t=!1;var o=od;a:do try{if(ed!==0&&J!==null){var s=J,c=td;switch(ed){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:Eo.current===null&&(t=!0);var l=ed;if(ed=0,td=null,$d(e,s,c,l),n&&rd){o=0;break a}break;default:l=ed,ed=0,td=null,$d(e,s,c,l)}}Jd(),o=od;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,fa=da=null,Qu=r,F.H=i,F.A=a,J===null&&($u=null,Y=0,vi()),o}function Jd(){for(;J!==null;)Zd(J)}function Yd(e,t){var n=Qu;Qu|=2;var r=Wd(),a=Gd();$u!==e||Y!==t?(_d=null,gd=ze()+500,Vd(e,t)):rd=it(e,t);a:do try{if(ed!==0&&J!==null){t=J;var o=td;b:switch(ed){case 1:ed=0,td=null,$d(e,t,o,1);break;case 2:case 9:if(Ja(o)){ed=0,td=null,Qd(t);break}t=function(){ed!==2&&ed!==9||$u!==e||(ed=7),Df(e)},o.then(t,t);break a;case 3:ed=7;break a;case 4:ed=5;break a;case 7:Ja(o)?(ed=0,td=null,Qd(t)):(ed=0,td=null,$d(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){ed=0,td=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,ef(u))}break b}}ed=0,td=null,$d(e,t,o,5);break;case 6:ed=0,td=null,$d(e,t,o,6);break;case 8:Bd(),od=6;break a;default:throw Error(i(462))}}Xd();break}catch(t){Hd(e,t)}while(1);return fa=da=null,F.H=r,F.A=a,Qu=n,J===null?($u=null,Y=0,vi(),od):0}function Xd(){for(;J!==null&&!Le();)Zd(J)}function Zd(e){var t=ll(e.alternate,e,ad);e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function Qd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Uc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=Uc(n,t,t.pendingProps,t.type.render,t.ref,Y);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=ki(t,ad),t=ll(n,t,ad)}e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function $d(e,t,n,r){fa=da=null,ts(t),eo=null,to=0;var i=t.return;try{if(Oc(e,i,t,n,Y)){od=1,Cc(e,Ii(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;od=1,Cc(e,Ii(n,e.current)),J=null;return}t.flags&32768?(G||r===1?e=!0:rd||Y&536870912?e=!1:(nd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),tf(t,e)):ef(t)}function ef(e){var t=e;do{if(t.flags&32768){tf(t,nd);return}e=t.return;var n=gl(t.alternate,t,ad);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);od===0&&(od=5)}function tf(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);od=6,J=null}function nf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do df();while(yd!==0);if(Qu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===$u&&(J=$u=null,Y=0),xd=t,bd=e,Sd=n,wd=a,Td=r,rf(e,t,n,s,c,l,f)}}function rf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=_i,ut(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=ja(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,bf(Ue,function(){return ff(),null})):(e.callbackNode=null,e.callbackPriority=0),Ll=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,i=I.p,I.p=2,a=Qu,Qu|=4;try{du(e,t,n)}finally{Qu=a,I.p=i,F.T=r}}yd=1,Ll?Ed=Pp(o,e.containerInfo,Od,sf,cf,of,lf,ff,af,null,null):(sf(),cf(),lf())}function af(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function of(){yd===3&&(yd=0,Mu(xd,bd),yd=4)}function sf(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=F.T,F.T=null;var i=I.p;I.p=2;var a=Qu;Qu|=4;try{cu=lu=!1,Ou(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}}_h=!!lp,up=lp=null}finally{Qu=a,I.p=i,F.T=r}}e.current=t,yd=2}}function cf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Qu;Qu|=4;try{pu(e,t.alternate,t)}finally{Qu=i,I.p=r,F.T=n}}yd=3}}function lf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,Re();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,uf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),ht(r),n=n.stateNode,Je&&typeof Je.onCommitFiberRoot==`function`)try{Je.onCommitFiberRoot(L,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=F.T,a=I.p,I.p=2,F.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{F.T=n,I.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=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);Sd&3&&df(),Df(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Of(0,!1)}}function uf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Oa(t)))}function df(){return Ed!==null&&(Ed.skipTransition(),Ed=null),sf(),cf(),lf(),ff()}function ff(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=ht(Sd),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,Qu&6)throw Error(i(331));var c=Qu;if(Qu|=4,qu(o.current),zu(o,o.current,s,n),Qu=c,Of(0,!1),Je&&typeof Je.onPostCommitFiberRoot==`function`)try{Je.onPostCommitFiberRoot(L,o)}catch{}return!0}finally{I.p=a,F.T=r,uf(e,t)}}function pf(e,t,n){t=Ii(n,t),t=Tc(e.stateNode,t,2),e=po(e,t,2),e!==null&&(lt(e,2),Df(e))}function mf(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Ii(n,e),n=Ec(2),r=po(t,n,2),r!==null&&(Dc(n,r,t,e),lt(r,2),Df(r));break}}t=t.return}}function hf(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)||(id=!0,i.add(n),e=gf.bind(null,e,t,n),t.then(e,e))}function gf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$u===e&&(Y&n)===n&&(od===4||od===3&&(Y&62914560)===Y&&300>ze()-hd?Qu&2?ld|=n:Vd(e,0):ld|=n,dd===Y&&(dd=0)),Df(e)}function _f(e,t){t===0&&(t=st()),e=xi(e,t),e!==null&&(lt(e,t),Df(e))}function vf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_f(e,n)}function yf(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),_f(e,n)}function bf(e,t){return Fe(e,t)}var xf=null,Sf=null,Cf=!1,wf=!1,Tf=!1,Ef=0;function Df(e){e!==Sf&&e.next===null&&(Sf===null?xf=Sf=e:Sf=Sf.next=e),wf=!0,Cf||(Cf=!0,Pf())}function Of(e,t){if(!Tf&&wf){Tf=!0;do for(var n=!1,r=xf;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-Xe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Nf(r,a))}else a=Y,a=rt(r,r===$u?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||it(r,a)||(n=!0,Nf(r,a))}r=r.next}while(n);Tf=!1}}function kf(){Af()}function Af(){wf=Cf=!1;var e=0;Ef!==0&&_p()&&(e=Ef);for(var t=ze(),n=null,r=xf;r!==null;){var i=r.next,a=jf(r,t);a===0?(r.next=null,n===null?xf=i:n.next=i,i===null&&(Sf=n)):(n=r,(e!==0||a&3)&&(wf=!0)),r=i}yd!==0&&yd!==5||Of(e,!1),Ef!==0&&(Ef=0)}function jf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Xe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ot(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=$u,n=Y,n=rt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(ed===2||ed===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||it(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),ht(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=Mf.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Mf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(df()&&e.callbackNode!==n)return null;var r=Y;return r=rt(e,e===$u?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),jf(e,ze()),e.callbackNode!=null&&e.callbackNode===n?Mf.bind(null,e):null)}function Nf(e,t){if(df())return null;Fd(e,t,!0)}function Pf(){Sp(function(){Qu&6?Fe(Ve,kf):Af()})}function Ff(){if(Ef===0){var e=Pa;e===0&&(e=et,et<<=1,!(et&261888)&&(et=256)),Ef=e}return Ef}function If(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function Lf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=If((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?If(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(Ef!==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 Rf=0;Rf<ui.length;Rf++){var zf=ui[Rf];di(zf.toLowerCase(),`on`+(zf[0].toUpperCase()+zf.slice(1)))}di(ni,`onAnimationEnd`),di(ri,`onAnimationIteration`),di(ii,`onAnimationStart`),di(`dblclick`,`onDoubleClick`),di(`focusin`,`onFocus`),di(`focusout`,`onBlur`),di(ai,`onTransitionRun`),di(oi,`onTransitionStart`),di(si,`onTransitionCancel`),di(ci,`onTransitionEnd`),Rt(`onMouseEnter`,[`mouseout`,`mouseover`]),Rt(`onMouseLeave`,[`mouseout`,`mouseover`]),Rt(`onPointerEnter`,[`pointerout`,`pointerover`]),Rt(`onPointerLeave`,[`pointerout`,`pointerover`]),Lt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Lt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Lt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Lt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Bf=`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(` `),Vf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Bf));function Hf(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){W(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){W(e)}i.currentTarget=null,a=c}}}}function Z(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,Ft.forEach(function(t){t!==`selectionchange`&&(Vf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(wh(t)){case 2:var i=vh;break;case 8:i=yh;break;default:i=bh}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 qf(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=kt(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=li.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 ni:case ri:case ii:l=qn;break;case ci: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(Jf(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)&&(kt(u)||u[xt]))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?kt(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:jt(c),h=l==null?u:jt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,kt(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,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?jt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Dr;else if(xr(c)){if(Or)_=H;else{_=Pr;var v=V}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Dr):_=Fr;if(_&&=_(e,r)){Sr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?jt(r):window,e){case`focusin`:(xr(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=Yf(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?vr(e,n):yr(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Lf(s,e,r,n,i)}Hf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(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(Jf(e,i,a)),i=wn(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(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(Jf(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
|
|
10
|
-
`).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(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`:B(e,`class`,r);break;case`tabIndex`:B(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:B(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){B(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`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(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&&Z(`scroll`,e);return;case`onScrollEnd`:r!=null&&Z(`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`:Z(`beforetoggle`,e),Z(`toggle`,e),Kt(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`:Kt(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,Kt(e,n,r);else return}z=!0}function rp(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&&Z(`scroll`,e);return;case`onScrollEnd`:r!=null&&Z(`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[bt]||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}z=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Kt(e,n,r)}return}z=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Z(`error`,e),Z(`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:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Z(`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:np(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Z(`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:np(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 Z(`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:np(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:np(e,t,l,r,n,null)}return;case`dialog`:Z(`beforetoggle`,e),Z(`toggle`,e),Z(`cancel`,e),Z(`close`,e);break;case`iframe`:case`object`:Z(`load`,e);break;case`video`:case`audio`:for(r=0;r<Bf.length;r++)Z(Bf[r],e);break;case`image`:Z(`error`,e),Z(`load`,e);break;case`details`:Z(`toggle`,e);break;case`embed`:case`source`:case`link`:Z(`error`,e),Z(`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:np(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(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)||np(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&&(z=!0),o=m;break;case`name`:m!==f&&(z=!0),a=m;break;case`checked`:m!==f&&(z=!0),u=m;break;case`defaultChecked`:m!==f&&(z=!0),d=m;break;case`value`:m!==f&&(z=!0),s=m;break;case`defaultValue`:m!==f&&(z=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(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)||np(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&&(z=!0),p=o;break;case`defaultValue`:o!==l&&(z=!0),c=o;break;case`multiple`:o!==l&&(z=!0),s=o;default:o!==l&&np(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:np(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&&(z=!0),p=a;break;case`defaultValue`:a!==o&&(z=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(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:np(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&&(z=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(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)&&np(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:np(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(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||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(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||np(e,t,f,p,r,m)}function sp(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&&sp(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&&sp(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[yt]=r,n[bt]=t,ip(n,e,t),Nt(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),Uh(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[Et]||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);Uh(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 Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(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`&&(Mp(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(Np.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 Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:w({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.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},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.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(Hp(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=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return _(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.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,Bp(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,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=_(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=dp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(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}Lp.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Wp,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||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=kt(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 $p(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)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Wp,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),$p(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),$p(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=_(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(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.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(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,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(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`:im(n),Ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(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[Et])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=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(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 dm(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 fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(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 hm(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 gm(e){xp(function(){xp(function(t){return e(t)})})}function Q(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&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),Ot(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ot(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=I.d;I.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=zd();return e||t}function wm(e){var t=At(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`),ip(t,`link`,e),Nt(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`);ip(o,`link`,e),t===`style`&&(o[Dt]=!0,o.onload=o.onerror=function(){Pt(o)}),Nt(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`),ip(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=Mt(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`);Nt(c),ip(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=Mt(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`),Nt(a),ip(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=Mt(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`),Nt(a),ip(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=xe.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=Mt(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=Mt(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=Mt(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[Dt]){r.loading=1;return}}else t=e.createElement(`link`),t[Dt]=!0,t.onload=t.onerror=Pt.bind(null,t),ip(t,`link`,n),Nt(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,Nt(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`),Nt(r),ip(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,Nt(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(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,Nt(a),a):(r=n,(a=ym.get(o))&&(r=w({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),ip(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[Et]||a[yt]||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,Nt(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(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:pe,_currentValue2:pe,_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=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(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=Ei(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=wi,e):wi}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&&(Pd(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&&Pd(t,e,67108864),mh(e,67108864)}}function gh(e){if(e.tag===13||e.tag===31){var t=jd();t=mt(t);var n=xi(e,t);n!==null&&Pd(n,e,t),mh(e,t)}}var _h=!0;function vh(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,bh(e,t,n,r)}finally{I.p=a,F.T=i}}function yh(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,bh(e,t,n,r)}finally{I.p=a,F.T=i}}function bh(e,t,n,r){if(_h){var i=xh(r);if(i===null)qf(e,t,r,Sh,n),Nh(e,r);else if(Fh(i,e,t,n,r))r.stopPropagation();else if(Nh(e,r),t&4&&-1<Mh.indexOf(e)){for(;i!==null;){var a=At(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Xe(o);s.entanglements[1]|=c,o&=~c}Df(a),!(Qu&6)&&(gd=ze()+500,Of(0,!1))}}break;case 31:case 13:s=xi(a,2),s!==null&&Pd(s,a,2),zd(),mh(a,2)}if(a=xh(r),a===null&&qf(e,t,r,Sh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function xh(e){return e=vn(e),Ch(e)}var Sh=null;function Ch(e){if(Sh=null,e=kt(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 Sh=e,null}function wh(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(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Th=!1,Eh=null,Dh=null,Oh=null,kh=new Map,Ah=new Map,jh=[],Mh=`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 Nh(e,t){switch(e){case`focusin`:case`focusout`:Eh=null;break;case`dragenter`:case`dragleave`:Dh=null;break;case`mouseover`:case`mouseout`:Oh=null;break;case`pointerover`:case`pointerout`:kh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ah.delete(t.pointerId)}}function Ph(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=At(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fh(e,t,n,r,i){switch(t){case`focusin`:return Eh=Ph(Eh,e,t,n,r,i),!0;case`dragenter`:return Dh=Ph(Dh,e,t,n,r,i),!0;case`mouseover`:return Oh=Ph(Oh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kh.set(a,Ph(kh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ah.set(a,Ph(Ah.get(a)||null,e,t,n,r,i)),!0}return!1}function Ih(e){var t=kt(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,_t(e.priority,function(){gh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){gh(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 Lh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xh(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=At(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){Lh(e)&&n.delete(t)}function zh(){Th=!1,Eh!==null&&Lh(Eh)&&(Eh=null),Dh!==null&&Lh(Dh)&&(Dh=null),Oh!==null&&Lh(Oh)&&(Oh=null),kh.forEach(Rh),Ah.forEach(Rh)}function Bh(e,n){e.blockedOn===n&&(e.blockedOn=null,Th||(Th=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zh)))}var Vh=null;function Hh(e){Vh!==e&&(Vh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vh===e&&(Vh=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(Ch(r||n)===null)continue;break}var a=At(n);a!==null&&(e.splice(t,3),t-=3,Zs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Uh(e){function t(t){return Bh(t,e)}Eh!==null&&Bh(Eh,e),Dh!==null&&Bh(Dh,e),Oh!==null&&Bh(Oh,e),kh.forEach(t),Ah.forEach(t);for(var n=0;n<jh.length;n++){var r=jh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jh.length&&(n=jh[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&jh.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[bt]||null;if(typeof a==`function`)o||Hh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Ch(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hh(n)}}}function Wh(){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 Gh(e){this._internalRoot=e}Kh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fh(n,jd(),e,t,null,null)},Kh.prototype.unmount=Gh.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),zd(),t[xt]=null}};function Kh(e){this._internalRoot=e}Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jh.length&&t!==0&&t<jh[n].priority;n++);jh.splice(n,0,e),n===0&&Ih(e)}};var qh=n.version;if(qh!==`19.3.1`)throw Error(i(527,qh,`19.3.1`));I.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 Jh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{L=Yh.inject(Jh),Je=Yh}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,Wh),e[xt]=t.current,Gf(e),new Gh(t)}})),Vi=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=Bi()}));function Hi(e,t){let n={...e};for(let e=0;e<t.length;e++){let r=t[e];delete n[r]}return n}var Ui=Vi(),Wi=e(Wt(),1);function Gi(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 Ki=e=>{switch(e){case`success`:return Yi;case`info`:return Zi;case`warning`:return Xi;case`error`:return Qi;default:return null}},qi=Array(12).fill(0),Ji=({visible:e,className:t})=>U.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},U.createElement(`div`,{className:`sonner-spinner`},qi.map((e,t)=>U.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Yi=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`})),Xi=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`})),Zi=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`})),Qi=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`})),$i=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`})),G=()=>{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},ea=1,ta=100,na=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:ea++,ra=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-ta;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=na(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(aa(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=na(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}},ia=(e,t)=>ra.message(e,t),aa=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,oa=Object.assign(ia,{success:ra.success,info:ra.info,warning:ra.warning,error:ra.error,custom:ra.custom,message:ra.message,promise:ra.promise,dismiss:ra.dismiss,loading:ra.loading},{getHistory:()=>ra.toasts,getToasts:()=>ra.getActiveToasts()});Gi(`[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 sa(e){return e.label!==void 0}var ca=3,la=`24px`,ua=`16px`,da=4e3,fa=356,pa=14,ma=45,ha=200;function ga(...e){return e.filter(Boolean).join(` `)}function _a(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var va=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,re]=U.useState(!1),[ie,ae]=U.useState(!1),[oe,se]=U.useState(0),[ce,le]=U.useState(0),ue=U.useRef(n.duration||y||da),de=U.useRef(null),fe=U.useRef(null),P=c===0,F=c+1<=o,I=n.type,pe=I??`default`,me=n.dismissible!==!1,he=n.className||``,ge=n.descriptionClassName||``,_e=U.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ve=U.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ye=U.useMemo(()=>n.duration||y||da,[n.duration,y]),be=U.useRef(0),xe=U.useRef(0),Se=U.useRef(0),Ce=U.useRef(null),[we,Te]=b.split(`-`),Ee=U.useMemo(()=>s.reduce((e,t,n)=>n>=_e?e:e+t.height,0),[s,_e]),De=G(),Oe=U.useMemo(()=>e.swipeDirections??_a(b),[e.swipeDirections,b]),ke=n.invert||t,Ae=I===`loading`;xe.current=U.useMemo(()=>_e*x+Ee,[_e,Ee]),U.useEffect(()=>{ue.current=ye},[ye]),U.useEffect(()=>{j(!0)},[]),U.useEffect(()=>{let e=fe.current;if(e){let t=e.getBoundingClientRect().height;return le(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=fe.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,le(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 je=U.useCallback(()=>{N(!0),se(xe.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},ha)},[n,d,a,xe]);U.useEffect(()=>{if(n.promise&&I===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||De?(()=>{if(Se.current<be.current){let e=new Date().getTime()-be.current;ue.current-=e}Se.current=new Date().getTime()})():ue.current!==1/0&&(be.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),je()},ue.current)),()=>clearTimeout(e)},[u,i,n,I,De,je]),U.useEffect(()=>{n.delete&&(je(),n.onDismiss==null||n.onDismiss.call(n,n))},[je,n.delete]);function Me(){return w?.loading?U.createElement(`div`,{className:ga(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":I===`loading`},w.loading):U.createElement(Ji,{className:ga(C?.loader,n?.classNames?.loader),visible:I===`loading`})}let Ne=n.icon||w?.[I]||Ki(I);return U.createElement(`li`,{tabIndex:0,ref:fe,className:ga(_,he,C?.toast,n?.classNames?.toast,C?.[pe],n?.classNames?.[pe]),"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":ie,"data-removed":M,"data-visible":F,"data-y-position":we,"data-x-position":Te,"data-index":c,"data-front":P,"data-swiping":ee,"data-dismissible":me,"data-type":I,"data-invert":ke,"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?oe:xe.current}px`,"--initial-height":S?`auto`:`${ce}px`,...m,...n.style},onDragEnd:()=>{te(!1),D(null),Ce.current=null},onPointerDown:e=>{e.button!==2&&!Ae&&me&&(de.current=new Date,se(xe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(te(!0),Ce.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(ne||!me)return;Ce.current=null;let e=Number(fe.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(fe.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-de.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if((E===`x`?Oe.includes(e>0?`right`:`left`):Oe.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=ma||a>.11))se(xe.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),je(),re(!0);else{var o,s;(o=fe.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=fe.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ae(!1),te(!1),D(null)}},onPointerMove:e=>{var t,n;if(!Ce.current||!me||window.getSelection()?.toString().length>0)return;let r=e.clientY-Ce.current.y,i=e.clientX-Ce.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(Oe.includes(`top`)||Oe.includes(`bottom`)){if(Oe.includes(`top`)&&r<0||Oe.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`&&(Oe.includes(`left`)||Oe.includes(`right`))){if(Oe.includes(`left`)&&i<0||Oe.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)&&ae(!0),(t=fe.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=fe.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ve&&!n.jsx&&I!==`loading`?U.createElement(`button`,{"aria-label":T,"data-disabled":Ae,"data-close-button":!0,onClick:Ae||!me?()=>{}:()=>{je(),n.onDismiss==null||n.onDismiss.call(n,n)},className:ga(C?.closeButton,n?.classNames?.closeButton)},w?.close??$i):null,(I||n.icon||n.promise)&&n.icon!==null&&(w?.[I]!==null||n.icon)?U.createElement(`div`,{"data-icon":``,className:ga(C?.icon,n?.classNames?.icon)},I===`loading`?n.icon||Me():n.promise?Me():null,I===`loading`?null:Ne):null,U.createElement(`div`,{"data-content":``,className:ga(C?.content,n?.classNames?.content)},U.createElement(`div`,{"data-title":``,className:ga(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:ga(v,ge,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),U.isValidElement(n.cancel)?n.cancel:n.cancel&&sa(n.cancel)?U.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{sa(n.cancel)&&me&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),je())},className:ga(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,U.isValidElement(n.action)?n.action:n.action&&sa(n.action)?U.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{sa(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||je())},className:ga(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function ya(){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 ba(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ua:la;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 xa=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=ca,toastOptions:g,dir:_=ya(),gap:v=pa,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),re=U.useRef(!1),ie=U.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||ra.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return U.useEffect(()=>ra.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{Wi.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,re.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`?ya():_,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":`${fa}px`,"--gap":`${v}px`,...m,...ba(l,u)},onBlur:e=>{re.current&&!e.currentTarget.contains(e.relatedTarget)&&(re.current=!1,ne.current&&=(ne.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||re.current||(re.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(va,{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:ie,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}))}),Sa=Fe.withTag(`notifications`),Ca=`notifications`,wa=Promise.resolve(),Ta=new Set;function Ea(){return window.isSecureContext?!(`Notification`in window)||!(`serviceWorker`in navigator)?`unsupported`:Notification.permission:`insecure`}function Da(){let e=localStorage.getItem(Ca);if(e===null||e===`on`)return!0;if(e===`off`)return!1;throw Error(`unknown notification setting ${e}`)}async function Oa(e){e&&Notification.permission==="default"&&await Notification.requestPermission(),localStorage.setItem(Ca,e?`on`:`off`)}async function ka(e,t){(await navigator.permissions.query({name:`notifications`})).addEventListener(`change`,t,{signal:e})}function Aa(e,t,n){if(document.hidden)for(let r of t){let t=Ma(e,r);Na(e,r,`${t===void 0?`Agent`:ir[t.provider]} ${n}`,t?.title??`Session`,P(e,r)).catch(e=>Sa.error(`could not show a notification`,e))}}function ja(e,t,n){Na(e,t,Ma(e,t)?.title??`Session`,n,`push:${P(e,t)}`).catch(e=>Sa.error(`could not show a notification`,e))}function Ma(e,t){return R().sessions.find(n=>n.machine===e&&n.id===t)}async function Na(e,t,n,r,i){if(Ea()!==`granted`||!Da()||!Ge(R(),e).notifier)return;let a=Ma(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 Pa(e,t,n){Ea()===`granted`&&Da()&&Ge(R(),n.machine).notifier&&await(await navigator.serviceWorker.ready).showNotification(e,{body:t,data:{kind:`terminal`,...n}})}function Fa(){let e=R().machines.filter(e=>ot(e.id)&&!e.notifier&&!Ta.has(e.id)).map(e=>e.id);if(e.length!==0){for(let t of e)Ta.add(t);Ia().then(t=>Promise.all(e.map(e=>L(e,`notifications.claim`,{endpoint:t})))).catch(e=>Sa.error(`could not claim notifications`,e)).finally(()=>{for(let t of e)Ta.delete(t)})}}async function Ia(){if(La()!==`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 La(){return window.isSecureContext?!(`Notification`in window)||!(`serviceWorker`in navigator)||!(`PushManager`in window)?Ra()?`install`:`unsupported`:Notification.permission===`denied`?`denied`:`supported`:`insecure`}function Ra(){return/iPhone|iPad|iPod/.test(navigator.userAgent)||navigator.userAgent.includes(`Mac`)&&navigator.maxTouchPoints>1}async function za(){return await(await navigator.serviceWorker.ready).pushManager.getSubscription()!==null}async function Ba(){return Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission===`granted`&&(await Ua(Wa),!0)}function Va(){return Ua(Ga)}function Ha(e){return Ua(async()=>{if(La()!==`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 Ya(e,t,n):await Wa()})}function Ua(e){let t=wa.then(e);return wa=t.catch(()=>void 0),t}async function Wa(){await Ga();let e=await Ka(),t=await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e.publicKey});await Promise.all(qa().map(n=>Ya(n,t,e)))}async function Ga(){let e=await(await navigator.serviceWorker.ready).pushManager.getSubscription();e&&(await Promise.all(qa().map(t=>L(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 qa(){return R().machines.filter(e=>ot(e.id)).map(e=>e.id)}function Ja(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}async function Ya(e,t,n){await L(e,`push.subscribe`,{subscription:t.toJSON(),...n,machine:e})}function Xa(){let e=k(e=>e.sessions.filter(t=>{let n=$e(e.machines,t.machine,t.id);return n?.waiting===!0||e.unseen.includes(P(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=>Sa.error(`could not update the app badge`,e))},[e])}var Za=3e5,Qa=new Map;function $a(e,t){return t.email===null?`${e}\n${t.id}`:`${t.provider}\n${t.email}\n${t.organization??``}`}function eo(e){return e.enabled&&e.error===null&&e.email!==null}function to(e,t){let n=k(n=>e===null||t===void 0?void 0:n.usage[$a(e,t)]);return(0,U.useEffect)(()=>{e!==null&&t!==void 0&&eo(t)&&ao(e,t,!1)},[e,t]),n}function no(){let e=k(e=>e.selection?.machine??null);return to(e,k(t=>{let n=t.machines.find(t=>t.id===e);return[...n?.claudeAccounts??[],...n?.codexAccounts??[]].find(e=>e.id===t.settings.accountId)}))}function ro(e,t,n){let r=so(e,t);if(r===void 0)return;let a=$a(e.id,r),o=R().usage[a];o!==void 0&&o.fetchedAt!==null&&n.fetchedAt!==null&&o.fetchedAt>n.fetchedAt||i({usage:{...R().usage,[a]:n.error===null||o===void 0?n:{...o,fetchedAt:n.fetchedAt,error:n.error}}})}function io(e,t,n){let r=so(e,t);if(r===void 0)return;let a=$a(e.id,r),o=R().usage[a]??{limits:[],fetchedAt:null,updatedAt:null,error:null};i({usage:{...R().usage,[a]:{...o,limits:[...o.limits.map(e=>n.find(t=>t.window===e.window)??e),...n.filter(e=>!o.limits.some(t=>t.window===e.window))],updatedAt:Date.now()}}})}function ao(e,t,n){let r=$a(e,t),i=Qa.get(r);if(i!==void 0)return i;let a=R().usage[r];if(!n&&a!==void 0&&a.fetchedAt!==null&&Date.now()-a.fetchedAt<Za)return Promise.resolve();let o=oo(e,t,n);return Qa.set(r,o),o}async function oo(e,t,n){try{let r=await L(e,`accounts.usage`,{id:t.id,force:n}),i=R().machines.find(t=>t.id===e);i!==void 0&&ro(i,t.id,r)}catch(e){c(e)}finally{Qa.delete($a(e,t))}}function so(e,t){return[...e.claudeAccounts,...e.codexAccounts].find(e=>e.id===t)}function co(e){let t=new Map;function n(t,n){R().machines.some(e=>e.id===t)&&e.apply(t,n)}async function r(r,a){let o=await e.save(r,a),s=t.get(r);s!==void 0&&(--s.writes,s.writes>0||(o===null?await i(r):n(r,o)))}async function i(r){let i=t.get(r)?.version;try{let a=await e.load(r),o=t.get(r);o!==void 0&&o.writes===0&&o.version===i&&n(r,a)}catch(e){c(e)}}return{update(n,i){e.set(n,i);let a=t.get(n)??{writes:0,version:0,timer:void 0};t.set(n,a),a.timer===void 0&&(a.writes+=1),a.version+=1,window.clearTimeout(a.timer),a.timer=window.setTimeout(()=>{a.timer=void 0,r(n,i)},300)},receive(e,r){(t.get(e)?.writes??0)===0&&n(e,r)}}}var lo=co({set:po,save:async(e,t)=>{try{let n=await L(e,`config.save`,t);return kt(e,{configError:null}),n}catch(t){return kt(e,{configError:Ut(t)}),null}},load:async e=>(await L(e,`config.get`,void 0)).config,apply:po}),uo=lo.update,fo=lo.receive;function po(e,t){kt(e,{config:t})}function mo(e,t){let n=Ge(R(),e).lastUsed;kt(e,{lastUsed:t}),n===null&&at(e)}var ho=50,go=null;function _o(){let e=y(),t=ee(e.map(e=>e.id));bt({machines:e.map(re),sessions:[],inactive:[],inactiveTotal:0,inactiveVersion:0,projects:e.flatMap(n),prefs:D(),paletteOpen:!1,settingsOpen:!1,settingsPage:`General`,editor:null,exporting:null,settingsAccount:null,settingsEditedMachine:null,settingsListing:!0,settingsMachine:e.at(0)?.id??null,usageOpen:!1,usage:{},unseen:[],generatingTitles:[],selection:t,loaded:t?.sessionId===null,items:[],earlier:[],before:null,partial:``,requests:[],queue:[],settings:(t===null||t.sessionId===null?null:v(ct(t)))??{provider:`claude`,accountId:null,model:null,effort:null,mode:`bypassPermissions`,plan:!1},draft:null,replacing:null,context:null,capabilities:null,errors:[],sentAt:0}),j(),ht({open:(e,t)=>{kt(e,{via:t}),yo(e)},close:e=>{let t=R().machines.find(t=>t.id===e);t!==void 0&&t.status!==`offline`&&kt(e,{status:`offline`,via:null,notifier:!1})},unpaired:e=>kt(e,{status:`unpaired`,via:null,notifier:!1}),event:Co}),addEventListener(`keydown`,Fa,{capture:!0}),addEventListener(`pointerdown`,Fa,{capture:!0}),addEventListener(`storage`,e=>{e.key===`machines`&&C()}),Qe(),yt.history.subscribe(e=>{if(e.action.type===`PUSH`||e.action.type===`REPLACE`)return;if(u()){a(!0);return}let t=ee(R().machines.map(e=>e.id));if(t===null){it();return}let n=R().selection;n===null||n.machine!==t.machine||n.projectId!==t.projectId||n.sessionId!==t.sessionId?Ie(t):(h(),a())});for(let t of e)Ee(t.id,t.addresses);Re(e),vo()}async function vo(){try{o!==null&&await Ft(o,null);let e=_();e!==null&&await Ft([e.address],e.code)}catch(e){c(e)}}async function yo(e){try{let t=await L(e,`sync`,void 0),n=R().machines.find(t=>t.id===e);if(n===void 0)return;kt(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,scratchAvailable:t.scratchAvailable},activity:t.activity,providers:t.providers,terminals:t.terminals,appIcon:t.appIcon}),bo(e,t.projects),xo(e,t.sessions),fo(e,t.config),mo(e,t.lastUsed),So(e),qe(e),R().selection?.machine===e&&Te()}catch(e){c(e)}}function bo(e,t){i({projects:[...R().projects.filter(t=>t.machine!==e),...t.map(t=>({...t,machine:e}))]}),T()}function xo(e,t){let n=R(),r=n.selection,a=n.sessions.filter(t=>t.machine===e&&t.status!==`inactive`).map(e=>e.id).sort().join(` `),o=n.sessions.find(n=>n.machine===e&&n.id===r?.sessionId&&!t.some(e=>e.id===n.id)),s=[...n.sessions.filter(t=>t.machine!==e),...t.map(t=>({...t,machine:e})),...o===void 0?[]:[{...o,status:`inactive`}]],c=t.map(e=>e.id).sort().join(` `)===a?n.inactiveVersion:n.inactiveVersion+1;c===n.inactiveVersion&&En(s,n.sessions)||i({sessions:s,inactiveVersion:c})}function So(e){let t=R().selection;t?.machine===e&&t.sessionId!==null&&St(e,t.projectId,t.sessionId,!1,null)}function Co(e,t){if(t.type===`delta`){wo(e,t.sessionId,t.text);return}To();let n=R(),r=n.machines.find(t=>t.id===e);if(r===void 0)return;let o=n.selection?.machine===e,s=o?n.selection?.sessionId??null:null;switch(t.type){case`activity`:{let a=r.activity,c=s!==null&&t.activity[s]?.running===!0,l=Object.keys(a).filter(e=>a[e].running&&t.activity[e]?.running!==!0),u=Object.keys(t.activity).filter(e=>t.activity[e].waiting&&a[e]?.waiting!==!0);Aa(e,l.filter(e=>a[e].prompted),`finished`),Aa(e,u,`needs your input`),kt(e,{activity:Object.fromEntries(Object.entries(t.activity).map(e=>[e[0],En(a[e[0]],e[1])?a[e[0]]:e[1]]))}),i({partial:c||!o?n.partial:``,unseen:[...n.unseen,...l.filter(e=>e!==s).map(t=>P(e,t)).filter(e=>!n.unseen.includes(e))]});return}case`limits`:io(r,t.accountId,t.limits);return;case`usage`:ro(r,t.accountId,t.usage);return;case`config`:fo(e,t.config);return;case`lastUsed`:mo(e,t.lastUsed);return;case`appIcon`:kt(e,{appIcon:t.appIcon});return;case`projects`:bo(e,t.projects);return;case`sessions`:xo(e,t.sessions);return;case`threads`:i({inactiveVersion:R().inactiveVersion+1});return;case`accounts`:je(e,t);return;case`providers`:kt(e,{providers:t.providers});return;case`started`:if(n.selection===null||!o||n.selection.projectId!==t.from||n.selection.sessionId!==null)return;i({selection:{machine:e,projectId:t.projectId,sessionId:t.sessionId},loaded:!0,items:[],earlier:[],before:null,partial:``,requests:[],queue:[]}),a(!0);return;case`notification`:ja(e,t.sessionId,t.message);return;case`notifier`:kt(e,{notifier:t.active});return;case`terminals`:kt(e,{terminals:t.tabs});return;case`open`:if(o){Ot(t.path);return}oa(`${r.name} opened ${t.path}`);return}if(s!==null&&t.sessionId===s)switch(t.type){case`history`:i({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:ft(Ge(n,e).lastUsed,t.provider)),context:t.context,partial:t.partial}),t.settings!==null&&ie(P(e,t.sessionId),t.settings);return;case`context`:i({context:t.context});return;case`items`:{let e=new Map(t.items.map(e=>[e.id,e]));i({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`:i({requests:[...n.requests,t.request]});return;case`requestDone`:i({requests:n.requests.filter(e=>e.id!==t.requestId)});return;case`queue`:i({queue:t.queue});return;case`settings`:{let r={...t.settings,accountId:n.settings.accountId};i({settings:r}),ie(P(e,t.sessionId),r)}}}function wo(e,t,n){let r=R().selection;r?.machine===e&&r.sessionId===t&&(go!==null&&(go.machine!==e||go.sessionId!==t)&&To(),go===null&&(go={machine:e,sessionId:t,text:``},setTimeout(To,ho)),go.text+=n)}function To(){if(go===null)return;let e=go;go=null;let t=R();t.selection?.machine===e.machine&&t.selection.sessionId===e.sessionId&&i({partial:t.partial+e.text})}var Eo=[[`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`}]],Do=[[`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`}]],Oo=[[`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`}]],ko=[[`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`}]],Ao=[[`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`}]],jo=[[`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`}]],Mo=[[`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`}]],No=[[`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`}]],Po=[[`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`}]],Fo=[[`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`}]],Io=[[`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`}]],Lo=[[`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`}]],K=[[`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`}]],Ro=[[`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`}]],zo=[[`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`}]],Bo=[[`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`}]],Vo=[[`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`}]],Ho=[[`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`}]],Uo=[[`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`}]],Wo=[[`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`}]],Go=[[`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`}]],Ko=[[`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`}]],qo=[[`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`}]],Jo=[[`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`}]],Yo=[[`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`}]],Xo=[[`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`}]],Zo=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Qo=[[`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`}]],$o=[[`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`}]],es=[[`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`}]],ts=[[`circle`,{cx:`12`,cy:`18`,r:`3`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 15V10`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M22 13C22 7.47715 17.5228 3 12 3C6.47715 3 2 7.47715 2 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],ns=[[`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`}]],rs=[[`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`}]],is=[[`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`}]],as=[[`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`}]],os=[[`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`}]],ss=[[`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`}]],cs=[[`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`}]],ls=[[`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`}]],us=[[`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`}]],ds=[[`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`}]],fs=[[`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`}]],ps=[[`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`}]],ms=[[`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`}]],hs=[[`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`}]],gs=[[`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`}]],_s=[[`path`,{d:`M16 20C16.514 20.6974 16.7226 20.9401 17.1453 20.9929C17.568 21.0457 17.8602 20.8037 18.4446 20.3197C20.6189 18.5193 22 15.8253 22 12.8147C22 7.39421 17.5228 3 12 3C6.47715 3 2 7.39421 2 12.8147C2 15.8253 3.38109 18.5193 5.55537 20.3197C6.13982 20.8037 6.43205 21.0457 6.85472 20.9929C7.2774 20.9401 7.48595 20.6974 8 20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13.5 10.5L18 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`12`,cy:`12`,r:`1.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],vs=[[`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`}]],ys=[[`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`}]],bs=[[`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`}]],xs=[[`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`}]],Ss=[[`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`}]],Cs=[[`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`}]],ws=[[`path`,{d:`M2.03909 8.24024C2.03617 8.32299 2.03341 8.40609 2.03081 8.4895C2.01057 9.13838 2 9.80695 2 10.4899M22 10.4899C22 9.8071 21.9894 9.13868 21.9692 8.48993M8 18.4118V20.76C8 21.1631 8.32679 21.4899 8.72991 21.4899C8.90419 21.4899 9.07273 21.4276 9.20503 21.3141L11.3845 19.4452C11.9325 18.9754 12.2064 18.7405 12.532 18.6165C12.8576 18.4925 13.2282 18.4855 13.9693 18.4714C14.6638 18.4583 15.342 18.4382 16 18.4118M14 2.50903C14.6838 2.52221 15.3517 2.54204 16 2.56802M20 3.09558C20.3223 3.24384 20.6057 3.44112 20.8699 3.70739C21.1106 3.9499 21.2939 4.20572 21.4348 4.48993M21.8781 14.4899C21.7797 15.7669 21.5624 16.5748 20.8699 17.2725C20.6057 17.5387 20.3223 17.736 20 17.8843M10 2.50903C9.31624 2.52221 8.64834 2.54204 8 2.56802M4 3.09558C3.67772 3.24384 3.39434 3.44112 3.13007 3.70739C2.88949 3.94978 2.70626 4.20547 2.56545 4.4895M2.12184 14.4895C2.22024 15.7668 2.43751 16.5747 3.13007 17.2725C3.39434 17.5387 3.67772 17.736 4 17.8843`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Ts=[[`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`}]],Es=[[`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`}]],Ds=[[`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`}]],Os=[[`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`}]],ks=[[`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`}]],As=[[`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`}]],js=[[`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`}]],Ms=[[`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`}]],Ns=[[`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`}]],Ps=[[`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`}]],Fs=[[`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`}]],Is=[[`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`}]],Ls=[[`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`}]],Rs=[[`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`}]],zs=[[`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`}]],Bs=[[`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`}]],Vs=[[`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`}]],Hs=[[`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`}]],Us=[[`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`}]],Ws=[[`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`}]],Gs=[[`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`}]],Ks=[[`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`}]],qs=[[`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`}]],Js=[[`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`}]],Ys=[[`path`,{d:`M4 12C4 8.72077 4 7.08116 4.81382 5.91891C5.1149 5.48891 5.48891 5.1149 5.91891 4.81382C7.08116 4 8.72077 4 12 4C15.2792 4 16.9188 4 18.0811 4.81382C18.5111 5.1149 18.8851 5.48891 19.1862 5.91891C20 7.08116 20 8.72077 20 12C20 15.2792 20 16.9188 19.1862 18.0811C18.8851 18.5111 18.5111 18.8851 18.0811 19.1862C16.9188 20 15.2792 20 12 20C8.72077 20 7.08116 20 5.91891 19.1862C5.48891 18.8851 5.1149 18.5111 4.81382 18.0811C4 16.9188 4 15.2792 4 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}]],Xs=[[`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`}]],Zs=[[`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`}]],Qs=[[`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`}]],$s=[[`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`}]],ec=[[`path`,{d:`M18.0117 7.48959L19.5013 6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.51903 19C7.07817 20.8354 9.40308 22 12 22C16.6944 22 20.5 18.1944 20.5 13.5C20.5 8.80558 16.6944 5 12 5C7.30558 5 3.5 8.80558 3.5 13.5C3.5 14.0118 3.54524 14.5131 3.63193 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14.5 2H9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M12 13.5L15.5 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M8.5 18.2213C8.5 18.2213 5.21917 17.7234 4.72128 18.2213C4.22339 18.7192 4.72129 22 4.72129 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],tc=[[`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`}]],nc=[[`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`}]],rc=[[`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`}]],ic=[[`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`}]];function ac(e,t){return k(n=>t===`no-project`?`Chat`:He(n,e,t)?.name??``)}async function oc(e,t){return await L(e,`projects.add`,{path:t})}async function sc(e,t,n){await L(e,`projects.update`,{id:t,patch:n})}async function cc(e,t){await L(e,`projects.remove`,{id:t})}async function lc(e,t){await L(e,`projects.reorder`,{ids:t})}var uc=[`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 dc(e){let t=k(t=>He(t,e.machine,e.projectId));return e.projectId===`no-project`||t?.scratch===!0?(0,W.jsx)(`span`,{"aria-hidden":`true`,className:z(`text-muted-foreground inline-flex size-4 shrink-0 items-center justify-center`,e.className),children:(0,W.jsx)(V,{icon:ws,className:`size-full`})}):(0,W.jsx)(fc,{name:t?.name??``,logo:t?.logo??null,className:e.className})}function fc(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))%uc.length;return(0,W.jsx)(`span`,{"aria-hidden":`true`,className:z(`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:z(`size-full overflow-hidden rounded-[25%] font-mono select-none`,uc[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 pc(e){switch(e.provider){case`claude`:return(0,W.jsx)(hc,{className:e.className});case`codex`:return(0,W.jsx)(V,{icon:Go,className:e.className});case`opencode`:return(0,W.jsx)(mc,{className:e.className})}}function mc(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 240 300`,"aria-hidden":`true`,className:z(`fill-current`,e.className),children:[(0,W.jsx)(`path`,{d:`M180 240H60V120H180V240Z`,opacity:`0.4`}),(0,W.jsx)(`path`,{d:`M180 60H60V240H180V60ZM240 300H0V0H240V300Z`})]})}function hc(e){return(0,W.jsx)(`svg`,{viewBox:`0 0 256 257`,preserveAspectRatio:`xMidYMid`,"aria-hidden":`true`,className:z(`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 gc=Object.defineProperty,_c=U.forwardRef(((e,t)=>gc(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,W.jsx)(qt.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),vc=Object.defineProperty,yc=(e,t)=>vc(e,`name`,{value:t,configurable:!0}),bc,xc=`HoverCard`,[Sc,Cc]=Xt(xc,[Hr]),wc=Hr(),[Tc,Ec]=Sc(xc),Dc=yc(e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=wc(t),l=U.useRef(0),u=U.useRef(0),d=U.useRef(!1),f=U.useRef(!1),[p,m]=Kt({prop:r,defaultProp:i??!1,onChange:a,caller:xc}),h=U.useCallback(()=>{clearTimeout(u.current),l.current=window.setTimeout(()=>m(!0),o)},[o,m]),g=U.useCallback(()=>{clearTimeout(l.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),_=U.useCallback(()=>m(!1),[m]);return U.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(u.current)},[]),(0,W.jsx)(Tc,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:_,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,W.jsx)(Gr,{...c,children:n})})},`HoverCard`),Oc=`HoverCardTrigger`,kc=U.forwardRef(yc(function(e,t){let{__scopeHoverCard:n,...r}=e,i=Ec(Oc,n),a=wc(n);return(0,W.jsx)(qr,{asChild:!0,...a,children:(0,W.jsx)(qt.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:B(e.onPointerEnter,Lc(i.onOpen)),onPointerLeave:B(e.onPointerLeave,Lc(i.onClose)),onFocus:B(e.onFocus,i.onOpen),onBlur:B(e.onBlur,i.onClose),onTouchStart:B(e.onTouchStart,e=>e.preventDefault())})})},`HoverCardTrigger`)),Ac=`HoverCardPortal`,[jc,Mc]=Sc(Ac,{forceMount:void 0}),Nc=yc(e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=Ec(Ac,t);return(0,W.jsx)(jc,{scope:t,forceMount:n,children:(0,W.jsx)(tn,{present:n||a.open,children:(0,W.jsx)(en,{asChild:!0,container:i,children:r})})})},`HoverCardPortal`),Pc=`HoverCardContent`,Fc=U.forwardRef(yc(function(e,t){let n=Mc(Pc,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=Ec(Pc,e.__scopeHoverCard);return(0,W.jsx)(tn,{present:r||a.open,children:(0,W.jsx)(Ic,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:B(e.onPointerEnter,Lc(a.onOpen)),onPointerLeave:B(e.onPointerLeave,Lc(a.onClose)),ref:t})})},`HoverCardContent`)),Ic=U.forwardRef(yc(function(e,t){let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=Ec(Pc,n),l=wc(n),u=U.useRef(null),[d,f]=U.useState(null),p=Pr(t,u,f);Jt(d);let[m,h]=U.useState(!1);return U.useEffect(()=>{if(m){let e=document.body;return bc=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=bc,e.style.webkitUserSelect=bc}}},[m]),U.useEffect(()=>{if(u.current){let e=yc(()=>{h(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(c.hasSelectionRef.current=!0)})},`handlePointerUp`);return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),U.useEffect(()=>{u.current&&Rc(u.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,W.jsx)(Qt,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:B(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:(0,W.jsx)(Ur,{...l,...s,onPointerDown:B(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...s.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})},`HoverCardContentImpl`));function Lc(e){return t=>t.pointerType===`touch`?void 0:e()}yc(Lc,`excludeTouch`);function Rc(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:yc(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}yc(Rc,`getTabbableNodes`);var zc=Object.defineProperty,Bc=(e,t)=>zc(e,`name`,{value:t,configurable:!0});function Vc(e,[t,n]){return Math.min(n,Math.max(t,e))}Bc(Vc,`clamp`);var Hc=Object.defineProperty,Uc=(e,t)=>Hc(e,`name`,{value:t,configurable:!0}),Wc={ItemAligned:`item-aligned`,Popper:`popper`},Gc={LTR:`ltr`,RTL:`rtl`},Kc=[` `,`Enter`,`ArrowUp`,`ArrowDown`],qc=[` `,`Enter`],Jc=`Select`,[Yc,Xc,Zc]=fr(Jc),[Qc,$c]=Xt(Jc,[Zc,Hr]),el=Hr(),[tl,nl]=Qc(Jc),[rl,il]=Qc(Jc);function al(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=el(t),[_,v]=U.useState(null),[y,b]=U.useState(null),[x,S]=U.useState(!1),C=Cr(l),[w,T]=Kt({prop:r,defaultProp:i??!1,onChange:a,caller:Jc}),[E,D]=Kt({prop:o,defaultProp:s,onChange:c,caller:Jc}),O=U.useRef(null),k=U.useRef(!1),[A,j]=U.useState(null),M=Uc(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=Uc(()=>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),re=Yt(),ie=Array.from(te).map(e=>e.props.value).join(`;`),ae=U.useCallback(e=>{ne(t=>new Set(t).add(e))},[]),oe=U.useCallback(e=>{ne(t=>{let n=new Set(t);return n.delete(e),n})},[]),se={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:re,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:ie,isFormControl:ee};return(0,W.jsx)(Gr,{...g,children:(0,W.jsx)(tl,{scope:t,...se,children:(0,W.jsx)(Yc.Provider,{scope:t,children:(0,W.jsx)(rl,{scope:t,onNativeOptionAdd:ae,onNativeOptionRemove:oe,children:Kl(h)?h(se):n})})})})}Uc(al,`SelectProvider`);var ol=Uc(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,W.jsx)(al,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,W.jsxs)(W.Fragment,{children:[n,e?(0,W.jsx)(Gl,{__scopeSelect:t}):null]})})},`Select`),sl=`SelectTrigger`,cl=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=el(n),o=nl(sl,n),s=o.disabled||r,c=Pr(t,o.onTriggerChange),l=Xc(n),u=U.useRef(`touch`),[d,f,p]=Jl(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=Uc(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)(qr,{asChild:!0,...a,children:(0,W.jsx)(qt.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":ql(o.value)?``:void 0,...i,ref:c,onClick:B(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:B(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:B(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===` `||Kc.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),ll=`SelectValue`,ul=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=nl(ll,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Pr(t,c.onValueNodeChange);$t(()=>{l(u)},[l,u]);let f=ql(c.value);return(0,W.jsx)(qt.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`)),dl=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,W.jsx)(qt.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[fl,pl]=Qc(`SelectPortal`,{forceMount:void 0}),ml=Uc(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,W.jsx)(fl,{scope:e.__scopeSelect,forceMount:n,children:(0,W.jsx)(en,{asChild:!0,...r})})},`SelectPortal`),hl=`SelectContent`,gl=U.forwardRef(Uc(function(e,t){let n=pl(hl,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=nl(hl,e.__scopeSelect),[o,s]=U.useState();return $t(()=>{s(new DocumentFragment)},[]),(0,W.jsx)(tn,{present:r||a.open,children:({present:e})=>e?(0,W.jsx)(Sl,{...i,ref:t}):(0,W.jsx)(_l,{...i,fragment:o})})},`SelectContent`)),_l=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Wi.createPortal((0,W.jsx)(yl,{scope:n,children:(0,W.jsx)(Yc.Slot,{scope:n,children:(0,W.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),vl=10,[yl,bl]=Qc(hl),xl=Fr(`SelectContent.RemoveScroll`),Sl=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n}=e,{position:r=Wc.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=nl(hl,n),[y,b]=U.useState(null),[x,S]=U.useState(null),C=Pr(t,b),[w,T]=U.useState(null),[E,D]=U.useState(null),O=Xc(n),[k,A]=U.useState(!1),j=U.useRef(!1),M=U.useRef(!1),N=U.useRef(!1);U.useEffect(()=>{if(y)return Zr(y)},[y]),li();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:re}=v;U.useEffect(()=>{if(y){let e={x:0,y:0},t=Uc(t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},`handlePointerMove`),n=Uc(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ne(!1),document.removeEventListener(`pointermove`,t),re.current=null},`handlePointerUp`);return re.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,re]),U.useEffect(()=>{let e=Uc(()=>ne(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[ie,ae]=Jl(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())}),oe=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]),se=U.useCallback(()=>y?.focus(),[y]),ce=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]),le=r===Wc.Popper?wl:Cl,ue=le===wl?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,W.jsx)(yl,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:oe,selectedItem:w,onItemLeave:se,itemTextRefCallback:ce,focusSelectedItem:te,selectedItemText:E,position:r,isPositioned:k,searchRef:ie,children:(0,W.jsx)(Xr,{as:xl,allowPinchZoom:!0,children:(0,W.jsx)(Zt,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:B(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,W.jsx)(Qt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,W.jsx)(le,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ue,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:B(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ae(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`)),Cl=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=nl(hl,n),o=bl(hl,n),[s,c]=U.useState(null),[l,u]=U.useState(null),d=Pr(t,u),f=Xc(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!==Gc.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-vl,d=Vc(a,[vl,Math.max(vl,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-vl,d=Vc(a,[vl,Math.max(vl,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-vl*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-vl,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=`${vl}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]);$t(()=>y(),[y]);let[b,x]=U.useState();$t(()=>{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)(Tl,{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)(qt.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),wl=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=vl,...a}=e,o=el(n);return(0,W.jsx)(Ur,{...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`)),[Tl,El]=Qc(hl,{}),Dl=`SelectViewport`,Ol=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=bl(Dl,n),o=El(Dl,n),s=Pr(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)(qt.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:B(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-vl*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`)),[kl,Al]=Qc(`SelectGroup`),jl=`SelectItem`,[Ml,Nl]=Qc(jl),Pl=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=nl(jl,n),c=bl(jl,n),l=s.value===r,[u,d]=U.useState(a??``),[f,p]=U.useState(!1),m=Gt(e=>c.itemRefCallback?.(e,r,i)),h=Pr(t,m),g=Yt(),_=U.useRef(`touch`);function v(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return Uc(v,`handleSelect`),(0,W.jsx)(Ml,{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)(qt.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:B(o.onFocus,()=>p(!0)),onBlur:B(o.onBlur,()=>p(!1)),onClick:B(o.onClick,e=>{i||_.current!==`mouse`&&v(e)}),onPointerUp:B(o.onPointerUp,e=>{i||_.current===`mouse`&&v(e)}),onPointerDown:B(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:B(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:B(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(qc.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Fl=`SelectItemText`,Il=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=nl(Fl,n),s=bl(Fl,n),c=Nl(Fl,n),l=il(Fl,n),[u,d]=U.useState(null),f=Gt(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Pr(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 $t(()=>(g(h),()=>_(h)),[g,_,h]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(qt.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!ql(o.value)?Wi.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Ll=`SelectItemIndicator`,Rl=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,...r}=e;return Nl(Ll,n).isSelected?(0,W.jsx)(qt.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),zl=`SelectScrollUpButton`,Bl=U.forwardRef(Uc(function(e,t){let n=bl(zl,e.__scopeSelect),r=El(zl,e.__scopeSelect),[i,a]=U.useState(!1),o=Pr(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};Uc(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,W.jsx)(Ul,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Vl=`SelectScrollDownButton`,Hl=U.forwardRef(Uc(function(e,t){let n=bl(Vl,e.__scopeSelect),r=El(Vl,e.__scopeSelect),[i,a]=U.useState(!1),o=Pr(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};Uc(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,W.jsx)(Ul,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Ul=U.forwardRef(Uc(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=bl(`SelectScrollButton`,n),o=U.useRef(null),s=Xc(n),c=U.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return U.useEffect(()=>()=>c(),[c]),$t(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,W.jsx)(qt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:B(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:B(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:B(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Wl=`SelectBubbleInput`,Gl=U.forwardRef(Uc(function({__scopeSelect:e,...t},n){let r=nl(Wl,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=Pr(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)(qt.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:{...Jr,...t.style},ref:h,defaultValue:g,children:[ql(i)&&!b?(0,W.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function Kl(e){return typeof e==`function`}Uc(Kl,`isFunction`);function ql(e){return e===``||e===void 0}Uc(ql,`shouldShowPlaceholder`);function Jl(e){let t=Gt(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))}Uc(a,`updateSearch`),a(i)},[t]),a=U.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return U.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Uc(Jl,`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=Xl(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}Uc(Yl,`findNextItem`);function Xl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Uc(Xl,`wrapArray`);var Zl=Object.defineProperty,q=(e,t)=>Zl(e,`name`,{value:t,configurable:!0}),Ql={Vertical:`vertical`,Horizontal:`horizontal`},$l={LTR:`ltr`,RTL:`rtl`},eu=[`PageUp`,`PageDown`],tu=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],nu={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},ru=`Slider`,[iu,au,ou]=fr(ru),[su,cu]=Xt(ru,[ou]),[lu,uu]=su(ru),du=U.forwardRef(q(function(e,t){let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=Ql.Horizontal,disabled:s=!1,minStepsBetweenThumbs:c=0,preserveThumbOrder:l=!1,defaultValue:u=[r],value:d,onValueChange:f=q(()=>{},`onValueChange`),onValueCommit:p=q(()=>{},`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===Ql.Horizontal?mu:hu,[C,w]=U.useState(null),T=Pr(t,w),[E=[],D]=Kt({prop:d,defaultProp:u,onChange:q(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=q(()=>D(k.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[C,h,D]);function A(e){N(e,Nu(E,e))}q(A,`handleSlideStart`);function j(e){N(e,v.current)}q(j,`handleSlideMove`);function M(){String(E)!==String(O.current)&&p(E)}q(M,`handleSlideEnd`);function N(e,t,{commit:n}={commit:!1}){let o=Ru(a),s=Vc(zu(Math.round((e-r)/a)*a+r,o),[r,i]),u=c*a;function d(e){let n=l?Vc(s,[e[t-1]===void 0?r:e[t-1]+u,e[t+1]===void 0?i:e[t+1]-u]):s,a=Au(e,n,t);return Iu(a,u)?{nextValues:a,changedIndex:l?t:a.indexOf(n),hasChanged:String(a)!==String(e)}:null}q(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 q(N,`updateValues`),(0,W.jsx)(lu,{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)(iu.Provider,{scope:e.__scopeSlider,children:(0,W.jsx)(iu.Slot,{scope:e.__scopeSlider,children:(0,W.jsx)(S,{"aria-disabled":s,"data-disabled":s?``:void 0,...g,ref:T,onPointerDown:B(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=eu.includes(e.key)||e.shiftKey&&tu.includes(e.key)?10:1,i=v.current,o=E[i];N(Bu(o,{min:r,step:a,direction:t,multiplier:n}),i,{commit:!0})}}})})})})},`Slider`)),[fu,pu]=su(ru,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),mu=U.forwardRef(q(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=Pr(t,f),m=U.useRef(void 0),h=Cr(i),g=h===$l.LTR,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=Lu([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return q(v,`getValueFromPointer`),(0,W.jsx)(fu,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,W.jsx)(gu,{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=nu[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})},`SliderHorizontal`)),hu=U.forwardRef(q(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=Pr(t,u),f=U.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=Lu([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return q(m,`getValueFromPointer`),(0,W.jsx)(fu,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,W.jsx)(gu,{"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=nu[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})},`SliderVertical`)),gu=U.forwardRef(q(function(e,t){let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=uu(ru,n);return(0,W.jsx)(qt.span,{...l,ref:t,onKeyDown:B(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):eu.concat(tu).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:B(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:B(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:B(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})},`SliderImpl`)),_u=`SliderTrack`,vu=U.forwardRef(q(function(e,t){let{__scopeSlider:n,...r}=e,i=uu(_u,n);return(0,W.jsx)(qt.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})},`SliderTrack`)),yu=`SliderRange`,bu=U.forwardRef(q(function(e,t){let{__scopeSlider:n,...r}=e,i=uu(yu,n),a=pu(yu,n),o=U.useRef(null),s=Pr(t,o),c=i.values.length,l=i.values.map(e=>ju(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,W.jsx)(qt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})},`SliderRange`)),[xu,Su]=su(`SliderThumb`),Cu=`SliderThumbProvider`;function wu(e){let{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:i}=e,a=uu(Cu,t),o=au(t),[s,c]=U.useState(null),l=U.useMemo(()=>s?o().findIndex(e=>e.ref.current===s):-1,[o,s]),u=Kr(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:ju(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)(xu,{scope:t,...h,children:Vu(i)?i(h):r})}q(wu,`SliderThumbProvider`);var Tu=`SliderThumbTrigger`,Eu=U.forwardRef(q(function(e,t){let{__scopeSlider:n,...r}=e,i=uu(Tu,n),a=pu(Tu,n),{index:o,value:s,percent:c,size:l,onThumbChange:u}=Su(Tu,n),d=Pr(t,u),f=Mu(o,i.values.length),p=l?.[a.size],m=p?Pu(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)(iu.ItemSlot,{scope:n,children:(0,W.jsx)(qt.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:B(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})})})},`SliderThumbTrigger`)),Du=U.forwardRef(q(function(e,t){let{__scopeSlider:n,name:r,...i}=e;return(0,W.jsx)(wu,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:e,isFormControl:r})=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Eu,{...i,ref:t,__scopeSlider:n}),r?(0,W.jsx)(ku,{__scopeSlider:n},e):null]})})},`SliderThumb`)),Ou=`SliderBubbleInput`,ku=U.forwardRef(q(function({__scopeSlider:e,onInput:t,...n},r){let{index:i,value:a,name:o,form:s}=Su(Ou,e),{userRequestedValues:c}=uu(Ou,e),l=U.useRef(null),u=Pr(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)(qt.input,{style:{display:`none`},name:o,form:s,...n,ref:u,defaultValue:a,onInput:B(t,e=>{d.current&&e.stopPropagation()})})},`SliderBubbleInput`));function Au(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}q(Au,`getNextSortedValues`);function ju(e,t,n){return Vc(100/(n-t)*(e-t),[0,100])}q(ju,`convertValueToPercentage`);function Mu(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}q(Mu,`getLabel`);function Nu(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)}q(Nu,`getClosestValueIndex`);function Pu(e,t,n){let r=e/2;return(r-Lu([0,50],[0,r])(t)*n)*n}q(Pu,`getThumbInBoundsOffset`);function Fu(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}q(Fu,`getStepsBetweenValues`);function Iu(e,t){if(t>0){let n=Fu(e);return Math.min(...n)>=t}return!0}q(Iu,`hasMinStepsBetweenValues`);function Lu(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])}}q(Lu,`linearScale`);function Ru(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}q(Ru,`getDecimalCount`);function zu(e,t){let n=10**t;return Math.round(e*n)/n}q(zu,`roundValue`);function Bu(e,{min:t,step:n,direction:r,multiplier:i}){let a=Ru(n),o=(e-t)/n,s=Math.round(o),c=zu(s*n+t,a)===zu(e,a),l;return l=c?s+i*r:r>0?Math.ceil(o):Math.floor(o),zu(l*n+t,a)}q(Bu,`getNextStepValue`);function Vu(e){return typeof e==`function`}q(Vu,`isFunction`);var Hu=Object.defineProperty,Uu=(e,t)=>Hu(e,`name`,{value:t,configurable:!0}),Wu=`Switch`,[Gu,Ku]=Xt(Wu),[qu,Ju]=Gu(Wu);function Yu(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]=Kt({prop:n,defaultProp:i??!1,onChange:c,caller:Wu}),[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)(qu,{scope:t,...b,children:td(d)?d(b):r})}Uu(Yu,`SwitchProvider`);var Xu=`SwitchTrigger`,Zu=U.forwardRef(Uu(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}=Ju(Xu,e),h=Pr(r,u),g=U.useRef(c);return U.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=Uu(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,W.jsx)(qt.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":nd(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:B(t,e=>{let t=e.isPropagationStopped();f({requestedChecked:!c,hasConsumerStoppedPropagation:t}),d(e=>!e),m&&p&&(t||e.stopPropagation())})})},`SwitchTrigger`)),Qu=U.forwardRef(Uu(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)(Yu,{__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)(Zu,{...d,ref:t,__scopeSwitch:n}),e&&(0,W.jsx)(ed,{__scopeSwitch:n})]})})},`Switch`)),$u=`SwitchThumb`,J=U.forwardRef(Uu(function(e,t){let{__scopeSwitch:n,...r}=e,i=Ju($u,n);return(0,W.jsx)(qt.span,{"data-state":nd(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),Y=`SwitchBubbleInput`,ed=U.forwardRef(Uu(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}=Ju(Y,e),h=Pr(r,m),g=Kr(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)(qt.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:B(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function td(e){return typeof e==`function`}Uu(td,`isFunction`);function nd(e){return e?`checked`:`unchecked`}Uu(nd,`getState`);function rd(e){return(0,W.jsx)(xa,{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 id={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ad=U.createContext&&U.createContext(id),od=[`attr`,`size`,`title`];function sd(e,t){if(e==null)return{};var n,r,i=cd(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 cd(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 ld(){return ld=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},ld.apply(null,arguments)}function ud(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 dd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ud(Object(n),!0).forEach(function(t){fd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ud(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fd(e,t,n){return(t=pd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pd(e){var t=md(e,`string`);return typeof t==`symbol`?t:t+``}function md(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 hd(e){return e&&e.map((e,t)=>U.createElement(e.tag,dd({key:t},e.attr),hd(e.child)))}function X(e){return t=>U.createElement(gd,ld({attr:dd({},e.attr)},t),hd(e.child))}function gd(e){var t=t=>{var n=e.attr,r=e.size,i=e.title,a=sd(e,od),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),U.createElement(`svg`,ld({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:dd(dd({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 ad===void 0?t(id):U.createElement(ad.Consumer,null,e=>t(e))}function _d(e){return X({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 vd(e){return X({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 yd(e){return X({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 bd(e){return X({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 xd(e){return X({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 Sd(e){return X({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 Cd(e){return X({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 wd(e){return X({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 Td(e){return X({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 Ed(e){return X({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 Dd(e){return X({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 Od(e){return X({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 kd(e){return X({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 Ad(e){return X({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 jd(e){return X({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 Md(e){return X({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 Nd(e){return X({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 Pd(e){return X({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 Fd(e){return X({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 Id(e){return X({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 X({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 Rd(e){return X({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 zd(e){return X({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 Bd(e){return X({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 Vd(e){return X({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 Hd(e){return X({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 Ud(e){return X({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 Wd(e){return X({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 Gd(e){return X({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 Kd(e){return X({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 qd(e){return X({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 Jd(e){return X({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 Yd(e){return X({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 Xd(e){return X({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 Zd(e){return X({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 Qd(e){return X({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 $d(e){return X({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 ef(e){return X({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 tf(e){return X({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 nf(e){return X({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 rf(e){return X({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 af(e){return X({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 of(e){return X({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 sf(e){return X({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 cf(e){return X({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 lf(e){return X({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 uf(e){return X({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 df(e){return X({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 ff(e){return X({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 pf(e){return X({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 mf(e){return X({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 hf(e){return X({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 gf(e){return X({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 _f(e){return X({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 vf(e){return X({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 yf(e){return X({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 bf(e){return X({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 xf(e){return X({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 Sf={computer:{icon:(0,W.jsx)(V,{icon:es}),group:`Devices`},laptop:{icon:(0,W.jsx)(V,{icon:gs}),group:`Devices`},server:{icon:(0,W.jsx)(V,{icon:zs}),group:`Devices`},cloud:{icon:(0,W.jsx)(V,{icon:Qo}),group:`Devices`},home:{icon:(0,W.jsx)(V,{icon:ps}),group:`Devices`},office:{icon:(0,W.jsx)(V,{icon:Ho}),group:`Devices`},drive:{icon:(0,W.jsx)(V,{icon:ds}),group:`Devices`},raspberrypi:{icon:(0,W.jsx)(Pd,{size:24}),group:`Devices`},macos:{icon:(0,W.jsx)(V,{icon:Mo,viewBox:`1.5 1.5 21 21`}),group:`Apple`},finder:{icon:(0,W.jsx)(Dd,{size:24}),group:`Apple`},apple:{icon:(0,W.jsx)(V,{icon:No}),group:`Apple`},applelogo:{icon:(0,W.jsx)(Sd,{size:24,viewBox:`-52 12 489 489`}),group:`Apple`},appletfi:{icon:(0,W.jsx)(df,{size:24,viewBox:`-0.77 -0.77 18.54 18.54`}),group:`Apple`},appstore:{icon:(0,W.jsx)(Ed,{size:24}),group:`Apple`},appstoreoutline:{icon:(0,W.jsx)(V,{icon:jo}),group:`Apple`},windows:{icon:(0,W.jsx)(V,{icon:Ts}),group:`Windows`},windowslogo:{icon:(0,W.jsx)(vd,{size:24}),group:`Windows`},microsoft:{icon:(0,W.jsx)(bd,{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)(mf,{size:24}),group:`Windows`},cmd:{icon:(0,W.jsx)(_f,{size:24}),group:`Windows`},linux:{icon:(0,W.jsx)(hf,{size:24}),group:`Linux & BSD`},ubuntu:{icon:(0,W.jsx)(Ad,{size:24}),group:`Linux & BSD`},ubuntufa:{icon:(0,W.jsx)(yd,{size:24}),group:`Linux & BSD`},ubuntufa6:{icon:(0,W.jsx)(wd,{size:24}),group:`Linux & BSD`},linuxmint:{icon:(0,W.jsx)(Ud,{size:24}),group:`Linux & BSD`},archlinux:{icon:(0,W.jsx)(cf,{size:24}),group:`Linux & BSD`},garuda:{icon:(0,W.jsx)(Zd,{size:24}),group:`Linux & BSD`},kali:{icon:(0,W.jsx)(Gd,{size:24}),group:`Linux & BSD`},debian:{icon:(0,W.jsx)(rf,{size:24}),group:`Linux & BSD`},fedora:{icon:(0,W.jsx)($d,{size:24}),group:`Linux & BSD`},centos:{icon:(0,W.jsx)(af,{size:24}),group:`Linux & BSD`},redhat:{icon:(0,W.jsx)(Md,{size:24}),group:`Linux & BSD`},opensuse:{icon:(0,W.jsx)(Rd,{size:24}),group:`Linux & BSD`},manjaro:{icon:(0,W.jsx)(Hd,{size:24}),group:`Linux & BSD`},nixos:{icon:(0,W.jsx)(Bd,{size:24}),group:`Linux & BSD`},popos:{icon:(0,W.jsx)(Ld,{size:24}),group:`Linux & BSD`},alpine:{icon:(0,W.jsx)(lf,{size:24}),group:`Linux & BSD`},gentoo:{icon:(0,W.jsx)(Xd,{size:24}),group:`Linux & BSD`},freebsd:{icon:(0,W.jsx)(Qd,{size:24}),group:`Linux & BSD`},docker:{icon:(0,W.jsx)(ef,{size:24}),group:`Hosting`},proxmox:{icon:(0,W.jsx)(Id,{size:24}),group:`Hosting`},digitalocean:{icon:(0,W.jsx)(tf,{size:24}),group:`Hosting`},hetzner:{icon:(0,W.jsx)(Yd,{size:24}),group:`Hosting`},azure:{icon:(0,W.jsx)(xf,{size:24}),group:`Hosting`},asus:{icon:(0,W.jsx)(of,{size:24}),group:`Brands`},dell:{icon:(0,W.jsx)(nf,{size:24}),group:`Brands`},hp:{icon:(0,W.jsx)(Jd,{size:24}),group:`Brands`},hpi:{icon:(0,W.jsx)(Td,{size:24}),group:`Brands`},lenovo:{icon:(0,W.jsx)(Wd,{size:24}),group:`Brands`},acer:{icon:(0,W.jsx)(uf,{size:24}),group:`Brands`},msi:{icon:(0,W.jsx)(Vd,{size:24}),group:`Brands`},razer:{icon:(0,W.jsx)(Nd,{size:24}),group:`Brands`},samsung:{icon:(0,W.jsx)(jd,{size:24}),group:`Brands`},huawei:{icon:(0,W.jsx)(qd,{size:24}),group:`Brands`},xiaomi:{icon:(0,W.jsx)(kd,{size:24}),group:`Brands`},intel:{icon:(0,W.jsx)(Kd,{size:24}),group:`Brands`},amd:{icon:(0,W.jsx)(_d,{size:24}),group:`Brands`},nvidia:{icon:(0,W.jsx)(zd,{size:24}),group:`Brands`},arm:{icon:(0,W.jsx)(sf,{size:24}),group:`Brands`},qualcomm:{icon:(0,W.jsx)(Fd,{size:24}),group:`Brands`},android:{icon:(0,W.jsx)(V,{icon:Ao}),group:`Other`},chrome:{icon:(0,W.jsx)(xd,{size:24}),group:`Other`},vscode:{icon:(0,W.jsx)(ff,{size:24}),group:`Other`},github:{icon:(0,W.jsx)(yf,{size:24}),group:`Other`},githubalt:{icon:(0,W.jsx)(bf,{size:24}),group:`Other`},terminal:{icon:(0,W.jsx)(pf,{size:24}),group:`Other`},bash:{icon:(0,W.jsx)(vf,{size:24}),group:`Other`},gitbash:{icon:(0,W.jsx)(gf,{size:24}),group:`Other`},zsh:{icon:(0,W.jsx)(Od,{size:24}),group:`Other`},fish:{icon:(0,W.jsx)(Cd,{size:24}),group:`Other`}},Cf=[`macos`,`windows`,`linux`];function wf(e){if(e.icon===null)return(0,U.cloneElement)(Sf.computer.icon,{className:e.className});let t=Sf[e.icon];return t===void 0?(0,W.jsx)(V,{icon:fs,className:e.className}):(0,U.cloneElement)(t.icon,{className:e.className})}async function Tf(e,t){if(t.size>52428800)throw Error(`File is larger than 50 MB`);return L(e,`files.upload`,{name:t.name,data:await Ef(t)})}function Ef(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 Df(e){return(0,W.jsx)(`div`,{className:z(`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 Of(e){let t=Le(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)(fn,{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:()=>F(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:_t,className:`size-3`})})]},t.number))})}function kf(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 Af(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 jf(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 Mf(e){return(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.key.toLowerCase()===`v`}function Nf(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:z(`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(`/`)?qs:as,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 Pf(e){r(e),oa(`Prompt stashed`,{description:`${Ht}+S in an empty composer brings it back`})}function Ff(e,t){let n=_e(e,t,kf(R().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 If(e){if(dt(he(e))){Pf(e);return}let t=E().at(0);t!==void 0&&Ff(e,t.id)}function Lf(e){return(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&e.key.toLowerCase()===`s`}var Rf={claude:[{value:`default`,label:`Ask before edits`,icon:Hs},{value:`acceptEdits`,label:`Accept edits`,icon:os},{value:`plan`,label:`Plan mode`,icon:xs},{value:`auto`,label:`Auto mode`,icon:Hn},{value:`bypassPermissions`,label:`Bypass permissions`,icon:Us}],codex:[{value:`read-only`,label:`Read only`,icon:Hs},{value:`auto`,label:`Auto`,icon:os},{value:`full-access`,label:`Full access`,icon:Us}]};function zf(e,t){return e===`opencode`?(t?.agents??[]).map(e=>({value:e.id,label:e.name,icon:e.id===`plan`?xs:os})):Rf[e]}function Bf(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsxs)(hn,{open:t,onOpenChange:n,children:[(0,W.jsx)(gn,{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:Tr})})}),(0,W.jsx)(On,{className:`w-56`,side:`top`,align:`end`,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:(0,W.jsx)(Vf,{empty:e.empty,delivery:e.delivery,onSubmit:e.onSubmit,onClose:()=>n(!1)})})]})}function Vf(e){let t=k(e=>e.settings),n=k(e=>e.context),r=k(e=>e.capabilities),i=zf(t.provider,r),a=i.find(e=>e.value===t.mode),o=t.provider===`opencode`?`Agent`:`Permission mode`,s=vt(),l=k(e=>e.selection===null?``:ct(e.selection)),u=Le(l);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(pn,{children:[(0,W.jsxs)(_r,{children:[(0,W.jsx)(V,{icon:a?.icon??Hs}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a?.label??`Default`})]}),(0,W.jsx)(Pn,{children:(0,W.jsxs)(_n,{className:`w-56`,children:[(0,W.jsx)(on,{children:o}),(0,W.jsx)(mn,{value:t.mode??``,children:i.map(e=>(0,W.jsxs)(Nn,{value:e.value,onSelect:()=>rt({mode:e.value}),children:[(0,W.jsx)(V,{icon:e.icon}),e.label]},e.value))})]})})]}),t.provider===`codex`&&(0,W.jsxs)(vn,{checked:t.plan,onCheckedChange:e=>rt({plan:e}),children:[(0,W.jsx)(V,{icon:xs}),`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:Wo}),(0,W.jsx)(`span`,{className:`flex-1`,children:`Context`}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:wn(n.tokens)}),(0,W.jsx)(H,{variant:`outline`,size:`xs`,onClick:()=>{e.onClose(),We({text:`/compact`,images:[]},`queue`,R().selection,R().settings).catch(c)},children:`Compact`})]}),(0,W.jsx)(Fn,{}),(0,W.jsxs)(Nr,{disabled:!dt(u),onSelect:()=>Pf(l),children:[(0,W.jsx)(V,{icon:Fo}),(0,W.jsx)(`span`,{className:`flex-1`,children:`Stash prompt`}),(0,W.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[Ht,`+S`]})]}),s.length>0&&(0,W.jsxs)(pn,{children:[(0,W.jsxs)(_r,{children:[(0,W.jsx)(V,{icon:Po}),(0,W.jsx)(`span`,{className:`flex-1`,children:`Stashed prompts`}),(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:s.length})]}),(0,W.jsx)(Pn,{children:(0,W.jsx)(_n,{className:`max-h-80 w-72 overflow-y-auto`,children:s.map(e=>{let t=e.images.length+e.files.length,n=e.text.trim().split(`
|
|
11
|
-
`)[0];return(0,W.jsxs)(Nr,{className:`items-start`,onSelect:()=>Ff(l,e.id),onKeyDown:t=>{(t.key===`Delete`||t.key===`Backspace`)&&(t.preventDefault(),b(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:[bn(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(),b(e.id)},children:(0,W.jsx)(V,{icon:Uo})})]},e.id)})})})]}),e.delivery!==null&&(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)(Nr,{disabled:e.empty,onSelect:e.onSubmit,children:[(0,W.jsx)(V,{icon:e.delivery===`steer`?Fs:Rs}),(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:[Ht,`+Enter`]})]})})]})}function Hf(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)(qf,{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:z(`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)(ar,{text:t.plan});case`tool`:return Uf(t.name)===`other`?(0,W.jsx)(Kf,{text:JSON.stringify(t.input,null,2)}):null;default:return null}}function Z(e,t){switch(e.kind){case`command`:return e.command;case`file_change`:return Yf(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=Uf(e.name);return n===`read`?Yf(Wf(e.input),t):n===`search`?Jf(e.input.pattern):``}default:return``}}function Uf(e){switch(e.toLowerCase()){case`read`:return`read`;case`grep`:case`glob`:return`search`;default:return`other`}}function Wf(e){return[e.file_path,e.filePath,e.path].map(Jf).find(e=>e!==``)??``}function Gf(e){let t=0,n=0;for(let r of e.diffs)for(let e of Vr(r.before,r.after))e.added&&(t+=e.count),e.removed&&(n+=e.count);return{added:t,removed:n}}function Kf(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 qf(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:Vr(e.before,e.after).flatMap((e,t)=>e.value.replace(/\n$/,``).split(`
|
|
12
|
-
`).map((n,r)=>(0,W.jsxs)(`div`,{className:z(`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 Jf(e){return typeof e==`string`?e:``}function Yf(e,t){return e.startsWith(t+`/`)||e.startsWith(t+`\\`)?e.slice(t.length+1):e}var Xf=`(Recommended)`;function Zf(e){let t=e.options.map(e=>e.label).filter(e=>e.endsWith(Xf));return e.multiSelect?t:t.slice(0,1)}function Qf(e){return(0,W.jsxs)(`span`,{className:z(`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:Wn,strokeWidth:3,className:`size-3`}),e.selected&&!e.multi&&(0,W.jsx)(`span`,{className:`bg-primary-foreground size-1.5 rounded-full`})]})}function $f(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 ep=`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 tp(e){let t=e.request;if(t.kind===`question`)return(0,W.jsx)(np,{machine:e.machine,request:t,draft:e.draft});let n=t.kind===`plan`,r=n?``:Z(t.item,e.cwd);return(0,W.jsx)(`div`,{className:z(ep,`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:Vs,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)($f,{label:t.autoResolve.decision===`allow`?`Approve`:`Decline`,at:t.autoResolve.at}),(0,W.jsx)(H,{size:`xs`,variant:`outline`,onClick:()=>Ke(t.id,`deny`,null),children:n?`Keep planning`:`Decline`}),t.kind===`approval`&&t.canAlwaysAllow&&(0,W.jsx)(H,{size:`xs`,variant:`outline`,onClick:()=>Ke(t.id,`always`,null),children:`Always`}),(0,W.jsx)(H,{size:`xs`,onClick:()=>Ke(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)(ar,{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)(Hf,{item:t.item})})]})})}function np(e){let t=e.request.questions,[n,r]=(0,U.useState)(0),[i,a]=(0,U.useState)({}),[o,s]=(0,U.useState)({}),l=Object.fromEntries(t.map(e=>[e.question,[...i[e.question]??[],o[e.question]?.trim()??``].filter(e=>e!==``)])),u=Object.fromEntries(t.map(e=>[e.question,(l[e.question].length>0?l[e.question]:Zf(e)).join(`, `)])),d=t[n],f=t.flatMap((e,t)=>l[e.question].length===0?[t]:[]),p=f.find(e=>e>n)??f[0];function m(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 h(e,t){s({...o,[e.question]:t}),!e.multiSelect&&t.trim()!==``&&a({...i,[e.question]:[]})}async function g(t,n){let r=kf(R().items,[e.draft,...Object.values(o)]);for(let i of n)try{let n=await Tf(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){c(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:Cs,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:d.question}),(0,W.jsx)(H,{size:`icon-micro`,variant:`ghost`,"aria-label":`Skip questions`,title:`Skip questions`,onClick:()=>Ke(e.request.id,`deny`,null),children:(0,W.jsx)(V,{icon:_t,className:`size-4`})})]}),(0,W.jsxs)(`div`,{role:d.multiSelect?`group`:`radiogroup`,"aria-label":d.question,className:`flex max-h-[min(18rem,32dvh)] flex-col gap-0.5 overflow-y-auto`,children:[d.options.map(e=>{let t=i[d.question]?.includes(e.label)===!0,n=l[d.question].length===0&&Zf(d).includes(e.label),r=e.label.endsWith(Xf);return(0,W.jsxs)(`button`,{role:d.multiSelect?`checkbox`:`radio`,"aria-checked":t,className:z(`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:()=>m(d,e.label),children:[(0,W.jsx)(Qf,{multi:d.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:z(`flex cursor-text items-start gap-2.5 rounded-lg px-2.5 py-2 transition-colors`,(o[d.question]??``).trim()===``?`focus-within:bg-muted/40 hover:bg-muted/40`:`bg-muted/70`),children:[(0,W.jsx)(Qf,{multi:d.multiSelect,selected:(o[d.question]??``).trim()!==``,suggested:!1}),(0,W.jsx)(`textarea`,{value:o[d.question]??``,rows:1,onChange:e=>h(d,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(),g(d,n))},onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),g(d,[...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`})]})]})]},d.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:z(`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:[l[e.question].length>0&&(0,W.jsx)(V,{icon:Ko,"aria-label":`Answered`,className:`text-success size-3.5`}),l[e.question].length===0&&u[e.question]!==``&&(0,W.jsx)(V,{icon:Mr,"aria-label":`Using the recommended answer`,className:`text-primary size-3.5`}),u[e.question]===``&&(0,W.jsx)(V,{icon:fs,"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)($f,{label:`Skip`,at:e.request.autoResolve.at}),(0,W.jsx)(H,{size:`xs`,variant:`outline`,onClick:()=>Ke(e.request.id,`allow`,{}),children:`Skip`}),(0,W.jsx)(H,{size:`xs`,variant:p===void 0?`default`:`outline`,onClick:()=>Ke(e.request.id,`allow`,Object.fromEntries(t.flatMap(e=>l[e.question].length===0?[]:[[e.question,l[e.question].join(`, `)]]))),children:`Submit`}),p!==void 0&&(0,W.jsx)(H,{size:`xs`,onClick:()=>{l[d.question].length===0&&a({...i,[d.question]:Zf(d)}),r(p)},children:`Next`})]})]})]})})}function rp(e,t,n,r){if(e.key!==t&&e.key!==n)return;e.preventDefault();let i=[...e.currentTarget.querySelectorAll(r)];if(i.length===0)return;let a=i.findIndex(e=>e===document.activeElement),o=e.key===n?a+1:a-1;i[Math.min(Math.max(o,0),i.length-1)].focus()}function ip(e,t,n,r,i){let a=ap(e,n,r+Math.asin(.5/n)),o=ap(e,n,i-Math.asin(.5/n)),s=ap(e,t,i-Math.asin(.5/t)),c=ap(e,t,r+Math.asin(.5/t)),l=[a,o,s,c,...r<Math.PI/2&&i>Math.PI/2?[ap(e,n,Math.PI/2)]:[]],u=Math.min(...l.map(e=>e.x)),d=Math.min(...l.map(e=>e.y)),f=ap(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 ap(e,t,n){return{x:e+t*Math.cos(n),y:e-t*Math.sin(n)}}var op=`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`,sp=`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 cp(e){let t=Math.min(190,(window.innerWidth-16)/2),[n,r]=(0,U.useState)(!1);return yr(e.shortcut,()=>r(!n),{enableOnFormTags:!0,preventDefault:!0}),(0,W.jsxs)(hn,{modal:e.options.length>5,open:n,onOpenChange:r,children:[(0,W.jsx)(gn,{asChild:!0,children:(0,W.jsx)(`button`,{className:z(op,sp),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)(lp,{value:e.value,options:e.options,radius:t,onChange:e.onChange})}),e.options.length<=5&&(0,W.jsx)(Dn,{children:(0,W.jsx)(Rn,{"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},onOpenAutoFocus:Ln,onKeyDown:e=>rp(e,`ArrowLeft`,`ArrowRight`,`[role=menuitemradio]`),onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:(0,W.jsx)(lp,{value:e.value,options:e.options,radius:t,onChange:e.onChange})})})]})}function lp(e){return e.options.length>5?(0,W.jsx)(mn,{value:e.value,onValueChange:e.onChange,children:e.options.map(e=>(0,W.jsx)(Nn,{value:e.value,children:e.label},e.value))}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`bg-background pointer-events-auto absolute`,style:ip(e.radius,e.radius*.35,e.radius,0,Math.PI).style}),(0,W.jsx)(nn,{value:e.value,onValueChange:e.onChange,children:e.options.map((t,n)=>{let r=ip(e.radius,e.radius*.35,e.radius,Math.PI-(n+1)*Math.PI/e.options.length,Math.PI-n*Math.PI/e.options.length);return(0,W.jsx)(Yn,{value:t.value,className:z(`pointer-events-auto absolute cursor-pointer transition-colors outline-none`,t.value===e.value&&`text-foreground bg-[color-mix(in_srgb,var(--primary)_30%,var(--popover))]`,t.value!==e.value&&`bg-popover text-secondary-label data-highlighted:bg-accent data-highlighted:text-accent-foreground`),style:r.style,children:(0,W.jsx)(`span`,{className:`absolute -translate-x-1/2 -translate-y-1/2 text-sm font-medium whitespace-nowrap`,style:r.center,children:t.label})},t.value)})})]})}function up(){let e=k(e=>e.settings),t=k(e=>e.capabilities)?.models.find(t=>t.value===e.model);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(dp,{}),(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)(cp,{title:`Effort`,shortcut:[`mod+shift+e`,`mod+slash`],trigger:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{icon:Bo}),(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=>rt({effort:e==="default"?null:e})})]})}function dp(){let e=k(e=>e.settings),t=k(e=>e.selection),n=k(e=>e.machines.find(t=>t.id===e.selection?.machine)),r=[...[...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),i=e.provider===`opencode`?`opencode`:e.accountId,a=k(e=>e.capabilities),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)({}),u=a?.models.find(t=>t.value===e.model)?.name??e.model??`Choose a model`,d=r.find(e=>e.key===i);return yr([`mod+shift+m`,`mod+period`],()=>s(!o),{enableOnFormTags:!0,preventDefault:!0}),(0,W.jsxs)(un,{open:o,onOpenChange:s,children:[(0,W.jsx)(Cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:z(op,sp),title:d===void 0?`Model`:`${d.name} · ${u}`,children:[(0,W.jsxs)(`span`,{className:`relative`,children:[(0,W.jsx)(pc,{provider:e.provider,className:`size-4`}),r.filter(t=>t.provider===e.provider).length>1&&d!==void 0&&(0,W.jsx)(`span`,{className:z(`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`,d.color===null?`bg-card text-muted-foreground`:`border-card text-white`),style:d.color===null?void 0:{backgroundColor:d.color},children:d.name.charAt(0).toUpperCase()})]}),(0,W.jsx)(`span`,{className:`max-w-40 truncate`,children:u})]})}),(0,W.jsx)(cn,{side:`top`,className:`w-screen max-w-90`,onOpenAutoFocus:e=>{if(e.preventDefault(),!(e.currentTarget instanceof HTMLElement))throw Error(`model picker is not an element`);let t=e.currentTarget;(t.querySelector(`input`)??t.querySelector(`[data-selected=true]`)??t.querySelector(`[data-model]`))?.focus()},onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:(0,W.jsx)(fp,{choices:r,fetched:c,onFetched:l,onClose:()=>s(!1)})})]})}function fp(e){let t=k(e=>e.settings),n=k(e=>e.selection),r=k(e=>e.capabilities),i=t.provider===`opencode`?`opencode`:t.accountId,[a,o]=(0,U.useState)(i),[s,l]=(0,U.useState)(``),u=(0,U.useRef)(null),f=a===null?[]:a===i?r?.models??null:e.fetched[a]??null,p=e.choices.find(e=>e.key===a)?.provider,m=(f??[]).filter(e=>!e.hidden),h=m.length>=5,g=h?s.trim().toLowerCase():``,_=m.filter(e=>`${e.name} ${e.description}`.toLowerCase().includes(g)),v=(0,U.useEffectEvent)(()=>{if(n!==null)for(let t of e.choices)t.key!==i&&t.error===null&&L(n.machine,`capabilities`,{provider:t.provider,accountId:t.accountId,projectId:n.projectId}).then(n=>e.onFetched(e=>({...e,[t.key]:n.models})),c)});(0,U.useEffect)(()=>{v()},[]);function y(n){let a=e.fetched[n]?.find(e=>e.value===t.model);n!==i&&i!==null&&r!==null&&a!==void 0&&(e.onFetched(e=>({...e,[i]:r.models})),b(n,a)),o(n)}function b(r,i){let a=e.choices.find(e=>e.key===r);if(a===void 0||n===null)return;let o=a.provider,s={accountId:a.accountId,model:i.value,...i.effort===null?{}:{effort:i.effort}};mt(n.machine,o,a.accountId,i.value),o===t.provider?rt(s):rt({...ft(Ge(R(),n.machine).lastUsed,o),...s})}return(0,W.jsxs)(`div`,{tabIndex:-1,className:`flex max-h-86.5 flex-row outline-none`,onKeyDown:t=>{let n=document.activeElement===u.current&&s!==``;if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`||n){rp(t,`ArrowUp`,`ArrowDown`,`input, [data-model]`);return}t.preventDefault();let r=e.choices.filter(e=>e.error===null),i=r.findIndex(e=>e.key===a),o=t.key===`ArrowRight`?1:-1,c=r.at(Math.min(Math.max(i+o,0),r.length-1));c!==void 0&&c.key!==a&&(t.currentTarget.focus(),y(c.key))},children:[e.choices.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:[e.choices.map(t=>(0,W.jsxs)(`div`,{className:`relative w-full`,children:[t.key===a&&(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)(Yr,{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:z(`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===a,"aria-disabled":t.error!==null,onClick:()=>{t.error===null&&y(t.key)},children:[(0,W.jsx)(pc,{provider:t.provider,className:`size-5`}),e.choices.filter(e=>e.provider===t.provider).length>1&&(0,W.jsx)(`span`,{className:z(`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)(Yr,{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:()=>{e.onClose(),d(Se[t.provider])},children:(0,W.jsx)(V,{icon:nc,className:`size-4.5`})})})]}),(0,W.jsxs)(`div`,{className:z(`bg-muted/40 flex min-h-0 min-w-0 flex-1 flex-col`,e.choices.length>1&&`border-border/70 border-l`),children:[h&&(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:xr,className:`text-muted-foreground/55 pointer-events-none absolute top-1.5 left-0 size-4`}),(0,W.jsx)(`input`,{ref:u,value:s,placeholder:`Search models...`,className:`placeholder:text-muted-foreground/70 h-6.5 w-full bg-transparent ps-5 text-sm outline-none`,onChange:e=>l(e.target.value),onKeyDown:t=>{if(t.key!==`Enter`||a===null)return;let n=_.at(0);n!==void 0&&(t.preventDefault(),b(a,n),e.onClose())}})]})}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 py-1.5`,children:_.length===0?(0,W.jsx)(`p`,{className:`text-muted-foreground p-2 text-center text-sm`,children:f===null?`Loading models…`:`No models found`}):_.map(n=>(0,W.jsx)(`button`,{"data-model":!0,"data-selected":a===i&&n.value===t.model,className:z(`hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground mb-0.5 outline-none flex min-h-8 w-full cursor-pointer flex-col justify-center rounded-sm px-2 py-1.5 text-left`,a===i&&n.value===t.model&&`text-foreground bg-foreground/[0.08]`),onClick:()=>{a!==null&&(b(a,n),e.onClose())},children:(0,W.jsxs)(`span`,{className:`truncate text-sm leading-snug font-medium`,children:[n.name,p===`opencode`&&(0,W.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs font-normal`,children:n.description})]})},n.value))})]})]})}function pp(e){let t=k(e=>e.selection?.sessionId),n=k(t=>He(t,e.machine,e.projectId)),r=e.projectId===`no-project`||n?.scratch===!0,[i,a]=(0,U.useState)(!1);return yr([`mod+p`,`mod+semicolon`],e=>{e.stopPropagation(),a(!i)},{enabled:t===null,enableOnFormTags:!0,preventDefault:!0,eventListenerOptions:{capture:!0}}),(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 `,!r&&`in `,t===null?(0,W.jsxs)(hn,{open:i,onOpenChange:a,children:[(0,W.jsx)(gn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:z(`border-muted-foreground/35 hover:border-foreground/60 inline-flex max-w-64 cursor-pointer border-b border-dotted align-bottom outline-none`,r&&`max-w-none`),title:n?.path,children:[(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:r?`without a project`:n?.name}),`?`]})}),(0,W.jsx)(On,{className:`max-h-80 w-64`,onCloseAutoFocus:t=>{t.preventDefault(),e.onCloseMenu()},children:(0,W.jsx)(mp,{machine:e.machine,projectId:e.projectId})})]}):(0,W.jsx)(`span`,{className:z(`border-muted-foreground/35 inline-block max-w-64 truncate border-b border-dotted align-bottom`,r&&`max-w-none`),title:n?.path,children:r?`without a project`:n?.name}),t!==null&&`?`]})})}function mp(e){let t=k(e=>e.projects),n=k(e=>e.machines);return(0,W.jsx)(mn,{value:P(e.machine,e.projectId),children:n.map(e=>({machine:e,items:t.filter(t=>t.machine===e.id&&!t.hidden&&!t.scratch)})).filter(e=>e.items.length>0||e.machine.system?.scratchAvailable===!0).map((e,t)=>(0,W.jsxs)(U.Fragment,{children:[t>0&&(0,W.jsx)(Fn,{}),n.length>1&&(0,W.jsxs)(`div`,{className:`flex items-center`,children:[(0,W.jsxs)(on,{className:`text-2xs flex min-w-0 flex-1 items-center gap-1`,children:[(0,W.jsx)(wf,{icon:e.machine.icon,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:e.machine.name})]}),e.machine.system?.scratchAvailable===!0&&(0,W.jsxs)(Nn,{value:P(e.machine.id,`no-project`),className:`text-muted-foreground data-[state=checked]:bg-foreground/10 data-[state=checked]:text-foreground text-2xs mr-1 h-5 min-h-0 shrink-0 gap-1 px-1.5 py-0 *:data-[slot=dropdown-menu-radio-item-indicator]:hidden`,onSelect:()=>Ie({machine:e.machine.id,projectId:`no-project`,sessionId:null}),children:[(0,W.jsx)(dc,{machine:e.machine.id,projectId:`no-project`,className:`size-3 shrink-0`}),`Chat`]})]}),n.length===1&&e.machine.system?.scratchAvailable===!0&&(0,W.jsxs)(Nn,{value:P(e.machine.id,`no-project`),onSelect:()=>Ie({machine:e.machine.id,projectId:`no-project`,sessionId:null}),children:[(0,W.jsx)(dc,{machine:e.machine.id,projectId:`no-project`,className:`size-4 shrink-0`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:`Chat`})]}),e.items.map(e=>(0,W.jsxs)(Nn,{value:P(e.machine,e.id),title:e.path,onSelect:()=>Ie({machine:e.machine,projectId:e.id,sessionId:null}),children:[(0,W.jsx)(dc,{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})]},P(e.machine,e.id)))]},e.machine.id))})}function hp(){let e=k(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:bs,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:()=>Tt(e.id),children:(0,W.jsx)(V,{icon:Ar,className:`size-4`})}),(0,W.jsx)(H,{variant:`ghost-muted`,size:`icon-micro`,title:`Remove from queue`,onClick:()=>Ae(e.id),children:(0,W.jsx)(V,{icon:_t,className:`size-4`})})]},e.id))})}function gp(){let e=k(Mt),t=no(),n=e?t?.limits.find(e=>e.rejected):void 0,[r,i]=(0,U.useState)(Date.now());return(0,U.useEffect)(()=>{if(n===void 0)return;i(Date.now());let e=setInterval(()=>i(Date.now()),3e4);return()=>clearInterval(e)},[n]),n===void 0?null:(0,W.jsxs)(`div`,{className:`composer-glass relative mx-auto -mb-[calc(1rem+1px)] flex w-[calc(100%-2.75rem)] items-center gap-2 rounded-t-2xl border border-b-0 border-(--composer-outline) px-3 pt-2 pb-[calc(1rem+1px+0.5rem)] text-xs/4`,children:[(0,W.jsx)(V,{icon:ec,className:`text-warning-foreground size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`text-secondary-label truncate`,children:n.resetsAt===null?`Usage limit reached`:`Usage limit reached · Resets in ${Sn(n.resetsAt*1e3-r)}`})]})}function _p(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 (${Ht}+Enter)`:e.running?`Queue (Enter) · Send now (${Ht}+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 vp=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],yp=5242880,bp=window.matchMedia(`(pointer: coarse)`);function xp(){let e=k(e=>e.selection),t=k(e=>e.loaded),n=k(e=>e.items.length===0&&e.partial===``),r=k(e=>e.requests),i=k(e=>e.queue),a=k(e=>e.draft),o=k(e=>e.capabilities),s=k(e=>e.settings.provider===`opencode`?e.machines.find(t=>t.id===e.selection?.machine)?.openCode.available!==!0:e.settings.accountId===null),[l,u]=(0,U.useState)(!1),[d,f]=(0,U.useState)(0),[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)([]),_=(0,U.useRef)(null),v=(0,U.useRef)(null),y=(0,U.useRef)(!1),b=e?.machine??``,x=e?.projectId??``,S=k(e=>He(e,b,x)),C=k(e=>Ge(e,b).status),T=k(e=>Ge(e,b).config?.delivery??null),E=e===null?``:ct(e),D=Le(E),O=D.text,A=D.images,j=D.files,[M,N]=(0,U.useState)(O.length),ee=k(Mt),te=t&&n&&!ee,ne=r.at(0);(0,U.useEffect)(()=>{let e=_.current;e===null||bp.matches||(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},[e]),(0,U.useEffect)(()=>{if(a===null)return;let e=Af(a);F(E,t=>({...t,...e})),N(e.text.length),Oe(null),_.current?.focus()},[a,E]),(0,U.useEffect)(()=>{C===`online`&&L(b,`files.list`,{projectId:x}).then(g,c)},[b,x,C]);let re=O.slice(0,M),ie=/^\/\S*$/.exec(re)?.[0]??/(?:^|\s)(@\S*)$/.exec(re)?.[1]??null,ae=ie?.slice(1).toLowerCase()??``,oe=ie===null||p?[]:ie.startsWith(`/`)?(o?.commands??[]).filter(e=>e.name.toLowerCase().includes(ae)).sort((e,t)=>Number(!e.name.toLowerCase().startsWith(ae))-Number(!t.name.toLowerCase().startsWith(ae))).map(e=>({key:e.name,label:`/${e.name}${e.hint===``?``:` ${e.hint}`}`,description:e.description,insert:`/${e.name}`})):h.filter(e=>e.toLowerCase().includes(ae)).slice(0,50).map(e=>({key:e,label:e,description:``,insert:`@${e}`})),se=Math.min(d,oe.length-1),ce=O.trim()===``&&A.length===0||l||s;function le(e,t){F(E,t=>({...t,text:e,images:t.images.filter(t=>e.includes(`[Image #${t.number}]`)),files:t.files.filter(t=>e.includes(Sp(t)))})),N(t),f(0),m(!1)}function ue(e){if(ie===null)return;let t=M-ie.length,n=t+e.insert.length+1;le(`${O.slice(0,t)}${e.insert} ${O.slice(M)}`,n),requestAnimationFrame(()=>_.current?.setSelectionRange(n,n))}async function de(t){if(!ce){u(!0);try{if(T===null)throw Error(`This machine is not connected`);let n=R().settings,r=O.trim();for(let e of j){let t=await w(e.id);if(t===void 0)throw Error(`${e.name} is no longer saved, attach it again`);let n=await Tf(b,t);r=r.replace(Sp(e),()=>`@${n}`)}await We({text:r,images:A.map(e=>({mediaType:e.mediaType,data:e.data}))},t?T===`queue`?`steer`:`queue`:T,e,n),F(E,e=>({...e,text:``,images:[],files:[]})),N(0)}catch(e){c(e)}finally{u(!1)}}}async function fe(e){let t=M,n=/(^|\s)$/.test(O.slice(0,M))?``:` `;for(let r of e){if(vp.includes(r.type)&&r.size<=yp){let e=await Ef(r),i=kf(R().items,[he(E).text])+1,a={number:i,mediaType:r.type,data:e},o=t,s=`${n}[Image #${i}] `;n=``,F(E,e=>({...e,text:`${e.text.slice(0,o)}${s}${e.text.slice(o)}`,images:[...e.images,a]})),t+=s.length,N(t),requestAnimationFrame(()=>_.current?.setSelectionRange(t,t));continue}if(r.size>52428800){c(Error(`${r.name} is larger than 50 MB`));continue}let e=await xe(r),i={number:Math.max(0,...he(E).files.map(e=>e.number))+1,id:e,name:r.name},a=t,o=`${n}${Sp(i)} `;n=``,F(E,e=>({...e,text:`${e.text.slice(0,a)}${o}${e.text.slice(a)}`,files:[...e.files,i]})),t+=o.length,N(t),requestAnimationFrame(()=>_.current?.setSelectionRange(t,t))}}return(0,W.jsx)(`div`,{className:z(`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)(Df,{width:`composer`,className:`pointer-events-auto relative z-10`,children:[te&&(0,W.jsx)(pp,{machine:b,projectId:x,onCloseMenu:()=>_.current?.focus()}),oe.length===0&&(0,W.jsx)(gp,{}),i.length>0&&oe.length===0&&(0,W.jsx)(hp,{}),ne!==void 0&&oe.length===0&&(0,W.jsx)(tp,{request:ne,machine:b,cwd:S?.path??``,count:r.length,draft:O},ne.id),oe.length>0&&(0,W.jsx)(Nf,{items:oe,active:se,onHover:f,onPick:ue}),(0,W.jsxs)(`div`,{className:z(`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(),_.current?.focus()))},onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),fe([...e.dataTransfer.files])},children:[(0,W.jsxs)(`div`,{className:z(`pb-2`,A.length>0&&`pt-3.5 sm:pt-4`),children:[A.length>0&&(0,W.jsx)(Of,{draftKey:E}),(0,W.jsx)(`textarea`,{ref:_,"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:O,onChange:e=>le(e.target.value,e.target.selectionStart),onSelect:e=>N(e.currentTarget.selectionStart),onPaste:e=>{let t=e.clipboardData.getData(`text/plain`),n=y.current;if(y.current=!1,t!==``){e.preventDefault();let r=n?null:jf(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(y.current=Mf(e.nativeEvent),Lf(e.nativeEvent))e.preventDefault(),If(E);else{if(oe.length>0){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;f((se+t+oe.length)%oe.length);return}if(e.key===`Enter`&&!e.shiftKey||e.key===`Tab`){e.preventDefault(),ue(oe[se]);return}if(e.key===`Escape`){e.preventDefault(),m(!0);return}}if(e.key===`Enter`&&!e.shiftKey&&!bp.matches)e.preventDefault(),de(e.metaKey||e.ctrlKey);else if(e.key===`ArrowUp`&&O===``){let t=Cp(R().items);if(t===null)return;e.preventDefault(),le(t,t.length)}else e.key===`Escape`&&ee&&st()}}},placeholder:s?`Add an account in Settings to start`:ee&&T===`steer`?`Steer the agent… (${Ht}+Enter to queue)`:ee?`Queue a follow-up… (${Ht}+Enter to send now)`:`Ask anything, @tag files/folders, or / for commands`,className:z(`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:z(`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)(up,{})}),(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center justify-end gap-2`,children:[(0,W.jsx)(`input`,{ref:v,type:`file`,multiple:!0,hidden:!0,onChange:e=>{fe([...e.target.files??[]]),e.target.value=``}}),l&&j.length>0&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Uploading…`}),(0,W.jsx)(Bf,{empty:ce,delivery:T,onSubmit:()=>void de(!0)}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,title:`Attach files`,"aria-label":`Attach files`,onClick:()=>v.current?.click(),children:(0,W.jsx)(V,{icon:As})}),(0,W.jsx)(_p,{running:ee,empty:ce,delivery:T,onSubmit:e=>void de(e),onStop:st})]})]})]})]})})}function Sp(e){return`[File #${e.number}: ${e.name}]`}function Cp(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 wp={five_hour:`session`,seven_day:`weekly`,seven_day_opus:`opus`,seven_day_sonnet:`sonnet`};function Tp(e){return wp[e.window]??e.window.toLowerCase()}function Ep(){let e=no()?.limits.filter(e=>!e.rejected&&e.utilization!==null&&e.utilization>=.9).sort((e,t)=>(t.utilization??0)-(e.utilization??0))[0];if(e===void 0)return null;let t=`${Math.round((e.utilization??0)*100)}%`,n=`${Tp(e)} limit ${t} used`;return(0,W.jsxs)(`span`,{className:`bg-warning/15 text-warning-foreground flex h-5 shrink-0 items-center gap-0.75 rounded-[6px] px-1.25 text-[11px] font-medium tabular-nums`,title:n,"aria-label":n,children:[(0,W.jsx)(V,{icon:_s,className:`size-3 shrink-0`}),t]})}var Dp={working:Mr,done:Yo,failed:dn},Op=new Set,kp=null,Ap=0,jp={open:!1,label:``,error:``};function Mp(e){kp!==null&&kp.id!==e.id&&oa.dismiss(kp.id),kp=e,oa.custom(()=>(0,W.jsx)(zp,{toast:e}),{id:e.id,duration:e.state===`done`?5e3:1/0,onDismiss:()=>{kp?.id===e.id&&(kp=null)}})}function Np(e){jp=e;for(let e of Op)e()}function Pp(e){return Op.add(e),()=>{Op.delete(e)}}function Fp(e,t){Ap+=1;let n=`git-${Ap}`;Mp(`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 Ip(e){Ap+=1;let t=`git-${Ap}`;Mp({id:t,state:`working`,label:e.labels.working,error:``,url:null});try{let n=await e.task();kp?.id===t&&Mp({id:t,state:`done`,label:e.labels.done,error:``,url:n})}catch(n){kp?.id===t&&Mp({id:t,state:`failed`,label:e.labels.failed,error:Ut(n),url:null})}finally{e.onRefresh()}}function Lp(e,t,n,r){Ip({labels:r?{working:`Committing and pushing…`,done:`Committed and pushed`,failed:`Commit and push failed`}:{working:`Committing…`,done:`Committed`,failed:`Commit failed`},task:async()=>(await L(e.machine,`git.commit`,{projectId:e.projectId,repo:t,message:n,push:r}),null),onRefresh:e.onRefresh})}function Rp(e,t,n){Ip({labels:{working:`Creating pull request…`,done:`Pull request created`,failed:`Couldn't create pull request`},task:async()=>(await L(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 zp(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:Dp[e.toast.state],className:z(`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:()=>Np({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:()=>oa.dismiss(e.toast.id),children:(0,W.jsx)(V,{icon:_t,className:`size-4`})})]})}function Bp(){let e=(0,U.useSyncExternalStore)(Pp,()=>jp);return(0,W.jsx)(ai,{open:e.open,onOpenChange:t=>Np({...e,open:t}),children:(0,W.jsxs)(Qr,{className:`sm:max-w-lg`,children:[(0,W.jsx)($r,{children:(0,W.jsx)(ni,{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 Vp({className:e,type:t,...n}){return(0,W.jsx)(`input`,{type:t,"data-slot":`input`,className:z(`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 Hp({...e}){return(0,W.jsx)(ol,{"data-slot":`select`,...e})}function Up({...e}){return(0,W.jsx)(ul,{"data-slot":`select-value`,...e})}function Wp({className:e,size:t=`default`,children:n,...r}){return(0,W.jsxs)(cl,{"data-slot":`select-trigger`,"data-size":t,className:z(`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)(dl,{asChild:!0,children:(0,W.jsx)(V,{icon:Lr,className:`text-muted-foreground pointer-events-none size-4`})})]})}function Gp({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,W.jsx)(ml,{children:(0,W.jsxs)(gl,{"data-slot":`select-content`,"data-align-trigger":n===`item-aligned`,className:z(`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)(qp,{}),(0,W.jsx)(Ol,{"data-position":n,className:z(`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)(Jp,{})]})})}function Kp({className:e,children:t,...n}){return(0,W.jsxs)(Pl,{"data-slot":`select-item`,className:z(`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)(Rl,{children:(0,W.jsx)(V,{icon:Wn,className:`pointer-events-none`})})}),(0,W.jsx)(Il,{children:t})]})}function qp({className:e,...t}){return(0,W.jsx)(Bl,{"data-slot":`select-scroll-up-button`,className:z(`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:Jo})})}function Jp({className:e,...t}){return(0,W.jsx)(Hl,{"data-slot":`select-scroll-down-button`,className:z(`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:Ir})})}function Yp(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)(Hp,{value:e.target?.base??``,disabled:e.target===void 0,onValueChange:e.onBase,children:[(0,W.jsx)(Wp,{size:`sm`,className:`max-w-48`,children:(0,W.jsx)(Up,{placeholder:`Loading branches…`})}),(0,W.jsx)(Gp,{children:(e.target?.branches??[]).map(e=>(0,W.jsx)(Kp,{value:e,children:e},e))})]})]})}function Xp(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)(Vp,{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 Zp={working:Mr,review:Zo,done:Yo,failed:dn,skipped:Os};function Qp(e){let t=k(t=>He(t,e.machine,e.projectId)?.name)??``,[n]=(0,U.useState)(()=>$p(e.repos,e.action)),[r,i]=(0,U.useState)(()=>n.map(e=>e.path)),[a,o]=(0,U.useState)(``),[s,c]=(0,U.useState)({}),[l,u]=(0,U.useState)(null),d=n.filter(e=>r.includes(e.path)&&s[e.path]?.kind!==`failed`),f=e.action===`pullRequest`&&d.some(e=>s[e.path]===void 0),p=d.filter(e=>e.changed>0);(0,U.useEffect)(()=>{if(e.action===`pullRequest`)for(let t of n)L(e.machine,`git.branches`,{projectId:e.projectId,repo:t.path}).then(e=>c(n=>({...n,[t.path]:{kind:`ready`,...e}})),e=>c(n=>({...n,[t.path]:{kind:`failed`,text:Ut(e)}})))},[e.machine,e.projectId,e.action,n]);function m(e,t){u(n=>n?.map(n=>n.path===e?{...n,...t}:n)??null)}async function h(t,r){try{await r()}catch(r){if(n.length===1){e.onClose(),Fp(`Pull request failed`,{error:Ut(r)});return}m(t,{state:`failed`,text:Ut(r),draft:null})}finally{e.onRefresh()}}function g(e,t){c(n=>{let r=n[e];return r?.kind===`ready`?{...n,[e]:{...r,base:t}}:n})}function _(e,t){u(d.map(t=>({path:t.path,state:`working`,text:e,url:null,draft:null})));for(let e of d)h(e.path,()=>t(e.path))}function v(t){if(n.length===1){e.onClose(),Lp(e,n[0].path,a,t);return}let r=t?`Committed and pushed`:`Committed`;_(t?`Committing and pushing…`:`Committing…`,async n=>{await L(e.machine,`git.commit`,{projectId:e.projectId,repo:n,message:a,push:t}),m(n,{state:`done`,text:r})})}function y(){_(`Pushing…`,async t=>{await L(e.machine,`git.push`,{projectId:e.projectId,repo:t}),m(t,{state:`done`,text:`Pushed`})})}async function b(t,r,i){m(t,{state:`working`,text:r?`Committing local changes and writing pull request…`:`Writing pull request…`,draft:null});let a=await L(e.machine,`git.pullRequest`,{projectId:e.projectId,repo:t,base:i,commit:r});if(a.kind===`open`){if(n.length===1){e.onClose(),Fp(`Pull request already open`,{url:a.url});return}m(t,{state:`done`,text:`A pull request is already open`,url:a.url})}else m(t,{state:`review`,text:`Review and create`,draft:{base:a.base,head:a.head,title:a.title,body:a.body}})}function x(e){_(`Starting…`,async t=>{let n=s[t];if(n?.kind!==`ready`)throw Error(`The branches are not loaded`);await b(t,e&&p.some(e=>e.path===t),n.base)})}function S(t,r){n.length===1?(e.onClose(),Rp(e,t,r)):h(t,async()=>{m(t,{state:`working`,text:`Creating pull request…`,draft:null}),m(t,{state:`done`,text:`Created pull request`,url:(await L(e.machine,`git.createPullRequest`,{projectId:e.projectId,repo:t,base:r.base,head:r.head,title:r.title,body:r.body})).url})})}return(0,W.jsx)(ai,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Qr,{className:`top-[12vh] translate-y-0 sm:max-w-lg`,children:[(0,W.jsxs)($r,{children:[(0,W.jsxs)(ni,{children:[e.action===`commit`&&`Commit changes`,e.action===`push`&&`Push`,e.action===`pullRequest`&&`Create pull request`]}),(0,W.jsxs)(ri,{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.`]})]}),l===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)(Yp,{head:n[0].branch??`detached`,target:s[n[0].path],onBase:e=>g(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:s[n.path]?.kind===`failed`,checked:r.includes(n.path)&&s[n.path]?.kind!==`failed`,onChange:e=>i(e.target.checked?[...r,n.path]:r.filter(e=>e!==n.path))}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:em(n.path,t)}),e.action===`pullRequest`?(0,W.jsx)(Yp,{head:n.branch??`detached`,target:s[n.path],onBase:e=>g(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:a,onChange:e=>o(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`&&p.length>0&&(0,W.jsxs)(`p`,{children:[`You have local changes`,n.length>1&&` in ${p.map(e=>em(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:d.length===0,onClick:()=>v(!1),children:`Commit`}),(0,W.jsx)(H,{size:`sm`,disabled:d.length===0,onClick:()=>v(!0),children:`Commit and Push`})]}),e.action===`push`&&(0,W.jsx)(H,{size:`sm`,disabled:d.length===0,onClick:y,children:`Push`}),e.action===`pullRequest`&&p.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{variant:`outline`,size:`sm`,disabled:f,onClick:()=>x(!1),children:`Continue without them`}),(0,W.jsx)(H,{size:`sm`,disabled:f,onClick:()=>x(!0),children:`Commit and continue`})]}),e.action===`pullRequest`&&p.length===0&&(0,W.jsx)(H,{size:`sm`,disabled:f||d.length===0,onClick:()=>x(!1),children:`Create pull request`})]})]}),l!==null&&(0,W.jsx)(`div`,{className:`flex max-h-[60vh] flex-col gap-2 overflow-y-auto`,children:l.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:Zp[e.state],className:z(`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:em(e.path,t)}),(0,W.jsxs)(`span`,{className:z(`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)(Xp,{draft:r,onChange:t=>m(e.path,{draft:t}),onSkip:n.length===1?null:()=>m(e.path,{state:`skipped`,text:`Skipped`,draft:null}),onRegenerate:()=>void h(e.path,()=>b(e.path,!1,r.base)),onCreate:()=>S(e.path,r)})]},e.path)})})]})})}function $p(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 em(e,t){return e===``?t:e}var tm=3e3,nm=18e4;function rm(e,t,n){let[r,i]=(0,U.useState)(null),[a,o]=(0,U.useState)(0);(0,U.useEffect)(()=>{if(t===null)return;let n=P(e,t),r={projectId:t},a=!0,o=!1,s=!1;async function l(){if(!o){o=!0;try{let t=await L(e,`git.status`,r);if(!a)return;s=!1,i(e=>e!==null&&e.key===n&&En(e.repos,t)?e:{key:n,repos:t})}catch(e){a&&!s&&(s=!0,c(e))}finally{o=!1}}}function u(){document.hidden||l()}l();let d=window.setInterval(u,tm);return window.addEventListener(`focus`,u),()=>{a=!1,window.clearInterval(d),window.removeEventListener(`focus`,u)}},[e,t,n,a]),(0,U.useEffect)(()=>{if(t===null)return;let n={projectId:t},r=!0,i=!1;async function a(){if(!document.hidden)try{await L(e,`git.fetch`,n),r&&(i=!1,o(e=>e+1))}catch(e){r&&!i&&(i=!0,c(e))}}a();let s=window.setInterval(a,nm);return()=>{r=!1,window.clearInterval(s)}},[e,t]);let s=(0,U.useCallback)(()=>o(e=>e+1),[]);return{repos:r!==null&&t!==null&&r.key===P(e,t)?r.repos:[],refresh:s}}function im(e){let[t,n]=(0,U.useState)(null),[r,i]=(0,U.useState)(!1),[a,o]=(0,U.useState)(null),[s,l]=(0,U.useState)(!1),u=$p(e.repos,`commit`);async function d(){if(u.length===1)i(!1),Lp(e,u[0].path,``,!1);else{l(!0);try{for(let t of u)await L(e.machine,`git.commit`,{projectId:e.projectId,repo:t.path,message:``,push:!1});i(!1)}catch(e){c(e)}finally{l(!1),e.onRefresh()}}}return{target:e,action:t,setAction:n,menuOpen:r,setMenuOpen:i,branchRepo:a,setBranchRepo:o,committing:s,committable:u,yoloCommit:d}}function am(e){let t=e.git,n=t.target.repos,r=n.reduce((e,t)=>e+t.ahead,0),i=$p(n,`push`);function a(e){Ip({labels:{working:`Pushing…`,done:`Pushed`,failed:`Push failed`},task:async()=>(await L(t.target.machine,`git.push`,{projectId:t.target.projectId,repo:e}),null),onRefresh:t.target.onRefresh})}return(0,W.jsxs)(W.Fragment,{children:[e.collapsed&&n.map(e=>(0,W.jsxs)(Nr,{onSelect:()=>t.setBranchRepo(e.path),children:[(0,W.jsx)(V,{icon:Zn}),(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)(Dr,{behind:e.behind,ahead:e.ahead})})]},e.path)),e.collapsed&&(0,W.jsxs)(Nr,{disabled:t.committable.length===0,onSelect:()=>t.setAction(`commit`),children:[(0,W.jsx)(V,{icon:ss}),`Commit`]}),(0,W.jsxs)(Nr,{disabled:i.length===0||t.committing,onSelect:()=>{i.length===1?a(i[0].path):t.setAction(`push`)},children:[(0,W.jsx)(V,{icon:Bn}),`Just Push`,r>0&&(0,W.jsxs)(`span`,{className:`text-muted-foreground ml-auto text-xs tabular-nums`,children:[`↑`,r]})]}),(0,W.jsxs)(Nr,{disabled:t.committable.length===0||t.committing,onSelect:e=>{e.preventDefault(),t.yoloCommit()},children:[(0,W.jsx)(V,{icon:t.committing?Mr:ss,className:z(t.committing&&`animate-spin`)}),t.committing?`Committing…`:`Yolo Commit`]}),(0,W.jsxs)(Nr,{disabled:$p(n,`pullRequest`).length===0,onSelect:()=>t.setAction(`pullRequest`),children:[(0,W.jsx)(V,{icon:us}),`Create pull request`]})]})}function om(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)(Qp,{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)(kn,{machine:t.target.machine,projectId:t.target.projectId,repo:n,onRefresh:t.target.onRefresh,onClose:()=>t.setBranchRepo(null)})]})}function sm(e){let t=im(e),[n,r]=(0,U.useState)(!1),i=[...new Set(e.repos.map(e=>e.branch??`detached`))],a=e.repos.flatMap(e=>{let t=jn(e);return t===null?[]:[{repo:e,next:t}]}),o=e.repos.map(e=>e.path===``?e.branch??`detached`:`${e.path}: ${e.branch??`detached`}`).join(`
|
|
13
|
-
`),s=i.length===1?i[0]:`${i.length} branches`;async function l(t){r(!0);try{await L(e.machine,`git.sync`,{projectId:e.projectId,repo:t})}catch(e){c(e)}finally{r(!1),e.onRefresh()}}return(0,W.jsxs)(W.Fragment,{children:[e.repos.length===1&&(0,W.jsx)(sn,{machine:e.machine,projectId:e.projectId,repo:e.repos[0],onRefresh:e.onRefresh}),e.repos.length>1&&a.length===0&&(0,W.jsxs)(`span`,{className:`text-muted-foreground hidden max-w-48 items-center gap-1 text-xs sm:flex`,title:o,children:[(0,W.jsx)(V,{icon:Zn,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:s})]}),e.repos.length>1&&a.length>0&&(0,W.jsxs)(hn,{children:[(0,W.jsx)(gn,{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:o,children:[(0,W.jsx)(V,{icon:n?Mr:a.length===1?a[0].next.icon:Mn,className:z(`size-3.5 shrink-0`,n&&`animate-spin`)}),(0,W.jsx)(`span`,{className:`truncate`,children:s})]})}),(0,W.jsx)(On,{align:`end`,className:`w-64`,children:a.map(e=>(0,W.jsxs)(Nr,{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)(Dr,{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:ss}),(0,W.jsx)(`span`,{className:`hidden sm:inline`,children:`Commit`})]}),(0,W.jsxs)(hn,{open:t.menuOpen,onOpenChange:t.setMenuOpen,children:[(0,W.jsx)(gn,{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?Mr:Ir,className:z(`size-4`,t.committing&&`animate-spin`)})})}),(0,W.jsx)(On,{align:`end`,className:`w-56`,children:(0,W.jsx)(am,{git:t,collapsed:!1})})]})]}),(0,W.jsx)(om,{git:t})]})}function cm({className:e,size:t=`default`,...n}){return(0,W.jsx)(Qu,{"data-slot":`switch`,"data-size":t,className:z(`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)(J,{"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 lm=`3.6.8`,um=`1.3.1`,dm=[{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`}],fm=[{value:`macos`,label:`macOS`},{value:`linux`,label:`Linux`},{value:`windows`,label:`Windows`}];async function pm(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 mm(e,t){let n=te();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:hm(t),clickToMoveCursor:e.behavior.clickToMoveCursor,optionAsMeta:e.behavior.optionAsMeta,windowsCopyPaste:e.behavior.windowsCopyPaste}}function hm(e){if(e===`offsite`)return`offsite 0.0.0`;if(e===`ghostty`)return`ghostty ${um}`;if(e===`iterm2`)return`iTerm2 ${lm}`;throw Error(`unknown terminal identity ${e}`)}function gm(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 _m(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)(Vp,{className:z(`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 vm(e){return(0,W.jsx)(_m,{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 ym(e){let t=e.prefs.editor,[n,r]=(0,U.useState)(!dm.some(e=>e.family===t.font.family));function i(t){Ye({...e.prefs,editor:t})}function a(e,n){i({...t,[e]:{...t[e],...n}})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(gm,{title:`Font`,children:[(0,W.jsx)(Q,{label:`Family`,children:(0,W.jsxs)(Hp,{value:n?`custom`:t.font.family,onValueChange:e=>{r(e===`custom`),e!==`custom`&&a(`font`,{family:e})},children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[dm.map(e=>(0,W.jsx)(Kp,{value:e.family,children:e.label},e.family)),(0,W.jsx)(Kp,{value:`custom`,children:`Custom`})]})]})}),n&&(0,W.jsx)(Q,{label:`Custom family`,children:(0,W.jsx)(_m,{placeholder:`Installed font name`,value:t.font.family,onCommit:e=>a(`font`,{family:e})})}),(0,W.jsx)(Q,{label:`Size`,children:(0,W.jsx)(vm,{value:t.font.size,step:.5,onCommit:e=>a(`font`,{size:e})})}),(0,W.jsx)(Q,{label:`Line height`,children:(0,W.jsx)(vm,{value:t.font.lineHeight,step:.05,onCommit:e=>a(`font`,{lineHeight:e})})}),(0,W.jsx)(Q,{label:`Ligatures`,children:(0,W.jsx)(cm,{checked:t.font.ligatures,onCheckedChange:e=>a(`font`,{ligatures:e})})}),(0,W.jsx)(Q,{label:`Font features`,children:(0,W.jsx)(_m,{placeholder:`'ss01', 'zero'`,value:t.font.features,onCommit:e=>a(`font`,{features:e})})})]}),(0,W.jsxs)(gm,{title:`Cursor`,children:[(0,W.jsx)(Q,{label:`Style`,children:(0,W.jsxs)(Hp,{value:t.cursor.style,onValueChange:e=>a(`cursor`,{style:e}),children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`block`,children:`Block`}),(0,W.jsx)(Kp,{value:`bar`,children:`Bar`}),(0,W.jsx)(Kp,{value:`underline`,children:`Underline`})]})]})}),(0,W.jsx)(Q,{label:`Blink`,children:(0,W.jsx)(cm,{checked:t.cursor.blink,onCheckedChange:e=>a(`cursor`,{blink:e})})})]}),(0,W.jsxs)(gm,{title:`Text`,children:[(0,W.jsx)(Q,{label:`Tab size`,children:(0,W.jsx)(vm,{value:t.tabSize,onCommit:e=>i({...t,tabSize:e})})}),(0,W.jsx)(Q,{label:`Word wrap`,children:(0,W.jsx)(cm,{checked:t.wordWrap,onCheckedChange:e=>i({...t,wordWrap:e})})})]})]})}var bm=[{id:`original`,name:`Original`,scale:1,tile:null},{id:`small`,name:`Small`,scale:.7,tile:null},{id:`dark`,name:`Dark`,scale:.7,tile:{color:`#0a0a0a`,shape:`rounded`}},{id:`light`,name:`Light`,scale:.7,tile:{color:`#ffffff`,shape:`rounded`}},{id:`dark-circle`,name:`Dark circle`,scale:.62,tile:{color:`#0a0a0a`,shape:`circle`}},{id:`light-circle`,name:`Light circle`,scale:.62,tile:{color:`#ffffff`,shape:`circle`}},{id:`dark-square`,name:`Dark square`,scale:.7,tile:{color:`#0a0a0a`,shape:`square`}},{id:`light-square`,name:`Light square`,scale:.7,tile:{color:`#ffffff`,shape:`square`}}],xm=Fe.withTag(`settings`);function Sm(e){let t=e.prefs;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(gm,{title:`Appearance`,children:(0,W.jsx)(Q,{label:`Theme`,children:(0,W.jsxs)(Hp,{value:t.theme,onValueChange:e=>Ye({...t,theme:e}),children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsx)(Gp,{children:ae.map(e=>(0,W.jsx)(Kp,{value:e.id,children:e.name},e.id))})]})})}),(0,W.jsx)(gm,{title:`Sidebar`,children:(0,W.jsx)(Q,{label:`Group active sessions by project in Inbox`,children:(0,W.jsx)(cm,{checked:t.groupActiveByProject,onCheckedChange:e=>Ye({...t,groupActiveByProject:e})})})}),(0,W.jsx)(Tm,{}),(0,W.jsx)(Cm,{}),(0,W.jsx)(H,{variant:`outline`,onClick:e.onRestore,children:`Restore browser defaults`})]})}function Cm(){let[e,t]=(0,U.useState)(!1),[n,r]=(0,U.useState)(null);async function i(){t(!0),r(null);try{let e=`serviceWorker`in navigator?await navigator.serviceWorker.getRegistration():void 0;if(e===void 0){let e=await fetch(`/?update=${Date.now()}`,{cache:`no-store`});if(!e.ok)throw Error(`the server answered ${e.status}`)}else{await e.update();let t=e.installing??e.waiting;t!==null&&await wm(t)}location.reload()}catch(e){xm.error(`could not update`,e),r(Ut(e)),t(!1)}}return(0,W.jsx)(gm,{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-destructive text-xs`,children:[`Could not update: `,n]}),(0,W.jsxs)(H,{size:`sm`,variant:`outline`,disabled:e,onClick:()=>void i(),children:[e&&(0,W.jsx)(V,{icon:Kn,className:`animate-spin`}),e?`Updating…`:`Update`]})]})})})}async function wm(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 Tm(){let e=k(e=>e.machines.find(e=>e.addresses.some(e=>(o??[location.origin]).includes(e))));if(e===void 0||e.appIcon===null)return null;let t=e.appIcon;return(0,W.jsx)(gm,{title:`App icon`,children:(0,W.jsx)(`div`,{className:`grid grid-cols-4 gap-2 p-3 @max-lg:grid-cols-2`,children:bm.map(n=>(0,W.jsxs)(`button`,{type:`button`,"aria-pressed":t===n.id,className:z(`hover:bg-accent flex flex-col items-center gap-2 rounded-lg border p-3 text-xs`,t===n.id&&`border-primary bg-accent`),onClick:()=>L(e.id,`appIcon.save`,n.id).catch(c),children:[(0,W.jsx)(`span`,{className:z(`flex size-12 items-center justify-center`,n.tile?.shape===`rounded`&&`rounded-[22%]`,n.tile?.shape===`circle`&&`rounded-full`,n.tile!==null&&`ring-border ring-1`),style:{background:n.tile?.color},children:(0,W.jsx)(`img`,{src:`/icon.svg`,alt:``,style:{width:`${n.scale*100}%`}})}),n.name]},n.id))})})}function Em(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(!Dm(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(!Dm(a,r))return!1;break}if(a===`b`||a===`c`||r&&`dfnprvx`.includes(a)||!r&&a===`i`)return!1}}return!0}function Dm(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 Om(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`?Em(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 km=[10,15,30,45,60,120,180,300,600,900,1800,3600];function Am(e){let t=e.config;function n(n){uo(e.machine,{...t,...n})}return(0,W.jsxs)(gm,{title:`Agents`,children:[(0,W.jsx)(Q,{label:`Send while working`,children:(0,W.jsxs)(Hp,{value:t.delivery,onValueChange:n=>{if(n!==`queue`&&n!==`steer`)throw Error(`Unknown delivery ${n}`);uo(e.machine,{...t,delivery:n})},children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`queue`,children:`Queue messages`}),(0,W.jsx)(Kp,{value:`steer`,children:`Steer the agent`})]})]})}),(0,W.jsx)(Q,{label:`Auto-skip questions`,children:(0,W.jsx)(jm,{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:[(0,W.jsxs)(Hp,{value:t.autoPermissionMode,onValueChange:e=>{if(e!==`bypass`&&e!==`allow`&&e!==`deny`)throw Error(`Unknown decision ${e}`);n({autoPermissionMode:e})},children:[(0,W.jsx)(Wp,{className:`w-24`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`bypass`,children:`Bypass`}),(0,W.jsx)(Kp,{value:`allow`,children:`Allow`}),(0,W.jsx)(Kp,{value:`deny`,children:`Deny`})]})]}),(0,W.jsx)(jm,{value:t.autoPermissionTimeout,onChange:e=>n({autoPermissionTimeout:e})})]})})]})}function jm(e){let t=e.value===null||km.includes(e.value)?km:[...km,e.value].sort((e,t)=>e-t);return(0,W.jsxs)(Hp,{value:e.value===null?`off`:String(e.value),onValueChange:t=>e.onChange(t===`off`?null:Number(t)),children:[(0,W.jsx)(Wp,{className:`w-40`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`off`,children:`Off`}),t.map(e=>(0,W.jsx)(Kp,{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 Mm(e){let t=e.config[e.setting],[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(t.provider===null)return;let n=!0;return r(null),a(null),L(e.machine,`capabilities`,{provider:t.provider,accountId:t.accountId,projectId:null}).then(e=>{n&&r(e.models)},e=>{n&&a(Ut(e))}),()=>{n=!1}},[e.machine,t.provider,t.accountId]);function o(t){uo(e.machine,{...e.config,[e.setting]:t})}function s(t){if(t===`off`){o({provider:null,accountId:null,model:null});return}if(t===`opencode`){o({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`);o({provider:n.provider,accountId:n.id,model:null})}return(0,W.jsxs)(gm,{title:e.title,children:[(0,W.jsx)(Q,{label:`Account`,children:(0,W.jsxs)(Hp,{value:t.provider===null?`off`:t.provider===`opencode`?`opencode`:t.accountId??`off`,onValueChange:s,children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`off`,children:`Off`}),[...e.claudeAccounts,...e.codexAccounts].map(e=>(0,W.jsxs)(Kp,{value:e.id,disabled:!e.valid,children:[(0,W.jsx)(pc,{provider:e.provider,className:`size-4`}),`${ir[e.provider]} · ${e.name}`]},e.id)),e.openCode.available&&(0,W.jsxs)(Kp,{value:`opencode`,children:[(0,W.jsx)(pc,{provider:`opencode`,className:`size-4`}),ir.opencode]})]})]})}),t.provider!==null&&(0,W.jsx)(Q,{label:`Model`,children:(0,W.jsxs)(Hp,{value:t.model??void 0,disabled:n===null,onValueChange:e=>o({...t,model:e}),children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{placeholder:i===null?n===null?`Loading…`:`Choose a model`:`Unavailable`})}),(0,W.jsx)(Gp,{children:(n??[]).map(e=>(0,W.jsx)(Kp,{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})]})}var Nm={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`},Pm={zsh:`zsh`,bash:`bash`,fish:`fish`,pwsh:`powershell`,powershell:`powershell`,cmd:`cmd`},Fm={macos:[`zsh`,`bash`,`fish`,`pwsh`],linux:[`bash`,`zsh`,`fish`,`pwsh`],windows:[`pwsh`,`powershell`,`cmd`]};function Im(e){let t=e.trim().split(/[\\/]/).pop()?.toLowerCase().replace(/\.exe$/,``);return t===void 0?void 0:Pm[t]}function Lm(e){return e.replace(/[\\/][^\\/]*$/,``)}function Rm(e){return(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 flex-none`,fill:`currentColor`,children:(0,W.jsx)(`path`,{d:Nm[e.logo]})})}function zm(e){let[t,n]=(0,U.useState)(e.value??``),r=Im(t);function i(t){n(t),t!==(e.value??``)&&e.onCommit(t===``?null:t)}return(0,W.jsxs)(`div`,{className:`relative w-56`,children:[r&&(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)(Rm,{logo:r})}),(0,W.jsx)(Vp,{className:r?`pr-9 pl-8`:`pr-9`,placeholder:`System default`,value:t,onChange:e=>n(e.target.value),onBlur:()=>i(t),onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}}),(0,W.jsxs)(hn,{children:[(0,W.jsx)(gn,{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:Or})})}),(0,W.jsx)(On,{align:`end`,className:`w-72`,children:(0,W.jsx)(Bm,{machine:e.machine,platform:e.platform,device:e.device,onCommit:i})})]})]})}function Bm(e){let[t,n]=(0,U.useState)(null),[r,i]=(0,U.useState)(null),a=e.platform===e.device,o=a?t:Fm[e.platform].map(e=>({name:e,path:null}));return(0,U.useEffect)(()=>{a&&L(e.machine,`terminal.shells`,void 0).then(n,e=>i(Ut(e)))},[e.machine,a]),(0,W.jsxs)(W.Fragment,{children:[r&&(0,W.jsx)(`p`,{className:`text-destructive px-2 py-1.5 text-xs`,children:r}),o?.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-2 py-1.5 text-xs`,children:`No known shells found`}),o?.map(t=>(0,W.jsxs)(Nr,{onSelect:()=>e.onCommit(t.path??t.name),children:[(0,W.jsx)(Rm,{logo:Pm[t.name]}),t.name,t.path!==null&&(0,W.jsx)(`span`,{className:`text-muted-foreground ml-auto min-w-0 truncate pl-3 text-xs [direction:rtl]`,title:t.path,children:(0,W.jsx)(`bdi`,{children:Lm(t.path)})})]},t.path??t.name)),(0,W.jsx)(Fn,{}),(0,W.jsx)(Nr,{onSelect:()=>e.onCommit(``),children:`System default`})]})}function Vm(e){let t=e.config.workingDir[e.platform]??``;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(gm,{title:`Projects`,children:(0,W.jsx)(Q,{label:`Working directory`,children:(0,W.jsx)(_m,{className:`w-72 font-mono`,value:t,placeholder:`Home folder`,onCommit:t=>uo(e.machine,{...e.config,workingDir:{...e.config.workingDir,[e.platform]:t.trim()===``?null:t.trim()}})},`${e.machine}-${t}`)})}),(0,W.jsx)(Hm,{machine:e.machine,config:e.config,platform:e.platform,defaultShell:e.defaultShell},e.machine),(0,W.jsx)(Am,{machine:e.machine,config:e.config}),(0,W.jsx)(Mm,{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)(Mm,{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 Hm(e){let t=e.config.terminal,[n,r]=(0,U.useState)(e.platform),i=Om(t.shell[e.platform],e.platform,e.defaultShell);function a(t){uo(e.machine,{...e.config,terminal:t})}return(0,W.jsxs)(gm,{title:`Shell`,note:`Applies to new terminals`,children:[(0,W.jsx)(Q,{label:`Platform`,children:(0,W.jsxs)(Hp,{value:n,onValueChange:e=>r(e),children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsx)(Gp,{children:fm.map(t=>(0,W.jsxs)(Kp,{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)(zm,{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)(Yr,{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:hs,"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)(cm,{checked:i===null&&t.behavior.shellIntegration,disabled:i!==null,onCheckedChange:e=>a({...t,behavior:{...t.behavior,shellIntegration:e}})})]})}),(0,W.jsx)(Um,{identity:t.behavior.terminalIdentity,onChange:e=>a({...t,behavior:{...t.behavior,terminalIdentity:e}})})]})}function Um(e){return(0,W.jsx)(Q,{label:`Report the terminal as`,children:(0,W.jsxs)(Hp,{value:e.identity,onValueChange:e.onChange,children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`offsite`,children:`OffSite`}),(0,W.jsx)(Kp,{value:`ghostty`,children:`Ghostty`}),(0,W.jsx)(Kp,{value:`iterm2`,children:`iTerm2`})]})]})})}var Wm=(0,U.createContext)({});function Gm(e){let t=(0,U.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Km=typeof window<`u`?U.useLayoutEffect:U.useEffect,qm=(0,U.createContext)(null);function Jm(e,t){e.indexOf(t)===-1&&e.push(t)}function Ym(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Xm([...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 Zm=(e,t,n)=>n>t?t:n<e?e:n,Qm={},$m=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),eh=e=>typeof e==`object`&&!!e,th=e=>/^0[^.\s]+$/u.test(e);function nh(e){let t;return()=>(t===void 0&&(t=e()),t)}var rh=e=>e,ih=(...e)=>e.reduce((e,t)=>n=>t(e(n))),ah=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},oh=class{constructor(){this.subscriptions=[]}add(e){return Jm(this.subscriptions,e),()=>this.remove(e)}remove(e){Ym(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}},sh=e=>e*1e3,ch=e=>e/1e3,lh=(e,t)=>t?1e3/t*e:0,uh=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function dh(e,t,n,r){return e===t&&n===r?rh:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=uh(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(uh(s+1e-7,e,n)-i-r)}return uh(s,t,r)}}var fh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ph=e=>t=>1-e(1-t),mh=dh(.33,1.53,.69,.99),hh=ph(mh),gh=fh(hh),_h=e=>e>=1?1:(e*=2)<1?.5*hh(e):.5*(2-2**(-10*(e-1))),vh=e=>1-Math.sin(Math.acos(e)),yh=ph(vh),bh=fh(vh),xh=dh(.42,0,1,1),Sh=dh(0,0,.58,1),Ch=dh(.42,0,.58,1),wh=e=>Array.isArray(e)&&typeof e[0]!=`number`,Th=e=>Array.isArray(e)&&typeof e[0]==`number`,Eh={linear:rh,easeIn:xh,easeInOut:Ch,easeOut:Sh,circIn:vh,circInOut:bh,circOut:yh,backIn:hh,backInOut:gh,backOut:mh,anticipate:_h},Dh=e=>typeof e==`string`,Oh=e=>{if(Th(e)){let[t,n,r,i]=e;return dh(t,n,r,i)}return Dh(e)?Eh[e]:e},kh={delta:0,timestamp:0,isProcessing:!1},Ah;function jh(){Ah=void 0}var Mh={now:()=>(Ah===void 0&&Mh.set(kh.isProcessing||Qm.useManualTiming?kh.timestamp:performance.now()),Ah),set:e=>{Ah=e,queueMicrotask(jh)}},Nh=e=>Math.round(e*1e5)/1e5,Ph=e=>t=>typeof t==`string`&&t.startsWith(e),Fh=Ph(`--`),Ih=Ph(`var(--`),Lh=e=>Ih(e)?Rh.test(e.split(`/*`)[0].trim()):!1,Rh=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function zh(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Bh={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Vh={...Bh,transform:e=>Zm(0,1,e)},Hh={...Bh,default:1},Uh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Wh(e){return e==null}var Gh=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kh=(e,t)=>n=>!!(typeof n==`string`&&Gh.test(n)&&n.startsWith(e)||t&&!Wh(n)&&Object.prototype.hasOwnProperty.call(n,t)),qh=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Uh);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Jh=e=>Zm(0,255,e),Yh={...Bh,transform:e=>Math.round(Jh(e))},Xh={test:Kh(`rgb`,`red`),parse:qh(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Yh.transform(e)+`, `+Yh.transform(t)+`, `+Yh.transform(n)+`, `+Nh(Vh.transform(r))+`)`},Zh=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function Qh(e){let t=e.length>5?2:1,n=Zh(e,3,t);return{red:parseInt(Zh(e,0,t),16),green:parseInt(Zh(e,1,t),16),blue:parseInt(Zh(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var $h={test:Kh(`#`),parse:Qh,transform:Xh.transform},eg=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tg=eg(`deg`),ng=eg(`%`),$=eg(`px`),rg=eg(`vh`),ig=eg(`vw`),ag={...ng,parse:e=>ng.parse(e)/100,transform:e=>ng.transform(e*100)},og={test:Kh(`hsl`,`hue`),parse:qh(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+ng.transform(Nh(t))+`, `+ng.transform(Nh(n))+`, `+Nh(Vh.transform(r))+`)`},sg={test:e=>Xh.test(e)||$h.test(e)||og.test(e),parse:e=>Xh.test(e)?Xh.parse(e):og.test(e)?og.parse(e):$h.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Xh.transform(e):og.transform(e),getAnimatableNone:e=>{let t=sg.parse(e);return t.alpha=0,sg.transform(t)}},cg=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lg=new RegExp(Uh.source),ug=new RegExp(cg.source,`i`);function dg(e){return isNaN(e)&&typeof e==`string`&&(lg.test(e)||ug.test(e))}var fg=`number`,pg=`color`,mg=`var`,hg=`var(`,gg="${}",_g=/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 vg(e){let t=e.toString();return lg.test(t)||ug.test(t)}function yg(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(_g,e=>(sg.test(e)?(r.color.push(a),i.push(pg),n.push(sg.parse(e))):e.startsWith(hg)?(r.var.push(a),i.push(mg),n.push(e)):(r.number.push(a),i.push(fg),n.push(parseFloat(e))),++a,gg)).split(gg),indexes:r,types:i}}function bg(e){return yg(e).values}function xg({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===fg?Nh(r[a]):e===pg?sg.transform(r[a]):r[a]}return i}}function Sg(e){return xg(yg(e))}var Cg=e=>typeof e==`number`?0:sg.test(e)?sg.getAnimatableNone(e):e,wg=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Cg(e);function Tg(e){let t=yg(e);return xg(t)(t.values.map((e,n)=>wg(e,t.split[n])))}var Eg={test:dg,parse:bg,createTransformer:Sg,getAnimatableNone:Tg};function Dg(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 Og({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=Dg(s,r,e+1/3),a=Dg(s,r,e),o=Dg(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function kg(e,t){return n=>n>0?t:e}var Ag=(e,t,n)=>e+(t-e)*n,jg=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Mg=[$h,Xh,og],Ng=e=>Mg.find(t=>t.test(e));function Pg(e){let t=Ng(e);if(!t)return!1;let n=t.parse(e);return t===og&&(n=Og(n)),n}var Fg=(e,t)=>{let n=Pg(e),r=Pg(t);if(!n||!r)return kg(e,t);let i={...n};return e=>(i.red=jg(n.red,r.red,e),i.green=jg(n.green,r.green,e),i.blue=jg(n.blue,r.blue,e),i.alpha=Ag(n.alpha,r.alpha,e),Xh.transform(i))},Ig=new Set([`none`,`hidden`]);function Lg(e,t){return Ig.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Rg(e,t){return n=>Ag(e,t,n)}function zg(e){return typeof e==`number`?Rg:typeof e==`string`?Lh(e)?kg:sg.test(e)?Fg:Ug:Array.isArray(e)?Bg:typeof e==`object`?sg.test(e)?Fg:Vg:kg}function Bg(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>zg(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Vg(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=zg(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Hg(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 Ug=(e,t)=>{let n=yg(e),r=yg(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?Ig.has(e)&&!r.values.length||Ig.has(t)&&!n.values.length?Lg(e,t):ih(Bg(Hg(n,r),r.values),xg(r)):kg(e,t)},Wg=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Gg(e,t){let n=Wg.exec(e);if(!n)return;let r=Wg.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Nh(Ag(a,o,e))+i}function Kg(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Ag(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Gg(e,t);if(n)return n}return zg(e)(e,t)}var qg=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Jg(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 Yg=40;function Xg(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=qg.reduce((e,t)=>(e[t]=Jg(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Qm.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Yg),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:qg.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<qg.length;t++)o[qg[t]].cancel(e)},state:n,steps:o}}var{schedule:Zg,cancel:Qg,steps:$g}=Xg(typeof requestAnimationFrame<`u`?requestAnimationFrame:rh,!0,kh),e_=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Zg.update(t,e),stop:()=>Qg(t),now:()=>kh.isProcessing?kh.timestamp:Mh.now()}},t_=(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)})`},n_=2e4;function r_(e,t=50,n=n_,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 i_(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(r_(o),n_);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:ch(s)}}var a_=100,o_=10,s_=1,c_=800,l_=.3,u_=.3,d_=.01,f_=2,p_=.005,m_=.5,h_=.01,g_=10,__=.05,v_=e=>e<0?1/Math.max(1+e,__):Math.max(1-e,__);function y_(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 S_(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function b_(e,t){return e*Math.sqrt(1-t*t)}var x_=12;function S_(e,t,n){let r=n;for(let n=1;n<x_;n++)r-=e(r)/t(r);return r}var C_=.001;function w_({duration:e=c_,bounce:t=l_}){let n,r,i=v_(t);e=Zm(h_,g_,ch(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=b_(t,i),o=Math.exp(-r);return C_-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=b_(t*t,i);return(-n(t)+C_>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=S_(n,r,a),s=o*y_(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:sh(e)}}var T_=(e,t)=>(t?e>=0:e>0)&&e<1/0;function E_(e,t){if(T_(e,t))return e}function D_(e){let t=E_(e.stiffness),n=E_(e.damping,!0),r=E_(e.mass),i={...e,stiffness:t??a_,damping:n??o_,mass:r??s_,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=v_(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*y_(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,w_(i)),i.isResolvedFromDuration=!0;T_(i.stiffness)&&T_(i.damping,!0)||(i.stiffness=a_,i.damping=o_)}return i}function O_(e=u_,t=l_){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}=D_({...n}),f=e=>d?0:-ch(e),p=s/(2*Math.sqrt(o*c)),m=ch(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?d_:f_),g.restDelta=n.restDelta||(e?p_:m_)};_();let v,y,b;if(p<1){let e=b_(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=>sh(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=sh(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(r_(S),n_),t=t_(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var k_=Object.assign(O_,{applyToOptions:e=>{let t=i_(e,100,O_);return e.ease=t.ease,e.duration=sh(t.duration),e.type=`keyframes`,e}});function A_({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=k_({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 j_(e,t,n){let r=[],i=Qm.mix||Kg,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=ih(Array.isArray(t)?t[o]||rh:t,a)),r.push(a)}return r}function M_(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=j_(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=ah(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Zm(e[0],e[a-1],t)):l}function N_(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ah(0,t,r);e.push(Ag(n,1,i))}}function P_(e){let t=[0];return N_(t,e.length-1),t}function F_(e,t){return e.map(e=>e*t)}function I_(e,t){return e.map(()=>t||Ch).splice(0,e.length-1)}function L_({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=wh(r)?r.map(Oh):Oh(r)||Ch,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:(Qm.mix||Kg)(n,r);return{calculatedDuration:e,next:t=>(s.value=i?i(o(e>0?Zm(0,1,t/e):1)):r,s.done=t>=e,s)}}let c=M_(F_(n&&n.length===t.length?n:P_(t),e),t,{ease:Array.isArray(o)?o:I_(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=c(t),s.done=t>=e,s)}}var R_=5;function z_(e,t,n){let r=Math.max(t-R_,0);return lh(n-e(r),t-r)}function B_(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):z_(t=>e.next(t).value,t,e.next(t).value)}var V_=e=>e!==null;function H_(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(V_),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var U_={decay:A_,inertia:A_,tween:L_,keyframes:L_,spring:k_};function W_(e){typeof e.type==`string`&&(e.type=U_[e.type])}var G_=40,K_=(e,t)=>t-e>G_&&!Qm.useManualTiming?t:e;function q_(e,t){return{kind:e,animation:t,timestamp:Mh.now(),frameTimestamp:kh.timestamp,frameIsProcessing:kh.isProcessing}}function J_(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...q_(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Y_(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...q_(`layout-animation-start`,e),node:t})}catch{}}var X_=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)}},Z_=e=>e/100,Q_=e=>Math.round(e*1e4)/1e4,$_=class extends X_{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!==Mh.now()&&this.tick(Mh.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),J_(this,this.options)}initAnimation(){let{options:e}=this;W_(e);let{type:t=L_,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||L_;this.mixKeyframes=void 0,s!==L_&&typeof o[0]!=`number`&&(this.mixKeyframes=ih(Z_,e.mixer?.(o[0],o[1])||Kg(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=r_(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=K_(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!==A_&&(f.value=H_(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??Q_((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!==A_?H_(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=Zm(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 ch(this.calculatedDuration)}get iterationDuration(){return this.duration+ch(this.options.delay??0)}get time(){return ch(this.currentTime)}set time(e){e=sh(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 B_(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(Mh.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ch(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=e_,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(Mh.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)}},ev=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function tv(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Uh)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ev.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var nv=/\b([a-z-]*)\(.*?\)/gu,rv={...Eg,getAnimatableNone:e=>{let t=e.match(nv);return t?t.map(tv).join(` `):e}},iv={...Eg,getAnimatableNone:e=>{let t=Eg.parse(e);return Eg.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},av={...Bh,transform:Math.round},ov={rotate:tg,pathRotation:tg,rotateX:tg,rotateY:tg,rotateZ:tg,scale:Hh,scaleX:Hh,scaleY:Hh,scaleZ:Hh,skew:tg,skewX:tg,skewY:tg,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:Vh,originX:ag,originY:ag,originZ:$},sv={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:$,...ov,zIndex:av,fillOpacity:Vh,strokeOpacity:Vh,numOctaves:av},cv={...sv,color:sg,backgroundColor:sg,outlineColor:sg,fill:sg,stroke:sg,borderColor:sg,borderTopColor:sg,borderRightColor:sg,borderBottomColor:sg,borderLeftColor:sg,filter:rv,WebkitFilter:rv,mask:iv,WebkitMask:iv},lv=e=>cv[e],uv=new Set([rv,iv]);function dv(e,t){let n=lv(e);return uv.has(n)||(n=Eg),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function fv(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var pv=e=>e*180/Math.PI,mv=e=>gv(pv(Math.atan2(e[1],e[0]))),hv={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:mv,rotateZ:mv,skewX:e=>pv(Math.atan(e[1])),skewY:e=>pv(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},gv=e=>(e%=360,e<0&&(e+=360),e),_v=mv,vv=e=>Math.hypot(e[0],e[1]),yv=e=>Math.hypot(e[4],e[5]),bv={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vv,scaleY:yv,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(vv(e)+yv(e))/2,rotateX:e=>gv(pv(Math.atan2(e[6],e[5]))),rotateY:e=>gv(pv(Math.atan2(-e[2],e[0]))),rotateZ:_v,rotate:_v,skewX:e=>pv(Math.atan(e[4])),skewY:e=>pv(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xv(e){return+!!e.includes(`scale`)}function Sv(e,t){if(!e||e===`none`)return xv(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return xv(t);let r=(n[1]?bv:hv)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var Cv=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Sv(n,t)},wv=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Tv=new Set([...wv,`pathRotation`]),Ev=e=>e===Bh||e===$,Dv=new Set([`x`,`y`,`z`]),Ov=wv.filter(e=>!Dv.has(e));function kv(e){let t=[];return Ov.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 Av=new Set([`bottom`,`right`]);function jv(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 Mv=({transform:e})=>Sv(e,`x`),Nv=({transform:e})=>Sv(e,`y`),Pv={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>jv(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>jv(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:Mv,y:Nv,translateX:Mv,translateY:Nv},Fv=new Set,Iv=!1,Lv=!1,Rv=!1;function zv(){if(Lv){let e=[],t=new Set,n=new Set;Fv.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Av.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=kv(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)})}Lv=!1,Iv=!1,Fv.forEach(e=>e.complete(Rv)),Fv.clear()}function Bv(){Fv.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Lv=!0)})}function Vv(){Rv=!0,Bv(),zv(),Rv=!1}function Hv(e,t,n){if(typeof e==`string`){if($m(e)||th(e))return parseFloat(e);if(!Eg.test(e)&&Eg.test(n))return dv(t,n)}return e??void 0}var Uv=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?(Fv.add(this),Iv||(Iv=!0,Zg.read(Bv),Zg.resolveKeyframes(zv))):(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=Hv(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])}fv(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Fv.delete(this)}cancel(){this.state===`scheduled`&&(Fv.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Wv=e=>e.startsWith(`--`);function Gv(e,t,n){Wv(t)?e.style.setProperty(t,n):e.style[t]=n}var Kv={};function qv(e,t){let n=nh(e);return()=>Kv[t]??n()}var Jv=qv(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Yv=qv(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Xv=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zv={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Xv([0,.65,.55,1]),circOut:Xv([.55,0,1,.45]),backIn:Xv([.31,.01,.66,-.59]),backOut:Xv([.33,1.53,.69,.99])};function Qv(e,t){if(e)return typeof e==`function`?Yv()?t_(e,t):`ease-out`:Th(e)?Xv(e):Array.isArray(e)?e.map(e=>Qv(e,t)||Zv.easeOut):Zv[e]}function $v(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=Qv(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 ey(e){return typeof e==`function`&&`applyToOptions`in e}function ty({type:e,...t}){return ey(e)&&Yv()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var ny=class extends X_{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=ty(e);this.animation=$v(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=H_(r,this.options,o,this.speed);this.updateMotionValue?.(e),Gv(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},J_(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 ch(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ch(e)}get time(){return ch(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=sh(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&&Jv()?(this.animation.timeline=e,t?.(this.animation),rh):n(this)}},ry={anticipate:_h,backInOut:gh,circInOut:bh};function iy(e){return e in ry}function ay(e){typeof e.ease==`string`&&iy(e.ease)&&(e.ease=ry[e.ease])}var oy=class extends ny{constructor(e){ay(e),W_(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Mh.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 $_({...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?Zm(0,10,a):0,s=this.sample(a);n&&r&&Gv(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},sy=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Eg.test(e)||e===`0`)&&!e.startsWith(`url(`));function cy(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 ly(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=sy(i,t),s=sy(a,t);return!o||!s?!1:cy(e)||(n===`spring`||ey(n))&&r}function uy(e){e.duration=0,e.type=`keyframes`}var dy=new Set([`opacity`,`clipPath`,`filter`,`transform`]),fy=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function py(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&fy.test(e[t]))return!0;return!1}var my=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),hy=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),gy=()=>!Qm.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function _y(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(dy.has(n)||hy.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 gy()&&(dy.has(n)||hy.has(n)&&py(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!my(e)}var vy=(e,t)=>t&&typeof e==`number`?t.transform(e):e,yy={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},by=wv.length,xy={},Sy=(e,t,n=vy(t,ov[e]))=>(xy[e]||(xy[e]=(yy[e]||e)+`(`))+n+`)`,Cy=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function wy(e,t,n){let r=``;for(let i=0;i<by;i++){let a=wv[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=vy(o,sv[a]));Cy(a,o)||(r+=Sy(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Sy(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Ty=new WeakMap,Ey=200,Dy=.001,Oy=.1,ky=.001,Ay=100,jy=e=>/^(linear|ease(In|Out|InOut))$/.test(e),My=(e,t)=>Math.abs(e-t)<=Dy,Ny=(e,t)=>e-t,Py=(e,t,n)=>P_(Array(n+1)).map(n=>Ag(e,t,n)),Fy=e=>e.motionValue.owner,Iy=e=>Ty.get(e),Ly=({state:e})=>e===`idle`||e===`finished`,Ry=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),zy=({name:e,motionValue:t})=>e&&wv.includes(e)&&t?.owner?.current instanceof HTMLElement&&gy()&&Yv();function By(e){let t=Fy(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(Ry(t,`transform`)||`none`)===`none`&&!Ry(t,`pathRotation`)&&!t.projection?.isProjecting()&&!my(e)}var Vy=class extends $_{constructor(e){let t=Fy(e).current,{driver:n=e_}=e,r,i=By(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=Iy(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=Iy(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 Iy(Fy(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(Mh.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=Th(n)?Xv(n):jy(n)&&Zv[n];if(o&&!i&&!r&&e.length===2&&t===L_&&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||L_)===L_?u||P_(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=Mh.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||Hy(Fy(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(Mh.now())}get time(){return this.isAccelerated()?ch(Zm(0,this.totalDuration,this.at(Mh.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 Hy(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?wv:a){let a=r.get(s),c=t===void 0?Ry(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&&Cy(r,i)||(n+=Sy(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=Mh.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(Ey,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=Py(t,n,i).concat(r).sort(Ny),o=e=>ah(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)*Dy>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)=>!My(e,o&&s[t])))return}if(!s||s.every((e,t)=>My(e,o(a[t]))))return`linear`;let l=[],u=(e,t=c(e))=>l.push(Q_(t)+` `+Q_(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`)?ky:Oy))),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=Py(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(Ny))e>c&&o(c,e,0),c=e;return i.sort(Ny)},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=>ah(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=wv.filter(t=>{if(r.has(t))return!0;let n=i[t]=Ry(e,t);return n!==void 0&&!Cy(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,Iy(t)===A&&Ty.delete(t),A.isJS||v(),!0),k=()=>{let t=Mh.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]=Ry(e,n.name),o.has(n)||(c=!0))}),A.isFinishing=!1),l=!1,u||(n.forEach(e=>Ly(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<Ay)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,kh.isProcessing?Zg.render(k,!1,!0):queueMicrotask(k)))},release(e){Ly(e)&&n.delete(e),O()||A.schedule(!0)},check(){if(!A.isJS){for(let t in i)if(Ry(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 Ty.set(t,A),A}var Uy=class extends X_{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Mh.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||Uv;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=Mh.now();let u=ly(e,i,a,o);u||((Qm.instantAnimations||!s)&&l?.(H_(e,n,t)),e[0]=e[e.length-1],uy(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&_y(n),p=!f&&zy(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=K_(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new oy(n)}catch{m=new $_(n)}}else m=p?new Vy(n):new $_(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(),Vv()),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 Wy(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 Gy=30,Ky=e=>!isNaN(parseFloat(e)),qy={current:void 0},Jy=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Mh.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=Mh.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ky(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 oh)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new oh,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(){Zg.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=Mh.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(){qy.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=Mh.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Gy)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Gy);return lh(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 Yy(e,t){return new Jy(e,t)}function Xy(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Zy(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Xy(n,e)}var Qy={type:`spring`,stiffness:500,damping:25,restSpeed:10},$y=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),eb={type:`keyframes`,duration:.8},tb={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},nb=(e,{keyframes:t})=>t.length>2?eb:Tv.has(e)?e.startsWith(`scale`)?$y(t[1]):Qy:tb,rb=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function ib(e){for(let t in e)if(!rb.has(t))return!0;return!1}var ab=(e,t,n,r={},i,a)=>o=>{let s=Zy(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=sh(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};ib(s)||Object.assign(u,nb(e,u)),u.duration&&=sh(u.duration),u.repeatDelay&&=sh(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(uy(u),u.delay===0&&(d=!0)),(Qm.instantAnimations||Qm.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,uy(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=H_(u.keyframes,s);if(e!==void 0){Zg.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new $_(u):new Uy(u)},ob=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sb(e){let t=ob.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function cb(e,t,n=1){let[r,i]=sb(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return $m(e)?parseFloat(e):e}return Lh(i)?cb(i,t,n+1):i}function lb(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ub(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...lb(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function db(e,t,n){return ub(e.getProps(),t,n,e)}var fb=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,pb=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...wv]),mb=e=>Array.isArray(e);function hb(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yy(n))}function gb(e){return mb(e)?e[e.length-1]||0:e}function _b(e,t){let{transitionEnd:n={},transition:r={},...i}=db(e,t)||{};i={...i,...n};for(let t in i)hb(e,t,gb(i[t]))}var vb=e=>!!(e&&e.getVelocity);function yb(e){return!!(vb(e)&&e.add)}function bb(e,t){let n=e.getValue(`willChange`);if(yb(n))return n.add(t);if(!n&&Qm.WillChange){let n=new Qm.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var xb=`data-framer-appear-id`;function Sb(e){return e.props[xb]}var Cb=typeof window<`u`;function wb({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Tb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Xy(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&&wb(f,t))continue;let o={delay:n,...Zy(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){Zg.update(()=>r.set(i));continue}let p=!1;if(Cb&&window.MotionHandoffAnimation){let n=Sb(e);if(n){let e=window.MotionHandoffAnimation(n,t,Zg);e!==null&&(o.startTime=e,p=!0)}}bb(e,t);let m=l??e.shouldReduceMotion;r.start(ab(t,r,i,m&&pb.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Zg.update(()=>{o&&_b(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Eb(e,t,n={}){let r=db(e,t,fb(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Tb(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(Eb(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Wy(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 Db(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Eb(e,t,n))):typeof t==`string`?Eb(e,t,n):Promise.all(Tb(e,db(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Ob={test:e=>e===`auto`,parse:e=>e},kb=e=>t=>t.test(e),Ab=[Bh,$,ng,tg,ig,rg,Ob],jb=e=>Ab.find(kb(e));function Mb(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||th(e)}var Nb=new Set([`auto`,`none`,`0`]);function Pb(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Nb.has(t)&&vg(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=dv(n,i))}var Fb=class extends Uv{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(zh(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(),Lh(r))){let i=cb(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!pb.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=jb(r),o=jb(i);if(zh(r)!==zh(i)&&Pv[n])this.needsMeasurement=!0;else if(a!==o){if(Ev(a)&&Ev(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Pv[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Mb(e[t]))&&n.push(t);n.length&&Pb(e,n,t)}measure(){let{element:e,name:t}=this;return Pv[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()}},Ib=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function Lb(e){return eh(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Rb(e){return eh(e)&&`ownerSVGElement`in e}var zb={};function Bb(e){return zb.current?.add(e),e}var Vb=e=>zb.current?zb.current.bind(e):e;function Hb(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:zb.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function Ub(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function Wb(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(Tv.has(e))o=!0;else if(Fh(e))i[e]=n;else{let t=vy(n,sv[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=wy(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 Gb={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Kb={offset:`strokeDashoffset`,array:`strokeDasharray`};function qb(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Gb:Kb;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Jb=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Yb(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Wb(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 Jb)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&&qb(d,i,a,o,!1)}function Xb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Zb({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Qb(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 $b(e){return e===void 0||e===1}function ex({scale:e,scaleX:t,scaleY:n}){return!$b(e)||!$b(t)||!$b(n)}var tx=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function nx(e){return ex(e)||ix(e)||rx(e)}function rx(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function ix(e){return ax(e.x)||ax(e.y)}function ax(e){return e&&e!==`0%`}function ox(e,t,n){return n+t*(e-n)}function sx(e,t,n,r,i){return i!==void 0&&(e=ox(e,i,r)),ox(e,n,r)+t}function cx(e,t=0,n=1,r,i){e.min=sx(e.min,t,n,r,i),e.max=sx(e.max,t,n,r,i)}function lx(e,{x:t,y:n}){cx(e.x,t.translate,t.scale,t.originPoint),cx(e.y,n.translate,n.scale,n.originPoint)}var ux=.999999999999,dx=1.0000000000001;function fx(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&&(px(e.x,-a.scroll.offset.x),px(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,lx(e,o)),r&&(r.path?.[s]||r)!==a&&nx(a.latestValues)&&gx(e,a.latestValues,a.layout?.layoutBox));t.x<dx&&t.x>ux&&(t.x=1),t.y<dx&&t.y>ux&&(t.y=1)}function px(e,t){e.min+=t,e.max+=t}function mx(e,t,n,r,i=.5){cx(e,t,n,Ag(e.min,e.max,i),r)}function hx(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function gx(e,t,n){let r=n??e;mx(e.x,hx(t.x,r.x),t.scaleX,t.scale,t.originX),mx(e.y,hx(t.y,r.y),t.scaleY,t.scale,t.originY)}function _x(e,t){return Xb(Qb(e.getBoundingClientRect(),t))}function vx(e,t,n){let r=_x(e,n),{scroll:i}=t;return i&&(px(r.x,i.offset.x),px(r.y,i.offset.y)),r}var yx=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:bx,cancel:xx}=Xg(queueMicrotask,!1);function Sx(e,t,n){let r=vb(e)?e:Yy(e);return r.start(ab(``,r,t,n)),r.animation}var Cx={},wx={value:null,addProjectionMetrics:null,countProjection:void 0};function Tx(e,t){let n=Mh.now();e=Vb(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(Qg(r),e(a-t))};return Zg.setup(r,!0),Bb(()=>Qg(r))}function Ex(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Dx(e){return Rb(e)&&e.tagName===`svg`}function Ox(e){return vb(e)?e.get():e}var kx=e=>typeof e==`number`?e:parseFloat(e),Ax=Ib.length,jx=e=>typeof e==`number`||$.test(e);function Mx(e,t,n,r,i,a){i?(e.opacity=Ag(0,n.opacity??1,Px(r)),e.opacityExit=Ag(t.opacity??1,0,Fx(r))):a&&(e.opacity=Ag(t.opacity??1,n.opacity??1,r));for(let i=0;i<Ax;i++){let a=Ib[i],o=Nx(t,a),s=Nx(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||jx(o)===jx(s)?(e[a]=Math.max(Ag(kx(o),kx(s),r),0),(ng.test(s)||ng.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<tx.length;i++){let a=tx[i];(t[a]||n[a])&&(e[a]=Ag(t[a]||0,n[a]||0,r))}}function Nx(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Px=Ix(0,.5,yh),Fx=Ix(.5,.95,rh);function Ix(e,t,n){return r=>r<e?0:r>t?1:n(ah(e,t,r))}function Lx(e,t){e.min=t.min,e.max=t.max}function Rx(e,t){Lx(e.x,t.x),Lx(e.y,t.y)}function zx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Bx=.9999,Vx=1.0001,Hx=-.01,Ux=.01;function Wx(e){return e.max-e.min}function Gx(e,t,n){return Math.abs(e-t)<=n}function Kx(e,t,n,r=.5){e.origin=r,e.originPoint=Ag(t.min,t.max,e.origin),e.scale=Wx(n)/Wx(t),e.translate=Ag(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Bx&&e.scale<=Vx||isNaN(e.scale))&&(e.scale=1),(e.translate>=Hx&&e.translate<=Ux||isNaN(e.translate))&&(e.translate=0)}function qx(e,t,n,r){Kx(e.x,t.x,n.x,r?.originX),Kx(e.y,t.y,n.y,r?.originY)}function Jx(e,t,n,r=0){e.min=(r?Ag(n.min,n.max,r):n.min)+t.min,e.max=e.min+Wx(t)}function Yx(e,t,n,r){Jx(e.x,t.x,n.x,r?.x),Jx(e.y,t.y,n.y,r?.y)}function Xx(e,t,n,r=0){let i=r?Ag(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Wx(t)}function Zx(e,t,n,r){Xx(e.x,t.x,n.x,r?.x),Xx(e.y,t.y,n.y,r?.y)}function Qx(e,t,n,r,i){return e-=t,e=ox(e,1/n,r),i!==void 0&&(e=ox(e,1/i,r)),e}function $x(e,t=0,n=1,r=.5,i,a=e,o=e){if(ng.test(t)&&(t=parseFloat(t),t=Ag(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Ag(a.min,a.max,r);e===a&&(s-=t),e.min=Qx(e.min,t,n,s,i),e.max=Qx(e.max,t,n,s,i)}function eS(e,t,[n,r,i],a,o){$x(e,t[n],t[r],t[i],t.scale,a,o)}var tS=[`x`,`scaleX`,`originX`],nS=[`y`,`scaleY`,`originY`];function rS(e,t,n,r){eS(e.x,t,tS,n?.x,r?.x),eS(e.y,t,nS,n?.y,r?.y)}var iS=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),aS=iS(`applewebkit/`)&&!iS(`chrome/`)?Math.round:rh;function oS(e){e.min=aS(e.min),e.max=aS(e.max)}function sS(e){oS(e.x),oS(e.y)}var cS=()=>({translate:0,scale:1,origin:0,originPoint:0}),lS=()=>({x:cS(),y:cS()}),uS=()=>({min:0,max:0}),dS=()=>({x:uS(),y:uS()});function fS(e){return e.translate===0&&e.scale===1}function pS(e){return fS(e.x)&&fS(e.y)}function mS(e,t){return e.min===t.min&&e.max===t.max}function hS(e,t){return mS(e.x,t.x)&&mS(e.y,t.y)}function gS(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _S(e,t){return gS(e.x,t.x)&&gS(e.y,t.y)}function vS(e){return Wx(e.x)/Wx(e.y)}function yS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var bS=class{constructor(){this.members=[]}add(e){Jm(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||(Ym(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Ym(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 xS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var SS={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if($.test(e))e=parseFloat(e);else return e}return`${xS(e,t.target.x)}% ${xS(e,t.target.y)}%`}},CS={borderRadius:Object.assign({},SS,{applyTo:Ib.slice()}),borderTopLeftRadius:SS,borderTopRightRadius:SS,borderBottomLeftRadius:SS,borderBottomRightRadius:SS,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Eg.parse(e);if(i.length>5)return r;let a=Eg.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=Ag(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 wS(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<tx.length;e++){let t=tx[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 TS(e){return[e(`x`),e(`y`)]}var ES=(e,t)=>e.depth-t.depth,DS=class{constructor(){this.children=[],this.isDirty=!1}add(e){Jm(this.children,e),this.isDirty=!0}remove(e){Ym(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ES),this.isDirty=!1,this.children.forEach(e)}},OS={hasAnimatedSinceResize:!0,hasEverUpdated:!1},kS=[`z`,`skew`,`skewZ`],AS=1e3,jS=0;function MS(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var NS=e=>e.instance&&Ty.get(e.instance)?.demote()&&e.resetSkewAndRotation();function PS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Sb(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Zg,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&PS(r)}function FS(e){if(e)return e.options.allowProjection===!1?FS(e.parent):e.projection}function IS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Cx,{...CS,...Cx}),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:FS(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&Ex(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=jS++,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(zS),this.nodes.forEach(XS),this.nodes.forEach(ZS),this.nodes.forEach(BS),wx.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 DS)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new oh),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=Rb(t)&&!Dx(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;Zg.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=Tx(i,250),OS.hasAnimatedSinceResize&&(OS.hasAnimatedSinceResize=!1,this.nodes.forEach(YS)))})}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()||rC,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!_S(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={...Zy(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||YS(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,Qg(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(QS),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&&PS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;NS(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,NS(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(US),this.nodes.forEach(HS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(WS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(KS),this.nodes.forEach(qS),this.nodes.forEach(JS),this.nodes.forEach(LS),this.nodes.forEach(RS)):this.nodes.forEach(WS),this.clearAllSnapshots();let e=Mh.now();kh.delta=Zm(0,1e3/60,e-kh.timestamp),kh.timestamp=e,kh.isProcessing=!0,$g.update.process(kh),$g.preRender.process(kh),$g.render.process(kh),kh.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bx.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VS),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Zg.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Zg.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Wx(this.snapshot.measuredBox.x)&&!Wx(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||=dS(),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&&NS(this);let t=this.projectionDelta&&!pS(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||nx(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)),sS(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return dS();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(oC))){let{scroll:e}=this.root;e&&(px(t.x,e.offset.x),px(t.y,e.offset.y))}return t}removeElementScroll(e){let t=dS();if(Rx(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&&Rx(t,e),px(t.x,i.offset.x),px(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||dS();Rx(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&&(px(a.x,-n.scroll.offset.x),px(a.y,-n.scroll.offset.y)),nx(n.latestValues)&&gx(a,n.latestValues,n.layout?.layoutBox)}return!r&&nx(this.latestValues)&&gx(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=dS();Rx(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!nx(n.latestValues))continue;let r;n.instance&&(ex(n.latestValues)&&n.updateSnapshot(),r=dS(),Rx(r,n.measurePageBox())),rS(t,n.latestValues,n.snapshot?.layoutBox,r)}return nx(this.latestValues)&&rS(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!==kh.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=kh.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=dS(),this.targetWithTransforms=dS()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Yx(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):Rx(this.target,this.layout.layoutBox),lx(this.target,this.targetDelta)):Rx(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),wx.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||ex(this.parent.latestValues)||ix(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=dS(),this.relativeTargetOrigin=dS(),Zx(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Rx(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===kh.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;Rx(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;fx(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=dS());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zx(this.prevProjectionDelta.x,this.projectionDelta.x),zx(this.prevProjectionDelta.y,this.projectionDelta.y)),qx(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&yS(this.projectionDelta.x,this.prevProjectionDelta.x)&&yS(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),wx.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=lS(),this.projectionDelta=lS(),this.projectionDeltaWithTransform=lS()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=lS();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=dS(),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(nC));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);$S(o.x,e.x,n),$S(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&&(Zx(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),tC(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&hS(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=dS(),Rx(f,this.relativeTarget)),c&&(this.animationValues=a,Mx(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&&=(Qg(this.pendingAnimation),void 0),this.pendingAnimation=Zg.update(()=>{OS.hasAnimatedSinceResize=!0,this.motionValue||=Yy(0),this.motionValue.jump(0,!1),this.currentAnimation=Sx(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()}}),Y_(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?.(AS),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&&aC(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||dS(),iC(i.x,t.x,e.x),iC(i.y,t.y,e.y)}Rx(t,i),gx(t,r),qx(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new bS),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(!rx(t))return;let n={};for(let t=0;t<kS.length;t++)MS(kS[t],e,n,this.animationValues);for(let t=0;t<tx.length;t++)MS(tx[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=Ox(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=Ox(t?.pointerEvents)||``),this.hasProjected&&!nx(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=wS(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 Cx){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Cx[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?Ox(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(HS),this.root.sharedNodes.clear()}}}function LS(e){e.updateLayout(),GS(e)}function RS(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`)TS(e=>{let t=Wx(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`;Lx(r[e],a[e])}else aC(i,t.layoutBox,n)&&TS(t=>{let n=Wx(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=lS();qx(c,n,t.layoutBox);let l=lS();qx(l,a?e.applyTransform(r,!0):n,s);let u=!pS(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=dS();Zx(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=dS();Zx(l,n,i.layoutBox,s),a&&o(c,l),_S(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 zS(e){wx.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 BS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VS(e){e.clearSnapshot()}function HS(e){e.clearMeasurements()}function US(e){e.isLayoutDirty=!0,e.updateLayout()}function WS(e){e.isLayoutDirty=!1}function GS(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;TS(e=>px(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function KS(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function qS(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function JS(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function YS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XS(e){e.resolveTargetDelta()}function ZS(e){e.calcProjection()}function QS(e){e.resetSkewAndRotation()}function $S(e,t,n){e.translate=Ag(t.translate,0,n),e.scale=Ag(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function eC(e,t,n,r){e.min=Ag(t.min,n.min,r),e.max=Ag(t.max,n.max,r)}function tC(e,t,n,r){eC(e.x,t.x,n.x,r),eC(e.y,t.y,n.y,r)}function nC(e){return e.animationValues?.opacityExit!==void 0}var rC={duration:.45,ease:[.4,0,.1,1]};function iC(e,t,n){e.max=Wx(n)+(e.min=t.min)}function aC(e,t,n){return e===`position`||e===`preserve-aspect`&&!Gx(vS(t),vS(n),.2)}function oC(e){return e!==e.root&&e.scroll?.wasRoot}function sC(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var cC=IS({attachResizeListener:(e,t)=>sC(e,`resize`,t),measureScroll:yx,checkIsScrollRoot:()=>!0}),lC={current:void 0},uC=IS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lC.current){let e=new cC({});e.mount(window),e.setOptions({layoutScroll:!0}),lC.current=e}return lC.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),dC=new WeakMap;function fC(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function pC(e){return typeof e==`string`||Array.isArray(e)}var mC=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],hC=[`initial`].concat(mC);function gC(e){if(fC(e.animate))return!0;for(let t=0;t<hC.length;t++)if(pC(e[hC[t]]))return!0;return!1}function _C(e){return!!(gC(e)||e.variants)}function vC(e,t,n){for(let r in t){let i=t[r],a=n[r];if(vb(i))e.addValue(r,i);else if(vb(a))e.addValue(r,Yy(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,Yy(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var yC={current:null},bC={current:!1},xC=typeof window<`u`;function SC(){if(bC.current=!0,xC){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>yC.current=e.matches;e.addEventListener(`change`,t),t()}else yC.current=!1}}var CC=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],wC={};function TC(e){wC=e}function EC(){return wC}var DC=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=Uv,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=Mh.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Zg.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=gC(t),this.isVariantNode=_C(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&&vb(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,dC.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:(bC.current||SC(),this.shouldReduceMotion=yC.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Qg(this.notifyUpdate),Qg(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&&dy.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new ny({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:sh(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Tv.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Zg.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Ty.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 wC){let t=wC[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):dS()}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)&&Ty.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<CC.length;t++){let n=CC[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=vC(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=Yy(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`&&($m(n)||th(n))?n=parseFloat(n):typeof n!=`number`&&!Eg.test(n)&&Eg.test(t)&&(n=dv(e,t)),this.setBaseTarget(e,vb(n)?n.get():n)),vb(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new oh)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){bx.render(this.render)}},OC=class extends DC{constructor(){super(...arguments),this.KeyframeResolver=Fb}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;vb(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function kC(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 AC(e,{layout:t,layoutId:n}){return Tv.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Cx[e]||e===`opacity`)}function jC(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(vb(r[t])||i&&vb(i[t])||AC(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function MC(e){return window.getComputedStyle(e)}var NC=class extends OC{constructor(){super(...arguments),this.type=`html`,this.renderInstance=kC}mount(e){super.mount(e)}readValueFromInstance(e,t){if(Tv.has(t))return this.projection?.isProjecting?xv(t):Cv(e,t);{let n=MC(e),r=(Fh(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return _x(e,t)}build(e,t,n){Wb(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return jC(e,t,n)}},PC=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function FC(e){return{point:{x:e.pageX,y:e.pageY}}}var IC=e=>t=>PC(t)&&e(t,FC(t));function LC(e,t,n,r){return sC(e,t,IC(n),r)}var RC=new WeakMap,zC,BC=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Rb(r)&&`getBBox`in r?r.getBBox()[t]:r[n],VC=BC(`inline`,`width`,`offsetWidth`),HC=BC(`block`,`height`,`offsetHeight`);function UC({target:e,borderBoxSize:t}){RC.get(e)?.forEach(n=>{n(e,{get width(){return VC(e,t)},get height(){return HC(e,t)}})})}function WC(e){e.forEach(UC)}function GC(){typeof ResizeObserver<`u`&&(zC=new ResizeObserver(WC))}function KC(e,t){zC||GC();let n=Hb(e);return n.forEach(e=>{let n=RC.get(e);n||(n=new Set,RC.set(e,n)),n.add(t),zC?.observe(e)}),()=>{n.forEach(e=>{let n=RC.get(e);n?.delete(t),n?.size||zC?.unobserve(e)})}}var qC=new Set,JC;function YC(){JC=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};qC.forEach(t=>t(e))},window.addEventListener(`resize`,JC)}function XC(e){return qC.add(e),JC||YC(),()=>{qC.delete(e),!qC.size&&typeof JC==`function`&&(window.removeEventListener(`resize`,JC),JC=void 0)}}function ZC(e,t){return Bb(typeof e==`function`?XC(e):KC(e,t))}var QC=(e,t)=>Math.abs(e-t);function $C(e,t){let n=QC(e.x,t.x),r=QC(e.y,t.y);return Math.sqrt(n**2+r**2)}var ew=new Set([`auto`,`scroll`]),tw=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=rw(this.lastRawMoveEventInfo,this.transformPagePoint));let e=aw(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=$C(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Mh.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=rw(t,this.transformPagePoint),this.hasPendingMove=!0,Zg.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=aw(e.type===`pointercancel`?this.lastMoveEventInfo:rw(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!PC(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=rw(FC(e),this.transformPagePoint),{point:c}=s;this.history=[{...c,timestamp:Mh.now()}];let{onSessionStart:l}=t;l&&l(e,aw(s,this.history));let u={passive:!0,capture:!0};this.removeListeners=ih(LC(this.contextWindow,`pointermove`,this.handlePointerMove,u),LC(this.contextWindow,`pointerup`,this.handlePointerUp,u),LC(this.contextWindow,`pointercancel`,this.handlePointerUp,u)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(ew.has(e.overflowX)||ew.has(e.overflowY))&&this.scrollPositions.set(t,nw(t)),t=t.parentElement}this.scrollPositions.set(window,nw(window)),this.removeScrollListeners=ih(sC(window,`scroll`,this.onElementScroll,{capture:!0}),sC(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=nw(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),Zg.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Qg(this.updatePoint)}},nw=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function rw(e,t){return t?{point:t(e.point)}:e}function iw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function aw({point:e},t){return{point:e,delta:iw(e,sw(t)),offset:iw(e,ow(t)),velocity:cw(t,.1)}}function ow(e){return e[0]}function sw(e){return e[e.length-1]}function cw(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=sw(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>sh(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>sh(t)*2&&(r=e[1]);let a=ch(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 lw=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function uw(e){return lw.has(e.tagName)||e.isContentEditable===!0}var dw=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function fw(e){return dw.has(e.tagName)||e.isContentEditable===!0}var pw={x:!1,y:!1};function mw(){return pw.x||pw.y}function hw(e){return e===`x`||e===`y`?pw[e]?null:(pw[e]=!0,()=>{pw[e]=!1}):pw.x||pw.y?null:(pw.x=pw.y=!0,()=>{pw.x=pw.y=!1})}function gw(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ag(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ag(n,e,r.max):Math.min(e,n)),e}function _w(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 vw(e,{top:t,left:n,bottom:r,right:i}){return{x:_w(e.x,n,i),y:_w(e.y,t,r)}}function yw(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 bw(e,t){return{x:yw(e.x,t.x),y:yw(e.y,t.y)}}function xw(e,t){let n=.5,r=Wx(e),i=Wx(t);return i>r?n=ah(t.min,t.max-r,e.min):r>i&&(n=ah(e.min,e.max-i,t.min)),Zm(0,1,n)}function Sw(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 Cw=.35;function ww(e=Cw){return e===!1?e=0:e===!0&&(e=Cw),{x:Tw(e,`left`,`right`),y:Tw(e,`top`,`bottom`)}}function Tw(e,t,n){return{min:Ew(e,t),max:Ew(e,n)}}function Ew(e,t){return typeof e==`number`?e:e[t]||0}function Dw(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 Ow=new WeakMap,kw=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=dS(),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=hw(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),TS(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Lh(t)&&(t=cb(t,this.visualElement.current)||0),$.test(t))t=parseFloat(t);else if(ng.test(t)){let n=a?.layout?.layoutBox[e];n&&(t=Wx(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),i&&Zg.update(()=>i(e,t),!1,!0),bb(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=Fw(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.visualElement.render(),a&&Zg.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 tw(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&&Zg.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||!Pw(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=gw(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;Aw(e)?this.constraints&&this.scroll===Dw(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r?vw(r.layoutBox,e):!1,this.elastic=ww(t),i!==this.constraints&&!Aw(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&TS(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Sw(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!Aw(e))return!1;let n=jw(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=Dw(r);let i=vx(n,r.root,this.visualElement.getTransformPagePoint()),a=bw(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(Zb(a));this.hasMutatedConstraints=!!e,e&&(a=Xb(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=TS(s=>{if(!Pw(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 bb(this.visualElement,e),n.start(ab(e,n,0,t,this.visualElement,!1))}stopAnimation(){TS(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();TS(e=>{if(!Pw(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Ag(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Aw(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};TS(e=>{let t=this.getAxisMotionValue(e).get();i[e]=xw({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(),TS(t=>{let n=this.getAxisMotionValue(t);if(!Pw(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Ag(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ow.set(this.visualElement,this);let e=this.visualElement.current,t=LC(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&fw(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=Aw(t)&&jw(t);r&&(this.constraints=this.resolveRefConstraints(),n||=Nw(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),Zg.read(r);let o=sC(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(TS(t=>{if(!Pw(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=Cw,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function Aw(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var jw=e=>`current`in e?e.current:e;function Mw(e){let t=!0;return()=>{t?t=!1:e()}}function Nw(e,t,n){let r=ZC(e,Mw(n)),i=ZC(t,Mw(n));return()=>{r(),i()}}function Pw(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fw(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Iw(e,t){let n=Hb(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},Bb(()=>r.abort())]}function Lw(e){return!(e.pointerType===`touch`||mw())}function Rw(e,t,n={}){t=Vb(t);let[r,i,a]=Iw(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(!Lw(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 zw=(e,t)=>t?e===t||zw(e,t.parentElement):!1,Bw=new WeakSet;function Vw(e){return t=>{t.key===`Enter`&&e(t)}}function Hw(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Uw=(e,t)=>{let n=!1,r=Vw(()=>{Bw.has(e)||(n=!0,Hw(e,`down`))}),i=Vw(()=>{n&&(n=!1,Hw(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&Hw(e,`cancel`)},{...t,once:!0})};function Ww(e){return PC(e)&&!mw()}var Gw=new WeakSet;function Kw(e,t,n={}){t=Vb(t);let[r,i,a]=Iw(e,n),o=e=>{let r=e.currentTarget;if(!Ww(e)||Gw.has(e))return;Bw.add(r),n.stopPropagation&&Gw.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Bw.has(r)&&Bw.delete(r),Ww(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||zw(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),Lb(e)&&(e.addEventListener(`focus`,()=>Uw(e,i),i),!uw(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function qw(...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=M_(i,a,o);return t?s(r):s}var Jw=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Yw=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`]),Xw=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Zw(e,t,n,r){kC(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Yw.has(n)?n:Ub(n),t.attrs[n])}function Qw(e,t,n){let r=jC(e,t,n);for(let n in e)if(n!==`children`&&(vb(e[n])||vb(t[n]))){let t=wv.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var $w=class extends OC{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=dS}getBaseTargetFromProps(e,t){return Tv.has(t)?super.getBaseTargetFromProps(e,t)??xv(t):e[t]}getDefaultValue(e){return Tv.has(e)?this.latestValues[e]??xv(e):void 0}readValueFromInstance(e,t){if(Tv.has(t)){let e=lv(t);return e&&e.default||0}if(Jb.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Yw.has(t)?t:Ub(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Qw(e,t,n)}build(e,t,n){Yb(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Zw(e,t,n,r)}mount(e){this.isSVGTag=Xw(e.tagName),super.mount(e)}};function eT(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 tT=[...mC].reverse(),nT=e=>e?.out===!0?e:e?.out;function rT(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Db(e,t,n))),n=aT(),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`&&db(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&&nT(f(l??(g&&g.props.initial))?.transition);if(tT.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?pC(f)||f===!1?f:void 0:l,y=pC(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||fC(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=iT(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}=db(e,n,fb(e,t))||{};E={...E,...a,...i},D=nT(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)?!eT(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=db(s,n)?.transition?.delayChildren;r.delay=Wy(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&&!vb(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=aT(),i=!0}}}function iT(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!eT(t,e):!1}function aT(){let e={};for(let t of mC)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var oT=(0,U.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function sT(e=!0){let t=(0,U.useContext)(qm);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 cT=(0,U.createContext)({strict:!1}),lT={animation:[`variants`,...mC],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`]},uT=!1;function dT(){if(uT)return;let e={};for(let t in lT)e[t]={isEnabled:e=>lT[t].some(t=>!!e[t])};TC(e),uT=!0}function fT(){return dT(),EC()}function pT(e){let t=fT();for(let n in e)t[n]={...t[n],...e[n]};TC(t)}var mT=(0,U.createContext)({});function hT(e,t){if(gC(e)){let{initial:t,animate:n}=e;return{initial:t===!1||pC(t)?t:void 0,animate:pC(n)?n:void 0}}return e.inherit===!1?{}:t}function gT(e){let{initial:t,animate:n}=hT(e,(0,U.useContext)(mT));return(0,U.useMemo)(()=>({initial:t,animate:n}),[_T(t),_T(n)])}function _T(e){return Array.isArray(e)?e.join(` `):e}var vT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yT(e,t,n){for(let r in t)!vb(t[r])&&!AC(r,n)&&(e[r]=t[r])}function bT({transformTemplate:e},t){return(0,U.useMemo)(()=>{let n=vT();return Wb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xT(e,t){let n=e.style||{},r={};return yT(r,n,e),Object.assign(r,bT(e,t)),r}function ST(e,t){let n={},r=xT(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 CT=()=>({...vT(),attrs:{}});function wT(e,t,n,r){let i=(0,U.useMemo)(()=>{let n=CT();return Yb(n,t,Xw(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return yT(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var TT=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 ET(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||TT.has(e)}function DT(e,t){return e.startsWith(`on`)?!ET(e):t?.(e)??!ET(e)}function OT(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||vb(e[a])||(DT(a,r)||n===!0&&ET(a)||!t&&!ET(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var kT=[`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 AT(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(kT.indexOf(e)>-1||/[A-Z]/u.test(e))}function jT(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??AT(e)?wT:ST)(t,r,i,e),l=OT(t,typeof e==`string`,a,s),u=e===U.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,U.useMemo)(()=>vb(d)?d.get():d,[d]);return(0,U.createElement)(e,{...u,children:f})}function MT({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:NT(n,r,i,e),renderState:t()}}function NT(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Ox(a[e]);let{initial:o,animate:s}=e,c=gC(e),l=_C(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`&&!fC(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ub(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 PT=e=>(t,n)=>{let r=(0,U.useContext)(mT),i=(0,U.useContext)(qm),a=()=>MT(e,t,r,i);return n?a():Gm(a)},FT=PT({scrapeMotionValuesFromProps:jC,createRenderState:vT}),IT=PT({scrapeMotionValuesFromProps:Qw,createRenderState:CT}),LT=Symbol.for(`motionComponentSymbol`);function RT(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 zT=(0,U.createContext)({});function BT(e,t,n,r,i,a){let{visualElement:o}=(0,U.useContext)(mT),s=(0,U.useContext)(cT),c=(0,U.useContext)(qm),l=(0,U.useContext)(oT),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)(zT);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[xb],_=(0,U.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Km(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),Km(()=>{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 VT(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&pT(r);let a=n?n===`svg`:AT(e),o=a?IT:FT;function s(n,s){let c,l=HT(n);Gm(()=>!!lC.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,U.useContext)(oT),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=gT(n),m=o(n,d);if(!d&&typeof window<`u`){UT(u,r);let t=WT(u);p.visualElement=BT(e,m,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,W.jsxs)(mT.Provider,{value:p,children:[c&&p.visualElement?(0,W.jsx)(c,{visualElement:p.visualElement,...u}):null,jT(e,n,RT(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[LT]=e,c}function HT({layoutId:e}){let t=(0,U.useContext)(Wm).id;return t&&e!==void 0?t+`-`+e:e}function UT(e,t){(0,U.useContext)(cT).strict}function WT(e){let{drag:t,layout:n}=fT();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function GT(e,t){if(typeof Proxy>`u`)return VT;let n=new Map,r=(n,r)=>VT(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,VT(a,void 0,e,t)),n.get(a))})}var KT=(e,t)=>t.isSVG??AT(e)?new $w(t):new NC(t,{allowProjection:e!==U.Fragment}),qT=class extends Jw{constructor(e){super(e),e.animationState||=rT(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();fC(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?.()}},JT=0,YT={animation:{Feature:qT},exit:{Feature:class extends Jw{constructor(){super(...arguments),this.id=JT++}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}=db(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(){}}}},XT=class extends Jw{constructor(e){super(e),this.removeGroupControls=rh,this.removeListeners=rh,this.controls=new kw(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rh}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()}},ZT=e=>(t,n)=>{e&&Zg.update(()=>e(t,n),!1,!0)},QT=class extends Jw{constructor(){super(...arguments),this.removePointerDownListener=rh}onPointerDown(e){this.session=new tw(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:ZT(e),onStart:ZT(t),onMove:ZT(n),onEnd:(e,t)=>{delete this.session,r&&Zg.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=LC(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},$T=!1,eE=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),tE=(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)}},nE=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),$T&&i.root.didUpdate(),i.options.layoutId!==r&&tE(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...eE(this.props),onExitComplete:()=>this.safeToRemove()})),OS.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(),tE(o,n)),o.setOptions({...o.options,...eE(this.props)}),$T=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Zg.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),bx.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;$T=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function rE(e){let[t,n]=sT(),r=(0,U.useContext)(Wm);return(0,W.jsx)(nE,{...e,layoutGroup:r,switchLayoutGroup:(0,U.useContext)(zT),isPresent:t,safeToRemove:n})}var iE={pan:{Feature:QT},drag:{Feature:XT,ProjectionNode:uC,MeasureLayout:rE}};function aE(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&&Zg.postRender(()=>o(t,FC(t)))}var oE=class extends Jw{mount(){let{current:e}=this.node;e&&(this.unmount=Rw(e,(e,t)=>(aE(this.node,t,`Hover`,`Start`),e=>aE(this.node,e,`Hover`,`End`))))}unmount(){}},sE=class extends Jw{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=ih(sC(this.node.current,`focus`,()=>this.onFocus()),sC(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function cE(e,t,n){e.current instanceof HTMLButtonElement&&e.current.disabled||aE(e,t,`Tap`,n)}var lE=class extends Jw{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Kw(e,(e,t)=>(cE(this.node,t,`Start`),(e,{success:t})=>cE(this.node,e,t?``:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},uE=new WeakMap,dE=new WeakMap,fE=e=>{let t=uE.get(e.target);t&&t(e)},pE=e=>{e.forEach(fE)};function mE({root:e,...t}){let n=e||document;dE.has(n)||dE.set(n,{});let r=dE.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(pE,{root:e,...t})),r[i]}function hE(e,t,n){let r=mE(t);return uE.set(e,n),r.observe(e),()=>{uE.delete(e),r.unobserve(e)}}var gE={some:0,all:1},_E=class extends Jw{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:gE[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=hE(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(vE(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function vE({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var yE=GT(Object.assign({},YT,{inView:{Feature:_E},tap:{Feature:lE},focus:{Feature:sE},hover:{Feature:oE}},iE,{layout:{ProjectionNode:uC,MeasureLayout:rE}}),KT);function bE(e){let t=Gm(()=>Yy(e)),{isStatic:n}=(0,U.useContext)(oT);if(n){let[,n]=(0,U.useState)(e);(0,U.useEffect)(()=>t.on(`change`,n),[])}return t}function xE(e,t){let n=bE(t()),r=()=>n.set(t());return r(),Km(()=>{let t=()=>Zg.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),Qg(r)}}),n}function SE(e){qy.current=[],e();let t=xE(qy.current,e);return qy.current=void 0,t}function CE(e,t,n,r){if(typeof e==`function`)return SE(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return TE(e,t,n,r);let i=typeof t==`function`?t:qw(t,n,r),a=Array.isArray(e)?wE(e,i):wE([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 wE(e,t){let n=Gm(()=>[]);return xE(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function TE(e,t,n,r){let i=Gm(()=>Object.keys(n)),a=Gm(()=>({}));for(let o of i)a[o]=CE(e,t,n[o],r);return a}var EE=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()})}},DE=()=>new EE;function OE(){return Gm(DE)}var kE=(0,U.createContext)(null);function AE(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:Ag(t.x.min,t.x.max,.5)+n.x,y:Ag(t.y.min,t.y.max,.5)+n.y},i=jE(e),s=i.find(t=>t.items.includes(e[o])),c=i.reduce((e,t)=>ME(r.y,t)<ME(r.y,e)?t:e);if(c!==s)return NE(e,o,r.x,c,a);let l=PE(r,t),u=-1,d=l;return e.forEach((e,t)=>{if(t===o)return;let n=PE(r,e.layout);n<d&&(u=t,d=n)}),u===-1?e:Xm(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=Ag(u.min,u.max,.5);return s===1&&l.max+n[i]>d||s===-1&&l.min+n[i]<d?Xm(e,o,o+s):e}function jE(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 ME(e,t){return e<t.min?t.min-e:e>t.max?e-t.max:0}function NE(e,t,n,r,i){let a=e.filter((e,n)=>n!==t),o=r.items.find(e=>{let t=Ag(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 PE(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 FE=(e,t)=>e.max<=t.min||t.max<=e.min;function IE(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||=FE(e[r].x,e[i].x),n||=FE(e[r].y,e[i].y),t&&n)return`xy`;return t?`x`:`y`}function LE({children:e,as:t=`ul`,axis:n,onReorder:r,values:i,onPointerDownCapture:a,onClickCapture:o,...s},c,l){let u=Gm(()=>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(Xm(s,e,n),t)}e.preventDefault()},registerItem:(e,t)=>{if(d.current.set(e,t),!n){let e=IE(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=AE(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)(kE.Provider,{value:S,children:e})})}var RE=e=>(0,U.forwardRef)((t,n)=>LE(t,n,e)),zE=50,BE=1.5,VE=new Set([`auto`,`scroll`]),HE=new WeakMap,UE=new WeakMap,WE=null;function GE(){if(WE){let e=qE(WE,`y`);e&&(UE.delete(e),HE.delete(e));let t=qE(WE,`x`);t&&t!==e&&(UE.delete(t),HE.delete(t)),WE=null}}function KE(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY,i=e===document.body||e===document.documentElement;return VE.has(r)||i}function qE(e,t){let n=e?.parentElement;for(;n;){if(KE(n,t))return n;n=n.parentElement}return null}function JE(e){let t=Math.min(1,1-e/zE);return BE*t*t*kh.delta}function YE(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<zE?{amount:-JE(o),edge:`start`}:s<zE?{amount:JE(s),edge:`end`}:{amount:0,edge:null}}function XE(e,t,n,r){if(!e)return;WE=e;let i=qE(e,n);if(!i)return;let{amount:a,edge:o}=YE(t-(n===`x`?window.scrollX:window.scrollY),i,n);if(o===null){UE.delete(i),HE.delete(i);return}let s=UE.get(i),c=i===document.body||i===document.documentElement;if(s!==o){if(!(o===`start`&&r<0||o===`end`&&r>0))return;UE.set(i,o);let e=n===`x`?i.scrollWidth-(c?window.innerWidth:i.clientWidth):i.scrollHeight-(c?window.innerHeight:i.clientHeight);HE.set(i,e)}if(a>0){let e=HE.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 ZE(e,t=0){return vb(e)?e:bE(t)}function QE({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)(kE),f=Gm(()=>d.proxy[r]),[p,m]=(0,U.useState)(),h={x:ZE(t.x),y:ZE(t.y)},g=CE([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),dC.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`:_;XE(b.current,a[s],s,r[s]),i&&i(e,t)},onDragEnd:(e,t)=>{x.current=!1,GE(),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 $E=(0,U.forwardRef)(QE),eD=RE(yE);function tD(e){let[t,n]=(0,U.useState)(!1),[r,i]=(0,U.useState)(``),[a,o]=(0,U.useState)(``),[s,c]=(0,U.useState)(``),[l,u]=(0,U.useState)(null);return(0,W.jsxs)(`form`,{className:`grid`,onSubmit:async n=>{n.preventDefault(),u(null);try{if(t)await Ft([ut(a).address],s.trim()===``?null:s.trim());else{let e=ut(r);await Ft([e.address],e.code)}e.onAdded?.()}catch(e){u(Ut(e))}},children:[(0,W.jsxs)(`div`,{className:z(`grid gap-2`,e.fieldsClassName),children:[t?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Vp,{"aria-label":`Server URL`,placeholder:`Server URL, e.g. http://127.0.0.1:47841`,spellCheck:!1,autoComplete:`off`,value:a,onChange:e=>o(e.target.value)}),(0,W.jsx)(Vp,{"aria-label":`Pairing code`,placeholder:`Pairing code, empty if auth is off`,spellCheck:!1,autoComplete:`off`,value:s,onChange:e=>c(e.target.value)})]}):(0,W.jsx)(Vp,{"aria-label":`Pairing link`,placeholder:`Pairing link`,spellCheck:!1,autoComplete:`off`,value:r,onChange:e=>i(e.target.value)}),l!==null&&(0,W.jsx)(`p`,{className:`text-destructive text-sm break-all`,children:l}),(0,W.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground w-fit cursor-pointer text-xs`,onClick:()=>{n(!t),u(null)},children:t?`Paste a pairing link instead`:`Enter the server URL and code separately`})]}),e.actions(t?a.trim()!==``:r.trim()!==``)]})}function nD(e){return(0,W.jsx)(ai,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Qr,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,children:[(0,W.jsxs)($r,{className:`gap-1 px-6 pt-4 pr-12`,children:[(0,W.jsx)(ni,{className:`text-base`,children:`Add machine`}),(0,W.jsx)(ri,{children:`Paste the pairing link that OffSite printed when it started.`})]}),(0,W.jsx)(tD,{fieldsClassName:`p-6`,onAdded:e.onClose,actions:t=>(0,W.jsxs)(oi,{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 rD(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:[(Cf.includes(n)?Cf:[n,...Cf]).map(e=>(0,W.jsx)(H,{title:e,size:`icon-sm`,"aria-pressed":e===n,variant:e===n?`default`:`ghost`,onClick:()=>I(t.id,{icon:e}),children:(0,W.jsx)(wf,{icon:e})},e)),(0,W.jsxs)(un,{open:r,onOpenChange:i,modal:!0,children:[(0,W.jsx)(Cn,{asChild:!0,children:(0,W.jsx)(H,{title:`More icons`,size:`icon-sm`,variant:`ghost`,children:(0,W.jsx)(V,{icon:Tr})})}),(0,W.jsx)(cn,{align:`end`,collisionPadding:12,className:`flex max-h-96 w-80 flex-col gap-3 overflow-y-auto p-3`,children:(0,W.jsx)(iD,{machine:t.id,selected:n,onClose:()=>i(!1)})})]})]})]})}function iD(e){return(0,W.jsx)(W.Fragment,{children:[...new Set(Object.values(Sf).map(e=>e.group))].map(t=>(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t}),(0,W.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(2rem,1fr))] gap-1`,children:Object.keys(Sf).filter(e=>Sf[e].group===t&&!Cf.includes(e)).map(t=>(0,W.jsx)(H,{title:t,size:`icon-sm`,className:`aspect-square h-auto! w-full!`,"aria-pressed":t===e.selected,variant:t===e.selected?`default`:`ghost`,onClick:()=>{I(e.machine,{icon:t}),e.onClose()},children:(0,W.jsx)(wf,{icon:t,className:`block aspect-square! h-auto! w-[66%]! min-w-0! shrink-0!`})},t))})]},t))})}var aD={connecting:`Connecting…`,online:`Online`,offline:`Offline`,unpaired:`Needs pairing`};function oD(){let e=k(e=>e.machines),t=k(e=>e.machines.find(t=>t.id===e.settingsEditedMachine)),[n,r]=(0,U.useState)(!1),[a,o]=(0,U.useState)(null),s=a===null?e:[...e].sort((e,t)=>a.indexOf(e.id)-a.indexOf(t.id));return t===void 0?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(gm,{title:`Machines`,note:`This browser connects to each one directly. The list stays in this browser`,children:(0,W.jsx)(eD,{as:`div`,axis:`y`,className:`divide-y`,values:s.map(e=>e.id),onReorder:o,children:s.map(e=>(0,W.jsxs)(cD,{value:e.id,disabled:!1,className:`min-h-13 gap-4`,onDragEnd:()=>{a!==null&&be(a),o(null)},children:[(0,W.jsx)(wf,{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:[ir[e.provider],` threads: `,e.error]},e.provider))]}),(0,W.jsxs)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:[aD[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:()=>ve(e.id),children:(0,W.jsx)(V,{icon:Ls})}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost-muted`,title:`Open machine`,onClick:()=>i({settingsEditedMachine:e.id}),children:(0,W.jsx)(V,{icon:An})})]})]},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)(nD,{onClose:()=>r(!1)})]}):(0,W.jsx)(sD,{machine:t})}function sD(e){let t=e.machine,[n,r]=(0,U.useState)(!1),[a,s]=(0,U.useState)(``),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(null),f=u??t.addresses,p=t.addresses.some(e=>o!==null&&o.includes(e)),m=(0,U.useRef)(null);(0,U.useEffect)(()=>{n&&m.current?.focus()},[n]);function h(e){l(null);try{return I(t.id,{addresses:[...new Set(e.map(e=>ut(e).address))]}),!0}catch(e){return l(Ut(e)),!1}}async function g(e){l(null);let n=e.trim();if(n===``)return!0;try{let e=n.includes(`#`)?ut(n).code:n;if(e===null)throw Error(`That link has no pairing code`);return await me(t.id,e),!0}catch(e){return l(Ut(e)),!1}}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(gm,{title:`Machine`,children:[(0,W.jsx)(Q,{label:`Name`,children:(0,W.jsx)(_m,{value:t.label??``,placeholder:t.hostname,onCommit:e=>I(t.id,{label:e.trim()===``?null:e.trim()})},t.label)}),(0,W.jsx)(rD,{machine:t})]}),!p&&(0,W.jsx)(gm,{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 ${or(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 g(a)&&s(``)},children:[(0,W.jsx)(Vp,{className:`flex-1 font-mono`,placeholder:`Pairing link or code`,spellCheck:!1,autoComplete:`off`,value:a,onChange:e=>s(e.target.value)}),(0,W.jsxs)(H,{type:`submit`,variant:`outline`,className:`px-4`,disabled:a.trim()===``,children:[(0,W.jsx)(V,{icon:vs}),`Pair`]})]})]})}),(0,W.jsxs)(gm,{title:`Addresses`,note:`OffSite tries them in order whenever it reconnects`,children:[(0,W.jsx)(eD,{as:`div`,axis:`y`,className:`divide-y`,values:f,onReorder:d,children:f.map((e,t)=>(0,W.jsxs)(cD,{value:e,disabled:p,onDragEnd:()=>{u!==null&&h(u),d(null)},children:[(0,W.jsx)(_m,{className:`flex-1 font-mono`,value:e,disabled:p,onCommit:e=>h(f.map((n,r)=>r===t?e:n))}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Remove address`,disabled:p||f.length===1,onClick:()=>h(f.filter((e,n)=>n!==t)),children:(0,W.jsx)(V,{icon:ns})})]},e))}),n&&(0,W.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,W.jsx)(Vp,{ref:m,className:`font-mono`,placeholder:`http://192.168.1.10:47841`,spellCheck:!1,autoComplete:`off`,onBlur:e=>{let n=e.target.value.trim();(n===``||h([...t.addresses,n]))&&r(!1)},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}})}),!n&&!p&&(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:Eo,className:`size-4`}),`Add address`]})]}),c!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-1 text-xs break-all`,children:c}),!p&&(0,W.jsxs)(hr,{children:[(0,W.jsx)(kr,{asChild:!0,children:(0,W.jsx)(H,{variant:`outline`,className:`text-destructive`,children:`Remove machine`})}),(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsxs)(Un,{children:[`Remove `,t.name,`?`]}),(0,W.jsx)(zn,{children:`This browser forgets the machine. The machine and its threads stay untouched.`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:()=>{i({settingsEditedMachine:null}),ge(t.id)},children:`Remove machine`})]})]})]})]})}function cD(e){let t=OE();return(0,W.jsxs)($E,{as:`div`,value:e.value,dragListener:!1,dragControls:t,onDragEnd:e.onDragEnd,className:z(`bg-background relative flex items-center gap-3 px-4 py-2.5`,e.className),children:[(0,W.jsx)(`span`,{className:z(`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:rs,className:`size-4`})}),e.children]})}var lD=Fe.withTag(`notifications`),uD=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 dD(e){let t=e.prefs.terminal,n=t.behavior;function r(r){Ye({...e.prefs,terminal:{...t,behavior:{...n,...r}}})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(gm,{title:`Notifications`,children:[(0,W.jsx)(Q,{label:`Desktop notifications on this device`,children:(0,W.jsx)(fD,{})}),(0,W.jsx)(Q,{label:`Push terminal alerts when no OffSite page is open`,children:(0,W.jsx)(pD,{})})]}),(0,W.jsxs)(gm,{title:`Terminal bell`,children:[(0,W.jsx)(Q,{label:`Flash the screen on bell`,children:(0,W.jsx)(cm,{checked:n.bellFlash,onCheckedChange:e=>r({bellFlash:e})})}),(0,W.jsx)(Q,{label:`Play a sound on bell`,children:(0,W.jsx)(cm,{checked:n.bellSound,onCheckedChange:e=>r({bellSound:e})})})]})]})}function fD(){let[e,t]=(0,U.useState)(Ea),[n,r]=(0,U.useState)(Da);(0,U.useEffect)(()=>{let e=Ea();if(e===`insecure`||e===`unsupported`)return;let n=new AbortController;return ka(n.signal,()=>t(Ea())).catch(e=>lD.error(`could not watch the notification permission`,e)),()=>n.abort()},[]);async function i(e){await Oa(e),r(e),t(Ea())}return(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[uD.has(e)&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:uD.get(e)}),(0,W.jsx)(cm,{checked:e===`granted`&&n,disabled:e!==`granted`&&e!=="default",onCheckedChange:e=>void i(e)})]})}function pD(){let[e,t]=(0,U.useState)(La),[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(()=>La()===`supported`),[o,s]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(La()!==`supported`)return;let e=!0;async function t(){try{let t=await za();e&&r(t)}catch(e){lD.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 Ba()):(await Va(),r(!1))}catch(e){lD.error(`could not change push notifications`,e),s(Ut(e))}t(La()),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]}),uD.has(e)&&(0,W.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:uD.get(e)}),(0,W.jsx)(cm,{checked:e===`supported`&&n,disabled:e!==`supported`||i,onCheckedChange:e=>void c(e)})]})}function mD({className:e,...t}){return(0,W.jsx)(_c,{"data-slot":`label`,className:z(`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 hD={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&&(hD[n]=e)}}var gD={a:[7844,7863],e:[7870,7879],o:[7888,7907],u:[7912,7921]};for(let e of Object.keys(gD)){let t=e.toUpperCase();for(let n=gD[e][0];n<=gD[e][1];++n)hD[n]=n%2==0?t:e}function _D(e){if(e<192||e>8580)return e;let t=hD[e];return t===void 0?e:t.codePointAt(0)}function vD(e){return e}function yD(e){return e}function bD(e,t){return e>t?e:t}var xD=e=>e.split(``).map(e=>e.codePointAt(0)),SD=new Set(` \f
|
|
14
|
-
\r \v\xA0 \u2028\u2029 `.split(``).map(e=>e.codePointAt(0)));for(let e=` `.codePointAt(0);e<=` `.codePointAt(0);e++)SD.add(e);var CD=``.codePointAt(0),wD=`A`.codePointAt(0),TD=`Z`.codePointAt(0),ED=`a`.codePointAt(0),DD=`z`.codePointAt(0),OD=`0`.codePointAt(0),kD=`9`.codePointAt(0);function AD(e,t,n){return n?e:t-e-1}var jD=16,MD=-3,ND=-1,PD=jD/2,FD=jD/2,ID=7,LD=4,RD=2;function zD(e){return e?new Set:null}function BD(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 VD(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 HD(e){return e>=ED&&e<=DD?1:e>=wD&&e<=TD?2:e>=OD&&e<=kD?4:0}function UD(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 WD(e){return e<=CD?HD(e):UD(e)}function GD(e,t){return e===0&&t!==0?PD:e===1&&t===2||e!==4&&t===4?ID:t===0?FD:0}function KD(e,t){return t===0?PD:GD(WD(e[t-1]),WD(e[t]))}function qD(e,t,n,r){let i=e.slice(r),a=i.indexOf(n);if(a===0)return r;if(!t&&n>=ED&&n<=DD){a>0&&(i=i.slice(0,a));let e=i.indexOf(n-32);e>=0&&(a=e)}return a<0?-1:r+a}function JD(e){for(let t of e)if(t>=128)return!1;return!0}function YD(e,t,n){if(!JD(e))return 0;if(!JD(t))return-1;let r=0,i=0;for(let a=0;a<t.length;a++){if(i=qD(e,n,t[a],i),i<0)return-1;a===0&&i>0&&(r=i-1),i++}return r}var XD=(e,t,n,r,i,a,o)=>{let s=i.length;if(s===0)return[{start:0,end:0,score:0},zD(a)];let c=r.length;if(o!==null&&c*s>o.i16.length)return QD(e,t,n,r,i,a);let l=YD(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]=BD(u,o,c),[u,p]=BD(u,o,c),[u,m]=BD(u,o,c),[d,h]=VD(d,o,s);let[,g]=VD(d,o,c);for(let e=0;e<g.length;e++)g[e]=r[e];let _=vD(0),v=0,y=0,b=0,x=i[0],S=i[0],C=vD(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<=CD?(o=HD(a),!e&&o===2&&(a+=32)):(o=UD(a),!e&&o===2&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)),t&&(a=_D(a))),E[r]=a;let c=GD(w,o);if(k[r]=c,w=o,a===S&&(y<s&&(h[y]=yD(l+r),y++,S=i[Math.min(y,s-1)]),b=l+r),a===x){let e=jD+c*RD;if(D[r]=e,O[r]=1,s===1&&(n&&e>_||!n&&e>=_)&&(_=e,v=l+r,n&&c===PD))break;T=!1}else D[r]=bD(T?C+ND:C+MD,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]=BD(u,o,j*s);{let e=f.subarray(A,b+1);for(let[t,n]of e.entries())M[t]=n}let[,N]=BD(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]+ND:h[e]+MD,i===o){g=p[e]+jD;let t=l[e];b=d[e]+1,t===PD?b=1:b>1&&(t=bD(t,bD(LD,m[c-b+1]))),g+t<y?(g+=l[e],b=0):g+=t}u[e]=b,r=g<y;let x=bD(bD(g,y),0);a===s-1&&(n&&x>_||!n&&x>=_)&&(_=x,v=c),f[e]=x}}let ne=zD(a),re=A;if(a&&ne!==null){let e=s-1;re=v;let t=!0;for(;;){let n=e*j,r=re-A,i=M[n+r],a=0,o=0;if(e>0&&re>=h[e]&&(a=M[n-j+r-1]),re>h[e]&&(o=M[n+r-1]),i>a&&(i>o||i===o&&t)){if(ne.add(re),e===0)break;e--}t=N[n+r]>1||n+j+r+1<N.length&&N[n+j+r+1]>0,re--}}return[{start:re,end:v+1,score:_},ne]};function ZD(e,t,n,r,i,a,o){let s=0,c=0,l=!1,u=0,d=vD(0),f=zD(o),p=0;i>0&&(p=WD(n[i-1]));for(let m=i;m<a;m++){let i=n[m],a=WD(i);if(e||(i>=wD&&i<=TD?i+=32:i>CD&&(i=String.fromCodePoint(i).toLowerCase().codePointAt(0))),t&&(i=_D(i)),i===r[s]){o&&f!==null&&f.add(m),c+=jD;let e=GD(p,a);u===0?d=e:(e===PD&&(d=e),e=bD(bD(e,d),LD)),c+=s===0?e*RD:e,l=!1,u++,s++}else c+=l?ND:MD,l=!0,u=0,d=0;p=a}return[c,f]}var QD=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];if(YD(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[AD(a,u,n)];e||(o>=wD&&o<=TD?o+=32:o>CD&&(o=String.fromCodePoint(o).toLowerCase().codePointAt(0))),t&&(o=_D(o));let f=i[AD(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[AD(t,u,n)];e||(a>=wD&&a<=TD?a+=32:a>CD&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)));let o=i[AD(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]=ZD(e,t,r,i,c,l,a);return[{start:c,end:l,score:o},f]}return[{start:-1,end:-1,score:0},null]},$D=(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||YD(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let l=0,u=-1,d=vD(0),f=vD(-1);for(let a=0;a<s;a++){let o=AD(a,s,n),p=r[o];e||(p>=wD&&p<=TD?p+=32:p>CD&&(p=String.fromCodePoint(p).toLowerCase().codePointAt(0))),t&&(p=_D(p));let m=AD(l,c,n);if(i[m]===p){if(m===0&&(d=KD(r,o)),l++,l===c){if(d>f&&(u=a,f=d),d===PD)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]=ZD(e,t,r,i,a,o,!1);return[{start:a,end:o,score:l},null]}return[{start:-1,end:-1,score:0},null]},eO=102400,tO=2048;function nO(e,t){return{i16:new Int16Array(e),i32:new Int32Array(t)}}var rO=nO(eO,tO),iO=(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=xD(e);return n&&(i=i.map(_D)),{queryRunes:i,caseSensitive:r}};function aO(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 oO(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,rO);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 sO(e){let{queryRunes:t,caseSensitive:n}=iO(e,this.opts.casing,this.opts.normalize),r={},i=oO.bind(this)(r,t,n);for(let e=0,t=this.runesList.length;e<t;++e)i(e);return aO(r,this.opts.limit)}var cO={limit:1/0,selector:e=>e,casing:`smart-case`,normalize:!0,fuzzy:`v2`,tiebreakers:[],sort:!0,forward:!0},lO=class{constructor(e,...t){switch(this.opts={...cO,...t[0]},this.items=e,this.runesList=e.map(e=>xD(this.opts.selector(e).normalize())),this.algoFn=$D,this.opts.fuzzy){case`v2`:this.algoFn=XD;break;case`v1`:this.algoFn=QD}}},uO={...cO,match:sO},dO=class extends lO{constructor(e,...t){super(e,...t),this.opts={...uO,...t[0]}}find(e){return e.length===0||this.items.length===0?this.items.slice(0,this.opts.limit).map(fO):(e=e.normalize(),pO(this.opts.match.bind(this)(e),this.opts))}};({...cO});var fO=e=>({item:e,start:-1,end:-1,score:0,positions:new Set});function pO(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 mO(e,t,n){return n(e.item).length-n(t.item).length}var hO=class{constructor(e,...t){this.finder=new dO(e,...t),this.find=this.finder.find.bind(this.finder)}};function gO(e){let[t,n]=(0,U.useState)(null),[r,i]=(0,U.useState)(``),[a,o]=(0,U.useState)(``),[s,c]=(0,U.useState)(null),l=a===``?``:`${a}/`,u=(t??[]).filter(e=>e.startsWith(l)).map(e=>e.slice(l.length)),d=[...new Set(u.filter(e=>e.includes(`/`)).map(e=>e.split(`/`)[0]))].sort((e,t)=>e.localeCompare(t)),f=r===``?u.filter(e=>!e.includes(`/`)).sort((e,t)=>e.localeCompare(t)).map(e=>`${l}${e}`):new hO(t??[],{limit:50,casing:`case-insensitive`,tiebreakers:[(e,t)=>_O(t)-_O(e),mO]}).find(r).map(e=>e.item);return(0,U.useEffect)(()=>{let t=!1;return(async()=>{try{let r=await L(e.machine,`projects.logoFiles`,{id:e.projectId});t||n(r)}catch(e){t||c(Ut(e))}})(),()=>{t=!0}},[e.machine,e.projectId]),(0,W.jsx)(ai,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Qr,{className:`gap-0 overflow-hidden p-0 sm:max-w-lg`,showCloseButton:!1,"aria-describedby":void 0,children:[(0,W.jsx)(ni,{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:xr,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:r,onChange:e=>i(e.target.value)})]}),(0,W.jsx)(ti,{asChild:!0,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close`,children:(0,W.jsx)(V,{icon:Uo})})})]}),r===``&&(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:a===``,onClick:()=>o(a.split(`/`).slice(0,-1).join(`/`)),children:(0,W.jsx)(V,{icon:Ar})}),(0,W.jsxs)(`span`,{className:`truncate px-1.5 font-mono text-xs`,children:[`/`,a]})]}),(0,W.jsxs)(`div`,{className:`h-72 overflow-y-auto p-1`,children:[r===``&&d.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:()=>o(`${l}${e}`),children:[(0,W.jsx)(V,{icon:ur,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`span`,{className:`truncate font-mono text-xs`,children:e})]},e)),f.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 L(e.machine,`files.read`,{projectId:e.projectId,path:t});n.kind===`image`?e.onPick(`data:${n.mediaType};base64,${n.data}`):n.kind===`large`?c(`${t} is too large`):c(`${t} is not an image`)}catch(e){c(Ut(e))}},children:[(0,W.jsx)(V,{icon:Jn,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r===``?t.slice(l.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&&r!==``&&f.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:`No matching images`})]}),s!==null&&(0,W.jsx)(`p`,{className:`text-destructive border-t px-3 py-2 text-sm break-all`,children:s})]})})}function _O(e){let t=e.item.lastIndexOf(`/`)+1;return[...e.positions].filter(e=>e>=t).length}function vO(e){let t=k(e=>e.machines),[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(()=>yO(t.find(t=>t.id===e.machine))),[c,l]=(0,U.useState)(``),[u,d]=(0,U.useState)(!1),f=o.trim()===``?void 0:n?.listing,p=f?.directories.filter(e=>e.name.toLowerCase().includes(c.toLowerCase()));function m(e){s(e),l(``)}return(0,U.useEffect)(()=>{if(o.trim()===``)return;let t=!1,n=setTimeout(async()=>{try{let n=await L(e.machine,`directories.list`,{path:o});if(t)return;r({path:o,listing:n}),a(null)}catch(e){if(t)return;r(null),a(Ut(e))}},150);return()=>{t=!0,clearTimeout(n)}},[e.machine,o]),(0,W.jsx)(ai,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Qr,{className:`gap-0 overflow-hidden p-0 sm:max-w-lg`,showCloseButton:!1,"aria-describedby":void 0,children:[(0,W.jsx)(ni,{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:()=>m(`~`),children:(0,W.jsx)(V,{icon:ms})}),(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:f?.parent===void 0||f.parent===null,onClick:()=>{f?.parent!==void 0&&f.parent!==null&&m(f.parent)},children:(0,W.jsx)(V,{icon:Ar})}),(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:o,onChange:e=>m(e.target.value)}),(0,W.jsx)(ti,{asChild:!0,children:(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close`,children:(0,W.jsx)(V,{icon:Uo})})})]}),(0,W.jsxs)(`label`,{className:`flex h-9 items-center gap-2.5 border-b px-3`,children:[(0,W.jsx)(V,{icon:xr,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:c,onChange:e=>l(e.target.value)})]}),(0,W.jsxs)(`div`,{className:`h-72 overflow-y-auto p-1`,children:[p?.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:()=>m(e.path),children:[(0,W.jsx)(V,{icon:ur,className:`text-muted-foreground size-4 flex-none`}),(0,W.jsx)(`span`,{className:`truncate`,children:e.name})]},e.path)),p?.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:c===``?`No folders here`:`No matching folders`})]}),i!==null&&o.trim()!==``&&(0,W.jsx)(`p`,{className:`text-destructive border-t px-3 py-2 text-sm break-all`,children:i}),(0,W.jsx)(oi,{className:`border-t p-3`,children:(0,W.jsx)(H,{disabled:n?.path!==o||u,onClick:async()=>{if(n!==null&&n.path===o){d(!0);try{e.onAdd({...await oc(e.machine,n.listing.path),machine:e.machine})}catch(e){a(Ut(e)),d(!1)}}},children:`Add project`})})]})})}function yO(e){return e===void 0||e.config===null||e.system===null?`~`:e.config.workingDir[e.system.platform]??`~`}function bO(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)(ai,{open:!0,onOpenChange:()=>e.onClose(),children:(0,W.jsxs)(Qr,{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 sc(e.project.machine,e.project.id,{name:n,logo:i===e.project.logo?void 0:i}),e.onClose()}catch(e){s(Ut(e)),l(!1)}},children:[(0,W.jsxs)($r,{className:`gap-1 px-6 pt-4 pr-12`,children:[(0,W.jsx)(ni,{className:`text-base`,children:`Edit project`}),(0,W.jsx)(ri,{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)(mD,{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)(fc,{name:n.trim()===``?an(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:Uo,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:tc}),`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:ur}),`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 Ef(t)}`)}})]}),(0,W.jsxs)(`div`,{className:`grid gap-2`,children:[(0,W.jsx)(mD,{htmlFor:`project-name`,children:`Name`}),(0,W.jsx)(Vp,{id:`project-name`,placeholder:an(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)(oi,{className:`bg-muted/40 border-t px-6 py-4`,children:[(0,W.jsxs)(H,{type:`button`,variant:u?`destructive`:`ghost`,className:z(`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 cc(e.project.machine,e.project.id),e.onRemoved()}catch(e){s(Ut(e))}},children:[(0,W.jsx)(V,{icon:ns,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)(gO,{machine:e.project.machine,projectId:e.project.id,onClose:()=>p(!1),onPick:e=>{a(e),p(!1)}})]})})}function xO(e){let t=k(e=>e.projects),[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(!1),[l,u]=Rr(`sidebarScope`,null),d=t.filter(t=>t.machine===e.machine&&!t.scratch).sort((e,t)=>n===null?0:n.indexOf(e.id)-n.indexOf(t.id));return(0,W.jsxs)(W.Fragment,{children:[d.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground py-8 text-center text-sm`,children:`No projects yet`}),(0,W.jsx)(eD,{as:`div`,axis:`y`,values:d.map(e=>e.id),onReorder:r,children:d.map(t=>(0,W.jsxs)(cD,{value:t.id,disabled:!1,className:`min-h-13 px-1 outline-none`,onDragEnd:async()=>{if(n!==null){try{await lc(e.machine,n)}catch(e){c(e)}r(null)}},children:[(0,W.jsx)(dc,{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:z(`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:SO(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:Bs})}),(0,W.jsx)(cm,{size:`sm`,checked:!t.hidden,onCheckedChange:e=>sc(t.machine,t.id,{hidden:!e}).catch(c),"aria-label":`Show ${t.name}`})]},t.id))}),(0,W.jsx)(`div`,{className:`flex gap-2`,children:(0,W.jsx)(H,{variant:`outline`,size:`sm`,onClick:()=>s(!0),children:`Add project…`})}),o&&(0,W.jsx)(vO,{machine:e.machine,onClose:()=>s(!1),onAdd:()=>s(!1)}),i!==null&&(0,W.jsx)(bO,{project:i,onClose:()=>a(null),onRemoved:()=>{l?.machine===i.machine&&l.projectId===i.id&&u(null),a(null)}})]})}function SO(e,t){return e===t?`~`:e.startsWith(`${t}/`)||e.startsWith(`${t}\\`)?`~${e.slice(t.length)}`:e}function CO(e){let t=e.account,[n,r]=(0,U.useState)(null);async function a(n){r(null);try{await L(e.machine,`accounts.update`,{id:t.id,name:t.name,color:t.color,configDir:t.configDir,enabled:t.enabled,...n})}catch(e){r(Ut(e))}}async function o(){r(null);try{await L(e.machine,`accounts.remove`,{id:t.id}),i({settingsAccount:null})}catch(e){r(Ut(e))}}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(gm,{title:`Account`,children:[(0,W.jsx)(Q,{label:`Name`,children:(0,W.jsx)(_m,{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)(_m,{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)(_m,{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)(hr,{children:[(0,W.jsx)(kr,{asChild:!0,children:(0,W.jsx)(H,{variant:`outline`,className:`text-destructive`,children:`Remove account`})}),(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsxs)(Un,{children:[`Remove `,t.name,`?`]}),(0,W.jsx)(zn,{children:`OffSite stops using this account. Its config directory and sessions stay untouched.`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:()=>void o(),children:`Remove account`})]})]})]})]})}function wO(e){let[t,n]=(0,U.useState)(``),[r,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 L(e.machine,`accounts.add`,{provider:e.provider,name:t,configDir:r}),i({settingsAccount:null})}catch(e){l(Ut(e)),s(!1)}}return(0,W.jsxs)(`form`,{className:`space-y-5`,onSubmit:e=>{e.preventDefault(),u()},children:[(0,W.jsxs)(gm,{title:`Account`,children:[(0,W.jsx)(Q,{label:`Name`,children:(0,W.jsx)(Vp,{className:`w-56`,value:t,onChange:e=>n(e.target.value),placeholder:`Work`})}),(0,W.jsx)(Q,{label:`Config directory`,children:(0,W.jsx)(Vp,{className:`w-72 font-mono`,value:r,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:()=>i({settingsAccount:null}),children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,disabled:o||t.trim()===``,children:`Add account`})]})]})}function TO(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)(wO,{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)(CO,{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)(_m,{className:`w-72 font-mono`,value:a,valid:e=>e.trim()!==``,onCommit:n=>uo(e.machine,{...t,claudeBaseDir:{...t.claudeBaseDir,[e.platform]:n}})},a)})}),(0,W.jsxs)(`div`,{className:z(`space-y-5 transition-opacity`,!n&&`opacity-50`),children:[e.provider!==`opencode`&&(0,W.jsx)(gm,{title:`Accounts`,children:(0,W.jsx)(DO,{machine:e.machine,accounts:r})}),n&&e.provider===`opencode`&&e.openCode.available&&(0,W.jsx)(EO,{machine:e.machine,config:t,provider:e.provider,accountId:null}),n&&e.provider!==`opencode`&&i!==void 0&&(0,W.jsx)(EO,{machine:e.machine,config:t,provider:e.provider,accountId:i.id})]})]})}function EO(e){let[t,n]=(0,U.useState)(null),[r,i]=(0,U.useState)(null),a=e.config.models[e.provider],o=t===null?null:t.models;(0,U.useEffect)(()=>{let t=!0;return n(null),i(null),L(e.machine,`capabilities`,{provider:e.provider,accountId:e.accountId,projectId:null}).then(e=>{t&&n(e)},e=>{t&&i(Ut(e))}),()=>{t=!1}},[e.machine,e.provider,e.accountId]);function s(t,n){uo(e.machine,{...e.config,models:{...e.config.models,[e.provider]:{...a,[t]:n}}})}return(0,W.jsxs)(gm,{title:`Models`,children:[r!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:r}),r===null&&o===null&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-4 py-3 text-xs`,children:`Loading…`}),(o??[]).map(t=>{let n=a[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:z(`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)(Hp,{value:n.effort??t.effort??void 0,onValueChange:e=>s(t.value,{...n,effort:e}),children:[(0,W.jsx)(Wp,{size:`sm`,className:`w-28`,children:(0,W.jsx)(Up,{placeholder:`Effort`})}),(0,W.jsx)(Gp,{children:t.efforts.map(e=>(0,W.jsx)(Kp,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,W.jsx)(cm,{size:`sm`,checked:!n.hidden,onCheckedChange:e=>s(t.value,{...n,hidden:!e}),"aria-label":`Show ${t.name}`})]},t.value)})]})}function DO(e){let[t,n]=(0,U.useState)(!1),[r,a]=(0,U.useState)(null);async function o(e){n(!0),a(null);try{await e()}catch(e){a(Ut(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:z(`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:z(`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&&(0,W.jsx)(OO,{machine:e.machine,account:n})]}),(0,W.jsx)(cm,{size:`sm`,checked:n.enabled,disabled:t,onCheckedChange:t=>void o(()=>L(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:()=>i({settingsAccount:n.id}),children:(0,W.jsx)(V,{icon:An})})]},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:()=>i({settingsAccount:`new`}),children:[(0,W.jsx)(V,{icon:Eo,className:`size-4`}),`Add account`]}),r!==null&&(0,W.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:r})]})}function OO(e){let t=to(e.machine,e.account);return t===void 0||t.limits.length===0?null:(0,W.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-x-5 gap-y-1.5 pl-4`,children:t.limits.map(e=>(0,W.jsx)(kO,{limit:e},e.window))})}function kO(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)(Yr,{label:t.resetsAt===null?`Reset time unknown`:`Resets ${or(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:Tp(t)}),(0,W.jsx)(`div`,{className:`bg-foreground/10 h-1 w-16 overflow-hidden rounded-full`,children:(0,W.jsx)(`div`,{className:z(`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:z(`tabular-nums`,t.rejected&&`text-destructive`,!t.rejected&&`text-muted-foreground`),children:[n,`%`]})]})})}var AO=zt?`⌘`:`Ctrl+Shift`,jO=[[`Enter`,`Send, or queue or steer while the agent works`],[`${Ht}+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`],[`${Ht}+S`,`Stash the prompt, or bring back the last stash`],[`${Ht}+Shift+V`,`Paste long text inline instead of as a file`],[`${Ht}+. or ${Ht}+Shift+M`,`Choose the model`],[`${Ht}+/ or ${Ht}+Shift+E`,`Choose the effort`],[`${Ht}+P`,`Choose the project, or the sidebar scope`],[`${Ht}+;`,`Choose the project of a new thread`],[`${Ht}+F`,`Find in the thread`],[`${Ht}+K or ${Ht}+Shift+P`,`Search sessions and actions`],[`${Ht}+,`,`Open settings`],[`${Ht}+1…9`,`Open a session from the sidebar`],[`${Ht}+N or ${Ht}+T`,`New thread`],[zt?"⌘+` or Ctrl+`":"Ctrl+`",`Toggle the terminal`],[`${Ht}+B or ${Ht}+Shift+J`,`Toggle the sidebar`],[`${Ht}+J or ${Ht}+Shift+B`,`Toggle the right panel`],[`${Ht}+E`,`Toggle the editor`],[`${AO}+T`,`New terminal tab, in the terminal`],[`${AO}+W`,`Close the terminal tab`],[`${AO}+F`,`Find in the terminal`],[`Ctrl+Tab`,`Next terminal tab`],[`Ctrl+Shift+Tab`,`Previous terminal tab`]];function MO(){return(0,W.jsx)(gm,{title:`Keyboard shortcuts`,children:jO.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 NO=Fe.withTag(`terminal`),PO=1048576;function FO(e){window.isSecureContext?navigator.clipboard.writeText(e).catch(e=>{NO.warn(`could not copy to the clipboard`,e),oa(`Could not copy to the clipboard`)}):NO.warn(`copy from the terminal needs https or localhost`)}async function IO(e){if(!window.isSecureContext){NO.warn(`programs can read the clipboard only over https or localhost`),oa(`Programs can read the clipboard only over https or localhost`);return}let t;try{t=await navigator.clipboard.readText()}catch(e){NO.warn(`could not read the clipboard`,e),oa(`Could not read the clipboard`);return}new TextEncoder().encode(t).length>PO?(NO.warn(`the clipboard is over 1 MiB, not replying`),oa(`The clipboard is too large to share (over 1 MiB)`)):e(t)}var LO={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 RO(e,t){let n=LO[t];return e.key.toLowerCase()===`v`&&e.ctrlKey===n.ctrl&&e.altKey===n.alt&&!e.shiftKey&&!e.metaKey}async function zO(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?(oa(`No image in the clipboard`),!1):(await BO(e,t,n),!0)}async function BO(e,t,n){let r=[];for(let t of n){let n=await L(e,`terminal.paste`,{type:t.type,data:await Ef(t)});r.push(/\s/.test(n)?`"${n}"`:n)}t.paste(r.join(` `))}function VO(e){NO.error(`could not paste image`,e),oa(`Could not paste the image`)}function HO(e){let t=e.prefs.terminal,[n,r]=(0,U.useState)(!dm.some(e=>e.family===t.font.family));function i(t){Ye({...e.prefs,terminal:t})}function a(e,n){i({...t,[e]:{...t[e],...n}})}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(gm,{title:`Font`,children:[(0,W.jsx)(Q,{label:`Family`,children:(0,W.jsxs)(Hp,{value:n?`custom`:t.font.family,onValueChange:e=>{r(e===`custom`),e!==`custom`&&a(`font`,{family:e})},children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[dm.map(e=>(0,W.jsx)(Kp,{value:e.family,children:e.label},e.family)),(0,W.jsx)(Kp,{value:`custom`,children:`Custom`})]})]})}),n&&(0,W.jsx)(Q,{label:`Custom family`,children:(0,W.jsx)(_m,{placeholder:`Installed font name`,value:t.font.family,onCommit:e=>a(`font`,{family:e})})}),(0,W.jsx)(Q,{label:`Size`,children:(0,W.jsx)(vm,{value:t.font.size,step:.5,onCommit:e=>a(`font`,{size:e})})}),(0,W.jsx)(Q,{label:`Line height`,children:(0,W.jsx)(vm,{value:t.font.lineHeight,step:.05,onCommit:e=>a(`font`,{lineHeight:e})})}),(0,W.jsx)(Q,{label:`Ligatures`,children:(0,W.jsx)(cm,{checked:t.font.ligatures,onCheckedChange:e=>a(`font`,{ligatures:e})})}),(0,W.jsx)(Q,{label:`Bold text in bright colors`,children:(0,W.jsx)(cm,{checked:t.boldIsBright,onCheckedChange:e=>i({...t,boldIsBright:e})})})]}),(0,W.jsxs)(gm,{title:`Cursor`,children:[(0,W.jsx)(Q,{label:`Style`,children:(0,W.jsxs)(Hp,{value:t.cursor.style,onValueChange:e=>a(`cursor`,{style:e}),children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`block`,children:`Block`}),(0,W.jsx)(Kp,{value:`bar`,children:`Bar`}),(0,W.jsx)(Kp,{value:`underline`,children:`Underline`})]})]})}),(0,W.jsx)(Q,{label:`Blink`,children:(0,W.jsx)(cm,{checked:t.cursor.blink,onCheckedChange:e=>a(`cursor`,{blink:e})})})]}),(0,W.jsx)(UO,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,W.jsx)(WO,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,W.jsx)(GO,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,W.jsxs)(gm,{title:`Layout`,children:[[`top`,`right`,`bottom`,`left`].map(e=>(0,W.jsx)(Q,{label:`Padding ${e}`,children:(0,W.jsx)(vm,{value:t.padding[e],onCommit:t=>a(`padding`,{[e]:t})})},e)),(0,W.jsx)(Q,{label:`Scrollback lines`,children:(0,W.jsx)(vm,{value:t.scrollback,step:1e3,onCommit:e=>i({...t,scrollback:e})})})]})]})}function UO(e){return(0,W.jsxs)(gm,{title:`Behavior`,children:[(0,W.jsx)(Q,{label:`Modernize Shift+Enter`,children:(0,W.jsx)(cm,{checked:e.behavior.modernizeShiftEnter,onCheckedChange:t=>e.onChange({modernizeShiftEnter:t})})}),(0,W.jsx)(Q,{label:`${LO.linux.label} (${LO.windows.label} on Windows machines) pastes images from the browser clipboard`,children:(0,W.jsx)(cm,{checked:e.behavior.pasteBrowserImages,onCheckedChange:t=>e.onChange({pasteBrowserImages:t})})}),(0,W.jsx)(Q,{label:`Capture browser shortcuts`,children:(0,W.jsx)(cm,{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)(cm,{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)(cm,{checked:e.behavior.confirmCloseBusyTab,onCheckedChange:t=>e.onChange({confirmCloseBusyTab:t})})})]})}function WO(e){return zt?(0,W.jsx)(gm,{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)(Hp,{value:e.behavior.optionAsMeta,onValueChange:t=>e.onChange({optionAsMeta:t}),children:[(0,W.jsx)(Wp,{className:`w-56`,children:(0,W.jsx)(Up,{})}),(0,W.jsxs)(Gp,{children:[(0,W.jsx)(Kp,{value:`off`,children:`Off`}),(0,W.jsx)(Kp,{value:`left`,children:`Left Option`}),(0,W.jsx)(Kp,{value:`right`,children:`Right Option`}),(0,W.jsx)(Kp,{value:`both`,children:`Both Options`})]})]})})}):null}function GO(e){return Lt?(0,W.jsx)(gm,{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)(cm,{checked:e.behavior.windowsCopyPaste,onCheckedChange:t=>e.onChange({windowsCopyPaste:t})})})}):null}var KO=[`General`,`Editor`,`Terminal`,`Notifications`,`Shortcuts`,`Machines`],qO=[`Machine`,`Projects`,`Claude`,`Codex`,`OpenCode`];function JO(){let e=k(e=>e.machines),t=k(e=>e.settingsMachine===null?null:Ge(e,e.settingsMachine)),n=k(e=>e.settingsPage),r=ek(n),i=k(e=>r===null?null:e.settingsAccount),a=k(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 YO(){let e=k(e=>e.settingsOpen);return yr(`mod+comma`,()=>p(!e),{enableOnFormTags:!0,preventDefault:!0}),(0,W.jsx)(ai,{open:e,onOpenChange:p,children:(0,W.jsx)(Qr,{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.jsx)(XO,{})})})}function XO(){let e=JO(),t=e.page,n=e.machine;function r(e){return(0,W.jsx)(`button`,{className:z(`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===t&&`bg-accent text-foreground`),onClick:()=>d(e),children:(0,W.jsx)(ZO,{page:e})},e)}return(0,W.jsxs)(W.Fragment,{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)(ni,{className:`hidden px-2 pt-1 pb-3 text-base font-semibold sm:block`,children:`Settings`}),KO.map(r),(0,W.jsxs)(`div`,{className:`flex flex-none items-center gap-1 sm:mt-6 sm:flex-col sm:items-stretch`,children:[n!==null&&e.machines.length>1&&(0,W.jsxs)(Hp,{value:n.id,onValueChange:e=>i({settingsMachine:e,settingsAccount:null}),children:[(0,W.jsx)(Wp,{className:`mb-1 w-40 sm:w-full`,children:(0,W.jsx)(Up,{})}),(0,W.jsx)(Gp,{children:e.machines.map(e=>(0,W.jsxs)(Kp,{value:e.id,children:[(0,W.jsx)(wf,{icon:e.icon}),e.name]},e.id))})]}),n!==null&&e.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)(wf,{icon:n.icon}),(0,W.jsx)(`span`,{className:`truncate`,children:n.name})]}),qO.map(r)]})]}),(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:[e.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:()=>i({settingsAccount:null,settingsEditedMachine:null}),children:t}),(0,W.jsx)(V,{icon:An,className:`text-muted-foreground mx-1.5 size-5`}),(0,W.jsx)(`h2`,{className:`truncate text-xl font-semibold tracking-tight`,children:e.subpageTitle})]}),!e.subpage&&(0,W.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:t===`Machine`?`General`:t}),(0,W.jsx)(QO,{view:e,className:`ml-3`}),(0,W.jsx)(ti,{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:Uo})})})]}),(0,W.jsx)($O,{view:e})]})]})}function ZO(e){let t=ek(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)(pc,{provider:t,className:z(t===`claude`&&`size-4`,t===`codex`&&`size-[19px] shrink-0`,t===`opencode`&&`h-3.5`)})}),e.page===`Machine`?`General`:e.page]})}function QO(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)(cm,{className:e.className,checked:n.enabledProviders[r],onCheckedChange:e=>void uo(t.id,{...n,enabledProviders:{...n.enabledProviders,[r]:e}}),"aria-label":`Enable ${e.view.page}`})}function $O(e){let t=k(e=>e.prefs),n=e.view.page,r=e.view.machine,i=e.view.config,a=e.view.system,o=qO.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)(Sm,{prefs:t,onRestore:()=>c(`browser`)}),n===`Machine`&&r!==null&&i!==null&&a!==null&&(0,W.jsx)(Vm,{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)(xO,{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)(ym,{prefs:t}),n===`Terminal`&&(0,W.jsx)(HO,{prefs:t}),n===`Notifications`&&(0,W.jsx)(dD,{prefs:t}),e.view.provider!==null&&r!==null&&i!==null&&a!==null&&(0,W.jsx)(TO,{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)(oD,{}),n===`Shortcuts`&&(0,W.jsx)(MO,{})]},l),(0,W.jsx)(hr,{open:s!==null,onOpenChange:e=>{e||c(null)},children:(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsx)(Un,{children:s===`browser`?`Restore browser defaults?`:`Restore machine defaults?`}),(0,W.jsx)(zn,{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)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:()=>{if(u(l+1),s===`browser`)Ye(x);else{if(r===null||i===null||a===null)throw Error(`Restoring machine defaults needs a connected machine`);uo(r.id,{...a.defaults,claudeAccounts:i.claudeAccounts,codexAccounts:i.codexAccounts})}},children:`Restore defaults`})]})]})})]})}function ek(e){return e===`Claude`?`claude`:e===`Codex`?`codex`:e===`OpenCode`?`opencode`:null}function tk(){let e=k(e=>e.settingsOpen);return(0,W.jsx)(ii,{open:e,onOpenChange:p,children:(0,W.jsx)(ci,{children:(0,W.jsx)(ei,{"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.jsx)(nk,{})})})})}function nk(){let e=k(e=>e.settingsListing),t=JO(),n=t.machine;M(!0,r);function r(){e?p(!1):t.subpage?i({settingsAccount:null,settingsEditedMachine:null}):i({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:()=>d(e),children:[(0,W.jsx)(ZO,{page:e}),(0,W.jsx)(V,{icon:An,className:`text-muted-foreground ml-auto size-4`})]},e)}return(0,W.jsxs)(W.Fragment,{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:r,children:(0,W.jsx)(V,{icon:Lo,className:`text-foreground size-5`,strokeWidth:2})}),(0,W.jsxs)(ui,{className:`min-w-0 flex-1 truncate font-medium`,children:[e&&`Settings`,!e&&t.subpage&&t.subpageTitle,!e&&!t.subpage&&t.page]}),!e&&(0,W.jsx)(QO,{view:t,className:`shrink-0`})]}),(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 pt-2 pb-6`,children:[e&&(0,W.jsxs)(`div`,{className:`space-y-5`,children:[(0,W.jsx)(gm,{title:`This browser`,children:KO.map(a)}),(0,W.jsxs)(gm,{title:`Machine`,children:[n!==null&&(0,W.jsxs)(Q,{label:`Machine`,children:[t.machines.length>1&&(0,W.jsxs)(Hp,{value:n.id,onValueChange:e=>i({settingsMachine:e,settingsAccount:null}),children:[(0,W.jsx)(Wp,{className:`w-40`,children:(0,W.jsx)(Up,{})}),(0,W.jsx)(Gp,{children:t.machines.map(e=>(0,W.jsxs)(Kp,{value:e.id,children:[(0,W.jsx)(wf,{icon:e.icon}),e.name]},e.id))})]}),t.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)(wf,{icon:n.icon}),n.name]})]}),qO.map(a)]})]}),!e&&(0,W.jsx)($O,{view:t})]})]})}function rk(){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)(tD,{actions:e=>(0,W.jsx)(H,{type:`submit`,className:`mt-4`,disabled:!e,children:`Connect`})})]})})}var ik=[`messages`,`steps`,`details`,`full`],ak={messages:`Messages`,steps:`Steps`,details:`Details`,full:`Everything`},ok=[{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 sk(e){let t=e.session,n=rn(),[r,i]=(0,U.useState)(`steps`),[a,o]=(0,U.useState)(null);(0,U.useEffect)(()=>{L(t.machine,`sessions.export`,{sessionId:t.id,projectId:t.projectId}).then(o).catch(e=>{c(e),Et(null)})},[t.machine,t.id,t.projectId]);function s(e){let n=t.title.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);Tn(new Blob([e],{type:`text/markdown;charset=utf-8`}),`${n===``?`chat`:n}.md`),Et(null)}return(0,W.jsx)(ai,{open:!0,onOpenChange:()=>Et(null),children:(0,W.jsxs)(Qr,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,"aria-describedby":void 0,children:[(0,W.jsx)($r,{className:`gap-1 px-6 pt-4 pr-12`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(ni,{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:wn(a.context.tokens)})]})}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-3 px-6 pt-5 pb-6`,children:[(0,W.jsxs)(du,{className:`relative flex h-5 w-full touch-none items-center select-none`,min:0,max:ik.length-1,step:1,value:[ik.indexOf(r)],onValueChange:e=>i(ik[e[0]]),children:[(0,W.jsx)(vu,{className:`bg-muted relative h-1.5 grow overflow-hidden rounded-full`,children:(0,W.jsx)(bu,{className:`bg-primary absolute h-full`})}),(0,W.jsx)(Du,{"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:ik.map((e,t)=>(0,W.jsxs)(`button`,{type:`button`,className:z(`text-muted-foreground hover:text-foreground absolute top-0 flex cursor-pointer flex-col`,t===0&&`left-0 items-start`,t>0&&t<ik.length-1&&`-translate-x-1/2 items-center`,t===ik.length-1&&`right-0 items-end`,e===r&&`text-foreground font-medium`),style:t>0&&t<ik.length-1?{left:`calc(8px + (100% - 16px) * ${t/(ik.length-1)})`}:void 0,onClick:()=>i(e),children:[(0,W.jsx)(`span`,{children:ak[e]}),(0,W.jsx)(`span`,{className:`text-muted-foreground/70 font-normal tabular-nums`,children:a===null?`…`:`~${wn(ck(a.markdown[e]))}`})]},e))}),(0,W.jsx)(`ul`,{className:`mt-1 flex flex-col gap-1.5`,children:ok.map(e=>(0,W.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(V,{icon:e.how[r]===null?Wr:rr,className:z(`size-4 shrink-0`,e.how[r]===null&&`text-muted-foreground/50`,e.how[r]!==null&&`text-primary`),strokeWidth:2}),(0,W.jsx)(`span`,{className:z(`min-w-0 flex-1 truncate`,e.how[r]===null&&`text-muted-foreground/60`,e.how[r]!==null&&`text-foreground`),children:e.label}),(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:e.how[r]??`Not included`})]},e.label))})]}),(0,W.jsxs)(oi,{className:`bg-muted/40 border-t px-6 py-4 sm:justify-between`,children:[(0,W.jsx)(H,{type:`button`,variant:`ghost`,onClick:()=>Et(null),children:`Cancel`}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsxs)(H,{type:`button`,variant:`outline`,disabled:a===null||n.copied,onClick:()=>{a!==null&&n.copy(a.markdown[r])},children:[(0,W.jsx)(V,{icon:n.copied?Wn:$n}),n.copied?`Copied`:`Copy`]}),(0,W.jsxs)(H,{type:`button`,disabled:a===null,onClick:()=>{a!==null&&s(a.markdown[r])},children:[(0,W.jsx)(V,{icon:tr}),`Export`]})]})]})]})})}function ck(e){return Math.round(e.length/4)}var lk=.5,uk=.8,dk=.6,fk=.45,pk=.3,mk=.25,hk=.25,gk=4,_k=new Set([`a`,`an`,`and`,`for`,`in`,`of`,`on`,`the`,`to`,`with`]),vk=/[\p{L}\p{N}]/u,yk=/\p{Ll}/u,bk=/\p{Lu}/u,xk=/\p{N}/u,Sk=/\p{L}/u;function Ck(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 wk(e){let t=/^"([^"]+)"$/.exec(e.trim())?.[1].trim();return t===void 0||t===``?null:t}function Tk(e){let t=wk(e);return t===null?Ck(e).replace(/^["'`]+|["'`]+$/g,``).split(/\s+/).filter(Boolean):[Ck(t)]}function Ek(e){return Tk(e).some(e=>e.length>=3)}function Dk(e,t){let n=e[t],r=e[t-1]??``,i=e[t+1]??``;return vk.test(n)&&(r===``||!vk.test(r)||yk.test(r)&&bk.test(n)||bk.test(r)&&bk.test(n)&&yk.test(i)||xk.test(r)!==xk.test(n))}function Ok(e,t){return t>=e.length||!vk.test(e[t])||Dk(e,t)}function kk(e,t){let n=t+1;for(;n<e.length&&vk.test(e[n])&&!Dk(e,n);)n+=1;return n}function Ak(e){return Array.from({length:e.length},(e,t)=>t).filter(t=>Dk(e,t))}function jk(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 Mk(e,t,n){for(let r of Ak(e)){if(t[r]!==n[0])continue;let i=[],a=r,o=n;for(;o!==``&&a<t.length;){let n=kk(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&&!Dk(e,a);)a+=1;else break}if(o===``&&i.length>1)return{score:dk,start:r,end:i[i.length-1].end,pieces:i}}return null}function Nk(e,t,n){if(n.length<3||!Sk.test(n))return null;let r=n.length<=gk;for(let i of Ak(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&&vk.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)&&jk(n,t.slice(i,i+o),r&&o===n.length)){let e={start:i,end:i+o};return{score:fk,...e,pieces:[e]}}}return null}function Pk(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(Dk(r,n)){let e=Ok(r,i.end)?1:uk;if((a===null||e>a.score)&&(a={score:e,...i,pieces:[i]}),e===1)return a}else e.midWord&&t.length>=gk&&a===null&&(a={score:pk,...i,pieces:[i]})}if(a!==null&&a.score>pk)return a;let o=n.primary?Mk(r,i,t):null;return o===null?n.typos?Nk(r,i,t)??a:a:o}function Fk(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 Ik(e,t){let n=[];for(let r=e.indexOf(t);r!==-1;r=e.indexOf(t,r+1)){let i=r+t.length,a=vk.test(t[0])&&vk.test(e[r-1]??``),o=vk.test(t[t.length-1])&&vk.test(e[i]??``);!a&&!o&&n.push({start:r,end:i})}return Fk(n)}function Lk(e,t){let n=Ik(e.folded,t);return n.length===0?null:{score:1,...n[0],pieces:n}}function Rk(e,t,n){let r=Tk(e);if(r.length===0)return null;let i=wk(e)!==null,a=t.filter(e=>e.value!==``).map(e=>({...e,source:e.value,folded:Ck(e.value)})),o=r.some(e=>!_k.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?Lk(c,e):Pk(c,e,{primary:o===0,typos:n});a!==null&&(o===0&&s.push(...a.pieces),a.score>=uk&&c.weight>hk&&(r=!0),t=Math.max(t,a.score*c.weight))}if(t===0){if(o&&_k.has(e))continue;return null}u&&=r,c+=t,l+=1}let d=a.at(0)?.folded??``,f=r.join(` `),p=d===f?lk:r.length>1&&d.includes(f)?mk:0;return{quality:c/l+p,strong:u,ranges:Fk(s)}}function zk(e,t){let n=Ck(t);return wk(e)===null?Fk(Tk(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})):Ik(n,Tk(e)[0])}var Bk=.6,Vk=.25,Hk=.6,Uk=8,Wk=3,Gk=18144e5,Kk=32,qk=12096e5,Jk=2.5;function Yk(e){return 2**(-Math.max(0,e)/qk)}function Xk(e,t){let n=Yk(t-e.updatedAt),r=e.opens===null?0:e.opens.score*Yk(t-e.opens.openedAt);return Math.min(Jk,1+n+.5*Math.log2(1+r))}function Zk(e){return Tk(e).join(` `).slice(0,Kk).trim()}function Qk(e,t,n){let r=Zk(t),i=(e.opens?.picks??[]).filter(e=>n-e.at<=Gk&&(e.query===r||r.length>=Wk&&e.query.startsWith(r)));return Math.max(0,...i.map(e=>e.at))}function $k(e,t,n){let r=Rk(t,[{value:e.title,weight:1,midWord:!0},{value:e.branch??``,weight:Hk,midWord:!1},{value:e.projectName??``,weight:Vk,midWord:!1},{value:e.machineName??``,weight:Vk,midWord:!1}],n);if(r!==null)return r;let i=t.trim().toLowerCase();return i.length>=Uk&&e.id.toLowerCase().includes(i)?{quality:Bk,strong:!0,ranges:[]}:null}function eA(e){return e>=1.5?3:e>=.7?2:+(e>=.4)}function tA(e,t,n,r){function i(i){return e.flatMap(e=>{let a=t(e),o=$k(a,n,i);return o===null?[]:[{item:e,match:o,picked:Qk(a,n,r),score:o.quality*Xk(a,r)}]})}let a=i(!1);return[...a.some(e=>e.match.strong)?a:i(!0)].sort((e,t)=>eA(t.match.quality)-eA(e.match.quality)||t.picked-e.picked||t.score-e.score).map(e=>({item:e.item,ranges:e.match.ranges}))}function nA(e){return Math.max(e.updatedAt,e.opens?.openedAt??0)}function rA(e,t,n){return Rk(e,[{value:t,weight:1,midWord:!0},{value:n,weight:Hk,midWord:!1}],!1)}function iA(e,t,n,r){return e.flatMap(e=>{let n=t(e);return n===void 0?[]:[{match:e,subject:n}]}).sort((e,t)=>aA(e.match,t.match)||Qk(t.subject,n,r)-Qk(e.subject,n,r)||Xk(t.subject,r)-Xk(e.subject,r)).map(e=>e.match)}function aA(e,t){return t.quality-e.quality||Number(t.author===`user`)-Number(e.author===`user`)}function oA(e){let t=k(e=>e.machines);return(0,W.jsxs)(mn,{value:e.scope,onValueChange:e.onScope,children:[(0,W.jsx)(Nn,{value:`all`,children:`All machines`}),t.map(e=>(0,W.jsxs)(Nn,{value:e.id,disabled:e.status!==`online`,children:[(0,W.jsx)(wf,{icon:e.icon,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:sA(e)})]},e.id))]})}function sA(e){return e.status===`online`?e.name:e.status===`unpaired`?`${e.name} · needs pairing`:`${e.name} · offline`}function cA(e,t,n){let r=k(e=>e.machines),[i,a]=(0,U.useState)([]),[o,s]=(0,U.useState)([]),c=r.filter(e=>e.status===`online`).map(e=>e.id).join(` `),l=r.filter(e=>n===`all`||e.id===n),u=l.filter(e=>e.status===`online`).map(e=>e.id).join(` `);(0,U.useEffect)(()=>{let e=!0;for(let t of R().machines.filter(e=>e.status===`online`))L(t.id,`sessions.searchable`,void 0).then(n=>{e&&a(e=>lA(e,{machine:t.id,sessions:n.sessions.map(e=>({...e,machine:t.id})),failed:uA(n.failed)}))}).catch(()=>{e&&a(e=>lA(e,{machine:t.id,sessions:[],failed:[t.name]}))});return()=>{e=!1}},[c]),(0,U.useEffect)(()=>{if(t.startsWith(`>`)||!Ek(t))return;let e=!0;for(let n of R().machines.filter(e=>e.status===`online`))L(n.id,`sessions.searchMessages`,{query:t}).then(r=>{e&&s(e=>lA(e,{machine:n.id,query:t,matches:r.matches.map(e=>({...e,machine:n.id})),failed:uA(r.failed)}))}).catch(()=>{e&&s(e=>lA(e,{machine:n.id,query:t,matches:[],failed:[n.name]}))});return()=>{e=!1}},[t,c]);let d=o.filter(t=>u.split(` `).includes(t.machine)&&t.query===e);return{threadResults:i,reachable:u,messages:d.flatMap(e=>e.matches),searching:!e.startsWith(`>`)&&Ek(e)&&l.some(e=>e.status===`online`&&!d.some(t=>t.machine===e.id)),failures:[...new Set([...l.filter(e=>e.status!==`online`).map(e=>e.name),...i.filter(e=>u.split(` `).includes(e.machine)).flatMap(e=>e.failed),...d.flatMap(e=>e.failed)])]}}function lA(e,t){return[...e.filter(e=>e.machine!==t.machine),t]}function uA(e){return e.map(e=>ir[e])}var dA=20,fA=12,pA=10;function mA(){let e=k(e=>e.paletteOpen);return(0,W.jsx)(ai,{open:e,onOpenChange:ue,children:(0,W.jsxs)(Qr,{showCloseButton:!1,className:`top-[20%] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-xl`,children:[(0,W.jsx)(ni,{className:`sr-only`,children:`Search threads`}),(0,W.jsx)(hA,{})]})})}function hA(){let e=k(e=>e.selection),t=k(e=>e.machines),n=k(e=>e.projects),[r,i]=(0,U.useState)(``),[a]=Br(r,300),[o,s]=(0,U.useState)(`all`),[c,l]=(0,U.useState)(null),[u]=(0,U.useState)(()=>Date.now()),f=(0,U.useRef)(null),m=(0,U.useRef)(null),h=r.startsWith(`>`),g=h?r.slice(1):r,_=cA(r,a,o),v=_.threadResults,y=_.reachable,b=t.find(e=>e.id===o),x=(0,U.useMemo)(()=>v.filter(e=>y.split(` `).includes(e.machine)).flatMap(e=>e.sessions).map(e=>({thread:e,subject:vA(e,t,n)})),[v,y,t,n]),S=new Map(x.map(e=>[P(e.thread.machine,e.thread.id),e.subject])),C=(0,U.useMemo)(()=>g.trim()===``?[]:tA(x,e=>e.subject,g,u).slice(0,dA).map(e=>({item:e.item.thread,ranges:e.ranges})),[x,g,u]),w=(0,U.useMemo)(()=>[...x].sort((e,t)=>nA(t.subject)-nA(e.subject)).slice(0,fA).map(e=>({item:e.thread,ranges:[]})),[x]),T=g.trim()===``?w:C,E=[...e===null?[]:[{key:`new`,label:`New thread`,place:{machine:e.machine,projectId:e.projectId},detail:bA(e.machine,e.projectId,n),run:()=>we(e.machine,e.projectId)}],{key:`accounts`,label:`Manage accounts`,detail:``,place:null,run:()=>d(Se[R().settings.provider])},{key:`settings`,label:`Settings`,detail:`Theme, notifications, keyboard shortcuts`,place:null,run:()=>p(!0)}].flatMap(e=>{let t={...e,section:`Actions`,labelRanges:[],detailRanges:[],branch:``,updatedAt:null};if(g.trim()===``)return[t];let n=rA(g,e.label,e.detail);return n===null?[]:[{...t,labelRanges:n.ranges}]}),D=new Set(C.map(e=>P(e.item.machine,e.item.id))),O=h?[]:T.map(e=>{let t=e.item,r=g.trim()!==``&&t.branch!==null?` | ${t.branch}`:``;return{key:P(t.machine,t.id),section:g.trim()===``?`Recent`:`Threads`,label:t.title,labelRanges:e.ranges,detail:yA(t,n),detailRanges:[],branch:r,updatedAt:t.updatedAt,place:{machine:t.machine,projectId:t.projectId},run:()=>Ie({machine:t.machine,projectId:t.projectId,sessionId:t.id},g.trim()===``?null:g)}}),A=h?[]:iA(_.messages.filter(e=>!D.has(P(e.machine,e.sessionId))),e=>S.get(P(e.machine,e.sessionId)),g,u).slice(0,pA).flatMap(e=>{let t=x.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:${P(e.machine,e.sessionId)}`,section:`In messages`,label:t.title,labelRanges:[],detail:n,detailRanges:zk(g,n),branch:``,updatedAt:t.updatedAt,place:{machine:t.machine,projectId:t.projectId},run:()=>Ie({machine:t.machine,projectId:t.projectId,sessionId:t.id},g)}]}),j=[...E,...O,...A],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){ue(!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:xr,className:`text-muted-foreground size-4 shrink-0`}),(0,W.jsx)(`input`,{ref:m,value:r,onChange:e=>{i(e.target.value),l(null)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;j.length>0&&l(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)(hn,{children:[(0,W.jsx)(gn,{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:[b!==void 0&&(0,W.jsx)(wf,{icon:b.icon,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:b?.name??`All machines`}),(0,W.jsx)(V,{icon:Ir,className:`size-3 shrink-0`})]})}),(0,W.jsx)(On,{align:`end`,className:`w-56`,onCloseAutoFocus:e=>{e.preventDefault(),m.current?.focus()},children:(0,W.jsx)(oA,{scope:o,onScope:e=>{s(e),l(null)}})})]})]}),(0,W.jsxs)(`div`,{ref:f,className:`max-h-96 overflow-y-auto p-1`,children:[j.length===0&&!_.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:z(`flex w-full cursor-pointer flex-col rounded-lg px-2.5 py-1.5 text-left`,n===M&&`bg-accent`),onMouseMove:()=>l(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)(dc,{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)(_A,{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)(gA,{id:e.place.machine,machines:t}),(0,W.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,W.jsx)(_A,{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:bn(e.updatedAt)})]})]})]},e.key)),_.searching&&(0,W.jsx)(`p`,{className:`text-muted-foreground px-2.5 py-2 text-xs`,children:`Searching messages…`})]}),_.failures.length>0&&(0,W.jsxs)(`p`,{className:`text-muted-foreground border-t px-4 py-2 text-xs`,children:[`Couldn't search `,_.failures.join(`, `)]})]})}function gA(e){let t=e.machines.find(t=>t.id===e.id);return(0,W.jsx)(wf,{icon:t?.icon??null,className:`size-3 shrink-0`})}function _A(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 vA(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 yA(e,t){return`${e.status===`minimized`?`Minimized · `:``}${bA(e.machine,e.projectId,t)}`}function bA(e,t,n){return t===`no-project`?`Chat`:n.find(n=>n.machine===e&&n.id===t)?.name??``}function xA(e){let t=e.session,[n,r]=(0,U.useState)(!1),i=k(e=>e.generatingTitles.includes(P(t.machine,t.id))),a=k(e=>He(e,t.machine,t.projectId)?.scratch===!0),o=e.context?Vn:Nr,s=e.context?Gn:Fn;return(0,W.jsxs)(W.Fragment,{children:[t.status!==`active`&&(0,W.jsxs)(o,{onSelect:()=>void Je(t.machine,t.id,{status:`active`}),children:[(0,W.jsx)(V,{icon:t.status===`pinned`?Ms:Ps}),t.status===`pinned`?`Unpin`:`Activate`]}),t.status!==`inactive`&&(0,W.jsxs)(o,{onSelect:e.onDeactivate,children:[(0,W.jsx)(V,{icon:$s}),`Done`]}),t.status!==`snoozed`&&(0,W.jsxs)(o,{onSelect:()=>void Je(t.machine,t.id,{status:`snoozed`}),children:[(0,W.jsx)(V,{icon:ic}),`Snooze`]}),t.status!==`minimized`&&(0,W.jsxs)(o,{onSelect:()=>void Je(t.machine,t.id,{status:`minimized`}),children:[(0,W.jsx)(V,{icon:Ds}),`Minimize`]}),t.status!==`pinned`&&(0,W.jsxs)(o,{onSelect:()=>void Je(t.machine,t.id,{status:`pinned`}),children:[(0,W.jsx)(V,{icon:Ns}),`Pin`]}),(0,W.jsx)(s,{}),(0,W.jsxs)(o,{disabled:i,onSelect:()=>void lt(t),children:[(0,W.jsx)(V,{icon:Do}),`Refresh title`]}),(0,W.jsxs)(o,{onSelect:e.onRename,children:[(0,W.jsx)(V,{icon:js}),`Rename`]}),(0,W.jsxs)(o,{onSelect:()=>Et(t),children:[(0,W.jsx)(V,{icon:tr}),`Export`]}),a&&(0,W.jsxs)(o,{onSelect:()=>sc(t.machine,t.projectId,{scratch:!1,name:t.title}).catch(c),children:[(0,W.jsx)(V,{icon:gr}),`Turn into project`]}),(0,W.jsxs)(o,{variant:`destructive`,title:`Also removes it from ${ir[t.provider]}`,onSelect:e=>{n?nt(t.machine,t.id,t.projectId):(e.preventDefault(),r(!0))},children:[(0,W.jsx)(V,{icon:ns}),n?e.mobile?`Tap again to delete`:`Click again to delete`:`Delete`]})]})}function SA(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:Ws,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:Vs,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:zo,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:Xo,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:Mr,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:Mr,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:qo,className:`size-4 shrink-0`})}):null}function CA(e){let t=k(t=>t.generatingTitles.includes(P(e.session.machine,e.session.id)));return(0,W.jsx)(`span`,{className:z((t||e.awaitingTitle)&&`text-shimmer`),children:e.session.title})}var wA=`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`,TA=(0,U.memo)(EA);function EA(e){let t=e.session,n=ac(t.machine,t.projectId),r=k(e=>Ge(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(){pt(t.machine,t.id,e.scope)}function g(){f?s(!0):h()}let _=(0,W.jsx)(hr,{open:o,onOpenChange:s,children:(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsx)(Un,{children:`Stop running work?`}),(0,W.jsx)(zn,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:h,children:`Stop and Mark Done`})]})]})}),v=e.saved&&(0,W.jsxs)(hn,{children:[(0,W.jsx)(gn,{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:is,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)(xA,{session:t,context:!1,mobile:!1,onDeactivate:g,onRename:()=>a(t.title)})})]}),y=(0,W.jsx)(nr,{className:`w-44`,onCloseAutoFocus:e=>{c.current!==null&&(e.preventDefault(),c.current.focus(),c.current.select())},children:(0,W.jsx)(xA,{session:t,context:!0,mobile:!1,onDeactivate:g,onRename:()=>a(t.title)})}),b=i===null?(0,W.jsx)(`span`,{className:z(`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)(CA,{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&&Je(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=z(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)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(wA,x,`flex h-9 items-center gap-2.5 px-2.5`),onClick:()=>e.onSelect(t.machine,t.projectId,t.id),onKeyDown:n=>{n.key===`Enter`&&e.onSelect(t.machine,t.projectId,t.id)},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)(dc,{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:bn(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(),Je(t.machine,t.id,{status:`active`})},children:(0,W.jsx)(V,{icon:Ps,className:`size-3.5`})})]})]})]})}),y]}),_]}):(0,W.jsxs)(`li`,{className:`list-none py-0.5`,children:[(0,W.jsxs)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(wA,x,d&&!e.selected&&`opacity-70 transition-opacity focus-within:opacity-100 hover:opacity-100`),onClick:()=>e.onSelect(t.machine,t.projectId,t.id),onKeyDown:n=>{n.key===`Enter`&&e.onSelect(t.machine,t.projectId,t.id)},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)(dc,{machine:t.machine,projectId:t.projectId,className:`size-5`}),b,(0,W.jsx)(SA,{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)(wf,{icon:r,className:`size-3 shrink-0`}),(0,W.jsxs)(`span`,{className:z(`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:Ns,className:`size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ic,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:bn(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:$s,strokeWidth:1.25,className:`size-5 scale-110`})})}),(0,W.jsx)(`div`,{className:`mt-1 flex h-5 items-center`,children:v})]})]})}),y]}),_]})}function DA(e){let t=ac(e.machine,e.projectId),n=k(t=>Ge(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:z(wA,`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)(dc,{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:Ks,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)(wf,{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 OA=`/assets/ghostty-vt-CQAu1Gs5.wasm`,kA=Uint8Array,AA=Uint16Array,jA=Int32Array,MA=new kA([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]),NA=new kA([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]),PA=new kA([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),FA=function(e,t){for(var n=new AA(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new jA(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}},IA=FA(MA,2),LA=IA.b,RA=IA.r;LA[28]=258,RA[258]=28;var zA=FA(NA,0),BA=zA.b;zA.r;for(var VA=new AA(32768),HA=0;HA<32768;++HA){var UA=(HA&43690)>>1|(HA&21845)<<1;UA=(UA&52428)>>2|(UA&13107)<<2,UA=(UA&61680)>>4|(UA&3855)<<4,VA[HA]=((UA&65280)>>8|(UA&255)<<8)>>1}for(var WA=(function(e,t,n){for(var r=e.length,i=0,a=new AA(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new AA(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new AA(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[VA[d]>>c]=l}else for(s=new AA(r),i=0;i<r;++i)e[i]&&(s[i]=VA[o[e[i]-1]++]>>15-e[i]);return s}),GA=new kA(288),HA=0;HA<144;++HA)GA[HA]=8;for(var HA=144;HA<256;++HA)GA[HA]=9;for(var HA=256;HA<280;++HA)GA[HA]=7;for(var HA=280;HA<288;++HA)GA[HA]=8;for(var KA=new kA(32),HA=0;HA<32;++HA)KA[HA]=5;var qA=WA(GA,9,1),JA=WA(KA,5,1),YA=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},XA=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},ZA=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},QA=function(e){return(e+7)/8|0},$A=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new kA(e.subarray(t,n))},ej=[`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`],tj=function(e,t,n){var r=Error(t||ej[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,tj),!n)throw r;return r},nj=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new kA(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new kA(i*3));var l=function(e){var t=n.length;if(e>t){var r=new kA(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=XA(e,d,1);var v=XA(e,d+1,3);if(d+=3,!v){var y=QA(d)+4,b=e[y-4]|e[y-3]<<8,x=y+b;if(x>i){c&&tj(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=qA,m=JA,h=9,g=5;else if(v==2){var S=XA(e,d,31)+257,C=XA(e,d+10,15)+4,w=S+XA(e,d+5,31)+1;d+=14;for(var T=new kA(w),E=new kA(19),D=0;D<C;++D)E[PA[D]]=XA(e,d+D*3,7);d+=C*3;for(var O=YA(E),k=(1<<O)-1,A=WA(E,O,1),D=0;D<w;){var j=A[XA(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+XA(e,d,3),d+=2,M=T[D-1]):y==17?(N=3+XA(e,d,7),d+=3):y==18&&(N=11+XA(e,d,127),d+=7);N--;)T[D++]=M}}var ee=T.subarray(0,S),te=T.subarray(S);h=YA(ee),g=YA(te),p=WA(ee,h,1),m=WA(te,g,1)}else tj(1);if(d>_){c&&tj(0);break}}s&&l(f+131072);for(var ne=(1<<h)-1,re=(1<<g)-1,ie=d;;ie=d){var M=p[ZA(e,d)&ne],ae=M>>4;if(d+=M&15,d>_){c&&tj(0);break}if(M||tj(2),ae<256)n[f++]=ae;else if(ae==256){ie=d,p=null;break}else{var oe=ae-254;if(ae>264){var D=ae-257,se=MA[D];oe=XA(e,d,(1<<se)-1)+LA[D],d+=se}var ce=m[ZA(e,d)&re],le=ce>>4;ce||tj(3),d+=ce&15;var te=BA[le];if(le>3){var se=NA[le];te+=ZA(e,d)&(1<<se)-1,d+=se}if(d>_){c&&tj(0);break}s&&l(f+131072);var ue=f+oe;if(f<te){var de=a-te,fe=Math.min(te,ue);for(de+f<0&&tj(3);f<fe;++f)n[f]=r[de+f]}for(;f<ue;++f)n[f]=n[f-te]}}t.l=p,t.p=ie,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?$A(n,0,f):n.subarray(0,f)},rj=new kA(0),ij=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&tj(6,`invalid zlib data`),(e[1]>>5&1)==+!t&&tj(6,`invalid zlib data: `+(e[1]&32?`need`:`unexpected`)+` dictionary`),(e[1]>>3&4)+2},aj=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 kA(32768),this.p=new kA(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||tj(5),this.d&&tj(4),!this.p.length)this.p=e;else if(e.length){var t=new kA(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=nj(this.p,this.s,this.o);this.ondata($A(n,t,this.s.b),this.d),this.o=$A(n,this.s.b-32768),this.s.b=this.o.length,this.p=$A(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),oj=function(){function e(e,t){aj.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(aj.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(ij(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&tj(6,`invalid zlib data`),this.p=this.p.subarray(0,-4)),aj.prototype.c.call(this,t)},e}();function sj(e,t){return nj(e.subarray(ij(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}var cj=typeof TextDecoder<`u`&&new TextDecoder;try{cj.decode(rj,{stream:!0})}catch{}function lj(e,t=`utf8`){return new TextDecoder(t).decode(e)}var uj=new TextEncoder;function dj(e){return uj.encode(e)}var fj=8192,pj=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),mj={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},hj=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=fj,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=mj[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===pj&&t!==`uint8`&&t!==`int8`){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new mj[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new mj[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 lj(this.readBytes(e))}decodeText(e=1,t=`utf8`){return lj(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(dj(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)}},gj=[];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;gj[e]=t}var _j=4294967295;function vj(e,t,n){let r=e;for(let e=0;e<n;e++)r=gj[(r^t[e])&255]^r>>>8;return r}function yj(e,t){return(vj(_j,e,t)^_j)>>>0}function bj(e,t,n){let r=e.readUint32(),i=yj(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 xj(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function Sj(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 Cj(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 wj(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 Tj(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]+Ej(t[a-i],n[a],n[a-i])&255}}function Ej(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 Dj(e,t,n,r,i,a){switch(e){case 0:xj(t,n,i);break;case 1:Sj(t,n,i,a);break;case 2:Cj(t,n,r,i);break;case 3:wj(t,n,r,i,a);break;case 4:Tj(t,n,r,i,a);break;default:throw Error(`Unsupported filter: ${e}`)}}var Oj=new Uint16Array([255]),kj=new Uint8Array(Oj.buffer)[0]===255;function Aj(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);Dj(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(kj)for(let t=0;t<e.length;t++)e[t]=jj(e[t]);return e}return c}function jj(e){return(e&255)<<8|e>>8&255}var Mj=new Uint16Array([255]),Nj=new Uint8Array(Mj.buffer)[0]===255,Pj=new Uint8Array;function Fj(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=Pj,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:xj(d,f,s);break;case 1:Sj(d,f,s,o);break;case 2:Cj(d,f,l,s);break;case 3:wj(d,f,l,s,o);break;case 4:Tj(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(Nj)for(let t=0;t<e.length;t++)e[t]=Ij(e[t]);return e}return c}function Ij(e){return(e&255)<<8|e>>8&255}var Lj=Uint8Array.of(137,80,78,71,13,10,26,10);function Rj(e){if(!zj(e.readBytes(Lj.length)))throw Error(`wrong PNG signature`)}function zj(e){if(e.length<Lj.length)return!1;for(let t=0;t<Lj.length;t++)if(e[t]!==Lj[t])return!1;return!0}var Bj=`tEXt`,Vj=0,Hj=new TextDecoder(`latin1`);function Uj(e){if(Gj(e),e.length===0||e.length>79)throw Error(`keyword length must be between 1 and 79`)}var Wj=/^[\u0000-\u00FF]*$/;function Gj(e){if(!Wj.test(e))throw Error(`invalid latin1 text`)}function Kj(e,t,n){let r=qj(t);e[r]=Jj(t,n-r.length-1)}function qj(e){for(e.mark();e.readByte()!==Vj;);let t=e.offset;e.reset();let n=Hj.decode(e.readBytes(t-e.offset-1));return e.skip(1),Uj(n),n}function Jj(e,t){return Hj.decode(e.readBytes(t))}var Yj={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Xj={UNKNOWN:-1,DEFLATE:0},Zj={UNKNOWN:-1,ADAPTIVE:0},Qj={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},$j={NONE:0,BACKGROUND:1,PREVIOUS:2},eM={SOURCE:0,OVER:1},tM=class extends hj{_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 oj((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=Xj.UNKNOWN,this._filterMethod=Zj.UNKNOWN,this._interlaceMethod=Qj.UNKNOWN,this._colorType=Yj.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this._inflatorResult=new Uint8Array,this.setBigEndian()}decode(){for(Rj(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(Rj(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 Bj:Kj(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?bj(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?bj(this,e+4,t):this.skip(4)}decodeIHDR(){let e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=nM(this.readUint8());let t=this.readUint8();this._colorType=t;let n;switch(t){case Yj.GREYSCALE:n=1;break;case Yj.TRUECOLOUR:n=3;break;case Yj.INDEXED_COLOUR:n=1;break;case Yj.GREYSCALE_ALPHA:n=2;break;case Yj.TRUECOLOUR_ALPHA:n=4;break;case Yj.UNKNOWN:default:throw Error(`Unknown color type: ${t}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==Xj.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 Yj.GREYSCALE:case Yj.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 Yj.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 Yj.UNKNOWN:case Yj.GREYSCALE_ALPHA:case Yj.TRUECOLOUR_ALPHA:default:throw Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){let t=qj(this),n=this.readUint8();if(n!==Xj.DEFLATE)throw Error(`Unsupported iCCP compression method: ${n}`);let r=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:sj(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=Fj({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 $j.NONE:break;case $j.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 $j.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 eM.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 eM.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!==Zj.ADAPTIVE)throw Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Qj.NO_INTERLACE)this._png.data=Fj({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Qj.ADAM7)this._png.data=Aj({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:$j.NONE,blendOp:eM.SOURCE,data:e}),this._inflator=new oj((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 nM(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw Error(`invalid bit depth: ${e}`);return e}function rM(e){let t=e.palette,n=e.depth;if(!t)throw Error(`Color palette is undefined.`);iM(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 iM(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 aM(e,t){return new tM(e,t).decode()}var oM=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)})),sM=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`}})),cM=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAsync=e.decode=e.Decoder=e.DecoderAsync=void 0;var t=oM(),n=sM();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})),lM=oM(),uM=cM(),dM=lM.PALETTE_ANSI_256.slice();dM.set(lM.PALETTE_VT340_COLOR);var fM=200,pM=new TextEncoder,mM=`offsite-image:`;async function hM(e){let t=await(0,uM.decodeAsync)(e,{fillColor:0,palette:dM});return!t.width||!t.height?null:createImageBitmap(new ImageData(new Uint8ClampedArray(t.data8),t.width,t.height))}function gM(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 _M(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=gM(r.get(`width`),t.width,t.cellWidth),s=gM(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 vM(e){let t=aM(e),{width:n,height:r,depth:i,channels:a}=t,o=n*r,s=new Uint8Array(o*4);if(t.palette){let e=rM(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 yM=class{core;images=[];nextImage=0;constructor(e){this.core=e}place(e,t,n){let r=`${mM}${this.nextImage++}`;this.core.write(pM.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>fM){let e=this.images.shift();e&&this.remove(e)}let a=Math.ceil(i.height/n);a>1&&this.core.write(pM.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()}},bM=Fe.withTag(`terminal`),xM=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]),SM={userdata:0,writePty:1,bell:2,xtversion:4,size:6,deviceAttributes:8},CM=1,wM=-3,TM={width:0,height:4,data:8,length:12},EM=new TextDecoder,DM=new TextEncoder,OM=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(EM.decode(r.subarray(n,i)))}static async load(){let t=await fetch(OA);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&&bM.debug(`[libghostty-vt]`,EM.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===wM&&i>0){let r=this.alloc(i),a=e(r,i,t),o=this.view(t,4).getUint32(0,!0);a===0&&(n=EM.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,SM.userdata,n);for(let t of[[SM.writePty,this.callbacks.writePty],[SM.deviceAttributes,this.callbacks.deviceAttributes],[SM.size,this.callbacks.size],[SM.bell,this.callbacks.bell],[SM.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,SM.xtversion,0),this.call(`ghostty_terminal_set`,e,SM.bell,0),this.call(`ghostty_terminal_set`,e,SM.size,0),this.call(`ghostty_terminal_set`,e,SM.deviceAttributes,0),this.call(`ghostty_terminal_set`,e,SM.writePty,0),this.call(`ghostty_terminal_set`,e,SM.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(xM),{env:{w:(e,t,n,r)=>{let i=this.hosts.get(t);i&&r!==0&&i.write(EM.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`,CM,n[5])!==0)throw Error(`libghostty-vt did not accept the PNG decoder`)}decodePng(e,t,n,r){let i;try{i=vM(new Uint8Array(this.memory.buffer,t,n))}catch(e){return bM.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+TM.width,i.width,!0),o.setUint32(r+TM.height,i.height,!0),o.setUint32(r+TM.data,a,!0),o.setUint32(r+TM.length,i.data.length,!0),1}writeVersion(e,t){let n=DM.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)}},kM=null;async function AM(){kM=await OM.load()}function jM(){if(!kM)throw Error(`libghostty-vt is not loaded`);return kM}var MM=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 NM(e){return MM.get(e)??0}var PM=new Map([[`!`,`1`],[`@`,`2`],[`#`,`3`],[`$`,`4`],[`%`,`5`],[`^`,`6`],[`&`,`7`],[`*`,`8`],[`(`,`9`],[`)`,`0`],[`~`,"`"],[`_`,`-`],[`+`,`=`],[`{`,`[`],[`}`,`]`],[`|`,`\\`],[`:`,`;`],[`"`,`'`],[`<`,`,`],[`>`,`.`],[`?`,`/`]]),FM;function IM(){return FM||(FM=globalThis.navigator?.keyboard?.getLayoutMap().catch(()=>void 0)??Promise.resolve(void 0),FM)}function LM(){return FM=void 0,IM()}function RM(e){return!e.shiftKey||e.ctrlKey||e.altKey||e.metaKey?0:+([...e.key].length===1)}function zM(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=PM.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 BM=new Map([[`Backquote`,"`"],[`Minus`,`-`],[`Equal`,`=`],[`BracketLeft`,`[`],[`BracketRight`,`]`],[`Backslash`,`\\`],[`Semicolon`,`;`],[`Quote`,`'`],[`Comma`,`,`],[`Period`,`.`],[`Slash`,`/`],[`Space`,` `]]),VM=[...`0123456789`].map(e=>[`Digit${e}`,e]),HM=new Map([...PM].map(e=>[e[1],e[0]]));function UM(e){return/^Key[A-Z]$/u.test(e)?e[3].toLowerCase():/^Digit[0-9]$/u.test(e)?e[5]:BM.get(e)}function WM(e){return[...BM,...VM].every(t=>t[0]===`Space`||e.get(t[0])===t[1])}function GM(e,t){let n=t?.get(e.code),r=n&&[...n].length===1?n:UM(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||!WM(t)?null:HM.get(r)??r}var KM=new TextEncoder,qM=new Map([[`[`,`\x1B`],[`m`,`\r`],[`i`,` `],[`@`,`\0`]]),JM=class{runtime=jM();terminal;keyEncoderSlot;keyEncoder;keyEventSlot;keyEvent;mouseEncoderSlot;mouseEncoder;mouseEventSlot;mouseEvent;scratch;keyboardLayoutMap;constructor(e){let t=this.runtime;this.terminal=e,this.loadKeyboardLayout(IM()),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=qM.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,NM(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,RM(e)),r.call(`ghostty_key_event_set_composing`,this.keyEvent,+!!e.isComposing),r.call(`ghostty_key_event_set_unshifted_codepoint`,this.keyEvent,zM({code:e.code,key:s,shiftKey:e.shiftKey},this.keyboardLayoutMap));let l=KM.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 GM(e,this.keyboardLayoutMap)}refreshKeyboardLayout(){this.loadKeyboardLayout(LM())}encodePaste(e){let t=this.runtime,n=KM.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`}},YM=26,XM=30,ZM=1,QM={imageId:1,placementId:2,isVirtual:3,xOffset:4,yOffset:5,columns:10,rows:11,z:12},$M={width:3,height:4,format:5,data:7,length:8},eN={size:48,pixelWidth:4,pixelHeight:8,column:20,row:24,visible:28,sourceX:32,sourceY:36,sourceWidth:40,sourceHeight:44},tN=new Map([[0,3],[1,4],[3,2],[4,1]]),nN=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 rN(e,t,n){let r=Array.from(e).slice(1,4).map(e=>nN.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 iN(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(aN(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(aN(i))}return t}function aN(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 oN(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 sN(e){let t=jM(),n=t.alloc(16),r=t.call(`ghostty_terminal_get`,e,YM,n);return t.free(n,16),r===0}var cN=class{runtime=jM();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(eN.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)??dN(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,eN.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,XM,this.scratch));let r=n.readPointer(this.scratch);n.check(`ghostty_kitty_graphics_get`,n.call(`ghostty_kitty_graphics_get`,r,ZM,this.iteratorSlot));let i=n.readPointer(this.iteratorSlot),a=[],o=[];for(;n.call(`ghostty_kitty_graphics_placement_next`,i);){let e=this.placementU32(i,QM.imageId);if(this.placementData(i,QM.isVirtual).getUint8(0)){o.push({imageId:e,placementId:this.placementU32(i,QM.placementId),columns:this.placementU32(i,QM.columns),rows:this.placementU32(i,QM.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,eN.size).fill(0);let s=n.view(this.info,eN.size);s.setUint32(0,eN.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(eN.visible)!==0&&a.push({...this.image(t,e),z:this.placementData(i,QM.z).getInt32(0,!0),column:s.getInt32(eN.column,!0),row:s.getInt32(eN.row,!0),xOffset:this.placementU32(i,QM.xOffset),yOffset:this.placementU32(i,QM.yOffset),width:s.getUint32(eN.pixelWidth,!0),height:s.getUint32(eN.pixelHeight,!0),source:{x:s.getUint32(eN.sourceX,!0),y:s.getUint32(eN.sourceY,!0),width:s.getUint32(eN.sourceWidth,!0),height:s.getUint32(eN.sourceHeight,!0)}})}if(o.length===0)return a;for(let i of iN(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=oN(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,$M.data),r=this.imageData(e,$M.length);return{key:`${t}:${n}:${r}`,image:{width:this.imageData(e,$M.width),height:this.imageData(e,$M.height),format:this.imageData(e,$M.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 lN(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;uN(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 uN(e){return e<-1073741824?`belowBackground`:e<0?`belowText`:`aboveText`}function dN(e){let t=tN.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 fN=8,pN=16,mN=0,hN=1,gN=2,_N=8,vN={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},yN={dirty:1,raw:2,cells:3},bN={raw:1,style:2,graphemesLength:3,graphemes:4,background:5,foreground:6,selected:7},xN={keys:0,values:20,graphemesLength:40,selected:44,background:48,foreground:52,written:56,size:60},SN={narrow:0,wide:1,spacerTail:2},CN={r:229,g:231,b:235},wN={r:0,g:0,b:0};function TN(e,t){return Math.floor((e*155+t*100)/255)}function EN(e,t){return{r:TN(e.r,t.r),g:TN(e.g,t.g),b:TN(e.b,t.b)}}function DN(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 ON(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 kN(e,t){let n=e.dataView();return{r:n.getUint8(t),g:n.getUint8(t+1),b:n.getUint8(t+2)}}function AN(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 jN(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 MN=class{runtime=jM();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(xN.size);let t=e.dataView();[[bN.style,this.style],[bN.graphemesLength,this.cellQuery+xN.graphemesLength],[bN.selected,this.cellQuery+xN.selected],[bN.background,this.cellQuery+xN.background],[bN.foreground,this.cellQuery+xN.foreground]].forEach((e,n)=>{t.setUint32(this.cellQuery+xN.keys+n*4,e[0],!0),t.setUint32(this.cellQuery+xN.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(vN.cols,2),i=this.getRender(vN.rows,2),a=this.getRender(vN.dirty,4),o=this.getColor(vN.foreground,CN),s=this.getColor(vN.background,wN),c=this.getRender(vN.cursorHasValue,1)===0?o:this.getColor(vN.cursor,o),l=this.getRender(vN.cursorInViewport,1)!==0,u=this.getRender(vN.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},()=>ON(o,s)),isWrapContinuation:!1,wrapsToNext:!1})));let d=new Set;if(a!==0){this.palette=AN(n,e),n.check(`ghostty_render_state_get`,n.call(`ghostty_render_state_get`,this.state,vN.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,yN.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(vN.cursorX,2):-1,cursorY:l?this.getRender(vN.cursorY,2):-1,cursorVisible:u,cursorBlinking:this.getRender(vN.cursorBlinking,1)!==0,cursorStyle:this.getRender(vN.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,xN.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,yN.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,yN.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+xN.keys,this.cellQuery+xN.values,this.cellQuery+xN.written),t=a.dataView(),o=t.getUint32(this.cellQuery+xN.written,!0);o<3&&a.check(`ghostty_render_state_row_cells_get_multi`,e);let s=t.getUint32(this.cellQuery+xN.graphemesLength,!0),c=t.getUint8(this.cellQuery+xN.selected)!==0,u=o>=4?kN(a,this.cellQuery+xN.background):r,m=o===5?kN(a,this.cellQuery+xN.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,bN.graphemes,this.graphemes)===0&&(h=DN(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,bN.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+fN,!0)===hN){let e=_.getUint8(this.style+pN);e<8&&(m=this.palette[e+8]??m)}if(v(`inverse`)){let e=m;m=u,u=e}v(`faint`)&&(m=EN(m,u));let b=this.style+f.underline_color.offset,x=_.getUint32(b,!0),S=b+_N,C=null;h.codePointAt(0)===1109742&&(C=rN(h,this.colorId(this.style+fN),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===hN?this.palette[_.getUint8(S)]:x===gN?kN(a,S):null,selected:c,placeholder:C})}for(;p.length<t;)p.push(ON(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?kN(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,bN.foreground,this.scratch)===0?kN(this.runtime,this.scratch):t}colorId(e){let t=this.runtime.dataView(),n=t.getUint32(e,!0);if(n===mN)return 0;if(n===hN)return t.getUint8(e+_N);if(n===gN){let t=kN(this.runtime,e+_N);return t.r<<16|t.g<<8|t.b}throw Error(`unknown style color tag ${n}`)}},NN=16,PN=589824,FN=381888,IN=5e7,LN=new TextDecoder;function RN(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 zN=class{encoder;kitty;runtime=jM();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(FN/(8*(e+1)));a.setField(s,`GhosttyTerminalOptions`,`max_scrollback`,n===0?0:Math.min((Math.ceil(n/c)+1)*PN,IN)),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),!sN(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 MN,this.encoder=new JM(this.terminal),this.kitty=new cN(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=RN(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?``:LN.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=LN.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:AN(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(NN),t=this.runtime.view(e,NN);t.setUint32(0,NN,!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,NN),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)),kN(this.runtime,this.scratch)}};function BN(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 VN=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=jN(e,i);BN(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)=>{BN(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)}},HN=Fe.withTag(`terminal`),UN=new TextDecoder;function WN(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 GN(e){return Math.min(Math.max(e,0),100)}function KN(e){return UN.decode(Uint8Array.from(atob(e),e=>e.charCodeAt(0)))}function qN(e){return e===``?`s0`:[...e].filter(e=>`cpqs01234567`.includes(e)).join(``)}function JN(e){try{return KN(e)}catch(e){return HN.warn(`invalid clipboard sequence`,e),null}}function YN(e,t,n){let r=Array.from(new TextEncoder().encode(e),e=>String.fromCharCode(e)).join(``);return`\x1b]52;${t};${btoa(r)}${n}`}function XN(e,t,n){let r=e===`10;?`?t.foreground:e===`11;?`?t.background:t.cursor;return`\x1b]${e.slice(0,2)};${WN(r)}${n}`}function ZN(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]};${WN(a)}${n}`)}return i}function QN(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:GN(i)}:r===2||r===4?i<0?{state:r,value:t.value}:{state:r,value:GN(i||t.value)}:r===3?{state:r,value:t.value}:null}function $N(e,t){if(e.startsWith(`9;`)&&!/^9;\d+(;|$)/.test(e))return{title:``,body:UN.decode(t.subarray(2))};if(e.startsWith(`777;notify;`)){let e=UN.decode(t).split(`;`);return{title:e[2]??``,body:e.slice(3).join(`;`)}}return null}var eP=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=KN(i)}catch(e){return HN.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}}},tP=27,nP=7,rP=24,iP=26,aP=33554432,oP=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===rP||i===iP)this.state=`ground`,this.drop();else if(this.state===`ground`)i===tP&&(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===tP?`escape`:`ground`}else if(this.state===`osc`){if(i===nP){if(this.state=`ground`,this.append(e,n,r),t({type:`osc`,data:this.take(),terminator:`\x07`},r+1))return r+1;continue}i===tP&&(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===tP){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===tP&&(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>aP?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}},sP=`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(`.`),cP=[`0001`,`1000`,`0100`,`0010`,`0002`,`2000`,`0200`,`0020`,`0201`,`1020`,`0102`,`2010`],lP=`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(`.`),uP=[0,0,4,4],dP=[4,0,4,4],fP=[0,4,4,4],pP=[4,4,4,4],mP=[[[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]],[fP],[pP],[uP],[uP,fP,pP],[uP,pP],[uP,dP,fP],[uP,dP,pP],[dP],[dP,fP],[dP,fP,pP]],hP={9617:.25,9618:.5,9619:.75},gP={9581:[1,1],9582:[-1,1],9583:[-1,-1],9584:[1,-1]};function _P(e){return e>=9472&&e<=9547?sP[e-9472]:e>=9552&&e<=9580?lP[e-9552]:e>=9588&&e<=9599?cP[e-9588]:``}function vP(e){if(e.length!==1)return!1;let t=e.charCodeAt(0);return _P(t)!==``||gP[t]!==void 0||t>=9600&&t<=9631}function yP(e){return Math.max(1,Math.round(e.height/20))}function bP(e,t,n){let[r,i,a,o]=t,s=yP(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 xP(e,[t,n],r){let i=yP(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 SP(e,t,n,r){e.save(),e.setTransform(1,0,0,1,0,0),CP(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 CP(e,t,n){let r=_P(t);if(r!==``){bP(e,r,n);return}let i=gP[t];if(i!==void 0){xP(e,i,n);return}let a=hP[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 mP[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 wP(e){return`rgb(${e.r}, ${e.g}, ${e.b})`}function TP(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b}function EP(e,t){return Math.round(e*t)/t}function DP(e,t,n,r){let i=EP(e*n.width,r);return{left:i,width:EP(t*n.width,r)-i}}function OP(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 kP(e,t){return e.selected===t.selected&&TP(e.foreground,t.foreground)&&e.bold===t.bold&&e.italic===t.italic&&e.invisible===t.invisible}function AP(e,t){return`${e.italic?`italic`:`normal`} ${e.bold?700:400} ${t.fontSize}px ${t.fontFamily}`}function jP(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:EP((l-c)/2+s,i),faceWidth:a}}function MP(e){return/^[!-/:-@[-`{-~]$/.test(e)}function NP(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 PP(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=wP(n.background),t.fillRect(0,0,t.canvas.width,t.canvas.height),t.restore());function l(e){let t=e*r.height,n=EP(t,s);return{top:t,cellTop:n,cellHeight:EP(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=wP(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&&TP(o.cells[a].background,e.background);)a+=1;let{left:l,width:f}=DP(d,a,r,s);e.selected?(t.fillStyle=i.selectionBackground,t.fillRect(l,c,f,u)):TP(e.background,n.background)||(t.fillStyle=wP(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}=DP(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:wP(n.foreground);let a=e*r.width;if(vP(n.text)){SP(t,n.text,{left:a,top:c,width:r.width,height:r.height},s);continue}t.font=AP(n,i);let l=a+(r.width-r.faceWidth)/2,u=e,d=e+1;if(i.ligatures&&MP(n.text)){for(;u>e-3&&u>0&&MP(o.cells[u-1].text)&&kP(o.cells[u-1],n);)--u;for(;d<e+4&&d<o.cells.length&&MP(o.cells[d].text)&&kP(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=NP(e.hoveredLink,a,n);if(i.underline===0&&!i.strikethrough&&!i.overline&&!l)continue;let{left:f,width:p}=DP(n,n+1,r,s),m=u+d;t.fillStyle=wP(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&&OP(t,1,f,p,m):(i.underlineColor!==null&&(t.fillStyle=wP(i.underlineColor)),OP(t,i.underline,f,p,m))}}if(!a||!n.cursorVisible||n.cursorX<0||n.cursorY<0)return;let u=n.cursorY*r.height,d=EP(u,s),f=EP(u+r.height,s)-d,p=n.rowData[n.cursorY]?.cells,m=p?.[n.cursorX],h=p?.[n.cursorX+1]?.wide===SN.spacerTail?2:1,{left:g,width:_}=DP(n.cursorX,n.cursorX+h,r,s);t.fillStyle=wP(n.cursor),t.strokeStyle=wP(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,vP(m.text)?SP(t,m.text,{left:n.cursorX*r.width,top:u,width:r.width,height:r.height},s):(t.font=AP(m,i),t.fillText(m.text,n.cursorX*r.width+(r.width-r.faceWidth)/2,u+r.baseline))))}var FP=navigator.userAgent.includes(`Mac`),IP=500,LP=/https?:\/\/[^\s"'`<>]+/g;function RP(e){return e===0?1:e===1?3:e===2?2:null}function zP(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 BP=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:zP(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=jN(t,e);f+=n.text,p.push(...n.points)}for(let e of f.matchAll(LP)){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(NP(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=zP(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=RP(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)&&(FP?e.metaKey:e.ctrlKey)){e.preventDefault(),this.linkPointer=e.pointerId;return}let n=e.timeStamp-this.clicks.time<=IP&&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=zP(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)}},VP=[`\r`,`
|
|
16
|
-
`,``,``,``,``,`\x1B[99;5u`,`\x1B[100;5u`,`\x1B[111;5u`,`\x1B[122;5u`];function HP(e,t){return e.y<t.y||e.y===t.y&&e.x<t.x}var UP=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`&&VP.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(HP(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===SN.spacerTail&&--a.x;let o={x:t.cursorX,y:t.cursorY};if(HP(a,i)||HP(o,i))return null;let s=HP(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)}},WP=Fe.withTag(`terminal`),GP=navigator.userAgent.includes(`Mac`),KP=navigator.userAgent.includes(`Windows`),qP=600,JP=1e3,YP=1e4,XP=new TextDecoder(`latin1`),ZP=new TextDecoder;function QP(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 $P(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 eF(e){try{(await e)?.close()}catch(e){WP.warn(`could not decode image`,e)}}var tF=class{element;cols=80;rows=24;canvas;input;context;core;scanner=new oP;handlers;observer;prompt;search;images;pointer;notifications=new eP;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 zN(Math.max(1,Math.floor(window.innerWidth/this.metrics.width)),this.rows,e.scrollback,t.onReply,t.onBell),this.prompt=new UP(this.core),this.search=new VN(this.core,()=>this.redraw()),this.images=new yM(this.core),this.pointer=new BP({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(YN(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:$P(e.fontFamily),ligatures:e.ligatures,cursorText:t.cursorText,selectionBackground:t.selectionBackground,selectionForeground:t.selectionForeground,matchBackground:t.palette[8],activeMatchBorder:t.palette[3]}}measure(){return jP(this.context,this.options.fontSize,this.appearance.fontFamily,this.options.lineHeight,window.devicePixelRatio||1)}applyTerminalOptions(){let e=this.options.colors;this.core.setColors({foreground:QP(e.foreground),background:QP(e.background),cursor:QP(e.cursor),palette:e.palette.map(QP)}),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(hM(e.data));let n=XP.decode(e.data);if(n.startsWith(`1337;File=`))return this.decodeImage(_M(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:qN(r[1]),terminator:e.terminator,generation:this.prompt.generation,epoch:this.epoch,atPrompt:this.prompt.shell===`prompt`}),!1;let a=JN(i);return a!==null&&this.handlers.onClipboard(a),!1}if(n===`10;?`||n===`11;?`||n===`12;?`)return t||this.handlers.onReply(XN(n,this.core.currentColors(),e.terminator)),!1;if(n.startsWith(`4;`)){if(!t)for(let t of ZN(n,this.core.currentColors().palette,e.terminator))this.handlers.onReply(t);return!1}if(n===`9;4`||n.startsWith(`9;4;`)){let e=QN(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(ZP.decode(e.data)):$N(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`),YP)});try{let r=await Promise.race([e,i]);r===`timeout`?(WP.warn(`image decoding took too long, skipping the image`),eF(e)):r!==null&&(t===this.epoch&&!this.disposed?this.images.place(r,n,this.metrics.height):r.close())}catch(e){WP.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||WP.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()},JP));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);PP({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=>lN(this.context,a,e,this.metrics,i)}),lN(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()},qP))}copySelection(){let e=this.core.selectionText();e.length!==0&&(window.isSecureContext?navigator.clipboard.writeText(e):WP.warn(`copy from the terminal needs https or localhost`))}optionIsMeta(e){if(!GP||!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)||GP&&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=KP&&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(GP?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((GP?e.metaKey&&r===`v`:e.ctrlKey&&e.shiftKey&&r===`v`||e.shiftKey&&!e.ctrlKey&&r===`insert`||i&&r===`v`)||GP&&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=()=>{GP&&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)}},nF=Fe.withTag(`terminal`),rF=new Map,iF=new Map,aF=null,oF=0;function sF(e){return FF().open&&RF()?.tabId===e&&!document.hidden&&document.hasFocus()}function cF(e){if(sF(e))return!1;let t=FF();return t.alerts.includes(e)||IF({alerts:[...t.alerts,e]}),!0}function lF(e){if(!cF(e)||iF.has(e))return;let t=rF.get(e);t!==void 0&&performance.now()-t<5e3||iF.set(e,window.setTimeout(()=>{iF.delete(e),sF(e)||(rF.set(e,performance.now()),dF(e,``,`Bell`))},500))}function uF(e,t,n){cF(e)&&(window.clearTimeout(iF.get(e)),iF.delete(e),rF.set(e,performance.now()),dF(e,t,n))}function dF(e,t,n){let r=VF(e);r&&Pa(t||HF(r),n,{machine:NF(),project:r.projectId??`global`,tabId:e}).catch(e=>nF.error(`could not show a notification`,e))}function fF(){let e=performance.now();if(e-oF<150)return;oF=e,aF??=new AudioContext,aF.state===`suspended`&&aF.resume();let t=aF.createOscillator(),n=aF.createGain(),r=aF.currentTime;t.frequency.value=880,n.gain.setValueAtTime(.1,r),n.gain.exponentialRampToValueAtTime(.001,r+.15),t.connect(n).connect(aF.destination),t.start(r),t.stop(r+.15)}function pF(e){return{alerts:FF().alerts.filter(t=>e(t)&&!sF(t))}}function mF(e){window.clearTimeout(iF.get(e)),iF.delete(e),rF.delete(e)}function hF(e){return e.key===`Enter`&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey}function gF(e){let t=new tF(MF(),{onData:t=>{FF().status===`active`&&XF(e,_F(t))},onReply:t=>{t===`\x1B[I`||t===`\x1B[O`?XF(e,t):ZF(e,t)},onResize:(t,n)=>JF({type:`resize`,id:e,cols:t,rows:n}),onTitle:t=>IF({titles:{...FF().titles,[e]:t}}),onProgress:t=>IF({progress:{...FF().progress,[e]:t}}),onBell:()=>{let n=LF().behavior;n.bellSound&&fF(),n.bellFlash&&t.element.isConnected&&!document.hidden&&t.element.animate([{opacity:.4},{opacity:1}],{duration:200,easing:`ease-out`}),lF(e)},onNotify:(t,n)=>uF(e,t,n),onClipboard:FO,onClipboardRead:n=>{sF(e)&&IO(e=>t.replyClipboard(e,n))},onLink:e=>{e.startsWith(`file:`)?Ot(e):window.open(e,`_blank`,`noopener`)},beforeKey:n=>{if(n.type!==`keydown`)return!0;let r=LF(),i=Ge(R(),NF()).system;if(i===null)throw Error(`the terminal machine is not connected`);let a=i.platform;if(FF().status===`active`&&r.behavior.modernizeShiftEnter&&hF(n)&&!t.isKittyKeyboard())return n.preventDefault(),t.beforeInput(`\x1B\r`),XF(e,`\x1B\r`),!1;if(FF().status===`active`&&r.behavior.pasteBrowserImages&&window.isSecureContext&&RO(n,a)&&!(Lt&&r.behavior.windowsCopyPaste&&n.ctrlKey)){n.preventDefault();let r=LO[a].data;return t.beforeInput(r),zO(NF(),t).then(t=>{t||XF(e,r)}).catch(t=>{VO(t),XF(e,r)}),!1}return!aI(n)||(n.preventDefault(),IF({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(),BO(NF(),t,n).catch(VO))},!0),t}function _F(e){if(!FF().ctrl||(IF({ctrl:!1}),e.length!==1))return e;let t=e.toUpperCase().charCodeAt(0);return t>=64&&t<=95?String.fromCharCode(t-64):e}var vF=Fe.withTag(`terminal`);function yF(){return{titles:{},progress:{},alerts:[],finding:null}}var bF=new TextEncoder,xF=new Map,SF=new Set,CF=new Set,wF={status:`connecting`,failure:null,loaded:!1,open:!1,instance:null,layout:{tabs:[],active:{}},ctrl:!1,...yF()},TF=null,EF=null,DF=!1,OF=!1;async function kF(){h(),KF(),yt.history.subscribe(({action:e})=>{(e.type===`PUSH`||e.type===`REPLACE`)&&h(),KF()});try{await Promise.all([AM(),pm(LF())]),IF({loaded:!0})}catch(e){vF.error(`could not start the terminal`,e),IF({failure:Ut(e)});return}ht({close:e=>{e===EF&&IF({status:`connecting`})},terminal:(e,t)=>{e===EF&&rI(t)},frame:(e,t)=>{e===EF&&nI(t)}}),AF(),yt.history.subscribe(AF),yt.history.subscribe(hI),document.addEventListener(`visibilitychange`,()=>IF({})),window.addEventListener(`focus`,()=>{IF({}),TF!==null&&oI(TF,sI(TF))}),window.addEventListener(`blur`,()=>IF({})),`serviceWorker`in navigator&&navigator.serviceWorker.addEventListener(`message`,e=>{e.data.type===`select`&&qF(e.data.machine,e.data.project,e.data.tabId)});let e=R().prefs,t=jF();Ze(()=>{AF();let n=R().prefs,r=jF(),i=n.theme!==e.theme||n.terminal!==e.terminal||r!==t;e=n,t=r,i&&lI()}),uI()}function AF(){let e=Xe()??R().selection?.machine??null;if(e!==EF&&(EF!==null&&DF&&JF({type:`detach`}),iI([]),SF.clear(),EF=e,DF=!1,IF({status:`connecting`,instance:null,layout:{tabs:[],active:{}},...yF()})),EF===null)return;let t=Ge(R(),EF).status===`online`;t&&!DF&&(DF=!0,JF({type:`attach`})),t||(DF=!1)}function jF(){return EF===null?null:Ge(R(),EF).config?.terminal.behavior.terminalIdentity??null}function MF(){if(EF===null)throw Error(`the terminal has no machine`);let e=Ge(R(),EF);if(e.config===null||e.system===null)throw Error(`${e.name} is not connected`);return mm(LF(),e.config.terminal.behavior.terminalIdentity)}function NF(){if(EF===null)throw Error(`the terminal has no machine`);return EF}function PF(e){return CF.add(e),()=>{CF.delete(e)}}function FF(){return wF}function IF(e){wF={...wF,...e},wF={...wF,...pF(e=>xF.has(e))};for(let e of CF)e()}function LF(){return R().prefs.terminal}function RF(){let e=Xe()===null?R().selection?.projectId:A();return e===void 0?null:{view:e,tabs:zF(wF.layout,e),tabId:wF.layout.active[e]??null}}function zF(e,t){return e.tabs.filter(e=>BF(e)===t)}function BF(e){return e.projectId??`global`}function VF(e){return wF.layout.tabs.find(t=>t.id===e)}function HF(e){return(e.customName??wF.titles[e.id])||`Terminal`}function UF(e){e?(WF(),f({bottom:`terminal`})):le(`overlay`,()=>f({bottom:void 0}))}function WF(){wF.open||(OF=!0)}function GF(e){let t=OF;OF=!1,zF(wF.layout,e).length>0||(t?JF({type:`createTab`,projectId:e}):UF(!1))}function KF(){let e=jt().bottom===`terminal`||Xe()!==null;e!==wF.open&&IF({open:e})}function qF(e,t,n){if(t===`global`)fI(e,Ue);else{let n=R().selection;(n?.machine!==e||n.projectId!==t)&&Ie({machine:e,projectId:t,sessionId:null}),UF(!0)}YF(e,{type:`select`,view:t,tabId:n})}function JF(e){EF!==null&&YF(EF,e)}function YF(e,t){ot(e)&&L(e,`terminal`,t).catch(e=>vF.error(`terminal request failed`,e))}function XF(e,t){EF!==null&&et(EF,0,e,typeof t==`string`?bF.encode(t):t)}function ZF(e,t){EF!==null&&et(EF,1,e,bF.encode(t))}function QF(e,t,n,r){sI(e).find(t,n,r)}function $F(e,t){return sI(e).onFindResults(t)}function eI(e){let t=sI(e);t.clearFind(),IF({finding:null}),t.focus()}function tI(){IF({ctrl:!wF.ctrl})}function nI(e){let t=xF.get(e.id);if(!t)return;let n=e.kind===3,r=n&&SF.delete(e.id);r&&t.reset(),t.write(e.data,n),r&&SF.size===0&&IF({status:`active`})}function rI(e){let t=e.type===`active`&&e.instance!==wF.instance;if(t&&iI([]),iI(e.layout.tabs),e.type===`active`){SF.clear(),xF.forEach((e,t)=>{SF.add(t),e.element.isConnected&&oI(t,e)}),IF({...t&&{instance:e.instance,...yF()},status:SF.size===0?`active`:`connecting`,layout:e.layout}),hI();return}for(let e of SF)xF.has(e)||SF.delete(e);let n=R().selection?.projectId,r=n!==void 0&&zF(wF.layout,n).length>0&&zF(e.layout,n).length===0;IF({status:SF.size===0?`active`:`connecting`,layout:e.layout}),r&&wF.open&&UF(!1),hI()}function iI(e){let t=new Set(e.map(e=>e.id));xF.forEach((e,n)=>{t.has(n)||(e.dispose(),xF.delete(n),mF(n))});for(let e of t)xF.has(e)||xF.set(e,gF(e))}function aI(e){return e.key.toLowerCase()===`f`?zt?e.metaKey&&!e.ctrlKey&&!e.altKey:e.ctrlKey&&e.shiftKey&&!e.altKey&&!e.metaKey:!1}function oI(e,t){JF({type:`resize`,id:e,cols:t.cols,rows:t.rows})}function sI(e){let t=xF.get(e);if(!t)throw Error(`terminal ${e} does not exist`);return t}function cI(e,t){let n=sI(e);t.append(n.element),n.fit();for(let e of xF.values())e.presize(n.cols,n.rows);return TF=e,oI(e,n),n.focus(),()=>{let t=n.element.contains(document.activeElement);n.element.remove(),t&&document.querySelector(`[data-composer]`)?.focus(),TF===e&&(TF=null)}}async function lI(){if(await pm(LF()),xF.size>0){let e=MF();for(let t of xF.values())t.setOptions(e)}IF({})}function uI(){let e=jt(),t=Xe(),n=t??e.machine,r=t===null?e.project:Ue,i=e.terminal;if(n===void 0||r===void 0||i===void 0)return;f({terminal:void 0});let a=PF(()=>{wF.status===`active`&&EF===n&&(a(),qF(n,r,Number(i)))})}var dI=Fe.withTag(`terminal`);function fI(e,t){Ve(e,t)}function pI(e){let t=e.terminals.map(BF),n=localStorage.getItem(`lastTerminalView`);fI(e.id,t.find(e=>e===n)??t.at(0)??`global`)}async function mI(e,t){try{await L(e,`terminal`,{type:`createTab`,projectId:t})}catch(e){dI.error(`terminal request failed`,e);return}fI(e,t??`global`)}function hI(){let e=FF(),t=Xe();if(t===null||e.instance===null||t!==NF()||zF(e.layout,A()).length>0)return;let n=e.layout.tabs.at(0);if(n!==void 0){fI(t,BF(n));return}let r=R().machines.find(e=>e.id!==t&&e.status===`online`&&e.terminals.length>0);r===void 0?le(`chat`,()=>void yt.navigate({to:`/`,search:{},replace:!0})):pI(r)}function gI(e){let t=k(e=>e.machines),n=k(e=>e.projects),r=e.contextMenu?Vn:Nr;return t.filter(e=>e.status===`online`).flatMap(e=>[(0,W.jsxs)(r,{onSelect:()=>void mI(e.id,null),children:[(0,W.jsx)(wf,{icon:e.icon}),(0,W.jsx)(`span`,{className:`max-w-60 truncate`,children:e.name})]},e.id),...n.filter(t=>t.machine===e.id&&!t.hidden&&!t.scratch).map(t=>(0,W.jsxs)(r,{className:`pl-7`,onSelect:()=>void mI(e.id,t.id),children:[(0,W.jsx)(dc,{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 _I(e){let t=k(e=>e.machines).filter(e=>e.status===`online`),n=t.filter(e=>e.terminals.length>0),r=n.reduce((e,t)=>e+t.terminals.length,0),i=localStorage.getItem(`lastTerminal`),a=(0,W.jsxs)(`button`,{className:z(e.buttonClassName,`relative size-7 [&>svg]:size-4.5`),title:`Terminal`,"aria-label":`Terminal`,disabled:t.length===0,onClick:n.length>0?()=>pI(n.find(e=>e.id===i)??n[0]):void 0,children:[(0,W.jsx)(V,{icon:Js}),r>0&&(0,W.jsx)(`span`,{className:`text-foreground/75 border-sidebar pointer-events-none absolute -top-0.5 -right-0.5 grid h-3.5 min-w-3.5 place-items-center rounded-full border bg-[color-mix(in_srgb,var(--foreground)_8%,var(--background))] px-0.5 text-[9px] leading-none font-medium tabular-nums`,children:r})]});return(0,W.jsxs)(`div`,{className:`mr-1.5 flex items-center gap-0.75`,children:[(0,W.jsxs)(hn,{children:[(0,W.jsx)(gn,{asChild:!0,children:(0,W.jsx)(`button`,{className:z(e.buttonClassName,`size-7 [&>svg]:size-4.5`),title:`Menu`,"aria-label":`Menu`,children:(0,W.jsx)(V,{icon:Ss})})}),(0,W.jsxs)(On,{align:`start`,className:`w-auto min-w-40`,onCloseAutoFocus:e=>e.preventDefault(),children:[(0,W.jsxs)(Nr,{onSelect:()=>N(!0),children:[(0,W.jsx)(V,{icon:ts}),`Usage`]}),(0,W.jsxs)(Nr,{onSelect:()=>p(!0),children:[(0,W.jsx)(V,{icon:Bs}),`Settings`]})]})]}),n.length>0?a:(0,W.jsxs)(hn,{children:[(0,W.jsx)(gn,{asChild:!0,children:a}),(0,W.jsx)(On,{align:`start`,className:`max-h-80 w-auto min-w-40 overflow-y-auto`,onCloseAutoFocus:e=>e.preventDefault(),children:(0,W.jsx)(gI,{})})]})]})}var vI=`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`,yI={active:{status:`snoozed`,icon:ic},snoozed:{status:`active`,icon:Xs},minimized:{status:`active`,icon:Io},inactive:{status:`minimized`,icon:Ds},pinned:{status:`active`,icon:Ms}},bI=(0,U.memo)(xI);function xI(e){let t=e.session,n=ac(t.machine,t.projectId),r=k(e=>Ge(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(){pt(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`?Je(t.machine,t.id,{status:`active`}):b()),e.clientX-n.x<-e.currentTarget.offsetWidth*.4&&Je(t.machine,t.id,{status:yI[t.status].status}))}let S={onClick:()=>{f.current?f.current=!1:e.onSelect(t.machine,t.projectId,t.id)},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:z(`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?yI[t.status].icon:t.status===`inactive`?Ps:$s,className:`size-6`})}),w=(0,W.jsx)(hr,{open:o,onOpenChange:s,children:(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsx)(Un,{children:`Stop running work?`}),(0,W.jsx)(zn,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:y,children:`Stop and Mark Done`})]})]})}),T=(0,W.jsx)(nr,{className:`w-44`,onCloseAutoFocus:e=>{u.current!==null&&(e.preventDefault(),u.current.focus(),u.current.select())},children:(0,W.jsx)(xA,{session:t,context:!0,mobile:!0,onDeactivate:b,onRename:()=>a(t.title)})}),E=i===null?(0,W.jsx)(`span`,{className:z(`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)(CA,{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&&Je(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=z(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)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(vI,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:n=>{n.key===`Enter`&&e.onSelect(t.machine,t.projectId,t.id)},children:[(0,W.jsx)(`span`,{className:`flex shrink-0 items-center opacity-40 grayscale`,children:(0,W.jsx)(dc,{machine:t.machine,projectId:t.projectId})}),E,(0,W.jsx)(`span`,{className:`text-secondary-label ml-auto shrink-0 text-xs tabular-nums`,children:bn(t.updatedAt)})]})}),T]}),w]}):(0,W.jsxs)(`li`,{className:`relative list-none py-0.5`,children:[C,(0,W.jsxs)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,disabled:!e.saved,children:(0,W.jsx)(`div`,{role:`button`,tabIndex:0,className:z(vI,D,h&&!e.selected&&c===0&&`opacity-70`,c!==0&&`bg-sidebar`),style:c===0?void 0:{transform:`translateX(${c}px)`},...S,onKeyDown:n=>{n.key===`Enter`&&e.onSelect(t.machine,t.projectId,t.id)},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)(dc,{machine:t.machine,projectId:t.projectId,className:`size-5`}),E,(0,W.jsx)(SA,{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)(wf,{icon:r,className:`size-3 shrink-0`}),(0,W.jsxs)(`span`,{className:z(`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:Ns,className:`size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ic,className:`size-3 shrink-0`}),(0,W.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:bn(t.updatedAt)})]})]})})}),T]}),w]})}function SI(e){let t=ac(e.machine,e.projectId),n=k(t=>Ge(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:z(vI,`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)(dc,{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:Ks,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)(wf,{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 wI(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(){pt(t.machine,t.id,null)}function m(){u?a(!0):p()}let h=(0,W.jsx)(hr,{open:i,onOpenChange:a,children:(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsx)(Un,{children:`Stop running work?`}),(0,W.jsx)(zn,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:p,children:`Stop and Mark Done`})]})]})}),g=e.saved&&(0,W.jsxs)(hn,{children:[(0,W.jsx)(gn,{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:is,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)(xA,{session:t,context:!1,mobile:!1,onDeactivate:m,onRename:()=>r(t.title)})})]}),_=(0,W.jsx)(nr,{className:`w-44`,onCloseAutoFocus:e=>{o.current!==null&&(e.preventDefault(),o.current.focus(),o.current.select())},children:(0,W.jsx)(xA,{session:t,context:!0,mobile:!1,onDeactivate:m,onRename:()=>r(t.title)})}),v=n===null?(0,W.jsx)(`span`,{className:z(`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)(CA,{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&&Je(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=z(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)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(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:Ns,className:`text-muted-foreground/65 size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ic,className:`text-secondary-label size-3 shrink-0`}),(0,W.jsx)(SA,{activity:e.activity,backgroundRunning:c,done:d}),(0,W.jsx)(`span`,{className:`text-secondary-label shrink-0 text-xs tabular-nums`,children:bn(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:$s,strokeWidth:1.35,className:`size-5 scale-110`})})]})]})}),_]}),h]})}function TI(e){return(0,W.jsx)(`li`,{className:`list-none`,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(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:Ks,className:`text-warning-foreground size-4 shrink-0`})]})})}var EI=`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 DI(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 _(){pt(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`?Je(t.machine,t.id,{status:`active`}):v()),e.clientX-n.x<-e.currentTarget.offsetWidth*.4&&Je(t.machine,t.id,{status:yI[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:z(`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?yI[t.status].icon:t.status===`inactive`?Ps:$s,className:`size-6`})}),S=(0,W.jsx)(hr,{open:i,onOpenChange:a,children:(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsx)(Un,{children:`Stop running work?`}),(0,W.jsx)(zn,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:_,children:`Stop and Mark Done`})]})]})}),C=(0,W.jsx)(nr,{className:`w-44`,onCloseAutoFocus:e=>{c.current!==null&&(e.preventDefault(),c.current.focus(),c.current.select())},children:(0,W.jsx)(xA,{session:t,context:!0,mobile:!0,onDeactivate:v,onRename:()=>r(t.title)})}),w=n===null?(0,W.jsx)(`span`,{className:z(`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)(CA,{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&&Je(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=z(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)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,disabled:!e.saved,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(EI,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:Ns,className:`text-muted-foreground/65 size-3 shrink-0`}),t.status===`snoozed`&&(0,W.jsx)(V,{icon:ic,className:`text-secondary-label size-3 shrink-0`}),(0,W.jsx)(SA,{activity:e.activity,backgroundRunning:f,done:h}),(0,W.jsx)(`span`,{className:`text-secondary-label shrink-0 text-xs tabular-nums`,children:bn(t.updatedAt)})]})}),C]}),S]})}function OI(e){return(0,W.jsx)(`li`,{className:`list-none`,children:(0,W.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(EI,`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:Ks,className:`text-warning-foreground size-4 shrink-0`})]})})}function kI(e){let t=ac(e.machine,e.projectId),n=k(t=>Ge(t,e.machine).icon),r=k(e=>e.selection),i=k(e=>e.machines),a=k(e=>e.unseen),o=r!==null&&r.sessionId===null&&r.machine===e.machine&&r.projectId===e.projectId,s=e.mobile?OI:TI,c=e.mobile?DI:wI;function l(){Ie({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)(wf,{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)(dc,{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:Eo,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:$e(i,t.machine,t.id),unseen:a.includes(P(t.machine,t.id)),saved:t!==e.started,onSelect:()=>Ie({machine:t.machine,projectId:t.projectId,sessionId:t.id})},P(t.machine,t.id)))]})}function AI(e){let t=e.scope,n=k(e=>t===null?void 0:e.projects.find(e=>e.machine===t.machine&&e.id===t.projectId)),[r,i]=(0,U.useState)(!1);return yr(`mod+p`,()=>i(!r),{enableOnFormTags:!0,preventDefault:!0}),(0,W.jsxs)(hn,{open:r,onOpenChange:i,children:[(0,W.jsx)(gn,{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`:n?.path,children:[e.scope!==null&&(0,W.jsx)(dc,{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`:e.scope.projectId===`no-project`?`Chat`:n?.name}),(0,W.jsx)(V,{icon:Ir,className:`text-sidebar-muted-foreground size-3.5 shrink-0`})]})}),(0,W.jsx)(On,{className:`w-64`,children:(0,W.jsx)(jI,{scope:e.scope,onScope:e.onScope,onEdit:e.onEdit,onAddProject:e.onAddProject,onClose:()=>i(!1)})})]})}function jI(e){let t=k(e=>e.machines),n=k(e=>e.projects),r=k(e=>e.sessions),a=k(e=>e.unseen),o=t.map(e=>({machine:e,projects:n.filter(t=>t.machine===e.id&&!t.hidden&&!t.scratch)})).filter(e=>t.length>1||e.projects.length>0||e.machine.system?.scratchAvailable===!0),s=r.filter(e=>{let n=$e(t,e.machine,e.id);return n?.running===!0||n?.waiting===!0||Object.values(n?.tasks??{}).includes(`running`)||a.includes(P(e.machine,e.id))});function c(e,t){return n.find(n=>n.machine===e&&n.id===t)}function l(e){return s.filter(t=>t.machine===e&&c(e,t.projectId)?.scratch===!0).length}function u(e){return(0,W.jsx)(Nr,{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:()=>{d(`Projects`),i({settingsMachine:e.id})},children:(0,W.jsx)(V,{icon:Gs,className:`size-3.5`})})}function f(e){return e.status===`online`?e.name:e.status===`unpaired`?`${e.name} · needs pairing`:`${e.name} · offline`}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(mn,{value:e.scope===null?``:P(e.scope.machine,e.scope.projectId),children:[(0,W.jsxs)(Nn,{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`}),s.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:s.length})]}),o.length>0&&(0,W.jsx)(Fn,{}),o.map((n,r)=>(0,W.jsxs)(U.Fragment,{children:[r>0&&(0,W.jsx)(Fn,{}),t.length>1&&(0,W.jsxs)(`div`,{className:`flex items-center`,children:[(0,W.jsxs)(on,{className:`flex min-w-0 flex-1 items-center gap-2 pl-[0.52rem]!`,children:[(0,W.jsx)(wf,{icon:n.machine.icon,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate`,children:f(n.machine)})]}),n.machine.system?.scratchAvailable===!0&&(0,W.jsxs)(Nn,{value:P(n.machine.id,`no-project`),className:`text-muted-foreground data-[state=checked]:bg-foreground/10 data-[state=checked]:text-foreground mr-0.5 h-5 min-h-0 shrink-0 gap-1 px-1.5 py-0 text-xs *:data-[slot=dropdown-menu-radio-item-indicator]:hidden`,title:`Threads on ${n.machine.name} without a project`,onSelect:()=>e.onScope({machine:n.machine.id,projectId:`no-project`}),children:[(0,W.jsx)(dc,{machine:n.machine.id,projectId:`no-project`,className:`size-3.5 shrink-0`}),`Chat`,l(n.machine.id)>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:l(n.machine.id)})]}),(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 pr-1`,children:[u(n.machine),(0,W.jsx)(Nr,{className:`text-muted-foreground grid size-5 min-h-0 shrink-0 place-items-center rounded-sm p-0`,title:`Add project to ${n.machine.name}`,"aria-label":`Add project to ${n.machine.name}`,disabled:n.machine.status!==`online`,onSelect:()=>e.onAddProject(n.machine.id),children:(0,W.jsx)(V,{icon:Eo,className:`size-3.5`})})]})]}),t.length===1&&n.machine.system?.scratchAvailable===!0&&(0,W.jsxs)(Nn,{value:P(n.machine.id,`no-project`),className:`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:n.machine.id,projectId:`no-project`}),children:[(0,W.jsx)(dc,{machine:n.machine.id,projectId:`no-project`,className:`size-5 shrink-0`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:`Chat`}),l(n.machine.id)>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:l(n.machine.id)})]}),n.projects.map(t=>{let n=s.filter(e=>e.machine===t.machine&&e.projectId===t.id).length;return(0,W.jsxs)(Nn,{value:P(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(),e.onClose(),e.onEdit(t)},children:[(0,W.jsx)(dc,{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(),e.onClose(),e.onEdit(t)},children:(0,W.jsx)(V,{icon:Bs})})})]},P(t.machine,t.id))})]},n.machine.id))]}),t.length===1&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Fn,{}),(0,W.jsxs)(`div`,{className:`flex items-center`,children:[(0,W.jsxs)(Nr,{className:`flex-1 pl-8`,onSelect:()=>e.onAddProject(t[0].id),children:[(0,W.jsx)(V,{icon:Eo}),`Add project…`]}),(0,W.jsx)(`div`,{className:`flex shrink-0 items-center pr-1`,children:u(t[0])})]})]})]})}function MI(e){let t=k(e=>e.errors),n=k(e=>e.machines),r=k(e=>e.sessions),i=k(e=>e.unseen),a=n.filter(e=>e.status===`offline`||e.status===`unpaired`),o=r.filter(e=>Object.values($e(n,e.machine,e.id)?.tasks??{}).includes(`failed`)),s=r.filter(e=>$e(n,e.machine,e.id)?.waiting===!0),c=r.filter(e=>{let t=$e(n,e.machine,e.id);return i.includes(P(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=e.collapsed===!0&&u&&s.length>0&&l>0;return(0,W.jsxs)(`div`,{className:z(`flex shrink-0 items-center gap-1`,e.className),children:[d&&(0,W.jsx)(PI,{className:`bg-question/15 text-question`,icon:Ws,count:s.length+c.length,label:`${s.length} waiting for approval, ${c.length} done`,children:(0,W.jsx)(NI,{kind:`merged`})}),!d&&u&&(0,W.jsx)(PI,{className:`bg-success/15 text-success`,icon:Yo,count:c.length,label:`${c.length} done`,children:(0,W.jsx)(NI,{kind:`done`})}),!d&&s.length>0&&(0,W.jsx)(PI,{className:`bg-question/15 text-question`,icon:Ws,count:s.length,label:`${s.length} waiting for approval`,children:(0,W.jsx)(NI,{kind:`waiting`})}),l>0&&(0,W.jsx)(PI,{className:z(t.length>0&&`bg-error/15 text-error`,t.length===0&&`bg-warning/15 text-warning-foreground`),icon:t.length>0?dn:Oo,count:l,label:l===1?`1 problem`:`${l} problems`,onClose:ze,children:(0,W.jsx)(NI,{kind:`problems`})})]})}function NI(e){let t=k(e=>e.errors),n=k(e=>e.machines),r=k(e=>e.sessions),i=k(e=>e.unseen),a=n.filter(e=>e.status===`offline`||e.status===`unpaired`),o=r.filter(e=>Object.values($e(n,e.machine,e.id)?.tasks??{}).includes(`failed`)),s=r.filter(e=>$e(n,e.machine,e.id)?.waiting===!0),c=r.filter(e=>{let t=$e(n,e.machine,e.id);return i.includes(P(e.machine,e.id))&&t?.waiting!==!0&&t?.running!==!0&&!Object.values(t?.tasks??{}).includes(`running`)}).map(e=>(0,W.jsx)(II,{session:e,icon:Yo,className:`text-success`,detail:`Done`},P(e.machine,e.id))),l=s.map(e=>(0,W.jsx)(II,{session:e,icon:Ws,className:`text-question`,detail:`Waiting for approval`},P(e.machine,e.id)));if(e.kind===`done`)return c;if(e.kind===`waiting`)return l;if(e.kind===`merged`)return(0,W.jsxs)(W.Fragment,{children:[l,c]});if(e.kind===`problems`)return(0,W.jsxs)(W.Fragment,{children:[t.map((e,t)=>(0,W.jsx)(FI,{icon:dn,className:`text-error`,children:(0,W.jsx)(`span`,{className:`text-error-foreground whitespace-pre-wrap`,children:e})},t)),a.map(e=>(0,W.jsxs)(FI,{icon:Oo,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)(II,{session:e,icon:Oo,className:`text-warning-foreground`,detail:`Background task failed`},P(e.machine,e.id)))]});throw Error(`Unknown chip list`)}function PI(e){return(0,W.jsxs)(un,{onOpenChange:t=>!t&&e.onClose?.(),children:[(0,W.jsx)(Cn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:z(`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)(cn,{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 FI(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:z(`mt-0.5 size-4 shrink-0`,e.className)}),(0,W.jsx)(`div`,{className:`min-w-0 flex-1`,children:e.children})]})}function II(e){return(0,W.jsx)(In,{asChild:!0,children:(0,W.jsx)(`button`,{className:`hover:bg-accent cursor-pointer rounded-md text-left`,onClick:()=>Ie({machine:e.session.machine,projectId:e.session.projectId,sessionId:e.session.id}),children:(0,W.jsxs)(FI,{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})]})})})}function LI({...e}){return(0,W.jsx)(Dc,{"data-slot":`hover-card`,...e})}function RI({...e}){return(0,W.jsx)(kc,{"data-slot":`hover-card-trigger`,...e})}function zI({className:e,align:t=`start`,sideOffset:n=4,...r}){return(0,W.jsx)(Nc,{children:(0,W.jsx)(Fc,{"data-slot":`hover-card-content`,sideOffset:n,align:t,className:z(`z-50 origin-(--radix-hover-card-content-transform-origin) overflow-hidden rounded-lg dropdown-glass text-popover-foreground shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] outline-none dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)] duration-100 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`,e),...r})})}var BI=Fe.withTag(`terminal`),VI=null,HI=null,UI=new Set,WI=new Set;function GI(e){return WI.add(e),()=>{WI.delete(e)}}function KI(){return VI}function qI(){VI!==null&&XI({open:!1,closing:VI.closing})}function JI(){return HI}function YI(){HI!==null&&ZI({open:!1,closing:HI.closing})}function XI(e){VI=e;for(let e of WI)e()}function ZI(e){HI=e;for(let e of WI)e()}function QI(){return document.querySelector(`[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]`)!==null}async function $I(e,t){try{let n=await Promise.race([L(e,`terminal.busy`,{id:t}),new Promise((e,t)=>window.setTimeout(()=>t(Error(`timed out`)),5e3))]);return`error`in n?(BI.error(`could not check whether tab ${t} is running a program`,n.error),{checked:!1}):{checked:!0,program:n.program}}catch(e){return BI.error(`could not check whether a program is running`,e),{checked:!1}}}async function eL(e){if(!LF().behavior.confirmCloseBusyTab){JF({type:`closeTab`,id:e});return}if(!VF(e)||UI.has(e))return;UI.add(e);let t=await $I(NF(),e);if(UI.delete(e),t.checked&&t.program===null){JF({type:`closeTab`,id:e});return}let n=VF(e);n&&!QI()&&XI({open:!0,closing:{id:e,name:HF(n),program:t.checked?t.program:null}})}function tL(e){for(let t of e)YF(t.machine,{type:`closeTab`,id:t.id})}async function nL(e){if(!LF().behavior.confirmCloseBusyTab){tL(e);return}let t=await Promise.all(e.map(e=>$I(e.machine,e.id)));if(t.every(e=>e.checked&&e.program===null)){tL(e);return}if(QI())return;let n=t.flatMap(e=>e.checked&&e.program!==null?[e.program]:[]);ZI({open:!0,closing:{tabs:e,programs:[...new Set(n)]}})}var rL=zt?`meta+t`:`ctrl+shift+t`,iL=zt?`meta+w`:`ctrl+shift+w`,aL=`ctrl+tab`,oL=`ctrl+shift+tab`;function sL(){let e=RF()?.tabId??null;FF().open&&e!==null&&sI(e).focus()}function cL(){return yr([rL,iL,aL,oL],(e,t)=>{e.preventDefault(),e.stopPropagation();let n=RF();if(n===null)return;if(t.hotkey===rL){JF({type:`createTab`,projectId:n.view===`global`?null:n.view});return}if(n.tabId===null)return;if(t.hotkey===iL){eL(n.tabId);return}let r;if(t.hotkey===aL)r=1;else if(t.hotkey===oL)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&&JF({type:`select`,view:n.view,tabId:a.id})},{enabled:()=>LF().behavior.captureShortcuts,enableOnFormTags:!0,eventListenerOptions:{capture:!0}})}function lL(e){let[t,n]=(0,U.useState)(e.name);return(0,W.jsx)(ai,{open:!0,onOpenChange:t=>{t||e.onDone()},children:(0,W.jsx)(Qr,{onCloseAutoFocus:pL,children:(0,W.jsxs)(`form`,{className:`grid gap-4`,onSubmit:n=>{n.preventDefault(),JF({type:`renameTab`,id:e.id,name:t.trim()}),e.onDone()},children:[(0,W.jsx)($r,{children:(0,W.jsx)(ni,{children:`Rename tab`})}),(0,W.jsx)(Vp,{"aria-label":`Name`,placeholder:`Use terminal title`,value:t,onChange:e=>n(e.target.value)}),(0,W.jsxs)(oi,{children:[(0,W.jsx)(H,{type:`button`,variant:`outline`,onClick:e.onDone,children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,children:`Rename`})]})]})})})}function uL(){let e=(0,U.useSyncExternalStore)(GI,KI);return e===null?null:(0,W.jsx)(hr,{open:e.open,onOpenChange:e=>{e||qI()},children:(0,W.jsx)(Qn,{onOpenAutoFocus:e=>{if(e.preventDefault(),!(e.currentTarget instanceof HTMLElement))throw Error(`close dialog is not an element`);e.currentTarget.querySelector(`[data-slot=alert-dialog-action]`)?.focus()},onCloseAutoFocus:pL,children:(0,W.jsx)(dL,{closing:e.closing})})})}function dL(e){let t=e.closing;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsxs)(Un,{children:[`Close “`,t.name,`”?`]}),(0,W.jsx)(zn,{children:t.program===null?`OffSite couldn’t check whether a program is still running.`:`${t.program} is still running.`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:()=>JF({type:`closeTab`,id:t.id}),children:`Close`})]})]})}function fL(){let e=(0,U.useSyncExternalStore)(GI,JI);if(e===null)return null;let t=e.closing;return(0,W.jsx)(hr,{open:e.open,onOpenChange:e=>{e||YI()},children:(0,W.jsxs)(Qn,{onCloseAutoFocus:pL,children:[(0,W.jsxs)(jr,{children:[(0,W.jsxs)(Un,{children:[`Close `,t.tabs.length,` `,t.tabs.length===1?`terminal`:`terminals`,`?`]}),(0,W.jsx)(zn,{children:t.programs.length===0?`OffSite couldn’t check whether programs are still running.`:`Still running: ${t.programs.join(`, `)}.`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:()=>tL(t.tabs),children:`Close all`})]})]})})}function pL(e){e.preventDefault();let t=document.querySelector(`[role="dialog"], [role="alertdialog"]`);t===null?sL():t.focus()}function mL(e){let t=(0,U.useRef)(null),[n,r]=(0,U.useState)(``),[i,a]=(0,U.useState)({resultIndex:-1,resultCount:0});(0,U.useEffect)(()=>$F(e.id,a),[e.id]),(0,U.useEffect)(()=>t.current?.focus(),[]);function o(t,n,i){r(t),QF(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)(Vp,{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(),eI(e.id)):t.key===`Enter`?(t.preventDefault(),o(n,t.shiftKey,!1)):aI(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:Ro})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Next match`,onClick:()=>o(n,!1,!1),children:(0,W.jsx)(V,{icon:Or})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close find`,onClick:()=>eI(e.id),children:(0,W.jsx)(V,{icon:Uo})})]})}var hL=[{label:`Esc`,sequence:`\x1B`},{label:`Tab`,sequence:` `},{label:`↑`,sequence:`\x1B[A`},{label:`↓`,sequence:`\x1B[B`},{label:`←`,sequence:`\x1B[D`},{label:`→`,sequence:`\x1B[C`}];function gL(e){let t=(0,U.useSyncExternalStore)(PF,FF),n=t.status===`active`,r=zF(t.layout,e.view),i=t.layout.active[e.view]??null,a=cL();(0,U.useEffect)(()=>{n&&!e.page&&GF(e.view)},[e.view,n,e.page]);function o(){JF({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:z(`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)(vL,{tab:n,children:(0,W.jsxs)(`div`,{className:z(`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:()=>JF({type:`select`,view:e.view,tabId:n.id}),children:[(0,W.jsx)(`span`,{className:`truncate`,children:HF(n)}),(0,W.jsx)(bL,{id:n.id,className:`ml-1.5 size-1.5 flex-none rounded-full`}),(0,W.jsx)(xL,{progress:t.progress[n.id]}),(0,W.jsx)(`button`,{className:z(`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(),eL(n.id)},children:(0,W.jsx)(V,{icon:Uo,className:`size-3`})})]})},n.id))}),(0,W.jsx)(`button`,{className:z(`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:Eo,className:`size-4`})})]}),(0,W.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[i!==null&&(0,W.jsx)(_L,{id:i},`${t.instance}-${i}`),i!==null&&t.finding===i&&(0,W.jsx)(mL,{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:[hL.map(e=>(0,W.jsx)(H,{variant:`secondary`,className:`min-w-11`,onPointerDown:e=>e.preventDefault(),onClick:()=>XF(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:tI,children:`Ctrl`})]}),(0,W.jsx)(uL,{})]}):(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 _L(e){let t=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(!t.current)throw Error(`terminal container missing`);return cI(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 vL(e){let[t,n]=(0,U.useState)(!1),r=e.tab;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,children:e.children}),(0,W.jsx)(nr,{children:(0,W.jsx)(yL,{tab:r,onRename:()=>n(!0)})})]}),t&&(0,W.jsx)(lL,{id:r.id,name:r.customName??``,onDone:()=>n(!1)})]})}function yL(e){let t=k(e=>e.projects).filter(e=>e.machine===NF()&&!e.scratch),n=e.tab;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Vn,{onSelect:e.onRename,children:[(0,W.jsx)(V,{icon:js}),`Rename`]}),(0,W.jsxs)(sr,{children:[(0,W.jsxs)(qn,{children:[(0,W.jsx)(V,{icon:ur}),`Move to`]}),(0,W.jsx)(wr,{className:`max-h-80 overflow-y-auto`,children:(0,W.jsxs)(pr,{value:n.projectId??``,onValueChange:e=>JF({type:`assignTab`,id:n.id,projectId:e===``?null:e}),children:[(0,W.jsx)(br,{value:``,children:`No project`}),t.length>0&&(0,W.jsx)(Gn,{}),t.map(e=>(0,W.jsx)(br,{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 eL(n.id),children:[(0,W.jsx)(V,{icon:ns}),`Close tab`]})]})}function bL(e){return FF().alerts.includes(e.id)?(0,W.jsx)(`span`,{className:z(`bg-primary`,e.className)}):null}function xL(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:z(`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 SL(e){(0,U.useSyncExternalStore)(PF,FF);let t=k(e=>e.machines).filter(e=>e.status===`online`),n=g(),r=wL(),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)(hn,{children:[(0,W.jsx)(gn,{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:Eo,className:`size-4`})})}),(0,W.jsx)(On,{align:`end`,className:`w-auto min-w-56`,children:(0,W.jsx)(gI,{})})]});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)(hn,{children:[(0,W.jsx)(gn,{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)(OL,{group:i}),(0,W.jsx)(`span`,{className:`truncate`,children:i?.name})]})}),(0,W.jsx)(On,{align:`center`,className:`w-auto`,children:(0,W.jsx)(TL,{groups:r,machine:e.machine})})]}),a]}),(0,W.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,W.jsx)(gL,{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)(gL,{view:n,page:!0,tabSize:`lg`,leading:e.leading})})})}function CL(){(0,U.useSyncExternalStore)(PF,FF);let e=ne(),t=g(),n=wL().filter(e=>e.machine.status===`online`);return n.length===0?null:(0,W.jsx)(`div`,{className:`flex max-h-80 flex-col gap-px overflow-y-auto`,children:n.map(n=>(0,W.jsxs)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,children:(0,W.jsxs)(`div`,{className:z(`group/row text-popover-foreground hover:bg-sidebar-row-hover data-[state=open]:bg-sidebar-row-hover relative shrink-0 rounded-[var(--control-radius)]`,n.machine.id===e&&n.view===t&&`bg-sidebar-row-hover text-sidebar-foreground`),children:[(0,W.jsxs)(`button`,{className:z(`flex h-7 w-full cursor-pointer items-center gap-2 rounded-[var(--control-radius)] pr-2.5 pl-2 text-left text-[13px]`,n.view!==`global`&&`pl-6`),onClick:()=>n.count===0?void mI(n.machine.id,n.view===`global`?null:n.view):fI(n.machine.id,n.view),children:[(0,W.jsx)(OL,{group:n}),(0,W.jsx)(`span`,{className:`truncate`,children:n.name}),(0,W.jsx)(kL,{count:n.count,alert:DL(n,e),className:`group-hover/row:invisible`})]}),(0,W.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground absolute top-0.5 right-1.5 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 mI(n.machine.id,n.view===`global`?null:n.view),children:(0,W.jsx)(V,{icon:Eo,className:`size-4`})})]})}),(0,W.jsxs)(nr,{onCloseAutoFocus:e=>e.preventDefault(),children:[(0,W.jsxs)(Vn,{onSelect:()=>void mI(n.machine.id,n.view===`global`?null:n.view),children:[(0,W.jsx)(V,{icon:Eo}),`New terminal`]}),n.view===`global`&&(0,W.jsxs)(Vn,{variant:`destructive`,onSelect:()=>void nL(n.machine.terminals.map(e=>({machine:n.machine.id,id:e.id}))),children:[(0,W.jsx)(V,{icon:ns}),`Close All`]}),(0,W.jsxs)(Vn,{variant:`destructive`,disabled:n.count===0,onSelect:()=>void nL(n.machine.terminals.filter(e=>BF(e)===n.view).map(e=>({machine:n.machine.id,id:e.id}))),children:[(0,W.jsx)(V,{icon:ns}),n.view===`global`?`Close All Except Projects`:`Close All`]})]})]},`${n.machine.id}:${n.view}`))})}function wL(){let e=k(e=>e.machines),t=k(e=>e.projects);return e.flatMap(e=>{let n=e.status===`online`?e.terminals:[],r=[...new Set([...t.filter(t=>e.status===`online`&&t.machine===e.id&&!t.hidden&&!t.scratch).map(e=>e.id),...n.flatMap(e=>e.projectId===null?[]:[e.projectId])])];return[{machine:e,view:Ue,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 TL(e){return e.groups.filter(e=>EL(e)&&(e.count>0||e.view===`global`)).map(t=>(0,W.jsxs)(Nr,{className:z(t.view!==`global`&&`pl-7`),onSelect:()=>t.count===0?void mI(t.machine.id,null):fI(t.machine.id,t.view),children:[(0,W.jsx)(OL,{group:t}),(0,W.jsx)(`span`,{className:`max-w-60 truncate`,children:t.name}),(0,W.jsx)(kL,{count:t.count,alert:DL(t,e.machine)})]},`${t.machine.id}:${t.view}`))}function EL(e){return e.machine.status===`online`&&e.machine.terminals.length>0}function DL(e,t){let n=FF();return e.machine.id===t&&n.layout.tabs.some(t=>(t.projectId??`global`)===e.view&&n.alerts.includes(t.id))}function OL(e){return e.group.view===`global`?(0,W.jsx)(wf,{icon:e.group.machine.icon,className:`size-4 shrink-0`}):(0,W.jsx)(dc,{machine:e.group.machine.id,projectId:e.group.view,className:`size-4 shrink-0`})}function kL(e){return e.count===0?null:(0,W.jsx)(`span`,{className:z(`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 AL(e){let t=k(e=>e.machines),[n,r]=(0,U.useState)(!1),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`);if(t.length===0)return null;let s=(0,W.jsxs)(`button`,{className:z(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`),title:`Terminal`,disabled:!o,onClick:o?()=>r(!0):void 0,children:[(0,W.jsx)(V,{icon:Js}),`Terminal`,i>0&&(0,W.jsx)(`span`,{className:z(`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`,o&&`pointer-coarse:invisible`),children:i}),o&&(0,W.jsx)(V,{icon:fi,"aria-hidden":!0,className:`text-muted-foreground absolute right-2.5 size-4 opacity-0 group-hover/terminal:opacity-100 group-has-[[data-state=open]]/terminal:opacity-100 pointer-coarse:opacity-100`})]});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(dr,{children:[(0,W.jsx)(Xn,{asChild:!0,disabled:!o,children:(0,W.jsx)(`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:o?(0,W.jsxs)(LI,{openDelay:0,open:n,onOpenChange:r,children:[(0,W.jsx)(RI,{asChild:!0,children:s}),(0,W.jsx)(zI,{side:`right`,align:`end`,className:`w-56 p-1`,onClick:()=>r(!1),children:(0,W.jsx)(CL,{})})]}):s})}),(0,W.jsxs)(nr,{onCloseAutoFocus:e=>e.preventDefault(),children:[(0,W.jsxs)(sr,{children:[(0,W.jsxs)(qn,{children:[(0,W.jsx)(V,{icon:Eo}),`New terminal`]}),(0,W.jsx)(wr,{className:`max-h-80 overflow-y-auto`,children:(0,W.jsx)(gI,{contextMenu:!0})})]}),(0,W.jsxs)(Vn,{variant:`destructive`,disabled:!a,onSelect:()=>void nL(t.filter(e=>e.status===`online`).flatMap(e=>e.terminals.map(t=>({machine:e.id,id:t.id})))),children:[(0,W.jsx)(V,{icon:ns}),`Close All`]})]})]}),(0,W.jsx)(fL,{})]})}var jL=null;function ML(e,t,n,r){let a=k(e=>e.inactiveVersion),o=k(e=>e.machines.filter(e=>e.status===`online`).map(e=>e.id).join(` `));(0,U.useEffect)(()=>{let a=JSON.stringify([t,n,o]);if(!e&&jL===a)return;let s=!0;async function l(){let e=o.split(` `).filter(e=>e!==``&&(t===null||e===t)),c=await Promise.all(e.map(async e=>{let t=await L(e,`sessions.inactive`,{projectId:n,limit:r});return{sessions:t.sessions.map(t=>({...t,machine:e})),total:t.total}}));if(!s)return;jL=a;let l=R(),u=new Map(l.inactive.map(e=>[P(e.machine,e.id),e])),d=c.flatMap(e=>e.sessions).sort((e,t)=>t.updatedAt-e.updatedAt).slice(0,r).map(e=>{let t=u.get(P(e.machine,e.id));return t!==void 0&&En(t,e)?t:e}),f=c.reduce((e,t)=>e+t.total,0);En(d,l.inactive)&&f===l.inactiveTotal||i({inactive:d,inactiveTotal:f})}return l().catch(c),()=>{s=!1}},[e,t,n,o,a,r])}function NL(){let e=k(e=>e.usageOpen);return(0,W.jsx)(ai,{open:e,onOpenChange:N,children:(0,W.jsxs)(Qr,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,"aria-describedby":void 0,children:[(0,W.jsx)($r,{className:`px-5 pt-4 pr-12 pb-3`,children:(0,W.jsx)(ni,{children:`Usage`})}),(0,W.jsx)(PL,{})]})})}function PL(){let e=k(e=>e.machines),[t,n]=(0,U.useState)(Date.now());(0,U.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),3e4);return()=>clearInterval(e)},[]);let r=e.filter(e=>e.status===`online`),i=new Map;for(let e of[...r.flatMap(e=>BL(e,e.claudeAccounts)),...r.flatMap(e=>BL(e,e.codexAccounts))]){if(!eo(e.account))continue;let t=$a(e.machine.id,e.account),n=i.get(t);n===void 0?i.set(t,{machine:e.machine.id,account:e.account,machines:[e.machine],names:[e.account.name]}):(n.machines.push(e.machine),n.names.push(e.account.name))}return i.size===0?(0,W.jsx)(`p`,{className:`text-muted-foreground border-t px-5 py-8 text-center text-xs`,children:`No Claude or Codex accounts with plan limits`}):(0,W.jsx)(`ul`,{className:`max-h-[70dvh] divide-y overflow-y-auto border-t`,children:[...i].map(e=>(0,W.jsx)(FL,{machine:e[1].machine,account:e[1].account,machines:e[1].machines,names:e[1].names,now:t},e[0]))})}function FL(e){let t=e.account,n=to(e.machine,t),r=n?.limits.filter(e=>e.rejected||e.utilization!==null)??[],i=n?.updatedAt??n?.fetchedAt??null,a=i===null?null:bn(i),[o,s]=(0,U.useState)(!1),c=o||n===void 0;return(0,W.jsxs)(`li`,{className:`flex flex-col gap-3 px-5 py-4`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[(0,W.jsx)(pc,{provider:t.provider,className:`size-3.5 shrink-0`}),(0,W.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,W.jsx)(`span`,{className:z(`truncate font-medium`,c&&`text-shimmer`),style:c?{"--shimmer-color":IL[t.provider]}:{color:IL[t.provider]},children:new Set(e.names).size===1?t.name:LL(t)}),t.plan!==null&&(0,W.jsxs)(`span`,{className:z(`shrink-0`,c?`text-shimmer`:`text-muted-foreground`),children:[`· `,RL(t.provider,t.plan)]})]}),(0,W.jsx)(`span`,{className:`bg-foreground/5 ml-1 flex shrink-0 items-center gap-1 rounded-full border px-1 py-0.5`,children:e.machines.map(e=>(0,W.jsx)(Yr,{label:e.name,children:(0,W.jsx)(`span`,{className:`text-icon-muted`,children:(0,W.jsx)(wf,{icon:e.icon,className:`size-3`})})},e.id))})]}),(0,W.jsxs)(H,{variant:`ghost-muted`,size:`xs`,className:`text-muted-foreground/70 -mr-2 h-6 shrink-0 gap-1.5 text-[11px] font-normal tabular-nums [&_svg]:mx-0`,title:`Refresh`,disabled:o,onClick:async()=>{s(!0),await ao(e.machine,t,!0),s(!1)},children:[a!==null&&(a===`now`?`now`:`${a} ago`),(0,W.jsx)(V,{icon:Kn,className:z(`size-3`,o&&`animate-spin`)})]})]}),n===void 0&&(0,W.jsx)(`div`,{className:`grid grid-cols-[minmax(2.5rem,max-content)_minmax(0,1fr)_2.25rem_3.25rem] items-center gap-x-3 gap-y-2 text-xs`,children:Array.from({length:2},(e,t)=>(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(`span`,{className:`bg-foreground/10 my-0.5 h-3 w-12 animate-pulse rounded`}),(0,W.jsx)(`span`,{className:`bg-foreground/10 h-1.5 animate-pulse rounded-full`}),(0,W.jsx)(`span`,{className:`bg-foreground/10 ml-auto h-3 w-7 animate-pulse rounded`}),(0,W.jsx)(`span`,{className:`bg-foreground/10 h-3 w-10 animate-pulse rounded`})]},t))}),r.length>0&&(0,W.jsx)(`div`,{className:`grid grid-cols-[minmax(2.5rem,max-content)_minmax(0,1fr)_2.25rem_3.25rem] items-center gap-x-3 gap-y-2 text-xs`,children:r.map(t=>{let n=t.rejected?0:Math.max(0,100-Math.round((t.utilization??0)*100));return(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(`span`,{className:`text-muted-foreground capitalize`,children:Tp(t)}),(0,W.jsx)(`div`,{className:`bg-foreground/10 h-1.5 overflow-hidden rounded-full`,children:(0,W.jsx)(`div`,{className:`h-full rounded-full`,style:{width:`${n}%`,backgroundColor:zL(n)}})}),(0,W.jsxs)(`span`,{className:`text-right tabular-nums`,style:{color:zL(n)},children:[n,`%`]}),(0,W.jsx)(`span`,{className:`text-muted-foreground whitespace-nowrap tabular-nums`,title:t.resetsAt===null?void 0:or(t.resetsAt*1e3),children:t.resetsAt===null?``:Sn(t.resetsAt*1e3-e.now)})]},t.window)})}),n!==void 0&&n.error!==null&&(0,W.jsxs)(`p`,{className:`text-destructive text-xs`,children:[`Couldn't refresh: `,n.error]}),n!==void 0&&n.error===null&&r.length===0&&(0,W.jsx)(`p`,{className:`text-muted-foreground/70 text-xs`,children:`No limits reported for this account`})]})}var IL={claude:`#d97757`,codex:`#6e5ae6`};function LL(e){if(e.displayName!==null)return e.displayName;if(e.email===null)throw Error(`${e.name} has no email`);return e.organization!==null&&e.organization!==`${e.email}'s Organization`?e.organization:e.email.split(`@`)[0]}function RL(e,t){return t.split(/[\s_]+/).filter(t=>t.toLowerCase()!==e).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}function zL(e){return`hsl(${e/100*130} 40% 48%)`}function BL(e,t){return t.map(t=>({machine:e,account:t}))}var VL=`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`,HL=50;function UL(e){let t=k(e=>e.selection),n=k(e=>e.machines),r=k(e=>e.sessions),i=k(e=>e.projects),a=k(e=>e.settings.provider),o=k(e=>e.unseen),s=k(e=>e.loaded),c=k(e=>e.inactive),l=k(e=>e.inactiveTotal),u=k(e=>e.prefs.groupActiveByProject),[f,m]=Rr(`sidebarScope`,null),[h,g]=(0,U.useState)(null),[_,v]=(0,U.useState)(null),[y,b]=(0,U.useState)(!1),[x,C]=(0,U.useState)(!1),[w,T]=(0,U.useState)(!1),[E,D]=(0,U.useState)(HL),[O,A]=Rr(`sidebarWidth`,240),j=r.filter(e=>f===null||e.machine===f.machine&&de(e.machine,e.projectId)===f.projectId).sort((e,t)=>t.updatedAt-e.updatedAt),M=j.filter(e=>{let t=$e(n,e.machine,e.id);return e.status===`snoozed`&&t?.waiting!==!0&&(t?.running===!0||Object.values(t?.tasks??{}).includes(`running`))}),ee=[...j.filter(e=>e.status===`pinned`),...j.filter(e=>e.status===`active`||e.status===`snoozed`&&!M.includes(e))],te=j.filter(e=>e.status===`minimized`),ne=f?.machine??null,re=f?.projectId??null,ie=t!==null&&t.sessionId!==null&&s&&!r.some(e=>e.machine===t.machine&&e.id===t.sessionId)?{machine:t.machine,id:t.sessionId,provider:a,title:`New thread`,projectId:t.projectId,branch:null,updatedAt:Date.now(),status:`active`}:null,ae=t!==null&&t.sessionId===null?t:null,oe=ie===null?ee:[ie,...ee],se=u&&f===null,ce=[...new Map([...ae===null?[]:[ae],...oe].map(e=>{let t=de(e.machine,e.projectId);return[P(e.machine,t),{machine:e.machine,projectId:t}]}))],le=e.mobile?SI:DA;function de(e,t){return i.some(n=>n.machine===e&&n.id===t&&n.scratch)?S:t}ML(w,ne,re,E);function fe(){let e=f??t??gt();e===null?n.length>0?g(n[0].id):d(`Machines`):we(e.machine,e.projectId)}yr([`mod+n`,`mod+t`],fe,{enableOnFormTags:!0,preventDefault:!0}),yr([`mod+1`,`mod+2`,`mod+3`,`mod+4`,`mod+5`,`mod+6`,`mod+7`,`mod+8`,`mod+9`],e=>{let t=se?ce.flatMap(e=>oe.filter(t=>P(t.machine,de(t.machine,t.projectId))===e[0])):oe,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&&WL(r.machine,r.projectId,r.id)},{enableOnFormTags:!0,preventDefault:!0,enabled:!e.mobile});function F(e){let t=e.clientX-O;Vt(e,e=>{let n=Math.min(480,Math.max(200,e.clientX-t));A(n)})}function I(r,i){let a=e.mobile?bI:TA;return(0,W.jsx)(a,{session:r,slim:i,selected:t?.machine===r.machine&&t.sessionId===r.id,activity:$e(n,r.machine,r.id),unseen:o.includes(P(r.machine,r.id)),saved:r!==ie,scope:f,onSelect:WL},P(r.machine,r.id))}function pe(e){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`li`,{className:z(`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:Ir,className:z(`size-3 shrink-0 transition-transform`,!e.open&&`rotate-180`)})]})}),e.open&&e.items.map(e=>I(e,e.status===`inactive`))]})}return(0,W.jsxs)(`aside`,{className:z(`bg-sidebar text-sidebar-foreground border-sidebar-border flex flex-none border-r select-none`,e.className),children:[(0,W.jsxs)(`div`,{className:z(`relative flex min-w-0 flex-col`,e.mobile&&`flex-1`),style:e.mobile?void 0:{width:O},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)(_I,{buttonClassName:VL}):(0,W.jsx)(`button`,{className:z(VL,`size-7 [&>svg]:size-4.5`),title:`Hide sidebar (${Ht}+B)`,"aria-label":`Hide sidebar`,onClick:e.onHide,children:(0,W.jsx)(V,{icon:ks})}),(0,W.jsx)(AI,{scope:f,onScope:m,onEdit:v,onAddProject:g}),e.mobile&&(0,W.jsx)(MI,{hideDone:!0}),(0,W.jsxs)(`div`,{className:`ml-auto flex items-center gap-0.75`,children:[(0,W.jsx)(`button`,{className:z(VL,`size-7 [&>svg]:size-4.5`),title:`Search (${Ht}+K)`,"aria-label":`Search`,onClick:()=>ue(!0),children:(0,W.jsx)(V,{icon:xr})}),(0,W.jsx)(`button`,{className:z(VL,`size-7 [&>svg]:size-4.5`),title:`New thread (${Ht}+N)`,onClick:fe,children:(0,W.jsx)(V,{icon:Ks})})]})]}),(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:[se?ce.map(([t,n])=>(0,W.jsx)(kI,{machine:n.machine,projectId:n.projectId,sessions:oe.filter(e=>P(e.machine,de(e.machine,e.projectId))===t),started:ie,mobile:e.mobile},t)):(0,W.jsxs)(W.Fragment,{children:[ae!==null&&(0,W.jsx)(le,{machine:ae.machine,projectId:ae.projectId,onSelect:()=>WL(ae.machine,ae.projectId,null)}),oe.map(e=>I(e,!1))]}),ee.length===0&&ie===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`}),M.length>0&&pe({icon:ic,label:y?`Snoozed`:`Snoozed (${M.length})`,items:M,open:y,onToggle:()=>b(!y),first:!0}),te.length>0&&pe({icon:Ds,label:x?`Minimized`:`Minimized (${te.length})`,items:te,open:x,onToggle:()=>C(!x),first:M.length===0}),pe({icon:Qs,label:`Done`,items:c.slice(0,E),open:w,onToggle:()=>{T(!w),D(HL)},first:M.length===0&&te.length===0}),w&&l>E&&c.length>=E&&(0,W.jsx)(`li`,{"aria-hidden":!0,className:`h-px shrink-0`,ref:e=>{if(e===null)return;let t=new IntersectionObserver(e=>{e[0].isIntersecting&&D(E+HL)});return t.observe(e),()=>t.disconnect()}})]})}),!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)(AL,{buttonClassName:VL}),(0,W.jsxs)(`button`,{className:z(VL,`h-8 w-full justify-start gap-2 px-2.5 text-sm`),title:`Usage`,onClick:()=>N(!0),children:[(0,W.jsx)(V,{icon:ts}),(0,W.jsx)(`span`,{className:`truncate`,children:`Usage`})]}),(0,W.jsxs)(`div`,{className:`relative`,children:[(0,W.jsxs)(`button`,{className:z(VL,`h-8 w-full justify-start gap-2 px-2.5 text-sm`),title:`Settings`,onClick:()=>p(!0),children:[(0,W.jsx)(V,{icon:Bs}),(0,W.jsx)(`span`,{className:`truncate`,children:`Settings`})]}),(0,W.jsxs)(`div`,{className:`absolute top-1.5 right-1.5`,children:[(0,W.jsx)(MI,{className:`@max-[13rem]:hidden`,hideDone:!1}),(0,W.jsx)(MI,{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:F,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)(NL,{}),h!==null&&(0,W.jsx)(vO,{machine:h,onClose:()=>g(null),onAdd:e=>{g(null),WL(e.machine,e.id,null)}}),_!==null&&(0,W.jsx)(bO,{project:_,onClose:()=>v(null),onRemoved:()=>{f?.machine===_.machine&&f.projectId===_.id&&m(null),v(null)}})]})}function WL(e,t,n){Ie({machine:e,projectId:t,sessionId:n})}var GL={running:`Running`,completed:`Done`,failed:`Failed`,stopped:`Stopped`};function KL(e,t){return{agents:e.flatMap(e=>e.kind===`subagent`?[{item:e,agentId:e.agentId,status:JL(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:JL(e.status,e.background.taskId,t)}]:[])}}function qL(e){return e.description===``?e.command:e.description}function JL(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`:GL[e]:GL[r]}function YL(e){return(0,W.jsx)(`span`,{className:z(e.active&&`text-shimmer`),children:e.text})}function XL(e){return(0,W.jsxs)(`span`,{className:z(`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:z(`text-foreground shrink-0`,e.grouped?`font-normal`:`font-medium`),children:(0,W.jsx)(YL,{text:e.title,active:e.pending})}),e.subtitle!==void 0&&e.subtitle!==``&&(0,W.jsx)(`span`,{className:z(`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:z(`min-w-0 truncate tabular-nums`,e.grouped?`text-muted-foreground/70`:`text-muted-foreground`),children:t},t))]})}function ZL(e){return(0,W.jsx)(`span`,{"aria-hidden":!0,className:z(`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:Or,strokeWidth:2.5,className:z(`size-3.5 transition-transform`,!e.open&&`-rotate-90`)})})}function QL(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)(XL,{title:e.title,subtitle:e.subtitle,args:e.args,pending:e.pending,grouped:e.grouped})}),t!==null&&(0,W.jsx)(ZL,{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:z(`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:z(`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:z(`min-w-0 pt-1`,e.rail!==!1&&`ps-3`),children:e.children})]})}var $L=new Map([[`build`,`text-blue-400`],[`explore`,`text-yellow-400`],[`plan`,`text-pink-400`],[`review`,`text-green-400`],[`writer`,`text-purple-400`]]),eR=new Map([[`Running`,`Launched agent`],[`Done`,`Agent finished`],[`Failed`,`Agent failed`],[`Stopped`,`Agent stopped`]]),tR=new Map([[`Running`,`Started in background`],[`Done`,`Background task finished`],[`Failed`,`Background task failed`],[`Stopped`,`Background task stopped`]]),nR=[`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 rR(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:$L.get(n)??nR[r%nR.length]}}function iR(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,className:z(`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 aR(e){return(0,W.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":!0,className:z(`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 oR(e){let t=e.item;if(t.kind===`agent_message`){let n=t.target;return(0,W.jsx)(sR,{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)(sR,{label:tR.get(n.status)??`Background task ${n.status.toLowerCase()}`,detail:qL(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)(sR,{label:eR.get(n.status)??`Agent ${n.status.toLowerCase()}`,detail:t.description,pending:n.status===`Running`,onOpen:()=>e.onOpen(t.id)})}function sR(e){let t=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:(0,W.jsx)(YL,{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:An,className:`size-3.5`})})]})}function cR(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(lR(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===``?[]:lR(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)(Vp,{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:Ro})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Next match`,onClick:()=>l(n,c+1),children:(0,W.jsx)(V,{icon:Or})}),(0,W.jsx)(H,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close find`,onClick:e.onClose,children:(0,W.jsx)(V,{icon:Uo})})]})}function lR(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 uR(e){let[t,n]=(0,U.useState)(!1),r=e.plan,i=fR(r),a=r.length>900||r.split(`
|
|
17
|
-
`).length>20,o=a&&!t;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:i??`Proposed plan`})]}),(0,W.jsxs)(hn,{children:[(0,W.jsx)(gn,{asChild:!0,children:(0,W.jsx)(H,{"aria-label":`Plan actions`,size:`icon-xs`,variant:`outline`,children:(0,W.jsx)(V,{icon:Tr,className:`size-4`})})}),(0,W.jsx)(On,{align:`end`,children:(0,W.jsx)(dR,{plan:r,title:i})})]})]}),(0,W.jsxs)(`div`,{className:`mt-4`,children:[(0,W.jsxs)(`div`,{className:z(`relative`,o&&`max-h-104 overflow-hidden`),children:[(0,W.jsx)(ar,{text:o?mR(r):pR(r)}),o&&(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`})]}),a&&(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 dR(e){let t=rn(),n=`${e.plan.trimEnd()}\n`;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Nr,{onSelect:e=>{e.preventDefault(),t.copy(n)},children:t.copied?`Copied!`:`Copy to clipboard`}),(0,W.jsx)(Nr,{onSelect:()=>{let t=URL.createObjectURL(new Blob([n],{type:`text/markdown;charset=utf-8`})),r=document.createElement(`a`);r.href=t,r.download=`${hR(e.title??`plan`)}.md`,r.click(),setTimeout(()=>URL.revokeObjectURL(t),0)},children:`Download as markdown`})]})}function fR(e){let t=/^\s{0,3}#{1,6}\s+(.+)$/m.exec(e)?.[1]?.trim();return t===void 0||t===``?null:t}function pR(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 mR(e){let t=pR(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?fR(e)??`Plan preview unavailable.`:(i&&n.push(``,`...`),n.join(`
|
|
19
|
-
`))}function hR(e){let t=e.toLowerCase().replace(/[`'".,!?()[\]{}]+/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return t===``?`plan`:t}function gR(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 _R(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===``||!vR(i.startContainer,t)||!vR(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:()=>{yR(t.text),window.getSelection()?.removeAllRanges(),n(null)},children:[(0,W.jsx)(V,{icon:Is}),`Quote`]})}function vR(e,t){let n=e instanceof Element?e:e.parentElement;return n!==null&&t.contains(n)&&n.closest(`[data-quotable]`)!==null}function yR(e){let t=R().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
|
-
`);F(ct(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 bR(e){return e.kind===`group`||e.kind===`agent`}function xR(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=SR(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 SR(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 CR(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)=>xR(e,t&&i===r.length-1?{partial:n}:null));return t&&r.length===0&&a.push({kind:`working`,key:`working`}),a}var wR={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:K,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:js,code:!1,conversation:!0},code:{label:`Restore code`,description:`This will undo file changes made since this message. The chat will not change.`,icon:mr,code:!0,conversation:!1}};function TR(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 ER(e){let[t,n]=(0,U.useState)(!1),[r,i]=(0,U.useState)(!1),[a,o]=(0,U.useState)(null),s=TR(k(e=>e.settings.provider)),c=k(e=>e.prefs.rewind),l=s.includes(c)?c:`chat`;return(0,W.jsxs)(W.Fragment,{children:[s.length>1&&(0,W.jsxs)(hn,{open:t,onOpenChange:e=>{r||n(e)},children:[(0,W.jsx)(Yr,{label:`Restore options`,children:(0,W.jsx)(gn,{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:Tr,className:`size-4`})})})}),(0,W.jsx)(On,{align:`end`,className:`w-72`,children:(0,W.jsx)(DR,{messageId:e.target.messageId,available:s,onPick:(e,t)=>o({mode:e,check:t})})})]}),(0,W.jsx)(Yr,{label:wR[l].label,children:(0,W.jsx)(H,{type:`button`,size:`icon-micro`,variant:`ghost-muted`,"aria-label":wR[l].label,disabled:e.disabled||r,onClick:()=>o({mode:l,check:null}),children:(0,W.jsx)(V,{icon:wR[l].icon,className:`size-4`})})}),(0,W.jsx)(hr,{open:a!==null,onOpenChange:e=>{e||o(null)},children:a!==null&&(0,W.jsx)(Qn,{children:(0,W.jsx)(OR,{target:e.target,mode:a.mode,check:a.check,onBusy:i})})})]})}function DR(e){let[t,n]=(0,U.useState)(null),[r,i]=(0,U.useState)(null),a=e.messageId,o=k(e=>e.selection),s=o?.machine??null,c=o?.sessionId??null,l=o?.projectId??``,u=k(e=>s===null?``:He(e,s,l)?.path??``);(0,U.useEffect)(()=>{if(n(null),i(null),s===null||c===null)return;let e=!0;return L(s,`sessions.rewind`,{sessionId:c,projectId:l,messageId:a,settings:R().settings,code:!0,conversation:!1,dryRun:!0}).then(t=>{e&&n(t)},t=>{e&&i(Ut(t))}),()=>{e=!1}},[a,s,c,l]);let d=t!==null&&r===null;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`text-muted-foreground px-2 py-1.5 text-xs`,children:[r!==null&&`Code can't be restored: ${r}`,r===null&&t===null&&`Checking file changes…`,t!==null&&t.files.length===0&&`No file changes since this message.`,t!==null&&t.files.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{children:[`Restores `,t.files.length,` `,t.files.length===1?`file`:`files`,` (`,(0,W.jsxs)(`span`,{className:`text-diff-addition`,children:[`+`,t.insertions]}),` `,(0,W.jsxs)(`span`,{className:`text-diff-deletion`,children:[`−`,t.deletions]}),`)`]}),(0,W.jsx)(`ul`,{className:`mt-1 max-h-24 overflow-y-auto font-mono`,children:t.files.map(e=>(0,W.jsx)(`li`,{className:`truncate`,children:Yf(e,u)},e))})]})]}),(0,W.jsx)(Fn,{}),e.available.map(n=>(0,W.jsxs)(Nr,{disabled:wR[n].code&&!d,onSelect:()=>e.onPick(n,{preview:t,codeError:r}),children:[(0,W.jsx)(V,{icon:wR[n].icon}),wR[n].label]},n))]})}function OR(e){let[t,n]=(0,U.useState)(e.check===null?null:e.check.preview),[r,a]=(0,U.useState)(e.check===null?null:e.check.codeError),o=e.target,s=o.messageId,l=e.check!==null,u=k(e=>e.selection),d=k(e=>e.settings.provider),f=u?.machine??null,p=u?.sessionId??null,m=u?.projectId??``;(0,U.useEffect)(()=>{if(l||f===null||p===null)return;n(null),a(null);let e=!0;return L(f,`sessions.rewind`,{sessionId:p,projectId:m,messageId:s,settings:R().settings,code:!0,conversation:!1,dryRun:!0}).then(t=>{e&&n(t)},t=>{e&&a(Ut(t))}),()=>{e=!1}},[l,s,f,p,m]);async function h(t){if(f===null||p===null)return;let n=wR[t].code,r=wR[t].conversation;e.onBusy(!0);try{let e=r?await Promise.all(o.images.map((e,t)=>e.data===null?L(f,`sessions.image`,{sessionId:p,itemId:o.messageId,index:t}):{mediaType:e.mediaType,data:e.data})):[],a=r&&o.first&&d===`claude`,s=r&&!a;(n||s)&&await L(f,`sessions.rewind`,{sessionId:p,projectId:m,messageId:o.messageId,settings:R().settings,code:n,conversation:s,dryRun:!1}),a&&(we(f,m,!0),i({replacing:{machine:f,projectId:m,sessionId:p}})),r&&Oe({text:o.text,images:e}),Ye({...R().prefs,rewind:t})}catch(e){oa(Ut(e)),c(e)}finally{e.onBusy(!1)}}let g=t!==null&&r===null;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsxs)(Un,{children:[wR[e.mode].label,`?`]}),(0,W.jsxs)(zn,{children:[wR[e.mode].description,` Do you really want to continue?`,wR[e.mode].code&&r!==null&&(0,W.jsx)(`span`,{className:`text-destructive mt-2 block`,children:`Code can't be restored: ${r}`})]})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,disabled:wR[e.mode].code&&!g,onClick:()=>void h(e.mode),children:wR[e.mode].label})]})]})}var kR=20,AR=`linear-gradient(to bottom, black calc(100% - 1.75rem), transparent)`,jR=new Map;function MR(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)(PR,{itemId:r.id,index:t,mediaType:e.mediaType,data:e.data})},t))}),r.text!==``&&(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{className:z(`relative`,o&&`max-h-44 overflow-hidden`),style:o?{WebkitMaskImage:AR,maskImage:AR}: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)(ar,{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)(Yr,{label:or(r.time),children:(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:ln(r.time)})}),i!==``&&(0,W.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[e.rewind&&(0,W.jsx)(ER,{target:{messageId:r.id,text:i,images:r.images,first:e.first},disabled:e.running}),(0,W.jsx)(NR,{text:i})]})]})})]})}function NR(e){let t=rn();return(0,W.jsx)(Yr,{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?Wn:$n,className:z(`size-4`,t.copied&&`text-primary`)})})})}function PR(e){let t=k(e=>e.selection),n=t?.machine??null,r=t?.sessionId??null,[i,a]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(e.data!==null||n===null||r===null)return;let t=!0,i=JSON.stringify([n,r,e.itemId,e.index]),o=jR.get(i);if(o===void 0){if(o=L(n,`sessions.image`,{sessionId:r,itemId:e.itemId,index:e.index}),jR.set(i,o),jR.size>kR){let[e]=jR.keys();jR.delete(e)}o.catch(()=>jR.delete(i))}return o.then(e=>{t&&a(e.data)}).catch(c),()=>{t=!1}},[e.data,e.itemId,e.index,n,r]);let o=e.data??i;return o===null?null:(0,W.jsx)(fn,{src:`data:${e.mediaType};base64,${o}`,alt:``,name:`Image`,className:`block size-full`,imageClassName:`block size-full object-cover`})}var FR=(0,U.lazy)(async()=>({default:(await pi(async()=>{let{ImageViewer:e}=await import(`./image-viewer-CVERQTJS.js`);return{ImageViewer:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).ImageViewer}));function IR(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 LR(e){let t=e.item,n=e.live&&t.status===`running`;if(t.status===`failed`)return(0,W.jsx)(WR,{title:IR(t),subtitle:GR(t,e.cwd),error:t.output});switch(t.kind){case`command`:return(0,W.jsx)(zR,{command:t.command,output:t.output,pending:n});case`file_change`:return(0,W.jsx)(HR,{items:[t],cwd:e.cwd,live:e.live});case`web_search`:{let e=t.url;return e===null?(0,W.jsx)(BR,{query:t.query??``,links:t.results,pending:n}):(0,W.jsx)(QL,{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)(YL,{text:t.skill,active:n})}),(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`skill`})]});case`tool`:{let r=t.input;switch(Uf(t.name)){case`read`:return(0,W.jsx)(QL,{title:`Read`,subtitle:(0,W.jsx)(RR,{path:Wf(r),children:qR(Wf(r))}),args:KR(r,[`offset`,`limit`]),pending:n,grouped:!0,open:!1,onToggle:null});case`search`:return(0,W.jsx)(QL,{title:t.name,subtitle:GR(t,e.cwd),args:[...KR(r,[`pattern`]),...Jf(r.glob)===``?[]:[`include=${Jf(r.glob)}`]],pending:n,grouped:!0,open:!1,onToggle:null});case`other`:return(0,W.jsx)(QL,{title:`Called ${t.name}`,subtitle:GR(t,e.cwd),args:KR(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 RR(e){let t=k(e=>e.selection),[n,r]=(0,U.useState)(null);return t===null||yn(e.path)!==`image`?e.children:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,title:`View ${e.path}`,className:`hover:text-foreground focus-visible:ring-ring/70 cursor-zoom-in rounded-sm underline decoration-dotted underline-offset-2 focus-visible:ring-2 focus-visible:outline-none`,onClick:()=>void xn(t.machine,t.projectId,e.path).then(r).catch(c),children:e.children}),n!==null&&(0,W.jsx)(U.Suspense,{children:(0,W.jsx)(FR,{src:n,alt:qR(e.path),name:e.path,onClose:()=>r(null)})})]})}function zR(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsx)(QL,{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)(NR,{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 BR(e){let[t,n]=(0,U.useState)(!1),r=e.links;return(0,W.jsx)(QL,{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 VR(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsx)(QL,{title:e.streaming?`Thinking`:`Thought`,subtitle:e.streaming?JR(e.text):void 0,pending:e.streaming,grouped:!0,open:t,onToggle:()=>n(!t),children:(0,W.jsx)(ar,{text:e.text,className:`text-muted-foreground text-[13px]`,lineBreaks:!0})})}function HR(e){let t=new Map;for(let n of e.items){let r=Yf(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)(UR,{file:t,items:n,pending:e.live&&n.some(e=>e.status===`running`)},t))})}function UR(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=Gf(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)(si,{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)(YL,{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:[`+`,wn(i)]}),(0,W.jsxs)(`span`,{"aria-hidden":!0,className:`text-diff-deletion`,children:[`-`,wn(a)]})]}),(0,W.jsx)(ZL,{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)(Hf,{item:e},e.id))})]})}function WR(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:ko,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)(ZL,{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)(NR,{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 GR(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(Uf(e.name)===`search`){let e=Jf(n.path);return e===``||e===t?``:Yf(e,t)}return[`description`,`query`,`url`,`file_path`,`path`,`pattern`].map(e=>Jf(n[e])).find(e=>e!==``)??``}}}function KR(e,t){return t.flatMap(t=>{let n=e[t];return typeof n==`string`||typeof n==`number`||typeof n==`boolean`?[`${t}=${n}`]:[]})}function qR(e){return e.split(`/`).at(-1)??e}function JR(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 YR=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`});function XR(e){let t=e.entries.flatMap(e=>e.kind===`reasoning`?[]:[e]),n=e.entries.length-t.length,r=YR.format([...new Set(t.map(IR))]),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:z(`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)(ZL,{open:e.open})]}),e.open&&(0,W.jsx)(`div`,{className:`flex flex-col gap-2`,children:QR(e.entries).map(t=>(0,W.jsx)(`div`,{className:`flex min-h-7 min-w-0 flex-col justify-center`,children:(0,W.jsx)(ZR,{item:t,cwd:e.cwd,live:e.live})},t.key))})]})}function ZR(e){let t=e.item;switch(t.kind){case`thinking`:return(0,W.jsx)(VR,{text:t.text,streaming:e.live&&t.last});case`tool`:return(0,W.jsx)(LR,{item:t.item,cwd:e.cwd,live:e.live});case`reads`:return(0,W.jsx)(QL,{title:`Read`,subtitle:(0,W.jsx)(`span`,{title:t.items.map(e=>Wf(e.input)).join(`
|
|
23
|
-
`),children:t.items.map((t,n)=>(0,W.jsxs)(`span`,{children:[n>0&&` `,(0,W.jsx)(RR,{path:Wf(t.input),children:(0,W.jsx)(YL,{text:Wf(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)(HR,{items:t.items,cwd:e.cwd,live:e.live})}}function QR(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`&&Uf(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 $R(e){let[t,n]=(0,U.useState)([]),[r,i]=(0,U.useState)(null),[a,o]=(0,U.useState)(!0),s=(0,U.useRef)(null),c=e.rows.flatMap((t,n)=>t.kind===`user`?[{key:t.key,prompt:tz(t.item),reply:nz(e.rows,n)}]:[]),l=Math.max(c.findIndex(e=>e.key===t[0]),0),u=r===null?null:c[r];if((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(),r=[...t.querySelectorAll(`[data-kind="user"]`)],i=r.flatMap((t,n)=>{let i=t.getBoundingClientRect().top,a=r[n+1]?.getBoundingClientRect().top??1/0;return i<e.bottom&&a>e.top&&t.dataset.row?[t.dataset.row]:[]});n(e=>En(e,i)?e:i)}let i=new ResizeObserver(()=>{if(t===null)throw Error(`transcript is not mounted`);r();let e=t.querySelector(`[data-row]`)?.parentElement;e!=null&&o(t.getBoundingClientRect().right-e.getBoundingClientRect().right>=40)});return r(),i.observe(t),t.addEventListener(`scroll`,r,{passive:!0}),()=>{i.disconnect(),t.removeEventListener(`scroll`,r)}},[e.scroller,c.length]),c.length<2)return null;function d(e){let t=s.current?.getBoundingClientRect();if(t===void 0)throw Error(`message rail is not mounted`);let n=Math.min(Math.max((e-t.top)/t.height,0),1);return Math.round(n*(c.length-1))}function f(e){return`${e/(c.length-1)*100}%`}return(0,W.jsxs)(`div`,{ref:s,className:z(`absolute top-1/2 right-[calc(var(--app-scrollbar-width)+0.25rem)] z-20 w-8 -translate-y-1/2 select-none pointer-coarse:hidden`,!a&&`hidden`),style:{height:`min(${(c.length-1)*10}px, 60%)`},children:[(0,W.jsx)(`button`,{type:`button`,"aria-label":`Jump to your message: ${u?.prompt??c[l].prompt}`,className:`focus-visible:ring-ring absolute inset-x-0 -inset-y-3 cursor-pointer rounded-md outline-none focus-visible:ring-2`,onPointerMove:e=>i(d(e.clientY)),onPointerLeave:()=>i(null),onFocus:()=>i(e=>e??l),onBlur:()=>i(null),onWheel:t=>{if(e.scroller.current===null)throw Error(`transcript is not mounted`);e.scroller.current.scrollBy({top:t.deltaY})},onClick:t=>{let n=t.detail===0?r:d(t.clientY);if(n===null)throw Error(`no message is selected`);e.onJump(c[n].key)},onKeyDown:e=>{let t=r??l,n=e.key===`ArrowUp`?t-1:e.key===`ArrowDown`?t+1:e.key===`Home`?0:e.key===`End`?c.length-1:null;n!==null&&(e.preventDefault(),i(Math.min(Math.max(n,0),c.length-1)))}}),c.map((e,n)=>{let i=r===null?null:Math.abs(n-r),a=t.includes(e.key);return(0,W.jsx)(`span`,{"aria-hidden":`true`,className:z(`pointer-events-none absolute right-1 h-0.5 w-5 origin-right -translate-y-1/2 rounded-full transition-all duration-150 ease-out`,i===0?`bg-foreground/85`:a?`bg-foreground/55`:`bg-foreground/20`,i===0?`scale-x-100`:i===1?`scale-x-75`:i===2?`scale-x-[0.55]`:a?`scale-x-50`:`scale-x-[0.35]`),style:{top:f(n)}},e.key)}),u!==null&&r!==null&&(0,W.jsxs)(`div`,{className:`bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-98 pointer-events-none absolute right-9 w-80 rounded-xl border p-3 shadow-lg/10 transition-[top,translate] duration-100 ease-out`,style:{top:f(r),translate:r===0?`0 -0.75rem`:r===c.length-1?`0 calc(-100% + 0.75rem)`:`0 -50%`},children:[(0,W.jsx)(`p`,{className:`line-clamp-2 text-sm leading-5 font-medium wrap-anywhere`,children:u.prompt}),u.reply!==``&&(0,W.jsx)(`p`,{className:`text-muted-foreground mt-1 line-clamp-3 text-xs leading-[1.125rem] wrap-anywhere`,children:u.reply})]})]})}function ez(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 tz(e){let t=e.text.replace(/\s+/g,` `).trim();return t===``?e.images.length>0?`Image`:`Message`:t.slice(0,300)}function nz(e,t){let n=``;for(let r of e.slice(t+1)){if(r.kind===`user`)break;r.kind===`assistant`&&(n=r.text)}return n.slice(0,600).replace(/[#*`>|]+/g,``).replace(/\s+/g,` `).trim()}var rz=30;function iz(e){let t=k(e=>e.selection),n=k(e=>e.loaded),r=k(e=>e.items),i=k(e=>e.earlier),a=k(e=>e.before),o=k(e=>e.partial),s=k(e=>e.requests),c=k(Ct),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=k(e=>t===null?``:He(e,t.machine,t.projectId)?.path??``),C=k(Mt),w=k(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)(()=>KL([...i,...r],c),[i,r,c]),E=CR(i,!1,``),D=[...E,...CR(r,C,o)],O=D.findIndex(e=>e.key===_?.key),A=y?0:Math.max(0,O===-1?D.length-rz:O-(_?.above??0));(0,U.useLayoutEffect)(()=>{let e=l.current;e!==null&&f.current!==null&&(e.scrollTop=e.scrollHeight-f.current),f.current=null},[i,A]),(0,U.useLayoutEffect)(()=>{x.current!==null&&(ez(l.current,x.current),x.current=null)},[A]),yr(`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&&(O===-1?v({key:D[A].key,above:0}):j(e))});function j(e){A===0||e.scrollTop>=e.clientHeight||(f.current=e.scrollHeight-e.scrollTop,v({key:D[A].key,above:rz}))}function M(e){let t=D.findIndex(t=>t.key===e);if(t===-1)throw Error(`that message is not loaded`);t>=A?ez(l.current,e):(x.current=e,v({key:e,above:1}))}let N=(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)(cR,{content:u,scroller:l,onClose:()=>{b(!1),D.length>0&&v({key:D[0].key,above:0}),document.querySelector(`[data-composer]`)?.focus()}}),(0,W.jsx)($R,{rows:D,scroller:l,onJump:M}),(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,j(t)},children:[(0,W.jsx)(`div`,{ref:u,children:(0,W.jsxs)(Df,{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&&A===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:rz}),m(!0),await tt(),m(!1)},children:p?`Loading…`:`Load earlier conversation`})}),D.slice(A).map((t,n)=>{let r=A+n,i=D[r-1],a=r<E.length;return(0,W.jsx)(`div`,{"data-row":t.key,"data-kind":t.kind,className:z(i===void 0?void 0:t.kind===`user`?`pt-6`:t.kind===`working`?void 0:bR(t)&&bR(i)?`pt-2`:bR(t)||bR(i)?`pt-3`:`pt-4`,t.kind===`assistant`&&`group/assistant`),children:(0,W.jsx)(sz,{row:t,agents:T.agents,tasks:T.tasks,running:C,compacting:c?.compacting===!0,fork:!a,expanded:h.includes(t.key),onToggle:N,onOpenTask:e.onOpenTask,rewind:!a,cwd:S})},t.key)})]})}),(0,W.jsx)(_R,{scroller:l})]})]})}var az=(0,U.memo)(iz);function oz(e){let t=e.row;switch(t.kind){case`user`:return(0,W.jsx)(MR,{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)(YL,{text:e.compacting?`Compacting conversation`:`Working`,active:!0})});case`group`:return(0,W.jsx)(XR,{entries:t.entries,cwd:e.cwd,live:t.live,open:e.expanded,onToggle:()=>e.onToggle(t.key)});case`agent`:return(0,W.jsx)(oR,{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)(ar,{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.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,W.jsx)(NR,{text:t.text}),e.fork&&(0,W.jsx)(cz,{uuid:t.message})]}),t.time!==null&&(0,W.jsx)(Yr,{label:or(t.time),children:(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:ln(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:ko,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:Es,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:Es,className:`size-3`}),`Compacted summary`,(0,W.jsx)(V,{icon:Or,strokeWidth:2.5,className:z(`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)(ar,{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)(Yr,{label:or(t.time),children:(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:ln(t.time)})}),(0,W.jsx)(NR,{text:t.summary})]})]})]});case`plan`:return(0,W.jsx)(`div`,{className:`min-w-0`,"data-quotable":!0,children:(0,W.jsx)(uR,{plan:t.plan})});case`question`:return(0,W.jsx)(gR,{item:t.item})}}var sz=(0,U.memo)(oz,(e,t)=>t.row.kind===`agent`?En(e,t):En(Hi(e,[`agents`,`tasks`]),Hi(t,[`agents`,`tasks`])));function cz(e){let[t,n]=(0,U.useState)(!1);return(0,W.jsx)(Yr,{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),De(e.uuid).finally(()=>n(!1))},children:(0,W.jsx)(V,{icon:ls,className:z(`size-4`,t&&`animate-pulse`)})})})}var lz=oe(`event`,[s({offsite:It(`browser`),event:It(`location`),url:pe(),replaced:O()}),s({offsite:It(`browser`),event:It(`open`),url:pe()}),s({offsite:It(`browser`),event:It(`loading`)})]);function uz(e){let t=Ce({from:`__root__`,select:e=>e.browse??null}),[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(0),[o,s]=(0,U.useState)(0),[l,u]=(0,U.useState)(!1),[d,p]=(0,U.useState)(null),m=(0,U.useRef)(null),h=(0,U.useRef)(null),g=(0,U.useRef)({entries:[],index:-1}),_=k(t=>Ge(t,e.machine).status===`online`);(0,U.useEffect)(()=>{if(t===null||!_)return;let n=`${e.machine} ${i} ${t}`;if(h.current===n)return;let a=!0;return dz(e.machine,t).then(e=>{a&&(h.current=n,g.current={entries:[],index:-1},r({target:t,src:e,error:null}),s(e=>e+1),p(null),u(!0))},e=>{a&&(r({target:t,src:null,error:Ut(e)}),p(null),u(!1))}),()=>{a=!1}},[e.machine,t,i,_]),(0,U.useEffect)(()=>{function a(a){if(a.source===null||a.source!==m.current?.contentWindow)return;let o=lz.safeParse(a.data);if(!o.success)return;if(o.data.event===`loading`){p(null),u(!0);return}if(t===null||n===null)throw Error(`a page reported its location outside the browser`);let s=o.data.url;o.data.event===`open`?L(e.machine,`browser.open`,{url:s,fromPage:!0}).then(t=>{h.current=`${e.machine} ${i} ${s}`,r({target:s,src:`${Me(e.machine)}${t}`,error:null}),u(!0),f({browse:s})},c):(p(fz(g.current,s,o.data.replaced)),s!==t&&(h.current=`${e.machine} ${i} ${s}`,r({...n,target:s}),f({browse:s})))}return window.addEventListener(`message`,a),()=>window.removeEventListener(`message`,a)},[e.machine,i,t,n]);let v=t!==null&&/^https?:\/\//i.test(t),y=t===null?null:n?.src??null,b=!v&&n?.target===t?n.src:null,x=n?.target===t?n.error:null,S=t!==null&&_&&(n?.target!==t||l);function C(e){if(d===null)throw Error(`no page is open to send a browser command to`);m.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:_t,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:()=>C(`back`),children:(0,W.jsx)(V,{icon:Lo,className:`size-4`})}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Forward`,"aria-label":`Forward`,disabled:d?.forward!==!0,onClick:()=>C(`forward`),children:(0,W.jsx)(V,{icon:An,className:`size-4`})}),(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,title:`Reload`,"aria-label":`Reload`,onClick:()=>{d===null?a(i+1):C(`reload`)},children:(0,W.jsx)(V,{icon:di,className:z(`size-4`,S&&`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!==``&&Ot(pz(n))},children:(0,W.jsx)(Vp,{name:`address`,className:`h-7 font-mono text-xs`,placeholder:`URL or file path`,"aria-label":`URL or file path`,defaultValue:t??``})},t),b!==null&&(0,W.jsx)(H,{size:`icon-sm`,variant:`ghost`,asChild:!0,children:(0,W.jsx)(`a`,{href:b,target:`_blank`,rel:`noopener noreferrer`,title:`Open in a new tab`,"aria-label":`Open in a new tab`,children:(0,W.jsx)(V,{icon:ys,className:`size-4`})})})]}),x!==null&&(0,W.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:x}),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.`}),y!==null&&(0,W.jsx)(`iframe`,{ref:m,src:y,sandbox:v?`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 scheme-light`,onLoad:()=>u(!1)},o)]})}async function dz(e,t){if(/^https?:\/\//i.test(t)){let n=await L(e,`browser.open`,{url:t,fromPage:!1});return`${Me(e)}${n}`}let n=await L(e,`files.browse`,void 0);return`${Me(e)}/api/browse/${n}${mz(t)}`}function fz(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 pz(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 mz(e){let t=e.replaceAll(`\\`,`/`).split(`/`).map(encodeURIComponent).join(`/`);return t.startsWith(`/`)?t:`/${t}`}function hz(e){let t=e.stopping;return(0,W.jsx)(hr,{open:t!==null,onOpenChange:t=>{t||e.onClose()},children:t!==null&&(0,W.jsxs)(Qn,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsxs)(Un,{children:[`Stop `,t.title,`?`]}),(0,W.jsx)(zn,{children:`It is still running. Do you really want to stop it?`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:()=>{if(e.sessionId===null)throw Error(`Cannot stop a task without a session`);Pt(e.machine,e.sessionId,t.taskId)},children:`Stop`})]})]})})}function gz(e){return(0,W.jsx)(`button`,{type:`button`,title:e.label,"aria-label":e.label,className:`text-muted-foreground hover:text-destructive focus-visible:ring-ring/70 mr-1.5 grid size-7 shrink-0 cursor-pointer place-items-center rounded-md focus-visible:ring-2 focus-visible:outline-none`,onClick:e.onClick,children:(0,W.jsx)(V,{icon:Ys,className:`size-4`})})}function _z(e){return(0,W.jsx)(H,{size:`xs`,variant:`outline`,className:`shrink-0`,onClick:()=>Pt(e.machine,e.sessionId,e.taskId),children:`Stop`})}function vz(e){let t=k(e=>e.items),n=k(e=>e.earlier),r=k(t=>$e(t.machines,e.machine,e.sessionId)),[i,a]=(0,U.useState)(null),o=[...n,...t],s=KL(o,r),c=s.agents.find(t=>t.item.id===e.selected),l=s.tasks.find(t=>t.item.id===e.selected),u=c===void 0?null:rR(c.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:_t,className:`size-4`})}),c===void 0&&l===void 0&&(0,W.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-xs font-medium`,children:`Tasks`}),(c!==void 0||l!==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:Lo,className:`size-4`})}),c!==void 0&&u!==null&&(0,W.jsxs)(W.Fragment,{children:[c.status===`Running`?(0,W.jsx)(aR,{className:u.tone}):(0,W.jsx)(iR,{className:u.tone}),(0,W.jsx)(`span`,{className:`text-foreground shrink-0 font-medium`,children:u.name}),u.description!==``&&(0,W.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate`,children:u.description}),c.status===`Running`&&c.agentId!==null&&e.sessionId!==null&&(0,W.jsx)(_z,{machine:e.machine,sessionId:e.sessionId,taskId:c.agentId})]}),l!==void 0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{icon:$o,className:`text-muted-foreground size-4 shrink-0`}),(0,W.jsx)(`span`,{className:`text-foreground min-w-0 truncate font-medium`,children:qL(l.item)}),(0,W.jsx)(`span`,{className:z(`text-muted-foreground shrink-0`,l.status===`Failed`&&`text-destructive`,l.status===`Running`&&`text-shimmer`),children:l.status}),l.status===`Running`&&l.taskId!==null&&e.sessionId!==null&&(0,W.jsx)(_z,{machine:e.machine,sessionId:e.sessionId,taskId:l.taskId})]})]})]}),c===void 0&&l===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`}),s.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:[...s.agents.filter(e=>e.status===`Running`),...s.agents.filter(e=>e.status!==`Running`)].map(t=>{let n=rR(t.item),r=t.agentId;return(0,W.jsxs)(`div`,{className:`bg-secondary hover:bg-accent flex items-center rounded-lg`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-label":`Open ${n.name} agent: ${n.description}`,className:`focus-visible:ring-ring/70 flex min-w-0 flex-1 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)(aR,{className:n.tone}):(0,W.jsx)(iR,{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:z(`text-muted-foreground shrink-0 text-xs`,t.status===`Failed`&&`text-destructive`,t.status===`Running`&&`text-shimmer`),children:t.status})]}),t.status===`Running`&&r!==null&&e.sessionId!==null&&(0,W.jsx)(gz,{label:`Stop ${n.name} agent`,onClick:()=>a({taskId:r,title:`${n.name} agent`})})]},t.item.id)})}),(0,W.jsx)(`h2`,{className:`text-muted-foreground px-1 pt-5 pb-1.5 text-xs font-medium`,children:`Tasks`}),s.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:[...s.tasks.filter(e=>e.status===`Running`),...s.tasks.filter(e=>e.status!==`Running`)].map(t=>{let n=t.taskId;return(0,W.jsxs)(`div`,{className:`bg-secondary hover:bg-accent flex items-center rounded-lg`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-label":`Open task: ${qL(t.item)}`,className:`focus-visible:ring-ring/70 flex min-w-0 flex-1 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:$o,className:z(`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:qL(t.item)}),(0,W.jsx)(`span`,{className:z(`text-muted-foreground shrink-0 text-xs`,t.status===`Failed`&&`text-destructive`,t.status===`Running`&&`text-shimmer`),children:t.status})]}),t.status===`Running`&&n!==null&&e.sessionId!==null&&(0,W.jsx)(gz,{label:`Stop task: ${qL(t.item)}`,onClick:()=>a({taskId:n,title:qL(t.item)})})]},t.item.id)})})]}),c!==void 0&&(0,W.jsx)(bz,{item:c.item,agentId:c.agentId,running:c.status===`Running`,items:o,found:s,cwd:e.cwd,onSelect:e.onSelect},c.item.id),l!==void 0&&e.sessionId!==null&&(0,W.jsx)(yz,{machine:e.machine,sessionId:e.sessionId,command:l.item.command,path:l.path,events:l.events,running:l.status===`Running`},l.item.id),(0,W.jsx)(hz,{machine:e.machine,sessionId:e.sessionId,stopping:i,onClose:()=>a(null)})]})}function yz(e){let[t,n]=(0,U.useState)(void 0),[r,i]=(0,U.useState)(null),a=(0,U.useRef)(null),o=(0,U.useRef)(!0);(0,U.useEffect)(()=>{let t=e.path;if(t===null)return;let r=!0;async function a(t){try{let a=await L(e.machine,`tasks.output`,{sessionId:e.sessionId,path:t});if(!r)return;n(a),i(null)}catch(e){r&&i(Ut(e))}}a(t);let o=e.running?window.setInterval(()=>void a(t),2e3):null;return()=>{r=!1,o!==null&&window.clearInterval(o)}},[e.machine,e.sessionId,e.path,e.running]),(0,U.useLayoutEffect)(()=>{let e=a.current;e!==null&&o.current&&(e.scrollTop=e.scrollHeight)},[t,e.events]);let s=e.path===null?e.events.join(`
|
|
24
|
-
`):t?.text??``;return(0,W.jsxs)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain p-3`,onScroll:e=>{let t=e.currentTarget;o.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]}),r!==null&&(0,W.jsx)(`p`,{className:`text-destructive text-xs`,children:r}),r===null&&e.path!==null&&t===void 0&&(0,W.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Loading…`}),r===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.`}),s!==``&&(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:s})]})}function bz(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&&Ne(e.item.id,e.agentId)},[s,e.item.id,e.agentId]);let c=o.at(0),l=c?.kind===`user`?c:null,u=xR({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)(QL,{title:`Prompt`,pending:!1,grouped:!0,open:r.includes(`prompt`),onToggle:()=>a(`prompt`),children:(0,W.jsx)(ar,{text:l.text,className:`text-muted-foreground text-[13px]`})}),u.map((t,n)=>{let i=u[n-1];return(0,W.jsx)(`div`,{className:z(i===void 0?`pt-2`:t.kind===`working`?void 0:bR(t)&&bR(i)?`pt-2`:`pt-4`,t.kind===`assistant`&&`group/assistant`),children:(0,W.jsx)(sz,{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 xz=(0,U.lazy)(async()=>({default:(await pi(async()=>{let{DiffPanel:e}=await import(`./diff-panel-CSL-MBoH.js`);return{DiffPanel:e}},__vite__mapDeps([9,2,10,3,11,12,6,5,13,14,15,16,17,18,19,20,21]))).DiffPanel})),Sz=`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 Cz(e){let t=Dz(e),n=k(e=>e.prefs),r=k(e=>e.editor===null);return Sr(()=>se({machine:e.selection.machine,projectId:e.selection.projectId}),r),(0,W.jsxs)(dr,{children:[(0,W.jsx)(Xn,{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:Sz,"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)(nr,{className:`w-44`,children:t.map(e=>(0,W.jsxs)(vr,{checked:n.toolbar.includes(e.id),onCheckedChange:t=>Ye({...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 wz(e){let t=e.session,n=k(e=>e.prefs.toolbar),r=Dz(e).filter(t=>e.mobile||!n.includes(t.id)),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(!1);return(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,W.jsxs)(hn,{open:e.open,onOpenChange:e.onOpenChange,children:[(0,W.jsx)(gn,{asChild:!0,children:(0,W.jsxs)(`button`,{className:z(Sz,`data-[state=open]:bg-accent`),"aria-label":`More`,title:`More`,children:[(0,W.jsx)(V,{icon:Tr}),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)(Nr,{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.jsx)(Tz,{session:t,mobile:e.mobile,onWarn:()=>s(!0),onRename:()=>a(t.title)})]})]}),t!==void 0&&i!==null&&(0,W.jsx)(ai,{open:!0,onOpenChange:e=>{e||a(null)},children:(0,W.jsx)(Qr,{children:(0,W.jsxs)(`form`,{className:`grid gap-4`,onSubmit:e=>{e.preventDefault();let n=i.trim();a(null),n!==``&&n!==t.title&&Je(t.machine,t.id,{title:n})},children:[(0,W.jsx)($r,{children:(0,W.jsx)(ni,{children:`Rename thread`})}),(0,W.jsx)(Vp,{"aria-label":`Title`,value:i,onChange:e=>a(e.target.value)}),(0,W.jsxs)(oi,{children:[(0,W.jsx)(H,{type:`button`,variant:`outline`,onClick:()=>a(null),children:`Cancel`}),(0,W.jsx)(H,{type:`submit`,children:`Rename`})]})]})})}),(0,W.jsx)(hr,{open:o,onOpenChange:s,children:(0,W.jsx)(Qn,{children:(0,W.jsx)(Ez,{session:t})})})]})}function Tz(e){let t=e.session,n=zr(`sidebarScope`),r=k(e=>{let n=$e(e.machines,t.machine,t.id);return n?.running===!0||Object.values(n?.tasks??{}).includes(`running`)});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Fn,{}),(0,W.jsx)(xA,{session:t,context:!1,mobile:e.mobile,onDeactivate:()=>{r?e.onWarn():pt(t.machine,t.id,n)},onRename:e.onRename})]})}function Ez(e){let t=zr(`sidebarScope`);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(jr,{children:[(0,W.jsx)(Un,{children:`Stop running work?`}),(0,W.jsx)(zn,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,W.jsxs)(Er,{children:[(0,W.jsx)(er,{children:`Cancel`}),(0,W.jsx)(lr,{variant:`destructive`,onClick:()=>{if(e.session===void 0)throw Error(`session is missing`);pt(e.session.machine,e.session.id,t)},children:`Stop and Mark Done`})]})]})}function Dz(e){let t=(0,U.useSyncExternalStore)(PF,()=>FF().alerts.length>0),n=(0,U.useSyncExternalStore)(PF,()=>FF().layout.tabs.filter(t=>t.projectId===e.selection.projectId).length),r=k(e=>{if(e.selection?.sessionId===null)return 0;let t=KL([...e.earlier,...e.items],Ct(e));return[...t.agents,...t.tasks].filter(e=>e.status===`Running`).length});return[{id:`diff`,label:`Diff`,title:`Diff`,icon:cs,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 (${Ht}+\`)`,icon:Js,pressed:e.terminal,attention:t,badge:n>0&&(0,W.jsx)(`span`,{className:z(`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:z(`text-xs tabular-nums`,t?`text-primary`:`text-muted-foreground`),children:n}),onSelect:()=>e.onTerminal(!e.terminal)},{id:`tasks`,label:`Tasks`,title:`Tasks`,icon:Zs,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:Vo,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:rc,pressed:!1,attention:!1,badge:null,detail:null,onSelect:()=>se({machine:e.selection.machine,projectId:e.selection.projectId})}]}function Oz(e){let t=k(t=>He(t,e.selection.machine,e.selection.projectId)?.path??``);return(0,W.jsxs)(W.Fragment,{children:[e.panel===`browser`&&(0,W.jsx)(uz,{machine:e.selection.machine,onClose:()=>e.onPanel(null)}),e.panel===`diff`&&(0,W.jsx)(U.Suspense,{children:(0,W.jsx)(xz,{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)(vz,{machine:e.selection.machine,cwd:t,sessionId:e.selection.sessionId,selected:e.selectedTask,onSelect:e.onSelectTask,onClose:()=>e.onPanel(null)})]})}function kz(){let e=k(e=>e.selection),t=k(e=>e.machines.length>0),n=ne();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)(UL,{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)(rk,{})}):(0,W.jsx)(Az,{selection:e}):(0,W.jsx)(SL,{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:()=>le(`chat`,()=>void yt.navigate({to:`/`,search:{},replace:!0})),children:(0,W.jsx)(V,{icon:Lo})})})}function Az(e){let t=k(t=>Ge(t,e.selection.machine)),n=k(t=>t.sessions.find(t=>t.machine===e.selection.machine&&t.id===e.selection.sessionId)),r=k(e=>n!==void 0&&e.generatingTitles.includes(P(n.machine,n.id))),i=ac(e.selection.machine,e.selection.projectId),a=k(Mt),o=k(t=>e.selection.projectId===`no-project`||He(t,e.selection.machine,e.selection.projectId)?.scratch===!0),s=rm(e.selection.machine,t.status===`online`&&!o?e.selection.projectId:null,a),c=im({machine:e.selection.machine,projectId:e.selection.projectId,repos:s.repos,onRefresh:s.refresh}),l=(0,U.useSyncExternalStore)(PF,()=>FF().open),u=Ce({from:`__root__`,select:e=>e.panel??null}),[d,p]=(0,U.useState)(null),m=s.repos.some(e=>e.changed>0),h=!o&&(u!==null||l),g=(0,U.useCallback)(e=>{h?f(e):fe(e,`overlay`)},[h]),_=(0,U.useCallback)(e=>{p(null),e===null?jz():g({panel:e,bottom:void 0})},[g]),v=(0,U.useCallback)(e=>{_(`tasks`),p(e)},[_]);function y(e){e?(WF(),g({panel:void 0,bottom:`terminal`})):jz()}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:()=>le(`chat`,it),children:(0,W.jsx)(V,{icon:Lo,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:z((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)(wf,{icon:t.icon,className:`size-3.5 shrink-0`}),(0,W.jsxs)(`span`,{className:`truncate`,children:[t.name,` / `,i]})]}),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)(Ep,{}),!o&&(0,W.jsx)(wz,{selection:e.selection,mobile:!0,session:n,panel:u,terminal:l,changed:m,open:c.menuOpen,onOpenChange:c.setMenuOpen,onPanel:_,onTerminal:y,children:s.repos.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Fn,{}),(0,W.jsx)(am,{git:c,collapsed:!0})]})}),(0,W.jsx)(om,{git:c})]}),(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)(az,{onOpenTask:v}),(0,W.jsx)(xp,{})]},`${e.selection.machine} ${e.selection.sessionId??e.selection.projectId}`)}),(0,W.jsx)(ii,{open:h,onOpenChange:()=>_(null),children:(0,W.jsx)(ci,{children:(0,W.jsxs)(ei,{"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)(ui,{className:`sr-only`,children:[u===`diff`&&`Diff`,u===`tasks`&&`Tasks`,u===`browser`&&`Browser`,u===null&&`Terminal`]}),(0,W.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[u!==null&&(0,W.jsx)(Oz,{panel:u,selection:e.selection,running:a,selectedTask:d,onSelectTask:p,onPanel:_}),u===null&&l&&(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:_t,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)(gL,{view:e.selection.projectId})})]})]})]})})})]})}function jz(){le(`overlay`,()=>f({panel:void 0,bottom:void 0}))}var Mz=(0,U.lazy)(async()=>({default:(await pi(async()=>{let{EditorDialog:e}=await import(`./editor-dialog-BZY0-avL.js`);return{EditorDialog:e}},__vite__mapDeps([22,2,23,3,6,4,5,24,11,8,1,15,16,25,12,13,14,17,18,19,20,21,26,27,28,29,30]))).EditorDialog})),Nz=window.matchMedia(`(min-width: 768px)`),Pz=800,Fz=[`mod+k`,`mod+shift+p`];function Iz(e){return Nz.addEventListener(`change`,e),()=>Nz.removeEventListener(`change`,e)}function Lz(){let e=(0,U.useSyncExternalStore)(Iz,()=>Nz.matches),t=k(e=>e.editor),n=k(e=>e.exporting);return Xa(),yr(Fz,()=>ue(!R().paletteOpen),{enableOnFormTags:!0,preventDefault:!0}),(0,W.jsxs)(`div`,{className:`flex h-dvh text-sm`,children:[e?(0,W.jsx)(zz,{}):(0,W.jsx)(kz,{}),(0,W.jsx)(mA,{}),e?(0,W.jsx)(YO,{}):(0,W.jsx)(tk,{}),t!==null&&(0,W.jsx)(U.Suspense,{children:(0,W.jsx)(Mz,{machine:t.machine,projectId:t.projectId,onClose:()=>se(null)})}),n!==null&&(0,W.jsx)(sk,{session:n}),(0,W.jsx)(Bp,{}),(0,W.jsx)(rd,{position:e?`bottom-right`:`top-center`,swipeDirections:e?[`right`,`bottom`]:[`left`,`right`,`top`]})]})}function Rz(e){f({panel:e??void 0})}function zz(){let e=k(e=>e.selection),t=k(e=>e.sessions),n=ne(),r=k(e=>e.selection===null?``:He(e,e.selection.machine,e.selection.projectId)?.path??``),i=k(e=>{let t=Pe(e);return t===null?null:Ge(e,t)}),[a,o]=(0,U.useState)(!0),s=(0,U.useRef)(null),[c,l]=(0,U.useState)(!1),u=Ce({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),Rz(`tasks`)},[]),[h,g]=Rr(`panelWidth`,540),[_,v]=(0,U.useState)(280),y=(0,U.useSyncExternalStore)(PF,()=>FF().open),b=k(Mt),x=k(e=>e.selection?.projectId===`no-project`||e.selection!==null&&He(e,e.selection.machine,e.selection.projectId)?.scratch===!0),S=rm(e?.machine??``,i?.status===`online`&&!x?e?.projectId??null:null,b),C=im({machine:e?.machine??``,projectId:e?.projectId??``,repos:S.repos,onRefresh:S.refresh}),w=t.find(t=>t.machine===e?.machine&&t.id===e.sessionId),T=k(e=>w!==void 0&&e.generatingTitles.includes(P(w.machine,w.id))),E=ac(e?.machine??``,e?.projectId??``);return yr([`meta+backquote`,`ctrl+backquote`],e=>{e.stopPropagation(),UF(!FF().open)},{enableOnFormTags:!0,preventDefault:!0,eventListenerOptions:{capture:!0}}),yr([`mod+j`,`mod+shift+b`],e=>{e.stopPropagation(),Rz(jt().panel===void 0?d.current:null)},{enableOnFormTags:!0,preventDefault:!0,eventListenerOptions:{capture:!0}}),(0,U.useEffect)(()=>{u!==null&&(d.current=u)},[u]),yr([`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<Pz));return t.observe(e),()=>t.disconnect()},[n]),n===null?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(UL,{className:z(`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 (${Ht}+B)`,onClick:()=>o(!0),children:(0,W.jsx)(V,{icon:cr})})}),(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:z(`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)(wf,{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)(dc,{machine:e.machine,projectId:e.projectId,className:`size-3.5`}),(0,W.jsx)(`span`,{className:`max-w-40 truncate`,children:E})]}),(0,W.jsx)(`li`,{"aria-hidden":!0,className:`text-icon-muted shrink-0`,children:`/`}),(0,W.jsxs)(`li`,{className:z(`text-foreground flex min-w-10 items-center gap-2 font-medium`,a&&`flex-1`),children:[(0,W.jsx)(`span`,{className:z(`truncate`,(T||e.sessionId!==null&&w===void 0)&&`text-shimmer`),children:w?.title??`New thread`}),(0,W.jsx)(Ep,{})]}),!a&&(0,W.jsx)(`li`,{className:`shrink-0`,children:(0,W.jsx)(MI,{hideDone:!0})})]})}),e===null&&!a&&(0,W.jsx)(MI,{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&&!x&&(0,W.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[!c&&S.repos.length>0&&(0,W.jsx)(sm,{machine:e.machine,projectId:e.projectId,repos:S.repos,onRefresh:S.refresh}),!c&&S.repos.length>0&&(0,W.jsx)(`span`,{className:`bg-foreground/15 mr-1 ml-2.5 h-4 w-px`}),(0,W.jsx)(Cz,{selection:e,panel:u,terminal:y,changed:S.repos.some(e=>e.changed>0),onPanel:e=>{p(null),Rz(e)},onTerminal:UF,children:(0,W.jsx)(wz,{selection:e,mobile:!1,session:w,panel:u,terminal:y,changed:S.repos.some(e=>e.changed>0),open:C.menuOpen,onOpenChange:C.setMenuOpen,onPanel:e=>{p(null),Rz(e)},onTerminal:UF,children:c&&S.repos.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Fn,{}),(0,W.jsx)(am,{git:C,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)(rk,{}),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)(az,{onOpenTask:m}),(0,W.jsx)(xp,{})]},`${e.machine} ${e.sessionId??e.projectId}`)]}),e!==null&&y&&!x&&(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=>Vt(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)(gL,{view:e.projectId})]})]}),e!==null&&u!==null&&!x&&(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=>Vt(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)(Oz,{panel:u,selection:e,running:b,selectedTask:f,onSelectTask:p,onPanel:Rz})})]})]})]}),(0,W.jsx)(om,{git:C})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(UL,{className:z(`relative`,!a&&`hidden`),mobile:!1,onHide:()=>o(!1)}),(0,W.jsx)(SL,{machine:n,mobile:!1,leading:!a&&(0,W.jsx)(H,{variant:`ghost`,size:`icon-xs`,"aria-label":`Show sidebar`,title:`Show sidebar (${Ht}+B)`,onClick:()=>o(!0),children:(0,W.jsx)(V,{icon:cr})})})]})}var Bz=Fe.withTag(`app`),Vz=class extends U.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){Bz.error(`a component crashed:`,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`})]})}},Hz=[`typescript`,`tsx`,`javascript`],Uz=`import { readFile } from 'node:fs/promises'
|
|
25
|
-
import type { Config } from './config'
|
|
26
|
-
|
|
27
|
-
export interface Entry<T> {
|
|
28
|
-
readonly id: string
|
|
29
|
-
value?: T | null
|
|
30
|
-
tags: Array<string>
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
type Status = 'idle' | 'running' | \`done-\${number}\`
|
|
34
|
-
|
|
35
|
-
enum Mode { Fast = 1, Slow }
|
|
36
|
-
|
|
37
|
-
export class Store<T extends object> extends Base implements Disposable {
|
|
38
|
-
#items = new Map<string, Entry<T>>()
|
|
39
|
-
private static count = 0
|
|
40
|
-
constructor(private readonly config: Config) {
|
|
41
|
-
super()
|
|
42
|
-
}
|
|
43
|
-
async load(path: string): Promise<T[]> {
|
|
44
|
-
const text = await readFile(path, 'utf8')
|
|
45
|
-
const data = JSON.parse(text) as T[]
|
|
46
|
-
for (const [index, item] of data.entries()) {
|
|
47
|
-
if (index % 2 === 0 && item !== undefined) continue
|
|
48
|
-
}
|
|
49
|
-
return data.filter((item) => item != null).map(({ ...rest }) => rest)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function List(props: { items: string[] }) {
|
|
54
|
-
const [open, setOpen] = useState(false)
|
|
55
|
-
return (
|
|
56
|
-
<ul className="list" onClick={() => setOpen(!open)}>
|
|
57
|
-
{props.items.map((item) => <li key={item}>{item}</li>)}
|
|
58
|
-
</ul>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default function run(...args: number[]): void {
|
|
63
|
-
const pattern = /^[a-z]+\\d*$/gi
|
|
64
|
-
let total = 0n
|
|
65
|
-
try {
|
|
66
|
-
total += BigInt(args.length ?? 0)
|
|
67
|
-
} catch (error: unknown) {
|
|
68
|
-
console.error(\`failed: \${String(error)}\`, pattern.test('x'))
|
|
69
|
-
} finally {
|
|
70
|
-
// done
|
|
71
|
-
}
|
|
72
|
-
}`;async function Wz(){await Gz();let e=await pi(()=>import(`./dist-DUf7iKTq.js`),__vite__mapDeps([31,13,14,15,16,2,17,18,19,20,21]));for(let t of Hz){await Gz();let n=te().codeTheme;(await e.getSharedHighlighter({themes:[n],langs:[t],preferredHighlighter:`shiki-wasm`})).codeToTokens(Uz,{lang:t,themes:{dark:n},defaultColor:!1})}}function Gz(){return new Promise(e=>{`requestIdleCallback`in window?requestIdleCallback(()=>e()):setTimeout(e,1e3)})}var Kz=Fe.withTag(`app`);Be();var qz=document.getElementById(`root`);if(!qz)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`&&Ie({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=>Kz.error(`could not register the service worker`,e))}addEventListener(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`w`&&e.preventDefault()},{capture:!0}),await ye(),xt(),ht({open:e=>{Ha(e).catch(e=>Kz.error(`could not refresh the push subscription`,e))}}),_o(),kF(),yt.routeTree.update({component:Lz}),(0,Ui.createRoot)(qz).render((0,W.jsx)(U.StrictMode,{children:(0,W.jsx)(Vz,{children:(0,W.jsx)(Li,{router:yt})})})),Wz().catch(e=>Kz.error(`could not prepare code highlighting`,e));
|