@rubytech/create-maxy-code 0.1.196 → 0.1.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/platform/config/brand.json +3 -1
- package/payload/platform/plugins/admin/PLUGIN.md +3 -0
- package/payload/platform/plugins/admin/skills/investigate/SKILL.md +286 -0
- package/payload/platform/plugins/admin/skills/superpowers-sprint/SKILL.md +361 -0
- package/payload/platform/plugins/admin/skills/task/SKILL.md +283 -0
- package/payload/platform/plugins/docs/references/admin-ui.md +2 -1
- package/payload/platform/plugins/docs/references/internals.md +0 -2
- package/payload/platform/plugins/docs/references/investigate-and-task-skills.md +9 -0
- package/payload/platform/plugins/docs/references/platform.md +1 -1
- package/payload/platform/plugins/docs/references/plugins-guide.md +1 -1
- package/payload/server/public/assets/AdminShell-DPk5UgEJ.js +1 -0
- package/payload/server/public/assets/{Checkbox-DTxJvyG7.js → Checkbox-Bh3kwzxP.js} +1 -1
- package/payload/server/public/assets/{admin-tKgLki8m.js → admin-BWzKAudL.js} +1 -1
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-CrQJbK3h.js → architectureDiagram-Q4EWVU46-Boys2mT1.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-BLCbhL8K.js → blockDiagram-DXYQGD6D-CvHqp46r.js} +1 -1
- package/payload/server/public/assets/{brand-lZz3OVIE.css → brand-VQtREmts.css} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-X34EilDe.js → c4Diagram-AHTNJAMY-DiNQ95F6.js} +1 -1
- package/payload/server/public/assets/channel-BgwH_qhE.js +1 -0
- package/payload/server/public/assets/{chunk-336JU56O-CeRuGBQ2.js → chunk-336JU56O-9nS9-05M.js} +2 -2
- package/payload/server/public/assets/{chunk-426QAEUC-CUZOrcMu.js → chunk-426QAEUC-B2__9lRY.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-CdrIHRcy.js → chunk-4TB4RGXK-R5F8rS0Z.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-CenIbTIp.js → chunk-5FUZZQ4R-B8HhJce-.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-DGfzIUel.js → chunk-5PVQY5BW-Bjb08lbL.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-DSft5oIH.js → chunk-EDXVE4YY-he0qCF3s.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-Dn8FFfaI.js → chunk-ENJZ2VHE-BTArFW5l.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-JrwcKV7r.js → chunk-ICPOFSXX-CoyIL4q_.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-C0X2fcAm.js → chunk-OYMX7WX6-DjLEhNFe.js} +1 -1
- package/payload/server/public/assets/{chunk-U2HBQHQK-DPdLe-f5.js → chunk-U2HBQHQK-tac2uvW1.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-Bw8pKkFu.js → chunk-X2U36JSP-DIWD9i88.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-DcAJR-EA.js → chunk-YZCP3GAM-Ac7ogADz.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-DU374ZbR.js → chunk-ZZ45TVLE-QgqDaY9-.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-CwdV1-c8.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-CS_jtevB.js +1 -0
- package/payload/server/public/assets/clone-BTishuSs.js +1 -0
- package/payload/server/public/assets/{dagre-DisbqNSB.js → dagre-D6qN4nkK.js} +1 -1
- package/payload/server/public/assets/{dagre-KV5264BT-D_n7R7V9.js → dagre-KV5264BT-C6TRKOg0.js} +1 -1
- package/payload/server/public/assets/data-CaZbNF-j.js +1 -0
- package/payload/server/public/assets/{diagram-5BDNPKRD-CJID_5OR.js → diagram-5BDNPKRD-BVk_J8Pt.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-ByepjvdE.js → diagram-G4DWMVQ6-BdV1IgwS.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-DTkAHPHE.js → diagram-MMDJMWI5-OsvBkN6u.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-CnVRa9NJ.js → diagram-TYMM5635-BQmKPyrb.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-CRAGu7nV.js → erDiagram-SMLLAGMA-ChEx5_3C.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-BJusdlRz.js → flowDiagram-DWJPFMVM-B7sf6AG3.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-BFMOBBnF.js → ganttDiagram-T4ZO3ILL-DbpSraax.js} +1 -1
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-CGWEzh7u.js → gitGraphDiagram-UUTBAWPF-BnxDElDh.js} +1 -1
- package/payload/server/public/assets/{graph-D-iQdRDk.js → graph-CBP5yppq.js} +2 -2
- package/payload/server/public/assets/{graph-labels-u2_3Eyfh.js → graph-labels-BsZNScfa.js} +1 -1
- package/payload/server/public/assets/{graphlib-DNUvypOi.js → graphlib-Dux06enE.js} +1 -1
- package/payload/server/public/assets/{infoDiagram-42DDH7IO-CBDrnRTc.js → infoDiagram-42DDH7IO-BLWb6oKx.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-C7NwSQo_.js → ishikawaDiagram-UXIWVN3A-AFiRuE6G.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-DSaP7A3F.js → journeyDiagram-VCZTEJTY-CxHBRGGu.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-DmixHCD4.js → kanban-definition-6JOO6SKY-CGugF0N8.js} +1 -1
- package/payload/server/public/assets/{line-CGGoTheL.js → line-COFloj-X.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-BudFADW7.js → mermaid-parser.core-CxXuCDQf.js} +1 -1
- package/payload/server/public/assets/{mermaid.core-BBbdJxXY.js → mermaid.core-BRBNvNup.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-CUiD9km1.js → mindmap-definition-QFDTVHPH-DarW5Wwq.js} +1 -1
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-BlAWpMr8.js → pieDiagram-DEJITSTG-CTokFAkN.js} +1 -1
- package/payload/server/public/assets/{public-CjeEF2vf.js → public-Bq-eOUu9.js} +3 -3
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-CXmIwc4W.js → quadrantDiagram-34T5L4WZ-BNawkg3I.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-D_7_OeMC.js → requirementDiagram-MS252O5E-CWnO56oR.js} +1 -1
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-BKm_PqzT.js → sankeyDiagram-XADWPNL6-D9c-EZfV.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-CBSR0Zst.js → sequenceDiagram-FGHM5R23-In5lxCT5.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-CHNpT69M.js → stateDiagram-FHFEXIEX-CYb5js-u.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-z-TVJfRt.js +1 -0
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-CxZoew5-.js → timeline-definition-GMOUNBTQ-Cje-BY9v.js} +1 -1
- package/payload/server/public/assets/{useSelectionMode-CwxXQzEI.js → useSelectionMode-B_2EQ2CC.js} +1 -1
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-CKJdFDcG.js → vennDiagram-DHZGUBPP-BqeuoPr1.js} +1 -1
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-C-XBcm-g.js → wardleyDiagram-NUSXRM2D-DE7xAnoq.js} +1 -1
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-Crb-ZtaP.js → xychartDiagram-5P7HB3ND-JE4x8YEZ.js} +1 -1
- package/payload/server/public/data.html +5 -5
- package/payload/server/public/graph.html +6 -6
- package/payload/server/public/index.html +6 -6
- package/payload/server/public/public.html +5 -5
- package/payload/server/server.js +221 -296
- package/payload/server/public/assets/AdminShell-DtABh34v.js +0 -1
- package/payload/server/public/assets/channel-ChZECiuj.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-BpMBCYn6.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BU3HoIr1.js +0 -1
- package/payload/server/public/assets/clone-C3j5j6ku.js +0 -1
- package/payload/server/public/assets/data-DwY26t_T.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-Kc8XO6yH.js +0 -1
- /package/payload/server/public/assets/{brand-CpGp9OyK.js → brand-CzeO4m4J.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DD-I1_y5.js";import{c as t,d as n,i as r,l as i,o as a,s as o,t as s}from"./brand-CpGp9OyK.js";var c=i(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),l=i(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),u=i(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d=i(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),f=i(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),p=i(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),m=i(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),h=i(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),g=i(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),_=i(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),v=i(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),y=i(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),ee=i(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),b=i(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),x=i(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),S=i(`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`}]]),C=i(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),w=i(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),te=i(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),T=e(n(),1),E=a(),D=`maxy-shell-side-px`;function O(){if(typeof window>`u`)return 0;let e=document.querySelector(`.platform > .artefact`)?.getBoundingClientRect();return e&&e.width>0?Math.round(e.width):0}function k(e){if(typeof window>`u`)return e;let t=window.innerWidth,n=Math.max(248,t-480-O());return Math.min(Math.max(e,248),n)}function A(){if(typeof window>`u`)return 264;try{let e=window.localStorage.getItem(D);if(!e)return 264;let t=parseInt(e,10);if(Number.isFinite(t)&&t>=248)return k(t)}catch{}return 264}function j({targetSelector:e=`.platform`}){let t=(0,T.useRef)(null),[n,r]=(0,T.useState)(()=>A()),i=(0,T.useRef)(n);(0,T.useEffect)(()=>{let t=document.querySelector(e);!t||!(t instanceof HTMLElement)||(t.style.setProperty(`--side-px`,`${n}px`),i.current=n)},[n,e]);let a=(0,T.useCallback)(()=>{r(e=>{let t=k(e);return t===e?e:t})},[]);(0,T.useEffect)(()=>{a(),window.addEventListener(`resize`,a);let t=document.querySelector(e),n=null;return t instanceof HTMLElement&&(n=new MutationObserver(a),n.observe(t,{attributes:!0,attributeFilter:[`data-artefact`,`class`]})),()=>{window.removeEventListener(`resize`,a),n?.disconnect()}},[a,e]);let o=e=>{e.preventDefault();let n=t.current;if(!n)return;n.setPointerCapture(e.pointerId),n.classList.add(`dragging`);let a=!1,o=e=>{a=!0,r(k(Math.round(e.clientX)))},s=()=>{if(n.releasePointerCapture(e.pointerId),n.classList.remove(`dragging`),window.removeEventListener(`pointermove`,o),window.removeEventListener(`pointerup`,s),!a)return;let t=i.current;try{window.localStorage.setItem(D,String(t))}catch{}console.info(`[admin-ui] sidebar-resize px=${t}`)};window.addEventListener(`pointermove`,o),window.addEventListener(`pointerup`,s)},s=()=>{let e=k(264);r(e);try{window.localStorage.removeItem(D)}catch{}console.info(`[admin-ui] sidebar-resize px=${e}`)};return(0,E.jsx)(`div`,{ref:t,className:`side-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize sidebar`,onPointerDown:o,onDoubleClick:s})}var M=`maxy-admin-session`,N=typeof BroadcastChannel<`u`;function P(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`rotation`&&typeof t.newKey==`string`&&t.newKey.length>0&&(t.surface===`chat`||t.surface===`graph`||t.surface===`data`||t.surface===`sessions`)&&typeof t.ts==`number`}function F(e){if(!N)return()=>{};let t=new BroadcastChannel(M),n=t=>{if(!P(t.data)){console.warn(`[admin-session-broadcast] outcome=received-malformed payload=${JSON.stringify(t.data)}`);return}e(t.data)};return t.addEventListener(`message`,n),()=>{t.removeEventListener(`message`,n),t.close()}}var I=`maxy-admin-session-key`;function L(e,t){return`${e}${e.includes(`?`)?`&`:`?`}session_key=${encodeURIComponent(t)}`}async function R(e){let t;try{t=await e.clone().json()}catch{return`parse-failed`}if(typeof t!=`object`||!t)return`unknown-401`;let n=t.code;return n===`session-missing`||n===`session-not-registered`||n===`session-expired-age`||n===`grant-expired`?n:`unknown-401`}function z(){try{return sessionStorage.getItem(I)}catch{return null}}function B(e){let{initialCacheKey:t,surface:n}=e,[r,i]=(0,T.useState)(t),a=(0,T.useRef)(t);(0,T.useEffect)(()=>{a.current=r},[r]),(0,T.useEffect)(()=>{t!==a.current&&(i(t),a.current=t,s(e=>e+1))},[t]);let[o,s]=(0,T.useState)(0),[c,l]=(0,T.useState)(null);(0,T.useEffect)(()=>F(e=>{let t=a.current.slice(0,8),r=e.newKey.slice(0,8);e.newKey!==a.current&&(console.log(`[admin-session-broadcast] outcome=received oldKey=${t} newKey=${r} surface=${n} senderSurface=${e.surface}`),i(e.newKey),s(e=>e+1),l(null))}),[n]);let u=(0,T.useCallback)(()=>{try{sessionStorage.removeItem(I)}catch{}window.location.href=`/`},[]);return{adminFetch:(0,T.useCallback)(async(e,t)=>{let r=a.current,o=L(e,r),c=await fetch(o,t);if(c.status!==401)return c;let d=await R(c);if(d===`session-missing`)return console.warn(`[useAdminFetch] outcome=redirect-to-login reason=${d} surface=${n} path=${e}`),u(),c;if(d!==`session-not-registered`)return console.warn(`[useAdminFetch] outcome=redirect-to-login reason=${d} surface=${n} path=${e}`),l({message:`Your admin session has expired. Click to reload and sign in.`,reason:d}),c;let f=z();if(!f||f===r)return console.warn(`[useAdminFetch] outcome=redirect-to-login reason=session-not-registered-no-fresh-key surface=${n} path=${e}`),l({message:`Your admin session was renewed in another tab. Click to reload.`,reason:`session-not-registered`}),c;i(f),a.current=f,s(e=>e+1),console.log(`[useAdminFetch] outcome=retry-after-rotation oldKey=${r.slice(0,8)} newKey=${f.slice(0,8)} surface=${n} path=${e}`);let p=L(e,f),m=await fetch(p,t);return m.status===401&&(console.warn(`[useAdminFetch] outcome=redirect-to-login reason=second-401-after-retry surface=${n} path=${e}`),l({message:`Your admin session has expired. Click to reload and sign in.`,reason:`session-not-registered`})),m},[u,n]),cacheKey:r,sessionRefetchNonce:o,banner:c,reloadToLogin:u}}var V=(0,T.createContext)(null);function ne({cacheKey:e,onSessionExpired:t,surface:n,children:r}){let i=(0,T.useCallback)(async(r,i)=>{if(!e)return fetch(r,i);let a=L(r,e),o=await fetch(a,i);if(o.status!==401)return o;let s=await R(o),c=e.slice(-8);if(s===`session-not-registered`){let a=z();if(a&&a!==e){let e=L(r,a),o=await fetch(e,i);return o.status===401?(console.warn(`[admin-auth] outcome=session-expired-redirect code=second-401-after-retry path=${r} cacheKey=${c} surface=${n}`),t({code:`second-401-after-retry`,path:r}),o):o}}return console.warn(`[admin-auth] outcome=session-expired-redirect code=${s} path=${r} cacheKey=${c} surface=${n}`),t({code:s,path:r}),o},[e,t,n]);return(0,E.jsx)(V.Provider,{value:i,children:r})}function re(){return(0,T.useContext)(V)}function ie(e){let t=re();return(0,T.useMemo)(()=>t||(async(t,n)=>fetch(e?L(t,e):t,n)),[t,e])}function H(e){let{businessName:t,onNavigate:n,onToggleSidebar:i,sidebarOpen:a,onLogout:c}=e,[l,p]=(0,T.useState)(!1),h=(0,T.useRef)(null),b=(0,T.useRef)(null),x=ie(null),[C,w]=(0,T.useState)(null),[D,O]=(0,T.useState)(!1),[k,A]=(0,T.useState)(null),[j,M]=(0,T.useState)(null),[N,P]=(0,T.useState)(null),[F,I]=(0,T.useState)(``);(0,T.useEffect)(()=>{I(window.location.hostname.startsWith(`admin.`)?window.location.origin.replace(`admin.`,`public.`):window.location.origin)},[]),(0,T.useEffect)(()=>{if(!l)return;let e=e=>{h.current&&!h.current.contains(e.target)&&p(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[l]),(0,T.useEffect)(()=>{if(!l)return;let e=e=>{e.key===`Escape`&&p(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[l]),(0,T.useEffect)(()=>{l&&b.current?.focus()},[l]),(0,T.useEffect)(()=>{if(!l)return;let e=!1;return x(`/api/admin/version`).then(e=>e.json()).then(t=>{e||P(t)}).catch(e=>{console.error(`[admin/version] menu-open client fetch failed:`,e)}),()=>{e=!0}},[l,x]);let L=(0,T.useCallback)(()=>{p(e=>{let t=!e;return t&&console.info(`[admin-ui] header-menu-open`),t})},[]),R=(0,T.useCallback)(e=>{p(!1),n(e)},[n]),z=(0,T.useCallback)(async()=>{if(C!==null){w(null),M(null);return}O(!0),A(null);try{let e=await x(`/api/admin/agents`);if(!e.ok)throw Error(`Failed to load agents`);w((await e.json()).agents??[])}catch(e){console.error(`[admin/agents] list failed:`,e),A(e instanceof Error?e.message:String(e)),w([])}finally{O(!1)}},[C,x]),B=(0,T.useCallback)(e=>{M(null),w(t=>t?.filter(t=>t.slug!==e)??null),x(`/api/admin/agents/${encodeURIComponent(e)}`,{method:`DELETE`}).catch(e=>console.error(`[admin/agents] delete failed:`,e))},[x]),V=(0,T.useCallback)(()=>{p(!1),c()},[c]),ne=t||s.productName;return(0,E.jsxs)(`header`,{className:`admin-header`,children:[(0,E.jsx)(`button`,{type:`button`,className:`admin-sidebar-toggle`,"aria-label":a?`Hide sidebar`:`Show sidebar`,title:a?`Hide sidebar`:`Show sidebar`,"aria-expanded":a,onClick:i,children:a?(0,E.jsx)(y,{size:20,strokeWidth:1.5}):(0,E.jsx)(ee,{size:20,strokeWidth:1.5})}),(0,E.jsxs)(`div`,{className:`chat-header-label`,children:[(0,E.jsx)(`span`,{className:`chat-logo-btn`,"aria-hidden":`true`,children:(0,E.jsx)(`img`,{src:r,alt:``,className:`chat-logo`})}),(0,E.jsx)(`h1`,{className:`chat-tagline`,children:ne})]}),(0,E.jsxs)(`div`,{className:`chat-burger-wrap`,ref:h,children:[(0,E.jsx)(`button`,{type:`button`,className:`admin-burger`,onClick:L,"aria-label":`Menu`,"aria-haspopup":`true`,"aria-expanded":l,children:(0,E.jsx)(v,{size:20})}),l&&(0,E.jsxs)(`div`,{className:`admin-menu`,role:`menu`,children:[(0,E.jsxs)(`button`,{ref:b,type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>R(`data`),children:[(0,E.jsx)(d,{size:14}),` Data`]}),(0,E.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>R(`graph`),children:[(0,E.jsx)(S,{size:14}),` Graph`]}),(0,E.jsx)(`div`,{className:`chat-menu-divider`}),(0,E.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:z,children:[(0,E.jsx)(f,{size:14}),` Public`,D&&(0,E.jsx)(g,{size:12,className:`spin`})]}),C!==null&&(0,E.jsxs)(`div`,{className:`chat-menu-agents`,children:[k&&(0,E.jsx)(`span`,{className:`chat-menu-agent-error`,children:k}),C.length===0&&!k&&(0,E.jsx)(`span`,{className:`chat-menu-agent-empty`,children:`No public agents configured`}),C.map(e=>(0,E.jsxs)(`div`,{className:`chat-menu-item chat-menu-agent-item`,children:[(0,E.jsx)(`span`,{className:`agent-status-dot ${e.status}`}),(0,E.jsxs)(`span`,{className:`agent-text`,children:[(0,E.jsx)(`span`,{className:`agent-display-name`,children:e.displayName}),(0,E.jsxs)(`span`,{className:`agent-slug`,children:[`/`,e.slug]})]}),j===e.slug?(0,E.jsxs)(`span`,{className:`agent-actions agent-confirm`,children:[(0,E.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-confirm-yes`,title:`Confirm delete`,onClick:()=>B(e.slug),children:(0,E.jsx)(u,{size:12})}),(0,E.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-confirm-no`,title:`Cancel`,onClick:()=>M(null),children:(0,E.jsx)(te,{size:12})})]}):(0,E.jsxs)(`span`,{className:`agent-actions`,children:[(0,E.jsx)(`a`,{href:`${F}/${e.slug}`,target:`_blank`,rel:`noopener noreferrer`,className:`agent-action-btn`,title:`Open agent`,onClick:()=>p(!1),children:(0,E.jsx)(f,{size:12})}),(0,E.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-delete-btn`,title:`Delete agent`,onClick:()=>M(e.slug),children:(0,E.jsx)(o,{size:12})})]})]},e.slug))]}),(0,E.jsx)(`div`,{className:`chat-menu-divider`}),(0,E.jsxs)(`div`,{className:`chat-menu-version chat-menu-version-passive`,children:[(0,E.jsx)(m,{size:14}),(0,E.jsxs)(`span`,{className:`version-installed`,children:[N?`v${N.installed}`:`…`,N&&!N.updateAvailable&&(0,E.jsx)(`span`,{className:`version-uptodate-dot`}),N?.updateAvailable&&(0,E.jsx)(`span`,{className:`version-update-dot`})]})]}),(0,E.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:V,children:[(0,E.jsx)(_,{size:14}),` Log out`]})]})]})]})}var U=6e4,W=60*U,G=24*W,ae=U,K=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],oe=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`];function q(e){return e<10?`0${e}`:String(e)}function J(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function se(e,t){if(!Number.isFinite(e)||e<=0||!Number.isFinite(t))return`—`;let n=t-e;if(n<-ae)return`—`;let r=n<0?0:n;if(r<U)return`just now`;if(r<W)return`${Math.floor(r/U)}m`;if(r<G)return`${Math.floor(r/W)}h`;let i=new Date(t),a=new Date(e),o=Math.round((J(i)-J(a))/G);if(o===1)return`yesterday`;if(o>=2&&o<=6)return oe[a.getDay()];let s=q(a.getDate()),c=K[a.getMonth()];return a.getFullYear()===i.getFullYear()?`${s} ${c}`:`${s} ${c} ${a.getFullYear()}`}function ce(e,t,n=`data`){let r=`/api/admin/files/download?session_key=${encodeURIComponent(e)}&path=${encodeURIComponent(t)}`+(n===`data`?``:`&root=${encodeURIComponent(n)}`),i=document.createElement(`a`);i.href=r,i.rel=`noopener noreferrer`,document.body.appendChild(i),i.click(),i.remove()}var le=`https://claude.ai/code`;function Y(e){let{businessName:n,cacheKey:r,role:i,userName:a,userAvatar:o,onSelectProjects:u,onSelectPeople:d,onSelectTasks:m,onSelectAgents:g,onCloseMobileDrawer:_,collapsed:v}=e,y=ie(r),ee=s.productName,S=typeof a==`string`?a:a===null?`name unavailable`:n||ee,te=(S.trim().charAt(0)||`?`).toUpperCase(),[D,O]=(0,T.useState)(`artefacts`),[k,A]=(0,T.useState)([]),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(null),[F,I]=(0,T.useState)(!1),[L,R]=(0,T.useState)(`all`),[z,B]=(0,T.useState)(null),[V,ne]=(0,T.useState)(new Set),re=(0,T.useRef)(null),H=(0,T.useRef)(null),[U,W]=(0,T.useState)([]),[G,ae]=(0,T.useState)(!1),[K,oe]=(0,T.useState)(null),[q,J]=(0,T.useState)(!1),[Y,ue]=(0,T.useState)(!1),X=(0,T.useCallback)(e=>{if(_(),!r){console.error(`[admin-ui] artefact-download-blocked id=${e.id} reason=no-cache-key`),B({message:`Session not ready — try again`,failed:!0});return}if(!e.downloadPath){console.error(`[admin-ui] artefact-download-blocked id=${e.id} reason=not-downloadable`),B({message:`${e.name} can’t be downloaded`,failed:!0});return}console.info(`[admin-ui] artefact-download id=${e.id} root=${e.downloadRoot??`data`} path=${e.downloadPath}`),ce(r,e.downloadPath,e.downloadRoot??`data`),B({message:`Downloading ${e.name}`,failed:!1})},[r,_]),Z=(0,T.useCallback)((e,t)=>{e.stopPropagation(),!V.has(t.id)&&(H.current=t,re.current?.click())},[V]),fe=(0,T.useCallback)(async e=>{let t=e.target.files?.[0],n=H.current;if(e.target.value=``,H.current=null,!t||!n)return;let r=await t.text();if(r.includes(`\0`)){console.error(`[admin-ui] artefact-upload-blocked id=${n.id} reason=binary-file name=${t.name}`),B({message:`${t.name} looks like a binary file`,failed:!0});return}ne(e=>{let t=new Set(e);return t.add(n.id),t}),console.info(`[admin-ui] artefact-upload id=${n.id} bytes=${r.length} name=${t.name}`);try{let e=await y(`/api/admin/sidebar-artefact-save`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:n.id,content:r})});if(!e.ok){let t=await e.json().catch(()=>({})),r=e.status===403?`Saving this artefact is not allowed`:`Upload failed: ${t.error??`status ${e.status}`}`;console.error(`[admin-ui] artefact-upload-failed id=${n.id} status=${e.status} error=${t.error??`unknown`}`),B({message:r,failed:!0});return}let t=await e.json();A(e=>e.map(e=>e.id===n.id&&t.updatedAt?{...e,updatedAt:t.updatedAt}:e)),B({message:`Saved ${n.name}`,failed:!1})}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[admin-ui] artefact-upload-failed id=${n.id} error=${t}`),B({message:`Upload failed: ${t}`,failed:!0})}finally{ne(e=>{let t=new Set(e);return t.delete(n.id),t})}},[y]);(0,T.useEffect)(()=>{if(!z)return;let e=setTimeout(()=>B(null),2500);return()=>clearTimeout(e)},[z]);let Q=(0,T.useCallback)(async()=>{if(r){I(!0),P(null);try{let e=await y(`/api/admin/sidebar-artefacts`);if(!e.ok)throw Error(`status ${e.status}`);A((await e.json()).artefacts??[]),M(!0)}catch(e){let t=e instanceof Error?e.message:String(e);P(`Failed to load artefacts: ${t}`),console.error(`[admin-ui] sidebar-artefacts fetch failed: ${t}`)}finally{I(!1)}}},[r,y]);(0,T.useEffect)(()=>{!r||j||Q()},[r,j,Q]);let pe=()=>{O(`artefacts`),console.info(`[admin-ui] sidebar-nav surface=artefacts count=${j?k.length:0} collapsed=${v}`),j||Q()},$=1.5,me=()=>{console.info(`[admin-ui] sidebar-refresh surface=artefacts`),Q()},he=(0,T.useCallback)(async()=>{if(r){J(!0),oe(null);try{let e=await y(`/api/admin/sidebar-sessions`);if(!e.ok)throw Error(`status ${e.status}`);W((await e.json()).sessions??[]),ae(!0)}catch(e){let t=e instanceof Error?e.message:String(e);oe(`Failed to load sessions: ${t}`),console.error(`[admin-ui] sidebar-sessions fetch failed: ${t}`)}finally{J(!1)}}},[r,y]),ge=()=>{O(`sessions`),console.info(`[admin-ui] sidebar-nav surface=sessions count=${G?U.length:0} collapsed=${v}`),G||he()},_e=()=>{console.info(`[admin-ui] sidebar-refresh surface=sessions`),he()},ve=(0,T.useCallback)(e=>{if(!e.rcUrl){console.info(`[admin-ui] sidebar-session-click-no-url sessionId=${e.sessionId}`);return}_(),console.info(`[admin-ui] sidebar-session-open href=${e.rcUrl} sessionId=${e.sessionId}`),window.open(e.rcUrl,`_blank`,`noopener,noreferrer`)},[_]);return(0,E.jsxs)(`aside`,{className:`side`,children:[(0,E.jsx)(`div`,{className:`side-new-session-row`,children:(0,E.jsxs)(`a`,{className:`side-new-session`,href:le,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>console.info(`[admin-ui] sidebar-new-session-open href=claude.ai/code`),children:[(0,E.jsx)(b,{size:14}),(0,E.jsx)(`span`,{children:`New session`})]})}),(0,E.jsxs)(`nav`,{className:`side-nav`,children:[(0,E.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=people`),d(),_()},children:[(0,E.jsx)(w,{size:20,strokeWidth:$}),(0,E.jsx)(`span`,{className:`label`,children:`People`}),(0,E.jsx)(`span`,{className:`kbd`})]}),(0,E.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=agents`),g(),_()},children:[(0,E.jsx)(c,{size:20,strokeWidth:$}),(0,E.jsx)(`span`,{className:`label`,children:`Agents`}),(0,E.jsx)(`span`,{className:`kbd`})]}),(0,E.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=projects`),u(),_()},children:[(0,E.jsx)(l,{size:20,strokeWidth:$}),(0,E.jsx)(`span`,{className:`label`,children:`Projects`}),(0,E.jsx)(`span`,{className:`kbd`})]}),(0,E.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=tasks`),m(),_()},children:[(0,E.jsx)(h,{size:20,strokeWidth:$}),(0,E.jsx)(`span`,{className:`label`,children:`Tasks`}),(0,E.jsx)(`span`,{className:`kbd`})]}),(0,E.jsxs)(`button`,{type:`button`,className:`nav-row${D===`artefacts`?` active`:``}`,onClick:pe,children:[(0,E.jsx)(t,{size:20,strokeWidth:$}),(0,E.jsx)(`span`,{className:`label`,children:`Artefacts`}),(0,E.jsx)(`span`,{className:`kbd`})]}),(0,E.jsxs)(`button`,{type:`button`,className:`nav-row${D===`sessions`?` active`:``}`,onClick:ge,children:[(0,E.jsx)(p,{size:20,strokeWidth:$}),(0,E.jsx)(`span`,{className:`label`,children:`Sessions`}),(0,E.jsx)(`span`,{className:`kbd`})]})]}),D===`artefacts`&&(0,E.jsxs)(`div`,{className:`side-list`,children:[(0,E.jsxs)(`div`,{className:`group-head`,children:[(0,E.jsx)(`span`,{children:`Artefacts`}),(0,E.jsxs)(`span`,{className:`group-head-meta`,children:[(0,E.jsx)(`button`,{type:`button`,className:`group-head-refresh`,title:`Refresh artefacts`,"aria-label":`Refresh artefacts`,onClick:me,disabled:F,children:(0,E.jsx)(x,{size:12,className:F?`spinning`:void 0})}),(0,E.jsx)(`span`,{children:F?`…`:String(k.length)})]})]}),N&&(0,E.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:N}),j&&!N&&k.length>0&&(()=>{let e=k.filter(e=>e.kind===`agent-template`).length,t=k.length-e;return(0,E.jsx)(`div`,{className:`artefact-filter-chips`,children:[{key:`all`,label:`All`,count:k.length},{key:`agent`,label:`Agents`,count:e},{key:`file`,label:`Files`,count:t}].map(e=>(0,E.jsxs)(`button`,{type:`button`,className:`artefact-filter-chip${L===e.key?` active`:``}`,onClick:()=>R(e.key),disabled:e.count===0&&e.key!==`all`,children:[e.label,(0,E.jsx)(`span`,{className:`artefact-filter-chip-count`,children:e.count})]},e.key))})})(),j&&!N&&k.length===0&&(0,E.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:`No artefacts yet`}),k.filter(e=>L===`all`?!0:L===`agent`?e.kind===`agent-template`:e.kind!==`agent-template`).map(e=>{let t=V.has(e.id);return(0,E.jsxs)(`div`,{className:`conv-row`,children:[(0,E.jsxs)(`button`,{type:`button`,className:`conv`,onClick:()=>X(e),disabled:t,style:e.editable?{paddingRight:56}:void 0,children:[(0,E.jsx)(`span`,{className:`conv-name`,children:e.name}),(0,E.jsx)(`span`,{className:`conv-kind`,"data-kind":e.kind===`agent-template`?`agent`:`file`,children:e.kind===`agent-template`?`agent`:`file`})]}),e.editable&&(0,E.jsx)(`button`,{type:`button`,className:`conv-upload`,title:t?`Uploading…`:`Upload a replacement for ${e.name}`,"aria-label":`Upload a replacement for ${e.name}`,onClick:t=>Z(t,e),disabled:t,children:(0,E.jsx)(C,{size:12,className:t?`spinning`:void 0})})]},e.id)}),(0,E.jsx)(`input`,{ref:re,type:`file`,accept:`.md,text/markdown,text/plain`,style:{display:`none`},onChange:fe})]}),D===`sessions`&&(()=>{let e=Y?U:U.filter(e=>!e.isSubagent),t=U.some(e=>e.isSubagent);return(0,E.jsxs)(`div`,{className:`side-list`,children:[(0,E.jsxs)(`div`,{className:`group-head`,children:[(0,E.jsx)(`span`,{children:`Sessions`}),(0,E.jsxs)(`span`,{className:`group-head-meta`,children:[(0,E.jsx)(`button`,{type:`button`,className:`group-head-refresh`,title:`Refresh sessions`,"aria-label":`Refresh sessions`,onClick:_e,disabled:q,children:(0,E.jsx)(x,{size:12,className:q?`spinning`:void 0})}),(0,E.jsx)(`span`,{children:q?`…`:String(e.length)})]})]}),t&&(0,E.jsx)(`div`,{className:`artefact-filter-chips`,children:(0,E.jsx)(`button`,{type:`button`,className:`artefact-filter-chip${Y?` active`:``}`,onClick:()=>ue(e=>!e),title:Y?`Hide subagent sessions`:`Show subagent sessions`,children:`Subagents`})}),K&&(0,E.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:K}),G&&!K&&e.length===0&&(0,E.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:`No sessions yet`}),e.map(e=>{let t=Date.parse(e.startedAt),n=Number.isFinite(t)?se(t,Date.now()):``;return(0,E.jsxs)(`button`,{type:`button`,className:`conv`,onClick:()=>ve(e),disabled:!e.rcUrl,style:e.rcUrl?void 0:{cursor:`default`},children:[(0,E.jsx)(`span`,{className:`conv-live-dot`,"data-live":e.live?`1`:`0`,"aria-label":e.live?`live session`:`ended session`}),(0,E.jsx)(`span`,{className:`conv-name`,children:e.title}),e.rcUrl&&(0,E.jsx)(f,{size:12,className:`conv-rc-icon`,"aria-hidden":`true`}),n&&(0,E.jsx)(`span`,{className:`conv-kind`,"data-kind":`file`,children:n})]},e.sessionId)})]})})(),(0,E.jsx)(de,{}),(0,E.jsxs)(`div`,{className:`side-foot`,children:[(0,E.jsx)(`div`,{className:`avatar`,children:o?(0,E.jsx)(`img`,{src:o,alt:S}):te}),(0,E.jsxs)(`div`,{className:`who`,children:[(0,E.jsx)(`span`,{className:`name`,children:S}),(0,E.jsx)(`span`,{className:`role`,children:i??`operator`})]})]}),z&&(0,E.jsx)(`div`,{className:`copy-toast${z.failed?` copy-toast-failed`:``}`,role:`status`,children:z.message})]})}var ue=5e3;function de(){let[e,t]=(0,T.useState)(null);if((0,T.useEffect)(()=>{let e=!1,n=null;async function r(){try{let n=await fetch(`/api/admin/system-stats`);if(!n.ok){console.error(`[admin-ui] system-stats-fetch-failed status=${n.status}`);return}let r=await n.json();e||t(r)}catch(e){console.error(`[admin-ui] system-stats-fetch-failed reason=${e instanceof Error?e.message:String(e)}`)}}function i(){n===null&&(r(),n=setInterval(()=>{r()},ue))}function a(){n!==null&&(clearInterval(n),n=null)}function o(){document.hidden?a():i()}return document.hidden||i(),document.addEventListener(`visibilitychange`,o),()=>{e=!0,a(),document.removeEventListener(`visibilitychange`,o)}},[]),!e||e.platform===`darwin`)return null;let n=e.cpuPct,r=e.memUsedPct,i=n!==null&&n>=.9,a=n!==null&&n>=.98,o=r!==null&&r>=.9,s=r!==null&&r>=.98,c=i||o,l=a||s,u=e=>e===null?`—`:`${Math.round(e*100)}%`,d=e=>{if(e===null)return{width:`0%`,background:`var(--text-tertiary)`};let t=Math.min(1,Math.max(0,e)),n=Math.round(140*(1-t));return{width:`${Math.round(t*100)}%`,background:`hsl(${n}, 65%, 45%)`}},f=[`system-stats`];return c&&f.push(`system-stats--warn`),l&&f.push(`system-stats--crit`),(0,E.jsxs)(`div`,{className:f.join(` `),role:`status`,"aria-label":`host CPU and RAM`,children:[(0,E.jsxs)(`div`,{className:`system-stats__metric`,children:[(0,E.jsxs)(`span`,{className:i?`system-stats__fig system-stats__fig--warn`:`system-stats__fig`,children:[`CPU `,u(n)]}),(0,E.jsx)(`div`,{className:`system-stats__bar`,children:(0,E.jsx)(`div`,{className:`system-stats__bar-fill`,style:d(n)})})]}),(0,E.jsxs)(`div`,{className:`system-stats__metric`,children:[(0,E.jsxs)(`span`,{className:o?`system-stats__fig system-stats__fig--warn`:`system-stats__fig`,children:[`RAM `,u(r)]}),(0,E.jsx)(`div`,{className:`system-stats__bar`,children:(0,E.jsx)(`div`,{className:`system-stats__bar-fill`,style:d(r)})})]})]})}var X=`admin-sidebar-collapsed`,Z=`admin-sidebar-drawer-open`;function fe(){if(typeof window>`u`)return!1;try{return window.sessionStorage.getItem(X)===`1`}catch{return!1}}function Q(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(X,`1`):window.sessionStorage.removeItem(X)}catch{}}function pe(){if(typeof window>`u`)return!1;try{return window.sessionStorage.getItem(Z)===`1`}catch{return!1}}function $(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(Z,`1`):window.sessionStorage.removeItem(Z)}catch{}}var me=720;function he(e){let{cacheKey:t,businessName:n,onLogout:r,userName:i,userAvatar:a,role:o,children:s,footer:c}=e,[l,u]=(0,T.useState)(()=>fe()),[d,f]=(0,T.useState)(()=>pe()),[p,m]=(0,T.useState)(()=>typeof window<`u`&&window.matchMedia(`(max-width: ${me}px)`).matches);(0,T.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(`(max-width: ${me}px)`),t=e=>m(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let h=(0,T.useCallback)(e=>{Q(e),u(e)},[]),g=(0,T.useCallback)(e=>{$(e),f(e)},[]);(0,T.useEffect)(()=>{if(typeof window>`u`)return;let e=window.location?.pathname??``;console.info(`[admin-ui] shell-mount route=${e} collapsed=${l} drawer=${d}`)},[]);let _=p?d:!l,v=(0,T.useCallback)(()=>{if(!(typeof window>`u`))if(window.matchMedia(`(max-width: ${me}px)`).matches){let e=d;console.info(`[admin-ui] header-sidebar-toggle from=${e?`open`:`closed`} mode=drawer`),g(!e)}else{let e=l;console.info(`[admin-ui] header-sidebar-toggle from=${e?`closed`:`open`} mode=collapse`),h(!e)}},[l,d,h,g]),y=(0,T.useCallback)(e=>{console.info(`[admin-ui] header-menu-nav target=${e}`),window.location.href=e===`data`?`/data`:`/graph`},[]),ee={collapsed:l,mobileDrawerOpen:d,sidebarOpen:_,onToggleSidebar:v,setMobileDrawerOpen:g};return(0,E.jsxs)(`div`,{className:`admin-shell admin-page admin-shell-root`,children:[(0,E.jsx)(H,{businessName:n,onNavigate:y,onToggleSidebar:v,sidebarOpen:_,onLogout:r}),(0,E.jsxs)(`div`,{className:`platform${d?` menu-open`:``}${l?` sidebar-collapsed`:``}`,"data-artefact":`closed`,children:[(0,E.jsx)(Y,{businessName:n,cacheKey:t,role:o??null,userName:i,userAvatar:a??null,onSelectProjects:()=>{window.location.href=`/graph?label=Project`},onSelectPeople:()=>{window.location.href=`/graph?label=Person`},onSelectTasks:()=>{window.location.href=`/graph?label=Task`},onSelectAgents:()=>{window.location.href=`/graph?label=Agent`},onCloseMobileDrawer:()=>g(!1),collapsed:l,mobileDrawerOpen:d}),typeof s==`function`?s(ee):s]}),d&&(0,E.jsx)(`div`,{className:`sidebar-backdrop menu-open`,"aria-hidden":`true`,onClick:()=>g(!1)}),c]})}export{j as a,S as c,g as d,d as f,B as i,x as l,ce as n,te as o,ne as r,C as s,he as t,b as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{it as e,rt as t}from"./chunk-ICPOFSXX-JrwcKV7r.js";var n=(n,r)=>e.lang.round(t.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-CWiyyVfn.js";import"./chunk-ICPOFSXX-JrwcKV7r.js";import"./dist-BzAsli7o.js";import"./chunk-5PVQY5BW-DGfzIUel.js";import"./chunk-U2HBQHQK-DPdLe-f5.js";import"./chunk-FMBD7UC4-C_E43NFJ.js";import"./chunk-BSJP7CBP-L79XKVcb.js";import"./chunk-ZZ45TVLE-DU374ZbR.js";import"./chunk-YZCP3GAM-DcAJR-EA.js";import"./chunk-55IACEB6-BwZyF7vR.js";import"./chunk-EDXVE4YY-DSft5oIH.js";import"./chunk-X2U36JSP-Bw8pKkFu.js";import"./chunk-5FUZZQ4R-CenIbTIp.js";import"./chunk-ENJZ2VHE-Dn8FFfaI.js";import"./chunk-336JU56O-CeRuGBQ2.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-CdrIHRcy.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-CWiyyVfn.js";import"./chunk-ICPOFSXX-JrwcKV7r.js";import"./dist-BzAsli7o.js";import"./chunk-5PVQY5BW-DGfzIUel.js";import"./chunk-U2HBQHQK-DPdLe-f5.js";import"./chunk-FMBD7UC4-C_E43NFJ.js";import"./chunk-BSJP7CBP-L79XKVcb.js";import"./chunk-ZZ45TVLE-DU374ZbR.js";import"./chunk-YZCP3GAM-DcAJR-EA.js";import"./chunk-55IACEB6-BwZyF7vR.js";import"./chunk-EDXVE4YY-DSft5oIH.js";import"./chunk-X2U36JSP-Bw8pKkFu.js";import"./chunk-5FUZZQ4R-CenIbTIp.js";import"./chunk-ENJZ2VHE-Dn8FFfaI.js";import"./chunk-336JU56O-CeRuGBQ2.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-CdrIHRcy.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./graphlib-DNUvypOi.js";var t=4;function n(n){return e(n,t)}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DD-I1_y5.js";import{d as t,l as n,o as r,s as i,u as a}from"./brand-CpGp9OyK.js";import{a as o,d as s,f as c,i as l,n as u,s as d,t as f}from"./AdminShell-DtABh34v.js";import{i as p,t as m}from"./graph-labels-u2_3Eyfh.js";var h=n(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),g=n(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),_=n(`file`,[[`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`}]]),v=n(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),y=a(),b=e(t(),1);function x(e){let t=new Set,n=[];for(let r of e)for(let e of r.labels)e&&(t.has(e)||m.has(e)&&(t.add(e),n.push(e)));return n}var S=r();function C(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(void 0),[l,u]=(0,b.useState)(null),[d,p]=(0,b.useState)(void 0),[m,h]=(0,b.useState)(null),[g,_]=(0,b.useState)(null);(0,b.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),r(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async i=>{if(!e){if(i.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(i.ok)try{let e=await i.json();typeof e.businessName==`string`&&a(e.businessName),e.sessionId!==void 0&&u(e.sessionId??null),_(e.role??null),p(e.userName===void 0?null:e.userName),h(e.avatar??null)}catch{}t(n),r(!0)}}).catch(()=>{e||(t(n),r(!0))}),()=>{e=!0}},[]);let v=(0,b.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]);return n?e?(0,S.jsxs)(f,{cacheKey:e,businessName:i,sessionId:l,onLogout:v,userName:d,userAvatar:m,role:g,children:[(0,S.jsx)(o,{}),(0,S.jsxs)(`div`,{className:`data-page`,children:[(0,S.jsx)(`header`,{className:`data-header`,children:(0,S.jsxs)(`h1`,{className:`data-title`,children:[(0,S.jsx)(c,{size:18}),` Data`]})}),(0,S.jsx)(w,{cacheKey:e})]})]}):(0,S.jsxs)(`div`,{className:`data-page`,children:[(0,S.jsx)(`header`,{className:`data-header`,children:(0,S.jsxs)(`h1`,{className:`data-title`,children:[(0,S.jsx)(c,{size:18}),` Data`]})}),(0,S.jsxs)(`div`,{className:`data-empty`,children:[(0,S.jsx)(`p`,{children:`You are not signed in.`}),(0,S.jsxs)(`p`,{children:[`Open the `,(0,S.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,S.jsx)(`div`,{className:`data-page`,children:(0,S.jsxs)(`div`,{className:`data-loading`,children:[(0,S.jsx)(s,{size:18,className:`spin`}),` Loading…`]})})}function w({cacheKey:e}){let{adminFetch:t,cacheKey:n,sessionRefetchNonce:r,banner:i,reloadToLogin:a}=l({initialCacheKey:e,surface:`data`});return(0,S.jsxs)(`main`,{className:`data-main`,children:[i&&(0,S.jsx)(`button`,{type:`button`,className:`data-session-banner`,onClick:a,"data-reason":i.reason,children:i.message}),(0,S.jsx)(T,{adminFetch:t,cacheKey:n,sessionRefetchNonce:r}),(0,S.jsx)(A,{adminFetch:t,cacheKey:n,sessionRefetchNonce:r})]})}function T({adminFetch:e,cacheKey:t,sessionRefetchNonce:n}){let[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(``),[c,l]=(0,b.useState)(null),[u,d]=(0,b.useState)(`hybrid`),[f,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(null),[_,v]=(0,b.useState)(null),[y,C]=(0,b.useState)(0),[w,T]=(0,b.useState)(!1);(0,b.useEffect)(()=>{let e=r.trim();if(!e){o(``),l(null);return}T(!1);let t=setTimeout(()=>o(e),300);return()=>clearTimeout(t)},[r]),(0,b.useEffect)(()=>{if(!a)return;let t=!1;return m(!0),g(null),e(`/api/admin/graph-search?q=${encodeURIComponent(a)}&labels=FileArtifact&limit=20${w?`&threshold=0`:``}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(l(e.results),d(e.mode??`hybrid`),C(typeof e.suppressed==`number`?e.suppressed:0))}).catch(e=>{t||g(e instanceof Error?e.message:String(e))}).finally(()=>{t||m(!1)}),()=>{t=!0}},[a,e,n,w]);let O=(0,b.useMemo)(()=>c?x(c):[],[c]),k=_&&O.includes(_)?_:null,A=(0,b.useMemo)(()=>c?k?c.filter(e=>e.labels.includes(k)):c:null,[c,k]),j=(0,b.useCallback)(e=>{let n=e.properties.relativePath;if(typeof n!=`string`||n.length===0)return;let r=`/api/admin/files/download?session_key=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}`,i=document.createElement(`a`);i.href=r,i.rel=`noopener noreferrer`,document.body.appendChild(i),i.click(),i.remove()},[t]);return(0,S.jsxs)(`section`,{className:`data-panel`,children:[(0,S.jsx)(`h2`,{className:`data-panel-title`,children:`Search`}),(0,S.jsx)(`p`,{className:`data-panel-subtitle`,children:`Find anything in your knowledge base by keyword.`}),(0,S.jsxs)(`div`,{className:`data-search-input`,children:[(0,S.jsx)(p,{size:14}),(0,S.jsx)(`input`,{type:`text`,placeholder:`Search your knowledge…`,value:r,onChange:e=>i(e.target.value),autoFocus:!0,autoComplete:`off`,spellCheck:!1}),f&&(0,S.jsx)(s,{size:14,className:`spin`})]}),h&&(0,S.jsxs)(`div`,{className:`data-error`,children:[`Search failed: `,h]}),O.length>0&&(0,S.jsx)(`div`,{className:`data-chip-row`,role:`group`,"aria-label":`Filter by type`,children:O.map(e=>{let t=e===k;return(0,S.jsx)(`button`,{type:`button`,className:`data-chip`,"data-active":t,onClick:()=>v(t?null:e),children:D([e])??e},e)})}),c&&!f&&(0,S.jsxs)(`div`,{className:`data-results-meta`,children:[A.length,` of `,c.length,` result`,c.length===1?``:`s`]}),c&&!f&&!k&&y>0&&!w&&(0,S.jsxs)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>T(!0),children:[y,` low-confidence result`,y===1?``:`s`,` hidden — show all`]}),c&&!f&&!k&&w&&(0,S.jsx)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>T(!1),children:`Showing all results — hide low-confidence`}),c&&c.length===0&&!f&&(0,S.jsx)(`div`,{className:`data-empty-results`,children:`No matches. Try a different keyword.`}),A&&A.length>0&&(0,S.jsx)(`ul`,{className:`data-results`,children:A.map(e=>(0,S.jsx)(E,{hit:e,mode:u,onDownload:j},e.nodeId))})]})}function E({hit:e,mode:t,onDownload:n}){let r=O(e.properties),i=k(e.properties),a=D(e.labels),[o,s]=(0,b.useState)(!1),c=i&&i.length>280,l=o||!c?i:i?.slice(0,280)+`…`,u=t===`bm25`?`bm25 ${e.bm25Score.toFixed(2)}`:`vector ${e.vectorScore.toFixed(2)} · bm25 ${e.bm25Score.toFixed(2)} · combined ${e.score.toFixed(2)}`;return(0,S.jsxs)(`li`,{className:`data-result`,children:[(0,S.jsxs)(`div`,{role:`button`,tabIndex:0,className:`data-result-open`,onClick:()=>n(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e))},"aria-label":`Download ${r??a??`file`}`,children:[a&&(0,S.jsx)(`div`,{className:`data-result-header`,children:(0,S.jsx)(`span`,{className:`data-result-labels`,children:a})}),r&&(0,S.jsx)(`div`,{className:`data-result-title`,children:r}),i&&(0,S.jsx)(`pre`,{className:`data-result-body`,children:l}),(0,S.jsx)(`div`,{className:`data-result-scores`,children:u})]}),c&&(0,S.jsx)(`button`,{type:`button`,className:`data-result-toggle`,onClick:()=>s(e=>!e),children:o?`Show less`:`Show more`})]})}function D(e){if(e.length===0)return null;let t=e[0].replace(/([a-z])([A-Z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function O(e){for(let t of[`title`,`name`,`summary`,`headline`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n.length>140?n.slice(0,140)+`…`:n}return null}function k(e){for(let t of[`content`,`summary`,`body`,`description`,`text`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return null}function A({adminFetch:e,cacheKey:t,sessionRefetchNonce:n}){let[r,a]=(0,b.useState)(`.`),[o,c]=(0,b.useState)(null),[l,f]=(0,b.useState)([]),[p,m]=(0,b.useState)(!1),[y,x]=(0,b.useState)(null),[C,w]=(0,b.useState)(!1),[T,E]=(0,b.useState)(null),[D,O]=(0,b.useState)(null),[k,A]=(0,b.useState)(null),[N,P]=(0,b.useState)(null),F=(0,b.useRef)(null),[I,L]=(0,b.useState)(0);(0,b.useEffect)(()=>{let t=!1;return m(!0),x(null),e(`/api/admin/files?path=${encodeURIComponent(r===`.`?``:r)}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(c(e.entries),f(e.displayPath??[]))}).catch(e=>{t||(c([]),f([]),x(e instanceof Error?e.message:String(e)))}).finally(()=>{t||m(!1)}),()=>{t=!0}},[e,r,I,n]);let R=(0,b.useCallback)(e=>{a(e)},[]),z=(0,b.useCallback)(()=>{if(r===`.`||r===``)return;let e=r.split(`/`).filter(Boolean);e.pop(),a(e.length===0?`.`:e.join(`/`))},[r]),B=(0,b.useCallback)(e=>{u(t,r===`.`?e.name:`${r}/${e.name}`)},[r,t]),V=(0,b.useCallback)(()=>{F.current?.click()},[]),H=(0,b.useCallback)(e=>{O(null),P(e.name)},[]),U=(0,b.useCallback)(()=>{P(null)},[]),W=(0,b.useCallback)(async t=>{let n=r===`.`?t.name:`${r}/${t.name}`;O(null),P(null),A(t.name);try{let t=await e(`/api/admin/files?path=${encodeURIComponent(n)}`,{method:`DELETE`}),r=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(r.error??`HTTP ${t.status}`);L(e=>e+1)}catch(e){O(e instanceof Error?e.message:String(e))}finally{A(null)}},[r,e]);(0,b.useEffect)(()=>{if(!N)return;let e=e=>{e.key===`Escape`&&P(null)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[N]);let G=(0,b.useCallback)(async e=>{E(null),w(!0);try{let n=new FormData;n.append(`session_key`,t),n.append(`file`,e);let r=await fetch(`/api/admin/files/upload`,{method:`POST`,body:n}),i=await r.json().catch(()=>({error:`HTTP ${r.status}`}));if(!r.ok)throw Error(i.error??`HTTP ${r.status}`);a(i.path.split(`/`).slice(0,-1).join(`/`)||`.`),L(e=>e+1)}catch(e){E(e instanceof Error?e.message:String(e))}finally{w(!1),F.current&&(F.current.value=``)}},[t]);return(0,S.jsxs)(`section`,{className:`data-panel`,children:[(0,S.jsxs)(`div`,{className:`data-panel-heading`,children:[(0,S.jsx)(`h2`,{className:`data-panel-title`,children:`Files`}),(0,S.jsxs)(`div`,{className:`data-file-actions`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`data-btn`,onClick:V,disabled:C,children:[C?(0,S.jsx)(s,{size:14,className:`spin`}):(0,S.jsx)(d,{size:14}),` Upload`]}),(0,S.jsx)(`input`,{type:`file`,ref:F,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&G(t)}})]})]}),(0,S.jsxs)(`p`,{className:`data-panel-subtitle`,children:[`Everything under your install's `,(0,S.jsx)(`code`,{children:`data/`}),` directory. Click a folder to open it, a file to download it. Uploads go to `,(0,S.jsx)(`code`,{children:`data/uploads/`}),`.`]}),(0,S.jsxs)(`div`,{className:`data-breadcrumbs`,children:[(0,S.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>R(`.`),children:`data`}),l.map((e,t)=>{let n=l.slice(0,t+1).map(e=>e.name).join(`/`);return(0,S.jsxs)(`span`,{className:`data-crumb-wrap`,children:[(0,S.jsx)(`span`,{className:`data-crumb-sep`,children:`/`}),(0,S.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>R(n),title:e.name,children:e.displayName??e.name})]},n)}),r!==`.`&&(0,S.jsxs)(`button`,{type:`button`,className:`data-btn data-btn-ghost data-up-btn`,onClick:z,children:[(0,S.jsx)(h,{size:14}),` Up`]})]}),T&&(0,S.jsxs)(`div`,{className:`data-error`,children:[`Upload failed: `,T]}),D&&(0,S.jsxs)(`div`,{className:`data-error`,children:[`Delete failed: `,D]}),y&&(0,S.jsx)(`div`,{className:`data-error`,children:y}),p&&(0,S.jsxs)(`div`,{className:`data-loading`,children:[(0,S.jsx)(s,{size:14,className:`spin`}),` Loading…`]}),!p&&o&&o.length===0&&!y&&(0,S.jsx)(`div`,{className:`data-empty-results`,children:`Empty directory.`}),!p&&o&&o.length>0&&(0,S.jsx)(`ul`,{className:`data-entries`,children:o.map(e=>{let t=e.displayName??e.name,n=k===e.name,a=N===e.name;return(0,S.jsx)(`li`,{className:`data-entry`,children:e.kind===`directory`?(0,S.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>R(r===`.`?e.name:`${r}/${e.name}`),children:[(0,S.jsx)(v,{size:14}),(0,S.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t})]}):e.kind===`file`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>B(e),title:`Download ${t}`,disabled:a,children:[(0,S.jsx)(_,{size:14}),(0,S.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t}),(0,S.jsxs)(`span`,{className:`data-entry-meta`,title:`Modified ${M(e.modifiedAt)}`,children:[j(e.sizeBytes),` · `,M(e.modifiedAt)]}),(0,S.jsx)(g,{size:12,className:`data-entry-download-icon`})]}),a?(0,S.jsxs)(`div`,{className:`data-entry-confirm`,role:`group`,"aria-label":`Confirm delete ${t}`,children:[(0,S.jsx)(`span`,{className:`data-entry-confirm-label`,children:`Delete?`}),(0,S.jsx)(`button`,{type:`button`,className:`data-entry-confirm-yes`,onClick:()=>W(e),autoFocus:!0,children:`Yes`}),(0,S.jsx)(`button`,{type:`button`,className:`data-entry-confirm-no`,onClick:U,children:`No`})]}):(0,S.jsx)(`button`,{type:`button`,className:`data-entry-delete`,onClick:()=>H(e),disabled:n,title:`Delete ${t}`,"aria-label":`Delete ${t}`,children:n?(0,S.jsx)(s,{size:14,className:`spin`}):(0,S.jsx)(i,{size:14})})]}):(0,S.jsxs)(`div`,{className:`data-entry-btn data-entry-disabled`,children:[(0,S.jsx)(_,{size:14}),(0,S.jsx)(`span`,{className:`data-entry-name`,children:t}),(0,S.jsx)(`span`,{className:`data-entry-meta`,children:`special`})]})},e.name)})})]})}function j(e){return e==null?``:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024/1024/1024).toFixed(1)} GB`}function M(e){try{let t=new Date(e);if(isNaN(t.getTime()))return`—`;let n=typeof navigator<`u`?navigator.languages&&navigator.languages.length>0?[...navigator.languages]:[navigator.language]:void 0;return t.toLocaleString(n,{dateStyle:`medium`,timeStyle:`short`})}catch{return`—`}}(0,y.createRoot)(document.getElementById(`root`)).render((0,S.jsx)(C,{}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-CWiyyVfn.js";import"./chunk-ICPOFSXX-JrwcKV7r.js";import"./dist-BzAsli7o.js";import"./chunk-5PVQY5BW-DGfzIUel.js";import"./chunk-U2HBQHQK-DPdLe-f5.js";import"./chunk-BSJP7CBP-L79XKVcb.js";import"./chunk-ZZ45TVLE-DU374ZbR.js";import"./chunk-55IACEB6-BwZyF7vR.js";import"./chunk-EDXVE4YY-DSft5oIH.js";import"./chunk-X2U36JSP-Bw8pKkFu.js";import"./chunk-5FUZZQ4R-CenIbTIp.js";import"./chunk-ENJZ2VHE-Dn8FFfaI.js";import"./chunk-336JU56O-CeRuGBQ2.js";import{i as t,n,r,t as i}from"./chunk-OYMX7WX6-C0X2fcAm.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
File without changes
|