pi-roundtable-web 0.30.0 → 0.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/chunk-account-xz99gxg8.js +1 -0
- package/dist/{chunk-action-menu-mxcvx4a1.js → chunk-action-menu-fsxjfeaq.js} +1 -1
- package/dist/{chunk-agent-x53f7c2h.js → chunk-agent-bq536p6g.js} +1 -1
- package/dist/chunk-arranged-rooms-y2q330yg.js +1 -0
- package/dist/{chunk-attachments-qbv5ar62.js → chunk-attachments-s1z9jggf.js} +2 -2
- package/dist/chunk-bulk-actions-je4qp745.js +1 -0
- package/dist/{chunk-character-creator-1mfybhjz.js → chunk-character-creator-x8grfnwr.js} +2 -2
- package/dist/{chunk-codeeditor-y2emmmr0.js → chunk-codeeditor-3vh4q5af.js} +2 -2
- package/dist/{chunk-command-menu-sj2kfe4d.js → chunk-command-menu-2etjx0c7.js} +2 -2
- package/dist/chunk-confirm-wn14ffh3.js +1 -0
- package/dist/{chunk-connectors-1nmm8yc3.js → chunk-connectors-zxn3tbnv.js} +2 -2
- package/dist/{chunk-conversations-ec3aqjxs.js → chunk-conversations-2w67mmvv.js} +1 -1
- package/dist/{chunk-council-sheet-hdsg3fes.js → chunk-council-sheet-b4b04w9y.js} +2 -2
- package/dist/chunk-council-view-wem4vdqc.js +1 -0
- package/dist/{chunk-drag-pkghf4ts.js → chunk-drag-r9x782vs.js} +1 -1
- package/dist/{chunk-entry-e24gjxtd.js → chunk-entry-bq3j0xby.js} +1 -1
- package/dist/chunk-folder-list-bbn6ctsf.js +1 -0
- package/dist/chunk-folds-55w643e1.js +1 -0
- package/dist/{chunk-gate-xay9vedw.js → chunk-gate-d8deb600.js} +1 -1
- package/dist/chunk-host-icons-knmx5qa0.js +1 -0
- package/dist/chunk-host-picture-42n2n9gp.js +1 -0
- package/dist/chunk-host-state-az2ka7rs.js +1 -0
- package/dist/chunk-host-ui-1s0xyghd.js +1 -0
- package/dist/chunk-index-0xq8m6nw.js +2 -0
- package/dist/chunk-index-1k6n0hh9.js +2 -0
- package/dist/{chunk-index-0dyf2gdm.js → chunk-index-1kvnezap.js} +1 -1
- package/dist/{chunk-index-xekytvrr.js → chunk-index-25ewnkkb.js} +1 -1
- package/dist/chunk-index-3c4wvjkj.js +2 -0
- package/dist/chunk-index-4fyrpzwf.js +2 -0
- package/dist/{chunk-index-e3encn5p.js → chunk-index-50r5h98m.js} +1 -1
- package/dist/{chunk-index-65p4hfkr.js → chunk-index-5j6m33d2.js} +1 -1
- package/dist/chunk-index-5x86qy8d.js +2 -0
- package/dist/{chunk-index-r1g24er0.js → chunk-index-63qqjbs8.js} +2 -2
- package/dist/{chunk-index-xv3e4x0j.js → chunk-index-6btfp80d.js} +3 -3
- package/dist/{chunk-index-vaxytvde.js → chunk-index-6r61x1d2.js} +2 -2
- package/dist/{chunk-index-wqbcade7.js → chunk-index-711j3dpr.js} +2 -2
- package/dist/{chunk-index-xvdna54d.js → chunk-index-7379m5yw.js} +2 -2
- package/dist/{chunk-index-hk6aq03d.js → chunk-index-7wksnc48.js} +2 -2
- package/dist/{chunk-index-ndhwytvz.js → chunk-index-9hb4042t.js} +1 -1
- package/dist/{chunk-index-qqaaxh63.js → chunk-index-9smnxvd0.js} +2 -2
- package/dist/{chunk-index-6hy2fabj.js → chunk-index-ab60h2c5.js} +1 -1
- package/dist/{chunk-index-pz6926p5.js → chunk-index-apbknsyg.js} +2 -2
- package/dist/{chunk-index-ne8v2rxx.js → chunk-index-b093s676.js} +12 -12
- package/dist/chunk-index-b5924bb7.js +2 -0
- package/dist/chunk-index-bdf7gs56.js +2 -0
- package/dist/chunk-index-d0vznz2x.js +2 -0
- package/dist/{chunk-index-6e9nmad3.js → chunk-index-de5x85yn.js} +2 -2
- package/dist/chunk-index-e6z5kyz8.js +2 -0
- package/dist/chunk-index-evmzrr8e.js +2 -0
- package/dist/chunk-index-fdv6mepk.js +2 -0
- package/dist/chunk-index-ff8vzfgq.js +2 -0
- package/dist/chunk-index-hd7k712z.js +2 -0
- package/dist/{chunk-index-tfgd7vr5.js → chunk-index-hrpmm09c.js} +2 -2
- package/dist/{chunk-index-rvatmx8s.js → chunk-index-htdkpbrd.js} +25 -25
- package/dist/{chunk-index-vxn4zws9.js → chunk-index-jsgs2gmq.js} +3 -3
- package/dist/{chunk-index-gae833v6.js → chunk-index-kjxva289.js} +1 -1
- package/dist/{chunk-index-br1wechm.js → chunk-index-kkcx4bns.js} +2 -2
- package/dist/{chunk-index-xkb336kq.js → chunk-index-kvvmxbyh.js} +1 -1
- package/dist/{chunk-index-bh6m0bpm.js → chunk-index-mcb21c5a.js} +2 -2
- package/dist/chunk-index-n1w5rpxz.js +2 -0
- package/dist/{chunk-index-qb41kkt3.js → chunk-index-n7187vns.js} +2 -2
- package/dist/{chunk-index-37g8ggry.js → chunk-index-nk38jsgf.js} +1 -1
- package/dist/chunk-index-q6txr5q7.js +2 -0
- package/dist/{chunk-index-86x6b7dx.js → chunk-index-r868k92r.js} +3 -3
- package/dist/{chunk-index-ve07gdef.js → chunk-index-rj8cvc66.js} +1 -1
- package/dist/{chunk-index-93dr9fh8.js → chunk-index-rny986v2.js} +1 -1
- package/dist/{chunk-index-awc03q99.js → chunk-index-s6a9rvgd.js} +2 -2
- package/dist/{chunk-index-c8vsw9h8.js → chunk-index-sjt00y5k.js} +2 -2
- package/dist/{chunk-index-ads1abh1.js → chunk-index-sp35q2ay.js} +1 -1
- package/dist/{chunk-index-zr2qwzz4.js → chunk-index-t9an6yb2.js} +2 -2
- package/dist/{chunk-index-cd0ymvtj.js → chunk-index-tc8s2rz3.js} +1 -1
- package/dist/chunk-index-tn9qzrj2.js +2 -0
- package/dist/{chunk-index-gc30hm37.js → chunk-index-vgn794d7.js} +2 -2
- package/dist/{chunk-index-70pq2k7q.js → chunk-index-vvxr0vz8.js} +1 -1
- package/dist/{chunk-index-g3f1sdw0.js → chunk-index-w0vfwqck.js} +2 -2
- package/dist/{chunk-index-6j75embz.js → chunk-index-w1rarv3r.js} +2 -2
- package/dist/chunk-index-xfr1byr9.js +1 -0
- package/dist/{chunk-index-ptvrkv0r.js → chunk-index-xj1960qj.js} +2 -2
- package/dist/chunk-index-xwnkf825.js +2 -0
- package/dist/{chunk-index-vwd5drzh.js → chunk-index-y37ffyvy.js} +3 -3
- package/dist/{chunk-index-tqrjr37v.js → chunk-index-yrr5wvja.js} +2 -2
- package/dist/{chunk-index-726w3145.js → chunk-index-z1fvb2kq.js} +3 -3
- package/dist/chunk-index-zwfdwgnb.js +138 -0
- package/dist/chunk-lang-css-nt7ezre4.js +1 -0
- package/dist/{chunk-lang-dockerfile-9rc0adjw.js → chunk-lang-dockerfile-4422dqj4.js} +1 -1
- package/dist/{chunk-lang-go-t47kg9n0.js → chunk-lang-go-1n73q49t.js} +1 -1
- package/dist/chunk-lang-html-p4yg906g.js +1 -0
- package/dist/chunk-lang-javascript-yqkd14sv.js +1 -0
- package/dist/{chunk-lang-json-y33kawwg.js → chunk-lang-json-zm1ts7s7.js} +1 -1
- package/dist/{chunk-lang-markdown-2c2sqc4z.js → chunk-lang-markdown-3cv6a1mc.js} +2 -2
- package/dist/{chunk-lang-python-ymasvj52.js → chunk-lang-python-ba7s8q8w.js} +1 -1
- package/dist/{chunk-lang-rust-qcg53mkn.js → chunk-lang-rust-gx2hj5cw.js} +1 -1
- package/dist/{chunk-lang-shell-996wb0dk.js → chunk-lang-shell-ec7k63jq.js} +1 -1
- package/dist/{chunk-lang-sql-60rh2y3y.js → chunk-lang-sql-svdp20tw.js} +1 -1
- package/dist/{chunk-lang-toml-q1yzt70y.js → chunk-lang-toml-nj3sefw0.js} +1 -1
- package/dist/chunk-lang-typescript-84y9c0f8.js +1 -0
- package/dist/{chunk-lang-xml-k2a92cm3.js → chunk-lang-xml-jzdsx03j.js} +1 -1
- package/dist/{chunk-lang-yaml-qp3asq06.js → chunk-lang-yaml-deh87m32.js} +1 -1
- package/dist/chunk-layout-actions-x0xxb5da.js +1 -0
- package/dist/{chunk-mention-menu-qpksygcf.js → chunk-mention-menu-b1k1tm6b.js} +1 -1
- package/dist/chunk-menu-items-2meta18j.js +1 -0
- package/dist/chunk-mode-toggle-7a44994f.js +1 -0
- package/dist/{chunk-note-row-ngzxbdn6.js → chunk-note-row-pab6wtf0.js} +3 -3
- package/dist/{chunk-notes-9ykcajzc.js → chunk-notes-m0sjp2ct.js} +1 -1
- package/dist/{chunk-notice-bell-eryn2k5m.js → chunk-notice-bell-s15pgaw3.js} +1 -1
- package/dist/chunk-notices-zs8xg8v8.js +1 -0
- package/dist/{chunk-onboarding-ka11bgd0.js → chunk-onboarding-sddzxrw5.js} +1 -1
- package/dist/{chunk-overview-dgvrjwbc.js → chunk-overview-gkf6vfks.js} +1 -1
- package/dist/chunk-palette-m6bkdz1w.js +1 -0
- package/dist/chunk-placement-items-cb66mx65.js +1 -0
- package/dist/{chunk-profile-sdn7bs08.js → chunk-profile-mvj96kv6.js} +1 -1
- package/dist/{chunk-prompt-history-qfnj4w2y.js → chunk-prompt-history-mffm0c56.js} +1 -1
- package/dist/{chunk-prompts-4hdcvy6t.js → chunk-prompts-26ey03ak.js} +1 -1
- package/dist/chunk-room-confirms-1j8qfyj9.js +1 -0
- package/dist/{chunk-room-menu-18mnqcja.js → chunk-room-menu-6myvrac1.js} +1 -1
- package/dist/chunk-rooms-menu-button-3cnm8wdd.js +1 -0
- package/dist/{chunk-schedules-cy2dv8x0.js → chunk-schedules-gjfm0x30.js} +1 -1
- package/dist/{chunk-seat-menu-cw3z9560.js → chunk-seat-menu-neps7phz.js} +1 -1
- package/dist/chunk-section-fold-pgrjf74t.js +1 -0
- package/dist/{chunk-settings-rhdv64p7.js → chunk-settings-aa212bna.js} +1 -1
- package/dist/{chunk-sheet-hosts-hhs1e3a8.js → chunk-sheet-hosts-xwtaf228.js} +2 -2
- package/dist/{chunk-shortcut-help-fv6b6ntc.js → chunk-shortcut-help-aaat3wrh.js} +2 -2
- package/dist/{chunk-shortcuts-sjwrv858.js → chunk-shortcuts-wt9x6qd6.js} +1 -1
- package/dist/{chunk-skill-editor-zzmv9nfq.js → chunk-skill-editor-4jkr948n.js} +2 -2
- package/dist/{chunk-skills-b2enxk30.js → chunk-skills-87rvtwt1.js} +1 -1
- package/dist/{chunk-start-over-line-4rwasr8k.js → chunk-start-over-line-59zn5ekf.js} +2 -2
- package/dist/chunk-switcher-list-43n1vf29.js +1 -0
- package/dist/{chunk-tab-dot-b3gcgcrq.js → chunk-tab-dot-773bfgn1.js} +1 -1
- package/dist/chunk-table-1ghv10s7.js +1 -0
- package/dist/{chunk-table2d-k4z439nt.js → chunk-table2d-4k5n9dxy.js} +1 -1
- package/dist/{chunk-table3d-mx0afnv8.js → chunk-table3d-cwmxe12d.js} +21 -21
- package/dist/chunk-thread-actions-dd9ah02w.js +1 -0
- package/dist/{chunk-thread-cards-k9m7p5fn.js → chunk-thread-cards-qs242xk1.js} +1 -1
- package/dist/{chunk-thread-list-zz7596zy.js → chunk-thread-list-qxymkzs9.js} +2 -2
- package/dist/{chunk-transcript-8yjp18cr.js → chunk-transcript-sjra3d3m.js} +1 -1
- package/dist/{chunk-waiting-chip-nr9cza2j.js → chunk-waiting-chip-yq3485cq.js} +2 -2
- package/dist/chunk-waiting-xmy1cyk1.js +1 -0
- package/dist/chunk-where-m6ss9smq.js +1 -0
- package/dist/{chunk-workspace-hdamnf4r.js → chunk-workspace-jt68gwza.js} +2 -2
- package/dist/chunk-zh-tw-m2yyg5ty.js +1 -0
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +2 -2
- package/src/i18n/zh-tw.ts +0 -2
- package/dist/chunk-account-51nmc9g6.js +0 -1
- package/dist/chunk-arranged-rooms-1w3zqdtt.js +0 -1
- package/dist/chunk-bulk-actions-aktwxqc9.js +0 -1
- package/dist/chunk-confirm-ex5kc1st.js +0 -1
- package/dist/chunk-council-view-sba8fs4c.js +0 -1
- package/dist/chunk-folder-list-kghgyc0x.js +0 -1
- package/dist/chunk-folds-crd9k375.js +0 -1
- package/dist/chunk-host-icons-y9hd1qqd.js +0 -1
- package/dist/chunk-host-picture-k16n5wm3.js +0 -1
- package/dist/chunk-host-state-1mbsrmhk.js +0 -1
- package/dist/chunk-host-ui-4pymhn6v.js +0 -1
- package/dist/chunk-index-14cxgacv.js +0 -2
- package/dist/chunk-index-39gw0qhr.js +0 -2
- package/dist/chunk-index-4p45h04z.js +0 -2
- package/dist/chunk-index-5e8wn6r3.js +0 -2
- package/dist/chunk-index-6f4qvp5p.js +0 -2
- package/dist/chunk-index-8cxmgzhy.js +0 -2
- package/dist/chunk-index-97238pp8.js +0 -2
- package/dist/chunk-index-gpaychmm.js +0 -2
- package/dist/chunk-index-k3hj2310.js +0 -2
- package/dist/chunk-index-maf6wr1b.js +0 -2
- package/dist/chunk-index-mhb8mpg3.js +0 -2
- package/dist/chunk-index-n92zea3s.js +0 -2
- package/dist/chunk-index-p4rc9swx.js +0 -2
- package/dist/chunk-index-pce4byw4.js +0 -2
- package/dist/chunk-index-qwztcbjz.js +0 -2
- package/dist/chunk-index-tvsvtd4q.js +0 -2
- package/dist/chunk-index-vw592m3p.js +0 -2
- package/dist/chunk-index-x7p6k52w.js +0 -138
- package/dist/chunk-index-yzd9cg0s.js +0 -1
- package/dist/chunk-lang-css-6t2q4xw4.js +0 -1
- package/dist/chunk-lang-html-c6p22v5m.js +0 -1
- package/dist/chunk-lang-javascript-m57t19pw.js +0 -1
- package/dist/chunk-lang-typescript-7gcbrhbd.js +0 -1
- package/dist/chunk-layout-actions-yxh77zcz.js +0 -1
- package/dist/chunk-menu-items-95evdhk1.js +0 -1
- package/dist/chunk-mode-toggle-dqwvcr2p.js +0 -1
- package/dist/chunk-notices-jkv1derx.js +0 -1
- package/dist/chunk-palette-wmvynt7n.js +0 -1
- package/dist/chunk-placement-items-zyqq2mp7.js +0 -1
- package/dist/chunk-room-confirms-b8gvak47.js +0 -1
- package/dist/chunk-rooms-menu-button-hjg4zqjy.js +0 -1
- package/dist/chunk-section-fold-9tc2m103.js +0 -1
- package/dist/chunk-switcher-list-dcq91xxa.js +0 -1
- package/dist/chunk-table-6j64ps89.js +0 -1
- package/dist/chunk-thread-actions-rs5xpf1r.js +0 -1
- package/dist/chunk-waiting-9gshhhx0.js +0 -1
- package/dist/chunk-where-8mq8azgw.js +0 -1
- package/dist/chunk-zh-tw-ama40y87.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p,T,b,ee,C,a,t,g,e,n,s,Xe,u,k,_,Oe,rn,Mn,te,Ae,Cr,qi,bo,Dt,Bi,vo}from"./chunk-index-rvatmx8s.js";import"./chunk-index-e3encn5p.js";import"./chunk-index-tfgd7vr5.js";import{bn,fr}from"./chunk-index-vwd5drzh.js";import{Ue}from"./chunk-index-maf6wr1b.js";import{Ni}from"./chunk-index-vw592m3p.js";import{bi}from"./chunk-index-14cxgacv.js";import{$i}from"./chunk-index-n92zea3s.js";import{Jt}from"./chunk-index-qb41kkt3.js";import"./chunk-index-4p45h04z.js";import"./chunk-index-wqbcade7.js";import{ut}from"./chunk-index-g3f1sdw0.js";bn();var O=b(()=>(p("kghgyc0x"),import("./chunk-folder-list-kghgyc0x.js")).then((o)=>({default:o.FolderList}))),Z=ee(function(m){let{view:i}=m,h=Jt(()=>rn(i.key),i.home?void 0:$i(i.key));return e(bo,{...m,press:h,item:{...i.home?{}:{"data-drop-item":"","data-key":i.key},...m.arranging?{"data-arranging":""}:{}},after:m.arranging?e("button",{type:"button",className:"icon-button row-more","aria-haspopup":"menu","aria-label":t("Room menu"),onClick:(r)=>{let c=r.currentTarget;rn(i.key).then((l)=>{if(!l)return;let N=c.getBoundingClientRect();Oe({...l,at:{x:N.left,y:N.bottom},via:"key",source:c})},()=>{return})},children:e(s,{name:"more",size:18})}):null})});function L(o){let{now:m}=te(),{timeZone:i}=_(),h=Dt(o.rooms);return e("ul",{className:"room-list",children:h.map(({key:r,...c})=>{let l=o.threads[r];return e(Z,{...c,active:r===o.active,now:m,timeZone:i,arranging:o.arranging,...l?{threads:e(Bi,{open:l.open,closed:l.closed,active:o.active,parent:r})}:{}},r)})})}function y(o){let i=Dt(o.rooms).length===0;if(i&&o.zone?.kind!=="pinned")return null;let h=o.zone?{"data-drop-zone":o.zone.kind,"data-zone-id":o.zone.id}:{},r=(c)=>e(L,{rooms:c,threads:o.threads,active:o.active,arranging:o.arranging});if(o.fold&&!i)return e(fr,{id:o.fold,title:o.title,rooms:o.rooms,active:o.active,attrs:h,children:r});return n("section",{className:"stack",...i?{"data-empty":""}:{},...h,children:[e("h2",{className:"section-title",children:o.title}),i?null:r(o.rooms)]})}function le(o){let m=Boolean(_().kinds?.length),i=u((d)=>JSON.stringify({listed:d.listed,...ut(d,(M)=>Xe(d,M))})),h=Ni(),r=a(i);if(!h)r.current=i;let c=r.current,{listed:l,...N}=C(()=>JSON.parse(c),[c]),{home:z,pinned:S,folders:R,restAgents:P,restGroups:D,rest:A,threads:F,orphans:f}=N,w=Cr(),K=z.length+S.length+A.length===0&&R.every((d)=>d.rooms.length===0)&&f.open.length+f.closed.length===0,v={threads:F,active:o.active,arranging:w};return n("div",{className:"page","data-column":o.active?"":void 0,"data-drop-root":"",children:[n("header",{className:"page-head",children:[e("h1",{children:t("Rooms")}),n("div",{className:"actions",children:[n("button",{type:"button",className:"header-button search-button",onClick:o.onSearch,children:[e(s,{name:"search",size:16}),e("span",{children:t("Find a room")}),e("kbd",{children:"⌘K"})]}),l?e("button",{type:"button",className:"header-button icon-button","aria-haspopup":"menu","aria-label":t("Folders and order"),onClick:(d)=>bi(d.currentTarget),children:e(s,{name:"more",size:18})}):null,e("button",{type:"button",className:"header-button icon-button","aria-label":t("Add"),"aria-haspopup":"menu",onClick:(d)=>Mn(d.currentTarget),children:e(s,{name:"plus"})})]})]}),w?n("div",{className:"arrange-bar",children:[n("button",{type:"button",className:"secondary",onClick:()=>Ue({kind:"new"}),children:[e(s,{name:"plus",size:16}),e("span",{children:t("Add a folder")})]}),e("button",{type:"button",onClick:()=>qi(!1),children:t("Done")})]}):null,l&&K&&!m?e(k,{children:t("No rooms yet. Rooms appear when the team has a knight.")}):null,!l?n("div",{className:"stack","aria-busy":"true",children:[e("div",{className:"skeleton"}),e("div",{className:"skeleton"}),e("div",{className:"skeleton"})]}):null,e(y,{title:t("Home"),rooms:z,...v}),e(y,{title:t("Pinned"),rooms:S,zone:{kind:"pinned",id:"pinned"},fold:Ae("pinned"),...v}),R.length>0?e("div",{className:"stack folder-list","data-folder-list":"",children:e(T,{fallback:e("div",{className:"skeleton","aria-busy":"true"}),children:e(O,{folders:R,active:o.active,listed:l,rooms:(d)=>e(L,{rooms:d,threads:F,active:o.active,arranging:w})})})}):null,R.length>0?e(y,{title:t("Ungrouped"),rooms:A,zone:{kind:"rest",id:"rest"},fold:Ae("rest"),...v}):n(g,{children:[e(y,{title:t("Knights"),rooms:P,zone:{kind:"rest",id:"rest-agents"},fold:Ae("agents"),...v}),e(y,{title:t("Groups"),rooms:D,zone:{kind:"rest",id:"rest-groups"},fold:Ae("groups"),...v})]}),f.open.length+f.closed.length>0?n("section",{className:"stack",children:[e("h2",{className:"section-title",children:t("Dispatch threads")}),e(Bi,{open:f.open,closed:f.closed,active:o.active})]}):null,e(vo,{active:o.active})]})}export{le as ArrangedRoomsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,F,O,l,f}from"./chunk-index-rvatmx8s.js";import{an}from"./chunk-index-tfgd7vr5.js";import"./chunk-index-e3encn5p.js";import{Ln,To}from"./chunk-index-c8vsw9h8.js";import{Qo}from"./chunk-index-4p45h04z.js";import{re}from"./chunk-index-xkb336kq.js";import"./chunk-index-wqbcade7.js";var s=500,c=(n)=>{let r=[];for(let e=0;e<n.length;e+=s)r.push(n.slice(e,e+s));return r},i=()=>O.dispatch({type:"changed"});async function w(n){let r=Qo(n),e=Object.keys(r);if(e.length===0)return;let a=[];try{for(let o of c(e))a.push(...(await Ln.readAll(o)).moved)}catch(o){f(l(o),"danger"),i();return}an(Object.fromEntries(e.map((o)=>[o,0]))),f(F(e.length,"Marked {count} room as read","Marked {count} rooms as read"),"info",a.length?{label:t("Undo"),run:()=>void m(a,r)}:void 0)}async function m(n,r){try{for(let e of c(n)){let{restored:a}=await Ln.unreadAll(e);an(Object.fromEntries(a.map((o)=>[o,r[o]??0])))}}catch(e){f(l(e),"danger")}i()}var P=(n)=>To(n);async function d(n){try{await Ln.restoreHelpers(n)}catch(r){f(l(r),"danger")}i()}async function R(n){let r;try{r=(await Ln.archiveFinishedHelpers(n)).archived.flatMap((a)=>a.names)}catch(e){f(l(e),"danger"),i();return}if(i(),r.length===0)return;f(F(r.length,"Archived {count} temp knight","Archived {count} temp knights"),"info",{label:t("Undo"),run:()=>void d(r)})}async function T(n,r){try{await re.archiveAgent(n)}catch(e){f(l(e),"danger"),i();return}i(),f(t("Archived {name}",{name:r}),"info",{label:t("Undo"),run:()=>void d([n])})}export{T as archiveHelper,P as clearAllFinished,R as clearFinishedHelpers,w as markAllRead,d as putBackHelpers};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D}from"./chunk-index-gae833v6.js";import"./chunk-index-0dyf2gdm.js";export{D as Confirm};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{er,Ur}from"./chunk-index-x7p6k52w.js";import"./chunk-index-gpaychmm.js";import"./chunk-index-zr2qwzz4.js";import"./chunk-index-0dyf2gdm.js";import"./chunk-index-qwztcbjz.js";import"./chunk-index-r1g24er0.js";import"./chunk-index-tfgd7vr5.js";export{Ur as CouncilView,er as useCouncilSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p,o,R,t,F,g,e,n,s,Me,u,Oe,It,oi,go,Oo,$e,li,$n}from"./chunk-index-rvatmx8s.js";import"./chunk-index-tfgd7vr5.js";import"./chunk-index-e3encn5p.js";import{ur}from"./chunk-index-vwd5drzh.js";import{Jt}from"./chunk-index-qb41kkt3.js";import{Wi}from"./chunk-index-g3f1sdw0.js";var N=()=>(p("yxh77zcz"),import("./chunk-layout-actions-yxh77zcz.js")),b=(a)=>(p("zyqq2mp7"),import("./chunk-placement-items-zyqq2mp7.js")).then((r)=>r.folderMenu(a)),w=(a)=>({mode:"folder",key:a,item:(r)=>r.closest("[data-folder-block]"),root:(r)=>r.closest("[data-folder-block]")?.parentElement??null,onDrop:(r)=>{if(r.type==="folder")N().then((l)=>l.placeFolderBefore(a,r.before))},open:go});function k(a){let{id:r,name:l}=a,i=!a.folded,d=R(),m=Jt(()=>b(r),w(r)),f=(c)=>{b(r).then((y)=>{if(!y)return;let h=c.getBoundingClientRect();Oe({...y,at:{x:h.left,y:h.bottom},via:"key",source:c})},()=>{return})};return n("section",{className:"folder","aria-label":l,"data-folder-block":"","data-key":r,"data-drop-zone":"folder","data-zone-id":r,"data-folder":r,"data-collapsed":i?void 0:"",children:[n("header",{className:"folder-head","data-folder-head":"",...m,children:[n("button",{type:"button",className:"folder-toggle","aria-expanded":i,"aria-controls":d,"aria-label":i?t("Collapse {name}",{name:l}):t("Expand {name}",{name:l}),onClick:()=>oi(r),children:[e(s,{name:"chevron",size:16,className:"folder-chevron","data-open":i||void 0}),e("strong",{children:l}),e("span",{className:"meta",children:F(a.count,"{count} room","{count} rooms")}),i?null:a.stack]}),a.muted==="none"?null:e(s,{name:"bell-off",size:14,className:"muted-mark","data-partial":a.muted==="some"||void 0,role:"img","aria-hidden":!1,"aria-label":a.muted==="all"?t("Notifications are off"):t("Some notifications are off")}),i?null:a.summary,e("button",{type:"button",className:"icon-button folder-more","aria-haspopup":"menu","aria-label":t("Folder menu"),onClick:(c)=>f(c.currentTarget),children:e(s,{name:"more",size:18})})]}),e("div",{id:d,className:"folder-body",hidden:!i&&a.shown===0,children:i&&a.count===0?e("p",{className:"meta folder-empty",children:t("No rooms in this folder yet.")}):a.shown>0?a.children:null})]})}var S=4;function v(a){let r=a.rooms.slice(0,S),l=u((d)=>r.map((m)=>d.rooms[m]?.view),r.join(",")),i=a.rooms.length-r.length;return n("span",{className:"folder-stack","aria-hidden":"true",children:[l.map((d)=>d?e("span",{className:"folder-stack-item",children:e($e,{view:d,size:28})},d.key):null),i>0?n("span",{className:"folder-stack-more",children:["+",i]}):null]})}function M(a){let r=u((l)=>({waiting:a.rooms.reduce((i,d)=>i+Me(l,d),0),typing:a.rooms.some((i)=>l.rooms[i]?.typing)}),a.rooms.join(","));return n(g,{children:[r.typing?e(li,{}):null,r.waiting?e($n,{count:r.waiting}):null]})}function C(a){return u((r)=>Wi(a,(l)=>r.rooms[l]?.view?.muted===!0),a.join(","))}function U(a){let r=a.folders.map((l)=>l.id).join(",");return o(()=>{if(a.listed)Oo(r?r.split(","):[])},[a.listed,r]),e(g,{children:a.folders.map((l)=>e(B,{folder:l,...a},l.id))})}function B(a){let{folder:r}=a,l=C(r.rooms),i=It().has(r.id),d=ur(r.rooms,a.active),m=i?d:r.rooms,f=i?r.rooms.filter((c)=>!d.includes(c)):[];return e(k,{id:r.id,name:r.name,count:r.rooms.length,folded:i,shown:m.length,muted:l,summary:e(M,{rooms:f}),stack:f.length>0?e(v,{rooms:f}):null,children:a.rooms(m)})}export{U as FolderList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ae,It,mo,oi,go,Oo}from"./chunk-index-rvatmx8s.js";export{mo as collapsedNow,go as expandFolder,Oo as pruneCollapsed,Ae as sectionFold,oi as toggleCollapsed,It as useCollapsed};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-6hy2fabj.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{st}from"./chunk-index-ads1abh1.js";export{st as HostPicture};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ro,me,Er,Co,Eo,Ao,$o,an,Ar,No,Da}from"./chunk-index-tfgd7vr5.js";export{No as keepCards,Ar as keepReads,$o as noCards,Ao as noReads,Da as onFrame,an as seedUnread,Ro as subscribeHost,Co as totalUnread,Eo as unreadCounts,Er as unreadOf,me as useHost};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ee,E,o,R,Se,C,a,r,t,F,g,e,n,s,x,xn,O,u,fe,l,f,S,m,k,Q,tn,ei,$t,_,co,Te,nn,kn,Nt,_n,Re,Tn,zt,po,te,En,kr,_r,oa,Tr,ze}from"./chunk-index-rvatmx8s.js";import{qn}from"./chunk-index-zr2qwzz4.js";import{tr,as,He,nr}from"./chunk-index-gpaychmm.js";import{D}from"./chunk-index-gae833v6.js";import{me,Ao,$o,an,Ar,No}from"./chunk-index-tfgd7vr5.js";import{ot,st}from"./chunk-index-ads1abh1.js";import{Vr}from"./chunk-index-726w3145.js";import"./chunk-index-6hy2fabj.js";import{Ee}from"./chunk-index-xv3e4x0j.js";import{H}from"./chunk-index-5e8wn6r3.js";import"./chunk-index-0dyf2gdm.js";function Ke(c){let i={};for(let d of c)if(d.type==="multiselect")i[d.name]=[...Oe(d.initial)];else i[d.name]=Oe(d.initial)[0]??"";return i}var Oe=(c)=>c===void 0?[]:typeof c==="string"?[c]:[...c];function et(c,i){let d={};for(let p of c){let y=i[p.name];if(y===void 0||y===""||y.length===0)continue;d[p.name]=y}return d}function tt(c){let{field:i,value:d}=c,[p,y]=r(""),w=i.search?i.options.filter((h)=>h.label.toLowerCase().includes(p.trim().toLowerCase())):i.options,N=i.search?e("input",{type:"search",value:p,placeholder:t("Search…"),"aria-label":t("Search {name}",{name:i.label}),onChange:(h)=>y(h.target.value)}):null;if(i.type==="select")return n(g,{children:[N,n(Ee,{id:c.id,value:String(d),required:i.required===!0,"aria-describedby":c.described,...i.search?{size:6}:{},onChange:(h)=>c.onChange(h.target.value),children:[i.required?null:e("option",{value:"",children:t("None")}),w.map((h)=>e("option",{value:h.value,children:h.label},h.value))]})]});let b=new Set(Array.isArray(d)?d:[]);return n(g,{children:[N,e("fieldset",{"aria-describedby":c.described,children:w.map((h)=>n("label",{children:[e("input",{type:"checkbox",checked:b.has(h.value),onChange:(T)=>{let v=new Set(b);if(T.target.checked)v.add(h.value);else v.delete(h.value);c.onChange(i.options.filter((P)=>v.has(P.value)).map((P)=>P.value))}}),h.label]},h.value))})]})}function nt(c){let{field:i,value:d}=c,p=R(),y="hint"in i?i.hint:void 0,w=c.error||y?`${p}-note`:void 0,N;if("options"in i)N=e(tt,{field:i,id:p,value:d,described:w,onChange:c.onChange});else if(i.type==="textarea")N=e("textarea",{id:p,rows:5,value:String(d),maxLength:i.max??8000,required:i.required===!0,"aria-describedby":w,onChange:(b)=>c.onChange(b.target.value)});else N=e("input",{id:p,type:i.type==="url"?"url":"text",value:String(d),maxLength:i.max??500,required:i.required===!0,"aria-describedby":w,onChange:(b)=>c.onChange(b.target.value)});return n("div",{className:"host-field",children:[i.type==="multiselect"?e("span",{className:"field-label",children:i.label}):e("label",{htmlFor:p,children:i.label}),N,c.error||y?e("span",{id:`${p}-note`,className:c.error?"field-error":"hint",role:c.error?"alert":void 0,children:c.error??y}):null]})}function pe(c){let{spec:i}=c,[d,p]=r(()=>Ke(i.fields)),[y,w]=r(!1),[N,b]=r();return n("form",{className:"host-form",onSubmit:async(T)=>{if(T.preventDefault(),y)return;w(!0),b(void 0);try{b(await c.onSubmit(et(i.fields,d)))}catch(v){b({error:l(v)})}finally{w(!1)}},children:[i.fields.map((T)=>e(nt,{field:T,value:d[T.name]??"",error:N?.field===T.name?N.error:void 0,onChange:(v)=>p((P)=>({...P,[T.name]:v}))},T.name)),N&&!i.fields.some((T)=>T.name===N.field)?e(m,{message:N.error}):null,n("div",{className:"actions",children:[c.onCancel?e("button",{type:"button",className:"secondary",disabled:y,onClick:c.onCancel,children:t("Cancel")}):null,e("button",{type:"submit",disabled:y,children:i.submit})]})]})}function rt(c){if(!c.ok)return{error:tr(c.error),...c.field?{field:c.field}:{}};if(c.notice)f(c.notice);if(c.open)nr(c.open);return}function oe(c){let[i,d]=r(),[p,y]=r(!1),w=async(b,h)=>rt(await c.run(b,h)),N=async(b)=>{if(b.form||b.confirm){d(b);return}y(!0);try{let h=await w(b,{});if(h)f(h.error,"danger")}catch(h){f(l(h),"danger")}finally{y(!1)}};if(c.actions.length===0)return null;return n("div",{className:c.className??"host-actions",children:[c.actions.map((b)=>e("button",{type:"button",className:b.style==="danger"?"danger":b.style==="secondary"?"secondary":"",disabled:p,onClick:()=>N(b),children:b.label},b.id)),i?.form?e(H,{open:!0,title:i.form.title,onClose:()=>d(void 0),children:e(pe,{spec:i.form,onCancel:()=>d(void 0),onSubmit:async(b)=>{let h=await w(i,b);if(!h)d(void 0);return h}})}):i?e(D,{open:!0,title:i.label,confirmLabel:i.label,tone:i.style==="danger"?"danger":"primary",onConfirm:async()=>{let b=await w(i,{});if(b)throw Error(b.error)},onClose:()=>d(void 0),children:e("p",{children:i.confirm})}):null]})}var _e=/^file:([A-Za-z0-9_-]{1,64})$/;function qe(c){let i=URL.parse(c,document.baseURI);return i!==null&&i.origin===window.location.origin}function it({id:c,alt:i}){return e("img",{className:"file-image",src:`api/files/${encodeURIComponent(c)}`,alt:i,loading:"lazy",decoding:"async",onError:(d)=>{let p=document.createElement("span");p.textContent=i||t("Image"),d.currentTarget.replaceWith(p)}})}var re=ee(function({source:i}){return e("div",{className:"prose",children:e(tn,{remarkPlugins:[$t],urlTransform:(d)=>_e.test(d)?d:ei(d),components:{a:({href:d,children:p})=>d&&/^https?:\/\//.test(d)&&!qe(d)?e("a",{href:d,target:"_blank",rel:"noreferrer noopener",children:p}):d&&qe(d)?e("a",{href:d,children:p}):e("span",{children:p}),img:({src:d,alt:p})=>{let y=typeof d==="string"?_e.exec(d):null;return y?.[1]?e(it,{id:y[1],alt:p??""}):e("span",{children:p})},pre:co,table:({children:d})=>e("div",{className:"table-wrap",children:e("table",{children:d})})},children:i})})});function at(c){switch(c??"open"){case"working":return t("Working…");case"done":return t("Done");case"superseded":return t("Replaced");case"expired":return t("Expired");default:return""}}var Ne=(c)=>(c.state??"open")==="open";function ae(c){let{card:i}=c,d=at(i.state);return n("article",{className:"host-card","data-tone":i.tone??"note","data-state":i.state??"open",children:[n("header",{children:[e("h3",{children:i.title}),d?e(Q,{tone:i.state==="working"?"busy":"plain",children:d}):null]}),i.body?e(re,{source:i.body}):null,i.links?.length?e("div",{className:"host-card-links",children:i.links.map((p)=>e("a",{href:p.url,...p.url.startsWith("/")?{}:{target:"_blank",rel:"noreferrer noopener"},children:p.label},`${p.url}`))}):null,Ne(i)&&i.buttons?.length?e(oe,{actions:i.buttons,run:c.run}):null]})}ot();function lt(){let[c,i]=r(()=>qn().toString());return o(()=>{let d=()=>i(qn().toString());return window.addEventListener("popstate",d),window.addEventListener("hashchange",d),()=>{window.removeEventListener("popstate",d),window.removeEventListener("hashchange",d)}},[]),c}function ct(c){if(!c.ok)return{error:tr(c.error),...c.field?{field:c.field}:{}};if(c.notice)f(c.notice);if(c.open)nr(c.open);return}function dt(c){let{section:i}=c;switch(i.kind){case"markdown":return e(re,{source:i.text});case"card":return e(ae,{card:i.card,run:c.run});case"form":return n("section",{className:"stack",children:[e("h2",{className:"section-title",children:i.form.title}),e(pe,{spec:i.form,onSubmit:(d)=>c.submit(i.action,d)})]});case"list":return n("section",{className:"stack",children:[i.title?e("h2",{className:"section-title",children:i.title}):null,i.rows.length===0?e(k,{children:t("Nothing here.")}):null,e("ul",{className:"host-list",children:mt(i.rows).map(([d,p])=>n("li",{children:[p.attention?e("span",{className:"attention-dot",role:"img","aria-label":t("Needs attention")}):null,n("div",{className:"host-list-main",children:[p.open?e("a",{href:p.open,...p.open.startsWith("/")?{}:{target:"_blank",rel:"noreferrer noopener"},children:p.title}):e("strong",{children:p.title}),p.subtitle?e("span",{children:p.subtitle}):null]}),p.actions?.length?e(oe,{actions:p.actions,run:c.run}):null]},d))})]})}}function ut({routeKey:c}){let i=c??"",d=lt(),p=me((v)=>v.pages[i]??0),[y,w]=r(0),[N,b]=r({});o(()=>{let v=!0;return He.page(i,Object.fromEntries(new URLSearchParams(d))).then((P)=>v&&b({page:P}),(P)=>{if(!v)return;let q=P instanceof fe&&P.status===404;b((z)=>({...q||!z.page?{}:{page:z.page},error:l(P),gone:q}))}),()=>{v=!1}},[i,d,p,y]);let h=async(v,P)=>{let q=await He.pageAct(i,{action:v,input:P}),z=ct(q);if(!z)w((V)=>V+1);return z},T=async(v,P)=>{let q=await He.pageAct(i,{action:v.id,input:P});if(q.ok)w((z)=>z+1);return q};if(N.gone)return e("div",{className:"page",children:e(k,{children:t("This page is not available.")})});if(!N.page)return e("div",{className:"page",children:N.error?e(m,{message:N.error}):e(S,{})});return n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:N.page.title})}),N.error?e(m,{message:N.error}):null,N.page.sections.map((v,P)=>e(dt,{section:v,run:T,submit:h},P))]})}function mt(c){let i=new Map;return c.map((d)=>{let p=i.get(d.title)??0;return i.set(d.title,p+1),[`${d.title}:${p}`,d]})}function De(c){let i=me((T)=>T.cards[c.room]??$o),d=Re("(min-width: 720px) and (min-height: 760px)"),[p,y]=r();if(i.length===0)return null;let w=i.filter((T)=>Ne(T)||T.state==="working"),N=i.filter((T)=>!w.includes(T)),b=p??(d&&w.length>0),h=w[0];return n("div",{className:"host-cards","data-open":b||void 0,children:[n("button",{type:"button",className:"host-cards-toggle","aria-expanded":b,onClick:()=>y(!b),children:[e(s,{name:"chevron",size:14}),h?n("span",{children:[e("strong",{children:F(w.length,"{count} card waiting","{count} cards waiting")}),`: ${h.title}`]}):e("span",{children:t("Earlier cards ({count})",{count:N.length})})]}),b?n("div",{className:"host-cards-body",children:[w.map((T)=>e(ae,{card:T,run:c.run(T.id)},T.id)),N.length?n("details",{className:"host-cards-older",children:[e("summary",{children:t("Earlier cards ({count})",{count:N.length})}),N.map((T)=>e(ae,{card:T,run:c.run(T.id)},T.id))]}):null]}):null]})}var ft=/https?:\/\/[^\s<>"']+/g,pt=/[.,;:!?)\]}\u3001\u3002\uff0c\uff1b\uff1a\uff01\uff1f\uff09\u300d\u300f]+$/;function gt(c){let i=c.replace(pt,""),d=URL.parse(i);return d&&(d.protocol==="https:"||d.protocol==="http:")?i:""}function Ue({text:c}){let i=[],d=0;for(let p of c.matchAll(ft)){let y=gt(p[0]);if(y==="")continue;let w=p.index;if(w>d)i.push(c.slice(d,w));i.push(e("a",{href:y,target:"_blank",rel:"noreferrer noopener",children:y},`${w}`)),d=w+y.length}if(d<c.length)i.push(c.slice(d));return e("span",{className:"plain",children:i})}var $e=ee(function(i){let{message:d}=i,p=d.authorKind??"external";if(p==="notice")return n("li",{className:"host-notice","data-mid":d.id,"data-highlight":i.highlighted||void 0,"data-enter":i.enter||void 0,children:[e(s,{name:"bell",size:14}),e(re,{source:d.text}),e("time",{dateTime:d.at,children:nn(d.at,i.timeZone)})]});let y=p==="member"&&d.principalId!==void 0&&d.principalId===i.me;return n("li",{className:"message","data-mid":d.id,"data-author":p,"data-mine":y||void 0,"data-header":i.header||void 0,"data-enter":i.enter||void 0,"data-unread":i.unread||void 0,"data-highlight":i.highlighted||void 0,children:[y?null:e("span",{className:"message-avatar",children:i.header?e(st,{picture:d.picture,name:d.author}):null}),n("div",{className:"message-main",children:[i.header?n("div",{className:"message-meta",children:[e("strong",{children:d.author}),d.authorLabel?e("span",{className:"label-chip",children:d.authorLabel}):null,e("time",{dateTime:d.at,children:nn(d.at,i.timeZone)})]}):null,n("div",{className:"bubble",children:[e(po,{files:d.files}),d.text?p==="assistant"?e(re,{source:d.text}):e(Ue,{text:d.text}):null,e(zt,{files:d.files,message:d}),d.expiredFiles?e("p",{className:"message-expired",children:F(d.expiredFiles,"{count} file was removed","{count} files were removed")}):null]}),d.edited?e("span",{className:"message-edited",children:t("edited")}):null]})]})});var ht=1500,bt=96,ge=new Set,Ae=new Map;function yt(c){if(document.visibilityState!=="visible")return!1;return!c||c.scrollHeight-c.scrollTop-c.clientHeight<bt}function Be(c){if(!(c instanceof Element))return;let i=c.closest("[data-unread][data-mid]");return i?Number(i.dataset.mid):void 0}function Ge(c){let{room:i,scroller:d,messages:p,began:y,enterAfter:w,me:N,shared:b}=c,h=a({seen:void 0,watched:new Set}),[,T]=r(0),v=Ae.get(i)??ge;if(w!==void 0&&p){let M=h.current;M.seen??=w;let I=yt(d.current),W=M.seen;for(let L of p){if(L.id<=M.seen)continue;if(I)M.watched.add(L.id);W=Math.max(W,L.id)}M.seen=W}let P=C(()=>{if(y===void 0||w===void 0||!p)return ge;let M=new Set;for(let I of p){if(I.id===0||I.id<=y)continue;if(I.kind==="system"||I.note)continue;if(I.authorKind==="notice")continue;if(I.principalId===void 0?I.kind==="owner"&&!b:I.principalId===N)continue;if(h.current.watched.has(I.id)||v.has(I.id))continue;M.add(I.id)}return M.size===0?ge:M},[p,y,w,N,b,v]),q=E((M)=>{let I=Ae.get(i)??ge;if(I.has(M))return;Ae.set(i,new Set(I).add(M)),T((W)=>W+1)},[i]),z=P.size>0;o(()=>{let M=d.current;if(!M||!z)return;let I=(L)=>{if(L.pointerType==="touch")return;let G=Be(L.target);if(G!==void 0)q(G)},W=(L)=>{let G=Be(L.target);if(G!==void 0)q(G)};return M.addEventListener("pointerover",I,{passive:!0}),M.addEventListener("focusin",W,{passive:!0}),M.addEventListener("click",W,{passive:!0}),()=>{M.removeEventListener("pointerover",I),M.removeEventListener("focusin",W),M.removeEventListener("click",W)}},[d,q,z]);let V=a(new Map),B=[...P].join(",");return o(()=>{let M=d.current,I=V.current;for(let[Z,Y]of I)if(!P.has(Z))clearTimeout(Y),I.delete(Z);if(!M||!z||typeof IntersectionObserver!=="function"||!matchMedia("(pointer: coarse)").matches)return;let W=(Z)=>{let Y=I.get(Z);if(Y===void 0)return;clearTimeout(Y),I.delete(Z)},L=new IntersectionObserver((Z)=>{for(let Y of Z){let ne=Number(Y.target.dataset.mid),le=Y.rootBounds;if(!(Y.isIntersecting&&(Y.intersectionRatio>=0.5||le!==null&&Y.intersectionRect.height>=le.height*0.5))){W(ne);continue}if(I.has(ne))continue;I.set(ne,setTimeout(()=>{if(I.delete(ne),document.visibilityState==="visible")q(ne)},ht))}},{root:M,threshold:[0,0.25,0.5,0.75,1]}),G=[...M.querySelectorAll("[data-unread][data-mid]")];for(let Z of G)L.observe(Z);let j=()=>{if(document.visibilityState!=="visible")return;for(let Z of G)L.unobserve(Z),L.observe(Z)};return document.addEventListener("visibilitychange",j),()=>{document.removeEventListener("visibilitychange",j),L.disconnect()}},[d,q,z,B]),o(()=>{let M=V.current;return()=>{for(let I of M.values())clearTimeout(I);M.clear()}},[]),P}ot();var vt=3;function wt({marks:c}){let[i,d]=r(!1);return n("li",{className:"seen",children:[n("button",{type:"button",className:"seen-toggle","aria-expanded":i,onClick:()=>d((p)=>!p),children:[c.slice(0,vt).map((p)=>e(st,{picture:{principal:p.principal},name:p.name,size:16},p.principal)),e("span",{children:t("Seen by {count}",{count:c.length})})]}),i?e("span",{className:"seen-names",children:c.map((p)=>p.name).join(t(", "))}):null]})}function kt(c,i){let d=ze(),p=u((y)=>y.connects);o(()=>{let y=i.current;if(!y)return;let w=0,N=0,b,h,T=()=>{if(h=void 0,document.visibilityState!=="visible")return;let q=y.getBoundingClientRect(),z=0;for(let B of y.querySelectorAll("[data-mid]")){let M=B.getBoundingClientRect();if(M.bottom>q.top&&M.top<q.bottom-4)z=Math.max(z,Number(B.dataset.mid))}if(z<=w)return;let V=N+1000-Date.now();if(V>0){clearTimeout(b),b=setTimeout(v,V);return}if(d.send({type:"read",room:c,upTo:z}))w=z,N=Date.now()},v=()=>{if(h===void 0)h=requestAnimationFrame(T)};y.addEventListener("scroll",v,{passive:!0}),document.addEventListener("visibilitychange",v),window.addEventListener("resize",v);let P=new MutationObserver(v);return P.observe(y,{childList:!0,subtree:!0}),v(),()=>{if(y.removeEventListener("scroll",v),document.removeEventListener("visibilitychange",v),window.removeEventListener("resize",v),P.disconnect(),clearTimeout(b),h!==void 0)cancelAnimationFrame(h)}},[d,c,i,p])}function he(c){let{roomKey:i}=c;kt(i,c.scroller);let d=u((v)=>v.principal?.id),p=u((v)=>v.rooms[i]?.messages),y=me((v)=>v.reads[i]??Ao),w=me((v)=>v.cursor[i]),N=a(void 0);if(N.current===void 0&&w!==void 0)N.current=w;let b=u((v)=>v.rooms[i]?.view?.notes===!0),h=Ge({room:i,scroller:c.scroller,messages:p,began:N.current,enterAfter:c.enterAfter,me:d,shared:c.host===!0||b}),T=C(()=>{let P=(p??[]).filter((V)=>V.kind!=="system"),q=N.current===void 0?void 0:P.find((V)=>V.id>(N.current??0)&&(V.principalId===void 0||V.principalId!==d))?.id,z=new Map;for(let V of y){if(V.principal===d)continue;let B=P.findLast((M)=>M.id<=V.upTo);if(B)z.set(B.id,[...z.get(B.id)??[],V])}return{before:(V)=>V.id===q?e("li",{className:"new-divider",children:e("span",{children:t("New messages")})}):null,after:(V)=>{let B=z.get(V.id);return B?e(wt,{marks:B}):null},unread:(V)=>h.has(V.id),...c.host?{message:(V,B)=>V.kind==="system"&&V.authorKind===void 0?void 0:e($e,{message:V,header:B.header,enter:B.enter,unread:B.unread,timeZone:B.timeZone,me:d,highlighted:c.highlight===V.id})}:{}}},[p,y,d,c.host,c.highlight,h]);return e(En,{roomKey:i,enterAfter:c.enterAfter,quotable:c.quotable,decor:T})}ot();var Ht=20,Rt=2600,We;function St(c,i,d){let p=u((b)=>b.connects),y=me((b)=>b.rooms[c]??0),[w,N]=r({view:void 0,error:void 0,gone:!1});return o(()=>{let b=!0;return He.open(i,d).then((h)=>{if(!b)return;O.dispatch({type:"history_loaded",room:c,messages:h.messages,more:h.more,older:!1}),Ar(c,h.reads,h.cursor),No(c,h.cards),N({view:h,error:void 0,gone:!1})},(h)=>{if(!b)return;let T=h instanceof fe&&h.status===404;N((v)=>({view:T?void 0:v.view,error:l(h),gone:T}))}),()=>{b=!1}},[c,i,d,p,y]),w}function At(c){let{header:i}=c;return n(g,{children:[i.banner?e("p",{className:"host-banner","data-tone":i.banner.tone,role:"status",children:i.banner.text}):null,i.fields.length?e("dl",{className:"host-head-fields",children:i.fields.map((d)=>n("div",{children:[e("dt",{children:d.label}),e("dd",{children:d.link?e("a",{href:d.link,...d.link.startsWith("/")?{}:{target:"_blank",rel:"noreferrer noopener"},children:d.value}):d.value})]},`${d.label}:${d.value}`))}):null,e(oe,{className:"host-actions bar",actions:i.actions,run:c.run})]})}function Et({roomKey:c}){let i=ze(),d=as(c),p=d?.kind??"",y=d?.id??"",{view:w,error:N,gone:b}=St(c,p,y),h=u((A)=>A.rooms[c]),T=u((A)=>A.limits),v=u((A)=>A.connects),P=u((A)=>A.connection==="open"),q=a(null),z=a(null),{away:V,onScroll:B,onGrow:M,toEnd:I}=Tr(q),[W,L]=r(!1),[G,j]=r(),[Z,Y]=r(We),[ne,le]=r(!1),[Le,Me]=r(),ye=a(void 0),se=a(void 0),J=w!==void 0,ce=kr(!Re("(min-width: 1024px)"));if(o(()=>{if(!d||b||!J)return;return i.send({type:"subscribe",room:c}),i.focus(c),()=>{i.focus(void 0),i.send({type:"unsubscribe",room:c})}},[i,c,v,b,J]),J&&ye.current===void 0)ye.current=h?.messages.at(-1)?.id??0;Se(()=>{if(J)I(!1)},[J]),Se(()=>{let A=q.current;if(A&&se.current!==void 0)A.scrollTop+=A.scrollHeight-se.current,se.current=void 0},[h?.messages[0]?.id]),o(()=>{let A=z.current;if(!A||typeof ResizeObserver>"u")return;let U=new ResizeObserver(M);return U.observe(A),()=>U.disconnect()},[M]);let ve=E(async()=>{let A=O.getState().rooms[c]?.messages[0];if(!A)return!1;let U=await He.older(p,y,A.id,xn);return O.dispatch({type:"history_loaded",room:c,messages:U.messages,more:U.more,older:!0}),Ar(c,U.reads,void 0),U.more},[c,p,y]),de=a(void 0);o(()=>{let A=()=>{let U=Number(qn().get("message"));de.current=Number.isSafeInteger(U)&&U>0?U:void 0};return A(),window.addEventListener("popstate",A),()=>window.removeEventListener("popstate",A)},[]);let we=h?.messages[0]?.id,Fe=h?.more===!0;o(()=>{let A=de.current,U=q.current;if(!J||A===void 0||!U)return;let X=U.querySelector(`[data-mid="${A}"]`);if(X){de.current=void 0,X.scrollIntoView({block:"center"}),Me(A),requestAnimationFrame(()=>U.dispatchEvent(new Event("scroll"))),setTimeout(()=>Me(void 0),Rt);return}if(we!==void 0&&A<we&&Fe){let ie=0;(async()=>{if(ie+=1,!await ve().catch(()=>!1)||ie>=Ht)de.current=void 0})()}},[J,we,Fe,h?.messages.length,ve]);let xe=(A,U={},X)=>He.act(p,y,{action:A.id,...X===void 0?{}:{card:X},input:U}),Ye=(A,U)=>xe(A,U),Je=(A)=>(U,X)=>xe(U,X,A);if(b||!J&&!N&&!d)return e("section",{className:"room",children:n("div",{className:"page",children:[e(k,{children:t("This room is not available.")}),e("a",{className:"back",href:x("rooms"),children:t("Back to rooms")})]})});let K=w?.access.send??[],ke=K.length>1,Ie=ke&&ne,Ve=Z&&K.includes(Z)?Z:K.includes("turn")?"turn":K[0],Pe=Ie||Ve==="turn",Xe=Pe?w?.wording?.turn?.placeholder??t("Ask AI…"):w?.wording?.note?.placeholder??t("Write an internal note…"),ue=w?.header.title??c,je=h?.messages??[];return n("section",{className:"room",...ce.surface,onDragOver:(A)=>{if(K.length&&A.dataTransfer.types.includes("Files"))A.preventDefault()},onDrop:(A)=>{if(!K.length||!A.dataTransfer.files.length)return;A.preventDefault(),j([...A.dataTransfer.files])},children:[n("header",{className:"room-head",children:[e("a",{className:"icon-button room-back",href:x("rooms"),"aria-label":t("Back to rooms"),children:e(s,{name:"back"})}),e(_n,{open:ce.enabled?ce.show:void 0,children:e(st,{name:ue,size:40})}),n("div",{className:"room-title",children:[e("h1",{children:ue}),e("span",{className:"room-status","data-working":h?.typing||void 0,children:h?.typing?t("Working…"):t("Host room")})]})]}),!P?n("div",{className:"offline-banner",role:"status",children:[e("span",{className:"spinner","aria-hidden":"true"}),t("Reconnecting… messages wait here until it is back.")]}):null,w?e(At,{header:w.header,run:Ye}):null,e("div",{className:"room-scroll",ref:q,onScroll:B,children:n("div",{className:"room-content",ref:z,children:[N?e(m,{message:N}):null,!J&&!N?e(S,{}):null,h?.more?e("button",{type:"button",className:"secondary older",disabled:W,onClick:async()=>{L(!0),se.current=q.current?.scrollHeight;try{await ve()}catch(A){se.current=void 0,f(l(A),"danger")}finally{L(!1)}},children:W?t("Loading…"):t("Load earlier messages")}):null,J&&je.length===0?e(k,{children:t("No messages yet.")}):null,e(he,{roomKey:c,enterAfter:ye.current,quotable:!1,scroller:q,host:!0,highlight:Le}),h?.typing?e(Tn,{name:ue,progress:h.progress}):null]})}),V?n("button",{type:"button",className:"to-end",onClick:()=>I(!0),children:[e(s,{name:"send",size:16,style:{transform:"rotate(180deg)"}}),t("Latest")]}):null,w?e(De,{room:c,run:Je}):null,w&&K.length===0?e("p",{className:"room-note",children:t("You can read this room but not write in it.")}):null,w&&K.length>0?e(g,{children:e(Nt,{draftKey:c,name:ue,placeholder:Xe,commands:oa,onAddressed:le,...ke?{above:e(Vr,{on:Pe,label:w?.wording?.turn?.label??t("@AI"),...Ie?{locked:t("The message starts with @AI, so the knight answers.")}:{},onChange:(A)=>{let U=A?"turn":"note";We=U,Y(U)}})}:{},limits:T,stoppable:Boolean(h?.stoppable),onSend:(A,U,X)=>{if(ke&&X){let ie=kn(A);i.say(c,ie===""&&U.length===0?A:ie,U,"turn")}else i.say(c,A,U,Ve);I(!0)},onStop:()=>i.send({type:"stop",room:c}),...G?{incoming:G,onIncomingTaken:()=>j(void 0)}:{}},c)}):null,e(_r,{...ce.drawer,current:c})]})}ot();function be({room:c}){let i=me((d)=>d.unread[c]??0);if(i<=0)return null;return e("span",{className:"unread-mark",role:"img","aria-label":F(i,"{count} unread message","{count} unread messages"),children:i>99?"99+":i})}ot();var Ct=6,Lt=250;function Ce(c){let{kind:i}=c,{timeZone:d}=_(),{now:p}=te(),y=u((L)=>L.connects),w=me((L)=>L.lists[i]??0),[N,b]=r(""),[h,T]=r(""),[v,P]=r(),[q,z]=r(),[V,B]=r(),[M,I]=r(!1);o(()=>{let L=setTimeout(()=>T(N.trim()),Lt);return()=>clearTimeout(L)},[N]),o(()=>{let L=!0;return He.list(i,h||void 0).then((G)=>{if(!L)return;an(Object.fromEntries(G.rooms.map((j)=>[j.key,j.unread??0]))),P(G.rooms),z(G.cursor),B(void 0)},(G)=>L&&B(l(G))),()=>{L=!1}},[i,h,y,w]);let W=async()=>{if(!q||M)return;I(!0);try{let L=await He.list(i,h||void 0,q);an(Object.fromEntries(L.rooms.map((G)=>[G.key,G.unread??0]))),P((G)=>[...G??[],...L.rooms]),z(L.cursor)}catch(L){B(l(L))}finally{I(!1)}};return n("section",{className:"stack",children:[n("h2",{className:"section-title",children:[c.icon?e(s,{name:c.icon,size:14,className:"section-icon"}):null,c.label]}),v&&(v.length>=Ct||h||N)?e("input",{type:"search",className:"kind-filter",value:N,placeholder:t("Search {name}",{name:c.label}),"aria-label":t("Search {name}",{name:c.label}),onChange:(L)=>b(L.target.value)}):null,V?e(m,{message:V}):null,!v&&!V?n("div",{className:"stack","aria-busy":"true",children:[e("div",{className:"skeleton"}),e("div",{className:"skeleton"})]}):null,v&&v.length===0?e(k,{children:h?t("Nothing matches."):t("No rooms yet.")}):null,v&&v.length>0?e("ul",{className:"room-list",children:v.map((L)=>e("li",{children:n("a",{className:"room-row",href:x("room",L.key),"aria-current":L.key===c.active?"page":void 0,children:[n("span",{className:"kind-row-picture",children:[e(st,{picture:L.picture,name:L.title,size:44}),L.attention?e("span",{className:"attention-dot",role:"img","aria-label":t("Needs attention")}):null]}),n("span",{className:"room-row-main",children:[n("span",{className:"room-row-top",children:[e("strong",{children:L.title}),e(be,{room:L.key}),e("span",{className:"room-row-time",children:L.lastAt?Te(L.lastAt,p,d):""})]}),e("span",{className:"room-row-preview",children:e("span",{children:L.subtitle??""})})]}),e(s,{name:"chevron",size:16,className:"room-row-chevron"})]})},L.key))}):null,q?e("button",{type:"button",className:"secondary",disabled:M,onClick:W,children:M?t("Loading…"):t("Show more")}):null]})}function Ze(c){return c.kinds.map((i)=>e(Ce,{kind:i.kind,label:i.label,...i.icon?{icon:i.icon}:{},active:c.active},i.kind))}function Qe(){let c=(_().pages??[]).filter((i)=>i.place==="settings");if(c.length===0)return null;return n("section",{className:"card stack",children:[e("h2",{children:t("More settings")}),c.map((i)=>n("a",{className:"menu-item menu-link",href:x("p",i.id),children:[e("span",{className:"menu-text",children:e("strong",{children:i.label})}),e(s,{name:"chevron",size:16})]},i.id))]})}export{Ze as HostKinds,ut as HostPage,Et as HostRoomPage,Qe as HostSettingsPages,he as ReadLog,be as UnreadMark};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t,Oe,aa,qi}from"./chunk-index-rvatmx8s.js";import{Ue}from"./chunk-index-maf6wr1b.js";import{Gi}from"./chunk-index-4p45h04z.js";function bi(e){let r=e.getBoundingClientRect(),o=aa();Oe({title:t("Rooms"),items:[...Gi(),{id:"new-folder",label:t("Add a folder"),icon:"plus",run:()=>Ue({kind:"new"})},{id:"arrange",label:o?t("Done"):t("Arrange"),icon:o?"check":"list",run:()=>qi(!o)}],at:{x:r.left,y:r.bottom},via:"key",source:e})}
|
|
2
|
-
export{bi};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{at,u}from"./chunk-index-rvatmx8s.js";import{On}from"./chunk-index-r1g24er0.js";var Yt=On,Wn=2,l="rt-table-council",i,s=!1,f=new Set;function c(){try{return globalThis.localStorage?.getItem(l)??void 0}catch{return}}function g(){if(!s)i=c(),s=!0;return i}function Kr(n){i=n,s=!0;try{globalThis.localStorage?.setItem(l,n)}catch{}for(let e of f)e()}var a=(n)=>(f.add(n),()=>f.delete(n)),xs=()=>at(a,g,()=>{return});function Mi(){return u((n)=>n.order.map((e)=>n.rooms[e]?.view).filter((e)=>e!==void 0&&e.kind==="group"),"councils")}function Ss(n,e,r){let t=(o)=>o===void 0?void 0:n.find((d)=>d.key===o||d.name===o);return t(r)??t(e)??n[0]}function ws(n){return[...n].filter((e)=>e.muted!==!0&&!e.helper).sort((e,r)=>Number(r.home)-Number(e.home)).slice(0,Yt).map((e)=>e.name)}function ks(n,e,r=Yt){if(n.includes(e))return n.filter((t)=>t!==e);return n.length>=r?[...n]:[...n,e]}function _s(n,e){return n.filter(e).slice(0,Yt)}function Ts(n,e,r){if(e!==void 0&&n.includes(e))return e;if(r!==void 0&&n.includes(r))return r;return n[0]??""}function Ps(n,e){let r=n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,28)||"council";if(!e.has(r))return r;for(let t=2;;t+=1){let o=`${r}-${t}`;if(!e.has(o))return o}}
|
|
2
|
-
export{Yt,Wn,Kr,xs,Mi,Ss,ws,ks,_s,Ts,Ps};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p,t}from"./chunk-index-rvatmx8s.js";import{Eo}from"./chunk-index-tfgd7vr5.js";import{Zi,la,ca}from"./chunk-index-wqbcade7.js";function Qo(e){let n=Eo();if(!e)return n;let r=new Set([...e,...la(e)]);return Object.fromEntries(Object.entries(n).filter(([s])=>r.has(s)))}var i=()=>(p("aktwxqc9"),import("./chunk-bulk-actions-aktwxqc9.js"));function Gi(e){let n=[];if(Object.keys(Qo(e)).length>0)n.push({id:"read-all",label:t("Mark all as read"),icon:"check",run:()=>{i().then((r)=>r.markAllRead(e))}});if(Zi(e).size>0)n.push({id:"clear-finished",label:t("Clear all finished threads"),icon:"trash",tone:"danger",run:()=>{i().then((r)=>r.clearAllFinished(e))}});return n.push(...Mo(e)),n}function Mo(e){if(ca(e).size===0)return[];return[{id:"clear-helpers",label:t("Clear finished temp knights"),icon:"trash",tone:"danger",run:()=>{i().then((n)=>n.clearFinishedHelpers(e))}}]}
|
|
2
|
-
export{Qo,Gi,Mo};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{P,h}from"./chunk-index-rvatmx8s.js";var no={page:(e,t,o,c=50)=>h(`rooms/${encodeURIComponent(e)}/messages?archive=${t}&limit=${c}${o===void 0?"":`&before=${o}`}`)},n,{emit:r,use:s}=P();function Us(e,t){n={room:e,until:t},r()}function Vs(){if(!n)return;n=void 0,r()}var qs=()=>s(()=>n),i;function Bs(e,t){i={author:e,text:t},r()}function io(){if(!i)return;i=void 0,r()}var Fs=()=>s(()=>i);
|
|
2
|
-
export{no,Us,Vs,qs,Bs,io,Fs};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_e,X,O,P}from"./chunk-index-rvatmx8s.js";var{emit:i,use:s}=P(),o=!1,n;function pn(t){return t.cardOrder.flatMap((e)=>{let r=t.cards[e];return r&&!r.outcome?[{id:e,card:r}]:[]})}function Ca(){let t=pn(O.getState()),[e]=t;if(t.length===1&&e)or(e.id);else if(t.length>1)o=!0,i()}function rr(){if(!o)return;o=!1,i()}var Br=()=>s(()=>o);function or(t){let e=O.getState().cards[t];if(!e)return;o=!1,n=t,i(),X("room",e.room)}var Fr=()=>s(()=>n);function Gr(t){if(n!==t)return;n=void 0,i()}var _i=(t,e)=>[...t?.querySelectorAll("[data-card]")??[]].find((r)=>r.dataset.card===e),c=1600;function sr(t,e){let r=_i(t,e);if(!r)return!1;r.scrollIntoView?.({block:"center",behavior:_e()?"auto":"smooth"});let a=r.querySelector(".prompt")??r;return a.tabIndex=-1,a.focus({preventScroll:!0}),r.dataset.lit="",setTimeout(()=>delete r.dataset.lit,c),!0}
|
|
2
|
-
export{pn,Ca,rr,Br,or,Fr,Gr,_i,sr};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t,c,x,h}from"./chunk-index-rvatmx8s.js";import{qr}from"./chunk-index-zr2qwzz4.js";var n=encodeURIComponent,a=new Set([c("This action takes no form."),c("The form has no such field."),c("This field is required."),c("Choose from the list."),c("This field takes one value."),c("This field is too long."),c("Give a web address."),c("The action could not be done.")]),tr=(e)=>a.has(e)?t(e):e;function as(e){let s=e.indexOf(":"),o=e.lastIndexOf(".");if(s<0||o<s+2||o===e.length-1)return;return{kind:e.slice(s+1,o),id:e.slice(o+1)}}var He={list:(e,s,o)=>{let i=new URLSearchParams;if(s)i.set("filter",s);if(o)i.set("cursor",o);let r=i.toString();return h(`host/${n(e)}${r?`?${r}`:""}`)},open:(e,s)=>h(`host/${n(e)}/${n(s)}`),older:(e,s,o,i)=>h(`host/${n(e)}/${n(s)}/messages?before=${o}&limit=${i}`),act:(e,s,o)=>h(`host/${n(e)}/${n(s)}/act`,{method:"POST",body:JSON.stringify(o)}),page:(e,s)=>{let o=new URLSearchParams(s).toString();return h(`pages/${n(e)}${o?`?${o}`:""}`)},pageAct:(e,s)=>h(`pages/${n(e)}/act`,{method:"POST",body:JSON.stringify(s)})};function g(e){if("room"in e){let o=e.message===void 0?"":`?message=${e.message}`;return`${x("room",e.room)}${o}`}let s=new URLSearchParams(e.query??{}).toString();return`${x("p",e.page)}${s?`?${s}`:""}`}function nr(e){qr(new URL(g(e),document.baseURI))}
|
|
2
|
-
export{tr,as,He,nr};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Gs,O,P,Qr}from"./chunk-index-rvatmx8s.js";var t=()=>Qr(Gs);function Pi(e){return e.kind==="owner"&&e.delivery==="queued"&&e.principalId!==void 0&&e.principalId===O.getState().principal?.id}function ys(e){t().send({type:"cancel_queued",room:e.room,message:e.id})}function bs(e,i){t().send({type:"edit_queued",room:e.room,message:e.id,text:i})}var o,{emit:n,use:r}=P();function Qi(e){o=e,n()}function Hr(){if(!o)return;o=void 0,n()}var vs=()=>r(()=>o);
|
|
2
|
-
export{Pi,ys,bs,Qi,Hr,vs};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p}from"./chunk-index-rvatmx8s.js";var e=()=>(p("yxh77zcz"),import("./chunk-layout-actions-yxh77zcz.js")),$i=(r)=>({mode:"room",key:r,item:(o)=>o.closest("[data-drop-item]"),root:(o)=>o.closest("[data-drop-root]"),onDrop:(o)=>{if(o.type==="room")e().then((t)=>t.dropRoom(r,o.drop))},open:(o)=>void (p("crd9k375"),import("./chunk-folds-crd9k375.js")).then((t)=>t.expandFolder(o))});
|
|
2
|
-
export{$i};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E,o,r,l,te}from"./chunk-index-rvatmx8s.js";function cn(s){let{version:i}=te(),[a,u]=r(0),[f,d]=r(),[c,n]=r();o(()=>{let e=!0;return s().then((t)=>{if(!e)return;d(t),n(void 0)},(t)=>{if(e)n(l(t))}),()=>{e=!1}},[a,i]);let m=E(()=>u((e)=>e+1),[]);return{data:f,error:c,reload:m}}
|
|
2
|
-
export{cn};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O,h,l,f}from"./chunk-index-rvatmx8s.js";import{Io,Xn}from"./chunk-index-pce4byw4.js";import{fa}from"./chunk-index-bh6m0bpm.js";import{nt,Oa,ya,ba,va,xa}from"./chunk-index-hk6aq03d.js";import{Ut}from"./chunk-index-g3f1sdw0.js";var n={createFolder:(e)=>h("folders",{method:"POST",body:JSON.stringify({name:e})}),changeFolder:(e,t)=>h(`folders/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)}),deleteFolder:(e)=>h(`folders/${encodeURIComponent(e)}`,{method:"DELETE"}),muteFolder:(e,t)=>h(`folders/${encodeURIComponent(e)}/mute`,{method:"PUT",body:JSON.stringify({muted:t})}),placeRoom:(e,t,o)=>h(`rooms/${encodeURIComponent(e)}/folder`,{method:"PUT",body:JSON.stringify({folder:t,before:o})}),pinRoom:(e,t,o)=>h(`rooms/${encodeURIComponent(e)}/pin`,{method:"PUT",body:JSON.stringify({pinned:t,before:o})})};var a=(e)=>f(e,"danger"),d=(e)=>O.dispatch({type:"layout_loaded",pins:e.pins,folders:e.folders});async function i(e,t,o=a){let r=Io();try{d(e(r))}catch{}try{let s=await t();return d(s),s}catch(s){d(r),O.dispatch({type:"changed"}),o(l(s));return}}var ua=(e,t,o=null)=>i((r)=>xa(r,e,t,o),()=>n.pinRoom(e,t,o)),ln=(e,t,o=null)=>i((r)=>va(r,e,t,o),()=>n.placeRoom(e,t,o));function $r(e,t){let o=Ut(Xn(),e);if(o.kind==="rest")return;let r=nt(o.siblings,e,t);if(!r)return;return o.kind==="pinned"?ua(e,!0,r.before):ln(e,o.folder,r.before)}async function Lo(e,t=a){try{let o=await n.createFolder(e);return d(o),o.folders.at(-1)?.id}catch(o){t(l(o));return}}var Xo=(e,t,o)=>i((r)=>Oa(r,e,t),()=>n.changeFolder(e,{name:t}),o),Ra=(e,t)=>i((o)=>ya(o,e,t),()=>n.changeFolder(e,{before:t}));function Ua(e,t){let o=nt(Io().folders.map((r)=>r.id),e,t);return o?Ra(e,o.before):void 0}var zo=(e,t)=>i((o)=>ba(o,e),()=>n.deleteFolder(e),t);async function Va(e,t){try{let o=await n.muteFolder(e,t);for(let r of o.rooms)O.dispatch({type:"room_muted",room:r,muted:o.muted});return!0}catch(o){return a(l(o)),!1}}function qa(e,t){let o=fa(Ut(Xn(),e),e,t);if(!o)return;if(o.kind==="pin")return ua(e,!0,o.before);if(o.kind==="folder")return ln(e,o.folder,o.before);return ln(e,null)}
|
|
2
|
-
export{ua,ln,$r,Lo,Xo,Ra,Ua,zo,Va,qa};
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import{p,T,b,Qe,o,Se,C,jn,a,r,t,c,g,e,n,s,_e,x,X,u,P,Sn,Jn,lt,_,je,pr,kn,Nt,_n,Re,ct,ii,Tn,Oe,ye,ta,Rn,he,zt,et,tt,ia,vr,xr,Sr,En,$e,si,Be,ze,An,Mr,Rr}from"./chunk-index-rvatmx8s.js";import{bt}from"./chunk-index-qwztcbjz.js";import{He}from"./chunk-index-gpaychmm.js";import{me}from"./chunk-index-tfgd7vr5.js";import{On}from"./chunk-index-r1g24er0.js";import{A}from"./chunk-index-0dyf2gdm.js";import{B}from"./chunk-index-fw6kawhw.js";var Ne=(i)=>`roundtable-console:council-mode:${i}`,qe=(i)=>`rt-table-mode:${i}`,We="roundtable-console:table-mode",Ce=new Map,{emit:Pn,use:Dn}=P(),Ee=(i)=>i==="scene"||i==="chat"?i:void 0;function ve(i){try{return globalThis.localStorage?.getItem(i)??void 0}catch{return}}function Te(i,d){try{if(d===void 0)globalThis.localStorage?.removeItem(i);else globalThis.localStorage?.setItem(i,d)}catch{}}function Fn(i){let d=ve(qe(i)),m=d==="1"?"scene":d==="0"?"chat":void 0,f=m??Ee(ve(We))??"scene";if(m!==void 0||Ee(ve(We)))Te(Ne(i),f),Te(qe(i),void 0);return f}function In(i){let d=Ce.get(i);if(d!==void 0)return d;let m=Ee(ve(Ne(i)))??Fn(i);return Ce.set(i,m),m}function Kn(i,d){Ce.set(i,d),Te(Ne(i),d),Pn()}function Ye(i){return[Dn(()=>In(i)),(d)=>Kn(i,d)]}var $n=`
|
|
2
|
-
/* The box's fold button says what it does, in words beside its chevron. */
|
|
3
|
-
.scene-collapse {
|
|
4
|
-
width: auto;
|
|
5
|
-
flex: none;
|
|
6
|
-
gap: var(--space-1);
|
|
7
|
-
padding-inline: var(--space-2);
|
|
8
|
-
font-size: var(--text-xs);
|
|
9
|
-
}
|
|
10
|
-
.scene-collapse span {
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
}
|
|
13
|
-
/* Folded, the box is one bar: who speaks, the start of their newest line, and the button that opens it. */
|
|
14
|
-
.scene-bar {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: var(--space-2);
|
|
18
|
-
min-height: var(--touch);
|
|
19
|
-
padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2);
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
}
|
|
22
|
-
.scene-bar .scene-chip {
|
|
23
|
-
width: 2rem;
|
|
24
|
-
height: 2rem;
|
|
25
|
-
margin: 0;
|
|
26
|
-
border-width: 2px;
|
|
27
|
-
flex: none;
|
|
28
|
-
}
|
|
29
|
-
.scene-bar-name {
|
|
30
|
-
flex: 0 1 auto;
|
|
31
|
-
min-width: 3ch;
|
|
32
|
-
max-width: 35%;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
text-overflow: ellipsis;
|
|
35
|
-
white-space: nowrap;
|
|
36
|
-
}
|
|
37
|
-
.scene-bar-preview {
|
|
38
|
-
flex: 1 1 0;
|
|
39
|
-
min-width: 0;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
text-overflow: ellipsis;
|
|
42
|
-
white-space: nowrap;
|
|
43
|
-
color: var(--muted);
|
|
44
|
-
font-size: var(--text-sm);
|
|
45
|
-
}
|
|
46
|
-
.scene-bar-asking {
|
|
47
|
-
flex: none;
|
|
48
|
-
padding: 0 var(--space-2);
|
|
49
|
-
border-radius: var(--radius-full);
|
|
50
|
-
background: color-mix(in srgb, var(--accent) 16%, transparent);
|
|
51
|
-
font-size: var(--text-xs);
|
|
52
|
-
white-space: nowrap;
|
|
53
|
-
}
|
|
54
|
-
.scene-composer[hidden] {
|
|
55
|
-
display: none;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* On a phone the tab's tools are narrow, but the fold button keeps its words. */
|
|
59
|
-
@media (max-width: 719px) {
|
|
60
|
-
.scene-tools .scene-collapse,
|
|
61
|
-
.scene-bar .scene-collapse {
|
|
62
|
-
width: auto;
|
|
63
|
-
min-width: 0;
|
|
64
|
-
padding-inline: var(--space-1);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/* Phones held upright: folded, the box is only its bar and the scene takes the rest. */
|
|
68
|
-
@media (max-width: 719px) and (orientation: portrait) {
|
|
69
|
-
.table-frame[data-focused][data-folded] {
|
|
70
|
-
grid-template-rows: minmax(0, 1fr) auto;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`,Bn=`
|
|
74
|
-
/* The header's tools wrap under the title on a narrow screen rather than overflow it. */
|
|
75
|
-
.table-tools {
|
|
76
|
-
flex-wrap: wrap;
|
|
77
|
-
justify-content: flex-end;
|
|
78
|
-
}
|
|
79
|
-
/* The switch between the scene and the chat: two short choices, each an icon and its words. */
|
|
80
|
-
.table-mode {
|
|
81
|
-
flex: none;
|
|
82
|
-
margin: 0;
|
|
83
|
-
}
|
|
84
|
-
.table-mode label {
|
|
85
|
-
min-height: 2rem;
|
|
86
|
-
padding: 0 var(--space-2);
|
|
87
|
-
font-size: var(--text-sm);
|
|
88
|
-
white-space: nowrap;
|
|
89
|
-
}
|
|
90
|
-
/* A council's header is one row: its tools stay as wide as they are, the name gives way and is cut. */
|
|
91
|
-
.council-head {
|
|
92
|
-
gap: var(--space-2);
|
|
93
|
-
}
|
|
94
|
-
.council-head .table-tools {
|
|
95
|
-
flex: none;
|
|
96
|
-
flex-wrap: nowrap;
|
|
97
|
-
gap: var(--space-1);
|
|
98
|
-
}
|
|
99
|
-
.council-head .room-picture {
|
|
100
|
-
padding: 0;
|
|
101
|
-
}
|
|
102
|
-
/* The round table's name is its council picker: a title that opens the sheet. */
|
|
103
|
-
.council-head button.council-pick {
|
|
104
|
-
font-weight: var(--weight-bold);
|
|
105
|
-
}
|
|
106
|
-
/* On a narrow or touched screen the switch shows icons only; the words stay for a screen reader and as the tooltip. */
|
|
107
|
-
@media (max-width: 719px), (pointer: coarse) {
|
|
108
|
-
.table-mode .mode-label {
|
|
109
|
-
position: absolute;
|
|
110
|
-
width: 1px;
|
|
111
|
-
height: 1px;
|
|
112
|
-
overflow: hidden;
|
|
113
|
-
clip-path: inset(50%);
|
|
114
|
-
white-space: nowrap;
|
|
115
|
-
}
|
|
116
|
-
.table-mode label {
|
|
117
|
-
padding: 0 var(--space-2);
|
|
118
|
-
}
|
|
119
|
-
.council-head {
|
|
120
|
-
gap: var(--space-1);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/* The council's messages as a chat fill the view under its header, like a room's own list. */
|
|
124
|
-
.table-chat {
|
|
125
|
-
position: relative;
|
|
126
|
-
flex: 1;
|
|
127
|
-
min-height: 0;
|
|
128
|
-
display: flex;
|
|
129
|
-
flex-direction: column;
|
|
130
|
-
}
|
|
131
|
-
`,Ue=()=>B("dialogue-fold",$n),Ji=()=>B("table-page",Bn);function Gn(i){let d=(m,f,l)=>n("label",{"data-checked":i.mode===m,title:f,children:[e("input",{type:"radio",name:"table-mode",value:m,checked:i.mode===m,onChange:()=>i.onMode(m)}),e(s,{name:l,size:16}),e("span",{className:"mode-label",children:f})]});return n("fieldset",{className:"segmented table-mode",children:[e("legend",{className:"visually-hidden",children:t("Show the council as")}),d("scene",t("Animation mode"),"table"),d("chat",t("Chat mode"),"rooms")]})}function Xe(i){let{view:d,name:m,room:f}=i,l=d?.kind==="group"?d.name:void 0,y=d?e($e,{view:d,size:36}):null;return n("header",{className:"room-head council-head",children:[f?e("a",{className:"icon-button room-back",href:x("rooms"),"aria-label":t("Back to rooms"),children:e(s,{name:"back"})}):null,y?e(_n,{open:f?.drawer,children:y}):null,n("div",{className:"room-title",children:[n("h1",{children:[f?l?e("button",{type:"button",className:"room-name","aria-haspopup":"dialog",title:t("Edit group"),onClick:()=>bt({kind:"group",name:l}),children:m}):m:n("button",{type:"button",className:"room-name council-pick","aria-haspopup":"dialog",title:t("Switch council"),onClick:i.onPick,children:[m,e("span",{"aria-hidden":"true",children:" ▾"})]}),d?.muted?e(s,{name:"bell-off",size:14,className:"room-muted",role:"img","aria-hidden":!1,"aria-label":t("Notifications are off")}):null]}),e("span",{className:"room-status","data-working":i.working||void 0,children:d?.readOnly?t("Read-only"):i.working?t("Working…"):t("Group")})]}),n("div",{className:"table-tools",children:[i.onReset?e("button",{type:"button",className:"icon-button","aria-label":t("Reset view"),title:t("Reset view"),onClick:i.onReset,children:e(s,{name:"reset"})}):null,i.mode?e(Gn,{mode:i.mode,onMode:i.onMode}):null]}),e(An,{}),e("button",{ref:i.menuButton,type:"button",className:"icon-button","aria-label":t("Room menu"),"aria-haspopup":"dialog",onClick:i.onMenu,children:e(s,{name:"menu"})})]})}function Ze(i,d,m,f){if(!i)return;let l=i.pending.at(-1);if(l&&!l.failed)return{id:`p${l.id}`,who:"owner",author:d,text:l.text,files:[],live:!1,pending:!0};if(i.typing&&i.progress.text!==""){let h=i.agent??f;return{id:`s${i.messages.at(-1)?.id??0}`,who:"agent",agent:h,author:m(h),text:i.progress.text,files:[],live:!0,pending:!1}}let y=i.live.at(-1);if(y)return{id:`l${y.live??y.id}`,who:"agent",agent:y.agent,author:y.author,text:y.text,files:y.files,live:!0,pending:!1};for(let h=i.messages.length-1;h>=0;h-=1){let v=i.messages[h];if(!v||v.kind==="system")continue;return Je(v)}return}function Je(i){return{id:`m${i.id}`,who:i.kind==="owner"?"owner":"agent",agent:i.agent,author:i.author,text:i.text,files:i.files,live:!1,pending:!1}}var zn=(i,d)=>i.id===d.id||i.who===d.who&&i.agent===d.agent&&i.text!==""&&d.text!==""&&(d.text.startsWith(i.text)||i.text.startsWith(d.text));function en(){let i=[],d,m=(f)=>{let l=i.length-1,y=i[l];if(y&&zn(y,f))i[l]=f;else i.push(f)};return{get line(){return i[0]},get waiting(){return Math.max(0,i.length-1)},feed(f,l){let y=f.at(-1)?.id??0;if(!d){d=y,i=l?[l]:[];return}if(!l){d=Math.max(d,y),i=[];return}for(let h of f)if(h.id>d&&h.kind!=="system")m(Je(h));if(d=Math.max(d,y),l&&!l.id.startsWith("m"))m(l)},advance(){if(i.length<2)return!1;return i=i.slice(1),!0}}}function nn(i,d,m){if(i!==void 0&&m.includes(i))return i;return Yn(d,m)}function tn(i,d,m){return i.cardOrder.map((l)=>({id:l,card:i.cards[l]})).filter((l)=>l.card?.room===d).filter((l)=>l.card.outcome===void 0||m===void 0||l.card.after>=m)}var qn=90;function Wn(i,d,m,f={}){if(f.instant)return d;let l=i+m/1000*(f.cps??qn);return Math.min(d,Math.max(i,l))}function on(){let i,d="",m=0,f=0;return{get shown(){return Math.floor(f)},get done(){return Math.floor(f)>=m},feed(l,y){if(l!==i){let h=d!==""&&(y.startsWith(d)||d.startsWith(y));if(i=l,!h)f=0}if(d=y,m=Array.from(y).length,f>m)f=m},step(l,y){f=Wn(f,m,l,{instant:y})},finish(){f=m}}}function rn(i,d,m){if(i?.who!=="agent")return;if(i.live&&m!==void 0)return m;return d?i.agent:void 0}function sn(i,d=80){let m=i.split(`
|
|
132
|
-
`).map((l)=>l.replace(/^\s*(?:#{1,6}\s|>\s?|[-*+]\s|\d+\.\s)+/,"").replace(/[*_`~]/g,"").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\s+/g," ").trim()).find((l)=>l!=="")??"",f=Array.from(m);return f.length>d?`${f.slice(0,d-1).join("")}…`:m}var an=(i,d)=>Array.from(i).slice(0,d).join("");function Yn(i,d){if(!i||i.who!=="agent"||i.agent===void 0)return null;return d.includes(i.agent)?i.agent:null}function cn(i,d,m){return m&&m.lineId===d?m.member:i}var ln="roundtable-console:dialogue-folded",Le=new Map,{emit:Xn,use:Zn}=P();function Qn(i){let d=Le.get(i);if(d!==void 0)return d;try{let m=globalThis.localStorage?.getItem(i)??void 0;if(m!==void 0)Le.set(i,m);return m}catch{return}}function nt(i,d){Le.set(i,d);try{globalThis.localStorage?.setItem(i,d)}catch{}Xn()}var ot=()=>Qn(ln)==="1";function rt(i){nt(ln,i?"1":"0")}function we(){return[Zn(ot),rt]}var xe={},{emit:it,use:st}=P();function Ae(i,d){if(xe[i]===d)return;let m={...xe};if(d===void 0)delete m[i];else m[i]=d;xe=m,it()}var at=()=>xe;function ke(){return st(at)}var dt=24;function un(i,d,m){let f=a(!0);o(()=>{let l=i.current;if(!l)return;let y=()=>{f.current=l.scrollHeight-l.scrollTop-l.clientHeight<=dt};return l.addEventListener("scroll",y,{passive:!0}),()=>l.removeEventListener("scroll",y)},[i]),Se(()=>{let l=i.current;if(!d){f.current=!0;return}if(l&&f.current)l.scrollTop=l.scrollHeight},[i,d,m])}var ut=["①","②","③","④","⑤","⑥","⑦","⑧"];function mn(i){if(!i)return[];return[...i.spoken.map((d)=>({name:d,place:"spoken"})),...i.current===void 0?[]:[{name:i.current,place:"current"}],...i.next.map((d,m)=>({name:d,place:"next",order:m+1}))]}function fn(i){let d={};if(i?.state!=="running")return d;for(let f of i.spoken)d[f]="✓";let m=new Set;if(i.next.forEach((f,l)=>{let y=ut[l];if(y===void 0||m.has(f))return;m.add(f),d[f]=y}),i.current!==void 0)delete d[i.current];return d}var Me=(i)=>i?.state==="running"?i.current:void 0;function pn(i){let d=i.current===void 0?i.replies:i.replies+1;return Math.min(Math.max(d,0),i.limit)}function mt(i){if(i.ended==="limit")return t("Limit reached");if(i.ended==="stopped")return t("Round stopped");if(i.ended==="done")return t("{count} of {limit} replies",{count:i.replies,limit:i.limit});return t("Reply {n} of {limit}",{n:i.n,limit:i.limit})}var Pe=(i)=>mt({...i,n:pn(i)});function gn(i){let d=u((h)=>h.rooms[i.roomKey]?.round),m=u((h)=>{let v={};for(let w of Object.values(h.rooms))if(w.view?.kind==="agent")v[w.view.name]=w.view.displayName;return v}),f=tt();if(!d)return null;let l=mn(d),y=(h)=>m[h]??h;return n("div",{className:"order-strip","data-state":d.state,children:[e("ol",{className:"order-faces","aria-label":t("Speaking order"),children:l.map((h,v)=>n("li",{className:"order-face","data-place":h.place,title:y(h.name),children:[e(he,{spec:f[h.name],name:h.name,size:h.place==="current"?36:26,live:!1}),e("span",{className:"order-badge","aria-hidden":"true",children:h.place==="spoken"?"✓":h.place==="next"?h.order:null}),e("span",{className:"visually-hidden",children:`${y(h.name)}, ${h.place==="spoken"?t("has spoken"):h.place==="current"?t("speaking"):t("next")}`})]},`${h.name}:${v}`))}),e("span",{className:"order-chip","aria-live":"polite",children:Pe(d)}),d.state==="running"&&(d.queued??0)>0?e("span",{className:"order-queued",children:t("Your message waits for the next round")}):null]})}Ue();function ft(i){let d=a(on()),[,m]=jn((h)=>h+1,0),f=_e();d.current.feed(i?.id??"",i?.text??"");let l=i?.text??"",y=i?.id;return o(()=>{let h=d.current;if(f||l===""||y===void 0){h.finish(),m();return}let v=performance.now(),w=0,k=()=>{let E=performance.now();if(h.step(E-v,!1),v=E,m(),!h.done)w=requestAnimationFrame(k)};if(!h.done)w=requestAnimationFrame(k);return()=>cancelAnimationFrame(w)},[f,y,l]),{shown:d.current.shown,done:d.current.done,finish(){d.current.finish(),m()}}}function De(i){let d=u((v)=>v.rooms[i]),m=u((v)=>v.principal?.name)??t("You"),f=u((v)=>{let w={};for(let k of Object.values(v.rooms))if(k.view?.kind==="agent")w[k.view.name]=k.view.displayName;return w}),l=d?.view,y=(v)=>(v===void 0?void 0:f[v])??v??l?.displayName??i,h=Ze(d,m,y,l?.kind==="agent"?l.name:void 0);return{room:d,view:l,line:h,displayOf:y}}function pt(i){let{loaded:d,error:m}=i,f=u((v)=>v.rooms[i.roomKey]),[l,y]=r(!1),h=a(null);return o(()=>{if(i.open&&d)h.current?.scrollTo({top:h.current.scrollHeight})},[i.open,d]),e(A,{open:i.open,title:`${i.name} · ${t("Log")}`,onClose:i.onClose,children:n("div",{className:"scene-log",ref:h,children:[m?e("p",{className:"failure-text",children:m}):null,f?.more?e("button",{type:"button",className:"secondary older",disabled:l,onClick:async()=>{y(!0),await Sr(i.roomKey),y(!1)},children:l?t("Loading…"):t("Load earlier messages")}):null,e(En,{roomKey:i.roomKey,enterAfter:void 0,quotable:!0})]})})}function hn(i){let{roomKey:d}=i,m=ze(),f=_(),l=xr(d),y=i.streams!==!1;o(()=>{if(!y)return;return m.focus(d),()=>m.focus(void 0)},[m,d,y]);let h=u((M)=>M.limits),v=u((M)=>tn(M,d,M.rooms[d]?.messages.at(-1)?.id)),w=tt(),{room:k,view:E,line:V,displayOf:oe}=De(d),re=si(d,E?.displayName??d,!1),F=a(void 0);if(F.current?.room!==d)F.current={room:d,stage:en()};let{stage:I}=F.current;I.feed(k?.messages??[],V);let{line:N,waiting:G}=I,D=E?.kind==="agent"?E:void 0,q=D?D.name:N?.who==="agent"?N.agent:void 0,U=et(q?w[q]:void 0),Z=D?D.displayName:N?N.author:E?.displayName??d,{shown:ae,done:H,finish:J}=ft(N),[,ue]=jn((M)=>M+1,0);o(()=>{if(H&&G>0&&I.advance())ue()},[H,G,I]);let W=Me(k?.round),le=Boolean(k?.typing&&k.progress.text!==""&&G===0),z=rn(N,!H,le?W??N?.agent:void 0);o(()=>{Ae(d,z)},[d,z]),o(()=>()=>Ae(d,void 0),[d]);let de=a(null);un(de,!H,ae);let[Q,j]=r(!1),[O,ee]=we(),ce=N?.who==="owner"&&!D?{["--agent-accent"]:"var(--accent)"}:U,R=Boolean(k?.typing),S=H&&G===0&&N?.who==="agent"&&W!==void 0&&W!==N.agent,L=R&&(!N||N.who==="owner"||S),K=N?an(N.text,ae):"",Y=D||N?.who==="agent"?e("span",{className:"scene-chip",children:e(he,{spec:q?w[q]:void 0,name:q??Z,size:34,live:!1})}):null,ie=v.some(({card:M})=>M.outcome===void 0),ne=n("button",{type:"button",className:"icon-button scene-collapse","aria-expanded":!O,onClick:(M)=>{M.stopPropagation(),ee(!O)},children:[e(s,{name:"chevron",style:{rotate:O?"-90deg":"90deg"}}),e("span",{children:O?t("Expand dialogue"):t("Collapse dialogue")})]});return n("section",{className:"scene-box","data-open":i.open||void 0,"data-collapsed":O||void 0,"data-who":N?.who,style:ce,"aria-label":t("Log"),children:[O?n("div",{className:"scene-bar",onClick:()=>ee(!1),children:[Y,e("strong",{className:"scene-bar-name",children:Z}),e("span",{className:"scene-bar-preview",children:N?sn(N.text):k?.round?Pe(k.round):""}),ie?e("span",{className:"scene-bar-asking",children:t("Waiting for your answer")}):null,ne]}):n("header",{className:"scene-tab",children:[Y,e("strong",{className:"scene-name",children:Z}),n("span",{className:"scene-tools",children:[i.onBack?e("button",{type:"button",className:"icon-button","aria-label":t("Back to the whole table"),onClick:i.onBack,children:e(s,{name:"back"})}):null,i.onMenu?e("button",{type:"button",className:"icon-button scene-more","aria-label":t("More"),"aria-haspopup":"menu",onClick:(M)=>i.onMenu?.(M.currentTarget),children:e(s,{name:"more"})}):null,n("button",{type:"button",className:"icon-button scene-log-button","aria-label":t("Log"),"aria-haspopup":"dialog",onClick:()=>j(!0),children:[e(s,{name:"conversations"}),e("span",{children:t("Log")})]}),ne]})]}),O?null:i.strip,O?null:n("div",{className:"scene-body",ref:de,children:[e("div",{className:"scene-line","data-live":N?.live||void 0,"aria-live":"polite",...H?{}:{role:"button",tabIndex:0,title:t("Tap to show the whole message"),onClick:J,onKeyDown:(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),J()}},children:N?n(g,{children:[D&&N.who==="owner"?e("span",{className:"scene-from",children:N.author}):null,e(je,{source:K}),H?e(zt,{files:N.files}):null]}):null}),L&&k?e(Tn,{name:S?oe(W):Z,progress:k.progress}):null,v.map(({id:M,card:se})=>e("div",{className:"scene-card",children:e(vr,{card:se,timeZone:f.timeZone})},M))]}),E?.readOnly?null:e("div",{className:"scene-composer",hidden:O,children:e(Nt,{draftKey:d,...i.mentionable?{mentionable:i.mentionable}:{},name:E?.displayName??d,commands:re,limits:h,stoppable:Boolean(k?.stoppable),blurAfterSend:i.blurAfterSend===!0,...E?.kind==="group"?{stopLabel:t("Stop the round")}:{},onSend:(M,se)=>m.say(d,M,se),onStop:()=>m.send({type:"stop",room:d})},d)}),e(pt,{roomKey:d,open:Q,loaded:l.loaded,error:l.error,name:E?.displayName??d,onClose:()=>j(!1)})]})}var gt=8,ht={views:[],attention:{},loaded:!1},bn=ht,{emit:yt,use:vt}=P(),Un=()=>vt(()=>bn);function vi(){let i=Qe(lt)?.tier;return i!==void 0&&i!=="owner"}function wt(i,d){return{key:i.key,kind:"agent",name:`${d}.${i.id}`,displayName:i.title,home:!1,readOnly:!1,mode:{yolo:!1,longRunning:!1},typing:!1,stoppable:!1}}var St=(i)=>i.attention===!0,xt=(i,d)=>(d.lastAt??"").localeCompare(i.lastAt??"");async function kt(i){let d=await Promise.allSettled(i.map((l)=>He.list(l))),m=[];d.forEach((l,y)=>{let h=i[y];if(l.status!=="fulfilled"||h===void 0)return;for(let v of l.value.rooms)m.push({room:v,kind:h})}),m.sort((l,y)=>xt(l.room,y.room));let f={};for(let{room:l}of m)if(St(l))f[l.key]=!0;return{views:m.map(({room:l,kind:y})=>wt(l,y)),attention:f,loaded:!0}}function ss(i){let d=ze(),m=u((k)=>k.connects),f=me((k)=>k.lists),l=a(0),y=a(0),h=i.join(`
|
|
133
|
-
`),{views:v}=Un();o(()=>{l.current+=1;let k=l.current,E=!0;return kt(h===""?[]:h.split(`
|
|
134
|
-
`)).then((V)=>{if(!E||k<y.current)return;y.current=k,bn=V,yt()}),()=>{E=!1}},[h,m,f]);let w=v.slice(0,gt).map((k)=>k.key).join(`
|
|
135
|
-
`);o(()=>{let k=w===""?[]:w.split(`
|
|
136
|
-
`);for(let E of k)d.send({type:"subscribe",room:E});return()=>{for(let E of k)d.send({type:"unsubscribe",room:E})}},[d,w,m])}var Rt=380,Mt="cubic-bezier(0.7, 0, 0.84, 0)",Ct=2.4,yn=0.35,Et=260,Tt="cubic-bezier(0.2, 0.8, 0.2, 1)",Lt=1.06,Ot=700,te;function vn(i){if(te?.host===i&&te.phase==="diving")te.abort()}var At=(i)=>{if(!i||typeof i.animate!=="function")return;i.animate([{transform:`scale(${Lt})`,opacity:yn},{transform:"scale(1)",opacity:1}],{duration:Et,easing:Tt})};function wn(i,d,m,f){if(te)return;let l=i.closest("main.route")??i;if(_e()||typeof l.animate!=="function"){m();return}f?.();let y=l.getBoundingClientRect(),h=`${d.x-y.left}px ${d.y-y.top}px`,v={overflow:l.style.overflow,events:l.style.pointerEvents};l.style.overflow="hidden",l.style.pointerEvents="none";let w=l.animate([{transformOrigin:h,transform:"scale(1)",opacity:1},{transformOrigin:h,transform:`scale(${Ct})`,opacity:yn}],{duration:Rt,easing:Mt,fill:"forwards"}),k=document.documentElement,E,V,oe=()=>{l.style.overflow=v.overflow,l.style.pointerEvents=v.events,w.cancel()},re=()=>{window.removeEventListener("popstate",I),window.removeEventListener("hashchange",I)},F={host:i,phase:"diving",abort:I};function I(){if(te!==F||F.phase!=="diving")return;re(),oe(),te=void 0}let N=(G)=>{if(te!==F)return;if(V?.disconnect(),clearTimeout(E),k.removeAttribute("data-dive"),oe(),te=void 0,G)At(document.querySelector("main.route"))};te=F,window.addEventListener("popstate",I),window.addEventListener("hashchange",I),w.finished.then(()=>{if(te!==F||F.phase!=="diving")return;if(F.phase="committing",re(),k.setAttribute("data-dive",""),m(),!i.isConnected){N(!0);return}V=new MutationObserver(()=>{if(!i.isConnected)N(!0)}),V.observe(l.parentElement??document.body,{childList:!0,subtree:!0}),E=setTimeout(()=>N(!i.isConnected),Ot)},()=>{return})}var Ht=(i)=>i==="sleepy"?"idle":i;function xn(i,d){let m={};for(let[l,y]of Object.entries(i))m[l]=Ht(y);let f=(l)=>l!==void 0&&(l in m)&&m[l]!=="waiting"&&m[l]!=="error";for(let l of d){let y=l.agent;if(l.typing&&f(y)){let h=m[y];if(h!=="thinking"&&h!=="working")m[y]="thinking"}}for(let l of d)if(f(l.voice))m[l.voice]="speaking";return m}function Fe(i,d){if(i==="speaking")return"happy";return(d?.STATE_EXPRESSION??Pt)[i]}var Pt={idle:"neutral",thinking:"thinking",working:"determined",waiting:"curious",done:"proud",error:"apologetic",sleepy:"sleepy"};function Ie(i,d){return`s${i}${d.toLowerCase().replace(/[^a-z0-9]/g,"")}`.slice(0,16)}var Dt={x:-7,y:-3,w:114,h:100},fe=256;function Ve(i,d,m,f,l,y,h){let v=i.composeSvg(d,{bare:!0,look:m,expr:Fe(f,i),...h?{mouth:h}:{},state:"idle",still:!0,size:fe,uid:l,skins:y}),{x:w,y:k,w:E,h:V}=Dt;return v.replace('viewBox="0 0 100 100"',`viewBox="${w} ${k} ${E} ${V}"`).replace(`width="${fe}" height="${fe}"`,`width="${fe}" height="${Math.round(fe*V/E)}"`)}function Ke(i,d,m,f,l,y){if(f!=="speaking")return{avatarSvg:Ve(i,d,m,f,l,y)};return{avatarSvg:Ve(i,d,m,f,l,y,"closed"),talkSvg:Ve(i,d,m,f,l,y,"open")}}function Mn(i){let d=i.delayMs??300,m=i.timers??{set:(h,v)=>setTimeout(h,v),clear:(h)=>clearTimeout(h)},f=new Map,l=new Map,y=(h)=>{let v=l.get(h);if(v===void 0)return;m.clear(v),l.delete(h)};return{seed(h,v){y(h),f.set(h,Fe(v))},update(h,v){let w=Fe(v);if(!f.has(h)){f.set(h,w);return}if(y(h),f.get(h)===w)return;l.set(h,m.set(()=>{l.delete(h),f.set(h,w),i.setAvatar(h,v)},d))},forget(h){y(h),f.delete(h)},dispose(){for(let h of[...l.keys()])y(h);f.clear()}}}var Vt={idle:c("idle"),thinking:c("thinking"),working:c("working"),waiting:c("waiting"),speaking:c("speaking"),done:c("done"),error:c("error")},Ft=()=>({table:t("Round table"),seat:(i,d)=>t("{name} ({state})",{name:i,state:t(Vt[d])})}),It=()=>{Be().catch(()=>{return})};function dn(i){let d=vi(),{views:m}=Un(),f=u((l)=>{let y=l.order.map((v)=>l.rooms[v]?.view).filter((v)=>v!==void 0&&v.kind==="agent"&&!v.helper);return[...i?i.slice(0,On).map((v)=>y.find((w)=>w.name===v)).filter((v)=>v!==void 0):y].sort((v,w)=>Number(w.home)-Number(v.home)).slice(0,On)},i?.join(`
|
|
137
|
-
`)??"");return d?m.slice(0,On):f}function xi(){return u((i)=>i.order.map((d)=>i.rooms[d]?.view).filter((d)=>d!==void 0&&d.kind==="agent"&&!d.helper),"agents")}function Kt(i){let d=ke(),m=u((f)=>Object.values(f.rooms).filter((l)=>i?l.key===i:l.view?.kind==="group").map((l)=>{let y=Me(l.round),h=y??l.agent,v=l.typing&&l.progress.text!=="";return{key:l.key,typing:l.typing||y!==void 0,...h===void 0?{}:{agent:h},...v&&h!==void 0?{streamer:h}:{}}}),i??"");return C(()=>m.map(({key:f,streamer:l,...y})=>{let h=d[f]??l;return h===void 0?y:{...y,voice:h}}),[m,d])}function _t(i){return u((d)=>fn(i?d.rooms[i]?.round:void 0),i??"")}function Vn(i){let{variant:d="full",onHandle:m}=i,f=Jn(),l=ct(),y=ii(),h=Rn(),v=tt(),w=dn(i.members),k=ia(w.map((R)=>R.key)),E=Kt(i.groupRoom),V=_t(i.groupRoom),oe=Un().attention,re=vi(),F=a(re);F.current=re;let I=d==="full"&&i.list===!0,N=C(()=>xn(Object.fromEntries(w.map((R)=>{let S=k[R.key]??"idle";return[R.name,oe[R.key]&&(S==="idle"||S==="sleepy")?"waiting":S]})),E),[w,k,E,oe]),G=a(N);G.current=N;let D=C(()=>{if(!f)return[];return w.map((R,S)=>{let L=v[R.name]??R.character??Sn(f,R);return{id:R.name,name:R.displayName,color:f.accentOf(L,y.look),...Ke(f,L,y.look,G.current[R.name]??"idle",Ie(S,R.name),h)}})},[f,w,v,y.look,h]),q=a(D);q.current=D;let U=a(w);U.current=w;let Z=a({look:l,scheme:y.scheme});Z.current={look:l,scheme:y.scheme};let ae=a(null),H=a(void 0),[J,ue]=r(0),W=a(void 0),le=a(()=>{return});le.current=(R)=>{let S=w.find((L)=>L.name===R);if(!f||!S)return;return v[R]??S.character??Sn(f,S)};let z=a(y);z.current=y;let de=a(h);de.current=h;let Q=a(f);Q.current=f;let j=a(m);j.current=m;let O=a(i);O.current=i;let ee=f!==void 0&&D.length>0;o(()=>{let R=ae.current;if(!ee||!R)return;let S=!0,L,K=Mn({setAvatar:(Y,ie)=>{let ne=le.current(Y),M=Q.current,se=U.current.findIndex((be)=>be.name===Y);if(!ne||!M||se<0)return;let{avatarSvg:pe,talkSvg:ge}=Ke(M,ne,z.current.look,ie,Ie(se,Y),de.current);L?.setAvatar(Y,pe,ge)}});return W.current=K,(async()=>{let{mountRoundTable:Y}=await (p("e24gjxtd"),import("./chunk-entry-e24gjxtd.js")),ie=q.current.map((M)=>({...M,state:G.current[M.id]??"idle"})),ne=await Y(R,{theme:Z.current.look,scheme:Z.current.scheme,seats:ie,onSeatClick:({id:M,at:se})=>{let pe=O.current.onSeat;if(pe){pe(M);return}let ge=U.current.find((Hn)=>Hn.name===M);if(!ge)return;let be=()=>X("room",ge.key),Ge=ae.current;if(se&&Ge)wn(Ge,se,be,F.current?It:void 0);else be()},...O.current.onSeatMenu?{onSeatMenu:(M)=>O.current.onSeatMenu?.(M)}:{},ownerName:O.current.ownerName??t("You"),focus:O.current.focus??null,onFocus:(M)=>O.current.onFocus?.(M),reducedMotion:"auto",lowPower:"auto",variant:d,listBelow:I,labels:Ft()});if(!S){ne.dispose();return}L=ne,H.current=ne;for(let M of ie)K.seed(M.id,M.state??"idle");j.current?.(ne),ue((M)=>M+1)})(),()=>{S=!1,vn(R),K.dispose(),W.current=void 0,H.current=void 0,j.current?.(void 0),L?.dispose()}},[ee,d,I]);let ce=i.focus??null;if(o(()=>{let R=H.current;if(R&&R.focused()!==ce)R.focus(ce)},[ce,J]),o(()=>{let R=H.current;if(!R||D.length===0)return;let S=G.current;R.setSeats(D.map((L)=>({...L,state:S[L.id]??"idle"})));for(let L of D)W.current?.seed(L.id,S[L.id]??"idle")},[D,J]),o(()=>{let R=H.current;if(!R)return;for(let S of q.current)R.setMark(S.id,V[S.id]??null)},[V,D,J]),o(()=>{let R=H.current;if(R)R.setTheme(l,y.scheme)},[l,y.scheme,J]),o(()=>{let R=H.current;if(!R)return;for(let S of q.current){let L=N[S.id]??"idle";R.setState(S.id,L),W.current?.update(S.id,L)}},[N,J]),w.length===0)return e("p",{className:"table-empty",children:t("No knights are seated yet.")});return e("section",{className:"table-host",ref:ae,"aria-label":t("Round table")})}function Cn(i,d){let{line:m}=De(i),f=ke()[i],[l,y]=r(),h=nn(f,m,d),v=`${m?.id??""}|${h??""}`;return{focus:cn(h,v,l),look:(E)=>y({lineId:v,member:E})}}function Nn(i){let{roomKey:d,members:m}=i,f=dn(m),[l]=we();return n("div",{className:"table-frame room-scene","data-focused":"","data-folded":l||void 0,children:[e(Vn,{members:m,groupRoom:d,variant:"full",focus:i.focus,onFocus:i.onLook,onSeat:(y)=>{i.onLook(y);let h=f.find((v)=>v.name===y);if(h)pr(d,h.displayName)},...i.onHandle?{onHandle:i.onHandle}:{},...i.onSeatMenu?{onSeatMenu:i.onSeatMenu}:{}}),e(hn,{roomKey:d,open:!0,streams:i.streams??!1,blurAfterSend:i.blurAfterSend===!0,mentionable:f,strip:e(gn,{roomKey:d})})]})}Ji();var $t=b(()=>(p("hdsg3fes"),import("./chunk-council-sheet-hdsg3fes.js")).then((i)=>({default:i.CouncilSheet}))),Bt=b(()=>(p("dqwvcr2p"),import("./chunk-mode-toggle-dqwvcr2p.js")).then((i)=>({default:i.ModeToggle}))),Gt=b(()=>(p("18mnqcja"),import("./chunk-room-menu-18mnqcja.js")).then((i)=>({default:i.RoomMenu})));function Ln(i,d,m,f,l){ta(i,d).then((y)=>{if(y)Oe({...y,at:m,via:f,source:l})},()=>{return})}function qt(){let i=Re("(max-width: 719px)"),d=Re("(pointer: coarse)");return i||d}function er(i,d){let[m,f]=r(!1),[l,y]=r(!1),h=()=>{f(!0),y(!0)},v=m?e(T,{fallback:null,children:e($t,{open:l,onClose:()=>y(!1),council:i,...d?{go:d}:{}})}):null;return{ask:h,sheet:v}}function Ur(i){let{roomKey:d}=i,m=ze(),f=u((S)=>S.rooms[d]),l=u((S)=>S.connection==="open"),y=u((S)=>S.limits),h=ct(),v=qt(),w=f?.view,k=w?.members??[],E=dn(k),[V,oe]=Ye(d),[re,F]=r(),{focus:I,look:N}=Cn(d,k),{ask:G,sheet:D}=er(w,i.go),[q,U]=r(!1),[Z,ae]=r(!1),H=a(null),[J,ue]=r(),[W,le]=r(!1);o(()=>(m.focus(d),()=>m.focus(void 0)),[m,d]);let z=w?.displayName??d,de=si(d,z,!1),Q=f?.mode,j=E.length>0||i.empty===void 0,O=j&&V==="scene",ee=w?.notes===!0,ce=ee&&W,R=ee&&J===d&&!ce;return n(g,{children:[e(Xe,{view:w,name:z,working:f?.typing===!0,room:i.room,onPick:G,onReset:O&&re?.kind==="webgl"?()=>N(null):void 0,mode:j?V:void 0,onMode:oe,menuButton:H,onMenu:()=>{ae(!0),U(!0)}}),h==="camelot"&&j&&!O?e("div",{className:"group-strip",onMouseDown:(S)=>S.preventDefault(),children:e(Vn,{members:k,groupRoom:d,variant:"compact",onSeat:(S)=>{let L=E.find((K)=>K.name===S);if(L)pr(d,L.displayName)},onSeatMenu:(S)=>{let L=E.find((K)=>K.name===S.id);if(L)Ln(L.key,d,S.at,S.via,S.source)}})}):null,!l?n("div",{className:"offline-banner",role:"status",children:[e("span",{className:"spinner","aria-hidden":"true"}),t("Reconnecting… messages wait here until it is back.")]}):null,e(Mr,{room:d,mode:Q&&(Q.yolo||Q.longRunning)?Q:void 0,approved:f?.autoApproved??0}),!j?e("div",{className:"table-frame",children:i.empty}):O?e(Nn,{roomKey:d,members:k,focus:I,onLook:N,blurAfterSend:v,onHandle:F,onSeatMenu:(S)=>{let L=E.find((K)=>K.name===S.id);if(L)Ln(L.key,d,S.at,S.via,S.source)}}):e("div",{className:"table-chat",children:e(Rr,{roomKey:d,name:z,composer:(S)=>w?.readOnly?null:e(Nt,{draftKey:d,mentionable:E,name:z,commands:de,onAddressed:le,...ee?{placeholder:R?t("Write an internal note…"):t("Ask AI…"),above:e(T,{fallback:null,children:e(Bt,{on:!R,label:t("@AI"),...ce?{locked:t("The message starts with @AI, so the knight answers.")}:{},onChange:(L)=>ue(L?void 0:d)})})}:{},limits:y,stoppable:Boolean(f?.stoppable),stopLabel:t("Stop the round"),blurAfterSend:v,onSend:(L,K,Y)=>{if(ee&&Y){let ie=kn(L);m.say(d,ie===""&&K.length===0?L:ie,K,"turn")}else m.say(d,L,K,R?"note":void 0);S(!0)},onStop:()=>m.send({type:"stop",room:d}),...i.incoming&&i.onIncomingTaken?{incoming:i.incoming,onIncomingTaken:i.onIncomingTaken}:{}},d)})}),D,Z?e(T,{fallback:null,children:e(Gt,{open:q,room:d,mode:Q,muted:w?.muted===!0,agent:void 0,group:w?.name,coordinator:w?.coordinator===!0,displayName:z,readOnly:w?.readOnly??!1,parent:void 0,onClose:()=>U(!1),onEditCouncil:G,onAskYolo:()=>{U(!1),ye({kind:"yolo",room:d,name:z,restoreFocus:()=>H.current})},onAskStartOver:()=>{U(!1),ye({kind:"start-over",room:d,name:z,restoreFocus:()=>H.current})}})}):null]})}
|
|
138
|
-
export{Ji,Un,vi,ss,dn,xi,Vn,er,Ur};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Je,xo,sn,So,Y,ae,Fi,wo,_a,Ta,ko,Pa,Qa,Ma,Nn}from"./chunk-index-xvdna54d.js";export{sn as AVATAR_STATES,Y as CATALOG,Je as CLASS_IDS,ae as CharacterError,Ta as EAST_ASIAN_SKINS,xo as EXPRESSIONS,So as STATE_EXPRESSION,Qa as accentOf,Ma as characterCss,ko as checkSkins,Pa as composeSvg,wo as parseCharacter,_a as readCharacter,Fi as resolveCharacter,Nn as suggestCharacter};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-ne8v2rxx.js";import"./chunk-index-6e9nmad3.js";import{fi}from"./chunk-index-ndhwytvz.js";var r=()=>fi();export{r as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-ne8v2rxx.js";import"./chunk-index-6e9nmad3.js";import{ui}from"./chunk-index-awc03q99.js";import"./chunk-index-ndhwytvz.js";import"./chunk-index-vxn4zws9.js";import"./chunk-index-tqrjr37v.js";var t=()=>ui();export{t as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-ne8v2rxx.js";import"./chunk-index-6e9nmad3.js";import{Vt}from"./chunk-index-vxn4zws9.js";import"./chunk-index-tqrjr37v.js";var t=()=>Vt({jsx:!0});export{t as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-index-ne8v2rxx.js";import"./chunk-index-6e9nmad3.js";import{Vt}from"./chunk-index-vxn4zws9.js";import"./chunk-index-tqrjr37v.js";var r=()=>Vt({typescript:!0,jsx:!0});export{r as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ua,ln,$r,Lo,Xo,Ra,Ua,zo,Va,qa}from"./chunk-index-tvsvtd4q.js";import"./chunk-index-pce4byw4.js";import"./chunk-index-g3f1sdw0.js";export{Lo as createFolder,zo as deleteFolder,qa as dropRoom,ln as moveRoom,Va as muteFolder,Ua as nudgeFolder,$r as nudgeRoom,ua as pinRoom,Ra as placeFolderBefore,Xo as renameFolderTo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Zn,Ea,wa,Aa,$a,Na,La,ka,Xa,za}from"./chunk-index-86x6b7dx.js";import"./chunk-index-k3hj2310.js";import"./chunk-index-vaxytvde.js";import"./chunk-index-39gw0qhr.js";import"./chunk-index-mhb8mpg3.js";import"./chunk-index-maf6wr1b.js";import"./chunk-index-qwztcbjz.js";import"./chunk-index-r1g24er0.js";import"./chunk-index-6f4qvp5p.js";import"./chunk-index-4p45h04z.js";import"./chunk-index-xkb336kq.js";import"./chunk-index-wqbcade7.js";import"./chunk-index-e3encn5p.js";import"./chunk-index-tfgd7vr5.js";import"./chunk-index-pce4byw4.js";import"./chunk-index-g3f1sdw0.js";export{wa as addMenu,La as avatarMenu,ka as cardDetails,Xa as cardMenu,Zn as copyText,za as fileMenu,Na as messageMenu,Aa as openAddMenu,Ea as roomMenu,$a as seatMenu};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Vr}from"./chunk-index-726w3145.js";export{Vr as ModeToggle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o,r,t,e,n,s,l,m,k,Q}from"./chunk-index-rvatmx8s.js";import"./chunk-index-0q15ysrb.js";import{wi,cs,us}from"./chunk-index-ptvrkv0r.js";import"./chunk-index-37g8ggry.js";function g(a,u){let i=Math.max(0,Math.round((u-Date.parse(a))/60000));if(i<1)return t("just now");if(i<60)return t("{count} min ago",{count:i});let c=Math.round(i/60);if(c<24)return t("{count} h ago",{count:c});return t("{count} d ago",{count:Math.round(c/24)})}function f({notice:a}){let[u,i]=r(!1),[c,d]=r();return n("li",{className:"card stack notice","data-urgent":a.urgency==="high"||void 0,children:[n("div",{className:"card-head",children:[e("strong",{children:a.title}),a.urgency==="high"?e(Q,{tone:"warn",children:t("Urgent")}):null]}),a.body?e("p",{children:a.body}):null,e("p",{className:"meta",children:g(a.raisedAt,Date.now())}),c?e(m,{message:c}):null,n("div",{className:"actions",children:[a.open?e("a",{className:"button",href:us(a.open),children:t("Open")}):null,a.ackable?a.acked?n("span",{className:"meta",children:[e(s,{name:"check",size:14})," ",t("Handled")]}):e("button",{type:"button",className:"secondary",disabled:u,onClick:async()=>{i(!0),d(void 0);try{await cs(a.tag)}catch(p){d(l(p))}finally{i(!1)}},children:t("Handled")}):null]})]})}function M(){let{notices:a,known:u}=wi(),[,i]=r(0);return o(()=>{let c=setInterval(()=>i((d)=>d+1),60000);return()=>clearInterval(c)},[]),n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Notices")})}),a.length===0?e(k,{children:u?t("Nothing needs you."):t("Loading…")}):e("ul",{className:"stack notices",children:a.map((c)=>e(f,{notice:c},c.tag))})]})}export{M as NoticesPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o,C,a,r,t,e,n,s,x,X,u,Ve,he}from"./chunk-index-rvatmx8s.js";import{A}from"./chunk-index-0dyf2gdm.js";import{Ai}from"./chunk-index-6j75embz.js";function I(m){let[f,v]=r(""),[p,h]=r(0),g=a(null),b=u((l)=>l.order.flatMap((i)=>{let c=l.rooms[i]?.view;return c?[{key:i,name:c.displayName,agent:c.name,character:c.character,kind:c.kind}]:[]})),d=C(()=>[...b.map((i)=>({id:i.key,label:i.name,hint:i.kind==="agent"?t("Knight"):i.kind==="group"?t("Group"):t("Thread"),room:!0,...i.kind==="agent"?{avatar:{name:i.agent,character:i.character}}:{icon:"conversations"},go:()=>X("room",i.key)})),...m.pages.map((i)=>({id:i.pane,label:i.label,hint:t("Page"),icon:i.icon,go:()=>X(i.pane)}))].flatMap((i)=>{let c=Ai(f,i.label);return c===void 0?[]:[{target:i,score:c}]}).sort((i,c)=>c.score-i.score).map((i)=>i.target).slice(0,12),[b,m.pages,f]);o(()=>h(0),[f]),o(()=>{if(m.open)v(""),requestAnimationFrame(()=>g.current?.focus())},[m.open]);let y=(l)=>{if(!l)return;m.onClose(),l.go()};return e(A,{open:m.open,title:t("Find a room"),onClose:m.onClose,variant:"palette",children:n("div",{className:"palette-box",children:[n("div",{className:"palette-input",children:[e(s,{name:"search",size:18}),e("input",{ref:g,value:f,placeholder:t("Find a room or page"),"aria-label":t("Find a room or page"),role:"combobox","aria-expanded":"true","aria-controls":"palette-list","aria-activedescendant":d[p]?`palette-${p}`:void 0,onChange:(l)=>v(l.target.value),onKeyDown:(l)=>{if(Ve(l.nativeEvent))return;if(l.key==="ArrowDown")l.preventDefault(),h((i)=>Math.min(d.length-1,i+1));else if(l.key==="ArrowUp")l.preventDefault(),h((i)=>Math.max(0,i-1));else if(l.key==="Enter")l.preventDefault(),y(d[p])}}),e("kbd",{children:"Esc"})]}),n("ul",{className:"palette-list",children:[d.length===0?e("li",{className:"palette-empty",children:t("Nothing matches.")}):null,d.map((l,i)=>e("li",{"data-active":i===p||void 0,children:n("a",{href:l.room?x("room",l.id):x(l.id),onClick:(c)=>{c.preventDefault(),y(l)},onMouseMove:()=>h(i),"aria-current":i===p?"true":void 0,children:[l.avatar?e(he,{spec:l.avatar.character,name:l.avatar.name,size:28,live:!1}):e("span",{className:"palette-icon",children:e(s,{name:l.icon??"list",size:16})}),e("span",{className:"palette-label",children:l.label}),e("span",{className:"meta",children:l.hint})]})},l.id))]})]})})}export{I as Palette};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jr,Ia}from"./chunk-index-vaxytvde.js";import"./chunk-index-maf6wr1b.js";import"./chunk-index-4p45h04z.js";import"./chunk-index-wqbcade7.js";import"./chunk-index-e3encn5p.js";import"./chunk-index-tfgd7vr5.js";import"./chunk-index-pce4byw4.js";import"./chunk-index-g3f1sdw0.js";export{Ia as folderMenu,jr as placementItems};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dr}from"./chunk-index-gc30hm37.js";import"./chunk-index-5e8wn6r3.js";import"./chunk-index-gae833v6.js";import"./chunk-index-0dyf2gdm.js";import"./chunk-index-maf6wr1b.js";import"./chunk-index-xkb336kq.js";import"./chunk-index-e3encn5p.js";import"./chunk-index-tvsvtd4q.js";import"./chunk-index-pce4byw4.js";import"./chunk-index-g3f1sdw0.js";export{Dr as RoomConfirmHost};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,e,s,u}from"./chunk-index-rvatmx8s.js";import"./chunk-index-e3encn5p.js";import"./chunk-index-tfgd7vr5.js";import"./chunk-index-maf6wr1b.js";import{bi}from"./chunk-index-14cxgacv.js";import"./chunk-index-4p45h04z.js";import"./chunk-index-wqbcade7.js";function r(){if(!u((o)=>o.listed))return null;return e("button",{type:"button",className:"header-button icon-button","aria-haspopup":"menu","aria-label":t("Folders and order"),onClick:(o)=>bi(o.currentTarget),children:e(s,{name:"more",size:18})})}export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dr,fr}from"./chunk-index-vwd5drzh.js";import"./chunk-index-e3encn5p.js";import"./chunk-index-tfgd7vr5.js";export{dr as FoldToggle,fr as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C,a,r,t,F,g,e,n,s,x,X,Me,Xe,u,Ve,rn,Mn,et,Ae,It,$e,on}from"./chunk-index-rvatmx8s.js";import{me}from"./chunk-index-tfgd7vr5.js";import{Ni}from"./chunk-index-vw592m3p.js";import"./chunk-index-e3encn5p.js";import{bn,dr}from"./chunk-index-vwd5drzh.js";import{Ai}from"./chunk-index-6j75embz.js";import{$i}from"./chunk-index-n92zea3s.js";import{Jt}from"./chunk-index-qb41kkt3.js";import{Sa}from"./chunk-index-g3f1sdw0.js";bn();var L=(o)=>o==="pinned"||o==="rest"?Ae(o):o==="waiting"||o==="home"?void 0:o;function S(){let o=u((f)=>JSON.stringify(Sa(f,(l)=>Xe(f,l),(l)=>Me(f,l)>0,!0).map((l)=>({id:l.id,...l.title===void 0?{}:{title:l.title},entries:l.keys.map((w)=>({key:w,name:f.rooms[w]?.view?.displayName??w,waiting:Me(f,w)>0}))})))),d=Ni(),p=a(o);if(!d)p.current=o;let h=p.current;return C(()=>JSON.parse(h),[h])}function K(o){let{key:d,name:p}=o.entry,h=u((c)=>c.rooms[d]),f=u((c)=>Me(c,d)),l=h?.view,w=et(l?.character),b=Jt(()=>rn(d,o.onLeave),o.liftable&&!l?.home?$i(d):void 0);if(!l)return null;return e("li",{...o.liftable&&!l.home?{"data-drop-item":"","data-key":d}:{},children:n("a",{className:"switcher-row",...b,href:x("room",d),"aria-current":d===o.current?"page":void 0,style:w,onClick:(c)=>{if(c.button!==0||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey)return;c.preventDefault(),o.onPick(d)},children:[n("span",{className:"switcher-picture",children:[e($e,{view:l,size:40}),f?e("span",{className:"switcher-dot","aria-hidden":"true"}):null]}),n("span",{className:"switcher-name",children:[e("strong",{children:p}),h?.typing?n("span",{className:"switcher-working",children:[n("span",{className:"typing","aria-hidden":"true",children:[e("i",{}),e("i",{}),e("i",{})]}),t("Working")]}):null]}),e(on,{room:d}),f?e("span",{className:"badge badge-warn",children:F(f,"{count} card waiting","{count} cards waiting")}):null,l.muted?n("span",{className:"switcher-mode","data-mode":"muted",title:t("Notifications are off"),children:[e(s,{name:"bell-off",size:14}),e("span",{className:"visually-hidden",children:t("Notifications are off")})]}):null,h?.mode.yolo?n("span",{className:"switcher-mode","data-mode":"yolo",title:t("Yolo"),children:[e(s,{name:"bolt",size:14}),e("span",{className:"visually-hidden",children:t("Yolo")})]}):null,h?.mode.longRunning?n("span",{className:"switcher-mode","data-mode":"long",title:t("Long-running"),children:[e(s,{name:"timer",size:14}),e("span",{className:"visually-hidden",children:t("Long-running")})]}):null]})})}function _(o){let[d,p]=r(""),h=S(),f=It(),l=me((i)=>i.unread),w=h.map((i)=>({...i,entries:i.entries.filter((m)=>Ai(d,m.name)!==void 0)})).filter((i)=>i.entries.length>0||d===""),b=w.filter((i)=>i.entries.length>0).length>1,c=w.map((i)=>{let m=L(i.id),y=b&&d===""&&m!==void 0&&i.entries.length>0&&f.has(m);return{...i,fold:m,folded:y,total:i.entries.length,entries:y?i.entries.filter((N)=>N.key===o.current||N.waiting||(l[N.key]??0)>0):i.entries}}),k=(i)=>o.close(i===o.current?void 0:()=>X("room",i)),z=h.some((i)=>i.id!=="waiting"&&i.id!=="home"&&i.id!=="rest"&&(i.id!=="pinned"||i.entries.length>0))?t("Ungrouped"):t("Rooms"),v=(i)=>i.id==="home"?t("Home"):i.id==="pinned"?t("Pinned"):i.id==="rest"?z:i.title??t("Rooms");return n(g,{children:[n("div",{className:"switcher-search",children:[e(s,{name:"search",size:16}),e("input",{type:"search",value:d,placeholder:t("Find a room"),"aria-label":t("Find a room"),enterKeyHint:"go",autoComplete:"off",onChange:(i)=>p(i.target.value),onKeyDown:(i)=>{let m=c.flatMap((y)=>y.entries)[0];if(i.key==="Enter"&&m&&!Ve(i.nativeEvent))k(m.key)}}),e("button",{type:"button",className:"icon-button switcher-add","aria-label":t("Add"),"aria-haspopup":"menu",onClick:(i)=>Mn(i.currentTarget,o.close),children:e(s,{name:"plus"})})]}),e("div",{className:"switcher-scroll","data-drop-root":"",children:c.map((i)=>{let m=i.id==="waiting",y=i.id==="pinned"?"pinned":i.id==="rest"?"rest":m||i.id==="home"?void 0:"folder";return n("section",{"aria-label":m?t("Waiting for you"):v(i),...i.total===0?{"data-empty":""}:{},...y?{"data-drop-zone":y,"data-zone-id":i.id,...y==="folder"?{"data-folder":i.id}:{}}:{},children:[m?e("h2",{className:"switcher-heading","data-waiting":"",children:t("Waiting for you")}):b||i.total===0?e("h2",{className:"switcher-heading",children:i.fold&&i.total>0?e(dr,{id:i.fold,name:v(i),open:!i.folded,controls:`switcher-body-${i.id}`,count:i.folded?i.total:void 0}):v(i)}):null,e("ul",{className:"switcher-list",id:`switcher-body-${i.id}`,children:i.entries.map((N)=>e(K,{entry:N,current:o.current,onPick:k,onLeave:o.close,liftable:!m&&i.id!=="home"},N.key))})]},i.id)})})]})}export{_ as SwitcherList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Qe,o,r,t,e,n,s,X,u,lt}from"./chunk-index-rvatmx8s.js";import{Ji,Un,vi,ss,dn,xi,Vn,er,Ur}from"./chunk-index-x7p6k52w.js";import"./chunk-index-qwztcbjz.js";import"./chunk-index-zr2qwzz4.js";import"./chunk-index-gpaychmm.js";import"./chunk-index-tfgd7vr5.js";import"./chunk-index-r1g24er0.js";import"./chunk-index-0dyf2gdm.js";import{xs,Mi,Ss}from"./chunk-index-39gw0qhr.js";Ji();function y(){return ss((Qe(lt)?.kinds??[]).map((a)=>a.kind)),null}function v({focus:a}){let[l,p]=r(),m=dn(void 0),i=Un(),b=i.loaded&&m.length===0;return o(()=>{if(a&&i.loaded)X("table",void 0,{replace:!0})},[a,i.loaded]),n("div",{className:"table-page",children:[n("header",{className:"page-head",children:[e("h1",{children:t("Round table")}),n("div",{className:"table-tools",children:[l?.kind==="webgl"?e("button",{type:"button",className:"icon-button","aria-label":t("Reset view"),title:t("Reset view"),onClick:()=>l.focus(null),children:e(s,{name:"reset"})}):null,e("button",{type:"button",className:"secondary",onClick:()=>X("rooms"),children:t("All rooms")})]})]}),n("div",{className:"table-frame",children:[b?n("div",{className:"table-empty-state",children:[e("strong",{children:t("The table is empty")}),e("p",{className:"meta",children:t("There are no rooms to seat yet.")})]}):e(Vn,{onHandle:p,onSeat:(f)=>{let c=m.find((d)=>d.name===f);if(c)X("room",c.key)},onFocus:(f)=>{let c=m.find((d)=>d.name===f);if(c)X("room",c.key)}}),e(y,{})]})]})}function N({named:a}){let l=Mi(),p=xs(),m=u((g)=>g.listed),i=Ss(l,p,a),b=xi(),{ask:f,sheet:c}=er(i),d=a===void 0||l.some(k(a));o(()=>{if(a!==void 0&&m&&!d)X("table",void 0,{replace:!0})},[a,m,d]);let h=n("div",{className:"table-empty-state",children:[e("strong",{children:i?t("The council is empty"):t("No council yet")}),e("p",{className:"meta",children:i?t("Every member of this council is gone. Edit who sits."):t("A council is a group of up to {max} knights who answer in turn.",{max:8})}),b.length>0?e("button",{type:"button",onClick:f,children:i?t("Edit this council"):t("Pick who sits")}):null]});if(i)return n("section",{className:"room council-page",children:[e(Ur,{roomKey:i.key,empty:h}),c]});return n("div",{className:"table-page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Round table")})}),e("div",{className:"table-frame",children:h}),c]})}var k=(a)=>(l)=>l.key===a||l.name===a;function F({focus:a}){return vi()?e(v,{focus:a}):e(N,{named:a})}export{F as TablePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_o,To,Po}from"./chunk-index-c8vsw9h8.js";import"./chunk-index-wqbcade7.js";export{To as clearAcross,Po as clearFinished,_o as dismissThread};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{pn,Ca,rr,Br,or,Fr,Gr,_i,sr}from"./chunk-index-8cxmgzhy.js";export{_i as cardSlot,rr as closeWaitingList,or as jumpToCard,Ca as openWaiting,sr as showCard,Gr as targetShown,Fr as useTarget,Br as useWaitingList,pn as waitingList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qn,qr}from"./chunk-index-zr2qwzz4.js";export{qn as currentQuery,qr as followUrl};
|