@jean2/client 1.0.5 → 1.0.7
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/README.md +15 -59
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/Match-gih8rYty.js +1 -0
- package/dist/assets/ServerContext-n3DiePRf.js +1 -0
- package/dist/assets/SessionContent-8VSp9e_H.js +8 -0
- package/dist/assets/SessionMenuButton-DmOiTz4L.js +9 -0
- package/dist/assets/SessionMenuButton-kHJ-D0s7.css +1 -0
- package/dist/assets/ThemeProvider-DdrFTFeC.js +1 -0
- package/dist/assets/_serverId-AWAz7ZKp.js +11 -0
- package/dist/assets/_serverId-CJyl4WQ0.js +1 -0
- package/dist/assets/_sessionId-BSnjaXXA.js +1 -0
- package/dist/assets/_sessionId-BjRjsXiw.js +1 -0
- package/dist/assets/add-server-Bp8Rj07L.js +1 -0
- package/dist/assets/alert-CXqGI5X4.js +31 -0
- package/dist/assets/{archive-pL5uw9sg.js → archive-D-g6oXq-.js} +1 -1
- package/dist/assets/arrow-left-CMP-CUyJ.js +1 -0
- package/dist/assets/badge-CKFZbef9.js +1 -0
- package/dist/assets/button-DiGKmetm.js +45 -0
- package/dist/assets/confirmation-dialog-cXwbnO0N.js +1 -0
- package/dist/assets/createLucideIcon-B0_U-ptG.js +1 -0
- package/dist/assets/dialog-kEem1WlV.js +1 -0
- package/dist/assets/http-namespace-B-QCE6M-.js +1 -0
- package/dist/assets/index--7m9Oc9A.js +10 -0
- package/dist/assets/index-IGz5q8Ew.css +2 -0
- package/dist/assets/{compiler-runtime-DZXZ41-q.js → jsx-runtime-CoWo_Ex4.js} +1 -1
- package/dist/assets/mutation-CEN9YF7g.js +1 -0
- package/dist/assets/overview-C7qQiftE.js +1 -0
- package/dist/assets/overview-CASGrlAu.js +1 -0
- package/dist/assets/popover-DY0LfKS_.js +1 -0
- package/dist/assets/queries-BALgkFp9.js +1 -0
- package/dist/assets/react-dom-lAXwbrYv.js +1 -0
- package/dist/assets/{refresh-cw-BYRFQSBp.js → refresh-cw-CPVfqmA7.js} +1 -1
- package/dist/assets/routes-sXFQryK_.js +1 -0
- package/dist/assets/serverDataStore-BgmQAtvJ.js +1 -0
- package/dist/assets/sidebar-D6wWlASb.js +1 -0
- package/dist/assets/{triangle-alert-Bil68MLf.js → triangle-alert-Btuzvl61.js} +1 -1
- package/dist/assets/useNavigate-CEsW1NjX.js +1 -0
- package/dist/assets/useRouter-uprza1yo.js +1 -0
- package/dist/assets/workspace-BVkLHZQ5.js +1 -0
- package/dist/assets/workspace-Bdk9IcD9.js +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/icon-192.png +0 -0
- package/dist/icon-512.png +0 -0
- package/dist/index.html +15 -15
- package/dist/manifest.webmanifest +1 -0
- package/dist/registerSW.js +1 -0
- package/dist/sw.js +1 -0
- package/dist/workbox-6829fd8d.js +1 -0
- package/package.json +2 -2
- package/dist/assets/ServerContext-Dy9T5Mj8.js +0 -1
- package/dist/assets/SessionContent-DMPPyidM.js +0 -11
- package/dist/assets/SessionMenuButton-B9RQW_iM.css +0 -1
- package/dist/assets/SessionMenuButton-DtN_qfRb.js +0 -9
- package/dist/assets/ThemeProvider-Da23NPAS.js +0 -1
- package/dist/assets/_serverId-BOWHyoan.js +0 -12
- package/dist/assets/_serverId-DXVl_AFQ.js +0 -1
- package/dist/assets/_sessionId-BfVgqUBK.js +0 -1
- package/dist/assets/_sessionId-Bp7Qrc4O.js +0 -1
- package/dist/assets/add-server-BU3oc_j3.js +0 -1
- package/dist/assets/alert-BsN6ZzaK.js +0 -31
- package/dist/assets/arrow-left-DSvwF2mY.js +0 -1
- package/dist/assets/badge-Cjebg6Sp.js +0 -1
- package/dist/assets/button--1wnt03c.js +0 -45
- package/dist/assets/classPrivateFieldGet2-BGlEuFdn.js +0 -1
- package/dist/assets/confirmation-dialog-CFCxzDEX.js +0 -1
- package/dist/assets/core-BYcrozIP.js +0 -1
- package/dist/assets/createLucideIcon-CuVT3KNW.js +0 -1
- package/dist/assets/dialog-BNCh4KEM.js +0 -1
- package/dist/assets/dist-js-s36UjyQ4.js +0 -1
- package/dist/assets/event-Crr43Eih.js +0 -1
- package/dist/assets/index-Db3JxRbZ.js +0 -10
- package/dist/assets/index-DzEyMPKG.css +0 -2
- package/dist/assets/mutation-D4xtepYQ.js +0 -1
- package/dist/assets/overview-C91MPxfo.js +0 -1
- package/dist/assets/overview-DbKX71kj.js +0 -1
- package/dist/assets/platform-cRBZ7eSy.js +0 -1
- package/dist/assets/popover-C8mm1NWm.js +0 -1
- package/dist/assets/preload-helper-D844vhe4.js +0 -1
- package/dist/assets/queries-C0JoQFZb.js +0 -1
- package/dist/assets/react-dom-DHWV5rS5.js +0 -1
- package/dist/assets/routes-Ck6V8B0w.js +0 -1
- package/dist/assets/sidebar-BqQ-fUFc.js +0 -1
- package/dist/assets/src-BALdofIU.js +0 -1
- package/dist/assets/useNavigate-Ckup4lZi.js +0 -1
- package/dist/assets/useRouter-C67ywEA3.js +0 -1
- package/dist/assets/workspace-84xYPx6s.js +0 -1
- package/dist/assets/workspace-BzFUmInc.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./jsx-runtime-CoWo_Ex4.js";import{a as i,n as a}from"./serverDataStore-BgmQAtvJ.js";import{$ as o,A as s,G as c,H as l,I as u,J as d,L as f,M as p,R as m,X as h,Y as g,Z as _,et as v,nt as y,q as b,tt as x}from"./Match-gih8rYty.js";import{X as S,Y as C,_ as w,b as T,f as E,h as D,p as O}from"./badge-CKFZbef9.js";import{t as k}from"./createLucideIcon-B0_U-ptG.js";import{D as A,M as j,a as M,c as N,d as P,l as ee,n as te,o as ne,r as F,s as re,t as ie,u as ae}from"./button-DiGKmetm.js";var oe=class extends y{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=f(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),I(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return L(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return L(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof d(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!h(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&R(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||d(this.options.enabled,this.#t)!==d(t.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||d(this.options.enabled,this.#t)!==d(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return ce(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c)),t}#g(){this.#b();let e=g(this.options.staleTime,this.#t);if(m.isServer()||this.#r.isStale||!l(e))return;let t=o(this.#r.dataUpdatedAt,e)+1;this.#d=v.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(m.isServer()||d(this.options.enabled,this.#t)===!1||!l(this.#p)||this.#p===0)&&(this.#f=v.setInterval(()=>{(this.options.refetchIntervalInBackground||x.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(v.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(v.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,m;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&I(e,t),o=i&&R(e,n,t,r);(a||o)&&(l={...l,...p(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:g,status:_}=l;m=l.data;let v=!1;if(t.placeholderData!==void 0&&m===void 0&&_===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,v=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(_=`success`,m=b(i?.data,e,t),u=!0)}if(t.select&&m!==void 0&&!v)if(i&&m===a?.data&&t.select===this.#c)m=this.#l;else try{this.#c=t.select,m=t.select(m),m=b(i?.data,m,t),this.#l=m,this.#s=null}catch(e){this.#s=e}this.#s&&(h=this.#s,m=this.#l,g=Date.now(),_=`error`);let y=l.fetchStatus===`fetching`,x=_===`pending`,S=_===`error`,C=x&&y,w=m!==void 0,T={status:_,fetchStatus:l.fetchStatus,isPending:x,isSuccess:_===`success`,isError:S,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:l.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:S&&!w,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:S&&w,isStale:z(e,t),refetch:this.refetch,promise:this.#o,isEnabled:d(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=T.data!==void 0,r=T.status===`error`&&!t,i=e=>{r?e.reject(T.error):t&&e.resolve(T.data)},a=()=>{i(this.#o=T.promise=f())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||T.data!==o.value)&&a();break;case`rejected`:(!r||T.error!==o.reason)&&a();break}}return T}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!h(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){u.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function se(e,t){return d(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&d(t.retryOnMount,e)===!1)}function I(e,t){return se(e,t)||e.state.data!==void 0&&L(e,t,t.refetchOnMount)}function L(e,t,n){if(d(t.enabled,e)!==!1&&g(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&z(e,t)}return!1}function R(e,t,n,r){return(e!==t||d(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&z(e,n)}function z(e,t){return d(t.enabled,e)!==!1&&e.isStaleByTime(g(t.staleTime,e))}function ce(e,t){return!h(e.getCurrentResult(),t)}var B=r(),V=t(n(),1),H=V.createContext(!1),le=()=>V.useContext(H);H.Provider;function ue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var de=V.createContext(ue()),fe=()=>V.useContext(de),pe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?_(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},me=e=>{V.useEffect(()=>{e.clearReset()},[e])},he=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||_(n,[e.error,r])),ge=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},_e=(e,t)=>e.isLoading&&e.isFetching&&!t,ve=(e,t)=>e?.suspense&&t.isPending,U=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ye(e,t,n){let r=le(),i=fe(),a=s(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let l=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,ge(o),pe(o,i,l),me(i);let d=!a.getQueryCache().get(o.queryHash),[f]=V.useState(()=>new t(a,o)),p=f.getOptimisticResult(o),h=!r&&e.subscribed!==!1;if(V.useSyncExternalStore(V.useCallback(e=>{let t=h?f.subscribe(u.batchCalls(e)):c;return f.updateResult(),t},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),V.useEffect(()=>{f.setOptions(o)},[o,f]),ve(o,p))throw U(o,f,i);if(he({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw p.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,p),o.experimental_prefetchInRender&&!m.isServer()&&_e(p,r)&&(d?U(o,f,i):l?.promise)?.catch(c).finally(()=>{f.updateResult()}),o.notifyOnChangeProps?p:f.trackResult(p)}function be(e,t){return ye(e,oe,t)}var xe=k(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Se=k(`folder-open`,[[`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`}]]),Ce=k(`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`}]]),we=k(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Te=5e3,Ee=a(e=>({completionState:new Map,setCompletion:(t,n)=>e(e=>{let r=new Map(e.completionState);return r.set(t,n),{completionState:r}}),clearCompletion:t=>e(e=>{let n=new Map(e.completionState);return n.delete(t),{completionState:n}}),clearAllCompletions:()=>e({completionState:new Map})})),De=e=>t=>t.completionState.get(e),Oe=Te,ke={sessions:{all:[`sessions`],byWorkspace:e=>[`sessions`,`workspace`,e],grouped:(e,t)=>[`sessions`,`grouped`,{workspaceIds:[...e].sort(),status:t}]},tools:{all:[`tools`],envVars:[`tools`,`envVars`]},config:{models:[`config`,`models`],preconfigs:[`config`,`preconfigs`],prompts:[`config`,`prompts`],providers:{all:[`providers`],credentials:[`providers`,`credentials`]}},mcp:{status:e=>[`mcp`,`status`,e]},files:{browse:(e,t,n)=>[`files`,`browse`,e,t??`.`,n],browseFs:e=>[`files`,`browseFs`,e],drives:[`files`,`drives`],parent:e=>[`files`,`parent`,e],preview:(e,t)=>[`files`,`preview`,e,t]},serverInfo:[`serverInfo`]},W=e();function Ae(){return i.id===`electron`?`electron`:i.id===`vscode`||i.id===`web`?`web`:`unknown`}function G(){return i.id===`electron`}function je(){return typeof navigator>`u`?!1:/Win/i.test(navigator.platform||navigator.userAgent)}function K(e){return S(e)}function Me(e){if(typeof window>`u`)return e;try{let t=localStorage.getItem(C.SESSIONS);if(t===null)return e;let n=JSON.parse(t);return typeof n.width!=`number`||isNaN(n.width)?e:K(n.width)}catch{return e}}function Ne(e){if(!(typeof window>`u`))try{let t=K(e);localStorage.setItem(C.SESSIONS,JSON.stringify({width:t}))}catch(e){console.warn(`Error saving sessions panel width:`,e)}}function Pe(e){if(typeof window>`u`)return e;try{let t=localStorage.getItem(C.FILES);if(t===null)return e;let n=JSON.parse(t);return typeof n.width!=`number`||isNaN(n.width)?e:K(n.width)}catch{return e}}function Fe(e){if(!(typeof window>`u`))try{let t=K(e);localStorage.setItem(C.FILES,JSON.stringify({width:t}))}catch(e){console.warn(`Error saving files panel width:`,e)}}var Ie=()=>Me(256),Le=()=>Pe(256),q=a(e=>({showFilesPanel:!1,showTerminalPanel:!1,sessionsPanelWidth:Ie(),filesPanelWidth:Le(),setShowFilesPanel:t=>e({showFilesPanel:t}),setShowTerminalPanel:t=>e({showTerminalPanel:t}),setSessionsPanelWidth:t=>{let n=S(t);Ne(n),e({sessionsPanelWidth:n})},setFilesPanelWidth:t=>{let n=S(t);Fe(n),e({filesPanelWidth:n})}}));function J(e){let t=(0,W.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,B.jsx)(ae,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function Re(e){let t=(0,W.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,B.jsx)(ee,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function ze(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(N,{"data-slot":`sheet-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Y(e){let t=(0,W.c)(24),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:r,children:n,side:o,showCloseButton:s,style:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=o===void 0?`right`:o,l=s===void 0?!0:s,u;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,B.jsx)(ze,{}),t[7]=u):u=t[7];let d;t[8]===r?d=t[9]:(d=F(`fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,r),t[8]=r,t[9]=d);let f=G()?`90px`:`0px`,p;t[10]===c?p=t[11]:(p=c===`left`||c===`right`?{top:`calc(env(safe-area-inset-top, 0px) + ${f})`,height:`calc(100dvh - env(safe-area-inset-top, 0px) - ${f})`}:c===`top`?{top:`calc(env(safe-area-inset-top, 0px) + ${f})`}:c===`bottom`?{bottom:`env(safe-area-inset-bottom, 0px)`}:void 0,t[10]=c,t[11]=p);let m=p,h;t[12]!==m||t[13]!==a?(h=m?{...m,...a}:a,t[12]=m,t[13]=a,t[14]=h):h=t[14];let g=h,_;t[15]===l?_=t[16]:(_=l&&(0,B.jsx)(M,{"data-slot":`sheet-close`,asChild:!0,children:(0,B.jsxs)(ie,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,B.jsx)(j,{}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),t[15]=l,t[16]=_);let v;return t[17]!==n||t[18]!==i||t[19]!==c||t[20]!==d||t[21]!==g||t[22]!==_?(v=(0,B.jsxs)(Re,{children:[u,(0,B.jsxs)(ne,{"data-slot":`sheet-content`,"data-side":c,className:d,style:g,...i,children:[n,_]})]}),t[17]=n,t[18]=i,t[19]=c,t[20]=d,t[21]=g,t[22]=_,t[23]=v):v=t[23],v}function X(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`flex flex-col gap-0.5 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(`div`,{"data-slot":`sheet-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Z(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`text-base font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(P,{"data-slot":`sheet-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Be(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(re,{"data-slot":`sheet-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Ve=`sidebar_state`,He=3600*24*7,Ue=`16rem`,We=`18rem`,Ge=`3rem`,Q=V.createContext(null);function $(){let e=V.useContext(Q);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Ke(e){let t=(0,W.c)(35),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({defaultOpen:l,open:i,onOpenChange:s,className:r,style:c,children:n,panelId:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=l===void 0?!0:l,d=T(),[f,p]=V.useState(!1),[m,h]=V.useState(u),g=i??m,_;t[9]!==g||t[10]!==s?(_=e=>{let t=typeof e==`function`?e(g):e;s?s(t):h(t),document.cookie=`${Ve}=${t}; path=/; max-age=${He}`},t[9]=g,t[10]=s,t[11]=_):_=t[11];let v=_,y;t[12]!==d||t[13]!==v?(y=()=>d?p(Je):v(qe),t[12]=d,t[13]=v,t[14]=y):y=t[14];let b=y,x=g?`expanded`:`collapsed`,S;t[15]!==d||t[16]!==g||t[17]!==f||t[18]!==v||t[19]!==x||t[20]!==b?(S={state:x,open:g,setOpen:v,isMobile:d,openMobile:f,setOpenMobile:p,toggleSidebar:b},t[15]=d,t[16]=g,t[17]=f,t[18]=v,t[19]=x,t[20]=b,t[21]=S):S=t[21];let C=S,w;t[22]===c?w=t[23]:(w={"--sidebar-width":Ue,"--sidebar-width-icon":Ge,...c},t[22]=c,t[23]=w);let E=w,D;t[24]===r?D=t[25]:(D=F(`overflow-hidden group/sidebar-wrapper flex h-full w-full has-data-[variant=inset]:bg-sidebar`,r),t[24]=r,t[25]=D);let O;t[26]!==n||t[27]!==a||t[28]!==o||t[29]!==E||t[30]!==D?(O=(0,B.jsx)(`div`,{"data-slot":`sidebar-wrapper`,"data-panel-id":a,style:E,className:D,...o,children:n}),t[26]=n,t[27]=a,t[28]=o,t[29]=E,t[30]=D,t[31]=O):O=t[31];let k;return t[32]!==C||t[33]!==O?(k=(0,B.jsx)(Q.Provider,{value:C,children:O}),t[32]=C,t[33]=O,t[34]=k):k=t[34],k}function qe(e){return!e}function Je(e){return!e}function Ye(e){let t=(0,W.c)(54),n,r,i,a,o,s,c,l;if(t[0]!==e){let{side:u,variant:d,collapsible:f,className:p,children:m,dir:h,isOpen:g,onOpenChange:_,...v}=e;s=u,c=d,l=f,r=p,n=m,i=h,a=g,o=v,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8];let u=s===void 0?`left`:s,d=c===void 0?`sidebar`:c,f=l===void 0?`offcanvas`:l,{isMobile:p,state:m,openMobile:h,setOpenMobile:g}=$(),_=a===void 0?void 0:a,v=_===void 0?m:_?`expanded`:`collapsed`;if(f===`none`){let e;t[9]===r?e=t[10]:(e=F(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[9]=r,t[10]=e);let i;return t[11]!==n||t[12]!==o||t[13]!==e?(i=(0,B.jsx)(`div`,{"data-slot":`sidebar`,className:e,...o,children:n}),t[11]=n,t[12]=o,t[13]=e,t[14]=i):i=t[14],i}if(p){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":We},t[15]=e):e=t[15];let r;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,B.jsxs)(X,{className:`sr-only`,children:[(0,B.jsx)(Z,{children:`Sidebar`}),(0,B.jsx)(Be,{children:`Displays the mobile sidebar.`})]}),t[16]=r):r=t[16];let a;t[17]===n?a=t[18]:(a=(0,B.jsx)(`div`,{className:`flex h-full w-full flex-col p-2`,children:n}),t[17]=n,t[18]=a);let s;t[19]!==i||t[20]!==u||t[21]!==a?(s=(0,B.jsxs)(Y,{dir:i,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:e,side:u,children:[r,a]}),t[19]=i,t[20]=u,t[21]=a,t[22]=s):s=t[22];let c;return t[23]!==h||t[24]!==o||t[25]!==g||t[26]!==s?(c=(0,B.jsx)(J,{open:h,onOpenChange:g,...o,children:s}),t[23]=h,t[24]=o,t[25]=g,t[26]=s,t[27]=c):c=t[27],c}let y=v===`collapsed`?f:``,b=_!==void 0&&!_&&`w-0`,x=d===`floating`||d===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,S;t[28]!==b||t[29]!==x?(S=F(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,b,`group-data-[side=right]:rotate-180`,x),t[28]=b,t[29]=x,t[30]=S):S=t[30];let C;t[31]===S?C=t[32]:(C=(0,B.jsx)(`div`,{"data-slot":`sidebar-gap`,className:S}),t[31]=S,t[32]=C);let w=u===`left`&&_!==void 0&&!_&&`left-[calc(var(--sidebar-width)*-1)]`,T=u===`right`&&_!==void 0&&!_&&`right-[calc(var(--sidebar-width)*-1)]`,E=d===`floating`||d===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,D;t[33]!==r||t[34]!==T||t[35]!==E||t[36]!==w?(D=F(`fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,w,T,E,r),t[33]=r,t[34]=T,t[35]=E,t[36]=w,t[37]=D):D=t[37];let O;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(O={top:`calc(var(--header-height, 0px) + env(safe-area-inset-top, 0px))`,height:`calc(100dvh - var(--header-height, 0px) - env(safe-area-inset-top, 0px))`},t[38]=O):O=t[38];let k;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(k={paddingBottom:`env(safe-area-inset-bottom, 0px)`},t[39]=k):k=t[39];let A;t[40]===n?A=t[41]:(A=(0,B.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,style:k,children:n}),t[40]=n,t[41]=A);let j;t[42]!==o||t[43]!==u||t[44]!==D||t[45]!==A?(j=(0,B.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":u,className:D,style:O,...o,children:A}),t[42]=o,t[43]=u,t[44]=D,t[45]=A,t[46]=j):j=t[46];let M;return t[47]!==v||t[48]!==u||t[49]!==j||t[50]!==y||t[51]!==C||t[52]!==d?(M=(0,B.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":v,"data-collapsible":y,"data-variant":d,"data-side":u,"data-slot":`sidebar`,children:[C,j]}),t[47]=v,t[48]=u,t[49]=j,t[50]=y,t[51]=C,t[52]=d,t[53]=M):M=t[53],M}function Xe(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ze(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(w,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Qe=V.forwardRef((e,t)=>{let n=(0,W.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=F(`no-scrollbar flex min-h-0 min-w-0 w-full flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,B.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:a,ref:t,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});function $e(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`relative flex w-full min-w-0 flex-col p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function et(e){let t=(0,W.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i!==void 0&&i?A:`div`,o;t[4]===n?o=t[5]:(o=F(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,B.jsx)(a,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:o,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function tt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`w-full text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function nt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`flex w-full min-w-0 flex-col gap-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function rt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var it=te(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-1 focus:ring-inset active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function at(e){let t=(0,W.c)(28),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({asChild:i,isActive:a,variant:o,size:s,tooltip:c,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=i===void 0?!1:i,u=a===void 0?!1:a,d=o===void 0?`default`:o,f=s===void 0?`default`:s,p=l?A:`button`,{isMobile:m,state:h}=$(),g;t[8]!==n||t[9]!==f||t[10]!==d?(g=F(it({variant:d,size:f}),n),t[8]=n,t[9]=f,t[10]=d,t[11]=g):g=t[11];let _;t[12]!==p||t[13]!==u||t[14]!==r||t[15]!==f||t[16]!==g?(_=(0,B.jsx)(p,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":f,"data-active":u,className:g,...r}),t[12]=p,t[13]=u,t[14]=r,t[15]=f,t[16]=g,t[17]=_):_=t[17];let v=_;if(!c)return v;if(typeof c==`string`){let e;t[18]===c?e=t[19]:(e={children:c},t[18]=c,t[19]=e),c=e}let y;t[20]===v?y=t[21]:(y=(0,B.jsx)(D,{asChild:!0,children:v}),t[20]=v,t[21]=y);let b=h!==`collapsed`||m,x;t[22]!==b||t[23]!==c?(x=(0,B.jsx)(O,{side:`right`,align:`center`,hidden:b,...c}),t[22]=b,t[23]=c,t[24]=x):x=t[24];let S;return t[25]!==y||t[26]!==x?(S=(0,B.jsxs)(E,{children:[y,x]}),t[25]=y,t[26]=x,t[27]=S):S=t[27],S}function ot(e){let t=(0,W.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,asChild:i,showOnHover:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?!1:i,s=a===void 0?!1:a,c=o?A:`button`,l=s&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,u;t[5]!==n||t[6]!==l?(u=F(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-1 focus:ring-inset md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,l,n),t[5]=n,t[6]=l,t[7]=u):u=t[7];let d;return t[8]!==c||t[9]!==r||t[10]!==u?(d=(0,B.jsx)(c,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:u,...r}),t[8]=c,t[9]=r,t[10]=u,t[11]=d):d=t[11],d}function st(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=F(`ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5 group-data-[collapsible=icon]:hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,B.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ct(e){let t=(0,W.c)(29),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({side:a,panelId:r,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=T(),s=q(ft),c=q(dt),l=q(ut),u=q(lt),d=r===`sessions`?s:l,f=r===`sessions`?c:u,[p,m]=V.useState(!1),h=V.useRef(!1),g=V.useRef(0),_=V.useRef(0),v=V.useRef(0),y=V.useRef(null),b=V.useRef(null),x;t[5]!==o||t[6]!==r?(x=e=>{if(o)return;e.preventDefault(),e.stopPropagation(),h.current=!0,m(!0),g.current=e.clientX,_.current=v.current,document.body.style.cursor=`ew-resize`,document.body.style.userSelect=`none`;let t=document.querySelector(`[data-panel-id="${r}"]`);y.current=t,t&&(b.current=t.style.getPropertyValue(`--sidebar-width`)||null,t.classList.add(`no-transition`))},t[5]=o,t[6]=r,t[7]=x):x=t[7];let C=x,w,E;t[8]===d?(w=t[9],E=t[10]):(w=()=>{v.current=d},E=[d],t[8]=d,t[9]=w,t[10]=E),V.useEffect(w,E);let D,O;if(t[11]!==r||t[12]!==f||t[13]!==a?(D=()=>{let e=e=>{if(!h.current)return;let t=a===`left`?e.clientX-g.current:g.current-e.clientX,n=S(_.current+t);v.current=n;let i=y.current||document.querySelector(`[data-panel-id="${r}"]`);i&&(i.style.setProperty(`--sidebar-width`,`${Math.round(n)}px`),y.current=i);let o=document.querySelector(`[data-panel-gap="${r}"]`);o&&(o.style.width=`${Math.round(n)}px`)},t=()=>{if(!h.current)return;h.current=!1,m(!1),document.body.style.cursor=``,document.body.style.userSelect=``;let e=y.current||document.querySelector(`[data-panel-id="${r}"]`);e&&(e.classList.remove(`no-transition`),b.current===null?e.style.removeProperty(`--sidebar-width`):e.style.setProperty(`--sidebar-width`,b.current));let t=document.querySelector(`[data-panel-gap="${r}"]`);t&&(t.classList.add(`no-transition`),t.style.width=`${Math.round(v.current)}px`,requestAnimationFrame(()=>{t?.classList.remove(`no-transition`)})),f(Math.round(v.current))};return document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)}},O=[f,a,r],t[11]=r,t[12]=f,t[13]=a,t[14]=D,t[15]=O):(D=t[14],O=t[15]),V.useEffect(D,O),o)return null;let k=a===`left`?`absolute top-0 right-0`:`absolute top-0 left-0`,A;t[16]!==n||t[17]!==k?(A=F(`z-30 flex h-full w-2 cursor-ew-resize items-center justify-center group/sidebar-resize`,k,n),t[16]=n,t[17]=k,t[18]=A):A=t[18];let j=p?`bg-primary`:`group-active/sidebar-resize:bg-primary`,M;t[19]===j?M=t[20]:(M=F(`h-8 w-0.5 rounded-full transition-colors duration-100`,`bg-transparent group-hover/sidebar-resize:bg-border`,j),t[19]=j,t[20]=M);let N;t[21]===M?N=t[22]:(N=(0,B.jsx)(`div`,{className:M}),t[21]=M,t[22]=N);let P;return t[23]!==C||t[24]!==r||t[25]!==i||t[26]!==A||t[27]!==N?(P=(0,B.jsx)(`div`,{"data-slot":`panel-resize-handle`,"data-panel-id":r,className:A,onMouseDown:C,...i,children:N}),t[23]=C,t[24]=r,t[25]=i,t[26]=A,t[27]=N,t[28]=P):P=t[28],P}function lt(e){return e.setFilesPanelWidth}function ut(e){return e.filesPanelWidth}function dt(e){return e.setSessionsPanelWidth}function ft(e){return e.sessionsPanelWidth}function pt(e){let t=(0,W.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,B.jsx)(ct,{side:`left`,panelId:`sessions`,className:n,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}export{Ce as A,G as C,De as D,Oe as E,xe as M,be as N,Ee as O,Ae as S,ke as T,J as _,$e as a,Z as b,Xe as c,at as d,rt as f,$ as g,Ze as h,Qe as i,Se as j,we as k,nt as l,Ke as m,pt as n,tt as o,st as p,Ye as r,et as s,ct as t,ot as u,Y as v,je as w,q as x,X as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-B0_U-ptG.js";var t=e(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),n=e(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),r=e(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),i=e(`triangle-alert`,[[`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`}]]);export{t as i,r as n,n as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,r as t}from"./jsx-runtime-CoWo_Ex4.js";import{t as n}from"./useRouter-uprza1yo.js";var r=e(t(),1);function i(e){let t=n();return r.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,r as t}from"./jsx-runtime-CoWo_Ex4.js";var n=e(t(),1),r=n.createContext(null);function i(e){return n.useContext(r)}export{r as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./jsx-runtime-CoWo_Ex4.js";var n=e(),r=t(),i=()=>{let e=(0,n.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center text-muted-foreground px-6`,children:[(0,r.jsx)(`h2`,{className:`mb-2`,children:`Select or create a session`}),(0,r.jsx)(`p`,{children:`Choose a session from the sidebar or create a new one to start chatting.`})]}),e[0]=t):t=e[0],t};export{i as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./jsx-runtime-CoWo_Ex4.js";import{i}from"./serverDataStore-BgmQAtvJ.js";import{n as a}from"./Match-gih8rYty.js";import{A as o,M as s,N as c,T as l,a as u,c as d,d as f,f as p,l as m,o as h,s as g}from"./sidebar-D6wWlASb.js";import{L as _,R as v,i as y,r as b,t as x}from"./queries-BALgkFp9.js";import{D as S,G as C,H as w,K as ee,T as te,V as T,a as ne,c as re,d as ie,i as E,k as D,n as O,r as ae,s as oe,t as k,v as A}from"./badge-CKFZbef9.js";import{t as j}from"./createLucideIcon-B0_U-ptG.js";import{t as se}from"./archive-D-g6oXq-.js";import{a as M,i as N,n as P,o as F,r as ce,s as I,t as L}from"./SessionMenuButton-DmOiTz4L.js";import{a as R,c as z,d as B,i as V,l as H,m as U,o as W,p as G,r as K,s as q,t as le,u as ue}from"./popover-DY0LfKS_.js";import{F as J,M as de,N as fe,r as pe,t as me}from"./button-DiGKmetm.js";import{a as he,o as ge,r as _e,s as ve,t as ye}from"./dialog-kEem1WlV.js";import{t as be}from"./confirmation-dialog-cXwbnO0N.js";var xe=j(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Se=j(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Ce=e(),Y=t(n(),1);function X(e){let t=(0,Ce.c)(20),{sdkClient:n,workspaceId:r,connected:i}=e,a=D(Z),o;t[0]===r?o=t[1]:(o=l.sessions.byWorkspace(r??``),t[0]=r,t[1]=o);let s;t[2]!==n||t[3]!==r?(s=()=>n.http.sessions.listByWorkspace({workspaceId:r}),t[2]=n,t[3]=r,t[4]=s):s=t[4];let u=!!n&&i&&!!r,d;t[5]!==o||t[6]!==s||t[7]!==u?(d={queryKey:o,queryFn:s,enabled:u,staleTime:1e4},t[5]=o,t[6]=s,t[7]=u,t[8]=d):d=t[8];let{isLoading:f,error:p,data:m}=c(d),h,g;t[9]!==a||t[10]!==r?(h=()=>{r||a([])},g=[r,a],t[9]=a,t[10]=r,t[11]=h,t[12]=g):(h=t[11],g=t[12]),(0,Y.useEffect)(h,g);let _,v;t[13]!==m||t[14]!==a?(_=()=>{m?.sessions&&a(m.sessions)},v=[m,a],t[13]=m,t[14]=a,t[15]=_,t[16]=v):(_=t[15],v=t[16]),(0,Y.useEffect)(_,v);let y=p?.message??null,b;return t[17]!==f||t[18]!==y?(b={isLoading:f,error:y},t[17]=f,t[18]=y,t[19]=b):b=t[19],b}function Z(e){return e.setSessions}function we(...e){return e.map((e,t)=>t===0?e.replace(/\/+$/,``):e.replace(/^\/+|\/+$/g,``)).filter(Boolean).join(`/`)}var Q=r();function Te(e){let t=(0,Ce.c)(83),{open:n,onOpenChange:r,onSelect:i,initialPath:a,title:o,sdkClient:s}=e,c=o===void 0?`Select Folder`:o,[l,u]=(0,Y.useState)(a||``),[d,f]=(0,Y.useState)(a||``),[p,m]=(0,Y.useState)(0),[h,g]=(0,Y.useState)(``),[v,S]=(0,Y.useState)(!1),[C,te]=(0,Y.useState)(!1),ne=(0,Y.useRef)(null),re=(0,Y.useRef)(null),{data:ie,isLoading:E,error:D,refetch:O}=x(s,d,n),{data:ae}=b(s),{error:oe,refetch:k}=y(s,l,!1),j;t[0]===ae?.drives?j=t[1]:(j=ae?.drives??[],t[0]=ae?.drives,t[1]=j);let se=j,M=ie?.files?.filter(ke)??[],N=ie?.isRoot??!1,P=E||C,F=D||oe,ce;t[2]===h?ce=t[3]:(ce=e=>e.name.toLowerCase().includes(h.toLowerCase()),t[2]=h,t[3]=ce);let I=M.filter(ce),L=I[p]??null,R;t[4]===l?R=t[5]:(R=e=>we(l,e.name),t[4]=l,t[5]=R);let z=R,B=L?z(L):l,V=!L,H;t[6]!==N||t[7]!==k||t[8]!==s?(H=()=>{!s||N||(te(!0),k().then(e=>{e.data&&(u(e.data.currentPath),f(e.data.currentPath),m(0),g(``)),te(!1)}).catch(()=>{te(!1)}))},t[6]=N,t[7]=k,t[8]=s,t[9]=H):H=t[9];let U=H,W;t[10]===z?W=t[11]:(W=e=>{let t=z(e);u(t),f(t),m(0),g(``),S(!1)},t[10]=z,t[11]=W);let K=W,q=()=>{B&&(i(B),r(!1))},le=e=>{if(I.length!==0)bb85:switch(e.key){case`ArrowDown`:e.preventDefault(),m(e=>Math.min(e+1,I.length-1));break bb85;case`ArrowRight`:I[p]&&(e.preventDefault(),K(I[p]));break bb85;case`ArrowUp`:e.preventDefault(),m(Oe);break bb85;case`Enter`:e.preventDefault(),q();break bb85;case`Escape`:h&&(e.preventDefault(),g(``))}},ue,J;t[12]!==a||t[13]!==n?(ue=()=>{if(n){let e=a||``;u(e),f(e),m(0),g(``)}},J=[n,a],t[12]=a,t[13]=n,t[14]=ue,t[15]=J):(ue=t[14],J=t[15]),(0,Y.useEffect)(ue,J);let de;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>{m(0)},t[16]=de):de=t[16];let fe;t[17]===h?fe=t[18]:(fe=[h],t[17]=h,t[18]=fe),(0,Y.useEffect)(de,fe),(0,Y.useEffect)(()=>{if(re.current&&I.length>0){let e=re.current.children[p];e&&e.scrollIntoView({block:`nearest`})}},[p,I.length]);let be,X;t[19]===n?(be=t[20],X=t[21]):(be=()=>{n&&setTimeout(()=>ne.current?.focus(),100)},X=[n],t[19]=n,t[20]=be,t[21]=X),(0,Y.useEffect)(be,X);let Z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(Z=()=>{S(!1)},t[22]=Z):Z=t[22];let Te;t[23]===l?Te=t[24]:(Te=[l],t[23]=l,t[24]=Te),(0,Y.useEffect)(Z,Te);let Ae=De,je=ye,Me=_e,$;t[25]===c?$=t[26]:($=(0,Q.jsx)(ge,{children:(0,Q.jsx)(ve,{children:c})}),t[25]=c,t[26]=$);let Ne=P||!l||N,Pe;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,Q.jsx)(xe,{className:`w-4 h-4`}),t[27]=Pe):Pe=t[27];let Fe;t[28]!==U||t[29]!==Ne?(Fe=(0,Q.jsx)(me,{variant:`ghost`,size:`icon`,className:`h-7 w-7 flex-shrink-0`,onClick:U,disabled:Ne,children:Pe}),t[28]=U,t[29]=Ne,t[30]=Fe):Fe=t[30];let Ie;t[31]!==l||t[32]!==se||t[33]!==P||t[34]!==v?(Ie=se.length>1&&(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(me,{variant:`ghost`,size:`icon`,className:`h-7 w-7 flex-shrink-0`,onClick:()=>S(Ee),disabled:P,children:(0,Q.jsx)(Se,{className:`w-4 h-4`})}),v&&(0,Q.jsx)(`div`,{className:`absolute top-full left-0 mt-1 bg-popover border rounded-md shadow-md z-50 min-w-[120px]`,children:se.map(e=>(0,Q.jsxs)(`button`,{onClick:()=>{u(e),f(e),S(!1),m(0),g(``)},className:pe(`flex items-center gap-2 w-full px-3 py-1.5 text-sm text-left hover:bg-muted`,l===e&&`bg-primary/20 text-primary font-medium`),children:[(0,Q.jsx)(w,{className:`w-3.5 h-3.5 text-amber-500`}),e]},e))})]}),t[31]=l,t[32]=se,t[33]=P,t[34]=v,t[35]=Ie):Ie=t[35];let Le=L?(0,Q.jsx)(`span`,{className:`text-primary`,children:Ae(z(L),45)}):Ae(l)||`Home`,Re;t[36]!==Le||t[37]!==B?(Re=(0,Q.jsx)(`span`,{className:`flex-1 text-sm font-mono truncate`,title:B,children:Le}),t[36]=Le,t[37]=B,t[38]=Re):Re=t[38];let ze;t[39]!==Fe||t[40]!==Ie||t[41]!==Re?(ze=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 p-2 bg-muted rounded-md`,children:[Fe,Ie,Re]}),t[39]=Fe,t[40]=Ie,t[41]=Re,t[42]=ze):ze=t[42];let Be;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,Q.jsx)(G,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground`}),t[43]=Be):Be=t[43];let Ve;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=e=>g(e.target.value),t[44]=Ve):Ve=t[44];let He;t[45]===h?He=t[46]:(He=(0,Q.jsxs)(`div`,{className:`relative`,children:[Be,(0,Q.jsx)(A,{ref:ne,placeholder:`Filter folders...`,value:h,onChange:Ve,className:`pl-8`})]}),t[45]=h,t[46]=He);let Ue;t[47]!==l||t[48]!==F||t[49]!==I||t[50]!==K||t[51]!==P||t[52]!==O||t[53]!==h||t[54]!==p?(Ue=(0,Q.jsx)(_,{className:`h-64 border rounded-md`,children:P?(0,Q.jsxs)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground`,children:[(0,Q.jsx)(T,{className:`w-4 h-4 animate-spin mr-2`}),`Loading...`]}):F?(0,Q.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground`,children:[(0,Q.jsx)(`span`,{className:`text-destructive`,children:F.message}),(0,Q.jsx)(me,{variant:`ghost`,size:`sm`,onClick:()=>{f(l),O()},className:`mt-2`,children:`Retry`})]}):I.length===0?(0,Q.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground text-sm`,children:[(0,Q.jsx)(w,{className:`w-8 h-8 mb-2 opacity-50`}),h?`No matching folders`:`No folders in this directory`]}):(0,Q.jsx)(`div`,{className:`p-1`,ref:re,children:I.map((e,t)=>(0,Q.jsxs)(`button`,{onClick:()=>m(t),onDoubleClick:()=>K(e),className:pe(`flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left`,`hover:bg-muted`,t===p&&`bg-primary/20 text-primary font-medium ring-1 ring-primary/50`),children:[(0,Q.jsx)(w,{className:`w-4 h-4 text-amber-500 flex-shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate flex-1`,children:e.name}),t===p&&(0,Q.jsx)(ee,{className:`w-4 h-4 text-primary`})]},e.path))})}),t[47]=l,t[48]=F,t[49]=I,t[50]=K,t[51]=P,t[52]=O,t[53]=h,t[54]=p,t[55]=Ue):Ue=t[55];let We;t[56]===F?We=t[57]:(We=F&&(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:F.message}),t[56]=F,t[57]=We);let Ge;t[58]!==ze||t[59]!==He||t[60]!==Ue||t[61]!==We?(Ge=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[ze,He,Ue,We]}),t[58]=ze,t[59]=He,t[60]=Ue,t[61]=We,t[62]=Ge):Ge=t[62];let Ke;t[63]===r?Ke=t[64]:(Ke=(0,Q.jsx)(me,{variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),t[63]=r,t[64]=Ke);let qe=!B||P,Je=V?`Use This Folder`:`Add Selected Folder`,Ye;t[65]!==q||t[66]!==qe||t[67]!==Je?(Ye=(0,Q.jsx)(me,{onClick:q,disabled:qe,children:Je}),t[65]=q,t[66]=qe,t[67]=Je,t[68]=Ye):Ye=t[68];let Xe;t[69]!==Ke||t[70]!==Ye?(Xe=(0,Q.jsxs)(he,{children:[Ke,Ye]}),t[69]=Ke,t[70]=Ye,t[71]=Xe):Xe=t[71];let Ze;t[72]!==Me||t[73]!==le||t[74]!==$||t[75]!==Ge||t[76]!==Xe?(Ze=(0,Q.jsxs)(Me,{className:`sm:max-w-lg`,onKeyDown:le,children:[$,Ge,Xe]}),t[72]=Me,t[73]=le,t[74]=$,t[75]=Ge,t[76]=Xe,t[77]=Ze):Ze=t[77];let Qe;return t[78]!==je||t[79]!==r||t[80]!==n||t[81]!==Ze?(Qe=(0,Q.jsx)(je,{open:n,onOpenChange:r,children:Ze}),t[78]=je,t[79]=r,t[80]=n,t[81]=Ze,t[82]=Qe):Qe=t[82],Qe}function Ee(e){return!e}function De(e,t){let n=t===void 0?50:t;if(e.length<=n)return e;let r=e.split(/[/\\]/);return r.length<=2?e:`.../`+r.slice(-2).join(`/`)}function Oe(e){return Math.max(e-1,0)}function ke(e){return e.type===`directory`}function Ae(e){let t=(0,Ce.c)(67),{workspaces:n,activeWorkspace:r,onSelectWorkspace:i,onCreateVirtualWorkspace:a,onCreatePhysicalWorkspace:c,isWorkspaceFavorited:l,onToggleFavorite:u,onDeleteWorkspace:d,onRenameWorkspace:f,sdkClient:p}=e,[m,h]=(0,Y.useState)(!1),[g,_]=(0,Y.useState)(!1),[y,b]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(null),[C,te]=(0,Y.useState)(``),T=(0,Y.useRef)(null),E,D;t[0]===x?(E=t[1],D=t[2]):(E=()=>{x&&T.current&&(T.current.focus(),T.current.select())},D=[x],t[0]=x,t[1]=E,t[2]=D),(0,Y.useEffect)(E,D);let O;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{te(e.name),S(e.id)},t[3]=O):O=t[3];let ae=O,k;t[4]!==f||t[5]!==C||t[6]!==x?(k=()=>{let e=C.trim();e&&x&&f(x,e),S(null)},t[4]=f,t[5]=C,t[6]=x,t[7]=k):k=t[7];let A=k,j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>{S(null)},t[8]=j):j=t[8];let se=j,M;t[9]===r?.isVirtual?M=t[10]:(M=r?.isVirtual?(0,Q.jsx)(I,{className:`size-4 flex-shrink-0 text-muted-foreground`}):(0,Q.jsx)(w,{className:`size-4 flex-shrink-0 text-muted-foreground`}),t[9]=r?.isVirtual,t[10]=M);let N=r?.name||`Select workspace`,P;t[11]===N?P=t[12]:(P=(0,Q.jsx)(`span`,{className:`truncate`,children:N}),t[11]=N,t[12]=P);let F;t[13]!==M||t[14]!==P?(F=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 overflow-hidden`,children:[M,P]}),t[13]=M,t[14]=P,t[15]=F):F=t[15];let ce;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,Q.jsx)(U,{className:`ml-auto size-4 shrink-0 opacity-50`}),t[16]=ce):ce=t[16];let L;t[17]!==m||t[18]!==F?(L=(0,Q.jsx)(V,{asChild:!0,children:(0,Q.jsxs)(me,{variant:`outline`,role:`combobox`,"aria-expanded":m,"aria-label":`Select workspace`,className:`w-full justify-between h-9`,children:[F,ce]})}),t[17]=m,t[18]=F,t[19]=L):L=t[19];let G;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Q.jsx)(z,{placeholder:`Search workspace...`}),t[20]=G):G=t[20];let de;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,Q.jsx)(W,{children:`No workspace found.`}),t[21]=de):de=t[21];let he;t[22]!==r?.id||t[23]!==A||t[24]!==l||t[25]!==i||t[26]!==u||t[27]!==C||t[28]!==x||t[29]!==n?(he=n.map(e=>(0,Q.jsxs)(H,{showCheck:!1,onSelect:()=>{x!==e.id&&(i(e),h(!1))},children:[(0,Q.jsx)(`div`,{className:`flex-1 min-w-0 flex items-center gap-2`,children:x===e.id?(0,Q.jsx)(`input`,{ref:T,type:`text`,value:C,onChange:e=>te(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),A()):e.key===`Escape`?(e.preventDefault(),se()):[`ArrowUp`,`ArrowDown`].includes(e.key)&&e.stopPropagation()},onBlur:A,onClick:Me,className:`flex-1 min-w-0 h-6 px-1 text-sm bg-background border border-input rounded focus:outline-none focus:ring-2 focus:ring-ring`}):(0,Q.jsxs)(Q.Fragment,{children:[e.isVirtual?(0,Q.jsx)(I,{className:`size-4 flex-shrink-0 text-muted-foreground`}):(0,Q.jsx)(w,{className:`size-4 flex-shrink-0 text-muted-foreground`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.name})]})}),(0,Q.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[(0,Q.jsx)(`button`,{className:`p-1 rounded hover:bg-secondary transition-colors`,onClick:t=>{t.stopPropagation(),u(e.id,e.name)},title:l(e.id)?`Remove from favorites`:`Add to favorites`,children:l(e.id)?(0,Q.jsx)(v,{className:`size-4 fill-primary text-primary`}):(0,Q.jsx)(v,{className:`size-4 text-muted-foreground`})}),(0,Q.jsx)(ee,{className:pe(`size-4`,r?.id===e.id?`opacity-100`:`opacity-0`)}),(0,Q.jsxs)(ne,{children:[(0,Q.jsx)(ie,{asChild:!0,children:(0,Q.jsxs)(`button`,{className:`p-1 rounded hover:bg-secondary transition-colors`,onClick:je,children:[(0,Q.jsx)(s,{className:`size-4`}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Workspace actions`})]})}),(0,Q.jsxs)(oe,{align:`end`,children:[(0,Q.jsxs)(re,{onClick:t=>{t.stopPropagation(),ae(e)},children:[(0,Q.jsx)(o,{className:`size-4`}),`Rename`]}),(0,Q.jsxs)(re,{onClick:t=>{t.stopPropagation(),b(e)},className:`text-destructive focus:text-destructive`,children:[(0,Q.jsx)(fe,{className:`size-4`}),`Delete`]})]})]})]})]},e.id)),t[22]=r?.id,t[23]=A,t[24]=l,t[25]=i,t[26]=u,t[27]=C,t[28]=x,t[29]=n,t[30]=he):he=t[30];let ge;t[31]===he?ge=t[32]:(ge=(0,Q.jsx)(q,{heading:`Workspaces`,children:he}),t[31]=he,t[32]=ge);let _e;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,Q.jsx)(B,{}),t[33]=_e):_e=t[33];let ve;t[34]===a?ve=t[35]:(ve=()=>{a(),h(!1)},t[34]=a,t[35]=ve);let ye;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,Q.jsx)(J,{className:`size-4`,"data-icon":`inline-start`}),t[36]=ye):ye=t[36];let xe;t[37]===ve?xe=t[38]:(xe=(0,Q.jsxs)(H,{onSelect:ve,children:[ye,`Create virtual workspace`]}),t[37]=ve,t[38]=xe);let Se;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Q.jsxs)(H,{onSelect:()=>{h(!1),_(!0)},children:[(0,Q.jsx)(w,{className:`size-4`,"data-icon":`inline-start`}),`Add existing folder`]}),t[39]=Se):Se=t[39];let X;t[40]===xe?X=t[41]:(X=(0,Q.jsxs)(q,{children:[xe,Se]}),t[40]=xe,t[41]=X);let Z;t[42]!==ge||t[43]!==X?(Z=(0,Q.jsx)(K,{className:`w-[240px] p-0 max-h-[80vh]`,children:(0,Q.jsxs)(R,{children:[G,(0,Q.jsxs)(ue,{className:`max-h-[50vh] overflow-y-auto`,children:[de,ge,_e,X]})]})}),t[42]=ge,t[43]=X,t[44]=Z):Z=t[44];let we;t[45]!==m||t[46]!==L||t[47]!==Z?(we=(0,Q.jsxs)(le,{open:m,onOpenChange:h,children:[L,Z]}),t[45]=m,t[46]=L,t[47]=Z,t[48]=we):we=t[48];let Ee;t[49]===c?Ee=t[50]:(Ee=e=>{c(e),_(!1)},t[49]=c,t[50]=Ee);let De;t[51]!==p||t[52]!==g||t[53]!==Ee?(De=(0,Q.jsx)(Te,{open:g,onOpenChange:_,onSelect:Ee,title:`Select Workspace Folder`,sdkClient:p}),t[51]=p,t[52]=g,t[53]=Ee,t[54]=De):De=t[54];let Oe=y!==null,ke;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(ke=e=>!e&&b(null),t[55]=ke):ke=t[55];let Ae=y?`Are you sure you want to delete "${y.name}"? This will permanently remove the workspace and all associated Jean data, including sessions, messages, and temporary files. The actual files in "${y.name}" on disk will not be deleted.`:``,$;t[56]!==d||t[57]!==y?($=()=>{y&&(d(y.id),b(null))},t[56]=d,t[57]=y,t[58]=$):$=t[58];let Ne;t[59]!==Oe||t[60]!==Ae||t[61]!==$?(Ne=(0,Q.jsx)(be,{open:Oe,onOpenChange:ke,title:`Delete Workspace`,description:Ae,confirmLabel:`Delete`,variant:`destructive`,onConfirm:$}),t[59]=Oe,t[60]=Ae,t[61]=$,t[62]=Ne):Ne=t[62];let Pe;return t[63]!==we||t[64]!==De||t[65]!==Ne?(Pe=(0,Q.jsxs)(Q.Fragment,{children:[we,De,Ne]}),t[63]=we,t[64]=De,t[65]=Ne,t[66]=Pe):Pe=t[66],Pe}function je(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function $(e){let t=(0,Ce.c)(56),{activeSessions:n,archivedSessions:r,childrenMap:i,sessionDerivedValues:a,currentSessionId:o,onResumeSession:c,onCloseSession:l,onReopenSession:d,onDeleteSession:f,onRenameSession:p,onBulkCloseSessions:_,onBulkDeleteSessions:v}=e,[y,b]=(0,Y.useState)(!1),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=new Set,t[0]=x):x=t[0];let[S,w]=(0,Y.useState)(x),[ee,te]=(0,Y.useState)(!1),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>{w(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[1]=T):T=t[1];let D=T,A;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{b(Le),w(new Set)},t[2]=A):A=t[2];let j=A,M;t[3]===n?M=t[4]:(M=()=>{w(new Set(n.map(Ie)))},t[3]=n,t[4]=M);let N=M,P;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{w(new Set)},t[5]=P):P=t[5];let ce=P,I;t[6]!==_||t[7]!==S?(I=()=>{S.size>0&&(_(S),w(new Set),b(!1))},t[6]=_,t[7]=S,t[8]=I):I=t[8];let R=I,z;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>{b(!1),w(new Set)},t[9]=z):z=t[9];let B=z,V;t[10]!==r||t[11]!==v?(V=()=>{let e=new Set(r.map(Fe));e.size>0&&v(e),te(!1)},t[10]=r,t[11]=v,t[12]=V):V=t[12];let H=V,U,W;t[13]===y?(U=t[14],W=t[15]):(W=()=>{if(!y)return;let e=e=>{e.key===`Escape`&&B()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},U=[y,B],t[13]=y,t[14]=U,t[15]=W),(0,Y.useEffect)(W,U);let G;t[16]!==n||t[17]!==i||t[18]!==o||t[19]!==l||t[20]!==f||t[21]!==p||t[22]!==d||t[23]!==c||t[24]!==N||t[25]!==S||t[26]!==y||t[27]!==a?(G=(0,Q.jsx)(O,{defaultOpen:!0,className:`group/collapsible`,children:(0,Q.jsxs)(u,{children:[(0,Q.jsx)(g,{asChild:!0,children:(0,Q.jsx)(E,{asChild:!0,children:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(C,{className:`size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`}),`Active`]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[y&&(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:S.size>0?(0,Q.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),S.size===n.length?ce():N()},className:`hover:underline cursor-pointer`,children:S.size===n.length?`Deselect all`:`Select all`}):(0,Q.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),N()},className:`hover:underline cursor-pointer`,children:`Select all`})}),(0,Q.jsx)(k,{variant:`secondary`,children:n.length}),(0,Q.jsxs)(ne,{children:[(0,Q.jsx)(ie,{asChild:!0,children:(0,Q.jsx)(`button`,{type:`button`,onClick:Pe,className:`p-1 rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors`,title:`Session actions`,children:(0,Q.jsx)(s,{className:`size-4`})})}),(0,Q.jsx)(oe,{align:`end`,className:`min-w-48`,children:y?(0,Q.jsxs)(re,{onClick:e=>{e.stopPropagation(),B()},children:[(0,Q.jsx)(de,{className:`size-4`}),`Cancel selection`]}):(0,Q.jsxs)(re,{onClick:e=>{e.stopPropagation(),j()},children:[(0,Q.jsx)(F,{className:`size-4`}),`Select to archive`]})})]})]})]})})}),(0,Q.jsx)(ae,{children:(0,Q.jsx)(h,{children:(0,Q.jsx)(m,{children:n.map(e=>(0,Q.jsx)(L,{session:e,childrenMap:i,sessionDerivedValues:a,isActive:o===e.id,currentSessionId:o,onResumeSession:c,onCloseSession:l,onReopenSession:d,onDeleteSession:f,onRename:p,selectionMode:y,selected:S.has(e.id),onToggleSelect:D},e.id))})})})]})}),t[16]=n,t[17]=i,t[18]=o,t[19]=l,t[20]=f,t[21]=p,t[22]=d,t[23]=c,t[24]=N,t[25]=S,t[26]=y,t[27]=a,t[28]=G):G=t[28];let K;t[29]!==r||t[30]!==i||t[31]!==o||t[32]!==l||t[33]!==f||t[34]!==p||t[35]!==d||t[36]!==c||t[37]!==a?(K=r.length>0&&(0,Q.jsx)(O,{defaultOpen:!0,className:`group/collapsible`,children:(0,Q.jsxs)(u,{children:[(0,Q.jsx)(g,{asChild:!0,children:(0,Q.jsx)(E,{asChild:!0,children:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(C,{className:`size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`}),`Archived`]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(k,{variant:`secondary`,children:r.length}),(0,Q.jsxs)(ne,{children:[(0,Q.jsx)(ie,{asChild:!0,children:(0,Q.jsx)(`button`,{type:`button`,onClick:Ne,className:`p-1 rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors`,title:`Archived actions`,children:(0,Q.jsx)(s,{className:`size-4`})})}),(0,Q.jsx)(oe,{align:`end`,className:`min-w-48`,children:(0,Q.jsxs)(re,{onClick:e=>{e.stopPropagation(),te(!0)},className:`text-destructive focus:text-destructive`,children:[(0,Q.jsx)(fe,{className:`size-4`}),`Delete all`]})})]})]})]})})}),(0,Q.jsx)(ae,{children:(0,Q.jsx)(h,{children:(0,Q.jsx)(m,{children:r.map(e=>(0,Q.jsx)(L,{session:e,childrenMap:i,sessionDerivedValues:a,isActive:o===e.id,currentSessionId:o,onResumeSession:c,onCloseSession:l,onReopenSession:d,onDeleteSession:f,onRename:p},e.id))})})})]})}),t[29]=r,t[30]=i,t[31]=o,t[32]=l,t[33]=f,t[34]=p,t[35]=d,t[36]=c,t[37]=a,t[38]=K):K=t[38];let q;t[39]!==n.length||t[40]!==r.length?(q=n.length===0&&r.length===0&&(0,Q.jsxs)(`div`,{className:`p-4 text-center text-sm text-muted-foreground`,children:[`No sessions yet.`,(0,Q.jsx)(`br`,{}),`Start a new chat to begin.`]}),t[39]=n.length,t[40]=r.length,t[41]=q):q=t[41];let le;t[42]!==R||t[43]!==S.size||t[44]!==y?(le=y&&S.size>0&&(0,Q.jsxs)(`div`,{className:`sticky bottom-0 bg-sidebar border-t px-2 py-1.5 flex items-center justify-between gap-2`,children:[(0,Q.jsxs)(`span`,{className:`text-xs text-muted-foreground truncate min-w-0`,children:[S.size,` selected`]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,Q.jsx)(me,{variant:`outline`,size:`icon`,onClick:R,title:`Archive`,className:`size-7`,children:(0,Q.jsx)(se,{className:`size-4`})}),(0,Q.jsx)(me,{variant:`ghost`,size:`icon`,onClick:B,title:`Cancel`,className:`size-7`,children:(0,Q.jsx)(de,{className:`size-4`})})]})]}),t[42]=R,t[43]=S.size,t[44]=y,t[45]=le):le=t[45];let ue=`This will permanently delete ${r.length} archived session${r.length===1?``:`s`}. This action cannot be undone.`,J;t[46]!==ee||t[47]!==H||t[48]!==ue?(J=(0,Q.jsx)(be,{open:ee,onOpenChange:te,title:`Delete all archived sessions?`,description:ue,confirmLabel:`Delete all`,variant:`destructive`,onConfirm:H}),t[46]=ee,t[47]=H,t[48]=ue,t[49]=J):J=t[49];let pe;return t[50]!==G||t[51]!==K||t[52]!==q||t[53]!==le||t[54]!==J?(pe=(0,Q.jsxs)(Q.Fragment,{children:[G,K,q,le,J]}),t[50]=G,t[51]=K,t[52]=q,t[53]=le,t[54]=J,t[55]=pe):pe=t[55],pe}function Ne(e){return e.stopPropagation()}function Pe(e){return e.stopPropagation()}function Fe(e){return e.id}function Ie(e){return e.id}function Le(e){return!e}function Re(){let e=(0,Ce.c)(61),t=te(),n=P(),{sidebarRef:r,chatInputRef:o,terminalPanelRef:s}=S(),{sdkClient:c,primaryPreconfigs:l,createSession:u,resumeSession:h,closeSession:g,reopenSession:_,permanentlyDeleteSession:v,handleRenameSession:y,selectWorkspace:b,handleCreateVirtualWorkspace:x,handleCreatePhysicalWorkspace:C,deleteWorkspace:w,renameWorkspace:ee}=t,T=n.activeWorkspace?.id??null,ne;e[0]!==c||e[1]!==n.connected||e[2]!==T?(ne={sdkClient:c,workspaceId:T,connected:n.connected},e[0]=c,e[1]=n.connected,e[2]=T,e[3]=ne):ne=e[3],X(ne);let re=n.activeSessions,ie=n.archivedSessions,E;e[4]!==w||e[5]!==C||e[6]!==x||e[7]!==ee||e[8]!==c||e[9]!==b||e[10]!==n.activeWorkspace||e[11]!==n.handleToggleWorkspaceFavorite||e[12]!==n.isWorkspaceFavorited||e[13]!==n.workspaces?(E=i(`multiView`)&&(0,Q.jsx)(`div`,{className:`p-2 space-y-2`,children:(0,Q.jsx)(Ae,{workspaces:n.workspaces,activeWorkspace:n.activeWorkspace,onSelectWorkspace:b,onCreateVirtualWorkspace:x,onCreatePhysicalWorkspace:C,isWorkspaceFavorited:n.isWorkspaceFavorited,onToggleFavorite:n.handleToggleWorkspaceFavorite,onDeleteWorkspace:w,onRenameWorkspace:ee,sdkClient:c})}),e[4]=w,e[5]=C,e[6]=x,e[7]=ee,e[8]=c,e[9]=b,e[10]=n.activeWorkspace,e[11]=n.handleToggleWorkspaceFavorite,e[12]=n.isWorkspaceFavorited,e[13]=n.workspaces,e[14]=E):E=e[14];let D;e[15]!==u||e[16]!==l[0]?.id?(D=()=>u(l[0]?.id),e[15]=u,e[16]=l[0]?.id,e[17]=D):D=e[17];let O=!n.connected,ae,oe;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,Q.jsx)(J,{className:`size-4`,"data-icon":`inline-start`}),oe=(0,Q.jsx)(`span`,{children:`New Chat`}),e[18]=ae,e[19]=oe):(ae=e[18],oe=e[19]);let k;e[20]!==D||e[21]!==O?(k=(0,Q.jsx)(m,{children:(0,Q.jsx)(p,{children:(0,Q.jsxs)(f,{onClick:D,disabled:O,className:`w-full`,children:[ae,oe]})})}),e[20]=D,e[21]=O,e[22]=k):k=e[22];let A;e[23]!==E||e[24]!==k?(A=(0,Q.jsxs)(d,{children:[E,k]}),e[23]=E,e[24]=k,e[25]=A):A=e[25];let j=A,se;e[26]===g?se=e[27]:(se=e=>{e.forEach(e=>g(e))},e[26]=g,e[27]=se);let F=se,I;e[28]===v?I=e[29]:(I=e=>{e.forEach(e=>v(e))},e[28]=v,e[29]=I);let L=I,R;e[30]!==re||e[31]!==ie||e[32]!==g||e[33]!==F||e[34]!==L||e[35]!==y||e[36]!==v||e[37]!==_||e[38]!==h||e[39]!==n.childrenMap||e[40]!==n.currentSessionId||e[41]!==n.sessionDerivedValues?(R=(0,Q.jsx)($,{activeSessions:re,archivedSessions:ie,childrenMap:n.childrenMap,sessionDerivedValues:n.sessionDerivedValues,currentSessionId:n.currentSessionId,onResumeSession:h,onCloseSession:g,onReopenSession:_,onDeleteSession:v,onRenameSession:y,onBulkCloseSessions:F,onBulkDeleteSessions:L}),e[30]=re,e[31]=ie,e[32]=g,e[33]=F,e[34]=L,e[35]=y,e[36]=v,e[37]=_,e[38]=h,e[39]=n.childrenMap,e[40]=n.currentSessionId,e[41]=n.sessionDerivedValues,e[42]=R):R=e[42];let z=R,B;e[43]!==o||e[44]!==n.currentSessionId?(B=()=>{n.currentSessionId&&o.current?.focus()},e[43]=o,e[44]=n.currentSessionId,e[45]=B):B=e[45];let V;e[46]!==z||e[47]!==n.currentSessionId||e[48]!==j||e[49]!==r||e[50]!==B?(V=(0,Q.jsx)(M,{ref:r,header:j,currentSessionId:n.currentSessionId,onEscape:B,children:z}),e[46]=z,e[47]=n.currentSessionId,e[48]=j,e[49]=r,e[50]=B,e[51]=V):V=e[51];let H;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(H=i(`multiView`)?{paddingTop:`0.5rem`,paddingBottom:`0.5rem`}:void 0,e[52]=H):H=e[52];let U,W;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(N,{}),W=(0,Q.jsx)(a,{}),e[53]=U,e[54]=W):(U=e[53],W=e[54]);let G;e[55]!==c||e[56]!==s?(G=(0,Q.jsx)(`main`,{className:i(`multiView`)?`flex-1 flex flex-col overflow-hidden min-h-0 p-2`:`flex-1 flex flex-col overflow-hidden min-h-0`,style:H,children:(0,Q.jsxs)(`div`,{className:i(`multiView`)?`flex flex-1 flex-col overflow-hidden min-h-0 rounded-xl bg-background shadow-sm ring-1 ring-border`:`flex flex-1 flex-col overflow-hidden min-h-0 bg-background`,children:[U,W,(0,Q.jsx)(ce,{sdkClient:c,terminalPanelRef:s})]})}),e[55]=c,e[56]=s,e[57]=G):G=e[57];let K;return e[58]!==V||e[59]!==G?(K=(0,Q.jsxs)(Q.Fragment,{children:[V,G]}),e[58]=V,e[59]=G,e[60]=K):K=e[60],K}var ze=Re;export{ze as component};
|
package/dist/favicon.ico
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
6
7
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
7
8
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
8
|
-
<title>
|
|
9
|
+
<title>Jean2</title>
|
|
9
10
|
<script>
|
|
10
11
|
(function() {
|
|
11
12
|
var settings = null;
|
|
@@ -38,20 +39,19 @@
|
|
|
38
39
|
root.classList.add(mode, scheme);
|
|
39
40
|
})();
|
|
40
41
|
</script>
|
|
41
|
-
<script type="module" crossorigin src="
|
|
42
|
-
<link rel="modulepreload" crossorigin href="
|
|
43
|
-
<link rel="modulepreload" crossorigin href="
|
|
44
|
-
<link rel="modulepreload" crossorigin href="
|
|
45
|
-
<link rel="modulepreload" crossorigin href="
|
|
46
|
-
<link rel="modulepreload" crossorigin href="
|
|
47
|
-
<link rel="modulepreload" crossorigin href="
|
|
48
|
-
<link rel="modulepreload" crossorigin href="
|
|
49
|
-
<link rel="modulepreload" crossorigin href="
|
|
50
|
-
<link rel="modulepreload" crossorigin href="
|
|
51
|
-
<link rel="modulepreload" crossorigin href="
|
|
52
|
-
<link rel="
|
|
53
|
-
|
|
54
|
-
</head>
|
|
42
|
+
<script type="module" crossorigin src="/assets/index--7m9Oc9A.js"></script>
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-CoWo_Ex4.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/assets/useRouter-uprza1yo.js">
|
|
45
|
+
<link rel="modulepreload" crossorigin href="/assets/ServerContext-n3DiePRf.js">
|
|
46
|
+
<link rel="modulepreload" crossorigin href="/assets/serverDataStore-BgmQAtvJ.js">
|
|
47
|
+
<link rel="modulepreload" crossorigin href="/assets/Match-gih8rYty.js">
|
|
48
|
+
<link rel="modulepreload" crossorigin href="/assets/mutation-CEN9YF7g.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="/assets/http-namespace-B-QCE6M-.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="/assets/useNavigate-CEsW1NjX.js">
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/react-dom-lAXwbrYv.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/ThemeProvider-DdrFTFeC.js">
|
|
53
|
+
<link rel="stylesheet" crossorigin href="/assets/index-IGz5q8Ew.css">
|
|
54
|
+
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
55
55
|
<body>
|
|
56
56
|
<div id="root"></div>
|
|
57
57
|
</body>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"Jean2","short_name":"Jean2","description":"AI Agent Client","start_url":"/","display":"standalone","background_color":"#1c1c1c","theme_color":"#1c1c1c","lang":"en","scope":"/","display_override":["window-controls-overlay","standalone"],"orientation":"any","categories":["productivity","utilities"],"icons":[{"src":"/favicon.ico","sizes":"48x48","type":"image/x-icon"},{"src":"/icon-192.png","sizes":"192x192","type":"image/png","purpose":"any maskable"},{"src":"/icon-512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"},{"src":"/apple-touch-icon.png","sizes":"180x180","type":"image/png"}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/sw.js', { scope: '/' })})}
|
package/dist/sw.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).href,e[i]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()}).then(()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s}));self.define=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let t={};const u=s=>i(s,r),o={module:{uri:r},exports:t,require:u};e[r]=Promise.all(n.map(s=>o[s]||u(s))).then(s=>(l(...s),t))}}define(["./workbox-6829fd8d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"54bc701c81f7ff474b557c2a4afb6206"},{url:"icon-512.png",revision:"858fd3102a679d90bf7fb6e0c852ea9a"},{url:"icon-192.png",revision:"7a732a19b758b4bb336850bf9f225034"},{url:"favicon.ico",revision:"4389bb108ec3c91f717815a4e519e8ac"},{url:"apple-touch-icon.png",revision:"a2c89afb6685520dfc7e6eb307529d2a"},{url:"assets/workspace-Bdk9IcD9.js",revision:null},{url:"assets/workspace-BVkLHZQ5.js",revision:null},{url:"assets/useRouter-uprza1yo.js",revision:null},{url:"assets/useNavigate-CEsW1NjX.js",revision:null},{url:"assets/triangle-alert-Btuzvl61.js",revision:null},{url:"assets/sidebar-D6wWlASb.js",revision:null},{url:"assets/serverDataStore-BgmQAtvJ.js",revision:null},{url:"assets/routes-sXFQryK_.js",revision:null},{url:"assets/refresh-cw-CPVfqmA7.js",revision:null},{url:"assets/react-dom-lAXwbrYv.js",revision:null},{url:"assets/queries-BALgkFp9.js",revision:null},{url:"assets/popover-DY0LfKS_.js",revision:null},{url:"assets/overview-CASGrlAu.js",revision:null},{url:"assets/overview-C7qQiftE.js",revision:null},{url:"assets/mutation-CEN9YF7g.js",revision:null},{url:"assets/jsx-runtime-CoWo_Ex4.js",revision:null},{url:"assets/index-IGz5q8Ew.css",revision:null},{url:"assets/index--7m9Oc9A.js",revision:null},{url:"assets/http-namespace-B-QCE6M-.js",revision:null},{url:"assets/geist-latin-wght-normal-Dm3htQBi.woff2",revision:null},{url:"assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2",revision:null},{url:"assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2",revision:null},{url:"assets/dialog-kEem1WlV.js",revision:null},{url:"assets/createLucideIcon-B0_U-ptG.js",revision:null},{url:"assets/confirmation-dialog-cXwbnO0N.js",revision:null},{url:"assets/chat-permission-BltPnMpz.mp3",revision:null},{url:"assets/chat-finish-Kb8mnIhV.mp3",revision:null},{url:"assets/button-DiGKmetm.js",revision:null},{url:"assets/badge-CKFZbef9.js",revision:null},{url:"assets/arrow-left-CMP-CUyJ.js",revision:null},{url:"assets/archive-D-g6oXq-.js",revision:null},{url:"assets/alert-CXqGI5X4.js",revision:null},{url:"assets/add-server-Bp8Rj07L.js",revision:null},{url:"assets/_sessionId-BjRjsXiw.js",revision:null},{url:"assets/_sessionId-BSnjaXXA.js",revision:null},{url:"assets/_serverId-CJyl4WQ0.js",revision:null},{url:"assets/_serverId-AWAz7ZKp.js",revision:null},{url:"assets/ThemeProvider-DdrFTFeC.js",revision:null},{url:"assets/SessionMenuButton-kHJ-D0s7.css",revision:null},{url:"assets/SessionMenuButton-DmOiTz4L.js",revision:null},{url:"assets/SessionContent-8VSp9e_H.js",revision:null},{url:"assets/ServerContext-n3DiePRf.js",revision:null},{url:"assets/Match-gih8rYty.js",revision:null},{url:"apple-touch-icon.png",revision:"a2c89afb6685520dfc7e6eb307529d2a"},{url:"favicon.ico",revision:"4389bb108ec3c91f717815a4e519e8ac"},{url:"icon-192.png",revision:"7a732a19b758b4bb336850bf9f225034"},{url:"icon-512.png",revision:"858fd3102a679d90bf7fb6e0c852ea9a"},{url:"manifest.webmanifest",revision:"e01c9a3b2365d71c2061cffe57a6103c"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/api\//,/^\/ws/]})),s.registerRoute(({request:s})=>"script"===s.destination||"style"===s.destination,new s.CacheFirst({cacheName:"static-assets",plugins:[new s.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3})]}),"GET"),s.registerRoute(({request:s})=>"font"===s.destination||"image"===s.destination,new s.CacheFirst({cacheName:"static-media",plugins:[new s.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3})]}),"GET"),s.registerRoute(({request:s})=>"document"===s.destination,new s.NetworkFirst({cacheName:"html-cache",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:86400})]}),"GET")});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define(["exports"],function(t){"use strict";try{self["workbox:core:7.4.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.4.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=r&&r.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:i})}catch(t){c=Promise.reject(t)}const h=r&&r.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const a=r.match({url:t,sameOrigin:e,request:s,event:n});if(a)return i=a,(Array.isArray(i)&&0===i.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new i(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)a=new r(t,e,n);else if("function"==typeof t)a=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter(t=>t&&t.length>0).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t){t.then(()=>{})}const p=new Set;function y(){return y=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)({}).hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},y.apply(null,arguments)}let m,g;const R=new WeakMap,v=new WeakMap,b=new WeakMap,q=new WeakMap,D=new WeakMap;let U={get(t,e,s){if(t instanceof IDBTransaction){if("done"===e)return v.get(t);if("objectStoreNames"===e)return t.objectStoreNames||b.get(t);if("store"===e)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return L(t[e])},set:(t,e,s)=>(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function x(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(g||(g=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(E(this),e),L(R.get(this))}:function(...e){return L(t.apply(E(this),e))}:function(e,...s){const n=t.call(E(this),e,...s);return b.set(n,e.sort?e.sort():[e]),L(n)}}function I(t){return"function"==typeof t?x(t):(t instanceof IDBTransaction&&function(t){if(v.has(t))return;const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",r),t.removeEventListener("abort",r)},i=()=>{e(),n()},r=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",i),t.addEventListener("error",r),t.addEventListener("abort",r)});v.set(t,e)}(t),e=t,(m||(m=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(t,U):t);var e}function L(t){if(t instanceof IDBRequest)return function(t){const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",r)},i=()=>{e(L(t.result)),n()},r=()=>{s(t.error),n()};t.addEventListener("success",i),t.addEventListener("error",r)});return e.then(e=>{e instanceof IDBCursor&&R.set(e,t)}).catch(()=>{}),D.set(e,t),e}(t);if(q.has(t))return q.get(t);const e=I(t);return e!==t&&(q.set(t,e),D.set(e,t)),e}const E=t=>D.get(t);const C=["get","getKey","getAll","getAllKeys","count"],N=["put","add","delete","clear"],O=new Map;function k(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(O.get(e))return O.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,i=N.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!i&&!C.includes(s))return;const r=async function(t,...e){const r=this.transaction(t,i?"readwrite":"readonly");let a=r.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),i&&r.done]))[0]};return O.set(e,r),r}U=(t=>y({},t,{get:(e,s,n)=>k(e,s)||t.get(e,s,n),has:(e,s)=>!!k(e,s)||t.has(e,s)}))(U);try{self["workbox:expiration:7.4.0"]&&_()}catch(t){}const B="cache-entries",T=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class P{constructor(t){this.h=null,this.u=t}l(t){const e=t.createObjectStore(B,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}p(t){this.l(t),this.u&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",t=>e(t.oldVersion,t)),L(s).then(()=>{})}(this.u)}async setTimestamp(t,e){const s={url:t=T(t),timestamp:e,cacheName:this.u,id:this.m(t)},n=(await this.getDb()).transaction(B,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(B,this.m(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(B).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;n;){const s=n.value;s.cacheName===this.u&&(t&&s.timestamp<t||e&&r>=e?i.push(n.value):r++),n=await n.continue()}const a=[];for(const t of i)await s.delete(B,t.id),a.push(t.url);return a}m(t){return this.u+"|"+T(t)}async getDb(){return this.h||(this.h=await function(t,e,{blocked:s,upgrade:n,blocking:i,terminated:r}={}){const a=indexedDB.open(t,e),o=L(a);return n&&a.addEventListener("upgradeneeded",t=>{n(L(a.result),t.oldVersion,t.newVersion,L(a.transaction),t)}),s&&a.addEventListener("blocked",t=>s(t.oldVersion,t.newVersion,t)),o.then(t=>{r&&t.addEventListener("close",()=>r()),i&&t.addEventListener("versionchange",t=>i(t.oldVersion,t.newVersion,t))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this.p.bind(this)})),this.h}}class M{constructor(t,e={}){this.R=!1,this.v=!1,this.q=e.maxEntries,this.D=e.maxAgeSeconds,this.U=e.matchOptions,this.u=t,this._=new P(t)}async expireEntries(){if(this.R)return void(this.v=!0);this.R=!0;const t=this.D?Date.now()-1e3*this.D:0,e=await this._.expireEntries(t,this.q),s=await self.caches.open(this.u);for(const t of e)await s.delete(t,this.U);this.R=!1,this.v&&(this.v=!1,d(this.expireEntries()))}async updateTimestamp(t){await this._.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.D){const e=await this._.getTimestamp(t),s=Date.now()-1e3*this.D;return void 0===e||e<s}return!1}async delete(){this.v=!1,await this._.expireEntries(1/0)}}function W(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class j{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}try{self["workbox:strategies:7.4.0"]&&_()}catch(t){}function S(t){return"string"==typeof t?new Request(t):t}class K{constructor(t,e){this.I={},Object.assign(this,e),this.event=e.event,this.L=t,this.C=new j,this.N=[],this.O=[...t.plugins],this.k=new Map;for(const t of this.O)this.k.set(t,{});this.event.waitUntil(this.C.promise)}async fetch(t){const{event:e}=this;let n=S(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.L.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=S(t);let s;const{cacheName:n,matchOptions:i}=this.L,r=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=S(t);var i;await(i=0,new Promise(t=>setTimeout(t,i)));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=r.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.B(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.L,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=W(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,r);for(const e of a)if(i===W(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of p)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.I[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=S(await t({mode:e,request:n,event:this.event,params:this.params}));this.I[s]=n}return this.I[s]}hasCallback(t){for(const e of this.L.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.L.plugins)if("function"==typeof e[t]){const s=this.k.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.N.push(t),t}async doneWaiting(){for(;this.N.length;){const t=this.N.splice(0),e=(await Promise.allSettled(t)).find(t=>"rejected"===t.status);if(e)throw e.reason}}destroy(){this.C.resolve(null)}async B(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class A{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new K(this,{event:e,request:s,params:n}),r=this.T(i,s,e);return[r,this.P(r,i,s,e)]}async T(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this.M(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async P(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}const F={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};function H(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.4.0"]&&_()}catch(t){}function $(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class G{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class V{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.W.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.W=t}}let J,Q;async function z(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},a=function(){if(void 0===J){const t=new Response("");if("body"in t)try{new Response(t.body),J=!0}catch(t){J=!1}J=!1}return J}()?i.body:await i.blob();return new Response(a,r)}class X extends A{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.j=!1!==t.fallbackToNetwork,this.plugins.push(X.copyRedirectedCacheableResponsesPlugin)}async M(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.S(t,e):await this.K(t,e))}async K(t,e){let n;const i=e.params||{};if(!this.j)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,a=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.A(),await e.cachePut(t,n.clone()))}return n}async S(t,e){this.A();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}A(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==X.copyRedirectedCacheableResponsesPlugin&&(n===X.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(X.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}X.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},X.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await z(t):t};class Y{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.F=new Map,this.H=new Map,this.$=new Map,this.L=new X({cacheName:f(t),plugins:[...e,new V({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.L}precache(t){this.addToCacheList(t),this.G||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.G=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=$(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.F.has(i)&&this.F.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.F.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.$.has(t)&&this.$.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.$.set(t,n.integrity)}if(this.F.set(i,t),this.H.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return H(t,async()=>{const e=new G;this.strategy.plugins.push(e);for(const[e,s]of this.F){const n=this.$.get(s),i=this.H.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}})}activate(t){return H(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.F.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this.F}getCachedURLs(){return[...this.F.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.F.get(e.href)}getIntegrityForCacheKey(t){return this.$.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}const Z=()=>(Q||(Q=new Y),Q);class tt extends i{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t}(r,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}},t.strategy)}}t.CacheFirst=class extends A{async M(t,e){let n,i=await e.cacheMatch(t);if(!i)try{i=await e.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!i)throw new s("no-response",{url:t.url,error:n});return i}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const i=this.V(n),r=this.J(s);d(r.expireEntries());const a=r.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return i?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.J(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.X=t,this.D=t.maxAgeSeconds,this.Y=new Map,t.purgeOnQuotaError&&function(t){p.add(t)}(()=>this.deleteCacheAndMetadata())}J(t){if(t===w())throw new s("expire-custom-caches-only");let e=this.Y.get(t);return e||(e=new M(t,this.X),this.Y.set(t,e)),e}V(t){if(!this.D)return!0;const e=this.Z(t);if(null===e)return!0;return e>=Date.now()-1e3*this.D}Z(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.Y)await self.caches.delete(t),await e.delete();this.Y=new Map}},t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super(t=>this.tt(t),t),this.et=e,this.st=s}tt({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.st)if(t.test(s))return!1;return!!this.et.some(t=>t.test(s))}},t.NetworkFirst=class extends A{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(F),this.nt=t.networkTimeoutSeconds||0}async M(t,e){const n=[],i=[];let r;if(this.nt){const{id:s,promise:a}=this.it({request:t,logs:n,handler:e});r=s,i.push(a)}const a=this.rt({timeoutId:r,request:t,logs:n,handler:e});i.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(i))||await a)());if(!o)throw new s("no-response",{url:t.url});return o}it({request:t,logs:e,handler:s}){let n;return{promise:new Promise(e=>{n=setTimeout(async()=>{e(await s.cacheMatch(t))},1e3*this.nt)}),id:n}}async rt({timeoutId:t,request:e,logs:s,handler:n}){let i,r;try{r=await n.fetchAndCachePut(e)}catch(t){t instanceof Error&&(i=t)}return t&&clearTimeout(t),!i&&r||(r=await n.cacheMatch(e)),r}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter(s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t);return await Promise.all(s.map(t=>self.caches.delete(t))),s})(e).then(t=>{}))})},t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.createHandlerBoundToURL=function(t){return Z().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){Z().precache(t)}(t),function(t){const e=Z();h(new tt(e,t))}(e)},t.registerRoute=h});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jean2/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Jean2 AI Agent Client - Run the Jean2 web UI locally via npx",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/
|
|
15
|
+
"url": "git+https://github.com/jean2ai/jean2",
|
|
16
16
|
"directory": "packages/client"
|
|
17
17
|
},
|
|
18
18
|
"bugs": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DZXZ41-q.js";import{r as i}from"./src-BALdofIU.js";var a=t(n(),1),o=a.use,s=typeof window<`u`?a.useLayoutEffect:a.useEffect;function c(e){let t=a.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function l(e,t,n={},r={}){a.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function u(e){let t=a.useRef(null);return a.useImperativeHandle(e,()=>t.current,[]),t}var d=r(),f={SERVERS:`jean2_servers`,QUICK_CONNECTIONS:`jean2_quick_connections`};function p(){try{let e=localStorage.getItem(f.SERVERS);return e?JSON.parse(e):[]}catch(e){return console.error(`Error reading saved servers from localStorage:`,e),[]}}function m(e){try{let t=p();t.push(e),localStorage.setItem(f.SERVERS,JSON.stringify(t))}catch(e){console.error(`Error saving server to localStorage:`,e)}}function h(e,t){try{let n=p(),r=n.findIndex(t=>t.id===e);if(r===-1){console.error(`Server not found:`,e);return}n[r]={...n[r],...t},localStorage.setItem(f.SERVERS,JSON.stringify(n))}catch(e){console.error(`Error updating server in localStorage:`,e)}}function g(e){try{let t=p().filter(t=>t.id!==e);localStorage.setItem(f.SERVERS,JSON.stringify(t));let n=_().filter(t=>t.serverId!==e);localStorage.setItem(f.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error(`Error deleting server from localStorage:`,e)}}function _(){try{let e=localStorage.getItem(f.QUICK_CONNECTIONS);return e?JSON.parse(e):[]}catch(e){return console.error(`Error reading quick connections from localStorage:`,e),[]}}function v(e){let t=_(),n=t.reduce((e,t)=>Math.max(e,t.order),-1),r={...e,id:crypto.randomUUID(),order:n+1};t.push(r);try{localStorage.setItem(f.QUICK_CONNECTIONS,JSON.stringify(t))}catch(e){console.error(`Error saving quick connection to localStorage:`,e)}return r}function y(e){try{let t=_().filter(t=>t.id!==e);localStorage.setItem(f.QUICK_CONNECTIONS,JSON.stringify(t))}catch(e){console.error(`Error removing quick connection from localStorage:`,e)}}function b(e){try{let t=_().filter(t=>t.workspaceId!==e);localStorage.setItem(f.QUICK_CONNECTIONS,JSON.stringify(t))}catch(e){console.error(`Error removing quick connections for workspace from localStorage:`,e)}}function x(e){try{let t=_(),n=new Map(t.map(e=>[e.id,e]));e.forEach((e,t)=>{let r=n.get(e);r&&(r.order=t)}),localStorage.setItem(f.QUICK_CONNECTIONS,JSON.stringify(t))}catch(e){console.error(`Error reordering quick connections in localStorage:`,e)}}function S(e){return e.length<12?e:`${e.slice(0,4)}...${e.slice(-4)}`}function C(e){let t=e.trim(),n=/^https:\/\//i.test(t),r=t.replace(/^(https?:\/\/|wss?:\/\/)/i,``);return r=r.replace(/\/+$/,``),n&&(r=`https://${r}`),r}var w=`localhost:8742`,T=2e3;async function E(e){try{var t,n;let r=new AbortController,i=setTimeout(()=>r.abort(),T),a=await fetch(`http://${w}/api/info`,{signal:e==null?r.signal:e});return clearTimeout(i),!a.ok||(t=(n=(await a.json()).features)==null?void 0:n.authentication)!=null&&t?{available:!1,url:w}:{available:!0,url:w}}catch{return{available:!1,url:w}}}async function D(e,t){let n=C(e),r;try{var a,o;let e=n.startsWith(`https`)?`https`:`http`,t=n.replace(/^https?:\/\//,``),i=await fetch(`${e}://${t}/api/info`);if(!i.ok)return{success:!1,error:`Server returned ${i.status}. Check the URL and try again.`};r=(a=(o=(await i.json()).features)==null?void 0:o.authentication)==null?!1:a}catch(e){return{success:!1,error:`Could not reach server: ${e instanceof Error?e.message:String(e)}`}}if(!r)return{success:!0,authEnabled:!1};if(!t)return{success:!1,authEnabled:!0,error:`This server requires an API token. Enable the token toggle and enter your token.`};try{if(!await i.verifyToken(n,t))return{success:!1,authEnabled:!0,error:`Invalid token. Check your API token and try again.`}}catch(e){return{success:!1,authEnabled:!0,error:`Could not verify token: ${e instanceof Error?e.message:String(e)}`}}return{success:!0,authEnabled:!0}}var O=e(),k=(0,a.createContext)(null),A=e=>{let t=(0,d.c)(22),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,o]=(0,a.useState)(r),s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=[],t[1]=s):s=t[1];let[c,l]=(0,a.useState)(s),[u,f]=(0,a.useState)(!1),S=(0,a.useRef)(!1),w,T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{let e=p(),t=_();o(e),l(t),f(!0)},T=[],t[2]=w,t[3]=T):(w=t[2],T=t[3]),(0,a.useEffect)(w,T);let D,A;t[4]!==u||t[5]!==i.length?(D=()=>{if(!u||S.current)return;if(i.length>0){S.current=!0;return}S.current=!0;let e=new AbortController;return E(e.signal).then(e=>{e.available&&(m({id:crypto.randomUUID(),name:`Home`,url:C(e.url),createdAt:new Date().toISOString()}),o(p()))}),()=>e.abort()},A=[u,i.length],t[4]=u,t[5]=i.length,t[6]=D,t[7]=A):(D=t[6],A=t[7]),(0,a.useEffect)(D,A);let j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(e,t,n)=>{let r=C(t),i={id:crypto.randomUUID(),name:e,url:r,...n?{token:n}:{},createdAt:new Date().toISOString()};return m(i),o(p()),i},t[8]=j):j=t[8];let M=j,N;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(N=(e,t)=>{h(e,{...t,...t.url&&{url:C(t.url)}}),o(p())},t[9]=N):N=t[9];let P=N,F;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{g(e),o(p()),l(_())},t[10]=F):F=t[10];let I=F,L;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(L=(e,t,n,r)=>{v({serverId:e,serverName:t,workspaceId:n,workspaceName:r}),l(_())},t[11]=L):L=t[11];let R=L,z;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{y(e),l(_())},t[12]=z):z=t[12];let B=z,V;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>{b(e),l(_())},t[13]=V):V=t[13];let H=V,U;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(U=e=>{x(e),l(_())},t[14]=U):U=t[14];let W=U,G;t[15]!==u||t[16]!==c||t[17]!==i?(G={servers:i,quickConnections:c,isHydrated:u,addServer:M,editServer:P,removeServer:I,addToQuickConnections:R,removeFromQuickConnections:B,removeFromQuickConnectionsByWorkspace:H,reorderQuick:W},t[15]=u,t[16]=c,t[17]=i,t[18]=G):G=t[18];let K=G,q;return t[19]!==n||t[20]!==K?(q=(0,O.jsx)(k.Provider,{value:K,children:n}),t[19]=n,t[20]=K,t[21]=q):q=t[21],q},j=()=>{let e=(0,a.useContext)(k);if(e===null)throw Error(`useServerContext must be used within a ServerProvider`);return e};export{C as a,u as c,c as d,S as i,l,j as n,p as o,D as r,o as s,A as t,s as u};
|