orqevio 1.0.0 → 1.0.1
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/dist/web/assets/{AccessKeyReveal-Dt2QpDUL.js → AccessKeyReveal-CQaxpNT4.js} +1 -1
- package/dist/web/assets/{AccessRows-DwPN9a5i.js → AccessRows-DUF0JEJN.js} +1 -1
- package/dist/web/assets/{ActivityList-Cp-ASwIJ.js → ActivityList--gWYDhUt.js} +1 -1
- package/dist/web/assets/{AgentsPage-DbtYLxZ8.js → AgentsPage-BmYCjLa_.js} +1 -1
- package/dist/web/assets/{Attachments-B5k6NQqz.js → Attachments-BFs-_VlC.js} +1 -1
- package/dist/web/assets/{Avatar-BiOOxxo5.js → Avatar-BM8oUZZw.js} +1 -1
- package/dist/web/assets/{BoardPage-j0HRFfQq.js → BoardPage-CixYMIX6.js} +1 -1
- package/dist/web/assets/{Button-DmRLgc5R.js → Button-Cdv5jCuw.js} +1 -1
- package/dist/web/assets/{CardItem-BosirFRg.js → CardItem-DzmuD8RI.js} +1 -1
- package/dist/web/assets/{Checkbox-qjaYUeKU.js → Checkbox-D7DQDOn_.js} +1 -1
- package/dist/web/assets/{ColorPicker-BGW0YwdU.js → ColorPicker-1A8lBK9k.js} +1 -1
- package/dist/web/assets/{ConsentPage-DPrRcdTA.js → ConsentPage-C_LzKZZB.js} +1 -1
- package/dist/web/assets/{CopyButton-CcB9JRw4.js → CopyButton-C-W1lxF3.js} +1 -1
- package/dist/web/assets/{DocPage-I84vK6gG.js → DocPage-hcgQ0MLZ.js} +1 -1
- package/dist/web/assets/{EmptyState-DGHRXEz0.js → EmptyState-DbuyD37d.js} +1 -1
- package/dist/web/assets/{Field-XXfffXGD.js → Field-Clm8umDd.js} +1 -1
- package/dist/web/assets/{HomePage-COyxQqEv.js → HomePage-DDDKEWXr.js} +1 -1
- package/dist/web/assets/{Menu-Ddmd9yXa.js → Menu-DX34x7kE.js} +1 -1
- package/dist/web/assets/{PageHeader-DR__ksSu.js → PageHeader-ClyiqS7h.js} +1 -1
- package/dist/web/assets/{Popover-ugNbKfXV.js → Popover-5Vvrqbgv.js} +1 -1
- package/dist/web/assets/{ProjectPage-DLBi--EJ.js → ProjectPage-amJ1RPBS.js} +1 -1
- package/dist/web/assets/{ProjectSettingsDialog-BjNnvZQQ.js → ProjectSettingsDialog-6QxmHLzs.js} +1 -1
- package/dist/web/assets/{Segmented-l92yoT4T.js → Segmented-BDMZD7nV.js} +1 -1
- package/dist/web/assets/{SettingsPage-C5fvTtKZ.js → SettingsPage-WsTJXDni.js} +1 -1
- package/dist/web/assets/{States-BDAsCueg.js → States-BL27BexV.js} +1 -1
- package/dist/web/assets/{TokenCard-qzOy0l_S.js → TokenCard-Rdie_fAK.js} +1 -1
- package/dist/web/assets/{Trans-BxWw0Vac.js → Trans-COFrPeA8.js} +1 -1
- package/dist/web/assets/{VaultPage-DDGskTMH.js → VaultPage-E1JRTpdj.js} +1 -1
- package/dist/web/assets/{actions-3DfosJmD.js → actions-CnbXVELu.js} +1 -1
- package/dist/web/assets/{activity-Cj_BOs0a.js → activity-pS7JJqPR.js} +1 -1
- package/dist/web/assets/{arrow-up-right-BYElAQBz.js → arrow-up-right-B1Q3GS2t.js} +1 -1
- package/dist/web/assets/auth-BINwoLLL.js +1 -0
- package/dist/web/assets/auth-ByK78s7m.js +1 -0
- package/dist/web/assets/auth-C58Nm5w2.js +1 -0
- package/dist/web/assets/auth-CWjUpxax.js +1 -0
- package/dist/web/assets/auth-CqESesWQ.js +1 -0
- package/dist/web/assets/auth-DXyQ1sR9.js +1 -0
- package/dist/web/assets/auth-SCXskweB.js +1 -0
- package/dist/web/assets/{bot-CTPVQq3S.js → bot-CWoAuwAC.js} +1 -1
- package/dist/web/assets/check-DCBjJEe-.js +1 -0
- package/dist/web/assets/{clock-BKa8l8aW.js → clock-gFOXe45w.js} +1 -1
- package/dist/web/assets/{download-z-34AzPm.js → download-DOUlwk6I.js} +1 -1
- package/dist/web/assets/errors-BGvYEtI3.js +1 -0
- package/dist/web/assets/errors-CZ1BX441.js +1 -0
- package/dist/web/assets/errors-D6cvqHzs.js +1 -0
- package/dist/web/assets/errors-DACTZxtE.js +1 -0
- package/dist/web/assets/errors-DJVH_VFT.js +1 -0
- package/dist/web/assets/errors-_k7icfYU.js +1 -0
- package/dist/web/assets/errors-y3K623sq.js +1 -0
- package/dist/web/assets/{eye-Gm43B6bU.js → eye-DgU86mY7.js} +1 -1
- package/dist/web/assets/{file-plus-rph6QsU2.js → file-plus-BK_cMGl4.js} +1 -1
- package/dist/web/assets/{folder-open-Bl6YXqew.js → folder-open-CUvL1QmZ.js} +1 -1
- package/dist/web/assets/{format-BgAm3SAH.js → format-CNMdJ6_8.js} +1 -1
- package/dist/web/assets/{index-BmmqB6ZS.js → index-7-XNE5Rd.js} +3 -3
- package/dist/web/assets/{lock-keyhole-mZ4jfztu.js → lock-keyhole-D62Dl9I8.js} +1 -1
- package/dist/web/assets/{pencil-BDoMo2Ww.js → pencil-xcVnI27R.js} +1 -1
- package/dist/web/assets/plus-oKcb7VoU.js +1 -0
- package/dist/web/assets/{queries-CMSNe-uK.js → queries-B6zKoYoh.js} +2 -2
- package/dist/web/assets/{realtime-ClAqKg_x.js → realtime-DySKdOZ5.js} +1 -1
- package/dist/web/assets/{search-DdF70eKf.js → search-BV5ZsG36.js} +1 -1
- package/dist/web/assets/{session-CjF5ag_d.js → session-Dg2szHMi.js} +1 -1
- package/dist/web/assets/{shield-exclamation-point-B7Pju0ds.js → shield-exclamation-point-BLSX4EKo.js} +1 -1
- package/dist/web/assets/{square-kanban-BRTup66V.js → square-kanban-D4XKuQYH.js} +1 -1
- package/dist/web/assets/{trash-B2yXT5Jy.js → trash-BtYRNn0Z.js} +1 -1
- package/dist/web/assets/{triangle-exclamation-point-BlWTlV3p.js → triangle-exclamation-point-CcJCHC10.js} +1 -1
- package/dist/web/assets/{workspace-BFZypQbJ.js → workspace-TT1PqoC7.js} +1 -1
- package/dist/web/index.html +32 -32
- package/dist/worker/index.js +5 -3
- package/dist/wrangler.json +4 -1
- package/package.json +1 -1
- package/dist/web/assets/auth-0IGNPo4z.js +0 -1
- package/dist/web/assets/auth-3HBxmWgg.js +0 -1
- package/dist/web/assets/auth-Ba1OS44l.js +0 -1
- package/dist/web/assets/auth-CDTfMacI.js +0 -1
- package/dist/web/assets/auth-CoBJBRW0.js +0 -1
- package/dist/web/assets/auth-Q4DlToeS.js +0 -1
- package/dist/web/assets/auth-pmqazYZA.js +0 -1
- package/dist/web/assets/check-BrNnvoEA.js +0 -1
- package/dist/web/assets/errors-AkJTmj7k.js +0 -1
- package/dist/web/assets/errors-CMbqK8yh.js +0 -1
- package/dist/web/assets/errors-D-bfLpWi.js +0 -1
- package/dist/web/assets/errors-DLS7UKoD.js +0 -1
- package/dist/web/assets/errors-DN3ODXFj.js +0 -1
- package/dist/web/assets/errors-DbvWC9vT.js +0 -1
- package/dist/web/assets/errors-DzGI8Yjb.js +0 -1
- package/dist/web/assets/plus-Df34_Oj9.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={codes:{invalid_access_key:`Der Zugangsschlüssel ist nicht korrekt.`,invalid_setup_code:`Der Einrichtungscode ist nicht korrekt.`,recovery_not_ready:`Deine Instanz hat noch keinen neuen Einrichtungscode. Wenn du ihn gerade geändert hast, warte einen Moment (manchmal ein paar Minuten) und versuche es noch einmal.`,already_claimed:`Diese Instanz ist bereits eingerichtet. Melde dich mit deinem Zugangsschlüssel an.`,not_claimed:`Diese Instanz ist noch nicht eingerichtet.`,rate_limited:`Zu viele Versuche. Warte ein paar Minuten.`,network:`Keine Verbindung zum Server.`,file_too_large:`Die Datei ist größer als erlaubt.`,upload_incomplete:`Der Upload wurde unterbrochen. Versuch es noch einmal.`,last_workspace:`Du musst mindestens einen Arbeitsbereich behalten.`},notFound:`Das Element wurde nicht gefunden.`,server:`Auf dem Server ist etwas schiefgelaufen. Versuch es noch einmal.`,unknown:`Etwas ist schiefgelaufen. Versuch es noch einmal.`};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={codes:{invalid_access_key:`アクセスキーが正しくありません。`,invalid_setup_code:`セットアップコードが正しくありません。`,recovery_not_ready:`Orqevioにはまだ新しいセットアップコードがありません。変更したばかりの場合は、少し待ってから(数分かかることもあります)もう一度お試しください。`,already_claimed:`このOrqevioはすでにセットアップされています。アクセスキーでログインしてください。`,not_claimed:`このOrqevioはまだセットアップされていません。`,rate_limited:`試行回数が多すぎます。数分待ってからお試しください。`,network:`サーバーに接続できません。`,file_too_large:`ファイルが上限サイズを超えています。`,upload_incomplete:`アップロードが中断されました。もう一度お試しください。`,last_workspace:`ワークスペースは少なくとも1つ必要です。`},notFound:`項目が見つかりませんでした。`,server:`サーバーでエラーが発生しました。もう一度お試しください。`,unknown:`エラーが発生しました。もう一度お試しください。`};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={codes:{invalid_access_key:`La chiave di accesso non è corretta.`,invalid_setup_code:`Il codice di configurazione non è corretto.`,recovery_not_ready:`La tua copia non ha ancora un nuovo codice di configurazione. Se l’hai appena cambiato, aspetta un momento (a volte qualche minuto) e riprova.`,already_claimed:`Questa copia è già configurata. Accedi con la tua chiave di accesso.`,not_claimed:`Questa copia non è ancora configurata.`,rate_limited:`Troppi tentativi. Attendi qualche minuto.`,network:`Nessuna connessione al server.`,file_too_large:`Il file supera la dimensione massima consentita.`,upload_incomplete:`Il caricamento si è interrotto. Riprova.`,last_workspace:`Devi mantenere almeno uno spazio.`},notFound:`Elemento non trovato.`,server:`Si è verificato un errore sul server. Riprova.`,unknown:`Si è verificato un errore. Riprova.`};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./queries-
|
|
1
|
+
import{I as e}from"./queries-B6zKoYoh.js";var t={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};t.node;var n=e(t),r={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./queries-
|
|
1
|
+
import{I as e}from"./queries-B6zKoYoh.js";var t={name:`file-plus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./queries-
|
|
1
|
+
import{I as e}from"./queries-B6zKoYoh.js";var t={name:`folder-open`,size:24,node:[[`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`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,Z as t}from"./queries-
|
|
1
|
+
import{T as e,Z as t}from"./queries-B6zKoYoh.js";var n=6048e5,r=864e5,i=Symbol.for(`constructDateFrom`);function a(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&i in e?e[i](t):e instanceof Date?new e.constructor(t):new Date(t)}function o(e,t){return a(t||e,e)}function s(e){let t=o(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}function c(e,...t){let n=a.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function l(e,t){let n=o(e,t?.in);return n.setHours(0,0,0,0),n}function u(e,t,n){let[i,a]=c(n?.in,e,t),o=l(i),u=l(a),d=+o-s(o),f=+u-s(u);return Math.round((d-f)/r)}var d=[[`year`,31536e3],[`month`,2592e3],[`day`,86400],[`hour`,3600],[`minute`,60],[`second`,1]];function f(n){let r=(new Date(n).getTime()-Date.now())/1e3;if(Math.abs(r)<45)return t(`time.justNow`);let i=new Intl.RelativeTimeFormat(e(),{numeric:`auto`}),[a,o]=d.find(([,e])=>Math.abs(r)>=e)??[`second`,1];return i.format(Math.round(r/o),a)}function p(t){let n=new Date(t),r=n.getFullYear()===new Date().getFullYear();return new Intl.DateTimeFormat(e(),{day:`numeric`,month:`short`,...r?{}:{year:`numeric`}}).format(n)}function m(t=new Date){return new Intl.DateTimeFormat(e(),{weekday:`long`,day:`numeric`,month:`long`}).format(t)}function h(e){let t=u(_(e),new Date);return t<0?`overdue`:t===0?`today`:t<=2?`soon`:`later`}function g(e){let n=u(_(e),new Date);return n===0?t(`due.today`):n===1?t(`due.tomorrow`):n===-1?t(`due.yesterday`):p(_(e).toISOString())}function _(e){let t=new Date(e);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),12)}function v(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),12)).toISOString()}function y(e=new Date){let n=e.getHours();return t(n<6?`greeting.night`:n<14?`greeting.morning`:n<21?`greeting.afternoon`:`greeting.evening`)}function b(e){let t=e.trim().split(/\s+/);return((t[0]?.[0]??``)+(t.length>1?t.at(-1)?.[0]??``:``)).toUpperCase()||`·`}function x(t){let[n,r,i]=t<1024?[`byte`,t,0]:t<1048576?[`kilobyte`,t/1024,0]:[`megabyte`,t/1024/1024,1];return new Intl.NumberFormat(e(),{style:`unit`,unit:n,unitDisplay:n===`byte`?`narrow`:`short`,maximumFractionDigits:i}).format(r)}var S=t=>new Intl.ListFormat(e(),{type:`conjunction`}).format(t);export{n as _,S as a,v as c,p as d,u as f,a as g,o as h,_ as i,m as l,c as m,g as n,y as o,l as p,h as r,b as s,x as t,f as u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConsentPage-
|
|
2
|
-
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{$ as n,A as r,D as i,E as a,I as o,L as s,N as c,O as l,R as u,T as d,at as f,b as p,dt as m,et as h,f as g,ft as _,h as v,it as y,k as b,l as ee,lt as te,m as x,n as ne,nt as S,ot as re,p as ie,r as ae,rt as oe,st as se,t as ce,tt as le,u as ue,ut as de,v as fe,w as pe,x as me,y as he}from"./queries-CMSNe-uK.js";import{B as ge,F as _e,R as ve,a as ye,i as be,k as xe,n as Se,r as Ce,t as we}from"./workspace-BFZypQbJ.js";import{a as Te,c as Ee,d as C,g as w,h as De,i as Oe,l as ke,n as Ae,s as T,t as E,u as je}from"./Field-XXfffXGD.js";import{n as Me,r as Ne,t as Pe}from"./actions-3DfosJmD.js";import{i as Fe,n as Ie,r as Le,t as Re}from"./theme-BfxBDblB.js";import{n as ze,t as Be}from"./eye-Gm43B6bU.js";import{t as Ve}from"./Trans-BxWw0Vac.js";import{a as He,i as Ue,n as We,t as Ge}from"./States-BDAsCueg.js";import{t as Ke}from"./Button-DmRLgc5R.js";import{t as qe}from"./CopyButton-CcB9JRw4.js";import{n as Je,t as Ye}from"./AccessKeyReveal-Dt2QpDUL.js";import{n as Xe,t as Ze}from"./TokenCard-qzOy0l_S.js";import{t as Qe}from"./Avatar-BiOOxxo5.js";import{a as $e}from"./activity-Cj_BOs0a.js";import{a as et,i as tt,n as nt}from"./realtime-ClAqKg_x.js";import{t as rt}from"./bot-CTPVQq3S.js";import{n as it,t as at}from"./square-kanban-BRTup66V.js";import{t as ot}from"./folder-open-Bl6YXqew.js";import{t as st}from"./lock-keyhole-mZ4jfztu.js";import{t as ct}from"./plus-Df34_Oj9.js";import{t as lt}from"./search-DdF70eKf.js";import{n as ut,s as dt}from"./session-CjF5ag_d.js";import{t as ft}from"./ColorPicker-BGW0YwdU.js";import{t as pt}from"./Checkbox-qjaYUeKU.js";import{a as mt}from"./format-BgAm3SAH.js";import{t as ht}from"./check-BrNnvoEA.js";import{a as gt,c as _t,i as vt,l as yt,n as bt,o as xt,r as St,s as Ct,t as wt}from"./Menu-Ddmd9yXa.js";import{t as Tt}from"./trash-B2yXT5Jy.js";import{t as Et}from"./pencil-BDoMo2Ww.js";import{t as Dt}from"./ProjectSettingsDialog-BjNnvZQQ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ot=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,te||(te=!0,ae());else{var t=n(l);t!==null&&ce(ee,t.startTime-e)}}}var te=!1,x=-1,ne=5,S=-1;function re(){return g?!0:!(e.unstable_now()-S<ne)}function ie(){if(g=!1,te){var t=e.unstable_now();S=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(x),x=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&re());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ce(ee,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():te=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){x=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(x),x=-1):h=!0,ce(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,te||(te=!0,ae()))),r},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),kt=t(((e,t)=>{t.exports=Ot()})),At=t((e=>{var t=kt(),n=_(),r=ge();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function ee(e,t,n){return e===n||e===t&&(y=e,!0)}function te(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function x(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ne(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var S=Object.assign,re=Symbol.for(`react.element`),ie=Symbol.for(`react.transitional.element`),ae=Symbol.for(`react.portal`),oe=Symbol.for(`react.fragment`),se=Symbol.for(`react.strict_mode`),ce=Symbol.for(`react.profiler`),le=Symbol.for(`react.consumer`),ue=Symbol.for(`react.context`),de=Symbol.for(`react.forward_ref`),fe=Symbol.for(`react.suspense`),pe=Symbol.for(`react.suspense_list`),me=Symbol.for(`react.memo`),he=Symbol.for(`react.lazy`),_e=Symbol.for(`react.activity`),ve=Symbol.for(`react.legacy_hidden`),ye=Symbol.for(`react.memo_cache_sentinel`),be=Symbol.for(`react.view_transition`),xe=Symbol.for(`react.recoverable`),Se=Symbol.iterator;function Ce(e){return typeof e!=`object`||!e?null:(e=Se&&e[Se]||e[`@@iterator`],typeof e==`function`?e:null)}var we=Symbol.for(`react.client.reference`);function Te(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===we?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case oe:return`Fragment`;case ce:return`Profiler`;case se:return`StrictMode`;case fe:return`Suspense`;case pe:return`SuspenseList`;case _e:return`Activity`;case be:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ae:return`Portal`;case ue:return e.displayName||`Context`;case le:return(e._context.displayName||`Context`)+`.Consumer`;case de:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case me:return t=e.displayName||null,t===null?Te(e.type)||`Memo`:t;case he:t=e._payload,e=e._init;try{return Te(e(t))}catch{}}return null}var Ee=Array.isArray,C=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De={pending:!1,data:null,method:null,action:null},Oe=[],ke=-1;function Ae(e){return{current:e}}function T(e){0>ke||(e.current=Oe[ke],Oe[ke]=null,ke--)}function E(e,t){ke++,Oe[ke]=e.current,e.current=t}var je=Ae(null),Me=Ae(null),Ne=Ae(null),Pe=Ae(null);function Fe(e,t){switch(E(Ne,t),E(Me,e),E(je,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(je),E(je,e)}function Ie(){T(je),T(Me),T(Ne)}function Le(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,E(Pe,e)),t=je.current;var n=dp(t,e.type);t!==n&&(E(Me,e),E(je,n))}function Re(e){Me.current===e&&(T(je),T(Me)),Pe.current===e&&(T(Pe),sh._currentValue=De)}var ze,Be;function Ve(e){if(ze===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ze=t&&t[1]||``,Be=-1<e.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConsentPage-C_LzKZZB.js","assets/rolldown-runtime-XKyaHtl9.js","assets/queries-B6zKoYoh.js","assets/triangle-exclamation-point-CcJCHC10.js","assets/shield-exclamation-point-BLSX4EKo.js","assets/States-BL27BexV.js","assets/Button-Cdv5jCuw.js","assets/Avatar-BM8oUZZw.js","assets/bot-CWoAuwAC.js","assets/format-CNMdJ6_8.js","assets/theme-BfxBDblB.js","assets/AccessRows-DUF0JEJN.js","assets/Segmented-BDMZD7nV.js","assets/destination-CEcYXsDA.js","assets/HomePage-DDDKEWXr.js","assets/arrow-up-right-B1Q3GS2t.js","assets/check-DCBjJEe-.js","assets/square-kanban-D4XKuQYH.js","assets/lock-keyhole-D62Dl9I8.js","assets/workspace-TT1PqoC7.js","assets/Trans-COFrPeA8.js","assets/ActivityList--gWYDhUt.js","assets/activity-pS7JJqPR.js","assets/CardItem-DzmuD8RI.js","assets/realtime-DySKdOZ5.js","assets/PageHeader-ClyiqS7h.js","assets/ProjectPage-amJ1RPBS.js","assets/file-plus-BK_cMGl4.js","assets/pencil-xcVnI27R.js","assets/plus-oKcb7VoU.js","assets/trash-BtYRNn0Z.js","assets/EmptyState-DbuyD37d.js","assets/ProjectSettingsDialog-6QxmHLzs.js","assets/Field-Clm8umDd.js","assets/ColorPicker-1A8lBK9k.js","assets/actions-CnbXVELu.js","assets/BoardPage-CixYMIX6.js","assets/Menu-DX34x7kE.js","assets/Popover-5Vvrqbgv.js","assets/Attachments-BFs-_VlC.js","assets/download-DOUlwk6I.js","assets/Attachments-BFwBtL8j.css","assets/Checkbox-D7DQDOn_.js","assets/search-BV5ZsG36.js","assets/BoardPage-RiEPvGmp.css","assets/DocPage-hcgQ0MLZ.js","assets/folder-open-CUvL1QmZ.js","assets/VaultPage-E1JRTpdj.js","assets/eye-DgU86mY7.js","assets/clock-gFOXe45w.js","assets/CopyButton-C-W1lxF3.js","assets/session-Dg2szHMi.js","assets/AgentsPage-BmYCjLa_.js","assets/TokenCard-Rdie_fAK.js","assets/SettingsPage-WsTJXDni.js","assets/AccessKeyReveal-CQaxpNT4.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{$ as n,A as r,D as i,E as a,I as o,L as s,N as c,O as l,R as u,T as d,at as f,b as p,dt as m,et as h,f as g,ft as _,h as v,it as y,k as b,l as ee,lt as te,m as x,n as ne,nt as S,ot as re,p as ie,r as ae,rt as oe,st as se,t as ce,tt as le,u as ue,ut as de,v as fe,w as pe,x as me,y as he}from"./queries-B6zKoYoh.js";import{B as ge,F as _e,R as ve,a as ye,i as be,k as xe,n as Se,r as Ce,t as we}from"./workspace-TT1PqoC7.js";import{a as Te,c as Ee,d as C,g as w,h as De,i as Oe,l as ke,n as Ae,s as T,t as E,u as je}from"./Field-Clm8umDd.js";import{n as Me,r as Ne,t as Pe}from"./actions-CnbXVELu.js";import{i as Fe,n as Ie,r as Le,t as Re}from"./theme-BfxBDblB.js";import{n as ze,t as Be}from"./eye-DgU86mY7.js";import{t as Ve}from"./Trans-COFrPeA8.js";import{a as He,i as Ue,n as We,t as Ge}from"./States-BL27BexV.js";import{t as Ke}from"./Button-Cdv5jCuw.js";import{t as qe}from"./CopyButton-C-W1lxF3.js";import{n as Je,t as Ye}from"./AccessKeyReveal-CQaxpNT4.js";import{n as Xe,t as Ze}from"./TokenCard-Rdie_fAK.js";import{t as Qe}from"./Avatar-BM8oUZZw.js";import{a as $e}from"./activity-pS7JJqPR.js";import{a as et,i as tt,n as nt}from"./realtime-DySKdOZ5.js";import{t as rt}from"./bot-CWoAuwAC.js";import{n as it,t as at}from"./square-kanban-D4XKuQYH.js";import{t as ot}from"./folder-open-CUvL1QmZ.js";import{t as st}from"./lock-keyhole-D62Dl9I8.js";import{t as ct}from"./plus-oKcb7VoU.js";import{t as lt}from"./search-BV5ZsG36.js";import{n as ut,s as dt}from"./session-Dg2szHMi.js";import{t as ft}from"./ColorPicker-1A8lBK9k.js";import{t as pt}from"./Checkbox-D7DQDOn_.js";import{a as mt}from"./format-CNMdJ6_8.js";import{t as ht}from"./check-DCBjJEe-.js";import{a as gt,c as _t,i as vt,l as yt,n as bt,o as xt,r as St,s as Ct,t as wt}from"./Menu-DX34x7kE.js";import{t as Tt}from"./trash-BtYRNn0Z.js";import{t as Et}from"./pencil-xcVnI27R.js";import{t as Dt}from"./ProjectSettingsDialog-6QxmHLzs.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ot=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,te||(te=!0,ae());else{var t=n(l);t!==null&&ce(ee,t.startTime-e)}}}var te=!1,x=-1,ne=5,S=-1;function re(){return g?!0:!(e.unstable_now()-S<ne)}function ie(){if(g=!1,te){var t=e.unstable_now();S=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(x),x=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&re());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ce(ee,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():te=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){x=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(x),x=-1):h=!0,ce(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,te||(te=!0,ae()))),r},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),kt=t(((e,t)=>{t.exports=Ot()})),At=t((e=>{var t=kt(),n=_(),r=ge();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function ee(e,t,n){return e===n||e===t&&(y=e,!0)}function te(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function x(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ne(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var S=Object.assign,re=Symbol.for(`react.element`),ie=Symbol.for(`react.transitional.element`),ae=Symbol.for(`react.portal`),oe=Symbol.for(`react.fragment`),se=Symbol.for(`react.strict_mode`),ce=Symbol.for(`react.profiler`),le=Symbol.for(`react.consumer`),ue=Symbol.for(`react.context`),de=Symbol.for(`react.forward_ref`),fe=Symbol.for(`react.suspense`),pe=Symbol.for(`react.suspense_list`),me=Symbol.for(`react.memo`),he=Symbol.for(`react.lazy`),_e=Symbol.for(`react.activity`),ve=Symbol.for(`react.legacy_hidden`),ye=Symbol.for(`react.memo_cache_sentinel`),be=Symbol.for(`react.view_transition`),xe=Symbol.for(`react.recoverable`),Se=Symbol.iterator;function Ce(e){return typeof e!=`object`||!e?null:(e=Se&&e[Se]||e[`@@iterator`],typeof e==`function`?e:null)}var we=Symbol.for(`react.client.reference`);function Te(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===we?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case oe:return`Fragment`;case ce:return`Profiler`;case se:return`StrictMode`;case fe:return`Suspense`;case pe:return`SuspenseList`;case _e:return`Activity`;case be:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ae:return`Portal`;case ue:return e.displayName||`Context`;case le:return(e._context.displayName||`Context`)+`.Consumer`;case de:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case me:return t=e.displayName||null,t===null?Te(e.type)||`Memo`:t;case he:t=e._payload,e=e._init;try{return Te(e(t))}catch{}}return null}var Ee=Array.isArray,C=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De={pending:!1,data:null,method:null,action:null},Oe=[],ke=-1;function Ae(e){return{current:e}}function T(e){0>ke||(e.current=Oe[ke],Oe[ke]=null,ke--)}function E(e,t){ke++,Oe[ke]=e.current,e.current=t}var je=Ae(null),Me=Ae(null),Ne=Ae(null),Pe=Ae(null);function Fe(e,t){switch(E(Ne,t),E(Me,e),E(je,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(je),E(je,e)}function Ie(){T(je),T(Me),T(Ne)}function Le(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,E(Pe,e)),t=je.current;var n=dp(t,e.type);t!==n&&(E(Me,e),E(je,n))}function Re(e){Me.current===e&&(T(je),T(Me)),Pe.current===e&&(T(Pe),sh._currentValue=De)}var ze,Be;function Ve(e){if(ze===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ze=t&&t[1]||``,Be=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+ze+e+Be}var He=!1;function Ue(e,t){if(!e||He)return``;He=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
5
|
`),l=s.split(`
|
|
@@ -11,4 +11,4 @@ Error generating stack: `+e.message+`
|
|
|
11
11
|
.orbit-spin { animation: orbit 18s linear infinite; }
|
|
12
12
|
@keyframes orbit { to { transform: rotate(360deg); } }
|
|
13
13
|
@media (prefers-reduced-motion: reduce) { .orbit-spin { animation: none; } }
|
|
14
|
-
`})]})}var Zt=[`tasks`,`docs`,`vault`,`agents`],Qt={docker:`docker compose exec app node dist/cli.js reset-access`,source:`pnpm cli reset-access`},$t=(e,t)=>`npx create-orqevio@latest ${e}${t&&t!==`orqevio`?` --name ${t}`:``}`;function en({value:e}){return(0,O.jsxs)(`div`,{className:`mt-2 flex items-center gap-2 rounded-[10px] border border-line bg-sheet py-1.5 pr-1.5 pl-3`,children:[(0,O.jsx)(`code`,{className:`min-w-0 flex-1 font-mono text-[12.5px] break-words text-ink`,children:e}),(0,O.jsx)(qe,{value:e})]})}function tn({title:e,subtitle:t,children:n}){let{t:r}=u(`auth`);return(0,O.jsxs)(`div`,{className:`grid min-h-dvh bg-desk lg:grid-cols-[minmax(0,1.1fr)_minmax(440px,0.9fr)]`,children:[(0,O.jsxs)(`aside`,{className:`grain relative hidden overflow-hidden border-r border-line lg:flex lg:flex-col lg:justify-between lg:p-12 xl:p-16`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,O.jsx)(Ue,{size:30}),(0,O.jsx)(He,{})]}),(0,O.jsxs)(`div`,{className:`grid items-center gap-10 xl:grid-cols-[1fr_minmax(0,380px)]`,children:[(0,O.jsxs)(`div`,{className:`animate-rise`,children:[(0,O.jsx)(`h1`,{className:`font-display text-[52px] leading-[1.02] font-medium tracking-[-0.03em] xl:text-[62px]`,children:(0,O.jsx)(Ve,{t:r,i18nKey:`hero.title`,components:{br:(0,O.jsx)(`br`,{}),accent:(0,O.jsx)(`span`,{className:`italic text-accent`})}})}),(0,O.jsx)(`p`,{className:`mt-6 max-w-[440px] text-[16px] leading-relaxed text-ink-2`,children:r(`hero.body`)})]}),(0,O.jsx)(`div`,{className:`hidden xl:block`,children:(0,O.jsx)(Xt,{})})]}),(0,O.jsx)(`ul`,{className:`grid max-w-[720px] grid-cols-2 gap-x-10 gap-y-5`,children:Zt.map((e,t)=>(0,O.jsxs)(`li`,{className:`animate-rise`,style:{animationDelay:`${120+t*60}ms`},children:[(0,O.jsxs)(`p`,{className:`flex items-center gap-2 text-[13px] font-semibold`,children:[(0,O.jsxs)(`span`,{className:`font-mono text-[11px] text-ink-3`,children:[`0`,t+1]}),r(`pillars.${e}.title`)]}),(0,O.jsx)(`p`,{className:`mt-1 text-[13px] leading-relaxed text-ink-2`,children:r(`pillars.${e}.body`)})]},e))})]}),(0,O.jsxs)(`main`,{className:`flex flex-col items-center justify-center bg-sheet px-6 py-12 sm:px-10`,children:[(0,O.jsxs)(`div`,{className:`mb-10 flex items-center gap-2.5 lg:hidden`,children:[(0,O.jsx)(Ue,{size:30}),(0,O.jsx)(He,{})]}),(0,O.jsxs)(`div`,{className:`animate-rise w-full max-w-[380px]`,children:[(0,O.jsx)(`h2`,{className:`font-display text-[30px] leading-tight font-medium tracking-[-0.02em]`,children:e}),(0,O.jsx)(`p`,{className:`mt-2 text-[14px] leading-relaxed text-ink-2`,children:t}),(0,O.jsx)(`div`,{className:`mt-8`,children:n})]}),(0,O.jsx)(Je,{compact:!0,className:`mt-12`,onChange:e=>void pe(e)})]})]})}function k({children:e}){return(0,O.jsx)(`p`,{role:`alert`,className:`rounded-[10px] bg-danger-soft px-3 py-2.5 text-[13px] text-danger`,children:e})}function nn({field:e,value:t,onChange:n,error:r,autoComplete:i,autoFocus:a,hint:o}){let{t:s}=u(`auth`),[c,l]=(0,D.useState)(!1);return(0,O.jsx)(E,{label:s(`fields.${e}.label`),type:c?`text`:`password`,autoComplete:i,spellCheck:!1,value:t,onChange:e=>n(e.target.value),error:r,hint:o,autoFocus:a,className:`[&_input]:font-mono`,trailing:(0,O.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`grid size-8 place-items-center rounded-[8px] text-ink-3 hover:bg-hover hover:text-ink`,"aria-label":s(c?`fields.${e}.hide`:`fields.${e}.show`),children:c?(0,O.jsx)(ze,{className:`size-4`}):(0,O.jsx)(Be,{className:`size-4`})})})}function rn({mode:e}){let{t}=u(`auth`),n=ae(),r=f(),[i]=se(),a=de(),[o,s]=(0,D.useState)(null),c=i.get(`next`)??`/`;async function l(){await a.invalidateQueries({queryKey:ce.me}),await a.invalidateQueries({queryKey:ce.access}),r(c,{replace:!0})}if(o)return(0,O.jsx)(tn,{title:t(`revealed.${o.kind}.title`),subtitle:t(`revealed.${o.kind}.subtitle`),children:(0,O.jsx)(Ye,{accessKey:o.accessKey,confirmLabel:t(`revealed.continue`),onDone:()=>void l(),children:o.reason&&(0,O.jsx)(cn,{reason:o.reason})})});if(!n.isFetchedAfterMount)return(0,O.jsx)(Ge,{});let d=n.data;if(d&&!d.user&&d.uninstalled)return(0,O.jsx)(ln,{details:d.uninstalled});if(d?.user)return(0,O.jsx)(h,{to:c,replace:!0});let p=!d||d.claimed,m=i.toString()?`?${i.toString()}`:``;return e===`login`&&!p?(0,O.jsx)(h,{to:`/setup${m}`,replace:!0}):e===`setup`&&p?(0,O.jsx)(h,{to:`/login${m}`,replace:!0}):e===`setup`?(0,O.jsx)(an,{onClaimed:e=>s({accessKey:e,kind:`setup`})}):(0,O.jsx)(on,{recoverable:!!(d&&!d.user&&d.recoverable),copy:{install:d&&!d.user?d.install:`source`,copyName:d&&!d.user?d.copyName:null},onSignedIn:()=>void l(),onRecovered:(e,t)=>s({accessKey:e,kind:`recovery`,reason:t})})}function an({onClaimed:e}){let{t}=u(`auth`),[n,r]=(0,D.useState)(``),[i,a]=(0,D.useState)(``),[o,s]=(0,D.useState)({}),[c,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(!1);async function h(r){r.preventDefault(),f(null);let a=l.safeParse({setupCode:n,name:i,locale:d()});if(a.success){s({}),m(!0);try{e((await me(`/auth/claim`,a.data)).accessKey)}catch(e){f(fe(e))}finally{m(!1)}}else{let e={};for(let n of a.error.issues){let r=String(n.path[0]);e[r]??=t(r===`setupCode`?`setup.missingSetupCode`:`setup.missingName`)}s(e)}}return(0,O.jsx)(tn,{title:t(`setup.title`),subtitle:t(`setup.subtitle`),children:(0,O.jsxs)(`form`,{onSubmit:h,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,O.jsx)(nn,{field:`setupCode`,value:n,onChange:r,error:o.setupCode,autoComplete:`off`,autoFocus:!0}),(0,O.jsx)(E,{label:t(`fields.name.label`),autoComplete:`name`,value:i,onChange:e=>a(e.target.value),error:o.name,hint:t(`fields.name.hint`),maxLength:80}),c&&(0,O.jsx)(k,{children:c}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,size:`lg`,loading:p,className:`mt-2 w-full`,children:t(`setup.submit`)})]})})}function on({recoverable:e,copy:t,onSignedIn:n,onRecovered:i}){let{t:a}=u(`auth`),[o,s]=(0,D.useState)(``),[c,l]=(0,D.useState)(),[d,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(!1),[h,g]=(0,D.useState)(!1);async function _(e){e.preventDefault(),f(null);let t=r.safeParse({accessKey:o});if(!t.success)l(a(`login.missingAccessKey`));else{l(void 0),m(!0);try{await me(`/auth/login`,t.data),n()}catch(e){f(fe(e))}finally{m(!1)}}}return(0,O.jsxs)(tn,{title:a(`login.title`),subtitle:a(`login.subtitle`),children:[(0,O.jsxs)(`form`,{onSubmit:_,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,O.jsx)(nn,{field:`accessKey`,value:o,onChange:s,error:c,autoComplete:`current-password`,autoFocus:!0}),d&&(0,O.jsx)(k,{children:d}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,size:`lg`,loading:p,className:`mt-2 w-full`,children:a(`login.submit`)})]}),(0,O.jsx)(`div`,{className:`mt-6 text-center`,children:(0,O.jsx)(`button`,{type:`button`,onClick:()=>g(e=>!e),"aria-expanded":h,className:`text-[13.5px] font-medium text-ink-2 underline decoration-line-strong underline-offset-4 hover:text-ink hover:decoration-accent`,children:a(`login.lostKey`)})}),h&&(0,O.jsx)(sn,{recoverable:e,copy:t,onRecovered:i})]})}function sn({recoverable:e,copy:t,onRecovered:n}){let{t:r}=u(`auth`);ae({pollMs:e?void 0:5e3});let i=(0,O.jsx)(`code`,{className:`font-mono text-[12px] text-ink`}),a=Qt[t.install],[o,c]=(0,D.useState)(``),[l,d]=(0,D.useState)(null),[f,p]=(0,D.useState)(null),[m,h]=(0,D.useState)(!1);async function g(e){if(e.preventDefault(),p(null),!o.trim()){p(r(`recovery.missingSetupCode`));return}let t=b.safeParse({setupCode:o,reason:l});if(!t.success)p(r(`recovery.missingReason`));else{h(!0);try{n((await me(`/auth/recover`,t.data)).accessKey,t.data.reason)}catch(e){p(fe(e))}finally{h(!1)}}}return(0,O.jsxs)(`div`,{className:`mt-4 rounded-[14px] border border-line bg-sunken p-4 text-[13px] leading-relaxed text-ink-2`,children:[t.install===`cli`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:r(`recovery.cli`)}),(0,O.jsx)(en,{value:$t(`recover`,t.copyName)})]}),t.install===`button`&&(0,O.jsx)(`p`,{children:(0,O.jsx)(Ve,{t:r,i18nKey:`recovery.button`,values:{name:t.copyName??`orqevio`},components:{code:i}})}),t.install===`cloudflare`&&(0,O.jsx)(`p`,{children:(0,O.jsx)(Ve,{t:r,i18nKey:`recovery.cloudflare`,components:{code:i}})}),a&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:r(`recovery.intro`)}),(0,O.jsxs)(`ul`,{className:`mt-2 flex list-disc flex-col gap-1.5 pl-5`,children:[(0,O.jsxs)(`li`,{children:[r(`recovery.withCommand`),(0,O.jsx)(en,{value:a})]}),(0,O.jsx)(`li`,{children:(0,O.jsx)(Ve,{t:r,i18nKey:`recovery.withNewCode`,components:{code:i}})})]})]}),(0,O.jsx)(`p`,{className:`mt-2`,children:r(`recovery.vaultUnaffected`)}),!e&&(0,O.jsx)(`p`,{className:`mt-2 text-ink-3`,children:r(`recovery.waiting`)}),e&&(0,O.jsxs)(`form`,{onSubmit:g,className:`mt-4 flex flex-col gap-3`,noValidate:!0,children:[(0,O.jsx)(nn,{field:`newSetupCode`,value:o,onChange:c,autoComplete:`off`}),(0,O.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`legend`,{className:`mb-1 text-[13px] font-medium text-ink`,children:r(`recovery.reason.legend`)}),[`lost`,`compromised`].map(e=>(0,O.jsxs)(`label`,{className:s(`flex cursor-pointer items-start gap-3 rounded-[10px] border bg-sheet px-3 py-2.5`,l===e?`border-accent`:`border-line`),children:[(0,O.jsx)(`input`,{type:`radio`,name:`recovery-reason`,value:e,checked:l===e,onChange:()=>d(e),className:`mt-1 size-4 accent-[var(--accent)]`}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`span`,{className:`block text-[13px] font-medium text-ink`,children:r(`recovery.reason.${e}.label`)}),(0,O.jsx)(`span`,{className:`block text-[12.5px] text-ink-3`,children:r(`recovery.reason.${e}.hint`)})]})]},e))]}),f&&(0,O.jsx)(k,{children:f}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,loading:m,children:r(`recovery.submit`)})]})]})}function cn({reason:e}){let{t}=u(`auth`),n=ie(),r=Xe();if(e===`compromised`)return(0,O.jsx)(`p`,{className:`mt-4 rounded-[12px] border border-line bg-sunken px-3.5 py-3 text-[13px] text-ink-2`,children:t(`revealed.agents.revoked`)});let i=(n.data??[]).filter(e=>!e.revokedAt&&(!e.expiresAt||new Date(e.expiresAt)>new Date));return(0,O.jsxs)(`section`,{className:`mt-4`,"aria-labelledby":`recovered-agents`,children:[(0,O.jsx)(`h2`,{id:`recovered-agents`,className:`text-[13px] font-medium text-ink`,children:t(`revealed.agents.title`)}),n.data&&i.length===0?(0,O.jsx)(`p`,{className:`mt-1 text-[12.5px] text-ink-3`,children:t(`revealed.agents.none`)}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`mt-1 text-[12.5px] text-ink-3`,children:t(`revealed.agents.review`)}),(0,O.jsx)(`div`,{className:`mt-2 flex max-h-[320px] flex-col gap-2 overflow-y-auto`,children:i.map(e=>(0,O.jsx)(Ze,{token:e,onRevoke:()=>void r(e)},e.id))})]})]})}function ln({details:e}){let{t}=u([`auth`,`common`]),n=e.copyName??`orqevio`,r=e.bucket??`${n}-uploads`,i=e=>(0,O.jsx)(`ul`,{className:`mt-2 flex list-disc flex-col gap-1.5 pl-5`,children:e.map(e=>(0,O.jsx)(`li`,{children:t(`uninstalled.steps.${e}`,{name:n,bucket:r})},e))});return(0,O.jsx)(tn,{title:t(`uninstalled.title`),subtitle:t(`uninstalled.subtitle`),children:(0,O.jsxs)(`div`,{className:`rounded-[14px] border border-line bg-sunken p-4 text-[13px] leading-relaxed text-ink-2`,children:[e.install===`cli`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.cli`)}),(0,O.jsx)(en,{value:$t(`uninstall`,e.copyName)})]}),e.install===`button`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.button`)}),i([`worker`,`bucket`,`repository`,`token`])]}),e.install===`cloudflare`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.cloudflare`)}),i([`worker`,`bucket`])]}),e.install===`docker`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.docker`)}),(0,O.jsx)(en,{value:`docker compose down -v`})]}),e.install===`source`&&(0,O.jsx)(`p`,{children:t(`uninstalled.source`)})]})})}var un=1,dn=.9,fn=.8,pn=.17,mn=.1,hn=.999,gn=.9999,_n=.99,vn=/[\\\/_+.#"@\[\(\{&]/,yn=/[\\\/_+.#"@\[\(\{&]/g,bn=/[\s-]/,xn=/[\s-]/g;function Sn(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?un:_n;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Sn(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=un:vn.test(e.charAt(l-1))?(d*=fn,p=e.slice(i,l-1).match(yn),p&&i>0&&(d*=hn**+p.length)):bn.test(e.charAt(l-1))?(d*=dn,m=e.slice(i,l-1).match(xn),m&&i>0&&(d*=hn**+m.length)):(d*=pn,i>0&&(d*=hn**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=gn)),(d<mn&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Sn(e,t,n,r,l+1,a+2,o),f*mn>d&&(d=f*mn)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Cn(e){return e.toLowerCase().replace(xn,` `)}function wn(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Sn(e,t,Cn(e),Cn(t),0,0,{})}var Tn=`[cmdk-group=""]`,En=`[cmdk-group-items=""]`,Dn=`[cmdk-group-heading=""]`,On=`[cmdk-item=""]`,kn=`${On}:not([aria-disabled="true"])`,An=`cmdk-item-select`,jn=`data-value`,Mn=(e,t,n)=>wn(e,t,n),Nn=D.createContext(void 0),Pn=()=>D.useContext(Nn),Fn=D.createContext(void 0),In=()=>D.useContext(Fn),Ln=D.createContext(void 0),Rn=D.forwardRef((e,t)=>{let n=Zn(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Zn(()=>new Set),i=Zn(()=>new Map),a=Zn(()=>new Map),o=Zn(()=>new Set),s=Yn(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=xe(),y=xe(),b=xe(),ee=D.useRef(null),te=er();Xn(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,x.emit()}},[u]),Xn(()=>{te(6,oe)},[]);let x=D.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)ae(),re(),te(1,ie);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(te(7,()=>{n.current.selectedItemId=se()?.id,x.emit()}),r||te(5,oe),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}x.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),ne=D.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,S(t,r)),te(2,()=>{re(),x.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),te(3,()=>{ae(),re(),n.current.value||ie(),x.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=se();te(4,()=>{ae(),t?.getAttribute(`id`)===e&&ie(),x.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:ee}),[]);function S(e,t){let r=s.current?.filter??Mn;return e?r(e,n.current.search,t):0}function re(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=ee.current;ce().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(En);t?t.appendChild(e.parentElement===t?e:e.closest(`${En} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${En} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=ee.current?.querySelector(`${Tn}[${jn}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function ie(){let e=ce().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(jn);x.setState(`value`,e||void 0)}function ae(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=S(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function oe(){var e;let t=se();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Tn)?.querySelector(Dn))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function se(){return ee.current?.querySelector(`${On}[aria-selected="true"]`)}function ce(){return Array.from(ee.current?.querySelectorAll(kn)||[])}function le(e){let t=ce()[e];t&&x.setState(`value`,t.getAttribute(jn))}function ue(e){var t;let n=se(),r=ce(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&x.setState(`value`,a.getAttribute(jn))}function de(e){let t=se()?.closest(Tn),n;for(;t&&!n;)t=e>0?qn(t,Tn):Jn(t,Tn),n=t?.querySelector(kn);n?x.setState(`value`,n.getAttribute(jn)):ue(e)}let fe=()=>le(ce().length-1),pe=e=>{e.preventDefault(),e.metaKey?fe():e.altKey?de(1):ue(1)},me=e=>{e.preventDefault(),e.metaKey?le(0):e.altKey?de(-1):ue(-1)};return D.createElement(_e.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&pe(e);break;case`ArrowDown`:pe(e);break;case`p`:case`k`:g&&e.ctrlKey&&me(e);break;case`ArrowUp`:me(e);break;case`Home`:e.preventDefault(),le(0);break;case`End`:e.preventDefault(),fe();break;case`Enter`:{e.preventDefault();let t=se();if(t){let e=new Event(An);t.dispatchEvent(e)}}}}},D.createElement(`label`,{"cmdk-label":``,htmlFor:ne.inputId,id:ne.labelId,style:rr},c),nr(e,e=>D.createElement(Fn.Provider,{value:x},D.createElement(Nn.Provider,{value:ne},e))))}),zn=D.forwardRef((e,t)=>{let n=xe(),r=D.useRef(null),i=D.useContext(Ln),a=Pn(),o=Yn(e),s=o.current?.forceMount??i?.forceMount;Xn(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=$n(n,r,[e.value,e.children,r],e.keywords),l=In(),u=Qn(e=>e.value&&e.value===c.current),d=Qn(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);D.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(An,f),()=>t.removeEventListener(An,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return D.createElement(_e.div,{ref:ve(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Bn=D.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=xe(),s=D.useRef(null),c=D.useRef(null),l=xe(),u=Pn(),d=Qn(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));Xn(()=>u.group(o),[]),$n(o,s,[e.value,e.heading,c]);let f=D.useMemo(()=>({id:o,forceMount:i}),[i]);return D.createElement(_e.div,{ref:ve(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&D.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),nr(e,e=>D.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},D.createElement(Ln.Provider,{value:f},e))))}),Vn=D.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=D.useRef(null),a=Qn(e=>!e.search);return!n&&!a?null:D.createElement(_e.div,{ref:ve(i,t),...r,"cmdk-separator":``,role:`separator`})}),Hn=D.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=In(),o=Qn(e=>e.search),s=Qn(e=>e.selectedItemId),c=Pn();return D.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),D.createElement(_e.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Un=D.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=D.useRef(null),o=D.useRef(null),s=Qn(e=>e.selectedItemId),c=Pn();return D.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),D.createElement(_e.div,{ref:ve(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},nr(e,e=>D.createElement(`div`,{ref:ve(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Wn=D.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return D.createElement(Te,{open:n,onOpenChange:r},D.createElement(je,{container:o},D.createElement(ke,{"cmdk-overlay":``,className:i}),D.createElement(T,{"aria-label":e.label,"cmdk-dialog":``,className:a},D.createElement(Rn,{ref:t,...s}))))}),Gn=D.forwardRef((e,t)=>Qn(e=>e.filtered.count===0)?D.createElement(_e.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Kn=D.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return D.createElement(_e.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},nr(e,e=>D.createElement(`div`,{"aria-hidden":!0},e)))}),A=Object.assign(Rn,{List:Un,Item:zn,Input:Hn,Group:Bn,Separator:Vn,Dialog:Wn,Empty:Gn,Loading:Kn});function qn(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Jn(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Yn(e){let t=D.useRef(e);return Xn(()=>{t.current=e}),t}var Xn=typeof window>`u`?D.useEffect:D.useLayoutEffect;function Zn(e){let t=D.useRef();return t.current===void 0&&(t.current=e()),t}function Qn(e){let t=In(),n=()=>e(t.snapshot());return D.useSyncExternalStore(t.subscribe,n,n)}function $n(e,t,n,r=[]){let i=D.useRef(),a=Pn();return Xn(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(jn,s),i.current=s}),i}var er=()=>{let[e,t]=D.useState(),n=Zn(()=>new Map);return Xn(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function tr(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function nr({asChild:e,children:t},n){return e&&D.isValidElement(t)?D.cloneElement(tr(t),{ref:t.ref},n(t.props.children)):n(t)}var rr={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},ir=e=>e.normalize(`NFD`).replace(/\p{M}/gu,``).toLowerCase(),ar=(e,t,n)=>Mn(ir(e),ir(t),n?.map(ir));function or({open:e,onOpenChange:t}){let{t:n}=u([`shell`,`common`]),{workspaceId:r,overview:i,openNewProject:a}=Se(),o=f(),s=dt(),[c,l]=(0,D.useState)(``),[d,m]=(0,D.useState)(``),h=g(r,d),_=`/w/${r}`;(0,D.useEffect)(()=>{let e=setTimeout(()=>m(c),160);return()=>clearTimeout(e)},[c]),(0,D.useEffect)(()=>{e||l(``)},[e]);let v=e=>{t(!1),o(e)},y=e=>{t(!1),e()},b=i?.projects??[],ee=(h.data??[]).filter(()=>d.trim().length>=2),te=document.documentElement.dataset.theme===`dark`;return(0,O.jsx)(Te,{open:e,onOpenChange:t,children:(0,O.jsxs)(je,{children:[(0,O.jsx)(ke,{className:`fixed inset-0 z-40 bg-[rgb(20_18_14/0.28)] backdrop-blur-[2px] data-[state=open]:animate-[overlay-in_0.15s_ease-out]`}),(0,O.jsxs)(T,{"aria-label":n(`palette.label`),className:`fixed top-[14vh] left-1/2 z-50 w-[calc(100vw-32px)] max-w-[620px] -translate-x-1/2 overflow-hidden rounded-[18px] border border-line bg-sheet shadow-lg outline-none data-[state=open]:animate-[pop_0.18s_var(--ease-out-quint)]`,children:[(0,O.jsx)(C,{className:`sr-only`,children:n(`palette.title`)}),(0,O.jsx)(Ee,{className:`sr-only`,children:n(`palette.description`)}),(0,O.jsxs)(A,{label:n(`palette.label`),loop:!0,filter:ar,className:`flex max-h-[min(70vh,560px)] flex-col`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-line px-4`,children:[(0,O.jsx)(lt,{className:`size-[18px] shrink-0 text-ink-3`}),(0,O.jsx)(A.Input,{value:c,onValueChange:l,placeholder:n(`palette.placeholder`),className:`h-14 flex-1 bg-transparent text-[15.5px] outline-none placeholder:text-ink-3`}),(0,O.jsx)(`kbd`,{className:`kbd`,children:`esc`})]}),(0,O.jsxs)(A.List,{className:`min-h-0 flex-1 overflow-y-auto p-2 [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:pt-2.5 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:tracking-[0.08em] [&_[cmdk-group-heading]]:text-ink-3 [&_[cmdk-group-heading]]:uppercase`,children:[(0,O.jsx)(A.Empty,{className:`px-4 py-10 text-center text-[13.5px] text-ink-3`,children:h.isFetching?n(`palette.searching`):n(`palette.noResults`)}),ee.length>0&&(0,O.jsx)(A.Group,{heading:n(`palette.inContent`),children:ee.map(e=>(0,O.jsxs)(sr,{value:`content ${e.type} ${e.id} ${e.title}`,keywords:[d],icon:e.type===`card`?(0,O.jsx)(at,{}):e.icon?(0,O.jsx)(`span`,{className:`text-[14px]`,children:e.icon}):(0,O.jsx)(it,{}),onSelect:()=>v(e.type===`card`?`${_}/b/${e.boardId}?card=${e.id}`:`${_}/d/${e.id}`),hint:e.type===`card`?`${e.boardName} · ${e.columnName}`:e.projectName,children:[(0,O.jsx)(`span`,{className:`block truncate`,children:e.title||n(`common:untitled`)}),e.excerpt&&(0,O.jsx)(`span`,{className:`block truncate text-[12px] text-ink-3`,children:e.excerpt})]},`${e.type}-${e.id}`))}),(0,O.jsxs)(A.Group,{heading:n(`palette.navigate`),children:[(0,O.jsx)(sr,{value:n(`palette.keywords.home`),icon:(0,O.jsx)(Lt,{}),onSelect:()=>v(_),children:n(`nav.home`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.vault`),icon:(0,O.jsx)(st,{}),onSelect:()=>v(`${_}/vault`),children:n(`nav.vault`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.agents`),icon:(0,O.jsx)(rt,{}),onSelect:()=>v(`${_}/agents`),children:n(`nav.agents`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.settings`),icon:(0,O.jsx)(Gt,{}),onSelect:()=>v(`${_}/settings`),children:n(`user.settings`)})]}),b.length>0&&(0,O.jsxs)(A.Group,{heading:n(`palette.structure`),children:[b.map(e=>(0,O.jsx)(sr,{value:`${n(`palette.keywords.project`)} ${e.name} ${e.id}`,icon:(0,O.jsx)(ot,{}),onSelect:()=>v(`${_}/p/${e.id}`),hint:n(`palette.project`),children:e.name},e.id)),b.flatMap(e=>e.boards.map(t=>(0,O.jsx)(sr,{value:`${n(`palette.keywords.board`)} ${t.name} ${e.name} ${t.id}`,icon:(0,O.jsx)(at,{}),onSelect:()=>v(`${_}/b/${t.id}`),hint:e.name,children:t.name},t.id))),b.flatMap(e=>e.pages.map(t=>(0,O.jsx)(sr,{value:`${n(`palette.keywords.page`)} ${t.title||n(`common:untitled`)} ${e.name} ${t.id}`,icon:t.icon?(0,O.jsx)(`span`,{className:`text-[14px]`,children:t.icon}):(0,O.jsx)(it,{}),onSelect:()=>v(`${_}/d/${t.id}`),hint:e.name,children:t.title||n(`common:untitled`)},t.id)))]}),(0,O.jsxs)(A.Group,{heading:n(`palette.actions`),children:[(0,O.jsx)(sr,{value:n(`palette.keywords.newProject`),icon:(0,O.jsx)(ct,{}),onSelect:()=>y(a),children:n(`palette.newProject`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.theme`),icon:te?(0,O.jsx)(qt,{}):(0,O.jsx)(Ut,{}),onSelect:()=>y(()=>{let e=te?`light`:`dark`;Re(e),p(`/account`,{theme:e}).catch(()=>{})}),children:n(te?`palette.lightTheme`:`palette.darkTheme`)}),!s&&(0,O.jsx)(sr,{value:n(`palette.keywords.lockVault`),icon:(0,O.jsx)(st,{}),onSelect:()=>y(ut),children:n(`palette.lockVault`)})]})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-4 border-t border-line px-4 py-2 text-[11.5px] text-ink-3`,children:[(0,O.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`kbd`,{className:`kbd`,children:`↑`}),(0,O.jsx)(`kbd`,{className:`kbd`,children:`↓`}),` `,n(`palette.hintNavigate`)]}),(0,O.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`kbd`,{className:`kbd`,children:`↵`}),` `,n(`palette.hintOpen`)]}),h.isFetching&&(0,O.jsx)(`span`,{className:`ml-auto`,children:n(`palette.searching`)})]})]})]})]})})}function sr({value:e,icon:t,children:n,onSelect:r,hint:i,keywords:a}){return(0,O.jsxs)(A.Item,{value:e,keywords:a,onSelect:r,className:`flex min-h-10 cursor-default items-center gap-3 rounded-[10px] px-2.5 py-1.5 text-[13.5px] text-ink outline-none select-none data-[selected=true]:bg-hover [&>svg]:size-[16px] [&>svg]:shrink-0 [&>svg]:text-ink-3`,children:[(0,O.jsx)(`span`,{className:`grid size-[18px] shrink-0 place-items-center text-ink-3 [&>svg]:size-[16px]`,children:t}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1`,children:n}),i&&(0,O.jsx)(`span`,{className:`max-w-[40%] shrink-0 truncate text-[12px] text-ink-3`,children:i})]})}function cr({open:e,onOpenChange:t}){let{t:n}=u([`shell`,`common`]),{workspaceId:r}=Se(),i=f(),[a,o]=(0,D.useState)(``),[s,l]=(0,D.useState)(`cobalt`),[p,m]=(0,D.useState)(!0),[h,g]=(0,D.useState)(!1);async function _(e){if(e.preventDefault(),a.trim()){g(!0);try{let e=await me(`/workspaces/${r}/projects`,{name:a.trim(),color:s}),c=`/w/${r}/p/${e.id}`;if(p){let t=await me(`/projects/${e.id}/boards`,{name:n(`newProject.boardName`)});c=`/w/${r}/b/${t.id}`}await ne.invalidateQueries({queryKey:ce.overview(r)}),t(!1),o(``),i(c)}catch(e){w.error(fe(e))}finally{g(!1)}}}return(0,O.jsx)(Oe,{open:e,onOpenChange:t,title:n(`newProject.title`),description:n(`newProject.description`),children:(0,O.jsxs)(`form`,{onSubmit:_,className:`flex flex-col gap-5`,children:[(0,O.jsx)(E,{label:n(`newProject.name`),value:a,onChange:e=>o(e.target.value),placeholder:n(`newProject.namePlaceholder`),maxLength:80,autoFocus:!0}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`span`,{className:`text-[12.5px] font-medium text-ink-2`,children:n(`newProject.color`)}),(0,O.jsx)(ft,{value:s,onChange:l})]}),(0,O.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 rounded-[12px] border border-line bg-surface p-3`,children:[(0,O.jsx)(pt,{checked:p,onChange:m,label:n(`newProject.withBoard`),className:`mt-0.5`}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`span`,{className:`block text-[13.5px] font-medium`,children:n(`newProject.startWithBoard`)}),(0,O.jsx)(`span`,{className:`block text-[12.5px] text-ink-3`,children:n(`newProject.boardHint`,{columns:mt(c[d()].map(e=>n(`common:quoted`,{text:e})))})})]})]}),(0,O.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,O.jsx)(Ke,{variant:`ghost`,onClick:()=>t(!1),children:n(`common:actions.cancel`)}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,loading:h,disabled:!a.trim(),children:n(`newProject.create`)})]})]})})}function lr(){let{t:e}=u([`shell`,`common`]),{workspaceId:t,overview:n,openPalette:r,openNewProject:i}=Se(),a=tt(),o=dt(),s=`/w/${t}`;return(0,O.jsxs)(`nav`,{"aria-label":e(`nav.label`),className:`flex h-full flex-col px-2.5 pt-2.5 pb-2`,children:[(0,O.jsx)(fr,{live:a}),(0,O.jsxs)(`button`,{type:`button`,onClick:r,className:`mt-2 flex h-8.5 items-center gap-2 rounded-[9px] border border-line bg-surface/70 px-2.5 text-[13px] text-ink-3 shadow-sm transition-colors hover:border-line-strong hover:text-ink-2`,children:[(0,O.jsx)(lt,{className:`size-[15px]`}),(0,O.jsx)(`span`,{className:`flex-1 text-left`,children:e(`nav.search`)}),(0,O.jsx)(ye,{keys:[`mod`,`K`]})]}),(0,O.jsxs)(`div`,{className:`mt-3 flex flex-col gap-px`,children:[(0,O.jsx)(dr,{to:s,end:!0,icon:(0,O.jsx)(Lt,{}),children:e(`nav.home`)}),(0,O.jsx)(dr,{to:`${s}/vault`,icon:(0,O.jsx)(st,{}),trailing:(0,O.jsx)(ur,{locked:o}),children:e(`nav.vault`)}),(0,O.jsx)(dr,{to:`${s}/agents`,icon:(0,O.jsx)(rt,{}),trailing:a?(0,O.jsx)(`span`,{className:`live-dot mr-1`,"aria-label":e(`nav.agentLive`)}):null,children:e(`nav.agents`)})]}),(0,O.jsxs)(`div`,{className:`mt-5 flex items-center justify-between pr-1 pl-2.5`,children:[(0,O.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`nav.projects`)}),(0,O.jsx)(Ce,{label:e(`nav.newProject`),children:(0,O.jsx)(`button`,{type:`button`,onClick:i,"aria-label":e(`nav.newProject`),className:`grid size-6 place-items-center rounded-[7px] text-ink-3 hover:bg-hover hover:text-ink`,children:(0,O.jsx)(ct,{className:`size-[15px]`})})})]}),(0,O.jsx)(`div`,{className:`-mx-1 mt-1 min-h-0 flex-1 overflow-y-auto px-1 pb-4`,children:n?n.projects.length?n.projects.map(e=>(0,O.jsx)(mr,{project:e},e.id)):(0,O.jsxs)(`button`,{type:`button`,onClick:i,className:`mt-1 w-full rounded-[10px] border border-dashed border-line-strong px-3 py-4 text-left text-[12.5px] text-ink-3 transition-colors hover:border-ink-3 hover:text-ink-2`,children:[(0,O.jsx)(`span`,{className:`block font-medium text-ink-2`,children:e(`nav.firstProject.title`)}),e(`nav.firstProject.body`)]}):(0,O.jsxs)(`div`,{className:`flex flex-col gap-2 px-2 pt-2`,children:[(0,O.jsx)(`div`,{className:`skeleton h-5 w-3/4`}),(0,O.jsx)(`div`,{className:`skeleton h-5 w-2/3`}),(0,O.jsx)(`div`,{className:`skeleton h-5 w-4/5`})]})}),(0,O.jsx)(_r,{})]})}function ur({locked:e}){let{t}=u([`shell`,`common`]);return(0,O.jsx)(`span`,{className:s(`mr-1 size-1.5 rounded-full transition-colors`,e?`bg-ink-4`:`bg-ok`),"aria-label":t(e?`nav.vaultLocked`:`nav.vaultUnlocked`),title:t(e?`nav.vaultLocked`:`nav.vaultUnlocked`)})}function dr({to:e,end:t,icon:r,children:i,trailing:a}){return(0,O.jsxs)(n,{to:e,end:t,className:({isActive:e})=>s(`group relative flex h-8 items-center gap-2.5 rounded-[8px] px-2.5 text-[13.5px] transition-colors [&>svg]:size-[16px] [&>svg]:shrink-0`,e?`bg-surface font-medium text-ink shadow-sm [&>svg]:text-accent`:`text-ink-2 hover:bg-hover hover:text-ink [&>svg]:text-ink-3`),children:[r,(0,O.jsx)(`span`,{className:`flex-1 truncate`,children:i}),a]})}function fr({live:e}){let{t}=u([`shell`,`common`]),{me:n,workspaceId:r}=Se(),i=f(),a=Ne(),o=de(),s=n.workspaces.find(e=>e.id===r);async function c(){let e=await a({title:t(`workspace.new`),description:t(`workspace.newDescription`),label:t(`workspace.name`),confirmLabel:t(`workspace.create`),maxLength:60});if(e)try{let t=await me(`/workspaces`,{name:e});await o.invalidateQueries({queryKey:ce.me}),i(`/w/${t.id}`)}catch(e){w.error(fe(e))}}return(0,O.jsxs)(xt,{children:[(0,O.jsx)(_t,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,className:`flex h-10 items-center gap-2.5 rounded-[10px] px-1.5 text-left transition-colors hover:bg-hover data-[state=open]:bg-hover`,children:[(0,O.jsx)(Ue,{size:28,live:e}),(0,O.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`span`,{className:`block truncate text-[13.5px] leading-tight font-semibold`,children:s?.name??t(`workspace.fallback`)}),(0,O.jsx)(`span`,{className:`block text-[11.5px] leading-tight text-ink-3`,children:`Orqevio`})]}),(0,O.jsx)(Ft,{className:`size-[14px] text-ink-3`})]})}),(0,O.jsxs)(wt,{align:`start`,className:`w-[240px]`,children:[(0,O.jsx)(St,{children:t(`workspace.heading`)}),n.workspaces.map(e=>(0,O.jsx)(bt,{onSelect:()=>i(`/w/${e.id}`),icon:(0,O.jsx)(`span`,{className:`glyph c-slate size-5 text-[11px]`,children:e.name[0]?.toUpperCase()}),children:(0,O.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsx)(`span`,{className:`truncate`,children:e.name}),e.id===r&&(0,O.jsx)(ht,{className:`size-[14px] text-accent`})]})},e.id)),(0,O.jsx)(Ct,{}),(0,O.jsx)(bt,{icon:(0,O.jsx)(ct,{}),onSelect:c,children:t(`workspace.new`)}),(0,O.jsx)(bt,{icon:(0,O.jsx)(Gt,{}),onSelect:()=>i(`/w/${r}/settings`),children:t(`workspace.settings`)})]})]})}function pr(e,t){let[n,r]=(0,D.useState)(()=>Ie(`expanded`,{})[e]??t);return[n,t=>{let i=t??!n;r(i);let a=Ie(`expanded`,{});a[e]=i,Le(`expanded`,a)}]}function mr({project:e}){let{t}=u([`shell`,`common`]),{workspaceId:r}=Se(),i=y(),a=Pe(r),[o,c]=pr(e.id,!0),[l,d]=(0,D.useState)(!1),f=`/w/${r}`,p=e.pages.filter(e=>e.parentId===null),m=i.pathname===`${f}/p/${e.id}`;return(0,O.jsxs)(`div`,{className:`mt-0.5`,children:[(0,O.jsxs)(`div`,{className:s(`group flex h-8 items-center gap-1 rounded-[8px] pr-1 transition-colors`,m?`bg-surface shadow-sm`:`hover:bg-hover`),children:[(0,O.jsx)(`button`,{type:`button`,onClick:()=>c(),"aria-label":t(o?`project.collapse`:`project.expand`,{name:e.name}),"aria-expanded":o,className:`grid size-6 shrink-0 place-items-center rounded-[6px] text-ink-4 hover:text-ink`,children:(0,O.jsx)(Nt,{className:s(`size-[13px] transition-transform duration-200`,o&&`rotate-90`)})}),(0,O.jsxs)(n,{to:`${f}/p/${e.id}`,className:`flex min-w-0 flex-1 items-center gap-2 py-1 text-[13.5px]`,children:[(0,O.jsx)(`span`,{className:s(`glyph size-[18px] text-[10.5px]`,`c-${e.color}`),children:e.name[0]?.toUpperCase()}),(0,O.jsx)(`span`,{className:s(`truncate`,m?`font-medium text-ink`:`text-ink-2 group-hover:text-ink`),children:e.name})]}),(0,O.jsxs)(xt,{children:[(0,O.jsx)(_t,{asChild:!0,children:(0,O.jsx)(`button`,{type:`button`,"aria-label":t(`project.actions`,{name:e.name}),className:`grid size-6 place-items-center rounded-[6px] text-ink-3 opacity-0 group-hover:opacity-100 hover:bg-press hover:text-ink focus-visible:opacity-100 data-[state=open]:opacity-100`,children:(0,O.jsx)(yt,{className:`size-[15px]`})})}),(0,O.jsxs)(wt,{align:`start`,children:[(0,O.jsx)(bt,{icon:(0,O.jsx)(at,{}),onSelect:()=>void a.createBoard(e.id),children:t(`project.newBoard`)}),(0,O.jsx)(bt,{icon:(0,O.jsx)(it,{}),onSelect:()=>void a.createPage(e.id),children:t(`project.newPage`)}),(0,O.jsx)(Ct,{}),(0,O.jsx)(bt,{icon:(0,O.jsx)(Et,{}),onSelect:()=>d(!0),children:t(`project.rename`)}),(0,O.jsx)(bt,{icon:(0,O.jsx)(Tt,{}),danger:!0,onSelect:()=>void a.deleteProject(e),children:t(`project.delete`)})]})]}),(0,O.jsx)(Ce,{label:t(`project.newPage`),children:(0,O.jsx)(`button`,{type:`button`,onClick:()=>void a.createPage(e.id),"aria-label":t(`project.newPageIn`,{name:e.name}),className:`grid size-6 place-items-center rounded-[6px] text-ink-3 opacity-0 group-hover:opacity-100 hover:bg-press hover:text-ink focus-visible:opacity-100`,children:(0,O.jsx)(ct,{className:`size-[15px]`})})})]}),o&&(0,O.jsxs)(`div`,{className:`relative ml-[13px] border-l border-line pl-1.5`,children:[e.boards.map(e=>(0,O.jsx)(hr,{to:`${f}/b/${e.id}`,icon:(0,O.jsx)(at,{}),label:e.name,trailing:e.cardCount?(0,O.jsx)(`span`,{className:`font-mono text-[10.5px] text-ink-3`,children:e.cardCount}):null},e.id)),p.map(t=>(0,O.jsx)(gr,{page:t,all:e.pages,projectId:e.id,depth:0},t.id)),e.boards.length===0&&p.length===0&&(0,O.jsx)(`p`,{className:`px-2 py-1.5 text-[12px] text-ink-3`,children:t(`project.empty`)})]}),(0,O.jsx)(Dt,{project:e,open:l,onOpenChange:d})]})}function hr({to:e,icon:t,label:r,trailing:i,onToggle:a,expanded:o,hasChildren:c,extra:l}){let{t:d}=u(`shell`);return(0,O.jsxs)(n,{to:e,className:({isActive:e})=>s(`group/tree relative flex h-7.5 items-center gap-2 rounded-[7px] pr-1 pl-1.5 text-[13px] transition-colors [&>svg]:size-[14px] [&>svg]:shrink-0`,e?`bg-surface font-medium text-ink shadow-sm [&>svg]:text-accent`:`text-ink-2 hover:bg-hover hover:text-ink [&>svg]:text-ink-3`),children:[c?(0,O.jsx)(`span`,{role:`button`,tabIndex:-1,"aria-label":d(o?`tree.collapse`:`tree.expand`),onClick:e=>{e.preventDefault(),e.stopPropagation(),a?.()},className:`-ml-0.5 grid size-4 shrink-0 place-items-center rounded-[4px] text-ink-4 hover:text-ink`,children:(0,O.jsx)(Nt,{className:s(`size-[11px] transition-transform`,o&&`rotate-90`)})}):null,t,(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:r}),l,i]})}function gr({page:e,all:t,projectId:n,depth:r}){let{t:i}=u([`shell`,`common`]),{workspaceId:a}=Se(),o=Pe(a),s=t.filter(t=>t.parentId===e.id),[c,l]=pr(e.id,!1);return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(hr,{to:`/w/${a}/d/${e.id}`,icon:e.icon?(0,O.jsx)(`span`,{className:`w-[14px] text-center text-[13px] leading-none`,children:e.icon}):(0,O.jsx)(it,{}),label:e.title||i(`common:untitled`),hasChildren:s.length>0,expanded:c,onToggle:()=>l(),extra:(0,O.jsx)(`span`,{role:`button`,tabIndex:-1,"aria-label":i(`tree.newSubpage`),title:i(`tree.newSubpage`),onClick:t=>{t.preventDefault(),t.stopPropagation(),l(!0),o.createPage(n,e.id)},className:`grid size-5 shrink-0 place-items-center rounded-[5px] text-ink-3 opacity-0 group-hover/tree:opacity-100 hover:bg-press hover:text-ink`,children:(0,O.jsx)(ct,{className:`size-[13px]`})})}),c&&s.length>0&&r<12&&(0,O.jsx)(`div`,{className:`ml-[11px] border-l border-line pl-1.5`,children:s.map(e=>(0,O.jsx)(gr,{page:e,all:t,projectId:n,depth:r+1},e.id))})]})}function _r(){let{t:e}=u([`shell`,`common`]),{me:t,workspaceId:n}=Se(),r=x().data?.updateAvailable??!1,i=f(),a=de(),[o,s]=(0,D.useState)(t.user.theme);async function c(e){let t=e;s(t),Re(t);try{await p(`/account`,{theme:t}),await a.invalidateQueries({queryKey:ce.me})}catch{}}async function l(){await me(`/auth/logout`).catch(()=>{}),ut(),a.clear(),i(`/login`,{replace:!0})}return(0,O.jsxs)(xt,{children:[(0,O.jsx)(_t,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,className:`flex h-10 items-center gap-2.5 rounded-[10px] px-1.5 text-left transition-colors hover:bg-hover data-[state=open]:bg-hover`,children:[(0,O.jsxs)(`span`,{className:`relative`,children:[(0,O.jsx)(Qe,{name:t.user.name,size:26}),r&&(0,O.jsx)(`span`,{"aria-label":e(`user.updateAvailable`),className:`absolute -top-0.5 -right-0.5 size-2.5 rounded-full bg-accent ring-2 ring-desk`})]}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] leading-tight font-medium`,children:t.user.name})]})}),(0,O.jsxs)(wt,{align:`start`,side:`top`,className:`w-[240px]`,children:[(0,O.jsx)(bt,{icon:(0,O.jsx)(Gt,{}),onSelect:()=>i(`/w/${n}/settings`),children:(0,O.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[e(`user.settings`),r&&(0,O.jsx)(`span`,{className:`rounded-full bg-accent-soft px-1.5 py-px text-[11px] font-medium text-accent`,children:e(`user.newVersion`)})]})}),(0,O.jsx)(Ct,{}),(0,O.jsx)(St,{children:e(`user.appearance`)}),(0,O.jsxs)(vt,{value:o,onValueChange:c,children:[(0,O.jsx)(gt,{value:`system`,icon:(0,O.jsx)(Vt,{}),children:e(`user.theme.system`)}),(0,O.jsx)(gt,{value:`light`,icon:(0,O.jsx)(qt,{}),children:e(`user.theme.light`)}),(0,O.jsx)(gt,{value:`dark`,icon:(0,O.jsx)(Ut,{}),children:e(`user.theme.dark`)})]}),(0,O.jsx)(Ct,{}),(0,O.jsx)(bt,{icon:(0,O.jsx)(zt,{}),onSelect:l,children:e(`user.signOut`)})]})]})}var vr=()=>typeof window<`u`&&window.matchMedia(`(min-width: 900px)`).matches;function yr(){let{t:e}=u(),{wid:t}=re(),n=ee(),r=ue(t),i=y(),a=f(),[o,c]=(0,D.useState)(()=>vr()?Ie(`sidebar`,!0):!1),[l,d]=(0,D.useState)(!1),[p,m]=(0,D.useState)(!1);et(t,n.data?.user.id),(0,D.useEffect)(()=>{t&&Le(`workspace`,t)},[t]),(0,D.useEffect)(()=>{let e=n.data?.user.theme;e&&e!==Fe()&&Re(e)},[n.data?.user.theme]),(0,D.useEffect)(()=>{vr()||c(!1)},[i.pathname]),(0,D.useEffect)(()=>{let e=e=>{let t=e.metaKey||e.ctrlKey;e.key===`Escape`&&!vr()&&c(!1),t&&e.key.toLowerCase()===`k`?(e.preventDefault(),d(e=>!e)):t&&e.key===`\\`&&(e.preventDefault(),c(e=>(vr()&&Le(`sidebar`,!e),!e)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,D.useEffect)(()=>(nt(n=>{w($e(n),{id:`agent-${n.actor.id}`,icon:(0,O.jsx)(Qe,{name:n.actor.name,kind:`agent`,size:22}),duration:3500,action:n.cardId&&n.action!==`card.archived`?{label:e(`actions.view`),onClick:()=>a(`/card/${n.cardId}`)}:n.pageId?{label:e(`actions.view`),onClick:()=>a(`/w/${t}/d/${n.pageId}`)}:void 0})}),()=>nt(null)),[a,t,e]);let g=(0,D.useMemo)(()=>n.data&&t?{workspaceId:t,me:n.data,overview:r.data,sidebarOpen:o,toggleSidebar:()=>c(e=>(vr()&&Le(`sidebar`,!e),!e)),openPalette:()=>d(!0),openNewProject:()=>m(!0)}:null,[n.data,t,r.data,o]);return n.isPending?(0,O.jsx)(Ge,{}):n.error?n.error instanceof v&&n.error.status===401?(0,O.jsx)(h,{to:`/login?next=${encodeURIComponent(i.pathname+i.search)}`,replace:!0}):(0,O.jsx)(Ge,{}):g?n.data.workspaces.some(e=>e.id===t)?(0,O.jsxs)(we.Provider,{value:g,children:[(0,O.jsx)(`a`,{href:`#main`,className:`sr-only focus:not-sr-only focus:fixed focus:top-3 focus:left-3 focus:z-[60] focus:rounded-[8px] focus:bg-ink focus:px-3 focus:py-2 focus:text-sheet`,children:e(`skipToContent`)}),(0,O.jsxs)(`div`,{className:`flex h-dvh overflow-hidden bg-desk`,children:[(0,O.jsx)(`div`,{"aria-hidden":`true`,onClick:()=>c(!1),className:s(`fixed inset-0 z-30 bg-[rgb(20_18_14/0.3)] transition-opacity duration-300 min-[900px]:hidden`,o?`opacity-100`:`pointer-events-none opacity-0`)}),(0,O.jsx)(`div`,{className:s(`z-40 shrink-0 transition-[width,transform] duration-300 ease-[var(--ease-out-quint)]`,`max-[899px]:fixed max-[899px]:inset-y-0 max-[899px]:left-0 max-[899px]:w-[272px] max-[899px]:bg-desk max-[899px]:shadow-lg`,o?`max-[899px]:translate-x-0 min-[900px]:w-[260px]`:`max-[899px]:-translate-x-full min-[900px]:w-0`),children:(0,O.jsx)(`div`,{className:s(`h-full w-[260px] max-[899px]:w-[272px]`,!o&&`min-[900px]:invisible`),children:(0,O.jsx)(lr,{})})}),(0,O.jsx)(`main`,{id:`main`,className:s(`sheet relative my-2 mr-2 flex min-w-0 flex-1 flex-col overflow-hidden rounded-[16px] max-[899px]:m-0 max-[899px]:rounded-none`,!o&&`min-[900px]:ml-2`),children:(0,O.jsx)(le,{})})]}),(0,O.jsx)(or,{open:l,onOpenChange:d}),(0,O.jsx)(cr,{open:p,onOpenChange:m})]}):(0,O.jsx)(We,{standalone:!0}):(0,O.jsx)(Ge,{})}function br(){let e=ee();if(e.isPending)return(0,O.jsx)(Ge,{});if(e.isError||!e.data)return(0,O.jsx)(h,{to:`/login`,replace:!0});let t=Ie(`workspace`,null),n=e.data.workspaces.find(e=>e.id===t)??e.data.workspaces[0];return n?(0,O.jsx)(h,{to:`/w/${n.id}`,replace:!0}):(0,O.jsx)(h,{to:`/login`,replace:!0})}function xr({type:e}){let{id:t}=re(),n=f();return(0,D.useEffect)(()=>{let r=!1;return(async()=>{try{if(e===`card`){let e=await he(`/cards/${t}`);r||n(`/w/${e.workspaceId}/b/${e.boardId}?card=${e.id}`,{replace:!0})}else{let e=await he(`/pages/${t}`);r||n(`/w/${e.workspaceId}/d/${e.id}`,{replace:!0})}}catch{r||n(`/`,{replace:!0})}})(),()=>{r=!0}},[t,e,n]),(0,O.jsx)(Ge,{})}var Sr=oe([{path:`/`,element:(0,O.jsx)(br,{})},{path:`/login`,element:(0,O.jsx)(rn,{mode:`login`})},{path:`/setup`,element:(0,O.jsx)(rn,{mode:`setup`})},{path:`/register`,element:(0,O.jsx)(h,{to:`/setup`,replace:!0})},{path:`/card/:id`,element:(0,O.jsx)(xr,{type:`card`})},{path:`/doc/:id`,element:(0,O.jsx)(xr,{type:`doc`})},{path:`/oauth/authorize`,lazy:async()=>({Component:(await i(async()=>{let{ConsentPage:e}=await import(`./ConsentPage-DPrRcdTA.js`);return{ConsentPage:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))).ConsentPage}),hydrateFallbackElement:(0,O.jsx)(Ge,{})},{path:`/w/:wid`,element:(0,O.jsx)(yr,{}),hydrateFallbackElement:(0,O.jsx)(Ge,{}),children:[{index:!0,lazy:async()=>({Component:(await i(async()=>{let{HomePage:e}=await import(`./HomePage-COyxQqEv.js`);return{HomePage:e}},__vite__mapDeps([14,1,2,15,8,16,17,18,19,20,21,22,9,7,10,23,24,25]))).HomePage})},{path:`p/:projectId`,lazy:async()=>({Component:(await i(async()=>{let{ProjectPage:e}=await import(`./ProjectPage-DLBi--EJ.js`);return{ProjectPage:e}},__vite__mapDeps([26,1,27,2,17,28,29,30,6,31,9,25,19,32,33,34,16,35,5]))).ProjectPage})},{path:`b/:boardId`,lazy:async()=>({Component:(await i(async()=>{let{BoardPage:e}=await import(`./BoardPage-j0HRFfQq.js`);return{BoardPage:e}},__vite__mapDeps([36,1,23,2,19,8,17,9,24,37,33,6,28,29,30,31,38,35,25,5,20,21,22,7,39,40,41,42,16,34,43,44]))).BoardPage})},{path:`d/:pageId`,lazy:async()=>({Component:(await i(async()=>{let{DocPage:e}=await import(`./DocPage-I84vK6gG.js`);return{DocPage:e}},__vite__mapDeps([45,1,2,8,37,19,33,6,17,27,23,9,24,30,3,20,39,38,40,41,25,35,5,46]))).DocPage})},{path:`vault`,lazy:async()=>({Component:(await i(async()=>{let{VaultPage:e}=await import(`./VaultPage-DDGskTMH.js`);return{VaultPage:e}},__vite__mapDeps([47,1,2,38,19,33,6,48,18,28,29,43,4,30,37,49,40,50,16,31,12,9,25,51,10]))).VaultPage})},{path:`agents`,lazy:async()=>({Component:(await i(async()=>{let{AgentsPage:e}=await import(`./AgentsPage-DbtYLxZ8.js`);return{AgentsPage:e}},__vite__mapDeps([52,1,8,2,18,29,4,21,20,22,9,7,6,50,16,33,19,25,12,11,53,49,30,13]))).AgentsPage})},{path:`settings`,lazy:async()=>({Component:(await i(async()=>{let{SettingsPage:e}=await import(`./SettingsPage-C5fvTtKZ.js`);return{SettingsPage:e}},__vite__mapDeps([54,1,2,33,19,6,12,55,50,16,40,10,15,25,20,51]))).SettingsPage})},{path:`*`,element:(0,O.jsx)(We,{})}]},{path:`*`,element:(0,O.jsx)(We,{standalone:!0})}]);await a(),Yt(ne),(0,Jt.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(D.StrictMode,{children:(0,O.jsx)(te,{client:ne,children:(0,O.jsx)(be,{children:(0,O.jsxs)(Ae,{children:[(0,O.jsx)(Me,{children:(0,O.jsx)(S,{router:Sr})}),(0,O.jsx)(De,{position:`bottom-right`,gap:8,toastOptions:{unstyled:!0,classNames:{toast:`flex w-[356px] items-start gap-3 rounded-[14px] border border-line bg-surface px-4 py-3 text-[13.5px] text-ink shadow-lg`,title:`font-medium`,description:`text-[12.5px] text-ink-2 mt-0.5`,icon:`mt-0.5`,actionButton:`ml-auto shrink-0 rounded-[8px] bg-ink px-2.5 py-1 text-[12px] font-medium text-sheet`,success:`[&_[data-icon]]:text-ok`,error:`[&_[data-icon]]:text-danger`}}})]})})})}));
|
|
14
|
+
`})]})}var Zt=[`tasks`,`docs`,`vault`,`agents`],Qt={docker:`docker compose exec app node dist/cli.js reset-access`,source:`pnpm cli reset-access`},$t=(e,t)=>`npx create-orqevio@latest ${e}${t&&t!==`orqevio`?` --name ${t}`:``}`;function en({value:e}){return(0,O.jsxs)(`div`,{className:`mt-2 flex items-center gap-2 rounded-[10px] border border-line bg-sheet py-1.5 pr-1.5 pl-3`,children:[(0,O.jsx)(`code`,{className:`min-w-0 flex-1 font-mono text-[12.5px] break-words text-ink`,children:e}),(0,O.jsx)(qe,{value:e})]})}function tn({title:e,subtitle:t,children:n}){let{t:r}=u(`auth`);return(0,O.jsxs)(`div`,{className:`grid min-h-dvh bg-desk lg:grid-cols-[minmax(0,1.1fr)_minmax(440px,0.9fr)]`,children:[(0,O.jsxs)(`aside`,{className:`grain relative hidden overflow-hidden border-r border-line lg:flex lg:flex-col lg:justify-between lg:p-12 xl:p-16`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,O.jsx)(Ue,{size:30}),(0,O.jsx)(He,{})]}),(0,O.jsxs)(`div`,{className:`grid items-center gap-10 xl:grid-cols-[1fr_minmax(0,380px)]`,children:[(0,O.jsxs)(`div`,{className:`animate-rise`,children:[(0,O.jsx)(`h1`,{className:`font-display text-[52px] leading-[1.02] font-medium tracking-[-0.03em] xl:text-[62px]`,children:(0,O.jsx)(Ve,{t:r,i18nKey:`hero.title`,components:{br:(0,O.jsx)(`br`,{}),accent:(0,O.jsx)(`span`,{className:`italic text-accent`})}})}),(0,O.jsx)(`p`,{className:`mt-6 max-w-[440px] text-[16px] leading-relaxed text-ink-2`,children:r(`hero.body`)})]}),(0,O.jsx)(`div`,{className:`hidden xl:block`,children:(0,O.jsx)(Xt,{})})]}),(0,O.jsx)(`ul`,{className:`grid max-w-[720px] grid-cols-2 gap-x-10 gap-y-5`,children:Zt.map((e,t)=>(0,O.jsxs)(`li`,{className:`animate-rise`,style:{animationDelay:`${120+t*60}ms`},children:[(0,O.jsxs)(`p`,{className:`flex items-center gap-2 text-[13px] font-semibold`,children:[(0,O.jsxs)(`span`,{className:`font-mono text-[11px] text-ink-3`,children:[`0`,t+1]}),r(`pillars.${e}.title`)]}),(0,O.jsx)(`p`,{className:`mt-1 text-[13px] leading-relaxed text-ink-2`,children:r(`pillars.${e}.body`)})]},e))})]}),(0,O.jsxs)(`main`,{className:`flex flex-col items-center justify-center bg-sheet px-6 py-12 sm:px-10`,children:[(0,O.jsxs)(`div`,{className:`mb-10 flex items-center gap-2.5 lg:hidden`,children:[(0,O.jsx)(Ue,{size:30}),(0,O.jsx)(He,{})]}),(0,O.jsxs)(`div`,{className:`animate-rise w-full max-w-[380px]`,children:[(0,O.jsx)(`h2`,{className:`font-display text-[30px] leading-tight font-medium tracking-[-0.02em]`,children:e}),(0,O.jsx)(`p`,{className:`mt-2 text-[14px] leading-relaxed text-ink-2`,children:t}),(0,O.jsx)(`div`,{className:`mt-8`,children:n})]}),(0,O.jsx)(Je,{compact:!0,className:`mt-12`,onChange:e=>void pe(e)})]})]})}function k({children:e}){return(0,O.jsx)(`p`,{role:`alert`,className:`rounded-[10px] bg-danger-soft px-3 py-2.5 text-[13px] text-danger`,children:e})}function nn({field:e,value:t,onChange:n,error:r,autoComplete:i,autoFocus:a,hint:o}){let{t:s}=u(`auth`),[c,l]=(0,D.useState)(!1);return(0,O.jsx)(E,{label:s(`fields.${e}.label`),type:c?`text`:`password`,autoComplete:i,spellCheck:!1,value:t,onChange:e=>n(e.target.value),error:r,hint:o,autoFocus:a,className:`[&_input]:font-mono`,trailing:(0,O.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`grid size-8 place-items-center rounded-[8px] text-ink-3 hover:bg-hover hover:text-ink`,"aria-label":s(c?`fields.${e}.hide`:`fields.${e}.show`),children:c?(0,O.jsx)(ze,{className:`size-4`}):(0,O.jsx)(Be,{className:`size-4`})})})}function rn({mode:e}){let{t}=u(`auth`),n=ae(),r=f(),[i]=se(),a=de(),[o,s]=(0,D.useState)(null),c=i.get(`next`)??`/`;async function l(){await a.invalidateQueries({queryKey:ce.me}),await a.invalidateQueries({queryKey:ce.access}),r(c,{replace:!0})}if(o)return(0,O.jsx)(tn,{title:t(`revealed.${o.kind}.title`),subtitle:t(`revealed.${o.kind}.subtitle`),children:(0,O.jsx)(Ye,{accessKey:o.accessKey,confirmLabel:t(`revealed.continue`),onDone:()=>void l(),children:o.reason&&(0,O.jsx)(cn,{reason:o.reason})})});if(!n.isFetchedAfterMount)return(0,O.jsx)(Ge,{});let d=n.data;if(d&&!d.user&&d.uninstalled)return(0,O.jsx)(ln,{details:d.uninstalled});if(d?.user)return(0,O.jsx)(h,{to:c,replace:!0});let p=!d||d.claimed,m=i.toString()?`?${i.toString()}`:``;return e===`login`&&!p?(0,O.jsx)(h,{to:`/setup${m}`,replace:!0}):e===`setup`&&p?(0,O.jsx)(h,{to:`/login${m}`,replace:!0}):e===`setup`?(0,O.jsx)(an,{onClaimed:e=>s({accessKey:e,kind:`setup`})}):(0,O.jsx)(on,{copy:{install:d&&!d.user?d.install:`source`,copyName:d&&!d.user?d.copyName:null},onSignedIn:()=>void l(),onRecovered:(e,t)=>s({accessKey:e,kind:`recovery`,reason:t})})}function an({onClaimed:e}){let{t}=u(`auth`),[n,r]=(0,D.useState)(``),[i,a]=(0,D.useState)(``),[o,s]=(0,D.useState)({}),[c,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(!1);async function h(r){r.preventDefault(),f(null);let a=l.safeParse({setupCode:n,name:i,locale:d()});if(a.success){s({}),m(!0);try{e((await me(`/auth/claim`,a.data)).accessKey)}catch(e){f(fe(e))}finally{m(!1)}}else{let e={};for(let n of a.error.issues){let r=String(n.path[0]);e[r]??=t(r===`setupCode`?`setup.missingSetupCode`:`setup.missingName`)}s(e)}}return(0,O.jsx)(tn,{title:t(`setup.title`),subtitle:t(`setup.subtitle`),children:(0,O.jsxs)(`form`,{onSubmit:h,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,O.jsx)(nn,{field:`setupCode`,value:n,onChange:r,error:o.setupCode,autoComplete:`off`,autoFocus:!0}),(0,O.jsx)(E,{label:t(`fields.name.label`),autoComplete:`name`,value:i,onChange:e=>a(e.target.value),error:o.name,hint:t(`fields.name.hint`),maxLength:80}),c&&(0,O.jsx)(k,{children:c}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,size:`lg`,loading:p,className:`mt-2 w-full`,children:t(`setup.submit`)})]})})}function on({copy:e,onSignedIn:t,onRecovered:n}){let{t:i}=u(`auth`),[a,o]=(0,D.useState)(``),[s,c]=(0,D.useState)(),[l,d]=(0,D.useState)(null),[f,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)(!1);async function g(e){e.preventDefault(),d(null);let n=r.safeParse({accessKey:a});if(!n.success)c(i(`login.missingAccessKey`));else{c(void 0),p(!0);try{await me(`/auth/login`,n.data),t()}catch(e){d(fe(e))}finally{p(!1)}}}return(0,O.jsxs)(tn,{title:i(`login.title`),subtitle:i(`login.subtitle`),children:[(0,O.jsxs)(`form`,{onSubmit:g,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,O.jsx)(nn,{field:`accessKey`,value:a,onChange:o,error:s,autoComplete:`current-password`,autoFocus:!0}),l&&(0,O.jsx)(k,{children:l}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,size:`lg`,loading:f,className:`mt-2 w-full`,children:i(`login.submit`)})]}),(0,O.jsx)(`div`,{className:`mt-6 text-center`,children:(0,O.jsx)(`button`,{type:`button`,onClick:()=>h(e=>!e),"aria-expanded":m,className:`text-[13.5px] font-medium text-ink-2 underline decoration-line-strong underline-offset-4 hover:text-ink hover:decoration-accent`,children:i(`login.lostKey`)})}),m&&(0,O.jsx)(sn,{copy:e,onRecovered:n})]})}function sn({copy:e,onRecovered:t}){let{t:n}=u(`auth`),r=(0,O.jsx)(`code`,{className:`font-mono text-[12px] text-ink`}),i=Qt[e.install],[a,o]=(0,D.useState)(``),[c,l]=(0,D.useState)(null),[d,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(!1);async function h(e){if(e.preventDefault(),f(null),!a.trim()){f(n(`recovery.missingSetupCode`));return}let r=b.safeParse({setupCode:a,reason:c});if(!r.success)f(n(`recovery.missingReason`));else{m(!0);try{t((await me(`/auth/recover`,r.data)).accessKey,r.data.reason)}catch(e){f(fe(e))}finally{m(!1)}}}return(0,O.jsxs)(`div`,{className:`mt-4 rounded-[14px] border border-line bg-sunken p-4 text-[13px] leading-relaxed text-ink-2`,children:[e.install===`cli`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:n(`recovery.cli`)}),(0,O.jsx)(en,{value:$t(`recover`,e.copyName)})]}),e.install===`button`&&(0,O.jsx)(`p`,{children:(0,O.jsx)(Ve,{t:n,i18nKey:`recovery.button`,values:{name:e.copyName??`orqevio`},components:{code:r}})}),e.install===`cloudflare`&&(0,O.jsx)(`p`,{children:(0,O.jsx)(Ve,{t:n,i18nKey:`recovery.cloudflare`,components:{code:r}})}),i&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:n(`recovery.intro`)}),(0,O.jsxs)(`ul`,{className:`mt-2 flex list-disc flex-col gap-1.5 pl-5`,children:[(0,O.jsxs)(`li`,{children:[n(`recovery.withCommand`),(0,O.jsx)(en,{value:i})]}),(0,O.jsx)(`li`,{children:(0,O.jsx)(Ve,{t:n,i18nKey:`recovery.withNewCode`,components:{code:r}})})]})]}),(0,O.jsx)(`p`,{className:`mt-2`,children:n(`recovery.vaultUnaffected`)}),(0,O.jsxs)(`form`,{onSubmit:h,className:`mt-4 flex flex-col gap-3`,noValidate:!0,children:[(0,O.jsx)(nn,{field:`newSetupCode`,value:a,onChange:o,autoComplete:`off`}),(0,O.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`legend`,{className:`mb-1 text-[13px] font-medium text-ink`,children:n(`recovery.reason.legend`)}),[`lost`,`compromised`].map(e=>(0,O.jsxs)(`label`,{className:s(`flex cursor-pointer items-start gap-3 rounded-[10px] border bg-sheet px-3 py-2.5`,c===e?`border-accent`:`border-line`),children:[(0,O.jsx)(`input`,{type:`radio`,name:`recovery-reason`,value:e,checked:c===e,onChange:()=>l(e),className:`mt-1 size-4 accent-[var(--accent)]`}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`span`,{className:`block text-[13px] font-medium text-ink`,children:n(`recovery.reason.${e}.label`)}),(0,O.jsx)(`span`,{className:`block text-[12.5px] text-ink-3`,children:n(`recovery.reason.${e}.hint`)})]})]},e))]}),d&&(0,O.jsx)(k,{children:d}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,loading:p,children:n(`recovery.submit`)})]})]})}function cn({reason:e}){let{t}=u(`auth`),n=ie(),r=Xe();if(e===`compromised`)return(0,O.jsx)(`p`,{className:`mt-4 rounded-[12px] border border-line bg-sunken px-3.5 py-3 text-[13px] text-ink-2`,children:t(`revealed.agents.revoked`)});let i=(n.data??[]).filter(e=>!e.revokedAt&&(!e.expiresAt||new Date(e.expiresAt)>new Date));return(0,O.jsxs)(`section`,{className:`mt-4`,"aria-labelledby":`recovered-agents`,children:[(0,O.jsx)(`h2`,{id:`recovered-agents`,className:`text-[13px] font-medium text-ink`,children:t(`revealed.agents.title`)}),n.data&&i.length===0?(0,O.jsx)(`p`,{className:`mt-1 text-[12.5px] text-ink-3`,children:t(`revealed.agents.none`)}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`mt-1 text-[12.5px] text-ink-3`,children:t(`revealed.agents.review`)}),(0,O.jsx)(`div`,{className:`mt-2 flex max-h-[320px] flex-col gap-2 overflow-y-auto`,children:i.map(e=>(0,O.jsx)(Ze,{token:e,onRevoke:()=>void r(e)},e.id))})]})]})}function ln({details:e}){let{t}=u([`auth`,`common`]),n=e.copyName??`orqevio`,r=e.bucket??`${n}-uploads`,i=e=>(0,O.jsx)(`ul`,{className:`mt-2 flex list-disc flex-col gap-1.5 pl-5`,children:e.map(e=>(0,O.jsx)(`li`,{children:t(`uninstalled.steps.${e}`,{name:n,bucket:r})},e))});return(0,O.jsx)(tn,{title:t(`uninstalled.title`),subtitle:t(`uninstalled.subtitle`),children:(0,O.jsxs)(`div`,{className:`rounded-[14px] border border-line bg-sunken p-4 text-[13px] leading-relaxed text-ink-2`,children:[e.install===`cli`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.cli`)}),(0,O.jsx)(en,{value:$t(`uninstall`,e.copyName)})]}),e.install===`button`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.button`)}),i([`worker`,`bucket`,`repository`,`token`])]}),e.install===`cloudflare`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.cloudflare`)}),i([`worker`,`bucket`])]}),e.install===`docker`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{children:t(`uninstalled.docker`)}),(0,O.jsx)(en,{value:`docker compose down -v`})]}),e.install===`source`&&(0,O.jsx)(`p`,{children:t(`uninstalled.source`)})]})})}var un=1,dn=.9,fn=.8,pn=.17,mn=.1,hn=.999,gn=.9999,_n=.99,vn=/[\\\/_+.#"@\[\(\{&]/,yn=/[\\\/_+.#"@\[\(\{&]/g,bn=/[\s-]/,xn=/[\s-]/g;function Sn(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?un:_n;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Sn(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=un:vn.test(e.charAt(l-1))?(d*=fn,p=e.slice(i,l-1).match(yn),p&&i>0&&(d*=hn**+p.length)):bn.test(e.charAt(l-1))?(d*=dn,m=e.slice(i,l-1).match(xn),m&&i>0&&(d*=hn**+m.length)):(d*=pn,i>0&&(d*=hn**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=gn)),(d<mn&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Sn(e,t,n,r,l+1,a+2,o),f*mn>d&&(d=f*mn)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Cn(e){return e.toLowerCase().replace(xn,` `)}function wn(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Sn(e,t,Cn(e),Cn(t),0,0,{})}var Tn=`[cmdk-group=""]`,En=`[cmdk-group-items=""]`,Dn=`[cmdk-group-heading=""]`,On=`[cmdk-item=""]`,kn=`${On}:not([aria-disabled="true"])`,An=`cmdk-item-select`,jn=`data-value`,Mn=(e,t,n)=>wn(e,t,n),Nn=D.createContext(void 0),Pn=()=>D.useContext(Nn),Fn=D.createContext(void 0),In=()=>D.useContext(Fn),Ln=D.createContext(void 0),Rn=D.forwardRef((e,t)=>{let n=Zn(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Zn(()=>new Set),i=Zn(()=>new Map),a=Zn(()=>new Map),o=Zn(()=>new Set),s=Yn(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=xe(),y=xe(),b=xe(),ee=D.useRef(null),te=er();Xn(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,x.emit()}},[u]),Xn(()=>{te(6,oe)},[]);let x=D.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)ae(),re(),te(1,ie);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(te(7,()=>{n.current.selectedItemId=se()?.id,x.emit()}),r||te(5,oe),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}x.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),ne=D.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,S(t,r)),te(2,()=>{re(),x.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),te(3,()=>{ae(),re(),n.current.value||ie(),x.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=se();te(4,()=>{ae(),t?.getAttribute(`id`)===e&&ie(),x.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:ee}),[]);function S(e,t){let r=s.current?.filter??Mn;return e?r(e,n.current.search,t):0}function re(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=ee.current;ce().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(En);t?t.appendChild(e.parentElement===t?e:e.closest(`${En} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${En} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=ee.current?.querySelector(`${Tn}[${jn}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function ie(){let e=ce().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(jn);x.setState(`value`,e||void 0)}function ae(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=S(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function oe(){var e;let t=se();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Tn)?.querySelector(Dn))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function se(){return ee.current?.querySelector(`${On}[aria-selected="true"]`)}function ce(){return Array.from(ee.current?.querySelectorAll(kn)||[])}function le(e){let t=ce()[e];t&&x.setState(`value`,t.getAttribute(jn))}function ue(e){var t;let n=se(),r=ce(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&x.setState(`value`,a.getAttribute(jn))}function de(e){let t=se()?.closest(Tn),n;for(;t&&!n;)t=e>0?qn(t,Tn):Jn(t,Tn),n=t?.querySelector(kn);n?x.setState(`value`,n.getAttribute(jn)):ue(e)}let fe=()=>le(ce().length-1),pe=e=>{e.preventDefault(),e.metaKey?fe():e.altKey?de(1):ue(1)},me=e=>{e.preventDefault(),e.metaKey?le(0):e.altKey?de(-1):ue(-1)};return D.createElement(_e.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&pe(e);break;case`ArrowDown`:pe(e);break;case`p`:case`k`:g&&e.ctrlKey&&me(e);break;case`ArrowUp`:me(e);break;case`Home`:e.preventDefault(),le(0);break;case`End`:e.preventDefault(),fe();break;case`Enter`:{e.preventDefault();let t=se();if(t){let e=new Event(An);t.dispatchEvent(e)}}}}},D.createElement(`label`,{"cmdk-label":``,htmlFor:ne.inputId,id:ne.labelId,style:rr},c),nr(e,e=>D.createElement(Fn.Provider,{value:x},D.createElement(Nn.Provider,{value:ne},e))))}),zn=D.forwardRef((e,t)=>{let n=xe(),r=D.useRef(null),i=D.useContext(Ln),a=Pn(),o=Yn(e),s=o.current?.forceMount??i?.forceMount;Xn(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=$n(n,r,[e.value,e.children,r],e.keywords),l=In(),u=Qn(e=>e.value&&e.value===c.current),d=Qn(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);D.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(An,f),()=>t.removeEventListener(An,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return D.createElement(_e.div,{ref:ve(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Bn=D.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=xe(),s=D.useRef(null),c=D.useRef(null),l=xe(),u=Pn(),d=Qn(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));Xn(()=>u.group(o),[]),$n(o,s,[e.value,e.heading,c]);let f=D.useMemo(()=>({id:o,forceMount:i}),[i]);return D.createElement(_e.div,{ref:ve(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&D.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),nr(e,e=>D.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},D.createElement(Ln.Provider,{value:f},e))))}),Vn=D.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=D.useRef(null),a=Qn(e=>!e.search);return!n&&!a?null:D.createElement(_e.div,{ref:ve(i,t),...r,"cmdk-separator":``,role:`separator`})}),Hn=D.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=In(),o=Qn(e=>e.search),s=Qn(e=>e.selectedItemId),c=Pn();return D.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),D.createElement(_e.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Un=D.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=D.useRef(null),o=D.useRef(null),s=Qn(e=>e.selectedItemId),c=Pn();return D.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),D.createElement(_e.div,{ref:ve(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},nr(e,e=>D.createElement(`div`,{ref:ve(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Wn=D.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return D.createElement(Te,{open:n,onOpenChange:r},D.createElement(je,{container:o},D.createElement(ke,{"cmdk-overlay":``,className:i}),D.createElement(T,{"aria-label":e.label,"cmdk-dialog":``,className:a},D.createElement(Rn,{ref:t,...s}))))}),Gn=D.forwardRef((e,t)=>Qn(e=>e.filtered.count===0)?D.createElement(_e.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Kn=D.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return D.createElement(_e.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},nr(e,e=>D.createElement(`div`,{"aria-hidden":!0},e)))}),A=Object.assign(Rn,{List:Un,Item:zn,Input:Hn,Group:Bn,Separator:Vn,Dialog:Wn,Empty:Gn,Loading:Kn});function qn(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Jn(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Yn(e){let t=D.useRef(e);return Xn(()=>{t.current=e}),t}var Xn=typeof window>`u`?D.useEffect:D.useLayoutEffect;function Zn(e){let t=D.useRef();return t.current===void 0&&(t.current=e()),t}function Qn(e){let t=In(),n=()=>e(t.snapshot());return D.useSyncExternalStore(t.subscribe,n,n)}function $n(e,t,n,r=[]){let i=D.useRef(),a=Pn();return Xn(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(jn,s),i.current=s}),i}var er=()=>{let[e,t]=D.useState(),n=Zn(()=>new Map);return Xn(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function tr(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function nr({asChild:e,children:t},n){return e&&D.isValidElement(t)?D.cloneElement(tr(t),{ref:t.ref},n(t.props.children)):n(t)}var rr={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},ir=e=>e.normalize(`NFD`).replace(/\p{M}/gu,``).toLowerCase(),ar=(e,t,n)=>Mn(ir(e),ir(t),n?.map(ir));function or({open:e,onOpenChange:t}){let{t:n}=u([`shell`,`common`]),{workspaceId:r,overview:i,openNewProject:a}=Se(),o=f(),s=dt(),[c,l]=(0,D.useState)(``),[d,m]=(0,D.useState)(``),h=g(r,d),_=`/w/${r}`;(0,D.useEffect)(()=>{let e=setTimeout(()=>m(c),160);return()=>clearTimeout(e)},[c]),(0,D.useEffect)(()=>{e||l(``)},[e]);let v=e=>{t(!1),o(e)},y=e=>{t(!1),e()},b=i?.projects??[],ee=(h.data??[]).filter(()=>d.trim().length>=2),te=document.documentElement.dataset.theme===`dark`;return(0,O.jsx)(Te,{open:e,onOpenChange:t,children:(0,O.jsxs)(je,{children:[(0,O.jsx)(ke,{className:`fixed inset-0 z-40 bg-[rgb(20_18_14/0.28)] backdrop-blur-[2px] data-[state=open]:animate-[overlay-in_0.15s_ease-out]`}),(0,O.jsxs)(T,{"aria-label":n(`palette.label`),className:`fixed top-[14vh] left-1/2 z-50 w-[calc(100vw-32px)] max-w-[620px] -translate-x-1/2 overflow-hidden rounded-[18px] border border-line bg-sheet shadow-lg outline-none data-[state=open]:animate-[pop_0.18s_var(--ease-out-quint)]`,children:[(0,O.jsx)(C,{className:`sr-only`,children:n(`palette.title`)}),(0,O.jsx)(Ee,{className:`sr-only`,children:n(`palette.description`)}),(0,O.jsxs)(A,{label:n(`palette.label`),loop:!0,filter:ar,className:`flex max-h-[min(70vh,560px)] flex-col`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-line px-4`,children:[(0,O.jsx)(lt,{className:`size-[18px] shrink-0 text-ink-3`}),(0,O.jsx)(A.Input,{value:c,onValueChange:l,placeholder:n(`palette.placeholder`),className:`h-14 flex-1 bg-transparent text-[15.5px] outline-none placeholder:text-ink-3`}),(0,O.jsx)(`kbd`,{className:`kbd`,children:`esc`})]}),(0,O.jsxs)(A.List,{className:`min-h-0 flex-1 overflow-y-auto p-2 [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:pt-2.5 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:tracking-[0.08em] [&_[cmdk-group-heading]]:text-ink-3 [&_[cmdk-group-heading]]:uppercase`,children:[(0,O.jsx)(A.Empty,{className:`px-4 py-10 text-center text-[13.5px] text-ink-3`,children:h.isFetching?n(`palette.searching`):n(`palette.noResults`)}),ee.length>0&&(0,O.jsx)(A.Group,{heading:n(`palette.inContent`),children:ee.map(e=>(0,O.jsxs)(sr,{value:`content ${e.type} ${e.id} ${e.title}`,keywords:[d],icon:e.type===`card`?(0,O.jsx)(at,{}):e.icon?(0,O.jsx)(`span`,{className:`text-[14px]`,children:e.icon}):(0,O.jsx)(it,{}),onSelect:()=>v(e.type===`card`?`${_}/b/${e.boardId}?card=${e.id}`:`${_}/d/${e.id}`),hint:e.type===`card`?`${e.boardName} · ${e.columnName}`:e.projectName,children:[(0,O.jsx)(`span`,{className:`block truncate`,children:e.title||n(`common:untitled`)}),e.excerpt&&(0,O.jsx)(`span`,{className:`block truncate text-[12px] text-ink-3`,children:e.excerpt})]},`${e.type}-${e.id}`))}),(0,O.jsxs)(A.Group,{heading:n(`palette.navigate`),children:[(0,O.jsx)(sr,{value:n(`palette.keywords.home`),icon:(0,O.jsx)(Lt,{}),onSelect:()=>v(_),children:n(`nav.home`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.vault`),icon:(0,O.jsx)(st,{}),onSelect:()=>v(`${_}/vault`),children:n(`nav.vault`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.agents`),icon:(0,O.jsx)(rt,{}),onSelect:()=>v(`${_}/agents`),children:n(`nav.agents`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.settings`),icon:(0,O.jsx)(Gt,{}),onSelect:()=>v(`${_}/settings`),children:n(`user.settings`)})]}),b.length>0&&(0,O.jsxs)(A.Group,{heading:n(`palette.structure`),children:[b.map(e=>(0,O.jsx)(sr,{value:`${n(`palette.keywords.project`)} ${e.name} ${e.id}`,icon:(0,O.jsx)(ot,{}),onSelect:()=>v(`${_}/p/${e.id}`),hint:n(`palette.project`),children:e.name},e.id)),b.flatMap(e=>e.boards.map(t=>(0,O.jsx)(sr,{value:`${n(`palette.keywords.board`)} ${t.name} ${e.name} ${t.id}`,icon:(0,O.jsx)(at,{}),onSelect:()=>v(`${_}/b/${t.id}`),hint:e.name,children:t.name},t.id))),b.flatMap(e=>e.pages.map(t=>(0,O.jsx)(sr,{value:`${n(`palette.keywords.page`)} ${t.title||n(`common:untitled`)} ${e.name} ${t.id}`,icon:t.icon?(0,O.jsx)(`span`,{className:`text-[14px]`,children:t.icon}):(0,O.jsx)(it,{}),onSelect:()=>v(`${_}/d/${t.id}`),hint:e.name,children:t.title||n(`common:untitled`)},t.id)))]}),(0,O.jsxs)(A.Group,{heading:n(`palette.actions`),children:[(0,O.jsx)(sr,{value:n(`palette.keywords.newProject`),icon:(0,O.jsx)(ct,{}),onSelect:()=>y(a),children:n(`palette.newProject`)}),(0,O.jsx)(sr,{value:n(`palette.keywords.theme`),icon:te?(0,O.jsx)(qt,{}):(0,O.jsx)(Ut,{}),onSelect:()=>y(()=>{let e=te?`light`:`dark`;Re(e),p(`/account`,{theme:e}).catch(()=>{})}),children:n(te?`palette.lightTheme`:`palette.darkTheme`)}),!s&&(0,O.jsx)(sr,{value:n(`palette.keywords.lockVault`),icon:(0,O.jsx)(st,{}),onSelect:()=>y(ut),children:n(`palette.lockVault`)})]})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-4 border-t border-line px-4 py-2 text-[11.5px] text-ink-3`,children:[(0,O.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`kbd`,{className:`kbd`,children:`↑`}),(0,O.jsx)(`kbd`,{className:`kbd`,children:`↓`}),` `,n(`palette.hintNavigate`)]}),(0,O.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`kbd`,{className:`kbd`,children:`↵`}),` `,n(`palette.hintOpen`)]}),h.isFetching&&(0,O.jsx)(`span`,{className:`ml-auto`,children:n(`palette.searching`)})]})]})]})]})})}function sr({value:e,icon:t,children:n,onSelect:r,hint:i,keywords:a}){return(0,O.jsxs)(A.Item,{value:e,keywords:a,onSelect:r,className:`flex min-h-10 cursor-default items-center gap-3 rounded-[10px] px-2.5 py-1.5 text-[13.5px] text-ink outline-none select-none data-[selected=true]:bg-hover [&>svg]:size-[16px] [&>svg]:shrink-0 [&>svg]:text-ink-3`,children:[(0,O.jsx)(`span`,{className:`grid size-[18px] shrink-0 place-items-center text-ink-3 [&>svg]:size-[16px]`,children:t}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1`,children:n}),i&&(0,O.jsx)(`span`,{className:`max-w-[40%] shrink-0 truncate text-[12px] text-ink-3`,children:i})]})}function cr({open:e,onOpenChange:t}){let{t:n}=u([`shell`,`common`]),{workspaceId:r}=Se(),i=f(),[a,o]=(0,D.useState)(``),[s,l]=(0,D.useState)(`cobalt`),[p,m]=(0,D.useState)(!0),[h,g]=(0,D.useState)(!1);async function _(e){if(e.preventDefault(),a.trim()){g(!0);try{let e=await me(`/workspaces/${r}/projects`,{name:a.trim(),color:s}),c=`/w/${r}/p/${e.id}`;if(p){let t=await me(`/projects/${e.id}/boards`,{name:n(`newProject.boardName`)});c=`/w/${r}/b/${t.id}`}await ne.invalidateQueries({queryKey:ce.overview(r)}),t(!1),o(``),i(c)}catch(e){w.error(fe(e))}finally{g(!1)}}}return(0,O.jsx)(Oe,{open:e,onOpenChange:t,title:n(`newProject.title`),description:n(`newProject.description`),children:(0,O.jsxs)(`form`,{onSubmit:_,className:`flex flex-col gap-5`,children:[(0,O.jsx)(E,{label:n(`newProject.name`),value:a,onChange:e=>o(e.target.value),placeholder:n(`newProject.namePlaceholder`),maxLength:80,autoFocus:!0}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`span`,{className:`text-[12.5px] font-medium text-ink-2`,children:n(`newProject.color`)}),(0,O.jsx)(ft,{value:s,onChange:l})]}),(0,O.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 rounded-[12px] border border-line bg-surface p-3`,children:[(0,O.jsx)(pt,{checked:p,onChange:m,label:n(`newProject.withBoard`),className:`mt-0.5`}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`span`,{className:`block text-[13.5px] font-medium`,children:n(`newProject.startWithBoard`)}),(0,O.jsx)(`span`,{className:`block text-[12.5px] text-ink-3`,children:n(`newProject.boardHint`,{columns:mt(c[d()].map(e=>n(`common:quoted`,{text:e})))})})]})]}),(0,O.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,O.jsx)(Ke,{variant:`ghost`,onClick:()=>t(!1),children:n(`common:actions.cancel`)}),(0,O.jsx)(Ke,{type:`submit`,variant:`primary`,loading:h,disabled:!a.trim(),children:n(`newProject.create`)})]})]})})}function lr(){let{t:e}=u([`shell`,`common`]),{workspaceId:t,overview:n,openPalette:r,openNewProject:i}=Se(),a=tt(),o=dt(),s=`/w/${t}`;return(0,O.jsxs)(`nav`,{"aria-label":e(`nav.label`),className:`flex h-full flex-col px-2.5 pt-2.5 pb-2`,children:[(0,O.jsx)(fr,{live:a}),(0,O.jsxs)(`button`,{type:`button`,onClick:r,className:`mt-2 flex h-8.5 items-center gap-2 rounded-[9px] border border-line bg-surface/70 px-2.5 text-[13px] text-ink-3 shadow-sm transition-colors hover:border-line-strong hover:text-ink-2`,children:[(0,O.jsx)(lt,{className:`size-[15px]`}),(0,O.jsx)(`span`,{className:`flex-1 text-left`,children:e(`nav.search`)}),(0,O.jsx)(ye,{keys:[`mod`,`K`]})]}),(0,O.jsxs)(`div`,{className:`mt-3 flex flex-col gap-px`,children:[(0,O.jsx)(dr,{to:s,end:!0,icon:(0,O.jsx)(Lt,{}),children:e(`nav.home`)}),(0,O.jsx)(dr,{to:`${s}/vault`,icon:(0,O.jsx)(st,{}),trailing:(0,O.jsx)(ur,{locked:o}),children:e(`nav.vault`)}),(0,O.jsx)(dr,{to:`${s}/agents`,icon:(0,O.jsx)(rt,{}),trailing:a?(0,O.jsx)(`span`,{className:`live-dot mr-1`,"aria-label":e(`nav.agentLive`)}):null,children:e(`nav.agents`)})]}),(0,O.jsxs)(`div`,{className:`mt-5 flex items-center justify-between pr-1 pl-2.5`,children:[(0,O.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`nav.projects`)}),(0,O.jsx)(Ce,{label:e(`nav.newProject`),children:(0,O.jsx)(`button`,{type:`button`,onClick:i,"aria-label":e(`nav.newProject`),className:`grid size-6 place-items-center rounded-[7px] text-ink-3 hover:bg-hover hover:text-ink`,children:(0,O.jsx)(ct,{className:`size-[15px]`})})})]}),(0,O.jsx)(`div`,{className:`-mx-1 mt-1 min-h-0 flex-1 overflow-y-auto px-1 pb-4`,children:n?n.projects.length?n.projects.map(e=>(0,O.jsx)(mr,{project:e},e.id)):(0,O.jsxs)(`button`,{type:`button`,onClick:i,className:`mt-1 w-full rounded-[10px] border border-dashed border-line-strong px-3 py-4 text-left text-[12.5px] text-ink-3 transition-colors hover:border-ink-3 hover:text-ink-2`,children:[(0,O.jsx)(`span`,{className:`block font-medium text-ink-2`,children:e(`nav.firstProject.title`)}),e(`nav.firstProject.body`)]}):(0,O.jsxs)(`div`,{className:`flex flex-col gap-2 px-2 pt-2`,children:[(0,O.jsx)(`div`,{className:`skeleton h-5 w-3/4`}),(0,O.jsx)(`div`,{className:`skeleton h-5 w-2/3`}),(0,O.jsx)(`div`,{className:`skeleton h-5 w-4/5`})]})}),(0,O.jsx)(_r,{})]})}function ur({locked:e}){let{t}=u([`shell`,`common`]);return(0,O.jsx)(`span`,{className:s(`mr-1 size-1.5 rounded-full transition-colors`,e?`bg-ink-4`:`bg-ok`),"aria-label":t(e?`nav.vaultLocked`:`nav.vaultUnlocked`),title:t(e?`nav.vaultLocked`:`nav.vaultUnlocked`)})}function dr({to:e,end:t,icon:r,children:i,trailing:a}){return(0,O.jsxs)(n,{to:e,end:t,className:({isActive:e})=>s(`group relative flex h-8 items-center gap-2.5 rounded-[8px] px-2.5 text-[13.5px] transition-colors [&>svg]:size-[16px] [&>svg]:shrink-0`,e?`bg-surface font-medium text-ink shadow-sm [&>svg]:text-accent`:`text-ink-2 hover:bg-hover hover:text-ink [&>svg]:text-ink-3`),children:[r,(0,O.jsx)(`span`,{className:`flex-1 truncate`,children:i}),a]})}function fr({live:e}){let{t}=u([`shell`,`common`]),{me:n,workspaceId:r}=Se(),i=f(),a=Ne(),o=de(),s=n.workspaces.find(e=>e.id===r);async function c(){let e=await a({title:t(`workspace.new`),description:t(`workspace.newDescription`),label:t(`workspace.name`),confirmLabel:t(`workspace.create`),maxLength:60});if(e)try{let t=await me(`/workspaces`,{name:e});await o.invalidateQueries({queryKey:ce.me}),i(`/w/${t.id}`)}catch(e){w.error(fe(e))}}return(0,O.jsxs)(xt,{children:[(0,O.jsx)(_t,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,className:`flex h-10 items-center gap-2.5 rounded-[10px] px-1.5 text-left transition-colors hover:bg-hover data-[state=open]:bg-hover`,children:[(0,O.jsx)(Ue,{size:28,live:e}),(0,O.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`span`,{className:`block truncate text-[13.5px] leading-tight font-semibold`,children:s?.name??t(`workspace.fallback`)}),(0,O.jsx)(`span`,{className:`block text-[11.5px] leading-tight text-ink-3`,children:`Orqevio`})]}),(0,O.jsx)(Ft,{className:`size-[14px] text-ink-3`})]})}),(0,O.jsxs)(wt,{align:`start`,className:`w-[240px]`,children:[(0,O.jsx)(St,{children:t(`workspace.heading`)}),n.workspaces.map(e=>(0,O.jsx)(bt,{onSelect:()=>i(`/w/${e.id}`),icon:(0,O.jsx)(`span`,{className:`glyph c-slate size-5 text-[11px]`,children:e.name[0]?.toUpperCase()}),children:(0,O.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsx)(`span`,{className:`truncate`,children:e.name}),e.id===r&&(0,O.jsx)(ht,{className:`size-[14px] text-accent`})]})},e.id)),(0,O.jsx)(Ct,{}),(0,O.jsx)(bt,{icon:(0,O.jsx)(ct,{}),onSelect:c,children:t(`workspace.new`)}),(0,O.jsx)(bt,{icon:(0,O.jsx)(Gt,{}),onSelect:()=>i(`/w/${r}/settings`),children:t(`workspace.settings`)})]})]})}function pr(e,t){let[n,r]=(0,D.useState)(()=>Ie(`expanded`,{})[e]??t);return[n,t=>{let i=t??!n;r(i);let a=Ie(`expanded`,{});a[e]=i,Le(`expanded`,a)}]}function mr({project:e}){let{t}=u([`shell`,`common`]),{workspaceId:r}=Se(),i=y(),a=Pe(r),[o,c]=pr(e.id,!0),[l,d]=(0,D.useState)(!1),f=`/w/${r}`,p=e.pages.filter(e=>e.parentId===null),m=i.pathname===`${f}/p/${e.id}`;return(0,O.jsxs)(`div`,{className:`mt-0.5`,children:[(0,O.jsxs)(`div`,{className:s(`group flex h-8 items-center gap-1 rounded-[8px] pr-1 transition-colors`,m?`bg-surface shadow-sm`:`hover:bg-hover`),children:[(0,O.jsx)(`button`,{type:`button`,onClick:()=>c(),"aria-label":t(o?`project.collapse`:`project.expand`,{name:e.name}),"aria-expanded":o,className:`grid size-6 shrink-0 place-items-center rounded-[6px] text-ink-4 hover:text-ink`,children:(0,O.jsx)(Nt,{className:s(`size-[13px] transition-transform duration-200`,o&&`rotate-90`)})}),(0,O.jsxs)(n,{to:`${f}/p/${e.id}`,className:`flex min-w-0 flex-1 items-center gap-2 py-1 text-[13.5px]`,children:[(0,O.jsx)(`span`,{className:s(`glyph size-[18px] text-[10.5px]`,`c-${e.color}`),children:e.name[0]?.toUpperCase()}),(0,O.jsx)(`span`,{className:s(`truncate`,m?`font-medium text-ink`:`text-ink-2 group-hover:text-ink`),children:e.name})]}),(0,O.jsxs)(xt,{children:[(0,O.jsx)(_t,{asChild:!0,children:(0,O.jsx)(`button`,{type:`button`,"aria-label":t(`project.actions`,{name:e.name}),className:`grid size-6 place-items-center rounded-[6px] text-ink-3 opacity-0 group-hover:opacity-100 hover:bg-press hover:text-ink focus-visible:opacity-100 data-[state=open]:opacity-100`,children:(0,O.jsx)(yt,{className:`size-[15px]`})})}),(0,O.jsxs)(wt,{align:`start`,children:[(0,O.jsx)(bt,{icon:(0,O.jsx)(at,{}),onSelect:()=>void a.createBoard(e.id),children:t(`project.newBoard`)}),(0,O.jsx)(bt,{icon:(0,O.jsx)(it,{}),onSelect:()=>void a.createPage(e.id),children:t(`project.newPage`)}),(0,O.jsx)(Ct,{}),(0,O.jsx)(bt,{icon:(0,O.jsx)(Et,{}),onSelect:()=>d(!0),children:t(`project.rename`)}),(0,O.jsx)(bt,{icon:(0,O.jsx)(Tt,{}),danger:!0,onSelect:()=>void a.deleteProject(e),children:t(`project.delete`)})]})]}),(0,O.jsx)(Ce,{label:t(`project.newPage`),children:(0,O.jsx)(`button`,{type:`button`,onClick:()=>void a.createPage(e.id),"aria-label":t(`project.newPageIn`,{name:e.name}),className:`grid size-6 place-items-center rounded-[6px] text-ink-3 opacity-0 group-hover:opacity-100 hover:bg-press hover:text-ink focus-visible:opacity-100`,children:(0,O.jsx)(ct,{className:`size-[15px]`})})})]}),o&&(0,O.jsxs)(`div`,{className:`relative ml-[13px] border-l border-line pl-1.5`,children:[e.boards.map(e=>(0,O.jsx)(hr,{to:`${f}/b/${e.id}`,icon:(0,O.jsx)(at,{}),label:e.name,trailing:e.cardCount?(0,O.jsx)(`span`,{className:`font-mono text-[10.5px] text-ink-3`,children:e.cardCount}):null},e.id)),p.map(t=>(0,O.jsx)(gr,{page:t,all:e.pages,projectId:e.id,depth:0},t.id)),e.boards.length===0&&p.length===0&&(0,O.jsx)(`p`,{className:`px-2 py-1.5 text-[12px] text-ink-3`,children:t(`project.empty`)})]}),(0,O.jsx)(Dt,{project:e,open:l,onOpenChange:d})]})}function hr({to:e,icon:t,label:r,trailing:i,onToggle:a,expanded:o,hasChildren:c,extra:l}){let{t:d}=u(`shell`);return(0,O.jsxs)(n,{to:e,className:({isActive:e})=>s(`group/tree relative flex h-7.5 items-center gap-2 rounded-[7px] pr-1 pl-1.5 text-[13px] transition-colors [&>svg]:size-[14px] [&>svg]:shrink-0`,e?`bg-surface font-medium text-ink shadow-sm [&>svg]:text-accent`:`text-ink-2 hover:bg-hover hover:text-ink [&>svg]:text-ink-3`),children:[c?(0,O.jsx)(`span`,{role:`button`,tabIndex:-1,"aria-label":d(o?`tree.collapse`:`tree.expand`),onClick:e=>{e.preventDefault(),e.stopPropagation(),a?.()},className:`-ml-0.5 grid size-4 shrink-0 place-items-center rounded-[4px] text-ink-4 hover:text-ink`,children:(0,O.jsx)(Nt,{className:s(`size-[11px] transition-transform`,o&&`rotate-90`)})}):null,t,(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:r}),l,i]})}function gr({page:e,all:t,projectId:n,depth:r}){let{t:i}=u([`shell`,`common`]),{workspaceId:a}=Se(),o=Pe(a),s=t.filter(t=>t.parentId===e.id),[c,l]=pr(e.id,!1);return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(hr,{to:`/w/${a}/d/${e.id}`,icon:e.icon?(0,O.jsx)(`span`,{className:`w-[14px] text-center text-[13px] leading-none`,children:e.icon}):(0,O.jsx)(it,{}),label:e.title||i(`common:untitled`),hasChildren:s.length>0,expanded:c,onToggle:()=>l(),extra:(0,O.jsx)(`span`,{role:`button`,tabIndex:-1,"aria-label":i(`tree.newSubpage`),title:i(`tree.newSubpage`),onClick:t=>{t.preventDefault(),t.stopPropagation(),l(!0),o.createPage(n,e.id)},className:`grid size-5 shrink-0 place-items-center rounded-[5px] text-ink-3 opacity-0 group-hover/tree:opacity-100 hover:bg-press hover:text-ink`,children:(0,O.jsx)(ct,{className:`size-[13px]`})})}),c&&s.length>0&&r<12&&(0,O.jsx)(`div`,{className:`ml-[11px] border-l border-line pl-1.5`,children:s.map(e=>(0,O.jsx)(gr,{page:e,all:t,projectId:n,depth:r+1},e.id))})]})}function _r(){let{t:e}=u([`shell`,`common`]),{me:t,workspaceId:n}=Se(),r=x().data?.updateAvailable??!1,i=f(),a=de(),[o,s]=(0,D.useState)(t.user.theme);async function c(e){let t=e;s(t),Re(t);try{await p(`/account`,{theme:t}),await a.invalidateQueries({queryKey:ce.me})}catch{}}async function l(){await me(`/auth/logout`).catch(()=>{}),ut(),a.clear(),i(`/login`,{replace:!0})}return(0,O.jsxs)(xt,{children:[(0,O.jsx)(_t,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,className:`flex h-10 items-center gap-2.5 rounded-[10px] px-1.5 text-left transition-colors hover:bg-hover data-[state=open]:bg-hover`,children:[(0,O.jsxs)(`span`,{className:`relative`,children:[(0,O.jsx)(Qe,{name:t.user.name,size:26}),r&&(0,O.jsx)(`span`,{"aria-label":e(`user.updateAvailable`),className:`absolute -top-0.5 -right-0.5 size-2.5 rounded-full bg-accent ring-2 ring-desk`})]}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] leading-tight font-medium`,children:t.user.name})]})}),(0,O.jsxs)(wt,{align:`start`,side:`top`,className:`w-[240px]`,children:[(0,O.jsx)(bt,{icon:(0,O.jsx)(Gt,{}),onSelect:()=>i(`/w/${n}/settings`),children:(0,O.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[e(`user.settings`),r&&(0,O.jsx)(`span`,{className:`rounded-full bg-accent-soft px-1.5 py-px text-[11px] font-medium text-accent`,children:e(`user.newVersion`)})]})}),(0,O.jsx)(Ct,{}),(0,O.jsx)(St,{children:e(`user.appearance`)}),(0,O.jsxs)(vt,{value:o,onValueChange:c,children:[(0,O.jsx)(gt,{value:`system`,icon:(0,O.jsx)(Vt,{}),children:e(`user.theme.system`)}),(0,O.jsx)(gt,{value:`light`,icon:(0,O.jsx)(qt,{}),children:e(`user.theme.light`)}),(0,O.jsx)(gt,{value:`dark`,icon:(0,O.jsx)(Ut,{}),children:e(`user.theme.dark`)})]}),(0,O.jsx)(Ct,{}),(0,O.jsx)(bt,{icon:(0,O.jsx)(zt,{}),onSelect:l,children:e(`user.signOut`)})]})]})}var vr=()=>typeof window<`u`&&window.matchMedia(`(min-width: 900px)`).matches;function yr(){let{t:e}=u(),{wid:t}=re(),n=ee(),r=ue(t),i=y(),a=f(),[o,c]=(0,D.useState)(()=>vr()?Ie(`sidebar`,!0):!1),[l,d]=(0,D.useState)(!1),[p,m]=(0,D.useState)(!1);et(t,n.data?.user.id),(0,D.useEffect)(()=>{t&&Le(`workspace`,t)},[t]),(0,D.useEffect)(()=>{let e=n.data?.user.theme;e&&e!==Fe()&&Re(e)},[n.data?.user.theme]),(0,D.useEffect)(()=>{vr()||c(!1)},[i.pathname]),(0,D.useEffect)(()=>{let e=e=>{let t=e.metaKey||e.ctrlKey;e.key===`Escape`&&!vr()&&c(!1),t&&e.key.toLowerCase()===`k`?(e.preventDefault(),d(e=>!e)):t&&e.key===`\\`&&(e.preventDefault(),c(e=>(vr()&&Le(`sidebar`,!e),!e)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,D.useEffect)(()=>(nt(n=>{w($e(n),{id:`agent-${n.actor.id}`,icon:(0,O.jsx)(Qe,{name:n.actor.name,kind:`agent`,size:22}),duration:3500,action:n.cardId&&n.action!==`card.archived`?{label:e(`actions.view`),onClick:()=>a(`/card/${n.cardId}`)}:n.pageId?{label:e(`actions.view`),onClick:()=>a(`/w/${t}/d/${n.pageId}`)}:void 0})}),()=>nt(null)),[a,t,e]);let g=(0,D.useMemo)(()=>n.data&&t?{workspaceId:t,me:n.data,overview:r.data,sidebarOpen:o,toggleSidebar:()=>c(e=>(vr()&&Le(`sidebar`,!e),!e)),openPalette:()=>d(!0),openNewProject:()=>m(!0)}:null,[n.data,t,r.data,o]);return n.isPending?(0,O.jsx)(Ge,{}):n.error?n.error instanceof v&&n.error.status===401?(0,O.jsx)(h,{to:`/login?next=${encodeURIComponent(i.pathname+i.search)}`,replace:!0}):(0,O.jsx)(Ge,{}):g?n.data.workspaces.some(e=>e.id===t)?(0,O.jsxs)(we.Provider,{value:g,children:[(0,O.jsx)(`a`,{href:`#main`,className:`sr-only focus:not-sr-only focus:fixed focus:top-3 focus:left-3 focus:z-[60] focus:rounded-[8px] focus:bg-ink focus:px-3 focus:py-2 focus:text-sheet`,children:e(`skipToContent`)}),(0,O.jsxs)(`div`,{className:`flex h-dvh overflow-hidden bg-desk`,children:[(0,O.jsx)(`div`,{"aria-hidden":`true`,onClick:()=>c(!1),className:s(`fixed inset-0 z-30 bg-[rgb(20_18_14/0.3)] transition-opacity duration-300 min-[900px]:hidden`,o?`opacity-100`:`pointer-events-none opacity-0`)}),(0,O.jsx)(`div`,{className:s(`z-40 shrink-0 transition-[width,transform] duration-300 ease-[var(--ease-out-quint)]`,`max-[899px]:fixed max-[899px]:inset-y-0 max-[899px]:left-0 max-[899px]:w-[272px] max-[899px]:bg-desk max-[899px]:shadow-lg`,o?`max-[899px]:translate-x-0 min-[900px]:w-[260px]`:`max-[899px]:-translate-x-full min-[900px]:w-0`),children:(0,O.jsx)(`div`,{className:s(`h-full w-[260px] max-[899px]:w-[272px]`,!o&&`min-[900px]:invisible`),children:(0,O.jsx)(lr,{})})}),(0,O.jsx)(`main`,{id:`main`,className:s(`sheet relative my-2 mr-2 flex min-w-0 flex-1 flex-col overflow-hidden rounded-[16px] max-[899px]:m-0 max-[899px]:rounded-none`,!o&&`min-[900px]:ml-2`),children:(0,O.jsx)(le,{})})]}),(0,O.jsx)(or,{open:l,onOpenChange:d}),(0,O.jsx)(cr,{open:p,onOpenChange:m})]}):(0,O.jsx)(We,{standalone:!0}):(0,O.jsx)(Ge,{})}function br(){let e=ee();if(e.isPending)return(0,O.jsx)(Ge,{});if(e.isError||!e.data)return(0,O.jsx)(h,{to:`/login`,replace:!0});let t=Ie(`workspace`,null),n=e.data.workspaces.find(e=>e.id===t)??e.data.workspaces[0];return n?(0,O.jsx)(h,{to:`/w/${n.id}`,replace:!0}):(0,O.jsx)(h,{to:`/login`,replace:!0})}function xr({type:e}){let{id:t}=re(),n=f();return(0,D.useEffect)(()=>{let r=!1;return(async()=>{try{if(e===`card`){let e=await he(`/cards/${t}`);r||n(`/w/${e.workspaceId}/b/${e.boardId}?card=${e.id}`,{replace:!0})}else{let e=await he(`/pages/${t}`);r||n(`/w/${e.workspaceId}/d/${e.id}`,{replace:!0})}}catch{r||n(`/`,{replace:!0})}})(),()=>{r=!0}},[t,e,n]),(0,O.jsx)(Ge,{})}var Sr=oe([{path:`/`,element:(0,O.jsx)(br,{})},{path:`/login`,element:(0,O.jsx)(rn,{mode:`login`})},{path:`/setup`,element:(0,O.jsx)(rn,{mode:`setup`})},{path:`/register`,element:(0,O.jsx)(h,{to:`/setup`,replace:!0})},{path:`/card/:id`,element:(0,O.jsx)(xr,{type:`card`})},{path:`/doc/:id`,element:(0,O.jsx)(xr,{type:`doc`})},{path:`/oauth/authorize`,lazy:async()=>({Component:(await i(async()=>{let{ConsentPage:e}=await import(`./ConsentPage-C_LzKZZB.js`);return{ConsentPage:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))).ConsentPage}),hydrateFallbackElement:(0,O.jsx)(Ge,{})},{path:`/w/:wid`,element:(0,O.jsx)(yr,{}),hydrateFallbackElement:(0,O.jsx)(Ge,{}),children:[{index:!0,lazy:async()=>({Component:(await i(async()=>{let{HomePage:e}=await import(`./HomePage-DDDKEWXr.js`);return{HomePage:e}},__vite__mapDeps([14,1,2,15,8,16,17,18,19,20,21,22,9,7,10,23,24,25]))).HomePage})},{path:`p/:projectId`,lazy:async()=>({Component:(await i(async()=>{let{ProjectPage:e}=await import(`./ProjectPage-amJ1RPBS.js`);return{ProjectPage:e}},__vite__mapDeps([26,1,27,2,17,28,29,30,6,31,9,25,19,32,33,34,16,35,5]))).ProjectPage})},{path:`b/:boardId`,lazy:async()=>({Component:(await i(async()=>{let{BoardPage:e}=await import(`./BoardPage-CixYMIX6.js`);return{BoardPage:e}},__vite__mapDeps([36,1,23,2,19,8,17,9,24,37,33,6,28,29,30,31,38,35,25,5,20,21,22,7,39,40,41,42,16,34,43,44]))).BoardPage})},{path:`d/:pageId`,lazy:async()=>({Component:(await i(async()=>{let{DocPage:e}=await import(`./DocPage-hcgQ0MLZ.js`);return{DocPage:e}},__vite__mapDeps([45,1,2,8,37,19,33,6,17,27,23,9,24,30,3,20,39,38,40,41,25,35,5,46]))).DocPage})},{path:`vault`,lazy:async()=>({Component:(await i(async()=>{let{VaultPage:e}=await import(`./VaultPage-E1JRTpdj.js`);return{VaultPage:e}},__vite__mapDeps([47,1,2,38,19,33,6,48,18,28,29,43,4,30,37,49,40,50,16,31,12,9,25,51,10]))).VaultPage})},{path:`agents`,lazy:async()=>({Component:(await i(async()=>{let{AgentsPage:e}=await import(`./AgentsPage-BmYCjLa_.js`);return{AgentsPage:e}},__vite__mapDeps([52,1,8,2,18,29,4,21,20,22,9,7,6,50,16,33,19,25,12,11,53,49,30,13]))).AgentsPage})},{path:`settings`,lazy:async()=>({Component:(await i(async()=>{let{SettingsPage:e}=await import(`./SettingsPage-WsTJXDni.js`);return{SettingsPage:e}},__vite__mapDeps([54,1,2,33,19,6,12,55,50,16,40,10,15,25,20,51]))).SettingsPage})},{path:`*`,element:(0,O.jsx)(We,{})}]},{path:`*`,element:(0,O.jsx)(We,{standalone:!0})}]);await a(),Yt(ne),(0,Jt.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(D.StrictMode,{children:(0,O.jsx)(te,{client:ne,children:(0,O.jsx)(be,{children:(0,O.jsxs)(Ae,{children:[(0,O.jsx)(Me,{children:(0,O.jsx)(S,{router:Sr})}),(0,O.jsx)(De,{position:`bottom-right`,gap:8,toastOptions:{unstyled:!0,classNames:{toast:`flex w-[356px] items-start gap-3 rounded-[14px] border border-line bg-surface px-4 py-3 text-[13.5px] text-ink shadow-lg`,title:`font-medium`,description:`text-[12.5px] text-ink-2 mt-0.5`,icon:`mt-0.5`,actionButton:`ml-auto shrink-0 rounded-[8px] bg-ink px-2.5 py-1 text-[12px] font-medium text-sheet`,success:`[&_[data-icon]]:text-ok`,error:`[&_[data-icon]]:text-danger`}}})]})})})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./queries-
|
|
1
|
+
import{I as e}from"./queries-B6zKoYoh.js";var t={name:`lock-keyhole`,size:24,node:[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./queries-
|
|
1
|
+
import{I as e}from"./queries-B6zKoYoh.js";var t={name:`pencil`,size:24,node:[[`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`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as e}from"./queries-B6zKoYoh.js";var t={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};t.node;var n=e(t);export{n as t};
|