ltcai 12.0.0 → 12.1.0

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.
Files changed (69) hide show
  1. package/README.md +46 -52
  2. package/docs/CHANGELOG.md +23 -0
  3. package/docs/CI_AND_RELEASE_GATES.md +13 -7
  4. package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
  5. package/docs/DEVELOPMENT.md +11 -11
  6. package/docs/ONBOARDING.md +1 -1
  7. package/docs/OPERATIONS.md +1 -1
  8. package/docs/ROADMAP.md +2 -2
  9. package/docs/TRUST_MODEL.md +1 -1
  10. package/docs/WHY_LATTICE.md +1 -1
  11. package/docs/kg-schema.md +1 -1
  12. package/lattice_brain/__init__.py +1 -1
  13. package/latticeai/__init__.py +1 -1
  14. package/latticeai/services/architecture_readiness.py +1 -1
  15. package/latticeai/services/product_readiness.py +1 -1
  16. package/package.json +1 -1
  17. package/scripts/check_current_release_docs.mjs +1 -1
  18. package/scripts/release_screen_claims.json +11 -0
  19. package/src-tauri/Cargo.lock +10 -10
  20. package/src-tauri/Cargo.toml +1 -1
  21. package/src-tauri/tauri.conf.json +1 -1
  22. package/static/app/asset-manifest.json +44 -44
  23. package/static/app/assets/{Act-Cf1L2709.js → Act-DCRUH46a.js} +2 -2
  24. package/static/app/assets/{AdminConsole-DPAbLTYV.js → AdminConsole-BFBj6OvN.js} +1 -1
  25. package/static/app/assets/{Brain-DqamGrj-.js → Brain-BXcoxIvb.js} +2 -2
  26. package/static/app/assets/{BrainHome-MHe2_RYs.js → BrainHome-IhcEPC3v.js} +1 -1
  27. package/static/app/assets/{BrainSignals-CQPPfyyH.js → BrainSignals-DrfYSNjR.js} +1 -1
  28. package/static/app/assets/{Capture-DGdIH_Zc.js → Capture-BsO_OAeh.js} +1 -1
  29. package/static/app/assets/{Chronicle-C-UlCJoJ.js → Chronicle-BUj_UH3D.js} +1 -1
  30. package/static/app/assets/{CommandPalette-WNT4EqUX.js → CommandPalette-B4SWOaR-.js} +1 -1
  31. package/static/app/assets/{DigitalBrainExplorer-CEBH5Cwc.js → DigitalBrainExplorer-S1GSsyIT.js} +1 -1
  32. package/static/app/assets/{Library-C6xd1dlf.js → Library-CKUR2eVb.js} +1 -1
  33. package/static/app/assets/{LivingBrain-BEk-0ohw.js → LivingBrain--2UoV3Ki.js} +1 -1
  34. package/static/app/assets/{ProductFlow-CZLm5iXh.js → ProductFlow-D7rB6Xsu.js} +1 -1
  35. package/static/app/assets/{ReviewCard-CEHG6evf.js → ReviewCard-UzQZ1ULT.js} +1 -1
  36. package/static/app/assets/{RunsListPanel-CLtEJSRW.js → RunsListPanel-CDGFQYMo.js} +1 -1
  37. package/static/app/assets/{System-CAxwBUXw.js → System-0OSxZrTp.js} +1 -1
  38. package/static/app/assets/{WorkflowGraph-Dj10RuGE.js → WorkflowGraph-BIcWZTUQ.js} +1 -1
  39. package/static/app/assets/{WorkflowsPanel-Kyeh_LIT.js → WorkflowsPanel-BeT5fmbk.js} +2 -2
  40. package/static/app/assets/{actHelpers-CtSmK9Dw.js → actHelpers-DhutJObL.js} +1 -1
  41. package/static/app/assets/arrow-left-BwJfcH8J.js +1 -0
  42. package/static/app/assets/{bot-DhUGRel2.js → bot-D8tZzKMD.js} +1 -1
  43. package/static/app/assets/{brain-CLkhHsHF.js → brain-DP2JPXSV.js} +1 -1
  44. package/static/app/assets/{button-CmaEqG1T.js → button-Tzf5D7L1.js} +1 -1
  45. package/static/app/assets/circle-check-D68nHcgS.js +1 -0
  46. package/static/app/assets/{circle-pause-l96izbxj.js → circle-pause-Druue_tZ.js} +1 -1
  47. package/static/app/assets/{circle-play-CrZa25_q.js → circle-play-BAht4SSW.js} +1 -1
  48. package/static/app/assets/{cpu-BaXudqwl.js → cpu-BPbmZRPp.js} +1 -1
  49. package/static/app/assets/{download-hCVFPiyc.js → download-BmxPZEwU.js} +1 -1
  50. package/static/app/assets/{folder-open-CHL82Yp7.js → folder-open-DokOmFQJ.js} +1 -1
  51. package/static/app/assets/{hard-drive-DDzET7lk.js → hard-drive-Cw6aEA2h.js} +1 -1
  52. package/static/app/assets/{index-D2H-wSl6.js → index-DhszK7A3.js} +3 -3
  53. package/static/app/assets/{input-Df1CAY_I.js → input-BCdHoZXA.js} +1 -1
  54. package/static/app/assets/{link-2-xNnTIX1_.js → link-2-CCModn4z.js} +1 -1
  55. package/static/app/assets/{permissionCopy-D3aWHco-.js → permissionCopy-BSp1jYG7.js} +1 -1
  56. package/static/app/assets/{primitives-BioD2slS.js → primitives-D01WcJn7.js} +1 -1
  57. package/static/app/assets/search-C_zAGfvO.js +1 -0
  58. package/static/app/assets/{share-2-FkzGf8Df.js → share-2-DMMkM8Iu.js} +1 -1
  59. package/static/app/assets/{shield-alert-B3dwzik4.js → shield-alert--mrCWQko.js} +1 -1
  60. package/static/app/assets/{sourceMeta-DQSY_tah.js → sourceMeta-nvd3Cdz3.js} +1 -1
  61. package/static/app/assets/{textarea-P8o6pvOP.js → textarea-DfayhQiX.js} +1 -1
  62. package/static/app/assets/{useFocusTrap-hswOIkXE.js → useFocusTrap-C5NsTvsI.js} +1 -1
  63. package/static/app/assets/{useMutation-OJLrYSRA.js → useMutation-D7IMQTeI.js} +1 -1
  64. package/static/app/assets/{workspace-BCuk3Ku9.js → workspace-C7xidB7c.js} +1 -1
  65. package/static/app/index.html +1 -1
  66. package/static/sw.js +1 -1
  67. package/static/app/assets/arrow-left-CRl5EO4D.js +0 -1
  68. package/static/app/assets/circle-check-CFgejkOS.js +0 -1
  69. package/static/app/assets/search-BzBw8YcW.js +0 -1
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{u as r}from"./index-D2H-wSl6.js";var i=e(t()),a=n(),o=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`input`,{ref:n,className:r(`h-10 w-full rounded-md border border-input bg-background/70 px-3 text-sm outline-none transition placeholder:text-muted-foreground focus:border-ring focus:ring-2 focus:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));o.displayName=`Input`;export{o as t};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{u as r}from"./index-DhszK7A3.js";var i=e(t()),a=n(),o=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`input`,{ref:n,className:r(`h-10 w-full rounded-md border border-input bg-background/70 px-3 text-sm outline-none transition placeholder:text-muted-foreground focus:border-ring focus:ring-2 focus:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));o.displayName=`Input`;export{o as t};
@@ -1 +1 @@
1
- import{R as e}from"./index-D2H-wSl6.js";var t=e(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]);export{t};
1
+ import{R as e}from"./index-DhszK7A3.js";var t=e(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]);export{t};
@@ -1 +1 @@
1
- import{R as e,S as t}from"./index-D2H-wSl6.js";var n=e(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]);function r(e,n,r,i){let a=`system.permission.mode.${n}${r}`,o=t(e,a);return o===a?i:o}function i(e,t){return t===`ko`&&e.label_ko||e.label||``}function a(e,t){return r(t,e.id,``,i(e,t))}function o(e,t){let n=t===`ko`&&e.summary_ko||e.summary||``;return r(t,e.id,`.summary`,n)}function s(e,t){let n=t===`ko`&&e.warning_ko||e.warning||``;return r(t,e.id,`.warning`,n)}function c(e,t){return e?r(t,String(e.mode||``),``,i({label:e.label||``,label_ko:e.label_ko},t)):``}export{n as a,s as i,a as n,o as r,c as t};
1
+ import{R as e,S as t}from"./index-DhszK7A3.js";var n=e(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]);function r(e,n,r,i){let a=`system.permission.mode.${n}${r}`,o=t(e,a);return o===a?i:o}function i(e,t){return t===`ko`&&e.label_ko||e.label||``}function a(e,t){return r(t,e.id,``,i(e,t))}function o(e,t){let n=t===`ko`&&e.summary_ko||e.summary||``;return r(t,e.id,`.summary`,n)}function s(e,t){let n=t===`ko`&&e.warning_ko||e.warning||``;return r(t,e.id,`.warning`,n)}function c(e,t){return e?r(t,String(e.mode||``),``,i({label:e.label||``,label_ko:e.label_ko},t)):``}export{n as a,s as i,a as n,o as r,c as t};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r}from"./QueryClientProvider-B3OjqSyJ.js";import{t as i}from"./useMutation-OJLrYSRA.js";import{t as a}from"./circle-check-CFgejkOS.js";import{R as o,S as s,c,d as l,f as u,g as d,h as f,m as p,p as m,u as h,z as g}from"./index-D2H-wSl6.js";import{t as _}from"./button-CmaEqG1T.js";var v=o(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),y=o(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),b=o(`lock-keyhole`,[[`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`}]]),x=o(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),S=e(t()),C=n(),ee={default:`border-primary/25 bg-primary/12 text-primary`,success:`border-success/30 bg-success/12 text-success`,warning:`border-warning/30 bg-warning/12 text-warning`,muted:`border-border bg-muted/70 text-muted-foreground`,danger:`border-destructive/30 bg-destructive/12 text-destructive`};function w({className:e,variant:t=`default`,...n}){return(0,C.jsx)(`span`,{className:h(`inline-flex min-h-6 max-w-full items-center whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-semibold leading-none`,ee[t],e),...n})}function T({className:e,...t}){return(0,C.jsx)(`section`,{className:h(`premium-surface rounded-lg text-card-foreground`,e),...t})}function E({className:e,...t}){return(0,C.jsx)(`div`,{className:h(`flex flex-col gap-1.5 p-5`,e),...t})}function D({className:e,...t}){return(0,C.jsx)(`h2`,{className:h(`text-base font-semibold tracking-normal`,e),...t})}function O({className:e,...t}){return(0,C.jsx)(`p`,{className:h(`text-sm leading-6 text-muted-foreground`,e),...t})}function k({className:e,...t}){return(0,C.jsx)(`div`,{className:h(`p-5 pt-0`,e),...t})}function A({result:e}){let t=g(e=>e.mode),n=g(e=>e.language);return e?e.source===`live`&&e.ok?(0,C.jsx)(w,{variant:`success`,children:t===`basic`?s(n,`ui.status.ready`):s(n,`ui.status.connected`)}):(0,C.jsx)(w,{variant:`warning`,children:t===`basic`?s(n,`ui.status.needsSetup`):s(n,`ui.status.unavailable`)}):(0,C.jsx)(w,{variant:`muted`,children:s(n,`ui.status.notLoaded`)})}function j({title:e,detail:t}){let n=g(e=>e.language);return(0,C.jsxs)(`div`,{className:`product-empty-state`,children:[(0,C.jsx)(`div`,{className:`product-empty-mark`,children:(0,C.jsx)(x,{className:`h-5 w-5`})}),(0,C.jsx)(`div`,{className:`product-empty-title`,children:e||s(n,`ui.empty.title`)}),t?(0,C.jsx)(`div`,{className:`product-empty-detail`,children:t}):null]})}function M({title:e,description:t,result:n,children:r,className:i}){let a=g(e=>e.mode),o=g(e=>e.language);return(0,C.jsxs)(T,{className:h(`data-panel overflow-hidden`,i),children:[(0,C.jsxs)(E,{className:`flex-row items-start justify-between gap-3`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(D,{children:e}),t?(0,C.jsx)(O,{children:t}):null]}),a===`basic`?null:(0,C.jsx)(A,{result:n})]}),(0,C.jsx)(k,{children:n?.ok?r(n.data):(0,C.jsx)(j,{detail:a===`basic`?s(o,`ui.empty.basicDetail`):n?.error||s(o,`ui.empty.advancedDetail`)})})]})}function te({title:e}){let t=g(e=>e.language);return(0,C.jsxs)(T,{children:[(0,C.jsx)(E,{children:(0,C.jsx)(D,{children:e})}),(0,C.jsx)(k,{children:(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,C.jsx)(y,{className:`h-4 w-4 animate-spin`}),` `,s(t,`ui.loading`)]})})]})}function N({stats:e}){return(0,C.jsx)(`div`,{className:`data-stat-grid grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:e.map(e=>(0,C.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-4`,children:[(0,C.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:e.label}),(0,C.jsx)(`div`,{className:`mt-2 text-2xl font-semibold leading-tight`,children:typeof e.value==`number`?l(e.value):String(e.value??`-`)}),e.hint?(0,C.jsx)(`div`,{className:`mt-2 text-xs leading-5 text-muted-foreground`,children:e.hint}):null]},e.label))})}function P(e){return e==null||e===``?`-`:typeof e==`number`?Number.isFinite(e)?l(e):`-`:typeof e==`boolean`?e?`Enabled`:`Disabled`:String(e)}var F=/(^id$|_id$|token|secret|passphrase|fingerprint|public_key|private_key|dsn|schema|endpoint|base_url|localhost|127\.0\.0\.1|stack|trace|raw|runtime|engine|module|port|host|api|internal)/i;function I(e){return F.test(e)}var L=[`status`,`state`,`name`,`title`,`label`,`summary`,`version`,`ready`];function R(e){for(let t of L){let n=e[t];if(n==null||n===``||typeof n==`object`)continue;let r=P(n);if(r!==`-`)return r.length>96?f(r,96):r}return``}function z(e){let t=P(e);return t===`-`||t.includes(`/`)||t.includes(`@`)||/\.[a-z0-9]{2,5}$/i.test(t)?t:d(t.replace(/^agent:/i,``).replace(/^tool:/i,``))}function B(e){for(let t of[`documents`,`sources`,`items`,`agents`,`workflows`,`runs`,`events`,`permissions`,`models`,`peers`,`invitations`,`roles`,`policies`,`hooks`,`tools`,`templates`,`plugins`,`recent_events`]){let n=c(e[t]);if(n.length)return n}return[]}function V({value:e}){let t=g(e=>e.language);if(typeof e==`boolean`)return(0,C.jsx)(w,{variant:e?`success`:`muted`,children:s(t,e?`ui.value.enabled`:`ui.value.disabled`)});if(Array.isArray(e))return e.length?e.every(e=>e===null||[`string`,`number`,`boolean`].includes(typeof e))?(0,C.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,5).map((e,t)=>(0,C.jsx)(w,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>5?(0,C.jsxs)(w,{variant:`muted`,children:[`+`,e.length-5]}):null]}):(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.records`,{count:l(e.length)})}):(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.none`)});if(m(e)){let n=Object.keys(e);if(!n.length)return(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.noFields`)});let r=R(e);return r?(0,C.jsx)(`span`,{className:`break-words`,children:r}):(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.fields`,{count:l(n.length)})})}let n=P(e);return(0,C.jsx)(`span`,{className:`break-words`,children:n.length>96?f(n,96):n})}function H({data:e,limit:t=8}){let n=g(e=>e.mode),r=g(e=>e.language),i=Object.entries(e||{}).filter(([e])=>n!==`basic`||!I(e)).slice(0,t);return i.length?(0,C.jsx)(`div`,{className:`divide-y divide-border rounded-md border border-border`,children:i.map(([e,t])=>(0,C.jsxs)(`div`,{className:`grid grid-cols-[minmax(9rem,0.5fr)_1fr] gap-3 p-3 text-sm`,children:[(0,C.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:K(e,r)}),(0,C.jsx)(`span`,{className:`min-w-0 break-words`,children:(0,C.jsx)(V,{value:q(e,t)})})]},e))}):(0,C.jsx)(j,{title:s(r,`ui.noValues`)})}function U({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=8}){let i=g(e=>e.mode),a=g(e=>e.language);return i===`basic`?(0,C.jsx)(W,{value:e,titleKey:t,metaKey:n,limit:r}):Array.isArray(e)?e.length?e.every(e=>m(e))?(0,C.jsx)(Q,{items:e,titleKey:t,metaKey:n,limit:r}):(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background p-3`,children:[e.slice(0,r).map((e,t)=>(0,C.jsx)(w,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>r?(0,C.jsxs)(w,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,C.jsx)(j,{detail:s(a,`ui.empty.listDetail`)}):m(e)?(0,C.jsx)(H,{data:e,limit:r}):(0,C.jsx)(`div`,{className:`rounded-md border border-border bg-background p-3 text-sm`,children:(0,C.jsx)(V,{value:e})})}function W({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=6}){let i=g(e=>e.language);if(Array.isArray(e))return e.length?e.every(e=>m(e))?(0,C.jsx)(Q,{items:e,titleKey:t,metaKey:n,limit:r}):(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background/55 p-3`,children:[e.slice(0,r).map((e,t)=>(0,C.jsx)(w,{variant:`muted`,children:z(e)},`${String(e)}-${t}`)),e.length>r?(0,C.jsxs)(w,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,C.jsx)(j,{detail:s(i,`ui.empty.listDetail`)});if(m(e)){let i=B(e);return i.length?(0,C.jsx)(Q,{items:i,titleKey:t,metaKey:n,limit:r}):(0,C.jsx)(H,{data:Object.fromEntries(Object.entries(e).filter(([e])=>!I(e)).map(([e,t])=>[e,Array.isArray(t)?`${l(t.length)} items`:m(t)?`available`:t])),limit:r})}return(0,C.jsx)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm`,children:z(e)})}function G({result:e,successLabel:t}){let n=g(e=>e.mode),r=g(e=>e.language);return e?e.ok?(0,C.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border bg-background p-3`,children:[(0,C.jsx)(w,{variant:`success`,children:t||s(r,`ui.requestCompleted`)}),n===`basic`?(0,C.jsx)(W,{value:e.data}):(0,C.jsx)(U,{value:e.data})]}):(0,C.jsx)(j,{title:s(r,`ui.requestUnavailable`),detail:e.error||(0,C.jsx)(V,{value:e.data})}):null}function K(e,t){let n=`ui.field.${e.toLowerCase()}`,r=s(t,n);return r===n?d(e):r}function q(e,t){return/model/i.test(e)?typeof t==`string`&&t.includes(`/`)?u(t):Array.isArray(t)?t.map(e=>typeof e==`string`&&e.includes(`/`)?u(e):e):t:t}function J(e,t){let n=P(e),r=n.charAt(0).toUpperCase()+n.slice(1).toLowerCase();for(let e of[n,r]){let n=`ui.entity.${e}`,r=s(t,n);if(r!==n)return r}return z(n)}function Y(e,t,n,r){if(!e)return``;let i=[t.type,t.id,t.name].map(e=>String(e||``).toLowerCase().split(`:`).pop()||``).filter(Boolean);for(let t of i){let i=`${e}.${t}${n}`,a=s(r,i);if(a!==i)return a}return``}function X(e,t,n,r){for(let n of[e[t],e.name,e.label,r===`basic`?``:e.id]){let e=p(n);if(e)return e}return`#${n+1}`}function Z(e,t,n,r){let i=X(e,t,n,r);for(let t of[e.summary,e.description,e.path]){let e=p(t);if(e&&e!==i)return e}return``}function Q({items:e,titleKey:t=`title`,metaKey:n=`type`,limit:r=8,labelPrefix:i}){let a=g(e=>e.mode),o=g(e=>e.language),l=c(e).slice(0,r);return l.length?(0,C.jsx)(`div`,{className:`entity-list grid gap-2`,children:l.map((e,r)=>{let s=Y(i,e,``,o),c=s||X(e,t,r,a),l=s?``:J(e[n]||e.status||e.state||`ready`,o);return(0,C.jsxs)(`div`,{className:`entity-list-row rounded-lg border border-border bg-background/55 p-3`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,C.jsx)(`div`,{className:`font-medium`,children:c}),l&&l.toLowerCase()!==c.toLowerCase()?(0,C.jsx)(w,{variant:`muted`,children:l}):null]}),Y(i,e,`.detail`,o)||Z(e,t,r,a)?(0,C.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(i,e,`.detail`,o)||Z(e,t,r,a)}):null,a!==`basic`&&e.id&&e[t]!==e.id?(0,C.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:f(e.id,48)}):null]},String(e.id||e.name||r))})}):(0,C.jsx)(j,{detail:s(o,`ui.empty.listDetail`)})}function ne({title:e,detail:t,target:n=`advanced`}){let r=g(e=>e.setMode),i=g(e=>e.language);return(0,C.jsx)(T,{children:(0,C.jsxs)(k,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,C.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-background/70`,children:(0,C.jsx)(b,{className:`h-5 w-5 text-primary`})}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:`text-lg font-semibold`,children:e||s(i,`ui.modeGate.title`)}),(0,C.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-muted-foreground`,children:t||s(i,`ui.modeGate.detail`)})]}),(0,C.jsx)(_,{onClick:()=>r(n),children:n===`admin`?s(i,`ui.modeGate.admin`):s(i,`ui.modeGate.advanced`)})]})})}function re({label:e,successLabel:t,action:n,onSuccess:o,invalidate:c,variant:l=`outline`,disabled:u}){let d=r(),f=g(e=>e.language),p=t||s(f,`ui.done`),[m,b]=S.useState(null),x=i({mutationFn:n,onSuccess:async e=>{b(e.ok?p:e.error||s(f,`ui.status.unavailable`)),e.ok&&(await o?.(e),c&&await Promise.all(c.map(e=>d.invalidateQueries({queryKey:[e]}))))}});return(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsxs)(_,{variant:l,disabled:u||x.isPending,onClick:()=>x.mutate(),children:[x.isPending?(0,C.jsx)(y,{className:`h-4 w-4 animate-spin`}):null,e]}),m?(0,C.jsxs)(`span`,{className:h(`inline-flex items-center gap-1 text-xs`,m===p?`text-success`:`text-warning`),children:[m===p?(0,C.jsx)(a,{className:`h-3.5 w-3.5`}):(0,C.jsx)(v,{className:`h-3.5 w-3.5`}),m]}):null]})}function $(e){e?.focus()}function ie({tabs:e,value:t,onChange:n,ariaLabel:r,ariaLabelledBy:i}){let a=S.useRef([]),o=(t,r)=>{let i=(t+r+e.length)%e.length;$(a.current[i]),n(e[i].id)},s=e.findIndex(e=>e.id===t),c=s>=0?s:0;return(0,C.jsx)(`div`,{className:`product-tabs inline-flex max-w-full flex-wrap gap-1 rounded-lg border border-border bg-muted/28 p-1`,role:`tablist`,"aria-label":r,"aria-labelledby":i,children:e.map((r,i)=>(0,C.jsx)(`button`,{ref:e=>{a.current[i]=e},type:`button`,role:`tab`,"aria-selected":t===r.id,tabIndex:i===c?0:-1,onClick:()=>n(r.id),onKeyDown:t=>{t.key===`ArrowRight`||t.key===`ArrowDown`?(t.preventDefault(),o(i,1)):t.key===`ArrowLeft`||t.key===`ArrowUp`?(t.preventDefault(),o(i,-1)):t.key===`Home`?(t.preventDefault(),$(a.current[0]),n(e[0].id)):t.key===`End`&&(t.preventDefault(),$(a.current[e.length-1]),n(e[e.length-1].id))},className:h(`h-9 rounded-md px-3.5 text-sm font-semibold transition`,t===r.id?`bg-card text-foreground shadow-sm`:`text-muted-foreground hover:bg-card/60 hover:text-foreground`),children:r.label},r.id))})}export{D as _,H as a,y as b,G as c,ie as d,V as f,E as g,O as h,Q as i,N as l,k as m,M as n,te as o,T as p,j as r,ne as s,re as t,U as u,w as v,v as x,x as y};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r}from"./QueryClientProvider-B3OjqSyJ.js";import{t as i}from"./useMutation-D7IMQTeI.js";import{t as a}from"./circle-check-D68nHcgS.js";import{R as o,S as s,c,d as l,f as u,g as d,h as f,m as p,p as m,u as h,z as g}from"./index-DhszK7A3.js";import{t as _}from"./button-Tzf5D7L1.js";var v=o(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),y=o(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),b=o(`lock-keyhole`,[[`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`}]]),x=o(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),S=e(t()),C=n(),ee={default:`border-primary/25 bg-primary/12 text-primary`,success:`border-success/30 bg-success/12 text-success`,warning:`border-warning/30 bg-warning/12 text-warning`,muted:`border-border bg-muted/70 text-muted-foreground`,danger:`border-destructive/30 bg-destructive/12 text-destructive`};function w({className:e,variant:t=`default`,...n}){return(0,C.jsx)(`span`,{className:h(`inline-flex min-h-6 max-w-full items-center whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-semibold leading-none`,ee[t],e),...n})}function T({className:e,...t}){return(0,C.jsx)(`section`,{className:h(`premium-surface rounded-lg text-card-foreground`,e),...t})}function E({className:e,...t}){return(0,C.jsx)(`div`,{className:h(`flex flex-col gap-1.5 p-5`,e),...t})}function D({className:e,...t}){return(0,C.jsx)(`h2`,{className:h(`text-base font-semibold tracking-normal`,e),...t})}function O({className:e,...t}){return(0,C.jsx)(`p`,{className:h(`text-sm leading-6 text-muted-foreground`,e),...t})}function k({className:e,...t}){return(0,C.jsx)(`div`,{className:h(`p-5 pt-0`,e),...t})}function A({result:e}){let t=g(e=>e.mode),n=g(e=>e.language);return e?e.source===`live`&&e.ok?(0,C.jsx)(w,{variant:`success`,children:t===`basic`?s(n,`ui.status.ready`):s(n,`ui.status.connected`)}):(0,C.jsx)(w,{variant:`warning`,children:t===`basic`?s(n,`ui.status.needsSetup`):s(n,`ui.status.unavailable`)}):(0,C.jsx)(w,{variant:`muted`,children:s(n,`ui.status.notLoaded`)})}function j({title:e,detail:t}){let n=g(e=>e.language);return(0,C.jsxs)(`div`,{className:`product-empty-state`,children:[(0,C.jsx)(`div`,{className:`product-empty-mark`,children:(0,C.jsx)(x,{className:`h-5 w-5`})}),(0,C.jsx)(`div`,{className:`product-empty-title`,children:e||s(n,`ui.empty.title`)}),t?(0,C.jsx)(`div`,{className:`product-empty-detail`,children:t}):null]})}function M({title:e,description:t,result:n,children:r,className:i}){let a=g(e=>e.mode),o=g(e=>e.language);return(0,C.jsxs)(T,{className:h(`data-panel overflow-hidden`,i),children:[(0,C.jsxs)(E,{className:`flex-row items-start justify-between gap-3`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(D,{children:e}),t?(0,C.jsx)(O,{children:t}):null]}),a===`basic`?null:(0,C.jsx)(A,{result:n})]}),(0,C.jsx)(k,{children:n?.ok?r(n.data):(0,C.jsx)(j,{detail:a===`basic`?s(o,`ui.empty.basicDetail`):n?.error||s(o,`ui.empty.advancedDetail`)})})]})}function te({title:e}){let t=g(e=>e.language);return(0,C.jsxs)(T,{children:[(0,C.jsx)(E,{children:(0,C.jsx)(D,{children:e})}),(0,C.jsx)(k,{children:(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,C.jsx)(y,{className:`h-4 w-4 animate-spin`}),` `,s(t,`ui.loading`)]})})]})}function N({stats:e}){return(0,C.jsx)(`div`,{className:`data-stat-grid grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:e.map(e=>(0,C.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-4`,children:[(0,C.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:e.label}),(0,C.jsx)(`div`,{className:`mt-2 text-2xl font-semibold leading-tight`,children:typeof e.value==`number`?l(e.value):String(e.value??`-`)}),e.hint?(0,C.jsx)(`div`,{className:`mt-2 text-xs leading-5 text-muted-foreground`,children:e.hint}):null]},e.label))})}function P(e){return e==null||e===``?`-`:typeof e==`number`?Number.isFinite(e)?l(e):`-`:typeof e==`boolean`?e?`Enabled`:`Disabled`:String(e)}var F=/(^id$|_id$|token|secret|passphrase|fingerprint|public_key|private_key|dsn|schema|endpoint|base_url|localhost|127\.0\.0\.1|stack|trace|raw|runtime|engine|module|port|host|api|internal)/i;function I(e){return F.test(e)}var L=[`status`,`state`,`name`,`title`,`label`,`summary`,`version`,`ready`];function R(e){for(let t of L){let n=e[t];if(n==null||n===``||typeof n==`object`)continue;let r=P(n);if(r!==`-`)return r.length>96?f(r,96):r}return``}function z(e){let t=P(e);return t===`-`||t.includes(`/`)||t.includes(`@`)||/\.[a-z0-9]{2,5}$/i.test(t)?t:d(t.replace(/^agent:/i,``).replace(/^tool:/i,``))}function B(e){for(let t of[`documents`,`sources`,`items`,`agents`,`workflows`,`runs`,`events`,`permissions`,`models`,`peers`,`invitations`,`roles`,`policies`,`hooks`,`tools`,`templates`,`plugins`,`recent_events`]){let n=c(e[t]);if(n.length)return n}return[]}function V({value:e}){let t=g(e=>e.language);if(typeof e==`boolean`)return(0,C.jsx)(w,{variant:e?`success`:`muted`,children:s(t,e?`ui.value.enabled`:`ui.value.disabled`)});if(Array.isArray(e))return e.length?e.every(e=>e===null||[`string`,`number`,`boolean`].includes(typeof e))?(0,C.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,5).map((e,t)=>(0,C.jsx)(w,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>5?(0,C.jsxs)(w,{variant:`muted`,children:[`+`,e.length-5]}):null]}):(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.records`,{count:l(e.length)})}):(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.none`)});if(m(e)){let n=Object.keys(e);if(!n.length)return(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.noFields`)});let r=R(e);return r?(0,C.jsx)(`span`,{className:`break-words`,children:r}):(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.fields`,{count:l(n.length)})})}let n=P(e);return(0,C.jsx)(`span`,{className:`break-words`,children:n.length>96?f(n,96):n})}function H({data:e,limit:t=8}){let n=g(e=>e.mode),r=g(e=>e.language),i=Object.entries(e||{}).filter(([e])=>n!==`basic`||!I(e)).slice(0,t);return i.length?(0,C.jsx)(`div`,{className:`divide-y divide-border rounded-md border border-border`,children:i.map(([e,t])=>(0,C.jsxs)(`div`,{className:`grid grid-cols-[minmax(9rem,0.5fr)_1fr] gap-3 p-3 text-sm`,children:[(0,C.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:K(e,r)}),(0,C.jsx)(`span`,{className:`min-w-0 break-words`,children:(0,C.jsx)(V,{value:q(e,t)})})]},e))}):(0,C.jsx)(j,{title:s(r,`ui.noValues`)})}function U({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=8}){let i=g(e=>e.mode),a=g(e=>e.language);return i===`basic`?(0,C.jsx)(W,{value:e,titleKey:t,metaKey:n,limit:r}):Array.isArray(e)?e.length?e.every(e=>m(e))?(0,C.jsx)(Q,{items:e,titleKey:t,metaKey:n,limit:r}):(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background p-3`,children:[e.slice(0,r).map((e,t)=>(0,C.jsx)(w,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>r?(0,C.jsxs)(w,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,C.jsx)(j,{detail:s(a,`ui.empty.listDetail`)}):m(e)?(0,C.jsx)(H,{data:e,limit:r}):(0,C.jsx)(`div`,{className:`rounded-md border border-border bg-background p-3 text-sm`,children:(0,C.jsx)(V,{value:e})})}function W({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=6}){let i=g(e=>e.language);if(Array.isArray(e))return e.length?e.every(e=>m(e))?(0,C.jsx)(Q,{items:e,titleKey:t,metaKey:n,limit:r}):(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background/55 p-3`,children:[e.slice(0,r).map((e,t)=>(0,C.jsx)(w,{variant:`muted`,children:z(e)},`${String(e)}-${t}`)),e.length>r?(0,C.jsxs)(w,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,C.jsx)(j,{detail:s(i,`ui.empty.listDetail`)});if(m(e)){let i=B(e);return i.length?(0,C.jsx)(Q,{items:i,titleKey:t,metaKey:n,limit:r}):(0,C.jsx)(H,{data:Object.fromEntries(Object.entries(e).filter(([e])=>!I(e)).map(([e,t])=>[e,Array.isArray(t)?`${l(t.length)} items`:m(t)?`available`:t])),limit:r})}return(0,C.jsx)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm`,children:z(e)})}function G({result:e,successLabel:t}){let n=g(e=>e.mode),r=g(e=>e.language);return e?e.ok?(0,C.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border bg-background p-3`,children:[(0,C.jsx)(w,{variant:`success`,children:t||s(r,`ui.requestCompleted`)}),n===`basic`?(0,C.jsx)(W,{value:e.data}):(0,C.jsx)(U,{value:e.data})]}):(0,C.jsx)(j,{title:s(r,`ui.requestUnavailable`),detail:e.error||(0,C.jsx)(V,{value:e.data})}):null}function K(e,t){let n=`ui.field.${e.toLowerCase()}`,r=s(t,n);return r===n?d(e):r}function q(e,t){return/model/i.test(e)?typeof t==`string`&&t.includes(`/`)?u(t):Array.isArray(t)?t.map(e=>typeof e==`string`&&e.includes(`/`)?u(e):e):t:t}function J(e,t){let n=P(e),r=n.charAt(0).toUpperCase()+n.slice(1).toLowerCase();for(let e of[n,r]){let n=`ui.entity.${e}`,r=s(t,n);if(r!==n)return r}return z(n)}function Y(e,t,n,r){if(!e)return``;let i=[t.type,t.id,t.name].map(e=>String(e||``).toLowerCase().split(`:`).pop()||``).filter(Boolean);for(let t of i){let i=`${e}.${t}${n}`,a=s(r,i);if(a!==i)return a}return``}function X(e,t,n,r){for(let n of[e[t],e.name,e.label,r===`basic`?``:e.id]){let e=p(n);if(e)return e}return`#${n+1}`}function Z(e,t,n,r){let i=X(e,t,n,r);for(let t of[e.summary,e.description,e.path]){let e=p(t);if(e&&e!==i)return e}return``}function Q({items:e,titleKey:t=`title`,metaKey:n=`type`,limit:r=8,labelPrefix:i}){let a=g(e=>e.mode),o=g(e=>e.language),l=c(e).slice(0,r);return l.length?(0,C.jsx)(`div`,{className:`entity-list grid gap-2`,children:l.map((e,r)=>{let s=Y(i,e,``,o),c=s||X(e,t,r,a),l=s?``:J(e[n]||e.status||e.state||`ready`,o);return(0,C.jsxs)(`div`,{className:`entity-list-row rounded-lg border border-border bg-background/55 p-3`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,C.jsx)(`div`,{className:`font-medium`,children:c}),l&&l.toLowerCase()!==c.toLowerCase()?(0,C.jsx)(w,{variant:`muted`,children:l}):null]}),Y(i,e,`.detail`,o)||Z(e,t,r,a)?(0,C.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(i,e,`.detail`,o)||Z(e,t,r,a)}):null,a!==`basic`&&e.id&&e[t]!==e.id?(0,C.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:f(e.id,48)}):null]},String(e.id||e.name||r))})}):(0,C.jsx)(j,{detail:s(o,`ui.empty.listDetail`)})}function ne({title:e,detail:t,target:n=`advanced`}){let r=g(e=>e.setMode),i=g(e=>e.language);return(0,C.jsx)(T,{children:(0,C.jsxs)(k,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,C.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-background/70`,children:(0,C.jsx)(b,{className:`h-5 w-5 text-primary`})}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:`text-lg font-semibold`,children:e||s(i,`ui.modeGate.title`)}),(0,C.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-muted-foreground`,children:t||s(i,`ui.modeGate.detail`)})]}),(0,C.jsx)(_,{onClick:()=>r(n),children:n===`admin`?s(i,`ui.modeGate.admin`):s(i,`ui.modeGate.advanced`)})]})})}function re({label:e,successLabel:t,action:n,onSuccess:o,invalidate:c,variant:l=`outline`,disabled:u}){let d=r(),f=g(e=>e.language),p=t||s(f,`ui.done`),[m,b]=S.useState(null),x=i({mutationFn:n,onSuccess:async e=>{b(e.ok?p:e.error||s(f,`ui.status.unavailable`)),e.ok&&(await o?.(e),c&&await Promise.all(c.map(e=>d.invalidateQueries({queryKey:[e]}))))}});return(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsxs)(_,{variant:l,disabled:u||x.isPending,onClick:()=>x.mutate(),children:[x.isPending?(0,C.jsx)(y,{className:`h-4 w-4 animate-spin`}):null,e]}),m?(0,C.jsxs)(`span`,{className:h(`inline-flex items-center gap-1 text-xs`,m===p?`text-success`:`text-warning`),children:[m===p?(0,C.jsx)(a,{className:`h-3.5 w-3.5`}):(0,C.jsx)(v,{className:`h-3.5 w-3.5`}),m]}):null]})}function $(e){e?.focus()}function ie({tabs:e,value:t,onChange:n,ariaLabel:r,ariaLabelledBy:i}){let a=S.useRef([]),o=(t,r)=>{let i=(t+r+e.length)%e.length;$(a.current[i]),n(e[i].id)},s=e.findIndex(e=>e.id===t),c=s>=0?s:0;return(0,C.jsx)(`div`,{className:`product-tabs inline-flex max-w-full flex-wrap gap-1 rounded-lg border border-border bg-muted/28 p-1`,role:`tablist`,"aria-label":r,"aria-labelledby":i,children:e.map((r,i)=>(0,C.jsx)(`button`,{ref:e=>{a.current[i]=e},type:`button`,role:`tab`,"aria-selected":t===r.id,tabIndex:i===c?0:-1,onClick:()=>n(r.id),onKeyDown:t=>{t.key===`ArrowRight`||t.key===`ArrowDown`?(t.preventDefault(),o(i,1)):t.key===`ArrowLeft`||t.key===`ArrowUp`?(t.preventDefault(),o(i,-1)):t.key===`Home`?(t.preventDefault(),$(a.current[0]),n(e[0].id)):t.key===`End`&&(t.preventDefault(),$(a.current[e.length-1]),n(e[e.length-1].id))},className:h(`h-9 rounded-md px-3.5 text-sm font-semibold transition`,t===r.id?`bg-card text-foreground shadow-sm`:`text-muted-foreground hover:bg-card/60 hover:text-foreground`),children:r.label},r.id))})}export{D as _,H as a,y as b,G as c,ie as d,V as f,E as g,O as h,Q as i,N as l,k as m,M as n,te as o,T as p,j as r,ne as s,re as t,U as u,w as v,v as x,x as y};
@@ -0,0 +1 @@
1
+ import{R as e}from"./index-DhszK7A3.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
@@ -1 +1 @@
1
- import{R as e}from"./index-D2H-wSl6.js";var t=e(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]);export{t};
1
+ import{R as e}from"./index-DhszK7A3.js";var t=e(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]);export{t};
@@ -1 +1 @@
1
- import{R as e}from"./index-D2H-wSl6.js";var t=e(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]);export{t};
1
+ import{R as e}from"./index-DhszK7A3.js";var t=e(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]);export{t};
@@ -1 +1 @@
1
- import{S as e,c as t,g as n,h as r,m as i,p as a}from"./index-D2H-wSl6.js";var o=[{id:`knowledge`,labelKey:`brain.group.knowledge`,token:`--knowledge`,fallback:`205 55% 66%`,types:[`topic`,`concept`,`entity`,`decision`,`insight`,`claim`,`fact`]},{id:`source`,labelKey:`brain.group.source`,token:`--library`,fallback:`195 45% 62%`,types:[`file`,`document`,`source`,`chunk`,`note`,`url`,`page`,`image`,`transcript`]},{id:`activity`,labelKey:`brain.group.activity`,token:`--act`,fallback:`30 66% 62%`,types:[`task`,`workflow`,`agent`,`run`,`approval`,`hook`]},{id:`memory`,labelKey:`brain.group.memory`,token:`--memory`,fallback:`168 48% 58%`,types:[`memory`,`conversation`,`message`,`chat`,`context`]},{id:`people`,labelKey:`brain.group.people`,token:`--connection`,fallback:`278 44% 72%`,types:[`person`,`user`,`team`,`organization`,`org`]},{id:`system`,labelKey:`brain.group.system`,token:`--fg-muted`,fallback:`46 8% 66%`,types:[`model`,`skill`,`plugin`,`setting`,`policy`,`device`,`storage`]},{id:`other`,labelKey:`brain.group.other`,token:`--fg`,fallback:`43 26% 94%`,types:[]}],s=/^(-?[\d.]+)[\s,]+([\d.]+)%[\s,]+([\d.]+)%$/,c=`hsl(205, 55%, 66%)`;function l(e){let t=e.trim();if(!t)return null;let n=/^hsla?\(\s*(.+?)\s*\)$/i.exec(t)?.[1]??t,r=s.exec(n);return r?`hsl(${r[1]}, ${r[2]}%, ${r[3]}%)`:/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(t)||/^rgba?\(/i.test(t)?t:null}function u(e,t){return l(getComputedStyle(document.documentElement).getPropertyValue(e).trim())??l(t)??c}function d(e){let t=y(e);return u(t.token,t.fallback)}function f(){return u(`--fg`,`43 26% 94%`)}var p=new Map(o.flatMap(e=>e.types.map(t=>[t,e.id]))),m=a;function h(e,t,n=``){for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim())return t;if(typeof t==`number`&&Number.isFinite(t))return String(t)}return n}function g(e,t){for(let n of t){let t=Number(e[n]);if(Number.isFinite(t))return t}return 0}function _(e,t){return m(e[t])?e[t]:{}}function v(e){return p.get(e.toLowerCase())||`other`}function y(e){return o.find(t=>t.id===e)||o[o.length-1]}function b(n,a){let s=m(n)?n:{};m(s.data)&&(Array.isArray(s.data.nodes)||m(s.data.nodes))&&(s=s.data);let c=t(s.nodes),l=t(s.edges),u=new Set(c.map(e=>h(e,[`id`,`node_id`,`title`,`label`])).filter(Boolean)),f=l.flatMap((e,t)=>{let n=h(e,[`from`,`source`,`source_id`]),r=h(e,[`to`,`target`,`target_id`]);return!n||!r||!u.has(n)||!u.has(r)?[]:[{id:h(e,[`id`],`edge-${t}`),source:n,target:r,label:h(e,[`type`,`label`,`relationship`],`related`),weight:Math.max(.2,g(e,[`weight`,`score`,`confidence`])||1)}]}),p=new Map;f.forEach(e=>{p.set(e.source,(p.get(e.source)||0)+1),p.set(e.target,(p.get(e.target)||0)+1)});let y=Math.max(1,...Array.from(p.values())),b=c.flatMap(e=>{let t=h(e,[`id`,`node_id`,`title`,`label`]);if(!t)return[];let n=_(e,`metadata`),a=_(n,`graph_metrics`),o=h(e,[`type`,`kind`,`category`],`Node`),s=i(h(e,[`title`,`label`,`name`],``))||r(t,38),c=g(e,[`importance_norm`,`importance`,`score`])||g(a,[`importance_norm`,`importance`,`centrality`]),l=p.get(t)||0,u=Math.max(.08,Math.min(1,c||l/y*.8+.12)),d=i(h(e,[`summary`,`description`,`snippet`]))||i(h(n,[`summary`,`description`,`relative_path`,`filename`])),f=h(e,[`source`,`path`])||h(n,[`source`,`relative_path`,`filename`]),m=[t,s,o,d,f,Object.keys(n).join(` `)].join(` `).toLowerCase();return[{id:t,label:s,type:o,group:v(o),summary:d,source:f,importance:u,degree:l,searchText:m,raw:e}]}),x=new Map;return b.forEach(e=>x.set(e.group,(x.get(e.group)||0)+1)),{nodes:b,edges:f,groups:o.map(t=>({id:t.id,label:e(a,t.labelKey),color:d(t.id),count:x.get(t.id)||0,visibleCount:0,collapsed:!1})).filter(e=>e.count>0)}}function x({graph:e,search:t,groupFilter:n,minImportance:r,collapsedGroups:i,selectedId:a,labelMode:o,maxNodes:s}){let c=t.trim().toLowerCase(),l=new Set;a&&!a.startsWith(`group:`)&&(l.add(a),e.edges.forEach(e=>{e.source===a&&l.add(e.target),e.target===a&&l.add(e.source)}));let u=e.nodes.filter(e=>n===`all`||e.group===n||e.type===n).filter(e=>c?e.searchText.includes(c):e.importance>=r).filter(e=>!l.size||l.has(e.id)).sort((e,t)=>t.importance+t.degree/25-(e.importance+e.degree/25)).slice(0,s),p=new Set(u.map(e=>e.id)),m=new Map,h=u.filter(t=>{if(!i.has(t.group))return!0;let n=y(t.group),r=e.groups.find(e=>e.id===t.group),a=`group:${t.group}`,o=m.get(a);return m.set(a,{id:a,group:{id:n.id,label:r?.label||n.id,color:d(n.id),count:0,visibleCount:0,collapsed:!0},count:(o?.count||0)+1,maxImportance:Math.max(o?.maxImportance||0,t.importance)}),!1}),g=new Set(h.map(e=>e.id)),_=new Set(m.keys()),v=e.edges.filter(e=>p.has(e.source)&&p.has(e.target)),b=v.flatMap((t,n)=>{let r=e.nodes.find(e=>e.id===t.source),i=e.nodes.find(e=>e.id===t.target),o=g.has(t.source)?t.source:r&&_.has(`group:${r.group}`)?`group:${r.group}`:``,s=g.has(t.target)?t.target:i&&_.has(`group:${i.group}`)?`group:${i.group}`:``;return!o||!s||o===s?[]:[{data:{id:`${t.id}-${n}-${o}-${s}`,source:o,target:s,label:t.label,width:Math.max(1,Math.min(4,t.weight))},classes:a&&(t.source===a||t.target===a)?`connected`:``}]}),x=h.map(t=>{let n=y(t.group),r=e.groups.find(e=>e.id===t.group),i=c&&t.searchText.includes(c),s=o===`off`?``:o===`all`||t.importance>.55||t.degree>1||i||a===t.id?t.label:``;return{data:{id:t.id,label:t.label,displayLabel:s,type:t.type,group:r?.label||n.id,color:d(n.id),borderColor:a===t.id?f():d(n.id),size:Math.round(20+t.importance*34+Math.min(t.degree,10)*2)},classes:[a===t.id?`selected`:``,i?`match`:``].filter(Boolean).join(` `)}}),S=Array.from(m.values()).map(e=>({data:{id:e.id,label:e.group.label,displayLabel:`${e.group.label} (${e.count})`,type:`Cluster`,group:e.group.label,color:e.group.color,borderColor:f(),size:Math.round(34+Math.min(e.count,28)*2+e.maxImportance*16)},classes:`cluster`})),C=new Map;h.forEach(e=>C.set(e.group,(C.get(e.group)||0)+1));let w=e.groups.map(e=>({...e,visibleCount:(C.get(e.id)||0)+(m.get(`group:${e.id}`)?.count||0),collapsed:i.has(e.id)}));return{...e,groups:w,elements:[...S,...x,...b],visibleNodes:h,visibleEdges:v,totalNodes:e.nodes.length,totalEdges:e.edges.length,hiddenByFilters:Math.max(0,e.nodes.length-u.length)}}function S(e,t){return t.find(t=>t.id===e.group)?.label||e.group}function C(t,r){let i=String(t||``),a=i.charAt(0).toUpperCase()+i.slice(1).toLowerCase();for(let t of[i,a]){let n=`ui.entity.${t}`,i=e(r,n);if(i!==n)return i}return n(i)}function w(t,n){let r=m(t.metadata)?t.metadata:{},i=String(t.source_type||t.type||t.kind||r.source_type||r.role||``).toLowerCase();return/chat|conversation|message/.test(i)?e(n,`brain.sources.type.chat`):/document|upload|file|pdf|markdown|text/.test(i)?e(n,`brain.sources.type.document`):/import|archive|restore/.test(i)?e(n,`brain.sources.type.import`):/manual|note/.test(i)?e(n,`brain.sources.type.manual`):e(n,`brain.sources.type.unknown`)}function T(e){let t=m(e.metadata)?e.metadata:{},n=e.created_at||e.timestamp||e.updated_at||t.created_at||t.timestamp;return n?String(n):``}export{x as a,u as c,w as i,S as n,m as o,T as r,b as s,C as t};
1
+ import{S as e,c as t,g as n,h as r,m as i,p as a}from"./index-DhszK7A3.js";var o=[{id:`knowledge`,labelKey:`brain.group.knowledge`,token:`--knowledge`,fallback:`205 55% 66%`,types:[`topic`,`concept`,`entity`,`decision`,`insight`,`claim`,`fact`]},{id:`source`,labelKey:`brain.group.source`,token:`--library`,fallback:`195 45% 62%`,types:[`file`,`document`,`source`,`chunk`,`note`,`url`,`page`,`image`,`transcript`]},{id:`activity`,labelKey:`brain.group.activity`,token:`--act`,fallback:`30 66% 62%`,types:[`task`,`workflow`,`agent`,`run`,`approval`,`hook`]},{id:`memory`,labelKey:`brain.group.memory`,token:`--memory`,fallback:`168 48% 58%`,types:[`memory`,`conversation`,`message`,`chat`,`context`]},{id:`people`,labelKey:`brain.group.people`,token:`--connection`,fallback:`278 44% 72%`,types:[`person`,`user`,`team`,`organization`,`org`]},{id:`system`,labelKey:`brain.group.system`,token:`--fg-muted`,fallback:`46 8% 66%`,types:[`model`,`skill`,`plugin`,`setting`,`policy`,`device`,`storage`]},{id:`other`,labelKey:`brain.group.other`,token:`--fg`,fallback:`43 26% 94%`,types:[]}],s=/^(-?[\d.]+)[\s,]+([\d.]+)%[\s,]+([\d.]+)%$/,c=`hsl(205, 55%, 66%)`;function l(e){let t=e.trim();if(!t)return null;let n=/^hsla?\(\s*(.+?)\s*\)$/i.exec(t)?.[1]??t,r=s.exec(n);return r?`hsl(${r[1]}, ${r[2]}%, ${r[3]}%)`:/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(t)||/^rgba?\(/i.test(t)?t:null}function u(e,t){return l(getComputedStyle(document.documentElement).getPropertyValue(e).trim())??l(t)??c}function d(e){let t=y(e);return u(t.token,t.fallback)}function f(){return u(`--fg`,`43 26% 94%`)}var p=new Map(o.flatMap(e=>e.types.map(t=>[t,e.id]))),m=a;function h(e,t,n=``){for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim())return t;if(typeof t==`number`&&Number.isFinite(t))return String(t)}return n}function g(e,t){for(let n of t){let t=Number(e[n]);if(Number.isFinite(t))return t}return 0}function _(e,t){return m(e[t])?e[t]:{}}function v(e){return p.get(e.toLowerCase())||`other`}function y(e){return o.find(t=>t.id===e)||o[o.length-1]}function b(n,a){let s=m(n)?n:{};m(s.data)&&(Array.isArray(s.data.nodes)||m(s.data.nodes))&&(s=s.data);let c=t(s.nodes),l=t(s.edges),u=new Set(c.map(e=>h(e,[`id`,`node_id`,`title`,`label`])).filter(Boolean)),f=l.flatMap((e,t)=>{let n=h(e,[`from`,`source`,`source_id`]),r=h(e,[`to`,`target`,`target_id`]);return!n||!r||!u.has(n)||!u.has(r)?[]:[{id:h(e,[`id`],`edge-${t}`),source:n,target:r,label:h(e,[`type`,`label`,`relationship`],`related`),weight:Math.max(.2,g(e,[`weight`,`score`,`confidence`])||1)}]}),p=new Map;f.forEach(e=>{p.set(e.source,(p.get(e.source)||0)+1),p.set(e.target,(p.get(e.target)||0)+1)});let y=Math.max(1,...Array.from(p.values())),b=c.flatMap(e=>{let t=h(e,[`id`,`node_id`,`title`,`label`]);if(!t)return[];let n=_(e,`metadata`),a=_(n,`graph_metrics`),o=h(e,[`type`,`kind`,`category`],`Node`),s=i(h(e,[`title`,`label`,`name`],``))||r(t,38),c=g(e,[`importance_norm`,`importance`,`score`])||g(a,[`importance_norm`,`importance`,`centrality`]),l=p.get(t)||0,u=Math.max(.08,Math.min(1,c||l/y*.8+.12)),d=i(h(e,[`summary`,`description`,`snippet`]))||i(h(n,[`summary`,`description`,`relative_path`,`filename`])),f=h(e,[`source`,`path`])||h(n,[`source`,`relative_path`,`filename`]),m=[t,s,o,d,f,Object.keys(n).join(` `)].join(` `).toLowerCase();return[{id:t,label:s,type:o,group:v(o),summary:d,source:f,importance:u,degree:l,searchText:m,raw:e}]}),x=new Map;return b.forEach(e=>x.set(e.group,(x.get(e.group)||0)+1)),{nodes:b,edges:f,groups:o.map(t=>({id:t.id,label:e(a,t.labelKey),color:d(t.id),count:x.get(t.id)||0,visibleCount:0,collapsed:!1})).filter(e=>e.count>0)}}function x({graph:e,search:t,groupFilter:n,minImportance:r,collapsedGroups:i,selectedId:a,labelMode:o,maxNodes:s}){let c=t.trim().toLowerCase(),l=new Set;a&&!a.startsWith(`group:`)&&(l.add(a),e.edges.forEach(e=>{e.source===a&&l.add(e.target),e.target===a&&l.add(e.source)}));let u=e.nodes.filter(e=>n===`all`||e.group===n||e.type===n).filter(e=>c?e.searchText.includes(c):e.importance>=r).filter(e=>!l.size||l.has(e.id)).sort((e,t)=>t.importance+t.degree/25-(e.importance+e.degree/25)).slice(0,s),p=new Set(u.map(e=>e.id)),m=new Map,h=u.filter(t=>{if(!i.has(t.group))return!0;let n=y(t.group),r=e.groups.find(e=>e.id===t.group),a=`group:${t.group}`,o=m.get(a);return m.set(a,{id:a,group:{id:n.id,label:r?.label||n.id,color:d(n.id),count:0,visibleCount:0,collapsed:!0},count:(o?.count||0)+1,maxImportance:Math.max(o?.maxImportance||0,t.importance)}),!1}),g=new Set(h.map(e=>e.id)),_=new Set(m.keys()),v=e.edges.filter(e=>p.has(e.source)&&p.has(e.target)),b=v.flatMap((t,n)=>{let r=e.nodes.find(e=>e.id===t.source),i=e.nodes.find(e=>e.id===t.target),o=g.has(t.source)?t.source:r&&_.has(`group:${r.group}`)?`group:${r.group}`:``,s=g.has(t.target)?t.target:i&&_.has(`group:${i.group}`)?`group:${i.group}`:``;return!o||!s||o===s?[]:[{data:{id:`${t.id}-${n}-${o}-${s}`,source:o,target:s,label:t.label,width:Math.max(1,Math.min(4,t.weight))},classes:a&&(t.source===a||t.target===a)?`connected`:``}]}),x=h.map(t=>{let n=y(t.group),r=e.groups.find(e=>e.id===t.group),i=c&&t.searchText.includes(c),s=o===`off`?``:o===`all`||t.importance>.55||t.degree>1||i||a===t.id?t.label:``;return{data:{id:t.id,label:t.label,displayLabel:s,type:t.type,group:r?.label||n.id,color:d(n.id),borderColor:a===t.id?f():d(n.id),size:Math.round(20+t.importance*34+Math.min(t.degree,10)*2)},classes:[a===t.id?`selected`:``,i?`match`:``].filter(Boolean).join(` `)}}),S=Array.from(m.values()).map(e=>({data:{id:e.id,label:e.group.label,displayLabel:`${e.group.label} (${e.count})`,type:`Cluster`,group:e.group.label,color:e.group.color,borderColor:f(),size:Math.round(34+Math.min(e.count,28)*2+e.maxImportance*16)},classes:`cluster`})),C=new Map;h.forEach(e=>C.set(e.group,(C.get(e.group)||0)+1));let w=e.groups.map(e=>({...e,visibleCount:(C.get(e.id)||0)+(m.get(`group:${e.id}`)?.count||0),collapsed:i.has(e.id)}));return{...e,groups:w,elements:[...S,...x,...b],visibleNodes:h,visibleEdges:v,totalNodes:e.nodes.length,totalEdges:e.edges.length,hiddenByFilters:Math.max(0,e.nodes.length-u.length)}}function S(e,t){return t.find(t=>t.id===e.group)?.label||e.group}function C(t,r){let i=String(t||``),a=i.charAt(0).toUpperCase()+i.slice(1).toLowerCase();for(let t of[i,a]){let n=`ui.entity.${t}`,i=e(r,n);if(i!==n)return i}return n(i)}function w(t,n){let r=m(t.metadata)?t.metadata:{},i=String(t.source_type||t.type||t.kind||r.source_type||r.role||``).toLowerCase();return/chat|conversation|message/.test(i)?e(n,`brain.sources.type.chat`):/document|upload|file|pdf|markdown|text/.test(i)?e(n,`brain.sources.type.document`):/import|archive|restore/.test(i)?e(n,`brain.sources.type.import`):/manual|note/.test(i)?e(n,`brain.sources.type.manual`):e(n,`brain.sources.type.unknown`)}function T(e){let t=m(e.metadata)?e.metadata:{},n=e.created_at||e.timestamp||e.updated_at||t.created_at||t.timestamp;return n?String(n):``}export{x as a,u as c,w as i,S as n,m as o,T as r,b as s,C as t};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{u as r}from"./index-D2H-wSl6.js";var i=e(t()),a=n(),o=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`textarea`,{ref:n,className:r(`min-h-28 w-full resize-y rounded-md border border-input bg-background/70 px-3 py-3 text-sm leading-6 outline-none transition placeholder:text-muted-foreground focus:border-ring focus:ring-2 focus:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));o.displayName=`Textarea`;export{o as t};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{u as r}from"./index-DhszK7A3.js";var i=e(t()),a=n(),o=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`textarea`,{ref:n,className:r(`min-h-28 w-full resize-y rounded-md border border-input bg-background/70 px-3 py-3 text-sm leading-6 outline-none transition placeholder:text-muted-foreground focus:border-ring focus:ring-2 focus:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));o.displayName=`Textarea`;export{o as t};
@@ -1 +1 @@
1
- import{i as e,n as t}from"./jsx-runtime-bzQ4Vb5N.js";import{R as n}from"./index-D2H-wSl6.js";var r=n(`sunrise`,[[`path`,{d:`M12 2v8`,key:`1q4o3n`}],[`path`,{d:`m4.93 10.93 1.41 1.41`,key:`2a7f42`}],[`path`,{d:`M2 18h2`,key:`j10viu`}],[`path`,{d:`M20 18h2`,key:`wocana`}],[`path`,{d:`m19.07 10.93-1.41 1.41`,key:`15zs5n`}],[`path`,{d:`M22 22H2`,key:`19qnx5`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}],[`path`,{d:`M16 18a4 4 0 0 0-8 0`,key:`1lzouq`}]]),i=e(t()),a=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`iframe`,`[tabindex]:not([tabindex="-1"])`].join(`, `);function o(e){return Array.from(e.querySelectorAll(a)).filter(e=>!e.closest(`[hidden]`)&&e.getAttribute(`aria-hidden`)!==`true`)}function s(e,t=!0){let n=i.useRef(null),r=i.useRef(e);return r.current=e,i.useEffect(()=>{if(!t)return;let e=n.current;if(!e)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null;e.hasAttribute(`tabindex`)||e.setAttribute(`tabindex`,`-1`),(o(e)[0]||e).focus();let a=t=>{if(t.key===`Escape`&&r.current){t.preventDefault(),t.stopPropagation(),r.current();return}if(t.key!==`Tab`)return;let n=o(e);if(!n.length){t.preventDefault(),e.focus();return}let i=n[0],a=n[n.length-1],s=document.activeElement;t.shiftKey?(s===i||s===e||!e.contains(s))&&(t.preventDefault(),a.focus()):(s===a||!e.contains(s))&&(t.preventDefault(),i.focus())};return e.addEventListener(`keydown`,a),()=>{e.removeEventListener(`keydown`,a),i?.focus?.()}},[t]),n}export{r as n,s as t};
1
+ import{i as e,n as t}from"./jsx-runtime-bzQ4Vb5N.js";import{R as n}from"./index-DhszK7A3.js";var r=n(`sunrise`,[[`path`,{d:`M12 2v8`,key:`1q4o3n`}],[`path`,{d:`m4.93 10.93 1.41 1.41`,key:`2a7f42`}],[`path`,{d:`M2 18h2`,key:`j10viu`}],[`path`,{d:`M20 18h2`,key:`wocana`}],[`path`,{d:`m19.07 10.93-1.41 1.41`,key:`15zs5n`}],[`path`,{d:`M22 22H2`,key:`19qnx5`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}],[`path`,{d:`M16 18a4 4 0 0 0-8 0`,key:`1lzouq`}]]),i=e(t()),a=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`iframe`,`[tabindex]:not([tabindex="-1"])`].join(`, `);function o(e){return Array.from(e.querySelectorAll(a)).filter(e=>!e.closest(`[hidden]`)&&e.getAttribute(`aria-hidden`)!==`true`)}function s(e,t=!0){let n=i.useRef(null),r=i.useRef(e);return r.current=e,i.useEffect(()=>{if(!t)return;let e=n.current;if(!e)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null;e.hasAttribute(`tabindex`)||e.setAttribute(`tabindex`,`-1`),(o(e)[0]||e).focus();let a=t=>{if(t.key===`Escape`&&r.current){t.preventDefault(),t.stopPropagation(),r.current();return}if(t.key!==`Tab`)return;let n=o(e);if(!n.length){t.preventDefault(),e.focus();return}let i=n[0],a=n[n.length-1],s=document.activeElement;t.shiftKey?(s===i||s===e||!e.contains(s))&&(t.preventDefault(),a.focus()):(s===a||!e.contains(s))&&(t.preventDefault(),i.focus())};return e.addEventListener(`keydown`,a),()=>{e.removeEventListener(`keydown`,a),i?.focus?.()}},[t]),n}export{r as n,s as t};
@@ -1 +1 @@
1
- import{i as e,n as t}from"./jsx-runtime-bzQ4Vb5N.js";import{D as n,E as r,M as i,c as a,g as o,n as s,x as c}from"./QueryClientProvider-B3OjqSyJ.js";import{U as l}from"./index-D2H-wSl6.js";var u=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&o(t.mutationKey)!==o(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??l();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){a.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let r=s(t),[i]=d.useState(()=>new u(r,e));d.useEffect(()=>{i.setOptions(e)},[i,e]);let o=d.useSyncExternalStore(d.useCallback(e=>i.subscribe(a.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=d.useCallback((e,t)=>{i.mutate(e,t).catch(c)},[i]);if(o.error&&n(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}export{f as t};
1
+ import{i as e,n as t}from"./jsx-runtime-bzQ4Vb5N.js";import{D as n,E as r,M as i,c as a,g as o,n as s,x as c}from"./QueryClientProvider-B3OjqSyJ.js";import{U as l}from"./index-DhszK7A3.js";var u=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&o(t.mutationKey)!==o(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??l();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){a.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let r=s(t),[i]=d.useState(()=>new u(r,e));d.useEffect(()=>{i.setOptions(e)},[i,e]);let o=d.useSyncExternalStore(d.useCallback(e=>i.subscribe(a.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=d.useCallback((e,t)=>{i.mutate(e,t).catch(c)},[i]);if(o.error&&n(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}export{f as t};