nextclaw 0.25.1 → 0.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +16 -16
- package/ui-dist/assets/{api-kGIZo6kv.js → api-D0U10BcF.js} +3 -3
- package/ui-dist/assets/{app-presenter-provider-Ct0DePOC.js → app-presenter-provider-Dffdm_Ek.js} +3 -3
- package/ui-dist/assets/{appearance-settings-page-CcA8Kewq.js → appearance-settings-page-sfusZc2d.js} +1 -1
- package/ui-dist/assets/{book-open-D4LvR1N9.js → book-open-w3160PZf.js} +1 -1
- package/ui-dist/assets/{channels-list-page-CybW_0nu.js → channels-list-page-Dkfe87Zq.js} +1 -1
- package/ui-dist/assets/{chat-page-Bs8c1adx.js → chat-page-CeapbQnG.js} +1 -1
- package/ui-dist/assets/{config-split-page-BvhZDJGS.js → config-split-page-CnQI8cKT.js} +1 -1
- package/ui-dist/assets/{confirm-dialog-Ucx_SQm4.js → confirm-dialog-RZUWA_j9.js} +1 -1
- package/ui-dist/assets/desktop-update-config-CbSYQMYz.js +1 -0
- package/ui-dist/assets/{dist-CCwmPmQ3.js → dist-DEJlYi0E.js} +1 -1
- package/ui-dist/assets/{doc-browser-N9UwkWvd.js → doc-browser-DwXHr-mm.js} +1 -1
- package/ui-dist/assets/{doc-browser-context-CIIKT2sE.js → doc-browser-context-CpvHiuQG.js} +1 -1
- package/ui-dist/assets/doc-browser-jVTq8iY_2.js +1 -0
- package/ui-dist/assets/{download-CSAHAjF9.js → download-BP7ZxrwI.js} +1 -1
- package/ui-dist/assets/{external-link-Dno-cJJr.js → external-link-DvHCEe3h.js} +1 -1
- package/ui-dist/assets/{eye-BZkraQUn.js → eye-C--6dxv_.js} +1 -1
- package/ui-dist/assets/{folder-Bro2sQD3.js → folder-BfeO1zCY.js} +1 -1
- package/ui-dist/assets/{form-actions-CC31CR28.js → form-actions-5OsDRt0g.js} +1 -1
- package/ui-dist/assets/{index-EO5Gsaff.js → index-DoZR11Nh.js} +2 -2
- package/ui-dist/assets/loader-circle-BWdgwVnn.js +1 -0
- package/ui-dist/assets/{logo-badge-B___Witw.js → logo-badge-TdPa95AC.js} +1 -1
- package/ui-dist/assets/mcp-marketplace-page-XnRWiC8c.js +1 -0
- package/ui-dist/assets/{mcp-marketplace-page-Ccy-UG8R.js → mcp-marketplace-page-cm3ifaKu.js} +1 -1
- package/ui-dist/assets/{model-config-page-BsMxhVaO.js → model-config-page-CXnqSbSI.js} +1 -1
- package/ui-dist/assets/plus-BeApS21t.js +1 -0
- package/ui-dist/assets/{popover-CAy9XSdY.js → popover-EulxhA0q.js} +1 -1
- package/ui-dist/assets/{provider-scoped-model-input-Cqo78Dx_.js → provider-scoped-model-input-ll_Btc9h.js} +1 -1
- package/ui-dist/assets/{providers-config-page-CZSc-ruy.js → providers-config-page-Bcuhqkdl.js} +1 -1
- package/ui-dist/assets/react-Bb0EYsLS.js +8 -0
- package/ui-dist/assets/{refresh-cw-w9L_vlM-.js → refresh-cw-CexL11m1.js} +1 -1
- package/ui-dist/assets/remote-CqKpuOP9.js +1 -0
- package/ui-dist/assets/rotate-cw-DHXoiqFB.js +1 -0
- package/ui-dist/assets/{runtime-config-page-DM63Nkxm.js → runtime-config-page-D-Aqxizs.js} +1 -1
- package/ui-dist/assets/{save-DdL5VkJS.js → save-DtccrZld.js} +1 -1
- package/ui-dist/assets/{search-DydusQAS.js → search-BArc_WOX.js} +1 -1
- package/ui-dist/assets/{search-config-page-CfwWop50.js → search-config-page-XTKf5rc0.js} +1 -1
- package/ui-dist/assets/{secrets-config-page-BPIZUwLW.js → secrets-config-page-Cx-qptcj.js} +1 -1
- package/ui-dist/assets/security-config-DWGFM2u9.js +1 -0
- package/ui-dist/assets/{select-BEtjsC3L.js → select-C9FB0jlt.js} +1 -1
- package/ui-dist/assets/{setting-row-CTA16hhx.js → setting-row-DFvioO2a.js} +1 -1
- package/ui-dist/assets/{settings-2-D6BrZlD5.js → settings-2-RMWqf-ey.js} +1 -1
- package/ui-dist/assets/{skeleton-DcJKUZCH.js → skeleton-DQ5WhuDG.js} +1 -1
- package/ui-dist/assets/{tabs-CrPVCYHg.js → tabs-D_mjyOOf.js} +1 -1
- package/ui-dist/assets/{tag-chip-Bvm-V7SR.js → tag-chip-C011rd9q.js} +1 -1
- package/ui-dist/assets/{trash-2-5ABWNTB-.js → trash-2-bDhfsO1O.js} +1 -1
- package/ui-dist/assets/{use-config-DJaZYyZC.js → use-config-BNrlfEck.js} +1 -1
- package/ui-dist/assets/{use-confirm-dialog-QUWL1EuB.js → use-confirm-dialog-CTNA1PC0.js} +1 -1
- package/ui-dist/assets/{use-viewport-layout-BWYz8zwd.js → use-viewport-layout-P0q6Nt_N.js} +1 -1
- package/ui-dist/assets/x-qvh05iyu.js +1 -0
- package/ui-dist/index.html +28 -28
- package/ui-dist/assets/desktop-update-config-Ch9m1GRB.js +0 -1
- package/ui-dist/assets/doc-browser-Cr7330LU2.js +0 -1
- package/ui-dist/assets/loader-circle-DyToFBCM.js +0 -1
- package/ui-dist/assets/mcp-marketplace-page-3Q-VOIJ3.js +0 -1
- package/ui-dist/assets/plus-wynE6QCr.js +0 -1
- package/ui-dist/assets/react-UuyIZ_Oi.js +0 -8
- package/ui-dist/assets/remote-D4rv7kb-.js +0 -1
- package/ui-dist/assets/rotate-cw-C0VFtLju.js +0 -1
- package/ui-dist/assets/security-config-CeBjHoFL.js +0 -1
- package/ui-dist/assets/x-gM1Q7cRX.js +0 -1
package/ui-dist/assets/{app-presenter-provider-Ct0DePOC.js → app-presenter-provider-Dffdm_Ek.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-CXwWRh5i.js","assets/preload-helper-D4M6sveU.js","assets/chunk-HOUHSVGY-BMPwFEwN.js","assets/src-Dad2ZbCt.js","assets/chunk-DseTPa7n.js","assets/chunk-Y2CYZVJY-BGrd8tLy.js","assets/chunk-WYO6CB5R-Do6SJrnY.js","assets/chunk-ICXQ74PX-DH8NJMok.js","assets/dist-dw-gAfM_.js","assets/chunk-Q4XR5HBZ-uvIGstBS.js","assets/chunk-52WLFC77-BLeB7iGk.js","assets/line-B78frP_c.js","assets/path-DzBnMI1r.js","assets/array-BqYdCIE6.js","assets/chunk-7BUUIJ7U-JiyRtrGu.js","assets/chunk-C7G6YPKG-AsyDSQ9j.js","assets/chunk-OGEWGWER-TIcEoPPH.js","assets/chunk-ZGVPDNZ5-B7kWWaXv.js","assets/rough.esm-wJ1d3nQl.js","assets/chunk-FWX5IMBZ-DFelpZBy.js","assets/chunk-VAUOI2AC-Dpcz6BhT.js","assets/chunk-ZIRB5QZD-DTU0cDNh.js","assets/docx-preview-zis3U0Fa.js","assets/jszip.min-CP5uPNQa.js","assets/aiden0z-pptx-renderer.es-D87ywFdC.js","assets/doc-browser-
|
|
2
|
-
import{i as e,n as t,t as n}from"./chunk-DseTPa7n.js";import{a as r,d as i,f as a,h as o,i as s,m as c,n as l,o as u,p as d,r as f,t as p,u as m}from"./react-UuyIZ_Oi.js";import{t as h}from"./preload-helper-D4M6sveU.js";import{$t as g,Bt as _,C as v,Ct as y,D as b,Dt as x,E as S,Gt as C,Ht as w,It as T,J as E,Jt as D,Kt as O,Lt as k,Mt as A,Ot as ee,Pt as j,Qt as M,Rt as N,S as te,St as ne,T as re,Ut as ie,V as ae,Vt as oe,W as se,Xt as ce,Y as le,Yt as ue,Zt as de,_ as fe,_n as pe,_t as me,a as he,an as ge,b as _e,c as ve,d as ye,en as be,et as xe,f as Se,g as Ce,gt as we,h as Te,ht as Ee,i as De,in as P,jt as Oe,kt as ke,l as Ae,mt as je,n as Me,nn as Ne,o as Pe,on as Fe,p as Ie,pt as Le,qt as Re,r as ze,s as Be,t as Ve,tn as He,tt as Ue,u as We,v as Ge,w as Ke,x as qe,xt as Je,y as Ye,zt as Xe}from"./api-kGIZo6kv.js";import{c as F}from"./dist-CCwmPmQ3.js";import{a as Ze,c as Qe,i as $e,l as et,o as tt,r as nt,s as rt,t as it,u as at}from"./popover-CAy9XSdY.js";import{a as ot,i as st,n as ct,o as lt,r as ut,s as dt,t as ft}from"./confirm-dialog-Ucx_SQm4.js";import{n as pt,t as mt}from"./search-DydusQAS.js";import{_ as ht,a as gt,c as _t,d as vt,f as yt,g as bt,h as xt,i as St,l as Ct,m as wt,n as Tt,o as Et,p as Dt,r as Ot,s as kt,u as At,v as jt}from"./doc-browser-N9UwkWvd.js";import{t as Mt}from"./book-open-D4LvR1N9.js";import{C as Nt,S as Pt,_ as Ft,a as It,b as Lt,c as Rt,d as zt,f as Bt,g as Vt,h as Ht,i as Ut,l as Wt,m as Gt,n as Kt,o as qt,p as Jt,r as Yt,s as Xt,t as Zt,u as Qt,v as $t,w as en,x as tn,y as nn}from"./select-BEtjsC3L.js";import{a as rn,o as an,r as on,s as sn,t as cn}from"./use-confirm-dialog-QUWL1EuB.js";import{t as ln}from"./download-CSAHAjF9.js";import{t as un}from"./external-link-Dno-cJJr.js";import{t as dn}from"./eye-BZkraQUn.js";import{t as fn}from"./folder-Bro2sQD3.js";import{a as pn,c as mn,i as hn,o as gn,r as _n,s as vn,t as yn}from"./tabs-CrPVCYHg.js";import{i as bn,n as xn,r as Sn,t as Cn}from"./use-viewport-layout-BWYz8zwd.js";import{t as wn}from"./loader-circle-DyToFBCM.js";import{t as Tn}from"./plus-wynE6QCr.js";import{t as En}from"./refresh-cw-w9L_vlM-.js";import{n as Dn,t as On}from"./skeleton-DcJKUZCH.js";import{t as kn}from"./trash-2-5ABWNTB-.js";import{t as An}from"./x-gM1Q7cRX.js";import{n as jn,t as Mn}from"./logo-badge-B___Witw.js";import{t as Nn}from"./host-capabilities-CFbAfrrA.js";import{n as Pn,t as Fn}from"./middleware-CAXxl-af.js";import{a as In,c as Ln,d as Rn,g as zn,h as Bn,i as Vn,l as Hn,m as Un,n as Wn,o as Gn,p as Kn,r as qn,s as Jn}from"./doc-browser-context-CIIKT2sE.js";import{c as Yn,n as Xn,r as Zn}from"./provider-models-BoUhFo9R.js";var I=e(o(),1),Qn=`popstate`;function $n(e={}){let{initialEntries:t=[`/`],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((e,t)=>u(e,typeof e==`string`?null:e.state,t===0?`default`:void 0));let a=c(n??i.length-1),o=`POP`,s=null;function c(e){return Math.min(Math.max(e,0),i.length-1)}function l(){return i[a]}function u(e,t=null,n){let r=ar(i?l().pathname:`/`,e,t,n);return nr(r.pathname.charAt(0)===`/`,`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),r}function d(e){return typeof e==`string`?e:or(e)}return{get index(){return a},get action(){return o},get location(){return l()},createHref:d,createURL(e){return new URL(d(e),`http://localhost`)},encodeLocation(e){let t=typeof e==`string`?sr(e):e;return{pathname:t.pathname||``,search:t.search||``,hash:t.hash||``}},push(e,t){o=`PUSH`;let n=u(e,t);a+=1,i.splice(a,i.length,n),r&&s&&s({action:o,location:n,delta:1})},replace(e,t){o=`REPLACE`;let n=u(e,t);i[a]=n,r&&s&&s({action:o,location:n,delta:0})},go(e){o=`POP`;let t=c(a+e),n=i[t];a=t,s&&s({action:o,location:n,delta:e})},listen(e){return s=e,()=>{s=null}}}}function er(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return ar(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:or(t)}return cr(t,n,null,e)}function tr(e,t){if(e===!1||e==null)throw Error(t)}function nr(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function rr(){return Math.random().toString(36).substring(2,10)}function ir(e,t){return{usr:e.state,key:e.key,idx:t}}function ar(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?sr(t):t,state:n,key:t&&t.key||r||rr()}}function or({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function sr(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function cr(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=ar(h.location,e,t);n&&n(r,e),l=u()+1;let d=ir(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=ar(h.location,e,t);n&&n(r,e),l=u();let i=ir(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return lr(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Qn,d),c=e,()=>{i.removeEventListener(Qn,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function lr(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),tr(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:or(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function ur(e,t,n=`/`){return dr(e,t,n,!1)}function dr(e,t,n,r){let i=kr((typeof t==`string`?sr(t):t).pathname||`/`,n);if(i==null)return null;let a=pr(e);hr(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Or(i);o=Tr(a[e],t,r)}return o}function fr(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function pr(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;tr(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Lr([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(tr(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),pr(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Cr(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of mr(e.path))a(e,t,!0,n)}),t}function mr(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=mr(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function hr(e){e.sort((e,t)=>e.score===t.score?wr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var gr=/^:[\w-]+$/,_r=3,vr=2,yr=1,br=10,xr=-2,Sr=e=>e===`*`;function Cr(e,t){let n=e.split(`/`),r=n.length;return n.some(Sr)&&(r+=xr),t&&(r+=vr),n.filter(e=>!Sr(e)).reduce((e,t)=>e+(gr.test(t)?_r:t===``?yr:br),r)}function wr(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Tr(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=Er({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Er({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Lr([a,u.pathname]),pathnameBase:Rr(Lr([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Lr([a,u.pathnameBase]))}return o}function Er(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Dr(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Dr(e,t=!1,n=!0){nr(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Or(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return nr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function kr(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var Ar=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function jr(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?sr(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?Mr(n.substring(1),`/`):Mr(n,t)):a=t,{pathname:a,search:zr(r),hash:Br(i)}}function Mr(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Nr(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pr(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Fr(e){let t=Pr(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ir(e,t,n,r=!1){let i;typeof e==`string`?i=sr(e):(i={...e},tr(!i.pathname||!i.pathname.includes(`?`),Nr(`?`,`pathname`,`search`,i)),tr(!i.pathname||!i.pathname.includes(`#`),Nr(`#`,`pathname`,`hash`,i)),tr(!i.search||!i.search.includes(`#`),Nr(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=jr(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Lr=e=>e.join(`/`).replace(/\/\/+/g,`/`),Rr=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),zr=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Br=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Vr=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Hr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ur(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Wr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Gr(e,t){let n=e;if(typeof n!=`string`||!Ar.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Wr)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=kr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{nr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Kr=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Kr);var qr=[`GET`,...Kr];new Set(qr);var Jr=I.createContext(null);Jr.displayName=`DataRouter`;var Yr=I.createContext(null);Yr.displayName=`DataRouterState`;var Xr=I.createContext(!1),Zr=I.createContext({isTransitioning:!1});Zr.displayName=`ViewTransition`;var Qr=I.createContext(new Map);Qr.displayName=`Fetchers`;var $r=I.createContext(null);$r.displayName=`Await`;var ei=I.createContext(null);ei.displayName=`Navigation`;var ti=I.createContext(null);ti.displayName=`Location`;var ni=I.createContext({outlet:null,matches:[],isDataRoute:!1});ni.displayName=`Route`;var ri=I.createContext(null);ri.displayName=`RouteError`;var ii=`REACT_ROUTER_ERROR`,ai=`REDIRECT`,oi=`ROUTE_ERROR_RESPONSE`;function si(e){if(e.startsWith(`${ii}:${ai}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function ci(e){if(e.startsWith(`${ii}:${oi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Vr(t.status,t.statusText,t.data)}catch{}}function li(e,{relative:t}={}){tr(ui(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=I.useContext(ei),{hash:i,pathname:a,search:o}=_i(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Lr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function ui(){return I.useContext(ti)!=null}function di(){return tr(ui(),`useLocation() may be used only in the context of a <Router> component.`),I.useContext(ti).location}var fi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function pi(e){I.useContext(ei).static||I.useLayoutEffect(e)}function mi(){let{isDataRoute:e}=I.useContext(ni);return e?Ii():hi()}function hi(){tr(ui(),`useNavigate() may be used only in the context of a <Router> component.`);let e=I.useContext(Jr),{basename:t,navigator:n}=I.useContext(ei),{matches:r}=I.useContext(ni),{pathname:i}=di(),a=JSON.stringify(Fr(r)),o=I.useRef(!1);return pi(()=>{o.current=!0}),I.useCallback((r,s={})=>{if(nr(o.current,fi),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ir(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Lr([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}I.createContext(null);function gi(){let{matches:e}=I.useContext(ni),t=e[e.length-1];return t?t.params:{}}function _i(e,{relative:t}={}){let{matches:n}=I.useContext(ni),{pathname:r}=di(),i=JSON.stringify(Fr(n));return I.useMemo(()=>Ir(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function vi(e,t){return yi(e,t)}function yi(e,t,n,r,i){tr(ui(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=I.useContext(ei),{matches:o}=I.useContext(ni),s=o[o.length-1],c=s?s.params:{},l=s?s.pathname:`/`,u=s?s.pathnameBase:`/`,d=s&&s.route;{let e=d&&d.path||``;Ri(l,!d||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-CXwWRh5i.js","assets/preload-helper-D4M6sveU.js","assets/chunk-HOUHSVGY-BMPwFEwN.js","assets/src-Dad2ZbCt.js","assets/chunk-DseTPa7n.js","assets/chunk-Y2CYZVJY-BGrd8tLy.js","assets/chunk-WYO6CB5R-Do6SJrnY.js","assets/chunk-ICXQ74PX-DH8NJMok.js","assets/dist-dw-gAfM_.js","assets/chunk-Q4XR5HBZ-uvIGstBS.js","assets/chunk-52WLFC77-BLeB7iGk.js","assets/line-B78frP_c.js","assets/path-DzBnMI1r.js","assets/array-BqYdCIE6.js","assets/chunk-7BUUIJ7U-JiyRtrGu.js","assets/chunk-C7G6YPKG-AsyDSQ9j.js","assets/chunk-OGEWGWER-TIcEoPPH.js","assets/chunk-ZGVPDNZ5-B7kWWaXv.js","assets/rough.esm-wJ1d3nQl.js","assets/chunk-FWX5IMBZ-DFelpZBy.js","assets/chunk-VAUOI2AC-Dpcz6BhT.js","assets/chunk-ZIRB5QZD-DTU0cDNh.js","assets/docx-preview-zis3U0Fa.js","assets/jszip.min-CP5uPNQa.js","assets/aiden0z-pptx-renderer.es-D87ywFdC.js","assets/doc-browser-jVTq8iY_2.js","assets/doc-browser-DwXHr-mm.js","assets/dist-DEJlYi0E.js","assets/react-Bb0EYsLS.js","assets/popover-EulxhA0q.js","assets/search-BArc_WOX.js","assets/external-link-DvHCEe3h.js","assets/plus-BeApS21t.js","assets/refresh-cw-CexL11m1.js","assets/x-qvh05iyu.js","assets/doc-browser-context-CpvHiuQG.js","assets/middleware-CAXxl-af.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,n as t,t as n}from"./chunk-DseTPa7n.js";import{a as r,d as i,f as a,h as o,i as s,m as c,n as l,o as u,p as d,r as f,t as p,u as m}from"./react-Bb0EYsLS.js";import{t as h}from"./preload-helper-D4M6sveU.js";import{$t as g,Bt as _,C as v,Ct as y,D as b,Dt as x,E as S,Gt as C,Ht as w,It as T,J as E,Jt as D,Kt as O,Lt as k,Mt as A,Ot as ee,Pt as j,Qt as M,Rt as N,S as te,St as ne,T as re,Ut as ie,V as ae,Vt as oe,W as se,Xt as ce,Y as le,Yt as ue,Zt as de,_ as fe,_n as pe,_t as me,a as he,an as ge,b as _e,c as ve,d as ye,en as be,et as xe,f as Se,g as Ce,gt as we,h as Te,ht as Ee,i as De,in as P,jt as Oe,kt as ke,l as Ae,mt as je,n as Me,nn as Ne,o as Pe,on as Fe,p as Ie,pt as Le,qt as Re,r as ze,s as Be,t as Ve,tn as He,tt as Ue,u as We,v as Ge,w as Ke,x as qe,xt as Je,y as Ye,zt as Xe}from"./api-D0U10BcF.js";import{c as F}from"./dist-DEJlYi0E.js";import{a as Ze,c as Qe,i as $e,l as et,o as tt,r as nt,s as rt,t as it,u as at}from"./popover-EulxhA0q.js";import{a as ot,i as st,n as ct,o as lt,r as ut,s as dt,t as ft}from"./confirm-dialog-RZUWA_j9.js";import{n as pt,t as mt}from"./search-BArc_WOX.js";import{_ as ht,a as gt,c as _t,d as vt,f as yt,g as bt,h as xt,i as St,l as Ct,m as wt,n as Tt,o as Et,p as Dt,r as Ot,s as kt,u as At,v as jt}from"./doc-browser-DwXHr-mm.js";import{t as Mt}from"./book-open-w3160PZf.js";import{C as Nt,S as Pt,_ as Ft,a as It,b as Lt,c as Rt,d as zt,f as Bt,g as Vt,h as Ht,i as Ut,l as Wt,m as Gt,n as Kt,o as qt,p as Jt,r as Yt,s as Xt,t as Zt,u as Qt,v as $t,w as en,x as tn,y as nn}from"./select-C9FB0jlt.js";import{a as rn,o as an,r as on,s as sn,t as cn}from"./use-confirm-dialog-CTNA1PC0.js";import{t as ln}from"./download-BP7ZxrwI.js";import{t as un}from"./external-link-DvHCEe3h.js";import{t as dn}from"./eye-C--6dxv_.js";import{t as fn}from"./folder-BfeO1zCY.js";import{a as pn,c as mn,i as hn,o as gn,r as _n,s as vn,t as yn}from"./tabs-D_mjyOOf.js";import{i as bn,n as xn,r as Sn,t as Cn}from"./use-viewport-layout-P0q6Nt_N.js";import{t as wn}from"./loader-circle-BWdgwVnn.js";import{t as Tn}from"./plus-BeApS21t.js";import{t as En}from"./refresh-cw-CexL11m1.js";import{n as Dn,t as On}from"./skeleton-DQ5WhuDG.js";import{t as kn}from"./trash-2-bDhfsO1O.js";import{t as An}from"./x-qvh05iyu.js";import{n as jn,t as Mn}from"./logo-badge-TdPa95AC.js";import{t as Nn}from"./host-capabilities-CFbAfrrA.js";import{n as Pn,t as Fn}from"./middleware-CAXxl-af.js";import{a as In,c as Ln,d as Rn,g as zn,h as Bn,i as Vn,l as Hn,m as Un,n as Wn,o as Gn,p as Kn,r as qn,s as Jn}from"./doc-browser-context-CpvHiuQG.js";import{c as Yn,n as Xn,r as Zn}from"./provider-models-BoUhFo9R.js";var I=e(o(),1),Qn=`popstate`;function $n(e={}){let{initialEntries:t=[`/`],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((e,t)=>u(e,typeof e==`string`?null:e.state,t===0?`default`:void 0));let a=c(n??i.length-1),o=`POP`,s=null;function c(e){return Math.min(Math.max(e,0),i.length-1)}function l(){return i[a]}function u(e,t=null,n){let r=ar(i?l().pathname:`/`,e,t,n);return nr(r.pathname.charAt(0)===`/`,`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),r}function d(e){return typeof e==`string`?e:or(e)}return{get index(){return a},get action(){return o},get location(){return l()},createHref:d,createURL(e){return new URL(d(e),`http://localhost`)},encodeLocation(e){let t=typeof e==`string`?sr(e):e;return{pathname:t.pathname||``,search:t.search||``,hash:t.hash||``}},push(e,t){o=`PUSH`;let n=u(e,t);a+=1,i.splice(a,i.length,n),r&&s&&s({action:o,location:n,delta:1})},replace(e,t){o=`REPLACE`;let n=u(e,t);i[a]=n,r&&s&&s({action:o,location:n,delta:0})},go(e){o=`POP`;let t=c(a+e),n=i[t];a=t,s&&s({action:o,location:n,delta:e})},listen(e){return s=e,()=>{s=null}}}}function er(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return ar(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:or(t)}return cr(t,n,null,e)}function tr(e,t){if(e===!1||e==null)throw Error(t)}function nr(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function rr(){return Math.random().toString(36).substring(2,10)}function ir(e,t){return{usr:e.state,key:e.key,idx:t}}function ar(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?sr(t):t,state:n,key:t&&t.key||r||rr()}}function or({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function sr(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function cr(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=ar(h.location,e,t);n&&n(r,e),l=u()+1;let d=ir(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=ar(h.location,e,t);n&&n(r,e),l=u();let i=ir(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return lr(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Qn,d),c=e,()=>{i.removeEventListener(Qn,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function lr(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),tr(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:or(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function ur(e,t,n=`/`){return dr(e,t,n,!1)}function dr(e,t,n,r){let i=kr((typeof t==`string`?sr(t):t).pathname||`/`,n);if(i==null)return null;let a=pr(e);hr(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Or(i);o=Tr(a[e],t,r)}return o}function fr(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function pr(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;tr(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Lr([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(tr(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),pr(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Cr(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of mr(e.path))a(e,t,!0,n)}),t}function mr(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=mr(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function hr(e){e.sort((e,t)=>e.score===t.score?wr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var gr=/^:[\w-]+$/,_r=3,vr=2,yr=1,br=10,xr=-2,Sr=e=>e===`*`;function Cr(e,t){let n=e.split(`/`),r=n.length;return n.some(Sr)&&(r+=xr),t&&(r+=vr),n.filter(e=>!Sr(e)).reduce((e,t)=>e+(gr.test(t)?_r:t===``?yr:br),r)}function wr(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Tr(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=Er({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Er({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Lr([a,u.pathname]),pathnameBase:Rr(Lr([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Lr([a,u.pathnameBase]))}return o}function Er(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Dr(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Dr(e,t=!1,n=!0){nr(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Or(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return nr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function kr(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var Ar=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function jr(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?sr(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?Mr(n.substring(1),`/`):Mr(n,t)):a=t,{pathname:a,search:zr(r),hash:Br(i)}}function Mr(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Nr(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pr(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Fr(e){let t=Pr(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ir(e,t,n,r=!1){let i;typeof e==`string`?i=sr(e):(i={...e},tr(!i.pathname||!i.pathname.includes(`?`),Nr(`?`,`pathname`,`search`,i)),tr(!i.pathname||!i.pathname.includes(`#`),Nr(`#`,`pathname`,`hash`,i)),tr(!i.search||!i.search.includes(`#`),Nr(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=jr(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Lr=e=>e.join(`/`).replace(/\/\/+/g,`/`),Rr=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),zr=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Br=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Vr=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Hr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ur(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Wr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Gr(e,t){let n=e;if(typeof n!=`string`||!Ar.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Wr)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=kr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{nr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Kr=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Kr);var qr=[`GET`,...Kr];new Set(qr);var Jr=I.createContext(null);Jr.displayName=`DataRouter`;var Yr=I.createContext(null);Yr.displayName=`DataRouterState`;var Xr=I.createContext(!1),Zr=I.createContext({isTransitioning:!1});Zr.displayName=`ViewTransition`;var Qr=I.createContext(new Map);Qr.displayName=`Fetchers`;var $r=I.createContext(null);$r.displayName=`Await`;var ei=I.createContext(null);ei.displayName=`Navigation`;var ti=I.createContext(null);ti.displayName=`Location`;var ni=I.createContext({outlet:null,matches:[],isDataRoute:!1});ni.displayName=`Route`;var ri=I.createContext(null);ri.displayName=`RouteError`;var ii=`REACT_ROUTER_ERROR`,ai=`REDIRECT`,oi=`ROUTE_ERROR_RESPONSE`;function si(e){if(e.startsWith(`${ii}:${ai}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function ci(e){if(e.startsWith(`${ii}:${oi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Vr(t.status,t.statusText,t.data)}catch{}}function li(e,{relative:t}={}){tr(ui(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=I.useContext(ei),{hash:i,pathname:a,search:o}=_i(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Lr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function ui(){return I.useContext(ti)!=null}function di(){return tr(ui(),`useLocation() may be used only in the context of a <Router> component.`),I.useContext(ti).location}var fi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function pi(e){I.useContext(ei).static||I.useLayoutEffect(e)}function mi(){let{isDataRoute:e}=I.useContext(ni);return e?Ii():hi()}function hi(){tr(ui(),`useNavigate() may be used only in the context of a <Router> component.`);let e=I.useContext(Jr),{basename:t,navigator:n}=I.useContext(ei),{matches:r}=I.useContext(ni),{pathname:i}=di(),a=JSON.stringify(Fr(r)),o=I.useRef(!1);return pi(()=>{o.current=!0}),I.useCallback((r,s={})=>{if(nr(o.current,fi),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ir(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Lr([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}I.createContext(null);function gi(){let{matches:e}=I.useContext(ni),t=e[e.length-1];return t?t.params:{}}function _i(e,{relative:t}={}){let{matches:n}=I.useContext(ni),{pathname:r}=di(),i=JSON.stringify(Fr(n));return I.useMemo(()=>Ir(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function vi(e,t){return yi(e,t)}function yi(e,t,n,r,i){tr(ui(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=I.useContext(ei),{matches:o}=I.useContext(ni),s=o[o.length-1],c=s?s.params:{},l=s?s.pathname:`/`,u=s?s.pathnameBase:`/`,d=s&&s.route;{let e=d&&d.path||``;Ri(l,!d||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
3
|
|
|
4
4
|
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let f=di(),p;if(t){let e=typeof t==`string`?sr(t):t;tr(u===`/`||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=f;let m=p.pathname||`/`,h=m;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);h=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=ur(e,{pathname:h});nr(d||g!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),nr(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=Ei(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Lr([u,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:Lr([u,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),o,n,r,i);return t&&_?I.createElement(ti.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,...p},navigationType:`POP`}},_):_}function bi(){let e=Fi(),t=Hr(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=I.createElement(I.Fragment,null,I.createElement(`p`,null,`💿 Hey developer 👋`),I.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,I.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,I.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),I.createElement(I.Fragment,null,I.createElement(`h2`,null,`Unexpected Application Error!`),I.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?I.createElement(`pre`,{style:i},n):null,o)}var xi=I.createElement(bi,null),Si=class extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=ci(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:I.createElement(ni.Provider,{value:this.props.routeContext},I.createElement(ri.Provider,{value:e,children:this.props.component}));return this.context?I.createElement(wi,{error:e},t):t}};Si.contextType=Xr;var Ci=new WeakMap;function wi({children:e,error:t}){let{basename:n}=I.useContext(ei);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=si(t.digest);if(e){let r=Ci.get(t);if(r)throw r;let i=Gr(e.location,n);if(Wr&&!Ci.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Ci.set(t,n),n}return I.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ti({routeContext:e,match:t,children:n}){let r=I.useContext(Jr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),I.createElement(ni.Provider,{value:e},n)}function Ei(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);tr(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ur(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let u,d=!1,f=null,p=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||xi,s&&(c<0&&i===0?(Ri(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):c===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,i+1)),h=()=>{let t;return t=u?f:d?p:r.route.Component?I.createElement(r.route.Component,null):r.route.element?r.route.element:e,I.createElement(Ti,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?I.createElement(Si,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Di(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Oi(e){let t=I.useContext(Jr);return tr(t,Di(e)),t}function ki(e){let t=I.useContext(Yr);return tr(t,Di(e)),t}function Ai(e){let t=I.useContext(ni);return tr(t,Di(e)),t}function ji(e){let t=Ai(e),n=t.matches[t.matches.length-1];return tr(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Mi(){return ji(`useRouteId`)}function Ni(){return ki(`useNavigation`).navigation}function Pi(){let{matches:e,loaderData:t}=ki(`useMatches`);return I.useMemo(()=>e.map(e=>fr(e,t)),[e,t])}function Fi(){let e=I.useContext(ri),t=ki(`useRouteError`),n=ji(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ii(){let{router:e}=Oi(`useNavigate`),t=ji(`useNavigate`),n=I.useRef(!1);return pi(()=>{n.current=!0}),I.useCallback(async(r,i={})=>{nr(n.current,fi),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Li={};function Ri(e,t,n){!t&&!Li[e]&&(Li[e]=!0,nr(!1,n))}I.useOptimistic,I.memo(zi);function zi({routes:e,future:t,state:n,onError:r}){return yi(e,void 0,n,r,t)}function Bi({basename:e,children:t,initialEntries:n,initialIndex:r,unstable_useTransitions:i}){let a=I.useRef();a.current??=$n({initialEntries:n,initialIndex:r,v5Compat:!0});let o=a.current,[s,c]=I.useState({action:o.action,location:o.location}),l=I.useCallback(e=>{i===!1?c(e):I.startTransition(()=>c(e))},[i]);return I.useLayoutEffect(()=>o.listen(l),[o,l]),I.createElement(Ui,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:i})}function Vi({to:e,replace:t,state:n,relative:r}){tr(ui(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=I.useContext(ei);nr(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=I.useContext(ni),{pathname:o}=di(),s=mi(),c=Ir(e,Fr(a),o,r===`path`),l=JSON.stringify(c);return I.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Hi(e){tr(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Ui({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){tr(!ui(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=I.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=sr(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`}=n,m=I.useMemo(()=>{let e=kr(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p},navigationType:r}},[s,l,u,d,f,p,r]);return nr(m!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:I.createElement(ei.Provider,{value:c},I.createElement(ti.Provider,{children:t,value:m}))}function Wi({children:e,location:t}){return vi(Gi(e),t)}I.Component;function Gi(e,t=[]){let n=[];return I.Children.forEach(e,(e,r)=>{if(!I.isValidElement(e))return;let i=[...t,r];if(e.type===I.Fragment){n.push.apply(n,Gi(e.props.children,i));return}tr(e.type===Hi,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),tr(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Gi(e.props.children,i)),n.push(a)}),n}var Ki=`get`,qi=`application/x-www-form-urlencoded`;function Ji(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Yi(e){return Ji(e)&&e.tagName.toLowerCase()===`button`}function Xi(e){return Ji(e)&&e.tagName.toLowerCase()===`form`}function Zi(e){return Ji(e)&&e.tagName.toLowerCase()===`input`}function Qi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $i(e,t){return e.button===0&&(!t||t===`_self`)&&!Qi(e)}var ea=null;function ta(){if(ea===null)try{new FormData(document.createElement(`form`),0),ea=!1}catch{ea=!0}return ea}var na=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ra(e){return e!=null&&!na.has(e)?(nr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qi}"`),null):e}function ia(e,t){let n,r,i,a,o;if(Xi(e)){let o=e.getAttribute(`action`);r=o?kr(o,t):null,n=e.getAttribute(`method`)||Ki,i=ra(e.getAttribute(`enctype`))||qi,a=new FormData(e)}else if(Yi(e)||Zi(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?kr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ki,i=ra(e.getAttribute(`formenctype`))||ra(o.getAttribute(`enctype`))||qi,a=new FormData(o,e),!ta()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Ji(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Ki,r=null,i=qi,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var aa={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},oa=/[&><\u2028\u2029]/g;function sa(e){return e.replace(oa,e=>aa[e])}function ca(e,t){if(e===!1||e==null)throw Error(t)}function la(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&kr(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function ua(e,t){if(e.id in t)return t[e.id];try{let n=await h(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function da(e){return e!=null&&typeof e.page==`string`}function fa(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function pa(e,t,n){return va((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ua(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(fa).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ma(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ha(e,t,{includeHydrateFallback:n}={}){return ga(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function ga(e){return[...new Set(e)]}function _a(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function va(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!da(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(_a(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function ya(){let e=I.useContext(Jr);return ca(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function ba(){let e=I.useContext(Yr);return ca(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var xa=I.createContext(void 0);xa.displayName=`FrameworkContext`;function Sa(){let e=I.useContext(xa);return ca(e,`You must render this element inside a <HydratedRouter> element`),e}function Ca(e,t){let n=I.useContext(xa),[r,i]=I.useState(!1),[a,o]=I.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=I.useRef(null);I.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),I.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:wa(s,p),onBlur:wa(c,m),onMouseEnter:wa(l,p),onMouseLeave:wa(u,m),onTouchStart:wa(d,p)}]:[a,f,{}]:[!1,f,{}]}function wa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ta({page:e,...t}){let{router:n}=ya(),r=I.useMemo(()=>ur(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?I.createElement(Da,{page:e,matches:r,...t}):null}function Ea(e){let{manifest:t,routeModules:n}=Sa(),[r,i]=I.useState([]);return I.useEffect(()=>{let r=!1;return pa(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Da({page:e,matches:t,...n}){let r=di(),{future:i,manifest:a,routeModules:o}=Sa(),{basename:s}=ya(),{loaderData:c,matches:l}=ba(),u=I.useMemo(()=>ma(e,t,l,a,r,`data`),[e,t,l,a,r]),d=I.useMemo(()=>ma(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=I.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=la(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=I.useMemo(()=>ha(d,a),[d,a]),m=Ea(d);return I.createElement(I.Fragment,null,f.map(e=>I.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>I.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>I.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Oa(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}I.Component;var ka=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ka&&(window.__reactRouterVersion=`7.13.0`)}catch{}function Aa({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=I.useRef();i.current??=er({window:r,v5Compat:!0});let a=i.current,[o,s]=I.useState({action:a.action,location:a.location}),c=I.useCallback(e=>{n===!1?s(e):I.startTransition(()=>s(e))},[n]);return I.useLayoutEffect(()=>a.listen(c),[a,c]),I.createElement(Ui,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function ja({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=I.useState({action:n.action,location:n.location}),o=I.useCallback(e=>{r===!1?a(e):I.startTransition(()=>a(e))},[r]);return I.useLayoutEffect(()=>n.listen(o),[n,o]),I.createElement(Ui,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}ja.displayName=`unstable_HistoryRouter`;var Ma=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Na=I.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u,unstable_defaultShouldRevalidate:d,...f},p){let{basename:m,unstable_useTransitions:h}=I.useContext(ei),g=typeof c==`string`&&Ma.test(c),_=Gr(c,m);c=_.to;let v=li(c,{relative:r}),[y,b,x]=Ca(n,f),S=Ba(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h});function C(t){e&&e(t),t.defaultPrevented||S(t)}let w=I.createElement(`a`,{...f,...x,href:_.absoluteURL||v,onClick:_.isExternal||i?e:C,ref:Oa(p,b),target:s,"data-discover":!g&&t===`render`?`true`:void 0});return y&&!g?I.createElement(I.Fragment,null,w,I.createElement(Ta,{page:v})):w});Na.displayName=`Link`;var Pa=I.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=_i(a,{relative:c.relative}),d=di(),f=I.useContext(Yr),{navigator:p,basename:m}=I.useContext(ei),h=f!=null&&Xa(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=kr(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return I.createElement(Na,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Pa.displayName=`NavLink`;var Fa=I.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Ki,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=I.useContext(ei),g=Ua(),_=Wa(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Ma.test(s);return I.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?I.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Fa.displayName=`Form`;function Ia({getKey:e,storageKey:t,...n}){let r=I.useContext(xa),{basename:i}=I.useContext(ei),a=di(),o=Pi();Ja({getKey:e,storageKey:t});let s=I.useMemo(()=>{if(!r||!e)return null;let t=qa(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return I.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${sa(JSON.stringify(t||Ga))}, ${sa(JSON.stringify(s))})`}})}Ia.displayName=`ScrollRestoration`;function La(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ra(e){let t=I.useContext(Jr);return tr(t,La(e)),t}function za(e){let t=I.useContext(Yr);return tr(t,La(e)),t}function Ba(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s,unstable_useTransitions:c}={}){let l=mi(),u=di(),d=_i(e,{relative:a});return I.useCallback(f=>{if($i(f,t)){f.preventDefault();let t=n===void 0?or(u)===or(d):n,p=()=>l(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s});c?I.startTransition(()=>p()):p()}},[u,l,d,n,r,t,e,i,a,o,s,c])}var Va=0,Ha=()=>`__${String(++Va)}__`;function Ua(){let{router:e}=Ra(`useSubmit`),{basename:t}=I.useContext(ei),n=Mi(),r=e.fetch,i=e.navigate;return I.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ia(e,t);a.navigate===!1?await r(a.fetcherKey||Ha(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Wa(e,{relative:t}={}){let{basename:n}=I.useContext(ei),r=I.useContext(ni);tr(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={..._i(e||`.`,{relative:t})},o=di();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Lr([n,a.pathname])),or(a)}var Ga=`react-router-scroll-positions`,Ka={};function qa(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:kr(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Ja({getKey:e,storageKey:t}={}){let{router:n}=Ra(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=za(`useScrollRestoration`),{basename:a}=I.useContext(ei),o=di(),s=Pi(),c=Ni();I.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Ya(I.useCallback(()=>{if(c.state===`idle`){let t=qa(o,s,a,e);Ka[t]=window.scrollY}try{sessionStorage.setItem(t||Ga,JSON.stringify(Ka))}catch(e){nr(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(I.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Ga);e&&(Ka=JSON.parse(e))}catch{}},[t]),I.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Ka,()=>window.scrollY,e?(t,n)=>qa(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),I.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{nr(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Ya(e,t){let{capture:n}=t||{};I.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Xa(e,{relative:t}={}){let n=I.useContext(Zr);tr(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ra(`useViewTransitionState`),i=_i(e,{relative:t});if(!n.isTransitioning)return!1;let a=kr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=kr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Er(i.pathname,o)!=null||Er(i.pathname,a)!=null}var Za=F(`AlarmClock`,[[`circle`,{cx:`12`,cy:`13`,r:`8`,key:`3y4lt7`}],[`path`,{d:`M12 9v4l2 2`,key:`1c63tq`}],[`path`,{d:`M5 3 2 6`,key:`18tl5t`}],[`path`,{d:`m22 6-3-3`,key:`1opdir`}],[`path`,{d:`M6.38 18.7 4 21`,key:`17xu3x`}],[`path`,{d:`M17.64 18.67 20 21`,key:`kv2oe2`}]]),Qa=F(`AppWindow`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),$a=F(`ArrowDown`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),eo=F(`ArrowUpRight`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),to=F(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),no=F(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ro=F(`Braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),io=F(`BrainCircuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),ao=F(`Brain`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`,key:`ep3f8r`}],[`path`,{d:`M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4`,key:`1p4c4q`}],[`path`,{d:`M17.599 6.5a3 3 0 0 0 .399-1.375`,key:`tmeiqw`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M19.938 10.5a4 4 0 0 1 .585.396`,key:`1qfode`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M19.967 17.484A4 4 0 0 1 18 18`,key:`159ez6`}]]),oo=F(`CalendarClock`,[[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M17.5 17.5 16 16.3V14`,key:`akvzfd`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),so=F(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),co=F(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),lo=F(`CircleDashed`,[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]),uo=F(`CircleHelp`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),fo=F(`CirclePause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),po=F(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),mo=F(`Cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),ho=F(`CodeXml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),go=F(`Command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),_o=F(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),vo=F(`CornerDownRight`,[[`polyline`,{points:`15 10 20 15 15 20`,key:`1q7qjw`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),yo=F(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]),bo=F(`Earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),xo=F(`Expand`,[[`path`,{d:`m21 21-6-6m6 6v-4.8m0 4.8h-4.8`,key:`1c15vz`}],[`path`,{d:`M3 16.2V21m0 0h4.8M3 21l6-6`,key:`1fsnz2`}],[`path`,{d:`M21 7.8V3m0 0h-4.8M21 3l-6 6`,key:`hawz9i`}],[`path`,{d:`M3 7.8V3m0 0h4.8M3 3l6 6`,key:`u9ee12`}]]),So=F(`FileArchive`,[[`path`,{d:`M10 12v-1`,key:`v7bkov`}],[`path`,{d:`M10 18v-2`,key:`1cjy8d`}],[`path`,{d:`M10 7V6`,key:`dljcrl`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01`,key:`gkbcor`}],[`circle`,{cx:`10`,cy:`20`,r:`2`,key:`1xzdoj`}]]),Co=F(`FileAudio2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2`,key:`17k7jt`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`circle`,{cx:`3`,cy:`17`,r:`1`,key:`vo6nti`}],[`path`,{d:`M2 17v-3a4 4 0 0 1 8 0v3`,key:`1ggdre`}],[`circle`,{cx:`9`,cy:`17`,r:`1`,key:`bc1fq4`}]]),wo=F(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),To=F(`FileImage`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Eo=F(`FileJson2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M4 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`fq0c9t`}],[`path`,{d:`M8 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`4gibmv`}]]),Do=F(`FileSpreadsheet`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),Oo=F(`FileVideo2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`rect`,{width:`8`,height:`6`,x:`2`,y:`12`,rx:`1`,key:`1a6c1e`}],[`path`,{d:`m10 15.5 4 2.5v-6l-4 2.5`,key:`t7cp39`}]]),ko=F(`File`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}]]),Ao=F(`Files`,[[`path`,{d:`M20 7h-3a2 2 0 0 1-2-2V2`,key:`x099mo`}],[`path`,{d:`M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z`,key:`18t6ie`}],[`path`,{d:`M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8`,key:`1nja0z`}]]),jo=F(`FolderKanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),Mo=F(`FolderOpen`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),No=F(`FolderPlus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Po=F(`FolderTree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),Fo=F(`FolderUp`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}],[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`m9 13 3-3 3 3`,key:`1pxg3c`}]]),Io=F(`FolderX`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}],[`path`,{d:`m9.5 10.5 5 5`,key:`ra9qjz`}],[`path`,{d:`m14.5 10.5-5 5`,key:`l2rkpq`}]]),Lo=F(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),Ro=F(`Github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),zo=F(`Grid3x3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Bo=F(`HardDrive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),Vo=F(`House`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`1d0kgt`}]]),Ho=F(`Image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Uo=F(`Languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),Wo=F(`Laptop`,[[`path`,{d:`M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16`,key:`tarvll`}]]),Go=F(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Ko=F(`ListChecks`,[[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),qo=F(`ListTodo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),Jo=F(`LogOut`,[[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}],[`polyline`,{points:`16 17 21 12 16 7`,key:`1gabdz`}],[`line`,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,key:`1uyos4`}]]),Yo=F(`Maximize2`,[[`polyline`,{points:`15 3 21 3 21 9`,key:`mznyad`}],[`polyline`,{points:`9 21 3 21 3 15`,key:`1avn1i`}],[`line`,{x1:`21`,x2:`14`,y1:`3`,y2:`10`,key:`ota7mn`}],[`line`,{x1:`3`,x2:`10`,y1:`21`,y2:`14`,key:`1atl0r`}]]),Xo=F(`MessageCircle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),Zo=F(`MessageSquarePlus`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M12 7v6`,key:`lw1j43`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}]]),Qo=F(`MessageSquareText`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}],[`path`,{d:`M13 8H7`,key:`14i4kc`}],[`path`,{d:`M17 12H7`,key:`16if0g`}]]),$o=F(`Minimize2`,[[`polyline`,{points:`4 14 10 14 10 20`,key:`11kfnr`}],[`polyline`,{points:`20 10 14 10 14 4`,key:`rlmsce`}],[`line`,{x1:`14`,x2:`21`,y1:`10`,y2:`3`,key:`o5lafz`}],[`line`,{x1:`3`,x2:`10`,y1:`21`,y2:`14`,key:`1atl0r`}]]),es=F(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),ts=F(`Monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),ns=F(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),rs=F(`PanelLeftClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),is=F(`PanelLeftOpen`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),as=F(`PanelRightClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),os=F(`PanelsTopLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),ss=F(`Paperclip`,[[`path`,{d:`m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48`,key:`1u3ebp`}]]),cs=F(`Pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),ls=F(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),us=F(`Puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),ds=F(`Radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),fs=F(`RefreshCcw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),ps=F(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),ms=F(`Server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),hs=F(`ShieldAlert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),gs=F(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),_s=F(`Shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),vs=F(`Smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),ys=F(`SquareArrowOutUpRight`,[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]]),bs=F(`Square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),xs=F(`Star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Ss=F(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),Cs=F(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ws=F(`Unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),Ts=F(`User`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Es=F(`Wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),Ds=F(`Workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Os=F(`Wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`,key:`cbrjhi`}]]);function ks(){return Fe({queryKey:Ms,queryFn:ve,staleTime:5e3,refetchOnWindowFocus:!0})}var L=d();function As(e){let{label:t,muted:n,value:r}=e;return(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-4 py-2 text-sm`,children:[(0,L.jsx)(`span`,{className:`text-gray-500`,children:t}),(0,L.jsx)(`span`,{className:n?`text-right text-gray-500`:`text-right text-gray-900`,children:r==null||r===``?`-`:String(r)})]})}function js(){let e=S4(),t=ks(),n=t.data,r=Bs(e=>e.actionLabel),i=(0,I.useMemo)(()=>Ks(n),[n]),a=!!r,o=n?.runtime?.deviceName?.trim()||n?.settings.deviceName?.trim()||f(`remoteDeviceNameAuto`),s=!!(n?.account.loggedIn&&zs(n)),{hero:c,issueHint:u}=i;return(0,I.useEffect)(()=>{e.remoteAccessManager.syncStatus(n)},[e,n]),t.isLoading&&!n?(0,L.jsx)(`div`,{className:`p-8 text-gray-400`,children:f(`remoteLoading`)}):(0,L.jsxs)(de,{className:`space-y-6`,children:[(0,L.jsx)(ce,{title:f(`remotePageTitle`),description:f(`remotePageDescription`)}),(0,L.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1.2fr_0.8fr]`,children:[(0,L.jsxs)(C,{children:[(0,L.jsxs)(D,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,L.jsx)(ue,{children:c.title}),(0,L.jsx)(jn,{status:c.badgeStatus,label:c.badgeLabel})]}),(0,L.jsx)(Re,{children:c.description})]}),(0,L.jsxs)(O,{className:`space-y-5`,children:[(0,L.jsxs)(rn,{tone:`neutral`,children:[(0,L.jsx)(As,{label:f(`remoteSignedInAccount`),value:n?.account.email}),(0,L.jsx)(As,{label:f(`remoteDeviceName`),value:o}),(0,L.jsx)(As,{label:f(`remoteConnectionStatus`),value:c.badgeLabel}),(0,L.jsx)(As,{label:f(`remoteLastConnectedAt`),value:n?.runtime?.lastConnectedAt?l(n.runtime.lastConnectedAt):`-`,muted:!0})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[i.primaryAction?(0,L.jsxs)(be,{onClick:()=>{if(i.primaryAction?.kind===`reauthorize`){e.remoteAccessManager.reauthorizeRemoteAccess(n);return}if(i.primaryAction?.kind===`repair`){e.remoteAccessManager.repairRemoteAccess(n);return}e.remoteAccessManager.enableRemoteAccess(n)},disabled:a,children:[i.primaryAction.showRefreshIcon?(0,L.jsx)(fs,{className:`mr-2 h-4 w-4`}):null,r||i.primaryAction.label]}):null,(0,L.jsxs)(be,{variant:`outline`,onClick:()=>void e.accountManager.openNextClawWeb(),disabled:a||!s,children:[(0,L.jsx)(ys,{className:`mr-2 h-4 w-4`}),f(`remoteOpenDeviceList`)]}),n?.settings.enabled?(0,L.jsx)(be,{variant:`outline`,onClick:()=>void e.remoteAccessManager.disableRemoteAccess(n),disabled:a,children:f(`remoteDisable`)}):null]}),i.shouldShowIssueHint&&u?(0,L.jsx)(rn,{tone:`warning`,title:u.title,description:u.body}):null,(0,L.jsx)(`p`,{className:`text-xs text-gray-500`,children:f(`remoteOpenWebHint`)})]})]}),(0,L.jsxs)(C,{children:[(0,L.jsxs)(D,{children:[(0,L.jsxs)(ue,{className:`flex items-center gap-2`,children:[(0,L.jsx)(Wo,{className:`h-4 w-4 text-primary`}),f(`remoteDeviceSectionTitle`)]}),(0,L.jsx)(Re,{children:f(`remoteDeviceSectionDescription`)})]}),(0,L.jsxs)(O,{className:`space-y-5`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(jn,{status:n?.account.loggedIn?`ready`:`inactive`,label:n?.account.loggedIn?f(`remoteAccountConnected`):f(`remoteAccountNotConnected`)}),(0,L.jsx)(jn,{status:n?.settings.enabled?`active`:`inactive`,label:n?.settings.enabled?f(`remoteEnabled`):f(`remoteStateDisabled`)}),(0,L.jsx)(jn,{status:n?.service.running?`active`:`inactive`,label:n?.service.running?f(`remoteServiceRunning`):f(`remoteServiceStopped`)})]}),(0,L.jsxs)(rn,{tone:`neutral`,children:[(0,L.jsx)(As,{label:f(`remoteDeviceName`),value:o}),(0,L.jsx)(As,{label:f(`remoteConnectionStatus`),value:c.badgeLabel}),(0,L.jsx)(As,{label:f(`remoteLastConnectedAt`),value:n?.runtime?.lastConnectedAt?l(n.runtime.lastConnectedAt):`-`,muted:!0})]}),(0,L.jsx)(rn,{tone:`neutral`,borderStyle:`dashed`,description:n?.account.loggedIn?f(`remoteOpenWebHint`):f(`remoteStatusNeedsSignInDescription`),className:`text-sm`})]})]})]})]})}var Ms=[`remote-status`],Ns=`https://platform.nextclaw.io`,Ps=`https://nextclaw-platform-console.pages.dev`,Fs=async()=>await Ne.fetchQuery({queryKey:Ms,queryFn:ve,staleTime:5e3}),Is=async()=>(await Ne.invalidateQueries({queryKey:Ms}),await Fs()),Ls=(e,t)=>t?.trim()||e?.settings.platformApiBase?.trim()||e?.account.apiBase?.trim()||void 0;function Rs(e){let t=e?.trim();if(!t)return;let n;try{n=new URL(t)}catch{return}if(n.hostname===`platform.nextclaw.io`||n.hostname===`nextclaw-platform-console.pages.dev`)return n.origin;if(n.hostname===`ai-gateway-api.nextclaw.io`)return Ns;if(n.hostname.includes(`nextclaw-provider-gateway-api`)&&n.hostname.endsWith(`.workers.dev`))return Ps}var zs=e=>Rs(e?.account.apiBase)||Rs(e?.settings.platformApiBase)||Rs(e?.platformBase)||Rs(e?.account.platformBase)||void 0,Bs=p(e=>({enabled:!1,deviceName:``,platformApiBase:``,advancedOpen:!1,draftTouched:!1,actionLabel:null,doctor:null,setEnabled:t=>e({enabled:t,draftTouched:!0}),setDeviceName:t=>e({deviceName:t,draftTouched:!0}),setPlatformApiBase:t=>e({platformApiBase:t,draftTouched:!0}),setAdvancedOpen:t=>e({advancedOpen:t}),hydrateDraft:({enabled:t,deviceName:n,platformApiBase:r})=>e({enabled:t,deviceName:n,platformApiBase:r,draftTouched:!1}),beginAction:t=>e({actionLabel:t}),finishAction:()=>e({actionLabel:null}),setDoctor:t=>e({doctor:t})})),Vs=class{constructor(e){this.params=e,this.syncStatus=e=>{if(!e)return;let t=Bs.getState();t.draftTouched||t.actionLabel||this.hydrateDraftFromStatus(e)},this.setEnabled=e=>{Bs.getState().setEnabled(e)},this.setDeviceName=e=>{Bs.getState().setDeviceName(e)},this.setPlatformApiBase=e=>{Bs.getState().setPlatformApiBase(e)},this.setAdvancedOpen=e=>{Bs.getState().setAdvancedOpen(e)},this.enableRemoteAccess=async e=>{let t=e??await Is(),n=Bs.getState(),r=await this.ensureRemoteAccount(t,n.platformApiBase);await this.applyEnabledState(!0,r)},this.disableRemoteAccess=async e=>{let t=e??await Is();await this.applyEnabledState(!1,t)},this.repairRemoteAccess=async e=>{let t=e??await Is(),n=(await this.ensureRemoteAccount(t)).service.running?`restart`:`start`;await this.runManagedAction({actionLabel:f(n===`restart`?`remoteActionRestarting`:`remoteActionStarting`),job:async()=>{await Pe(n);let e=await Is();this.hydrateDraftFromStatus(e)},successMessage:f(`remoteServiceRecovered`)})},this.reauthorizeRemoteAccess=async e=>{let t=e??await Is(),n=await this.params.accountManager.startBrowserSignInAndWait({status:t,apiBase:Bs.getState().platformApiBase});await this.repairRemoteAccess(n)},this.saveAdvancedSettings=async e=>{let t=e??await Is(),n=Bs.getState();await this.runManagedAction({actionLabel:f(`remoteActionSavingAdvanced`),job:async()=>{await Ie({enabled:n.enabled,deviceName:n.deviceName.trim(),platformApiBase:n.platformApiBase.trim()});let e=await Is();this.hydrateDraftFromStatus(e)},successMessage:t.settings.enabled===n.enabled?f(`remoteSettingsSaved`):f(`remoteAdvancedSaved`)})},this.runDoctor=async()=>{await this.runManagedAction({actionLabel:f(`remoteDoctorRunning`),job:async()=>{let e=await Be();Bs.getState().setDoctor(e)},successMessage:f(`remoteDoctorCompleted`)})},this.startService=async()=>{await this.runServiceAction(`start`,f(`remoteActionStarting`))},this.restartService=async()=>{await this.runServiceAction(`restart`,f(`remoteActionRestarting`))},this.stopService=async()=>{await this.runServiceAction(`stop`,f(`remoteActionStopping`))},this.applyEnabledState=async(e,t)=>{let n=Bs.getState();await this.runManagedAction({actionLabel:f(e?`remoteActionEnabling`:`remoteActionDisabling`),job:async()=>{await Ie({enabled:e,deviceName:n.deviceName.trim(),platformApiBase:n.platformApiBase.trim()});let r=await Is();this.hydrateDraftFromStatus(r),e?await Pe(r.service.running?`restart`:`start`):t.service.running&&await Pe(`restart`);let i=await Is();this.hydrateDraftFromStatus(i)},successMessage:f(e?`remoteEnabledReady`:`remoteDisabledDone`)})},this.ensureRemoteAccount=async(e,t)=>e.account.loggedIn?e:await this.params.accountManager.ensureSignedIn({apiBase:t,status:e}),this.runServiceAction=async(e,t)=>{await this.runManagedAction({actionLabel:t,job:async()=>{let t=await Pe(e),n=await Is();this.hydrateDraftFromStatus(n),P.success(t.message)}})},this.hydrateDraftFromStatus=e=>{Bs.getState().hydrateDraft({enabled:e.settings.enabled,deviceName:e.settings.deviceName,platformApiBase:e.settings.platformApiBase})},this.runManagedAction=async e=>{let{actionLabel:t,job:n,successMessage:r}=e;Bs.getState().beginAction(t);try{await n(),r&&P.success(r)}catch(e){let t=e instanceof Error?e.message:f(`error`);throw P.error(t),e}finally{Bs.getState().finishAction()}}}},Hs=[/invalid or expired token/i,/missing bearer token/i,/token expired/i,/token is invalid/i,/run "nextclaw login"/i,/browser sign-in again/i];function Us(e){return e?.runtime?.lastError?.trim()||``}function Ws(e){let t=f(`remoteStatusIssueDetailGeneric`),n=Us(e);return n?`${t} (${n})`:t}function Gs(e){if(!e?.settings.enabled)return!1;let t=Us(e);return Hs.some(e=>e.test(t))}function Ks(e){return Gs(e)?{hero:{badgeStatus:`warning`,badgeLabel:f(`remoteStateReauthorizationRequired`),title:f(`remoteStatusReauthorizationTitle`),description:f(`remoteStatusReauthorizationDescription`)},primaryAction:{kind:`reauthorize`,label:f(`remoteReauthorizeNow`),showRefreshIcon:!1},issueHint:{title:f(`remoteStatusRecoveryTitle`),body:f(`remoteStatusReauthorizationHint`)},shouldShowIssueHint:!0,requiresReauthorization:!0}:e?.account.loggedIn?e.settings.enabled?e.service.running?e.runtime?.state===`connected`?{hero:{badgeStatus:`ready`,badgeLabel:f(`statusReady`),title:f(`remoteStatusReadyTitle`),description:f(`remoteStatusReadyDescription`)},primaryAction:{kind:`repair`,label:f(`remoteReconnectNow`),showRefreshIcon:!0},issueHint:null,shouldShowIssueHint:!1,requiresReauthorization:!1}:e.runtime?.state===`connecting`?{hero:{badgeStatus:`active`,badgeLabel:f(`connecting`),title:f(`remoteStatusConnectingTitle`),description:f(`remoteStatusConnectingDescription`)},primaryAction:{kind:`repair`,label:f(`remoteReconnectNow`),showRefreshIcon:!0},issueHint:null,shouldShowIssueHint:!1,requiresReauthorization:!1}:{hero:{badgeStatus:`warning`,badgeLabel:f(`remoteStateDisconnected`),title:f(`remoteStatusIssueTitle`),description:f(`remoteStatusIssueDescription`)},primaryAction:{kind:`repair`,label:f(`remoteReconnectNow`),showRefreshIcon:!0},issueHint:{title:f(`remoteStatusRecoveryTitle`),body:Ws(e)},shouldShowIssueHint:!!(e.settings.enabled&&e.account.loggedIn),requiresReauthorization:!1}:{hero:{badgeStatus:`warning`,badgeLabel:f(`remoteServiceStopped`),title:f(`remoteStatusNeedsServiceTitle`),description:f(`remoteStatusNeedsServiceDescription`)},primaryAction:{kind:`repair`,label:f(`remoteReconnectNow`),showRefreshIcon:!0},issueHint:{title:f(`remoteStatusRecoveryTitle`),body:f(`remoteStatusIssueDetailServiceStopped`)},shouldShowIssueHint:!0,requiresReauthorization:!1}:{hero:{badgeStatus:`inactive`,badgeLabel:f(`statusInactive`),title:f(`remoteStatusNeedsEnable`),description:f(`remoteStatusNeedsEnableDescription`)},primaryAction:{kind:`enable`,label:f(`remoteEnableNow`),showRefreshIcon:!1},issueHint:null,shouldShowIssueHint:!1,requiresReauthorization:!1}:{hero:{badgeStatus:`setup`,badgeLabel:f(`statusSetup`),title:f(`remoteStatusNeedsSignIn`),description:f(`remoteStatusNeedsSignInDescription`)},primaryAction:{kind:`sign-in-enable`,label:f(`remoteSignInAndEnable`),showRefreshIcon:!1},issueHint:null,shouldShowIssueHint:!1,requiresReauthorization:!1}}var qs=p(e=>({panelOpen:!1,authSessionId:null,authVerificationUri:null,authExpiresAt:null,authStatusMessage:``,authPollIntervalMs:1500,openPanel:()=>e({panelOpen:!0}),closePanel:()=>e({panelOpen:!1}),beginBrowserAuth:({sessionId:t,verificationUri:n,expiresAt:r,intervalMs:i,statusMessage:a})=>e({panelOpen:!0,authSessionId:t,authVerificationUri:n,authExpiresAt:r,authPollIntervalMs:i,authStatusMessage:a}),updateBrowserAuth:({statusMessage:t,intervalMs:n})=>e(e=>({authStatusMessage:t??e.authStatusMessage,authPollIntervalMs:n??e.authPollIntervalMs})),clearBrowserAuth:()=>e({authSessionId:null,authVerificationUri:null,authExpiresAt:null,authStatusMessage:``,authPollIntervalMs:1500}),setAuthStatusMessage:t=>e({authStatusMessage:t})}));function Js({label:e,value:t}){return(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-4 py-2 text-sm`,children:[(0,L.jsx)(`span`,{className:`text-gray-500`,children:e}),(0,L.jsx)(`span`,{className:`text-right text-gray-900`,children:t?.trim()||`-`})]})}function Ys(e){let{email:t,username:n,role:r,canSubmitUsername:i,savingUsername:a,usernameDraft:o,onUsernameDraftChange:s,onSubmitUsername:c,onOpenDeviceList:l,onLogout:u}=e;return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsx)(rn,{tone:`success`,title:f(`accountPanelSignedInTitle`),description:f(`accountPanelSignedInDescription`)}),(0,L.jsxs)(rn,{tone:`neutral`,children:[(0,L.jsx)(Js,{label:f(`remoteAccountEmail`),value:t}),(0,L.jsx)(Js,{label:f(`remoteAccountUsername`),value:n}),(0,L.jsx)(Js,{label:f(`remoteAccountRole`),value:r})]}),n?(0,L.jsx)(`p`,{className:`text-xs text-gray-500`,children:f(`remoteAccountUsernameLockedHelp`)}):(0,L.jsxs)(rn,{tone:`warning`,title:f(`remoteAccountUsernameRequiredTitle`),description:f(`remoteAccountUsernameRequiredDescription`),children:[(0,L.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[(0,L.jsx)(M,{htmlFor:`account-panel-username`,children:f(`remoteAccountUsername`)}),(0,L.jsx)(g,{id:`account-panel-username`,value:o,onChange:e=>s(e.target.value),placeholder:f(`remoteAccountUsernamePlaceholder`),autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1})]}),(0,L.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-3`,children:(0,L.jsx)(be,{disabled:!i,onClick:()=>void c(),children:f(a?`remoteAccountUsernameSaving`:`remoteAccountUsernameSave`)})})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,L.jsxs)(be,{onClick:()=>void l(),children:[(0,L.jsx)(ys,{className:`mr-2 h-4 w-4`}),f(`remoteOpenDeviceList`)]}),(0,L.jsxs)(be,{variant:`outline`,onClick:()=>void u(),children:[(0,L.jsx)(Jo,{className:`mr-2 h-4 w-4`}),f(`remoteLogout`)]})]})]})}function Xs(e){let{authSessionId:t,authExpiresAt:n,authStatusMessage:r,authVerificationUri:i,onStartBrowserSignIn:a,onResumeBrowserSignIn:o}=e;return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsx)(rn,{tone:`neutral`,title:f(`accountPanelSignedOutTitle`),description:f(`accountPanelSignedOutDescription`),children:t?(0,L.jsxs)(`div`,{className:`mt-3 border-t border-white/80 pt-3`,children:[(0,L.jsx)(Js,{label:f(`remoteBrowserAuthSession`),value:t}),(0,L.jsx)(Js,{label:f(`remoteBrowserAuthExpiresAt`),value:n?l(n):`-`})]}):null}),r?(0,L.jsx)(`p`,{className:`text-sm text-gray-600`,children:r}):null,(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,L.jsx)(be,{onClick:()=>void a(),children:f(t?`remoteBrowserAuthActionRetry`:`remoteBrowserAuthAction`)}),i?(0,L.jsx)(be,{variant:`outline`,onClick:()=>void o(),children:f(`remoteBrowserAuthResume`)}):null]})]})}function Zs(){let e=_4(),t=ks(),n=qs(e=>e.panelOpen),r=qs(e=>e.authSessionId),i=qs(e=>e.authVerificationUri),a=qs(e=>e.authExpiresAt),o=qs(e=>e.authStatusMessage),s=t.data,[c,l]=(0,I.useState)(``),[u,d]=(0,I.useState)(!1);(0,I.useEffect)(()=>{e.accountManager.syncRemoteStatus(s)},[e,s]);let p=!u&&c.trim().length>0&&!s?.account.username;return(0,L.jsx)(ct,{open:n,onOpenChange:t=>t?e.accountManager.openAccountPanel():e.accountManager.closeAccountPanel(),children:(0,L.jsxs)(ut,{className:`max-w-xl`,children:[(0,L.jsxs)(lt,{children:[(0,L.jsxs)(dt,{className:`flex items-center gap-2`,children:[(0,L.jsx)(bn,{className:`h-5 w-5 text-primary`}),f(`accountPanelTitle`)]}),(0,L.jsx)(st,{children:f(`accountPanelDescription`)})]}),s?.account.loggedIn?(0,L.jsx)(Ys,{email:s.account.email,username:s.account.username,role:s.account.role,canSubmitUsername:p,savingUsername:u,usernameDraft:c,onUsernameDraftChange:l,onSubmitUsername:async()=>{d(!0);try{await e.accountManager.updateUsername(c)}finally{d(!1)}},onOpenDeviceList:()=>e.accountManager.openNextClawWeb(`/account`),onLogout:()=>e.accountManager.logout()}):(0,L.jsx)(Xs,{authSessionId:r,authExpiresAt:a,authStatusMessage:o,authVerificationUri:i,onStartBrowserSignIn:()=>e.accountManager.startBrowserSignIn(),onResumeBrowserSignIn:()=>e.accountManager.resumeBrowserSignIn()})]})})}function Qs({username:e}){let t=Je(),[n,r]=(0,I.useState)(e??``),[i,a]=(0,I.useState)(``),o=n.trim().length>0&&i.length>0&&!t.isPending;return(0,L.jsx)(`main`,{className:`flex min-h-screen items-center justify-center bg-secondary px-6 py-10`,children:(0,L.jsxs)(C,{hover:!1,className:`w-full max-w-md shadow-card-hover`,children:[(0,L.jsxs)(D,{children:[(0,L.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-gray-500`,children:f(`authBrand`)}),(0,L.jsx)(ue,{className:`text-2xl`,children:f(`authLoginTitle`)}),(0,L.jsx)(Re,{children:f(`authLoginDescription`)})]}),(0,L.jsx)(O,{children:(0,L.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{e?.preventDefault(),o&&t.mutate({username:n.trim(),password:i})},children:[(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-gray-800`,children:f(`authUsername`)}),(0,L.jsx)(g,{value:n,onChange:e=>r(e.target.value),placeholder:f(`authUsernamePlaceholder`),autoFocus:!0})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium text-gray-800`,children:f(`authPassword`)}),(0,L.jsx)(g,{type:`password`,value:i,onChange:e=>a(e.target.value),placeholder:f(`authPasswordPlaceholder`)})]}),(0,L.jsx)(be,{type:`submit`,className:`w-full`,disabled:!o,children:t.isPending?f(`authLoggingIn`):f(`authLoginAction`)})]})})]})})}var $s=class{constructor(){this.authPollTimerId=null,this.browserSignInCompletion=null,this.openAccountPanel=()=>{qs.getState().openPanel()},this.closeAccountPanel=()=>{qs.getState().closePanel()},this.syncRemoteStatus=e=>{e?.account.loggedIn&&(this.clearPollTimer(),this.resolveBrowserSignIn(e),qs.getState().clearBrowserAuth())},this.ensureSignedIn=async e=>{let t=e?.status??await Fs();return t.account.loggedIn?t:(this.openAccountPanel(),await this.startBrowserSignInAndWait({apiBase:e?.apiBase,status:t}))},this.startBrowserSignInAndWait=async e=>{let t=this.createBrowserSignInCompletion();return await this.startBrowserSignIn(e),await t},this.startBrowserSignIn=async e=>{try{let t=e?.apiBase,n=await ye({apiBase:Ls(e?.status??await Fs(),t)});qs.getState().beginBrowserAuth({sessionId:n.sessionId,verificationUri:n.verificationUri,expiresAt:n.expiresAt,intervalMs:n.intervalMs,statusMessage:f(`remoteBrowserAuthWaiting`)}),(await Nn.openExternalUrl(n.verificationUri)).opened||qs.getState().setAuthStatusMessage(f(`remoteBrowserAuthPopupBlocked`)),this.scheduleBrowserAuthPoll()}catch(e){let t=e instanceof Error?e.message:f(`remoteBrowserAuthStartFailed`);this.rejectBrowserSignIn(e),P.error(`${f(`remoteBrowserAuthStartFailed`)}: ${t}`)}},this.resumeBrowserSignIn=async()=>{let e=qs.getState().authVerificationUri;e&&await Nn.openExternalUrl(e)},this.logout=async()=>{try{await Ae(),this.rejectBrowserSignIn(Error(`Signed out before browser sign-in completed.`)),qs.getState().clearBrowserAuth(),await Is(),P.success(f(`remoteLogoutSuccess`))}catch(e){let t=e instanceof Error?e.message:f(`remoteLogoutFailed`);P.error(`${f(`remoteLogoutFailed`)}: ${t}`)}},this.updateUsername=async e=>{try{await Se({username:e.trim()}),await Is(),P.success(f(`remoteAccountUsernameSetSuccess`))}catch(e){let t=e instanceof Error?e.message:f(`remoteAccountUsernameSetFailed`);P.error(`${f(`remoteAccountUsernameSetFailed`)}: ${t}`)}},this.openNextClawWeb=async(e=`/`)=>{let t=zs(await Fs());if(!t){P.error(f(`remoteOpenWebUnavailable`));return}let n=new URL(e,`${t.replace(/\/+$/,``)}/`).toString();await Nn.openExternalUrl(n)},this.scheduleBrowserAuthPoll=()=>{this.clearPollTimer();let{authSessionId:e,authPollIntervalMs:t}=qs.getState();e&&(this.authPollTimerId=window.setTimeout(async()=>{await this.pollBrowserSignIn()},t))},this.pollBrowserSignIn=async()=>{let e=qs.getState();if(e.authSessionId)try{let t=await Fs(),n=await We({sessionId:e.authSessionId,apiBase:Ls(t)});if(n.status===`pending`){qs.getState().updateBrowserAuth({statusMessage:f(`remoteBrowserAuthWaiting`),intervalMs:n.nextPollMs??1500}),this.scheduleBrowserAuthPoll();return}if(n.status===`expired`){this.clearPollTimer(),this.rejectBrowserSignIn(Error(n.message||f(`remoteBrowserAuthExpired`))),qs.getState().clearBrowserAuth(),P.error(n.message||f(`remoteBrowserAuthExpired`));return}qs.getState().setAuthStatusMessage(f(`remoteBrowserAuthCompleted`));let r=await Is();this.clearPollTimer(),this.resolveBrowserSignIn(r),qs.getState().clearBrowserAuth(),P.success(f(`remoteLoginSuccess`))}catch(e){this.clearPollTimer(),this.rejectBrowserSignIn(e),qs.getState().clearBrowserAuth();let t=e instanceof Error?e.message:f(`remoteBrowserAuthPollFailed`);P.error(`${f(`remoteBrowserAuthPollFailed`)}: ${t}`)}},this.clearPollTimer=()=>{this.authPollTimerId!==null&&(window.clearTimeout(this.authPollTimerId),this.authPollTimerId=null)},this.createBrowserSignInCompletion=()=>(this.rejectBrowserSignIn(Error(`Browser sign-in was replaced by a newer request.`)),new Promise((e,t)=>{this.browserSignInCompletion={resolve:e,reject:t}})),this.resolveBrowserSignIn=e=>{let t=this.browserSignInCompletion;t&&(this.browserSignInCompletion=null,t.resolve(e))},this.rejectBrowserSignIn=e=>{let t=this.browserSignInCompletion;t&&(this.browserSignInCompletion=null,t.reject(e instanceof Error?e:Error(String(e))))},this.getBrowserAuthSummary=()=>{let e=qs.getState();return{sessionId:e.authSessionId,expiresAt:e.authExpiresAt?l(e.authExpiresAt):`-`}}}};function ec({parentSessionLabel:e,onGoToParentSession:t}){if(!e)return null;let n=e.trim();return(0,L.jsx)(`div`,{className:`bg-background/75 px-4 py-2 backdrop-blur-sm sm:px-5`,children:(0,L.jsxs)(`button`,{type:`button`,onClick:t,className:`inline-flex items-center gap-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,children:[(0,L.jsx)(pt,{className:`h-3.5 w-3.5`}),(0,L.jsxs)(`span`,{children:[f(`chatBackToParent`),n?` · ${n}`:``]})]})})}function tc({layoutMode:e,actions:t,leading:n,onBackToList:r,projectBadge:i,sessionTypeBadge:a,shouldShow:o,title:s,titleContent:c}){let l=e===`mobile`;return(0,L.jsxs)(`div`,{"data-testid":`chat-conversation-header`,className:m(`bg-background/80 backdrop-blur-sm flex items-center justify-between shrink-0 overflow-hidden transition-colors duration-200`,l?`px-3 sm:px-3`:`px-4 sm:px-5`,o?`opacity-100`:`h-0 py-0 opacity-0`,o&&(l?`min-h-12 pb-2 pt-2`:`h-[52px]`)),style:l&&o?{paddingTop:`calc(env(safe-area-inset-top, 0px) + 0.5rem)`}:void 0,children:[(0,L.jsxs)(`div`,{className:`min-w-0 flex-1 flex items-center gap-2`,children:[l&&r?(0,L.jsx)(St,{icon:(0,L.jsx)(pt,{className:`h-4 w-4`}),label:f(`chat`),onClick:r,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground`}):null,n,c??(0,L.jsx)(`span`,{className:`text-sm font-medium text-foreground truncate`,children:s}),a,i]}),t]})}function nc(){let e=pe();return async t=>{let{sessionKey:n,patch:r,successMessage:i}=t;try{Ce(e,await S(n,r)),await e.invalidateQueries({queryKey:[`ncp-session-skills`,n]}),P.success(i??f(`configSavedApplied`))}catch(e){throw P.error(f(`configSaveFailed`)+`: `+(e instanceof Error?e.message:String(e))),e}}}function rc(){let e=nc();return async t=>{await e({sessionKey:t.sessionKey,patch:{label:t.label},successMessage:f(`configSavedApplied`)})}}function ic(){let e=nc();return async t=>{let{persistToServer:n,projectRoot:r,sessionKey:i}=t,a=f(r?`chatSessionProjectUpdated`:`chatSessionProjectCleared`);if(!n){P.success(a);return}await e({sessionKey:i,patch:{projectRoot:r},successMessage:a})}}function ac({icon:e,label:t,onClick:n,disabled:r=!1,destructive:i=!1}){return(0,L.jsxs)(`button`,{type:`button`,className:m(`flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50`,i?`text-destructive hover:bg-destructive/10`:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`),onClick:n,disabled:r,children:[(0,L.jsx)(e,{className:`h-4 w-4 shrink-0`}),(0,L.jsx)(`span`,{children:t})]})}function oc(e){try{return JSON.stringify(e??{},null,2)}catch{return`{}`}}function sc({open:e,metadata:t,onOpenChange:n}){return(0,L.jsx)(ct,{open:e,onOpenChange:n,children:(0,L.jsxs)(ut,{className:`max-w-2xl gap-0 overflow-hidden p-0`,children:[(0,L.jsxs)(lt,{className:`border-b border-border px-5 py-4 pr-12`,children:[(0,L.jsx)(dt,{className:`text-base`,children:f(`chatSessionMetadataDialogTitle`)}),(0,L.jsx)(st,{className:`sr-only`,children:f(`chatSessionMetadataDialogDescription`)})]}),(0,L.jsx)(`div`,{className:`px-5 pb-5 pt-4`,children:(0,L.jsx)(`pre`,{className:`max-h-[60vh] overflow-auto rounded-lg border border-border bg-muted/60 p-4 font-mono text-xs leading-6 text-foreground shadow-inner custom-scrollbar`,children:oc(t)})})]})})}function cc(e){return[`server-path-browse`,e.path?.trim()??``,e.basePath?.trim()??``,e.includeFiles??!1]}function lc(e){let{basePath:t,enabled:n,includeFiles:r,path:i}=e,a=i?.trim()??``,o=t?.trim()??``;return Fe({queryKey:cc({path:a,basePath:o,includeFiles:r}),queryFn:()=>ze({path:a,basePath:o,includeFiles:r}),enabled:n??!0,staleTime:0})}function uc(){return ge({mutationFn:Me})}var dc=I.forwardRef(({className:e,children:t,...n},r)=>(0,L.jsx)(`div`,{ref:r,className:m(`overflow-auto`,e),...n,children:t}));dc.displayName=`ScrollArea`;function fc({entries:e,emptyMessage:t,disabled:n,onOpen:r,onSelect:i,selectedPath:a}){let o=(e,t)=>{e.preventDefault();let n=Array.from(e.currentTarget.parentElement?.querySelectorAll(`[data-server-path-row]`)??[]),r=n[n.indexOf(e.currentTarget)+t];r&&(r.focus(),r.click())};return(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-background`,children:[(0,L.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_8rem] border-b border-border bg-muted/20 px-3 py-1.5 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{children:f(`pathPickerNameColumn`)}),(0,L.jsx)(`span`,{children:f(`pathPickerTypeColumn`)})]}),(0,L.jsx)(dc,{className:`min-h-0 flex-1`,children:e.length>0?(0,L.jsx)(`div`,{role:`listbox`,"aria-label":f(`pathPickerDirectoryList`),className:`p-1.5`,children:e.map(e=>{let t=a===e.path;return(0,L.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,"data-server-path-row":!0,className:m(`grid w-full grid-cols-[minmax(0,1fr)_8rem] items-center rounded-sm border border-transparent px-2 py-1.5 text-left text-sm text-foreground outline-none transition-colors`,t?`border-primary/25 bg-primary/15`:`hover:bg-accent/70 focus-visible:border-primary/35 focus-visible:bg-accent/70`),onClick:()=>i(e.path),onDoubleClick:()=>r(e.path),onKeyDown:t=>{t.key===`Enter`&&(t.preventDefault(),r(e.path)),t.key===`ArrowDown`&&o(t,1),t.key===`ArrowUp`&&o(t,-1)},disabled:n,children:[(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(fn,{className:`h-4 w-4 shrink-0 fill-amber-300 text-amber-500`}),(0,L.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,L.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:f(`pathPickerDirectoryType`)})]},e.path)})}):(0,L.jsx)(`div`,{className:`grid h-full min-h-48 place-items-center px-6 text-center text-sm text-muted-foreground`,children:t})})]})}function pc({confirmLabel:e,disabled:t,hint:n,isSaving:r,onCancel:i,onSelectedPathChange:a,pathLabel:o,pathPlaceholder:s,selectedPath:c}){return(0,L.jsxs)(`div`,{className:`min-w-0 border-t border-border bg-muted/20 px-4 py-3`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,L.jsx)(M,{htmlFor:`server-path-picker-selection`,className:`shrink-0 text-sm`,children:o}),(0,L.jsx)(g,{id:`server-path-picker-selection`,value:c,onChange:e=>a(e.target.value),placeholder:s,disabled:r,className:`h-9 min-w-0 flex-1 bg-background`}),(0,L.jsxs)(ot,{className:`shrink-0 flex-row gap-2`,children:[(0,L.jsx)(be,{type:`button`,variant:`outline`,onClick:i,disabled:r,children:f(`cancel`)}),(0,L.jsx)(be,{type:`submit`,disabled:t,children:r?f(`saving`):e})]})]}),n?(0,L.jsx)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:n}):null]})}var mc={applications:Qa,desktop:ts,documents:an,downloads:ln,home:Vo,"icloud-drive":mo,workspace:jo,root:Bo,volumes:Bo},hc={applications:`pathPickerApplications`,desktop:`pathPickerDesktop`,documents:`pathPickerDocuments`,downloads:`pathPickerDownloads`,"icloud-drive":`pathPickerICloudDrive`,volumes:`pathPickerVolumes`};function gc({currentPath:e,defaultWorkspacePath:t,disabled:n,homePath:r,locations:i,rootPath:a,onNavigate:o}){let s=[],c=[],l=new Set,u=(e,t)=>{let n=t.path.trim();!n||l.has(n)||(l.add(n),e.push({...t,path:n}))};t&&u(s,{icon:`workspace`,label:f(`pathPickerDefaultWorkspace`),path:t}),r&&u(s,{icon:`home`,label:f(`homeDirectory`),path:r});for(let e of i)u(e.kind===`volumes`?c:s,{icon:e.kind,label:f(hc[e.kind]),path:e.path});a&&u(c,{icon:`root`,label:f(`pathPickerFileSystem`),path:a});let d=t=>t.map(t=>{let r=mc[t.icon],i=e===t.path;return(0,L.jsxs)(`button`,{type:`button`,className:m(`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,i?`bg-primary/12 text-primary`:`text-foreground hover:bg-accent`),"aria-current":i?`location`:void 0,onClick:()=>o(t.path),disabled:n,children:[(0,L.jsx)(r,{className:m(`h-4 w-4 shrink-0`,i?`text-primary`:`text-amber-500`)}),(0,L.jsx)(`span`,{className:`truncate`,children:t.label})]},t.path)});return(0,L.jsxs)(`aside`,{className:`hidden min-h-0 w-48 shrink-0 overflow-y-auto border-r border-border bg-muted/20 p-2 sm:block`,children:[(0,L.jsxs)(`div`,{className:`mb-1 flex items-center gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground`,children:[(0,L.jsx)(xs,{className:`h-3.5 w-3.5`}),f(`pathPickerQuickAccess`)]}),(0,L.jsx)(`nav`,{"aria-label":f(`pathPickerQuickAccess`),className:`space-y-0.5`,children:d(s)}),c.length>0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`mb-1 mt-3 px-2 py-1.5 text-xs font-medium text-muted-foreground`,children:f(`pathPickerLocations`)}),(0,L.jsx)(`nav`,{"aria-label":f(`pathPickerLocations`),className:`space-y-0.5`,children:d(c)})]}):null]})}function _c({addressPath:e,breadcrumbs:t,canGoBack:n,canGoForward:r,canGoUp:i,disabled:a,onBack:o,onForward:s,onNavigate:c,onRefresh:l,onSearchChange:u,onUp:d,searchText:p}){let[m,h]=(0,I.useState)(!1),[_,v]=(0,I.useState)(``),y=t.length>5?[t[0],...t.slice(-4)]:t,b=y.length<t.length,x=()=>{a||(v(e),h(!0))},S=()=>{v(``),h(!1)},C=()=>{let e=_.trim();e&&(h(!1),c(e))};return(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden border-b border-border bg-muted/25 px-3 py-2`,children:[(0,L.jsx)(St,{icon:(0,L.jsx)(pt,{className:`h-4 w-4`}),label:f(`pathPickerBack`),size:`lg`,onClick:o,disabled:!n||a}),(0,L.jsx)(St,{icon:(0,L.jsx)(jt,{className:`h-4 w-4`}),label:f(`pathPickerForward`),size:`lg`,onClick:s,disabled:!r||a}),(0,L.jsx)(St,{icon:(0,L.jsx)(Fo,{className:`h-4 w-4`}),label:f(`parentDirectory`),size:`lg`,onClick:d,disabled:!i||a}),(0,L.jsx)(`div`,{className:`ml-1 flex h-9 min-w-0 flex-1 items-center overflow-hidden rounded-md border border-border bg-background shadow-sm focus-within:ring-1 focus-within:ring-primary/50`,children:m?(0,L.jsx)(g,{value:_,onChange:e=>v(e.target.value),onBlur:S,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),C()),e.key===`Escape`&&(e.preventDefault(),S())},"aria-label":f(`pathPickerAddressLabel`),className:`h-full rounded-none border-0 bg-transparent px-3 shadow-none focus-visible:ring-0`,autoFocus:!0}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fn,{className:`ml-3 h-4 w-4 shrink-0 text-amber-500`}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center overflow-hidden pl-2`,onDoubleClick:x,children:[y.length>0?y.map((e,t)=>(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center`,children:[t>0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(so,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),b&&t===1?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,className:`rounded px-1.5 py-1 text-sm text-muted-foreground hover:bg-accent`,"aria-label":f(`pathPickerShowFullAddress`),onClick:x,children:`…`}),(0,L.jsx)(so,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`})]}):null]}):null,(0,L.jsx)(`button`,{type:`button`,className:`max-w-40 truncate rounded px-1.5 py-1 text-sm text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>c(e.path),disabled:a,children:e.label})]},e.path)):(0,L.jsx)(`span`,{className:`truncate text-sm text-foreground`,children:e}),(0,L.jsx)(`span`,{className:`h-full min-w-2 flex-1 cursor-text`,"aria-hidden":`true`}),(0,L.jsx)(St,{icon:(0,L.jsx)(cs,{className:`h-3.5 w-3.5`}),label:f(`pathPickerEditAddress`),size:`md`,tooltipSide:`bottom`,onClick:x,disabled:a,className:`mr-1`})]})]})}),(0,L.jsx)(St,{icon:(0,L.jsx)(fs,{className:`h-4 w-4`}),label:f(`chatRefresh`),size:`lg`,onClick:l,disabled:a}),(0,L.jsxs)(`div`,{className:`relative hidden w-56 shrink-0 sm:block`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,L.jsx)(g,{value:p,onChange:e=>u(e.target.value),placeholder:f(`pathPickerSearchPlaceholder`),disabled:a,className:`h-9 rounded-md bg-background pl-9`})]})]})}function vc({errorMessage:e,isCreating:t,name:n,onCancel:r,onCreate:i,onNameChange:a}){return(0,L.jsxs)(`div`,{className:`border-b border-gray-200 bg-white px-3 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(g,{value:n,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),i()),e.key===`Escape`&&r()},placeholder:f(`pathPickerNewFolderPlaceholder`),"aria-label":f(`pathPickerNewFolderName`),autoFocus:!0,disabled:t}),(0,L.jsx)(be,{type:`button`,onClick:i,disabled:!n.trim()||t,children:f(t?`saving`:`pathPickerCreateFolder`)}),(0,L.jsx)(be,{type:`button`,variant:`outline`,onClick:r,disabled:t,children:f(`cancel`)})]}),e?(0,L.jsxs)(`p`,{role:`alert`,className:`mt-2 text-sm text-destructive`,children:[f(`pathPickerCreateFolderFailed`),`: `,e]}):null]})}function yc({disabled:e,onNewFolder:t}){return(0,L.jsxs)(`div`,{className:`flex items-center border-b border-border bg-background px-3 py-1.5`,children:[(0,L.jsxs)(be,{type:`button`,variant:`ghost`,size:`sm`,onClick:t,disabled:e,children:[(0,L.jsx)(No,{className:`mr-1 h-4 w-4`}),f(`pathPickerNewFolder`)]}),(0,L.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:f(`pathPickerDoubleClickHint`)})]})}function bc(e,t){if(!t)return e;if(e===`~`)return t;let n=t.includes(`\\`);if(e.startsWith(`~/`)||n&&e.startsWith(`~\\`)){let r=n?`\\`:`/`,i=e.slice(2).replaceAll(r===`\\`?`/`:`\\`,r);return`${t.replace(/[\\/]+$/,``)}${r}${i}`}return e}function xc({open:e,currentPath:t,defaultWorkspacePath:n,isSaving:r,onOpenChange:i,onConfirm:a,title:o,description:s,pathLabel:c,pathPlaceholder:l,confirmLabel:u,hint:d}){let f=t?.trim()??``,p=n?.trim()??``,m=`${f}\u0000${p}`;return(0,L.jsx)(ct,{open:e,onOpenChange:e=>{r||i(e)},children:(0,L.jsxs)(ut,{className:`max-h-[92vh] overflow-hidden p-0 sm:h-[44rem] sm:max-w-5xl sm:grid-rows-[auto_minmax(0,1fr)]`,children:[(0,L.jsxs)(lt,{className:`border-b border-border px-5 py-4 pr-12`,children:[(0,L.jsx)(dt,{children:o}),(0,L.jsx)(st,{className:s?void 0:`sr-only`,children:s??o})]}),e?(0,L.jsx)(Sc,{currentPath:f,defaultWorkspacePath:p,isSaving:r,onCancel:()=>i(!1),onConfirm:a,pathLabel:c,pathPlaceholder:l,confirmLabel:u,hint:d},m):null]})})}function Sc({currentPath:e,defaultWorkspacePath:t,isSaving:n,onCancel:r,onConfirm:i,pathLabel:a,pathPlaceholder:o,confirmLabel:s,hint:c}){let l=e||t,[u,d]=(0,I.useState)(l||null),[p,m]=(0,I.useState)(l||null),[h,_]=(0,I.useState)([]),[v,y]=(0,I.useState)([]),[b,x]=(0,I.useState)(``),[S,C]=(0,I.useState)(!1),[w,T]=(0,I.useState)(``),E=lc({path:p,enabled:!0}),D=uc(),O=bc(p?.trim()??``,E.data?.homePath),k=u===null?E.data?.currentPath??``:u===p&&E.data?.currentPath===O?E.data.currentPath:u,A=k.trim(),ee=A.length===0||n,j=O||E.data?.currentPath||``,M=!p||E.data?.currentPath===j?E.data?.breadcrumbs??[]:[],N=(0,I.useMemo)(()=>E.error?E.error instanceof Error?E.error.message:String(E.error):null,[E.error]),te=(0,I.useMemo)(()=>D.error?D.error instanceof Error?D.error.message:String(D.error):null,[D.error]),ne=w.trim().toLowerCase(),re=(0,I.useMemo)(()=>(E.data?.entries??[]).filter(e=>e.kind===`directory`),[E.data?.entries]),ie=(0,I.useMemo)(()=>ne.length===0?re:re.filter(e=>{let t=e.name.toLowerCase(),n=e.path.toLowerCase();return t.includes(ne)||n.includes(ne)}),[re,ne]),ae=e=>{m(e),d(e),T(``),C(!1),x(``),D.reset()},oe=e=>{let t=e.trim();if(!t)return;let n=j;n&&n!==t&&_(e=>[...e,n].slice(-50)),y([]),ae(t)},se=()=>{let e=h.at(-1);if(!e)return;let t=j;_(e=>e.slice(0,-1)),t&&y(e=>[t,...e].slice(0,50)),ae(e)},ce=()=>{let e=v[0];if(!e)return;let t=j;y(e=>e.slice(1)),t&&_(e=>[...e,t].slice(-50)),ae(e)},le=async()=>{let e=E.data?.currentPath,t=b.trim();if(!(!e||!t||D.isPending))try{let n=await D.mutateAsync({parentPath:e,name:t});await E.refetch(),d(n.path),x(``),C(!1)}catch{}},ue=E.isLoading?f(`loading`):N?`${f(`pathBrowseFailed`)}: ${N}`:re.length>0?f(`pathPickerSearchEmpty`):f(`emptyDirectory`),de=n||E.isLoading;return(0,L.jsxs)(`form`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden`,onSubmit:e=>{e.preventDefault(),!ee&&i(A)},children:[(0,L.jsx)(_c,{addressPath:j,breadcrumbs:M,canGoBack:h.length>0,canGoForward:v.length>0,canGoUp:!!E.data?.parentPath,disabled:de,onBack:se,onForward:ce,onNavigate:oe,onRefresh:()=>void E.refetch(),onSearchChange:T,onUp:()=>{let e=E.data?.parentPath;e&&oe(e)},searchText:w}),(0,L.jsx)(yc,{disabled:de||!E.data?.currentPath,onNewFolder:()=>{C(!0),x(``),D.reset()}}),(0,L.jsxs)(`div`,{className:`relative border-b border-border p-2 sm:hidden`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,L.jsx)(g,{value:w,onChange:e=>T(e.target.value),placeholder:f(`pathPickerSearchPlaceholder`),disabled:de,className:`h-9 pl-9`})]}),S?(0,L.jsx)(vc,{errorMessage:te,isCreating:D.isPending,name:b,onCancel:()=>C(!1),onCreate:()=>void le(),onNameChange:e=>{x(e),D.reset()}}):null,(0,L.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,children:[(0,L.jsx)(gc,{currentPath:j,defaultWorkspacePath:bc(t,E.data?.homePath)||null,disabled:de,homePath:E.data?.homePath,locations:E.data?.locations??[],rootPath:E.data?.breadcrumbs[0]?.path,onNavigate:oe}),(0,L.jsx)(fc,{entries:ie,emptyMessage:ue,disabled:n,onOpen:oe,onSelect:d,selectedPath:A})]}),(0,L.jsx)(pc,{confirmLabel:s,disabled:ee,hint:c,isSaving:n,onCancel:r,onSelectedPathChange:d,pathLabel:a,pathPlaceholder:o,selectedPath:k})]})}function Cc({open:e,currentProjectRoot:t,defaultWorkspacePath:n,isSaving:r,onOpenChange:i,onSave:a}){return(0,L.jsx)(xc,{open:e,currentPath:t,defaultWorkspacePath:n,isSaving:r,onOpenChange:i,onConfirm:a,title:f(`chatSessionProjectDialogTitle`),description:f(`chatSessionProjectDialogDescription`),pathLabel:f(`chatSessionProjectPathLabel`),pathPlaceholder:f(`chatSessionProjectPathPlaceholder`),confirmLabel:f(`chatSessionSetProject`),hint:f(`chatSessionProjectUpdateHint`)})}var wc=`flex shrink-0 items-center gap-1.5`;function Tc({sessionKey:e,canDeleteSession:t,isDeletePending:n,currentPath:r,defaultWorkspacePath:i,metadata:a,isWorkspaceOpen:o,onToggleWorkspace:s,onDeleteSession:c}){let l=ic(),[u,d]=(0,I.useState)(!1),[p,m]=(0,I.useState)(!1),[h,g]=(0,I.useState)(!1),[_,v]=(0,I.useState)(!1),y=n||_,b=async n=>{let r=t;v(!0);try{await l({sessionKey:e,projectRoot:n,persistToServer:r}),m(!1),d(!1)}finally{v(!1)}};return(0,L.jsxs)(`div`,{className:wc,children:[(0,L.jsxs)(it,{open:u,onOpenChange:d,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(St,{icon:(0,L.jsx)(bt,{className:`h-4 w-4`}),label:f(`chatSessionMoreActions`),tooltip:!1,disabled:y})}),(0,L.jsx)(nt,{align:`end`,className:`w-56 p-2`,children:(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(ac,{icon:Mo,label:f(`chatSessionSetProject`),onClick:()=>{d(!1),m(!0)},disabled:y}),(0,L.jsx)(ac,{icon:ro,label:f(`chatSessionViewMetadata`),onClick:()=>{d(!1),g(!0)},disabled:y}),(0,L.jsx)(ac,{icon:kn,label:f(`chatDeleteSession`),onClick:()=>{d(!1),c()},disabled:!t||y,destructive:!0})]})})]}),(0,L.jsx)(St,{icon:o?(0,L.jsx)(as,{className:`h-4 w-4`}):(0,L.jsx)(xt,{className:`h-4 w-4`}),label:f(o?`chatSessionCloseWorkspace`:`chatSessionOpenWorkspace`),"aria-pressed":o,onClick:s,disabled:y}),(0,L.jsx)(Cc,{open:p,currentProjectRoot:r,defaultWorkspacePath:i,isSaving:_,onOpenChange:m,onSave:b}),(0,L.jsx)(sc,{open:h,metadata:a,onOpenChange:g})]})}var Ec={maxHeight:Ze(`18rem`)};function Dc({sessionKey:e,projectName:t,projectRoot:n,defaultWorkspacePath:r,persistToServer:i}){let a=ic(),[o,s]=(0,I.useState)(!1),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1),p=async t=>{d(!0);try{await a({sessionKey:e,projectRoot:t,persistToServer:i}),l(!1),s(!1)}finally{d(!1)}};return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(it,{open:o,onOpenChange:s,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,title:n??void 0,className:`min-w-0 max-w-[320px] shrink rounded-full border border-border bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground transition-colors hover:border-primary/35 hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-60`,"aria-label":f(`chatSessionSetProject`),disabled:u,children:(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,L.jsx)(Mo,{className:`h-3.5 w-3.5 shrink-0`}),(0,L.jsx)(`span`,{className:`truncate`,children:t}),(0,L.jsx)(Nt,{className:`h-3 w-3 shrink-0 opacity-70`})]})})}),(0,L.jsxs)(nt,{align:`start`,className:`w-72 p-2`,style:Ec,children:[(0,L.jsxs)(`div`,{className:`px-3 pb-2 pt-1`,children:[(0,L.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wider text-muted-foreground`,children:t}),n?(0,L.jsx)(`div`,{className:`mt-1 break-all text-xs text-muted-foreground`,children:n}):null]}),(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(ac,{icon:cs,label:f(`chatSessionSetProject`),onClick:()=>{s(!1),l(!0)},disabled:u}),(0,L.jsx)(ac,{icon:Io,label:f(`chatSessionClearProject`),onClick:()=>{p(null)},disabled:u})]})]})]}),(0,L.jsx)(Cc,{open:c,currentProjectRoot:n,defaultWorkspacePath:r,isSaving:u,onOpenChange:l,onSave:p})]})}var Oc=(0,I.createContext)(null);function kc({presenter:e,children:t}){return(0,L.jsx)(Oc.Provider,{value:e,children:t})}function Ac(){let e=(0,I.useContext)(Oc);if(!e)throw Error(`usePresenter must be used inside ChatPresenterProvider`);return e}function jc(e){let t=e.label?.trim();if(t)return t;let n=e.key.split(`:`);return n[n.length-1]||e.key}function Mc(e){let t=e.activityPreview;return!t||t.state===`cancelled`?null:t.state===`failed`||t.state===`running`?t.statusText??t.replyText??null:t.state===`completed`?t.replyText??t.statusText??null:t.statusText??t.replyText??null}function Nc(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function Pc(e,t){return e.getFullYear()===t.getFullYear()}function Fc(e,t){let n=`${e.getMonth()+1}月${e.getDate()}日`;return Pc(e,t)?n:`${e.getFullYear()}年${n}`}function Ic(e,t=r(),n=new Date){if(!e)return`-`;let i=e instanceof Date?e:new Date(e);if(Number.isNaN(i.getTime()))return typeof e==`string`?e:`-`;let a=u(t),o=Nc(i),s=Nc(n),c=Math.floor((s-o)/864e5);if(c===0)return new Intl.DateTimeFormat(a,{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(i);if(c===1)return f(`chatSidebarYesterday`,t);if(c>1&&c<7)return new Intl.DateTimeFormat(a,{weekday:`long`}).format(i);if(t===`zh`)return Fc(i,n);let l=Pc(i,n)?{month:`numeric`,day:`numeric`}:{year:`numeric`,month:`numeric`,day:`numeric`};return new Intl.DateTimeFormat(a,l).format(i)}function Lc(e){return e.trim().toLowerCase()}function Rc(e,t){let n=Lc(t);return n?[e.key,jc(e),e.projectRoot??``,e.projectName??``].map(Lc).some(e=>e.includes(n)):!0}var zc=function(e){return e.CALL=`call`,e.RESULT=`result`,e.PARTIAL_CALL=`partial-call`,e.ERROR=`error`,e.CANCELLED=`cancelled`,e}({});function Bc(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function Vc(e){return Bc(e)}function Hc(e){let t=Bc(e);if(!t)return null;let n=t.replace(/[\\/]+$/,``);if(!n)return t;let r=n.split(/[\\/]/).filter(Boolean);return r[r.length-1]??n}function Uc(e){return/^[A-Za-z]:[\\/]?$/.test(e)||e===`/`?e:e.replace(/[\\/]+$/,``)}function Wc(e){let t=Uc(e.trim().replace(/\\/g,`/`));return/^[A-Za-z]:/.test(t)?`${t.slice(0,1).toLowerCase()}${t.slice(1)}`:t}function Gc(e,t){if(!e)return t.join(`/`);let n=Uc(e.trim().replace(/\\/g,`/`));return t.length===0?n:n===`/`?`/${t.join(`/`)}`:`${n}/${t.join(`/`)}`}function Kc(e){let t=Uc(e.trim().replace(/\\/g,`/`));if(!t||t===`/`||/^[A-Za-z]:[\\/]?$/.test(t))return null;let n=t.lastIndexOf(`/`);if(n<0)return null;if(n===0)return`/`;let r=t.slice(0,n);return/^[A-Za-z]:$/.test(r)?`${r}/`:r}function qc(e){let t=e.trim().replace(/\\/g,`/`);return t?/^[A-Za-z]:\//.test(t)?{prefix:t.slice(0,2),segments:t.slice(3).split(`/`).filter(Boolean)}:t.startsWith(`/`)?{prefix:`/`,segments:t.slice(1).split(`/`).filter(Boolean)}:{prefix:null,segments:t.split(`/`).filter(Boolean)}:{prefix:null,segments:[]}}function Jc(e){let t=Wc(e.path),n=Wc(e.sessionProjectRoot);if(!t||!n)return null;if(!t.startsWith(`/`)&&!/^[A-Za-z]:\//.test(t))return t.split(`/`).filter(Boolean);if(t===n)return[];let r=n.endsWith(`/`)?n:`${n}/`;return t.startsWith(r)?t.slice(r.length).split(`/`).filter(Boolean):null}function Yc(e){let{basePath:t=null,currentKind:n=`file`,labels:r,leading:i=null}=e,a=r.map((e,i)=>{let a=i===r.length-1?n:`directory`,o=Gc(t,r.slice(0,i+1));return{key:`${i}:${e}`,label:e,kind:a,path:o,browsePath:a===`file`?Kc(o):o,isCurrent:i===r.length-1}});return i?[i,...a]:a}function Xc(e){let{kind:t=`file`,path:n,sessionProjectRoot:r,truncated:i}=e,a=n.trim(),o=r?.trim()&&a?Jc({path:a,sessionProjectRoot:r}):null,s;if(r?.trim()&&o){let e=r.trim(),n=Hc(e)??e;s=Yc({labels:o,basePath:e,currentKind:t,leading:{key:`workspace:${n}`,label:n,kind:`workspace`,path:e,browsePath:e,isCurrent:o.length===0}})}else{let{prefix:e,segments:n}=qc(a),r=e===`/`?`/`:e?`${e}/`:null;s=Yc({labels:n,basePath:r,currentKind:t,leading:e?{key:`root:${e}`,label:e,kind:`root`,path:r??e,browsePath:r??e,isCurrent:n.length===0}:null})}return s.length===0&&(s=[{key:`file:unknown`,label:a||`file`,kind:t,path:a,browsePath:t===`directory`?a:Kc(a),isCurrent:!0}]),{fullPath:a,truncated:i,segments:s}}var Zc=new Set([`off`,`minimal`,`low`,`medium`,`high`,`adaptive`,`xhigh`]),Qc=new Set([`running`,`completed`,`failed`,`cancelled`,`idle`]);function $c(e){if(typeof e==`string`)return e;try{return JSON.stringify(e??{})}catch{return String(e??``)}}function el(e){return`${T}/api/ncp/assets/content?${new URLSearchParams({uri:e}).toString()}`}function tl(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function nl(e){let{metadata:t}=e;return!t||typeof t!=`object`||Array.isArray(t)?null:t}function rl(e){let t=nl(e)?.last_activity_preview;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t,{state:r}=n,i=tl(n.timestamp);if(!Qc.has(r)||!i)return null;let a=tl(n.statusText),o=tl(n.replyText);return{state:r,timestamp:i,...a?{statusText:a}:{},...o?{replyText:o}:{}}}function il(e){let t=nl(e);return t?tl(t.preferred_model)??tl(t.preferredModel)??tl(t.model):null}function al(e){let t=nl(e);if(!t)return null;let n=tl(t.preferred_thinking)??tl(t.thinking)??tl(t.thinking_level)??tl(t.thinkingLevel);if(!n)return null;let r=n.toLowerCase();return Zc.has(r)?r:null}function ol(e){let t=nl(e);return t?tl(t.label):null}function sl(e){let t=nl(e);return t?Vc(t.project_root??t.projectRoot):null}function cl(e){return tl(e.workingDir)}function ll(e){let t=nl(e);return t?tl(t.ui_last_read_at):null}function ul(e){let t=nl(e);return t?tl(t.runtime)??tl(t.session_type)??tl(t.sessionType)??`native`:`native`}function dl(e){let t=nl(e);return t?tl(t.parent_session_id)??tl(t.parentSessionId):null}function fl(e){let t=nl(e);return t?tl(t.spawned_by_request_id)??tl(t.spawnedByRequestId):null}function pl(e){let t=nl(e);return t?t.child_session_promoted===!0:!1}function ml(e){if(e.startsWith(`cron:`))return{type:`cron`};if(e.startsWith(`agent:`)){let t=e.split(`:`);if(t.length>=3){let e=t[2];if(e&&e!==`main`&&e!==`direct`)return{channel:e}}}return{}}function hl(e){return e.state===`cancelled`?zc.CANCELLED:e.state===`result`?zc.RESULT:e.state===`partial-call`?zc.PARTIAL_CALL:zc.CALL}function gl(e){let t=[];for(let n of e){if(n.type===`text`){t.push({type:`text`,text:n.text});continue}if(n.type===`rich-text`){t.push({type:`text`,text:n.text});continue}if(n.type===`reasoning`){t.push({type:`reasoning`,reasoning:n.text,details:[]});continue}if(n.type===`source`){t.push({type:`source`,source:{sourceType:`url`,id:n.url??n.title??Math.random().toString(36).slice(2,8),url:n.url??``,...n.title?{title:n.title}:{}}});continue}if(n.type===`file`&&n.contentBase64){t.push({type:`file`,...n.name?{name:n.name}:{},mimeType:n.mimeType??`application/octet-stream`,data:n.contentBase64,...n.url?{url:n.url}:{},...typeof n.sizeBytes==`number`?{sizeBytes:n.sizeBytes}:{}});continue}if(n.type===`file`&&n.url){t.push({type:`file`,...n.name?{name:n.name}:{},mimeType:n.mimeType??`application/octet-stream`,data:``,url:n.url,...typeof n.sizeBytes==`number`?{sizeBytes:n.sizeBytes}:{}});continue}if(n.type===`file`&&n.assetUri){t.push({type:`file`,...n.name?{name:n.name}:{},mimeType:n.mimeType??`application/octet-stream`,data:``,url:el(n.assetUri),...typeof n.sizeBytes==`number`?{sizeBytes:n.sizeBytes}:{}});continue}if(n.type===`step-start`){t.push({type:`step-start`});continue}n.type===`tool-invocation`&&t.push({type:`tool-invocation`,toolInvocation:{status:hl(n),toolCallId:n.toolCallId??`${n.toolName}-${Math.random().toString(36).slice(2,8)}`,toolName:n.toolName,args:$c(n.args),result:n.result}})}return t}function _l(e){return e===`service`?`system`:e===`tool`?`assistant`:e}function vl(e){return{id:e.id,role:_l(e.role),parts:gl(e.parts),meta:{source:`stream`,status:e.status,sessionKey:e.sessionId,timestamp:e.timestamp}}}function yl(e){let t=nl(e),n=ol(e),r=il(e),i=al(e),a=sl(e),o=cl(e)??a,s=ll(e),c=tl(e.lastMessageAt),l=Hc(a),u=ml(e.sessionId),d=dl(e),f=fl(e),p=pl(e),m=rl(e);return{key:e.sessionId,createdAt:e.createdAt??e.updatedAt,updatedAt:e.updatedAt,...c?{lastMessageAt:c}:{},...s?{readAt:s}:{},...typeof e.agentId==`string`&&e.agentId.trim().length>0?{agentId:e.agentId.trim()}:{},...n?{label:n}:{},...u,...r?{preferredModel:r}:{},...i?{preferredThinking:i}:{},...a?{projectRoot:a}:{},...o?{workingDir:o}:{},...l?{projectName:l}:{},...t?{metadata:t}:{},sessionType:ul(e),sessionTypeMutable:!1,status:e.status??`idle`,isChildSession:!!d,...p?{isPromotedChildSession:p}:{},...d?{parentSessionId:d}:{},...f?{spawnedByRequestId:f}:{},...m?{activityPreview:m}:{},messageCount:e.messageCount}}function bl(e){return e.map(yl)}var xl=`nextclaw.chat.session-list.mode`,Sl=`time-first`;function Cl(e){return e===`time-first`||e===`project-first`}function wl(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(Boolean))]:[]}function Tl(e){if(!e||typeof e!=`object`)return null;let{snapshot:t}=e;return!t||typeof t!=`object`?null:Cl(t.listMode)?t.listMode:null}function El(e,t){let n=e?.trim();if(!n)return!1;let r=t?.trim();return r?n.localeCompare(r)>0:!1}function Dl(e){let{active:t,readAt:n,runStatus:r,lastMessageAt:i}=e;return t||r===`running`?!1:El(i,n)}var Ol={selectedSessionKey:null,selectedAgentId:`main`,query:``,listMode:Sl,pinnedSessionKeys:[],pinnedProjectRoots:[],collapsedProjectRoots:[]};function kl(e){return t=>e(e=>({snapshot:{...e.snapshot,...t}}))}function Al(e){return(t,n)=>e(e=>{let r=t.trim(),i=n?.trim();if(!r||!i)return e;let a=e.optimisticReadAtBySessionKey[r];return a&&a.localeCompare(i)>=0?e:{...e,optimisticReadAtBySessionKey:{...e.optimisticReadAtBySessionKey,[r]:i}}})}var R=p()(Pn(e=>({snapshot:Ol,optimisticReadAtBySessionKey:{},setSnapshot:kl(e),markSessionRead:Al(e)}),{name:xl,storage:Fn(()=>window.localStorage),partialize:e=>({snapshot:{listMode:e.snapshot.listMode,pinnedSessionKeys:e.snapshot.pinnedSessionKeys,pinnedProjectRoots:e.snapshot.pinnedProjectRoots,collapsedProjectRoots:e.snapshot.collapsedProjectRoots}}),merge:(e,t)=>{if(!e||typeof e!=`object`)return t;let{snapshot:n}=e,r=Tl(e);return{...t,snapshot:{...t.snapshot,...r?{listMode:r}:{},pinnedSessionKeys:wl(n?.pinnedSessionKeys),pinnedProjectRoots:wl(n?.pinnedProjectRoots),collapsedProjectRoots:wl(n?.collapsedProjectRoots)}}}})),jl={staleTime:5e3,retry:!1};function Ml(e){return Fe({queryKey:[`ncp-sessions`,e?.limit??null,e?.peerId?.trim()||null],queryFn:()=>re(e),...jl})}function Nl(e){return Fe({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>Ke(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,...jl})}function Pl(e,t){return e.filter(e=>Rc(e,t))}function Fl(e){return e.isChildSession?e.isPromotedChildSession===!0:!0}function Il(e={}){let t=R(e=>e.snapshot.query),n=e.query??t,r=Ml({limit:e.limit??200}),i=(0,I.useMemo)(()=>Pl(bl(r.data?.sessions??[]).filter(Fl),n).map(e=>({session:e,runStatus:e.status===`running`?`running`:void 0})),[n,r.data?.sessions]);return{isLoading:r.isLoading,items:i}}function Ll(e){return new Date(e.session.lastMessageAt??e.session.createdAt).getTime()}function Rl(e){return[...e].sort((e,t)=>Ll(t)-Ll(e))}function zl(e,t){return[...e].sort((e,n)=>Number(t.has(n.session.key))-Number(t.has(e.session.key))||Ll(n)-Ll(e))}function Bl(e,t=new Set){let n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),i=r-864e5,a=r-7*864e5,o=[],s=[],c=[],l=[],u=e.filter(e=>!t.has(e.session.key)),d=zl(e.filter(e=>t.has(e.session.key)),t);for(let e of u){let t=Ll(e);t>=r?o.push(e):t>=i?s.push(e):t>=a?c.push(e):l.push(e)}let p=[];return d.length>0&&p.push({label:f(`chatSidebarPinned`),items:d}),o.length>0&&p.push({label:f(`chatSidebarToday`),items:o}),s.length>0&&p.push({label:f(`chatSidebarYesterday`),items:s}),c.length>0&&p.push({label:f(`chatSidebarPrevious7Days`),items:c}),l.length>0&&p.push({label:f(`chatSidebarOlder`),items:l}),p}function Vl(e,t=new Set,n=new Set,r=[]){let i=new Map;for(let e of r)i.set(e.rootPath,{projectRoot:e.rootPath,projectName:e.name,items:[],latestUpdatedAt:new Date(e.updatedAt).getTime(),isPinned:n.has(e.rootPath)});for(let t of e){let e=t.session.projectRoot?.trim();if(!e)continue;let r=i.get(e),a=Ll(t);if(r){r.items.push(t),r.latestUpdatedAt=Math.max(r.latestUpdatedAt,a);continue}i.set(e,{projectRoot:e,projectName:t.session.projectName?.trim()||Hc(e)||e,items:[t],latestUpdatedAt:a,isPinned:n.has(e)})}return[...i.values()].map(e=>({...e,items:zl(e.items,t)})).sort((e,t)=>Number(t.isPinned)-Number(e.isPinned)||t.latestUpdatedAt-e.latestUpdatedAt)}function Hl(e){let t=new Map;for(let n of e){let e=n.session.parentSessionId?.trim();if(!e)continue;let r=t.get(e)??[];r.push(n),t.set(e,r)}for(let e of t.values())e.sort((e,t)=>Ll(t)-Ll(e));return t}function Ul(e){if(e.label&&e.label.trim())return e.label.trim();let t=e.key.split(`:`);return t[t.length-1]||e.key}function Wl({isProjectFirstView:e,onSelectMode:t}){return(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[(0,L.jsx)(`button`,{type:`button`,"aria-pressed":!e,onClick:()=>t(`time-first`),className:m(`transition-colors`,e?`text-muted-foreground/65 hover:text-muted-foreground`:`font-medium text-foreground`),children:f(`chatSidebarViewTime`)}),(0,L.jsx)(`span`,{className:`text-muted-foreground/35`,children:`/`}),(0,L.jsx)(`button`,{type:`button`,"aria-pressed":e,onClick:()=>t(`project-first`),className:m(`transition-colors`,e?`font-medium text-foreground`:`text-muted-foreground/65 hover:text-muted-foreground`),children:f(`chatSidebarViewProject`)})]})}var Gl=`native`;function Kl(e){return typeof e==`string`?e.trim().toLowerCase()||`native`:Gl}function ql(e,t=Gl){return Kl(e?.runtime?.trim()||e?.engine?.trim()||t)}function Jl(e,t){return e===`native`?f(`chatSessionTypeNative`):t?.trim()||e.trim().split(/[-_]+/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)||e}function Yl(e){let t=new Map;for(let n of e){let e=Kl(n.value);t.set(e,{value:e,label:n.label?.trim()||Jl(e),icon:n.icon??null,ready:n.ready??!0,reason:n.reason??null,reasonMessage:n.reasonMessage??null,supportedModels:n.supportedModels,recommendedModel:n.recommendedModel??null,modelSelectionMode:n.modelSelectionMode??`nextclaw`,runtimeDefaultThinking:n.runtimeDefaultThinking??null,cta:n.cta??null})}return t.has(`native`)||t.set(Gl,{value:Gl,label:Jl(Gl),icon:null,ready:!0,reason:null,reasonMessage:null,supportedModels:void 0,recommendedModel:null,modelSelectionMode:`nextclaw`,runtimeDefaultThinking:null,cta:null}),Array.from(t.values()).sort((e,t)=>e.value===`native`?-1:t.value===`native`?1:e.value.localeCompare(t.value))}var Xl={wx:`weixin`,lark:`feishu`},Zl={cron:{icon:`cron`}},Ql={codex:`chatSessionTypeCodex`,claude:`chatSessionTypeClaude`};function $l(e){return e?.trim().toLowerCase()??``}function eu(e){return e.split(/[-_]+/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function tu(e,t){let n=$l(e);if(!n||n===`native`)return null;let r=t.find(e=>$l(e.value)===n);return r?.label.trim()?r.label.trim():eu(n)}function nu(e,t){let n=$l(e);return!n||n===`native`?null:t.find(e=>$l(e.value)===n)??null}function ru(e){let t=$l(e);if(!t)return null;let n=Xl[t]??t;return pn(n)?n:null}function iu(e,t){let n=ru(e.channel??``);if(n)return{icon:{kind:`channel-logo`,channel:n},label:null};let r=Zl[$l(e.type)];if(r)return{icon:{kind:`symbol`,icon:r.icon},label:null};let i=$l(e.sessionType),a=nu(i,t);if(a?.icon?.src?.trim())return{icon:{kind:`runtime-image`,src:a.icon.src,alt:a.icon.alt??null,name:a.label},label:null};let o=Ql[i];return o?{icon:null,label:f(o)}:{icon:null,label:a?.label?.trim()||tu(e.sessionType,t)}}var au=`app://`;function ou(e){let t=e.trim().replace(/^\/+/,``);if(!t)return null;let n=t.split(`/`);return n.some(e=>e.trim().length===0||e===`.`||e===`..`)?null:n.join(`/`)}function su(e){let t=e.trim();if(!t)return null;if(!t.startsWith(au))return t;let n=ou(t.slice(6));return n?`/${n}`:null}function cu({icon:e,className:t}){if(e.kind===`channel-logo`)return(0,L.jsx)(lu,{channel:e.channel,className:t});if(e.kind===`runtime-image`){let n=su(e.src);return(0,L.jsx)(Mn,{name:e.name?.trim()||e.alt?.trim()||`runtime`,src:n??void 0,className:m(`h-[1.125rem] w-[1.125rem]`,t),imgClassName:`h-full w-full object-contain`,fallback:(0,L.jsx)(no,{className:m(`h-3 w-3 text-muted-foreground`,t)})})}return(0,L.jsx)(Za,{className:m(`h-3.5 w-3.5`,t)})}function lu({channel:e,className:t}){return(0,L.jsx)(Mn,{name:e,src:pn(e),className:m(`h-[1.125rem] w-[1.125rem]`,t),imgClassName:`h-full w-full object-contain`,fallback:(0,L.jsx)(no,{className:`h-3 w-3 text-muted-foreground`})})}function uu({status:e,className:t}){let n=f(e===`running`?`sessionsRunStatusRunning`:`sessionsRunStatusQueued`);return(0,L.jsxs)(`span`,{className:m(`inline-flex h-3.5 w-3.5 items-center justify-center text-muted-foreground/70`,t),title:n,"aria-label":n,children:[(0,L.jsx)(wn,{className:`h-3 w-3 animate-spin`}),(0,L.jsx)(`span`,{className:`sr-only`,children:n})]})}function du({item:e,selectedSessionKey:t,optimisticReadAtBySessionKey:n,sessionTypeOptions:r,onSelect:i}){let{session:a,runStatus:o}=e,s=t===a.key,c=n[a.key],l=c&&a.readAt?c.localeCompare(a.readAt)>0?c:a.readAt:c??a.readAt,u=Dl({active:s,lastMessageAt:a.lastMessageAt,readAt:l,runStatus:o}),d=Mc(a)??a.projectName??a.projectRoot??`${a.messageCount}`,p=Ic(a.lastMessageAt??a.createdAt),h=iu(a,r);return(0,L.jsxs)(`button`,{type:`button`,"aria-current":s?`page`:void 0,className:m(`flex w-full min-w-0 items-start gap-2 rounded-lg px-2.5 py-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,s?`bg-accent text-accent-foreground`:`text-foreground hover:bg-accent/65 hover:text-accent-foreground`),onClick:()=>i(a.key),children:[(0,L.jsx)(`span`,{className:`relative mt-1 flex h-2.5 w-2.5 shrink-0 items-center justify-center`,children:u?(0,L.jsx)(`span`,{"aria-label":f(`chatSidebarUnread`),className:`h-1.5 w-1.5 rounded-full bg-primary`}):s?(0,L.jsx)(en,{className:`h-3 w-3 text-primary`}):(0,L.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-muted-foreground/45`})}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium`,children:jc(a)}),h.label?(0,L.jsx)(`span`,{className:`shrink-0 rounded-full border border-border/70 px-1.5 py-0.5 text-[10px] font-semibold leading-none text-muted-foreground`,children:h.label}):null,h.icon?(0,L.jsx)(`span`,{className:`inline-flex h-[1.125rem] w-[1.125rem] shrink-0 items-center justify-center text-muted-foreground`,children:(0,L.jsx)(cu,{icon:h.icon})}):null]}),(0,L.jsxs)(`span`,{className:`mt-0.5 flex min-w-0 items-center gap-2 text-[11px] text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:d}),(0,L.jsx)(`span`,{className:`shrink-0`,children:p})]})]}),o?(0,L.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:(0,L.jsx)(uu,{status:o})}):null]})}function fu({items:e,selectedSessionKey:t,optimisticReadAtBySessionKey:n,sessionTypeOptions:r,onSelect:i,className:a}){return(0,L.jsx)(`div`,{className:m(`space-y-1`,a),children:e.map(e=>(0,L.jsx)(du,{item:e,selectedSessionKey:t,optimisticReadAtBySessionKey:n,sessionTypeOptions:r,onSelect:i},e.session.key))})}function pu({group:e,...t}){return(0,L.jsxs)(`section`,{"aria-label":e.label,children:[(0,L.jsx)(`div`,{className:`px-2 py-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70`,children:e.label}),(0,L.jsx)(fu,{items:e.items,...t})]})}function mu({group:e,isCollapsed:t,onToggleCollapsed:n,...r}){let i=(0,I.useId)(),a=`${f(t?`chatSidebarExpandProject`:`chatSidebarCollapseProject`)} · ${e.projectName}`;return(0,L.jsxs)(`section`,{"aria-label":e.projectName,children:[(0,L.jsxs)(`button`,{type:`button`,"aria-controls":i,"aria-expanded":!t,"aria-label":a,className:`group flex h-10 w-full min-w-0 items-center gap-1.5 rounded-lg px-2 text-left text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>n(e.projectRoot),children:[(0,L.jsx)(fn,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[11px] font-medium uppercase tracking-wider`,title:e.projectRoot,children:e.projectName}),(0,L.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground/70`,children:e.items.length}),t?(0,L.jsx)(so,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}):(0,L.jsx)(Nt,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`})]}),t?null:(0,L.jsx)(fu,{items:e.items,className:`mt-0.5`,...r})]})}function hu({collapsedProjectRoots:e,dateGroups:t,isProjectFirstView:n,onToggleProjectCollapsed:r,projectGroups:i,...a}){return(0,L.jsx)(`div`,{className:`space-y-3`,children:n?i.map(t=>(0,L.jsx)(mu,{group:t,isCollapsed:e.includes(t.projectRoot),onToggleCollapsed:r,...a},t.projectRoot)):t.map(e=>(0,L.jsx)(pu,{group:e,...a},e.label))})}var gu=p(e=>({snapshot:{},setSnapshot:t=>e(({snapshot:e})=>({snapshot:{...e,...t}}))})),_u=[`projects`];function vu(){return Fe({queryKey:_u,queryFn:qe,staleTime:3e4})}function yu(){let e=pe();return ge({mutationFn:_e,onSuccess:async()=>{await e.invalidateQueries({queryKey:_u}),P.success(f(`chatProjectCreated`))},onError:e=>{P.error(`${f(`chatProjectCreateFailed`)}: ${e.message}`)}})}var bu=`group inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`;function xu({title:e}){return(0,L.jsx)(`span`,{className:`text-sm font-medium text-foreground truncate`,children:e})}function Su({label:e}){return(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-4 text-xs text-muted-foreground`,children:[(0,L.jsx)(Qo,{className:`h-4 w-4 shrink-0 text-muted-foreground/55`}),(0,L.jsx)(`span`,{children:e})]})}function Cu(){return(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-4 text-xs text-muted-foreground`,children:[(0,L.jsx)(wn,{className:`h-4 w-4 shrink-0 animate-spin`}),(0,L.jsx)(`span`,{children:f(`sessionsLoading`)})]})}function wu({selectedSessionKey:e,title:t}){let n=Ac(),[r,i]=(0,I.useState)(!1),[a,o]=(0,I.useState)(``),s=R(e=>e.optimisticReadAtBySessionKey),c=R(e=>e.snapshot.pinnedSessionKeys),l=R(e=>e.snapshot.pinnedProjectRoots),u=R(e=>e.snapshot.collapsedProjectRoots),d=R(e=>e.snapshot.listMode),p=gu(e=>e.snapshot.sessionTypesQuery?.data??null),{isLoading:h,items:_}=Il({query:a}),v=vu(),y=(0,I.useMemo)(()=>{let e=a.trim().toLowerCase(),t=v.data?.projects??[];return e?t.filter(t=>t.name.toLowerCase().includes(e)||t.rootPath.toLowerCase().includes(e)):t},[v.data?.projects,a]),b=(0,I.useMemo)(()=>Rl(_),[_]),x=(0,I.useMemo)(()=>Bl(b,new Set(c)),[c,b]),S=(0,I.useMemo)(()=>Vl(b,new Set(c),new Set(l),y),[l,c,b,y]),C=(0,I.useMemo)(()=>Yl(p?.options??[]),[p?.options]),w=t=>{i(!1),o(``),t!==e&&n.chatSessionListManager.selectSession(t)},T=e=>{i(e),e||o(``)},E={selectedSessionKey:e,optimisticReadAtBySessionKey:s,sessionTypeOptions:C,onSelect:w},D=d===`project-first`,O=D?S.length>0:x.length>0;return(0,L.jsxs)(it,{open:r,onOpenChange:T,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,"aria-label":`${f(`chatSessionSwitch`)}: ${t}`,"aria-expanded":r,className:bu,children:[(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),(0,L.jsx)(Nt,{className:m(`h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform group-hover:text-accent-foreground`,r?`rotate-180`:null)})]})}),(0,L.jsxs)(nt,{align:`start`,className:`w-[22rem] max-w-[calc(100vw-2rem)] p-0`,children:[(0,L.jsxs)(`div`,{className:`space-y-2 border-b border-border px-3 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,L.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wider text-muted-foreground/75`,children:f(`chatSessionSwitcherTitle`)}),(0,L.jsx)(Wl,{isProjectFirstView:D,onSelectMode:n.chatSessionListManager.setListMode})]}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/65`}),(0,L.jsx)(g,{value:a,onChange:e=>o(e.target.value),placeholder:f(`chatSearchSessionPlaceholder`),"aria-label":f(`chatSearchSessionPlaceholder`),className:`h-8 rounded-lg bg-background pl-8 pr-2 text-xs`,autoFocus:!0})]})]}),(0,L.jsx)(`div`,{className:`max-h-80 overflow-y-auto p-1.5`,children:h?(0,L.jsx)(Cu,{}):O?(0,L.jsx)(hu,{collapsedProjectRoots:u,dateGroups:x,isProjectFirstView:D,onToggleProjectCollapsed:n.chatSessionListManager.toggleProjectCollapsed,projectGroups:S,...E}):(0,L.jsx)(Su,{label:a.trim()?f(`chatSessionSwitcherNoResults`):f(D?`chatSidebarProjectViewEmpty`:`sessionsEmpty`)})})]})]})}function Tu({layoutMode:e,selectedSessionKey:t,title:n}){let r=Sn(e=>e.isSidebarCollapsed);return e===`desktop`&&!r?(0,L.jsx)(xu,{title:n}):(0,L.jsx)(wu,{selectedSessionKey:t,title:n})}var Eu=[];function Du(){let e=gu(e=>!!(e.snapshot.configQuery?.isFetched||e.snapshot.configQuery?.isSuccess)),t=gu(e=>!!(e.snapshot.providersQuery?.isFetched||e.snapshot.providersQuery?.isSuccess)),n=gu(e=>!!(e.snapshot.providerTemplatesQuery?.isFetched||e.snapshot.providerTemplatesQuery?.isSuccess));return e&&t&&n}function Ou(e){let t=gu(e=>e.snapshot.sessionsQuery?.data?.sessions??Eu),n=(0,I.useMemo)(()=>bl(t),[t]);return(0,I.useMemo)(()=>n.find(t=>t.key===e)??null,[n,e])}function ku(e){return!!e&&typeof e==`object`}function Au(e){return typeof e==`string`&&e.trim().length>0?e.trim():null}function ju(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Mu(e){return typeof e==`string`?e:null}function Nu(e){return e===`auto`||e===`source`||e===`rendered`?e:null}function Pu(e){if(!ku(e)||typeof e.key!=`string`||typeof e.path!=`string`||e.viewMode!==`preview`&&e.viewMode!==`diff`)return null;let t=e.key.trim(),n=e.path.trim();return!t||!n?null:{key:t,parentSessionKey:Au(e.parentSessionKey),path:n,label:Au(e.label),viewMode:e.viewMode,previewViewer:Nu(e.previewViewer),line:ju(e.line),column:ju(e.column),rawText:Mu(e.rawText),contentUrl:Au(e.contentUrl),mimeType:Au(e.mimeType),beforeText:Mu(e.beforeText),afterText:Mu(e.afterText),patchText:Mu(e.patchText),oldStartLine:ju(e.oldStartLine),newStartLine:ju(e.newStartLine)}}function Fu(e){return{key:e.key,parentSessionKey:e.parentSessionKey,path:e.path,label:e.label,viewMode:e.viewMode,previewViewer:e.previewViewer,line:e.line,column:e.column,rawText:e.rawText,contentUrl:e.contentUrl,mimeType:e.mimeType,beforeText:e.beforeText,afterText:e.afterText,patchText:e.patchText,oldStartLine:e.oldStartLine,newStartLine:e.newStartLine}}function Iu(e,t,n){let r=e.slice(0,n),i=t?e.find(e=>e.key===t):null;return!i||r.some(e=>e.key===i.key)?r:r.length<n?[...r,i]:[...r.slice(0,-1),i]}function Lu(e){return typeof e!=`number`||!Number.isFinite(e)?480:Math.max(360,Math.min(860,e))}function Ru(e){return e.index>0&&e.entries.length>0}function zu(e){return e.index>=0&&e.index<e.entries.length-1}function Bu(e,t,n=Object.is){let r=Uu(e),i=e.entries[r];if(i&&n(i,t))return{entries:e.entries,index:r};let a=[...e.entries.slice(0,r+1),t];return{entries:a,index:a.length-1}}function Vu(e,t){let n=Uu(e),r=t===`back`?n-1:n+1,i=e.entries[r];return i?{history:{entries:e.entries,index:r},entry:i}:null}function Hu(e,t,n){let r=Uu(e),i=e.entries.filter(t);if(i.length===0)return n===void 0?{entries:[],index:0}:{entries:[n],index:0};let a=e.entries.slice(0,r+1).filter(t);return{entries:i,index:Math.min(Math.max(0,a.length-1),i.length-1)}}function Uu(e){return e.entries.length===0?0:Number.isInteger(e.index)?Math.min(Math.max(0,e.index),e.entries.length-1):e.entries.length-1}function Wu(e,t){return e.kind===t.kind?e.kind===`overview`||e.kind===`child-sessions`||e.kind===`project-files`||e.kind===`cron`?!0:t.kind!==`overview`&&t.kind!==`child-sessions`&&t.kind!==`project-files`&&t.kind!==`cron`&&e.key===t.key:!1}function Gu(e){let{activeChildSessionKey:t,activeSideChatDraft:n,activeWorkspaceFileKey:r,activeWorkspacePanelKind:i}=e;return i===`overview`||i===`child-sessions`||i===`project-files`||i===`cron`?{kind:i}:i===`child-session`&&t?{kind:`child-session`,key:t}:i===`side-chat-draft`&&n?{kind:`side-chat-draft`,key:n.draftKey}:i===`file`&&r?{kind:`file`,key:r}:null}function Ku(e,t){if(e.kind===`overview`||e.kind===`child-sessions`||e.kind===`project-files`)return{activeWorkspacePanelKind:e.kind,activeChildSessionKey:null,activeSideChatDraft:null,activeWorkspaceFileKey:null};if(e.kind===`cron`)return{activeWorkspacePanelKind:`cron`,activeChildSessionKey:null,activeSideChatDraft:null,activeWorkspaceFileKey:null};if(e.kind===`file`)return t.workspaceFileTabs.some(t=>t.key===e.key)?{activeWorkspacePanelKind:`file`,activeChildSessionKey:null,activeSideChatDraft:null,activeWorkspaceFileKey:e.key}:null;if(e.kind===`side-chat-draft`){let{activeSideChatDraft:n}=t;return n?.draftKey===e.key?{activeWorkspacePanelKind:`side-chat-draft`,activeChildSessionKey:null,activeSideChatDraft:n,activeWorkspaceFileKey:null}:null}return{activeWorkspacePanelKind:`child-session`,activeChildSessionKey:e.key,activeSideChatDraft:null,activeWorkspaceFileKey:null}}function qu(e,t){if(t.kind===`overview`)return null;let n=Hu({entries:e.workspaceNavigationHistory,index:e.workspaceNavigationHistoryIndex},e=>!Wu(e,t),{kind:`overview`}),r={closedWorkspaceTabEntries:t.kind!==`file`&&t.kind!==`side-chat-draft`?[...e.closedWorkspaceTabEntries.filter(e=>!Wu(e,t)),t]:e.closedWorkspaceTabEntries,childSessionTabs:t.kind===`child-session`?e.childSessionTabs.filter(e=>e.sessionKey!==t.key):e.childSessionTabs,activeSideChatDraft:t.kind===`side-chat-draft`?null:e.activeSideChatDraft,workspaceFileTabs:t.kind===`file`?e.workspaceFileTabs.filter(e=>e.key!==t.key):e.workspaceFileTabs,workspaceNavigationHistory:[...n.entries],workspaceNavigationHistoryIndex:n.index},i=Gu(e);if(!i||!Wu(i,t))return r;let a=Ku(n.entries[n.index]??{kind:`overview`},{...e,...r});return{...r,...a??Ku({kind:`overview`},e)}}function Ju(e){return{draftKey:`side-chat-draft:${e}:${typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}`,parentSessionKey:e}}function Yu(e,t){let n=e.findIndex(e=>e.sessionKey===t.sessionKey);if(n===-1)return[t,...e];let r=e[n],i=[...e];return i[n]={...r,parentSessionKey:r.parentSessionKey??t.parentSessionKey,label:r.label?.trim()?r.label:t.label,agentId:r.agentId?.trim()?r.agentId:t.agentId},i}function Xu(e){let{agentId:t,draftKey:n,label:r,sessionKey:i,snapshot:a}=e,o=i.trim(),s=n.trim(),{activeSideChatDraft:c}=a;if(!o||!s||c?.draftKey!==s)return null;let{parentSessionKey:l}=c,u=Bu(Hu({entries:a.workspaceNavigationHistory,index:a.workspaceNavigationHistoryIndex},e=>e.kind!==`side-chat-draft`||e.key!==s),{kind:`child-session`,key:o},Wu);return{parentSessionKey:l,patch:{workspacePanelParentKey:l,activeWorkspacePanelKind:`child-session`,activeChildSessionKey:o,activeSideChatDraft:null,activeWorkspaceFileKey:null,childSessionTabs:Yu(a.childSessionTabs,{sessionKey:o,parentSessionKey:l,label:r?.trim()||null,agentId:t?.trim()||null}),workspaceNavigationHistory:[...u.entries],workspaceNavigationHistoryIndex:u.index}}}var Zu=`nextclaw.chat.workspace-panel.state`,Qu=2,$u=8,ed={sessionTypeLabel:null,sessionTypeIcon:null,sessionKey:null,agentId:null,sessionDisplayName:void 0,sessionProjectRoot:null,sessionWorkingDir:null,sessionProjectName:null,canDeleteSession:!1,isDeletePending:!1,isHistoryLoading:!1,messages:[],isSending:!1,isAwaitingAssistantOutput:!1,hasSubmittedDraftMessage:!1,parentSessionKey:null,parentSessionLabel:null,workspacePanelParentKey:null,activeWorkspacePanelKind:null,childSessionTabs:[],activeChildSessionKey:null,activeSideChatDraft:null,workspaceFileTabs:[],activeWorkspaceFileKey:null,closedWorkspaceTabEntries:[],workspaceNavigationHistory:[],workspaceNavigationHistoryIndex:0,workspacePanelWidth:480,contextWindow:null};function td(e){return!!e&&typeof e==`object`}function nd(e){return typeof e==`string`&&e.trim().length>0?e.trim():null}function rd(e,t){return typeof e==`number`&&Number.isInteger(e)?Math.min(Math.max(0,e),t):t}function id(e){return e===`overview`||e===`child-sessions`||e===`child-session`||e===`project-files`||e===`file`||e===`cron`}function ad(e){if(!td(e))return null;if(e.kind===`overview`||e.kind===`child-sessions`||e.kind===`project-files`||e.kind===`cron`)return{kind:e.kind};let t=nd(e.key);return!t||e.kind!==`child-session`&&e.kind!==`file`?null:{kind:e.kind,key:t}}function od(e){if(!td(e))return null;let t=nd(e.workspacePanelParentKey),n=nd(e.activeWorkspaceFileKey),r=Iu(Array.isArray(e.workspaceFileTabs)?e.workspaceFileTabs.map(Pu).filter(e=>e!==null):[],n,$u),i=r.filter(e=>e.parentSessionKey===t),a=n&&i.some(e=>e.key===n)?n:i[0]?.key??null,o=id(e.activeWorkspacePanelKind)?e.activeWorkspacePanelKind:null,s=o===`file`&&!a?null:o,c=nd(e.activeChildSessionKey),l=Array.isArray(e.closedWorkspaceTabEntries)?e.closedWorkspaceTabEntries.map(ad).filter(e=>e!==null&&e.kind!==`overview`):[],u=Gu({activeWorkspacePanelKind:s,activeChildSessionKey:c,activeSideChatDraft:null,activeWorkspaceFileKey:a}),d=Array.isArray(e.workspaceNavigationHistory)?e.workspaceNavigationHistory.map(ad).filter(e=>e!==null).filter(e=>e.kind!==`file`||r.some(t=>t.key===e.key)):[],f=d.length>0?d:u?[u]:[];return{workspacePanelParentKey:t,activeWorkspacePanelKind:s,activeChildSessionKey:c,workspaceFileTabs:r,activeWorkspaceFileKey:a,closedWorkspaceTabEntries:l,workspaceNavigationHistory:f,workspaceNavigationHistoryIndex:f.length>0?rd(e.workspaceNavigationHistoryIndex,f.length-1):0,workspacePanelWidth:Lu(e.workspacePanelWidth)}}var sd=p()(Pn(e=>({snapshot:ed,setSnapshot:t=>e(e=>({snapshot:{...e.snapshot,...t}}))}),{name:Zu,version:Qu,storage:Fn(()=>window.localStorage),partialize:e=>{let t=e.snapshot.workspaceNavigationHistory.filter(e=>e.kind!==`side-chat-draft`),n=t.length>0?Math.min(e.snapshot.workspaceNavigationHistoryIndex,t.length-1):0;return{snapshot:{workspacePanelParentKey:e.snapshot.workspacePanelParentKey,activeWorkspacePanelKind:e.snapshot.activeWorkspacePanelKind===`side-chat-draft`?null:e.snapshot.activeWorkspacePanelKind,activeChildSessionKey:e.snapshot.activeChildSessionKey,workspaceFileTabs:Iu(e.snapshot.workspaceFileTabs,e.snapshot.activeWorkspaceFileKey,$u).map(Fu),activeWorkspaceFileKey:e.snapshot.activeWorkspaceFileKey,closedWorkspaceTabEntries:e.snapshot.closedWorkspaceTabEntries.filter(e=>e.kind!==`overview`&&e.kind!==`side-chat-draft`),workspaceNavigationHistory:t,workspaceNavigationHistoryIndex:n,workspacePanelWidth:e.snapshot.workspacePanelWidth}}},merge:(e,t)=>{let n=od(td(e)?e.snapshot:null);return n?{...t,snapshot:{...t.snapshot,...n}}:t}})),cd=[[`bg-amber-100`,`text-amber-700`],[`bg-emerald-100`,`text-emerald-700`],[`bg-blue-100`,`text-blue-700`],[`bg-rose-100`,`text-rose-700`],[`bg-cyan-100`,`text-cyan-700`],[`bg-violet-100`,`text-violet-700`]];function ld(e){let t=0;for(let n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function ud({agentId:e,displayName:t,avatarUrl:n,className:r}){let i=t?.trim()||e,a=e.trim().toLowerCase()===`main`,[o,s]=cd[ld(e)%cd.length]??cd[0],c=a?`bg-primary`:o,l=a?`text-primary-foreground`:s;return n?.trim()?(0,L.jsx)(`img`,{src:n,alt:t?.trim()||e,className:m(`rounded-full object-cover`,r)}):(0,L.jsx)(`div`,{className:m(`rounded-full flex items-center justify-center font-semibold`,c,l,r),"aria-label":t?.trim()||e,children:a?(0,L.jsx)(no,{className:`h-[55%] w-[55%]`,strokeWidth:2.4}):(i.trim()||`A`).slice(0,1).toUpperCase()})}function dd(){return Fe({queryKey:[`agents`],queryFn:je,staleTime:3e4})}function fd(){let e=pe();return ge({mutationFn:({agentId:e,data:t})=>Ee(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:[`agents`]}),e.invalidateQueries({queryKey:[`config`]}),P.success(f(`configSavedApplied`))},onError:e=>{P.error(f(`configSaveFailed`)+`: `+e.message)}})}function pd(){let e=pe();return ge({mutationFn:({agentId:e})=>Le(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`agents`]}),e.invalidateQueries({queryKey:[`config`]}),P.success(f(`configSavedApplied`))},onError:e=>{P.error(f(`configSaveFailed`)+`: `+e.message)}})}function md(e){return new Map(e.filter(e=>typeof e.id==`string`&&e.id.trim().length>0).map(e=>[e.id,e]))}function hd(e){let t=e?.trim()??``,n=dd(),r=(0,I.useMemo)(()=>md(n.data?.agents??[]),[n.data?.agents]);return(0,I.useMemo)(()=>{if(!t)return null;let e=r.get(t)??null;return{agentId:t,profile:e,displayName:e?.displayName?.trim()||t,avatarUrl:e?.avatarUrl?.trim()||null}},[r,t])}function gd({agentId:e,className:t}){let n=hd(e);return n?(0,L.jsx)(ud,{agentId:n.agentId,displayName:n.displayName,avatarUrl:n.avatarUrl,className:t}):null}function _d({layoutMode:e,onBackToList:t}){let n=Ac(),r=sd(e=>e.snapshot),i=R(e=>e.snapshot.selectedSessionKey),a=R(e=>e.snapshot.selectedAgentId),o=gu(e=>e.snapshot.sessionTypesQuery?.data??null),s=gu(e=>e.snapshot.configQuery?.data??null),c=Ou(i),l=(0,I.useMemo)(()=>Yl(o?.options??[]),[o?.options]),u=Kl(c?.sessionType??o?.defaultType??`native`),d=l.find(e=>e.value===u)??null,p=d?.label??Jl(u),m=u!==`native`&&!!p,h=c?.projectRoot??null,g=Vc(s?.agents.defaults.workspace),_=c?.projectName??Hc(h),v=!!c,y=!!(i||p),b=(c?jc(c):void 0)||(v&&i?i:null)||f(`chatSidebarNewTask`),x=c?.agentId?.trim()??a?.trim()??``,S=x.length>0&&x.toLowerCase()!==`main`,C=!!(i&&r.workspacePanelParentKey===i&&r.activeWorkspacePanelKind);return(0,L.jsx)(tc,{layoutMode:e,title:b,titleContent:(0,L.jsx)(Tu,{layoutMode:e,selectedSessionKey:i,title:b}),shouldShow:y,onBackToList:t,leading:S?(0,L.jsx)(`div`,{className:`inline-flex shrink-0 items-center`,children:(0,L.jsx)(gd,{agentId:x,className:`h-5 w-5`})}):null,sessionTypeBadge:m?(0,L.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1.5 rounded-full border border-border bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground`,children:[d?.icon?.src?(0,L.jsx)(`span`,{className:`inline-flex h-[1.125rem] w-[1.125rem] items-center justify-center`,children:(0,L.jsx)(cu,{icon:{kind:`runtime-image`,src:d.icon.src,alt:d.icon.alt??null,name:p}})}):null,p]}):null,projectBadge:_?(0,L.jsx)(Dc,{sessionKey:i??`draft`,projectName:_,projectRoot:h,defaultWorkspacePath:g,persistToServer:v}):null,actions:i?(0,L.jsx)(Tc,{sessionKey:i,canDeleteSession:v,isDeletePending:r.isDeletePending,currentPath:h??c?.workingDir??null,defaultWorkspacePath:g,metadata:c?.metadata??null,isWorkspaceOpen:C,onToggleWorkspace:()=>{i&&n.chatThreadManager.toggleWorkspacePanel(i)},onDeleteSession:n.chatThreadManager.deleteSession}):null})}function vd(){let e=Ac(),t=sd(e=>e.snapshot);return(0,L.jsx)(ec,{parentSessionLabel:t.parentSessionKey?t.parentSessionLabel??null:null,onGoToParentSession:e.chatThreadManager.goToParentSession})}var yd=[{key:`hero`,alignmentClassName:`justify-start`,bubbleClassName:`max-w-[78%] h-32 rounded-[30px]`},{key:`follow-up`,alignmentClassName:`justify-start`,bubbleClassName:`max-w-[62%] h-24 rounded-[28px]`},{key:`reply`,alignmentClassName:`justify-end`,bubbleClassName:`max-w-[70%] h-24 rounded-[28px]`},{key:`detail`,alignmentClassName:`justify-start`,bubbleClassName:`max-w-[88%] h-36 rounded-[30px]`}];function bd(){return(0,L.jsxs)(`section`,{"data-testid":`chat-conversation-skeleton`,className:`flex-1 min-h-0 flex flex-col overflow-hidden bg-background`,children:[(0,L.jsx)(`div`,{className:`flex-1 min-h-0 overflow-y-auto custom-scrollbar`,children:(0,L.jsx)(`div`,{className:`mx-auto flex min-h-full w-full max-w-[min(1120px,100%)] flex-col px-6 py-5`,children:(0,L.jsxs)(`div`,{className:`flex flex-1 flex-col gap-8`,children:[(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsx)(On,{className:`h-6 w-52 rounded-lg bg-muted`}),(0,L.jsx)(`div`,{className:`space-y-5`,children:yd.map(e=>(0,L.jsx)(`div`,{className:m(`flex w-full`,e.alignmentClassName),children:(0,L.jsx)(On,{"data-testid":`chat-conversation-skeleton-bubble`,className:m(`w-full bg-muted`,e.bubbleClassName)})},e.key))})]}),(0,L.jsxs)(`div`,{className:`mt-auto grid gap-4 pb-2 sm:grid-cols-[minmax(0,1fr)_minmax(180px,240px)] sm:items-end`,children:[(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsx)(On,{className:`h-4 w-40 rounded-full bg-muted`}),(0,L.jsx)(On,{className:`h-[112px] w-full rounded-[30px] bg-muted`})]}),(0,L.jsx)(`div`,{className:`hidden justify-end sm:flex`,children:(0,L.jsx)(On,{className:`h-10 w-36 rounded-full bg-muted`})})]})]})})}),(0,L.jsx)(`div`,{className:`bg-background p-4`,children:(0,L.jsx)(`div`,{className:`mx-auto w-full max-w-[min(1120px,100%)]`,children:(0,L.jsxs)(`div`,{className:`overflow-hidden rounded-2xl border border-border bg-card shadow-card`,children:[(0,L.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,L.jsx)(On,{className:`h-[84px] w-full rounded-[28px] bg-muted`})}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 pb-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(On,{className:`h-8 w-20 rounded-full bg-muted`}),(0,L.jsx)(On,{className:`h-8 w-28 rounded-full bg-muted`}),(0,L.jsx)(On,{className:`hidden h-8 w-24 rounded-full bg-muted sm:block`})]}),(0,L.jsx)(On,{className:`h-8 w-8 rounded-full bg-muted`})]})]})})})]})}function xd(e,t){return e.label?.trim()?e.label.trim():t?jc(t):e.sessionKey}function Sd(e){let t=Ml({limit:200}),n=(0,I.useMemo)(()=>t.data?.sessions??[],[t.data?.sessions]),r=(0,I.useMemo)(()=>{let e=bl(n);return new Map(e.map(e=>[e.key,e]))},[n]);return(0,I.useMemo)(()=>e.map(e=>{let t=r.get(e.sessionKey)??null,n=e.agentId?.trim()||t?.agentId||null;return{sessionKey:e.sessionKey,parentSessionKey:e.parentSessionKey,title:xd(e,t),agentId:n,updatedAt:t?.updatedAt??null,lastMessageAt:t?.lastMessageAt??null,readAt:t?.readAt??null,runStatus:t?.status===`running`?`running`:void 0,sessionTypeLabel:t?.sessionType?Jl(t.sessionType):null,preferredModel:t?.preferredModel?.trim()||null,projectName:t?.projectName?.trim()||null,projectRoot:t?.projectRoot?.trim()||null}}),[r,e])}function Cd(e){return/\.html?$/i.test(e)?`html`:/\.mdx?$/i.test(e)?`markdown`:null}function wd(e,t){let n=Cd(e);return n===`html`?t===`rendered`?`rendered`:`source`:n===`markdown`?t===`source`?`source`:`rendered`:t===`source`||t===`rendered`?t:null}function Td(e,t){return wd(e,t)??t??null}function Ed(e,t){return Cd(e)?wd(e,t)===`source`?`rendered`:`source`:null}function Dd(e){let t=e.path.split(`/`).filter(Boolean).pop();return e.label?.trim()||t||e.path}function Od(e){let{activePanelKind:t,activeChildSessionKey:n,activeSideChatDraft:r,activeWorkspaceFileKey:i,childSessionTabs:a,workspaceFileTabs:o}=e;if(t===`overview`)return{kind:`overview`};if(t===`child-sessions`)return{kind:`child-sessions`};if(t===`project-files`)return{kind:`project-files`};if(t===`cron`)return{kind:`cron`};if(t===`side-chat-draft`&&r)return{kind:`side-chat-draft`,draft:r};if(t!==`child-session`&&i){let e=o.find(e=>e.key===i);if(e)return{kind:`file`,file:e}}if(t!==`file`&&n){let e=a.find(e=>e.sessionKey===n);if(e)return{kind:`child-session`,tab:e}}return a[0]?{kind:`child-session`,tab:a[0]}:r?{kind:`side-chat-draft`,draft:r}:o[0]?{kind:`file`,file:o[0]}:null}function kd(e){return e===`child-sessions`||e===`cron`||e===`project-files`?{kind:e}:null}function Ad({activeSelection:e,closedWorkspaceTabEntries:t,onCloseTab:n,onSelectChildSessions:r,onSelectCronJobs:i,onSelectOverview:a,onSelectProjectFiles:o}){return[{key:`overview`,kind:`overview`,title:f(`chatWorkspaceOverview`),tooltip:f(`chatWorkspaceOverview`),active:e?.kind===`overview`,onSelect:a},{key:`child-sessions`,kind:`child-sessions`,title:f(`chatWorkspaceChildSessions`),tooltip:f(`chatWorkspaceChildSessions`),active:e?.kind===`child-sessions`,onSelect:r,onClose:()=>n({kind:`child-sessions`})},{key:`cron:session`,kind:`cron`,title:f(`chatWorkspaceSessionCronJobs`),tooltip:f(`chatWorkspaceSessionCronJobs`),active:e?.kind===`cron`,onSelect:i,onClose:()=>n({kind:`cron`})},{key:`project-files`,kind:`project-files`,title:f(`chatWorkspaceProjectFiles`),tooltip:f(`chatWorkspaceProjectFiles`),active:e?.kind===`project-files`,onSelect:o,onClose:()=>n({kind:`project-files`})}].filter(e=>{let n=kd(e.kind);return!n||!t.some(e=>Wu(e,n))})}function jd(e){let{activeSideChatDraft:t,closedWorkspaceTabEntries:n,resolvedChildTabs:r,workspaceFileTabs:i,activeSelection:a,optimisticReadAtBySessionKey:o,onSelectSession:s,onSelectFile:c,onOpenFileViewer:l,onCloseTab:u,onSelectOverview:d,onSelectChildSessions:p,onSelectProjectFiles:m,onSelectCronJobs:h}=e,g=Ad({activeSelection:a,closedWorkspaceTabEntries:n,onCloseTab:u,onSelectChildSessions:p,onSelectCronJobs:h,onSelectOverview:d,onSelectProjectFiles:m}),_=t?[{key:`side-chat-draft:${t.draftKey}`,kind:`side-chat-draft`,title:f(`chatWorkspaceSideChatDraftTitle`),tooltip:f(`chatWorkspaceSideChatDraftSubtitle`),active:a?.kind===`side-chat-draft`&&a.draft.draftKey===t.draftKey,onSelect:()=>void 0,onClose:()=>u({kind:`side-chat-draft`,key:t.draftKey})}]:[],v=r.filter(e=>!n.some(t=>Wu(t,{kind:`child-session`,key:e.sessionKey}))).map(e=>{let t=o[e.sessionKey],n=t&&e.readAt?t.localeCompare(e.readAt)>0?t:e.readAt:t??e.readAt;return{key:`child:${e.sessionKey}`,kind:`child-session`,title:e.title,tooltip:e.title,agentId:e.agentId,active:a?.kind===`child-session`&&a.tab.sessionKey===e.sessionKey,showUnreadDot:Dl({active:a?.kind===`child-session`&&a.tab.sessionKey===e.sessionKey,lastMessageAt:e.lastMessageAt,readAt:n,runStatus:e.runStatus}),onSelect:()=>s(e.sessionKey),onClose:()=>u({kind:`child-session`,key:e.sessionKey})}}),y=i.map(e=>{let t=e.viewMode===`preview`?wd(e.path,e.previewViewer):null,n=e.viewMode===`preview`?Ed(e.path,e.previewViewer):null,r=Dd(e);return{key:`file:${e.key}`,kind:`file`,title:t===`rendered`?`${f(`chatWorkspacePreview`)}: ${r}`:r,tooltip:e.path,fileName:e.path,viewMode:e.viewMode,isRenderedPreview:t===`rendered`,alternateViewerAction:n?{label:f(n===`rendered`?`chatWorkspaceOpenPreview`:`chatWorkspaceOpenSource`),viewer:n,onSelect:()=>l(e.key,n)}:null,active:a?.kind===`file`&&a.file.key===e.key,onSelect:()=>c(e.key),onClose:()=>u({kind:`file`,key:e.key})}});return[...g,..._,...v,...y]}function Md(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var Nd=Object.freeze({left:0,top:0,width:16,height:16}),Pd=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Fd=Object.freeze({...Nd,...Pd}),Id=Object.freeze({...Fd,body:``,hidden:!1});function Ld(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Rd(e,t){let n=Ld(e,t);for(let r in Id)r in Pd?r in e&&!(r in n)&&(n[r]=Pd[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function zd(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Rd(r[e]||i[e],a)}return o(t),n.forEach(o),Rd(e,a)}function Bd(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=Md(e);for(let i in r){let a=r[i];a&&(t(i,zd(e,i,a)),n.push(i))}return n}var Vd={provider:``,aliases:{},not_found:{},...Nd};function Hd(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ud(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!Hd(e,Vd))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!Hd(t,Id))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!Hd(t,Id))return null}return t}var Wd=Object.create(null);function Gd(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Kd(e,t){let n=Wd[e]||(Wd[e]=Object.create(null));return n[t]||(n[t]=Gd(e,t))}function qd(e,t){return Ud(t)?Bd(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Jd(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var Yd=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xd=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Zd(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Zd(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Zd(e,n)?null:e}return null},Zd=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1,Qd=!1;function $d(e){return typeof e==`boolean`&&(Qd=e),Qd}function ef(e){let t=typeof e==`string`?Xd(e,!0,Qd):e;if(t){let e=Kd(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function tf(e,t){let n=Xd(e,!0,Qd);if(!n)return!1;let r=Kd(n.provider,n.prefix);return t?Jd(r,n.name,t):(r.missing.add(n.name),!0)}function nf(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),Qd&&!t&&!e.prefix){let t=!1;return Ud(e)&&(e.prefix=``,Bd(e,(e,n)=>{tf(e,n)&&(t=!0)})),t}let n=e.prefix;return Zd({prefix:n,name:`a`})?!!qd(Kd(t,n),e):!1}var rf=Object.freeze({width:null,height:null}),af=Object.freeze({...rf,...Pd}),of=/(-?[0-9.]*[0-9]+[0-9.]*)/g,sf=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function cf(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(of);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=sf.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function lf(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function uf(e,t){return e?`<defs>`+e+`</defs>`+t:t}function df(e,t,n){let r=lf(e);return uf(r.defs,t+r.content+n)}var ff=e=>e===`unset`||e===`undefined`||e===`none`;function pf(e,t){let n={...Fd,...e},r={...af,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=df(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=cf(d,c/l)):(u=o===`auto`?c:o,d=s===null?cf(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{ff(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var mf=/\sid="(\S+)"/g,hf=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),gf=0;function _f(e,t=hf){let n=[],r;for(;r=mf.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(gf++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}var vf=Object.create(null);function yf(e,t){vf[e]=t}function bf(e){return vf[e]||vf[``]}function xf(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var Sf=Object.create(null),Cf=[`https://api.simplesvg.com`,`https://api.unisvg.com`],wf=[];Cf.length>0;)Cf.length===1||Math.random()>.5?wf.push(Cf.shift()):wf.push(Cf.pop());Sf[``]=xf({resources:[`https://api.iconify.design`].concat(wf)});function Tf(e,t){let n=xf(t);return n===null?!1:(Sf[e]=n,!0)}function Ef(e){return Sf[e]}var Df=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Of(e,t){let n=Ef(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function kf(e){return e===404}var Af=(e,t,n)=>{let r=[],i=Of(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function jf(e){if(typeof e==`string`){let t=Ef(e);if(t)return t.path}return`/`}var Mf={prepare:Af,send:(e,t,n)=>{if(!Df){n(`abort`,424);return}let r=jf(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Df(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(kf(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Nf(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Pf(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||Nf([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Ff=0;function If(e,t,n){let r=Ff++,i=Nf.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function Lf(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Kd(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Rf(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Xd(e,t,n):e;i&&r.push(i)}),r}var zf={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Bf(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function Vf(e){let t={...zf,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Bf(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Hf(){}var Uf=Object.create(null);function Wf(e){if(!Uf[e]){let t=Ef(e);if(!t)return;Uf[e]={config:t,redundancy:Vf(t)}}return Uf[e]}function Gf(e,t,n){let r,i;if(typeof e==`string`){let t=bf(e);if(!t)return n(void 0,424),Hf;i=t.send;let a=Wf(e);a&&(r=a.redundancy)}else{let t=xf(e);if(t){r=Vf(t);let n=bf(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),Hf):r.query(t,i,n)().abort}function Kf(){}function qf(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Pf(e)}))}function Jf(e){let t=[],n=[];return e.forEach(e=>{(e.match(Yd)?t:n).push(e)}),{valid:t,invalid:n}}function Yf(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!qd(e,n).length){r();return}}catch(e){console.error(e)}r(),qf(e)}function Xf(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Zf(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Xf(e.loadIcons(r,n,t),t=>{Yf(e,r,t)});return}if(i){r.forEach(r=>{Xf(i(r,n,t),t=>{Yf(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Jf(r);if(o.length&&Yf(e,o,null),!a.length)return;let s=n.match(Yd)?bf(t):null;if(!s){Yf(e,a,null);return}s.prepare(t,n,a).forEach(n=>{Gf(t,n,t=>{Yf(e,n.icons,t)})})}))}var Qf=(e,t)=>{let n=Lf(Rf(e,!0,$d()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Kf)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(Kd(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=Kd(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Zf(e,t)}),t?If(t,n,i):Kf};function $f(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in rf?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var ep=/[\s,]+/;function tp(e,t){t.split(ep).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}function np(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function rp(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function ip(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function ap(e){return`data:image/svg+xml,`+ip(e)}function op(e){return`url("`+ap(e)+`")`}var sp;function cp(){try{sp=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{sp=null}}function lp(e){return sp===void 0&&cp(),sp?sp.createHTML(e):e}var up={...af,inline:!1},dp={xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},fp={display:`inline-block`},pp={backgroundColor:`currentColor`},mp={backgroundColor:`transparent`},hp={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},gp={WebkitMask:pp,mask:pp,background:mp};for(let e in gp){let t=gp[e];for(let n in hp)t[e+n]=hp[n]}var _p={...up,inline:!0};function vp(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var yp=(e,t,n)=>{let r=t.inline?_p:up,i=$f(r,t),a=t.mode||`svg`,o={},s=t.style||{},c={...a===`svg`?dp:{}};if(n){let e=Xd(n,!1,!0);if(e){let t=[`iconify`];for(let n of[`provider`,`prefix`])e[n]&&t.push(`iconify--`+e[n]);c.className=t.join(` `)}}for(let e in t){let n=t[e];if(n!==void 0)switch(e){case`icon`:case`style`:case`children`:case`onLoad`:case`mode`:case`ssr`:case`fallback`:break;case`_ref`:c.ref=n;break;case`className`:c[e]=(c[e]?c[e]+` `:``)+n;break;case`inline`:case`hFlip`:case`vFlip`:i[e]=n===!0||n===`true`||n===1;break;case`flip`:typeof n==`string`&&tp(i,n);break;case`color`:o.color=n;break;case`rotate`:typeof n==`string`?i[e]=np(n):typeof n==`number`&&(i[e]=n);break;case`ariaHidden`:case`aria-hidden`:n!==!0&&n!==`true`&&delete c[`aria-hidden`];break;default:r[e]===void 0&&(c[e]=n)}}let l=pf(e,i),u=l.attributes;if(i.inline&&(o.verticalAlign=`-0.125em`),a===`svg`){c.style={...o,...s},Object.assign(c,u);let e=0,n=t.id;return typeof n==`string`&&(n=n.replace(/-/g,`_`)),c.dangerouslySetInnerHTML={__html:lp(_f(l.body,n?()=>n+`ID`+ e++:`iconifyReact`))},(0,I.createElement)(`svg`,c)}let{body:d,width:f,height:p}=e,m=a===`mask`||(a===`bg`?!1:d.indexOf(`currentColor`)!==-1),h=rp(d,{...u,width:f+``,height:p+``});return c.style={...o,"--svg":op(h),width:vp(u.width),height:vp(u.height),...fp,...m?pp:mp,...s},(0,I.createElement)(`span`,c)};if($d(!0),yf(``,Mf),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!nf(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;Tf(e,r)||console.error(n)}catch{console.error(n)}}}}function bp(e){let[t,n]=(0,I.useState)(!!e.ssr),[r,i]=(0,I.useState)({});function a(t){if(t){let t=e.icon;if(typeof t==`object`)return{name:``,data:t};let n=ef(t);if(n)return{name:t,data:n}}return{name:``}}let[o,s]=(0,I.useState)(a(!!e.ssr));function c(){let e=r.callback;e&&(e(),i({}))}function l(e){if(JSON.stringify(o)!==JSON.stringify(e))return c(),s(e),!0}function u(){var t;let n=e.icon;if(typeof n==`object`){l({name:``,data:n});return}let r=ef(n);l({name:n,data:r})&&(r===void 0?i({callback:Qf([n],u)}):r&&((t=e.onLoad)==null||t.call(e,n)))}(0,I.useEffect)(()=>(n(!0),c),[]),(0,I.useEffect)(()=>{t&&u()},[e.icon,t]);let{name:d,data:f}=o;return f?yp({...Fd,...f},e,d):e.children?e.children:e.fallback?e.fallback:(0,I.createElement)(`span`,{})}var xp=(0,I.forwardRef)((e,t)=>bp({...e,_ref:t}));(0,I.forwardRef)((e,t)=>bp({inline:!0,...e,_ref:t}));var Sp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#c5c5c5" d="M20.414 2H5v28h22V8.586ZM7 28V4h12v6h6v18Z"/>`}})),Cp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#00007f" d="M17.229 4a.9.9 0 0 0-.569.232l-7.6 6.32a1.158 1.158 0 0 1-.955.328H3.208A1.2 1.2 0 0 0 2 12.088v7.826a1.2 1.2 0 0 0 1.208 1.206H8.1a1.158 1.158 0 0 1 .955.328l7.6 6.32c.521.433 1.081.224 1.081-.289V4.522A.494.494 0 0 0 17.229 4ZM27 6.3l-1.791 1.793a14.708 14.708 0 0 1 0 15.844l1.785 1.776A17.19 17.19 0 0 0 27 6.3Zm-4.333 4.323L20.905 12.4a6.035 6.035 0 0 1 0 7.237l1.756 1.756a8.554 8.554 0 0 0 .01-10.769Z"/>`}})),wp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#fbf0df" d="M29 17c0 5.65-5.82 10.23-13 10.23S3 22.61 3 17c0-3.5 2.24-6.6 5.66-8.44S14.21 4.81 16 4.81s3.32 1.54 7.34 3.71C26.76 10.36 29 13.46 29 17Z"/><path fill="none" stroke="#000" d="M16 27.65c7.32 0 13.46-4.65 13.46-10.65c0-3.72-2.37-7-5.89-8.85c-1.39-.75-2.46-1.41-3.37-2l-1.13-.69A6.14 6.14 0 0 0 16 4.35a6.88 6.88 0 0 0-3.3 1.23c-.42.24-.86.51-1.32.8c-.87.54-1.83 1.13-3 1.73C4.91 10 2.54 13.24 2.54 17c0 6 6.14 10.65 13.46 10.65Z"/><ellipse cx="21.65" cy="18.62" fill="#febbd0" rx="2.17" ry="1.28"/><ellipse cx="10.41" cy="18.62" fill="#febbd0" rx="2.17" ry="1.28"/><path fill-rule="evenodd" d="M11.43 18.11a2 2 0 1 0-2-2.05a2.05 2.05 0 0 0 2 2.05Zm9.2 0a2 2 0 1 0-2-2.05a2 2 0 0 0 2 2.05Z"/><path fill="#fff" fill-rule="evenodd" d="M10.79 16.19a.77.77 0 1 0-.76-.77a.76.76 0 0 0 .76.77Zm9.2 0a.77.77 0 1 0 0-1.53a.77.77 0 0 0 0 1.53Z"/><path fill="#b71422" stroke="#000" stroke-width=".75" d="M18.62 19.67a3.3 3.3 0 0 1-1.09 1.75a2.48 2.48 0 0 1-1.5.69a2.53 2.53 0 0 1-1.5-.69a3.28 3.28 0 0 1-1.08-1.75a.26.26 0 0 1 .29-.3h4.58a.27.27 0 0 1 .3.3Z"/><path fill="#ccbea7" fill-rule="evenodd" d="M14.93 5.75a6.09 6.09 0 0 1-2.09 4.62c-.1.09 0 .27.11.22c1.25-.49 2.94-1.94 2.23-4.88c-.03-.15-.25-.11-.25.04Zm.85 0a6 6 0 0 1 .57 5c0 .13.12.24.21.13c.83-1 1.54-3.11-.59-5.31c-.1-.11-.27.04-.19.17Zm1-.06a6.09 6.09 0 0 1 2.53 4.38c0 .14.21.17.24 0c.34-1.3.15-3.51-2.66-4.66c-.12-.02-.21.18-.09.27ZM9.94 9.55a6.27 6.27 0 0 0 3.89-3.33c.07-.13.28-.08.25.07c-.64 3-2.79 3.59-4.13 3.51c-.14-.01-.14-.21-.01-.25Z"/>`}})),Tp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#99b8c4" d="m23.265 24.381l.9-.894c4.164.136 4.228-.01 4.411-.438l1.144-2.785l.085-.264l-.093-.231c-.049-.122-.2-.486-2.8-2.965V15.5c3-2.89 2.936-3.038 2.765-3.461l-1.139-2.814c-.171-.422-.236-.587-4.37-.474l-.9-.93a20.166 20.166 0 0 0-.141-4.106l-.116-.263l-2.974-1.3c-.438-.2-.592-.272-3.4 2.786l-1.262-.019c-2.891-3.086-3.028-3.03-3.461-2.855L9.149 3.182c-.433.175-.586.237-.418 4.437l-.893.89c-4.162-.136-4.226.012-4.407.438l-1.146 2.786l-.09.267l.094.232c.049.12.194.48 2.8 2.962v1.3c-3 2.89-2.935 3.038-2.763 3.462l1.138 2.817c.174.431.236.584 4.369.476l.9.935a20.243 20.243 0 0 0 .137 4.1l.116.265l2.993 1.308c.435.182.586.247 3.386-2.8l1.262.016c2.895 3.09 3.043 3.03 3.466 2.859l2.759-1.115c.436-.173.588-.234.413-4.436Zm-11.858-6.524a4.957 4.957 0 1 1 6.488 2.824a5.014 5.014 0 0 1-6.488-2.824Z"/>`}})),Ep=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#984c93" d="M14.742 24.047a10.242 10.242 0 0 1-4.673.919a7.628 7.628 0 0 1-5.914-2.346A8.876 8.876 0 0 1 2 16.369a9.476 9.476 0 0 1 2.422-6.748a8.216 8.216 0 0 1 6.285-2.588a11.151 11.151 0 0 1 4.035.641v3.761A6.839 6.839 0 0 0 11 10.395a4.813 4.813 0 0 0-3.712 1.535a5.9 5.9 0 0 0-1.413 4.159A5.8 5.8 0 0 0 7.209 20.1a4.57 4.57 0 0 0 3.59 1.493a7.319 7.319 0 0 0 3.943-1.113Zm2.37-9.218v-2.344h2.344v2.344H21.8v2.343h-2.344v2.343h-2.344v-2.343H14.77v-2.344l2.342.001zm8.201 0v-2.344h2.344v2.344H30v2.343h-2.343v2.343h-2.344v-2.343h-2.342v-2.344l2.342.001z"/>`}})),Dp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#368832" d="M19.792 7.071h2.553v2.553H24.9V7.071h2.552v2.553H30v2.552h-2.55v2.551H30v2.553h-2.551v2.552H24.9v-2.55h-2.55v2.552h-2.557v-2.55H17.24v-2.559h2.553v-2.546H17.24V9.622h2.554Zm2.553 7.658H24.9v-2.553h-2.555Zm-7.656 9.284a10.2 10.2 0 0 1-4.653.915a7.6 7.6 0 0 1-5.89-2.336A8.839 8.839 0 0 1 2 16.367a9.436 9.436 0 0 1 2.412-6.719a8.181 8.181 0 0 1 6.259-2.577a11.1 11.1 0 0 1 4.018.638v3.745a6.81 6.81 0 0 0-3.723-1.036a4.793 4.793 0 0 0-3.7 1.529a5.879 5.879 0 0 0-1.407 4.142a5.774 5.774 0 0 0 1.328 3.992a4.551 4.551 0 0 0 3.575 1.487a7.288 7.288 0 0 0 3.927-1.108Z"/>`}})),Op=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#1572b6" d="M5.902 27.201L3.656 2h24.688l-2.249 25.197L15.985 30L5.902 27.201z"/><path fill="#33a9dc" d="m16 27.858l8.17-2.265l1.922-21.532H16v23.797z"/><path fill="#fff" d="M16 13.191h4.09l.282-3.165H16V6.935h7.75l-.074.829l-.759 8.518H16v-3.091z"/><path fill="#ebebeb" d="m16.019 21.218l-.014.004l-3.442-.93l-.22-2.465H9.24l.433 4.853l6.331 1.758l.015-.004v-3.216z"/><path fill="#fff" d="m19.827 16.151l-.372 4.139l-3.447.93v3.216l6.336-1.756l.047-.522l.537-6.007h-3.101z"/><path fill="#ebebeb" d="M16.011 6.935v3.091H8.545l-.062-.695l-.141-1.567l-.074-.829h7.743zM16 13.191v3.091h-3.399l-.062-.695l-.14-1.567l-.074-.829H16z"/>`}})),kp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#3a4e55" d="M18.191 13.071H20.7v2.566h1.27a5.5 5.5 0 0 0 1.744-.292a4.462 4.462 0 0 0 .848-.383a3.149 3.149 0 0 1-.589-1.623a3.427 3.427 0 0 1 .616-2.416l.264-.305l.314.253a4 4 0 0 1 1.575 2.538a3.837 3.837 0 0 1 2.913.271l.345.2l-.181.354a3.629 3.629 0 0 1-3.648 1.74c-2.173 5.413-6.9 7.976-12.642 7.976A7.958 7.958 0 0 1 6.3 20.211l-.025-.043l-.226-.459a7.28 7.28 0 0 1-.579-3.693l.035-.38h2.143v-2.565h2.51v-2.51h5.02v-2.51h3.012v5.02Z"/><path fill="#00aada" d="M26.324 14.021a3.311 3.311 0 0 0-1.418-2.821a3.072 3.072 0 0 0 .289 3.821a5.279 5.279 0 0 1-3.225 1.037H5.883a6.779 6.779 0 0 0 .667 3.737l.183.335a6.2 6.2 0 0 0 .379.569q.992.064 1.829.045a8.972 8.972 0 0 0 2.669-.389a.193.193 0 1 1 .126.365c-.09.031-.184.061-.281.088a8.4 8.4 0 0 1-1.845.3c.044 0-.046.007-.046.007l-.082.007a21.455 21.455 0 0 1-2.008-.006l-.01.007a7.882 7.882 0 0 0 6.063 2.41c5.56 0 10.276-2.465 12.365-8c1.482.152 2.906-.226 3.553-1.49a3.5 3.5 0 0 0-3.122-.022"/><path fill="#27b9ec" d="M26.324 14.021a3.311 3.311 0 0 0-1.418-2.821a3.072 3.072 0 0 0 .289 3.821a5.279 5.279 0 0 1-3.225 1.037H6.836a5.223 5.223 0 0 0 2.106 4.686a8.972 8.972 0 0 0 2.669-.389a.193.193 0 1 1 .126.365c-.09.031-.184.061-.281.088a8.83 8.83 0 0 1-1.894.314l-.019-.022c1.892.971 4.636.967 7.782-.241a21.868 21.868 0 0 0 9.1-6.889l-.1.048"/><path fill="#088cb9" d="M5.913 17.732a6.431 6.431 0 0 0 .637 2.061l.183.335a6.2 6.2 0 0 0 .379.569q.992.064 1.829.045a8.972 8.972 0 0 0 2.669-.389a.193.193 0 1 1 .126.365c-.09.031-.184.061-.281.088a8.826 8.826 0 0 1-1.891.307h-.1c-.291.016-.6.026-.922.026c-.351 0-.709-.007-1.1-.026a7.913 7.913 0 0 0 6.076 2.413c4.76 0 8.9-1.807 11.3-5.8Z"/><path fill="#039cc7" d="M6.98 17.732a4.832 4.832 0 0 0 1.961 3.01a8.972 8.972 0 0 0 2.669-.389a.193.193 0 1 1 .126.365c-.09.031-.184.061-.281.088a8.959 8.959 0 0 1-1.9.307c1.892.971 4.628.957 7.773-.252a20.545 20.545 0 0 0 5.377-3.13Z"/><path fill="#00acd3" d="M9.889 13.671h.172v1.813h-.172v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813H9.23v-1.813Zm-.33 0h.179v1.813H8.9v-1.813Zm-.33 0h.179v1.813H8.57v-1.813Zm-.323 0h.172v1.813h-.17v-1.813Zm-.181-.181h2.175v2.176H8.066V13.49Zm4.335-2.329h.172v1.813H12.4v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.178v1.813h-.178v-1.813Zm-.323 0h.172v1.813h-.172v-1.813Zm-.181-.181h2.176v2.176h-2.175v-2.177Z"/><path fill="#26c2ee" d="M12.4 13.671h.172v1.813H12.4v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.178v1.813h-.178v-1.813Zm-.323 0h.172v1.813h-.172v-1.813Zm-.181-.181h2.176v2.176h-2.175V13.49Z"/><path fill="#00acd3" d="M14.909 13.671h.172v1.813h-.172v-1.813Zm-.33 0h.179v1.813h-.178v-1.813Zm-.33 0h.179v1.813h-.178v-1.813Zm-.33 0h.181v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.323 0h.172v1.813h-.172v-1.813Zm-.181-.181h2.176v2.176h-2.174V13.49Z"/><path fill="#26c2ee" d="M14.909 11.161h.172v1.813h-.172v-1.813Zm-.33 0h.179v1.813h-.178v-1.813Zm-.33 0h.179v1.813h-.178v-1.813Zm-.33 0h.181v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.323 0h.172v1.813h-.172v-1.813Zm-.181-.181h2.176v2.176h-2.174v-2.177Zm4.335 2.691h.172v1.813h-.172v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813H16.1v-1.813Zm-.323 0h.172v1.813h-.172v-1.813Zm-.177-.181h2.176v2.176H15.6V13.49Z"/><path fill="#00acd3" d="M17.42 11.161h.172v1.813h-.172v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813H16.1v-1.813Zm-.323 0h.172v1.813h-.172v-1.813Zm-.181-.181h2.176v2.176H15.6v-2.177Z"/><path fill="#26c2ee" d="M17.42 8.65h.172v1.813h-.172V8.65Zm-.33 0h.179v1.813h-.179V8.65Zm-.33 0h.179v1.813h-.179V8.65Zm-.33 0h.179v1.813h-.179V8.65Zm-.33 0h.179v1.813H16.1V8.65Zm-.323 0h.172v1.813h-.172V8.65Zm-.177-.181h2.176v2.176H15.6V8.469Z"/><path fill="#00acd3" d="M19.93 13.671h.17v1.813h-.17v-1.813Zm-.33 0h.178v1.813H19.6v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.33 0h.179v1.813h-.179v-1.813Zm-.323 0h.172v1.813h-.172v-1.813Zm-.181-.181h2.176v2.176h-2.175V13.49Z"/><path fill="#d5eef2" d="M12.616 19.193a.6.6 0 1 1-.6.6a.6.6 0 0 1 .6-.6"/><path fill="#3a4e55" d="M12.616 19.363a.431.431 0 0 1 .156.029a.175.175 0 1 0 .241.236a.43.43 0 1 1-.4-.265M2 17.949h27.92c-.608-.154-1.923-.362-1.707-1.159c-1.105 1.279-3.771.9-4.444.267c-.749 1.087-5.111.674-5.415-.173c-.939 1.1-3.85 1.1-4.789 0c-.3.847-4.666 1.26-5.415.173c-.673.631-3.338 1.012-4.444-.267c.217.8-1.1 1.005-1.707 1.159"/><path fill="#c0dbe1" d="M14.211 23.518a5.287 5.287 0 0 1-2.756-2.711a9.2 9.2 0 0 1-1.987.3q-.436.024-.917.025q-.554 0-1.168-.033a7.942 7.942 0 0 0 6.145 2.43q.344 0 .683-.013"/><path fill="#d5eef2" d="M12.007 21.773a5.206 5.206 0 0 1-.552-.966a9.2 9.2 0 0 1-1.987.3a6.325 6.325 0 0 0 2.539.664"/>`}})),Ap=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<g fill-rule="evenodd"><path d="M3.167 3.167h25.667v25.667H3.167z"/><path fill="#ecd53f" fill-rule="nonzero" d="M30 2v28H2V2zM14.757 20.539H9.98v6.44h4.898v-1.085h-3.597V24.14h3.232v-1.085H11.28v-1.428h3.475v-1.09zm2.503 0h-1.264v6.44h1.207v-4.2l2.597 4.2h1.305v-6.44h-1.21v4.3l-2.635-4.301zm5.97 0h-1.41l2.303 6.44h1.388l2.306-6.44h-1.38l-1.577 4.766l-1.63-4.767zM8.3 24.96H6.34v1.96H8.3z"/></g>`}})),jp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#4b32c3" d="m29.832 16.7l-6.354 10.717A1.256 1.256 0 0 1 22.36 28H9.647a1.262 1.262 0 0 1-1.118-.59l-6.356-10.7a1.256 1.256 0 0 1 0-1.272L8.527 4.676A1.344 1.344 0 0 1 9.647 4h12.709a1.344 1.344 0 0 1 1.118.678l6.354 10.786a1.2 1.2 0 0 1 0 1.238Zm-5.262 4.2v-9.614L16 6.466l-8.56 4.82V20.9L16 25.719Z"/><path fill="#8080f2" d="m21.802 19.188l-5.747 3.235l-5.742-3.235v-6.47l5.742-3.236l5.747 3.236v6.47z"/>`}})),Mp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypeExcel0" x1="4.494" x2="13.832" y1="-2092.086" y2="-2075.914" gradientTransform="translate(0 2100)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#18884f"/><stop offset=".5" stop-color="#117e43"/><stop offset="1" stop-color="#0b6631"/></linearGradient></defs><path fill="#185c37" d="M19.581 15.35L8.512 13.4v14.409A1.192 1.192 0 0 0 9.705 29h19.1A1.192 1.192 0 0 0 30 27.809V22.5Z"/><path fill="#21a366" d="M19.581 3H9.705a1.192 1.192 0 0 0-1.193 1.191V9.5L19.581 16l5.861 1.95L30 16V9.5Z"/><path fill="#107c41" d="M8.512 9.5h11.069V16H8.512Z"/><path d="M16.434 8.2H8.512v16.25h7.922a1.2 1.2 0 0 0 1.194-1.191V9.391A1.2 1.2 0 0 0 16.434 8.2Z" opacity=".1"/><path d="M15.783 8.85H8.512V25.1h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191Z" opacity=".2"/><path d="M15.783 8.85H8.512V23.8h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191Z" opacity=".2"/><path d="M15.132 8.85h-6.62V23.8h6.62a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191Z" opacity=".2"/><path fill="url(#vscodeIconsFileTypeExcel0)" d="M3.194 8.85h11.938a1.193 1.193 0 0 1 1.194 1.191v11.918a1.193 1.193 0 0 1-1.194 1.191H3.194A1.192 1.192 0 0 1 2 21.959V10.041A1.192 1.192 0 0 1 3.194 8.85Z"/><path fill="#fff" d="m5.7 19.873l2.511-3.884l-2.3-3.862h1.847L9.013 14.6c.116.234.2.408.238.524h.017c.082-.188.169-.369.26-.546l1.342-2.447h1.7l-2.359 3.84l2.419 3.905h-1.809l-1.45-2.711A2.355 2.355 0 0 1 9.2 16.8h-.024a1.688 1.688 0 0 1-.168.351l-1.493 2.722Z"/><path fill="#33c481" d="M28.806 3h-9.225v6.5H30V4.191A1.192 1.192 0 0 0 28.806 3Z"/><path fill="#107c41" d="M19.581 16H30v6.5H19.581Z"/>`}})),Np=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#cfcfcf" d="m12.677 17.781l-2.626-6.256l-2.694 6.256Zm6.723 6.511h-7.069v-1.365l.458-.023a1.847 1.847 0 0 0 .972-.2a.313.313 0 0 0 .145-.263a4.158 4.158 0 0 0-.419-1.4l-.812-1.931H7.322L6.4 21.259a3.319 3.319 0 0 0-.349 1.157c0 .036 0 .119.154.241a2.481 2.481 0 0 0 1.191.247l.448.033v1.354H2v-1.31l.4-.07a2.188 2.188 0 0 0 1-.318a6.318 6.318 0 0 0 1.18-2.066l5.575-13.036H11.2l5.512 13.174a5.255 5.255 0 0 0 1.049 1.835a1.959 1.959 0 0 0 1.19.4l.454.027Zm6.441-2.732v-3.985a22.542 22.542 0 0 0-2.226.97a3.845 3.845 0 0 0-1.29 1.05a2.03 2.03 0 0 0-.388 1.2a1.951 1.951 0 0 0 .491 1.362a1.49 1.49 0 0 0 1.13.544a4.142 4.142 0 0 0 2.283-1.141Zm-3.333 2.949a2.833 2.833 0 0 1-2.139-.893a3.206 3.206 0 0 1-.833-2.285a2.959 2.959 0 0 1 .415-1.577a5 5 0 0 1 1.791-1.625a23.876 23.876 0 0 1 3.617-1.588v-.074a2.905 2.905 0 0 0-.383-1.833a1.325 1.325 0 0 0-1.075-.412a1.155 1.155 0 0 0-.816.26a.687.687 0 0 0-.277.536l.023.646a1.62 1.62 0 0 1-.4 1.158a1.481 1.481 0 0 1-2.1-.019a1.634 1.634 0 0 1-.391-1.134a2.8 2.8 0 0 1 1.182-2.177a4.813 4.813 0 0 1 3.125-.932a5.381 5.381 0 0 1 2.508.524a2.628 2.628 0 0 1 1.213 1.346a6.391 6.391 0 0 1 .244 2.2v3.55a14.665 14.665 0 0 0 .051 1.749a.661.661 0 0 0 .054.2c.085-.078.284-.225.864-.806l.819-.828v1.967l-.1.128c-.958 1.283-1.883 1.907-2.83 1.907a1.6 1.6 0 0 1-1.257-.557a1.788 1.788 0 0 1-.358-.74a9.688 9.688 0 0 1-1.433.977a3.579 3.579 0 0 1-1.514.332Z"/>`}})),Pp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#dd4c35" d="M29.472 14.753L17.247 2.528a1.8 1.8 0 0 0-2.55 0l-2.539 2.539l3.22 3.22a2.141 2.141 0 0 1 2.712 2.73l3.1 3.1a2.143 2.143 0 1 1-1.285 1.21l-2.895-2.895v7.617a2.141 2.141 0 1 1-1.764-.062V12.3a2.146 2.146 0 0 1-1.165-2.814l-3.17-3.172L2.528 14.7a1.8 1.8 0 0 0 0 2.551l12.225 12.221a1.8 1.8 0 0 0 2.55 0L29.472 17.3a1.8 1.8 0 0 0 0-2.551"/><path fill="#fff" d="m12.158 5.067l3.22 3.22a2.141 2.141 0 0 1 2.712 2.73l3.1 3.1a2.143 2.143 0 1 1-1.285 1.21l-2.895-2.895v7.617a2.141 2.141 0 1 1-1.764-.062V12.3a2.146 2.146 0 0 1-1.165-2.814l-3.17-3.172"/>`}})),Fp=n((e=>{e.__esModule=!0,e.default={width:254.5,height:225,body:`<path fill="#00acd7" d="M-46.926 89c-.621 0-.777-.311-.466-.777l3.262-4.194a2.225 2.225 0 0 1 1.708-.777h55.448c.621 0 .777.466.466.932l-2.64 4.038a2.367 2.367 0 0 1-1.553.932Zm-23.453 14.285c-.621 0-.777-.311-.466-.777l3.262-4.194a2.225 2.225 0 0 1 1.708-.777H4.95a.714.714 0 0 1 .777.932L4.484 102.2a1.358 1.358 0 0 1-1.4.932Zm37.587 14.289c-.621 0-.777-.466-.466-.932l2.174-3.883a2.06 2.06 0 0 1 1.553-.932H1.533c.621 0 .932.466.932 1.087l-.311 3.728a1.167 1.167 0 0 1-1.087 1.087ZM128.426 86.2c-9.785 2.485-16.464 4.349-26.093 6.834c-2.33.621-2.485.777-4.5-1.553c-2.33-2.64-4.038-4.349-7.3-5.9c-9.785-4.815-19.259-3.417-28.112 2.33c-10.561 6.834-16 16.929-15.842 29.51c.155 12.425 8.7 22.676 20.968 24.385c10.561 1.4 19.414-2.33 26.4-10.251c1.4-1.708 2.64-3.572 4.194-5.747H68.163c-3.262 0-4.038-2.019-2.951-4.659c2.019-4.815 5.747-12.891 7.921-16.929a4.194 4.194 0 0 1 3.883-2.485h56.535c-.311 4.194-.311 8.387-.932 12.581a66.239 66.239 0 0 1-12.736 30.442c-11.183 14.752-25.783 23.915-44.265 26.4c-15.221 2.019-29.355-.932-41.78-10.251a48.785 48.785 0 0 1-19.725-34.48c-2.019-16.929 2.951-32.15 13.2-45.508C38.342 66.475 52.942 57.312 70.8 54.05c14.6-2.64 28.578-.932 41.159 7.61a48.686 48.686 0 0 1 18.017 21.9c.935 1.398.313 2.175-1.55 2.64Z"/><path fill="#00acd7" d="M179.835 172.09c-14.134-.311-27.025-4.349-37.9-13.668a48.711 48.711 0 0 1-16.774-29.976c-2.8-17.551 2.019-33.082 12.581-46.905c11.338-14.91 25.006-22.676 43.488-25.938c15.842-2.8 30.753-1.243 44.265 7.921c12.27 8.387 19.88 19.725 21.9 34.635c2.64 20.968-3.417 38.052-17.861 52.652a71.17 71.17 0 0 1-37.276 19.88c-4.191.778-8.384.933-12.423 1.399Zm36.965-62.747a44.7 44.7 0 0 0-.466-5.125c-2.8-15.376-16.929-24.074-31.684-20.657c-14.444 3.262-23.763 12.425-27.18 27.025a25.579 25.579 0 0 0 14.289 29.355c8.542 3.728 17.085 3.262 25.317-.932c12.269-6.369 18.948-16.309 19.724-29.666Z"/>`}})),Ip=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#e10098" d="M4.781 22.746L16.232 2.914l1.028.593L5.81 23.34z"/><path fill="#e10098" d="M4.545 21.162h22.902v1.187H4.545z"/><path fill="#e10098" d="m4.999 21.828l.593-1.028l11.455 6.614l-.594 1.028zM14.95 4.59l.594-1.027l11.455 6.614l-.594 1.028z"/><path fill="#e10098" d="M5.002 10.174L16.456 3.56l.594 1.028l-11.455 6.614z"/><path fill="#e10098" d="m14.743 3.508l1.028-.594l11.45 19.833l-1.027.593zM5.454 9.386h1.187v13.228H5.454z"/><path fill="#e10098" d="M25.36 9.386h1.187v13.228H25.36z"/><path fill="#e10098" d="m15.734 27.042l9.962-5.752l.519.898l-9.963 5.752z"/><path fill="#e10098" d="M28.12 23a2.5 2.5 0 1 1-.915-3.411A2.5 2.5 0 0 1 28.12 23M8.2 11.5a2.5 2.5 0 1 1-.915-3.411A2.5 2.5 0 0 1 8.2 11.5M3.88 23a2.5 2.5 0 1 1 3.411.915A2.5 2.5 0 0 1 3.88 23M23.8 11.5a2.5 2.5 0 1 1 3.411.915A2.5 2.5 0 0 1 23.8 11.5M16 30a2.5 2.5 0 1 1 2.5-2.5A2.493 2.493 0 0 1 16 30m0-23.009a2.5 2.5 0 1 1 2.5-2.5a2.493 2.493 0 0 1-2.5 2.5"/>`}})),Lp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#e44f26" d="M5.902 27.201L3.655 2h24.69l-2.25 25.197L15.985 30L5.902 27.201z"/><path fill="#f1662a" d="m16 27.858l8.17-2.265l1.922-21.532H16v23.797z"/><path fill="#ebebeb" d="M16 13.407h-4.09l-.282-3.165H16V7.151H8.25l.074.83l.759 8.517H16v-3.091zm0 8.027l-.014.004l-3.442-.929l-.22-2.465H9.221l.433 4.852l6.332 1.758l.014-.004v-3.216z"/><path fill="#fff" d="M15.989 13.407v3.091h3.806l-.358 4.009l-3.448.93v3.216l6.337-1.757l.046-.522l.726-8.137l.076-.83h-7.185zm0-6.256v3.091h7.466l.062-.694l.141-1.567l.074-.83h-7.743z"/>`}})),Rp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#2dcc9f" d="M30 5.851v20.298H2V5.851h28"/><path fill="#fff" d="M24.232 8.541a2.2 2.2 0 1 0 1.127.623a2.212 2.212 0 0 0-1.127-.623M18.111 20.1q-2.724-3.788-5.45-7.575L4.579 23.766h10.9q1.316-1.832 2.634-3.663M22.057 16q-2.793 3.882-5.584 7.765h11.169Q24.851 19.882 22.057 16Z"/>`}})),zp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#5382a1" d="M12.325 23.654s-1.07.622.761.833a16.023 16.023 0 0 0 5.8-.246a10.088 10.088 0 0 0 1.541.752c-5.481 2.349-12.405-.136-8.1-1.339m-.671-3.066s-1.2.888.633 1.078a22.618 22.618 0 0 0 7.481-.359a3.32 3.32 0 0 0 1.152.7c-6.627 1.938-14.009.153-9.266-1.421m5.644-5.198a2.051 2.051 0 0 1-.355 2.954s3.429-1.77 1.854-3.987c-1.471-2.067-2.6-3.095 3.508-6.636c0 0-9.586 2.394-5.007 7.669"/><path fill="#5382a1" d="M24.552 25.921s.792.652-.872 1.157c-3.164.958-13.168 1.248-15.948.038c-1-.435.874-1.038 1.464-1.164a3.8 3.8 0 0 1 .966-.108c-1.111-.783-7.181 1.537-3.083 2.2c11.176 1.812 20.372-.816 17.473-2.124M12.84 17.412s-5.089 1.209-1.8 1.648a38.225 38.225 0 0 0 6.731-.072a53.11 53.11 0 0 0 4.221-.555a8.934 8.934 0 0 0-1.28.685c-5.168 1.359-15.151.727-12.277-.663a9.629 9.629 0 0 1 4.407-1.042m9.127 5.102c5.253-2.73 2.824-5.353 1.129-5a3.932 3.932 0 0 0-.6.161a.957.957 0 0 1 .449-.346c3.354-1.179 5.933 3.478-1.083 5.322a.458.458 0 0 0 .106-.138M18.8 2s2.909 2.91-2.759 7.386c-4.546 3.59-1.037 5.637 0 7.975c-2.653-2.394-4.6-4.5-3.294-6.463C14.664 8.019 19.976 6.623 18.8 2"/><path fill="#5382a1" d="M13.356 29.912c5.042.323 12.786-.179 12.969-2.565c0 0-.353.9-4.167 1.623a41.458 41.458 0 0 1-12.76.2s.645.533 3.959.746"/>`}})),Bp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#f5de19" d="M18.774 19.7a3.727 3.727 0 0 0 3.376 2.078c1.418 0 2.324-.709 2.324-1.688c0-1.173-.931-1.589-2.491-2.272l-.856-.367c-2.469-1.052-4.11-2.37-4.11-5.156c0-2.567 1.956-4.52 5.012-4.52A5.058 5.058 0 0 1 26.9 10.52l-2.665 1.711a2.327 2.327 0 0 0-2.2-1.467a1.489 1.489 0 0 0-1.638 1.467c0 1.027.636 1.442 2.1 2.078l.856.366c2.908 1.247 4.549 2.518 4.549 5.376c0 3.081-2.42 4.769-5.671 4.769a6.575 6.575 0 0 1-6.236-3.5ZM6.686 20c.538.954 1.027 1.76 2.2 1.76c1.124 0 1.834-.44 1.834-2.15V7.975h3.422v11.683c0 3.543-2.078 5.156-5.11 5.156A5.312 5.312 0 0 1 3.9 21.688Z"/>`}})),Vp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#f5de19" d="M4.014 14.976a2.51 2.51 0 0 0 1.567-.518a2.377 2.377 0 0 0 .805-1.358a15.261 15.261 0 0 0 .214-2.944q.012-2.085.075-2.747a5.236 5.236 0 0 1 .418-1.686a3.025 3.025 0 0 1 .755-1.018A3.046 3.046 0 0 1 9 4.125A6.762 6.762 0 0 1 10.544 4h.7v1.96h-.387a2.338 2.338 0 0 0-1.723.468a3.4 3.4 0 0 0-.425 2.092a36.054 36.054 0 0 1-.137 4.133a4.734 4.734 0 0 1-.768 2.06A4.567 4.567 0 0 1 6.1 16a3.809 3.809 0 0 1 1.992 1.754a8.861 8.861 0 0 1 .618 3.865q0 2.435.05 2.9a1.755 1.755 0 0 0 .504 1.181a2.639 2.639 0 0 0 1.592.337h.387V28h-.7a5.655 5.655 0 0 1-1.773-.2a2.97 2.97 0 0 1-1.324-.93a3.353 3.353 0 0 1-.681-1.63a24.175 24.175 0 0 1-.165-3.234a16.469 16.469 0 0 0-.214-3.106a2.408 2.408 0 0 0-.805-1.361a2.489 2.489 0 0 0-1.567-.524Zm23.972 2.035a2.489 2.489 0 0 0-1.567.524a2.408 2.408 0 0 0-.805 1.361a16.469 16.469 0 0 0-.212 3.109a24.175 24.175 0 0 1-.169 3.234a3.353 3.353 0 0 1-.681 1.63a2.97 2.97 0 0 1-1.324.93a5.655 5.655 0 0 1-1.773.2h-.7V26.04h.387a2.639 2.639 0 0 0 1.592-.337a1.755 1.755 0 0 0 .506-1.186q.05-.462.05-2.9a8.861 8.861 0 0 1 .618-3.865A3.809 3.809 0 0 1 25.9 16a4.567 4.567 0 0 1-1.7-1.286a4.734 4.734 0 0 1-.768-2.06a36.054 36.054 0 0 1-.137-4.133a3.4 3.4 0 0 0-.425-2.092a2.338 2.338 0 0 0-1.723-.468h-.387V4h.7a6.762 6.762 0 0 1 1.54.125a3.046 3.046 0 0 1 1.149.581a3.025 3.025 0 0 1 .755 1.018a5.236 5.236 0 0 1 .418 1.686q.062.662.075 2.747a15.261 15.261 0 0 0 .212 2.947a2.377 2.377 0 0 0 .805 1.355a2.51 2.51 0 0 0 1.567.518Z"/>`}})),Hp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypeKotlin0" x1="311.336" x2="283.342" y1="1452.064" y2="1480.058" gradientTransform="translate(-281.4 -1450)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e44857"/><stop offset=".47" stop-color="#9d4b9d"/><stop offset="1" stop-color="#6d5faa"/></linearGradient></defs><path fill="url(#vscodeIconsFileTypeKotlin0)" d="M30 30H2V2h28L16 16Z"/>`}})),Up=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypeLicense0" x1="-264.845" x2="-255.586" y1="181.772" y2="182.061" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#bd6316"/><stop offset="1" stop-color="#4e1500"/></linearGradient><linearGradient id="vscodeIconsFileTypeLicense1" x1="-263.276" x2="-256.603" y1="170.205" y2="171.772" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicense2" x1="-265.068" x2="-256.777" y1="175.732" y2="178.801" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicense3" x1="-655.014" x2="-655.555" y1="147.549" y2="146.948" gradientTransform="scale(-1 1) rotate(-18.83 -723.282 -1847.955)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd436"/><stop offset="1" stop-color="#8b3f02"/></linearGradient><linearGradient id="vscodeIconsFileTypeLicense4" x1="-258.899" x2="-253.843" y1="170.981" y2="171.325" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff8b7"/><stop offset="1" stop-color="#fcbf0e"/></linearGradient><linearGradient id="vscodeIconsFileTypeLicense5" x1="-258.884" x2="-253.896" y1="170.975" y2="171.314" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicense6" x1="-257.805" x2="-257.726" y1="172.266" y2="168.648" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense7" x1="-258.935" x2="-256.173" y1="181.92" y2="182.108" href="#vscodeIconsFileTypeLicense4"/><linearGradient id="vscodeIconsFileTypeLicense8" x1="-274.156" x2="-274.512" y1="170.544" y2="173.778" gradientTransform="matrix(-1 0 0 1 -257.657 -155.509)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense9" x1="-645.79" x2="-645.121" y1="-337.938" y2="-334.17" gradientTransform="scale(-1 1) rotate(-52.06 29.075 -802.903)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffef94"/><stop offset="1" stop-color="#ffd200"/></linearGradient><linearGradient id="vscodeIconsFileTypeLicensea" x1="-276.128" x2="-274.754" y1="178.682" y2="178.682" gradientTransform="scale(-1 1) rotate(26.18 189.155 648.159)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicenseb" x1="-274.314" x2="-271.841" y1="178.887" y2="178.987" gradientTransform="scale(-1 1) rotate(26.18 189.155 648.159)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicensec" x1="-273.817" x2="-274.213" y1="189.281" y2="174.569" gradientTransform="scale(-1 1) rotate(26.18 189.155 648.159)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#d89530"/><stop offset="1" stop-color="#772d00"/></linearGradient><linearGradient id="vscodeIconsFileTypeLicensed" x1="-274.075" x2="-273.917" y1="174.09" y2="181.459" gradientTransform="scale(-1 1) rotate(26.18 189.155 648.159)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicensee" x1="-272.919" x2="-273.315" y1="189.281" y2="174.57" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicensef" x1="-273.177" x2="-273.019" y1="174.071" y2="181.44" gradientTransform="scale(-1 1) rotate(26.18 189.155 648.159)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicenseg" x1="-652.29" x2="-651.867" y1="-335.227" y2="-332.867" gradientTransform="scale(-1 1) rotate(-52.06 29.075 -802.903)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffdb57"/><stop offset="1" stop-color="#b55c13"/></linearGradient><linearGradient id="vscodeIconsFileTypeLicenseh" x1="-665.076" x2="-659.751" y1="157.413" y2="150.922" gradientTransform="scale(-1 1) rotate(-18.83 -723.282 -1847.955)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicensei" x1="-665.161" x2="-664.822" y1="156.114" y2="155.701" gradientTransform="scale(-1 1) rotate(-18.83 -723.282 -1847.955)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicensej" x1="-665.308" x2="-665.836" y1="156.436" y2="155.32" gradientTransform="scale(-1 1) rotate(-18.83 -723.282 -1847.955)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicensek" x1="-655.442" x2="-654.817" y1="147.568" y2="146.776" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicensel" x1="-253.999" x2="-254.134" y1="175.1" y2="173.736" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicensem" x1="-252.571" x2="-252.785" y1="173.138" y2="170.963" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicensen" x1="-257.206" x2="-259.174" y1="169.107" y2="169.787" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicenseo" x1="-260.717" x2="-260.77" y1="170.284" y2="171.228" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicensep" x1="-257.835" x2="-257.782" y1="174.993" y2="171.93" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicenseq" x1="-263.928" x2="-255.721" y1="171.018" y2="171.018" gradientTransform="scale(-1 1) rotate(26.18 205.537 615.155)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicenser" x1="-514.299" x2="-505.041" y1="-57.926" y2="-57.638" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicenses" x1="-512.744" x2="-505.964" y1="-69.496" y2="-67.904" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicenset" x1="-514.521" x2="-506.23" y1="-63.966" y2="-60.897" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicenseu" x1="-662.221" x2="-662.762" y1="-197.167" y2="-197.768" gradientTransform="matrix(-.564 -.911 -.774 .455 -516.113 -497.612)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicensev" x1="-508.354" x2="-503.297" y1="-68.717" y2="-68.373" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense4"/><linearGradient id="vscodeIconsFileTypeLicensew" x1="-508.338" x2="-503.351" y1="-68.723" y2="-68.384" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicensex" x1="-507.26" x2="-507.18" y1="-67.432" y2="-71.05" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicensey" x1="-508.389" x2="-505.627" y1="-57.779" y2="-57.591" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense4"/><linearGradient id="vscodeIconsFileTypeLicensez" x1="-523.609" x2="-523.966" y1="-69.153" y2="-65.918" gradientTransform="matrix(-.947 -.323 -.148 .966 -492.49 -86.99)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense10" x1="-645.333" x2="-642.973" y1="-334.169" y2="-332.091" href="#vscodeIconsFileTypeLicense9"/><linearGradient id="vscodeIconsFileTypeLicense11" x1="-525.581" x2="-524.207" y1="-61.015" y2="-61.015" gradientTransform="matrix(-.947 -.323 -.148 .966 -492.49 -86.99)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense12" x1="-523.768" x2="-521.294" y1="-60.81" y2="-60.71" gradientTransform="matrix(-.947 -.323 -.148 .966 -492.49 -86.99)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense13" x1="-523.27" x2="-523.666" y1="-50.416" y2="-65.127" gradientTransform="matrix(-.947 -.323 -.148 .966 -492.49 -86.99)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense14" x1="-523.528" x2="-523.37" y1="-65.606" y2="-58.238" gradientTransform="matrix(-.947 -.323 -.148 .966 -492.49 -86.99)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense15" x1="-522.372" x2="-522.768" y1="-50.416" y2="-65.127" gradientTransform="matrix(-.947 -.323 -.148 .966 -492.49 -86.99)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense16" x1="-522.631" x2="-522.472" y1="-65.626" y2="-58.257" gradientTransform="matrix(-.947 -.323 -.148 .966 -492.49 -86.99)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense17" x1="-649.116" x2="-646.827" y1="-328.591" y2="-326.795" href="#vscodeIconsFileTypeLicense9"/><linearGradient id="vscodeIconsFileTypeLicense18" x1="-672.284" x2="-666.958" y1="-187.303" y2="-193.795" gradientTransform="matrix(-.564 -.911 -.774 .455 -516.113 -497.612)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense19" x1="-672.369" x2="-672.03" y1="-188.603" y2="-189.016" gradientTransform="matrix(-.564 -.911 -.774 .455 -516.113 -497.612)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense1a" x1="-672.516" x2="-673.044" y1="-188.281" y2="-189.397" gradientTransform="matrix(-.564 -.911 -.774 .455 -516.113 -497.612)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense1b" x1="-662.648" x2="-662.023" y1="-197.148" y2="-197.94" gradientTransform="matrix(-.564 -.911 -.774 .455 -516.113 -497.612)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense1c" x1="-503.367" x2="-503.501" y1="-64.607" y2="-65.971" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense1d" x1="-502.006" x2="-502.232" y1="-66.361" y2="-68.654" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense1e" x1="-506.661" x2="-508.629" y1="-70.591" y2="-69.911" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense1f" x1="-510.172" x2="-510.224" y1="-69.414" y2="-68.47" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicensec"/><linearGradient id="vscodeIconsFileTypeLicense1g" x1="-507.289" x2="-507.236" y1="-64.705" y2="-67.768" gradientTransform="matrix(-.947 -.323 -.148 .966 -476.554 -85.464)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense1h" x1="-642.337" x2="-640.048" y1="-337.231" y2="-335.435" gradientTransform="scale(-1 1) rotate(-52.06 29.075 -802.903)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffdb57"/><stop offset="1" stop-color="#b66512"/></linearGradient><linearGradient id="vscodeIconsFileTypeLicense1i" x1="-628.479" x2="-627.663" y1="-215.005" y2="-209.203" gradientTransform="scale(-1 1) rotate(-37.85 -2.119 -997.83)" href="#vscodeIconsFileTypeLicense0"/><linearGradient id="vscodeIconsFileTypeLicense1j" x1="-633.006" x2="-622.552" y1="-211.18" y2="-211.18" gradientTransform="scale(-1 1) rotate(-37.85 -2.119 -997.83)" href="#vscodeIconsFileTypeLicense4"/><linearGradient id="vscodeIconsFileTypeLicense1k" x1="-627.491" x2="-627.755" y1="-215.556" y2="-211.648" gradientTransform="scale(-1 1) rotate(-37.85 -2.119 -997.83)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense1l" x1="-627.796" x2="-627.057" y1="-210.705" y2="-205.186" gradientTransform="scale(-1 1) rotate(-37.85 -2.119 -997.83)" href="#vscodeIconsFileTypeLicense3"/><linearGradient id="vscodeIconsFileTypeLicense1m" x1="245.815" x2="245.923" y1="139.434" y2="136.367" gradientTransform="rotate(7.312 1187.515 -1764.249)" href="#vscodeIconsFileTypeLicense4"/><linearGradient id="vscodeIconsFileTypeLicense1n" x1="-626.269" x2="-627.643" y1="-215.112" y2="-213.078" gradientTransform="scale(-1 1) rotate(-37.85 -2.119 -997.83)" href="#vscodeIconsFileTypeLicense3"/></defs><path fill="url(#vscodeIconsFileTypeLicense0)" d="m13.372 16.416l5.013-2.464l.93 1.893l-.054.238l-2.048 1.007l5.706 11.611l-.221.359l-1.543.758l-.82-.45l-5.459-11.109l-.482.237l-1.022-2.08z"/><path fill="url(#vscodeIconsFileTypeLicense1)" d="m9.24 13.619l1.2 2.44c.072.146.416.252.617.292l2.634.683l4.609-2.268l.867-2.342a.679.679 0 0 0 .036-.674l-1.2-2.44a.546.546 0 0 0-.452-.3l-4.44.136a1.278 1.278 0 0 0-1.018.541l-2.72 3.162a.916.916 0 0 0-.133.77Zm1.932.033a.356.356 0 0 1 .011-.334l1.84-2.215a.829.829 0 0 1 .66-.351l2.877-.088a.355.355 0 0 1 .293.2l.356.725a.242.242 0 0 1-.139.339L11.833 14.5a.224.224 0 0 1-.3-.121Z"/><path fill="url(#vscodeIconsFileTypeLicense2)" d="m9.426 13.209l1.2 2.44c.072.146.416.252.617.292l2.7.547l.782 1.591l.375-.179l5.459 11.109l.82.451l1.541-.76l-.017-.683l.868-1.458l-.241-.49l-.54.1l-.31-.63l.41-.366l-.59-1.199l-.593-.006l-.277-.564l.357-.473l-.3-.607l-.568.043l-.432-.879l.382-.423l-.161-.327a.871.871 0 0 1-.659-1.342l-.345-.7a1.347 1.347 0 0 1-.962-1.956l-.29-.591l.631-.31l-.773-1.546l.843-2.277a.68.68 0 0 0 .035-.674l-1.2-2.44a.546.546 0 0 0-.453-.3l-4.435.131a1.278 1.278 0 0 0-1.018.541l-2.84 3.419a.548.548 0 0 0-.016.516Zm1.932.033a.356.356 0 0 1 .011-.334l1.84-2.215a.828.828 0 0 1 .66-.351l2.877-.088a.354.354 0 0 1 .293.2l.356.725a.242.242 0 0 1-.139.339l-5.238 2.574a.224.224 0 0 1-.3-.121Z"/><path fill="url(#vscodeIconsFileTypeLicense3)" d="m14.47 18.381l.276-.318l.335-.164l-.139.245l-.472.237z"/><path fill="url(#vscodeIconsFileTypeLicense4)" d="m11.259 15.828l2.776.6l4.38-2.152l.865-2.339a.576.576 0 0 0 .024-.567L18.1 8.917a.441.441 0 0 0-.367-.246l-4.438.13a1.169 1.169 0 0 0-.938.5L9.52 12.725a.447.447 0 0 0-.011.414l1.206 2.453a1 1 0 0 0 .544.236Zm.354-1.836l-.358-.729a.463.463 0 0 1 .013-.434v-.008l1.853-2.221a.922.922 0 0 1 .739-.389l2.881-.084a.468.468 0 0 1 .392.257l.358.729c.005.009.19.3-.187.481l-5.244 2.577c-.272.129-.44-.164-.447-.179Z"/><path fill="url(#vscodeIconsFileTypeLicense5)" d="M11.246 15.738c.006 0 2.438.51 2.751.591l4.354-2.139l.878-2.336a.472.472 0 0 0 .015-.458l-1.208-2.458a.337.337 0 0 0-.282-.187l-4.454.141a1.083 1.083 0 0 0-.864.46l-2.863 3.436a.341.341 0 0 0-.008.313l1.206 2.454a1.118 1.118 0 0 0 .475.183Zm.245-1.7l-.355-.723a.568.568 0 0 1 .018-.535v-.008l.01-.015l1.865-2.241a1.033 1.033 0 0 1 .824-.43l2.9-.091a.575.575 0 0 1 .492.316l.359.73a.456.456 0 0 1 .027.338a.484.484 0 0 1-.265.286l-5.287 2.6a.415.415 0 0 1-.331.025a.486.486 0 0 1-.258-.248Z"/><path fill="url(#vscodeIconsFileTypeLicense6)" d="M11.268 15.663c.009 0 2.53.528 2.722.577l4.3-2.113l.878-2.314a.419.419 0 0 0 .01-.4l-1.2-2.436a.282.282 0 0 0-.237-.156l-4.433.149a1.033 1.033 0 0 0-.82.437l-2.353 2.823l-.5.595a.285.285 0 0 0 0 .254l1.193 2.421a1.181 1.181 0 0 0 .44.163Zm.14-1.529l-.351-.715a.575.575 0 0 1-.011-.56l1.959-2.36a1.082 1.082 0 0 1 .86-.447l2.887-.1a.628.628 0 0 1 .538.341l.356.724a.539.539 0 0 1-.309.773l-5.267 2.588a.482.482 0 0 1-.662-.243Z"/><path fill="url(#vscodeIconsFileTypeLicense7)" d="m18.463 14.345l.7 1.433l-.653.321l.319.649a1.428 1.428 0 0 0 1 2.043l.3.619a.958.958 0 0 0 .706 1.436l.107.218l-.39.428l.5 1.011l.577-.047l.239.485l-.366.478l.336.683h.6l.523 1.065l-.419.371l.382.777l.549-.1l.181.368A96.344 96.344 0 0 1 22.8 28v.638l-1.342.659l-.729-.414l-5.488-11.176l-.467.23l-.7-1.433Z"/><path fill="url(#vscodeIconsFileTypeLicense8)" d="M14.289 15.413h4.622v1.4h-4.622z" transform="rotate(-26.171 16.6 16.113)"/><path fill="url(#vscodeIconsFileTypeLicense9)" d="m18.128 14.582l-.8.392l.617 1.256l.8-.392Zm-1.319.648l.617 1.256l.308-.152l-.617-1.256Z"/><path fill="url(#vscodeIconsFileTypeLicensea)" d="m18.4 16.123l.308.628a1.523 1.523 0 0 0 1.037 2.11l.263.535a1.052 1.052 0 0 0 .744 1.513l.054.111l-.381.423l.557 1.134l.567-.043l.177.36l-.357.472l.392.8l.591.006l.456.929l-.409.366l.45.917l.539-.1l.12.243L22.634 28l-1.027.5l-5.525-11.235Z"/><path fill="url(#vscodeIconsFileTypeLicenseb)" d="m17.141 16.745l5.528 11.248l.046.511l-1.247.613l-.613-.349l-5.483-11.154Z"/><path fill="url(#vscodeIconsFileTypeLicensec)" d="m22.287 28.694l.427-.21l-4.794-9.754l-1.028-1.554l.602 1.764l4.793 9.754z"/><path fill="url(#vscodeIconsFileTypeLicensed)" d="M16.892 17.176L22.5 28.589l-.213.105l-4.793-9.754l-.602-1.764z"/><path fill="url(#vscodeIconsFileTypeLicensee)" d="m21.481 29.09l.427-.209l-4.794-9.755l-1.028-1.554l.602 1.764l4.793 9.754z"/><path fill="url(#vscodeIconsFileTypeLicensef)" d="m16.086 17.572l5.608 11.413l-.213.105l-4.793-9.754l-.602-1.764z"/><path fill="url(#vscodeIconsFileTypeLicenseg)" d="m18.27 16.189l-.411.2l5.285 10.755l.279-.47l-.181-.369l-.386.072l-.45-.917l.294-.26l-.508-1.034h-.424l-.392-.8l.256-.338l-.237-.482l-.407.031l-.557-1.134l.273-.3l-.143-.291a1.038 1.038 0 0 1-.619-1.259l-.391-.8a1.505 1.505 0 0 1-.906-1.844Zm-.68.334l5.371 10.929l.108-.182l-5.319-10.825Z"/><path fill="url(#vscodeIconsFileTypeLicenseh)" d="m15.018 18.247l5.356 10.997l.196-.273l-5.391-11.032l-.161.308z"/><path fill="url(#vscodeIconsFileTypeLicensei)" d="m20.436 29.315l.211-.291l.705.361l-.203.294l-.713-.364z"/><path fill="url(#vscodeIconsFileTypeLicensej)" d="m21.446 29.41l-.179.26l1.382-.659l.131-.241l-1.334.64z"/><path fill="url(#vscodeIconsFileTypeLicensek)" d="m14.029 16.673l-.225.388l.601 1.293l.297-.354l-.673-1.327z"/><path fill="url(#vscodeIconsFileTypeLicensel)" d="m13.946 16.506l-.239.432l-2.944-.761l.124-.345l3.059.674z"/><path fill="url(#vscodeIconsFileTypeLicensem)" d="M9.359 13s-.145.444-.087.563l1.212 2.465l.2-.384Z"/><path fill="url(#vscodeIconsFileTypeLicensen)" d="m16.683 10.624l.1-.327l-2.963.095a.914.914 0 0 0-.51.251l-.007.165a1.871 1.871 0 0 1 .394-.1Z"/><path fill="url(#vscodeIconsFileTypeLicenseo)" d="M16.83 10.309a.329.329 0 0 1 .17.137l.382.762l-.164.279l-.341-.693c-.023-.047-.108-.145-.147-.149Z"/><path fill="url(#vscodeIconsFileTypeLicensep)" d="m11.237 13.786l.171.348a.482.482 0 0 0 .661.248l5.267-2.588a.539.539 0 0 0 .309-.773l-.153-.31l1.08-.531l.606 1.232a.419.419 0 0 1-.01.4l-.878 2.314l-4.3 2.113c-.191-.049-2.713-.575-2.722-.577a1.181 1.181 0 0 1-.439-.16l-.6-1.222Z"/><path fill="url(#vscodeIconsFileTypeLicenseq)" d="m13.377 8.968l.532 1.084l.539-.018l-.532-1.084Zm2.306-.077l-1.395.047l.533 1.084l1.4-.046Zm1.471 2.994l-1.142.561l1.106 2.25l1.142-.561Zm-1.447.711l-.441.217l1.106 2.251l.441-.217Z"/><path fill="url(#vscodeIconsFileTypeLicenser)" d="m10.65 14.159l5.287 1.803L15.623 18l-.173.134l-2.16-.737l-1.921 12.501l-.371.102l-1.627-.555l-.395-.913l1.838-11.961l-.508-.173l.344-2.239z"/><path fill="url(#vscodeIconsFileTypeLicenses)" d="m8.951 9.175l-.542 2.747a.567.567 0 0 0 .175.452l1.976 2.461l4.866 1.659l1.969-1.077a.535.535 0 0 0 .4-.463l.4-2.627a.659.659 0 0 0-.188-.544L14.453 8.7a1.313 1.313 0 0 0-1.1-.337l-3.874.345a.707.707 0 0 0-.528.467Zm1.5 1.407a.281.281 0 0 1 .192-.234l2.633-.256a.928.928 0 0 1 .724.315l2.3 2a.426.426 0 0 1 .121.352l-.1.651s-.027.237-.3.146L10.5 11.667a.269.269 0 0 1-.172-.305Z"/><path fill="url(#vscodeIconsFileTypeLicenset)" d="m9.322 9.01l-.4 2.627c-.024.157.188.481.324.653l1.817 2.33l-.263 1.714l.392.134l-1.843 11.959l.395.914l1.627.555l.363-.507l1.483-.436l.081-.528l-.479-.314l.1-.678l.523.028l.2-1.283l-.461-.428l.093-.608l.54-.087l.1-.653l-.469-.375l.145-.946l.532-.034l.054-.352a1.047 1.047 0 0 1-.29-.859a.688.688 0 0 1 .512-.585l.116-.756a1.6 1.6 0 0 1-.364-1.232a1.07 1.07 0 0 1 .688-.874l.1-.636l.666.227l.246-1.674l1.915-1.047a.535.535 0 0 0 .4-.463l.4-2.627a.657.657 0 0 0-.188-.544l-3.556-3.08a1.313 1.313 0 0 0-1.1-.336l-4.109.445a.434.434 0 0 0-.29.356Zm1.5 1.407a.281.281 0 0 1 .192-.234l2.663-.289a.852.852 0 0 1 .711.218l2.3 2a.427.427 0 0 1 .122.352l-.12.781s-.027.237-.3.146L10.871 11.5a.269.269 0 0 1-.171-.3Z"/><path fill="url(#vscodeIconsFileTypeLicenseu)" d="m10.428 16.37l.392-.033l.353.12l-.244.078l-.501-.165z"/><path fill="url(#vscodeIconsFileTypeLicensev)" d="m9.317 12.221l1.846 2.421l4.619 1.575l1.967-1.076a.454.454 0 0 0 .331-.393l.406-2.641a.53.53 0 0 0-.152-.441l-3.552-3.083a1.207 1.207 0 0 0-1.011-.31l-4.109.453a.354.354 0 0 0-.237.292l-.405 2.641a1.261 1.261 0 0 0 .297.562Zm1.289-1.077l.121-.785a.367.367 0 0 1 .25-.305h.008l2.675-.295a.953.953 0 0 1 .794.247l2.3 2a.563.563 0 0 1 .166.467l-.121.785c0 .01-.014.35-.411.215l-5.53-1.886a.423.423 0 0 1-.252-.443Z"/><path fill="url(#vscodeIconsFileTypeLicensew)" d="M9.356 12.146c0 .005 1.63 2.115 1.831 2.4l4.591 1.566l1.974-1.065a.372.372 0 0 0 .264-.321l.406-2.646a.405.405 0 0 0-.118-.338l-3.571-3.091a1.117 1.117 0 0 0-.931-.285l-4.133.444a.271.271 0 0 0-.179.221l-.406 2.642a1.421 1.421 0 0 0 .272.473Zm1.126-1.054l.12-.778a.451.451 0 0 1 .309-.375h.024l2.7-.29a1.07 1.07 0 0 1 .883.278l2.324 2.01a.694.694 0 0 1 .212.581l-.121.786a.38.38 0 0 1-.165.265a.417.417 0 0 1-.365.018l-5.576-1.9a.5.5 0 0 1-.273-.219a.55.55 0 0 1-.072-.377Z"/><path fill="url(#vscodeIconsFileTypeLicensex)" d="M9.415 12.108c.006.008 1.693 2.194 1.816 2.366l4.535 1.546l1.963-1.048a.33.33 0 0 0 .228-.282l.4-2.623a.339.339 0 0 0-.1-.283L14.7 8.719a1.066 1.066 0 0 0-.884-.271l-3.4.359l-.716.076a.226.226 0 0 0-.142.183s-.4 2.594-.4 2.611a1.506 1.506 0 0 0 .257.431Zm.952-1.007l.118-.77a.463.463 0 0 1 .3-.414l2.836-.308a1.12 1.12 0 0 1 .921.292l2.316 2a.758.758 0 0 1 .234.632s-.1.633-.12.779c-.034.219-.191.5-.668.339l-5.555-1.894a.584.584 0 0 1-.383-.657Z"/><path fill="url(#vscodeIconsFileTypeLicensey)" d="m15.781 16.3l-.237 1.543l-.689-.235l-.107.7a1.158 1.158 0 0 0-.7.917a1.723 1.723 0 0 0 .367 1.283l-.1.666a.765.765 0 0 0-.527.634a1.154 1.154 0 0 0 .29.912l-.036.235l-.542.031l-.167 1.088l.479.379l-.08.522l-.55.084l-.113.736l.471.432l-.176 1.146l-.532-.031l-.128.837l.488.317l-.061.4c-.09.027-1.455.411-1.455.411l-.352.462l-1.424-.483l-.343-.822l1.843-12.03l-.493-.168l.237-1.543Z"/><path fill="url(#vscodeIconsFileTypeLicensez)" d="m11.056 16.181l4.374 1.491l.208-1.352l-4.374-1.492l-.208 1.353z"/><path fill="url(#vscodeIconsFileTypeLicense10)" d="m15.388 16.234l-.842-.287l-.207 1.353l.841.287ZM14 15.76l-.208 1.353l.325.111l.208-1.353Z"/><path fill="url(#vscodeIconsFileTypeLicense11)" d="m14.756 17.55l-.1.676a1.251 1.251 0 0 0-.7.957A1.845 1.845 0 0 0 14.3 20.5l-.089.576a.844.844 0 0 0-.525.678a1.256 1.256 0 0 0 .275.95l-.018.119l-.531.034l-.188 1.221l.469.375l-.06.388l-.539.087l-.132.858l.46.427l-.154 1l-.522-.028l-.152.987l.478.314l-.04.262l-1.506.443l-1.083-.369l1.86-12.1Z"/><path fill="url(#vscodeIconsFileTypeLicense12)" d="m13.423 17.1l-1.86 12.1l-.246.4L10 29.16l-.289-.692l1.845-12.009Z"/><path fill="url(#vscodeIconsFileTypeLicense13)" d="m10.877 29.44l.45.154l1.614-10.501l.049-1.863l-.499 1.709l-1.614 10.501z"/><path fill="url(#vscodeIconsFileTypeLicense14)" d="m12.99 17.23l-1.888 12.287l-.225-.077l1.614-10.501l.499-1.709z"/><path fill="url(#vscodeIconsFileTypeLicense15)" d="m10.028 29.151l.449.153l1.614-10.501l.049-1.863l-.499 1.71l-1.613 10.501z"/><path fill="url(#vscodeIconsFileTypeLicense16)" d="m12.14 16.94l-1.887 12.287l-.225-.076l1.613-10.501l.499-1.71z"/><path fill="url(#vscodeIconsFileTypeLicense17)" d="m14.615 17.5l-.433-.148l-1.782 11.58l.478-.14l.061-.4l-.339-.222l.152-.987l.374.02l.171-1.113l-.33-.306l.132-.858l.387-.062l.08-.519l-.336-.268l.188-1.221l.381-.024l.048-.314a1.2 1.2 0 0 1-.154-.766a.85.85 0 0 1 .363-.59l.132-.856a1.79 1.79 0 0 1-.231-1.123a1.261 1.261 0 0 1 .536-.861Zm-.717-.244L12.09 29.024l.185-.054l1.791-11.655Z"/><path fill="url(#vscodeIconsFileTypeLicense18)" d="M10.932 16.665L9.075 28.47l.303-.058l1.85-11.855l-.296.108z"/><path fill="url(#vscodeIconsFileTypeLicense19)" d="m9.085 28.566l.325-.06l.354.766l-.321.068l-.358-.774z"/><path fill="url(#vscodeIconsFileTypeLicense1a)" d="m9.823 29.357l-.283.06l1.447.513l.235-.081l-1.399-.492z"/><path fill="url(#vscodeIconsFileTypeLicense1b)" d="m11.024 14.816l-.391.12l-.241 1.367l.429-.043l.203-1.444z"/><path fill="url(#vscodeIconsFileTypeLicense1c)" d="m11.05 14.636l-.425.141l-2.084-2.606l.483-.214l2.026 2.679z"/><path fill="url(#vscodeIconsFileTypeLicense1d)" d="M9.384 8.813s-.358.218-.378.346l-.546 2.773l.51-.253Z"/><path fill="url(#vscodeIconsFileTypeLicense1e)" d="m16.435 12.332l.256-.168l-2.375-2.052a.962.962 0 0 0-.538-.183l-.1.115a2.143 2.143 0 0 1 .362.211Z"/><path fill="url(#vscodeIconsFileTypeLicense1f)" d="M16.724 12.208a.393.393 0 0 1 .058.221c-.016.1-.112.774-.12.825l-.283.085l.115-.747a.4.4 0 0 0-.033-.213Z"/><path fill="url(#vscodeIconsFileTypeLicense1g)" d="m10.424 10.725l-.058.375a.584.584 0 0 0 .381.653l5.553 1.894c.478.163.634-.12.668-.339l.051-.334l1.139.388l-.2 1.327a.33.33 0 0 1-.228.282l-1.963 1.048l-4.535-1.546a358.09 358.09 0 0 0-1.816-2.366a1.506 1.506 0 0 1-.257-.43l.2-1.315Z"/><path fill="url(#vscodeIconsFileTypeLicense1h)" d="m14.756 8.764l-.179 1.166l.432.373l.179-1.167Zm1.851 1.595l-1.119-.965l-.179 1.167l1.119.965Zm-.5 3.223l-1.2-.411l-.372 2.423l1.2.411Zm-1.526-.52l-.461-.162l-.372 2.423l.465.159Z"/><path fill="url(#vscodeIconsFileTypeLicense1i)" d="M9.936 2.733c2.042-1.441 5.206-.715 7.065 1.8A6.169 6.169 0 0 1 18.27 9.1c-.219-.73-1.023-.427-1.664-.441a4.11 4.11 0 0 0-.763-3.207C14.6 3.778 12.41 3.1 11.07 4.094s-1.382 3.253-.143 4.929a3.68 3.68 0 0 0 3.69 1.742c.521.444 1 .871 1.507 1.329c-1.84 1.134-4.8.334-6.51-1.982c-1.86-2.512-1.93-5.789.322-7.379Z"/><path fill="url(#vscodeIconsFileTypeLicense1j)" d="M9.956 2.841c1.939-1.405 5.111-.606 6.892 1.8a6.587 6.587 0 0 1 1.38 4.159c-.293-.387-1.035-.264-1.466-.211a4.6 4.6 0 0 0-.823-3.272c-1.317-1.78-3.546-2.373-4.97-1.32s-1.442 3.27-.125 5.051a4.034 4.034 0 0 0 3.842 1.905c.4.35.79.715 1.185 1.073c-1.982 1.012-4.528.084-6.123-2.073c-1.782-2.408-1.897-5.587.208-7.112Z"/><path fill="url(#vscodeIconsFileTypeLicense1k)" d="M10.1 2.918c1.855-1.345 4.971-.5 6.675 1.8a6.635 6.635 0 0 1 1.361 3.89a1.872 1.872 0 0 0-1.148-.126a4.555 4.555 0 0 0-.946-3.23c-1.394-1.885-3.6-2.472-5.1-1.357s-1.511 3.279-.171 5.2a4.075 4.075 0 0 0 3.976 1.973c.323.285.639.58.957.871c-1.939.959-4.394-.1-5.893-2.131C8.1 7.511 8.1 4.363 10.1 2.918Z"/><path fill="url(#vscodeIconsFileTypeLicense1l)" d="M9.684 3.412C8.6 4.969 8.825 7.5 10.3 9.494c1.413 1.911 3.466 2.885 5.249 2.443c-1.694.674-4.074-.233-5.554-2.235c-1.54-2.081-1.66-4.783-.311-6.29Z"/><path fill="url(#vscodeIconsFileTypeLicense1m)" d="M9.9 3.511c-.171.291.366.627.547.144a4.29 4.29 0 0 1 2.442-1.222A3.558 3.558 0 0 0 9.9 3.511Zm.077.506a.244.244 0 1 0 .211.273a.243.243 0 0 0-.213-.273Z"/><path fill="url(#vscodeIconsFileTypeLicense1n)" d="M11.035 3.763c1.4-1.181 3.664-.647 5.163 1.132a4.723 4.723 0 0 1 1.2 3.542c-.136.014-.273.03-.411.048a4.555 4.555 0 0 0-.946-3.23c-1.394-1.885-3.6-2.472-5.1-1.357c-.071.053-.136.11-.2.167a2.672 2.672 0 0 1 .294-.302Z"/>`}})),Wp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="gray" d="m16.5 30l-.011-.321c.4-.014.8-.045 1.19-.094l.039.319c-.406.048-.818.08-1.218.096Zm-1.222-.011c-.4-.021-.814-.061-1.216-.118l.045-.318c.393.055.793.094 1.188.115Zm3.642-.289l-.067-.314c.387-.083.776-.184 1.155-.3l.094.307c-.388.118-.786.222-1.182.307Zm-6.063-.053c-.4-.091-.791-.2-1.177-.326l.1-.306c.377.122.764.23 1.15.319Zm8.4-.665l-.121-.3c.364-.148.728-.314 1.08-.493h.006l.145.286c-.367.186-.741.356-1.114.507Zm-10.718-.088a13.693 13.693 0 0 1-1.1-.524l.15-.284c.35.186.713.358 1.078.512Zm12.893-1.021l-.17-.273c.337-.21.668-.437.984-.675l.193.257c-.328.243-.667.476-1.011.691Zm-15.053-.122c-.341-.22-.676-.459-1-.708l.2-.253c.312.243.64.476.972.691Zm17-1.346l-.215-.239c.294-.265.58-.546.851-.836l.235.219c-.278.297-.571.585-.872.851Zm-18.925-.153c-.3-.276-.585-.569-.856-.87l.239-.215c.265.294.547.58.836.85Zm20.587-1.632l-.253-.2c.244-.312.476-.639.692-.972l.27.175c-.221.343-.46.677-.709.997ZM4.82 24.439a14.237 14.237 0 0 1-.692-1.007l.272-.17c.21.337.438.668.676.984Zm23.547-1.867l-.284-.151c.186-.35.358-.713.513-1.078l.3.125a14.91 14.91 0 0 1-.528 1.104Zm-24.841-.2l-.006-.012a13.075 13.075 0 0 1-.5-1.1l.3-.121c.147.362.312.724.491 1.074l.006.012Zm25.794-2.047l-.306-.1c.122-.377.23-.764.319-1.15l.313.072c-.091.396-.2.792-.326 1.178Zm-26.712-.218c-.12-.388-.223-.786-.308-1.182l.314-.067c.083.387.184.776.3 1.155Zm27.262-2.161l-.318-.045c.056-.393.094-.793.115-1.188l.321.017a13.78 13.78 0 0 1-.118 1.216ZM2.1 17.72c-.05-.4-.082-.812-.1-1.218l.321-.011c.014.4.046.8.094 1.19Zm27.582-2.2c-.014-.4-.045-.8-.093-1.19l.319-.039c.049.4.082.813.1 1.218ZM2.331 15.3l-.321-.02c.021-.405.061-.814.117-1.216l.318.045c-.055.391-.093.791-.114 1.191Zm27.057-2.144a13.987 13.987 0 0 0-.3-1.155l.312-.101c.119.388.223.786.307 1.183Zm-26.725-.222l-.313-.072c.091-.4.2-.791.326-1.177l.306.1c-.123.376-.23.763-.319 1.149Zm26.026-2.062a12.639 12.639 0 0 0-.5-1.086l.286-.146c.185.363.355.736.507 1.111ZM3.4 10.665l-.3-.125c.158-.374.334-.745.524-1.1l.284.15c-.184.347-.356.71-.508 1.075Zm1.113-2.108l-.27-.174c.22-.341.458-.676.707-1l.254.2c-.243.317-.476.641-.691.974Zm1.464-1.881l-.235-.219c.276-.3.569-.585.87-.857l.215.239c-.294.261-.58.547-.85.837Zm1.77-1.6l-.193-.257c.323-.244.662-.477 1.007-.692l.17.272c-.337.215-.668.442-.984.68Zm15.705-.558l-.018-.012l.175-.27l.018.011Zm-1.047-.616a13.44 13.44 0 0 0-1.078-.512l.125-.3c.374.158.745.334 1.1.524ZM9.769 3.815l-.146-.286l.018-.009c.356-.181.724-.349 1.093-.5l.121.3c-.361.147-.72.311-1.068.488Zm10.44-.838a13.414 13.414 0 0 0-1.151-.317l.072-.313c.4.091.792.2 1.178.325Zm-8.229-.06l-.094-.307a14.25 14.25 0 0 1 1.182-.308l.067.314a13.89 13.89 0 0 0-1.155.301Zm5.9-.473a13.953 13.953 0 0 0-1.188-.113l.016-.321c.405.021.814.059 1.216.115Zm-3.572-.026l-.04-.319c.4-.05.812-.083 1.218-.1l.012.321c-.392.017-.793.049-1.186.098Z"/><circle cx="16" cy="15.998" r="10.708" fill="navy"/><circle cx="20.435" cy="11.562" r="3.136" fill="#fff"/><circle cx="26.708" cy="5.29" r="3.137" fill="navy"/><path fill="#fff" d="M13.1 21.352v-.79H9.629v-6.236h-.9v7.026H13.1m4.816 0V16.3h-.8v2.785c0 1.031-.54 1.706-1.378 1.706A.95.95 0 0 1 14.7 19.8v-3.5h-.8v3.817c0 .838.626 1.378 1.609 1.378a1.863 1.863 0 0 0 1.687-.925v.781h.723m5.872-.018v-.607a.664.664 0 0 1-.173.019c-.279 0-.434-.145-.434-.4v-2.809c0-.9-.655-1.378-1.9-1.378c-1.224 0-1.976.472-2.024 1.638h.81c.067-.617.434-.9 1.185-.9c.723 0 1.128.27 1.128.752v.212c0 .337-.2.482-.838.559a5.763 5.763 0 0 0-1.619.308a1.327 1.327 0 0 0-.887 1.311c0 .916.636 1.455 1.658 1.455a2.363 2.363 0 0 0 1.715-.742a.855.855 0 0 0 .829.665a1.967 1.967 0 0 0 .549-.087m-1.407-1.725a1.366 1.366 0 0 1-1.513 1.185c-.626 0-.993-.222-.993-.771c0-.53.357-.761 1.214-.887a4 4 0 0 0 1.291-.279v.752"/>`}})),Gp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#fff" d="M7.313 18.654a.548.548 0 0 1-.6.233a.917.917 0 0 0-.869.08c-.306.218-.637.053-.579-.345a1.229 1.229 0 0 1 .583-.971c.833-.479.254-.812.711-1.293s.357-.629.341-1.283a4.648 4.648 0 0 1-3.4-1.9a6.012 6.012 0 0 1-1.46-3.764a6.365 6.365 0 0 1 .649-3.8a5.315 5.315 0 0 1 2.565-2.522a7.022 7.022 0 0 1 3.489-.77a4.96 4.96 0 0 1 2.443.452a5.148 5.148 0 0 0 1.546.8a1.217 1.217 0 0 0 .782-.226c.047 1.189-1.023 1.292-1.98 1.317s-1.546-.371-2.427-.224a4.193 4.193 0 0 0-3.03 1.774A3.783 3.783 0 0 0 5.408 8.9a1.952 1.952 0 0 0 1.441 1.8c.5.008.61-.136 1.047-.421s2.665-3.043 3.426-3.663a3.522 3.522 0 0 1 2.322-.821a3.24 3.24 0 0 1 1.671.286A12.275 12.275 0 0 1 16.9 7.139a8.833 8.833 0 0 0 .684-.576a2.865 2.865 0 0 1 2.393-.718a3.644 3.644 0 0 1 1.819.8a14.312 14.312 0 0 1 2.013 2.425a3.59 3.59 0 0 0 1.621 1.489c.771.237 1.352-.762 1.437-1.316a5.814 5.814 0 0 0 .112-.935a4.413 4.413 0 0 0-.135-1.125a4 4 0 0 0-.455-1.016a3.606 3.606 0 0 0-1.3-1.25A4.129 4.129 0 0 0 23.7 4.5a13.676 13.676 0 0 0-1.4.2c-.584.04-1.628.171-2.086-.28a1.18 1.18 0 0 1-.378-.853a.892.892 0 0 0 .469.19c.366.031.708-.268 1-.441a7.34 7.34 0 0 1 .908-.526a5.856 5.856 0 0 1 2.7-.232a6.308 6.308 0 0 1 2.2.725a6 6 0 0 1 1.634 1.48A4.983 4.983 0 0 1 29.781 6.9a8.981 8.981 0 0 1 .017 3.847a7.577 7.577 0 0 1-1.714 2.819a4.388 4.388 0 0 1-2.317 1.112a4.911 4.911 0 0 0 .086.488c.064.206.188.436.441.363a.236.236 0 0 1 .289.063c.133.116.064.567-.311.769a1.449 1.449 0 0 1-.695.131a6.612 6.612 0 0 1-1.11-.051c-.33-.058-.528-.32-.894-.361a3.572 3.572 0 0 1-1.452-.764a3.048 3.048 0 0 0-.362-.185c.059.18.138.368.177.541s.023.334.043.472s.059.247.082.359c.09.081.119.2.272.243a1.706 1.706 0 0 0 .546-.043c.156-.021.26-.106.383-.083a.85.85 0 0 1 .34.193c.1.082.191.094.274.3a3.333 3.333 0 0 1 .171.9a1.93 1.93 0 0 1-.1.755a1.261 1.261 0 0 1-.381.541a5.937 5.937 0 0 1-.956.769a1.652 1.652 0 0 0 .2.3c.1.109.324.229.421.344a.473.473 0 0 1 .148.324a.686.686 0 0 1-.109.433a1.9 1.9 0 0 1-.937.573a2.477 2.477 0 0 1 .023 1.06c-.037.159-.119.519-.315.612a3.823 3.823 0 0 1-.814.086c-.239.038-.373.074-.56.111a3.3 3.3 0 0 0-.34.492a.4.4 0 0 0 .008.35c.049.15.214.368.261.544a1.091 1.091 0 0 1 .012.541a.943.943 0 0 1-.269.46c-.15.157-.446.28-.593.406s-.294.142-.254.352a1.551 1.551 0 0 0 .781.867a.925.925 0 0 0 .65-.048c-.015.246-.228.412-.367.576a2.2 2.2 0 0 0 1-.588a2.488 2.488 0 0 1-.752.955a2.872 2.872 0 0 1-.6.4a2.652 2.652 0 0 0 .99 0a1.97 1.97 0 0 1-.748.242a2.2 2.2 0 0 1-.85-.064a5.7 5.7 0 0 1-.951-.541a.78.78 0 0 0 .217.442a2.859 2.859 0 0 0 .639.334a9.407 9.407 0 0 1-.963-.116a2.233 2.233 0 0 1-.555-.189a3.647 3.647 0 0 1-.449-.309a1.291 1.291 0 0 0 .215.411a1.963 1.963 0 0 0 .48.232a2.1 2.1 0 0 1-.5-.011a1.408 1.408 0 0 1-.517-.245a3.7 3.7 0 0 1-.52-.463a2.155 2.155 0 0 1-.4-.538c-.058-.154.035-.262.052-.393a1.233 1.233 0 0 0-.318.21a.4.4 0 0 0-.118.37a2.46 2.46 0 0 0 .315.589c-.344-.281-.536-.389-.618-.729a1.143 1.143 0 0 1 .272-.846c.075-.119.187-.23.257-.345a4.668 4.668 0 0 1-.466-.456c-.133-.173-.189-.408-.325-.573a3.412 3.412 0 0 0-.478-.407a6.246 6.246 0 0 1 .42.9a.6.6 0 0 1-.139.5c-.083.126-.216.154-.343.231s-.323.017-.4.131a.392.392 0 0 0-.023.4l.3.466a1.421 1.421 0 0 1-.381-.328c-.084-.114-.214-.218-.232-.371a.541.541 0 0 1 .073-.422c.1-.137.371-.182.493-.287s.19-.173.183-.309s-.14-.232-.253-.318a8.278 8.278 0 0 1-1.088-.815a1.08 1.08 0 0 1-.28-.443a.459.459 0 0 1 .085-.368c.083-.151.367-.352.4-.515s-.109-.2-.238-.256s-.376.029-.5-.071s.035-.311-.1-.427s-.445-.051-.6-.176a.837.837 0 0 1-.281-.459a.974.974 0 0 1-.024-.509c.038-.131.15-.154.217-.222s.127-.124.036-.225s-.385.006-.555-.124s-.066-.44-.186-.572s-.336-.079-.449-.121s-.159.106-.228-.128s-.072-.93-.166-1.189s-.278-.018-.363-.276a7.085 7.085 0 0 1-.043-1.06l-.175-1.061c-.609.409-2.53.935-2.7 1.233"/><path fill="#030303" d="M16.623 8.258a3.733 3.733 0 0 0 .077.942a.909.909 0 0 0 .382.66c.462.343.758.286 1.114.485a1.017 1.017 0 0 1 .446.421a.363.363 0 0 1-.17.422a.361.361 0 0 0 .371-.48c-.052-.128-.3-.185-.373-.314a.488.488 0 0 1-.04-.393c.064-.236.531-.451.7-.637a.772.772 0 0 0 .208-.9a2.831 2.831 0 0 0-1.45-1.141a3.209 3.209 0 0 0-.5-.15a1.65 1.65 0 0 1 .875.807c.144.374.019.515.024.84c0 .151.2.226.289.322s.07.145.009.259a.3.3 0 0 0-.13-.236c-.13-.093-.271-.073-.341-.263c-.106-.289.1-.563-.132-.888a1.029 1.029 0 0 0-.727-.522a1.267 1.267 0 0 0-.423.066l-.219-.258a4.594 4.594 0 0 0-1.34-.995a3.033 3.033 0 0 0-1.607-.3a3.068 3.068 0 0 0-2.2.771c-.808.7-2.892 3.367-3.4 3.7a1.7 1.7 0 0 1-1.248.453a2.124 2.124 0 0 1-1.657-2.002a4.041 4.041 0 0 1 .722-2.857a4.173 4.173 0 0 1 3.224-1.9a12.022 12.022 0 0 1 2.441.23c.771 0 1.534-.132 1.759-.745a1.044 1.044 0 0 1-.672.118A6.739 6.739 0 0 1 11 2.952a5.237 5.237 0 0 0-2.29-.377a6.319 6.319 0 0 0-3.215.669a5.769 5.769 0 0 0-2.582 2.475a5.866 5.866 0 0 0-.654 3.649a6.068 6.068 0 0 0 1.423 3.613a4.457 4.457 0 0 0 3.295 1.785l.329-1.45l-.587.842l.015-.937l-.531.659l-.233-.894l-.43.716l-.214-1l-.623.5l.2-.823l-.825.092l.379-.572l-.752.009l.438-.764l-.667-.106L4 10.35l-.817-.242l.676-.648l-.659-.544l.522-.406l-.492-.65l.521-.607l-.194-.8L4 6.067l.132-.916l.5-.249l.427-.715l.785-.087l.39-.643l.793.04l.749-.407l.778.181l.883-.266l.654.153l.853.125l.824.659L10.5 3.5l-.636.305l-.526-.321l-.362.246l-.64.064l-.574-.037l-.419.511l-.843.013l-.3.688l-.759.266l-.071.791l-.544.426L5 7.2l-.47.773l.361.676l-.355.619l.472.308l-.107.995l.656.166l.148.738l.715-.075l.444.506l.549-.536a6.151 6.151 0 0 0 2.193-1.625a10.282 10.282 0 0 1 2.58-2.506a3.451 3.451 0 0 1 2.493-.477c.895.154 1.194.691 1.853 1.257a.626.626 0 0 1 .2-.253a4.416 4.416 0 0 0-.108.492Zm4.665 5.934a.71.71 0 0 1-.2.143a2.376 2.376 0 0 1-.344.083c.173.27.355.543.521.826s.31.594.469.892a4.909 4.909 0 0 0-.022-.511a5.014 5.014 0 0 0-.168-.537c-.071-.239-.159-.564-.26-.9Zm-.06-1.551a.508.508 0 0 1 .168.092a.646.646 0 0 1 .255.269a1.025 1.025 0 0 1 .048.466c-.056-.016-.132-.005-.191-.055s-.092-.162-.167-.21a.439.439 0 0 0-.219-.048a.694.694 0 0 1 .043.35a.431.431 0 0 1-.409.387a1.336 1.336 0 0 1-.342-.036c.04.089.108.167.147.256a1.842 1.842 0 0 0 .439-.073a3.264 3.264 0 0 1 .345-.2a2.175 2.175 0 0 1 .395-.067c-.113.1-.188.2-.3.295l.25.728c.177.111.344.169.566.306a7.337 7.337 0 0 0 .781.515a2.887 2.887 0 0 0 .767.263c.3.057.545.3.844.343a6.43 6.43 0 0 0 1.087.025c.261-.025.6-.16.631-.447a.6.6 0 0 1-.723-.407c-.075-.183-.038-.52-.153-.737s-.274-.286-.466-.552a8.352 8.352 0 0 1-.679-1.045c-.175-.357-.217-.762-.365-1.082a5.285 5.285 0 0 0-.546-.826a2.918 2.918 0 0 0-1.308-1.18a6.4 6.4 0 0 0-.963-.249c-.131.059-.31.124-.342.276a.622.622 0 0 0 .14.493a2.1 2.1 0 0 1 .568.7a2.753 2.753 0 0 1 .03 1.029a1.146 1.146 0 0 1-.328.42Zm-1.451.173a2.483 2.483 0 0 1 .854-.242c.126-.008.321.012.448.017a1.7 1.7 0 0 0 .3-.466a2.519 2.519 0 0 0-.043-.826c-.172-.423-.34-.441-.577-.683a1.347 1.347 0 0 1-.231-.743c-.019-.11-.073-.249-.1-.363a4.64 4.64 0 0 0-1-.052a1.088 1.088 0 0 0 .39-.567a1.116 1.116 0 0 0-.132-.78a3.032 3.032 0 0 0-.576-.6c-.208-.182-.506-.332-.7-.482a5.781 5.781 0 0 1 .768-.275a2.5 2.5 0 0 1 1.842.448a4.6 4.6 0 0 1 1.053.833c.384.4.859 1.137 1.23 1.574a7.877 7.877 0 0 0 .997 1.043a4.973 4.973 0 0 0 .925.5l.481.51l.389-.481l.625.071l.129-.7l.574-.157l-.093-.947l.413-.293l-.31-.589l.315-.644l-.411-.736l.159-.708l-.476-.405l-.062-.753l-.664-.253l-.266-.655l-.75-.01l-.366-.486l-.5.035l-.56-.061l-.316-.234l-.46.3l-.557-.29l-1.106.42l.721-.627l.747-.119l.569-.138l.773.254l.68-.172l.656.388l.694-.038l.341.612l.691.079l.374.68l.435.237l.115.871l.387.367l-.17.762l.456.577l-.428.619l.457.387l-.585.518l.592.616l-.715.23l.466.661l-.584.1l.383.727l-.658-.009l.331.545l-.722-.087l.173.783l-.546-.48l-.187.949l-.377-.682l-.2.85l-.465-.627l.012.891l-.514-.8a3.638 3.638 0 0 0 .385 1.382a3.518 3.518 0 0 0 2.24-1.041a7.168 7.168 0 0 0 1.627-2.739a9.306 9.306 0 0 0 .011-3.618a5.45 5.45 0 0 0-1.045-2.109A7.963 7.963 0 0 0 26.9 3.405a6.2 6.2 0 0 0-3.2-.694a3.79 3.79 0 0 0-1.338.25c-.617.224-1.11.714-1.737.955a.6.6 0 0 1-.53 0a.989.989 0 0 0 .723.572a5.464 5.464 0 0 0 1.431-.013a9.013 9.013 0 0 1 1.451-.19a3.1 3.1 0 0 1 1.484.428a3.658 3.658 0 0 1 1.4 1.318a4 4 0 0 1 .448 1.079a5.063 5.063 0 0 1 .151 1.174a3.6 3.6 0 0 1-.112 1.035c-.212.781-.68 1.576-1.641 1.454c-.588-.075-1.475-1.18-1.772-1.585a15.7 15.7 0 0 0-1.969-2.4a3.034 3.034 0 0 0-1.705-.757a2.579 2.579 0 0 0-2.384.829a4.609 4.609 0 0 1 .532.17a3.981 3.981 0 0 1 1.094.718a1.19 1.19 0 0 1 .5.968c.008.3-.239.541-.465.758c-.139.133-.322.254-.434.357c-.149.137-.333.286-.147.5a1.883 1.883 0 0 0 .3.22c.163.121.089.572-.127.691a.712.712 0 0 1-.832-.069c.287-.043.469-.081.461-.315c0-.136-.177-.249-.347-.326a4.931 4.931 0 0 1-1.125-.452c-.411-.3-.42-.458-.531-.922a2.623 2.623 0 0 0-.646.113c-.265.087-.558.3-.8.348a1.718 1.718 0 0 1-1.058.006a4.244 4.244 0 0 0-2.1.349a5.917 5.917 0 0 0-.975.121a6.413 6.413 0 0 0-1.7.995a9.083 9.083 0 0 0-1.98 4.059c-.051.57.112.955-.248 1.233s-.349.992-.471 1.193s-.263.111-.525.392s-.4.234-.389.766a1.839 1.839 0 0 1 .845-.332c.256-.009.259.328.916-.322c.352-.348 1.027-.358 1.5-.512A4.732 4.732 0 0 0 11 16.152a5.613 5.613 0 0 0 1.415-3.381a3.984 3.984 0 0 1-.038 1.247a3.473 3.473 0 0 0 .151 2.442l.309.59a5.184 5.184 0 0 1-.652-.953l-.25-.674a5.057 5.057 0 0 1-1.463 1.662a2.916 2.916 0 0 0 .089 1.169c.128.373-.076.8.021 1.049s.321.106.394.355s-.038.741.075.983s.392.1.527.174a.774.774 0 0 1 .251.289c.073.1-.028.346.119.425s.376.012.529.088a.357.357 0 0 1 .139.422c-.036.163-.2.238-.272.4a.427.427 0 0 0 .023.434a.891.891 0 0 0 .466.314c.19.077.457.034.653.14a1.537 1.537 0 0 1 .476.473a.636.636 0 0 1 .127.425a1.19 1.19 0 0 1-.157.505c-.087.157-.278.347.021.647s.287.17.458.364c-.019-.336-.157-.609-.056-.862s.406-.3.566-.411a2.625 2.625 0 0 0 .379-.4a4.487 4.487 0 0 1 0 .491c-.041.266-.119.5.277.544a1.293 1.293 0 0 0 .535-.166c-.1.176-.269.318-.3.528a.918.918 0 0 0 .151.651a2.127 2.127 0 0 0 .582.487a2.227 2.227 0 0 0 .425.2c.007.207-.034.427-.01.621a1.134 1.134 0 0 0 .2.529a1.73 1.73 0 0 0 .465.373c-.094-.218-.283-.424-.281-.653a.734.734 0 0 1 .294-.594c.223-.2.746-.38.992-.577a1.214 1.214 0 0 0 .414-.51a2.23 2.23 0 0 0 .08-.673a2.032 2.032 0 0 1 .119.569a2.006 2.006 0 0 1-.221.794a1.217 1.217 0 0 0 .6-.612c.065.039.032.145.056.349c.109-.108.232-.191.341-.293a.949.949 0 0 0 .284-.334a.765.765 0 0 0-.008-.459a3.091 3.091 0 0 0-.324-.538c-.1-.181.017-.358.01-.576a1.727 1.727 0 0 0-.6-.1c-.229.033-.491.29-.725.293s-.365-.216-.557-.277a3.409 3.409 0 0 0-.579-.08a5.348 5.348 0 0 1 1.84-.451a11.629 11.629 0 0 1 1.715-.155a4.393 4.393 0 0 0 .769.03c.179-.051.141-.174.194-.307a1.73 1.73 0 0 0-.006-1.079A8.378 8.378 0 0 0 20.46 22c-.511.039-1.117.282-1.644.3a3.165 3.165 0 0 1-1.53-.328a3.63 3.63 0 0 1-.986-1.125c-.215-.329-.486-.975-.651-1.27a1.614 1.614 0 0 0-.339-.5a1.512 1.512 0 0 0-.488-.2c.188.019.392-.04.563.058c.256.147.543.756.7 1.021c.169-.566.129-.788.618-1.107a2.153 2.153 0 0 0-.5 1.295c.327.537.782 1.393 1.378 1.63a3.907 3.907 0 0 0 .817.168a5.91 5.91 0 0 0 2.132-.315a5.587 5.587 0 0 1 1.678-.04c.215.012.72-.117.825-.333a.382.382 0 0 0-.033-.386c-.081-.126-.3-.186-.414-.3a2.667 2.667 0 0 1-.274-.368a7.515 7.515 0 0 1-1.238.138c.257-.106.5-.167.771-.271a4.6 4.6 0 0 0 .787-.419a2.522 2.522 0 0 0 .51-.391a3.13 3.13 0 0 0 .471-.539a1.406 1.406 0 0 0 .139-.681a2.03 2.03 0 0 0-.1-.805a.634.634 0 0 0-.433-.311c-.15-.048-.252.073-.408.09s-.3.115-.527.008a1.967 1.967 0 0 1-.72-.642c-.228-.32-.39-.844-.623-1.247a21.2 21.2 0 0 0-1.376-1.986a4.043 4.043 0 0 1-.118-.593a2.861 2.861 0 0 1 .076-1.13a.987.987 0 0 1 .512-.69a.563.563 0 0 1 .371-.026a.25.25 0 0 1 .167.294c-.045.15-.15.155-.221.231a.808.808 0 0 0-.213.384a1.825 1.825 0 0 1 .412.016a.481.481 0 0 1 .339.326a.611.611 0 0 0-.456-.22a2.057 2.057 0 0 0-.316.048a2.271 2.271 0 0 1-.118.383c-.056.1-.163.075-.2.191a1.12 1.12 0 0 0-.022.455Zm.546.2c-.208.013-.258-.014-.424.1l.271.422a.65.65 0 0 1 .153-.525Zm-7.072-1.86a.812.812 0 0 1 .036-.194c-.3-.081-.423.115-.6.479c-.066.136 0 .217-.072.306s-.185.077-.3.163s-.23.251-.338.34a3.758 3.758 0 0 1-.777.418a2.536 2.536 0 0 0 .625-.513c.058-.1.05-.287.14-.377s.123-.152.24-.174s.07-.159.108-.266a1.151 1.151 0 0 1 .193-.293a.848.848 0 0 1 .339-.329c.158-.059.405 0 .525-.029s.051-.121.138-.173s.257-.029.373-.085a1.139 1.139 0 0 0 .429-.442A2.256 2.256 0 0 1 14.187 11a1.478 1.478 0 0 1-.749.89a2.38 2.38 0 0 1-.426.16c.073-.1.177-.143.219-.3a3.762 3.762 0 0 0 .02-.6Zm1.931 1.493c.157-.014.351.028.5.02a2.652 2.652 0 0 0 .377-.07c-.023-.221 0-.627-.205-.774a1.783 1.783 0 0 0-.817.008a7.63 7.63 0 0 0-1.017.385a3.168 3.168 0 0 1 .923-.514a2.428 2.428 0 0 1 .948-.09c.1.028.123.07.185.156a1.811 1.811 0 0 1 .268.9a2.524 2.524 0 0 1 .157.229a1.1 1.1 0 0 1 .081.338c-.056-.081-.022-.183-.177-.243a1.507 1.507 0 0 0-.6.018a.508.508 0 0 1-.231.934a.541.541 0 0 1-.641-.333a.988.988 0 0 1-.021-.4a.794.794 0 0 0-.688.259a1.3 1.3 0 0 0 .523.508a1.681 1.681 0 0 0 .5.186a2.516 2.516 0 0 0 .676.032a.734.734 0 0 0 .444-.216a1.04 1.04 0 0 0 .212-.47a1.369 1.369 0 0 1-.083.431a.786.786 0 0 1-.778.412a2.853 2.853 0 0 1-1.019-.2a1.542 1.542 0 0 1-.73-.624a1.8 1.8 0 0 1-.02-.557c.332-.22.413-.166.806-.231c.164-.027.277-.088.433-.1Zm.9-2.187a1.48 1.48 0 0 0 .524.212c.147 0 .185-.1.272-.154a6.578 6.578 0 0 0 .523 1.333c.1.169.159.09.232.26s.107.514.176.73a5.907 5.907 0 0 0 .242.564a7.727 7.727 0 0 1-.583-.9c-.114-.241-.041-.262-.133-.492s-.279-.588-.418-.882a.829.829 0 0 1-.3.008c-.076-.023-.061-.1-.129-.156s-.184-.032-.28-.115a.592.592 0 0 1-.127-.405Zm-1.964 7.762c.138-.112.511-.023.789 0l-.6.154c-.019.068-.01.147-.056.2s-.132.079-.2.119c.007-.179-.072-.363.066-.475Zm2.574-3.737a2.621 2.621 0 0 0 .205-.6c-.027.252.024.529-.1.712s-.339.151-.518.2c.139-.106.3-.153.411-.312Zm-.252 2.8a1 1 0 0 1 .5-.9a2.14 2.14 0 0 1 .706-.253a2.751 2.751 0 0 1 1.186.155a7.055 7.055 0 0 1 .7.459c.239.141.409.236.637.395c.35.243.554.512.8.673a1.763 1.763 0 0 0 .435.113a.73.73 0 0 1-.407.033a1.823 1.823 0 0 1-.513-.306a3.515 3.515 0 0 0-.579-.42c-.145-.084-.383-.183-.542-.287s-.435-.331-.587-.407a1.892 1.892 0 0 0-.759-.146a1.606 1.606 0 0 0-.959.267a.645.645 0 0 0-.264.66a2.992 2.992 0 0 1 .23-.3a.721.721 0 0 1 .607-.131a.531.531 0 0 1 .459.415a1.1 1.1 0 0 0-.238-.159a.573.573 0 0 0-.51.05c-.21.112-.153.278-.183.463a1.765 1.765 0 0 1-.069.231a.453.453 0 0 1-.211-.113a1.493 1.493 0 0 0 .008.259a3.194 3.194 0 0 0 .1.319a1.872 1.872 0 0 1-.39-.47a1.237 1.237 0 0 1-.148-.6Zm1.889.318a.98.98 0 0 1 .439.114a1.712 1.712 0 0 1 .314.223a1.858 1.858 0 0 1 .5.877a5.274 5.274 0 0 1 .077.745a4.767 4.767 0 0 0-.225-.687a1.682 1.682 0 0 0-.783-.8a.42.42 0 0 0-.252-.032c.028.047.075.086.077.155a.27.27 0 0 1-.13.259a.493.493 0 0 1-.541-.1a.48.48 0 0 1-.12-.535c.091-.224.439-.224.644-.216Zm-10.406.644a.726.726 0 0 0-.6.4a.548.548 0 0 1-.6.233a.917.917 0 0 0-.869.08c-.306.218-.637.053-.579-.344a1.226 1.226 0 0 1 .583-.971c.832-.479.254-.812.71-1.293s.356-.629.342-1.283a4.65 4.65 0 0 1-3.4-1.9A6.013 6.013 0 0 1 2.036 9.4a6.362 6.362 0 0 1 .649-3.8a5.314 5.314 0 0 1 2.569-2.522a7.026 7.026 0 0 1 3.489-.769a4.958 4.958 0 0 1 2.443.452a5.153 5.153 0 0 0 1.545.8a1.218 1.218 0 0 0 .782-.226c.047 1.189-1.023 1.292-1.981 1.317s-1.546-.371-2.427-.223A4.192 4.192 0 0 0 6.078 6.2a3.78 3.78 0 0 0-.669 2.683a1.951 1.951 0 0 0 1.44 1.8c.5.008.61-.136 1.047-.421s2.665-3.041 3.426-3.662a3.518 3.518 0 0 1 2.321-.821a3.236 3.236 0 0 1 1.671.285A12.282 12.282 0 0 1 16.9 7.128a8.515 8.515 0 0 0 .684-.576a2.865 2.865 0 0 1 2.393-.718a3.644 3.644 0 0 1 1.819.8a14.284 14.284 0 0 1 2.014 2.425a3.594 3.594 0 0 0 1.621 1.489c.771.237 1.351-.762 1.437-1.316a5.786 5.786 0 0 0 .112-.932a4.39 4.39 0 0 0-.134-1.125a4.012 4.012 0 0 0-.455-1.016a3.6 3.6 0 0 0-1.3-1.25a4.131 4.131 0 0 0-1.391-.424a13.632 13.632 0 0 0-1.4.2c-.584.04-1.627.171-2.085-.28a1.18 1.18 0 0 1-.378-.854a.891.891 0 0 0 .469.189c.366.031.708-.268 1-.441a7.2 7.2 0 0 1 .907-.526a5.861 5.861 0 0 1 2.7-.233a6.315 6.315 0 0 1 2.2.725a6.005 6.005 0 0 1 1.634 1.48a4.992 4.992 0 0 1 1.037 2.15a8.988 8.988 0 0 1 .017 3.847a7.581 7.581 0 0 1-1.713 2.819a4.391 4.391 0 0 1-2.317 1.112c.034.177.04.342.085.487c.065.206.188.436.442.364a.236.236 0 0 1 .289.062c.133.117.063.567-.312.769a1.444 1.444 0 0 1-.695.131a6.517 6.517 0 0 1-1.11-.051c-.33-.058-.528-.319-.894-.361a3.576 3.576 0 0 1-1.452-.764a3.069 3.069 0 0 0-.362-.185c.059.18.137.368.177.541s.022.334.043.473s.059.246.081.359c.091.081.12.2.272.243a1.688 1.688 0 0 0 .546-.043c.156-.021.261-.105.383-.083a.853.853 0 0 1 .341.193c.1.082.19.094.274.3a3.364 3.364 0 0 1 .17.9a1.922 1.922 0 0 1-.1.755a1.254 1.254 0 0 1-.381.541a5.924 5.924 0 0 1-.957.769a1.691 1.691 0 0 0 .2.3c.1.108.324.229.421.343a.474.474 0 0 1 .148.324a.689.689 0 0 1-.109.434a1.9 1.9 0 0 1-.937.573a2.484 2.484 0 0 1 .023 1.06c-.037.159-.119.519-.315.612a3.808 3.808 0 0 1-.814.086c-.239.038-.373.074-.56.111a3.312 3.312 0 0 0-.34.491a.4.4 0 0 0 .008.35c.049.15.215.369.261.544a1.091 1.091 0 0 1 .012.541a.952.952 0 0 1-.269.461c-.15.157-.446.279-.593.406s-.294.142-.254.352a1.548 1.548 0 0 0 .781.867a.93.93 0 0 0 .65-.047c-.015.246-.228.412-.367.575a2.2 2.2 0 0 0 1-.587a2.486 2.486 0 0 1-.752.954a2.86 2.86 0 0 1-.6.4a2.634 2.634 0 0 0 .991 0a1.964 1.964 0 0 1-.748.242a2.189 2.189 0 0 1-.85-.063a5.72 5.72 0 0 1-.951-.541a.782.782 0 0 0 .216.442a2.849 2.849 0 0 0 .639.334a9.6 9.6 0 0 1-.963-.116a2.274 2.274 0 0 1-.555-.189a3.8 3.8 0 0 1-.449-.309a1.3 1.3 0 0 0 .215.411a1.95 1.95 0 0 0 .481.233a2.1 2.1 0 0 1-.5-.011a1.409 1.409 0 0 1-.517-.245a3.708 3.708 0 0 1-.521-.464a2.146 2.146 0 0 1-.4-.538c-.058-.154.035-.262.052-.393a1.218 1.218 0 0 0-.319.209a.4.4 0 0 0-.118.371a2.45 2.45 0 0 0 .315.589c-.344-.281-.536-.39-.618-.729a1.142 1.142 0 0 1 .272-.846c.075-.119.187-.23.256-.345a4.636 4.636 0 0 1-.466-.456c-.133-.174-.189-.408-.325-.574a3.436 3.436 0 0 0-.478-.406a6.173 6.173 0 0 1 .42.9a.6.6 0 0 1-.139.5c-.083.126-.216.154-.342.231s-.324.016-.4.131a.393.393 0 0 0-.023.4l.3.466a1.418 1.418 0 0 1-.381-.328c-.085-.113-.214-.218-.232-.371a.541.541 0 0 1 .073-.423c.1-.136.371-.182.493-.287s.19-.173.183-.309s-.139-.233-.253-.318a8.319 8.319 0 0 1-1.088-.815a1.091 1.091 0 0 1-.28-.443a.461.461 0 0 1 .085-.368c.083-.151.367-.352.4-.515s-.109-.2-.238-.257s-.375.029-.5-.071s.035-.311-.1-.427s-.445-.051-.6-.176a.84.84 0 0 1-.281-.46a.968.968 0 0 1-.024-.509c.037-.131.149-.153.217-.221s.127-.124.036-.226s-.386.006-.556-.124s-.066-.44-.186-.571s-.336-.08-.449-.122s-.158.106-.228-.127s-.072-.929-.165-1.189s-.278-.017-.364-.276a7.171 7.171 0 0 1-.043-1.061l-.175-1.061a3.741 3.741 0 0 1-1.666.654a10.832 10.832 0 0 0 .338 4.321c.543 1.777 1.643 2.824 3.128 4.328a9.109 9.109 0 0 1-3.478-4.188a9.791 9.791 0 0 1-.414-4.277"/>`}})),Kp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="none" stroke="#755838" d="M2.5 7.955h27v16.091h-27z"/><path fill="#755838" d="M5.909 20.636v-9.272h2.727l2.728 3.409l2.727-3.409h2.727v9.272h-2.727v-5.318l-2.727 3.409l-2.728-3.409v5.318H5.909zm17.046 0l-4.091-4.5h2.727v-4.772h2.727v4.772h2.727l-4.09 4.5z"/>`}})),qp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#cb3837" d="M2 10.555h28v9.335H16v1.556H9.778v-1.557H2Zm1.556 7.779h3.111v-4.668h1.555v4.667h1.556v-6.222H3.556Zm7.778-6.223v7.779h3.111v-1.556h3.111v-6.223Zm3.111 1.556H16v3.112h-1.556Zm4.667-1.556v6.223h3.111v-4.668h1.556v4.667h1.556v-4.667h1.556v4.667h1.556v-6.222Z"/>`}})),Jp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#909090" d="m24.1 2.072l5.564 5.8v22.056H8.879V30h20.856V7.945L24.1 2.072"/><path fill="#f4f4f4" d="M24.031 2H8.808v27.928h20.856V7.873L24.03 2"/><path fill="#7a7b7c" d="M8.655 3.5h-6.39v6.827h20.1V3.5H8.655"/><path fill="#dd2025" d="M22.472 10.211H2.395V3.379h20.077v6.832"/><path fill="#464648" d="M9.052 4.534H7.745v4.8h1.028V7.715L9 7.728a2.042 2.042 0 0 0 .647-.117a1.427 1.427 0 0 0 .493-.291a1.224 1.224 0 0 0 .335-.454a2.13 2.13 0 0 0 .105-.908a2.237 2.237 0 0 0-.114-.644a1.173 1.173 0 0 0-.687-.65a2.149 2.149 0 0 0-.409-.104a2.232 2.232 0 0 0-.319-.026m-.189 2.294h-.089v-1.48h.193a.57.57 0 0 1 .459.181a.92.92 0 0 1 .183.558c0 .246 0 .469-.222.626a.942.942 0 0 1-.524.114m3.671-2.306c-.111 0-.219.008-.295.011L12 4.538h-.78v4.8h.918a2.677 2.677 0 0 0 1.028-.175a1.71 1.71 0 0 0 .68-.491a1.939 1.939 0 0 0 .373-.749a3.728 3.728 0 0 0 .114-.949a4.416 4.416 0 0 0-.087-1.127a1.777 1.777 0 0 0-.4-.733a1.63 1.63 0 0 0-.535-.4a2.413 2.413 0 0 0-.549-.178a1.282 1.282 0 0 0-.228-.017m-.182 3.937h-.1V5.392h.013a1.062 1.062 0 0 1 .6.107a1.2 1.2 0 0 1 .324.4a1.3 1.3 0 0 1 .142.526c.009.22 0 .4 0 .549a2.926 2.926 0 0 1-.033.513a1.756 1.756 0 0 1-.169.5a1.13 1.13 0 0 1-.363.36a.673.673 0 0 1-.416.106m5.08-3.915H15v4.8h1.028V7.434h1.3v-.892h-1.3V5.43h1.4v-.892"/><path fill="#dd2025" d="M21.781 20.255s3.188-.578 3.188.511s-1.975.646-3.188-.511Zm-2.357.083a7.543 7.543 0 0 0-1.473.489l.4-.9c.4-.9.815-2.127.815-2.127a14.216 14.216 0 0 0 1.658 2.252a13.033 13.033 0 0 0-1.4.288Zm-1.262-6.5c0-.949.307-1.208.546-1.208s.508.115.517.939a10.787 10.787 0 0 1-.517 2.434a4.426 4.426 0 0 1-.547-2.162Zm-4.649 10.516c-.978-.585 2.051-2.386 2.6-2.444c-.003.001-1.576 3.056-2.6 2.444ZM25.9 20.895c-.01-.1-.1-1.207-2.07-1.16a14.228 14.228 0 0 0-2.453.173a12.542 12.542 0 0 1-2.012-2.655a11.76 11.76 0 0 0 .623-3.1c-.029-1.2-.316-1.888-1.236-1.878s-1.054.815-.933 2.013a9.309 9.309 0 0 0 .665 2.338s-.425 1.323-.987 2.639s-.946 2.006-.946 2.006a9.622 9.622 0 0 0-2.725 1.4c-.824.767-1.159 1.356-.725 1.945c.374.508 1.683.623 2.853-.91a22.549 22.549 0 0 0 1.7-2.492s1.784-.489 2.339-.623s1.226-.24 1.226-.24s1.629 1.639 3.2 1.581s1.495-.939 1.485-1.035"/><path fill="#909090" d="M23.954 2.077V7.95h5.633l-5.633-5.873Z"/><path fill="#f4f4f4" d="M24.031 2v5.873h5.633L24.031 2Z"/><path fill="#fff" d="M8.975 4.457H7.668v4.8H8.7V7.639l.228.013a2.042 2.042 0 0 0 .647-.117a1.428 1.428 0 0 0 .493-.291a1.224 1.224 0 0 0 .332-.454a2.13 2.13 0 0 0 .105-.908a2.237 2.237 0 0 0-.114-.644a1.173 1.173 0 0 0-.687-.65a2.149 2.149 0 0 0-.411-.105a2.232 2.232 0 0 0-.319-.026m-.189 2.294h-.089v-1.48h.194a.57.57 0 0 1 .459.181a.92.92 0 0 1 .183.558c0 .246 0 .469-.222.626a.942.942 0 0 1-.524.114m3.67-2.306c-.111 0-.219.008-.295.011l-.235.006h-.78v4.8h.918a2.677 2.677 0 0 0 1.028-.175a1.71 1.71 0 0 0 .68-.491a1.939 1.939 0 0 0 .373-.749a3.728 3.728 0 0 0 .114-.949a4.416 4.416 0 0 0-.087-1.127a1.777 1.777 0 0 0-.4-.733a1.63 1.63 0 0 0-.535-.4a2.413 2.413 0 0 0-.549-.178a1.282 1.282 0 0 0-.228-.017m-.182 3.937h-.1V5.315h.013a1.062 1.062 0 0 1 .6.107a1.2 1.2 0 0 1 .324.4a1.3 1.3 0 0 1 .142.526c.009.22 0 .4 0 .549a2.926 2.926 0 0 1-.033.513a1.756 1.756 0 0 1-.169.5a1.13 1.13 0 0 1-.363.36a.673.673 0 0 1-.416.106m5.077-3.915h-2.43v4.8h1.028V7.357h1.3v-.892h-1.3V5.353h1.4v-.892"/>`}})),Yp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><radialGradient id="vscodeIconsFileTypePhp0" cx="-16.114" cy="20.532" r="18.384" gradientTransform="translate(26.52 -9.307)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".5" stop-color="#4c6b96"/><stop offset="1" stop-color="#231f20"/></radialGradient></defs><ellipse cx="16" cy="16" fill="url(#vscodeIconsFileTypePhp0)" rx="14" ry="7.365"/><ellipse cx="16" cy="16" fill="#6280b6" rx="13.453" ry="6.818"/><path fill="#fff" d="m18.725 18.2l.667-3.434a1.752 1.752 0 0 0-.372-1.719a2.929 2.929 0 0 0-2-.525h-1.153l.331-1.7a.219.219 0 0 0-.215-.26h-1.6a.219.219 0 0 0-.215.177l-.709 3.646a2.051 2.051 0 0 0-.477-1.054a2.783 2.783 0 0 0-2.2-.807H7.7a.219.219 0 0 0-.215.177l-1.434 7.38a.219.219 0 0 0 .215.26h1.603a.219.219 0 0 0 .215-.177l.347-1.785h1.2a5.167 5.167 0 0 0 1.568-.2a3.068 3.068 0 0 0 1.15-.689a3.538 3.538 0 0 0 .68-.844l-.287 1.475a.219.219 0 0 0 .215.26h1.6a.219.219 0 0 0 .215-.177l.787-4.051h1.094c.466 0 .6.093.64.133s.1.165.025.569l-.635 3.265a.219.219 0 0 0 .215.26h1.62a.219.219 0 0 0 .207-.18Zm-7.395-2.834a1.749 1.749 0 0 1-.561 1.092a2.171 2.171 0 0 1-1.315.321h-.712l.515-2.651h.921c.677 0 .949.145 1.059.266a1.181 1.181 0 0 1 .093.972Zm14.216-2.034a2.783 2.783 0 0 0-2.2-.807h-3.091a.219.219 0 0 0-.215.177l-1.434 7.38a.219.219 0 0 0 .215.26h1.608a.219.219 0 0 0 .215-.177l.347-1.785h1.2a5.167 5.167 0 0 0 1.568-.2a3.068 3.068 0 0 0 1.15-.689a3.425 3.425 0 0 0 1.076-1.927a2.512 2.512 0 0 0-.439-2.232Zm-1.667 2.034a1.749 1.749 0 0 1-.561 1.092a2.171 2.171 0 0 1-1.318.32h-.71l.515-2.651h.921c.677 0 .949.145 1.059.266a1.181 1.181 0 0 1 .094.973Z"/><path fill="#000004" d="M10.178 13.908a1.645 1.645 0 0 1 1.221.338a1.34 1.34 0 0 1 .145 1.161a1.945 1.945 0 0 1-.642 1.223a2.361 2.361 0 0 1-1.448.37h-.978l.6-3.089Zm-3.917 6.216h1.608l.381-1.962h1.377a4.931 4.931 0 0 0 1.5-.191a2.84 2.84 0 0 0 1.07-.642a3.207 3.207 0 0 0 1.01-1.808a2.3 2.3 0 0 0-.385-2.044a2.568 2.568 0 0 0-2.035-.732H7.7Zm8.126-9.342h1.6l-.387 1.962h1.421a2.767 2.767 0 0 1 1.85.468a1.548 1.548 0 0 1 .305 1.516l-.667 3.434H16.89l.635-3.265a.886.886 0 0 0-.08-.76a1.121 1.121 0 0 0-.8-.2H15.37l-.822 4.228h-1.6Zm8.34 3.126a1.645 1.645 0 0 1 1.221.338a1.34 1.34 0 0 1 .145 1.161a1.945 1.945 0 0 1-.642 1.223A2.361 2.361 0 0 1 22 17h-.978l.6-3.089Zm-3.917 6.216h1.608l.381-1.962h1.377a4.931 4.931 0 0 0 1.5-.191a2.84 2.84 0 0 0 1.07-.642a3.207 3.207 0 0 0 1.01-1.808a2.3 2.3 0 0 0-.385-2.044a2.568 2.568 0 0 0-2.035-.732h-3.092Z"/>`}})),Xp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#f9ad00" d="M30 10.75h-8.749V2H30Zm-9.626 0h-8.75V2h8.75Zm-9.625 0H2V2h8.749ZM30 20.375h-8.749v-8.75H30Z"/><path fill="#fff" d="M20.374 20.375h-8.75v-8.75h8.75Zm0 9.625h-8.75v-8.75h8.75ZM30 30h-8.749v-8.75H30Zm-19.251 0H2v-8.75h8.749Z"/>`}})),Zp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypePowerpoint0" x1="4.494" x2="13.832" y1="-1748.086" y2="-1731.914" gradientTransform="translate(0 1756)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ca4c28"/><stop offset=".5" stop-color="#c5401e"/><stop offset="1" stop-color="#b62f14"/></linearGradient></defs><path fill="#ed6c47" d="M18.93 17.3L16.977 3h-.146A12.9 12.9 0 0 0 3.953 15.854V16Z"/><path fill="#ff8f6b" d="M17.123 3h-.146v13l6.511 2.6L30 16v-.146A12.9 12.9 0 0 0 17.123 3Z"/><path fill="#d35230" d="M30 16v.143A12.905 12.905 0 0 1 17.12 29h-.287a12.907 12.907 0 0 1-12.88-12.857V16Z"/><path d="M17.628 9.389V23.26a1.2 1.2 0 0 1-.742 1.1a1.16 1.16 0 0 1-.45.091H7.027a10.08 10.08 0 0 1-.521-.65a12.735 12.735 0 0 1-2.553-7.657v-.286A12.705 12.705 0 0 1 6.05 8.85a8.82 8.82 0 0 1 .456-.65h9.93a1.2 1.2 0 0 1 1.192 1.189Z" opacity=".1"/><path d="M16.977 10.04v13.871a1.15 1.15 0 0 1-.091.448a1.2 1.2 0 0 1-1.1.741H7.62q-.309-.314-.593-.65a10.08 10.08 0 0 1-.521-.65a12.735 12.735 0 0 1-2.553-7.657v-.286A12.705 12.705 0 0 1 6.05 8.85h9.735a1.2 1.2 0 0 1 1.192 1.19Z" opacity=".2"/><path d="M16.977 10.04v12.571a1.2 1.2 0 0 1-1.192 1.189H6.506a12.735 12.735 0 0 1-2.553-7.657v-.286A12.705 12.705 0 0 1 6.05 8.85h9.735a1.2 1.2 0 0 1 1.192 1.19Z" opacity=".2"/><path d="M16.326 10.04v12.571a1.2 1.2 0 0 1-1.192 1.189H6.506a12.735 12.735 0 0 1-2.553-7.657v-.286A12.705 12.705 0 0 1 6.05 8.85h9.084a1.2 1.2 0 0 1 1.192 1.19Z" opacity=".2"/><path fill="url(#vscodeIconsFileTypePowerpoint0)" d="M3.194 8.85h11.938a1.193 1.193 0 0 1 1.194 1.191v11.918a1.193 1.193 0 0 1-1.194 1.191H3.194A1.192 1.192 0 0 1 2 21.959V10.041A1.192 1.192 0 0 1 3.194 8.85Z"/><path fill="#fff" d="M9.293 12.028a3.287 3.287 0 0 1 2.174.636a2.27 2.27 0 0 1 .756 1.841a2.555 2.555 0 0 1-.373 1.376a2.49 2.49 0 0 1-1.059.935a3.607 3.607 0 0 1-1.591.334H7.687v2.8H6.141v-7.922ZM7.686 15.94h1.331a1.735 1.735 0 0 0 1.177-.351a1.3 1.3 0 0 0 .4-1.025q0-1.309-1.525-1.31H7.686v2.686Z"/>`}})),Qp=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#56b3b4" d="M21.714 8.571h1.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-1.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z"/><path fill="#ea5e5e" d="M4.571 26.857h5.714a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H4.571a.571.571 0 0 1-.571-.57a.571.571 0 0 1 .571-.572Z"/><path fill="#bf85bf" d="M18.286 17.714h3.429a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-3.429a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z"/><path fill="#ea5e5e" d="M11.429 17.714H16a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-4.571a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z"/><path fill="#56b3b4" d="M4.571 17.714h4.572a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H4.571a.571.571 0 0 1-.571-.57a.571.571 0 0 1 .571-.572Z"/><path fill="#bf85bf" d="M4.571 22.286h5.714a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H4.571A.571.571 0 0 1 4 22.857a.571.571 0 0 1 .571-.571Zm0-9.143h5.714a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H4.571A.571.571 0 0 1 4 13.714a.571.571 0 0 1 .571-.571Z"/><path fill="#f7ba3e" d="M10.286 6.286h11.428a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H10.286a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z"/><path fill="#ea5e5e" d="M4.571 6.286H8a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.572H4.571A.571.571 0 0 1 4 6.857a.571.571 0 0 1 .571-.571Z"/><path fill="#f7ba3e" d="M9.143 24.571h1.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H9.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z"/><path fill="#56b3b4" d="M9.143 10.857h1.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H9.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571ZM4.571 24.571h2.286a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H4.571a.571.571 0 0 1-.571-.57a.571.571 0 0 1 .571-.572Z"/><path fill="#f7ba3e" d="M4.571 10.857h2.286a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.572H4.571A.571.571 0 0 1 4 11.429a.571.571 0 0 1 .571-.572Z"/><path fill="#4d616e" d="M19.429 24.571h1.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-1.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm-6.858 0h4.571a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-4.571a.571.571 0 0 1-.571-.57a.571.571 0 0 1 .571-.572Zm10.286 0h4.571a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-4.571a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z" opacity=".5"/><path fill="#56b3b4" d="M13.714 15.429h9.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-9.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z"/><path fill="#f7ba3e" d="M8 15.429h3.429A.571.571 0 0 1 12 16a.571.571 0 0 1-.571.571H8A.571.571 0 0 1 7.429 16A.571.571 0 0 1 8 15.429Z"/><path fill="#ea5e5e" d="M4.571 15.429h1.143a.571.571 0 0 1 .572.571a.571.571 0 0 1-.571.571H4.571A.571.571 0 0 1 4 16a.571.571 0 0 1 .571-.571Z"/><path fill="#bf85bf" d="M14.857 8.571h4.571a.571.571 0 0 1 .572.572a.571.571 0 0 1-.571.571h-4.572a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.572Z"/><path fill="#56b3b4" d="M4.571 8.571h8a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-8A.571.571 0 0 1 4 9.143a.571.571 0 0 1 .571-.572Z"/><path fill="#f7ba3e" d="M8 20h10.286a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H8a.571.571 0 0 1-.571-.571A.571.571 0 0 1 8 20Z"/><path fill="#bf85bf" d="M4.571 20h1.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H4.571A.571.571 0 0 1 4 20.571A.571.571 0 0 1 4.571 20Z"/><path fill="#ea5e5e" d="M18.286 10.857H24a.571.571 0 0 1 .571.571A.571.571 0 0 1 24 12h-5.714a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.572Z"/><path fill="#f7ba3e" d="M18.286 13.143H24a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-5.714a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z"/><path fill="#56b3b4" d="M4.571 4h13.715a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H4.571A.571.571 0 0 1 4 4.571A.571.571 0 0 1 4.571 4Z"/><path fill="#4d616e" d="M20.571 4h6.857a.571.571 0 0 1 .572.571a.571.571 0 0 1-.571.571h-6.858A.571.571 0 0 1 20 4.571A.571.571 0 0 1 20.571 4Zm0 16h2.286a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-2.286a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm4.572 0h2.286a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-2.286a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571ZM24 17.714h3.429a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H24a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm0-11.428h3.429a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H24a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm1.143 9.143h2.286A.571.571 0 0 1 28 16a.571.571 0 0 1-.571.571h-2.286a.571.571 0 0 1-.572-.571a.571.571 0 0 1 .572-.571Zm0-6.858h2.286a.571.571 0 0 1 .571.572a.571.571 0 0 1-.571.571h-2.286a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.572Zm1.143 2.286h1.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-1.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm0 2.286h1.143a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-1.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm-9.143 9.143h10.286a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571H17.143a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm-4.572 0h2.286a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-2.286a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm9.143 4.571h5.714a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-5.714a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Zm-9.143 0h6.857a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-6.857a.571.571 0 0 1-.571-.57a.571.571 0 0 1 .571-.572Zm0-16H16a.571.571 0 0 1 .571.571A.571.571 0 0 1 16 12h-3.429a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.572Zm0 2.286H16a.571.571 0 0 1 .571.571a.571.571 0 0 1-.571.571h-3.429a.571.571 0 0 1-.571-.571a.571.571 0 0 1 .571-.571Z" opacity=".5"/>`}})),$p=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypePython0" x1="-133.268" x2="-133.198" y1="-202.91" y2="-202.84" gradientTransform="matrix(189.38 0 0 189.81 25243.061 38519.17)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#387eb8"/><stop offset="1" stop-color="#366994"/></linearGradient><linearGradient id="vscodeIconsFileTypePython1" x1="-133.575" x2="-133.495" y1="-203.203" y2="-203.133" gradientTransform="matrix(189.38 0 0 189.81 25309.061 38583.42)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffe052"/><stop offset="1" stop-color="#ffc331"/></linearGradient></defs><path fill="url(#vscodeIconsFileTypePython0)" d="M15.885 2.1c-7.1 0-6.651 3.07-6.651 3.07v3.19h6.752v1H6.545S2 8.8 2 16.005s4.013 6.912 4.013 6.912H8.33v-3.361s-.13-4.013 3.9-4.013h6.762s3.772.06 3.772-3.652V5.8s.572-3.712-6.842-3.712Zm-3.732 2.137a1.214 1.214 0 1 1-1.183 1.244v-.02a1.214 1.214 0 0 1 1.214-1.214Z"/><path fill="url(#vscodeIconsFileTypePython1)" d="M16.085 29.91c7.1 0 6.651-3.08 6.651-3.08v-3.18h-6.751v-1h9.47S30 23.158 30 15.995s-4.013-6.912-4.013-6.912H23.64V12.4s.13 4.013-3.9 4.013h-6.765S9.2 16.356 9.2 20.068V26.2s-.572 3.712 6.842 3.712h.04Zm3.732-2.147A1.214 1.214 0 1 1 21 26.519v.03a1.214 1.214 0 0 1-1.214 1.214h.03Z"/>`}})),em=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<circle cx="16" cy="15.974" r="2.5" fill="#00d8ff"/><path fill="#00d8ff" d="M16 21.706a28.385 28.385 0 0 1-8.88-1.2a11.3 11.3 0 0 1-3.657-1.958A3.543 3.543 0 0 1 2 15.974c0-1.653 1.816-3.273 4.858-4.333A28.755 28.755 0 0 1 16 10.293a28.674 28.674 0 0 1 9.022 1.324a11.376 11.376 0 0 1 3.538 1.866A3.391 3.391 0 0 1 30 15.974c0 1.718-2.03 3.459-5.3 4.541a28.8 28.8 0 0 1-8.7 1.191Zm0-10.217a27.948 27.948 0 0 0-8.749 1.282c-2.8.977-4.055 2.313-4.055 3.2c0 .928 1.349 2.387 4.311 3.4A27.21 27.21 0 0 0 16 20.51a27.6 27.6 0 0 0 8.325-1.13C27.4 18.361 28.8 16.9 28.8 15.974a2.327 2.327 0 0 0-1.01-1.573a10.194 10.194 0 0 0-3.161-1.654A27.462 27.462 0 0 0 16 11.489Z"/><path fill="#00d8ff" d="M10.32 28.443a2.639 2.639 0 0 1-1.336-.328c-1.432-.826-1.928-3.208-1.327-6.373a28.755 28.755 0 0 1 3.4-8.593a28.676 28.676 0 0 1 5.653-7.154a11.376 11.376 0 0 1 3.384-2.133a3.391 3.391 0 0 1 2.878 0c1.489.858 1.982 3.486 1.287 6.859a28.806 28.806 0 0 1-3.316 8.133a28.385 28.385 0 0 1-5.476 7.093a11.3 11.3 0 0 1-3.523 2.189a4.926 4.926 0 0 1-1.624.307Zm1.773-14.7a27.948 27.948 0 0 0-3.26 8.219c-.553 2.915-.022 4.668.75 5.114c.8.463 2.742.024 5.1-2.036a27.209 27.209 0 0 0 5.227-6.79a27.6 27.6 0 0 0 3.181-7.776c.654-3.175.089-5.119-.713-5.581a2.327 2.327 0 0 0-1.868.089A10.194 10.194 0 0 0 17.5 6.9a27.464 27.464 0 0 0-5.4 6.849Z"/><path fill="#00d8ff" d="M21.677 28.456c-1.355 0-3.076-.82-4.868-2.361a28.756 28.756 0 0 1-5.747-7.237a28.676 28.676 0 0 1-3.374-8.471a11.376 11.376 0 0 1-.158-4A3.391 3.391 0 0 1 8.964 3.9c1.487-.861 4.01.024 6.585 2.31a28.8 28.8 0 0 1 5.39 6.934a28.384 28.384 0 0 1 3.41 8.287a11.3 11.3 0 0 1 .137 4.146a3.543 3.543 0 0 1-1.494 2.555a2.59 2.59 0 0 1-1.315.324Zm-9.58-10.2a27.949 27.949 0 0 0 5.492 6.929c2.249 1.935 4.033 2.351 4.8 1.9c.8-.465 1.39-2.363.782-5.434A27.212 27.212 0 0 0 19.9 13.74a27.6 27.6 0 0 0-5.145-6.64c-2.424-2.152-4.39-2.633-5.191-2.169a2.327 2.327 0 0 0-.855 1.662a10.194 10.194 0 0 0 .153 3.565a27.465 27.465 0 0 0 3.236 8.1Z"/>`}})),tm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<circle cx="16" cy="15.974" r="2.5" fill="#007acc"/><path fill="#007acc" d="M16 21.706a28.385 28.385 0 0 1-8.88-1.2a11.3 11.3 0 0 1-3.657-1.958A3.543 3.543 0 0 1 2 15.974c0-1.653 1.816-3.273 4.858-4.333A28.755 28.755 0 0 1 16 10.293a28.674 28.674 0 0 1 9.022 1.324a11.376 11.376 0 0 1 3.538 1.866A3.391 3.391 0 0 1 30 15.974c0 1.718-2.03 3.459-5.3 4.541a28.8 28.8 0 0 1-8.7 1.191Zm0-10.217a27.948 27.948 0 0 0-8.749 1.282c-2.8.977-4.055 2.313-4.055 3.2c0 .928 1.349 2.387 4.311 3.4A27.21 27.21 0 0 0 16 20.51a27.6 27.6 0 0 0 8.325-1.13C27.4 18.361 28.8 16.9 28.8 15.974a2.327 2.327 0 0 0-1.01-1.573a10.194 10.194 0 0 0-3.161-1.654A27.462 27.462 0 0 0 16 11.489Z"/><path fill="#007acc" d="M10.32 28.443a2.639 2.639 0 0 1-1.336-.328c-1.432-.826-1.928-3.208-1.327-6.373a28.755 28.755 0 0 1 3.4-8.593a28.676 28.676 0 0 1 5.653-7.154a11.376 11.376 0 0 1 3.384-2.133a3.391 3.391 0 0 1 2.878 0c1.489.858 1.982 3.486 1.287 6.859a28.806 28.806 0 0 1-3.316 8.133a28.385 28.385 0 0 1-5.476 7.093a11.3 11.3 0 0 1-3.523 2.189a4.926 4.926 0 0 1-1.624.307Zm1.773-14.7a27.948 27.948 0 0 0-3.26 8.219c-.553 2.915-.022 4.668.75 5.114c.8.463 2.742.024 5.1-2.036a27.209 27.209 0 0 0 5.227-6.79a27.6 27.6 0 0 0 3.181-7.776c.654-3.175.089-5.119-.713-5.581a2.327 2.327 0 0 0-1.868.089A10.194 10.194 0 0 0 17.5 6.9a27.464 27.464 0 0 0-5.4 6.849Z"/><path fill="#007acc" d="M21.677 28.456c-1.355 0-3.076-.82-4.868-2.361a28.756 28.756 0 0 1-5.747-7.237a28.676 28.676 0 0 1-3.374-8.471a11.376 11.376 0 0 1-.158-4A3.391 3.391 0 0 1 8.964 3.9c1.487-.861 4.01.024 6.585 2.31a28.8 28.8 0 0 1 5.39 6.934a28.384 28.384 0 0 1 3.41 8.287a11.3 11.3 0 0 1 .137 4.146a3.543 3.543 0 0 1-1.494 2.555a2.59 2.59 0 0 1-1.315.324Zm-9.58-10.2a27.949 27.949 0 0 0 5.492 6.929c2.249 1.935 4.033 2.351 4.8 1.9c.8-.465 1.39-2.363.782-5.434A27.212 27.212 0 0 0 19.9 13.74a27.6 27.6 0 0 0-5.145-6.64c-2.424-2.152-4.39-2.633-5.191-2.169a2.327 2.327 0 0 0-.855 1.662a10.194 10.194 0 0 0 .153 3.565a27.465 27.465 0 0 0 3.236 8.1Z"/>`}})),nm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypeRuby0" x1="-235.957" x2="-235.986" y1="-308.579" y2="-308.527" gradientTransform="matrix(202.935 0 0 -202.78 47910.461 -62541.16)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fb7655"/><stop offset=".41" stop-color="#e42b1e"/><stop offset=".99" stop-color="#900"/><stop offset="1" stop-color="#900"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby1" x1="-235.571" x2="-235.697" y1="-309.087" y2="-309.041" gradientTransform="matrix(60.308 0 0 -111.778 14236.351 -34525.395)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#871101"/><stop offset=".99" stop-color="#911209"/><stop offset="1" stop-color="#911209"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby2" x1="-235.896" x2="-235.937" y1="-313.362" y2="-313.129" gradientTransform="matrix(188.32 0 0 -21.986 44447.302 -6856.882)" href="#vscodeIconsFileTypeRuby1"/><linearGradient id="vscodeIconsFileTypeRuby3" x1="-233.515" x2="-233.497" y1="-309.082" y2="-309.161" gradientTransform="matrix(65.222 0 0 -97.1 15237.802 -29991.814)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".23" stop-color="#e57252"/><stop offset=".46" stop-color="#de3b20"/><stop offset=".99" stop-color="#a60003"/><stop offset="1" stop-color="#a60003"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby4" x1="-235.314" x2="-235.31" y1="-309.534" y2="-309.607" gradientTransform="matrix(105.32 0 0 -106.825 24798.925 -33053.152)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".23" stop-color="#e4714e"/><stop offset=".56" stop-color="#be1a0d"/><stop offset=".99" stop-color="#a80d00"/><stop offset="1" stop-color="#a80d00"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby5" x1="-235.882" x2="-235.869" y1="-311.851" y2="-311.935" gradientTransform="matrix(94.321 0 0 -66.418 22271.499 -20707.004)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".18" stop-color="#e46342"/><stop offset=".4" stop-color="#c82410"/><stop offset=".99" stop-color="#a80d00"/><stop offset="1" stop-color="#a80d00"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby6" x1="-235.412" x2="-235.333" y1="-321.074" y2="-320.958" gradientTransform="matrix(70.767 0 0 -24.301 16678.116 -7798.647)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".54" stop-color="#c81f11"/><stop offset=".99" stop-color="#bf0905"/><stop offset="1" stop-color="#bf0905"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby7" x1="-223.821" x2="-223.796" y1="-310.116" y2="-310.18" gradientTransform="matrix(18.177 0 0 -72.645 4071.017 -22510.233)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".31" stop-color="#de4024"/><stop offset=".99" stop-color="#bf190b"/><stop offset="1" stop-color="#bf190b"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby8" x1="-235.561" x2="-235.424" y1="-309.258" y2="-309.116" gradientTransform="matrix(158.162 0 0 -157.937 37256.313 -48819.382)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#bd0012"/><stop offset=".07" stop-color="#fff"/><stop offset=".17" stop-color="#fff"/><stop offset=".27" stop-color="#c82f1c"/><stop offset=".33" stop-color="#820c01"/><stop offset=".46" stop-color="#a31601"/><stop offset=".72" stop-color="#b31301"/><stop offset=".99" stop-color="#e82609"/><stop offset="1" stop-color="#e82609"/></linearGradient><linearGradient id="vscodeIconsFileTypeRuby9" x1="-235.424" x2="-235.476" y1="-309.143" y2="-309.126" gradientTransform="matrix(127.074 0 0 -97.409 29932.229 -30086.947)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8c0c01"/><stop offset=".54" stop-color="#990c00"/><stop offset=".99" stop-color="#a80d0e"/><stop offset="1" stop-color="#a80d0e"/></linearGradient><linearGradient id="vscodeIconsFileTypeRubya" x1="-235.839" x2="-235.901" y1="-309.604" y2="-309.555" gradientTransform="matrix(94.011 0 0 -105.603 22198.743 -32676.856)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7e110b"/><stop offset=".99" stop-color="#9e0c00"/><stop offset="1" stop-color="#9e0c00"/></linearGradient><linearGradient id="vscodeIconsFileTypeRubyb" x1="-235.854" x2="-235.891" y1="-311.24" y2="-311.202" gradientTransform="matrix(79.702 0 0 -81.791 18827.397 -25447.905)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#79130d"/><stop offset=".99" stop-color="#9e120b"/><stop offset="1" stop-color="#9e120b"/></linearGradient><linearGradient id="vscodeIconsFileTypeRubyc" x1="-231.241" x2="-231.299" y1="-309.435" y2="-309.337" gradientTransform="matrix(40.137 0 0 -81.143 9286.998 -25078.589)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8b2114"/><stop offset=".43" stop-color="#9e100a"/><stop offset=".99" stop-color="#b3100c"/><stop offset="1" stop-color="#b3100c"/></linearGradient><linearGradient id="vscodeIconsFileTypeRubyd" x1="-235.898" x2="-235.831" y1="-317.466" y2="-317.537" gradientTransform="matrix(78.099 0 0 -32.624 18447.361 -10353.553)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b31000"/><stop offset=".44" stop-color="#910f08"/><stop offset=".99" stop-color="#791c12"/><stop offset="1" stop-color="#791c12"/></linearGradient><radialGradient id="vscodeIconsFileTypeRubye" cx="-235.882" cy="-312.543" r=".076" gradientTransform="matrix(93.113 0 0 -48.655 21986.073 -15193.61)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a80d00"/><stop offset=".99" stop-color="#7e0e08"/><stop offset="1" stop-color="#7e0e08"/></radialGradient><radialGradient id="vscodeIconsFileTypeRubyf" cx="-235.282" cy="-309.704" r=".097" gradientTransform="matrix(97.434 0 0 -75.848 22937.057 -23467.84)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a30c00"/><stop offset=".99" stop-color="#800e08"/><stop offset="1" stop-color="#800e08"/></radialGradient></defs><path fill="url(#vscodeIconsFileTypeRuby0)" d="M23.693 20.469L7.707 29.961l20.7-1.4L30 7.685Z"/><path fill="url(#vscodeIconsFileTypeRuby1)" d="m28.44 28.542l-1.779-12.279l-4.846 6.4Z"/><path fill="url(#vscodeIconsFileTypeRuby2)" d="M28.464 28.542L15.43 27.519l-7.654 2.415Z"/><path fill="url(#vscodeIconsFileTypeRuby3)" d="M7.794 29.937L11.05 19.27L3.885 20.8Z"/><path fill="url(#vscodeIconsFileTypeRuby4)" d="m21.813 22.7l-3-11.735L10.243 19Z"/><path fill="url(#vscodeIconsFileTypeRuby5)" d="m29.32 11.127l-8.1-6.619l-2.257 7.3Z"/><path fill="url(#vscodeIconsFileTypeRuby6)" d="m25.53 2.148l-4.767 2.634l-3.007-2.67Z"/><path fill="url(#vscodeIconsFileTypeRuby7)" d="m2 24.38l2-3.642L2.382 16.4Z"/><path fill="#fff" d="m2.274 16.263l1.626 4.61l7.062-1.584l8.062-7.489L21.3 4.569l-3.583-2.53l-6.091 2.28C9.706 6.1 5.982 9.635 5.848 9.7s-2.459 4.464-3.574 6.562Z"/><path fill="url(#vscodeIconsFileTypeRuby8)" d="M7.981 7.981C12.14 3.858 17.5 1.421 19.559 3.5s-.124 7.121-4.283 11.244s-9.455 6.69-11.511 4.614s.057-7.258 4.216-11.377Z"/><path fill="url(#vscodeIconsFileTypeRuby9)" d="m7.794 29.933l3.231-10.7l10.729 3.447c-3.879 3.638-8.194 6.713-13.96 7.254Z"/><path fill="url(#vscodeIconsFileTypeRubya)" d="m19.038 11.774l2.754 10.91c3.24-3.407 6.149-7.07 7.573-11.6l-10.328.691Z"/><path fill="url(#vscodeIconsFileTypeRubyb)" d="M29.337 11.139c1.1-3.327 1.357-8.1-3.841-8.985l-4.265 2.355l8.106 6.629Z"/><path fill="#9e1209" d="M2 24.332c.153 5.49 4.114 5.572 5.8 5.62l-3.9-9.1l-1.9 3.48Z"/><path fill="url(#vscodeIconsFileTypeRubye)" d="M19.053 11.791c2.49 1.531 7.509 4.6 7.61 4.661a17.552 17.552 0 0 0 2.619-5.343l-10.229.683Z"/><path fill="url(#vscodeIconsFileTypeRubyf)" d="m11.021 19.232l4.319 8.332a27.924 27.924 0 0 0 6.385-4.88l-10.7-3.452Z"/><path fill="url(#vscodeIconsFileTypeRubyc)" d="m3.887 20.861l-.612 7.287c1.155 1.577 2.743 1.714 4.409 1.591c-1.205-3-3.614-9-3.8-8.878Z"/><path fill="url(#vscodeIconsFileTypeRubyd)" d="m21.206 4.528l8.58 1.2c-.458-1.94-1.864-3.192-4.261-3.584l-4.319 2.38Z"/>`}})),rm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><radialGradient id="vscodeIconsFileTypeRust0" cx="-492.035" cy="-883.37" r="13.998" gradientTransform="matrix(.866 -.5 -.3 -.52 177.106 -689.033)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7d7d7d"/><stop offset=".267" stop-color="#7e7c7a"/><stop offset=".45" stop-color="#817871"/><stop offset=".608" stop-color="#867162"/><stop offset=".753" stop-color="#8d684c"/><stop offset=".886" stop-color="#965c30"/><stop offset="1" stop-color="#a04f12"/></radialGradient></defs><path fill="url(#vscodeIconsFileTypeRust0)" d="M15.124 5.3a.832.832 0 1 1 .832.832a.831.831 0 0 1-.832-.832M5.2 12.834a.832.832 0 1 1 .832.832a.832.832 0 0 1-.832-.832m19.856.039a.832.832 0 1 1 .832.832a.831.831 0 0 1-.832-.832m-17.451 1.14a.76.76 0 0 0 .386-1l-.369-.835h1.452v6.545h-2.93a10.247 10.247 0 0 1-.332-3.911Zm6.074.161v-1.929h3.458c.179 0 1.261.206 1.261 1.016c0 .672-.83.913-1.513.913ZM8.958 24.561a.832.832 0 1 1 .832.832a.831.831 0 0 1-.832-.832m12.331.039a.832.832 0 1 1 .832.832a.832.832 0 0 1-.832-.832m.257-1.887a.758.758 0 0 0-.9.584l-.418 1.949a10.249 10.249 0 0 1-8.545-.041l-.417-1.949a.759.759 0 0 0-.9-.583l-1.721.37a10.233 10.233 0 0 1-.89-1.049h8.374c.095 0 .158-.017.158-.1v-2.966c0-.086-.063-.1-.158-.1h-2.45v-1.881h2.649a1.665 1.665 0 0 1 1.629 1.412c.105.413.336 1.757.494 2.187c.157.483.8 1.447 1.482 1.447h4.323a10.243 10.243 0 0 1-.949 1.1Zm4.65-7.821a10.261 10.261 0 0 1 .022 1.779h-1.051c-.105 0-.148.069-.148.172v.483c0 1.136-.641 1.384-1.2 1.447c-.535.06-1.128-.224-1.2-.551a3.616 3.616 0 0 0-1.671-2.808c1.03-.654 2.1-1.619 2.1-2.911A3.292 3.292 0 0 0 21.44 9.8a4.559 4.559 0 0 0-2.2-.724H8.367A10.246 10.246 0 0 1 14.1 5.84l1.282 1.344a.758.758 0 0 0 1.072.026l1.434-1.372a10.248 10.248 0 0 1 7.015 5l-.982 2.217a.761.761 0 0 0 .386 1Zm2.448.036l-.033-.343l1.011-.943a.42.42 0 0 0-.013-.595a.428.428 0 0 0-.121-.081l-1.288-.483l-.1-.334l.806-1.12a.422.422 0 0 0-.13-.581a.43.43 0 0 0-.133-.055l-1.363-.222l-.164-.306l.573-1.257a.419.419 0 0 0-.236-.544a.426.426 0 0 0-.146-.029l-1.383.048l-.224-.264l.318-1.347a.421.421 0 0 0-.343-.487a.435.435 0 0 0-.144 0l-1.348.315l-.266-.219l.049-1.381a.421.421 0 0 0-.431-.411a.426.426 0 0 0-.141.028l-1.257.573l-.306-.164l-.222-1.363a.421.421 0 0 0-.5-.318a.43.43 0 0 0-.133.055l-1.121.806l-.333-.1l-.483-1.293a.421.421 0 0 0-.555-.215a.442.442 0 0 0-.12.08l-.946 1.012l-.343-.033l-.728-1.177a.421.421 0 0 0-.688 0l-.728 1.177l-.343.033l-.943-1.012a.421.421 0 0 0-.595.015a.442.442 0 0 0-.08.12L12.483 3.8l-.333.1l-1.12-.8a.422.422 0 0 0-.581.13a.43.43 0 0 0-.055.133l-.222 1.363l-.306.164l-1.258-.573a.421.421 0 0 0-.544.239a.444.444 0 0 0-.028.144l.048 1.383l-.266.217l-1.347-.316a.421.421 0 0 0-.487.343a.435.435 0 0 0 0 .144L6.3 7.819l-.218.265L4.7 8.036a.422.422 0 0 0-.383.573l.573 1.257l-.164.306l-1.363.222a.42.42 0 0 0-.318.5a.43.43 0 0 0 .055.133l.806 1.12l-.1.334l-1.293.483a.421.421 0 0 0-.215.555a.414.414 0 0 0 .081.121l1.011.943l-.033.343l-1.177.728a.421.421 0 0 0 0 .688l1.177.728l.033.343l-1.011.943a.421.421 0 0 0 .015.595a.436.436 0 0 0 .119.08l1.293.483l.1.334l-.806 1.124a.421.421 0 0 0 .131.581a.43.43 0 0 0 .133.055l1.363.222l.164.307l-.573 1.257a.422.422 0 0 0 .24.545a.438.438 0 0 0 .143.028l1.383-.048l.219.266l-.317 1.348a.42.42 0 0 0 .341.486a.4.4 0 0 0 .146 0l1.345-.319l.266.218l-.049 1.382a.419.419 0 0 0 .429.41a.413.413 0 0 0 .143-.028l1.257-.573l.306.164l.222 1.362a.421.421 0 0 0 .5.319a.407.407 0 0 0 .133-.055l1.12-.807l.334.1l.483 1.292a.422.422 0 0 0 .556.214a.436.436 0 0 0 .119-.08l.943-1.011l.343.034l.728 1.177a.422.422 0 0 0 .588.1a.413.413 0 0 0 .1-.1l.728-1.177l.343-.034l.943 1.011a.421.421 0 0 0 .595-.015a.436.436 0 0 0 .08-.119l.483-1.292l.334-.1l1.12.807a.421.421 0 0 0 .581-.131a.43.43 0 0 0 .055-.133l.222-1.362l.306-.164l1.257.573a.421.421 0 0 0 .544-.239a.438.438 0 0 0 .028-.143l-.048-1.384l.265-.218l1.347.317a.421.421 0 0 0 .487-.34a.447.447 0 0 0 0-.146l-.309-1.346l.218-.266l1.383.048a.421.421 0 0 0 .41-.431a.4.4 0 0 0-.028-.142l-.573-1.257l.164-.307l1.363-.222a.421.421 0 0 0 .319-.5a.434.434 0 0 0-.056-.135l-.806-1.12l.1-.334l1.293-.483a.42.42 0 0 0 .215-.554a.414.414 0 0 0-.081-.121l-1.011-.943l.033-.343l1.177-.728a.421.421 0 0 0 0-.688Z"/>`}})),im=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#cd6799" d="M26.11 17.572a5.8 5.8 0 0 0-2.537.588a5.345 5.345 0 0 1-.568-1.314a3.53 3.53 0 0 1-.051-1.1a9.811 9.811 0 0 1 .332-1.192c-.005-.051-.061-.292-.624-.3s-1.048.107-1.1.256a6.171 6.171 0 0 0-.235.834a19.686 19.686 0 0 1-1.713 3.294a3.186 3.186 0 0 1-.44-2.066a9.811 9.811 0 0 1 .332-1.192c-.005-.051-.061-.292-.624-.3s-1.048.107-1.1.256s-.118.5-.235.834s-1.483 3.386-1.841 4.173c-.184.4-.343.726-.455.946a.233.233 0 0 1-.02.041l-.153.292v.005c-.077.138-.159.266-.2.266a1.711 1.711 0 0 1 .01-.869c.2-1.059.69-2.705.685-2.762c0-.031.092-.317-.317-.465a.508.508 0 0 0-.578.1c-.036 0-.061.087-.061.087s.445-1.851-.849-1.851a3.855 3.855 0 0 0-2.475 1.683c-.348.189-1.089.593-1.882 1.028c-.3.169-.614.338-.905.5c-.02-.02-.041-.046-.061-.066C6.87 17.6 3.975 16.416 4.1 14.171c.046-.818.327-2.966 5.559-5.575c4.306-2.122 7.733-1.534 8.326-.23c.849 1.862-1.836 5.319-6.285 5.82a3.351 3.351 0 0 1-2.813-.711c-.235-.256-.271-.271-.358-.22c-.143.077-.051.307 0 .44a2.626 2.626 0 0 0 1.606 1.263a8.55 8.55 0 0 0 5.217-.517c2.7-1.043 4.8-3.943 4.184-6.372c-.619-2.465-4.71-3.278-8.582-1.9a19.5 19.5 0 0 0-6.595 3.783c-2.133 1.995-2.47 3.728-2.332 4.455c.5 2.578 4.051 4.255 5.472 5.5a8.554 8.554 0 0 1-.194.107c-.711.353-3.421 1.77-4.1 3.268c-.767 1.7.123 2.915.711 3.079a4.374 4.374 0 0 0 4.71-1.908a4.725 4.725 0 0 0 .423-4.353a.107.107 0 0 0-.02-.031l.557-.327a27.2 27.2 0 0 1 1.028-.578a6.74 6.74 0 0 0-.363 1.862a3.886 3.886 0 0 0 .834 2.7a.921.921 0 0 0 .675.22c.6 0 .875-.5 1.176-1.094c.368-.726.7-1.57.7-1.57s-.414 2.281.711 2.281c.409 0 .823-.532 1.008-.8v.005l.031-.051l.066-.107v-.01c.164-.286.532-.936 1.079-2.015c.706-1.391 1.386-3.13 1.386-3.13a8.888 8.888 0 0 0 .271 1.13a10.643 10.643 0 0 0 .583 1.309c-.164.23-.266.358-.266.358l.005.005c-.133.174-.276.363-.435.547a16.3 16.3 0 0 0-1.314 1.647a.447.447 0 0 0 .123.6a1.116 1.116 0 0 0 .685.113a3.147 3.147 0 0 0 1.028-.235a3.45 3.45 0 0 0 .885-.465a1.98 1.98 0 0 0 .849-1.744a3.521 3.521 0 0 0-.322-1.233c.051-.072.1-.143.148-.215a23.428 23.428 0 0 0 1.534-2.649a8.888 8.888 0 0 0 .271 1.13a7.57 7.57 0 0 0 .5 1.125a4.861 4.861 0 0 0-1.497 1.922c-.322.931-.072 1.35.4 1.447a1.425 1.425 0 0 0 .747-.153a3.4 3.4 0 0 0 .946-.486a2.126 2.126 0 0 0 1.043-1.729a3.268 3.268 0 0 0-.235-1.023a5.356 5.356 0 0 1 2.716-.312c2.434.286 2.915 1.805 2.823 2.445a1.618 1.618 0 0 1-.772 1.094c-.169.107-.225.143-.21.22c.02.113.1.107.245.087A1.9 1.9 0 0 0 30 20.7c.077-1.5-1.355-3.145-3.887-3.13ZM7.33 23.9c-.808.88-1.933 1.212-2.419.931c-.522-.3-.317-1.6.675-2.532a12.884 12.884 0 0 1 1.9-1.417c.118-.072.292-.174.5-.3l.056-.031l.123-.077A3.493 3.493 0 0 1 7.33 23.9Zm5.881-4c-.281.685-.869 2.44-1.227 2.342c-.307-.082-.5-1.412-.061-2.726a6.193 6.193 0 0 1 .956-1.754c.44-.491.926-.655 1.043-.455a9.062 9.062 0 0 1-.711 2.593Zm4.853 2.322c-.118.061-.23.1-.281.072c-.036-.02.051-.1.051-.1s.609-.655.849-.951c.138-.174.3-.378.476-.609v.066c0 .782-.757 1.309-1.094 1.524Zm3.744-.854c-.087-.061-.072-.266.22-.905a3.408 3.408 0 0 1 .834-1.074a1.448 1.448 0 0 1 .082.471a1.547 1.547 0 0 1-1.135 1.509Z"/>`}})),am=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#d9b400" d="M29.4 27.6H2.5V4.5h26.9Zm-25.9-1h24.9V5.5H3.5Z"/><path fill="#d9b400" d="m6.077 19.316l-.555-.832l4.844-3.229l-4.887-4.071l.641-.768l5.915 4.928l-5.958 3.972zM12.7 18.2h7.8v1h-7.8zM2.5 5.5h26.9v1.9H2.5z"/>`}})),om=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#ffda44" d="M8.562 15.256A21.159 21.159 0 0 0 16 16.449a21.159 21.159 0 0 0 7.438-1.194c1.864-.727 2.525-1.535 2.525-2V9.7a10.357 10.357 0 0 1-2.084 1.076A22.293 22.293 0 0 1 16 12.078a22.36 22.36 0 0 1-7.879-1.3A10.28 10.28 0 0 1 6.037 9.7v3.55c0 .474.663 1.278 2.525 2.006Zm0 6.705a15.611 15.611 0 0 0 2.6.741a24.9 24.9 0 0 0 4.838.453a24.9 24.9 0 0 0 4.838-.452a15.614 15.614 0 0 0 2.6-.741c1.864-.727 2.525-1.535 2.525-2v-3.39a10.706 10.706 0 0 1-1.692.825A23.49 23.49 0 0 1 16 18.74a23.49 23.49 0 0 1-8.271-1.348a10.829 10.829 0 0 1-1.692-.825v3.393c0 .466.663 1.271 2.525 2.001ZM16 30c5.5 0 9.963-1.744 9.963-3.894v-2.837a10.5 10.5 0 0 1-1.535.762l-.157.063A23.487 23.487 0 0 1 16 25.445a23.422 23.422 0 0 1-8.271-1.351c-.054-.02-.106-.043-.157-.063a10.5 10.5 0 0 1-1.535-.762v2.837C6.037 28.256 10.5 30 16 30Z"/><ellipse cx="16" cy="5.894" fill="#ffda44" rx="9.963" ry="3.894"/>`}})),sm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#ff3e00" d="M26.47 5.7a8.973 8.973 0 0 0-11.793-2.454L7.96 7.4a7.461 7.461 0 0 0-3.481 5.009a7.686 7.686 0 0 0 .8 5.058a7.358 7.358 0 0 0-1.151 2.8a7.789 7.789 0 0 0 1.4 6.028a8.977 8.977 0 0 0 11.794 2.458L24.04 24.6a7.468 7.468 0 0 0 3.481-5.009a7.673 7.673 0 0 0-.8-5.062a7.348 7.348 0 0 0 1.152-2.8A7.785 7.785 0 0 0 26.47 5.7"/><path fill="#fff" d="M14.022 26.64A5.413 5.413 0 0 1 8.3 24.581a4.678 4.678 0 0 1-.848-3.625a4.307 4.307 0 0 1 .159-.61l.127-.375l.344.238a8.76 8.76 0 0 0 2.628 1.274l.245.073l-.025.237a1.441 1.441 0 0 0 .271.968a1.63 1.63 0 0 0 1.743.636a1.512 1.512 0 0 0 .411-.175l6.7-4.154a1.366 1.366 0 0 0 .633-.909a1.407 1.407 0 0 0-.244-1.091a1.634 1.634 0 0 0-1.726-.622a1.509 1.509 0 0 0-.413.176l-2.572 1.584a4.934 4.934 0 0 1-1.364.582a5.415 5.415 0 0 1-5.727-2.06a4.678 4.678 0 0 1-.831-3.628A4.507 4.507 0 0 1 9.9 10.09l6.708-4.154a4.932 4.932 0 0 1 1.364-.581A5.413 5.413 0 0 1 23.7 7.414a4.679 4.679 0 0 1 .848 3.625a4.272 4.272 0 0 1-.159.61l-.127.375l-.344-.237a8.713 8.713 0 0 0-2.628-1.274l-.245-.074l.025-.237a1.438 1.438 0 0 0-.272-.968a1.629 1.629 0 0 0-1.725-.622a1.484 1.484 0 0 0-.411.176l-6.722 4.14a1.353 1.353 0 0 0-.631.908a1.394 1.394 0 0 0 .244 1.092a1.634 1.634 0 0 0 1.726.621a1.538 1.538 0 0 0 .413-.175l2.562-1.585a4.9 4.9 0 0 1 1.364-.581a5.417 5.417 0 0 1 5.728 2.059a4.681 4.681 0 0 1 .843 3.625a4.5 4.5 0 0 1-2.089 3.013l-6.707 4.154a4.9 4.9 0 0 1-1.364.581"/>`}})),cm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#ffb13b" stroke="#000" stroke-width="3.73" d="M7.674 14.488a2.218 2.218 0 1 0 0 3.137h16.652a2.218 2.218 0 1 0 0-3.137Z"/><path fill="#ffb13b" stroke="#000" stroke-width="3.73" d="M11.222 9.06A2.218 2.218 0 1 0 9 11.278l11.778 11.774A2.218 2.218 0 1 0 23 20.834Z"/><path fill="#ffb13b" stroke="#000" stroke-width="3.73" d="M17.568 7.73a2.218 2.218 0 1 0-3.137 0v16.652a2.218 2.218 0 1 0 3.137 0Z"/><path fill="#ffb13b" stroke="#000" stroke-width="3.73" d="M23 11.278a2.218 2.218 0 1 0-2.222-2.218L9 20.834a2.218 2.218 0 1 0 2.218 2.218Z"/><path fill="#ffb13b" d="M7.674 14.488a2.218 2.218 0 1 0 0 3.137h16.652a2.218 2.218 0 1 0 0-3.137Z"/><path fill="#ffb13b" d="M11.222 9.06A2.218 2.218 0 1 0 9 11.278l11.778 11.774A2.218 2.218 0 1 0 23 20.834Z"/><path fill="#ffb13b" d="M17.568 7.73a2.218 2.218 0 1 0-3.137 0v16.652a2.218 2.218 0 1 0 3.137 0Z"/><path fill="#ffb13b" d="M23 11.278a2.218 2.218 0 1 0-2.222-2.218L9 20.834a2.218 2.218 0 1 0 2.218 2.218Z"/><path d="M2 16.056h28v9.894a4.035 4.035 0 0 1-4.106 4.106H6.106A4.035 4.035 0 0 1 2 25.95Z"/><path fill="#fff" d="M6.2 23.045a3.628 3.628 0 1 1 6.2-2.565h-2.13a1.5 1.5 0 1 0-2.57 1.061a1.6 1.6 0 0 0 1.062.441a4.118 4.118 0 0 1 2.566 1.063a3.628 3.628 0 1 1-6.194 2.565h2.13a1.5 1.5 0 1 0 2.566-1.06a1.948 1.948 0 0 0-1.063-.44A4.465 4.465 0 0 1 6.2 23.045Zm13.451-6.193L17.085 29.24H14.96L12.4 16.852h2.12l1.5 7.255l1.5-7.255Zm3.629 5.131h3.628v3.628a3.628 3.628 0 1 1-7.257 0V20.48a3.628 3.628 0 0 1 7.257 0h-2.125a1.5 1.5 0 1 0-3.005 0v5.13a1.5 1.5 0 0 0 3.005 0v-1.5h-1.5v-2.127Z"/>`}})),lm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypeSwift0" x1="-134.494" x2="-134.497" y1="-171.82" y2="-171.89" gradientTransform="matrix(240 0 0 -205.6 32295 -35312.585)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f88535"/><stop offset="1" stop-color="#fd2221"/></linearGradient></defs><path fill="url(#vscodeIconsFileTypeSwift0)" d="M19.422 4.007s6.217 3.554 7.844 9.2c1.466 5.1.292 7.534.292 7.534a8.915 8.915 0 0 1 1.742 2.8a4.825 4.825 0 0 1 .29 4.453s-.1-2.08-3.2-2.511c-2.841-.4-3.874 2.366-9.3 2.232A18.435 18.435 0 0 1 2 19.354C4.651 20.8 8.124 23.045 12.449 22.7s5.228-1.674 5.228-1.674A66.9 66.9 0 0 1 4.891 7.643c3.4 2.845 11.822 8.507 11.626 8.363A75.826 75.826 0 0 1 8.092 6.24s12.636 10.389 13.653 10.323c.418-.861 2.579-5.318-2.324-12.557Z"/>`}})),um=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#44a8b3" d="M9 13.7q1.4-5.6 7-5.6c5.6 0 6.3 4.2 9.1 4.9q2.8.7 4.9-2.1q-1.4 5.6-7 5.6c-5.6 0-6.3-4.2-9.1-4.9q-2.8-.7-4.9 2.1Zm-7 8.4q1.4-5.6 7-5.6c5.6 0 6.3 4.2 9.1 4.9q2.8.7 4.9-2.1q-1.4 5.6-7 5.6c-5.6 0-6.3-4.2-9.1-4.9q-2.8-.7-4.9 2.1Z"/>`}})),dm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#c2c2c2" d="M22.038 2H6.375a1.755 1.755 0 0 0-1.75 1.75v24.5A1.755 1.755 0 0 0 6.375 30h19.25a1.755 1.755 0 0 0 1.75-1.75V6.856Zm.525 2.844l1.663 1.531h-1.663ZM6.375 28.25V3.75h14.438v4.375h4.813V28.25Z"/><path fill="#829ec2" d="M8.125 15.097h13.076v1.75H8.125zm0 9.342h9.762v1.75H8.125zm0-4.676h15.75v1.75H8.125zm0-9.533h15.75v1.75H8.125z"/>`}})),fm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#7f7f7f" d="M22.76 6.83v3.25h-5v15.09h-3.5V10.08h-5V6.83Z"/><path fill="#bfbfbf" d="M2 2h6.2v3.09H5.34v21.8H8.2V30H2Zm28 28h-6.2v-3.09h2.86V5.11H23.8V2H30Z"/>`}})),pm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#007acc" d="M23.827 8.243a4.424 4.424 0 0 1 2.223 1.281a5.853 5.853 0 0 1 .852 1.143c.011.045-1.534 1.083-2.471 1.662c-.034.023-.169-.124-.322-.35a2.014 2.014 0 0 0-1.67-1c-1.077-.074-1.771.49-1.766 1.433a1.3 1.3 0 0 0 .153.666c.237.49.677.784 2.059 1.383c2.544 1.1 3.636 1.817 4.31 2.843a5.158 5.158 0 0 1 .416 4.333a4.764 4.764 0 0 1-3.932 2.815a10.9 10.9 0 0 1-2.708-.028a6.531 6.531 0 0 1-3.616-1.884a6.278 6.278 0 0 1-.926-1.371a2.655 2.655 0 0 1 .327-.208c.158-.09.756-.434 1.32-.761l1.024-.6l.214.312a4.771 4.771 0 0 0 1.35 1.292a3.3 3.3 0 0 0 3.458-.175a1.545 1.545 0 0 0 .2-1.974c-.276-.4-.84-.727-2.443-1.422a8.8 8.8 0 0 1-3.349-2.055a4.687 4.687 0 0 1-.976-1.777a7.116 7.116 0 0 1-.062-2.268a4.332 4.332 0 0 1 3.644-3.374a9 9 0 0 1 2.691.084Zm-8.343 1.483l.011 1.454h-4.63v13.148H7.6V11.183H2.97V9.755a13.986 13.986 0 0 1 .04-1.466c.017-.023 2.832-.034 6.245-.028l6.211.017Z"/><path fill="#99b8c4" d="m27.075 25.107l.363-.361c1.68.055 1.706 0 1.78-.177l.462-1.124l.034-.107l-.038-.093c-.02-.049-.081-.2-1.13-1.2v-.526c1.211-1.166 1.185-1.226 1.116-1.4l-.46-1.136c-.069-.17-.1-.237-1.763-.191l-.364-.367a8.138 8.138 0 0 0-.057-1.657l-.047-.106l-1.2-.525c-.177-.081-.239-.11-1.372 1.124l-.509-.008c-1.167-1.245-1.222-1.223-1.4-1.152l-1.115.452c-.175.071-.236.1-.169 1.79l-.36.359c-1.68-.055-1.7 0-1.778.177L18.606 20l-.036.108l.038.094c.02.048.078.194 1.13 1.2v.525c-1.211 1.166-1.184 1.226-1.115 1.4l.459 1.137c.07.174.1.236 1.763.192l.363.377a8.169 8.169 0 0 0 .055 1.654l.047.107l1.208.528c.176.073.236.1 1.366-1.13l.509.006c1.168 1.247 1.228 1.223 1.4 1.154l1.113-.45c.176-.075.237-.102.169-1.795Zm-4.788-2.632a2 2 0 1 1 2.618 1.14a2.023 2.023 0 0 1-2.618-1.14Z"/>`}})),mm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#007acc" d="M23.827 8.243a4.424 4.424 0 0 1 2.223 1.281a5.853 5.853 0 0 1 .852 1.143c.011.045-1.534 1.083-2.471 1.662c-.034.023-.169-.124-.322-.35a2.014 2.014 0 0 0-1.67-1c-1.077-.074-1.771.49-1.766 1.433a1.3 1.3 0 0 0 .153.666c.237.49.677.784 2.059 1.383c2.544 1.095 3.636 1.817 4.31 2.843a5.158 5.158 0 0 1 .416 4.333a4.764 4.764 0 0 1-3.932 2.815a10.9 10.9 0 0 1-2.708-.028a6.531 6.531 0 0 1-3.616-1.884a6.278 6.278 0 0 1-.926-1.371a2.655 2.655 0 0 1 .327-.208c.158-.09.756-.434 1.32-.761l1.024-.6l.214.312a4.771 4.771 0 0 0 1.35 1.292a3.3 3.3 0 0 0 3.458-.175a1.545 1.545 0 0 0 .2-1.974c-.276-.395-.84-.727-2.443-1.422a8.8 8.8 0 0 1-3.349-2.055a4.687 4.687 0 0 1-.976-1.777a7.116 7.116 0 0 1-.062-2.268a4.332 4.332 0 0 1 3.644-3.374a9 9 0 0 1 2.691.084Zm-8.343 1.483l.011 1.454h-4.63v13.148H7.6V11.183H2.97V9.755a13.986 13.986 0 0 1 .04-1.466c.017-.023 2.832-.034 6.245-.028l6.211.017Z"/>`}})),hm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#e75749" d="M4.5 2.375A2.562 2.562 0 0 1 5.861 2h20.366a2.545 2.545 0 0 1 2.423 1.951a3.37 3.37 0 0 1 .072.862v11.176h-1.573a1.814 1.814 0 0 0-.22.022a5.236 5.236 0 0 0-.581-.011c-.3.007-.61-.014-.914.014a2.275 2.275 0 0 0-.4-.02h-4.739c-.2 0-.392.008-.587-.01l.1-.065l-6.353-3.813v3.889c-2.213-.005-4.427 0-6.64 0a2.274 2.274 0 0 0-.251.021c-.212-.032-.427-.016-.642-.016c-.284.006-.57-.015-.853.015a2.052 2.052 0 0 0-.253-.022H3.275c.006-3.635 0-7.27 0-10.9a4.786 4.786 0 0 1 .071-1.131A2.541 2.541 0 0 1 4.5 2.375Zm.54 2.188a.639.639 0 0 0-.489.606v1.316a.639.639 0 0 0 .627.6h1.309a.638.638 0 0 0 .6-.608c.005-.426 0-.853 0-1.279a.644.644 0 0 0-.329-.575a.708.708 0 0 0-.358-.078H5.264a1.081 1.081 0 0 0-.224.018Zm20.341 0a.639.639 0 0 0-.474.607v1.306a.638.638 0 0 0 .6.608c.436.005.872 0 1.308 0a.639.639 0 0 0 .627-.606c.006-.438 0-.876 0-1.314a.638.638 0 0 0-.594-.621c-.348-.009-.7 0-1.045 0a1.98 1.98 0 0 0-.422.024ZM5.042 8.38a.637.637 0 0 0-.452.4a1.078 1.078 0 0 0-.041.386v1.135a.637.637 0 0 0 .6.6c.4.008.795 0 1.192 0a.826.826 0 0 0 .395-.065a.641.641 0 0 0 .36-.574V8.983a.638.638 0 0 0-.6-.624c-.338-.008-.677 0-1.016 0a2.385 2.385 0 0 0-.438.021Zm20.338 0a.637.637 0 0 0-.433.4a1.072 1.072 0 0 0-.041.387v1.131a.638.638 0 0 0 .608.607c.406.006.812 0 1.218 0a.739.739 0 0 0 .38-.078a.64.64 0 0 0 .335-.558V8.985a.637.637 0 0 0-.593-.622c-.349-.009-.7 0-1.047 0a1.928 1.928 0 0 0-.428.022ZM5.041 12.2a.639.639 0 0 0-.491.608c0 .438-.005.877 0 1.315a.638.638 0 0 0 .627.6h1.3a.638.638 0 0 0 .608-.607v-1.307a.638.638 0 0 0-.605-.626c-.348-.007-.7 0-1.045 0a2.12 2.12 0 0 0-.394.017Zm20.335.006a.635.635 0 0 0-.43.394a1.06 1.06 0 0 0-.041.386v1.131a.638.638 0 0 0 .607.608c.435.005.87 0 1.306 0a.639.639 0 0 0 .628-.605c.006-.438 0-.876 0-1.313a.637.637 0 0 0-.592-.622c-.349-.01-.7 0-1.046 0a1.908 1.908 0 0 0-.431.015Z"/><path fill="#fff" d="M13.458 12.1q3.176 1.908 6.353 3.813l-.1.065q-3.127 1.872-6.251 3.748V15.99c-.001-1.295-.004-2.59-.002-3.89Z"/><path fill="#c0392b" d="M3.275 15.988h1.541a2.052 2.052 0 0 1 .253.022a.645.645 0 0 0-.409.273a.883.883 0 0 0-.111.518v1.045a.686.686 0 0 0 .685.689h1.192a.68.68 0 0 0 .657-.569c.008-.447 0-.9 0-1.343a.632.632 0 0 0-.521-.613a2.274 2.274 0 0 1 .251-.021h6.64v3.736q3.127-1.871 6.251-3.748c.2.018.391.007.587.01h4.741a2.275 2.275 0 0 1 .4.02a.637.637 0 0 0-.475.385a.983.983 0 0 0-.045.407v1.014a.677.677 0 0 0 .691.719h1.16a.684.684 0 0 0 .686-.658v-.984a1.074 1.074 0 0 0-.1-.589a.642.642 0 0 0-.42-.292a1.814 1.814 0 0 1 .22-.022h1.573c.011 1.721 0 3.443 0 5.165v6.293a2.567 2.567 0 0 1-.612 1.651a2.539 2.539 0 0 1-1.563.868a7.534 7.534 0 0 1-.981.033H6.724a9.27 9.27 0 0 1-1.368-.048a2.557 2.557 0 0 1-2-1.846a2.825 2.825 0 0 1-.09-.746V16.891c.007-.3-.002-.602.009-.903Zm1.795 3.843a.613.613 0 0 0-.386.234a.761.761 0 0 0-.134.464v1.162a.685.685 0 0 0 .686.658h1.283a.687.687 0 0 0 .568-.716v-1.191a.617.617 0 0 0-.2-.458a.712.712 0 0 0-.487-.17H5.264a1.039 1.039 0 0 0-.194.017Zm20.366 0a.62.62 0 0 0-.522.58v1.222a.676.676 0 0 0 .69.718c.428 0 .857.005 1.285 0a.7.7 0 0 0 .562-.684v-1.013a.9.9 0 0 0-.123-.568a.661.661 0 0 0-.532-.267h-.954a2.246 2.246 0 0 0-.406.011ZM5.071 23.648a.609.609 0 0 0-.4.249a.766.766 0 0 0-.124.448v1.132a.7.7 0 0 0 .6.688h1.376a.687.687 0 0 0 .567-.717v-1.189a.617.617 0 0 0-.2-.459a.71.71 0 0 0-.484-.17H5.265a1.028 1.028 0 0 0-.194.018Zm20.362 0a.616.616 0 0 0-.492.427a.99.99 0 0 0-.029.33V25.6a.681.681 0 0 0 .656.567h1.193a.689.689 0 0 0 .686-.719v-1.164a.657.657 0 0 0-.286-.545a1.461 1.461 0 0 0-.787-.11c-.312.01-.629-.02-.94.018Z"/>`}})),gm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<g fill="none"><path fill="url(#vscodeIconsFileTypeVite0)" d="m29.884 6.146l-13.142 23.5a.714.714 0 0 1-1.244.005L2.096 6.148a.714.714 0 0 1 .746-1.057l13.156 2.352a.714.714 0 0 0 .253 0l12.881-2.348a.714.714 0 0 1 .752 1.05z"/><path fill="url(#vscodeIconsFileTypeVite1)" d="M22.264 2.007L12.54 3.912a.357.357 0 0 0-.288.33l-.598 10.104a.357.357 0 0 0 .437.369l2.707-.625a.357.357 0 0 1 .43.42l-.804 3.939a.357.357 0 0 0 .454.413l1.672-.508a.357.357 0 0 1 .454.414l-1.279 6.187c-.08.387.435.598.65.267l.143-.222l7.925-15.815a.357.357 0 0 0-.387-.51l-2.787.537a.357.357 0 0 1-.41-.45l1.818-6.306a.357.357 0 0 0-.412-.45z"/><defs><linearGradient id="vscodeIconsFileTypeVite0" x1="6" x2="235" y1="33" y2="344" gradientTransform="translate(1.34 1.894) scale(.07142)" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="vscodeIconsFileTypeVite1" x1="194.651" x2="236.076" y1="8.818" y2="292.989" gradientTransform="translate(1.34 1.894) scale(.07142)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset=".083" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs></g>`}})),_m=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#fcc72b" d="m22.86 11.09l-6.55 9.46a.58.58 0 0 1-.28.21a.55.55 0 0 1-.36 0a.56.56 0 0 1-.29-.21a.59.59 0 0 1-.09-.35l.26-5.2l-4.23-.9a.55.55 0 0 1-.24-.12a.5.5 0 0 1-.16-.22a.5.5 0 0 1 0-.27a.46.46 0 0 1 .1-.25l6.54-9.46a.58.58 0 0 1 .29-.22a.53.53 0 0 1 .35 0a.58.58 0 0 1 .29.22a.52.52 0 0 1 .09.34l-.26 5.22l4.23.9a.58.58 0 0 1 .25.12a.69.69 0 0 1 .16.22a.62.62 0 0 1-.06.53Z"/><path fill="#729b1b" d="M16 28.49a1.44 1.44 0 0 1-.5-.1a1.3 1.3 0 0 1-.43-.29l-6.19-6.19A1.28 1.28 0 0 1 8.5 21a1.3 1.3 0 0 1 1.32-1.32a1.32 1.32 0 0 1 .94.38L16 25.29l11.43-11.43a1.32 1.32 0 0 1 .94-.38a1.31 1.31 0 0 1 .93.39a1.29 1.29 0 0 1 .39.93a1.34 1.34 0 0 1-.38.93L16.94 28.1a1.42 1.42 0 0 1-.43.29a1.45 1.45 0 0 1-.51.1Z"/><path fill="#729b1b" fill-opacity=".5" d="M16 28.49a1.44 1.44 0 0 0 .5-.1a1.3 1.3 0 0 0 .43-.29l6.19-6.19a1.28 1.28 0 0 0 .38-.91a1.3 1.3 0 0 0-1.32-1.32a1.32 1.32 0 0 0-.94.38L16 25.29L4.57 13.86a1.32 1.32 0 0 0-.94-.38a1.31 1.31 0 0 0-.93.39a1.29 1.29 0 0 0-.39.93a1.34 1.34 0 0 0 .38.93L15.06 28.1a1.42 1.42 0 0 0 .43.29a1.45 1.45 0 0 0 .51.1Z"/>`}})),vm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#41b883" d="M24.4 3.925H30l-14 24.15L2 3.925h10.71l3.29 5.6l3.22-5.6Z"/><path fill="#41b883" d="m2 3.925l14 24.15l14-24.15h-5.6L16 18.415L7.53 3.925Z"/><path fill="#35495e" d="M7.53 3.925L16 18.485l8.4-14.56h-5.18L16 9.525l-3.29-5.6Z"/>`}})),ym=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypeWord0" x1="4.494" x2="13.832" y1="-1712.086" y2="-1695.914" gradientTransform="translate(0 1720)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2368c4"/><stop offset=".5" stop-color="#1a5dbe"/><stop offset="1" stop-color="#1146ac"/></linearGradient></defs><path fill="#41a5ee" d="M28.806 3H9.705a1.192 1.192 0 0 0-1.193 1.191V9.5l11.069 3.25L30 9.5V4.191A1.192 1.192 0 0 0 28.806 3Z"/><path fill="#2b7cd3" d="M30 9.5H8.512V16l11.069 1.95L30 16Z"/><path fill="#185abd" d="M8.512 16v6.5l10.418 1.3L30 22.5V16Z"/><path fill="#103f91" d="M9.705 29h19.1A1.192 1.192 0 0 0 30 27.809V22.5H8.512v5.309A1.192 1.192 0 0 0 9.705 29Z"/><path d="M16.434 8.2H8.512v16.25h7.922a1.2 1.2 0 0 0 1.194-1.191V9.391A1.2 1.2 0 0 0 16.434 8.2Z" opacity=".1"/><path d="M15.783 8.85H8.512V25.1h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191Z" opacity=".2"/><path d="M15.783 8.85H8.512V23.8h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191Z" opacity=".2"/><path d="M15.132 8.85h-6.62V23.8h6.62a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191Z" opacity=".2"/><path fill="url(#vscodeIconsFileTypeWord0)" d="M3.194 8.85h11.938a1.193 1.193 0 0 1 1.194 1.191v11.918a1.193 1.193 0 0 1-1.194 1.191H3.194A1.192 1.192 0 0 1 2 21.959V10.041A1.192 1.192 0 0 1 3.194 8.85Z"/><path fill="#fff" d="M6.9 17.988c.023.184.039.344.046.481h.028c.01-.13.032-.287.065-.47s.062-.338.089-.465l1.255-5.407h1.624l1.3 5.326a7.761 7.761 0 0 1 .162 1h.022a7.6 7.6 0 0 1 .135-.975l1.039-5.358h1.477l-1.824 7.748h-1.727l-1.237-5.126q-.054-.222-.122-.578t-.084-.52h-.021q-.021.189-.084.561c-.042.249-.075.432-.1.552L7.78 19.871H6.024L4.19 12.127h1.5l1.131 5.418a4.469 4.469 0 0 1 .079.443Z"/>`}})),bm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#f1662a" d="m20.42 21.157l2.211 2.211L30 16l-7.369-7.369l-2.211 2.212L25.58 16Zm-8.84-10.314L9.369 8.631L2 16l7.369 7.369l2.211-2.211L6.42 16Zm5.831-3.166l1.6.437l-4.42 16.209l-1.6-.437l4.42-16.209Z"/>`}})),xm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#ffe885" d="M2 12.218c.755 0 1.51-.008 2.264 0l.053.038l2.761 2.758c.891-.906 1.8-1.794 2.7-2.7c.053-.052.11-.113.192-.1h1.823a1.4 1.4 0 0 1 .353.019c-.7.67-1.377 1.369-2.069 2.05L5.545 18.8c-.331.324-.648.663-.989.975c-.754.022-1.511.007-2.266.007c1.223-1.209 2.431-2.433 3.658-3.637c-1.321-1.304-2.63-2.62-3.948-3.927Zm10.7 0h1.839v7.566c-.611 0-1.222.012-1.832-.008v-4.994c-1.6 1.607-3.209 3.2-4.811 4.8c-.089.08-.166.217-.305.194c-.824-.006-1.649 0-2.474 0Q8.916 16 12.7 12.218Zm2.258.002c.47-.009.939 0 1.409 0c.836.853 1.69 1.689 2.536 2.532q1.268-1.267 2.539-2.532h1.4q-.008 3.784 0 7.567c-.471 0-.943.006-1.414 0q.008-2.387 0-4.773c-.844.843-1.676 1.7-2.526 2.536c-.856-.835-1.687-1.695-2.532-2.541c0 1.594-.006 3.188.006 4.781c-.472 0-.943.005-1.415 0q-.003-3.79-.003-7.57Zm8.301-.003c.472 0 .944-.007 1.416 0q-.007 3.083 0 6.166h3.782c.063.006.144-.012.191.045c.448.454.907.9 1.353 1.354q-3.371.007-6.741 0q.007-3.782-.001-7.565Z"/>`}})),Sm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<path fill="#2188b6" d="M28.208 24.409a10.493 10.493 0 0 0-3.959 1.822a23.743 23.743 0 0 1-5.835 2.642a1.632 1.632 0 0 1-.983.55a62.228 62.228 0 0 1-6.447.577c-1.163.009-1.876-.3-2.074-.776a1.573 1.573 0 0 1 .866-2.074a3.759 3.759 0 0 1-.514-.379c-.171-.171-.352-.514-.406-.388c-.225.55-.343 1.894-.947 2.5c-.83.839-2.4.559-3.328.072c-1.019-.541.072-1.813.072-1.813a.73.73 0 0 1-.992-.343a4.847 4.847 0 0 1-.667-2.949a5.374 5.374 0 0 1 1.749-2.895a9.334 9.334 0 0 1 .658-4.4a10.445 10.445 0 0 1 3.165-3.661S6.628 10.747 7.35 8.817c.469-1.262.658-1.253.812-1.308a3.633 3.633 0 0 0 1.452-.857a5.265 5.265 0 0 1 4.41-1.7S15.2 1.4 16.277 2.09a18.349 18.349 0 0 1 1.533 2.886s1.281-.748 1.425-.469a11.334 11.334 0 0 1 .523 6.132a14.01 14.01 0 0 1-2.6 5.411c-.135.225 1.551.938 2.615 3.887c.983 2.7.108 4.96.262 5.212c.027.045.036.063.036.063s1.127.09 3.391-1.308a8.5 8.5 0 0 1 4.277-1.604a1.081 1.081 0 0 1 .469 2.11Z"/>`}})),Cm=n((e=>{e.__esModule=!0,e.default={width:32,height:32,body:`<defs><linearGradient id="vscodeIconsFileTypeZip0" x1="17.65" x2="21.099" y1="26.056" y2="26.056" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4d4d4d"/><stop offset=".5" stop-color="#fff"/><stop offset="1" stop-color="#4d4d4d"/></linearGradient><linearGradient id="vscodeIconsFileTypeZip1" x1="17.65" x2="21.099" y1="23.756" y2="23.756" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip2" x1="17.65" x2="21.099" y1="21.456" y2="21.456" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip3" x1="17.65" x2="21.099" y1="19.156" y2="19.156" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip4" x1="17.65" x2="21.099" y1="16.857" y2="16.857" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip5" x1="17.65" x2="21.099" y1="14.557" y2="14.557" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip6" x1="17.65" x2="21.099" y1="12.257" y2="12.257" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip7" x1="17.65" x2="21.099" y1="9.957" y2="9.957" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip8" x1="17.65" x2="21.099" y1="7.657" y2="7.657" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZip9" x1="16.237" x2="19.686" y1="27.217" y2="27.217" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipa" x1="16.237" x2="19.686" y1="24.918" y2="24.918" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipb" x1="16.237" x2="19.686" y1="22.618" y2="22.618" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipc" x1="16.237" x2="19.686" y1="20.318" y2="20.318" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipd" x1="16.237" x2="19.686" y1="18.018" y2="18.018" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipe" x1="17.65" x2="21.099" y1="28.356" y2="28.356" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipf" x1="16.237" x2="19.686" y1="15.718" y2="15.718" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipg" x1="16.237" x2="19.686" y1="13.419" y2="13.419" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZiph" x1="16.237" x2="19.686" y1="11.119" y2="11.119" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipi" x1="16.237" x2="19.686" y1="8.819" y2="8.819" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipj" x1="16.237" x2="19.686" y1="29.514" y2="29.514" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipk" x1="16.985" x2="20.446" y1="11.196" y2="11.196" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipl" x1="18.096" x2="19.336" y1="5.329" y2="5.329" href="#vscodeIconsFileTypeZip0"/><linearGradient id="vscodeIconsFileTypeZipm" x1="16.029" x2="21.403" y1="5.591" y2="5.591" href="#vscodeIconsFileTypeZip0"/></defs><path fill="#c09553" d="M27.667 27.667V17.333L23 15V2H4.333v28h23.334Zm-4.667 0v-9.111l2.333 1.222v7.889Z"/><path fill="url(#vscodeIconsFileTypeZip0)" d="M17.65 25.559h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip1)" d="M17.65 23.26h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip2)" d="M17.65 20.96h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip3)" d="M17.65 18.66h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip4)" d="M17.65 16.36h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip5)" d="M17.65 14.06h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip6)" d="M17.65 11.76h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip7)" d="M17.65 9.461h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip8)" d="M17.65 7.161h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZip9)" d="M16.237 26.721h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipa)" d="M16.237 24.421h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipb)" d="M16.237 22.121h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipc)" d="M16.237 19.821h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipd)" d="M16.237 17.522h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipe)" d="M17.65 27.859h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipf)" d="M16.237 15.222h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipg)" d="M16.237 12.922h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZiph)" d="M16.237 10.622h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipi)" d="M16.237 8.322h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipj)" d="M16.237 29.018h3.45v.993h-3.45z"/><path fill="url(#vscodeIconsFileTypeZipk)" d="M20.1 5.911a.554.554 0 0 0-.548-.53h-.009v.557h.092l.206 2.514h-2.252l.211-2.514h.094v-.557h-.044a.552.552 0 0 0-.547.53l-.314 10.569a.513.513 0 0 0 .515.531h2.432a.512.512 0 0 0 .513-.531Zm-1.384 10.5a1.171 1.171 0 1 1 1.171-1.171a1.171 1.171 0 0 1-1.171 1.168Z"/><path fill="url(#vscodeIconsFileTypeZipl)" d="M18.096 3.802h1.24v3.054h-1.24z"/><path fill="url(#vscodeIconsFileTypeZipm)" d="M21.4 4.56a2.549 2.549 0 0 0-2.549-2.549h-.276a2.55 2.55 0 0 0-2.436 3.3v.006a7.986 7.986 0 0 1 .261 2.561a1.811 1.811 0 0 0 .641 1.271l.109-3.441a.593.593 0 0 1 .6-.551h.135v-1.57h1.653v1.57h.1a.6.6 0 0 1 .605.551l.121 3.462a1.813 1.813 0 0 0 .666-1.292V7.72a7.693 7.693 0 0 1 .236-2.359a2.543 2.543 0 0 0 .134-.801Z"/>`}})),wm=e(Sp(),1),Tm=e(Cp(),1),Em=e(wp(),1),Dm=e(Tp(),1),Om=e(Ep(),1),km=e(Dp(),1),Am=e(Op(),1),jm=e(kp(),1),Mm=e(Ap(),1),Nm=e(jp(),1),Pm=e(Mp(),1),Fm=e(Np(),1),Im=e(Pp(),1),Lm=e(Fp(),1),Rm=e(Ip(),1),zm=e(Lp(),1),Bm=e(Rp(),1),Vm=e(zp(),1),Hm=e(Bp(),1),Um=e(Vp(),1),Wm=e(Hp(),1),Gm=e(Up(),1),Km=e(Wp(),1),qm=e(Gp(),1),Jm=e(Kp(),1),Ym=e(qp(),1),Xm=e(Jp(),1),Zm=e(Yp(),1),Qm=e(Xp(),1),$m=e(Zp(),1),eh=e(Qp(),1),th=e($p(),1),nh=e(em(),1),rh=e(tm(),1),ih=e(nm(),1),ah=e(rm(),1),oh=e(im(),1),sh=e(am(),1),ch=e(om(),1),lh=e(sm(),1),uh=e(cm(),1),dh=e(lm(),1),fh=e(um(),1),ph=e(dm(),1),mh=e(fm(),1),hh=e(pm(),1),gh=e(mm(),1),_h=e(hm(),1),vh=e(gm(),1),yh=e(_m(),1),bh=e(vm(),1),xh=e(ym(),1),Sh=e(bm(),1),Ch=e(xm(),1),wh=e(Sm(),1),Th=e(Cm(),1),Eh=[{icon:jm.default,name:`docker`,pattern:/^(dockerfile|\.dockerignore)$/},{icon:Mm.default,name:`dotenv`,pattern:/^\.env(?:\.|$)/},{icon:Im.default,name:`git`,pattern:/^\.git(?:attributes|ignore|modules)$/},{icon:qm.default,name:`makefile`,pattern:/^makefile$/},{icon:Gm.default,name:`license`,pattern:/^licen[cs]e(?:\.|$)/},{icon:Jm.default,name:`markdown`,pattern:/^readme(?:\.|$)/},{icon:Ym.default,name:`npm`,pattern:/^package(?:-lock)?\.json$/},{icon:Qm.default,name:`pnpm`,pattern:/^(pnpm-lock\.yaml|pnpm-workspace\.yaml)$/},{icon:wh.default,name:`yarn`,pattern:/^yarn\.lock$/},{icon:Em.default,name:`bun`,pattern:/^bun\.lockb?$/},{icon:hh.default,name:`tsconfig`,pattern:/^tsconfig(?:\..+)?\.json$/},{icon:vh.default,name:`vite`,pattern:/^vite\.config\./},{icon:yh.default,name:`vitest`,pattern:/^vitest(?:\..+)?\.config\./},{icon:fh.default,name:`tailwind`,pattern:/^tailwind\.config\./},{icon:Nm.default,name:`eslint`,pattern:/^(eslint\.config\.|\.eslintrc)/},{icon:eh.default,name:`prettier`,pattern:/^(prettier\.config\.|\.prettierrc)/}],Dh=[{icon:rh.default,name:`react-typescript`,extensions:[`tsx`]},{icon:nh.default,name:`react-javascript`,extensions:[`jsx`]},{icon:gh.default,name:`typescript`,extensions:[`ts`,`mts`,`cts`]},{icon:Hm.default,name:`javascript`,extensions:[`js`,`mjs`,`cjs`]},{icon:Um.default,name:`json`,extensions:[`json`,`json5`,`jsonc`]},{icon:Jm.default,name:`markdown`,extensions:[`md`,`mdx`]},{icon:zm.default,name:`html`,extensions:[`html`,`htm`]},{icon:Am.default,name:`css`,extensions:[`css`,`pcss`,`less`]},{icon:oh.default,name:`sass`,extensions:[`sass`,`scss`]},{icon:bh.default,name:`vue`,extensions:[`vue`]},{icon:lh.default,name:`svelte`,extensions:[`svelte`]},{icon:th.default,name:`python`,extensions:[`py`,`pyw`]},{icon:Lm.default,name:`go`,extensions:[`go`]},{icon:ah.default,name:`rust`,extensions:[`rs`]},{icon:Vm.default,name:`java`,extensions:[`java`]},{icon:Wm.default,name:`kotlin`,extensions:[`kt`,`kts`]},{icon:dh.default,name:`swift`,extensions:[`swift`]},{icon:Om.default,name:`cpp`,extensions:[`c`,`cc`,`cpp`,`h`,`hpp`]},{icon:km.default,name:`csharp`,extensions:[`cs`]},{icon:Zm.default,name:`php`,extensions:[`php`]},{icon:ih.default,name:`ruby`,extensions:[`rb`]},{icon:Km.default,name:`lua`,extensions:[`lua`]},{icon:sh.default,name:`shell`,extensions:[`sh`,`bash`,`zsh`,`fish`,`ps1`]},{icon:Rm.default,name:`graphql`,extensions:[`graphql`,`gql`]},{icon:Ch.default,name:`yaml`,extensions:[`yaml`,`yml`]},{icon:mh.default,name:`toml`,extensions:[`toml`]},{icon:Sh.default,name:`xml`,extensions:[`xml`]},{icon:ch.default,name:`sql`,extensions:[`sql`,`sqlite`,`db`]},{icon:uh.default,name:`svg`,extensions:[`svg`]},{icon:Bm.default,name:`image`,extensions:[`avif`,`bmp`,`gif`,`heic`,`ico`,`jpeg`,`jpg`,`png`,`tif`,`tiff`,`webp`]},{icon:Tm.default,name:`audio`,extensions:[`aac`,`flac`,`m4a`,`mp3`,`ogg`,`opus`,`wav`,`weba`]},{icon:_h.default,name:`video`,extensions:[`avi`,`m4v`,`mkv`,`mov`,`mp4`,`webm`,`wmv`]},{icon:Xm.default,name:`pdf`,extensions:[`pdf`]},{icon:xh.default,name:`word`,extensions:[`doc`,`docx`,`odt`,`rtf`]},{icon:Pm.default,name:`excel`,extensions:[`csv`,`numbers`,`ods`,`tsv`,`xls`,`xlsx`]},{icon:$m.default,name:`powerpoint`,extensions:[`odp`,`ppt`,`pptx`]},{icon:Th.default,name:`archive`,extensions:[`7z`,`bz2`,`gz`,`rar`,`tar`,`tgz`,`zip`]},{icon:Fm.default,name:`font`,extensions:[`eot`,`otf`,`ttf`,`woff`,`woff2`]},{icon:Dm.default,name:`config`,extensions:[`cfg`,`conf`,`ini`,`properties`]},{icon:ph.default,name:`text`,extensions:[`log`,`txt`]}],Oh={icon:wm.default,name:`default`};function kh(e){return e.trim().split(/[\\/]/).filter(Boolean).pop()??e.trim()}function Ah(e){return/\.([a-z0-9]{1,16})$/i.exec(e)?.[1]?.toLowerCase()??``}function jh(e){let t=kh(e).toLowerCase(),n=Eh.find(({pattern:e})=>e.test(t));if(n)return n;let r=Ah(t);return Dh.find(({extensions:e})=>e.includes(r))??Oh}function Mh(e){let t=e;return`body`in t?t:t.default}function Nh({className:e,fileName:t,size:n=`default`}){let r=jh(t);return(0,L.jsx)(xp,{"aria-hidden":`true`,"data-file-type-icon":r.name,icon:Mh(r.icon),className:m(`shrink-0`,n===`compact`?`h-3.5 w-3.5`:`h-4 w-4`,e)})}function Ph({agentId:e,fileName:t,kind:n}){return n===`overview`?(0,L.jsx)(Go,{className:`h-3.5 w-3.5 shrink-0 text-gray-400`}):n===`child-sessions`?(0,L.jsx)(Lo,{className:`h-3.5 w-3.5 shrink-0 text-gray-400`}):n===`project-files`?(0,L.jsx)(Po,{className:`h-3.5 w-3.5 shrink-0 text-gray-400`}):n===`cron`?(0,L.jsx)(Za,{className:`h-3.5 w-3.5 shrink-0 text-gray-400`}):n===`file`?(0,L.jsx)(Nh,{fileName:t??``,size:`compact`}):n===`side-chat-draft`?(0,L.jsx)(Zo,{className:`h-3.5 w-3.5 shrink-0 text-primary`}):e?(0,L.jsx)(gd,{agentId:e,className:`h-3.5 w-3.5 shrink-0`}):(0,L.jsx)(Qo,{className:`h-3.5 w-3.5 shrink-0 text-gray-400`})}function Fh(e){return e.map(e=>({key:e.key,label:e.title,labelClassName:e.isRenderedPreview?`italic font-normal`:void 0,active:e.active,tooltip:e.tooltip,leadingIcon:(0,L.jsx)(Ph,{kind:e.kind,agentId:e.agentId,fileName:e.fileName}),badge:e.kind===`file`&&e.viewMode===`diff`?(0,L.jsx)(`span`,{className:`shrink-0 rounded border border-amber-200 bg-amber-50 px-1 py-0 text-[9px] font-medium uppercase tracking-[0.08em] text-amber-700`,children:f(`chatWorkspaceDiff`)}):null,unreadIndicator:e.showUnreadDot?(0,L.jsx)(`span`,{"aria-label":f(`chatSessionUnread`),className:`h-2 w-2 shrink-0 rounded-full bg-primary`}):null,closeLabel:`${e.kind===`file`?f(`chatWorkspaceCloseFile`):f(`chatWorkspaceCloseTab`)}: ${e.title}`,closePlacement:`leading-hover`,onSelect:e.onSelect,onClose:e.onClose,menuLabel:f(`chatWorkspaceFileMoreActions`),menuActions:e.kind===`file`?[...e.alternateViewerAction?[{key:`viewer:${e.alternateViewerAction.viewer}`,icon:e.alternateViewerAction.viewer===`rendered`?(0,L.jsx)(dn,{className:`h-3.5 w-3.5`}):(0,L.jsx)(ho,{className:`h-3.5 w-3.5`}),label:e.alternateViewerAction.label,onClick:e.alternateViewerAction.onSelect}]:[],...e.onClose?[{key:`close`,icon:(0,L.jsx)(An,{className:`h-3.5 w-3.5`}),label:f(`chatWorkspaceCloseFile`),onClick:e.onClose}]:[]]:void 0}))}function Ih({canGoBack:e,canGoForward:t,isMaximized:n=!1,onClose:r,onGoBack:i,onGoForward:a,onRefreshFile:o,onToggleMaximize:s,tabs:c}){return(0,L.jsx)(Ot,{testId:`workspace-tabs-bar`,scrollTestId:`workspace-tabs-scroll`,tabs:Fh(c),actions:[{key:`back`,icon:(0,L.jsx)(pt,{className:`h-4 w-4`}),label:f(`chatWorkspaceBack`),disabled:!e,onClick:i},{key:`forward`,icon:(0,L.jsx)(jt,{className:`h-4 w-4`}),label:f(`chatWorkspaceForward`),disabled:!t,onClick:a},...o?[{key:`refresh-file`,icon:(0,L.jsx)(En,{className:`h-4 w-4`}),label:f(`chatWorkspaceRefreshFile`),onClick:o}]:[],...s?[{key:`maximize`,icon:n?(0,L.jsx)($o,{className:`h-4 w-4`}):(0,L.jsx)(Yo,{className:`h-4 w-4`}),label:f(n?`chatWorkspaceRestorePanel`:`chatWorkspaceMaximizePanel`),onClick:s}]:[],{key:`close`,icon:(0,L.jsx)(An,{className:`h-4 w-4`}),label:f(`chatWorkspaceClosePanel`),onClick:r}],scrollClassName:`workspace-horizontal-scrollbar`,actionsClassName:`ml-1 mr-1 self-stretch`})}var Lh={key:`slash`,marker:`/`};function Rh(){return`composer-${Math.random().toString(36).slice(2,10)}`}function zh(e=``){return{id:Rh(),type:`text`,text:e}}function Bh(e){return{id:Rh(),type:`token`,tokenKind:e.tokenKind,tokenKey:e.tokenKey,label:e.label}}function Vh(e){return e.type===`text`?e.text.length:1}function Hh(){return[zh(``)]}function Uh(e){return[zh(e)]}function Wh(e){let t=[];for(let n of e){if(n.type===`text`){if(n.text.length===0)continue;let e=t[t.length-1];if(e?.type===`text`){t[t.length-1]={...e,text:e.text+n.text};continue}}t.push(n)}return t.length===0?Hh():t}function Gh(e){return e.map(e=>e.type===`text`?e.text:``).join(``)}function Kh(e){return e.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function qh(e,t){let n=[],r=new Set;for(let i of e)i.type!==`token`||i.tokenKind!==t||r.has(i.tokenKey)||(r.add(i.tokenKey),n.push(i.tokenKey));return n}function Jh(e,t,n,r){let i=Math.max(0,n-t),a=Math.max(0,t+e.text.length-r),o=[];return i>0&&o.push({...e,text:e.text.slice(0,i)}),a>0&&o.push({...e,text:e.text.slice(e.text.length-a)}),o}function Yh(e,t,n,r){return t<=n||e>=r}function Xh(e,t,n,r,i){return!n&&r>=i?(e.push(...t),!0):n}function Zh(e,t,n,r,i,a,o){let s=Jh(t,n,r,i);s[0]&&e.push(s[0]);let c=o;return c||=(e.push(...a),!0),s[1]&&e.push(s[1]),c}function Qh(e,t,n,r,i,a){return!r&&i<=a?(e.push(...n),!0):(e.push(t),r)}function $h(e,t,n,r){let i=Math.max(0,t),a=Math.max(i,n),o=[],s=0,c=!1;for(let t of e){let e=Vh(t),n=s,l=s+e;if(Yh(n,l,i,a)){c=Xh(o,r,c,n,a),o.push(t),s=l;continue}c=t.type===`text`?Zh(o,t,n,i,a,r,c):Qh(o,t,r,c,i,n),s=l}return c||o.push(...r),Wh(o)}function eg(e,t){return Wh(e.filter(e=>e.type!==`token`||!t(e)))}function tg(e,t){return t===0||/\s/.test(e[t-1]??``)}function ng(e,t,n){if(!t||t.start!==t.end)return null;let r=Gh(e),i=t.end,a=r.slice(0,i),o=a.lastIndexOf(n.marker);if(o<0||!tg(a,o))return null;let s=a.slice(o+n.marker.length);return/[\s\uFFFC]/.test(s)?null:{key:n.key,marker:n.marker,query:s.trim().toLowerCase(),start:o,end:i}}function rg(e,t,n=[Lh]){let r=null;for(let i of n){let n=ng(e,t,i);n&&(!r||n.start>r.start)&&(r=n)}return r}function ig(e,t){let n=ng(e,t,Lh);return n?{query:n.query,start:n.start,end:n.end}:null}var ag=e=>`[data-item-index="${e}"]`;function og(e){let{activeIndex:t,containerRef:n,getItemSelector:r,isEnabled:i,itemCount:a}=e,o=r??ag;(0,I.useEffect)(()=>{if(!i||a===0)return;let e=n.current;if(!e)return;let r=e.querySelector(o(t));typeof r?.scrollIntoView==`function`&&r.scrollIntoView({block:`nearest`,inline:`nearest`})},[t,n,o,i,a])}function sg(){let e=(0,I.useRef)(null),[t,n]=(0,I.useState)(null);return(0,I.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let r=()=>{n(t.getBoundingClientRect().width)};r();let i=new ResizeObserver(()=>r());return i.observe(t),()=>i.disconnect()},[]),{elementRef:e,width:t}}function z(...e){return i(a(e))}var cg=I.forwardRef(({className:e,type:t,...n},r)=>(0,L.jsx)(`input`,{type:t,className:z(`flex h-9 w-full rounded-xl border border-border bg-card px-3.5 py-2 text-sm text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/55 placeholder:font-normal focus:outline-none focus:ring-1 focus:ring-primary/40 focus:border-primary/40 transition-colors disabled:cursor-not-allowed disabled:opacity-50`,e),ref:r,...n}));cg.displayName=`ChatInput`;var lg=`2rem`;function ug(e){return`min(${e}, max(0px, calc(var(--radix-popover-content-available-height, 100vh) - ${lg})))`}var dg=ug(`24rem`),fg=et,pg=at,mg=tt,hg=I.forwardRef(({className:e,sideOffset:t=8,align:n=`start`,collisionPadding:r=12,style:i,...a},o)=>(0,L.jsx)(Qe,{children:(0,L.jsx)(rt,{ref:o,sideOffset:t,align:n,collisionPadding:r,className:z(`z-[var(--z-popover,50)] w-72 overflow-x-hidden overflow-y-auto rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=top]:slide-in-from-bottom-2 data-[side=right]:slide-in-from-left-2`,e),style:{maxHeight:dg,...i},...a})}));hg.displayName=rt.displayName;var gg=Ht,_g=Rt,vg=Lt,yg=`2rem`;function bg(e){return`min(${e}, max(0px, calc(var(--radix-select-content-available-height, 100vh) - ${yg})))`}var xg=bg(`24rem`),Sg=I.forwardRef(({className:e,children:t,...n},r)=>(0,L.jsxs)(nn,{ref:r,className:z(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-border bg-card px-3 py-2 text-sm text-foreground shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,e),...n,children:[t,(0,L.jsx)(Wt,{asChild:!0,children:(0,L.jsx)(Nt,{className:`h-4 w-4 opacity-50`})})]}));Sg.displayName=nn.displayName;var Cg=I.forwardRef(({className:e,...t},n)=>(0,L.jsx)(Ft,{ref:n,className:z(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(Pt,{className:`h-4 w-4`})}));Cg.displayName=Ft.displayName;var wg=I.forwardRef(({className:e,...t},n)=>(0,L.jsx)(Vt,{ref:n,className:z(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(Nt,{className:`h-4 w-4`})}));wg.displayName=Vt.displayName;var Tg=I.forwardRef(({className:e,children:t,collisionPadding:n=12,position:r=`popper`,style:i,viewportClassName:a,...o},s)=>(0,L.jsx)(Gt,{children:(0,L.jsxs)(Xt,{ref:s,className:z(`relative z-50 flex max-h-96 min-w-[8rem] flex-col overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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`,r===`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),collisionPadding:n,position:r,style:{maxHeight:xg,...i},...o,children:[(0,L.jsx)(Cg,{}),(0,L.jsx)(tn,{className:z(`min-h-0 flex-1 overflow-y-auto overscroll-contain p-1`,r===`popper`&&`w-full min-w-[var(--radix-select-trigger-width)]`,a),children:t}),(0,L.jsx)(wg,{})]})}));Tg.displayName=Xt.displayName;var Eg=I.forwardRef(({className:e,...t},n)=>(0,L.jsx)(Jt,{ref:n,className:z(`px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,e),...t}));Eg.displayName=Jt.displayName;var Dg=I.forwardRef(({className:e,children:t,...n},r)=>(0,L.jsxs)(Qt,{ref:r,className:z(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-accent hover:text-accent-foreground`,e),...n,children:[(0,L.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,L.jsx)(zt,{children:(0,L.jsx)(en,{className:`h-4 w-4`})})}),(0,L.jsx)(Bt,{children:t})]}));Dg.displayName=Qt.displayName;var Og=I.forwardRef(({className:e,...t},n)=>(0,L.jsx)($t,{ref:n,className:z(`-mx-1 my-1 h-px bg-border`,e),...t}));Og.displayName=$t.displayName;var kg=vt,Ag=yt,jg=Dt,Mg=I.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,L.jsx)(At,{children:(0,L.jsx)(Ct,{ref:r,sideOffset:t,className:z(`z-[var(--z-tooltip)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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`,e),...n})}));Mg.displayName=Ct.displayName;var Ng={Popover:fg,PopoverAnchor:mg,PopoverContent:hg,PopoverTrigger:pg,Input:cg,Select:gg,SelectContent:Tg,SelectGroup:_g,SelectItem:Dg,SelectLabel:Eg,SelectSeparator:Og,SelectTrigger:Sg,SelectValue:vg,Tooltip:Ag,TooltipContent:Mg,TooltipProvider:kg,TooltipTrigger:jg};function Pg({pathPreview:e}){return(0,L.jsxs)(`div`,{className:`rounded-lg border border-gray-200 bg-gray-50/70 px-3 py-2.5`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-medium text-gray-600`,children:[(0,L.jsx)(fn,{"aria-hidden":`true`,className:`h-4 w-4 text-gray-400`}),(0,L.jsx)(`span`,{className:`truncate`,children:e.rootLabel})]}),(0,L.jsx)(`div`,{className:`mt-2`,children:e.segments.map((e,t)=>{let n=e.kind===`directory`?fn:ko;return(0,L.jsxs)(`div`,{className:`relative flex min-w-0 items-center gap-2 py-1 text-xs text-gray-700`,style:{paddingLeft:`${(t+1)*18}px`},children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`absolute bottom-1/2 top-[-0.25rem] w-px bg-gray-200`,style:{left:`${t*18+7}px`}}),(0,L.jsx)(n,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 text-gray-400`}),(0,L.jsx)(`span`,{className:`truncate font-medium`,children:e.label})]},`${t}:${e.label}`)})})]})}var Fg=680,Ig=.82,Lg=560,Rg=ug(`24rem`),zg={back:pt,command:go,file:ko,files:Ao,folder:fn,"panel-app":os,skill:us};function Bg(e,t){return!t.sectionKeys||t.sectionKeys.length===0?!0:!!(e.sectionKey&&t.sectionKeys.includes(e.sectionKey))}function Vg(e,t){return e?.length?e.some(e=>e.key===t)?t:e[0].key:null}function Hg({icon:e}){let t=zg[e];return(0,L.jsx)(`span`,{"aria-hidden":`true`,"data-input-surface-icon":e,className:`inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-gray-100 text-gray-500`,children:(0,L.jsx)(t,{className:`h-3.5 w-3.5`})})}function Ug({item:e,texts:t}){return e?(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.subtitle?(0,L.jsx)(`span`,{className:`inline-flex rounded-full bg-primary/10 px-2 py-0.5 text-[11px] font-semibold text-primary`,children:e.subtitle}):null,(0,L.jsx)(`span`,{className:`text-sm font-semibold text-gray-900`,children:e.title})]}),(0,L.jsx)(`p`,{className:`text-xs leading-5 text-gray-600`,children:e.description}),e.pathPreview?(0,L.jsx)(Pg,{pathPreview:e.pathPreview}):null,(0,L.jsx)(`div`,{className:`space-y-1`,children:e.detailLines.map(e=>(0,L.jsx)(`div`,{className:`min-w-0 break-all rounded-md bg-gray-50 px-2 py-1 text-[11px] leading-5 text-gray-600`,children:e},e))}),(0,L.jsx)(`div`,{className:`pt-1 text-[11px] text-gray-500`,children:e.hintLabel??t.itemHintLabel})]}):(0,L.jsx)(`div`,{className:`text-xs text-gray-500`,children:t.hintLabel})}function Wg(e){let{activeIndex:t,event:n,isOpen:r,items:i,onOpenChange:a,onSelectItem:o,setActiveIndex:s}=e;return r?n.key===`Escape`?(n.preventDefault(),a(!1),!0):i.length===0?!1:n.key===`ArrowDown`?(n.preventDefault(),s(e=>(e+1)%i.length),!0):n.key===`ArrowUp`?(n.preventDefault(),s(e=>(e-1+i.length)%i.length),!0):n.key===`Enter`&&!n.shiftKey||n.key===`Tab`?(n.preventDefault(),o(i[t]),!0):!1:!1}var Gg=(0,I.forwardRef)(function(e,t){let{Popover:n,PopoverAnchor:r,PopoverContent:i}=Ng,{elementRef:a,width:o}=sg(),s=(0,I.useRef)(null),[c,l]=(0,I.useState)({index:0,itemsSignature:``}),{isOpen:u,isLoading:d,filterOptions:f,items:p,notice:m,texts:h,onSelectItem:g,onOpenChange:_,onDetailsPointerDown:v}=e,[y,b]=(0,I.useState)(f?.[0]?.key??null),x=(0,I.useMemo)(()=>Vg(f,y),[y,f]),S=(0,I.useMemo)(()=>f?.find(e=>e.key===x)??null,[f,x]),C=(0,I.useMemo)(()=>f?.map(e=>({...e,count:p.filter(t=>Bg(t,e)).length}))??[],[f,p]),w=(0,I.useMemo)(()=>S?p.filter(e=>Bg(e,S)):p,[S,p]),T=(0,I.useMemo)(()=>w.map(e=>e.key).join(``),[w]),E=(0,I.useMemo)(()=>w.some(e=>!!e.sectionLabel?.trim()),[w]),D=c.itemsSignature===T?c.index:0,O=w.length===0?0:Math.min(D,w.length-1),k=w[O]??null,A=(0,I.useCallback)(e=>{b(e),l({index:0,itemsSignature:``})},[]),ee=(0,I.useCallback)(e=>{l(t=>{let n=t.itemsSignature===T?t.index:0;return{index:typeof e==`function`?e(n):e,itemsSignature:T}})},[T]),j=(0,I.useCallback)(e=>{e.selectionBehavior===`navigate`&&l({index:0,itemsSignature:``}),g(e)},[g]),M=(0,I.useMemo)(()=>{if(o)return Math.min(o>Lg?o*Ig:o,Fg)},[o]);return(0,I.useImperativeHandle)(t,()=>({handleKeyDown:e=>Wg({activeIndex:O,event:e,isOpen:u,items:w,onOpenChange:_,onSelectItem:j,setActiveIndex:ee})}),[O,u,_,j,ee,w]),og({containerRef:s,activeIndex:O,itemCount:w.length,isEnabled:u&&!d,getItemSelector:e=>`[data-input-surface-index="${e}"]`}),(0,L.jsxs)(n,{open:u,onOpenChange:_,children:[(0,L.jsx)(r,{asChild:!0,children:(0,L.jsx)(`div`,{ref:a,className:`pointer-events-none absolute bottom-0 left-3 right-3 top-0`})}),(0,L.jsx)(i,{side:`top`,align:`start`,sideOffset:10,className:`z-[70] flex max-w-[calc(100vw-1.5rem)] flex-col overflow-hidden rounded-2xl border border-gray-200 bg-white/95 p-0 shadow-2xl backdrop-blur-md`,onOpenAutoFocus:e=>e.preventDefault(),style:{height:Rg,maxHeight:Rg,width:M?`${M}px`:void 0},children:(0,L.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[minmax(220px,300px)_minmax(0,1fr)]`,children:[(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-col border-r border-gray-200`,children:[!d&&C.length>0?(0,L.jsx)(`div`,{className:`flex shrink-0 gap-0.5 overflow-x-auto px-2 pb-1.5 pt-2`,children:C.map(({count:e,key:t,label:n})=>{let r=t===x;return(0,L.jsxs)(`button`,{type:`button`,"aria-pressed":r,onPointerDown:e=>e.preventDefault(),onClick:()=>A(t),className:`inline-flex h-7 shrink-0 items-center gap-1 rounded-md px-2 text-[11px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 ${r?`bg-gray-100 text-gray-900`:`text-gray-600 hover:bg-gray-100 hover:text-gray-900`}`,children:[(0,L.jsx)(`span`,{children:n}),(0,L.jsx)(`span`,{className:r?`text-gray-500`:`text-gray-400`,children:e})]},t)})}):null,!d&&m?(0,L.jsxs)(`div`,{className:`mx-2 mb-1.5 flex items-start gap-2 rounded-lg border border-red-200 bg-red-50 px-2.5 py-2 text-xs leading-4 text-red-700`,children:[(0,L.jsx)(sn,{"aria-hidden":`true`,className:`mt-0.5 h-3.5 w-3.5 shrink-0`}),(0,L.jsx)(`span`,{children:m.message})]}):null,(0,L.jsx)(`div`,{ref:s,role:`listbox`,"aria-label":h.sectionLabel,className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto overscroll-contain ${!d&&C.length>0?`px-2 pb-2`:`p-2`}`,children:d?(0,L.jsx)(`div`,{className:`p-2 text-xs text-gray-500`,children:h.loadingLabel}):(0,L.jsxs)(L.Fragment,{children:[E?null:(0,L.jsx)(`div`,{className:`mb-1 px-1.5 text-[11px] font-semibold uppercase tracking-wide text-gray-500`,children:h.sectionLabel}),w.length===0?(0,L.jsx)(`div`,{className:`px-1.5 text-xs text-gray-400`,children:h.emptyLabel}):(0,L.jsx)(`div`,{children:w.map((e,t)=>{let{icon:n,key:r,sectionKey:i,sectionLabel:a,title:o,subtitle:s}=e,c=t===O,l=w[t-1];return(0,L.jsxs)(`div`,{children:[E&&a?.trim()&&l?.sectionKey!==i?(0,L.jsx)(`div`,{className:`px-1.5 pb-1 pt-1.5 text-[11px] font-semibold uppercase tracking-wide text-gray-500`,children:a}):null,(0,L.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":c,"data-input-surface-index":t,onPointerMove:e=>{e.pointerType!==`touch`&&ee(t)},onPointerDown:t=>{t.button>0||(t.preventDefault(),j(e))},onClick:t=>{t.detail===0&&j(e)},className:`flex w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-left leading-4 transition-colors ${c?`bg-gray-100 text-gray-900`:`text-gray-700 hover:bg-gray-100`}`,children:[n?(0,L.jsx)(Hg,{icon:n}):null,(0,L.jsx)(`span`,{className:`truncate text-xs font-medium`,children:o}),(0,L.jsx)(`span`,{className:`truncate text-xs text-gray-500`,children:s})]})]},r)})})]})})]}),(0,L.jsx)(`div`,{className:`custom-scrollbar min-h-0 min-w-0 select-text overflow-y-auto overscroll-contain p-2.5`,onPointerDown:v,children:(0,L.jsx)(Ug,{item:k,texts:h})})]})})]})});function Kg(e){return`${e.key}:${e.marker}:${e.start}`}function qg(e,t){return t.type===`insert-text`&&e.query===``&&e.end===e.start+e.marker.length}function Jg(e,t,n){if(!t)return null;let r=Kg(t);return e===r?e:qg(t,n)?r:null}function Yg(e){let{children:t,inputSurface:n,onInputSurfaceTriggerChange:r,onSelectItem:i,triggerSpecs:a=[Lh]}=e,o=(0,I.useRef)(null),s=(0,I.useRef)(!1),c=(0,I.useRef)(null),[l,u]=(0,I.useState)(null),d=!!n&&l!==null,f=(0,I.useCallback)((e,t)=>{c.current=e,u(e),r?.(e?t:null)},[r]),p=(0,I.useCallback)((e,t,n)=>{let r=rg(e,t,a),i=Jg(c.current,r,n);f(i,i?r:null)},[f,a]),m=(0,I.useCallback)(e=>o.current?.handleKeyDown(e)??!1,[]),h=(0,I.useCallback)(e=>{!e&&!s.current&&f(null,null)},[f]);return(0,L.jsxs)(L.Fragment,{children:[t((0,I.useMemo)(()=>({onInputSurfaceKeyDown:m,onInputSurfaceOpenChange:h,onInputSurfaceSnapshotChange:p}),[m,h,p])),n&&d?(0,L.jsx)(Gg,{ref:o,isOpen:d,isLoading:n.isLoading,filterOptions:n.filterOptions,items:n.items,notice:n.notice,texts:n.texts,onSelectItem:e=>{e.selectionBehavior!==`navigate`&&f(null,null),i(e)},onOpenChange:h,onDetailsPointerDown:()=>{s.current=!0,requestAnimationFrame(()=>{s.current=!1})}},l):null]})}var Xg=He(`inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-all duration-fast focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,outline:`border border-border bg-card text-muted-foreground hover:bg-accent hover:text-accent-foreground`,secondary:`bg-muted text-foreground hover:bg-accent hover:text-accent-foreground`,ghost:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`,primary:`bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm`,subtle:`bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground`,"primary-outline":`border border-primary/30 text-primary hover:bg-primary hover:text-primary-foreground`},size:{default:`h-9 px-4 py-2`,sm:`h-8 px-3 text-xs`,lg:`h-11 px-5 text-[14px]`,xl:`h-12 px-6 text-[15px]`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),Zg=I.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,L.jsx)(`button`,{className:z(Xg({variant:t,size:n,className:e})),ref:i,...r}));Zg.displayName=`ChatButton`;function Qg(){return(0,L.jsx)(`span`,{"aria-hidden":`true`,"data-testid":`chat-stop-icon`,className:`block h-3 w-3 rounded-[2px] bg-foreground shadow-[inset_0_0_0_1px_hsl(var(--border))]`})}function $g({contextWindow:e}){let{Tooltip:t,TooltipContent:n,TooltipProvider:r,TooltipTrigger:i}=Ng,a=Math.max(0,Math.min(1,e.ratio)),o=Math.round(a*360);return(0,L.jsx)(r,{delayDuration:0,children:(0,L.jsxs)(t,{children:[(0,L.jsx)(i,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,className:`relative inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground`,"aria-label":e.label,title:e.label,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-[7px] rounded-full`,style:{background:`conic-gradient(hsl(var(--muted-foreground)) ${o}deg, hsl(var(--border)) 0deg)`}}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-[10px] rounded-full bg-card`})]})}),(0,L.jsx)(n,{side:`top`,className:`max-w-[18rem]`,children:(0,L.jsxs)(`div`,{className:`space-y-1.5 text-xs`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-5 font-semibold text-foreground`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`span`,{children:e.percentLabel})]}),e.details.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-5 text-muted-foreground`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`span`,{className:`font-medium text-foreground`,children:e.value})]},e.label))]})})]})})}function e_({isSending:e,canStopGeneration:t,sendDisabled:n,stopDisabled:r,stopHint:i,sendButtonLabel:a,stopButtonLabel:o,contextWindow:s,onSend:c,onStop:l}){let{Tooltip:u,TooltipContent:d,TooltipProvider:f,TooltipTrigger:p}=Ng;return(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[s?(0,L.jsx)($g,{contextWindow:s}):null,!e||!n?(0,L.jsx)(Zg,{size:`icon`,className:`h-8 w-8 rounded-full`,"aria-label":a,onClick:()=>void c(),disabled:n,children:(0,L.jsx)(to,{className:`h-5 w-5`})}):t?(0,L.jsx)(Zg,{size:`icon`,variant:`outline`,className:`h-8 w-8 rounded-full`,"aria-label":o,onClick:()=>void l(),disabled:r,children:(0,L.jsx)(Qg,{})}):(0,L.jsx)(f,{children:(0,L.jsxs)(u,{children:[(0,L.jsx)(p,{asChild:!0,children:(0,L.jsx)(`span`,{children:(0,L.jsx)(Zg,{size:`icon`,variant:`outline`,className:`h-8 w-8 rounded-full`,"aria-label":o,disabled:!0,children:(0,L.jsx)(Qg,{})})})}),(0,L.jsx)(d,{side:`top`,children:(0,L.jsx)(`p`,{className:`text-xs`,children:i})})]})})]})}function t_(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[e.label,e.key,e.description].filter(e=>typeof e==`string`&&e.trim().length>0).join(` `).toLowerCase().includes(n)):e}var n_=ug(`20rem`);function r_(e){let{Input:t,Popover:n,PopoverContent:r,PopoverTrigger:i}=Ng,{picker:a}=e,o=(0,I.useRef)(null),s=(0,I.useId)(),[c,l]=(0,I.useState)(``),[u,d]=(0,I.useState)(null),[f,p]=(0,I.useState)(0),m=(0,I.useMemo)(()=>new Set(a.selectedKeys),[a.selectedKeys]),h=a.selectedKeys.length,g=(0,I.useMemo)(()=>a.groups?.filter(e=>e.options.length>0)??[],[a.groups]),_=g.some(e=>e.key===u)?u:null,v=(0,I.useMemo)(()=>g.length===0?null:(_?g.filter(e=>e.key===_):g).map(e=>({...e,options:t_(e.options,c)})).filter(e=>e.options.length>0),[g,c,_]),y=(0,I.useMemo)(()=>v===null?t_(a.options,c):v.flatMap(e=>e.options),[v,a.options,c]),b=y.length===0?0:Math.min(f,y.length-1);og({containerRef:o,activeIndex:b,itemCount:y.length,isEnabled:y.length>0,getItemSelector:e=>`[data-skill-index="${e}"]`});let x=e=>{if(m.has(e)){a.onSelectedKeysChange(a.selectedKeys.filter(t=>t!==e));return}a.onSelectedKeysChange([...a.selectedKeys,e])},S=e=>{if(y.length!==0){if(e.key===`ArrowDown`){e.preventDefault(),p(Math.min(b+1,y.length-1));return}if(e.key===`ArrowUp`){e.preventDefault(),p(Math.max(b-1,0));return}if(e.key===`Enter`){e.preventDefault();let t=y[b];t&&x(t.key)}}};return(0,L.jsxs)(n,{children:[(0,L.jsx)(i,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,"aria-haspopup":`listbox`,"aria-label":a.title,className:`relative inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg px-0 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground sm:w-auto sm:gap-1.5 sm:px-3`,children:[(0,L.jsx)(io,{className:`h-4 w-4`}),(0,L.jsx)(`span`,{className:`nextclaw-chat-skill-picker-label hidden sm:inline [@container_nextclaw-chat-input-bar_(max-width:440px)]:hidden`,children:a.title}),h>0?(0,L.jsx)(`span`,{className:`absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold leading-none text-white shadow-sm sm:static sm:ml-0.5 sm:bg-primary/10 sm:text-primary sm:shadow-none`,children:h}):null]})}),(0,L.jsxs)(r,{side:`top`,align:`start`,className:`flex w-[min(360px,calc(100vw-1rem))] flex-col overflow-hidden p-0`,style:{height:n_},children:[(0,L.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-border px-4 py-3`,children:[(0,L.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:a.title}),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground/70`}),(0,L.jsx)(t,{value:c,onChange:e=>{l(e.target.value),p(0)},onKeyDown:S,placeholder:a.searchPlaceholder,role:`combobox`,"aria-controls":s,"aria-expanded":`true`,"aria-autocomplete":`list`,"aria-activedescendant":y[b]?`${s}-option-${b}`:void 0,className:`h-8 rounded-lg pl-8 text-xs`})]}),g.length>0?(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1`,"aria-label":a.allGroupsLabel,children:[{key:null,label:a.allGroupsLabel,count:a.options.length},...g.map(e=>({key:e.key,label:e.label||e.key,count:e.options.length}))].map(e=>{let t=e.key===_;return(0,L.jsxs)(`button`,{type:`button`,"aria-pressed":t,onMouseDown:e=>e.preventDefault(),onClick:()=>{d(e.key),p(0)},className:`inline-flex h-6 items-center gap-1 rounded-md px-2 text-[10px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 ${t?`bg-primary/10 text-primary`:`bg-muted text-muted-foreground hover:text-foreground`}`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`span`,{className:`opacity-70`,children:e.count})]},e.key??`all-skills`)})}):null]}),(0,L.jsx)(`div`,{ref:o,id:s,role:`listbox`,"aria-multiselectable":`true`,className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:a.isLoading?(0,L.jsx)(`div`,{className:`p-4 text-xs text-muted-foreground`,children:a.loadingLabel}):y.length===0?(0,L.jsx)(`div`,{className:`p-4 text-center text-xs text-muted-foreground`,children:a.emptyLabel}):(0,L.jsx)(`div`,{className:`py-1`,children:(()=>{let e=v??[{key:`all-skills`,options:y}],t=0;return e.map(e=>(0,L.jsxs)(`div`,{children:[e.label?(0,L.jsx)(`div`,{className:`px-4 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:e.label}):null,e.options.map(e=>{let n=t;t+=1;let r=m.has(e.key),i=n===b;return(0,L.jsxs)(`div`,{id:`${s}-option-${n}`,role:`option`,"aria-selected":r,"data-skill-index":n,onMouseEnter:()=>p(n),className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${i?`bg-accent`:`hover:bg-accent`}`,children:[(0,L.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground`,children:(0,L.jsx)(us,{className:`h-4 w-4`})}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1 select-text`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`span`,{className:`truncate text-sm text-foreground`,children:e.label}),e.badgeLabel?(0,L.jsx)(`span`,{className:`shrink-0 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary`,children:e.badgeLabel}):null]}),(0,L.jsx)(`div`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:e.description||e.key})]}),(0,L.jsx)(`div`,{className:`ml-3 shrink-0`,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":`${r?`Remove`:`Add`} ${e.label}`,onClick:()=>x(e.key),className:r?`inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-white`:`inline-flex h-5 w-5 items-center justify-center rounded-full border border-border bg-card`,children:r?(0,L.jsx)(en,{className:`h-3 w-3`}):null})})]},e.key)})]},e.key))})()})}),a.manageHref&&a.manageLabel?(0,L.jsx)(`div`,{className:`shrink-0 border-t border-border px-4 py-2.5`,children:(0,L.jsxs)(`a`,{href:a.manageHref,className:`inline-flex items-center gap-1.5 text-xs font-medium text-primary transition-colors hover:text-primary/80`,children:[a.manageLabel,(0,L.jsx)(un,{className:`h-3 w-3`})]})}):null]})]})}function i_({icon:e}){return e===`sparkles`?(0,L.jsx)(Dn,{className:`h-3.5 w-3.5 shrink-0 text-primary`}):e===`brain`?(0,L.jsx)(ao,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}):null}function a_({icon:e}){return e===`paperclip`?(0,L.jsx)(ss,{className:`h-4 w-4`}):(0,L.jsx)(i_,{icon:e})}var o_={model:`min-w-0 max-w-[18rem]`,"session-type":`shrink-0`,thinking:`shrink-0`},s_={model:`w-[min(18rem,calc(100vw-1rem))] sm:w-[320px]`,"session-type":`w-[220px]`,thinking:`w-[180px]`},c_=ug(`18rem`),l_=bg(`18rem`);function u_(e){return e.key===`model`&&e.selectedLabel&&e.selectedLabel.split(`/`).slice(1).join(`/`).trim()||e.selectedLabel}function d_(e){return e.groups?.filter(e=>e.options.length>0)??(e.options.length>0?[{key:`${e.key}-default`,options:e.options}]:[])}function f_({item:e}){let t=u_(e);return e.selectedLabel?(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-left`,children:[(0,L.jsx)(i_,{icon:e.icon}),(0,L.jsx)(`span`,{className:`nextclaw-chat-toolbar-mobile-label truncate sm:hidden [@container_nextclaw-chat-input-bar_(max-width:440px)]:hidden`,children:t}),(0,L.jsx)(`span`,{className:`nextclaw-chat-toolbar-label hidden truncate sm:inline [@container_nextclaw-chat-input-bar_(max-width:440px)]:hidden`,children:e.selectedLabel})]}):e.loading?(0,L.jsx)(`div`,{className:`h-3 w-24 animate-pulse rounded bg-muted`}):(0,L.jsx)(`span`,{className:`truncate`,children:e.placeholder})}function p_({option:e}){return e.description?(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,L.jsx)(`span`,{className:`truncate text-xs font-semibold text-foreground`,children:e.label}),(0,L.jsx)(`span`,{className:`truncate text-[11px] text-muted-foreground`,children:e.description})]}):(0,L.jsx)(`span`,{className:`truncate text-xs font-semibold text-foreground`,children:e.label})}function m_({item:e}){let{Input:t,Popover:n,PopoverContent:r,PopoverTrigger:i,Tooltip:a,TooltipContent:o,TooltipProvider:s,TooltipTrigger:c}=Ng,[l,u]=(0,I.useState)(!1),[d,f]=(0,I.useState)(``),p=d_(e),m=(0,I.useMemo)(()=>{let e=d.trim().toLowerCase();return e?p.map(t=>({...t,options:t.options.filter(t=>[t.label,t.value,t.description].filter(e=>!!e).some(t=>t.toLowerCase().includes(e)))})).filter(e=>e.options.length>0):p},[p,d]),h=p.some(e=>e.options.length>0),g=m.some(e=>e.options.length>0),_=e.optionAction,v=new Set(_?.activeValues??[]);return(0,L.jsxs)(n,{open:l,onOpenChange:u,children:[(0,L.jsx)(i,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,"aria-label":e.selectedLabel?`${e.placeholder}: ${e.selectedLabel}`:e.placeholder,disabled:e.disabled,className:`nextclaw-chat-toolbar-select-trigger inline-flex h-8 w-auto items-center justify-between rounded-lg border-0 bg-transparent px-2 text-xs font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50 sm:px-3 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!basis-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!justify-center [@container_nextclaw-chat-input-bar_(max-width:440px)]:!max-w-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!min-w-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!px-0 ${o_[e.key]??``}`,children:[(0,L.jsx)(f_,{item:e}),(0,L.jsx)(Nt,{className:`ml-1 h-3.5 w-3.5 shrink-0 text-muted-foreground/70 [@container_nextclaw-chat-input-bar_(max-width:440px)]:hidden`})]})}),(0,L.jsxs)(r,{className:`flex flex-col overflow-hidden p-1.5 ${s_[e.key]??``}`,style:{maxHeight:c_},children:[(0,L.jsxs)(`div`,{className:`relative mb-1.5 shrink-0`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/70`}),(0,L.jsx)(t,{value:d,onChange:e=>f(e.currentTarget.value),placeholder:e.search?.placeholder??e.placeholder,className:`h-7 rounded-md pl-8 text-xs`})]}),h?null:e.loading?(0,L.jsxs)(`div`,{className:`space-y-2 px-2 py-1`,children:[(0,L.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`}),(0,L.jsx)(`div`,{className:`h-3 w-28 animate-pulse rounded bg-muted`}),(0,L.jsx)(`div`,{className:`h-3 w-32 animate-pulse rounded bg-muted`})]}):e.emptyLabel?(0,L.jsx)(`div`,{className:`px-2 py-1 text-xs text-muted-foreground`,children:e.emptyLabel}):null,h&&!g?(0,L.jsx)(`div`,{className:`px-2 py-1 text-xs text-muted-foreground`,children:e.search?.emptyLabel??e.emptyLabel}):null,(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:m.map((t,n)=>(0,L.jsxs)(`div`,{className:n>0?`border-t border-border pt-0.5`:void 0,children:[t.label?(0,L.jsx)(`div`,{className:`px-2 pb-0.5 pt-1 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:t.label}):null,t.options.map(t=>{let n=e.value===t.value,r=v.has(t.value),i=r?_?.activeLabel:_?.inactiveLabel;return(0,L.jsxs)(`div`,{className:`group flex items-center gap-1 rounded-md hover:bg-accent`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-left leading-4`,onClick:()=>{e.onValueChange(t.value),u(!1),f(``)},children:[(0,L.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,L.jsx)(p_,{option:t})}),n?(0,L.jsx)(en,{className:`h-4 w-4 shrink-0 text-primary`}):null]}),_&&i?(0,L.jsx)(s,{children:(0,L.jsxs)(a,{children:[(0,L.jsx)(c,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":i,"aria-pressed":r,className:`mr-1 inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground/70 transition-colors hover:bg-card hover:text-foreground focus:outline-none focus:ring-1 focus:ring-primary/40`,onClick:e=>{e.stopPropagation(),_.onToggle(t.value,!r)},children:(0,L.jsx)(xs,{className:`h-3.5 w-3.5 ${r?`fill-current text-foreground`:``}`})})}),(0,L.jsx)(o,{side:`left`,children:(0,L.jsx)(`p`,{className:`text-xs`,children:i})})]})}):null]},t.value)})]},t.key))})]})]})}function h_({item:e}){if(e.search)return(0,L.jsx)(m_,{item:e});let{Select:t,SelectContent:n,SelectGroup:r,SelectItem:i,SelectLabel:a,SelectSeparator:o,SelectTrigger:s,SelectValue:c}=Ng,l=d_(e),u=l.some(e=>e.options.length>0);return(0,L.jsxs)(t,{value:e.value,onValueChange:e.onValueChange,disabled:e.disabled,children:[(0,L.jsx)(s,{"aria-label":e.selectedLabel?`${e.placeholder}: ${e.selectedLabel}`:e.placeholder,title:e.selectedLabel,className:`nextclaw-chat-toolbar-select-trigger h-8 w-auto rounded-lg border-0 bg-transparent px-2 text-xs font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground focus:ring-0 sm:px-3 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!basis-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!justify-center [@container_nextclaw-chat-input-bar_(max-width:440px)]:!max-w-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!min-w-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!px-0 ${o_[e.key]??``}`,children:e.selectedLabel||e.loading?(0,L.jsx)(f_,{item:e}):(0,L.jsx)(c,{placeholder:e.placeholder})}),(0,L.jsxs)(n,{className:s_[e.key]??``,style:{maxHeight:l_},children:[u?null:e.loading?(0,L.jsxs)(`div`,{className:`space-y-2 px-3 py-2`,children:[(0,L.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`}),(0,L.jsx)(`div`,{className:`h-3 w-28 animate-pulse rounded bg-muted`}),(0,L.jsx)(`div`,{className:`h-3 w-32 animate-pulse rounded bg-muted`})]}):e.emptyLabel?(0,L.jsx)(`div`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:e.emptyLabel}):null,l.map((e,t)=>(0,L.jsxs)(`div`,{children:[t>0?(0,L.jsx)(o,{}):null,(0,L.jsxs)(r,{children:[e.label?(0,L.jsx)(a,{children:e.label}):null,e.options.map(e=>(0,L.jsx)(i,{value:e.value,className:`py-1.5`,children:(0,L.jsx)(p_,{option:e})},e.value))]})]},e.key))]})]})}function g_({actions:e,accessories:t,selects:n,skillPicker:r,trailingSelects:i=[]}){let{Tooltip:a,TooltipContent:o,TooltipProvider:s,TooltipTrigger:c}=Ng;return(0,L.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-2 px-3 pb-3`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-[12rem] flex-1 flex-wrap items-center gap-1 overflow-hidden`,children:[r?(0,L.jsx)(r_,{picker:r}):null,n.map(e=>(0,L.jsx)(h_,{item:e},e.key)),t?.map(e=>{let t=(0,L.jsxs)(`button`,{type:`button`,className:`inline-flex items-center rounded-lg py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:text-muted-foreground/50 ${e.iconOnly?`h-8 w-8 justify-center px-0`:`gap-1.5 px-3`}`,onClick:e.onClick,disabled:e.disabled,"aria-label":e.label,children:[(0,L.jsx)(a_,{icon:e.icon}),e.iconOnly?null:(0,L.jsx)(`span`,{children:e.label})]});return e.tooltip?(0,L.jsx)(s,{children:(0,L.jsxs)(a,{children:[(0,L.jsx)(c,{asChild:!0,children:e.disabled?(0,L.jsx)(`span`,{className:`inline-flex`,children:t}):t}),(0,L.jsx)(o,{side:`top`,children:(0,L.jsx)(`p`,{className:`text-xs`,children:e.tooltip})})]})},e.key):(0,L.jsx)(`div`,{children:t},e.key)})]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-end gap-1`,children:[i.length>0?(0,L.jsx)(`div`,{className:`nextclaw-chat-toolbar-trailing-selects flex min-w-0 items-center gap-1`,children:i.map(e=>(0,L.jsx)(h_,{item:e},e.key))}):null,(0,L.jsx)(e_,{...e})]})]})}var __=(0,I.createContext)(null);function v_(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function y_(){let e=(0,I.useContext)(__);return e??function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}function B(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function b_(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var x_=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,S_=x_&&`documentMode`in document?document.documentMode:null,C_=x_&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),w_=x_&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),T_=!(!x_||!(`InputEvent`in window)||S_)&&`getTargetRanges`in new window.InputEvent(`input`),E_=x_&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,D_=x_&&/Android/.test(navigator.userAgent),O_=x_&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!D_,k_=x_&&/^(?=.*Chrome).*/i.test(navigator.userAgent),A_=x_&&D_&&k_,j_=x_&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&C_&&!k_,M_=0,N_=1,P_=2,F_=1,I_=2,L_=3,R_=4,z_=5,B_=6,V_=O_||E_||j_?`\xA0`:``,H_=`
|
|
5
5
|
|
|
@@ -103,4 +103,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
103
103
|
`),children:[(0,L.jsx)(`div`,{className:`h-px flex-1 bg-emerald-100`}),(0,L.jsxs)(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1`,children:[(0,L.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-400`}),(0,L.jsx)(`span`,{children:f(`chatContextInheritanceInherited`)})]}),(0,L.jsx)(`div`,{className:`h-px flex-1 bg-emerald-100`})]})}function gJ(e){let{rawMessageId:t,rawMessages:n,visibleRawMessages:r}=e,i=n.findIndex(e=>e.id===t);return i<0?r.length-1:n.slice(0,i).filter(vJ).length-1}function _J(e){let t=e.metadata?.[lJ];return typeof t==`string`&&t.trim()?t.trim():null}function vJ(e){return!SG(e)&&!_J(e)}function yJ(e){let t=e.findIndex(e=>_J(e));if(t<0)return null;let n=_J(e[t]);return n?{boundaryIndex:e.slice(0,t).filter(vJ).length,sourceSessionId:n,inheritedMessageCount:e.filter(e=>_J(e)===n).length}:null}function bJ(e){let t=e.rawMessages.filter(vJ),n=e.rawMessages.map(e=>({rawMessageId:e.id,checkpoint:SG(e)})).filter(e=>!!e.checkpoint).map(n=>({key:n.rawMessageId,checkpoint:n.checkpoint,boundaryIndex:gJ({rawMessages:e.rawMessages,visibleRawMessages:t,rawMessageId:n.rawMessageId})})).sort((e,t)=>e.boundaryIndex-t.boundaryIndex),r=yJ(e.rawMessages),i=[],a=[],o=0,s=e=>{a.length!==0&&(i.push({kind:`messages`,key:e,messages:a}),a=[])};for(t.forEach((t,c)=>{r?.boundaryIndex===c&&(s(`messages-before-context-inheritance`),i.push({kind:`context-inheritance`,key:`context-inheritance`,inheritance:r}));let l=e.messages[c];for(l&&a.push(l);o<n.length&&n[o]?.boundaryIndex<=c;){let e=n[o];s(`messages-before-${e.key}`),i.push({kind:`compaction`,key:e.key,checkpoint:e.checkpoint}),o+=1}}),r?.boundaryIndex===t.length&&(s(`messages-before-context-inheritance`),i.push({kind:`context-inheritance`,key:`context-inheritance`,inheritance:r}));o<n.length;){let e=n[o];s(`messages-before-${e.key}`),i.push({kind:`compaction`,key:e.key,checkpoint:e.checkpoint}),o+=1}return s(`messages-final`),i.length===0&&i.push({kind:`messages`,key:`messages-empty`,messages:[]}),i}function xJ({messages:e,isSending:t,className:n}){let r=Ac(),{language:i}=on(),a=cJ(e=>e.layout),o=R(e=>e.snapshot.selectedSessionKey),s=Ou(o),c=s?.workingDir??s?.projectRoot??null,u=(0,I.useCallback)(e=>{let t=dJ(e);if(t)return t;if(e.target.type===`file`)return(0,L.jsx)(lK,{display:e,parentSessionKey:o,sessionProjectRoot:s?.projectRoot??null,sessionWorkingDir:c,onFileOpen:r.chatThreadManager.openFilePreview})},[c,r.chatThreadManager,s?.projectRoot,o]),d=(0,I.useCallback)(e=>Ve(e.path,c),[c]),p=(0,I.useMemo)(()=>hG(i),[i]),m=(0,I.useMemo)(()=>{let t=e.filter(vJ),n=f(`chatProcessSummaryProcessed`);return t.flatMap(e=>{let t=mG({message:e,processedLabel:n}),r=t?.label??null,a=uJ.get(e);if(a&&a.language===i&&a.processSummaryLabel===r)return[a.viewModel];let o=vl(e),s=lG({id:o.id,role:o.role,meta:{timestamp:o.meta?.timestamp,status:o.meta?.status,inlineTokens:fU(e.metadata),processSummary:t},parts:o.parts},{formatTimestamp:e=>l(e,i),texts:p});return uJ.set(e,{language:i,processSummaryLabel:r,viewModel:s}),[s]})},[i,e,p]),h=(0,I.useMemo)(()=>m.some(e=>e.role===`assistant`&&(e.status===`streaming`||e.status===`pending`)),[m]),g=(0,I.useMemo)(()=>_G(i),[i]),_=(0,I.useMemo)(()=>bJ({rawMessages:e,messages:m}),[m,e]),v=gu(e=>e.snapshot.sessionSkillsQuery),y=(0,I.useCallback)(e=>{if(e.kind===`panel_app`){r.chatUiManager.showContent({target:{type:`panel_app`,payload:{appId:e.key}}});return}if(e.kind===`workspace_file`||e.kind===`workspace_directory`){let t=iU({projectRoot:s?.projectRoot,relativePath:e.key});t&&r.chatThreadManager.openFilePreview({path:t,label:e.label,viewMode:`preview`});return}if(e.kind!==`skill`)return;let t=e.key.trim();if(!t)return;let n=(v?.data?.records??[]).find(e=>e.ref===t||e.name===t),i=n?.path?.trim();i&&r.chatThreadManager.openFilePreview({path:i,label:e.label||n?.name||t,viewMode:`preview`,previewViewer:`rendered`})},[r.chatThreadManager,r.chatUiManager,s?.projectRoot,v]),b=(0,I.useCallback)(e=>{let t=e.dataUrl?.trim();if(!t)return;let n=e.label.trim()||`attachment`;r.chatThreadManager.openFilePreview({path:n,label:n,viewMode:`preview`,contentUrl:t,mimeType:e.mimeType})},[r.chatThreadManager]);return(0,L.jsx)(`div`,{className:n,children:_.map((e,n)=>e.kind===`compaction`?(0,L.jsx)(mJ,{checkpoint:e.checkpoint},e.key):e.kind===`context-inheritance`?(0,L.jsx)(hJ,{inheritance:e.inheritance},e.key):(0,L.jsx)(zH,{layout:a,messages:e.messages,isSending:n===_.length-1?t:!1,hasAssistantDraft:h,texts:g,onToolAction:r.chatThreadManager.handleToolAction,onFileOpen:r.chatThreadManager.openFilePreview,onAttachmentOpen:b,onInlineTokenClick:y,resolveFileContentUrl:d,renderInlineDisplay:u,renderToolAgent:fJ,renderPanelAppCard:pJ},e.key))})}function SJ({children:e,className:t,width:n=`messages`}){let r=cJ(e=>e.layout);return(0,L.jsx)(`div`,{"data-chat-conversation-track":r,"data-chat-conversation-track-width":n,className:m(`mx-auto w-full px-4 sm:px-6`,r===`flat`?n===`composer`?`max-w-[min(54rem,100%)]`:`max-w-[min(52rem,100%)]`:`max-w-[min(1120px,100%)]`,t),children:e})}function CJ({bottomSlot:e,isAwaitingAssistantOutput:t,isHistoryLoading:n,isSending:r,messages:i,sessionKey:a,showWelcome:o,welcomeSlot:s}){let c=(0,I.useRef)(null),l=n&&i.length===0&&!r&&!t,{isAtBottom:u,onScroll:d,scrollToBottom:p}=EB({scrollRef:c,resetKey:a,isLoading:n,hasContent:i.length>0,contentVersion:i[i.length-1]??null}),m=i.length>0,h=m&&!o&&!u;return(0,L.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,L.jsx)(`div`,{ref:c,onScroll:d,"data-chat-scroll-container":`true`,className:`h-full overflow-y-auto custom-scrollbar`,children:o?s??null:(0,L.jsxs)(L.Fragment,{children:[l||!m?null:(0,L.jsx)(SJ,{className:`py-4 sm:py-5`,children:(0,L.jsx)(xJ,{messages:i,isSending:m&&r&&t})}),e?(0,L.jsx)(SJ,{className:`pb-4 sm:pb-5`,children:e}):null]})}),h?(0,L.jsx)(St,{icon:(0,L.jsx)($a,{className:`h-4 w-4`}),label:f(`chatScrollToBottom`),onClick:p,tooltipSide:`top`,className:`absolute bottom-4 left-1/2 z-10 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background/90 text-foreground shadow-lg backdrop-blur hover:bg-accent hover:text-accent-foreground`}):null]})}var wJ=function(e){return e.EndpointReady=`endpoint.ready`,e.EndpointError=`endpoint.error`,e.MessageRequest=`message.request`,e.MessageStreamRequest=`message.stream-request`,e.MessageSent=`message.sent`,e.MessageAccepted=`message.accepted`,e.MessageIncoming=`message.incoming`,e.MessageCompleted=`message.completed`,e.MessageFailed=`message.failed`,e.MessageAbort=`message.abort`,e.MessageTextStart=`message.text-start`,e.MessageTextDelta=`message.text-delta`,e.MessageTextEnd=`message.text-end`,e.MessageReasoningStart=`message.reasoning-start`,e.MessageReasoningDelta=`message.reasoning-delta`,e.MessageReasoningEnd=`message.reasoning-end`,e.MessageToolCallStart=`message.tool-call-start`,e.MessageToolCallArgs=`message.tool-call-args`,e.MessageToolCallArgsDelta=`message.tool-call-args-delta`,e.MessageToolCallEnd=`message.tool-call-end`,e.MessageToolCallResult=`message.tool-call-result`,e.MessageRead=`message.read`,e.MessageDelivered=`message.delivered`,e.MessageRecalled=`message.recalled`,e.MessageReaction=`message.reaction`,e.RunStarted=`run.started`,e.RunFinished=`run.finished`,e.RunError=`run.error`,e.RunMetadata=`run.metadata`,e.ContextWindowUpdated=`context-window.updated`,e.TypingStart=`typing.start`,e.TypingEnd=`typing.end`,e.PresenceUpdated=`presence.updated`,e}({});function TJ(e,t=e.occurredAt??new Date().toISOString()){return{...e,occurredAt:t}}var EJ=/\[\[\s*reply_to_current\s*\]\]/gi,DJ=/\[\[\s*reply_to\s*:\s*([^\]]+?)\s*\]\]/i;function OJ(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}function kJ(e,t){let n=e,r;EJ.test(n)&&(r=OJ(t),n=n.replace(EJ,``).trim());let i=n.match(DJ)?.[1];return i&&(r=OJ(i),n=n.replace(DJ,``).trim()),r?{content:n,replyTo:r}:{content:n}}function AJ(e,t=e.id){if(e.role!==`assistant`)return{...e,parts:[...e.parts],metadata:e.metadata?{...e.metadata}:void 0};let n=e.parts.findIndex(e=>e.type===`text`),r=e.metadata?{...e.metadata}:void 0,i=OJ(r?.reply_to);if(n<0)return{...e,parts:[...e.parts],metadata:r};let a=e.parts[n];if(!a||a.type!==`text`)return{...e,parts:[...e.parts],metadata:r};let{content:o,replyTo:s}=kJ(a.text,t),c=s??i,l=e.parts.flatMap((e,t)=>t!==n||e.type!==`text`?[e]:o.length===0?[]:[{...e,text:o}]);return c?{...e,parts:l,metadata:{...r,reply_to:c}}:{...e,parts:l,metadata:r}}function jJ(e){let t=e.split(/\r?\n/),n=`message`,r=[];for(let e of t){let t=e.trimEnd();if(!(!t||t.startsWith(`:`))){if(t.startsWith(`event:`)){n=t.slice(6).trim()||`message`;continue}t.startsWith(`data:`)&&r.push(t.slice(5).trimStart())}}return r.length===0?null:{event:n,data:r.join(`
|
|
104
104
|
`)}}async function*MJ(e){let t=e.getReader(),n=new TextDecoder,r=``;try{for(;;){let{value:e,done:i}=await t.read();if(i)break;r+=n.decode(e,{stream:!0});let{frames:a,rest:o}=NJ(r);r=o;for(let e of a)yield e}r+=n.decode();let{frames:e}=NJ(r,!0);for(let t of e)yield t}finally{t.releaseLock()}}function NJ(e,t=!1){let n=e.split(/\r?\n\r?\n/),r=n.pop()??``,i=[];for(let e of n){let t=jJ(e);t&&i.push(t)}if(t&&r.trim()){let e=jJ(r);return e&&i.push(e),{frames:i,rest:``}}return{frames:i,rest:r}}var PJ=`/ncp/agent`,FJ=class extends Error{ncpError;alreadyPublished;constructor(e,t=!1){super(e.message),this.name=`NcpHttpAgentClientError(${e.code})`,this.ncpError=e,this.alreadyPublished=t}};function IJ(e){let t=e.trim();if(!t)throw Error(`NcpHttpAgentClient requires a non-empty baseUrl.`);return new URL(t)}function LJ(e){if(e)return e;if(typeof globalThis.fetch==`function`)return globalThis.fetch.bind(globalThis);throw Error(`No fetch implementation found. Pass options.fetchImpl explicitly.`)}function RJ(e){let t=(e??`/ncp/agent`).trim();if(!t)return PJ;let n=t.startsWith(`/`)?t:`/${t}`;return n.endsWith(`/`)?n.slice(0,-1):n}async function zJ(e){try{return(await e.text()).trim()}catch{return``}}function BJ(e){if(WJ(e))return e.ncpError;if(HJ(e))return e;let t=e instanceof Error?e.message:String(e??`Unknown error`);return{code:KJ(void 0),message:t,...e instanceof Error&&e.stack?{details:{stack:e.stack}}:{}}}function VJ(e,t={}){return new FJ(e,t.alreadyPublished??!1)}function HJ(e){return UJ(e)&&typeof e.code==`string`&&typeof e.message==`string`}function UJ(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function WJ(e){return e instanceof FJ}var GJ={"config-error":`config-error`,"auth-error":`auth-error`,"runtime-error":`runtime-error`,"timeout-error":`timeout-error`,"abort-error":`abort-error`};function KJ(e){if(!e)return`runtime-error`;let t=GJ[e];if(t)return t;let n=e.toLowerCase();return n.includes(`timeout`)?`timeout-error`:n.includes(`abort`)||n.includes(`cancel`)?`abort-error`:n.includes(`auth`)?`auth-error`:n.includes(`config`)?`config-error`:`runtime-error`}function qJ(e){let t=YJ(e);return!t||typeof t.type!=`string`||!t.type.trim()?null:t}function JJ(e){let t=YJ(e);if(!t)return{code:`runtime-error`,message:e||`Unknown stream error.`};let n=typeof t.code==`string`?t.code:void 0,r=KJ(n),i=UJ(t.details)?t.details:{};return n&&n!==r&&(i.originalCode=n),{code:r,message:typeof t.message==`string`&&t.message?t.message:`Unknown stream error.`,...Object.keys(i).length>0?{details:i}:{}}}function YJ(e){try{let t=JSON.parse(e);return UJ(t)?t:null}catch{return null}}var XJ=[`text`,`file`,`source`,`step-start`,`reasoning`,`tool-invocation`,`card`,`rich-text`,`action`,`extension`],ZJ=class{manifest;baseUrl;basePath;fetchImpl;defaultHeaders;subscribers=new Set;activeControllers=new Set;started=!1;constructor(e){this.baseUrl=IJ(e.baseUrl),this.basePath=RJ(e.basePath),this.fetchImpl=LJ(e.fetchImpl),this.defaultHeaders=e.headers??{},this.manifest={endpointKind:`custom`,endpointId:e.endpointId?.trim()||`ncp-http-agent-client`,version:`0.1.0`,supportsStreaming:!0,supportsAbort:!0,supportsProactiveMessages:!1,supportsLiveSessionStream:!0,supportedPartTypes:XJ,expectedLatency:`seconds`,metadata:{transport:`http+sse`,scope:`agent`}}}async start(){this.started||(this.started=!0,this.publish(TJ({type:wJ.EndpointReady})))}async stop(){if(this.started){this.started=!1;for(let e of this.activeControllers)e.abort();this.activeControllers.clear()}}async emit(e){switch(e.type){case`message.request`:await this.send(e.payload);return;case`message.stream-request`:await this.stream(e.payload);return;case`message.abort`:await this.abort(e.payload);return;default:this.publish(e);return}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}async send(e){await this.ensureStarted();let t=new AbortController;this.activeControllers.add(t);try{let n=await this.fetchImpl(this.resolveUrl(`/send`),{method:`POST`,headers:{...this.defaultHeaders,accept:`application/json`,"content-type":`application/json`},body:JSON.stringify(e),signal:t.signal});if(!n.ok)throw Error(`NCP send command failed with HTTP ${n.status}: ${await zJ(n)}`);let r=await n.json();if(!r.ok||!r.data)throw Error(r.error?.message??`NCP send command returned an invalid handle.`);return r.data}catch(e){if(t.signal.aborted)throw Error(`NCP send command was cancelled.`);if(WJ(e))throw e;let n=BJ(e);throw this.publish(TJ({type:wJ.EndpointError,payload:n})),VJ(n)}finally{this.activeControllers.delete(t)}}async stream(e){await this.ensureStarted();let t=new URLSearchParams({sessionId:e.sessionId});await this.streamRequest({path:`/stream?${t.toString()}`,method:`GET`})}async abort(e){await this.ensureStarted();let t=new AbortController;this.activeControllers.add(t);try{let n=await this.fetchImpl(this.resolveUrl(`/abort`),{method:`POST`,headers:{...this.defaultHeaders,"content-type":`application/json`,accept:`application/json`},body:JSON.stringify(e),signal:t.signal});if(!n.ok)throw Error(`Abort request failed with HTTP ${n.status}: ${await zJ(n)}`)}catch(e){if(t.signal.aborted)return;let n=BJ(e);throw this.publish(TJ({type:wJ.EndpointError,payload:n})),VJ(n)}finally{this.activeControllers.delete(t)}}async ensureStarted(){this.started||await this.start()}publish(e){for(let t of this.subscribers)t(e)}resolveUrl(e){return new URL(`${this.basePath}${e}`,this.baseUrl)}async streamRequest(e){let t=new AbortController;this.activeControllers.add(t);try{let n=await this.fetchImpl(this.resolveUrl(e.path),{method:e.method,headers:{...this.defaultHeaders,accept:`text/event-stream`,...e.body===void 0?{}:{"content-type":`application/json`}},body:e.body===void 0?void 0:JSON.stringify(e.body),signal:t.signal});if(!n.ok)throw Error(`NCP stream request failed with HTTP ${n.status}: ${await zJ(n)}`);if(!n.body)throw Error(`NCP stream response has no body.`);for await(let e of MJ(n.body)){if(t.signal.aborted)return;this.handleSseFrame(e)}}catch(e){if(t.signal.aborted)return;if(WJ(e))throw e;let n=BJ(e);throw this.publish(TJ({type:wJ.EndpointError,payload:n})),VJ(n)}finally{this.activeControllers.delete(t)}}handleSseFrame(e){if(e.event===`ncp-event`){let t=qJ(e.data);if(!t){this.publish(TJ({type:wJ.EndpointError,payload:{code:`runtime-error`,message:`Received malformed ncp-event frame.`}}));return}this.publish(t);return}if(e.event===`error`){let t=JJ(e.data);throw this.publish(TJ({type:wJ.EndpointError,payload:t})),VJ(t,{alreadyPublished:!0})}}};function QJ(e){return{...e,parts:[...e.parts],lifecycle:e.lifecycle?{...e.lifecycle}:void 0,metadata:e.metadata?{...e.metadata}:void 0}}function $J(e){return QJ(AJ(e))}var eY=`__nextclaw_aborted_tool_call__`;function tY(e){let t=e.error?.trim();return{code:`runtime-error`,message:t&&t.length>0?t:`Agent run failed.`,details:{sessionId:e.sessionId,messageId:e.messageId,threadId:e.threadId,runId:e.runId}}}function nY(e){if(!(!e.startedAt&&!e.endedAt))return{startedAt:e.startedAt,endedAt:e.endedAt}}function rY(e,t,n){return n?{...e,status:t,lifecycle:n}:{...e,status:t}}function iY(e,t){let n=Date.parse(t.timestamp);if(!Number.isFinite(n))return e.length;let r=e.findIndex(e=>{let t=Date.parse(e.timestamp);return Number.isFinite(t)&&t>n});return r<0?e.length:r}function aY(e,t){let n=[...e];return n.splice(iY(e,t),0,t),n}function oY(e,t){return t.trim()?e.id.startsWith(`tool-`)?!0:e.parts.some(e=>e.type===`tool-invocation`):!1}function sY(e,t,n){for(let[r,i]of e)i===t&&e.set(r,n)}function cY(e,t,n){for(let[r,i]of e)i===n&&(e.delete(r),t.delete(r))}function lY(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(r.type===`tool-invocation`&&r.toolCallId===t)return r}return null}function uY(e,t){return lY(e,t)?.toolName??null}function dY(e,t){let n=[...e];for(let e=n.length-1;e>=0;--e){let r=n[e];if(r.type===`tool-invocation`&&r.toolCallId===t.toolCallId)return n[e]={...r,...t},n}return n.push(t),n}function fY(e){let t=[];return{parts:e.map(e=>e.type!==`tool-invocation`||!e.toolCallId||e.state===`result`||e.state===`cancelled`?e:(t.push(e.toolCallId),{...e,state:`cancelled`})),toolCallIds:t}}var pY=class{messageIdByCallId=new Map;argsRawByCallId=new Map;constructor(e){this.port=e}isEmpty=()=>this.messageIdByCallId.size===0&&this.argsRawByCallId.size===0;clear=()=>{this.messageIdByCallId.clear(),this.argsRawByCallId.clear()};hydrate=e=>{this.clear(),e.forEach(e=>{e.parts.forEach(t=>{if(t.type!==`tool-invocation`||!t.toolCallId||t.state===`result`||t.state===`cancelled`)return;let n=typeof t.args==`string`?t.args:JSON.stringify(t.args??{});this.messageIdByCallId.set(t.toolCallId,e.id),this.argsRawByCallId.set(t.toolCallId,n)})})};clearByMessageId=e=>{cY(this.messageIdByCallId,this.argsRawByCallId,e)};markAborted=e=>{e.forEach(e=>this.argsRawByCallId.set(e,eY))};remapMessageId=(e,t)=>{sY(this.messageIdByCallId,e,t)};handleToolCallStart=e=>{if(this.argsRawByCallId.get(e.toolCallId)===`__nextclaw_aborted_tool_call__`)return;let t=this.resolveToolCallTargetMessage(e.sessionId,e.toolCallId,e.messageId);this.argsRawByCallId.set(e.toolCallId,``),this.port.replaceStreamingMessage({...t,parts:dY(t.parts,{type:`tool-invocation`,toolCallId:e.toolCallId,toolName:e.toolName,state:`partial-call`,args:``}),status:`streaming`})};handleToolCallArgs=e=>{this.argsRawByCallId.get(e.toolCallId)!==`__nextclaw_aborted_tool_call__`&&(this.argsRawByCallId.set(e.toolCallId,e.args),this.applyToolCallArgs(e.sessionId,e.toolCallId,e.args))};handleToolCallArgsDelta=e=>{if(this.argsRawByCallId.get(e.toolCallId)===`__nextclaw_aborted_tool_call__`)return;let t=`${this.argsRawByCallId.get(e.toolCallId)??``}${e.delta}`;this.argsRawByCallId.set(e.toolCallId,t),this.applyToolCallArgs(e.sessionId,e.toolCallId,t,e.messageId)};handleToolCallEnd=e=>{if(this.argsRawByCallId.get(e.toolCallId)===`__nextclaw_aborted_tool_call__`)return;let t=this.resolveToolCallTargetMessage(e.sessionId,e.toolCallId),n=this.argsRawByCallId.get(e.toolCallId)??``;this.port.replaceStreamingMessage({...t,parts:dY(t.parts,{type:`tool-invocation`,toolCallId:e.toolCallId,toolName:uY(t.parts,e.toolCallId)??`unknown`,state:`call`,args:n}),status:`streaming`})};handleToolCallResult=e=>{if(this.argsRawByCallId.get(e.toolCallId)===`__nextclaw_aborted_tool_call__`||this.port.updateMessageContainingToolCall(e.toolCallId,(t,n)=>dY(t.parts,{type:`tool-invocation`,toolCallId:e.toolCallId,toolName:n.toolName,state:`result`,args:n.args,result:e.content,resultContentItems:e.contentItems})))return;let t=this.resolveToolCallTargetMessage(e.sessionId,e.toolCallId);this.port.replaceStreamingMessage({...t,parts:dY(t.parts,{type:`tool-invocation`,toolCallId:e.toolCallId,toolName:`unknown`,state:`result`,result:e.content,resultContentItems:e.contentItems}),status:`streaming`})};applyToolCallArgs=(e,t,n,r)=>{let i=this.resolveToolCallTargetMessage(e,t,r),a=uY(i.parts,t)??`unknown`;this.port.replaceStreamingMessage({...i,parts:dY(i.parts,{type:`tool-invocation`,toolCallId:t,toolName:a,state:`partial-call`,args:n}),status:`streaming`})};resolveToolCallTargetMessage=(e,t,n)=>{let r=n?.trim()||this.messageIdByCallId.get(t)||this.port.readStreamingMessageId()||`tool-${t}`;return this.messageIdByCallId.set(t,r),this.port.ensureStreamingMessage(e,r,`streaming`)}},mY=`assistant`,hY=class{messages=[];streamingMessage=null;error=null;activeRun=null;contextWindow=null;listeners=new Set;toolCalls;lastSettledRunId=null;snapshotCache=null;snapshotVersion=-1;stateVersion=0;constructor(){this.toolCalls=new pY({ensureStreamingMessage:this.ensureStreamingMessage,readStreamingMessageId:()=>this.streamingMessage?.id??null,replaceStreamingMessage:this.replaceStreamingMessage,updateMessageContainingToolCall:this.updateMessageContainingToolCall})}getSnapshot=()=>{if(this.snapshotCache&&this.snapshotVersion===this.stateVersion)return this.snapshotCache;let e={messages:this.messages,streamingMessage:this.streamingMessage,error:this.error?{...this.error,details:this.error.details?{...this.error.details}:void 0}:null,activeRun:this.activeRun?{...this.activeRun}:null,contextWindow:this.contextWindow?{...this.contextWindow}:null};return this.snapshotCache=e,this.snapshotVersion=this.stateVersion,e};subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));reset=()=>{this.messages.length===0&&!this.streamingMessage&&!this.error&&!this.activeRun&&!this.contextWindow&&this.toolCalls.isEmpty()||(this.messages=[],this.streamingMessage=null,this.error=null,this.activeRun=null,this.contextWindow=null,this.toolCalls.clear(),this.lastSettledRunId=null,this.stateVersion+=1,this.notifyListeners())};clearError=()=>{let e=this.stateVersion;this.setError(null),this.stateVersion!==e&&this.notifyListeners()};hydrate=e=>{this.messages=e.messages.map(e=>$J(e)),this.streamingMessage=null,this.error=null,this.contextWindow=e.contextWindow?{...e.contextWindow}:null,this.activeRun=e.activeRun?{...e.activeRun,sessionId:e.activeRun.sessionId??e.sessionId,abortDisabledReason:e.activeRun.abortDisabledReason??null}:null,this.toolCalls.hydrate(this.messages),this.lastSettledRunId=null,this.stateVersion+=1,this.notifyListeners()};dispatch=e=>this.dispatchBatch([e]);dispatchBatch=async e=>{if(!e.length)return;let t=this.stateVersion;e.forEach(this.applyEvent),this.stateVersion!==t&&this.notifyListeners()};applyEvent=e=>{switch(e.type){case wJ.MessageSent:this.handleMessageSent(e.payload);break;case wJ.MessageAbort:this.handleMessageAbort(e.payload);break;case wJ.MessageTextStart:this.handleMessageTextStart(e.payload);break;case wJ.MessageTextDelta:this.handleMessageTextDelta(e.payload);break;case wJ.MessageTextEnd:this.handleMessageTextEnd(e.payload);break;case wJ.MessageReasoningStart:this.handleMessageReasoningStart(e.payload);break;case wJ.MessageReasoningDelta:this.handleMessageReasoningDelta(e.payload);break;case wJ.MessageReasoningEnd:this.handleMessageReasoningEnd(e.payload);break;case wJ.MessageToolCallStart:this.handleMessageToolCallStart(e.payload);break;case wJ.MessageToolCallArgs:this.handleMessageToolCallArgs(e.payload);break;case wJ.MessageToolCallArgsDelta:this.handleMessageToolCallArgsDelta(e.payload);break;case wJ.MessageToolCallEnd:this.handleMessageToolCallEnd(e.payload);break;case wJ.MessageToolCallResult:this.handleMessageToolCallResult(e.payload);break;case wJ.RunStarted:this.handleRunStarted(e.payload);break;case wJ.RunFinished:this.handleRunFinished(e.payload);break;case wJ.RunError:this.handleRunError(e.payload);break;case wJ.RunMetadata:this.handleRunMetadata(e.payload);break;case wJ.ContextWindowUpdated:this.handleContextWindowUpdated(e.payload);break;case wJ.EndpointError:this.handleEndpointError(e.payload);break;default:break}};handleMessageSent=e=>{this.upsertMessage(e.message),this.setError(null)};handleMessageAbort=e=>{let t=e.messageId?.trim();if(this.clearActiveRun(),this.setError(null),this.streamingMessage&&(!t||this.streamingMessage.id===t)){let e=this.streamingMessage.id,{parts:n,toolCallIds:r}=fY(this.streamingMessage.parts);this.upsertMessage({...this.streamingMessage,status:`final`,parts:n}),this.replaceStreamingMessage(null),t?this.toolCalls.clearByMessageId(t):this.toolCalls.clearByMessageId(e),this.toolCalls.markAborted(r)}};handleMessageTextStart=e=>{let t=this.streamingMessage?.id===e.messageId,n=this.ensureStreamingMessage(e.sessionId,e.messageId,`streaming`),r=n.parts[n.parts.length-1];t&&r?.type===`text`&&r.text.length>0&&this.replaceStreamingMessage({...n,parts:[...n.parts,{type:`text`,text:``}],status:`streaming`}),this.setError(null)};handleMessageTextDelta=e=>{if(!e.delta)return;let t=this.ensureStreamingMessage(e.sessionId,e.messageId,`streaming`),n=[...t.parts],r=n[n.length-1];r?.type===`text`?n[n.length-1]={type:`text`,text:`${r.text}${e.delta}`}:n.push({type:`text`,text:e.delta}),this.replaceStreamingMessage({...t,parts:n,status:`streaming`})};handleMessageTextEnd=e=>{this.streamingMessage?.id===e.messageId&&this.streamingMessage.status===`streaming`&&this.replaceStreamingMessage({...this.streamingMessage,status:`pending`})};handleMessageReasoningStart=e=>{this.ensureStreamingMessage(e.sessionId,e.messageId,`streaming`)};handleMessageReasoningDelta=e=>{if(!e.delta)return;let t=this.ensureStreamingMessage(e.sessionId,e.messageId,`streaming`),n=[...t.parts],r=n[n.length-1];r?.type===`reasoning`?n[n.length-1]={type:`reasoning`,text:`${r.text}${e.delta}`}:n.push({type:`reasoning`,text:e.delta}),this.replaceStreamingMessage({...t,parts:n,status:`streaming`})};handleMessageReasoningEnd=e=>{this.streamingMessage?.id,e.messageId};handleMessageToolCallStart=e=>{this.toolCalls.handleToolCallStart(e),this.setError(null)};handleMessageToolCallArgs=e=>{this.toolCalls.handleToolCallArgs(e)};handleMessageToolCallArgsDelta=e=>{this.toolCalls.handleToolCallArgsDelta(e)};handleMessageToolCallEnd=e=>{this.toolCalls.handleToolCallEnd(e)};handleMessageToolCallResult=e=>{this.toolCalls.handleToolCallResult(e)};handleRunStarted=e=>{this.isSettledRunId(e.runId)||(this.setError(null),this.activeRun={runId:e.runId??null,sessionId:e.sessionId},this.stateVersion+=1)};handleRunFinished=e=>{this.markRunAsSettled(e.runId??this.activeRun?.runId??null),this.settleStreamingMessage(`final`,nY(e)),this.setError(null),this.clearActiveRun()};handleRunError=e=>{this.markRunAsSettled(e.runId??this.activeRun?.runId??null),this.settleStreamingMessage(`error`,nY(e)),this.setError(tY(e)),this.clearActiveRun()};handleRunMetadata=e=>{let t=e.metadata;if(t?.kind===`ready`){let e=t;if(this.isSettledRunId(e.runId))return;this.activeRun={runId:e.runId??this.activeRun?.runId??null,sessionId:e.sessionId??this.activeRun?.sessionId,abortDisabledReason:e.supportsAbort===!1?e.abortDisabledReason??`Unsupported`:null},this.stateVersion+=1}else t?.kind===`final`&&(this.markRunAsSettled(e.runId??this.activeRun?.runId??null),this.clearActiveRun())};handleContextWindowUpdated=e=>{this.contextWindow={...e.contextWindow},this.stateVersion+=1};handleEndpointError=e=>{if(e.code===`abort-error`){this.handleMessageAbort({sessionId:this.activeRun?.sessionId??this.streamingMessage?.sessionId??``,...this.streamingMessage?.id?{messageId:this.streamingMessage.id}:{}});return}this.settleStreamingMessage(`error`),this.clearActiveRun(),this.setError(e)};ensureStreamingMessage=(e,t,n)=>{if(this.streamingMessage?.id===t){if(this.streamingMessage.status===n)return this.streamingMessage;let e={...this.streamingMessage,status:n};return this.replaceStreamingMessage(e),e}let r=this.messages.findIndex(e=>e.id===t);if(r>=0){let t=QJ(this.messages[r]),i=[...this.messages];i.splice(r,1),this.messages=i,this.stateVersion+=1;let a={...t,sessionId:e,status:n};return this.replaceStreamingMessage(a),a}let i=this.streamingMessage;if(i&&i.id!==t&&i.sessionId===e&&oY(i,t)){let r={...i,id:t,sessionId:e,status:n};return this.toolCalls.remapMessageId(i.id,t),this.replaceStreamingMessage(r),r}let a={id:t,sessionId:e,role:mY,status:n,parts:[],timestamp:new Date().toISOString()};return this.replaceStreamingMessage(a),a};updateMessageContainingToolCall=(e,t)=>{if(this.streamingMessage){let n=lY(this.streamingMessage.parts,e);if(n){let e=t(this.streamingMessage,n);return this.replaceStreamingMessage({...this.streamingMessage,parts:e}),!0}}for(let n=this.messages.length-1;n>=0;--n){let r=this.messages[n],i=lY(r.parts,e);if(!i)continue;let a=[...this.messages];return a[n]={...r,parts:t(r,i)},this.messages=a,this.stateVersion+=1,!0}return!1};upsertMessage=e=>{let t=$J(e);this.streamingMessage?.id===t.id&&(this.streamingMessage=null);let n=this.messages.findIndex(e=>e.id===t.id);if(n<0){this.messages=aY(this.messages,t),this.stateVersion+=1;return}let r=[...this.messages];r[n]=t,this.messages=r,this.stateVersion+=1};replaceStreamingMessage=e=>{!e&&!this.streamingMessage||(this.streamingMessage=e?$J(e):null,this.stateVersion+=1)};setError=e=>{this.error?.code===e?.code&&this.error?.message===e?.message&&this.error?.details===e?.details&&this.error?.cause===e?.cause||(this.error=e?{...e,details:e.details?{...e.details}:void 0}:null,this.stateVersion+=1)};clearActiveRun=()=>{this.activeRun&&(this.activeRun=null,this.stateVersion+=1)};isSettledRunId=e=>!!e?.trim()&&e===this.lastSettledRunId;markRunAsSettled=e=>{this.lastSettledRunId=e?.trim()||null};settleStreamingMessage=(e,t)=>{if(!this.streamingMessage)return;let n=rY(this.streamingMessage,e,t);this.upsertMessage(n),this.replaceStreamingMessage(null),this.toolCalls.clearByMessageId(n.id)};notifyListeners=()=>{let e=this.getSnapshot();for(let t of this.listeners)t(e)}},gY=16,_Y={code:`abort-error`,message:`User stopped the current run.`,details:{source:`chat-ui`}},vY=class{constructor(e){this.dispatchBatch=e,this.queue=[],this.flushTimerId=null,this.isFlushing=!1,this.isDisposed=!1,this.enqueue=e=>{this.isDisposed||(this.queue.push(e),this.scheduleFlush())},this.dispose=()=>{this.isDisposed=!0,this.flushTimerId!==null&&(window.clearTimeout(this.flushTimerId),this.flushTimerId=null),this.queue.length=0},this.scheduleFlush=()=>{this.flushTimerId!==null||this.isFlushing||this.queue.length===0||(this.flushTimerId=window.setTimeout(()=>{this.flushTimerId=null,this.flush()},gY))},this.flush=async()=>{if(!(this.isDisposed||this.isFlushing||this.queue.length===0)){this.isFlushing=!0;try{for(;this.queue.length>0;){let e=this.queue.splice(0);await this.dispatchBatch(e)}}finally{this.isFlushing=!1,this.scheduleFlush()}}}}};function yY(e,t){let n=e.dispatchBatch;return typeof n==`function`?n.call(e,t):t.reduce((t,n)=>t.then(()=>e.dispatch(n)),Promise.resolve())}function bY(e,t){if(!t)return!0;let n=`payload`in e?e.payload:null;return!n||typeof n!=`object`||!(`sessionId`in n)||typeof n.sessionId!=`string`?!0:n.sessionId===t}function xY(e){return e.parts.some(e=>e.type===`text`||e.type===`rich-text`||e.type===`reasoning`?e.text.trim().length>0:!0)}function SY(e,t){if(typeof e==`string`){let n=e.trim();return n?{...t?{sessionId:t}:{},message:{id:`user-${Date.now().toString(36)}`,...t?{sessionId:t}:{},role:`user`,status:`final`,parts:[{type:`text`,text:n}],timestamp:new Date().toISOString()}}:null}if(!xY(e.message))return null;let n=e.sessionId||e.message.sessionId||t;return{...e,...n?{sessionId:n}:{},message:{...e.message,...n?{sessionId:n}:{}}}}function CY(e){let t=(0,I.useRef)();return t.current?e&&t.current.sessionId===null?t.current.sessionId=e:t.current.sessionId!==(e??null)&&(t.current={sessionId:e??null,manager:new hY}):t.current={sessionId:e??null,manager:new hY},t.current.manager}function wY({sessionId:e,client:t,manager:n}){let r=(0,I.useRef)(e),i=(0,I.useSyncExternalStore)(e=>n.subscribe(()=>e()),()=>n.getSnapshot(),()=>n.getSnapshot()),[a,o]=(0,I.useState)(!1);(0,I.useEffect)(()=>{r.current=e},[e]),(0,I.useEffect)(()=>{o(!1)},[e]),(0,I.useEffect)(()=>{let e=new vY(e=>yY(n,e)),i=t.subscribe(t=>{bY(t,r.current)&&e.enqueue(t)});return()=>{i(),e.dispose(),t.stop()}},[t,n]);let s=i.streamingMessage?[...i.messages,i.streamingMessage]:i.messages,c=i.activeRun?.runId??null,l=!!i.activeRun;return{snapshot:i,visibleMessages:s,activeRunId:c,isRunning:l,isSending:a,send:async r=>{if(a||l)return null;let i=SY(r,e);if(!i)return null;n.clearError(),o(!0),e&&await n.dispatch({occurredAt:new Date().toISOString(),type:wJ.MessageSent,payload:{sessionId:e,message:{...i.message,sessionId:e},metadata:i.metadata}});try{return await t.send(i)}finally{o(!1)}},abort:async()=>{e&&await t.abort({sessionId:e,runId:c??void 0,reason:_Y})},streamRun:async()=>{e&&(await t.stop(),await t.stream({sessionId:e}))}}}function TY(e){return e instanceof Error?e:Error(String(e))}function EY(e){let{hydratedSessionId:t,isHydrating:n,sessionId:r}=e;return r?n||t!==r:!1}function DY(e,t){let n=e.getSnapshot();return n.activeRun?.sessionId===t||n.streamingMessage?.sessionId===t||n.messages.some(e=>e.sessionId===t)}function OY(e,t){return e.status===`running`?{runId:null,sessionId:t,abortDisabledReason:null}:null}function kY(e,t,n){return n.signal.aborted||e.requestId!==t}function AY({sessionId:e,client:t,loadSeed:n}){let r=CY(e),i=wY({sessionId:e,client:t,manager:r}),[a,o]=(0,I.useState)(!0),[s,c]=(0,I.useState)(null),[l,u]=(0,I.useState)(null),d=(0,I.useRef)({requestId:0,controller:null}),f=(0,I.useCallback)(async()=>{d.current={requestId:d.current.requestId+1,controller:null},r.reset(),c(null),u(null),o(!1),await t.stop()},[t,r]),p=(0,I.useCallback)(e=>{c(null),u(e),o(!1)},[]),m=(0,I.useCallback)(async()=>{if(d.current.controller?.abort(),!e){await f();return}let i=new AbortController,a=d.current.requestId+1;if(d.current={requestId:a,controller:i},DY(r,e)){p(e),d.current.controller===i&&(d.current.controller=null);return}await t.stop(),r.reset(),c(null),o(!0);try{let o=await n(e,i.signal);if(kY(d.current,a,i))return;r.hydrate({sessionId:e,messages:o.messages,activeRun:OY(o,e)}),p(e),t.stream({sessionId:e}).catch(e=>{d.current.requestId===a&&c(TY(e))})}catch(t){if(kY(d.current,a,i))return;c(TY(t)),u(e),o(!1)}finally{d.current.controller===i&&(d.current.controller=null)}},[t,n,r,p,f,e]);return(0,I.useEffect)(()=>(m(),()=>{d.current.controller?.abort(),d.current.controller=null}),[m]),{...i,isHydrating:EY({sessionId:e,hydratedSessionId:l,isHydrating:a}),hydrateError:s}}var jY=200*1024*1024,MY=`application/octet-stream`;function NY(e){let t=e.type.trim().toLowerCase();return t.length>0?t:MY}function PY(e,t){let n=t.acceptedMimeTypes&&t.acceptedMimeTypes.length>0?new Set(t.acceptedMimeTypes.map(e=>e.trim().toLowerCase())):null,r=t.maxBytes??209715200,i=NY(e);return n&&!n.has(i)?{ok:!1,rejected:{fileName:e.name,mimeType:i,sizeBytes:e.size,reason:`unsupported-type`}}:e.size>r?{ok:!1,rejected:{fileName:e.name,mimeType:i,sizeBytes:e.size,reason:`too-large`}}:{ok:!0,mimeType:i}}function FY(e){let t=e.parts&&e.parts.length>0?e.parts.map(e=>structuredClone(e)):[...e.text?.trim()??``?[{type:`text`,text:e.text.trim()}]:[],...(e.attachments??[]).map(e=>({type:`file`,name:e.name,mimeType:e.mimeType,...e.assetUri?.trim()?{assetUri:e.assetUri.trim()}:{},...e.url?.trim()?{url:e.url.trim()}:{},...e.contentBase64?.trim()?{contentBase64:e.contentBase64.trim()}:{},sizeBytes:e.sizeBytes}))];if(t.length===0)return null;let n=e.timestamp??new Date().toISOString(),r=e.messageId??`user-${Date.now().toString(36)}`;return{...e.sessionId?{sessionId:e.sessionId}:{},message:{id:r,...e.sessionId?{sessionId:e.sessionId}:{},role:`user`,status:`final`,parts:t,timestamp:n,...e.metadata?{metadata:e.metadata}:{}},...e.metadata?{metadata:e.metadata}:{}}}async function IY(e,t){let n=[],r=[];for(let i of e){let e=PY(i,t);if(!e.ok){r.push(e.rejected);continue}n.push(i)}if(n.length===0)return{attachments:[],rejected:r};try{return{attachments:await t.uploadBatch(n),rejected:r}}catch{return r.push(...n.map(e=>({fileName:e.name,mimeType:NY(e),sizeBytes:e.size,reason:`read-failed`}))),{attachments:[],rejected:r}}}function LY(e){return typeof e==`string`?e:e instanceof URL?e.toString():e.url}function RY(e){if(e instanceof Error){let t=e.name?.trim(),n=e.message?.trim();return t&&n?`${t}: ${n}`:n||t||`Unknown Error`}return String(e??`Unknown error`)}function zY(e,t){let n=Error(e);return t!==void 0&&(n.cause=t),n}function BY(){return async(e,t)=>{try{return await fetch(e,{credentials:`include`,...t})}catch(n){throw j.reportTransportFailure(RY(n)),zY(`NCP fetch failed for ${(t?.method||`GET`).toUpperCase()} ${LY(e)}: ${RY(n)}`,n)}}}var VY=300,HY=`ncp agent unavailable during startup`;function UY(e){return e instanceof Error?e.message.includes(`ncp session not found:`):!1}function WY(e){return e?.trim().toLowerCase().includes(HY)??!1}function GY(){return new ZJ({baseUrl:T,basePath:`/api/ncp/agent`,fetchImpl:BY()})}async function KY(e,t,n=VY){t.throwIfAborted();try{let r=await v(e,n);return t.throwIfAborted(),{messages:r.messages,status:r.status??`idle`,contextWindow:r.contextWindow??null}}catch(e){if(t.throwIfAborted(),!UY(e))throw e;return{messages:[],status:`idle`}}}function qY(e,t){let n=(0,I.useRef)(null),r=(0,I.useCallback)(e=>{if(!e){n.current=null;return}n.current!==e&&(n.current=e,t())},[t]);(0,I.useEffect)(()=>{r(e)},[e,r])}function JY(e,t={}){let[n]=(0,I.useState)(()=>GY()),r=A(),[i,a]=(0,I.useState)(0),[o,s]=(0,I.useState)(null),c=t.messageLimit??VY;(0,I.useEffect)(()=>{s(null)},[e]);let l=AY({sessionId:e,client:n,loadSeed:(0,I.useCallback)(async(e,t)=>{let n=await KY(e,t,c);return t.aborted||s(n.contextWindow??null),{messages:n.messages,status:n.status}},[i,c])}),u=l.hydrateError?.message??l.snapshot.error?.message??null;return qY(e&&r.phase===`ready`&&WY(u)?`${e}:${r.lastReadyAt??0}`:null,()=>{a(e=>e+1)}),(0,I.useMemo)(()=>({...l,snapshot:{...l.snapshot,contextWindow:l.snapshot.contextWindow??o}}),[l,o])}function YY(e){return e.bootstrapStatus?.ncpAgent.state!==`ready`}function XY(e){return e.activeSystemAction?.message?.trim()||(e.lifecyclePhase===`cold-starting`?f(`chatRuntimeInitializing`):e.lifecyclePhase===`startup-failed`?e.bootstrapStatus?.ncpAgent.error?.trim()||e.bootstrapStatus?.lastError?.trim()||e.lastError?.trim()||f(`chatRuntimeInitializationFailed`):null)}function ZY(e){let{message:t,status:n}=e,r=t?.trim();if(!r)return XY(n);let i=n.activeSystemAction?.message?.trim();if(n.phase===`service-transitioning`&&i)return i;let a=me(r);return n.phase===`recovering`&&a?f(`runtimeControlRecoveringHelp`):n.phase===`stalled`&&a?null:r}function QY(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e)}function $Y(e){if(!e||e.totalContextTokens<=0)return null;let t=e.usedContextTokens/e.totalContextTokens,n=Math.max(0,Math.min(1,t)),r=`${Math.round(n*100)}%`,i=n>=.9?`danger`:n>=.75?`warning`:`neutral`,a=[{label:f(`chatContextWindowUsed`),value:QY(e.usedContextTokens)},{label:f(`chatContextWindowTotal`),value:QY(e.totalContextTokens)},{label:f(`chatContextWindowAvailable`),value:QY(e.availableContextTokens)}];return e.prunedUsedContextTokens!==e.usedContextTokens&&a.push({label:f(`chatContextWindowPruned`),value:QY(e.prunedUsedContextTokens)}),e.droppedHistoryCount>0&&a.push({label:f(`chatContextWindowDroppedHistory`),value:String(e.droppedHistoryCount)}),e.truncatedToolResultCount>0&&a.push({label:f(`chatContextWindowTruncatedTools`),value:String(e.truncatedToolResultCount)}),{label:f(`chatContextWindow`),percentLabel:r,ratio:n,tone:i,details:a}}var eX=qt(`18rem`);function tX({agents:e,selectedAgent:t,selectedAgentId:n,onSelectAgent:r}){return(0,L.jsxs)(Zt,{value:n,onValueChange:r,children:[(0,L.jsxs)(Ut,{"aria-label":f(`chatDraftAgentTitle`),className:`h-auto w-auto min-w-0 gap-1 rounded-lg border-0 bg-transparent px-2 py-1.5 text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground focus:ring-0`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:f(`chatDraftAgentTitle`)}),(0,L.jsx)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:t?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ud,{agentId:t.id,displayName:t.displayName,avatarUrl:t.avatarUrl,className:`h-5 w-5 shrink-0`}),(0,L.jsx)(`span`,{className:`max-w-28 truncate text-sm font-medium`,children:t.displayName?.trim()||t.id})]}):null})]}),(0,L.jsx)(Kt,{className:`rounded-xl border-border shadow-lg`,style:{maxHeight:eX},children:e.map(e=>(0,L.jsx)(Yt,{value:e.id,className:`rounded-lg pr-10`,children:(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(ud,{agentId:e.id,displayName:e.displayName,avatarUrl:e.avatarUrl,className:`h-5 w-5 shrink-0`}),(0,L.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.displayName?.trim()||e.id})]})},e.id))})]})}var nX=[{icon:Xo,titleKey:`chatWelcomeCapability1Title`,descKey:`chatWelcomeCapability1Desc`,promptKey:`chatWelcomeCapability1Prompt`},{icon:io,titleKey:`chatWelcomeCapability2Title`,descKey:`chatWelcomeCapability2Desc`,promptKey:`chatWelcomeCapability2Prompt`},{icon:Za,titleKey:`chatWelcomeCapability3Title`,descKey:`chatWelcomeCapability3Desc`,promptKey:`chatWelcomeCapability3Prompt`}];function rX({onSelectPrompt:e}){return(0,L.jsx)(`div`,{className:`mt-8 grid grid-cols-[repeat(auto-fit,minmax(min(100%,9.5rem),1fr))] gap-3`,children:nX.map(t=>{let n=t.icon;return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>e(f(t.promptKey)),className:m(`min-w-0 rounded-xl border border-border/75 bg-card p-3 text-left text-card-foreground shadow-none transition-colors sm:p-3.5`,`hover:bg-muted/40`),children:[(0,L.jsx)(`div`,{className:`mb-2.5 flex h-8 w-8 items-center justify-center rounded-lg bg-muted text-muted-foreground`,children:(0,L.jsx)(n,{className:`h-4 w-4`})}),(0,L.jsx)(`div`,{className:`mb-1 text-sm font-medium text-foreground`,children:f(t.titleKey)}),(0,L.jsx)(`div`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:f(t.descKey)})]},t.titleKey)})})}var iX=Ze(`20rem`);function aX({defaultProjectRoot:e,isSaving:t,projectOptions:n,projectRoot:r,selectable:i,onOpenProjectDialog:a,onSelectProjectRoot:o}){let[s,c]=(0,I.useState)(!1),l=Hc(r)??f(`chatWelcomeProjectPickerPlaceholder`),u=e!=null&&r===e,d=async e=>{c(!1),await o(e)};return(0,L.jsxs)(it,{open:s,onOpenChange:c,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,className:`inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,title:r??void 0,"aria-label":f(`chatWelcomeProjectPickerLabel`),disabled:!i||t,children:[(0,L.jsx)(Mo,{className:`h-4 w-4 shrink-0`}),(0,L.jsx)(`span`,{className:`truncate`,children:l}),u?(0,L.jsx)(`span`,{className:`shrink-0 text-xs font-normal text-muted-foreground/70`,children:f(`chatWelcomeProjectDefaultBadge`)}):null,(0,L.jsx)(Nt,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground/70`})]})}),(0,L.jsxs)(nt,{align:`start`,className:`flex w-[min(20rem,calc(100vw-1rem))] flex-col overflow-hidden rounded-2xl border border-border bg-popover p-0 text-popover-foreground shadow-[0_24px_60px_-28px_rgba(15,23,42,0.38)]`,style:{maxHeight:iX},children:[(0,L.jsx)(`div`,{className:`shrink-0 px-3 pb-2 pt-3 text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:f(`chatWelcomeProjectRecentTitle`)}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-1.5 pb-1.5`,children:n.length>0?n.map(e=>(0,L.jsxs)(`button`,{type:`button`,className:`flex w-full min-w-0 items-start gap-2 rounded-xl px-2 py-2 text-left transition-colors hover:bg-accent`,title:e.projectRoot,onClick:()=>{d(e.projectRoot)},children:[(0,L.jsx)(Mo,{className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground/70`}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:(0,L.jsx)(`span`,{className:`truncate text-[13px] font-semibold text-foreground`,children:e.projectName})}),(0,L.jsx)(`span`,{className:`block truncate text-[11px] leading-4 text-muted-foreground`,children:e.projectRoot})]}),e.sessionCount>0?(0,L.jsx)(`span`,{className:`mt-0.5 shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground`,children:e.sessionCount}):null]},e.projectRoot)):(0,L.jsx)(`div`,{className:`px-2 py-5 text-center text-xs text-muted-foreground`,children:f(`chatWelcomeProjectNoRecent`)})}),(0,L.jsx)(`div`,{className:`shrink-0 border-t border-border p-1.5`,children:(0,L.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-xl px-2.5 py-2 text-left text-[13px] font-semibold text-foreground transition-colors hover:bg-accent`,onClick:()=>{c(!1),a()},children:[(0,L.jsx)(Mo,{className:`h-4 w-4 shrink-0 text-muted-foreground/70`}),(0,L.jsx)(`span`,{children:f(`chatWelcomeProjectOpenFolder`)})]})})]})]})}function oX(e){let{disabled:t=!1,option:n,onSelect:r,selected:i=!1}=e,a=n.ready===!1?n.reasonMessage?.trim()||f(`statusSetup`):null;return(0,L.jsx)(`button`,{type:`button`,"aria-pressed":i,disabled:t,onClick:r,className:m(`w-full rounded-2xl px-3 py-2.5 text-left transition-colors`,i?`bg-gray-50`:`hover:bg-gray-50`,t?`cursor-not-allowed opacity-70`:null),children:(0,L.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2.5`,children:[n.icon?.src?(0,L.jsx)(`span`,{className:`inline-flex h-5 w-5 shrink-0 items-center justify-center pt-0.5`,children:(0,L.jsx)(cu,{icon:{kind:`runtime-image`,src:n.icon.src,alt:n.icon.alt??null,name:n.label}})}):(0,L.jsx)(`span`,{className:`inline-flex h-5 w-5 shrink-0 items-center justify-center pt-0.5 text-gray-400`,children:(0,L.jsx)(no,{className:`h-4 w-4`})}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,L.jsx)(`div`,{className:`truncate text-[13px] font-semibold text-gray-900`,children:n.label}),(0,L.jsx)(jn,{status:n.ready===!1?`warning`:`ready`,label:n.ready===!1?f(`statusSetup`):f(`statusReady`),className:`bg-transparent px-0`})]}),a?(0,L.jsx)(`div`,{className:`mt-1 pr-4 text-[11px] leading-4 text-gray-500`,children:a}):null]})]}),i?(0,L.jsx)(en,{className:`mt-1 h-3.5 w-3.5 shrink-0 text-primary`}):null]})})}var sX=Ze(`18rem`);function cX({options:e,selectedSessionType:t,onSelectSessionType:n}){let[r,i]=(0,I.useState)(!1),a=e.find(e=>e.value===t)??e[0]??null;return a?(0,L.jsxs)(it,{open:r,onOpenChange:i,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,className:`inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,"aria-label":f(`chatWelcomeSessionTypePickerLabel`),children:[a.icon?.src?(0,L.jsx)(cu,{icon:{kind:`runtime-image`,src:a.icon.src,alt:a.icon.alt??null,name:a.label},className:`h-4 w-4`}):(0,L.jsx)(no,{className:`h-4 w-4 shrink-0`}),(0,L.jsx)(`span`,{className:`truncate`,children:a.label}),(0,L.jsx)(Nt,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground/70`})]})}),(0,L.jsx)(nt,{align:`start`,className:`flex w-[min(16rem,calc(100vw-1rem))] flex-col overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-[0_24px_60px_-28px_rgba(15,23,42,0.38)]`,style:{maxHeight:sX},children:(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:e.map(e=>(0,L.jsx)(oX,{option:e,onSelect:()=>{n(e.value),i(!1)}},e.value))})})]}):null}function lX({agents:e,defaultProjectRoot:t,inputSlot:n,projectOptions:r,selectedAgentId:i,selectedProjectRoot:a,selectedSessionType:o,sessionTypeOptions:s,onSelectAgent:c,onSelectPrompt:l,onSelectProjectRoot:u,onSelectSessionType:d}){let p=e.find(e=>e.id===i)??null,[m,h]=(0,I.useState)(!1),[g,_]=(0,I.useState)(!1),v=a??t??null,y=async e=>{if(u){_(!0);try{await u(e),h(!1)}finally{_(!1)}}},b=!!u;return(0,L.jsxs)(`div`,{className:`flex min-h-full items-center justify-center px-4 py-8 sm:p-8`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 w-full max-w-[min(760px,100%)]`,children:[(0,L.jsxs)(`div`,{className:`text-center`,children:[(0,L.jsx)(`h2`,{className:`text-2xl font-semibold text-foreground sm:text-3xl`,children:f(`chatWelcomeTitle`)}),(0,L.jsx)(`p`,{className:`mt-3 text-sm font-medium text-muted-foreground sm:text-base`,children:f(`chatWelcomeSubtitle`)})]}),n?(0,L.jsx)(`div`,{className:`mt-8`,children:n}):null,(0,L.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2 px-1 text-sm text-muted-foreground`,children:[u?(0,L.jsx)(aX,{defaultProjectRoot:t,isSaving:g,projectOptions:r,projectRoot:v,selectable:b,onOpenProjectDialog:()=>h(!0),onSelectProjectRoot:y}):null,(0,L.jsx)(tX,{agents:e,selectedAgent:p,selectedAgentId:i,onSelectAgent:c}),(0,L.jsx)(cX,{options:s,selectedSessionType:o,onSelectSessionType:d})]}),(0,L.jsx)(rX,{onSelectPrompt:l})]}),u?(0,L.jsx)(Cc,{open:m,currentProjectRoot:v,defaultWorkspacePath:t,isSaving:g,onOpenChange:h,onSave:y}):null]})}function uX(e){let{agents:t,fallbackAgentId:n}=e;return(t?.length??0)>0?t??[]:[{id:n}]}function dX(e){return e.agents.find(t=>t.id===e.agentId)??null}function fX(e,t){if(typeof e!=`string`||e.trim().length===0)return null;let n=Kl(e);return t.some(e=>e.value===n)?n:null}function pX(e){let{agentId:t,agents:n,defaultSessionType:r,pendingSessionType:i,selectedSessionType:a,sessionTypeOptions:o}=e;return(fX(a,o)??fX(i,o))||((n&&t?fX(ql(dX({agents:n,agentId:t}),r),o):null)??fX(r,o)??o[0]?.value??Kl(r))}function mX(e){return new Date(e.lastMessageAt??e.createdAt).getTime()}function hX(e){let{defaultProjectRoot:t,projects:n=[],sessionSummaries:r}=e,i=new Map;for(let e of n)e.rootPath!==t&&i.set(e.rootPath,{projectRoot:e.rootPath,projectName:e.name,sessionCount:0,latestUpdatedAt:new Date(e.updatedAt).getTime()});for(let e of bl([...r])){let n=e.projectRoot?.trim();if(!n||n===t)continue;let r=i.get(n),a=mX(e);if(r){r.sessionCount+=1,r.latestUpdatedAt=Math.max(r.latestUpdatedAt,a);continue}i.set(n,{projectRoot:n,projectName:e.projectName?.trim()||Hc(n)||n,sessionCount:1,latestUpdatedAt:a})}return[...i.values()].sort((e,t)=>t.latestUpdatedAt-e.latestUpdatedAt).map(({latestUpdatedAt:e,...t})=>t)}var gX=[];function _X({inputSlot:e,pendingProjectRoot:t,pendingSessionType:n,selectedSessionTypeValue:r,onSelectProjectRoot:i,onSelectPrompt:a,onSelectSessionType:o}){let s=Ac(),c=R(e=>e.snapshot.selectedAgentId),l=sd(e=>e.snapshot),u=gu(e=>e.snapshot.configQuery?.data??null),d=gu(e=>e.snapshot.sessionsQuery?.data?.sessions??gX),f=gu(e=>e.snapshot.sessionTypesQuery?.data??null),p=dd(),m=vu(),h=l.agentId??c,g=uX({agents:p.data?.agents,fallbackAgentId:h}),_=Vc(u?.agents.defaults.workspace),v=Vc(t),y=Yl(f?.options??[]),b=Kl(f?.defaultType??`native`),x=pX({defaultSessionType:b,pendingSessionType:n,selectedSessionType:r,sessionTypeOptions:y}),S=hX({defaultProjectRoot:_,projects:m.data?.projects??[],sessionSummaries:d});return(0,L.jsx)(lX,{agents:g,defaultProjectRoot:_,inputSlot:e,projectOptions:S,selectedAgentId:h,selectedProjectRoot:v,selectedSessionType:x,sessionTypeOptions:y,onSelectAgent:e=>{s.chatSessionListManager.setSelectedAgentId(e),o(pX({agents:g,agentId:e,defaultSessionType:b,pendingSessionType:null,selectedSessionType:null,sessionTypeOptions:y}))},onSelectPrompt:a,onSelectProjectRoot:i,onSelectSessionType:o})}function vX(e,t){if(t.length===0)return e;let n=e[e.length-1];return n?.type===`text`?[...e.slice(0,-1),{...n,text:n.text+t}]:[...e,{type:`text`,text:t}]}function yX(e){return Uh(e)}function bX(e){return Kh(e)}function xX(e){return qh(e,`skill`)}function SX(e){return qh(e,`file`)}function CX(e,t,n){let r=new Set(t),i=eg(e,e=>e.tokenKind===`skill`&&!r.has(e.tokenKey)),a=qh(i,`skill`),o=new Map(n.map(e=>[e.ref,e])),s=t.filter(e=>!a.includes(e)).map(e=>Bh({tokenKind:`skill`,tokenKey:e,label:o.get(e)?.name||e}));return s.length===0?i:Wh([...i,...s])}function wX(e,t){let n=new Set(SX(e));return t.filter(e=>n.has(e.id))}function TX(e,t){let n=new Map(t.map(e=>[e.id,e])),r=[];for(let t of e){if(t.type===`text`){r=vX(r,t.text);continue}let e=$H(t);if(e){r=vX(r,e);continue}if(t.tokenKind!==`file`)continue;let i=n.get(t.tokenKey);i&&r.push({type:`file`,name:i.name,mimeType:i.mimeType,...i.assetUri?{assetUri:i.assetUri}:{},...i.url?{url:i.url}:{},...i.contentBase64?{contentBase64:i.contentBase64}:{},sizeBytes:i.sizeBytes})}return r}function EX(e){return e.modelOptions.length>0}function DX(e){return!e.isProviderStateResolved&&!EX(e)}function OX(e){return e.isProviderStateResolved&&!EX(e)}function kX(e){return!1}function AX(e){let{hasSendableDraft:t,isRuntimeBlocked:n}=e;return n||!t}function jX(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){let e=n.trim();e&&t.add(e)}return[...t]}function MX(e,t){return e?Object.fromEntries(t.map(t=>[t,e])):{}}function NX(e){let t=Vc(e.projectRoot),n={...MX(e.model?.trim(),[`model`,`preferred_model`]),...MX(e.thinkingLevel?.trim(),[`thinkingEffort`,`thinking`,`preferred_thinking`]),...MX(e.sessionType?.trim(),[`agentRuntimeId`,`session_type`,`runtime`]),...MX(e.agentId?.trim(),[`agentId`,`agent_id`]),...MX(t??void 0,[`projectRoot`,`project_root`])},r=jX(e.requestedSkills);r.length>0&&(n.requested_skill_refs=r);let i=e.composerNodes?cU(e.composerNodes):[];return i.length>0&&(n[N]=i),e.sessionMaterialization&&(n[ie]=e.sessionMaterialization),n}var PX=e=>e.some(e=>e.type!==`text`||e.text.trim().length>0),FX=e=>e?.trim()||void 0;function IX(e){return e.text.replace(/\s+/g,` `).trim()||e.attachments.map(e=>e.name).filter(Boolean).join(`, `)}function LX(e){return{isProviderStateResolved:e.isProviderStateResolved,modelOptions:e.modelOptions,sessionTypeUnavailable:e.sessionTypeState.sessionTypeUnavailable}}function RX(e){let{agentIsSending:t,inputQuery:n,inputSnapshot:r,isRuntimeBlocked:i,materializationContext:a,selectedAgentId:o,sessionKey:s}=e,c=TX([...r.nodes],r.attachments);if(AX({snapshot:LX(n),hasSendableDraft:PX(c),isRuntimeBlocked:i})||t)return null;let l={text:r.text,nodes:[...r.nodes],selectedSkills:[...r.selectedSkills],skillRecords:[...r.skillRecords],attachments:[...r.attachments]},u=NX({agentId:a?void 0:o,model:FX(a?r.selectedModel:r.selectedModel??n.fallbackPreferredModel??n.defaultModel),thinkingLevel:a?r.selectedThinkingLevel??void 0:r.selectedThinkingLevel??n.fallbackPreferredThinking??void 0,sessionType:a?void 0:n.sessionTypeState.selectedSessionType,projectRoot:a?r.pendingProjectRoot:s?n.selectedSession?.projectRoot??null:r.pendingProjectRoot,requestedSkills:[...r.selectedSkills],composerNodes:[...r.nodes],sessionMaterialization:a?{kind:a.kind,parentSessionId:a.parentSessionKey,inheritContext:a.inheritContext}:null});return{composerSnapshot:l,id:`queued-input-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,metadata:u,preview:IX(l)}}function zX(e,t){return FY({sessionId:t??void 0,text:e.composerSnapshot.text.trim(),attachments:[...e.composerSnapshot.attachments],parts:TX([...e.composerSnapshot.nodes],e.composerSnapshot.attachments),metadata:e.metadata})}function BX(e){let{autoSendingQueuedDraftIdRef:t,draft:n,sendQueuedDraft:r,setQueuedDrafts:i,setSendError:a}=e;t.current=n.id,i(e=>e[0]?.id===n.id?e.slice(1):e),a(null),r(n).catch(e=>{i(e=>[n,...e]),a(e instanceof Error?e.message:String(e))}).finally(()=>{t.current=null})}function VX(e){let{agentIsRunning:t,agentIsSending:n,queuedDrafts:r,sendQueuedDraft:i,setQueuedDrafts:a,setSendError:o}=e,s=(0,I.useRef)(null);(0,I.useEffect)(()=>{t||n||s.current||r.length===0||BX({autoSendingQueuedDraftIdRef:s,draft:r[0],sendQueuedDraft:i,setQueuedDrafts:a,setSendError:o})},[t,n,r,i,a,o])}function HX(e){let{queuedDrafts:t,restoreComposer:n,setQueuedDrafts:r,setSendError:i}=e,a=(0,I.useCallback)(e=>{let a=t.find(t=>t.id===e);a&&(r(t=>t.filter(t=>t.id!==e)),n(a.composerSnapshot),i(null))},[t,n,r,i]);return{deleteQueuedInput:(0,I.useCallback)(e=>{r(t=>t.filter(t=>t.id!==e)),i(null)},[r,i]),editQueuedInput:a}}function UX(e){let{agent:t,inputSnapshot:n,inputQuery:r,isRuntimeBlocked:i,materializationContext:a,selectedAgentId:o,sessionKey:s,onSessionMaterialized:c,resetComposer:l,restoreComposer:u,setSendError:d}=e,f=PX((0,I.useMemo)(()=>TX([...n.nodes],n.attachments),[n.attachments,n.nodes])),p=t.isSending||t.isRunning,m=AX({snapshot:LX(r),hasSendableDraft:f,isRuntimeBlocked:i})||t.isSending,[h,g]=(0,I.useState)([]),_=(0,I.useCallback)(()=>RX({agentIsSending:t.isSending,inputSnapshot:n,inputQuery:r,isRuntimeBlocked:i,materializationContext:a,selectedAgentId:o,sessionKey:s}),[t.isSending,r,n,i,a,o,s]),v=(0,I.useCallback)(async e=>{let n=await t.send(e),r=n?.sessionId?.trim()||t.snapshot.activeRun?.sessionId?.trim()||null;return!s&&r&&c?.(r),n},[t,c,s]),y=(0,I.useCallback)(async e=>{let t=zX(e,s);return t?v(t):null},[v,s]),b=(0,I.useCallback)(async()=>{let e=_();if(e){if(l(),d(null),t.isRunning){g(t=>[...t,e]);return}try{await y(e)}catch(t){throw u(e.composerSnapshot),d(t instanceof Error?t.message:String(t)),t}}},[t.isRunning,_,l,u,y,d]),x=HX({queuedDrafts:h,restoreComposer:u,setQueuedDrafts:g,setSendError:d});VX({agentIsRunning:t.isRunning,agentIsSending:t.isSending,queuedDrafts:h,sendQueuedDraft:y,setQueuedDrafts:g,setSendError:d});let S=(0,I.useCallback)(async()=>{await t.abort()},[t]);return{canStopGeneration:t.isRunning,...x,hasSendableDraft:f,isSending:p,queuedInputs:h.map(({id:e,preview:t})=>({id:e,preview:t})),send:b,sendDisabled:m,stop:S,stopDisabled:!t.isRunning}}function WX(e,t){return{value:oe,modelLabel:e,providerLabel:``,isRuntimeDefault:!0,thinkingCapability:t??null}}function GX(e){let t=new Set;return Xn({providersView:e.providersView??void 0,templatesView:e.templatesView??void 0,config:e.config??void 0,onlyConfigured:!0}).flatMap(e=>e.models.map(n=>{let r=Zn(e.prefix,n);return!r||t.has(r)?null:(t.add(r),{value:r,modelLabel:n,providerLabel:e.displayName,thinkingCapability:Yn(e.modelThinking,n,e.aliases)})})).filter(e=>e!==null).sort((e,t)=>{let n=e.providerLabel.localeCompare(t.providerLabel);return n===0?e.modelLabel.localeCompare(t.modelLabel):n})}function KX(e){let{modelOptions:t,modelSelectionMode:n,runtimeDefaultThinkingCapability:r,runtimeDefaultModelLabel:i=`Runtime default`,supportedModels:a}=e,o=WX(i,r);if(n===`runtime-default`)return[o];if(!a||a.length===0)return n===`optional`?[o,...t]:t;let s=new Set(a),c=t.filter(e=>s.has(e.value)),l=c.length>0?c:t;return n===`optional`?[o,...l]:l}function qX(e){return e?.trim().toLowerCase()||`native`}function JX(e,t){if(typeof t!=`string`)return!1;let n=t.trim();return n?e.some(e=>e.value===n):!1}function YX(e,t){return typeof t==`string`&&e.includes(t)}function XX(e){return e.length===0?null:e.includes(`off`)?`off`:e[0]??null}function ZX(e){let{currentValue:t,selectedSessionPreferredValue:n,fallbackPreferredValue:r,defaultValue:i,isValueSupported:a,firstAvailableValue:o,preferSessionPreferredValue:s=!1,preserveCurrentValueOnSessionChange:c=!1}=e;return a(t)&&(!s||c)?t:a(n)?n:a(r)?r:a(i)?i:o}function QX(e){let{modelOptions:t,currentSelectedModel:n,selectedSessionPreferredModel:r,fallbackPreferredModel:i,defaultModel:a,preferSessionPreferredModel:o,preserveCurrentSelectedModelOnSessionChange:s}=e;return t.length===0?``:ZX({currentValue:n,selectedSessionPreferredValue:r,fallbackPreferredValue:i,defaultValue:a,isValueSupported:e=>JX(t,e),firstAvailableValue:t[0]?.value??``,preferSessionPreferredValue:o,preserveCurrentValueOnSessionChange:s})}function $X(e){let{supportedThinkingLevels:t,currentSelectedThinkingLevel:n,selectedSessionPreferredThinking:r,fallbackPreferredThinking:i,defaultThinkingLevel:a,preferSessionPreferredThinking:o,preserveCurrentSelectedThinkingOnSessionChange:s}=e;return t.length===0?null:ZX({currentValue:n,selectedSessionPreferredValue:r,fallbackPreferredValue:i,defaultValue:a,isValueSupported:e=>YX(t,e),firstAvailableValue:XX(t)??`off`,preferSessionPreferredValue:o,preserveCurrentValueOnSessionChange:s})}function eZ(e){let{sessions:t,selectedSessionKey:n,sessionType:r,readPreference:i}=e,a=qX(r),o,s=-1/0;for(let e of t){if(e.key===n||qX(e.sessionType)!==a)continue;let t=i(e);if(t==null)continue;let r=Date.parse(e.updatedAt),c=Number.isFinite(r)?r:-1/0;(o===void 0||c>s)&&(o=t,s=c)}return o}function tZ(e){let{selectedSession:t,pendingSessionType:n,setPendingSessionType:r,sessionTypesData:i}=e,a=(0,I.useMemo)(()=>Yl(i?.options??[]),[i?.options]),o=(0,I.useMemo)(()=>{let e=[...a],n=Kl(t?.sessionType);return e.some(e=>e.value===n)||e.push({value:n,label:Jl(n),icon:null,ready:!0,reason:null,reasonMessage:null,supportedModels:void 0,recommendedModel:null,modelSelectionMode:`nextclaw`,runtimeDefaultThinking:null,cta:null}),e.sort((e,t)=>e.value===`native`?-1:t.value===`native`?1:e.value.localeCompare(t.value))},[a,t?.sessionType]),s=(0,I.useMemo)(()=>Kl(i?.defaultType??`native`),[i?.defaultType]),c=(0,I.useRef)(null),l=typeof n==`string`&&n.trim().length>0?n:void 0,u=(0,I.useMemo)(()=>Kl(t?.sessionType??l??s),[s,l,t?.sessionType]),d=(0,I.useMemo)(()=>o.find(e=>e.value===u)??null,[u,o]);(0,I.useEffect)(()=>{if(t)return;let e=typeof n==`string`?n.trim():``,i=Kl(n);(e.length===0||c.current===i||c.current===null&&i===`native`)&&(c.current=s,i!==s&&r(s))},[s,n,t,r]);let p=!t||!!t.sessionTypeMutable,m=(0,I.useMemo)(()=>new Set(a.map(e=>e.value)),[a]),h=(0,I.useMemo)(()=>t&&!m.has(Kl(t.sessionType))?!0:d?.ready===!1,[m,t,d?.ready]),g=(0,I.useMemo)(()=>t&&!m.has(Kl(t.sessionType))?`${Jl(u)} ${f(`chatSessionTypeUnavailableSuffix`)}`:d?.ready===!1?d.reasonMessage?.trim()||`${d.label} setup required`:null,[m,t,u,d]);return(0,I.useMemo)(()=>({sessionTypeOptions:o,selectedSessionTypeOption:d,defaultSessionType:s,selectedSessionType:u,canEditSessionType:p,sessionTypeUnavailable:h,sessionTypeUnavailableMessage:g}),[p,s,u,d,o,h,g])}var nZ=`nextclaw.chat.recent-selection.store`;function rZ(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function iZ(e,t){return Array.isArray(e)?Array.from(new Set(e.map(rZ).filter(e=>!!e))).slice(0,t):[]}function aZ(e,t){let n=rZ(t?.namespace);return n?`${e.storageKey}.${encodeURIComponent(n.toLowerCase())}`:e.storageKey}function oZ(e){if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e)){let e=rZ(n);if(!e)continue;let i=iZ(r,1/0);i.length>0&&(t[e]=i)}return t}var sZ=p()(Pn(e=>({entriesByKey:{},setEntries:(t,n)=>e(e=>({entriesByKey:{...e.entriesByKey,[t]:iZ(n,1/0)}}))}),{name:nZ,storage:Fn(()=>window.localStorage),partialize:e=>({entriesByKey:e.entriesByKey}),merge:(e,t)=>({...t,entriesByKey:oZ(e?.entriesByKey)})})),cZ=class{constructor(e){this.options=e,this.read=(e={})=>{let t=aZ(this.options,e);return iZ(sZ.getState().entriesByKey[t],this.options.limit)},this.remember=(e,t={})=>{let n=rZ(e);if(!n)return this.read(t);let r=aZ(this.options,t),i=[n,...this.read(t).filter(e=>e!==n)].slice(0,this.options.limit);return sZ.getState().setEntries(r,i),i},this.resolveVisible=e=>{let t=iZ(e.availableValues,1/0);if(t.length<=e.minAvailableCount)return[];let n=new Set(t),r=[],i=Math.max(1,e.limit??this.options.limit);for(let t of this.read(e))if(!(!n.has(t)||r.includes(t))&&(r.push(t),r.length>=i))break;return r}}},lZ=new cZ({storageKey:`nextclaw.chat.recent-models`,limit:3}),uZ=[],dZ=[];function fZ(e){let{sessionKey:t,inputSnapshot:n,setPendingSessionType:r}=e,i=t??null,a=Du(),o=gu(e=>e.snapshot),s=o.configQuery?.data??null,c=o.sessionsQuery?.data?.sessions??dZ,l=Nl({sessionId:i?.trim()||`draft-session`,projectRoot:Vc(n.pendingProjectRoot)}),u=l.data?.records??uZ,d=!!(l.isLoading||l.isFetching),p=(0,I.useMemo)(()=>bl(c),[c]),m=(0,I.useMemo)(()=>p.find(e=>e.key===i)??null,[i,p]),h=tZ({selectedSession:m,pendingSessionType:n.pendingSessionType,setPendingSessionType:r,sessionTypesData:o.sessionTypesQuery?.data??null}),g=(0,I.useMemo)(()=>GX({config:s,providersView:o.providersQuery?.data??null,templatesView:o.providerTemplatesQuery?.data??null}),[s,o.providerTemplatesQuery?.data,o.providersQuery?.data]),_=(0,I.useMemo)(()=>KX({modelOptions:g,modelSelectionMode:h.selectedSessionTypeOption?.modelSelectionMode,runtimeDefaultThinkingCapability:h.selectedSessionTypeOption?.runtimeDefaultThinking??null,runtimeDefaultModelLabel:f(`chatRuntimeDefaultModel`),supportedModels:h.selectedSessionTypeOption?.supportedModels}),[g,h.selectedSessionTypeOption?.modelSelectionMode,h.selectedSessionTypeOption?.runtimeDefaultThinking,h.selectedSessionTypeOption?.supportedModels]),v=(0,I.useMemo)(()=>new Set(_.map(e=>e.value)),[_]),y=lZ.read({namespace:h.selectedSessionType}).find(e=>v.has(e)),b=(0,I.useMemo)(()=>y??eZ({sessions:p,selectedSessionKey:i,sessionType:h.selectedSessionType,readPreference:e=>e.preferredModel?.trim()||void 0}),[y,i,h.selectedSessionType,p]),x=(0,I.useMemo)(()=>eZ({sessions:p,selectedSessionKey:i,sessionType:h.selectedSessionType,readPreference:e=>e.preferredThinking??void 0}),[i,h.selectedSessionType,p]),S=Vc(s?.agents.defaults.workspace);return(0,I.useMemo)(()=>({defaultModel:s?.agents.defaults.model,defaultProjectRoot:S,fallbackPreferredModel:b,fallbackPreferredThinking:x,isProviderStateResolved:a,isSkillsLoading:d,modelOptions:_,selectedSession:m,selectedSessionKey:i,sessionTypeState:h,skillRecords:u}),[s?.agents.defaults.model,S,b,x,a,d,_,m,i,h,u])}var pZ=({selectedModel:e,selectedThinkingLevel:t,updatePreferences:n})=>{let r=(0,I.useRef)(void 0),i=(0,I.useCallback)(e=>{n({selectedModel:e})},[n]),a=(0,I.useCallback)(e=>{n({selectedThinkingLevel:e})},[n]),o=(0,I.useCallback)(({defaultModel:i,fallbackPreferredModel:a,fallbackPreferredThinking:o,modelOptions:s,selectedSessionExists:c,selectedSessionKey:l,selectedSessionPreferredModel:u,selectedSessionPreferredThinking:d})=>{let f=l??null,p=r.current!==f,m=p&&!!f&&!c,h=QX({currentSelectedModel:e??void 0,modelOptions:s,selectedSessionPreferredModel:u,fallbackPreferredModel:a,defaultModel:i,preferSessionPreferredModel:p,preserveCurrentSelectedModelOnSessionChange:m}),g=s.find(e=>e.value===h),_=$X({currentSelectedThinkingLevel:t,supportedThinkingLevels:g?.thinkingCapability?.supported??[],selectedSessionPreferredThinking:d,fallbackPreferredThinking:o,defaultThinkingLevel:g?.thinkingCapability?.default??null,preferSessionPreferredThinking:p,preserveCurrentSelectedThinkingOnSessionChange:m});(e!==h||t!==_)&&n({selectedModel:h,selectedThinkingLevel:_}),(!f||c)&&(r.current=f)},[e,t,n]);return(0,I.useMemo)(()=>({setSelectedModel:i,setSelectedThinkingLevel:a,syncSessionPreferences:o}),[i,a,o])},mZ={text:``,nodes:[],selectedSkills:[],skillRecords:[]},hZ=()=>({...mZ,attachments:[],selectedModel:void 0,selectedThinkingLevel:null,pendingSessionType:Gl,selectedSessionType:Gl,pendingProjectRoot:null,composerFocusRequestId:0,sendError:null}),gZ=e=>e?.trim()||Gl,_Z=e=>[e.assetUri??``,e.url??``,e.name,e.mimeType,String(e.sizeBytes),e.contentBase64??``].join(`:`),vZ=(e,t)=>{let n=new Set(e.map(_Z)),r=[...e];return t.forEach(e=>{let t=_Z(e);n.has(t)||(n.add(t),r.push(e))}),r},yZ=()=>{let[e,t]=(0,I.useState)(hZ),n=(0,I.useCallback)(e=>{t(t=>{let n=typeof e==`function`?e(t):e;return{...t,...n}})},[]),r=(0,I.useCallback)(e=>{n({text:e.text,nodes:e.nodes,selectedSkills:e.selectedSkills,skillRecords:e.skillRecords,sendError:null})},[n]),i=(0,I.useCallback)(()=>{n({...mZ,attachments:[],sendError:null})},[n]),a=(0,I.useCallback)(e=>{n({...e})},[n]),o=(0,I.useCallback)(e=>{n({text:e,nodes:yX(e),selectedSkills:[],skillRecords:[],sendError:null,composerFocusRequestId:Date.now()})},[n]),s=(0,I.useCallback)(()=>{n(e=>({composerFocusRequestId:e.composerFocusRequestId+1}))},[n]),c=(0,I.useCallback)(()=>{n({composerFocusRequestId:0})},[n]),l=(0,I.useCallback)(e=>{n({attachments:e})},[n]),u=(0,I.useCallback)(t=>{if(t.length===0)return[];let r=new Set(e.attachments.map(_Z)),i=vZ(e.attachments,t),a=i.filter(e=>!r.has(_Z(e)));return a.length>0&&n({attachments:i}),a},[e.attachments,n]),d=(0,I.useCallback)(e=>{n(t=>({attachments:t.attachments.filter(t=>t.id!==e)}))},[n]),f=pZ({selectedModel:e.selectedModel,selectedThinkingLevel:e.selectedThinkingLevel,updatePreferences:n}),p=(0,I.useCallback)(e=>{n(t=>{let n=gZ(typeof e==`function`?e(t.pendingSessionType):e);return{pendingSessionType:n,selectedSessionType:n}})},[n]),m=(0,I.useCallback)(e=>{n({pendingProjectRoot:e})},[n]),h=(0,I.useCallback)((e,t)=>{n({selectedSkills:e,skillRecords:t,sendError:null})},[n]),g=(0,I.useCallback)(e=>{n({sendError:e})},[n]);return{inputSnapshot:e,inputActions:(0,I.useMemo)(()=>({update:n,syncComposer:r,resetComposer:i,restoreComposer:a,applyPromptSuggestion:o,requestComposerFocusAtEnd:s,consumeComposerFocusRequest:c,setAttachments:l,addAttachments:u,removeAttachment:d,...f,setPendingSessionType:p,setPendingProjectRoot:m,setSelectedSkills:h,setSendError:g}),[n,r,i,a,o,s,c,l,u,d,f,p,m,h,g])}},bZ={exactId:1200,exactLabel:1150,prefixId:1e3,prefixLabel:950,prefixToken:900,containsId:800,containsLabel:760,containsDescription:500,subsequence:300,fallback:1};function xZ(e){return(e??``).trim().toLowerCase()}function SZ(e,t){if(!e||!t)return!1;let n=0;for(let r of t)if(r===e[n]&&(n+=1,n>=e.length))return!0;return!1}function CZ(e,t){let n=xZ(t);if(!n)return bZ.fallback;let r=xZ(e.id),i=xZ(e.label||e.id),a=xZ(e.description),o=(e.aliases??[]).map(xZ).filter(Boolean),s=i.split(/[\s/_-]+/).filter(Boolean),c=[r,...o];return c.some(e=>e===n)?bZ.exactId:i===n?bZ.exactLabel:c.some(e=>e.startsWith(n))?bZ.prefixId:i.startsWith(n)?bZ.prefixLabel:s.some(e=>e.startsWith(n))?bZ.prefixToken:c.some(e=>e.includes(n))?bZ.containsId:i.includes(n)?bZ.containsLabel:a.includes(n)?bZ.containsDescription:SZ(n,i)||c.some(e=>SZ(n,e))?bZ.subsequence:0}function wZ(e){return e>=bZ.exactLabel?4:e>=bZ.prefixToken?3:e>=bZ.containsLabel?2:e>0?1:0}var TZ=`context-reference:navigate:files`,EZ=`context-reference:navigate:root`,DZ=`workspace`,OZ=`panel-apps`,kZ={key:`context-reference`,marker:`@`};function AZ(e){return Date.parse(e.lastOpenedAt??e.updatedAt)||0}function jZ(e){return e.split(/[\\/]+/).filter(Boolean).at(-1)??e}function MZ(e){let t=new Intl.Collator(void 0,{sensitivity:`base`,numeric:!0});return e.entries.map((t,n)=>({entry:t,order:n,score:CZ({id:t.appId,label:t.title||t.appId,description:t.description,aliases:[t.id,t.fileName]},e.query)})).filter(e=>e.score>0).sort((e,n)=>{let r=wZ(e.score),i=wZ(n.score);if(i!==r)return i-r;if(e.entry.favorite!==n.entry.favorite)return e.entry.favorite?-1:1;let a=AZ(n.entry),o=AZ(e.entry);return a===o?n.score===e.score?t.compare(e.entry.title||e.entry.appId,n.entry.title||n.entry.appId)||e.order-n.order:n.score-e.score:a-o}).map(({entry:e})=>e)}function NZ(e){let t=e.keyPrefix??`panel-app`;return MZ({entries:e.entries,query:e.query}).map(n=>({entry:n,item:{key:`${t}:${n.appId}`,icon:`panel-app`,title:n.title||n.appId,subtitle:e.texts.subtitle,description:(n.description??``).trim()||e.texts.noDescriptionLabel,detailLines:[`${e.texts.appIdLabel}: ${n.appId}`,`${e.texts.fileLabel}: ${n.fileName}`]}}))}function PZ(e){return NZ(e).map(({item:e})=>e)}function FZ(e){return NZ(e).map(({entry:t,item:n})=>({...n,sectionKey:OZ,sectionLabel:e.sectionLabel,tokenKind:`panel_app`,tokenKey:t.appId,value:t.appId}))}function IZ(e){let{kind:t,projectRoot:n,relativePath:r}=e,i=r.split(`/`).filter(Boolean);return{rootLabel:jZ(n),segments:i.map((e,n)=>({label:e,kind:n===i.length-1?t:`directory`}))}}function LZ(e){let t=jZ(e.projectRoot);return e.entries.map(n=>{let r=e.navigateDirectories&&n.kind===`directory`;return{key:`workspace:${n.kind}:${n.relativePath}`,icon:n.kind===`directory`?`folder`:`file`,title:n.name,subtitle:n.parentRelativePath||t,description:n.kind===`directory`?e.texts.directoryDescription:e.texts.fileDescription,detailLines:[`${e.texts.projectRootLabel}: ${e.projectRoot}`,n.relativePath],sectionKey:DZ,sectionLabel:e.texts.workspaceSectionLabel,value:n.relativePath,tokenKind:r?void 0:n.kind===`directory`?Xe:_,tokenKey:r?void 0:n.relativePath,selectionBehavior:r?`navigate`:void 0,pathPreview:IZ({kind:n.kind,projectRoot:e.projectRoot,relativePath:n.relativePath})}})}function RZ(e){let t=e.split(`/`).filter(Boolean);return t.length===0?null:t.slice(0,-1).join(`/`)}function zZ(e){let{projectRoot:t,referencePath:n,texts:r}=e,i=n.split(`/`).filter(Boolean).at(-1)??n;return{key:`context-reference:current-directory:${n}`,icon:`folder`,title:r.currentDirectoryLabel,subtitle:i,description:r.directoryDescription,detailLines:[`${r.projectRootLabel}: ${t}`,n],sectionKey:DZ,sectionLabel:r.workspaceSectionLabel,value:n,tokenKind:Xe,tokenKey:n,pathPreview:IZ({kind:`directory`,projectRoot:t,relativePath:n})}}function BZ(e){return{key:TZ,icon:`files`,title:e.filesLabel,subtitle:e.filesSubtitle,description:e.filesDescription,detailLines:[],hintLabel:e.filesHintLabel,selectionBehavior:`navigate`}}function VZ(e){let{referencePath:t,texts:n}=e,r=!t;return{key:EZ,icon:`back`,title:r?n.backLabel:n.parentLabel,subtitle:``,description:r?n.backDescription:n.parentDescription,detailLines:[],hintLabel:r?n.backHintLabel:n.parentHintLabel,value:RZ(t)??``,selectionBehavior:`navigate`}}function HZ(e){return BH({key:`context-reference`,trigger:kZ,resolvePanel:({data:t,trigger:n})=>{let r=t.referencePath!==null,i=r&&!n.query.trim(),a=LZ({entries:t.serverPathEntries,navigateDirectories:i,projectRoot:t.projectRoot,texts:e.itemTexts.context}),o=i&&t.referencePath?zZ({projectRoot:t.projectRoot,referencePath:t.referencePath,texts:e.itemTexts.context}):null,s=r?[VZ({referencePath:t.referencePath??``,texts:e.itemTexts.context}),...o?[o]:[],...a]:[BZ(e.itemTexts.context),...n.query?a:[],...FZ({entries:t.panelApps,query:n.query,sectionLabel:e.itemTexts.context.panelAppSectionLabel,texts:e.itemTexts.panelApp})],c=r?t.isServerPathSearchLoading:t.isPanelAppsLoading||!!n.query&&t.isServerPathSearchLoading;return{isLoading:r?c:c&&s.length===0,items:s,notice:t.serverPathSearchError?{message:`${e.itemTexts.context.searchFailedLabel}: ${t.serverPathSearchError}`,tone:`error`}:void 0,onSelectItem:n=>{n.key===TZ?e.onNavigate(``):n.key===EZ?e.onNavigate(t.referencePath?n.value??``:null):n.selectionBehavior===`navigate`&&n.value&&e.onNavigate(n.value)},texts:e.menuTexts}}})}function UZ(e){let t=e.modelLabel.trim(),n=e.providerLabel.trim();return n?`${n}/${t}`:t}function WZ(e){let t=[];for(let n of[`off`,...e])t.includes(n)||t.push(n);return t}function GZ(e){let{isModelOptionsEmpty:t,isModelOptionsLoading:n,onGoToProviders:r,texts:i}=e;return!n&&!t?null:n?{tone:`neutral`,loading:!0}:{tone:`warning`,text:i.noModelOptionsLabel,actionLabel:i.configureProviderLabel,onAction:r}}function KZ({modelOptions:e,favoriteModelValues:t,recentModelValues:n,selectedModel:r,isModelOptionsLoading:i,hasModelOptions:a,onFavoriteToggle:o,onValueChange:s,texts:c}){let l=e.find(e=>e.value===r)??e[0],u=a?l?.value:void 0,d=new Map(e.map(e=>[e.value,e])),f=(t??[]).map(e=>d.get(e)).filter(e=>!!e),p=new Set(f.map(e=>e.value)),m=(n??[]).map(e=>d.get(e)).filter(e=>e!==void 0&&!p.has(e.value)),h=new Set(m.map(e=>e.value)),g=e.filter(e=>!p.has(e.value)&&!h.has(e.value)),_=f.length>0||m.length>0?[{key:`favorite-models`,label:c.favoriteModelsLabel,options:f.map(e=>({value:e.value,label:UZ(e)}))},{key:`recent-models`,label:c.recentModelsLabel,options:m.map(e=>({value:e.value,label:UZ(e)}))},{key:`all-models`,label:c.allModelsLabel,options:g.map(e=>({value:e.value,label:UZ(e)}))}].filter(e=>e.options.length>0):void 0;return{key:`model`,value:u,placeholder:c.modelSelectPlaceholder,selectedLabel:l?UZ(l):void 0,icon:`sparkles`,options:e.map(e=>({value:e.value,label:UZ(e)})),groups:_,disabled:!a,loading:i,emptyLabel:c.modelNoOptionsLabel,search:{placeholder:c.modelSearchPlaceholder,emptyLabel:c.modelSearchEmptyLabel},optionAction:o?{kind:`favorite`,activeValues:f.map(e=>e.value),activeLabel:c.unfavoriteModelLabel,inactiveLabel:c.favoriteModelLabel,onToggle:o}:void 0,onValueChange:s}}function qZ(e){let{defaultThinkingLevel:t,onValueChange:n,selectedThinkingLevel:r,supportedLevels:i,texts:a}=e;if(i.length===0)return null;let o=WZ(i),s=o.includes(`off`)?`off`:o[0],c=r&&o.includes(r)&&r||t&&o.includes(t)&&t||s;return{key:`thinking`,value:c,placeholder:a.thinkingLabels[c],selectedLabel:a.thinkingLabels[c],icon:`brain`,options:o.map(e=>({value:e,label:a.thinkingLabels[e]})),onValueChange:e=>n(e)}}var JZ={exactSpec:1200,exactLabel:1150,prefixSpec:1e3,prefixLabel:950,prefixToken:900,containsSpec:800,containsLabel:760,containsDescription:500,subsequence:300,fallback:1};function YZ(e){return(e??``).trim().toLowerCase()}function XZ(e,t){if(!e||!t)return!1;let n=0;for(let r of t)if(r===e[n]&&(n+=1,n>=e.length))return!0;return!1}function ZZ(e,t){let n=YZ(t);if(!n)return JZ.fallback;let r=YZ(e.key),i=YZ(e.label||e.key),a=YZ(`${e.descriptionZh??``} ${e.description??``}`),o=i.split(/[\s/_-]+/).filter(Boolean);return r===n?JZ.exactSpec:i===n?JZ.exactLabel:r.startsWith(n)?JZ.prefixSpec:i.startsWith(n)?JZ.prefixLabel:o.some(e=>e.startsWith(n))?JZ.prefixToken:r.includes(n)?JZ.containsSpec:i.includes(n)?JZ.containsLabel:a.includes(n)?JZ.containsDescription:XZ(n,i)||XZ(n,r)?JZ.subsequence:0}function QZ(e){return e>=JZ.exactLabel?4:e>=JZ.prefixToken?3:e>=JZ.containsLabel?2:e>0?1:0}function $Z(e){return new Map(e.map((e,t)=>[e,t]))}function eQ(e,t){let n=$Z(t),r=[],i=[];for(let t of e){if(n.has(t.key)){r.push(t);continue}i.push(t)}return r.sort((e,t)=>(n.get(e.key)??1/0)-(n.get(t.key)??1/0)),[...r,...i]}function tQ(e,t,n,r=[]){let i=new Intl.Collator(void 0,{sensitivity:`base`,numeric:!0}),a=$Z(r),o=new Map;for(let t of e){let e=t.groupKey?.trim();e&&!o.has(e)&&o.set(e,o.size)}return e.map((e,n)=>({record:e,order:n,score:ZZ(e,t)})).filter(e=>e.score>0).sort((e,t)=>{let n=o.get(e.record.groupKey?.trim()??``)??1/0,r=o.get(t.record.groupKey?.trim()??``)??1/0;if(n!==r)return n-r;let s=QZ(e.score),c=QZ(t.score);if(c!==s)return c-s;let l=a.get(e.record.key)??1/0,u=a.get(t.record.key)??1/0;if(l!==u)return l-u;if(t.score!==e.score)return t.score-e.score;let d=(e.record.label||e.record.key).trim(),f=(t.record.label||t.record.key).trim(),p=i.compare(d,f);return p===0?e.order-t.order:p}).map(({record:e})=>({key:`skill:${e.key}`,title:e.label||e.key,subtitle:n.slashSkillSubtitle,description:(e.descriptionZh??e.description??``).trim()||n.noSkillDescription,detailLines:[`${n.slashSkillSpecLabel}: ${e.key}`,...e.scopeLabel?[`${n.slashSkillScopeLabel}: ${e.scopeLabel}`]:[]],sectionKey:e.groupKey,sectionLabel:e.groupLabel,tokenKind:`skill`,tokenKey:e.key,value:e.key}))}function nQ(e){return e.map(e=>({key:e.key,label:e.label,description:e.descriptionZh||e.description||``,badgeLabel:e.badgeLabel}))}function rQ(e){let{allSkillsLabel:t,recentKeySet:n,recentSkillsLabel:r,skillRecords:i}=e,a=i.filter(e=>n.has(e.key)),o=new Map;for(let e of i){if(n.has(e.key))continue;let r=e.groupKey?.trim()||`all-skills`,i=e.groupLabel?.trim()||t,a=o.get(r)??{label:i,records:[]};a.records.push(e),o.set(r,a)}let s=[...o].map(([e,t])=>({key:e,label:t.label,options:nQ(t.records)})),c=s.some(e=>e.key!==`all-skills`);if(!(a.length===0&&!c))return[...a.length>0?[{key:`recent-skills`,label:r,options:nQ(a)}]:[],...s].filter(e=>e.options.length>0)}function iQ(e){let{groupedRecentSkillValues:t,isLoading:n,onSelectedKeysChange:r,recentSkillValues:i,selectedSkills:a,skillRecords:o,texts:s}=e,c=eQ(o,i??[]),l=new Set(t??[]);return{title:s.title,allGroupsLabel:s.allSkillsLabel,searchPlaceholder:s.searchPlaceholder,emptyLabel:s.emptyLabel,loadingLabel:s.loadingLabel,isLoading:n,manageLabel:s.manageLabel,manageHref:`/marketplace/skills`,options:nQ(c),groups:rQ({skillRecords:c,recentKeySet:l,recentSkillsLabel:s.recentSkillsLabel,allSkillsLabel:s.allSkillsLabel}),selectedKeys:a,onSelectedKeysChange:r}}var aQ=`commands`,oQ=`panel-app-action`,sQ=`panel-apps`,cQ=`skills`;function lQ(e){let t=new Intl.Collator(void 0,{sensitivity:`base`,numeric:!0});return e.commands.map((t,n)=>({command:t,order:n,score:CZ({id:t.key,label:t.title,description:t.description,aliases:t.keywords},e.query)})).filter(e=>e.score>0).sort((e,n)=>{let r=wZ(e.score),i=wZ(n.score);return i===r?n.score===e.score?t.compare(e.command.title,n.command.title)||e.order-n.order:n.score-e.score:i-r}).map(({command:t})=>({key:`command:${t.key}`,icon:`command`,title:t.title,subtitle:e.texts.commandSubtitle,description:t.description,detailLines:[...t.detailLines??[]],hintLabel:e.texts.commandHintLabel,sectionKey:aQ,sectionLabel:e.texts.commandSectionLabel}))}function uQ(e){let{data:t,itemTexts:n,query:r,skillHintLabel:i,skillSectionLabel:a}=e;return tQ([...t.skillRecords],r,n,[...t.recentSkillValues]).map(e=>({...e,icon:`skill`,hintLabel:i,sectionKey:e.sectionKey?`${cQ}:${e.sectionKey}`:cQ,sectionLabel:e.sectionLabel||a}))}function dQ(e){return PZ({entries:e.data.panelApps,keyPrefix:oQ,query:e.query,texts:e.itemTexts}).map(t=>({...t,icon:`panel-app`,hintLabel:e.panelAppHintLabel,sectionKey:sQ,sectionLabel:e.panelAppSectionLabel}))}function fQ(e){let t=`${oQ}:`;return e.key.startsWith(t)?e.key.slice(t.length):null}function pQ(e){return BH({key:`slash-command`,trigger:Lh,resolvePanel:t=>{let{data:n,trigger:r}=t,i=uQ({data:n,itemTexts:e.itemTexts.skillTexts,query:r.query,skillHintLabel:e.labels.skillHintLabel,skillSectionLabel:e.labels.skillSectionLabel}),a=[...new Set(i.flatMap(e=>e.sectionKey?[e.sectionKey]:[]))];return{filterOptions:[{key:`all`,label:e.labels.filterAllLabel},{key:aQ,label:e.labels.filterCommandsLabel,sectionKeys:[aQ]},{key:cQ,label:e.labels.filterSkillsLabel,sectionKeys:a.length>0?a:[cQ]},{key:sQ,label:e.labels.filterPanelAppsLabel,sectionKeys:[sQ]}],isLoading:n.isPanelAppsLoading||n.isSkillsLoading,items:[...lQ({commands:e.commands,query:r.query,texts:{commandHintLabel:e.labels.commandHintLabel,commandSectionLabel:e.labels.commandSectionLabel,commandSubtitle:e.labels.commandSubtitle}}),...i,...dQ({data:n,itemTexts:e.itemTexts.panelAppTexts,panelAppHintLabel:e.labels.panelAppHintLabel,panelAppSectionLabel:e.labels.panelAppSectionLabel,query:r.query})],onSelectItem:t=>{if(t.key.startsWith(`command:`)){e.commands.find(e=>t.key===`command:${e.key}`)?.onSelect();return}let n=fQ(t);if(n){e.onSelectPanelApp(n);return}let r=t.tokenKey??t.value;r&&e.onSelectSkill?.(r)},texts:e.menuTexts}}})}function mQ(e){return[`server-path-search`,e.basePath.trim(),e.query?.trim()??``,e.limit??null]}function hQ(e){let{enabled:t,limit:n}=e,r=e.basePath.trim(),i=e.query?.trim()??``;return Fe({queryKey:mQ({basePath:r,query:i,limit:n}),queryFn:()=>he({basePath:r,query:i,limit:n}),enabled:(t??!0)&&!!r,staleTime:5e3})}function gQ(e){let{commands:t,language:n,onNavigate:r,onSelectPanelApp:i,onSelectSkill:a,slashTexts:o}=e,s={appIdLabel:f(`chatPanelAppReferenceAppId`,n),fileLabel:f(`chatPanelAppReferenceFile`,n),noDescriptionLabel:f(`chatPanelAppReferenceNoDescription`,n),subtitle:f(`chatPanelAppReferenceType`,n)};return[pQ({commands:t,itemTexts:{panelAppTexts:s,skillTexts:o},menuTexts:{loadingLabel:f(`chatSlashLoading`,n),sectionLabel:f(`chatSlashSection`,n),emptyLabel:f(`chatSlashNoResult`,n),hintLabel:f(`chatSlashHint`,n),itemHintLabel:f(`chatSlashSkillHint`,n)},labels:{commandHintLabel:f(`chatSlashCommandHint`,n),commandSectionLabel:f(`chatSlashSectionCommands`,n),commandSubtitle:f(`chatSlashTypeCommand`,n),filterAllLabel:f(`chatSlashFilterAll`,n),filterCommandsLabel:f(`chatSlashFilterCommands`,n),filterPanelAppsLabel:f(`chatSlashFilterPanelApps`,n),filterSkillsLabel:f(`chatSlashFilterSkills`,n),panelAppHintLabel:f(`chatSlashPanelAppHint`,n),panelAppSectionLabel:f(`chatPanelAppReferenceSection`,n),skillHintLabel:f(`chatSlashSkillHint`,n),skillSectionLabel:f(`chatSlashSectionSkills`,n)},onSelectPanelApp:i,onSelectSkill:a}),HZ({itemTexts:{context:{backLabel:f(`chatContextReferenceBack`,n),backDescription:f(`chatContextReferenceBackDescription`,n),backHintLabel:f(`chatContextReferenceBackHint`,n),currentDirectoryLabel:f(`chatContextReferenceCurrentDirectory`,n),directoryDescription:f(`chatContextReferenceDirectoryDescription`,n),fileDescription:f(`chatContextReferenceFileDescription`,n),filesDescription:f(`chatContextReferenceFilesDescription`,n),filesHintLabel:f(`chatContextReferenceFilesHint`,n),filesLabel:f(`chatContextReferenceFilesLabel`,n),filesSubtitle:f(`chatContextReferenceFilesType`,n),panelAppSectionLabel:f(`chatPanelAppReferenceSection`,n),parentLabel:f(`chatContextReferenceParent`,n),parentDescription:f(`chatContextReferenceParentDescription`,n),parentHintLabel:f(`chatContextReferenceParentHint`,n),projectRootLabel:f(`chatContextReferenceProjectRoot`,n),searchFailedLabel:f(`chatContextReferenceSearchFailed`,n),workspaceSectionLabel:f(`chatContextReferenceWorkspaceSection`,n)},panelApp:s},menuTexts:{loadingLabel:f(`chatContextReferenceLoading`,n),sectionLabel:f(`chatContextReferenceSection`,n),emptyLabel:f(`chatContextReferenceNoResult`,n),hintLabel:f(`chatContextReferenceHint`,n),itemHintLabel:f(`chatContextReferenceItemHint`,n)},onNavigate:r})]}function _Q(e){let t=e.parentRelativePath.split(`/`).filter(Boolean).join(`/`);return e.entries.map(e=>({name:e.name,path:e.path,relativePath:[t,e.name].filter(Boolean).join(`/`),parentRelativePath:t,kind:e.kind,hidden:e.hidden}))}function vQ(e){let{isSkillsLoading:t,itemTexts:n,language:r,onSelectPanelApp:i,onSelectSkill:a,projectRoot:o,recentSkillValues:s,skillRecords:c,commands:l}=e,[u,d]=(0,I.useState)(null),[f,p]=(0,I.useState)(null),m=(0,I.useRef)(`null`),h=(0,I.useCallback)(e=>{let t=JSON.stringify(e?[e.key,e.marker,e.query,e.start,e.end]:null);m.current!==t&&(m.current=t,e||d(null),p(e))},[]),g=f?.key===kZ.key,_=(0,I.useDeferredValue)(g?f.query:``),v=!!(g&&o&&u!==null&&!_.trim()),y=!!(g&&o&&_.trim()),b=lc({path:u||`.`,basePath:o,includeFiles:!0,enabled:v}),x=hQ({basePath:o,query:_,enabled:y}),S=v?b:x,C=(0,I.useMemo)(()=>v?_Q({entries:b.data?.entries??[],parentRelativePath:u??``}):x.data?.entries??[],[v,u,b.data?.entries,x.data?.entries]),w=gK({enabled:g||f?.key===Lh.key}),T=(0,I.useMemo)(()=>gQ({commands:l,language:r,onNavigate:d,onSelectPanelApp:i,onSelectSkill:a,slashTexts:n.slashTexts}),[l,n.slashTexts,r,i,a]);return{inputSurfaceState:(0,I.useMemo)(()=>VH({data:{isPanelAppsLoading:w.isLoading||w.isFetching,isServerPathSearchLoading:S.isLoading||S.isFetching,isSkillsLoading:t,panelApps:w.data?.entries??[],projectRoot:o,recentSkillValues:s,referencePath:u,serverPathEntries:C,serverPathSearchError:S.error instanceof Error?S.error.message:null,skillRecords:c},plugins:T,trigger:f}),[T,f,w.data?.entries,w.isFetching,w.isLoading,o,S.error,S.isFetching,S.isLoading,u,C,t,s,c]),setInputSurfaceTrigger:h}}var yQ=fe.chat.modelFavorites,bQ=[`preference`,yQ];function xQ(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(typeof n!=`string`)continue;let e=n.trim();e&&!t.includes(e)&&t.push(e)}return t}function SQ(e){let t=pe(),n=(0,I.useMemo)(()=>new Set(e),[e]),r=Fe({queryKey:bQ,queryFn:()=>Ge(yQ),staleTime:3e4}),i=(0,I.useMemo)(()=>xQ(r.data?.value),[r.data?.value]),a=(0,I.useMemo)(()=>i.filter(e=>n.has(e)),[n,i]),o=ge({mutationFn:async e=>await Ye(yQ,e),onMutate:async e=>{await t.cancelQueries({queryKey:bQ});let n=t.getQueryData(bQ);return t.setQueryData(bQ,{key:yQ,value:e,updatedAt:new Date().toISOString()}),{previous:n}},onError:(e,n,r)=>{r?.previous&&t.setQueryData(bQ,r.previous)},onSuccess:e=>{t.setQueryData(bQ,e)}}),s=(0,I.useCallback)((e,t)=>{let n=e.trim();if(!n)return;let r=t?[n,...i.filter(e=>e!==n)]:i.filter(e=>e!==n);o.mutate(r)},[i,o]);return{favoriteModelValues:a,isLoading:r.isLoading,setModelFavorite:s}}var CQ=new cZ({storageKey:`nextclaw.chat.recent-skills`,limit:5});function wQ(e){let{addAttachments:t,attachmentSupported:n,inputBarRef:r}=e,i=(0,I.useCallback)(e=>{if(e===`unsupported-type`){P.error(f(`chatInputAttachmentUnsupported`));return}if(e===`too-large`){P.error(f(`chatInputAttachmentTooLarge`).replace(`{maxMb}`,String(jY/(1024*1024))));return}P.error(f(`chatInputAttachmentReadFailed`))},[]),a=(0,I.useCallback)(async e=>{if(!n||e.length===0)return;let a=await IY(e,{uploadBatch:b});if(a.attachments.length>0){let e=t(a.attachments);e.length>0&&r.current?.insertFileTokens(e.map(e=>({tokenKey:e.id,label:e.name})))}a.rejected.length>0&&i(a.rejected[0].reason)},[t,n,r,i]);return{handleFilesAdd:a,handleFileInputChange:(0,I.useCallback)(async e=>{let t=Array.from(e.target.files??[]);e.currentTarget.value=``,await a(t)},[a])}}function TQ(){return{off:f(`chatThinkingLevelOff`),minimal:f(`chatThinkingLevelMinimal`),low:f(`chatThinkingLevelLow`),medium:f(`chatThinkingLevelMedium`),high:f(`chatThinkingLevelHigh`),adaptive:f(`chatThinkingLevelAdaptive`),xhigh:f(`chatThinkingLevelXhigh`)}}function EQ(e){let{allModelsLabel:t,favoriteModelLabel:n,favoriteModelValues:r,favoriteModelsLabel:i,hasModelOptions:a,isModelOptionsLoading:o,modelRecords:s,modelSearchEmptyLabel:c,modelSearchPlaceholder:l,onFavoriteModelToggle:u,onModelChange:d,onThinkingChange:p,recentModelValues:m,recentModelsLabel:h,selectedModel:g,selectedThinkingLevel:_,thinkingDefaultLevel:v,thinkingSupportedLevels:y,unfavoriteModelLabel:b}=e;return[KZ({modelOptions:s,favoriteModelValues:r,recentModelValues:m,selectedModel:g,isModelOptionsLoading:o,hasModelOptions:a,onFavoriteToggle:u,onValueChange:d,texts:{modelSelectPlaceholder:f(`chatSelectModel`),modelNoOptionsLabel:f(`chatModelNoOptions`),modelSearchPlaceholder:l,modelSearchEmptyLabel:c,favoriteModelsLabel:i,favoriteModelLabel:n,unfavoriteModelLabel:b,recentModelsLabel:h,allModelsLabel:t}}),qZ({supportedLevels:y,selectedThinkingLevel:_,defaultThinkingLevel:v,onValueChange:p,texts:{thinkingLabels:TQ()}})].filter(e=>e!==null)}function DQ(e){let{allSkillsLabel:t,isSkillsLoading:n,onSelectedKeysChange:r,recentSkillGroupValues:i,recentSkillValues:a,recentSkillsLabel:o,selectedSkills:s,skillRecords:c}=e;return iQ({skillRecords:c,recentSkillValues:a,groupedRecentSkillValues:i,selectedSkills:[...s],isLoading:n,onSelectedKeysChange:r,texts:{title:f(`chatSkillsPickerTitle`),searchPlaceholder:f(`chatSkillsPickerSearchPlaceholder`),emptyLabel:f(`chatSkillsPickerEmpty`),loadingLabel:f(`sessionsLoading`),manageLabel:f(`chatSkillsPickerManage`),recentSkillsLabel:o,allSkillsLabel:t}})}function OQ(e,t){let n=e?.thinkingCapability;return!n||n.supported.length===0?null:t===`off`?`off`:t&&n.supported.includes(t)?t:n.default&&n.supported.includes(n.default)?n.default:`off`}function kQ({children:e,disabled:t=!1,label:n,onClick:r}){return(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`span`,{className:`inline-flex`,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":n,disabled:t,onClick:r,className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border disabled:cursor-not-allowed disabled:text-muted-foreground/50`,children:e})})}),(0,L.jsx)(Et,{side:`top`,children:n})]})}function AQ({controller:e}){return e.queuedInputs.length===0?null:(0,L.jsx)(kt,{delayDuration:120,children:(0,L.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.queuedInputs.map(t=>(0,L.jsxs)(`div`,{className:`flex min-h-8 min-w-0 items-center gap-2 text-sm`,children:[(0,L.jsx)(vo,{className:`h-4 w-4 shrink-0 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium text-foreground/80`,children:t.preview||f(`chatQueuedBannerAttachmentFallback`)}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,L.jsx)(kQ,{label:f(`chatQueuedEdit`),onClick:()=>e.editQueuedInput(t.id),children:(0,L.jsx)(cs,{className:`h-4 w-4`})}),(0,L.jsx)(kQ,{label:f(`chatQueuedDelete`),onClick:()=>e.deleteQueuedInput(t.id),children:(0,L.jsx)(kn,{className:`h-4 w-4`})})]})]},t.id))})})}function jQ(e,t,n){return e.map(e=>({key:e.ref,label:e.name,scopeLabel:t[e.source],groupKey:e.source,groupLabel:n[e.source],description:e.description,descriptionZh:e.descriptionZh,badgeLabel:t[e.source]}))}function MQ(e){return e.map(e=>({value:e.value,modelLabel:e.modelLabel,providerLabel:e.providerLabel,thinkingCapability:e.thinkingCapability?{supported:e.thinkingCapability.supported,default:e.thinkingCapability.default??null}:null}))}function NQ(e){let{skillGroupLabels:t,skillScopeLabels:n}=(0,I.useMemo)(()=>({skillScopeLabels:{builtin:f(`chatSkillScopeBuiltin`),global:f(`chatSkillScopeGlobal`),project:f(`chatSkillScopeProject`),workspace:f(`chatSkillScopeWorkspace`)},skillGroupLabels:{builtin:f(`chatSkillGroupBuiltin`),global:f(`chatSkillGroupGlobal`),project:f(`chatSkillGroupProject`),workspace:f(`chatSkillGroupWorkspace`)}}),[e]);return{skillScopeLabels:n,skillGroupLabels:t,slashTexts:(0,I.useMemo)(()=>({slashSkillSubtitle:f(`chatSlashTypeSkill`),slashSkillSpecLabel:f(`chatSlashSkillSpec`),slashSkillScopeLabel:f(`chatSlashSkillScope`),noSkillDescription:f(`chatSkillsPickerNoDescription`)}),[e]),recentModelsLabel:f(`chatPickerRecentModels`),allModelsLabel:f(`chatPickerAllModels`),favoriteModelsLabel:f(`chatPickerFavoriteModels`),modelSearchPlaceholder:f(`chatModelSearchPlaceholder`),modelSearchEmptyLabel:f(`chatModelSearchEmpty`),favoriteModelLabel:f(`chatFavoriteModel`),unfavoriteModelLabel:f(`chatUnfavoriteModel`),recentSkillsLabel:f(`chatPickerRecent`),allSkillsLabel:f(`chatPickerAllSkills`)}}function PQ(e){let{modelOptions:t,skillGroupLabels:n,skillRecords:r,skillScopeLabels:i}=e,a=(0,I.useMemo)(()=>jQ(r,i,n),[n,i,r]),o=(0,I.useMemo)(()=>MQ(t),[t]);return{skillRecords:a,modelRecords:o,recentModelValues:lZ.resolveVisible({availableValues:o.map(e=>e.value),minAvailableCount:5}),recentSkillValues:CQ.resolveVisible({availableValues:a.map(e=>e.key),minAvailableCount:0}),recentSkillGroupValues:CQ.resolveVisible({availableValues:a.map(e=>e.key),minAvailableCount:4})}}var FQ=(0,I.memo)(function(e){let{contextWindow:t,controller:n,inputActions:r,inputQuery:i,inputSnapshot:a,surface:o=`default`}=e,s=Ac(),{language:c}=on(),l=cJ(e=>e.layout),{isMobile:u}=Cn(),d=(0,I.useRef)(null),p=(0,I.useRef)(null),m=NQ(c),{skillRecords:h,modelRecords:g,recentModelValues:_,recentSkillValues:v,recentSkillGroupValues:y}=PQ({modelOptions:i.modelOptions,skillRecords:i.skillRecords,skillGroupLabels:m.skillGroupLabels,skillScopeLabels:m.skillScopeLabels}),b=(0,I.useMemo)(()=>{let e=i.selectedSessionKey?.trim();return e?[{key:`side-chat`,title:f(`chatSlashCommandSideChatTitle`,c),description:f(`chatSlashCommandSideChatDescription`,c),detailLines:[f(`chatSlashCommandSideChatDetail`,c)],keywords:[`side`,`chat`,`child`,`branch`,`new`],onSelect:()=>s.chatThreadManager.openSideChatDraft(e)}]:[]},[i.selectedSessionKey,c,s.chatThreadManager]),x=(0,I.useCallback)(e=>void s.chatUiManager.showContent({target:{type:`panel_app`,payload:{appId:e}}}),[s.chatUiManager]),C=i.selectedSessionKey?i.selectedSession?.projectRoot??i.defaultProjectRoot??``:a.pendingProjectRoot??i.defaultProjectRoot??``,{inputSurfaceState:T,setInputSurfaceTrigger:E}=vQ({commands:b,isSkillsLoading:i.isSkillsLoading,itemTexts:{slashTexts:m.slashTexts},language:c,onSelectPanelApp:x,onSelectSkill:CQ.remember,projectRoot:C,recentSkillValues:v,skillRecords:h}),{favoriteModelValues:D,setModelFavorite:O}=SQ((0,I.useMemo)(()=>g.map(e=>e.value),[g])),k=a.selectedModel??``,A=a.selectedThinkingLevel,ee={isProviderStateResolved:i.isProviderStateResolved,modelOptions:i.modelOptions,sessionTypeUnavailable:i.sessionTypeState.sessionTypeUnavailable},j=EX(ee),M=DX(ee),N=OX(ee),te=kX(ee),ne=f(N?`chatModelNoOptions`:u?`chatInputPlaceholderCompact`:`chatInputPlaceholder`),re=g.find(e=>e.value===k),ie=re?.thinkingCapability?.supported??[],{handleFilesAdd:ae,handleFileInputChange:oe}=wQ({attachmentSupported:!0,inputBarRef:d,addAttachments:r.addAttachments}),se=(0,I.useCallback)(e=>{!i.selectedSessionKey||!i.selectedSession||S(i.selectedSessionKey,e).catch(()=>void 0)},[i.selectedSession,i.selectedSessionKey]),ce=(0,I.useCallback)(e=>{let t=[...e];r.update(e=>({nodes:t,attachments:wX(t,e.attachments),text:bX(t),selectedSkills:xX(t),sendError:null}))},[r]),le=(0,I.useCallback)(e=>{let t=OQ(g.find(t=>t.value===e),A);r.update({selectedModel:e,selectedThinkingLevel:t,sendError:null}),lZ.remember(e,{namespace:i.sessionTypeState.selectedSessionType}),w(e)||lZ.remember(e),se({preferredModel:w(e)?null:e,preferredThinking:t})},[r,i.sessionTypeState.selectedSessionType,g,A,se]),ue=(0,I.useCallback)(e=>{r.setSelectedThinkingLevel(e),se({preferredThinking:e})},[r,se]),de=(0,I.useCallback)(e=>{let t=a.selectedSkills;e.filter(e=>!t.includes(e)).forEach(e=>CQ.remember(e)),ce(CX([...a.nodes],e,i.skillRecords.map(e=>({ref:e.ref,name:e.name}))))},[ce,i.skillRecords,a.nodes,a.selectedSkills]);(0,I.useEffect)(()=>{a.composerFocusRequestId&&(d.current?.focusComposerAtEnd([...a.nodes]),r.consumeComposerFocusRequest())},[r,a.composerFocusRequestId,a.nodes]);let fe=EQ({allModelsLabel:m.allModelsLabel,favoriteModelLabel:m.favoriteModelLabel,favoriteModelValues:D,favoriteModelsLabel:m.favoriteModelsLabel,hasModelOptions:j,isModelOptionsLoading:M,modelRecords:g,modelSearchEmptyLabel:m.modelSearchEmptyLabel,modelSearchPlaceholder:m.modelSearchPlaceholder,onFavoriteModelToggle:O,onModelChange:le,onThinkingChange:ue,recentModelValues:_,recentModelsLabel:m.recentModelsLabel,selectedModel:k,selectedThinkingLevel:A,thinkingSupportedLevels:ie,thinkingDefaultLevel:re?.thinkingCapability?.default??null,unfavoriteModelLabel:m.unfavoriteModelLabel}),pe=DQ({allSkillsLabel:m.allSkillsLabel,onSelectedKeysChange:de,recentSkillGroupValues:y,recentSkillValues:v,recentSkillsLabel:m.recentSkillsLabel,isSkillsLoading:i.isSkillsLoading,skillRecords:h,selectedSkills:a.selectedSkills}),me=(0,I.useMemo)(()=>[...a.nodes],[a.nodes]),he=o===`default`&&l===`flat`,ge=(0,L.jsx)(HD,{ref:d,surface:he?`embedded`:o,sendError:a.sendError,sendErrorDetailsLabel:f(`chatErrorDetails`,c),topSlot:n.queuedInputs.length>0?(0,L.jsx)(AQ,{controller:n}):null,composer:{nodes:me,placeholder:ne,disabled:te,onNodesChange:ce,onFilesAdd:ae,inputSurfaceTriggerSpecs:T.triggerSpecs,onInputSurfaceTriggerChange:E},inputSurface:T.panel??void 0,hint:GZ({isModelOptionsLoading:M,isModelOptionsEmpty:N,onGoToProviders:s.chatUiManager.goToProviders,texts:{noModelOptionsLabel:f(`chatModelNoOptions`),configureProviderLabel:f(`chatGoConfigureProvider`)}}),toolbar:{selects:[],trailingSelects:fe,accessories:[{key:`attach`,label:f(`chatInputAttach`),icon:`paperclip`,iconOnly:!0,disabled:te,onClick:()=>p.current?.click()}],skillPicker:pe,actions:{isSending:n.isSending,canStopGeneration:n.canStopGeneration,sendDisabled:n.sendDisabled,stopDisabled:n.stopDisabled,stopHint:f(`chatStopUnavailable`),sendButtonLabel:n.isSending?f(`chatQueueSend`):f(`chatSend`),stopButtonLabel:f(`chatStop`),contextWindow:t,onSend:n.send,onStop:n.stop}}});return(0,L.jsxs)(L.Fragment,{children:[he?(0,L.jsx)(SJ,{className:`pb-4 pt-2`,width:`composer`,children:ge}):ge,(0,L.jsx)(`input`,{ref:p,type:`file`,multiple:!0,className:`hidden`,onChange:oe})]})});function IQ(e){let{applyPromptSuggestion:t,consumeDraftIntent:n}=e,r=S4(),i=Ac();(0,I.useEffect)(()=>{if(!n)return;let e=e=>{i.chatSessionListManager.createSession(),i.chatSessionListManager.setSelectedAgentId(`main`),t(e.prompt),r.chatDraftIntentManager.markConsumed(e.id)},a=r.chatDraftIntentManager.subscribe(e),o=r.chatDraftIntentManager.consumePending();return o&&e(o),a},[r,t,n,i])}function LQ(e){if(!e||typeof e!=`object`)return null;let t=e.chatDraft;return!t||typeof t!=`object`?null:t}function RQ(e){let{sessionKey:t,setPendingProjectRoot:n,setPendingSessionType:r}=e,i=di(),a=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(t)return;let e=LQ(i.state);if(!e)return;let o=[i.key,typeof e.sessionType==`string`?e.sessionType:``,typeof e.projectRoot==`string`?e.projectRoot:``].join(`:`);a.current!==o&&(a.current=o,typeof e.sessionType==`string`&&e.sessionType.trim()&&r(e.sessionType),n(typeof e.projectRoot==`string`&&e.projectRoot.trim()?e.projectRoot:null))},[i.key,i.state,t,n,r])}function zQ({inputQuery:e}){let t=Ac(),n=e.isProviderStateResolved&&e.modelOptions.length===0,r=e.sessionTypeState.sessionTypeUnavailableMessage?.trim()||null;return(0,L.jsxs)(L.Fragment,{children:[n?(0,L.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-amber-200/70 bg-amber-50/70 flex items-center justify-between gap-3 shrink-0 sm:px-5`,children:[(0,L.jsx)(`span`,{className:`text-xs text-amber-800`,children:f(`chatModelNoOptions`)}),(0,L.jsx)(`button`,{type:`button`,onClick:t.chatUiManager.goToProviders,className:`text-xs font-semibold text-amber-900 underline-offset-2 hover:underline`,children:f(`chatGoConfigureProvider`)})]}):null,e.sessionTypeState.sessionTypeUnavailable&&r?(0,L.jsx)(`div`,{className:`px-4 py-2.5 border-b border-amber-200/70 bg-amber-50/70 shrink-0 sm:px-5`,children:(0,L.jsx)(`span`,{className:`text-xs text-amber-800`,children:r})}):null]})}function BQ(e){let{consumeDraftIntent:t=!1,materializationContext:n=null,onSessionMaterialized:r,sessionKey:i,showWelcomeForDraft:a=!0}=e,o=A(),s=R(e=>e.snapshot.selectedAgentId),c=JY(i??void 0),{inputActions:l,inputSnapshot:u}=yZ(),d=fZ({sessionKey:i,inputSnapshot:u,setPendingSessionType:l.setPendingSessionType});(0,I.useEffect)(()=>{l.syncSessionPreferences({defaultModel:d.defaultModel,fallbackPreferredModel:d.fallbackPreferredModel,fallbackPreferredThinking:d.fallbackPreferredThinking,modelOptions:d.modelOptions,selectedSessionExists:!!d.selectedSession,selectedSessionKey:d.selectedSessionKey,selectedSessionPreferredModel:d.selectedSession?.preferredModel??void 0,selectedSessionPreferredThinking:d.selectedSession?.preferredThinking??null})},[l,d.defaultModel,d.fallbackPreferredModel,d.fallbackPreferredThinking,d.modelOptions,d.selectedSession,d.selectedSessionKey]),RQ({sessionKey:i,setPendingProjectRoot:l.setPendingProjectRoot,setPendingSessionType:l.setPendingSessionType});let p=YY(o),m=c.isRunning||d.selectedSession?.status===`running`,h=c.hydrateError?.message??c.snapshot.error?.message??null,g=o.phase===`ready`&&WY(h)?null:h,_=p?null:o.phase===`ready`?g:ZY({message:g,status:o}),v=UX({agent:(0,I.useMemo)(()=>({...c,isRunning:m,isSending:c.isSending}),[c,m]),inputSnapshot:u,inputQuery:d,isRuntimeBlocked:p,materializationContext:n,selectedAgentId:s,sessionKey:i,onSessionMaterialized:r,resetComposer:l.resetComposer,restoreComposer:l.restoreComposer,setSendError:l.setSendError}),y=(0,I.useRef)(v);(0,I.useEffect)(()=>{y.current=v},[v]);let b=(0,I.useMemo)(()=>({canStopGeneration:v.canStopGeneration,deleteQueuedInput:e=>y.current.deleteQueuedInput(e),editQueuedInput:e=>y.current.editQueuedInput(e),isSending:v.isSending,queuedInputs:v.queuedInputs,send:()=>y.current.send(),sendDisabled:v.sendDisabled,stop:()=>y.current.stop(),stopDisabled:v.stopDisabled}),[v.canStopGeneration,v.isSending,v.queuedInputs,v.sendDisabled,v.stopDisabled]),x=(0,I.useMemo)(()=>$Y(xG(c.snapshot.contextWindow)),[c.snapshot.contextWindow]),S=(0,I.useMemo)(()=>({...u,sendError:_??u.sendError}),[u,_]),C=d.selectedSession?.activityPreview,w=C?.state===`failed`&&(C.statusText?.trim()||C.replyText?.trim())||null,T=w?(0,L.jsxs)(`div`,{className:`rounded-lg border border-red-200/80 bg-red-50/80 px-3 py-2.5 shadow-sm`,children:[(0,L.jsx)(`div`,{className:`text-xs font-semibold text-red-800`,children:f(`chatSessionErrorTitle`)}),(0,L.jsx)(`div`,{className:`mt-1 whitespace-pre-wrap break-words text-xs leading-5 text-red-700`,children:w})]}):null;IQ({consumeDraftIntent:t,applyPromptSuggestion:l.applyPromptSuggestion});let E=(0,I.useCallback)(e=>(0,L.jsx)(FQ,{contextWindow:x,controller:b,inputActions:l,inputQuery:d,inputSnapshot:S,surface:e}),[x,S,b,l,d]),D=a&&!i&&c.visibleMessages.length===0&&!c.isHydrating;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(zQ,{inputQuery:d}),(0,L.jsx)(CJ,{isAwaitingAssistantOutput:v.isSending&&m,isHistoryLoading:c.isHydrating,isSending:v.isSending,bottomSlot:T,messages:c.visibleMessages,sessionKey:i,showWelcome:D,welcomeSlot:(0,L.jsx)(_X,{inputSlot:E(`embedded`),pendingProjectRoot:u.pendingProjectRoot,pendingSessionType:u.pendingSessionType,selectedSessionTypeValue:u.selectedSessionType,onSelectProjectRoot:l.setPendingProjectRoot,onSelectPrompt:l.applyPromptSuggestion,onSelectSessionType:l.setPendingSessionType})}),D?null:E(`default`)]})}function VQ(e={all:!0}){return Fe({queryKey:[`cron`,e],queryFn:()=>E(e),staleTime:1e4})}function HQ(){let e=pe();return{onSuccess:()=>{e.invalidateQueries({queryKey:[`cron`]}),P.success(f(`configSavedApplied`))},onError:e=>{P.error(f(`configSaveFailed`)+`: `+e.message)}}}function UQ(){return ge({mutationFn:({id:e})=>ae(e),...HQ()})}function WQ(){return ge({mutationFn:({id:e,enabled:t})=>Ue(e,{enabled:t}),...HQ()})}function GQ(){return ge({mutationFn:({id:e,force:t})=>xe(e,{force:t}),...HQ()})}function KQ(e){return l(e??void 0)}function qQ(e){if(!e)return`-`;let t=new Date(e);if(Number.isNaN(t.getTime()))return`-`;let n=Date.now(),i=t.getTime()-n,a=r(),o=Math.abs(i);if(o<6e4)return a===`zh`?`刚刚`:`just now`;if(o<36e5){let e=Math.round(o/6e4);return i>0?a===`zh`?`${e}分钟后`:`in ${e}m`:a===`zh`?`${e}分钟前`:`${e}m ago`}if(o<864e5){let e=Math.round(o/36e5);return i>0?a===`zh`?`${e}小时后`:`in ${e}h`:a===`zh`?`${e}小时前`:`${e}h ago`}let s=Math.round(o/864e5);return i>0?a===`zh`?`${s}天后`:`in ${s}d`:a===`zh`?`${s}天前`:`${s}d ago`}function JQ(e){return typeof e!=`number`||!Number.isFinite(e)?`-`:l(new Date(e))}function YQ(e){if(typeof e!=`number`||!Number.isFinite(e))return`-`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.round(t/60);if(n<60)return`${n}m`;let r=Math.round(n/60);return r<24?`${r}h`:`${Math.round(r/24)}d`}var XQ=[`周日`,`周一`,`周二`,`周三`,`周四`,`周五`,`周六`],ZQ=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`];function QQ(e){return e.padStart(2,`0`)}function $Q(e,t){let n=e.trim().split(/\s+/);if(n.length!==5)return null;let[r,i,a,o,s]=n,c=t===`zh`;if(r===`*`&&i===`*`&&a===`*`&&o===`*`&&s===`*`)return c?`每分钟`:`every minute`;if(r.startsWith(`*/`)&&i===`*`&&a===`*`&&o===`*`&&s===`*`){let e=parseInt(r.slice(2),10);if(Number.isFinite(e)&&e>0)return c?`每 ${e} 分钟`:`every ${e}m`}if(r===`0`&&i===`*`&&a===`*`&&o===`*`&&s===`*`)return c?`每小时`:`every hour`;let l=`${QQ(i)}:${QQ(r)}`;if(r!==`*`&&i!==`*`&&a===`*`&&o===`*`&&s===`*`)return c?`每天 ${l}`:`daily ${l}`;if(r!==`*`&&i!==`*`&&a===`*`&&o===`*`&&s===`1-5`)return c?`工作日 ${l}`:`weekdays ${l}`;if(r!==`*`&&i!==`*`&&a===`*`&&o===`*`&&(s===`0,6`||s===`6,0`))return c?`周末 ${l}`:`weekends ${l}`;if(r!==`*`&&i!==`*`&&a===`*`&&o===`*`&&/^\d$/.test(s)){let e=parseInt(s,10),t=c?XQ[e]:ZQ[e];return t?`${t} ${l}`:null}return r!==`*`&&i!==`*`&&a!==`*`&&o===`*`&&s===`*`?c?`每月 ${a} 日 ${l}`:`monthly ${a} ${l}`:null}function e$(e){let t=r(),n=t===`zh`,{schedule:i}=e;if(i.kind===`cron`)return i.expr?$Q(i.expr,t)??`cron ${i.expr}`:`cron`;if(i.kind===`every`){let e=YQ(i.everyMs);return n?`每 ${e}`:`every ${e}`}return i.kind===`at`?`${n?`定时`:`at`} ${JQ(i.atMs)}`:`-`}function t$(e){return e.payload.sessionId?.trim()||`cron:${e.id}`}function n$(e,t){let n=t?.trim();return!!(n&&e.payload.sessionId?.trim()===n)}function r$(e,t){let n=t.trim().toLowerCase();return n?[e.id,e.name,e.payload.message,e.payload.sessionId??``].join(` `).toLowerCase().includes(n):!0}function i$(e,t){return t===`all`?!0:t===`enabled`?e.enabled:!e.enabled}function a$({job:e}){return(0,L.jsxs)(`span`,{className:m(`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium`,e.enabled?`bg-emerald-50 text-emerald-700`:`bg-muted text-muted-foreground`),children:[(0,L.jsx)(`span`,{className:m(`h-1.5 w-1.5 rounded-full`,e.enabled?`bg-emerald-500`:`bg-muted-foreground/50`)}),e.enabled?f(`enabled`):f(`disabled`)]})}function o$(e){let{job:t,onDelete:n,onRun:r,onToggle:i}=e,[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)(!1);return(0,L.jsx)(`div`,{className:m(`group overflow-hidden rounded-xl border border-border/70 bg-card transition-colors cursor-pointer`,a?`bg-muted/20`:`hover:bg-muted/30`),onClick:e=>{e.target.closest(`[data-no-expand]`)||o(!a)},children:(0,L.jsxs)(`div`,{className:`px-3 py-2.5`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,L.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a?(0,L.jsx)(Nt,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}):(0,L.jsx)(so,{className:`h-3.5 w-3.5 text-muted-foreground/50 shrink-0 group-hover:text-muted-foreground transition-colors`}),(0,L.jsx)(`span`,{className:`text-sm font-medium text-foreground truncate`,children:t.name||t.id}),(0,L.jsx)(a$,{job:t}),t.deleteAfterRun?(0,L.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground`,children:f(`cronOneShot`)}):null]})}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,"data-no-expand":!0,children:[(0,L.jsx)(ne,{checked:t.enabled,onCheckedChange:e=>i(t,e)}),(0,L.jsxs)(it,{open:s,onOpenChange:c,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(be,{variant:`ghost`,size:`icon`,className:`h-7 w-7 text-muted-foreground hover:text-foreground hover:bg-muted`,"aria-label":f(`cronMoreActions`),children:(0,L.jsx)(bt,{className:`h-4 w-4`})})}),(0,L.jsxs)(nt,{align:`end`,sideOffset:4,className:`w-40 p-1`,children:[(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{c(!1),r(t)},className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-foreground transition-colors hover:bg-muted`,children:[(0,L.jsx)(ls,{className:`h-3.5 w-3.5 text-muted-foreground`}),f(`cronRunNow`)]}),(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{c(!1),n(t)},className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-red-600 transition-colors hover:bg-red-50`,children:[(0,L.jsx)(kn,{className:`h-3.5 w-3.5`}),f(`delete`)]})]})]})]})]}),(0,L.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground pl-6`,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,L.jsx)(oo,{className:`h-3 w-3 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`font-mono text-foreground/80`,children:e$(t)})]}),t.state.nextRunAt?(0,L.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,L.jsx)(po,{className:`h-3 w-3 text-muted-foreground/70`}),(0,L.jsx)(`span`,{children:qQ(t.state.nextRunAt)})]}):null,t.state.lastRunAt?(0,L.jsxs)(`span`,{className:`flex items-center gap-1`,"data-no-expand":!0,children:[(0,L.jsx)(`span`,{className:`text-border`,children:`•`}),t.state.lastStatus===`error`&&t.state.lastError?(0,L.jsx)(kt,{delayDuration:200,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`span`,{className:`inline-flex items-center gap-0.5 text-orange-500 cursor-help`,children:(0,L.jsx)(sn,{className:`h-3 w-3`})})}),(0,L.jsx)(Et,{side:`top`,align:`start`,className:`max-w-xs text-xs bg-red-50 text-red-700 border-red-200`,children:t.state.lastError})]})}):(0,L.jsx)(`span`,{className:m(t.state.lastStatus===`ok`?`text-emerald-500`:`text-muted-foreground/70`),children:t.state.lastStatus===`ok`?`✓`:``}),(0,L.jsx)(`span`,{children:qQ(t.state.lastRunAt)})]}):null]}),(0,L.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,L.jsx)(`div`,{className:m(`text-sm text-muted-foreground break-words`,!a&&`line-clamp-2`),children:t.payload.message})}),a?(0,L.jsxs)(`div`,{className:`mt-3 ml-6 space-y-3 border-t border-border/60 pt-3`,children:[(0,L.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 gap-x-4 gap-y-2 text-xs`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-[11px] text-muted-foreground/70 mb-0.5`,children:f(`cronSessionLabel`)}),(0,L.jsx)(`div`,{className:`text-foreground/80 font-mono text-[11px] truncate`,title:t$(t),children:t$(t)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-[11px] text-muted-foreground/70 mb-0.5`,children:f(`cronNextRun`)}),(0,L.jsx)(`div`,{className:`text-foreground/80`,children:KQ(t.state.nextRunAt)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-[11px] text-muted-foreground/70 mb-0.5`,children:f(`cronLastRun`)}),(0,L.jsx)(`div`,{className:`text-foreground/80`,children:KQ(t.state.lastRunAt)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-[11px] text-muted-foreground/70 mb-0.5`,children:f(`cronLastStatus`)}),(0,L.jsx)(`div`,{className:m(`inline-flex items-center gap-1 font-medium`,t.state.lastStatus===`ok`?`text-emerald-600`:t.state.lastStatus===`error`?`text-red-600`:t.state.lastStatus===`skipped`?`text-amber-600`:`text-muted-foreground`),children:t.state.lastStatus??`-`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-[11px] text-muted-foreground/70 mb-0.5`,children:f(`cronCreatedAt`)}),(0,L.jsx)(`div`,{className:`text-foreground/80`,children:KQ(t.createdAt)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-[11px] text-muted-foreground/70 mb-0.5`,children:f(`cronId`)}),(0,L.jsx)(`div`,{className:`text-foreground/80 font-mono text-[11px] truncate`,title:t.id,children:t.id})]})]}),t.state.lastError?(0,L.jsx)(`div`,{className:`rounded-lg bg-red-50/80 border border-red-100 px-3 py-2 text-xs text-red-600 break-words`,children:t.state.lastError}):null]}):null]})})}function s$(){let[e,t]=(0,I.useState)(``),[n,r]=(0,I.useState)(`all`),i=VQ({all:!0}),a=UQ(),o=WQ(),s=GQ(),{confirm:c,ConfirmDialog:l}=cn(),u=(0,I.useMemo)(()=>(i.data?.jobs??[]).filter(t=>r$(t,e)).filter(e=>i$(e,n)),[i.data,e,n]),d=async e=>{await c({title:`${f(`cronDeleteConfirm`)}?`,description:e.name?`${e.name} (${e.id})`:e.id,variant:`destructive`,confirmLabel:f(`delete`)})&&a.mutate({id:e.id})},p=(e,t)=>{o.mutate({id:e.id,enabled:t})},h=async e=>{let t=!e.enabled;t&&!await c({title:`${f(`cronRunForceConfirm`)}?`,description:e.name?`${e.name} (${e.id})`:e.id,confirmLabel:f(`cronRunNow`)})||s.mutate({id:e.id,force:t})};return(0,L.jsxs)(de,{fullHeight:!0,children:[(0,L.jsx)(ce,{title:f(`cronPageTitle`),description:f(`cronPageDescription`),actions:(0,L.jsx)(be,{variant:`ghost`,size:`icon`,className:`h-8 w-8 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted`,onClick:()=>i.refetch(),children:(0,L.jsx)(En,{className:m(`h-4 w-4`,i.isFetching&&`animate-spin`)})})}),(0,L.jsx)(`div`,{className:`mb-4`,children:(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2.5 items-center`,children:[(0,L.jsxs)(`div`,{className:`relative flex-1 min-w-[240px]`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/70`}),(0,L.jsx)(g,{value:e,onChange:e=>t(e.target.value),placeholder:f(`cronSearchPlaceholder`),className:`pl-9`})]}),(0,L.jsx)(`div`,{className:`min-w-[140px]`,children:(0,L.jsxs)(Zt,{value:n,onValueChange:e=>r(e),children:[(0,L.jsx)(Ut,{className:`w-full`,children:(0,L.jsx)(It,{placeholder:f(`cronStatusLabel`)})}),(0,L.jsxs)(Kt,{children:[(0,L.jsx)(Yt,{value:`all`,children:f(`cronStatusAll`)}),(0,L.jsx)(Yt,{value:`enabled`,children:f(`cronStatusEnabled`)}),(0,L.jsx)(Yt,{value:`disabled`,children:f(`cronStatusDisabled`)})]})]})}),(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground ml-auto tabular-nums`,children:[u.length,` / `,i.data?.total??0]})]})}),(0,L.jsx)(`div`,{className:`flex-1 overflow-auto custom-scrollbar`,children:i.isLoading?(0,L.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-muted-foreground`,children:[(0,L.jsx)(En,{className:`h-5 w-5 animate-spin mb-3`}),(0,L.jsx)(`span`,{className:`text-sm`,children:f(`cronLoading`)})]}):u.length===0?(0,L.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-muted-foreground`,children:[(0,L.jsx)(`div`,{className:`mb-3 flex h-10 w-10 items-center justify-center rounded-xl bg-muted`,children:(0,L.jsx)(qo,{className:`h-5 w-5 text-muted-foreground/70`})}),(0,L.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:f(`cronEmpty`)}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground mt-1`,children:f(`cronEmptyGuide`)})]}):(0,L.jsx)(`div`,{className:`space-y-2`,children:u.map(e=>(0,L.jsx)(o$,{job:e,onDelete:d,onRun:h,onToggle:p},e.id))})}),(0,L.jsx)(l,{})]})}function c$({jobs:e}){let t=UQ(),{confirm:n,ConfirmDialog:r}=cn(),i=async e=>{await n({title:`${f(`cronDeleteConfirm`)}?`,description:e.name?`${e.name} (${e.id})`:e.id,confirmLabel:f(`delete`)})&&t.mutate({id:e.id})};return(0,L.jsxs)(`div`,{className:`h-full overflow-y-auto custom-scrollbar px-4 py-4`,children:[(0,L.jsxs)(`div`,{className:`mb-4`,children:[(0,L.jsx)(`div`,{className:`text-sm font-semibold text-gray-900`,children:f(`chatWorkspaceSessionCronJobs`)}),(0,L.jsxs)(`div`,{className:`mt-1 text-xs text-gray-500`,children:[f(`cronTotalLabel`),`: `,e.length]})]}),e.length===0?(0,L.jsx)(`div`,{className:`py-8 text-center text-sm text-gray-500`,children:f(`chatWorkspaceCronJobEmpty`)}):(0,L.jsx)(`div`,{className:`space-y-3`,children:e.map(e=>(0,L.jsxs)(`div`,{className:`rounded-lg border border-gray-200 bg-white px-3 py-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`div`,{className:`truncate text-sm font-semibold text-gray-900`,children:e.name||e.id}),(0,L.jsx)(`div`,{className:`mt-1 text-[11px] text-gray-400`,children:e.id})]}),(0,L.jsxs)(be,{type:`button`,variant:`subtle`,size:`sm`,className:`h-7 gap-1 rounded-lg px-2`,onClick:()=>void i(e),disabled:t.isPending,children:[(0,L.jsx)(kn,{className:`h-3.5 w-3.5`}),f(`delete`)]})]}),(0,L.jsxs)(`div`,{className:`mt-3 space-y-1.5 text-xs text-gray-500`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`span`,{className:`font-medium text-gray-700`,children:[f(`cronScheduleLabel`),`:`]}),` `,e$(e)]}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`span`,{className:`font-medium text-gray-700`,children:[f(`cronNextRun`),`:`]}),` `,KQ(e.state.nextRunAt)]}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`span`,{className:`font-medium text-gray-700`,children:[f(`cronLastRun`),`:`]}),` `,KQ(e.state.lastRunAt)]}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`span`,{className:`font-medium text-gray-700`,children:[f(`cronLastStatus`),`:`]}),` `,e.state.lastStatus??`-`]}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`span`,{className:`font-medium text-gray-700`,children:[f(`cronSessionLabel`),`:`]}),` `,t$(e)]})]}),(0,L.jsx)(`div`,{className:`mt-3 whitespace-pre-wrap break-words text-sm text-gray-700`,children:e.payload.message})]},e.id))}),(0,L.jsx)(r,{})]})}function l$({count:e,description:t,icon:n,onClick:r,title:i}){return(0,L.jsxs)(`button`,{type:`button`,className:`group flex w-full items-center gap-3 rounded-lg border border-gray-200/80 bg-white px-3 py-3 text-left transition-colors hover:border-gray-300 hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25`,onClick:r,children:[(0,L.jsx)(`span`,{className:`inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gray-100 text-gray-600`,children:n}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-2 text-sm font-medium text-gray-900`,children:[(0,L.jsx)(`span`,{className:`truncate`,children:i}),typeof e==`number`?(0,L.jsx)(`span`,{className:`rounded-full bg-gray-100 px-1.5 py-0.5 text-[10px] font-semibold tabular-nums text-gray-500`,children:e}):null]}),(0,L.jsx)(`span`,{className:`mt-0.5 block text-xs leading-5 text-gray-500`,children:t})]}),(0,L.jsx)(so,{className:`h-4 w-4 shrink-0 text-gray-300 transition-transform group-hover:translate-x-0.5 group-hover:text-gray-500`})]})}function u$({childSessionTabs:e,sessionCronJobs:t,sessionKey:n}){let r=Ac();return(0,L.jsx)(`div`,{className:`h-full overflow-auto bg-gray-50/45 px-4 py-5 custom-scrollbar`,children:(0,L.jsxs)(`div`,{className:`mx-auto max-w-xl`,children:[(0,L.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:f(`chatWorkspaceOverview`)}),(0,L.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-gray-500`,children:f(`chatWorkspaceOverviewDescription`)}),(0,L.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[(0,L.jsx)(l$,{count:e.length,description:f(`chatWorkspaceChildSessionsDescription`),icon:(0,L.jsx)(Lo,{className:`h-4 w-4`}),title:f(`chatWorkspaceChildSessions`),onClick:()=>{n&&r.chatThreadManager.openChildSessions(n)}}),(0,L.jsx)(l$,{count:t.length,description:f(`chatWorkspaceSessionCronJobsDescription`),icon:(0,L.jsx)(Za,{className:`h-4 w-4`}),title:f(`chatWorkspaceSessionCronJobs`),onClick:()=>{n&&r.chatThreadManager.openSessionCronPanel(n)}}),(0,L.jsx)(l$,{description:f(`chatWorkspaceProjectFilesDescription`),icon:(0,L.jsx)(Po,{className:`h-4 w-4`}),title:f(`chatWorkspaceProjectFiles`),onClick:()=>{n&&r.chatThreadManager.openProjectFiles(n)}})]})]})})}function d$({childSessionTabs:e}){let t=Ac();return(0,L.jsx)(`div`,{className:`h-full overflow-auto bg-gray-50/45 px-4 py-5 custom-scrollbar`,children:(0,L.jsxs)(`div`,{className:`mx-auto max-w-xl`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:f(`chatWorkspaceChildSessions`)}),(0,L.jsx)(`span`,{className:`rounded-full bg-gray-100 px-1.5 py-0.5 text-[10px] font-semibold tabular-nums text-gray-500`,children:e.length})]}),e.length===0?(0,L.jsx)(`div`,{className:`py-10 text-center text-sm text-gray-500`,children:f(`chatWorkspaceChildSessionsEmpty`)}):(0,L.jsx)(`div`,{className:`mt-4 space-y-2`,children:e.map(e=>(0,L.jsxs)(`button`,{type:`button`,className:`group flex w-full items-center gap-3 rounded-lg border border-gray-200/80 bg-white px-3 py-3 text-left transition-colors hover:border-gray-300 hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25`,onClick:()=>t.chatThreadManager.selectChildSessionDetail(e.sessionKey),children:[(0,L.jsx)(`span`,{className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gray-100 text-gray-600`,children:(0,L.jsx)(Lo,{className:`h-4 w-4`})}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`span`,{className:`block truncate text-sm font-medium text-gray-900`,children:e.title}),e.projectName||e.sessionTypeLabel?(0,L.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-gray-500`,children:[e.sessionTypeLabel,e.projectName].filter(Boolean).join(` · `)}):null]}),(0,L.jsx)(so,{className:`h-4 w-4 shrink-0 text-gray-300 transition-transform group-hover:translate-x-0.5 group-hover:text-gray-500`})]},e.sessionKey))})]})})}function f$({projectRoot:e,workingDir:t}){let n=Ac(),r=e??t,i=lc({path:r,includeFiles:!0,enabled:!!r});return r?(0,L.jsx)(kG,{browseQuery:i,onFileOpen:n.chatThreadManager.openFilePreview,renderStatus:({text:e,tone:t=`muted`})=>(0,L.jsx)(`div`,{className:m(`flex h-full items-center justify-center px-6 text-center text-sm`,t===`error`?`text-rose-600`:`text-gray-500`),children:e}),showRoot:!0}):(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center px-6 text-center text-sm text-gray-500`,children:f(`chatWorkspaceProjectFilesUnavailable`)})}function p$({value:e}){return(0,L.jsx)(`span`,{className:`inline-flex max-w-full shrink-0 items-center rounded border border-gray-200 bg-gray-50 px-1.5 py-0.5 text-[10px] font-medium text-gray-600`,children:(0,L.jsx)(`span`,{className:`truncate`,children:e})})}function m$({tab:e}){let t=[e.sessionTypeLabel,e.preferredModel,e.projectName].filter(e=>!!e?.trim());return t.length===0&&!e.projectRoot?null:(0,L.jsxs)(`div`,{className:`flex min-h-9 min-w-0 items-center gap-1.5 border-b border-gray-200/70 px-3 py-1.5 text-[11px] text-gray-500`,children:[t.map(e=>(0,L.jsx)(p$,{value:e},e)),e.projectRoot?(0,L.jsx)(`span`,{title:e.projectRoot,className:`min-w-0 flex-1 truncate rounded border border-gray-200 bg-gray-50 px-1.5 py-0.5 font-mono text-[10px] text-gray-500`,children:e.projectRoot}):null]})}function h$(){return(0,L.jsxs)(`div`,{className:`border-b border-gray-200/70 px-4 py-3`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-sm font-semibold text-gray-900`,children:[(0,L.jsx)(Zo,{className:`h-4 w-4 shrink-0 text-primary`}),(0,L.jsx)(`span`,{className:`truncate`,children:f(`chatWorkspaceSideChatDraftTitle`)})]}),(0,L.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-gray-500`,children:f(`chatWorkspaceSideChatDraftSubtitle`)})]})}function g$({activeSelection:e,childSessionTabs:t,filePreviewRefreshVersion:n,sessionKey:r,sessionCronJobs:i,sessionProjectRoot:a,sessionWorkingDir:o}){let s=Ac();return e.kind===`overview`?(0,L.jsx)(u$,{childSessionTabs:t,sessionCronJobs:i,sessionKey:r}):e.kind===`project-files`?(0,L.jsx)(f$,{projectRoot:a,workingDir:o}):e.kind===`child-sessions`?(0,L.jsx)(d$,{childSessionTabs:t}):e.kind===`side-chat-draft`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h$,{}),(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:(0,L.jsx)(BQ,{materializationContext:{kind:`child`,parentSessionKey:e.draft.parentSessionKey,inheritContext:!0},sessionKey:null,showWelcomeForDraft:!1,onSessionMaterialized:t=>s.chatThreadManager.materializeSideChatDraft({draftKey:e.draft.draftKey,sessionKey:t})})})]}):e.kind===`child-session`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m$,{tab:e.tab}),(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:(0,L.jsx)(BQ,{sessionKey:e.tab.sessionKey})})]}):e.kind===`file`?(0,L.jsx)(aK,{file:e.file,refreshVersion:n,sessionProjectRoot:a,sessionWorkingDir:o,onFileOpen:s.chatThreadManager.openFilePreview}):(0,L.jsx)(c$,{jobs:i})}function _$({sessionKey:e,childSessionTabs:t,activeChildSessionKey:n,activeSideChatDraft:r,workspaceFileTabs:i,activeWorkspaceFileKey:a,closedWorkspaceTabEntries:o,workspaceNavigationHistory:s=[],workspaceNavigationHistoryIndex:c=0,activePanelKind:l,sessionCronJobs:u=[],sessionProjectRoot:d,sessionWorkingDir:f,workspacePanelWidth:p=480,displayMode:h=`docked`}){let g=Ac(),_=pe(),[v,y]=(0,I.useState)(!1),[b,x]=(0,I.useState)(0),S=Sd(t),C=R(e=>e.optimisticReadAtBySessionKey),w=Od({activeChildSessionKey:n,activeSideChatDraft:r,activeWorkspaceFileKey:a,activePanelKind:l,childSessionTabs:S,workspaceFileTabs:i}),T={entries:s,index:c};(0,I.useEffect)(()=>{g.chatThreadManager.syncVisibleWorkspaceSelection(w)},[w,g]);let E=(0,I.useMemo)(()=>jd({resolvedChildTabs:S,activeSideChatDraft:r,closedWorkspaceTabEntries:o,workspaceFileTabs:i,activeSelection:w,optimisticReadAtBySessionKey:C,onSelectSession:g.chatThreadManager.selectChildSessionDetail,onSelectFile:g.chatThreadManager.selectWorkspaceFile,onOpenFileViewer:g.chatThreadManager.openWorkspaceFileViewer,onCloseTab:g.chatThreadManager.closeWorkspaceTab,onSelectOverview:()=>{e&&g.chatThreadManager.openWorkspaceOverview(e)},onSelectChildSessions:()=>{e&&g.chatThreadManager.openChildSessions(e)},onSelectProjectFiles:()=>{e&&g.chatThreadManager.openProjectFiles(e)},onSelectCronJobs:()=>{e&&g.chatThreadManager.openSessionCronPanel(e)}}),[w,r,o,C,g.chatThreadManager,S,e,i]);if(!w)return null;let D=h===`docked`&&v,O=h===`overlay`||D,k=w.kind===`file`&&w.file.viewMode===`preview`?w.file:null,A=k?()=>{_.invalidateQueries({queryKey:YG({path:k.path,basePath:f})}),_.invalidateQueries({queryKey:cc({path:k.path,basePath:f,includeFiles:!0})}),x(e=>e+1)}:void 0;return(0,L.jsxs)(Tt,{"data-testid":`chat-session-workspace-panel`,className:m(O?`bg-white`:`hidden border-gray-200/70 bg-white/95 backdrop-blur-sm md:flex`,D?`shadow-xl`:null),defaultWidth:p,width:p,minWidth:360,maxWidth:860,onWidthCommit:g.chatThreadManager.setWorkspacePanelWidth,overlay:O,overlayScope:D?`container`:`viewport`,children:[(0,L.jsx)(Ih,{tabs:E,canGoBack:Ru(T),canGoForward:zu(T),isMaximized:D,onGoBack:g.chatThreadManager.goBackWorkspacePanel,onGoForward:g.chatThreadManager.goForwardWorkspacePanel,onRefreshFile:A,onToggleMaximize:h===`docked`?()=>y(e=>!e):void 0,onClose:g.chatThreadManager.closeWorkspacePanel}),(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-white`,children:(0,L.jsx)(g$,{activeSelection:w,childSessionTabs:S,filePreviewRefreshVersion:b,sessionKey:e,sessionCronJobs:u,sessionProjectRoot:d,sessionWorkingDir:f})})]})}var v$=[];function y$(e,t){let n=gu(e=>e.snapshot.sessionsQuery?.data?.sessions??v$),r=(0,I.useMemo)(()=>{let r=e.childSessionTabs.filter(e=>e.parentSessionKey===t),i=new Set(r.map(e=>e.sessionKey));return[...r,...bl(n).filter(e=>e.parentSessionId===t&&!i.has(e.key)).map(e=>({sessionKey:e.key,parentSessionKey:t}))]},[t,n,e.childSessionTabs]),i=(0,I.useMemo)(()=>e.workspaceFileTabs.filter(e=>e.parentSessionKey===t),[t,e.workspaceFileTabs]),a=e.activeSideChatDraft?.parentSessionKey===t?e.activeSideChatDraft:null,o=VQ({all:!0});return{childSessionTabs:r,activeSideChatDraft:a,workspaceFileTabs:i,sessionCronJobs:(0,I.useMemo)(()=>(o.data?.jobs??[]).filter(e=>n$(e,t)),[o.data?.jobs,t]),showWorkspacePanel:e.workspacePanelParentKey===t&&e.activeWorkspacePanelKind!=null}}function b$({layoutMode:e,sessionKey:t}){let n=sd(e=>e.snapshot),r=Ou(t),{childSessionTabs:i,activeSideChatDraft:a,workspaceFileTabs:o,sessionCronJobs:s,showWorkspacePanel:c}=y$(n,t);return c?(0,L.jsx)(_$,{sessionKey:t,childSessionTabs:i,activeChildSessionKey:n.activeChildSessionKey??null,activeSideChatDraft:a,workspaceFileTabs:o,activeWorkspaceFileKey:n.activeWorkspaceFileKey??null,closedWorkspaceTabEntries:n.closedWorkspaceTabEntries,workspaceNavigationHistory:n.workspaceNavigationHistory,workspaceNavigationHistoryIndex:n.workspaceNavigationHistoryIndex,activePanelKind:n.activeWorkspacePanelKind??null,sessionCronJobs:s,sessionProjectRoot:r?.projectRoot??null,sessionWorkingDir:r?.workingDir??r?.projectRoot??null,workspacePanelWidth:n.workspacePanelWidth,displayMode:e===`mobile`?`overlay`:`docked`}):null}function x$({layoutMode:e=`desktop`,onBackToList:t}){let n=Ac(),r=Du(),i=R(e=>e.snapshot.selectedSessionKey),a=(0,I.useCallback)(e=>{n.chatUiManager.isAtChatRoot()&&n.chatUiManager.goToSession(e,{replace:!0})},[n]);return r?(0,L.jsxs)(`section`,{className:`relative flex-1 min-h-0 flex overflow-hidden bg-background`,children:[(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,L.jsx)(vd,{}),(0,L.jsx)(_d,{layoutMode:e,onBackToList:t}),(0,L.jsx)(BQ,{consumeDraftIntent:!0,sessionKey:i,onSessionMaterialized:a})]}),(0,L.jsx)(b$,{layoutMode:e,sessionKey:i})]}):(0,L.jsx)(bd,{})}function S$(){let e=rc(),[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(``),[a,o]=(0,I.useState)(null),s=e=>{n(e.key),i(e.label?.trim()??``)},c=()=>{n(null),i(``),o(null)};return{editingSessionKey:t,draftLabel:r,savingSessionKey:a,setDraftLabel:i,startEditingSessionLabel:s,cancelEditingSessionLabel:c,saveSessionLabel:async t=>{let n=r.trim();if(n===(t.label?.trim()??``)){c();return}o(t.key);try{await e({sessionKey:t.key,label:n||null}),c()}catch{o(null)}}}}var C$=`nextclaw.ui.theme`,w$=`work`,T$=[{value:`work`,labelKey:`themeWork`,appearance:`light`},{value:`night`,labelKey:`themeNight`,appearance:`dark`},{value:`natural`,labelKey:`themeNatural`,appearance:`light`},{value:`minimal`,labelKey:`themeMinimal`,appearance:`light`},{value:`warm`,labelKey:`themeWarm`,appearance:`light`},{value:`cool`,labelKey:`themeCool`,appearance:`light`},{value:`dawn`,labelKey:`themeDawn`,appearance:`light`},{value:`graphite`,labelKey:`themeGraphite`,appearance:`light`},{value:`probe`,labelKey:`themeProbe`,appearance:`light`}],E$=T$.map(({value:e})=>e),D$=T$.map(({value:e,labelKey:t})=>({value:e,labelKey:t}));function O$(e){return typeof e==`string`?E$.includes(e)?e:e===`leaf`?`warm`:null:null}function k$(e){return T$.find(t=>t.value===e)?.appearance??`light`}var A$=new class{constructor(){this.activeTheme=w$,this.initialized=!1,this.listeners=new Set,this.resolveInitialTheme=()=>{if(typeof window>`u`)return w$;try{let e=O$(window.localStorage.getItem(C$));if(e)return e}catch{}return w$},this.initializeTheme=()=>(this.initialized||=(this.activeTheme=this.resolveInitialTheme(),this.applyThemeAttribute(this.activeTheme),!0),this.activeTheme),this.getTheme=()=>this.initialized?this.activeTheme:this.initializeTheme(),this.setTheme=e=>{this.initializeTheme(),e!==this.activeTheme&&(this.activeTheme=e,this.applyThemeAttribute(this.activeTheme),this.saveTheme(this.activeTheme),this.listeners.forEach(e=>e(this.activeTheme)))},this.subscribeThemeChange=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.applyThemeAttribute=e=>{if(typeof document>`u`)return;let t=k$(e);document.documentElement.setAttribute(`data-theme`,e),document.documentElement.setAttribute(`data-theme-appearance`,t),document.documentElement.style.colorScheme=t},this.saveTheme=e=>{if(!(typeof window>`u`))try{window.localStorage.setItem(C$,e)}catch{}}}};function j$(){return A$.initializeTheme()}function M$(){return A$.getTheme()}function N$(e){A$.setTheme(e)}function P$(e){return A$.subscribeThemeChange(e)}var F$=`nextclaw-pwa-install-banner-dismissed`,I$=`nextclaw-pwa-install-banner-dismissed-until`;function L$(){let e=B$();return e?e.getItem(`nextclaw-pwa-install-banner-dismissed`)===`1`?!0:V$(e):!1}function R$(){let e=B$();e?.setItem(F$,`1`),e?.removeItem(I$)}function z$(){let e=B$();e?.removeItem(F$),e?.removeItem(I$)}function B$(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function V$(e){let t=e.getItem(I$);if(!t)return!1;let n=Number.parseInt(t,10);return e.removeItem(I$),!Number.isFinite(n)||n<=Date.now()?!1:(e.setItem(F$,`1`),!0)}function H$(){return{initialized:!1,installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`,dismissedInstallPrompt:L$()}}var U$=p(()=>H$()),W$=new class{constructor(){this.started=!1,this.deferredPrompt=null,this.displayModeMediaQuery=null,this.start=()=>{this.started||typeof window>`u`||(this.started=!0,window.addEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.addEventListener(`appinstalled`,this.handleAppInstalled),typeof window.matchMedia==`function`&&(this.displayModeMediaQuery=window.matchMedia(`(display-mode: standalone)`),this.bindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged)),this.refreshState())},this.stop=()=>{!this.started||typeof window>`u`||(window.removeEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.removeEventListener(`appinstalled`,this.handleAppInstalled),this.displayModeMediaQuery&&=(this.unbindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged),null),this.deferredPrompt=null,this.started=!1)},this.resetForTests=()=>{this.stop(),U$.setState(H$())},this.refreshState=()=>{let e=this.resolveInstallability();U$.setState(t=>({...t,initialized:!0,installability:e.installability,installMethod:e.installMethod,blockedReason:e.blockedReason,dismissedInstallPrompt:L$()}))},this.dismissInstallPrompt=()=>{R$(),U$.setState({dismissedInstallPrompt:!0})},this.promptInstall=async()=>{let e=this.resolveInstallability();if(e.installability!==`available`)return`unavailable`;if(e.installMethod===`manual`||!this.deferredPrompt)return`manual`;this.deferredPrompt.prompt();let t=await this.deferredPrompt.userChoice;return this.deferredPrompt=null,t.outcome===`accepted`?(z$(),this.refreshState(),P.success(f(`pwaInstallAccepted`)),`accepted`):(this.dismissInstallPrompt(),this.refreshState(),`dismissed`)},this.handleBeforeInstallPrompt=e=>{e.preventDefault(),this.deferredPrompt=e,this.refreshState()},this.handleAppInstalled=()=>{this.deferredPrompt=null,z$(),U$.setState({dismissedInstallPrompt:!0}),P.success(f(`pwaInstalledToast`)),this.refreshState()},this.handleDisplayModeChanged=()=>{this.refreshState()},this.resolveInstallability=()=>this.isDevelopmentServer()?{installability:`unsupported`,installMethod:`none`,blockedReason:`dev-server`}:this.hasDesktopHost()?{installability:`suppressed`,installMethod:`none`,blockedReason:`desktop-host`}:this.isStandalone()?{installability:`installed`,installMethod:`none`,blockedReason:null}:this.hasInstallSurfaceSupport()?this.isEligibleInstallContext()?{installability:`available`,installMethod:this.deferredPrompt?`prompt`:`manual`,blockedReason:null}:{installability:`unsupported`,installMethod:`none`,blockedReason:`insecure-context`}:{installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`},this.hasDesktopHost=()=>typeof window<`u`&&!!window.nextclawDesktop,this.hasInstallSurfaceSupport=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&`serviceWorker`in navigator,this.isEligibleInstallContext=()=>typeof window>`u`?!1:window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>typeof window<`u`&&!1,this.isStandalone=()=>{if(typeof window>`u`)return!1;let e=window.navigator;return typeof window.matchMedia==`function`&&window.matchMedia(`(display-mode: standalone)`).matches||e.standalone===!0},this.bindDisplayModeListener=(e,t)=>{if(`addEventListener`in e){e.addEventListener(`change`,t);return}e.addListener?.(t)},this.unbindDisplayModeListener=(e,t)=>{if(`removeEventListener`in e){e.removeEventListener(`change`,t);return}e.removeListener?.(t)}}};function G$(){let e=U$(e=>e.installability);return(0,L.jsx)(`span`,{className:m(`inline-flex items-center rounded-full border px-3 py-1 text-xs font-medium`,e===`installed`?`bg-emerald-50 text-emerald-700 border-emerald-200`:e===`available`?`bg-amber-50 text-amber-700 border-amber-200`:`bg-gray-100 text-gray-600 border-gray-200`),children:K$(e)})}function K$(e){return f(e===`available`?`pwaInstallStatusAvailable`:e===`installed`?`pwaInstallStatusInstalled`:e===`suppressed`?`pwaInstallStatusDesktopHost`:`pwaInstallStatusUnavailable`)}function q$(e,t,n){return f(e===`installed`?`pwaInstallCardInstalled`:e===`suppressed`?`pwaInstallCardSuppressed`:e===`available`&&t===`prompt`?`pwaInstallCardPrompt`:e===`available`?`pwaInstallCardManual`:n===`insecure-context`?`pwaInstallCardInsecureContext`:n===`dev-server`?`pwaInstallCardDevServer`:`pwaInstallCardUnsupported`)}function J$(){let e=U$(e=>e.installability),t=U$(e=>e.installMethod),n=U$(e=>e.blockedReason);return(0,L.jsxs)(C,{children:[(0,L.jsxs)(D,{className:`flex flex-row items-start justify-between gap-4 space-y-0`,children:[(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(ue,{children:f(`pwaInstallTitle`)}),(0,L.jsx)(Re,{children:f(`pwaInstallDescription`)})]}),(0,L.jsx)(G$,{})]}),(0,L.jsxs)(O,{className:`space-y-4`,children:[(0,L.jsx)(`div`,{className:`rounded-2xl border border-gray-200 bg-gray-50/90 p-4`,children:(0,L.jsx)(`p`,{className:`text-sm leading-6 text-gray-700`,children:q$(e,t,n)})}),e===`available`&&t===`prompt`?(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,L.jsxs)(be,{type:`button`,className:`gap-2`,onClick:()=>{W$.promptInstall()},children:[(0,L.jsx)(ln,{className:`h-4 w-4`}),f(`pwaInstallAction`)]}),(0,L.jsx)(`p`,{className:`text-sm text-gray-500`,children:f(`pwaInstallPromptHint`)})]}):null,e===`available`&&t===`manual`?(0,L.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-dashed border-gray-300 bg-white p-4`,children:[(0,L.jsx)(vs,{className:`mt-0.5 h-4 w-4 text-gray-500`}),(0,L.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:f(`pwaInstallManualHint`)})]}):null]})]})}function Y$(){let e=U$(e=>e.installability),t=U$(e=>e.installMethod),n=U$(e=>e.dismissedInstallPrompt);return e!==`available`||t!==`prompt`||n?null:(0,L.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-50 w-[min(420px,calc(100vw-2rem))] rounded-[26px] border border-gray-200 bg-white/95 p-5 shadow-2xl backdrop-blur-xl`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:f(`pwaInstallBannerTitle`)}),(0,L.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:f(`pwaInstallBannerDescription`)})]}),(0,L.jsx)(`button`,{type:`button`,"aria-label":f(`pwaInstallDismiss`),className:`rounded-full p-1 text-gray-400 transition hover:bg-gray-100 hover:text-gray-600`,onClick:()=>{W$.dismissInstallPrompt()},children:(0,L.jsx)(An,{className:`h-4 w-4`})})]}),(0,L.jsxs)(`div`,{className:`mt-4 flex items-center gap-3`,children:[(0,L.jsxs)(be,{type:`button`,size:`sm`,className:`gap-2`,onClick:()=>{W$.promptInstall()},children:[(0,L.jsx)(ln,{className:`h-4 w-4`}),f(`pwaInstallAction`)]}),(0,L.jsx)(be,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{W$.dismissInstallPrompt()},children:f(`pwaInstallDismiss`)})]})]})}var X$=new class{constructor(){this.started=!1,this.registration=null,this.start=async()=>{if(!(this.started||typeof window>`u`)&&(this.started=!0,!(!(`serviceWorker`in navigator)||!this.isEligibleInstallContext()))){if(this.isDevelopmentServer()){await this.cleanupDevelopmentRegistrations();return}try{this.registration=await navigator.serviceWorker.register(`/sw.js`)}catch{return}}},this.stop=()=>{!this.started||typeof window>`u`||!(`serviceWorker`in navigator)||(this.started=!1,this.registration=null)},this.isEligibleInstallContext=()=>window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>!1,this.cleanupDevelopmentRegistrations=async()=>{if(typeof navigator.serviceWorker.getRegistrations!=`function`)return;let e=(await navigator.serviceWorker.getRegistrations()).filter(e=>[e.active?.scriptURL,e.installing?.scriptURL,e.waiting?.scriptURL].filter(e=>!!e).some(e=>e.endsWith(`/sw.js`)));await Promise.all(e.map(async e=>await e.unregister())),e.length>0&&await this.clearNextClawCaches()},this.clearNextClawCaches=async()=>{if(typeof window>`u`||!(`caches`in window)||typeof caches.keys!=`function`)return;let e=await caches.keys();await Promise.all(e.filter(e=>e.startsWith(`nextclaw-ui-`)).map(async e=>await caches.delete(e)))}}},Z$=!1;function Q$(){Z$||typeof window>`u`||(Z$=!0,W$.start(),X$.start())}var $$={natural:`#FAF9F7`,work:`#FFFFFF`,minimal:`#FFFFFF`,warm:`#FAF8F4`,cool:`#F8FAFC`,dawn:`#FAF7F4`,graphite:`#F8F8F7`,night:`#101318`,probe:`#FEFCF6`},e1=new class{constructor(){this.syncTheme=e=>{if(typeof document>`u`)return;let t=$$[e];this.updateThemeMeta(t),this.updateSurfaceBackgrounds(t),document.documentElement.style.colorScheme=k$(e)},this.syncCurrentTheme=()=>{if(typeof document>`u`)return;let e=document.documentElement.getAttribute(`data-theme`);this.syncTheme(O$(e)??`work`)},this.updateThemeMeta=e=>{let t=document.querySelector(`meta[name="theme-color"]`);t instanceof HTMLMetaElement&&(t.content=e)},this.updateSurfaceBackgrounds=e=>{document.documentElement.style.backgroundColor=e,document.body.style.backgroundColor=e;let t=document.getElementById(`root`);t&&(t.style.backgroundColor=e)}}},t1=(0,I.createContext)(null);function n1({children:e}){let[t,n]=(0,I.useState)(()=>j$());(0,I.useEffect)(()=>{e1.syncTheme(t)},[t]),(0,I.useEffect)(()=>P$(e=>{n(e)}),[]);let r=(0,I.useCallback)(e=>{N$(e),n(M$())},[]),i=(0,I.useMemo)(()=>({theme:t,setTheme:r}),[t,r]);return(0,L.jsx)(t1.Provider,{value:i,children:e})}function r1(){let e=(0,I.useContext)(t1);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}function i1({sessionKey:e,draftLabel:t,isSaving:n,onDraftLabelChange:r,onSave:i,onCancel:a}){return(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(g,{value:t,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),i()):e.key===`Escape`&&(e.preventDefault(),a())},placeholder:f(`sessionsLabelPlaceholder`),className:`h-8 rounded-lg border-gray-300 bg-white text-xs`,autoFocus:!0,disabled:n}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,L.jsx)(`div`,{className:`min-w-0 text-[11px] text-gray-400 truncate`,children:e}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,L.jsx)(St,{icon:(0,L.jsx)(en,{className:`h-3.5 w-3.5`}),label:f(`save`),tooltip:!1,onClick:()=>void i(),disabled:n}),(0,L.jsx)(St,{icon:(0,L.jsx)(An,{className:`h-3.5 w-3.5`}),label:f(`cancel`),tooltip:!1,onClick:a,disabled:n})]})]})]})}function a1({active:e,showUnreadDot:t,runStatus:n,context:r,isPinned:i,title:a,previewText:o,trailingText:s,agentId:c,agentLabel:l,agentAvatarUrl:u,childSessionCount:d=0,onSelect:p,onOpenChildSessions:h,onStartEditing:g,onTogglePinned:_}){return(0,L.jsxs)(`div`,{className:`group/session relative`,children:[(0,L.jsxs)(`button`,{type:`button`,onClick:p,className:`w-full text-left`,children:[(0,L.jsx)(`div`,{className:m(`flex min-h-6 min-w-0 items-center`,d>0&&h?`pr-20`:`pr-12`),children:(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[c?.trim()&&c.trim().toLowerCase()!==`main`?(0,L.jsx)(ud,{agentId:c,displayName:l,avatarUrl:u,className:`h-5 w-5 shrink-0`}):null,(0,L.jsx)(`span`,{className:`truncate leading-6 font-medium`,children:a}),r.label?(0,L.jsx)(`span`,{className:m(`shrink-0 rounded-full border px-1.5 py-0.5 text-[10px] font-semibold leading-none`,e?`border-gray-300 bg-white/80 text-gray-700`:`border-gray-200 bg-gray-100 text-gray-500`),children:r.label}):null,r.icon?(0,L.jsx)(`span`,{className:`inline-flex h-5 w-5 shrink-0 items-center justify-center`,children:(0,L.jsx)(cu,{icon:r.icon,className:e?`text-gray-700`:`text-gray-500`})}):null]})}),(0,L.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-[11px] text-gray-400`,children:[(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:o}),t?(0,L.jsx)(`span`,{"aria-label":f(`chatSessionUnread`),className:`ml-auto h-2 w-2 shrink-0 rounded-full bg-primary`}):(0,L.jsx)(`span`,{className:`ml-auto shrink-0`,children:s})]})]}),d>0&&h?(0,L.jsxs)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),h()},className:`pointer-events-none absolute right-12 top-0 inline-flex h-6 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium text-muted-foreground opacity-0 transition-colors hover:bg-black/10 hover:text-foreground group-hover/session:pointer-events-auto group-hover/session:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100`,"aria-label":f(`chatSessionOpenChildSessions`),title:f(`chatSessionOpenChildSessions`),children:[(0,L.jsx)(Lo,{className:`h-3.5 w-3.5`}),(0,L.jsx)(`span`,{children:d})]}):null,n?(0,L.jsx)(`span`,{className:`absolute right-0 top-0 inline-flex h-6 w-6 items-center justify-center transition-opacity group-hover/session:opacity-0`,children:(0,L.jsx)(uu,{status:n})}):null,(0,L.jsxs)(`div`,{className:`pointer-events-none absolute right-0 top-0 flex h-6 items-center gap-0.5 opacity-0 transition-opacity group-hover/session:pointer-events-auto group-hover/session:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100`,children:[(0,L.jsx)(St,{size:`sm`,tone:`strong`,icon:(0,L.jsx)(wt,{className:m(`h-3.5 w-3.5`,i&&`fill-current text-foreground`)}),label:f(i?`chatSidebarUnpinSession`:`chatSidebarPinSession`),tooltipSide:`right`,onClick:e=>{e.stopPropagation(),_()}}),(0,L.jsx)(St,{size:`sm`,tone:`strong`,icon:(0,L.jsx)(cs,{className:`h-3.5 w-3.5`}),label:f(`edit`),tooltipSide:`right`,onClick:e=>{e.stopPropagation(),g()}})]})]})}function o1({sessionKey:e,active:t,showUnreadDot:n,runStatus:r,context:i,isPinned:a,title:o,previewText:s,trailingText:c,agentId:l,agentLabel:u,agentAvatarUrl:d,childSessionCount:f,isEditing:p,draftLabel:h,isSaving:g,onSelect:_,onOpenChildSessions:v,onStartEditing:y,onDraftLabelChange:b,onSave:x,onCancel:S,onTogglePinned:C}){return(0,L.jsx)(`div`,{className:m(`w-full rounded-xl px-3 py-2.5 text-left transition-all text-[13px]`,t?`bg-gray-200/80 text-gray-900 font-semibold shadow-sm`:`text-gray-700 hover:bg-gray-200/60 hover:text-gray-900`),children:p?(0,L.jsx)(i1,{sessionKey:e,draftLabel:h,isSaving:g,onDraftLabelChange:b,onSave:x,onCancel:S}):(0,L.jsx)(a1,{active:t,showUnreadDot:n,runStatus:r,context:i,isPinned:a,title:o,previewText:s,trailingText:c,agentId:l,agentLabel:u,agentAvatarUrl:d,onSelect:_,childSessionCount:f,onOpenChildSessions:v,onStartEditing:y,onTogglePinned:C})})}function s1(e){let{item:t,selectedSessionKey:n,optimisticReadAtBySessionKey:r,agentsById:i,childSessionsByParentKey:a,editingSessionKey:o,draftLabel:s,savingSessionKey:c,sessionTypeOptions:l,isPinned:u,sessionTitle:d,onSelectSession:f,onOpenChildSessions:p,onStartEditingSessionLabel:m,onDraftLabelChange:h,onSaveSessionLabel:g,onCancelEditingSessionLabel:_,onTogglePinned:v}=e,{session:y,runStatus:b}=t,x=n===y.key,S=r[y.key],C=S&&y.readAt?S.localeCompare(y.readAt)>0?S:y.readAt:S??y.readAt,w=a.get(y.key)??[],T=y.agentId?i.get(y.agentId)?.displayName??y.agentId:null,E=Mc(y)??`${T?.trim()?`${T} · `:``}${y.messageCount}`;return(0,L.jsx)(o1,{sessionKey:y.key,active:x,showUnreadDot:Dl({active:x,lastMessageAt:y.lastMessageAt,readAt:C,runStatus:b}),runStatus:b,context:iu(y,l),isPinned:u,title:d(y),previewText:E,trailingText:Ic(y.lastMessageAt??y.createdAt),agentId:y.agentId??null,agentLabel:T,agentAvatarUrl:y.agentId?i.get(y.agentId)?.avatarUrl??null:null,childSessionCount:w.length,isEditing:o===y.key,draftLabel:s,isSaving:c===y.key,onSelect:()=>f(y.key),onOpenChildSessions:()=>p(y.key,w[0]?.session.key??null),onStartEditing:()=>m(y),onDraftLabelChange:h,onSave:()=>g(y),onCancel:_,onTogglePinned:v})}var c1={maxHeight:Ze(`18rem`)};function l1({className:e,onSelect:t,options:n,selectedSessionType:r,title:i=f(`chatSessionTypeLabel`),titleClassName:a}){return(0,L.jsxs)(`div`,{className:m(`space-y-1 overflow-y-auto overscroll-contain`,e),style:c1,children:[(0,L.jsx)(`div`,{className:m(`px-3 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-[0.18em] text-gray-400`,a),children:i}),n.map(e=>(0,L.jsx)(oX,{disabled:e.ready===!1,option:e,selected:e.value===r,onSelect:()=>t(e.value)},e.value))]})}var u1=`w-[56px]`,d1=`px-2`,f1=`h-9 w-9 rounded-xl`,p1=`h-4 w-4`,m1=`space-y-1`,h1=`gap-1`,g1=`[mask-image:linear-gradient(to_bottom,black_calc(100%_-_28px),transparent)] [-webkit-mask-image:linear-gradient(to_bottom,black_calc(100%_-_28px),transparent)]`,_1=`text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 active:bg-gray-200/80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,v1=`bg-gray-200/80 text-gray-900`,y1=`brandSoft`,b1={neutralSurface:{leftVariant:`ghost`,leftClassName:`bg-card text-foreground shadow-none transition-[background-color,color,box-shadow] hover:bg-accent hover:text-accent-foreground hover:shadow-sm active:bg-accent`,rightClassName:`bg-card text-muted-foreground shadow-none transition-[background-color,color,box-shadow] hover:bg-accent hover:text-accent-foreground hover:shadow-sm active:bg-accent`},brandSoft:{leftVariant:`ghost`,leftClassName:`bg-primary/10 text-primary shadow-none ring-1 ring-primary/10 transition-[background-color,color,box-shadow] hover:bg-primary/15 hover:text-primary-700 hover:shadow-sm active:bg-primary/20`,rightClassName:`bg-primary/10 text-primary shadow-none ring-1 ring-primary/10 transition-[background-color,color,box-shadow] hover:bg-primary/15 hover:text-primary-700 hover:shadow-sm active:bg-primary/20`},brandTextSurface:{leftVariant:`ghost`,leftClassName:`bg-card text-primary shadow-none transition-[background-color,color,box-shadow] hover:bg-accent hover:text-primary-700 hover:shadow-sm active:bg-primary/15`,rightClassName:`bg-card text-primary shadow-none transition-[background-color,color,box-shadow] hover:bg-accent hover:text-primary-700 hover:shadow-sm active:bg-primary/15`},brandSolid:{leftVariant:`primary`,leftClassName:``,rightClassName:`bg-primary text-primary-foreground shadow-sm hover:bg-primary-600 hover:text-primary-foreground active:bg-primary-700`}};function x1(e){let t=e.sessionTypeOptions.find(t=>t.value===e.defaultSessionType);return[...t?[t]:[],...e.nonDefaultSessionTypeOptions]}function S1({option:e}){return e?.icon?.src?(0,L.jsx)(`span`,{className:`inline-flex h-4 w-4 shrink-0 items-center justify-center`,children:(0,L.jsx)(cu,{icon:{kind:`runtime-image`,src:e.icon.src,alt:e.icon.alt??null,name:e.label},className:`h-4 w-4`})}):(0,L.jsx)(no,{className:`h-4 w-4 shrink-0`})}function C1(e){let{query:t,selectedNewSessionType:n,selectedNewSessionTypeOption:r,sessionTypeOptions:i,isCreateMenuOpen:a,onCreateMenuOpenChange:o,onCreateSession:s,onSelectNewSessionType:c,onQueryChange:l,collapsed:u=!1}=e,d=i.length>1,p=b1[y1];return u?(0,L.jsx)(`div`,{className:`px-2 pb-2`,children:(0,L.jsxs)(`div`,{className:m(`flex flex-col items-center`,h1),children:[(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:p1}),label:f(`chatSidebarNewTask`),className:m(f1,_1),onClick:()=>{o(!1),s(n)}}),d?(0,L.jsxs)(it,{open:a,onOpenChange:o,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(St,{icon:(0,L.jsx)(S1,{option:r}),label:f(`chatSessionTypeLabel`),className:m(f1,_1)})}),(0,L.jsx)(nt,{align:`start`,side:`right`,className:`w-56 rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-[0_24px_60px_-28px_rgba(15,23,42,0.38)]`,children:(0,L.jsx)(l1,{options:i,selectedSessionType:n,onSelect:e=>{c(e),o(!1)}})})]}):null]})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`px-4 pb-3`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(be,{variant:p.leftVariant,className:m(`min-w-0 rounded-xl`,p.leftClassName,d?`flex-1 rounded-r-md`:`w-full`),onClick:()=>{o(!1),s(n)},children:[(0,L.jsx)(Tn,{className:`mr-2 h-4 w-4`}),f(`chatSidebarNewTask`)]}),d?(0,L.jsxs)(it,{open:a,onOpenChange:o,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(St,{icon:(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,L.jsx)(S1,{option:r}),(0,L.jsx)(Nt,{className:`h-3 w-3 opacity-60`})]}),label:f(`chatSessionTypeLabel`),tooltip:f(`chatSessionTypeLabel`),className:m(`h-9 w-12 shrink-0 rounded-xl rounded-l-md`,p.rightClassName)})}),(0,L.jsx)(nt,{align:`end`,className:`w-56 rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-[0_24px_60px_-28px_rgba(15,23,42,0.38)]`,children:(0,L.jsx)(l1,{options:i,selectedSessionType:n,onSelect:e=>{c(e),o(!1)}})})]}):null]})}),(0,L.jsx)(`div`,{className:`px-4 pb-3`,children:(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground/70`}),(0,L.jsx)(g,{value:t,onChange:e=>l(e.target.value),placeholder:f(`chatSidebarSearchPlaceholder`),className:`h-9 rounded-lg pl-8 text-xs`})]})})]})}function w1(e){let{query:t,defaultSessionType:n,sessionTypeOptions:r,nonDefaultSessionTypeOptions:i,isCreateMenuOpen:a,onCreateMenuOpenChange:o,onCreateSession:s,onQueryChange:c}=e,l=x1({defaultSessionType:n,sessionTypeOptions:r,nonDefaultSessionTypeOptions:i}),u=l.length>1;return(0,L.jsx)(`div`,{className:`px-4 pb-2 pt-1`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,L.jsx)(mt,{className:`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground/70`}),(0,L.jsx)(g,{value:t,onChange:e=>c(e.target.value),placeholder:f(`chatSidebarSearchPlaceholder`),className:`h-9 rounded-full border-transparent bg-muted pl-9 pr-3 text-[13px] shadow-none focus:border-border focus:bg-card`})]}),u?(0,L.jsxs)(it,{open:a,onOpenChange:o,children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-4 w-4`}),label:f(`chatSidebarNewTask`),tooltip:!1,className:`h-9 w-9 shrink-0 rounded-full bg-muted text-foreground shadow-none hover:bg-accent hover:text-accent-foreground`})}),(0,L.jsx)(nt,{align:`end`,className:`w-60 rounded-3xl border border-border bg-popover p-2 text-popover-foreground shadow-[0_24px_70px_-30px_rgba(15,23,42,0.45)]`,children:(0,L.jsx)(l1,{options:l,selectedSessionType:n,title:f(`chatSidebarNewTask`),titleClassName:`pb-1.5 text-[11px] font-medium normal-case tracking-normal`,onSelect:e=>{s(e),o(!1)}})})]}):(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-4 w-4`}),label:f(`chatSidebarNewTask`),className:`h-9 w-9 shrink-0 rounded-full bg-muted text-foreground shadow-none hover:bg-accent hover:text-accent-foreground`,onClick:()=>s(n)})]})})}function T1(){return Fe({queryKey:[`app-meta`],queryFn:se,staleTime:1/0})}var E1={healthy:`bg-emerald-500 shadow-[0_0_0_3px_rgba(16,185,129,0.14)]`,attention:`bg-amber-400 shadow-[0_0_0_3px_rgba(251,191,36,0.16)]`,inactive:`bg-muted-foreground/45 shadow-[0_0_0_3px_rgba(156,163,175,0.12)]`};function D1(){let e=Oe(),t=e.actionLabel===f(`runtimeStatusRestartAction`),n=()=>{e.tone!==`healthy`&&j.requestRuntimeBootstrapProbeNow()},r=async()=>{if(t)try{let e=await j.runRuntimeControlAction(`restart-service`);P.success(e.message)}catch(e){let t=e instanceof Error?e.message:f(`runtimeControlActionFailed`);P.error(`${f(`runtimeControlActionFailed`)}: ${t}`)}};return(0,L.jsxs)(it,{children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-full p-0.5 transition-transform hover:scale-105`,"aria-label":e.title,title:e.title,"data-testid":`runtime-status-entry`,onClick:n,children:(0,L.jsx)(`span`,{className:m(`h-2.5 w-2.5 rounded-full`,E1[e.tone])})})}),(0,L.jsxs)(nt,{align:`start`,sideOffset:10,className:`w-[290px] space-y-3 rounded-2xl border border-border bg-popover p-4 text-popover-foreground`,children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:e.title}),(0,L.jsx)(`p`,{className:`text-xs leading-5 text-muted-foreground`,children:e.description})]}),e.reasonLines.length>0?(0,L.jsx)(`div`,{className:`space-y-2`,children:e.reasonLines.map(e=>(0,L.jsx)(`div`,{className:`rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-900`,children:e},e))}):null,e.actionLabel?(0,L.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border/70 pt-1`,children:[(0,L.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:f(`runtimeStatusActionHint`)}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>void r(),disabled:e.isBusy,className:`text-sm font-semibold text-primary transition-colors hover:text-primary-hover disabled:text-muted-foreground/45`,children:e.isBusy?f(`runtimeStatusRestartingAction`):e.actionLabel})]}):null]})]})}function O1({className:e,density:t=`sidebar`,suffix:n}){let{data:r}=T1(),{supported:i,busyAction:a,snapshot:o}=ke(),s=r?.name??`NextClaw`,c=r?.productVersion?.trim(),l=c?`v${c}`:null,u=y(c),d=n??(0,L.jsx)(D1,{}),f=typeof window<`u`&&window.nextclawDesktop?.platform===`darwin`,p=t===`chrome`;return(0,L.jsxs)(`div`,{className:m(e??`flex min-w-0 items-center gap-2`,f&&`pl-[58px]`),children:[(0,L.jsx)(`div`,{className:m(`flex shrink-0 items-center justify-center overflow-hidden`,`h-6 w-6 rounded-md`),children:(0,L.jsx)(`img`,{src:`/logo.svg`,alt:s,className:`h-full w-full object-contain`})}),(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,L.jsx)(`span`,{className:m(`shrink-0 font-semibold text-gray-800`,p?`text-[15px]`:`text-[14px]`),children:s}),l?(0,L.jsx)(k1,{versionLabel:l,density:t,releaseNotesLink:u}):null]}),(0,L.jsx)(A1,{supported:i,busyAction:a,snapshot:o}),d?(0,L.jsx)(`span`,{className:`inline-flex items-center shrink-0`,children:d}):null]})]})}function k1({versionLabel:e,density:t,releaseNotesLink:n}){let r=m(`block min-w-0 flex-1 truncate font-medium text-gray-500 outline-none`,`text-[12px]`,n&&`cursor-pointer rounded-sm transition-colors hover:text-gray-700 hover:underline focus-visible:ring-2 focus-visible:ring-gray-300`),i=n?[f(`desktopUpdatesVersionTooltipCurrent`).replace(`{version}`,e),f(`desktopUpdatesVersionTooltipReleaseNotes`).replace(`{version}`,n.versionLabel)].join(`
|
|
105
105
|
`):e;return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:n?(0,L.jsx)(`button`,{type:`button`,"aria-label":f(`desktopUpdatesVersionReleaseNotesLabel`).replace(`{currentVersion}`,e).replace(`{releaseVersion}`,n.versionLabel),className:m(r,`border-0 bg-transparent p-0 text-left`),onClick:()=>void Nn.openExternalUrl(n.url),children:e}):(0,L.jsx)(`span`,{tabIndex:0,"aria-label":e,className:r,children:e})}),(0,L.jsx)(Et,{side:`bottom`,className:`max-w-72 whitespace-pre-line text-xs leading-relaxed`,children:i})]})})}function A1({supported:e,busyAction:t,snapshot:n}){if(!e||!n)return null;let r=x(n);return n.status===`downloading`?(0,L.jsx)(M1,{snapshot:n,releaseNotesLink:r}):n.status===`blocked`||n.status===`failed`?(0,L.jsx)(M1,{snapshot:n}):n.status===`downloaded`?(0,L.jsx)(j1,{link:r,children:(0,L.jsx)(`button`,{type:`button`,className:`inline-flex h-5 shrink-0 items-center rounded-full bg-emerald-50 px-2 text-[11px] font-semibold leading-none text-emerald-700 ring-1 ring-emerald-100 transition-colors hover:bg-emerald-100 disabled:opacity-70`,disabled:t===`applying`,onClick:()=>void ee.applyDownloadedUpdate(),children:f(t===`applying`?`desktopUpdatesInlineApplying`:`desktopUpdatesInlineReady`)})}):n.status===`update-available`?(0,L.jsx)(j1,{link:r,children:(0,L.jsx)(`button`,{type:`button`,className:`inline-flex h-5 shrink-0 items-center rounded-full bg-amber-50 px-2 text-[11px] font-semibold leading-none text-amber-700 ring-1 ring-amber-100 transition-colors hover:bg-amber-100 disabled:opacity-70`,disabled:t===`downloading`,onClick:()=>void ee.downloadUpdate(),children:f(t===`downloading`?`desktopUpdatesInlineDownloading`:`desktopUpdatesInlineDownload`)})}):null}function j1({children:e,link:t}){if(!t)return e;let n=f(`desktopUpdatesUpdateReleaseNotesLabel`).replace(`{version}`,t.versionLabel);return(0,L.jsxs)(`span`,{className:`group/update-release-notes relative inline-flex shrink-0`,children:[e,(0,L.jsx)(`span`,{"data-update-release-notes-hover":`true`,className:`invisible pointer-events-none absolute left-1/2 top-full z-[var(--z-tooltip,10150)] -translate-x-1/2 pt-1 opacity-0 transition-opacity group-hover/update-release-notes:visible group-hover/update-release-notes:pointer-events-auto group-hover/update-release-notes:opacity-100 group-focus-within/update-release-notes:visible group-focus-within/update-release-notes:pointer-events-auto group-focus-within/update-release-notes:opacity-100`,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":n,className:`whitespace-nowrap rounded-md border bg-popover px-3 py-1.5 text-left text-xs font-medium text-popover-foreground shadow-md outline-none transition-colors hover:bg-gray-100 focus-visible:ring-2 focus-visible:ring-gray-300`,onClick:()=>void Nn.openExternalUrl(t.url),children:n})})]})}function M1({snapshot:e,releaseNotesLink:t}){if(e.status===`blocked`||e.status===`failed`)return(0,L.jsx)(N1,{snapshot:e});let n=e.status===`downloading`?F1(e):null;return n?(0,L.jsx)(j1,{link:t??null,children:(0,L.jsx)(`span`,{tabIndex:t?0:void 0,className:`inline-flex h-5 shrink-0 items-center rounded-full bg-amber-50 px-2 text-[11px] font-semibold leading-none text-amber-700 ring-1 ring-amber-100 outline-none transition-colors hover:bg-amber-100 focus-visible:ring-2 focus-visible:ring-amber-300`,children:n})}):null}function N1({snapshot:e}){let t=P1(e),n=e.recoveryCommand?.trim()||null,r=e.diagnosticCommand?.trim()?f(`desktopUpdatesDiagnosticCommand`).replace(`{command}`,e.diagnosticCommand.trim()):null,i=e.errorMessage?.trim()||e.blockReason?.trim()||null,a=[t,e.status===`blocked`&&e.blockReason?f(`desktopUpdatesBlockedRootCause.${e.blockReason}`):null,i,n,r].filter(Boolean).join(`
|
|
106
|
-
`);return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`span`,{role:`img`,"aria-label":t,tabIndex:0,className:`inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-amber-50 text-[13px] font-bold leading-none text-amber-700 ring-1 ring-amber-100 outline-none focus-visible:ring-2 focus-visible:ring-amber-300`,children:`!`})}),(0,L.jsx)(Et,{side:`bottom`,className:`max-w-80 whitespace-pre-line break-words text-xs leading-relaxed`,children:a})]})})}function P1(e){return e.status===`blocked`?f(`desktopUpdatesStatusBlocked`):f(e.failureStage?`desktopUpdatesFailureStage.${e.failureStage}`:`desktopUpdatesStatusFailed`)}function F1(e){let t=e.progress?.percent;return t==null?f(`desktopUpdatesInlineDownloading`):f(`desktopUpdatesInlineDownloadingPercent`).replace(`{percent}`,String(t))}var I1={connected:{dotClass:`bg-emerald-500`},disconnected:{dotClass:`h-2.5 w-2.5 rounded-full border border-gray-400 bg-transparent`},connecting:{dotClass:`text-amber-600`}};function L1({status:e,className:t}){let n=I1[e],r=f(e===`connected`?`connected`:e===`disconnected`?`disconnected`:`connecting`);return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`span`,{role:`status`,"aria-label":r,className:m(`inline-flex h-5 w-5 items-center justify-center`,t),children:e===`connecting`?(0,L.jsx)(wn,{className:m(`h-3 w-3 animate-spin`,n.dotClass)}):(0,L.jsx)(`span`,{className:m(e===`connected`?`h-2 w-2 rounded-full`:``,n.dotClass)})})}),(0,L.jsx)(Et,{side:`bottom`,className:`text-xs`,children:r})]})})}var R1={default:{row:`gap-3 px-3 py-2.5 text-[14px]`,icon:`h-[17px] w-[17px]`,value:`text-xs`,gap:`gap-3`},compact:{row:`gap-2.5 px-3 py-2 text-[13px]`,icon:`h-4 w-4`,value:`text-[11px]`,gap:`gap-2.5`}};function z1(e){return R1[e]}function B1(e,t){let n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith(`${r}/`)}function V1({children:e,label:t,side:n=`right`}){return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:e}),(0,L.jsx)(Et,{side:n,className:`text-xs`,children:t})]})})}function H1({to:e,label:t,icon:n,density:r=`default`,className:i,collapsed:a=!1}){let o=z1(r),{pathname:s}=di(),c=B1(s,e),l=(0,L.jsxs)(Na,{to:e,"aria-label":t,"aria-current":c?`page`:void 0,className:m(`group flex w-full items-center rounded-xl font-medium transition-colors duration-base focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,a?m(f1,`justify-center px-0 py-0`):o.row,c?a?v1:`bg-gray-200/80 text-gray-900 shadow-sm`:a?_1:`text-muted-foreground hover:bg-gray-200/60 hover:text-gray-900`,i),children:[(0,L.jsx)(n,{className:m(a?p1:o.icon,`shrink-0 transition-colors`,c?`text-gray-700`:`text-muted-foreground group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:a?`sr-only`:`min-w-0 flex-1 text-left`,children:t})]});return a?(0,L.jsx)(V1,{label:t,children:l}):l}function U1({isCollapsed:e,items:t,density:n,className:r}){return(0,L.jsx)(`ul`,{className:r,children:t.map(t=>(0,L.jsx)(`li`,{className:e?`flex justify-center`:void 0,children:(0,L.jsx)(H1,{to:t.target,label:t.label,icon:t.icon,density:n,collapsed:e})},t.target))})}function W1({label:e,icon:t,onClick:n,density:r=`default`,className:i,labelClassName:a,trailing:o,trailingClassName:s,testId:c,trailingTestId:l,collapsed:u=!1}){let d=z1(r),f=(0,L.jsxs)(`button`,{type:`button`,onClick:n,"aria-label":e,className:m(`group flex w-full items-center rounded-xl font-medium text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,u?m(f1,`justify-center px-0 py-0`,_1):d.row,i),"data-testid":c,children:[(0,L.jsx)(t,{className:m(u?p1:d.icon,`shrink-0 text-muted-foreground transition-colors group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:m(u?`sr-only`:`min-w-0 flex-1 text-left`,a),children:e}),!u&&o?(0,L.jsx)(`span`,{className:m(`shrink-0 text-muted-foreground`,d.value,s),"data-testid":l,children:o}):null]});return u?(0,L.jsx)(V1,{label:e,children:f}):f}function G1({label:e,icon:t,value:n,valueLabel:r,onValueChange:i,density:a=`default`,children:o,collapsed:s=!1}){let c=z1(a),l=(0,L.jsxs)(Ut,{"aria-label":e,className:m(`group h-auto w-full rounded-xl border-0 bg-transparent font-medium text-muted-foreground shadow-none hover:bg-gray-200/60 hover:text-gray-900 focus:ring-0 focus-visible:ring-1 focus-visible:ring-border`,s?m(f1,`justify-center px-0 py-0`,_1):c.row),children:[(0,L.jsxs)(`div`,{className:m(`flex min-w-0 items-center`,s?`justify-center`:c.gap),children:[(0,L.jsx)(t,{className:m(s?p1:c.icon,`shrink-0 text-muted-foreground/75 transition-colors group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:s?`sr-only`:`text-left`,children:e})]}),s?null:(0,L.jsx)(`span`,{className:m(`ml-auto text-muted-foreground`,c.value),children:r})]});return(0,L.jsxs)(Zt,{value:n,onValueChange:i,children:[s?(0,L.jsx)(V1,{label:`${e}: ${r}`,children:l}):l,(0,L.jsx)(Kt,{children:o})]})}function K1(e,t){return t.some(t=>t.value===e)?e:t[0]?.value??e}function q1(e){let{groups:t,defaultSessionType:n,sessionTypeOptions:r,renderSessionItem:i}=e,a=Ac(),o=R(e=>e.snapshot.collapsedProjectRoots),[s,c]=(0,I.useState)(null),l=(0,I.useMemo)(()=>K1(n,r),[n,r]),u=r.length>1;return(0,L.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>{let t=`${f(`chatSidebarNewTask`)} · ${e.projectName}`,n=o.includes(e.projectRoot),d=f(e.isPinned?`chatSidebarUnpinProject`:`chatSidebarPinProject`);return(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`group/project relative h-10 rounded-lg px-2 text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900`,children:[(0,L.jsxs)(`button`,{type:`button`,"aria-expanded":!n,"aria-label":f(n?`chatSidebarExpandProject`:`chatSidebarCollapseProject`),className:`flex h-full w-full min-w-0 items-center gap-1.5 pr-14 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>a.chatSessionListManager.toggleProjectCollapsed(e.projectRoot),children:[(0,L.jsx)(fn,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`truncate text-[11px] font-medium uppercase tracking-wider`,title:e.projectRoot,children:e.projectName}),n?(0,L.jsx)(so,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}):(0,L.jsx)(Nt,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground/70`,children:e.items.length})]}),(0,L.jsxs)(`div`,{className:`pointer-events-none absolute right-2 top-1/2 flex -translate-y-1/2 items-center opacity-0 transition-opacity group-hover/project:pointer-events-auto group-hover/project:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100`,children:[u?(0,L.jsxs)(it,{open:s===e.projectRoot,onOpenChange:t=>{c(t?e.projectRoot:null)},children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-3.5 w-3.5`}),label:t})}),(0,L.jsx)(nt,{align:`end`,className:`w-56 rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-[0_24px_60px_-28px_rgba(15,23,42,0.38)]`,children:(0,L.jsx)(l1,{options:r,selectedSessionType:l,onSelect:t=>{a.chatSessionListManager.createSession(t,e.projectRoot),c(null)}})})]}):(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-3.5 w-3.5`}),label:t,onClick:()=>a.chatSessionListManager.createSession(l,e.projectRoot)}),(0,L.jsx)(St,{icon:(0,L.jsx)(wt,{className:e.isPinned?`h-3.5 w-3.5 fill-current text-foreground`:`h-3.5 w-3.5`}),label:d,tooltipSide:`right`,onClick:()=>a.chatSessionListManager.toggleProjectPinned(e.projectRoot)})]})]}),n?null:(0,L.jsx)(`div`,{className:`mt-0.5 space-y-0.5 pl-2`,children:e.items.map(i)})]},e.projectRoot)})})}function J1({label:e}){return(0,L.jsxs)(`div`,{className:`p-4 text-center`,children:[(0,L.jsx)(Qo,{className:`mx-auto mb-2 h-6 w-6 text-muted-foreground/45`}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e})]})}function Y1({defaultSessionType:e,groups:t,isLoading:n,isProjectFirstView:r,projectGroups:i,renderSessionItem:a,sessionTypeOptions:o}){return n?(0,L.jsx)(`div`,{className:`p-3 text-xs text-muted-foreground`,children:f(`sessionsLoading`)}):r?i.length===0?(0,L.jsx)(J1,{label:f(`chatSidebarProjectViewEmpty`)}):(0,L.jsx)(q1,{groups:i,defaultSessionType:e,sessionTypeOptions:o,renderSessionItem:a}):t.length===0?(0,L.jsx)(J1,{label:f(`sessionsEmpty`)}):(0,L.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`px-2 py-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70`,children:e.label}),(0,L.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(a)})]},e.label))})}function X1({isOpen:e,onOpenChange:t,currentTheme:n,currentThemeLabel:r,themeOptions:i,onSelectTheme:a,currentLanguage:o,currentLanguageLabel:s,languageOptions:c,onSelectLanguage:l,onOpenDocs:u,onOpenApps:d,collapsed:p=!1}){return(0,L.jsxs)(it,{open:e,onOpenChange:t,children:[p?(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":f(`settingsMenu`),className:m(`flex items-center justify-center`,f1,_1),children:(0,L.jsx)(gn,{className:m(p1,`shrink-0 text-muted-foreground`)})})})}),(0,L.jsx)(Et,{side:`right`,className:`text-xs`,children:f(`settingsMenu`)})]})}):(0,L.jsx)($e,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,"aria-label":f(`settingsMenu`),className:`flex w-full items-center gap-2.5 rounded-xl px-3 py-2 text-[13px] font-medium text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,children:[(0,L.jsx)(gn,{className:`h-4 w-4 shrink-0 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 text-left`,children:f(`settings`)}),(0,L.jsxs)(`span`,{className:`max-w-[112px] truncate text-[13px] text-muted-foreground`,children:[r,` / `,s]})]})}),(0,L.jsxs)(nt,{side:p?`right`:`top`,align:p?`end`:`start`,className:`w-64 p-2`,children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsxs)(Pa,{to:`/settings`,onClick:()=>t(!1),className:`flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] font-medium text-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900`,children:[(0,L.jsx)(gn,{className:`h-4 w-4 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`flex-1 text-left`,children:f(`settings`)})]}),[{key:`docs`,icon:Mt,label:f(`docBrowserHelp`),action:u},{key:`apps`,icon:ht,label:f(`appsTitle`),action:d}].map(({key:e,icon:n,label:r,action:i})=>(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{i(),t(!1)},className:`flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] font-medium text-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900`,children:[(0,L.jsx)(n,{className:`h-4 w-4 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`flex-1 text-left`,children:r})]},e))]}),(0,L.jsx)(`div`,{className:`my-2 h-px bg-border`}),(0,L.jsx)(Z1,{icon:ns,label:f(`theme`),options:i,value:n,valueLabel:r,onSelect:a,onCloseMenu:()=>t(!1)}),(0,L.jsx)(Z1,{icon:Uo,label:f(`language`),options:c,value:o,valueLabel:s,onSelect:l,onCloseMenu:()=>t(!1)})]})]})}function Z1({icon:e,label:t,options:n,value:r,valueLabel:i,onSelect:a,onCloseMenu:o}){return(0,L.jsxs)(Zt,{value:r,onOpenChange:e=>{e||o()},onValueChange:e=>a(e),children:[(0,L.jsxs)(Ut,{"aria-label":t,className:`h-auto w-full rounded-lg border-0 bg-transparent px-3 py-2 text-[13px] font-medium text-foreground shadow-none hover:bg-gray-200/60 hover:text-gray-900 focus:ring-0`,indicator:(0,L.jsx)(so,{className:`h-4 w-4 text-muted-foreground/70`}),children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,L.jsx)(e,{className:`h-4 w-4 shrink-0 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`text-left`,children:t})]}),(0,L.jsx)(`span`,{className:`ml-auto max-w-[96px] truncate text-[13px] text-muted-foreground`,children:i})]}),(0,L.jsx)(Kt,{side:`right`,align:`center`,sideOffset:6,className:`z-[var(--z-tooltip)] min-w-[7rem] rounded-lg`,viewportClassName:`h-auto min-w-[7rem] w-auto`,children:n.map(e=>(0,L.jsx)(Yt,{value:e.value,className:`text-[13px]`,children:e.label},e.value))})]})}var Q1=p(()=>({supported:!1,initialized:!1,busyAction:null,snapshot:null})),$1=new class{constructor(){this.start=async()=>{let e=this.getDesktopApi();if(!e){this.markUnsupported();return}Q1.setState({supported:!0,initialized:!1,busyAction:`loading`});try{let t=await e.getPresenceState();Q1.setState({supported:!0,initialized:!0,busyAction:null,snapshot:t})}catch(e){Q1.setState({supported:!0,initialized:!0,busyAction:null}),P.error(`${f(`runtimePresenceLoadFailed`)}: ${this.getErrorMessage(e)}`)}},this.markUnsupported=()=>{Q1.setState({supported:!1,initialized:!0,busyAction:null,snapshot:null})},this.updatePreferences=async e=>{let t=this.getDesktopApi();if(!t)throw Error(f(`runtimePresenceLaunchAtLoginUnavailable`));Q1.setState({busyAction:`saving-preferences`});try{let n=await t.updatePresencePreferences(e);return Q1.setState({supported:!0,initialized:!0,snapshot:n}),P.success(f(`runtimePresenceSaved`)),n}catch(e){throw P.error(`${f(`runtimePresenceSaveFailed`)}: ${this.getErrorMessage(e)}`),e}finally{Q1.setState({busyAction:null})}},this.getDesktopApi=()=>typeof window>`u`?null:window.nextclawDesktop??null,this.getErrorMessage=e=>e instanceof Error?e.message:f(`error`)}},e0=p(()=>({supported:!1,initialized:!1,busyAction:null,snapshot:null}));new class{constructor(){this.unsubscribe=null,this.subscriptionCount=0,this.start=async()=>{this.subscriptionCount+=1;let e=this.getDesktopApi();if(!e){e0.setState({supported:!1,initialized:!0,snapshot:null});return}this.unsubscribe||=e.onUpdateStateChanged(e=>{e0.setState({supported:!0,initialized:!0,snapshot:e})}),e0.setState({supported:!0,initialized:!1});try{let t=await e.getUpdateState();e0.setState({supported:!0,initialized:!0,snapshot:t})}catch(e){e0.setState({supported:!0,initialized:!0}),P.error(`${f(`desktopUpdatesLoadFailed`)}: ${this.getErrorMessage(e)}`)}},this.stop=()=>{this.subscriptionCount=Math.max(0,this.subscriptionCount-1),!(this.subscriptionCount>0)&&(this.unsubscribe?.(),this.unsubscribe=null)},this.checkForUpdates=async()=>{let e;try{e=await this.runSnapshotCommand(`checking`,f(`desktopUpdatesCheckFailed`),async e=>await e.checkForUpdates())}catch{return}if(e.status===`up-to-date`){P.success(f(`desktopUpdatesAlreadyLatest`));return}if(e.status===`update-available`){P.success(f(`desktopUpdatesAvailable`).replace(`{version}`,e.availableVersion??f(`desktopUpdatesUnknownVersion`)));return}if(e.status===`downloaded`){P.success(f(`desktopUpdatesReadyToApply`));return}e.status===`failed`&&e.errorMessage&&P.error(e.errorMessage)},this.downloadUpdate=async()=>{let e;try{e=await this.runSnapshotCommand(`downloading`,f(`desktopUpdatesDownloadFailed`),async e=>await e.downloadUpdate())}catch{return}e.status===`downloaded`&&P.success(f(`desktopUpdatesReadyToApply`))},this.applyDownloadedUpdate=async()=>{try{await this.runSnapshotCommand(`applying`,f(`desktopUpdatesApplyFailed`),async e=>await e.applyDownloadedUpdate())}catch{return}},this.updatePreferences=async e=>{try{await this.runSnapshotCommand(`saving-preferences`,f(`desktopUpdatesPreferencesFailed`),async t=>await t.updatePreferences(e))}catch{return}},this.updateChannel=async e=>{if(e0.getState().snapshot?.channel===e)return;let t;try{t=await this.runSnapshotCommand(`switching-channel`,f(`desktopUpdatesChannelChangeFailed`),async t=>await t.updateChannel(e))}catch{return}if(t.status===`update-available`&&t.availableVersion){P.success(f(`desktopUpdatesChannelChangedWithUpdate`).replace(`{channel}`,this.getChannelLabel(e)).replace(`{version}`,t.availableVersion));return}P.success(f(`desktopUpdatesChannelChanged`).replace(`{channel}`,this.getChannelLabel(e)))},this.runSnapshotCommand=async(e,t,n)=>{let r=this.getDesktopApi();if(!r)throw Error(f(`desktopUpdatesDesktopOnlyDescription`));e0.setState({busyAction:e});try{let e=await n(r);return e0.setState({snapshot:e}),e}catch(e){throw P.error(`${t}: ${this.getErrorMessage(e)}`),e}finally{e0.setState({busyAction:null})}},this.getDesktopApi=()=>typeof window>`u`?null:window.nextclawDesktop??null,this.getErrorMessage=e=>e instanceof Error?e.message:f(`error`),this.getChannelLabel=e=>f(e===`beta`?`desktopUpdatesChannelBeta`:`desktopUpdatesChannelStable`)}};function t0(e,t){let n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith(`${r}/`)}function n0(e){let t=e.toLowerCase();return t===`/chat`||t.startsWith(`/chat/`)||t===`/skills`||t.startsWith(`/skills/`)||t===`/cron`||t.startsWith(`/cron/`)||t===`/agents`||t.startsWith(`/agents/`)}function r0(e){let t=e.toLowerCase();return t.startsWith(`/chat/`)&&t!==`/chat`}function i0(e){return[{target:`/chat`,label:e(`chat`),icon:Xo},{target:`/skills`,label:e(`marketplaceFilterSkills`),icon:io},{target:`/agents`,label:e(`agentsPageTitle`),icon:no},{target:`/settings`,label:e(`settings`),icon:gn}]}function a0(e){return[{target:`/chat`,label:e(`chat`),icon:Xo},{target:`/chat/cron`,label:e(`cron`),icon:Za},{target:`/chat/skills`,label:e(`marketplaceFilterSkills`),icon:io},{target:`/agents`,label:e(`agentsPageTitle`),icon:no}]}function o0(e){return[{target:`/model`,label:e(`model`),icon:yo},{target:`/providers`,label:e(`providers`),icon:Dn},{target:`/channels`,label:e(`channels`),icon:vn},{target:`/search`,label:e(`searchChannels`),icon:mt},{target:`/appearance`,label:e(`appearance`),icon:ns},{target:`/security`,label:e(`security`),icon:_s},{target:`/runtime`,label:e(`runtime`),icon:yo},{target:`/updates`,label:e(`updates`),icon:ln},{target:`/remote`,label:e(`remote`),icon:Es},{target:`/secrets`,label:e(`secrets`),icon:bn},{target:`/marketplace/mcp`,label:e(`marketplaceFilterMcp`),icon:Os}]}function s0(e){let t=o0(e);return[{label:e(`settingsGroupBasic`),items:t.slice(0,3)},{label:e(`settingsGroupAdvanced`),items:t.slice(3)}]}function c0(e){return[{target:`/language`,label:e(`language`),icon:Uo},...o0(e)]}function l0(e){let t=e.toLowerCase();return t===`/settings`?!0:c0(e=>e).some(e=>t0(t,e.target))}function u0(e,t){let n=e.toLowerCase(),r=c0(t);if(r0(n))return{title:t(`chat`),backTarget:`/chat`,backLabel:t(`chat`)};if(n===`/chat`)return{title:t(`chat`),backTarget:null,backLabel:null};if(n===`/skills`||n.startsWith(`/skills/`))return{title:t(`marketplaceFilterSkills`),backTarget:null,backLabel:null};if(n===`/agents`||n.startsWith(`/agents/`))return{title:t(`agentsPageTitle`),backTarget:null,backLabel:null};if(n===`/settings`)return{title:t(`settings`),backTarget:null,backLabel:null};for(let e of r)if(t0(n,e.target))return{title:e.label,backTarget:`/settings`,backLabel:t(`settings`)};return{title:t(`settings`),backTarget:null,backLabel:null}}function d0(){let{language:e,setLanguage:t}=on();return{currentLanguage:e,currentLanguageLabel:s.find(t=>t.value===e)?.label??e,languageOptions:s,selectLanguage:(0,I.useCallback)(n=>{e!==n&&(t(n),window.location.reload())},[e,t])}}function f0(){let{currentLanguage:e,currentLanguageLabel:t,languageOptions:n,selectLanguage:r}=d0();return(0,L.jsxs)(`section`,{className:`mx-auto w-full max-w-3xl space-y-4`,children:[(0,L.jsx)(`div`,{className:`rounded-3xl border border-gray-200/80 bg-white p-5 shadow-card`,children:(0,L.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,L.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl bg-gray-100 text-gray-600`,children:(0,L.jsx)(Uo,{className:`h-4 w-4`})}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:f(`language`)}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:t})]})]})}),(0,L.jsx)(`div`,{className:`overflow-hidden rounded-3xl border border-gray-200/80 bg-white shadow-card`,children:n.map(t=>{let n=t.value===e;return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>r(t.value),className:m(`flex w-full items-center justify-between gap-3 border-b border-gray-100 px-5 py-4 text-left text-sm transition-colors last:border-b-0`,n?`bg-gray-50 text-gray-900`:`text-gray-700 hover:bg-gray-50/70`),"aria-current":n?`true`:void 0,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:t.label}),n?(0,L.jsx)(en,{className:`h-4 w-4 text-gray-700`}):null]},t.value)})})]})}function p0(e,t){if(!e)return{items:a0(t),density:`default`};let n=s0(t);return{items:n.flatMap(e=>e.items),sections:n,density:`compact`}}function m0({isCollapsed:e,onToggle:t}){let n=f(e?`sidebarExpand`:`sidebarCollapse`);return(0,L.jsx)(St,{icon:(0,L.jsx)(e?is:rs,{className:p1}),label:n,className:m(_1,e&&`h-9 w-9 rounded-xl`),onClick:t})}function h0({isCollapsed:e,onToggle:t}){return(0,L.jsx)(`div`,{className:m(`shrink-0`,e?`px-0 py-1.5`:`px-2 py-2`),children:(0,L.jsxs)(`div`,{className:m(`flex items-center py-1`,e?m(`flex-col px-0`,h1):`gap-2 px-1`),"data-testid":`settings-sidebar-header`,children:[e?(0,L.jsx)(m0,{isCollapsed:e,onToggle:t}):null,(0,L.jsxs)(Pa,{to:`/chat`,"aria-label":f(`backToMain`),className:m(`group inline-flex min-w-0 items-center rounded-lg text-[12px] font-medium text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,e?m(f1,_1,`justify-center p-0`):`gap-1.5 px-1 py-1`),children:[(0,L.jsx)(pt,{className:m(e?p1:`h-3.5 w-3.5`,`shrink-0 text-muted-foreground/75 group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:e?`sr-only`:`truncate`,children:f(`backToMain`)})]}),e?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`h-4 w-px shrink-0 bg-border`,"aria-hidden":`true`}),(0,L.jsx)(`h1`,{className:`truncate text-[15px] font-semibold tracking-[-0.01em] text-foreground`,children:f(`settings`)}),(0,L.jsx)(`div`,{className:`ml-auto`,children:(0,L.jsx)(m0,{isCollapsed:e,onToggle:t})})]})]})})}function g0({isCollapsed:e,onToggle:t}){return(0,L.jsx)(`div`,{className:m(`shrink-0`,e?`flex justify-center px-0 py-1.5`:`px-2 py-2`),children:e?(0,L.jsx)(m0,{isCollapsed:e,onToggle:t}):(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(O1,{className:`flex min-w-0 flex-1 items-center gap-2.5 cursor-pointer`}),(0,L.jsx)(m0,{isCollapsed:e,onToggle:t})]})})}function _0({isSettingsMode:e,isCollapsed:t,onToggle:n}){return e?(0,L.jsx)(h0,{isCollapsed:t,onToggle:n}):(0,L.jsx)(g0,{isCollapsed:t,onToggle:n})}function v0({isSettingsMode:e,isCollapsed:t,items:n,sections:r,density:i}){let a=m(t?m(m1,`pb-3`):e?`space-y-0.5 pb-3`:`space-y-1 pb-4`);return(0,L.jsx)(`nav`,{className:m(`custom-scrollbar min-h-0 flex-1 overflow-y-auto`,t?`pr-0`:`pr-1`,g1),children:r&&!t?(0,L.jsx)(`div`,{className:`space-y-3 pb-3`,children:r.map(e=>(0,L.jsxs)(`section`,{"aria-label":e.label,className:`space-y-1`,children:[(0,L.jsx)(`h2`,{className:`px-3 text-[11px] font-semibold text-muted-foreground/70`,children:e.label}),(0,L.jsx)(U1,{isCollapsed:t,items:e.items,density:i,className:`space-y-0.5`})]},e.label))}):(0,L.jsx)(U1,{isCollapsed:t,items:n,density:i,className:a})})}function y0({mode:e}){let t=S4(),n=Wn(),r=ks(),i=Sn(e=>e.isSidebarCollapsed),a=xn.toggleSidebarCollapsed,{currentLanguage:o,currentLanguageLabel:s,languageOptions:c,selectLanguage:l}=d0(),{theme:u,setTheme:d}=r1(),p=e===`settings`,h=f(D$.find(e=>e.value===u)?.labelKey??`themeWork`),g=r.data?.account.email?.trim(),_=!!r.data?.account.loggedIn,v=e=>{u!==e&&d(e)},{items:y,sections:b,density:x}=p0(p,f);return(0,L.jsxs)(`aside`,{className:m(`shrink-0 flex h-full min-h-0 flex-col overflow-hidden bg-secondary pb-6 transition-[width] duration-200 ease-out`,i?m(u1,d1):`w-[240px] px-4`),"data-sidebar-collapsed":i?`true`:`false`,children:[(0,L.jsx)(_0,{isSettingsMode:p,isCollapsed:i,onToggle:a}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsx)(v0,{isSettingsMode:p,isCollapsed:i,items:y,sections:b,density:x}),(0,L.jsxs)(`div`,{className:m(`shrink-0 bg-secondary`,i?`mt-2 pt-2`:p?`mt-2 pt-3`:`mt-3 pt-3`),children:[p?(0,L.jsx)(W1,{onClick:()=>t.accountManager.openAccountPanel(),icon:bn,label:f(`remoteAccountEntryManage`),density:`compact`,className:i?`mb-1`:`mb-1.5`,trailing:_?g||f(`remoteAccountEntryConnected`):f(`remoteAccountEntryDisconnected`),trailingClassName:`max-w-[92px] truncate text-right`,testId:`settings-sidebar-account-entry`,trailingTestId:`settings-sidebar-account-status`,collapsed:i}):null,e===`main`&&(0,L.jsx)(`div`,{className:m(i?`mb-1`:`mb-2`,i?`flex justify-center`:void 0),children:(0,L.jsx)(H1,{to:`/settings`,label:f(`settings`),icon:gn,collapsed:i})}),(0,L.jsx)(`div`,{className:m(i?`mb-1`:`mb-2`,i?`flex justify-center`:void 0),children:(0,L.jsx)(G1,{value:u,onValueChange:e=>v(e),icon:ns,label:f(`theme`),valueLabel:h,density:x,collapsed:i,children:D$.map(e=>(0,L.jsx)(Yt,{value:e.value,className:`text-xs`,children:f(e.labelKey)},e.value))})}),(0,L.jsx)(`div`,{className:m(i?`mb-1`:`mb-2`,i?`flex justify-center`:void 0),children:(0,L.jsx)(G1,{value:o,onValueChange:e=>l(e),icon:Uo,label:f(`language`),valueLabel:s,density:x,collapsed:i,children:c.map(e=>(0,L.jsx)(Yt,{value:e.value,className:`text-xs`,children:e.label},e.value))})}),(0,L.jsx)(W1,{onClick:()=>n.open(void 0,{kind:`docs`,title:f(`docBrowserHelp`)}),icon:Mt,label:f(`docBrowserHelp`),density:x,collapsed:i})]})]})]})}var b0=[{action:`minimize`,label:`Minimize`,icon:es},{action:`close`,label:`Close`,icon:An,variant:`danger`}];function x0({sidebarCollapsed:e=!1}){let t=C0()?{action:`toggle-maximize`,label:`Restore`,icon:_o}:{action:`toggle-maximize`,label:`Maximize`,icon:bs};return(0,L.jsxs)(`header`,{className:`desktop-window-drag relative flex h-[var(--desktop-titlebar-height)] shrink-0 bg-secondary after:absolute after:bottom-0 after:left-[var(--desktop-sidebar-width)] after:right-0 after:border-b after:border-border/80`,"data-testid":`desktop-window-chrome`,children:[(0,L.jsx)(`div`,{className:`desktop-window-no-drag absolute left-0 right-0 top-0 h-1`,"data-testid":`desktop-window-chrome-resize-strip`}),(0,L.jsx)(`div`,{className:m(`desktop-window-drag relative z-10 flex h-full w-[var(--desktop-sidebar-width)] shrink-0 items-center bg-secondary text-secondary-foreground`,e?`justify-center px-0`:`pl-4 pr-3`),"data-testid":`desktop-window-chrome-sidebar`,children:e?(0,L.jsx)(`img`,{src:`/logo.svg`,alt:`NextClaw`,className:`h-6 w-6 shrink-0 object-contain`}):(0,L.jsx)(O1,{className:`flex min-w-0 shrink-0 items-center gap-2.5`,density:`chrome`})}),(0,L.jsx)(`div`,{className:`desktop-window-no-drag absolute right-0 top-0 z-20 flex h-full w-[var(--desktop-caption-safe-right)] items-start justify-end`,"data-testid":`desktop-window-controls`,children:[b0[0],t,b0[1]].map(e=>(0,L.jsx)(S0,{control:e},e.action))})]})}function S0({control:e}){let t=e.icon;return(0,L.jsx)(`button`,{type:`button`,"aria-label":e.label,title:e.label,className:e.variant===`danger`?`desktop-window-no-drag flex h-10 w-[46px] items-center justify-center text-gray-700 transition-colors hover:bg-red-500 hover:text-white`:`desktop-window-no-drag flex h-10 w-[46px] items-center justify-center text-gray-700 transition-colors hover:bg-black/10`,onClick:()=>{window.nextclawDesktop?.controlWindow?.(e.action)},children:(0,L.jsx)(t,{className:`h-3.5 w-3.5`})})}function C0(){let[e,t]=(0,I.useState)(!1);return(0,I.useEffect)(()=>{let e=!0,n=window.nextclawDesktop;n?.getWindowState?.().then(n=>{e&&t(n.isMaximized)});let r=n?.onWindowStateChanged?.(e=>{t(e.isMaximized)});return()=>{e=!1,r?.()}},[]),e}function w0(){return typeof window>`u`?null:E0()??window.nextclawDesktop?.platform??null}function T0(){return w0()===`win32`}function E0(){return null}function D0(e,t){if(t===`/settings`)return l0(e);let n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith(`${r}/`)}function O0(){let{pathname:e}=di(),t=i0(f);return(0,L.jsx)(`nav`,{"data-testid":`mobile-bottom-nav`,"aria-label":f(`settings`),className:`shrink-0 border-t border-gray-200/80 bg-white/95 backdrop-blur-sm`,style:{paddingBottom:`calc(env(safe-area-inset-bottom, 0px) + 0.25rem)`},children:(0,L.jsx)(`ul`,{className:`grid grid-cols-4 gap-1 px-2 pt-1`,children:t.map(t=>{let n=D0(e,t.target);return(0,L.jsx)(`li`,{children:(0,L.jsx)(Na,{to:t.target,"aria-current":n?`page`:void 0,className:m(`group flex min-h-[2.875rem] items-center justify-center rounded-xl px-1 py-1 text-[10px] font-medium transition-colors`,n?`text-gray-900`:`text-gray-500 hover:text-gray-800`),children:(0,L.jsxs)(`span`,{"data-testid":n?`mobile-nav-active-indicator`:void 0,className:m(`inline-flex max-w-full min-w-14 flex-col items-center justify-center gap-0.5 rounded-xl px-2 py-1 transition-colors`,n?`bg-gray-100`:`bg-transparent group-hover:bg-gray-50`),children:[(0,L.jsx)(t.icon,{className:m(`h-3.5 w-3.5`,n?`text-gray-900`:`text-gray-400`)}),(0,L.jsx)(`span`,{className:`max-w-full truncate`,children:t.label})]})})},t.target)})})})}function k0({leadingInset:e}){let t=mi(),{pathname:n}=di(),r=u0(n,f);return(0,L.jsx)(`header`,{"data-testid":`mobile-topbar`,className:`shrink-0 border-b border-gray-200/80 bg-white/95 backdrop-blur-sm`,style:{paddingTop:`calc(env(safe-area-inset-top, 0px) + 0.25rem)`},children:(0,L.jsxs)(`div`,{className:`flex min-h-[2.75rem] items-center gap-2 py-1.5 pl-3 pr-3`,style:{paddingLeft:e?`calc(${e} + 0.75rem)`:void 0},children:[r.backTarget?(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(r.backTarget),className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-gray-200 text-gray-600 transition-colors hover:bg-gray-50 hover:text-gray-900`,"aria-label":r.backLabel??f(`backToMain`),children:(0,L.jsx)(pt,{className:`h-4 w-4`})}):null,(0,L.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,L.jsx)(`h1`,{className:`truncate text-center text-[15px] font-semibold text-gray-900`,children:r.title})}),r.backTarget?(0,L.jsx)(`div`,{className:`h-8 w-8 shrink-0`,"aria-hidden":`true`}):null]})})}var A0=(0,I.lazy)(async()=>({default:(await h(async()=>{let{DocBrowser:e}=await import(`./doc-browser-Cr7330LU2.js`);return{DocBrowser:e}},__vite__mapDeps([25,26,4,27,28,29,30,31,32,33,34,35,36]))).DocBrowser}));function j0({pathname:e,isDocBrowserOpen:t,docBrowserDockControls:n,docBrowserRenderers:r={},topbarLeadingInset:i,children:a}){let o=n0(e),s=!r0(e),c=!r0(e);return(0,L.jsxs)(`div`,{className:`flex h-[100svh] flex-col bg-background font-sans text-foreground supports-[height:100dvh]:h-[100dvh]`,children:[s?(0,L.jsx)(k0,{leadingInset:i}):null,(0,L.jsx)(`div`,{className:`relative flex-1 min-h-0 overflow-hidden`,children:o?(0,L.jsx)(`div`,{className:`h-full min-h-0 overflow-hidden`,children:a}):(0,L.jsx)(`main`,{className:`h-full overflow-auto px-4 py-4 custom-scrollbar`,children:(0,L.jsx)(`div`,{className:`mx-auto max-w-3xl animate-fade-in`,children:a})})}),c?(0,L.jsx)(O0,{}):null,t?(0,L.jsx)(I.Suspense,{fallback:null,children:(0,L.jsx)(A0,{customTabRenderers:r,displayMode:`fullscreen`,dockControls:n})}):null]})}function M0(){let e=c0(f);return(0,L.jsx)(`div`,{"data-testid":`mobile-settings-shell`,className:`space-y-3 pb-4`,children:e.map(e=>(0,L.jsxs)(Pa,{to:e.target,className:({isActive:e})=>m(`flex items-center gap-3 rounded-2xl border border-gray-200/80 bg-white px-4 py-4 shadow-card transition-colors`,e?`border-gray-300 bg-gray-50`:`hover:border-gray-300 hover:bg-gray-50/70`),children:[(0,L.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl bg-gray-100 text-gray-600`,children:(0,L.jsx)(e.icon,{className:`h-4 w-4`})}),(0,L.jsx)(`div`,{className:`min-w-0`,children:(0,L.jsx)(`p`,{className:`truncate text-sm font-semibold text-gray-900`,children:e.label})})]},e.target))})}function N0(){let{pathname:e}=di(),t=mi();return r0(e)?(0,L.jsx)(x$,{layoutMode:`mobile`,onBackToList:()=>t(`/chat`)}):(0,L.jsx)(Z0,{variant:`mobile`})}var P0=(0,I.lazy)(async()=>({default:(await h(async()=>{let{DocBrowser:e}=await import(`./doc-browser-Cr7330LU2.js`);return{DocBrowser:e}},__vite__mapDeps([25,26,4,27,28,29,30,31,32,33,34,35,36]))).DocBrowser}));function F0({pathname:e,isMobileLayout:t=!1,isDocBrowserOpen:n,docBrowserMode:r,docBrowserDockControls:i,docBrowserRenderers:a={},sideDock:o,children:s}){let c=n0(e),l=Sn(e=>e.isSidebarCollapsed),u=t&&!r0(e),d=T0(),f=l?`56px`:c?`280px`:`240px`;return(0,L.jsxs)(`div`,{className:m(`h-screen flex flex-col overflow-hidden bg-background font-sans text-foreground`,d?`rounded-[10px]`:null),style:d?{"--desktop-titlebar-height":`40px`,"--desktop-caption-safe-right":`140px`,"--desktop-sidebar-width":f}:void 0,children:[d?(0,L.jsx)(x0,{sidebarCollapsed:l}):null,(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[!c&&(0,L.jsx)(y0,{mode:`settings`}),(0,L.jsxs)(`div`,{className:`flex-1 flex min-w-0 overflow-hidden relative`,children:[(0,L.jsx)(`div`,{className:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:c?(0,L.jsx)(`div`,{className:`flex-1 h-full overflow-hidden`,children:s}):(0,L.jsx)(`main`,{className:`flex-1 overflow-auto p-8 pb-16 custom-scrollbar`,children:(0,L.jsx)(`div`,{className:`mx-auto h-full max-w-6xl animate-fade-in`,children:s})})}),n&&r===`docked`?(0,L.jsx)(I.Suspense,{fallback:null,children:(0,L.jsx)(P0,{customTabRenderers:a,dockControls:i})}):null,o]})]}),u?(0,L.jsx)(O0,{}):null,n&&r===`floating`?(0,L.jsx)(I.Suspense,{fallback:null,children:(0,L.jsx)(P0,{customTabRenderers:a,dockControls:i})}):null]})}var I0=[{target:`/cron`,label:()=>f(`chatSidebarScheduledTasks`),icon:Za},{target:`/skills`,label:()=>f(`chatSidebarSkills`),icon:io},{target:`/agents`,label:()=>f(`agentsPageTitle`),icon:no}];function L0({isCollapsed:e}){let t=f(e?`sidebarExpand`:`sidebarCollapse`);return(0,L.jsx)(St,{icon:(0,L.jsx)(e?is:rs,{className:p1}),label:t,className:m(_1,e&&`h-9 w-9 rounded-xl`),onClick:xn.toggleSidebarCollapsed})}function R0({connectionStatus:e,isCollapsed:t}){let n=T0(),r=typeof window<`u`&&window.nextclawDesktop?.platform===`darwin`;return(0,L.jsxs)(`div`,{className:m(`flex items-center`,t?`justify-center px-2 py-1.5`:n?`justify-end px-3 py-1.5`:`gap-2 px-5 py-2`,t&&r?`pt-8`:null),children:[t||n?null:(0,L.jsx)(O1,{className:`flex min-w-0 flex-1 items-center gap-2`,suffix:(0,L.jsx)(L1,{status:e})}),(0,L.jsx)(L0,{isCollapsed:t})]})}function z0({isCollapsed:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:m(`pb-2`,e?`px-0`:`px-3`),children:(0,L.jsx)(`ul`,{className:e?m1:`space-y-0.5`,children:I0.map(t=>(0,L.jsx)(`li`,{className:e?`flex justify-center`:void 0,children:(0,L.jsx)(H1,{to:t.target,label:t.label(),icon:t.icon,density:`compact`,collapsed:e})},t.target))})}),(0,L.jsx)(`div`,{className:m(`border-t border-border/70`,e?`mx-2 my-1.5`:`mx-4`)})]})}function B0({defaultSessionType:e,groups:t,isCollapsed:n,isLoading:r,isProjectFirstView:i,onCreateProject:a,onSelectMode:o,projectGroups:s,renderSessionItem:c,sessionTypeOptions:l}){return n?(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,"aria-hidden":`true`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between px-5 pb-2 pt-3`,children:[(0,L.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wider text-muted-foreground/75`,children:f(`chatSidebarTaskRecords`)}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1`,children:[i?(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-3.5 w-3.5`}),label:f(`chatProjectCreate`),onClick:a}):null,(0,L.jsx)(Wl,{isProjectFirstView:i,onSelectMode:o})]})]}),(0,L.jsx)(`div`,{className:m(`custom-scrollbar min-h-0 flex-1 overflow-y-auto px-3 pb-7 pt-2`,g1),children:(0,L.jsx)(Y1,{isLoading:r,isProjectFirstView:i,groups:t,projectGroups:s,defaultSessionType:e,sessionTypeOptions:l,renderSessionItem:c})})]})}function V0({currentLanguage:e,currentLanguageLabel:t,currentTheme:n,currentThemeLabel:r,isCollapsed:i,isOpen:a,languageOptions:o,onOpenApps:s,onOpenChange:c,onOpenDocs:l,onSelectLanguage:u,onSelectTheme:d,themeOptions:f}){return(0,L.jsx)(`div`,{className:m(`py-3`,i?m(`flex justify-center`,d1):`px-3`),children:(0,L.jsx)(X1,{isOpen:a,onOpenChange:c,currentTheme:n,currentThemeLabel:r,themeOptions:f,onSelectTheme:d,currentLanguage:e,currentLanguageLabel:t,languageOptions:o,onSelectLanguage:u,onOpenDocs:l,onOpenApps:s,collapsed:i})})}var H0=fe.chat.newSessionType,U0=[`preference`,H0];function W0(e,t){let n=Kl(e);return t.find(e=>e.value===n&&e.ready!==!1)??null}function G0(e){let{defaultSessionType:t,preferredSessionType:n,sessionTypeOptions:r}=e,i=n?W0(n,r):null,a=W0(t,r);return i??a??r.find(e=>e.ready!==!1)??r[0]??{value:Kl(t),label:Kl(t),icon:null,ready:!0,reason:null,reasonMessage:null,supportedModels:void 0,recommendedModel:null,modelSelectionMode:`nextclaw`,runtimeDefaultThinking:null,cta:null}}function K0(e){return typeof e?.value==`string`?Kl(e.value):null}function q0({defaultSessionType:e,sessionTypeOptions:t}){let n=pe(),r=Fe({queryKey:U0,queryFn:()=>Ge(H0),staleTime:3e4,retry:!1}),i=(0,I.useMemo)(()=>K0(r.data),[r.data]),a=(0,I.useMemo)(()=>G0({preferredSessionType:i,defaultSessionType:e,sessionTypeOptions:t}),[e,i,t]),o=ge({mutationFn:async e=>await Ye(H0,Kl(e)),onMutate:async e=>{let t=Kl(e);await n.cancelQueries({queryKey:U0});let r=n.getQueryData(U0);return n.setQueryData(U0,{key:H0,value:t,updatedAt:new Date().toISOString()}),{previous:r}},onError:(e,t,r)=>{r?.previous&&n.setQueryData(U0,r.previous)},onSuccess:e=>{n.setQueryData(U0,e)}}),s=(0,I.useCallback)(e=>{let n=W0(e,t);n&&o.mutate(n.value)},[t,o]);return{selectedSessionType:a.value,selectedSessionTypeOption:a,isLoading:r.isLoading,setSelectedSessionType:s}}function J0(e){return f(e===`knowledge-base`?`chatProjectTemplateKnowledgeBase`:`chatProjectTemplateEmpty`)}function Y0({open:e,defaultWorkspacePath:t,templates:n,isCreating:r,errorMessage:i,onOpenChange:a,onCreate:o}){let[s,c]=(0,I.useState)(``),[l,u]=(0,I.useState)(``),[d,p]=(0,I.useState)(!1),[m,h]=(0,I.useState)(`empty`),_=n.length>0?n.map(e=>e.id):[`empty`],v=s.trim(),y=()=>{c(``),u(``),h(`empty`),p(!1)},b=()=>{r||(y(),a(!1))};return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ct,{open:e,onOpenChange:e=>{if(e){a(!0);return}b()},children:(0,L.jsxs)(ut,{className:`sm:max-w-lg`,children:[(0,L.jsxs)(lt,{children:[(0,L.jsx)(dt,{children:f(`chatProjectCreateTitle`)}),(0,L.jsx)(st,{children:f(`chatProjectCreateDescription`)})]}),(0,L.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{if(e.preventDefault(),!v||r)return;let t=l.trim();o({name:v,template:m,...t?{rootPath:t}:{}}).then(y).catch(()=>void 0)},children:[(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(M,{htmlFor:`chat-project-name`,children:f(`chatProjectNameLabel`)}),(0,L.jsx)(g,{id:`chat-project-name`,value:s,onChange:e=>c(e.target.value),placeholder:f(`chatProjectNamePlaceholder`),autoFocus:!0,disabled:r})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(M,{htmlFor:`chat-project-template`,children:f(`chatProjectTemplateLabel`)}),(0,L.jsxs)(Zt,{value:m,onValueChange:e=>h(e),disabled:r,children:[(0,L.jsx)(Ut,{id:`chat-project-template`,children:(0,L.jsx)(It,{})}),(0,L.jsx)(Kt,{children:_.map(e=>(0,L.jsx)(Yt,{value:e,children:J0(e)},e))})]})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(M,{htmlFor:`chat-project-root-path`,children:f(`chatProjectPathLabel`)}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(g,{id:`chat-project-root-path`,value:l,onChange:e=>u(e.target.value),placeholder:f(`chatProjectPathPlaceholder`),disabled:r}),(0,L.jsxs)(be,{type:`button`,variant:`outline`,onClick:()=>p(!0),disabled:r,children:[(0,L.jsx)(Mo,{className:`mr-2 h-4 w-4`}),f(`browse`)]})]}),(0,L.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:f(`chatProjectPathHint`)})]}),i?(0,L.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:i}):null,(0,L.jsxs)(ot,{children:[(0,L.jsx)(be,{type:`button`,variant:`outline`,onClick:b,disabled:r,children:f(`cancel`)}),(0,L.jsx)(be,{type:`submit`,disabled:!v||r,children:f(r?`saving`:`chatProjectCreateAction`)})]})]})]})}),(0,L.jsx)(xc,{open:d,currentPath:l,defaultWorkspacePath:t,isSaving:!1,onOpenChange:p,onConfirm:e=>{u(e),p(!1)},title:f(`chatProjectPathPickerTitle`),description:f(`chatProjectPathPickerDescription`),pathLabel:f(`chatProjectPathLabel`),pathPlaceholder:f(`chatProjectPathPlaceholder`),confirmLabel:f(`selectCurrentDirectory`),hint:f(`chatProjectPathHint`)})]})}function X0(e,t,n){let r=R(e=>e.optimisticReadAtBySessionKey);return(0,I.useEffect)(()=>{(()=>{if(!t)return;let r=e.find(({session:e})=>e.key===t);if(!r||r.runStatus===`running`)return;let{session:i}=r;n(i.key,i.lastMessageAt,i.readAt)})()},[e,n,t]),r}function Z0({variant:e=`desktop`}){let t=e===`mobile`,n=Ac(),r=Wn(),i=Sn(e=>e.isSidebarCollapsed),[a,o]=(0,I.useState)(!1),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1),p=R(e=>e.snapshot),h=gu(e=>e.snapshot.sessionTypesQuery?.data??null),g=gu(e=>e.snapshot.configQuery?.data??null),_=A(),v=dd(),y=vu(),b=yu(),{isLoading:x,items:S}=Il(),{language:C,setLanguage:w}=on(),{theme:T,setTheme:E}=r1(),D=f(D$.find(e=>e.value===T)?.labelKey??`themeWork`),O=s.find(e=>e.value===C)?.label??C,k=(0,I.useMemo)(()=>D$.map(e=>({value:e.value,label:f(e.labelKey)})),[]),ee=(0,I.useMemo)(()=>s.map(e=>({value:e.value,label:e.label})),[]),j=(0,I.useMemo)(()=>new Map((v.data?.agents??[]).map(e=>[e.id,e])),[v.data?.agents]),M=(0,I.useMemo)(()=>new Set(p.pinnedSessionKeys),[p.pinnedSessionKeys]),N=(0,I.useMemo)(()=>new Set(p.pinnedProjectRoots),[p.pinnedProjectRoots]),te=(0,I.useMemo)(()=>Rl(S),[S]),ne=(0,I.useMemo)(()=>Hl(S),[S]),re=(0,I.useMemo)(()=>Bl(te,M),[M,te]),ie=(0,I.useMemo)(()=>Vl(te,M,N,y.data?.projects??[]),[N,M,y.data?.projects,te]),ae=(0,I.useMemo)(()=>Yl(h?.options??[]),[h?.options]),oe=(0,I.useMemo)(()=>Kl(h?.defaultType??`native`),[h?.defaultType]),se=(0,I.useMemo)(()=>ae.filter(e=>e.value!==oe),[oe,ae]),ce=q0({defaultSessionType:oe,sessionTypeOptions:ae}),le=p.listMode===`project-first`,ue=!t&&i,de=X0(S,p.selectedSessionKey,n.chatSessionListManager.markSessionRead),{editingSessionKey:fe,draftLabel:pe,savingSessionKey:me,setDraftLabel:he,startEditingSessionLabel:ge,cancelEditingSessionLabel:_e,saveSessionLabel:ve}=S$(),ye=e=>{C!==e&&(w(e),window.location.reload())},be=e=>(0,L.jsx)(s1,{item:e,selectedSessionKey:p.selectedSessionKey,optimisticReadAtBySessionKey:de,agentsById:j,childSessionsByParentKey:ne,editingSessionKey:fe,draftLabel:pe,savingSessionKey:me,sessionTypeOptions:ae,isPinned:M.has(e.session.key),sessionTitle:Ul,onSelectSession:n.chatSessionListManager.selectSession,onOpenChildSessions:(e,t)=>n.chatThreadManager.openChildSessionPanel({parentSessionKey:e,activeChildSessionKey:t}),onStartEditingSessionLabel:ge,onDraftLabelChange:he,onSaveSessionLabel:ve,onCancelEditingSessionLabel:_e,onTogglePinned:()=>n.chatSessionListManager.toggleSessionPinned(e.session.key)},e.session.key),xe=(e,t)=>{n.chatSessionListManager.createSession(e,typeof t==`string`?t:void 0)},Se=()=>{b.reset(),l(!0)},Ce=async e=>{await b.mutateAsync(e),l(!1)};return(0,L.jsxs)(`aside`,{className:m(`flex h-full min-h-0 flex-col bg-secondary transition-[width] duration-200 ease-out`,t?`flex-1 overflow-hidden`:ue?m(u1,`shrink-0`):`w-[280px] shrink-0`),"data-sidebar-collapsed":ue?`true`:`false`,children:[t?null:(0,L.jsx)(R0,{connectionStatus:_.connectionStatus,isCollapsed:ue}),t?(0,L.jsx)(w1,{query:p.query,defaultSessionType:ce.selectedSessionType,sessionTypeOptions:ae,nonDefaultSessionTypeOptions:se,selectedNewSessionType:ce.selectedSessionType,selectedNewSessionTypeOption:ce.selectedSessionTypeOption,isCreateMenuOpen:a,onCreateMenuOpenChange:o,onCreateSession:xe,onSelectNewSessionType:ce.setSelectedSessionType,onQueryChange:n.chatSessionListManager.setQuery}):(0,L.jsx)(C1,{query:p.query,defaultSessionType:oe,sessionTypeOptions:ae,nonDefaultSessionTypeOptions:se,selectedNewSessionType:ce.selectedSessionType,selectedNewSessionTypeOption:ce.selectedSessionTypeOption,isCreateMenuOpen:a,onCreateMenuOpenChange:o,onCreateSession:xe,onSelectNewSessionType:ce.setSelectedSessionType,onQueryChange:n.chatSessionListManager.setQuery,collapsed:ue}),t?null:(0,L.jsx)(z0,{isCollapsed:ue}),(0,L.jsx)(B0,{defaultSessionType:ce.selectedSessionType,groups:re,isCollapsed:ue,isLoading:x,isProjectFirstView:le,onCreateProject:Se,onSelectMode:n.chatSessionListManager.setListMode,projectGroups:ie,renderSessionItem:be,sessionTypeOptions:ae}),t?null:(0,L.jsx)(V0,{currentLanguage:C,currentLanguageLabel:O,currentTheme:T,currentThemeLabel:D,isCollapsed:ue,isOpen:u,languageOptions:ee,onOpenApps:()=>Zq(r),onOpenChange:d,onOpenDocs:()=>r.open(void 0,{kind:`docs`,title:f(`docBrowserHelp`)}),onSelectLanguage:ye,onSelectTheme:E,themeOptions:k}),(0,L.jsx)(Y0,{open:c,defaultWorkspacePath:Vc(g?.agents.defaults.workspace),templates:y.data?.templates??[],isCreating:b.isPending,errorMessage:b.error?.message,onOpenChange:l,onCreate:Ce})]})}var Q0=`sid_`,$0=`/chat/draft`,e2=$0.slice(6);function t2(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCharCode(e);return`${Q0}${btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``)}`}function n2(e){if(!e.startsWith(Q0))return null;let t=e.slice(4).replace(/-/g,`+`).replace(/_/g,`/`),n=`=`.repeat((4-t.length%4)%4);try{let e=atob(t+n),r=Uint8Array.from(e,e=>e.charCodeAt(0));return new TextDecoder().decode(r)}catch{return null}}function r2(e){if(!e||e===e2)return null;let t=n2(e);if(t)return t;try{return decodeURIComponent(e)}catch{return e}}function i2(e){return`/chat/${t2(e)}`}function a2(e,t){let n=t.trim();return n?e.includes(n)?e.filter(e=>e!==n):[n,...e]:e}var o2=class{constructor(e){this.uiManager=e,this.syncDraftThreadState=()=>{sd.getState().setSnapshot({sessionKey:null,sessionDisplayName:void 0,canDeleteSession:!1,parentSessionKey:null,parentSessionLabel:null,workspacePanelParentKey:null,activeWorkspacePanelKind:null,childSessionTabs:[],activeChildSessionKey:null,activeWorkspaceFileKey:null,closedWorkspaceTabEntries:[],workspaceNavigationHistory:[],workspaceNavigationHistoryIndex:0})},this.resolveUpdateValue=(e,t)=>typeof t==`function`?t(e):t,this.shouldPersistReadAt=(e,t,n)=>{let r=R.getState().optimisticReadAtBySessionKey[e],i=r&&n?r.localeCompare(n)>0?r:n:r??n??void 0;return i?t.localeCompare(i)>0:!0},this.setSelectedAgentId=e=>{let t=R.getState().snapshot.selectedAgentId,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({selectedAgentId:n})},this.syncSelectedSessionAgent=()=>{let e=sd.getState().snapshot.agentId?.trim();e&&this.setSelectedAgentId(e)},this.setSelectedSessionKey=e=>{let t=R.getState().snapshot.selectedSessionKey,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({selectedSessionKey:n})},this.syncRouteSessionSelection=e=>{let{isChatView:t,routeSessionKey:n}=e;if(!t)return;let{selectedSessionKey:r}=R.getState().snapshot;if(n){r!==n&&this.setSelectedSessionKey(n);return}r!==null&&this.setSelectedSessionKey(null)},this.setListMode=e=>{let t=R.getState().snapshot.listMode,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({listMode:n})},this.toggleSessionPinned=e=>{let{pinnedSessionKeys:t}=R.getState().snapshot;R.getState().setSnapshot({pinnedSessionKeys:a2(t,e)})},this.toggleProjectPinned=e=>{let{pinnedProjectRoots:t}=R.getState().snapshot;R.getState().setSnapshot({pinnedProjectRoots:a2(t,e)})},this.toggleProjectCollapsed=e=>{let{collapsedProjectRoots:t}=R.getState().snapshot;R.getState().setSnapshot({collapsedProjectRoots:a2(t,e)})},this.markSessionRead=(e,t,n)=>{let r=e?.trim(),i=t?.trim();!r||!i||this.shouldPersistReadAt(r,i,n)&&(R.getState().markSessionRead(r,i),S(r,{uiReadAt:i}).catch(()=>void 0))},this.markVisibleWorkspaceChildRead=e=>{this.markSessionRead(e.sessionKey,e.runStatus===`running`?null:e.lastMessageAt,e.readAt)},this.createSession=(e,t)=>{let n=Kl(e??`native`),r=Vc(t);R.getState().setSnapshot({selectedSessionKey:null}),this.syncDraftThreadState(),this.uiManager.navigateTo($0,{replace:this.uiManager.isAtChatRoot(),state:{chatDraft:{sessionType:n,projectRoot:r}}})},this.startAgentDraftChat=(e,t)=>{let n=e.trim()||`main`;this.createSession(t),this.setSelectedAgentId(n)},this.selectSession=e=>{this.uiManager.goToSession(e)},this.setQuery=e=>{let t=R.getState().snapshot.query,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({query:n})}}},s2=async()=>!1,c2=class{constructor(e){this.docBrowserManager=e,this.state={pathname:``},this.actions={navigate:null,confirm:s2},this.syncState=e=>{this.state={...this.state,...e}},this.bindActions=e=>{this.actions={...this.actions,...e}},this.confirm=async e=>this.actions.confirm(e),this.navigateTo=(e,t)=>{this.actions.navigate&&(this.state.pathname===e&&!t?.replace||(this.actions.navigate(e,t),this.state.pathname=e))},this.goToProviders=()=>{this.navigateTo(`/providers`)},this.isCompactViewport=()=>xn.getSnapshot().mode===`mobile`,this.resolvePanelAppEntry=async e=>{let t=e.trim();if(!t)return null;try{return PK((await we.panelApps.listPanelApps()).entries,t)}catch{return null}},this.showContent=async e=>{let{target:t,title:n}=e;if(t.type===`url`){this.docBrowserManager.open(t.payload.url,{dedupeKey:`browser:${t.payload.url}`,kind:`content`,title:n});return}let{appId:r}=t.payload,i=await this.resolvePanelAppEntry(r);if(i){this.docBrowserManager.openTarget(Dq(i),{title:n});return}this.docBrowserManager.open(wq(r),{title:n})},this.goToChatRoot=e=>{this.navigateTo(`/chat`,e)},this.isAtChatRoot=()=>this.state.pathname===`/chat`||this.state.pathname===`/chat/draft`,this.goToSession=(e,t)=>{this.navigateTo(i2(e),t)}}};function l2(e){let t=e=>{if(!e||typeof e!=`object`)return e;let t=e,n=t.error instanceof Error?{name:t.error.name,message:t.error.message}:t.error;return{data:t.data,error:n,status:t.status,fetchStatus:t.fetchStatus,isLoading:t.isLoading,isFetching:t.isFetching,isFetched:t.isFetched,isSuccess:t.isSuccess}};return{configQuery:t(e.configQuery),providersQuery:t(e.providersQuery),providerTemplatesQuery:t(e.providerTemplatesQuery),sessionsQuery:t(e.sessionsQuery),sessionTypesQuery:t(e.sessionTypesQuery),sessionSkillsSessionId:e.sessionSkillsSessionId,sessionSkillsQuery:t(e.sessionSkillsQuery)}}function u2(e,t){return JSON.stringify(l2(e))!==JSON.stringify(l2({...e,...t}))}var d2=class{constructor(){this.syncSnapshot=e=>{let t=gu.getState();u2(t.snapshot,e)&&t.setSnapshot(e)}}},f2=class{constructor(e,t,n){this.uiManager=e,this.sessionListManager=t,this.onWorkspacePanelOpened=n,this.handledUiShowContentEventIds=new Set,this.hasSnapshotChanges=e=>{let t=sd.getState().snapshot;for(let[n,r]of Object.entries(e))if(!Object.is(t[n],r))return!0;return!1},this.syncSnapshot=e=>{this.hasSnapshotChanges(e)&&sd.getState().setSnapshot(e)},this.clearDeletedSessionState=e=>{R.getState().snapshot.selectedSessionKey===e&&this.sessionListManager.setSelectedSessionKey(null),sd.getState().setSnapshot({sessionKey:null,sessionTypeLabel:null,agentId:null,sessionDisplayName:void 0,sessionProjectRoot:null,sessionProjectName:null,canDeleteSession:!1,parentSessionKey:null,parentSessionLabel:null,workspacePanelParentKey:null,activeWorkspacePanelKind:null,childSessionTabs:[],activeChildSessionKey:null,activeSideChatDraft:null,workspaceFileTabs:[],activeWorkspaceFileKey:null,closedWorkspaceTabEntries:[],workspaceNavigationHistory:[],workspaceNavigationHistoryIndex:0})},this.resolveWorkspaceParentSessionKey=()=>R.getState().snapshot.selectedSessionKey?.trim()||sd.getState().snapshot.sessionKey?.trim()||(R.getState().snapshot.selectedSessionKey??null),this.activateWorkspaceFileTab=(e,t)=>{let{parentSessionKey:n}=e,{workspaceFileTabs:r}=sd.getState().snapshot;this.setWorkspaceSelection({workspacePanelParentKey:n,activeWorkspacePanelKind:`file`,workspaceFileTabs:sK(r,e,t),activeWorkspaceFileKey:e.key,activeChildSessionKey:null,activeSideChatDraft:null},{kind:`file`,key:e.key}),this.ensureWorkspaceParentRoute(n),this.onWorkspacePanelOpened?.()},this.ensureWorkspaceParentRoute=e=>{if(!e)return;let{snapshot:{selectedSessionKey:t}}=R.getState();t!==e&&this.uiManager.goToSession(e)},this.setWorkspaceSelection=(e,t)=>{let{snapshot:n}=sd.getState(),r=Bu({entries:n.workspaceNavigationHistory,index:n.workspaceNavigationHistoryIndex},t,Wu),i=e.workspacePanelParentKey&&e.workspacePanelParentKey!==n.workspacePanelParentKey?[]:n.closedWorkspaceTabEntries.filter(e=>!Wu(e,t));sd.getState().setSnapshot({...e,closedWorkspaceTabEntries:i,workspaceNavigationHistory:[...r.entries],workspaceNavigationHistoryIndex:r.index})},this.openWorkspacePage=(e,t)=>{let n=e.trim();n&&(this.setWorkspaceSelection({workspacePanelParentKey:n,activeWorkspacePanelKind:t,activeChildSessionKey:null,activeSideChatDraft:null,activeWorkspaceFileKey:null},{kind:t}),this.ensureWorkspaceParentRoute(n),this.onWorkspacePanelOpened?.())},this.openWorkspaceOverview=e=>{this.openWorkspacePage(e,`overview`)},this.toggleWorkspacePanel=e=>{let t=e.trim();if(!t)return;let{snapshot:n}=sd.getState();if(n.workspacePanelParentKey===t&&n.activeWorkspacePanelKind){this.closeWorkspacePanel();return}this.openWorkspaceOverview(t)},this.setWorkspacePanelWidth=e=>{this.syncSnapshot({workspacePanelWidth:Lu(e)})},this.openChildSessions=e=>{this.openWorkspacePage(e,`child-sessions`)},this.openProjectFiles=e=>{this.openWorkspacePage(e,`project-files`)},this.openChildSessionPanel=e=>{let{activeChildSessionKey:t,childSessionTab:n,parentSessionKey:r}=e,i=r.trim();if(!i)return;let a=t?.trim()||null,o={workspacePanelParentKey:i,activeWorkspacePanelKind:`child-session`,activeChildSessionKey:a,activeSideChatDraft:null,activeWorkspaceFileKey:null};a&&n&&(o.childSessionTabs=Yu(sd.getState().snapshot.childSessionTabs,{sessionKey:a,parentSessionKey:i,label:n.label?.trim()||null,agentId:n.agentId?.trim()||null})),a?this.setWorkspaceSelection(o,{kind:`child-session`,key:a}):sd.getState().setSnapshot(o),this.ensureWorkspaceParentRoute(i),this.onWorkspacePanelOpened?.()},this.openSideChatDraft=e=>{let t=e?.trim()||this.resolveWorkspaceParentSessionKey()?.trim();if(!t)return;let n=Ju(t);this.setWorkspaceSelection({workspacePanelParentKey:t,activeWorkspacePanelKind:`side-chat-draft`,activeChildSessionKey:null,activeSideChatDraft:n,activeWorkspaceFileKey:null},{kind:`side-chat-draft`,key:n.draftKey}),this.ensureWorkspaceParentRoute(t),this.onWorkspacePanelOpened?.()},this.materializeSideChatDraft=e=>{let t=Xu({snapshot:sd.getState().snapshot,...e});t&&(sd.getState().setSnapshot(t.patch),this.ensureWorkspaceParentRoute(t.parentSessionKey))},this.openFilePreview=e=>{let t=oK(e,this.resolveWorkspaceParentSessionKey());t&&this.activateWorkspaceFileTab(t)},this.openWorkspaceFileViewer=(e,t)=>{let n=sd.getState().snapshot.workspaceFileTabs.find(t=>t.key===e.trim());if(!n||n.viewMode!==`preview`)return;let r=t??Ed(n.path,n.previewViewer);if(!r)return;let i=oK({path:n.path,label:n.label??void 0,viewMode:`preview`,previewViewer:r,line:n.line??void 0,column:n.column??void 0,rawText:n.rawText??void 0,contentUrl:n.contentUrl??void 0,mimeType:n.mimeType??void 0},n.parentSessionKey);i&&this.activateWorkspaceFileTab(i,n.key)},this.openSessionFromToolAction=e=>{if(e.kind!==`open-session`)return;let t=e.sessionId.trim();if(t){if(e.sessionKind===`child`&&!this.uiManager.isCompactViewport()){let n=e.parentSessionId?.trim()||R.getState().snapshot.selectedSessionKey||null;if(n){this.openChildSessionPanel({parentSessionKey:n,activeChildSessionKey:t,childSessionTab:{label:e.label,agentId:e.agentId}});return}}this.closeWorkspacePanel(),this.uiManager.goToSession(t)}},this.handleToolAction=async e=>{if(e.kind===`show-content`){await this.showContent(e.request);return}this.openSessionFromToolAction(e)},this.handleUiShowContentEvent=async e=>{let t=e.id.trim();!t||this.handledUiShowContentEventIds.has(t)||(this.handledUiShowContentEventIds.add(t),await this.showContent({target:e.target,title:e.title,purpose:e.purpose,placement:e.placement}))},this.showContent=async e=>{if(e.placement!==`inline`){if(e.target.type===`file`){this.openFilePreview({path:e.target.payload.path,label:e.title,viewMode:`preview`,previewViewer:e.target.payload.viewer,line:e.target.payload.line,column:e.target.payload.column});return}await this.uiManager.showContent({target:e.target,title:e.title})}},this.syncVisibleWorkspaceSelection=e=>{e?.kind===`child-session`&&this.sessionListManager.markVisibleWorkspaceChildRead(e.tab)},this.selectChildSessionDetail=e=>{let t=e.trim();t&&this.setWorkspaceSelection({activeChildSessionKey:t,activeWorkspaceFileKey:null,activeWorkspacePanelKind:`child-session`,activeSideChatDraft:null},{kind:`child-session`,key:t})},this.selectWorkspaceFile=e=>{let t=e.trim();if(!t)return;let{workspaceFileTabs:n}=sd.getState().snapshot;n.some(e=>e.key===t)&&this.setWorkspaceSelection({activeWorkspaceFileKey:t,activeChildSessionKey:null,activeWorkspacePanelKind:`file`,activeSideChatDraft:null},{kind:`file`,key:t})},this.closeWorkspaceTab=e=>{let{snapshot:t}=sd.getState(),n=qu(t,e);n&&sd.getState().setSnapshot(n)},this.closeWorkspacePanel=()=>{sd.getState().setSnapshot({workspacePanelParentKey:null,activeWorkspacePanelKind:null,activeChildSessionKey:null,activeSideChatDraft:null,activeWorkspaceFileKey:null,closedWorkspaceTabEntries:[],workspaceNavigationHistory:[],workspaceNavigationHistoryIndex:0})},this.openSessionCronPanel=e=>{this.openWorkspacePage(e,`cron`)},this.goBackWorkspacePanel=()=>{this.restoreWorkspaceNavigationStep(`back`)},this.goForwardWorkspacePanel=()=>{this.restoreWorkspaceNavigationStep(`forward`)},this.restoreWorkspaceNavigationStep=e=>{let{snapshot:t}=sd.getState(),n=Vu({entries:t.workspaceNavigationHistory,index:t.workspaceNavigationHistoryIndex},e);if(!n)return;let r=Ku(n.entry,t);r&&sd.getState().setSnapshot({...r,workspaceNavigationHistory:[...n.history.entries],workspaceNavigationHistoryIndex:n.history.index})},this.goToParentSession=()=>{let{parentSessionKey:e,activeSideChatDraft:t,childSessionTabs:n,activeChildSessionKey:r}=sd.getState().snapshot,i=n.find(e=>e.sessionKey===r)?.parentSessionKey??null,a=e??t?.parentSessionKey??i;a&&(this.closeWorkspacePanel(),this.uiManager.goToSession(a))},this.deleteSession=async()=>{let{snapshot:{selectedSessionKey:e}}=R.getState();if(e&&await this.uiManager.confirm({title:f(`chatDeleteSessionConfirm`),variant:`destructive`,confirmLabel:f(`delete`)})){sd.getState().setSnapshot({isDeletePending:!0});try{await te(e),Te(Ne,e),Ne.removeQueries({queryKey:[`ncp-session-messages`,e]}),this.clearDeletedSessionState(e),this.uiManager.goToChatRoot({replace:!0})}finally{sd.getState().setSnapshot({isDeletePending:!1})}}}}},p2=class{constructor(e){this.chatUiManager=new c2(e.docBrowserManager),this.chatSessionListManager=new o2(this.chatUiManager),this.chatQueryManager=new d2,this.chatThreadManager=new f2(this.chatUiManager,this.chatSessionListManager,e.notifyRightPanelOpened)}},m2=class{constructor(){this.nextId=0,this.pendingIntent=null,this.listeners=new Set,this.requestDraft=e=>{let t=e.trim();if(!t)return;let n={id:this.nextId+1,prompt:t};this.nextId=n.id,this.pendingIntent=n,this.listeners.forEach(e=>e(n))},this.consumePending=()=>{let e=this.pendingIntent;return this.pendingIntent=null,e},this.markConsumed=e=>{this.pendingIntent?.id===e&&(this.pendingIntent=null)},this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)})}};function h2(){return Fe({queryKey:[`ncp-session-types`],queryFn:le,staleTime:1e4,retry:!1})}var g2=`nextclaw://docs`,_2=`github-project`,v2=`https://github.com/Peiiii/nextclaw`;function y2(){return[{builtIn:!0,icon:{type:`builtin`,name:`apps`},id:`apps`,label:f(`appsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:gq}},{builtIn:!0,icon:{type:`builtin`,name:`service-apps`},id:`service-apps`,label:f(`serviceAppsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:_q}},{builtIn:!0,icon:{type:`builtin`,name:`docs`},id:`docs`,label:f(`docBrowserHelp`),removable:!1,target:{type:`right-panel-resource`,uri:g2}},{builtIn:!0,icon:{type:`builtin`,name:`new-tab`},id:`new-tab`,label:f(`docBrowserHomeTitle`),removable:!1,target:{type:`right-panel-resource`,uri:mq}},{builtIn:!0,icon:{type:`builtin`,name:`github`},id:_2,label:f(`sideDockGitHubProject`),removable:!1,target:{type:`external-url`,url:v2}}]}var b2=[`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`];function x2(e){return!!e&&typeof e==`object`}function S2(e){return b2.includes(e)}function C2(e){return!x2(e)||typeof e.type!=`string`?null:e.type===`builtin`&&S2(e.name)?{type:`builtin`,name:e.name}:e.type===`url`&&typeof e.url==`string`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e.type===`text`&&typeof e.value==`string`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function w2(e){if(!x2(e)||typeof e.id!=`string`||e.id.trim().length===0||typeof e.label!=`string`||e.label.trim().length===0||typeof e.createdAt!=`string`||e.createdAt.trim().length===0||!x2(e.target)||e.target.type!==`right-panel-resource`||typeof e.target.uri!=`string`||e.target.uri.trim().length===0)return null;let t=C2(e.icon);return t?{createdAt:e.createdAt,icon:t,id:e.id.trim(),label:e.label.trim(),target:{type:`right-panel-resource`,uri:e.target.uri.trim()}}:null}function T2(e){if(!Array.isArray(e))return[];let t=new Map;return e.forEach(e=>{let n=w2(e);n&&t.set(n.id,n)}),Array.from(t.values())}function E2(e,t){return{createdAt:t,icon:e.icon,id:e.id,label:e.label,target:e.target}}function D2(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function O2(e){return{builtIn:!1,icon:e.icon,id:e.id,label:e.label,removable:!0,target:e.target}}function k2(e,t){let n=new Set(e.map(e=>e.id)),r=new Set(e.map(D2).filter(e=>e!==null)),i=t.filter(e=>!n.has(e.id)&&!r.has(e.target.uri)).map(O2);return[...e,...i]}var A2=`nextclaw.side-dock.state`,j2=1;function M2(e){return!!e&&typeof e==`object`}var N2=p()(Pn(e=>({isVisible:!0,pinnedItems:[],setVisible:t=>e({isVisible:t}),setPinnedItems:t=>e({pinnedItems:T2(t)})}),{name:A2,version:j2,storage:Fn(()=>window.localStorage),partialize:e=>({isVisible:e.isVisible,pinnedItems:e.pinnedItems}),merge:(e,t)=>{let n=M2(e)?T2(e.pinnedItems):[],r=M2(e)&&typeof e.isVisible==`boolean`?e.isVisible:!0;return{...t,isVisible:r,pinnedItems:n}}})),P2={apps:ht,docs:Mt,github:Ro,"new-tab":Tn,"panel-app":Qa,"service-apps":Qa},F2=new Set([_2]),I2=/^\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\u200D\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?)*$/u;function L2(e){return I2.test(e.trim())}function R2({icon:e}){if(e.type===`url`)return(0,L.jsx)(`img`,{src:e.url,alt:``,className:`h-5 w-5 rounded object-cover`});if(e.type===`text`)return L2(e.value)?(0,L.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center text-[20px] leading-none`,"aria-hidden":`true`,children:e.value}):(0,L.jsx)(`span`,{className:`max-w-7 truncate text-center text-[13px] font-semibold leading-none`,"aria-hidden":`true`,children:e.value});let t=P2[e.name];return(0,L.jsx)(t,{className:`h-5 w-5`,"aria-hidden":`true`})}function z2({active:e,item:t,onOpen:n,onUnpin:r}){let{label:i}=t;return(0,L.jsxs)(gt,{children:[(0,L.jsxs)(`div`,{className:`group relative`,children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":i,title:i,"data-side-dock-item-id":t.id,onClick:()=>n(t),className:m(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,e?`bg-primary/10 text-primary`:`bg-transparent`),children:(0,L.jsx)(R2,{icon:t.icon})})}),t.removable?(0,L.jsx)(`button`,{type:`button`,"aria-label":f(`sideDockUnpinItem`),title:f(`sideDockUnpinItem`),onClick:e=>{e.stopPropagation(),r(t)},className:`absolute -right-1 -top-1 hidden h-4 w-4 items-center justify-center rounded-full bg-background text-muted-foreground shadow-sm ring-1 ring-border/70 transition-colors hover:bg-muted hover:text-foreground group-hover:flex focus-visible:flex focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,children:(0,L.jsx)(An,{className:`h-3 w-3`,"aria-hidden":`true`})}):null]}),(0,L.jsx)(Et,{side:`left`,children:i})]})}function B2({icon:e,label:t,onClick:n}){return(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":t,title:t,"data-side-dock-action":`hide`,onClick:n,className:m(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`),children:(0,L.jsx)(e,{className:`h-5 w-5`,"aria-hidden":`true`})})}),(0,L.jsx)(Et,{side:`left`,children:t})]})}function V2(e){return e?.trim()??``}function H2(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function U2(e,t,n,r=!1){if(!t||!n)return!1;let i=V2(H2(e)??void 0);if(!i)return!1;let a=V2(n.resourceUri);return a&&a===i||V2(n.currentUrl)===i?!0:r?!1:e.id===`docs`&&n.kind===`docs`}function W2(e,t){if(!t)return!1;let n=V2(t.resourceUri),r=V2(t.currentUrl);return e.some(e=>{let t=V2(H2(e)??void 0);return t===n||t===r})}function G2(e){return F2.has(e.id)}function K2({manager:e}){let t=N2(e=>e.pinnedItems),n=N2(e=>e.setVisible),{currentTab:r,isOpen:i}=Wn(),{confirm:a,ConfirmDialog:o}=cn(),s=k2(y2(),t),c=s.filter(e=>!G2(e)),l=s.filter(G2),u=W2(s,r),d=async()=>{await a({title:f(`sideDockHideConfirmTitle`),description:f(`sideDockHideConfirmDescription`),confirmLabel:f(`sideDockHideConfirmAction`),cancelLabel:f(`cancel`)})&&n(!1)};return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(`aside`,{"data-testid":`side-dock`,className:`z-30 flex h-full w-14 shrink-0 flex-col items-center gap-1 border-l border-border/60 bg-background/95 px-2 py-3`,children:[(0,L.jsx)(`div`,{className:`flex w-full flex-col items-center gap-1`,children:c.map(t=>(0,L.jsx)(z2,{active:U2(t,i,r,u),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id))}),l.length>0?(0,L.jsxs)(`div`,{"data-testid":`side-dock-utility`,className:`mt-auto flex w-full flex-col items-center gap-1`,children:[l.map(t=>(0,L.jsx)(z2,{active:U2(t,i,r,u),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id)),(0,L.jsx)(B2,{icon:as,label:f(`sideDockHide`),onClick:()=>{d()}})]}):null,(0,L.jsx)(o,{})]})})}var q2=`pinned`,J2=new Set([`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`]);function Y2(e){return e.trim()}function X2(e){let t=0;return Array.from(Y2(e)).forEach(e=>{t=t*31+e.charCodeAt(0)>>>0}),`${q2}-${Y2(e).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase()||`resource`}-${t.toString(36)}`}function Z2(e){return e?.type===`builtin`&&J2.has(e.name)?{type:`builtin`,name:e.name}:e?.type===`url`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e?.type===`text`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function Q2(e){return e.kind===`docs`?`docs`:e.kind===`home`?`new-tab`:e.kind===`apps`?e.resourceUri?.includes(`service-apps`)?`service-apps`:`apps`:e.kind===`panel-app`?`panel-app`:`apps`}var $2=class{constructor(e){this.docBrowserManager=e,this.getItems=()=>k2(y2(),N2.getState().pinnedItems),this.openItem=async e=>{if(e.target.type===`right-panel-resource`){this.docBrowserManager.open(e.target.uri,{dockIcon:e.icon,title:e.label});return}e.target.type===`external-url`&&await Nn.openExternalUrl(e.target.url)},this.getDockState=e=>{let t=this.getTabResourceUri(e);if(!t)return{canDock:!1,isDocked:!1,removable:!1};let n=this.findItemByUri(t);return{canDock:!0,isDocked:!!n,removable:n?.removable===!0}},this.pinTab=(e,t=new Date().toISOString())=>{let n=this.getTabResourceUri(e);!e||!n||this.findItemByUri(n)||this.pinItem({builtIn:!1,icon:Z2(e.dockIcon)??{type:`builtin`,name:Q2(e)},id:X2(n),label:e.title.trim()||n,removable:!0,target:{type:`right-panel-resource`,uri:n}},t)},this.unpinTab=e=>{let t=this.getTabResourceUri(e),n=t?this.findItemByUri(t):void 0;n?.removable&&this.unpinItem(n.id)},this.pinItem=(e,t=new Date().toISOString())=>{if(!e.removable||e.target.type!==`right-panel-resource`)return;let n=Y2(e.target.uri),r={...e,target:{type:`right-panel-resource`,uri:n}};this.setPinnedItems(i=>i.some(t=>t.id===e.id||Y2(t.target.uri)===n)?i:[...i,E2(r,t)])},this.unpinItem=e=>{this.setPinnedItems(t=>t.filter(t=>t.id!==e))},this.reorderPinnedItems=e=>{this.setPinnedItems(t=>{let n=new Map(t.map(e=>[e.id,e])),r=e.map(e=>n.get(e)).filter(e=>e!==void 0),i=new Set(r.map(e=>e.id)),a=t.filter(e=>!i.has(e.id));return[...r,...a]})},this.setPinnedItems=e=>{let{pinnedItems:t,setPinnedItems:n}=N2.getState();n(e(t))},this.getTabResourceUri=e=>{let t=e?.resourceUri??e?.currentUrl,n=t?Y2(t):``;return n.length>0?n:null},this.findItemByUri=e=>{let t=Y2(e);return this.getItems().find(e=>e.target.type===`right-panel-resource`&&Y2(e.target.uri)===t)}}},e4=new class{constructor(){this.resolveOpenTarget=e=>{let{activeTab:t,kind:n,url:r}=e,i=n??(r?void 0:t?.kind)??(r&&Un(r)?`docs`:`home`),a=r?.trim()||(!n&&t&&t.kind!==`docs`?t.currentUrl:i===`home`?`nextclaw://new-tab`:i===`docs`?Rn():`about:blank`),o=i===`docs`?zn(a,`docs`):a;return{historyPolicy:`managed`,kind:i,title:i===`home`?f(`docBrowserHomeTitle`):Kn(o,i,i===`docs`?f(`docBrowserHelp`):`Detail`),url:o}},this.areUrlsEquivalent=(e,t,n,r)=>n===r?n===`docs`?Bn(e)===Bn(t):e===t:!1,this.usesManagedHistory=e=>e.currentUrl!==Ln}};function t4(e,t,n){return{...e,tabs:e.tabs.map(e=>e.id===t?n(e):e)}}function n4(e,t){return t4(e,e.activeTabId,t)}function r4(e,t){let n=[...e.history.slice(0,e.historyIndex+1),t];return{history:n,historyIndex:n.length-1}}function i4(e,t,n){let r=t.resourceUri??t.url,i=n.resourceUri??n.url;return t.tabId===n.tabId&&t.kind===n.kind&&e.areUrlsEquivalent(r,i,t.kind,n.kind)}function a4(e,t){return{kind:t.kind,resourceUri:t.resourceUri??t.url,tabId:e,url:t.url}}function o4(e,t,n){let r=Bu({entries:t.activeHistory,index:t.activeHistoryIndex},n,(t,n)=>i4(e,t,n));return{...t,activeHistory:[...r.entries],activeHistoryIndex:r.index}}function s4(e,t,n){for(let r=t.history.length-1;r>=0;--r)if(e.areUrlsEquivalent(t.history[r],n,t.kind,t.kind))return r;return-1}function c4(e,t,n){let r=t.tabs.find(e=>e.id===n.tabId);if(!r)return t;let i=n.resourceUri??n.url,a=e.resolveOpenTarget({activeTab:r,kind:n.kind,url:i}),o=s4(e,r,a.url),s=n.resourceUri!==void 0&&n.resourceUri===r.resourceUri;return t4({...t,activeTabId:r.id,isOpen:!0},r.id,e=>({...e,currentUrl:a.url,dedupeKey:a.dedupeKey,dockIcon:a.dockIcon??e.dockIcon,historyIndex:o>=0?o:e.historyIndex,kind:a.kind,resourceUri:a.resourceUri??a.url,title:s?e.title:a.title}))}function l4(e,t,n,r,i){let a={...t,title:r?.title||n.title||t.title,kind:n.kind,resourceUri:n.resourceUri??n.url,dockIcon:r?.dockIcon??n.dockIcon,dedupeKey:i};return e.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind)?a:{...a,currentUrl:n.url,...r4(t,n.url),navVersion:t.navVersion+1}}function u4(e,t){return!e.isOpen&&e.tabs.length===1&&t?.kind===`home`&&t.currentUrl===`nextclaw://new-tab`}function d4(e,t,n,r){let{activate:i,dedupeKey:a,newTab:o,title:s}=r??{},c=a?.trim()||n.dedupeKey,l=t.tabs.find(e=>e.id===t.activeTabId)??t.tabs[0],u=c?t.tabs.find(e=>e.dedupeKey===c):void 0;if(u){let a=t4(t,u.id,t=>l4(e,t,n,r,c)),o=i!==!1,s=o?u.id:t.activeTabId,l={...a,activeTabId:s,isOpen:!0};return o||u.id===t.activeTabId?o4(e,l,a4(u.id,n)):l}if(o||c||!l||l.kind!==n.kind){let i=Gn(n.url,n.kind,s??n.title,c,n.resourceUri??n.url,r?.dockIcon??n.dockIcon);return u4(t,l)?{...t,isOpen:!0,tabs:[i],activeTabId:i.id,activeHistory:[In(i)],activeHistoryIndex:0}:o4(e,{...t,isOpen:!0,tabs:[...t.tabs,i],activeTabId:i.id},In(i))}return o4(e,{...n4(t,t=>l4(e,t,n,r,c)),isOpen:!0},a4(t.activeTabId,n))}function f4(e,t,n,r){let i=t.tabs.find(e=>e.id===t.activeTabId)??t.tabs[0];return d4(e,t,e.resolveOpenTarget({activeTab:i,kind:r?.kind,url:n}),r)}var p4=class{constructor(e=e4,t){this.routeResolver=e,this.onRightPanelOpened=t,this.setSnapshot=e=>{qn.getState().setSnapshot(e)},this.open=(e,t)=>{this.setSnapshot(n=>f4(this.routeResolver,n,e,t)),this.onRightPanelOpened?.()},this.openTarget=(e,t)=>{this.setSnapshot(n=>d4(this.routeResolver,n,e,{...t,dedupeKey:t?.dedupeKey??e.dedupeKey,kind:t?.kind??e.kind,title:t?.title??e.title})),this.onRightPanelOpened?.()},this.openNewTab=()=>{this.open(void 0,{kind:Hn,newTab:!0})},this.close=()=>{this.setSnapshot(e=>({...e,isOpen:!1}))},this.toggleMode=()=>{this.setSnapshot(e=>({...e,mode:e.mode===`floating`?`docked`:`floating`})),this.onRightPanelOpened?.()},this.setDockedWidth=e=>{this.setSnapshot(t=>({...t,dockedWidth:Jn(e)}))},this.navigate=e=>{this.setSnapshot(t=>{if(!t.tabs.length){let e=Gn(Rn(),`docs`,`Docs`);return{...t,tabs:[e],activeTabId:e.id,isOpen:!0}}let n=n4(t,t=>{if(!this.routeResolver.usesManagedHistory(t))return t;let n=this.routeResolver.resolveOpenTarget({activeTab:t,url:e});return this.routeResolver.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind)?t:{...t,currentUrl:n.url,dedupeKey:n.dedupeKey,dockIcon:n.dockIcon,...r4(t,n.url),kind:n.kind,navVersion:t.navVersion+1,resourceUri:n.resourceUri??n.url,title:n.title}}),r=n.tabs.find(e=>e.id===n.activeTabId);return r?o4(this.routeResolver,n,In(r)):n})},this.syncUrl=e=>{this.setSnapshot(t=>{if(!t.tabs.length){let e=Gn(Rn(),`docs`,`Docs`);return{...t,tabs:[e],activeTabId:e.id}}let n=n4(t,t=>{if(!this.routeResolver.usesManagedHistory(t))return t;let n=this.routeResolver.resolveOpenTarget({activeTab:t,kind:t.kind,url:e});return this.routeResolver.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind)?t:{...t,currentUrl:n.url,dedupeKey:n.dedupeKey,dockIcon:n.dockIcon,...r4(t,n.url),kind:n.kind,resourceUri:n.resourceUri??n.url,title:n.title}}),r=n.tabs.find(e=>e.id===n.activeTabId);return r?o4(this.routeResolver,n,In(r)):n})},this.goBack=()=>{this.setSnapshot(e=>{let t=Vu({entries:e.activeHistory,index:e.activeHistoryIndex},`back`);return t?c4(this.routeResolver,{...e,activeHistory:[...t.history.entries],activeHistoryIndex:t.history.index},t.entry):e})},this.goForward=()=>{this.setSnapshot(e=>{let t=Vu({entries:e.activeHistory,index:e.activeHistoryIndex},`forward`);return t?c4(this.routeResolver,{...e,activeHistory:[...t.history.entries],activeHistoryIndex:t.history.index},t.entry):e})},this.closeTab=e=>{this.setSnapshot(t=>{if(t.tabs.length<=1)return{...Vn(),isOpen:!1};let n=t.tabs.findIndex(t=>t.id===e);if(n<0)return t;let r=t.tabs.filter(t=>t.id!==e),i=t.activeTabId===e?r[Math.max(0,n-1)]?.id??r[0].id:t.activeTabId,a={...t,tabs:r,activeTabId:i},o=r.find(e=>e.id===i)??r[0],s=Hu({entries:a.activeHistory,index:a.activeHistoryIndex},t=>t.tabId!==e,In(o)),c={...a,activeHistory:[...s.entries],activeHistoryIndex:s.index};return t.activeTabId===e?o4(this.routeResolver,c,In(o)):c})},this.setActiveTab=e=>{this.setSnapshot(t=>{if(!t.tabs.some(t=>t.id===e))return t;let n=t.tabs.find(t=>t.id===e);return n?o4(this.routeResolver,{...t,activeTabId:e,isOpen:!0},In(n)):t})}}};function m4(e){return e.activeWorkspacePanelKind!=null}var h4=class{constructor(){this.accountManager=new $s,this.rightPanelResourceRouteResolver=new Wq,this.notifyRightPanelOpened=()=>{let e=qn.getState().snapshot,t=sd.getState().snapshot;xn.collapseSidebarForDenseRightPanels({isDocBrowserDocked:e.mode===`docked`,isDocBrowserOpen:e.isOpen,isWorkspacePanelOpen:m4(t)})},this.docBrowserManager=new p4(this.rightPanelResourceRouteResolver,this.notifyRightPanelOpened),this.sideDockManager=new $2(this.docBrowserManager),this.chatDraftIntentManager=new m2,this.serviceActionAuthorizationManager=new HK,this.panelAppBridgeManager=new MK(this.serviceActionAuthorizationManager),this.remoteAccessManager=new Vs({accountManager:this.accountManager})}},g4=null;function _4(){return g4??=new h4,g4}function v4(){return _4()}var y4=globalThis,b4=y4.__NEXTCLAW_APP_PRESENTER_CONTEXT__??(0,I.createContext)(null);y4.__NEXTCLAW_APP_PRESENTER_CONTEXT__=b4;function x4({children:e}){let t=(0,I.useMemo)(()=>_4(),[]);return(0,L.jsx)(b4.Provider,{value:t,children:e})}function S4(){let e=(0,I.useContext)(b4);if(!e)throw Error(`useAppPresenter must be used inside AppPresenterProvider`);return e}export{gs as $,ud as A,Zs as B,s$ as C,dd as D,zK as E,Nl as F,Ms as G,Gs as H,Ml as I,Ls as J,Fs as K,kc as L,Kl as M,ql as N,pd as O,Jl as P,bs as Q,Ac as R,x$ as S,Qq as T,Vs as U,Ks as V,Bs as W,js as X,zs as Y,ks as Z,Q1 as _,gi as _t,N2 as a,bo as at,Y$ as b,r2 as c,ao as ct,N0 as d,Bi as dt,ls as et,M0 as f,Vi as ft,$1 as g,mi as gt,f0 as h,di as ht,K2 as i,Vo as it,Yl as j,fd as k,Z0 as l,no as lt,w0 as m,Wi as mt,S4 as n,ns as nt,h2 as o,yo as ot,j0 as p,Hi as pt,Is as q,v4 as r,Xo as rt,p2 as s,co as st,x4 as t,cs as tt,F0 as u,Aa as ut,n1 as v,cJ as w,J$ as x,Q$ as y,Qs as z};
|
|
106
|
+
`);return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`span`,{role:`img`,"aria-label":t,tabIndex:0,className:`inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-amber-50 text-[13px] font-bold leading-none text-amber-700 ring-1 ring-amber-100 outline-none focus-visible:ring-2 focus-visible:ring-amber-300`,children:`!`})}),(0,L.jsx)(Et,{side:`bottom`,className:`max-w-80 whitespace-pre-line break-words text-xs leading-relaxed`,children:a})]})})}function P1(e){return e.status===`blocked`?f(`desktopUpdatesStatusBlocked`):f(e.failureStage?`desktopUpdatesFailureStage.${e.failureStage}`:`desktopUpdatesStatusFailed`)}function F1(e){let t=e.progress?.percent;return t==null?f(`desktopUpdatesInlineDownloading`):f(`desktopUpdatesInlineDownloadingPercent`).replace(`{percent}`,String(t))}var I1={connected:{dotClass:`bg-emerald-500`},disconnected:{dotClass:`h-2.5 w-2.5 rounded-full border border-gray-400 bg-transparent`},connecting:{dotClass:`text-amber-600`}};function L1({status:e,className:t}){let n=I1[e],r=f(e===`connected`?`connected`:e===`disconnected`?`disconnected`:`connecting`);return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`span`,{role:`status`,"aria-label":r,className:m(`inline-flex h-5 w-5 items-center justify-center`,t),children:e===`connecting`?(0,L.jsx)(wn,{className:m(`h-3 w-3 animate-spin`,n.dotClass)}):(0,L.jsx)(`span`,{className:m(e===`connected`?`h-2 w-2 rounded-full`:``,n.dotClass)})})}),(0,L.jsx)(Et,{side:`bottom`,className:`text-xs`,children:r})]})})}var R1={default:{row:`gap-3 px-3 py-2.5 text-[14px]`,icon:`h-[17px] w-[17px]`,value:`text-xs`,gap:`gap-3`},compact:{row:`gap-2.5 px-3 py-2 text-[13px]`,icon:`h-4 w-4`,value:`text-[11px]`,gap:`gap-2.5`}};function z1(e){return R1[e]}function B1(e,t){let n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith(`${r}/`)}function V1({children:e,label:t,side:n=`right`}){return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:e}),(0,L.jsx)(Et,{side:n,className:`text-xs`,children:t})]})})}function H1({to:e,label:t,icon:n,density:r=`default`,className:i,collapsed:a=!1}){let o=z1(r),{pathname:s}=di(),c=B1(s,e),l=(0,L.jsxs)(Na,{to:e,"aria-label":t,"aria-current":c?`page`:void 0,className:m(`group flex w-full items-center rounded-xl font-medium transition-colors duration-base focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,a?m(f1,`justify-center px-0 py-0`):o.row,c?a?v1:`bg-gray-200/80 text-gray-900 shadow-sm`:a?_1:`text-muted-foreground hover:bg-gray-200/60 hover:text-gray-900`,i),children:[(0,L.jsx)(n,{className:m(a?p1:o.icon,`shrink-0 transition-colors`,c?`text-gray-700`:`text-muted-foreground group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:a?`sr-only`:`min-w-0 flex-1 text-left`,children:t})]});return a?(0,L.jsx)(V1,{label:t,children:l}):l}function U1({isCollapsed:e,items:t,density:n,className:r}){return(0,L.jsx)(`ul`,{className:r,children:t.map(t=>(0,L.jsx)(`li`,{className:e?`flex justify-center`:void 0,children:(0,L.jsx)(H1,{to:t.target,label:t.label,icon:t.icon,density:n,collapsed:e})},t.target))})}function W1({label:e,icon:t,onClick:n,density:r=`default`,className:i,labelClassName:a,trailing:o,trailingClassName:s,testId:c,trailingTestId:l,collapsed:u=!1}){let d=z1(r),f=(0,L.jsxs)(`button`,{type:`button`,onClick:n,"aria-label":e,className:m(`group flex w-full items-center rounded-xl font-medium text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,u?m(f1,`justify-center px-0 py-0`,_1):d.row,i),"data-testid":c,children:[(0,L.jsx)(t,{className:m(u?p1:d.icon,`shrink-0 text-muted-foreground transition-colors group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:m(u?`sr-only`:`min-w-0 flex-1 text-left`,a),children:e}),!u&&o?(0,L.jsx)(`span`,{className:m(`shrink-0 text-muted-foreground`,d.value,s),"data-testid":l,children:o}):null]});return u?(0,L.jsx)(V1,{label:e,children:f}):f}function G1({label:e,icon:t,value:n,valueLabel:r,onValueChange:i,density:a=`default`,children:o,collapsed:s=!1}){let c=z1(a),l=(0,L.jsxs)(Ut,{"aria-label":e,className:m(`group h-auto w-full rounded-xl border-0 bg-transparent font-medium text-muted-foreground shadow-none hover:bg-gray-200/60 hover:text-gray-900 focus:ring-0 focus-visible:ring-1 focus-visible:ring-border`,s?m(f1,`justify-center px-0 py-0`,_1):c.row),children:[(0,L.jsxs)(`div`,{className:m(`flex min-w-0 items-center`,s?`justify-center`:c.gap),children:[(0,L.jsx)(t,{className:m(s?p1:c.icon,`shrink-0 text-muted-foreground/75 transition-colors group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:s?`sr-only`:`text-left`,children:e})]}),s?null:(0,L.jsx)(`span`,{className:m(`ml-auto text-muted-foreground`,c.value),children:r})]});return(0,L.jsxs)(Zt,{value:n,onValueChange:i,children:[s?(0,L.jsx)(V1,{label:`${e}: ${r}`,children:l}):l,(0,L.jsx)(Kt,{children:o})]})}function K1(e,t){return t.some(t=>t.value===e)?e:t[0]?.value??e}function q1(e){let{groups:t,defaultSessionType:n,sessionTypeOptions:r,renderSessionItem:i}=e,a=Ac(),o=R(e=>e.snapshot.collapsedProjectRoots),[s,c]=(0,I.useState)(null),l=(0,I.useMemo)(()=>K1(n,r),[n,r]),u=r.length>1;return(0,L.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>{let t=`${f(`chatSidebarNewTask`)} · ${e.projectName}`,n=o.includes(e.projectRoot),d=f(e.isPinned?`chatSidebarUnpinProject`:`chatSidebarPinProject`);return(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`group/project relative h-10 rounded-lg px-2 text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900`,children:[(0,L.jsxs)(`button`,{type:`button`,"aria-expanded":!n,"aria-label":f(n?`chatSidebarExpandProject`:`chatSidebarCollapseProject`),className:`flex h-full w-full min-w-0 items-center gap-1.5 pr-14 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>a.chatSessionListManager.toggleProjectCollapsed(e.projectRoot),children:[(0,L.jsx)(fn,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`truncate text-[11px] font-medium uppercase tracking-wider`,title:e.projectRoot,children:e.projectName}),n?(0,L.jsx)(so,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}):(0,L.jsx)(Nt,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground/70`,children:e.items.length})]}),(0,L.jsxs)(`div`,{className:`pointer-events-none absolute right-2 top-1/2 flex -translate-y-1/2 items-center opacity-0 transition-opacity group-hover/project:pointer-events-auto group-hover/project:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100`,children:[u?(0,L.jsxs)(it,{open:s===e.projectRoot,onOpenChange:t=>{c(t?e.projectRoot:null)},children:[(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-3.5 w-3.5`}),label:t})}),(0,L.jsx)(nt,{align:`end`,className:`w-56 rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-[0_24px_60px_-28px_rgba(15,23,42,0.38)]`,children:(0,L.jsx)(l1,{options:r,selectedSessionType:l,onSelect:t=>{a.chatSessionListManager.createSession(t,e.projectRoot),c(null)}})})]}):(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-3.5 w-3.5`}),label:t,onClick:()=>a.chatSessionListManager.createSession(l,e.projectRoot)}),(0,L.jsx)(St,{icon:(0,L.jsx)(wt,{className:e.isPinned?`h-3.5 w-3.5 fill-current text-foreground`:`h-3.5 w-3.5`}),label:d,tooltipSide:`right`,onClick:()=>a.chatSessionListManager.toggleProjectPinned(e.projectRoot)})]})]}),n?null:(0,L.jsx)(`div`,{className:`mt-0.5 space-y-0.5 pl-2`,children:e.items.map(i)})]},e.projectRoot)})})}function J1({label:e}){return(0,L.jsxs)(`div`,{className:`p-4 text-center`,children:[(0,L.jsx)(Qo,{className:`mx-auto mb-2 h-6 w-6 text-muted-foreground/45`}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e})]})}function Y1({defaultSessionType:e,groups:t,isLoading:n,isProjectFirstView:r,projectGroups:i,renderSessionItem:a,sessionTypeOptions:o}){return n?(0,L.jsx)(`div`,{className:`p-3 text-xs text-muted-foreground`,children:f(`sessionsLoading`)}):r?i.length===0?(0,L.jsx)(J1,{label:f(`chatSidebarProjectViewEmpty`)}):(0,L.jsx)(q1,{groups:i,defaultSessionType:e,sessionTypeOptions:o,renderSessionItem:a}):t.length===0?(0,L.jsx)(J1,{label:f(`sessionsEmpty`)}):(0,L.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`px-2 py-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70`,children:e.label}),(0,L.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(a)})]},e.label))})}function X1({isOpen:e,onOpenChange:t,currentTheme:n,currentThemeLabel:r,themeOptions:i,onSelectTheme:a,currentLanguage:o,currentLanguageLabel:s,languageOptions:c,onSelectLanguage:l,onOpenDocs:u,onOpenApps:d,collapsed:p=!1}){return(0,L.jsxs)(it,{open:e,onOpenChange:t,children:[p?(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)($e,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":f(`settingsMenu`),className:m(`flex items-center justify-center`,f1,_1),children:(0,L.jsx)(gn,{className:m(p1,`shrink-0 text-muted-foreground`)})})})}),(0,L.jsx)(Et,{side:`right`,className:`text-xs`,children:f(`settingsMenu`)})]})}):(0,L.jsx)($e,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,"aria-label":f(`settingsMenu`),className:`flex w-full items-center gap-2.5 rounded-xl px-3 py-2 text-[13px] font-medium text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,children:[(0,L.jsx)(gn,{className:`h-4 w-4 shrink-0 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 text-left`,children:f(`settings`)}),(0,L.jsxs)(`span`,{className:`max-w-[112px] truncate text-[13px] text-muted-foreground`,children:[r,` / `,s]})]})}),(0,L.jsxs)(nt,{side:p?`right`:`top`,align:p?`end`:`start`,className:`w-64 p-2`,children:[(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsxs)(Pa,{to:`/settings`,onClick:()=>t(!1),className:`flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] font-medium text-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900`,children:[(0,L.jsx)(gn,{className:`h-4 w-4 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`flex-1 text-left`,children:f(`settings`)})]}),[{key:`docs`,icon:Mt,label:f(`docBrowserHelp`),action:u},{key:`apps`,icon:ht,label:f(`appsTitle`),action:d}].map(({key:e,icon:n,label:r,action:i})=>(0,L.jsxs)(`button`,{type:`button`,onClick:()=>{i(),t(!1)},className:`flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] font-medium text-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900`,children:[(0,L.jsx)(n,{className:`h-4 w-4 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`flex-1 text-left`,children:r})]},e))]}),(0,L.jsx)(`div`,{className:`my-2 h-px bg-border`}),(0,L.jsx)(Z1,{icon:ns,label:f(`theme`),options:i,value:n,valueLabel:r,onSelect:a,onCloseMenu:()=>t(!1)}),(0,L.jsx)(Z1,{icon:Uo,label:f(`language`),options:c,value:o,valueLabel:s,onSelect:l,onCloseMenu:()=>t(!1)})]})]})}function Z1({icon:e,label:t,options:n,value:r,valueLabel:i,onSelect:a,onCloseMenu:o}){return(0,L.jsxs)(Zt,{value:r,onOpenChange:e=>{e||o()},onValueChange:e=>a(e),children:[(0,L.jsxs)(Ut,{"aria-label":t,className:`h-auto w-full rounded-lg border-0 bg-transparent px-3 py-2 text-[13px] font-medium text-foreground shadow-none hover:bg-gray-200/60 hover:text-gray-900 focus:ring-0`,indicator:(0,L.jsx)(so,{className:`h-4 w-4 text-muted-foreground/70`}),children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,L.jsx)(e,{className:`h-4 w-4 shrink-0 text-muted-foreground/70`}),(0,L.jsx)(`span`,{className:`text-left`,children:t})]}),(0,L.jsx)(`span`,{className:`ml-auto max-w-[96px] truncate text-[13px] text-muted-foreground`,children:i})]}),(0,L.jsx)(Kt,{side:`right`,align:`center`,sideOffset:6,className:`z-[var(--z-tooltip)] min-w-[7rem] rounded-lg`,viewportClassName:`h-auto min-w-[7rem] w-auto`,children:n.map(e=>(0,L.jsx)(Yt,{value:e.value,className:`text-[13px]`,children:e.label},e.value))})]})}var Q1=p(()=>({supported:!1,initialized:!1,busyAction:null,snapshot:null})),$1=new class{constructor(){this.start=async()=>{let e=this.getDesktopApi();if(!e){this.markUnsupported();return}Q1.setState({supported:!0,initialized:!1,busyAction:`loading`});try{let t=await e.getPresenceState();Q1.setState({supported:!0,initialized:!0,busyAction:null,snapshot:t})}catch(e){Q1.setState({supported:!0,initialized:!0,busyAction:null}),P.error(`${f(`runtimePresenceLoadFailed`)}: ${this.getErrorMessage(e)}`)}},this.markUnsupported=()=>{Q1.setState({supported:!1,initialized:!0,busyAction:null,snapshot:null})},this.updatePreferences=async e=>{let t=this.getDesktopApi();if(!t)throw Error(f(`runtimePresenceLaunchAtLoginUnavailable`));Q1.setState({busyAction:`saving-preferences`});try{let n=await t.updatePresencePreferences(e);return Q1.setState({supported:!0,initialized:!0,snapshot:n}),P.success(f(`runtimePresenceSaved`)),n}catch(e){throw P.error(`${f(`runtimePresenceSaveFailed`)}: ${this.getErrorMessage(e)}`),e}finally{Q1.setState({busyAction:null})}},this.getDesktopApi=()=>typeof window>`u`?null:window.nextclawDesktop??null,this.getErrorMessage=e=>e instanceof Error?e.message:f(`error`)}},e0=p(()=>({supported:!1,initialized:!1,busyAction:null,snapshot:null}));new class{constructor(){this.unsubscribe=null,this.subscriptionCount=0,this.start=async()=>{this.subscriptionCount+=1;let e=this.getDesktopApi();if(!e){e0.setState({supported:!1,initialized:!0,snapshot:null});return}this.unsubscribe||=e.onUpdateStateChanged(e=>{e0.setState({supported:!0,initialized:!0,snapshot:e})}),e0.setState({supported:!0,initialized:!1});try{let t=await e.getUpdateState();e0.setState({supported:!0,initialized:!0,snapshot:t})}catch(e){e0.setState({supported:!0,initialized:!0}),P.error(`${f(`desktopUpdatesLoadFailed`)}: ${this.getErrorMessage(e)}`)}},this.stop=()=>{this.subscriptionCount=Math.max(0,this.subscriptionCount-1),!(this.subscriptionCount>0)&&(this.unsubscribe?.(),this.unsubscribe=null)},this.checkForUpdates=async()=>{let e;try{e=await this.runSnapshotCommand(`checking`,f(`desktopUpdatesCheckFailed`),async e=>await e.checkForUpdates())}catch{return}if(e.status===`up-to-date`){P.success(f(`desktopUpdatesAlreadyLatest`));return}if(e.status===`update-available`){P.success(f(`desktopUpdatesAvailable`).replace(`{version}`,e.availableVersion??f(`desktopUpdatesUnknownVersion`)));return}if(e.status===`downloaded`){P.success(f(`desktopUpdatesReadyToApply`));return}e.status===`failed`&&e.errorMessage&&P.error(e.errorMessage)},this.downloadUpdate=async()=>{let e;try{e=await this.runSnapshotCommand(`downloading`,f(`desktopUpdatesDownloadFailed`),async e=>await e.downloadUpdate())}catch{return}e.status===`downloaded`&&P.success(f(`desktopUpdatesReadyToApply`))},this.applyDownloadedUpdate=async()=>{try{await this.runSnapshotCommand(`applying`,f(`desktopUpdatesApplyFailed`),async e=>await e.applyDownloadedUpdate())}catch{return}},this.updateChannel=async e=>{if(e0.getState().snapshot?.channel===e)return;let t;try{t=await this.runSnapshotCommand(`switching-channel`,f(`desktopUpdatesChannelChangeFailed`),async t=>await t.updateChannel(e))}catch{return}if(t.status===`update-available`&&t.availableVersion){P.success(f(`desktopUpdatesChannelChangedWithUpdate`).replace(`{channel}`,this.getChannelLabel(e)).replace(`{version}`,t.availableVersion));return}P.success(f(`desktopUpdatesChannelChanged`).replace(`{channel}`,this.getChannelLabel(e)))},this.runSnapshotCommand=async(e,t,n)=>{let r=this.getDesktopApi();if(!r)throw Error(f(`desktopUpdatesDesktopOnlyDescription`));e0.setState({busyAction:e});try{let e=await n(r);return e0.setState({snapshot:e}),e}catch(e){throw P.error(`${t}: ${this.getErrorMessage(e)}`),e}finally{e0.setState({busyAction:null})}},this.getDesktopApi=()=>typeof window>`u`?null:window.nextclawDesktop??null,this.getErrorMessage=e=>e instanceof Error?e.message:f(`error`),this.getChannelLabel=e=>f(e===`beta`?`desktopUpdatesChannelBeta`:`desktopUpdatesChannelStable`)}};function t0(e,t){let n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith(`${r}/`)}function n0(e){let t=e.toLowerCase();return t===`/chat`||t.startsWith(`/chat/`)||t===`/skills`||t.startsWith(`/skills/`)||t===`/cron`||t.startsWith(`/cron/`)||t===`/agents`||t.startsWith(`/agents/`)}function r0(e){let t=e.toLowerCase();return t.startsWith(`/chat/`)&&t!==`/chat`}function i0(e){return[{target:`/chat`,label:e(`chat`),icon:Xo},{target:`/skills`,label:e(`marketplaceFilterSkills`),icon:io},{target:`/agents`,label:e(`agentsPageTitle`),icon:no},{target:`/settings`,label:e(`settings`),icon:gn}]}function a0(e){return[{target:`/chat`,label:e(`chat`),icon:Xo},{target:`/chat/cron`,label:e(`cron`),icon:Za},{target:`/chat/skills`,label:e(`marketplaceFilterSkills`),icon:io},{target:`/agents`,label:e(`agentsPageTitle`),icon:no}]}function o0(e){return[{target:`/model`,label:e(`model`),icon:yo},{target:`/providers`,label:e(`providers`),icon:Dn},{target:`/channels`,label:e(`channels`),icon:vn},{target:`/search`,label:e(`searchChannels`),icon:mt},{target:`/appearance`,label:e(`appearance`),icon:ns},{target:`/security`,label:e(`security`),icon:_s},{target:`/runtime`,label:e(`runtime`),icon:yo},{target:`/updates`,label:e(`updates`),icon:ln},{target:`/remote`,label:e(`remote`),icon:Es},{target:`/secrets`,label:e(`secrets`),icon:bn},{target:`/marketplace/mcp`,label:e(`marketplaceFilterMcp`),icon:Os}]}function s0(e){let t=o0(e);return[{label:e(`settingsGroupBasic`),items:t.slice(0,3)},{label:e(`settingsGroupAdvanced`),items:t.slice(3)}]}function c0(e){return[{target:`/language`,label:e(`language`),icon:Uo},...o0(e)]}function l0(e){let t=e.toLowerCase();return t===`/settings`?!0:c0(e=>e).some(e=>t0(t,e.target))}function u0(e,t){let n=e.toLowerCase(),r=c0(t);if(r0(n))return{title:t(`chat`),backTarget:`/chat`,backLabel:t(`chat`)};if(n===`/chat`)return{title:t(`chat`),backTarget:null,backLabel:null};if(n===`/skills`||n.startsWith(`/skills/`))return{title:t(`marketplaceFilterSkills`),backTarget:null,backLabel:null};if(n===`/agents`||n.startsWith(`/agents/`))return{title:t(`agentsPageTitle`),backTarget:null,backLabel:null};if(n===`/settings`)return{title:t(`settings`),backTarget:null,backLabel:null};for(let e of r)if(t0(n,e.target))return{title:e.label,backTarget:`/settings`,backLabel:t(`settings`)};return{title:t(`settings`),backTarget:null,backLabel:null}}function d0(){let{language:e,setLanguage:t}=on();return{currentLanguage:e,currentLanguageLabel:s.find(t=>t.value===e)?.label??e,languageOptions:s,selectLanguage:(0,I.useCallback)(n=>{e!==n&&(t(n),window.location.reload())},[e,t])}}function f0(){let{currentLanguage:e,currentLanguageLabel:t,languageOptions:n,selectLanguage:r}=d0();return(0,L.jsxs)(`section`,{className:`mx-auto w-full max-w-3xl space-y-4`,children:[(0,L.jsx)(`div`,{className:`rounded-3xl border border-gray-200/80 bg-white p-5 shadow-card`,children:(0,L.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,L.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl bg-gray-100 text-gray-600`,children:(0,L.jsx)(Uo,{className:`h-4 w-4`})}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:f(`language`)}),(0,L.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:t})]})]})}),(0,L.jsx)(`div`,{className:`overflow-hidden rounded-3xl border border-gray-200/80 bg-white shadow-card`,children:n.map(t=>{let n=t.value===e;return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>r(t.value),className:m(`flex w-full items-center justify-between gap-3 border-b border-gray-100 px-5 py-4 text-left text-sm transition-colors last:border-b-0`,n?`bg-gray-50 text-gray-900`:`text-gray-700 hover:bg-gray-50/70`),"aria-current":n?`true`:void 0,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:t.label}),n?(0,L.jsx)(en,{className:`h-4 w-4 text-gray-700`}):null]},t.value)})})]})}function p0(e,t){if(!e)return{items:a0(t),density:`default`};let n=s0(t);return{items:n.flatMap(e=>e.items),sections:n,density:`compact`}}function m0({isCollapsed:e,onToggle:t}){let n=f(e?`sidebarExpand`:`sidebarCollapse`);return(0,L.jsx)(St,{icon:(0,L.jsx)(e?is:rs,{className:p1}),label:n,className:m(_1,e&&`h-9 w-9 rounded-xl`),onClick:t})}function h0({isCollapsed:e,onToggle:t}){return(0,L.jsx)(`div`,{className:m(`shrink-0`,e?`px-0 py-1.5`:`px-2 py-2`),children:(0,L.jsxs)(`div`,{className:m(`flex items-center py-1`,e?m(`flex-col px-0`,h1):`gap-2 px-1`),"data-testid":`settings-sidebar-header`,children:[e?(0,L.jsx)(m0,{isCollapsed:e,onToggle:t}):null,(0,L.jsxs)(Pa,{to:`/chat`,"aria-label":f(`backToMain`),className:m(`group inline-flex min-w-0 items-center rounded-lg text-[12px] font-medium text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,e?m(f1,_1,`justify-center p-0`):`gap-1.5 px-1 py-1`),children:[(0,L.jsx)(pt,{className:m(e?p1:`h-3.5 w-3.5`,`shrink-0 text-muted-foreground/75 group-hover:text-gray-700`)}),(0,L.jsx)(`span`,{className:e?`sr-only`:`truncate`,children:f(`backToMain`)})]}),e?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`h-4 w-px shrink-0 bg-border`,"aria-hidden":`true`}),(0,L.jsx)(`h1`,{className:`truncate text-[15px] font-semibold tracking-[-0.01em] text-foreground`,children:f(`settings`)}),(0,L.jsx)(`div`,{className:`ml-auto`,children:(0,L.jsx)(m0,{isCollapsed:e,onToggle:t})})]})]})})}function g0({isCollapsed:e,onToggle:t}){return(0,L.jsx)(`div`,{className:m(`shrink-0`,e?`flex justify-center px-0 py-1.5`:`px-2 py-2`),children:e?(0,L.jsx)(m0,{isCollapsed:e,onToggle:t}):(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(O1,{className:`flex min-w-0 flex-1 items-center gap-2.5 cursor-pointer`}),(0,L.jsx)(m0,{isCollapsed:e,onToggle:t})]})})}function _0({isSettingsMode:e,isCollapsed:t,onToggle:n}){return e?(0,L.jsx)(h0,{isCollapsed:t,onToggle:n}):(0,L.jsx)(g0,{isCollapsed:t,onToggle:n})}function v0({isSettingsMode:e,isCollapsed:t,items:n,sections:r,density:i}){let a=m(t?m(m1,`pb-3`):e?`space-y-0.5 pb-3`:`space-y-1 pb-4`);return(0,L.jsx)(`nav`,{className:m(`custom-scrollbar min-h-0 flex-1 overflow-y-auto`,t?`pr-0`:`pr-1`,g1),children:r&&!t?(0,L.jsx)(`div`,{className:`space-y-3 pb-3`,children:r.map(e=>(0,L.jsxs)(`section`,{"aria-label":e.label,className:`space-y-1`,children:[(0,L.jsx)(`h2`,{className:`px-3 text-[11px] font-semibold text-muted-foreground/70`,children:e.label}),(0,L.jsx)(U1,{isCollapsed:t,items:e.items,density:i,className:`space-y-0.5`})]},e.label))}):(0,L.jsx)(U1,{isCollapsed:t,items:n,density:i,className:a})})}function y0({mode:e}){let t=S4(),n=Wn(),r=ks(),i=Sn(e=>e.isSidebarCollapsed),a=xn.toggleSidebarCollapsed,{currentLanguage:o,currentLanguageLabel:s,languageOptions:c,selectLanguage:l}=d0(),{theme:u,setTheme:d}=r1(),p=e===`settings`,h=f(D$.find(e=>e.value===u)?.labelKey??`themeWork`),g=r.data?.account.email?.trim(),_=!!r.data?.account.loggedIn,v=e=>{u!==e&&d(e)},{items:y,sections:b,density:x}=p0(p,f);return(0,L.jsxs)(`aside`,{className:m(`shrink-0 flex h-full min-h-0 flex-col overflow-hidden bg-secondary pb-6 transition-[width] duration-200 ease-out`,i?m(u1,d1):`w-[240px] px-4`),"data-sidebar-collapsed":i?`true`:`false`,children:[(0,L.jsx)(_0,{isSettingsMode:p,isCollapsed:i,onToggle:a}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsx)(v0,{isSettingsMode:p,isCollapsed:i,items:y,sections:b,density:x}),(0,L.jsxs)(`div`,{className:m(`shrink-0 bg-secondary`,i?`mt-2 pt-2`:p?`mt-2 pt-3`:`mt-3 pt-3`),children:[p?(0,L.jsx)(W1,{onClick:()=>t.accountManager.openAccountPanel(),icon:bn,label:f(`remoteAccountEntryManage`),density:`compact`,className:i?`mb-1`:`mb-1.5`,trailing:_?g||f(`remoteAccountEntryConnected`):f(`remoteAccountEntryDisconnected`),trailingClassName:`max-w-[92px] truncate text-right`,testId:`settings-sidebar-account-entry`,trailingTestId:`settings-sidebar-account-status`,collapsed:i}):null,e===`main`&&(0,L.jsx)(`div`,{className:m(i?`mb-1`:`mb-2`,i?`flex justify-center`:void 0),children:(0,L.jsx)(H1,{to:`/settings`,label:f(`settings`),icon:gn,collapsed:i})}),(0,L.jsx)(`div`,{className:m(i?`mb-1`:`mb-2`,i?`flex justify-center`:void 0),children:(0,L.jsx)(G1,{value:u,onValueChange:e=>v(e),icon:ns,label:f(`theme`),valueLabel:h,density:x,collapsed:i,children:D$.map(e=>(0,L.jsx)(Yt,{value:e.value,className:`text-xs`,children:f(e.labelKey)},e.value))})}),(0,L.jsx)(`div`,{className:m(i?`mb-1`:`mb-2`,i?`flex justify-center`:void 0),children:(0,L.jsx)(G1,{value:o,onValueChange:e=>l(e),icon:Uo,label:f(`language`),valueLabel:s,density:x,collapsed:i,children:c.map(e=>(0,L.jsx)(Yt,{value:e.value,className:`text-xs`,children:e.label},e.value))})}),(0,L.jsx)(W1,{onClick:()=>n.open(void 0,{kind:`docs`,title:f(`docBrowserHelp`)}),icon:Mt,label:f(`docBrowserHelp`),density:x,collapsed:i})]})]})]})}var b0=[{action:`minimize`,label:`Minimize`,icon:es},{action:`close`,label:`Close`,icon:An,variant:`danger`}];function x0({sidebarCollapsed:e=!1}){let t=C0()?{action:`toggle-maximize`,label:`Restore`,icon:_o}:{action:`toggle-maximize`,label:`Maximize`,icon:bs};return(0,L.jsxs)(`header`,{className:`desktop-window-drag relative flex h-[var(--desktop-titlebar-height)] shrink-0 bg-secondary after:absolute after:bottom-0 after:left-[var(--desktop-sidebar-width)] after:right-0 after:border-b after:border-border/80`,"data-testid":`desktop-window-chrome`,children:[(0,L.jsx)(`div`,{className:`desktop-window-no-drag absolute left-0 right-0 top-0 h-1`,"data-testid":`desktop-window-chrome-resize-strip`}),(0,L.jsx)(`div`,{className:m(`desktop-window-drag relative z-10 flex h-full w-[var(--desktop-sidebar-width)] shrink-0 items-center bg-secondary text-secondary-foreground`,e?`justify-center px-0`:`pl-4 pr-3`),"data-testid":`desktop-window-chrome-sidebar`,children:e?(0,L.jsx)(`img`,{src:`/logo.svg`,alt:`NextClaw`,className:`h-6 w-6 shrink-0 object-contain`}):(0,L.jsx)(O1,{className:`flex min-w-0 shrink-0 items-center gap-2.5`,density:`chrome`})}),(0,L.jsx)(`div`,{className:`desktop-window-no-drag absolute right-0 top-0 z-20 flex h-full w-[var(--desktop-caption-safe-right)] items-start justify-end`,"data-testid":`desktop-window-controls`,children:[b0[0],t,b0[1]].map(e=>(0,L.jsx)(S0,{control:e},e.action))})]})}function S0({control:e}){let t=e.icon;return(0,L.jsx)(`button`,{type:`button`,"aria-label":e.label,title:e.label,className:e.variant===`danger`?`desktop-window-no-drag flex h-10 w-[46px] items-center justify-center text-gray-700 transition-colors hover:bg-red-500 hover:text-white`:`desktop-window-no-drag flex h-10 w-[46px] items-center justify-center text-gray-700 transition-colors hover:bg-black/10`,onClick:()=>{window.nextclawDesktop?.controlWindow?.(e.action)},children:(0,L.jsx)(t,{className:`h-3.5 w-3.5`})})}function C0(){let[e,t]=(0,I.useState)(!1);return(0,I.useEffect)(()=>{let e=!0,n=window.nextclawDesktop;n?.getWindowState?.().then(n=>{e&&t(n.isMaximized)});let r=n?.onWindowStateChanged?.(e=>{t(e.isMaximized)});return()=>{e=!1,r?.()}},[]),e}function w0(){return typeof window>`u`?null:E0()??window.nextclawDesktop?.platform??null}function T0(){return w0()===`win32`}function E0(){return null}function D0(e,t){if(t===`/settings`)return l0(e);let n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith(`${r}/`)}function O0(){let{pathname:e}=di(),t=i0(f);return(0,L.jsx)(`nav`,{"data-testid":`mobile-bottom-nav`,"aria-label":f(`settings`),className:`shrink-0 border-t border-gray-200/80 bg-white/95 backdrop-blur-sm`,style:{paddingBottom:`calc(env(safe-area-inset-bottom, 0px) + 0.25rem)`},children:(0,L.jsx)(`ul`,{className:`grid grid-cols-4 gap-1 px-2 pt-1`,children:t.map(t=>{let n=D0(e,t.target);return(0,L.jsx)(`li`,{children:(0,L.jsx)(Na,{to:t.target,"aria-current":n?`page`:void 0,className:m(`group flex min-h-[2.875rem] items-center justify-center rounded-xl px-1 py-1 text-[10px] font-medium transition-colors`,n?`text-gray-900`:`text-gray-500 hover:text-gray-800`),children:(0,L.jsxs)(`span`,{"data-testid":n?`mobile-nav-active-indicator`:void 0,className:m(`inline-flex max-w-full min-w-14 flex-col items-center justify-center gap-0.5 rounded-xl px-2 py-1 transition-colors`,n?`bg-gray-100`:`bg-transparent group-hover:bg-gray-50`),children:[(0,L.jsx)(t.icon,{className:m(`h-3.5 w-3.5`,n?`text-gray-900`:`text-gray-400`)}),(0,L.jsx)(`span`,{className:`max-w-full truncate`,children:t.label})]})})},t.target)})})})}function k0({leadingInset:e}){let t=mi(),{pathname:n}=di(),r=u0(n,f);return(0,L.jsx)(`header`,{"data-testid":`mobile-topbar`,className:`shrink-0 border-b border-gray-200/80 bg-white/95 backdrop-blur-sm`,style:{paddingTop:`calc(env(safe-area-inset-top, 0px) + 0.25rem)`},children:(0,L.jsxs)(`div`,{className:`flex min-h-[2.75rem] items-center gap-2 py-1.5 pl-3 pr-3`,style:{paddingLeft:e?`calc(${e} + 0.75rem)`:void 0},children:[r.backTarget?(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(r.backTarget),className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-gray-200 text-gray-600 transition-colors hover:bg-gray-50 hover:text-gray-900`,"aria-label":r.backLabel??f(`backToMain`),children:(0,L.jsx)(pt,{className:`h-4 w-4`})}):null,(0,L.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,L.jsx)(`h1`,{className:`truncate text-center text-[15px] font-semibold text-gray-900`,children:r.title})}),r.backTarget?(0,L.jsx)(`div`,{className:`h-8 w-8 shrink-0`,"aria-hidden":`true`}):null]})})}var A0=(0,I.lazy)(async()=>({default:(await h(async()=>{let{DocBrowser:e}=await import(`./doc-browser-jVTq8iY_2.js`);return{DocBrowser:e}},__vite__mapDeps([25,26,4,27,28,29,30,31,32,33,34,35,36]))).DocBrowser}));function j0({pathname:e,isDocBrowserOpen:t,docBrowserDockControls:n,docBrowserRenderers:r={},topbarLeadingInset:i,children:a}){let o=n0(e),s=!r0(e),c=!r0(e);return(0,L.jsxs)(`div`,{className:`flex h-[100svh] flex-col bg-background font-sans text-foreground supports-[height:100dvh]:h-[100dvh]`,children:[s?(0,L.jsx)(k0,{leadingInset:i}):null,(0,L.jsx)(`div`,{className:`relative flex-1 min-h-0 overflow-hidden`,children:o?(0,L.jsx)(`div`,{className:`h-full min-h-0 overflow-hidden`,children:a}):(0,L.jsx)(`main`,{className:`h-full overflow-auto px-4 py-4 custom-scrollbar`,children:(0,L.jsx)(`div`,{className:`mx-auto max-w-3xl animate-fade-in`,children:a})})}),c?(0,L.jsx)(O0,{}):null,t?(0,L.jsx)(I.Suspense,{fallback:null,children:(0,L.jsx)(A0,{customTabRenderers:r,displayMode:`fullscreen`,dockControls:n})}):null]})}function M0(){let e=c0(f);return(0,L.jsx)(`div`,{"data-testid":`mobile-settings-shell`,className:`space-y-3 pb-4`,children:e.map(e=>(0,L.jsxs)(Pa,{to:e.target,className:({isActive:e})=>m(`flex items-center gap-3 rounded-2xl border border-gray-200/80 bg-white px-4 py-4 shadow-card transition-colors`,e?`border-gray-300 bg-gray-50`:`hover:border-gray-300 hover:bg-gray-50/70`),children:[(0,L.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl bg-gray-100 text-gray-600`,children:(0,L.jsx)(e.icon,{className:`h-4 w-4`})}),(0,L.jsx)(`div`,{className:`min-w-0`,children:(0,L.jsx)(`p`,{className:`truncate text-sm font-semibold text-gray-900`,children:e.label})})]},e.target))})}function N0(){let{pathname:e}=di(),t=mi();return r0(e)?(0,L.jsx)(x$,{layoutMode:`mobile`,onBackToList:()=>t(`/chat`)}):(0,L.jsx)(Z0,{variant:`mobile`})}var P0=(0,I.lazy)(async()=>({default:(await h(async()=>{let{DocBrowser:e}=await import(`./doc-browser-jVTq8iY_2.js`);return{DocBrowser:e}},__vite__mapDeps([25,26,4,27,28,29,30,31,32,33,34,35,36]))).DocBrowser}));function F0({pathname:e,isMobileLayout:t=!1,isDocBrowserOpen:n,docBrowserMode:r,docBrowserDockControls:i,docBrowserRenderers:a={},sideDock:o,children:s}){let c=n0(e),l=Sn(e=>e.isSidebarCollapsed),u=t&&!r0(e),d=T0(),f=l?`56px`:c?`280px`:`240px`;return(0,L.jsxs)(`div`,{className:m(`h-screen flex flex-col overflow-hidden bg-background font-sans text-foreground`,d?`rounded-[10px]`:null),style:d?{"--desktop-titlebar-height":`40px`,"--desktop-caption-safe-right":`140px`,"--desktop-sidebar-width":f}:void 0,children:[d?(0,L.jsx)(x0,{sidebarCollapsed:l}):null,(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[!c&&(0,L.jsx)(y0,{mode:`settings`}),(0,L.jsxs)(`div`,{className:`flex-1 flex min-w-0 overflow-hidden relative`,children:[(0,L.jsx)(`div`,{className:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:c?(0,L.jsx)(`div`,{className:`flex-1 h-full overflow-hidden`,children:s}):(0,L.jsx)(`main`,{className:`flex-1 overflow-auto p-8 pb-16 custom-scrollbar`,children:(0,L.jsx)(`div`,{className:`mx-auto h-full max-w-6xl animate-fade-in`,children:s})})}),n&&r===`docked`?(0,L.jsx)(I.Suspense,{fallback:null,children:(0,L.jsx)(P0,{customTabRenderers:a,dockControls:i})}):null,o]})]}),u?(0,L.jsx)(O0,{}):null,n&&r===`floating`?(0,L.jsx)(I.Suspense,{fallback:null,children:(0,L.jsx)(P0,{customTabRenderers:a,dockControls:i})}):null]})}var I0=[{target:`/cron`,label:()=>f(`chatSidebarScheduledTasks`),icon:Za},{target:`/skills`,label:()=>f(`chatSidebarSkills`),icon:io},{target:`/agents`,label:()=>f(`agentsPageTitle`),icon:no}];function L0({isCollapsed:e}){let t=f(e?`sidebarExpand`:`sidebarCollapse`);return(0,L.jsx)(St,{icon:(0,L.jsx)(e?is:rs,{className:p1}),label:t,className:m(_1,e&&`h-9 w-9 rounded-xl`),onClick:xn.toggleSidebarCollapsed})}function R0({connectionStatus:e,isCollapsed:t}){let n=T0(),r=typeof window<`u`&&window.nextclawDesktop?.platform===`darwin`;return(0,L.jsxs)(`div`,{className:m(`flex items-center`,t?`justify-center px-2 py-1.5`:n?`justify-end px-3 py-1.5`:`gap-2 px-5 py-2`,t&&r?`pt-8`:null),children:[t||n?null:(0,L.jsx)(O1,{className:`flex min-w-0 flex-1 items-center gap-2`,suffix:(0,L.jsx)(L1,{status:e})}),(0,L.jsx)(L0,{isCollapsed:t})]})}function z0({isCollapsed:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:m(`pb-2`,e?`px-0`:`px-3`),children:(0,L.jsx)(`ul`,{className:e?m1:`space-y-0.5`,children:I0.map(t=>(0,L.jsx)(`li`,{className:e?`flex justify-center`:void 0,children:(0,L.jsx)(H1,{to:t.target,label:t.label(),icon:t.icon,density:`compact`,collapsed:e})},t.target))})}),(0,L.jsx)(`div`,{className:m(`border-t border-border/70`,e?`mx-2 my-1.5`:`mx-4`)})]})}function B0({defaultSessionType:e,groups:t,isCollapsed:n,isLoading:r,isProjectFirstView:i,onCreateProject:a,onSelectMode:o,projectGroups:s,renderSessionItem:c,sessionTypeOptions:l}){return n?(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,"aria-hidden":`true`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between px-5 pb-2 pt-3`,children:[(0,L.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wider text-muted-foreground/75`,children:f(`chatSidebarTaskRecords`)}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1`,children:[i?(0,L.jsx)(St,{icon:(0,L.jsx)(Tn,{className:`h-3.5 w-3.5`}),label:f(`chatProjectCreate`),onClick:a}):null,(0,L.jsx)(Wl,{isProjectFirstView:i,onSelectMode:o})]})]}),(0,L.jsx)(`div`,{className:m(`custom-scrollbar min-h-0 flex-1 overflow-y-auto px-3 pb-7 pt-2`,g1),children:(0,L.jsx)(Y1,{isLoading:r,isProjectFirstView:i,groups:t,projectGroups:s,defaultSessionType:e,sessionTypeOptions:l,renderSessionItem:c})})]})}function V0({currentLanguage:e,currentLanguageLabel:t,currentTheme:n,currentThemeLabel:r,isCollapsed:i,isOpen:a,languageOptions:o,onOpenApps:s,onOpenChange:c,onOpenDocs:l,onSelectLanguage:u,onSelectTheme:d,themeOptions:f}){return(0,L.jsx)(`div`,{className:m(`py-3`,i?m(`flex justify-center`,d1):`px-3`),children:(0,L.jsx)(X1,{isOpen:a,onOpenChange:c,currentTheme:n,currentThemeLabel:r,themeOptions:f,onSelectTheme:d,currentLanguage:e,currentLanguageLabel:t,languageOptions:o,onSelectLanguage:u,onOpenDocs:l,onOpenApps:s,collapsed:i})})}var H0=fe.chat.newSessionType,U0=[`preference`,H0];function W0(e,t){let n=Kl(e);return t.find(e=>e.value===n&&e.ready!==!1)??null}function G0(e){let{defaultSessionType:t,preferredSessionType:n,sessionTypeOptions:r}=e,i=n?W0(n,r):null,a=W0(t,r);return i??a??r.find(e=>e.ready!==!1)??r[0]??{value:Kl(t),label:Kl(t),icon:null,ready:!0,reason:null,reasonMessage:null,supportedModels:void 0,recommendedModel:null,modelSelectionMode:`nextclaw`,runtimeDefaultThinking:null,cta:null}}function K0(e){return typeof e?.value==`string`?Kl(e.value):null}function q0({defaultSessionType:e,sessionTypeOptions:t}){let n=pe(),r=Fe({queryKey:U0,queryFn:()=>Ge(H0),staleTime:3e4,retry:!1}),i=(0,I.useMemo)(()=>K0(r.data),[r.data]),a=(0,I.useMemo)(()=>G0({preferredSessionType:i,defaultSessionType:e,sessionTypeOptions:t}),[e,i,t]),o=ge({mutationFn:async e=>await Ye(H0,Kl(e)),onMutate:async e=>{let t=Kl(e);await n.cancelQueries({queryKey:U0});let r=n.getQueryData(U0);return n.setQueryData(U0,{key:H0,value:t,updatedAt:new Date().toISOString()}),{previous:r}},onError:(e,t,r)=>{r?.previous&&n.setQueryData(U0,r.previous)},onSuccess:e=>{n.setQueryData(U0,e)}}),s=(0,I.useCallback)(e=>{let n=W0(e,t);n&&o.mutate(n.value)},[t,o]);return{selectedSessionType:a.value,selectedSessionTypeOption:a,isLoading:r.isLoading,setSelectedSessionType:s}}function J0(e){return f(e===`knowledge-base`?`chatProjectTemplateKnowledgeBase`:`chatProjectTemplateEmpty`)}function Y0({open:e,defaultWorkspacePath:t,templates:n,isCreating:r,errorMessage:i,onOpenChange:a,onCreate:o}){let[s,c]=(0,I.useState)(``),[l,u]=(0,I.useState)(``),[d,p]=(0,I.useState)(!1),[m,h]=(0,I.useState)(`empty`),_=n.length>0?n.map(e=>e.id):[`empty`],v=s.trim(),y=()=>{c(``),u(``),h(`empty`),p(!1)},b=()=>{r||(y(),a(!1))};return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ct,{open:e,onOpenChange:e=>{if(e){a(!0);return}b()},children:(0,L.jsxs)(ut,{className:`sm:max-w-lg`,children:[(0,L.jsxs)(lt,{children:[(0,L.jsx)(dt,{children:f(`chatProjectCreateTitle`)}),(0,L.jsx)(st,{children:f(`chatProjectCreateDescription`)})]}),(0,L.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{if(e.preventDefault(),!v||r)return;let t=l.trim();o({name:v,template:m,...t?{rootPath:t}:{}}).then(y).catch(()=>void 0)},children:[(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(M,{htmlFor:`chat-project-name`,children:f(`chatProjectNameLabel`)}),(0,L.jsx)(g,{id:`chat-project-name`,value:s,onChange:e=>c(e.target.value),placeholder:f(`chatProjectNamePlaceholder`),autoFocus:!0,disabled:r})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(M,{htmlFor:`chat-project-template`,children:f(`chatProjectTemplateLabel`)}),(0,L.jsxs)(Zt,{value:m,onValueChange:e=>h(e),disabled:r,children:[(0,L.jsx)(Ut,{id:`chat-project-template`,children:(0,L.jsx)(It,{})}),(0,L.jsx)(Kt,{children:_.map(e=>(0,L.jsx)(Yt,{value:e,children:J0(e)},e))})]})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(M,{htmlFor:`chat-project-root-path`,children:f(`chatProjectPathLabel`)}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(g,{id:`chat-project-root-path`,value:l,onChange:e=>u(e.target.value),placeholder:f(`chatProjectPathPlaceholder`),disabled:r}),(0,L.jsxs)(be,{type:`button`,variant:`outline`,onClick:()=>p(!0),disabled:r,children:[(0,L.jsx)(Mo,{className:`mr-2 h-4 w-4`}),f(`browse`)]})]}),(0,L.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:f(`chatProjectPathHint`)})]}),i?(0,L.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:i}):null,(0,L.jsxs)(ot,{children:[(0,L.jsx)(be,{type:`button`,variant:`outline`,onClick:b,disabled:r,children:f(`cancel`)}),(0,L.jsx)(be,{type:`submit`,disabled:!v||r,children:f(r?`saving`:`chatProjectCreateAction`)})]})]})]})}),(0,L.jsx)(xc,{open:d,currentPath:l,defaultWorkspacePath:t,isSaving:!1,onOpenChange:p,onConfirm:e=>{u(e),p(!1)},title:f(`chatProjectPathPickerTitle`),description:f(`chatProjectPathPickerDescription`),pathLabel:f(`chatProjectPathLabel`),pathPlaceholder:f(`chatProjectPathPlaceholder`),confirmLabel:f(`selectCurrentDirectory`),hint:f(`chatProjectPathHint`)})]})}function X0(e,t,n){let r=R(e=>e.optimisticReadAtBySessionKey);return(0,I.useEffect)(()=>{(()=>{if(!t)return;let r=e.find(({session:e})=>e.key===t);if(!r||r.runStatus===`running`)return;let{session:i}=r;n(i.key,i.lastMessageAt,i.readAt)})()},[e,n,t]),r}function Z0({variant:e=`desktop`}){let t=e===`mobile`,n=Ac(),r=Wn(),i=Sn(e=>e.isSidebarCollapsed),[a,o]=(0,I.useState)(!1),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1),p=R(e=>e.snapshot),h=gu(e=>e.snapshot.sessionTypesQuery?.data??null),g=gu(e=>e.snapshot.configQuery?.data??null),_=A(),v=dd(),y=vu(),b=yu(),{isLoading:x,items:S}=Il(),{language:C,setLanguage:w}=on(),{theme:T,setTheme:E}=r1(),D=f(D$.find(e=>e.value===T)?.labelKey??`themeWork`),O=s.find(e=>e.value===C)?.label??C,k=(0,I.useMemo)(()=>D$.map(e=>({value:e.value,label:f(e.labelKey)})),[]),ee=(0,I.useMemo)(()=>s.map(e=>({value:e.value,label:e.label})),[]),j=(0,I.useMemo)(()=>new Map((v.data?.agents??[]).map(e=>[e.id,e])),[v.data?.agents]),M=(0,I.useMemo)(()=>new Set(p.pinnedSessionKeys),[p.pinnedSessionKeys]),N=(0,I.useMemo)(()=>new Set(p.pinnedProjectRoots),[p.pinnedProjectRoots]),te=(0,I.useMemo)(()=>Rl(S),[S]),ne=(0,I.useMemo)(()=>Hl(S),[S]),re=(0,I.useMemo)(()=>Bl(te,M),[M,te]),ie=(0,I.useMemo)(()=>Vl(te,M,N,y.data?.projects??[]),[N,M,y.data?.projects,te]),ae=(0,I.useMemo)(()=>Yl(h?.options??[]),[h?.options]),oe=(0,I.useMemo)(()=>Kl(h?.defaultType??`native`),[h?.defaultType]),se=(0,I.useMemo)(()=>ae.filter(e=>e.value!==oe),[oe,ae]),ce=q0({defaultSessionType:oe,sessionTypeOptions:ae}),le=p.listMode===`project-first`,ue=!t&&i,de=X0(S,p.selectedSessionKey,n.chatSessionListManager.markSessionRead),{editingSessionKey:fe,draftLabel:pe,savingSessionKey:me,setDraftLabel:he,startEditingSessionLabel:ge,cancelEditingSessionLabel:_e,saveSessionLabel:ve}=S$(),ye=e=>{C!==e&&(w(e),window.location.reload())},be=e=>(0,L.jsx)(s1,{item:e,selectedSessionKey:p.selectedSessionKey,optimisticReadAtBySessionKey:de,agentsById:j,childSessionsByParentKey:ne,editingSessionKey:fe,draftLabel:pe,savingSessionKey:me,sessionTypeOptions:ae,isPinned:M.has(e.session.key),sessionTitle:Ul,onSelectSession:n.chatSessionListManager.selectSession,onOpenChildSessions:(e,t)=>n.chatThreadManager.openChildSessionPanel({parentSessionKey:e,activeChildSessionKey:t}),onStartEditingSessionLabel:ge,onDraftLabelChange:he,onSaveSessionLabel:ve,onCancelEditingSessionLabel:_e,onTogglePinned:()=>n.chatSessionListManager.toggleSessionPinned(e.session.key)},e.session.key),xe=(e,t)=>{n.chatSessionListManager.createSession(e,typeof t==`string`?t:void 0)},Se=()=>{b.reset(),l(!0)},Ce=async e=>{await b.mutateAsync(e),l(!1)};return(0,L.jsxs)(`aside`,{className:m(`flex h-full min-h-0 flex-col bg-secondary transition-[width] duration-200 ease-out`,t?`flex-1 overflow-hidden`:ue?m(u1,`shrink-0`):`w-[280px] shrink-0`),"data-sidebar-collapsed":ue?`true`:`false`,children:[t?null:(0,L.jsx)(R0,{connectionStatus:_.connectionStatus,isCollapsed:ue}),t?(0,L.jsx)(w1,{query:p.query,defaultSessionType:ce.selectedSessionType,sessionTypeOptions:ae,nonDefaultSessionTypeOptions:se,selectedNewSessionType:ce.selectedSessionType,selectedNewSessionTypeOption:ce.selectedSessionTypeOption,isCreateMenuOpen:a,onCreateMenuOpenChange:o,onCreateSession:xe,onSelectNewSessionType:ce.setSelectedSessionType,onQueryChange:n.chatSessionListManager.setQuery}):(0,L.jsx)(C1,{query:p.query,defaultSessionType:oe,sessionTypeOptions:ae,nonDefaultSessionTypeOptions:se,selectedNewSessionType:ce.selectedSessionType,selectedNewSessionTypeOption:ce.selectedSessionTypeOption,isCreateMenuOpen:a,onCreateMenuOpenChange:o,onCreateSession:xe,onSelectNewSessionType:ce.setSelectedSessionType,onQueryChange:n.chatSessionListManager.setQuery,collapsed:ue}),t?null:(0,L.jsx)(z0,{isCollapsed:ue}),(0,L.jsx)(B0,{defaultSessionType:ce.selectedSessionType,groups:re,isCollapsed:ue,isLoading:x,isProjectFirstView:le,onCreateProject:Se,onSelectMode:n.chatSessionListManager.setListMode,projectGroups:ie,renderSessionItem:be,sessionTypeOptions:ae}),t?null:(0,L.jsx)(V0,{currentLanguage:C,currentLanguageLabel:O,currentTheme:T,currentThemeLabel:D,isCollapsed:ue,isOpen:u,languageOptions:ee,onOpenApps:()=>Zq(r),onOpenChange:d,onOpenDocs:()=>r.open(void 0,{kind:`docs`,title:f(`docBrowserHelp`)}),onSelectLanguage:ye,onSelectTheme:E,themeOptions:k}),(0,L.jsx)(Y0,{open:c,defaultWorkspacePath:Vc(g?.agents.defaults.workspace),templates:y.data?.templates??[],isCreating:b.isPending,errorMessage:b.error?.message,onOpenChange:l,onCreate:Ce})]})}var Q0=`sid_`,$0=`/chat/draft`,e2=$0.slice(6);function t2(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCharCode(e);return`${Q0}${btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/g,``)}`}function n2(e){if(!e.startsWith(Q0))return null;let t=e.slice(4).replace(/-/g,`+`).replace(/_/g,`/`),n=`=`.repeat((4-t.length%4)%4);try{let e=atob(t+n),r=Uint8Array.from(e,e=>e.charCodeAt(0));return new TextDecoder().decode(r)}catch{return null}}function r2(e){if(!e||e===e2)return null;let t=n2(e);if(t)return t;try{return decodeURIComponent(e)}catch{return e}}function i2(e){return`/chat/${t2(e)}`}function a2(e,t){let n=t.trim();return n?e.includes(n)?e.filter(e=>e!==n):[n,...e]:e}var o2=class{constructor(e){this.uiManager=e,this.syncDraftThreadState=()=>{sd.getState().setSnapshot({sessionKey:null,sessionDisplayName:void 0,canDeleteSession:!1,parentSessionKey:null,parentSessionLabel:null,workspacePanelParentKey:null,activeWorkspacePanelKind:null,childSessionTabs:[],activeChildSessionKey:null,activeWorkspaceFileKey:null,closedWorkspaceTabEntries:[],workspaceNavigationHistory:[],workspaceNavigationHistoryIndex:0})},this.resolveUpdateValue=(e,t)=>typeof t==`function`?t(e):t,this.shouldPersistReadAt=(e,t,n)=>{let r=R.getState().optimisticReadAtBySessionKey[e],i=r&&n?r.localeCompare(n)>0?r:n:r??n??void 0;return i?t.localeCompare(i)>0:!0},this.setSelectedAgentId=e=>{let t=R.getState().snapshot.selectedAgentId,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({selectedAgentId:n})},this.syncSelectedSessionAgent=()=>{let e=sd.getState().snapshot.agentId?.trim();e&&this.setSelectedAgentId(e)},this.setSelectedSessionKey=e=>{let t=R.getState().snapshot.selectedSessionKey,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({selectedSessionKey:n})},this.syncRouteSessionSelection=e=>{let{isChatView:t,routeSessionKey:n}=e;if(!t)return;let{selectedSessionKey:r}=R.getState().snapshot;if(n){r!==n&&this.setSelectedSessionKey(n);return}r!==null&&this.setSelectedSessionKey(null)},this.setListMode=e=>{let t=R.getState().snapshot.listMode,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({listMode:n})},this.toggleSessionPinned=e=>{let{pinnedSessionKeys:t}=R.getState().snapshot;R.getState().setSnapshot({pinnedSessionKeys:a2(t,e)})},this.toggleProjectPinned=e=>{let{pinnedProjectRoots:t}=R.getState().snapshot;R.getState().setSnapshot({pinnedProjectRoots:a2(t,e)})},this.toggleProjectCollapsed=e=>{let{collapsedProjectRoots:t}=R.getState().snapshot;R.getState().setSnapshot({collapsedProjectRoots:a2(t,e)})},this.markSessionRead=(e,t,n)=>{let r=e?.trim(),i=t?.trim();!r||!i||this.shouldPersistReadAt(r,i,n)&&(R.getState().markSessionRead(r,i),S(r,{uiReadAt:i}).catch(()=>void 0))},this.markVisibleWorkspaceChildRead=e=>{this.markSessionRead(e.sessionKey,e.runStatus===`running`?null:e.lastMessageAt,e.readAt)},this.createSession=(e,t)=>{let n=Kl(e??`native`),r=Vc(t);R.getState().setSnapshot({selectedSessionKey:null}),this.syncDraftThreadState(),this.uiManager.navigateTo($0,{replace:this.uiManager.isAtChatRoot(),state:{chatDraft:{sessionType:n,projectRoot:r}}})},this.startAgentDraftChat=(e,t)=>{let n=e.trim()||`main`;this.createSession(t),this.setSelectedAgentId(n)},this.selectSession=e=>{this.uiManager.goToSession(e)},this.setQuery=e=>{let t=R.getState().snapshot.query,n=this.resolveUpdateValue(t,e);n!==t&&R.getState().setSnapshot({query:n})}}},s2=async()=>!1,c2=class{constructor(e){this.docBrowserManager=e,this.state={pathname:``},this.actions={navigate:null,confirm:s2},this.syncState=e=>{this.state={...this.state,...e}},this.bindActions=e=>{this.actions={...this.actions,...e}},this.confirm=async e=>this.actions.confirm(e),this.navigateTo=(e,t)=>{this.actions.navigate&&(this.state.pathname===e&&!t?.replace||(this.actions.navigate(e,t),this.state.pathname=e))},this.goToProviders=()=>{this.navigateTo(`/providers`)},this.isCompactViewport=()=>xn.getSnapshot().mode===`mobile`,this.resolvePanelAppEntry=async e=>{let t=e.trim();if(!t)return null;try{return PK((await we.panelApps.listPanelApps()).entries,t)}catch{return null}},this.showContent=async e=>{let{target:t,title:n}=e;if(t.type===`url`){this.docBrowserManager.open(t.payload.url,{dedupeKey:`browser:${t.payload.url}`,kind:`content`,title:n});return}let{appId:r}=t.payload,i=await this.resolvePanelAppEntry(r);if(i){this.docBrowserManager.openTarget(Dq(i),{title:n});return}this.docBrowserManager.open(wq(r),{title:n})},this.goToChatRoot=e=>{this.navigateTo(`/chat`,e)},this.isAtChatRoot=()=>this.state.pathname===`/chat`||this.state.pathname===`/chat/draft`,this.goToSession=(e,t)=>{this.navigateTo(i2(e),t)}}};function l2(e){let t=e=>{if(!e||typeof e!=`object`)return e;let t=e,n=t.error instanceof Error?{name:t.error.name,message:t.error.message}:t.error;return{data:t.data,error:n,status:t.status,fetchStatus:t.fetchStatus,isLoading:t.isLoading,isFetching:t.isFetching,isFetched:t.isFetched,isSuccess:t.isSuccess}};return{configQuery:t(e.configQuery),providersQuery:t(e.providersQuery),providerTemplatesQuery:t(e.providerTemplatesQuery),sessionsQuery:t(e.sessionsQuery),sessionTypesQuery:t(e.sessionTypesQuery),sessionSkillsSessionId:e.sessionSkillsSessionId,sessionSkillsQuery:t(e.sessionSkillsQuery)}}function u2(e,t){return JSON.stringify(l2(e))!==JSON.stringify(l2({...e,...t}))}var d2=class{constructor(){this.syncSnapshot=e=>{let t=gu.getState();u2(t.snapshot,e)&&t.setSnapshot(e)}}},f2=class{constructor(e,t,n){this.uiManager=e,this.sessionListManager=t,this.onWorkspacePanelOpened=n,this.handledUiShowContentEventIds=new Set,this.hasSnapshotChanges=e=>{let t=sd.getState().snapshot;for(let[n,r]of Object.entries(e))if(!Object.is(t[n],r))return!0;return!1},this.syncSnapshot=e=>{this.hasSnapshotChanges(e)&&sd.getState().setSnapshot(e)},this.clearDeletedSessionState=e=>{R.getState().snapshot.selectedSessionKey===e&&this.sessionListManager.setSelectedSessionKey(null),sd.getState().setSnapshot({sessionKey:null,sessionTypeLabel:null,agentId:null,sessionDisplayName:void 0,sessionProjectRoot:null,sessionProjectName:null,canDeleteSession:!1,parentSessionKey:null,parentSessionLabel:null,workspacePanelParentKey:null,activeWorkspacePanelKind:null,childSessionTabs:[],activeChildSessionKey:null,activeSideChatDraft:null,workspaceFileTabs:[],activeWorkspaceFileKey:null,closedWorkspaceTabEntries:[],workspaceNavigationHistory:[],workspaceNavigationHistoryIndex:0})},this.resolveWorkspaceParentSessionKey=()=>R.getState().snapshot.selectedSessionKey?.trim()||sd.getState().snapshot.sessionKey?.trim()||(R.getState().snapshot.selectedSessionKey??null),this.activateWorkspaceFileTab=(e,t)=>{let{parentSessionKey:n}=e,{workspaceFileTabs:r}=sd.getState().snapshot;this.setWorkspaceSelection({workspacePanelParentKey:n,activeWorkspacePanelKind:`file`,workspaceFileTabs:sK(r,e,t),activeWorkspaceFileKey:e.key,activeChildSessionKey:null,activeSideChatDraft:null},{kind:`file`,key:e.key}),this.ensureWorkspaceParentRoute(n),this.onWorkspacePanelOpened?.()},this.ensureWorkspaceParentRoute=e=>{if(!e)return;let{snapshot:{selectedSessionKey:t}}=R.getState();t!==e&&this.uiManager.goToSession(e)},this.setWorkspaceSelection=(e,t)=>{let{snapshot:n}=sd.getState(),r=Bu({entries:n.workspaceNavigationHistory,index:n.workspaceNavigationHistoryIndex},t,Wu),i=e.workspacePanelParentKey&&e.workspacePanelParentKey!==n.workspacePanelParentKey?[]:n.closedWorkspaceTabEntries.filter(e=>!Wu(e,t));sd.getState().setSnapshot({...e,closedWorkspaceTabEntries:i,workspaceNavigationHistory:[...r.entries],workspaceNavigationHistoryIndex:r.index})},this.openWorkspacePage=(e,t)=>{let n=e.trim();n&&(this.setWorkspaceSelection({workspacePanelParentKey:n,activeWorkspacePanelKind:t,activeChildSessionKey:null,activeSideChatDraft:null,activeWorkspaceFileKey:null},{kind:t}),this.ensureWorkspaceParentRoute(n),this.onWorkspacePanelOpened?.())},this.openWorkspaceOverview=e=>{this.openWorkspacePage(e,`overview`)},this.toggleWorkspacePanel=e=>{let t=e.trim();if(!t)return;let{snapshot:n}=sd.getState();if(n.workspacePanelParentKey===t&&n.activeWorkspacePanelKind){this.closeWorkspacePanel();return}this.openWorkspaceOverview(t)},this.setWorkspacePanelWidth=e=>{this.syncSnapshot({workspacePanelWidth:Lu(e)})},this.openChildSessions=e=>{this.openWorkspacePage(e,`child-sessions`)},this.openProjectFiles=e=>{this.openWorkspacePage(e,`project-files`)},this.openChildSessionPanel=e=>{let{activeChildSessionKey:t,childSessionTab:n,parentSessionKey:r}=e,i=r.trim();if(!i)return;let a=t?.trim()||null,o={workspacePanelParentKey:i,activeWorkspacePanelKind:`child-session`,activeChildSessionKey:a,activeSideChatDraft:null,activeWorkspaceFileKey:null};a&&n&&(o.childSessionTabs=Yu(sd.getState().snapshot.childSessionTabs,{sessionKey:a,parentSessionKey:i,label:n.label?.trim()||null,agentId:n.agentId?.trim()||null})),a?this.setWorkspaceSelection(o,{kind:`child-session`,key:a}):sd.getState().setSnapshot(o),this.ensureWorkspaceParentRoute(i),this.onWorkspacePanelOpened?.()},this.openSideChatDraft=e=>{let t=e?.trim()||this.resolveWorkspaceParentSessionKey()?.trim();if(!t)return;let n=Ju(t);this.setWorkspaceSelection({workspacePanelParentKey:t,activeWorkspacePanelKind:`side-chat-draft`,activeChildSessionKey:null,activeSideChatDraft:n,activeWorkspaceFileKey:null},{kind:`side-chat-draft`,key:n.draftKey}),this.ensureWorkspaceParentRoute(t),this.onWorkspacePanelOpened?.()},this.materializeSideChatDraft=e=>{let t=Xu({snapshot:sd.getState().snapshot,...e});t&&(sd.getState().setSnapshot(t.patch),this.ensureWorkspaceParentRoute(t.parentSessionKey))},this.openFilePreview=e=>{let t=oK(e,this.resolveWorkspaceParentSessionKey());t&&this.activateWorkspaceFileTab(t)},this.openWorkspaceFileViewer=(e,t)=>{let n=sd.getState().snapshot.workspaceFileTabs.find(t=>t.key===e.trim());if(!n||n.viewMode!==`preview`)return;let r=t??Ed(n.path,n.previewViewer);if(!r)return;let i=oK({path:n.path,label:n.label??void 0,viewMode:`preview`,previewViewer:r,line:n.line??void 0,column:n.column??void 0,rawText:n.rawText??void 0,contentUrl:n.contentUrl??void 0,mimeType:n.mimeType??void 0},n.parentSessionKey);i&&this.activateWorkspaceFileTab(i,n.key)},this.openSessionFromToolAction=e=>{if(e.kind!==`open-session`)return;let t=e.sessionId.trim();if(t){if(e.sessionKind===`child`&&!this.uiManager.isCompactViewport()){let n=e.parentSessionId?.trim()||R.getState().snapshot.selectedSessionKey||null;if(n){this.openChildSessionPanel({parentSessionKey:n,activeChildSessionKey:t,childSessionTab:{label:e.label,agentId:e.agentId}});return}}this.closeWorkspacePanel(),this.uiManager.goToSession(t)}},this.handleToolAction=async e=>{if(e.kind===`show-content`){await this.showContent(e.request);return}this.openSessionFromToolAction(e)},this.handleUiShowContentEvent=async e=>{let t=e.id.trim();!t||this.handledUiShowContentEventIds.has(t)||(this.handledUiShowContentEventIds.add(t),await this.showContent({target:e.target,title:e.title,purpose:e.purpose,placement:e.placement}))},this.showContent=async e=>{if(e.placement!==`inline`){if(e.target.type===`file`){this.openFilePreview({path:e.target.payload.path,label:e.title,viewMode:`preview`,previewViewer:e.target.payload.viewer,line:e.target.payload.line,column:e.target.payload.column});return}await this.uiManager.showContent({target:e.target,title:e.title})}},this.syncVisibleWorkspaceSelection=e=>{e?.kind===`child-session`&&this.sessionListManager.markVisibleWorkspaceChildRead(e.tab)},this.selectChildSessionDetail=e=>{let t=e.trim();t&&this.setWorkspaceSelection({activeChildSessionKey:t,activeWorkspaceFileKey:null,activeWorkspacePanelKind:`child-session`,activeSideChatDraft:null},{kind:`child-session`,key:t})},this.selectWorkspaceFile=e=>{let t=e.trim();if(!t)return;let{workspaceFileTabs:n}=sd.getState().snapshot;n.some(e=>e.key===t)&&this.setWorkspaceSelection({activeWorkspaceFileKey:t,activeChildSessionKey:null,activeWorkspacePanelKind:`file`,activeSideChatDraft:null},{kind:`file`,key:t})},this.closeWorkspaceTab=e=>{let{snapshot:t}=sd.getState(),n=qu(t,e);n&&sd.getState().setSnapshot(n)},this.closeWorkspacePanel=()=>{sd.getState().setSnapshot({workspacePanelParentKey:null,activeWorkspacePanelKind:null,activeChildSessionKey:null,activeSideChatDraft:null,activeWorkspaceFileKey:null,closedWorkspaceTabEntries:[],workspaceNavigationHistory:[],workspaceNavigationHistoryIndex:0})},this.openSessionCronPanel=e=>{this.openWorkspacePage(e,`cron`)},this.goBackWorkspacePanel=()=>{this.restoreWorkspaceNavigationStep(`back`)},this.goForwardWorkspacePanel=()=>{this.restoreWorkspaceNavigationStep(`forward`)},this.restoreWorkspaceNavigationStep=e=>{let{snapshot:t}=sd.getState(),n=Vu({entries:t.workspaceNavigationHistory,index:t.workspaceNavigationHistoryIndex},e);if(!n)return;let r=Ku(n.entry,t);r&&sd.getState().setSnapshot({...r,workspaceNavigationHistory:[...n.history.entries],workspaceNavigationHistoryIndex:n.history.index})},this.goToParentSession=()=>{let{parentSessionKey:e,activeSideChatDraft:t,childSessionTabs:n,activeChildSessionKey:r}=sd.getState().snapshot,i=n.find(e=>e.sessionKey===r)?.parentSessionKey??null,a=e??t?.parentSessionKey??i;a&&(this.closeWorkspacePanel(),this.uiManager.goToSession(a))},this.deleteSession=async()=>{let{snapshot:{selectedSessionKey:e}}=R.getState();if(e&&await this.uiManager.confirm({title:f(`chatDeleteSessionConfirm`),variant:`destructive`,confirmLabel:f(`delete`)})){sd.getState().setSnapshot({isDeletePending:!0});try{await te(e),Te(Ne,e),Ne.removeQueries({queryKey:[`ncp-session-messages`,e]}),this.clearDeletedSessionState(e),this.uiManager.goToChatRoot({replace:!0})}finally{sd.getState().setSnapshot({isDeletePending:!1})}}}}},p2=class{constructor(e){this.chatUiManager=new c2(e.docBrowserManager),this.chatSessionListManager=new o2(this.chatUiManager),this.chatQueryManager=new d2,this.chatThreadManager=new f2(this.chatUiManager,this.chatSessionListManager,e.notifyRightPanelOpened)}},m2=class{constructor(){this.nextId=0,this.pendingIntent=null,this.listeners=new Set,this.requestDraft=e=>{let t=e.trim();if(!t)return;let n={id:this.nextId+1,prompt:t};this.nextId=n.id,this.pendingIntent=n,this.listeners.forEach(e=>e(n))},this.consumePending=()=>{let e=this.pendingIntent;return this.pendingIntent=null,e},this.markConsumed=e=>{this.pendingIntent?.id===e&&(this.pendingIntent=null)},this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)})}};function h2(){return Fe({queryKey:[`ncp-session-types`],queryFn:le,staleTime:1e4,retry:!1})}var g2=`nextclaw://docs`,_2=`github-project`,v2=`https://github.com/Peiiii/nextclaw`;function y2(){return[{builtIn:!0,icon:{type:`builtin`,name:`apps`},id:`apps`,label:f(`appsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:gq}},{builtIn:!0,icon:{type:`builtin`,name:`service-apps`},id:`service-apps`,label:f(`serviceAppsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:_q}},{builtIn:!0,icon:{type:`builtin`,name:`docs`},id:`docs`,label:f(`docBrowserHelp`),removable:!1,target:{type:`right-panel-resource`,uri:g2}},{builtIn:!0,icon:{type:`builtin`,name:`new-tab`},id:`new-tab`,label:f(`docBrowserHomeTitle`),removable:!1,target:{type:`right-panel-resource`,uri:mq}},{builtIn:!0,icon:{type:`builtin`,name:`github`},id:_2,label:f(`sideDockGitHubProject`),removable:!1,target:{type:`external-url`,url:v2}}]}var b2=[`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`];function x2(e){return!!e&&typeof e==`object`}function S2(e){return b2.includes(e)}function C2(e){return!x2(e)||typeof e.type!=`string`?null:e.type===`builtin`&&S2(e.name)?{type:`builtin`,name:e.name}:e.type===`url`&&typeof e.url==`string`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e.type===`text`&&typeof e.value==`string`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function w2(e){if(!x2(e)||typeof e.id!=`string`||e.id.trim().length===0||typeof e.label!=`string`||e.label.trim().length===0||typeof e.createdAt!=`string`||e.createdAt.trim().length===0||!x2(e.target)||e.target.type!==`right-panel-resource`||typeof e.target.uri!=`string`||e.target.uri.trim().length===0)return null;let t=C2(e.icon);return t?{createdAt:e.createdAt,icon:t,id:e.id.trim(),label:e.label.trim(),target:{type:`right-panel-resource`,uri:e.target.uri.trim()}}:null}function T2(e){if(!Array.isArray(e))return[];let t=new Map;return e.forEach(e=>{let n=w2(e);n&&t.set(n.id,n)}),Array.from(t.values())}function E2(e,t){return{createdAt:t,icon:e.icon,id:e.id,label:e.label,target:e.target}}function D2(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function O2(e){return{builtIn:!1,icon:e.icon,id:e.id,label:e.label,removable:!0,target:e.target}}function k2(e,t){let n=new Set(e.map(e=>e.id)),r=new Set(e.map(D2).filter(e=>e!==null)),i=t.filter(e=>!n.has(e.id)&&!r.has(e.target.uri)).map(O2);return[...e,...i]}var A2=`nextclaw.side-dock.state`,j2=1;function M2(e){return!!e&&typeof e==`object`}var N2=p()(Pn(e=>({isVisible:!0,pinnedItems:[],setVisible:t=>e({isVisible:t}),setPinnedItems:t=>e({pinnedItems:T2(t)})}),{name:A2,version:j2,storage:Fn(()=>window.localStorage),partialize:e=>({isVisible:e.isVisible,pinnedItems:e.pinnedItems}),merge:(e,t)=>{let n=M2(e)?T2(e.pinnedItems):[],r=M2(e)&&typeof e.isVisible==`boolean`?e.isVisible:!0;return{...t,isVisible:r,pinnedItems:n}}})),P2={apps:ht,docs:Mt,github:Ro,"new-tab":Tn,"panel-app":Qa,"service-apps":Qa},F2=new Set([_2]),I2=/^\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\u200D\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?)*$/u;function L2(e){return I2.test(e.trim())}function R2({icon:e}){if(e.type===`url`)return(0,L.jsx)(`img`,{src:e.url,alt:``,className:`h-5 w-5 rounded object-cover`});if(e.type===`text`)return L2(e.value)?(0,L.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center text-[20px] leading-none`,"aria-hidden":`true`,children:e.value}):(0,L.jsx)(`span`,{className:`max-w-7 truncate text-center text-[13px] font-semibold leading-none`,"aria-hidden":`true`,children:e.value});let t=P2[e.name];return(0,L.jsx)(t,{className:`h-5 w-5`,"aria-hidden":`true`})}function z2({active:e,item:t,onOpen:n,onUnpin:r}){let{label:i}=t;return(0,L.jsxs)(gt,{children:[(0,L.jsxs)(`div`,{className:`group relative`,children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":i,title:i,"data-side-dock-item-id":t.id,onClick:()=>n(t),className:m(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,e?`bg-primary/10 text-primary`:`bg-transparent`),children:(0,L.jsx)(R2,{icon:t.icon})})}),t.removable?(0,L.jsx)(`button`,{type:`button`,"aria-label":f(`sideDockUnpinItem`),title:f(`sideDockUnpinItem`),onClick:e=>{e.stopPropagation(),r(t)},className:`absolute -right-1 -top-1 hidden h-4 w-4 items-center justify-center rounded-full bg-background text-muted-foreground shadow-sm ring-1 ring-border/70 transition-colors hover:bg-muted hover:text-foreground group-hover:flex focus-visible:flex focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,children:(0,L.jsx)(An,{className:`h-3 w-3`,"aria-hidden":`true`})}):null]}),(0,L.jsx)(Et,{side:`left`,children:i})]})}function B2({icon:e,label:t,onClick:n}){return(0,L.jsxs)(gt,{children:[(0,L.jsx)(_t,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":t,title:t,"data-side-dock-action":`hide`,onClick:n,className:m(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`),children:(0,L.jsx)(e,{className:`h-5 w-5`,"aria-hidden":`true`})})}),(0,L.jsx)(Et,{side:`left`,children:t})]})}function V2(e){return e?.trim()??``}function H2(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function U2(e,t,n,r=!1){if(!t||!n)return!1;let i=V2(H2(e)??void 0);if(!i)return!1;let a=V2(n.resourceUri);return a&&a===i||V2(n.currentUrl)===i?!0:r?!1:e.id===`docs`&&n.kind===`docs`}function W2(e,t){if(!t)return!1;let n=V2(t.resourceUri),r=V2(t.currentUrl);return e.some(e=>{let t=V2(H2(e)??void 0);return t===n||t===r})}function G2(e){return F2.has(e.id)}function K2({manager:e}){let t=N2(e=>e.pinnedItems),n=N2(e=>e.setVisible),{currentTab:r,isOpen:i}=Wn(),{confirm:a,ConfirmDialog:o}=cn(),s=k2(y2(),t),c=s.filter(e=>!G2(e)),l=s.filter(G2),u=W2(s,r),d=async()=>{await a({title:f(`sideDockHideConfirmTitle`),description:f(`sideDockHideConfirmDescription`),confirmLabel:f(`sideDockHideConfirmAction`),cancelLabel:f(`cancel`)})&&n(!1)};return(0,L.jsx)(kt,{delayDuration:250,children:(0,L.jsxs)(`aside`,{"data-testid":`side-dock`,className:`z-30 flex h-full w-14 shrink-0 flex-col items-center gap-1 border-l border-border/60 bg-background/95 px-2 py-3`,children:[(0,L.jsx)(`div`,{className:`flex w-full flex-col items-center gap-1`,children:c.map(t=>(0,L.jsx)(z2,{active:U2(t,i,r,u),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id))}),l.length>0?(0,L.jsxs)(`div`,{"data-testid":`side-dock-utility`,className:`mt-auto flex w-full flex-col items-center gap-1`,children:[l.map(t=>(0,L.jsx)(z2,{active:U2(t,i,r,u),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id)),(0,L.jsx)(B2,{icon:as,label:f(`sideDockHide`),onClick:()=>{d()}})]}):null,(0,L.jsx)(o,{})]})})}var q2=`pinned`,J2=new Set([`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`]);function Y2(e){return e.trim()}function X2(e){let t=0;return Array.from(Y2(e)).forEach(e=>{t=t*31+e.charCodeAt(0)>>>0}),`${q2}-${Y2(e).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase()||`resource`}-${t.toString(36)}`}function Z2(e){return e?.type===`builtin`&&J2.has(e.name)?{type:`builtin`,name:e.name}:e?.type===`url`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e?.type===`text`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function Q2(e){return e.kind===`docs`?`docs`:e.kind===`home`?`new-tab`:e.kind===`apps`?e.resourceUri?.includes(`service-apps`)?`service-apps`:`apps`:e.kind===`panel-app`?`panel-app`:`apps`}var $2=class{constructor(e){this.docBrowserManager=e,this.getItems=()=>k2(y2(),N2.getState().pinnedItems),this.openItem=async e=>{if(e.target.type===`right-panel-resource`){this.docBrowserManager.open(e.target.uri,{dockIcon:e.icon,title:e.label});return}e.target.type===`external-url`&&await Nn.openExternalUrl(e.target.url)},this.getDockState=e=>{let t=this.getTabResourceUri(e);if(!t)return{canDock:!1,isDocked:!1,removable:!1};let n=this.findItemByUri(t);return{canDock:!0,isDocked:!!n,removable:n?.removable===!0}},this.pinTab=(e,t=new Date().toISOString())=>{let n=this.getTabResourceUri(e);!e||!n||this.findItemByUri(n)||this.pinItem({builtIn:!1,icon:Z2(e.dockIcon)??{type:`builtin`,name:Q2(e)},id:X2(n),label:e.title.trim()||n,removable:!0,target:{type:`right-panel-resource`,uri:n}},t)},this.unpinTab=e=>{let t=this.getTabResourceUri(e),n=t?this.findItemByUri(t):void 0;n?.removable&&this.unpinItem(n.id)},this.pinItem=(e,t=new Date().toISOString())=>{if(!e.removable||e.target.type!==`right-panel-resource`)return;let n=Y2(e.target.uri),r={...e,target:{type:`right-panel-resource`,uri:n}};this.setPinnedItems(i=>i.some(t=>t.id===e.id||Y2(t.target.uri)===n)?i:[...i,E2(r,t)])},this.unpinItem=e=>{this.setPinnedItems(t=>t.filter(t=>t.id!==e))},this.reorderPinnedItems=e=>{this.setPinnedItems(t=>{let n=new Map(t.map(e=>[e.id,e])),r=e.map(e=>n.get(e)).filter(e=>e!==void 0),i=new Set(r.map(e=>e.id)),a=t.filter(e=>!i.has(e.id));return[...r,...a]})},this.setPinnedItems=e=>{let{pinnedItems:t,setPinnedItems:n}=N2.getState();n(e(t))},this.getTabResourceUri=e=>{let t=e?.resourceUri??e?.currentUrl,n=t?Y2(t):``;return n.length>0?n:null},this.findItemByUri=e=>{let t=Y2(e);return this.getItems().find(e=>e.target.type===`right-panel-resource`&&Y2(e.target.uri)===t)}}},e4=new class{constructor(){this.resolveOpenTarget=e=>{let{activeTab:t,kind:n,url:r}=e,i=n??(r?void 0:t?.kind)??(r&&Un(r)?`docs`:`home`),a=r?.trim()||(!n&&t&&t.kind!==`docs`?t.currentUrl:i===`home`?`nextclaw://new-tab`:i===`docs`?Rn():`about:blank`),o=i===`docs`?zn(a,`docs`):a;return{historyPolicy:`managed`,kind:i,title:i===`home`?f(`docBrowserHomeTitle`):Kn(o,i,i===`docs`?f(`docBrowserHelp`):`Detail`),url:o}},this.areUrlsEquivalent=(e,t,n,r)=>n===r?n===`docs`?Bn(e)===Bn(t):e===t:!1,this.usesManagedHistory=e=>e.currentUrl!==Ln}};function t4(e,t,n){return{...e,tabs:e.tabs.map(e=>e.id===t?n(e):e)}}function n4(e,t){return t4(e,e.activeTabId,t)}function r4(e,t){let n=[...e.history.slice(0,e.historyIndex+1),t];return{history:n,historyIndex:n.length-1}}function i4(e,t,n){let r=t.resourceUri??t.url,i=n.resourceUri??n.url;return t.tabId===n.tabId&&t.kind===n.kind&&e.areUrlsEquivalent(r,i,t.kind,n.kind)}function a4(e,t){return{kind:t.kind,resourceUri:t.resourceUri??t.url,tabId:e,url:t.url}}function o4(e,t,n){let r=Bu({entries:t.activeHistory,index:t.activeHistoryIndex},n,(t,n)=>i4(e,t,n));return{...t,activeHistory:[...r.entries],activeHistoryIndex:r.index}}function s4(e,t,n){for(let r=t.history.length-1;r>=0;--r)if(e.areUrlsEquivalent(t.history[r],n,t.kind,t.kind))return r;return-1}function c4(e,t,n){let r=t.tabs.find(e=>e.id===n.tabId);if(!r)return t;let i=n.resourceUri??n.url,a=e.resolveOpenTarget({activeTab:r,kind:n.kind,url:i}),o=s4(e,r,a.url),s=n.resourceUri!==void 0&&n.resourceUri===r.resourceUri;return t4({...t,activeTabId:r.id,isOpen:!0},r.id,e=>({...e,currentUrl:a.url,dedupeKey:a.dedupeKey,dockIcon:a.dockIcon??e.dockIcon,historyIndex:o>=0?o:e.historyIndex,kind:a.kind,resourceUri:a.resourceUri??a.url,title:s?e.title:a.title}))}function l4(e,t,n,r,i){let a={...t,title:r?.title||n.title||t.title,kind:n.kind,resourceUri:n.resourceUri??n.url,dockIcon:r?.dockIcon??n.dockIcon,dedupeKey:i};return e.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind)?a:{...a,currentUrl:n.url,...r4(t,n.url),navVersion:t.navVersion+1}}function u4(e,t){return!e.isOpen&&e.tabs.length===1&&t?.kind===`home`&&t.currentUrl===`nextclaw://new-tab`}function d4(e,t,n,r){let{activate:i,dedupeKey:a,newTab:o,title:s}=r??{},c=a?.trim()||n.dedupeKey,l=t.tabs.find(e=>e.id===t.activeTabId)??t.tabs[0],u=c?t.tabs.find(e=>e.dedupeKey===c):void 0;if(u){let a=t4(t,u.id,t=>l4(e,t,n,r,c)),o=i!==!1,s=o?u.id:t.activeTabId,l={...a,activeTabId:s,isOpen:!0};return o||u.id===t.activeTabId?o4(e,l,a4(u.id,n)):l}if(o||c||!l||l.kind!==n.kind){let i=Gn(n.url,n.kind,s??n.title,c,n.resourceUri??n.url,r?.dockIcon??n.dockIcon);return u4(t,l)?{...t,isOpen:!0,tabs:[i],activeTabId:i.id,activeHistory:[In(i)],activeHistoryIndex:0}:o4(e,{...t,isOpen:!0,tabs:[...t.tabs,i],activeTabId:i.id},In(i))}return o4(e,{...n4(t,t=>l4(e,t,n,r,c)),isOpen:!0},a4(t.activeTabId,n))}function f4(e,t,n,r){let i=t.tabs.find(e=>e.id===t.activeTabId)??t.tabs[0];return d4(e,t,e.resolveOpenTarget({activeTab:i,kind:r?.kind,url:n}),r)}var p4=class{constructor(e=e4,t){this.routeResolver=e,this.onRightPanelOpened=t,this.setSnapshot=e=>{qn.getState().setSnapshot(e)},this.open=(e,t)=>{this.setSnapshot(n=>f4(this.routeResolver,n,e,t)),this.onRightPanelOpened?.()},this.openTarget=(e,t)=>{this.setSnapshot(n=>d4(this.routeResolver,n,e,{...t,dedupeKey:t?.dedupeKey??e.dedupeKey,kind:t?.kind??e.kind,title:t?.title??e.title})),this.onRightPanelOpened?.()},this.openNewTab=()=>{this.open(void 0,{kind:Hn,newTab:!0})},this.close=()=>{this.setSnapshot(e=>({...e,isOpen:!1}))},this.toggleMode=()=>{this.setSnapshot(e=>({...e,mode:e.mode===`floating`?`docked`:`floating`})),this.onRightPanelOpened?.()},this.setDockedWidth=e=>{this.setSnapshot(t=>({...t,dockedWidth:Jn(e)}))},this.navigate=e=>{this.setSnapshot(t=>{if(!t.tabs.length){let e=Gn(Rn(),`docs`,`Docs`);return{...t,tabs:[e],activeTabId:e.id,isOpen:!0}}let n=n4(t,t=>{if(!this.routeResolver.usesManagedHistory(t))return t;let n=this.routeResolver.resolveOpenTarget({activeTab:t,url:e});return this.routeResolver.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind)?t:{...t,currentUrl:n.url,dedupeKey:n.dedupeKey,dockIcon:n.dockIcon,...r4(t,n.url),kind:n.kind,navVersion:t.navVersion+1,resourceUri:n.resourceUri??n.url,title:n.title}}),r=n.tabs.find(e=>e.id===n.activeTabId);return r?o4(this.routeResolver,n,In(r)):n})},this.syncUrl=e=>{this.setSnapshot(t=>{if(!t.tabs.length){let e=Gn(Rn(),`docs`,`Docs`);return{...t,tabs:[e],activeTabId:e.id}}let n=n4(t,t=>{if(!this.routeResolver.usesManagedHistory(t))return t;let n=this.routeResolver.resolveOpenTarget({activeTab:t,kind:t.kind,url:e});return this.routeResolver.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind)?t:{...t,currentUrl:n.url,dedupeKey:n.dedupeKey,dockIcon:n.dockIcon,...r4(t,n.url),kind:n.kind,resourceUri:n.resourceUri??n.url,title:n.title}}),r=n.tabs.find(e=>e.id===n.activeTabId);return r?o4(this.routeResolver,n,In(r)):n})},this.goBack=()=>{this.setSnapshot(e=>{let t=Vu({entries:e.activeHistory,index:e.activeHistoryIndex},`back`);return t?c4(this.routeResolver,{...e,activeHistory:[...t.history.entries],activeHistoryIndex:t.history.index},t.entry):e})},this.goForward=()=>{this.setSnapshot(e=>{let t=Vu({entries:e.activeHistory,index:e.activeHistoryIndex},`forward`);return t?c4(this.routeResolver,{...e,activeHistory:[...t.history.entries],activeHistoryIndex:t.history.index},t.entry):e})},this.closeTab=e=>{this.setSnapshot(t=>{if(t.tabs.length<=1)return{...Vn(),isOpen:!1};let n=t.tabs.findIndex(t=>t.id===e);if(n<0)return t;let r=t.tabs.filter(t=>t.id!==e),i=t.activeTabId===e?r[Math.max(0,n-1)]?.id??r[0].id:t.activeTabId,a={...t,tabs:r,activeTabId:i},o=r.find(e=>e.id===i)??r[0],s=Hu({entries:a.activeHistory,index:a.activeHistoryIndex},t=>t.tabId!==e,In(o)),c={...a,activeHistory:[...s.entries],activeHistoryIndex:s.index};return t.activeTabId===e?o4(this.routeResolver,c,In(o)):c})},this.setActiveTab=e=>{this.setSnapshot(t=>{if(!t.tabs.some(t=>t.id===e))return t;let n=t.tabs.find(t=>t.id===e);return n?o4(this.routeResolver,{...t,activeTabId:e,isOpen:!0},In(n)):t})}}};function m4(e){return e.activeWorkspacePanelKind!=null}var h4=class{constructor(){this.accountManager=new $s,this.rightPanelResourceRouteResolver=new Wq,this.notifyRightPanelOpened=()=>{let e=qn.getState().snapshot,t=sd.getState().snapshot;xn.collapseSidebarForDenseRightPanels({isDocBrowserDocked:e.mode===`docked`,isDocBrowserOpen:e.isOpen,isWorkspacePanelOpen:m4(t)})},this.docBrowserManager=new p4(this.rightPanelResourceRouteResolver,this.notifyRightPanelOpened),this.sideDockManager=new $2(this.docBrowserManager),this.chatDraftIntentManager=new m2,this.serviceActionAuthorizationManager=new HK,this.panelAppBridgeManager=new MK(this.serviceActionAuthorizationManager),this.remoteAccessManager=new Vs({accountManager:this.accountManager})}},g4=null;function _4(){return g4??=new h4,g4}function v4(){return _4()}var y4=globalThis,b4=y4.__NEXTCLAW_APP_PRESENTER_CONTEXT__??(0,I.createContext)(null);y4.__NEXTCLAW_APP_PRESENTER_CONTEXT__=b4;function x4({children:e}){let t=(0,I.useMemo)(()=>_4(),[]);return(0,L.jsx)(b4.Provider,{value:t,children:e})}function S4(){let e=(0,I.useContext)(b4);if(!e)throw Error(`useAppPresenter must be used inside AppPresenterProvider`);return e}export{gs as $,ud as A,Zs as B,s$ as C,dd as D,zK as E,Nl as F,Ms as G,Gs as H,Ml as I,Ls as J,Fs as K,kc as L,Kl as M,ql as N,pd as O,Jl as P,bs as Q,Ac as R,x$ as S,Qq as T,Vs as U,Ks as V,Bs as W,js as X,zs as Y,ks as Z,Q1 as _,gi as _t,N2 as a,bo as at,Y$ as b,r2 as c,ao as ct,N0 as d,Bi as dt,ls as et,M0 as f,Vi as ft,$1 as g,mi as gt,f0 as h,di as ht,K2 as i,Vo as it,Yl as j,fd as k,Z0 as l,no as lt,w0 as m,Wi as mt,S4 as n,ns as nt,h2 as o,yo as ot,j0 as p,Hi as pt,Is as q,v4 as r,Xo as rt,p2 as s,co as st,x4 as t,cs as tt,F0 as u,Aa as ut,n1 as v,cJ as w,J$ as x,Q$ as y,Qs as z};
|